@appsurify-testmap/rrweb-record 3.1.1-alpha.2 → 3.2.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/rrweb-record.cjs +155 -8
- package/dist/rrweb-record.cjs.map +1 -1
- package/dist/rrweb-record.js +155 -8
- package/dist/rrweb-record.js.map +1 -1
- package/dist/rrweb-record.umd.cjs +156 -8
- package/dist/rrweb-record.umd.cjs.map +2 -2
- package/dist/rrweb-record.umd.min.cjs +32 -32
- package/dist/rrweb-record.umd.min.cjs.map +3 -3
- package/package.json +4 -4
|
@@ -1,81 +1,81 @@
|
|
|
1
1
|
(function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrweb", [], f);} else if ("object" == typeof exports) {exports["rrweb"] = f();} else {g["rrweb"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
|
|
2
|
-
"use strict";var Qa=Object.defineProperty,el=Object.defineProperties;var tl=Object.getOwnPropertyDescriptors;var Tt=Object.getOwnPropertySymbols;var Ei=Object.prototype.hasOwnProperty,$i=Object.prototype.propertyIsEnumerable;var Ii=(s,e,t)=>e in s?Qa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,A=(s,e)=>{for(var t in e||(e={}))Ei.call(e,t)&&Ii(s,t,e[t]);if(Tt)for(var t of Tt(e))$i.call(e,t)&&Ii(s,t,e[t]);return s},ie=(s,e)=>el(s,tl(e));var We=(s,e)=>{var t={};for(var r in s)Ei.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Tt)for(var r of Tt(s))e.indexOf(r)<0&&$i.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var rl=Object.defineProperty,sl=(s,e,t)=>e in s?rl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>sl(s,typeof e!="symbol"?e+"":e,t),Ri,il=Object.defineProperty,nl=(s,e,t)=>e in s?il(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Br=(s,e,t)=>nl(s,typeof e!="symbol"?e+"":e,t),K=(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))(K||{});const Mi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Oi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},kt={},ol=()=>!!globalThis.Zone;function Us(s){if(kt[s])return kt[s];const e=globalThis[s],t=e.prototype,r=s in Mi?Mi[s]:void 0,i=!!(r&&r.every(l=>{var o,u;return!!((u=(o=Object.getOwnPropertyDescriptor(t,l))==null?void 0:o.get)!=null&&u.toString().includes("[native code]"))})),n=s in Oi?Oi[s]:void 0,a=!!(n&&n.every(l=>{var o;return typeof t[l]=="function"&&((o=t[l])==null?void 0:o.toString().includes("[native code]"))}));if(i&&a&&!ol())return kt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const o=l.contentWindow;if(!o)return e.prototype;const u=o[s].prototype;return document.body.removeChild(l),u?kt[s]=u:t}catch(l){return t}}const Wr={};function Oe(s,e,t){var r;const i=`${s}.${String(t)}`;if(Wr[i])return Wr[i].call(e);const n=Us(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(Wr[i]=a,a.call(e)):e[t]}const Hr={};function Yn(s,e,t){const r=`${s}.${String(t)}`;if(Hr[r])return Hr[r].bind(e);const n=Us(s)[t];return typeof n!="function"?e[t]:(Hr[r]=n,n.bind(e))}function al(s){return Oe("Node",s,"childNodes")}function ll(s){return Oe("Node",s,"parentNode")}function cl(s){return Oe("Node",s,"parentElement")}function ul(s){return Oe("Node",s,"textContent")}function hl(s,e){return Yn("Node",s,"contains")(e)}function dl(s){return Yn("Node",s,"getRootNode")()}function fl(s){return!s||!("host"in s)?null:Oe("ShadowRoot",s,"host")}function pl(s){return s.styleSheets}function ml(s){return!s||!("shadowRoot"in s)?null:Oe("Element",s,"shadowRoot")}function gl(s,e){return Oe("Element",s,"querySelector")(e)}function yl(s,e){return Oe("Element",s,"querySelectorAll")(e)}function bl(){return Us("MutationObserver").constructor}function wl(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 Sl(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 Cl(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,a=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<a&&i.left<n,o=(t=r.getComputedStyle)==null?void 0:t.call(r,s),c=!!o&&o.display!=="none"&&o.visibility!=="hidden"&&(parseFloat(o.opacity)||0)>0&&l;let h=0;if(c){const p=Math.max(0,Math.min(i.right,n)-Math.max(i.left,0)),m=Math.max(0,Math.min(i.bottom,a)-Math.max(i.top,0)),g=p*m,f=i.width*i.height;h=f>0?g/f:0}return{isVisible:c,ratio:h}}const Q={childNodes:al,parentNode:ll,parentElement:cl,textContent:ul,contains:hl,getRootNode:dl,host:fl,styleSheets:pl,shadowRoot:ml,querySelector:gl,querySelectorAll:yl,mutationObserver:bl,patch:wl,describeNode:Sl,getElementVisibility:Cl};function sr(s){return s.nodeType===s.ELEMENT_NODE}function ut(s){const e=s&&"host"in s&&"mode"in s&&Q.host(s)||null;return!!(e&&"shadowRoot"in e&&Q.shadowRoot(e)===s)}function ht(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function vl(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 xl(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 os(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=>Zn(i,t)).join("");return vl(r)}catch(e){return null}}function Zn(s,e){if(Il(s)){let t;try{t=os(s.styleSheet)||xl(s)}catch(r){t=s.cssText}return s.styleSheet.href?hr(t,s.styleSheet.href):t}else{let t=s.cssText;return s.type===CSSRule.KEYFRAMES_RULE||(s.type,CSSRule.KEYFRAME_RULE),El(s)&&s.selectorText.includes(":")&&(t=Al(t)),e?hr(t,e):t}}function Al(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Il(s){return"styleSheet"in s}function El(s){return"selectorText"in s}class Jn{constructor(){Br(this,"idNodeMap",new Map),Br(this,"nodeMetaMap",new WeakMap),Br(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 $l(){return new Jn}function cr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let a=i||"";const l=r&&_e(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?a=n(a,s):a="*".repeat(a.length)),a}function _e(s){return s.toLowerCase()}const Ni="__rrweb_original__";function Rl(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,a=Ni in n?n[Ni]:n;if(new Uint32Array(a.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(o=>o!==0))return!1}return!0}function ur(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?_e(e):null}function Xn(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(a){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 Ml(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Ol=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Nl=/^(?:[a-z+]+:)?\/\//i,Tl=/^www\..*/i,kl=/^(data:)([^,]*),(.*)/i;function hr(s,e){return(s||"").replace(Ol,(t,r,i,n,a,l)=>{const o=i||a||l,u=r||n||"";if(!o)return t;if(Nl.test(o)||Tl.test(o))return`url(${u}${o}${u})`;if(kl.test(o))return`url(${u}${o}${u})`;if(o[0]==="/")return`url(${u}${Ml(e)+o}${u})`;const c=e.split("/"),h=o.split("/");c.pop();for(const d of h)d!=="."&&(d===".."?c.pop():c.push(d));return`url(${u}${c.join("/")}${u})`})}function Dt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Dl(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let a=Dt(s,t);const l=a.length/s.length;for(let o=1;o<r.length;o++)if(r[o].textContent&&typeof r[o].textContent=="string"){const u=Dt(r[o].textContent,t),c=100;let h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let d=u.substring(0,h),p=a.split(d),m=-1;if(p.length===2)m=p[0].length;else if(p.length>2&&p[0]===""&&r[o-1].textContent!=="")m=a.indexOf(d,1);else if(p.length===1){if(d=d.substring(0,d.length-1),p=a.split(d),p.length<=1)return i.push(s),i;h=c+1}else h===u.length-1&&(m=a.indexOf(d));if(p.length>=2&&h>c){const g=r[o-1].textContent;if(g&&typeof g=="string"){const f=Dt(g).length;m=a.indexOf(d,f)}m===-1&&(m=p[0].length)}if(m!==-1){let g=Math.floor(m/l);for(;g>0&&g<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const f=Dt(s.substring(0,g),t);if(f.length===m){i.push(s.substring(0,g)),s=s.substring(g),a=a.substring(m);break}else f.length<m?g+=Math.max(1,Math.floor((m-f.length)/l)):g-=Math.max(1,Math.floor((f.length-m)*l))}break}}}}return i.push(s),i}function Ll(s,e){return Dl(s,e).join("/* rr_split */")}function Pl(s){var e;const t=Q.parentNode(s),r=t&&t;return!r||!Vs(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function Vs(s){return Q.getElementVisibility(s).isVisible}const _l=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Fl=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],zl=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],js=new WeakSet,Bl=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(Bl.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();_l.includes(r)&&js.add(this)}};const Wl=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){Wl.call(this,s,e,t)};function Hl(s){return s instanceof Element&&js.has(s)}function Ul(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(Fl.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return Hl(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function Ti(){document.querySelectorAll("*").forEach(e=>{zl.forEach(t=>{e.hasAttribute(t)&&js.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Ti():document.addEventListener("DOMContentLoaded",Ti)}catch(s){}const Lt={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},me={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},Vl={MIN_CONFIDENCE_FOR_SKIP:.7},ki=["form","main","nav","section","article","footer","header"],Di=["form","navigation","main","region","contentinfo","complementary","banner","search"],jl=["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"],Re={"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},Kn=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),Gl={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function ft(s){return!!(/^[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)||/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(s)&&(/\d/.test(s)||/[A-Z]/.test(s))||/^radix-/.test(s)||/^mui-\d+$/.test(s))}const qn=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function Qn(s){return s.trim().split(/\s+/).some(e=>ft(e))}let Yl=class{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}findAnchor(e){if(this.cache){const o=this.cache.getAnchor(e);if(o!==void 0)return o}const t=e.tagName.toLowerCase(),r=e.ownerDocument;if(t==="html"){const o={element:e,score:1,tier:"A",depth:0};return this.cacheResult(e,o),o}if(t==="head"||this.isInsideHead(e)){const o=r==null?void 0:r.documentElement;if(o){const u={element:o,score:1,tier:"A",depth:0};return this.cacheResult(e,u),u}}if(t==="body"){const o=r==null?void 0:r.documentElement;if(o){const u={element:o,score:1,tier:"A",depth:0};return this.cacheResult(e,u),u}}let i=e.parentElement,n=0,a=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return a||{element:i,score:me.DEGRADED_SCORE,tier:"C",depth:n};const o=this.scoreAnchor(i);if(o>0){const u=this.applyDepthPenalty(o,n),c=this.getTier(i),h={element:i,score:u,tier:c,depth:n};if(c==="A")return h;(!a||u>a.score)&&(a=h)}i=i.parentElement,n++}const l=a;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const r=e.tagName.toLowerCase();ki.includes(r)&&(t+=me.SEMANTIC_TAG);const i=e.getAttribute("role");i&&Di.includes(i)&&(t+=me.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=me.ARIA_LABEL);const n=e.id;return n&&!ft(n)&&(t+=me.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=me.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=me.DEPTH_PENALTY_THRESHOLD)return e;const r=(t-me.DEPTH_PENALTY_THRESHOLD)*me.DEPTH_PENALTY_FACTOR;return Math.max(0,e-r)}getTier(e){const t=e.tagName.toLowerCase();if(ki.includes(t))return"A";const r=e.getAttribute("role");return r&&Di.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 Zl=[/^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,}/],Jl=[/^\[/,/^(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)?:/,/\/([\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 Gs(s){return Zl.some(e=>e.test(s))}function Ys(s){return s.length<=2||/^\d/.test(s)?!0:Jl.some(e=>e.test(s))}function Xl(s){return!Gs(s)&&!Ys(s)}function Kl(s){return s.filter(e=>Xl(e))}function ql(s){const e=[],t=[];for(const r of s)Ys(r)||Gs(r)?t.push(r):e.push(r);return{semantic:e,utility:t}}function Li(s){return Ys(s)||Gs(s)}const Pi=s=>s.replace(/([#:.[\]@])/g,"\\$1");let Ql=class{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 a=[];let l=t.parentElement;for(;l&&l!==e&&a.length<this.maxDepth;)a.unshift(l),l=l.parentElement;const o=a.length>=this.maxDepth&&l!==e;if(!o&&l!==e)return console.warn("[PathBuilder] Target is not a descendant of anchor"),{path:[],degraded:!0,degradationReason:"target-not-descendant-of-anchor"};let u=this.filterNoise(a);return u=this.ensureUniqueness(a,u,e,t,r),{path:u.map(c=>{const h=c.parentElement;let d;if(h){const p=Array.from(h.children).indexOf(c);p!==-1&&(d=p+1)}return{tag:c.tagName.toLowerCase(),semantics:r.extract(c),score:r.scoreElement(c),nthChild:d}}),degraded:o,degradationReason:o?"path-depth-overflow":void 0}}buildPathNodes(e,t,r){return this.buildPath(e,t,r).path}ensureUniqueness(e,t,r,i,n){const a=this.buildTestSelector(r,t,i);try{const l=i.ownerDocument;if(!l)return t;let o;if(this.cache){const c=this.cache.getSelectorResults(a);c!==void 0?o=c:(o=Array.from(l.querySelectorAll(a)),this.cache.setSelectorResults(a,o))}else o=l.querySelectorAll(a);if(o.length<=1)return t;const u=e.filter(c=>!t.includes(c));for(const c of u){if(n.scoreElement(c)<Vl.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,c,e),d=this.buildTestSelector(r,h,i);try{let p;if(this.cache){const m=this.cache.getSelectorResults(d);m!==void 0?p=m:(p=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,p))}else p=l.querySelectorAll(d);if(p.length===1)return h;p.length<o.length&&(t=h)}catch(p){}}return t}catch(l){return t}}insertNodeInOrder(e,t,r){const i=r.indexOf(t),n=[...e];let a=0;for(let l=0;l<n.length&&!(r.indexOf(n[l])>i);l++)a=l+1;return n.splice(a,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&&!ft(e.id)&&(t+=`#${Pi(e.id)}`);for(const r of Array.from(e.classList))Li(r)||(t+=`.${Pi(r)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return jl.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(!Li(r))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!ft(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(a=>a.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(a=>{const l=a.parentElement;let o;if(l){const u=Array.from(l.children).indexOf(a);u!==-1&&(o=u+1)}return{tag:a.tagName.toLowerCase(),semantics:r.extract(a),score:r.scoreElement(a),nthChild:o}}),degraded:!1}}};function ec(s){return s?s.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const tc={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function rc(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 sc(s,e){if(!s)return s;const t=s.startsWith("http://")||s.startsWith("https://"),[r,i]=s.split("#"),[n,a]=r.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&a&&(l+=`?${a}`),i&&(e.removeDynamicHashes&&rc(i)||(l+=`#${i}`)),l}function eo(s,e,t={}){if(!e)return e;const r=A(A({},tc),t);return s==="href"||s==="src"?sc(e,r):e}const ic=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],nc=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],oc=["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"],ac=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],lc=["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"],cc=["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"],uc=["data-category","data-action","data-label","data-value"],hc=["id","name","type","placeholder","title","for","alt","href"],dc=["disabled","checked","selected","hidden","readonly","required","value"],fc=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function pc(s,e){return ic.includes(s)?!0:nc.includes(s)||oc.includes(s)||ac.some(t=>s.startsWith(t))?!1:lc.includes(s)?!0:cc.some(t=>s.startsWith(t))||uc.includes(s)?!1:s.startsWith("data-")&&s.endsWith("-id")?!0:s==="id"?!fc.some(t=>t.test(e)):hc.includes(s)?!0:dc.includes(s)?!1:!!s.startsWith("data-")}let _i=class{constructor(e,t){var r;this.includeUtilityClasses=(r=e.includeUtilityClasses)!=null?r:!1,this.cache=t}extract(e){if(this.cache){const a=this.cache.getSemantics(e);if(a!==void 0)return a}const t={},r=e.id;if(r&&!ft(r)&&(t.id=r),e.classList.length>0){const a=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=a;else{const{semantic:l}=ql(a);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 a=this.extractText(e);a&&(t.text=a)}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!!(Kn.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 Re[e]!==void 0?Re[e]:e.startsWith("data-")?Re["data-*"]:e.startsWith("aria-")?Re["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)||!pc(i,r.value)||qn.has(i)&&Qn(r.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?eo(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=ec(t);if(!r)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,a=r.length>i?r.slice(0,i)+"...":r;return{raw:n,normalized:a}}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)}},mc=class{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 a=e.querySelector("title");return a!=null&&a.textContent&&(i.titleText=a.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,a,l,o,u,c,h,d;const r=[];switch(t){case"circle":r.push(`r=${(i=e.getAttribute("r"))!=null?i:"0"}`);break;case"rect":{const p=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),m=parseFloat((a=e.getAttribute("height"))!=null?a:"0");p>0&&m>0&&r.push(`ratio=${(p/m).toFixed(2)}`)}break;case"ellipse":{const p=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),m=parseFloat((o=e.getAttribute("ry"))!=null?o:"0");p>0&&m>0&&r.push(`ratio=${(p/m).toFixed(2)}`)}break;case"line":{const p=parseFloat((u=e.getAttribute("x1"))!=null?u:"0"),m=parseFloat((c=e.getAttribute("y1"))!=null?c:"0"),g=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),f=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),b=Math.atan2(f-m,g-p);r.push(`angle=${b.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 gc(s,e=0){const t=s.anchor.score,r=s.path.length>0?s.path.reduce((l,o)=>l+o.score,0)/s.path.length:.5,i=s.target.score,n=t*Lt.ANCHOR+r*Lt.PATH+i*Lt.TARGET+e*Lt.UNIQUENESS,a=s.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-a))}let yc=class{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}},bc=class{constructor(e={}){var t,r;this.eidCache=new WeakMap,this.selectorResultCache=new yc((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 ie(A({},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 wc(s){return new bc(s)}let Ur=null;function Sc(){return Ur||(Ur=wc()),Ur}function Fi(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 al=Object.defineProperty,ll=Object.defineProperties;var cl=Object.getOwnPropertyDescriptors;var Ft=Object.getOwnPropertySymbols;var Ti=Object.prototype.hasOwnProperty,ki=Object.prototype.propertyIsEnumerable;var Ni=(s,e,t)=>e in s?al(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,A=(s,e)=>{for(var t in e||(e={}))Ti.call(e,t)&&Ni(s,t,e[t]);if(Ft)for(var t of Ft(e))ki.call(e,t)&&Ni(s,t,e[t]);return s},oe=(s,e)=>ll(s,cl(e));var He=(s,e)=>{var t={};for(var r in s)Ti.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Ft)for(var r of Ft(s))e.indexOf(r)<0&&ki.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ul=Object.defineProperty,hl=(s,e,t)=>e in s?ul(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>hl(s,typeof e!="symbol"?e+"":e,t),Di,dl=Object.defineProperty,fl=(s,e,t)=>e in s?dl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,jr=(s,e,t)=>fl(s,typeof e!="symbol"?e+"":e,t),q=(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))(q||{});const Li={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Pi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},zt={},pl=()=>!!globalThis.Zone;function Zs(s){if(zt[s])return zt[s];const e=globalThis[s],t=e.prototype,r=s in Li?Li[s]:void 0,i=!!(r&&r.every(l=>{var o,u;return!!((u=(o=Object.getOwnPropertyDescriptor(t,l))==null?void 0:o.get)!=null&&u.toString().includes("[native code]"))})),n=s in Pi?Pi[s]:void 0,a=!!(n&&n.every(l=>{var o;return typeof t[l]=="function"&&((o=t[l])==null?void 0:o.toString().includes("[native code]"))}));if(i&&a&&!pl())return zt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const o=l.contentWindow;if(!o)return e.prototype;const u=o[s].prototype;return document.body.removeChild(l),u?zt[s]=u:t}catch(l){return t}}const Gr={};function ke(s,e,t){var r;const i=`${s}.${String(t)}`;if(Gr[i])return Gr[i].call(e);const n=Zs(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(Gr[i]=a,a.call(e)):e[t]}const Yr={};function eo(s,e,t){const r=`${s}.${String(t)}`;if(Yr[r])return Yr[r].bind(e);const n=Zs(s)[t];return typeof n!="function"?e[t]:(Yr[r]=n,n.bind(e))}function ml(s){return ke("Node",s,"childNodes")}function gl(s){return ke("Node",s,"parentNode")}function yl(s){return ke("Node",s,"parentElement")}function bl(s){return ke("Node",s,"textContent")}function wl(s,e){return eo("Node",s,"contains")(e)}function Sl(s){return eo("Node",s,"getRootNode")()}function Cl(s){return!s||!("host"in s)?null:ke("ShadowRoot",s,"host")}function vl(s){return s.styleSheets}function xl(s){return!s||!("shadowRoot"in s)?null:ke("Element",s,"shadowRoot")}function Al(s,e){return ke("Element",s,"querySelector")(e)}function Il(s,e){return ke("Element",s,"querySelectorAll")(e)}function El(){return Zs("MutationObserver").constructor}function $l(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 Rl(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 Ml(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,a=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<a&&i.left<n,o=(t=r.getComputedStyle)==null?void 0:t.call(r,s),c=!!o&&o.display!=="none"&&o.visibility!=="hidden"&&(parseFloat(o.opacity)||0)>0&&l;let h=0;if(c){const p=Math.max(0,Math.min(i.right,n)-Math.max(i.left,0)),m=Math.max(0,Math.min(i.bottom,a)-Math.max(i.top,0)),g=p*m,f=i.width*i.height;h=f>0?g/f:0}return{isVisible:c,ratio:h}}const Q={childNodes:ml,parentNode:gl,parentElement:yl,textContent:bl,contains:wl,getRootNode:Sl,host:Cl,styleSheets:vl,shadowRoot:xl,querySelector:Al,querySelectorAll:Il,mutationObserver:El,patch:$l,describeNode:Rl,getElementVisibility:Ml};function cr(s){return s.nodeType===s.ELEMENT_NODE}function mt(s){const e=s&&"host"in s&&"mode"in s&&Q.host(s)||null;return!!(e&&"shadowRoot"in e&&Q.shadowRoot(e)===s)}function gt(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Ol(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 Nl(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 hs(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=>to(i,t)).join("");return Ol(r)}catch(e){return null}}function to(s,e){if(kl(s)){let t;try{t=hs(s.styleSheet)||Nl(s)}catch(r){t=s.cssText}return s.styleSheet.href?yr(t,s.styleSheet.href):t}else{let t=s.cssText;return s.type===CSSRule.KEYFRAMES_RULE||(s.type,CSSRule.KEYFRAME_RULE),Dl(s)&&s.selectorText.includes(":")&&(t=Tl(t)),e?yr(t,e):t}}function Tl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function kl(s){return"styleSheet"in s}function Dl(s){return"selectorText"in s}class ro{constructor(){jr(this,"idNodeMap",new Map),jr(this,"nodeMetaMap",new WeakMap),jr(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 Ll(){return new ro}function mr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let a=i||"";const l=r&&Fe(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?a=n(a,s):a="*".repeat(a.length)),a}function Fe(s){return s.toLowerCase()}const _i="__rrweb_original__";function Pl(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,a=_i in n?n[_i]:n;if(new Uint32Array(a.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(o=>o!==0))return!1}return!0}function gr(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Fe(e):null}function so(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(a){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 _l(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Fl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,zl=/^(?:[a-z+]+:)?\/\//i,Bl=/^www\..*/i,Wl=/^(data:)([^,]*),(.*)/i;function yr(s,e){return(s||"").replace(Fl,(t,r,i,n,a,l)=>{const o=i||a||l,u=r||n||"";if(!o)return t;if(zl.test(o)||Bl.test(o))return`url(${u}${o}${u})`;if(Wl.test(o))return`url(${u}${o}${u})`;if(o[0]==="/")return`url(${u}${_l(e)+o}${u})`;const c=e.split("/"),h=o.split("/");c.pop();for(const d of h)d!=="."&&(d===".."?c.pop():c.push(d));return`url(${u}${c.join("/")}${u})`})}function Bt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Hl(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let a=Bt(s,t);const l=a.length/s.length;for(let o=1;o<r.length;o++)if(r[o].textContent&&typeof r[o].textContent=="string"){const u=Bt(r[o].textContent,t),c=100;let h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let d=u.substring(0,h),p=a.split(d),m=-1;if(p.length===2)m=p[0].length;else if(p.length>2&&p[0]===""&&r[o-1].textContent!=="")m=a.indexOf(d,1);else if(p.length===1){if(d=d.substring(0,d.length-1),p=a.split(d),p.length<=1)return i.push(s),i;h=c+1}else h===u.length-1&&(m=a.indexOf(d));if(p.length>=2&&h>c){const g=r[o-1].textContent;if(g&&typeof g=="string"){const f=Bt(g).length;m=a.indexOf(d,f)}m===-1&&(m=p[0].length)}if(m!==-1){let g=Math.floor(m/l);for(;g>0&&g<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const f=Bt(s.substring(0,g),t);if(f.length===m){i.push(s.substring(0,g)),s=s.substring(g),a=a.substring(m);break}else f.length<m?g+=Math.max(1,Math.floor((m-f.length)/l)):g-=Math.max(1,Math.floor((f.length-m)*l))}break}}}}return i.push(s),i}function Ul(s,e){return Hl(s,e).join("/* rr_split */")}function Vl(s){var e;const t=Q.parentNode(s),r=t&&t;return!r||!Js(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function Js(s){return Q.getElementVisibility(s).isVisible}const jl=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Gl=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Yl=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Xs=new WeakSet,Zl=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(Zl.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();jl.includes(r)&&Xs.add(this)}};const Jl=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){Jl.call(this,s,e,t)};function Xl(s){return s instanceof Element&&Xs.has(s)}function Kl(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(Gl.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return Xl(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function Fi(){document.querySelectorAll("*").forEach(e=>{Yl.forEach(t=>{e.hasAttribute(t)&&Xs.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Fi():document.addEventListener("DOMContentLoaded",Fi)}catch(s){}const Wt={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},ye={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},ql={MIN_CONFIDENCE_FOR_SKIP:.7},zi=["form","main","nav","section","article","footer","header"],Bi=["form","navigation","main","region","contentinfo","complementary","banner","search"],Ql=["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"],Ne={"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},io=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),ec={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function bt(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 no=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function oo(s){return s.trim().split(/\s+/).some(e=>bt(e))}let tc=class{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}findAnchor(e){if(this.cache){const o=this.cache.getAnchor(e);if(o!==void 0)return o}const t=e.tagName.toLowerCase(),r=e.ownerDocument;if(t==="html"){const o={element:e,score:1,tier:"A",depth:0};return this.cacheResult(e,o),o}if(t==="head"||this.isInsideHead(e)){const o=r==null?void 0:r.documentElement;if(o){const u={element:o,score:1,tier:"A",depth:0};return this.cacheResult(e,u),u}}if(t==="body"){const o=r==null?void 0:r.documentElement;if(o){const u={element:o,score:1,tier:"A",depth:0};return this.cacheResult(e,u),u}}let i=e.parentElement,n=0,a=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return a||{element:i,score:ye.DEGRADED_SCORE,tier:"C",depth:n};const o=this.scoreAnchor(i);if(o>0){const u=this.applyDepthPenalty(o,n),c=this.getTier(i),h={element:i,score:u,tier:c,depth:n};if(c==="A")return h;(!a||u>a.score)&&(a=h)}i=i.parentElement,n++}const l=a;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const r=e.tagName.toLowerCase();zi.includes(r)&&(t+=ye.SEMANTIC_TAG);const i=e.getAttribute("role");i&&Bi.includes(i)&&(t+=ye.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=ye.ARIA_LABEL);const n=e.id;return n&&!bt(n)&&(t+=ye.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=ye.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=ye.DEPTH_PENALTY_THRESHOLD)return e;const r=(t-ye.DEPTH_PENALTY_THRESHOLD)*ye.DEPTH_PENALTY_FACTOR;return Math.max(0,e-r)}getTier(e){const t=e.tagName.toLowerCase();if(zi.includes(t))return"A";const r=e.getAttribute("role");return r&&Bi.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 rc=[/^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,}/],sc=[/^\[/,/^(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 Ks(s){return rc.some(e=>e.test(s))}function qs(s){return s.length<=2||/^\d/.test(s)?!0:sc.some(e=>e.test(s))}function ic(s){return!Ks(s)&&!qs(s)}function nc(s){return s.filter(e=>ic(e))}function oc(s){const e=[],t=[];for(const r of s)qs(r)||Ks(r)?t.push(r):e.push(r);return{semantic:e,utility:t}}function Wi(s){return qs(s)||Ks(s)}const Hi=s=>s.replace(/([#:.[\]@])/g,"\\$1");let ac=class{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 a=[];let l=t.parentElement;for(;l&&l!==e&&a.length<this.maxDepth;)a.unshift(l),l=l.parentElement;const o=a.length>=this.maxDepth&&l!==e;if(!o&&l!==e)return console.warn("[PathBuilder] Target is not a descendant of anchor"),{path:[],degraded:!0,degradationReason:"target-not-descendant-of-anchor"};let u=this.filterNoise(a);return u=this.ensureUniqueness(a,u,e,t,r),{path:u.map(c=>{const h=c.parentElement;let d;if(h){const p=Array.from(h.children).indexOf(c);p!==-1&&(d=p+1)}return{tag:c.tagName.toLowerCase(),semantics:r.extract(c),score:r.scoreElement(c),nthChild:d}}),degraded:o,degradationReason:o?"path-depth-overflow":void 0}}buildPathNodes(e,t,r){return this.buildPath(e,t,r).path}ensureUniqueness(e,t,r,i,n){const a=this.buildTestSelector(r,t,i);try{const l=i.ownerDocument;if(!l)return t;let o;if(this.cache){const c=this.cache.getSelectorResults(a);c!==void 0?o=c:(o=Array.from(l.querySelectorAll(a)),this.cache.setSelectorResults(a,o))}else o=l.querySelectorAll(a);if(o.length<=1)return t;const u=e.filter(c=>!t.includes(c));for(const c of u){if(n.scoreElement(c)<ql.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,c,e),d=this.buildTestSelector(r,h,i);try{let p;if(this.cache){const m=this.cache.getSelectorResults(d);m!==void 0?p=m:(p=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,p))}else p=l.querySelectorAll(d);if(p.length===1)return h;p.length<o.length&&(t=h)}catch(p){}}return t}catch(l){return t}}insertNodeInOrder(e,t,r){const i=r.indexOf(t),n=[...e];let a=0;for(let l=0;l<n.length&&!(r.indexOf(n[l])>i);l++)a=l+1;return n.splice(a,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&&!bt(e.id)&&(t+=`#${Hi(e.id)}`);for(const r of Array.from(e.classList))Wi(r)||(t+=`.${Hi(r)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return Ql.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(!Wi(r))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!bt(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(a=>a.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(a=>{const l=a.parentElement;let o;if(l){const u=Array.from(l.children).indexOf(a);u!==-1&&(o=u+1)}return{tag:a.tagName.toLowerCase(),semantics:r.extract(a),score:r.scoreElement(a),nthChild:o}}),degraded:!1}}};function lc(s){return s?s.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const cc={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function uc(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 hc(s,e){if(!s)return s;const t=s.startsWith("http://")||s.startsWith("https://"),[r,i]=s.split("#"),[n,a]=r.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&a&&(l+=`?${a}`),i&&(e.removeDynamicHashes&&uc(i)||(l+=`#${i}`)),l}function ao(s,e,t={}){if(!e)return e;const r=A(A({},cc),t);return s==="href"||s==="src"?hc(e,r):e}const dc=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],fc=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],pc=["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"],mc=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],gc=["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"],yc=["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"],bc=["data-category","data-action","data-label","data-value"],wc=["id","name","type","placeholder","title","for","alt","href"],Sc=["disabled","checked","selected","hidden","readonly","required","value"],Cc=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function vc(s,e){return dc.includes(s)?!0:fc.includes(s)||pc.includes(s)||mc.some(t=>s.startsWith(t))?!1:gc.includes(s)?!0:yc.some(t=>s.startsWith(t))||bc.includes(s)?!1:s.startsWith("data-")&&s.endsWith("-id")?!0:s==="id"?!Cc.some(t=>t.test(e)):wc.includes(s)?!0:Sc.includes(s)?!1:!!s.startsWith("data-")}let Ui=class{constructor(e,t){var r;this.includeUtilityClasses=(r=e.includeUtilityClasses)!=null?r:!1,this.cache=t}extract(e){if(this.cache){const a=this.cache.getSemantics(e);if(a!==void 0)return a}const t={},r=e.id;if(r&&!bt(r)&&(t.id=r),e.classList.length>0){const a=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=a;else{const{semantic:l}=oc(a);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 a=this.extractText(e);a&&(t.text=a)}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!!(io.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 Ne[e]!==void 0?Ne[e]:e.startsWith("data-")?Ne["data-*"]:e.startsWith("aria-")?Ne["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)||!vc(i,r.value)||no.has(i)&&oo(r.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?ao(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=lc(t);if(!r)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,a=r.length>i?r.slice(0,i)+"...":r;return{raw:n,normalized:a}}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)}},xc=class{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 a=e.querySelector("title");return a!=null&&a.textContent&&(i.titleText=a.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,a,l,o,u,c,h,d;const r=[];switch(t){case"circle":r.push(`r=${(i=e.getAttribute("r"))!=null?i:"0"}`);break;case"rect":{const p=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),m=parseFloat((a=e.getAttribute("height"))!=null?a:"0");p>0&&m>0&&r.push(`ratio=${(p/m).toFixed(2)}`)}break;case"ellipse":{const p=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),m=parseFloat((o=e.getAttribute("ry"))!=null?o:"0");p>0&&m>0&&r.push(`ratio=${(p/m).toFixed(2)}`)}break;case"line":{const p=parseFloat((u=e.getAttribute("x1"))!=null?u:"0"),m=parseFloat((c=e.getAttribute("y1"))!=null?c:"0"),g=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),f=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),b=Math.atan2(f-m,g-p);r.push(`angle=${b.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 Ac(s,e=0){const t=s.anchor.score,r=s.path.length>0?s.path.reduce((l,o)=>l+o.score,0)/s.path.length:.5,i=s.target.score,n=t*Wt.ANCHOR+r*Wt.PATH+i*Wt.TARGET+e*Wt.UNIQUENESS,a=s.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-a))}let Ic=class{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}},Ec=class{constructor(e={}){var t,r;this.eidCache=new WeakMap,this.selectorResultCache=new Ic((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 oe(A({},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 $c(s){return new Ec(s)}let Zr=null;function Rc(){return Zr||(Zr=$c()),Zr}function Vi(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 Mc(s,e){if(!e)return;const t=Vi(s),r=e instanceof Document?e:Vi(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 vc(s,e={}){var U,Z,J,I;var t;if(!s||!s.ownerDocument||!s.isConnected)return null;const r=A(A({},Gl),e);if(r.root)try{Cc(s,r.root)}catch(P){return console.error("Cross-document generation detected:",P),null}const i=(U=r.cache)!=null?U:Sc(),n=i.getEID(s);if(n!==void 0)return n;if(s.tagName.toLowerCase()==="html"){const P=new _i(r,i),te=Ic(s,r,P);return i.setEID(s,te),te}const a=new Yl(r,i),l=new Ql(r,i),o=new _i(r,i),u=new mc,c=a.findAnchor(s);if(!c&&!r.fallbackToBody)return null;const h=(J=(Z=c==null?void 0:c.element)!=null?Z:(t=s.ownerDocument)==null?void 0:t.body)!=null?J:null;if(!h)return null;const d=!c||c.tier==="C",p=h.tagName.toLowerCase(),m=h.parentElement;let g;if(m&&p!=="body"&&p!=="html"){const P=Array.from(m.children).indexOf(h);P!==-1&&(g=P+1)}const f=o.extract(h),b={tag:h.tagName.toLowerCase(),semantics:f,score:(I=c==null?void 0:c.score)!=null?I:me.DEGRADED_SCORE,degraded:d,nthChild:g},v=l.buildPath(h,s,o),S=o.extract(s);r.enableSvgFingerprint&&xc(s)&&(S.svg=u.fingerprint(s));const y=s.parentElement;let C;if(y){const P=Array.from(y.children).indexOf(s);P!==-1&&(C=P+1)}const x={tag:s.tagName.toLowerCase(),semantics:S,score:o.scoreElement(s),nthChild:C},E=[],$={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},_=b.degraded||v.degraded,F=Ac(b.degraded,v),T={version:"1.0",anchor:b,path:v.path,target:x,constraints:E,fallback:$,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:r.source,degraded:_,degradationReason:F}};return T.meta.confidence=gc(T),T.meta.confidence<r.confidenceThreshold?null:(i.setEID(s,T),T)}function xc(s){return s.namespaceURI==="http://www.w3.org/2000/svg"||s.tagName.toLowerCase()==="svg"||s instanceof SVGElement}function Ac(s,e){if(s&&e.degraded)return"anchor-and-path-degraded";if(s)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function Ic(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 to={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function zi(s){return s==="id"?101:Re[s]!==void 0?Re[s]:s.startsWith("data-")?Re["data-*"]:s.startsWith("aria-")?Re["aria-*"]:0}function Ec(s){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(s)}function $c(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 Rc(s,e){const t=A(A({},to),e),r=`v${s.version}`,i=Vr(s.anchor,!1,t),n=s.path.length>0?s.path.map(o=>Vr(o,!1,t)).join(" > ")+" > ":"",a=Vr(s.target,!0,t),l=t.includeConstraints?Mc(s):"";return`${r}: ${i} :: ${n}${a}${l}`}function Vr(s,e=!1,t=to){const{tag:r,semantics:i}=s;let n=r;const a=[],l=A({},i.attributes);i.id&&(l.id=i.id),i.role&&!l.role&&(l.role=i.role);const o=Object.entries(l).map(([h,d])=>{const p=zi(h),m=h==="href"||h==="src"?eo(h,d):d;return{name:h,value:m,priority:p}}).filter(h=>h.name!=="id"&&h.name!=="class"&&Kn.has(h.name)||qn.has(h.name)&&Qn(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");o.sort((h,d)=>d.priority-h.priority);const u=o.slice(0,t.maxAttributes);u.sort((h,d)=>h.name.localeCompare(d.name));for(const{name:h,value:d}of u)a.push(`${h}="${as(d)}"`);if(t.includeText&&i.text&&!$c(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&a.push(`text="${as(h)}"`)}let c=a;if(a.length>0&&(e&&t.simplifyTarget&&i.id&&(c=a.filter(h=>{const d=h.split("=")[0];return zi(d)>=60||d==="text"||d==="id"||d==="role"})),c.length>0&&c.sort((h,d)=>h.localeCompare(d))),i.classes&&i.classes.length>0){const h=Kl(i.classes),d=!!i.id||a.some(p=>p.startsWith("href=")||p.startsWith("data-testid=")||p.startsWith("text=")||p.startsWith("role="));if(!(e&&t.simplifyTarget&&d)&&h.length>0){const p=h.sort().slice(0,t.maxClasses);n+=p.map(m=>`.${m}`).join("")}}if(c.length>0&&(n+=`[${c.join(",")}]`),"nthChild"in s&&s.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(Ec);e&&t.simplifyTarget&&h||(n+=`#${s.nthChild}`)}return n}function Mc(s){if(!s.constraints||s.constraints.length===0)return"";const e=[];for(const t of s.constraints)switch(t.type){case"uniqueness":e.push("unique=true");break;case"position":t.params&&t.params.strategy&&e.push(`pos=${t.params.strategy}`);break;case"text-proximity":if(t.params&&t.params.reference){const r=as(String(t.params.reference));e.push(`text="${r}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function as(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function Oc(s,e,t){const r=vc(s,e);return r?Rc(r,t):null}let Nc=1;const Tc=new RegExp("[^a-z0-9-_:]"),pt=-2;function ro(){return Nc++}function kc(s){if(s instanceof HTMLFormElement)return"form";const e=_e(s.tagName);return Tc.test(e)?"div":e}let He,Bi;const Dc=/^[^ \t\n\r\u000c]+/,Lc=/^[, \t\n\r\u000c]+/;function Pc(s,e){if(e.trim()==="")return e;let t=0;function r(n){let a;const l=n.exec(e.substring(t));return l?(a=l[0],t+=a.length,a):""}const i=[];for(;r(Lc),!(t>=e.length);){let n=r(Dc);if(n.slice(-1)===",")n=je(s,n.substring(0,n.length-1)),i.push(n);else{let a="";n=je(s,n);let l=!1;for(;;){const o=e.charAt(t);if(o===""){i.push((n+a).trim());break}else if(l)o===")"&&(l=!1);else if(o===","){t+=1,i.push((n+a).trim());break}else o==="("&&(l=!0);a+=o,t+=1}}}return i.join(", ")}const Wi=new WeakMap;function je(s,e){return!e||e.trim()===""?e:Zs(s,e)}function _c(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Zs(s,e){let t=Wi.get(s);if(t||(t=s.createElement("a"),Wi.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function so(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")?je(s,r):t==="srcset"?Pc(s,r):t==="style"?hr(r,Zs(s)):e==="object"&&t==="data"?je(s,r):r)}function io(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function ls(s,e){return e?typeof e=="string"?s.includes(e):e.test(s):!1}function Fc(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 dr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?dr(Q.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?dr(Q.parentNode(s),e,t):!1}function no(s,e,t,r){let i;if(sr(s)){if(i=s,!Q.childNodes(i).length)return!1}else{if(Q.parentElement(s)===null)return!1;i=Q.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(dr(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 zc(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 a="about:blank";if(r.location.href!==a||s.src===a||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Bc(s,e,t){let r=!1,i;try{i=s.sheet}catch(a){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function Wc(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:a,needsMask:l,inlineStylesheet:o,maskInputOptions:u={},maskTextFn:c,maskInputFn:h,dataURLOptions:d={},inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:f=!1,cssCaptured:b=!1}=e,v=Hc(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:K.Document,childNodes:[],compatMode:s.compatMode}:{type:K.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:K.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:v};case s.ELEMENT_NODE:return Vc(s,{doc:t,blockClass:i,blockSelector:n,excludeAttribute:a,inlineStylesheet:o,maskInputOptions:u,maskInputFn:h,dataURLOptions:d,inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:f,rootId:v});case s.TEXT_NODE:return Uc(s,{doc:t,needsMask:l,maskTextFn:c,rootId:v,cssCaptured:b});case s.CDATA_SECTION_NODE:return{type:K.CDATA,textContent:"",rootId:v};case s.COMMENT_NODE:return{type:K.Comment,textContent:Q.textContent(s)||"",rootId:v};default:return!1}}function Hc(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Uc(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,a=Q.parentNode(s),l=a&&a.tagName;let o="";const u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?o="SCRIPT_PLACEHOLDER":n||(o=Q.textContent(s),u&&o&&(o=hr(o,Zs(e.doc)))),!u&&!c&&o&&t&&(o=r?r(o,Q.parentElement(s)):o.replace(/[\S]/g,"*")),{type:K.Text,textContent:o||"",rootId:i}}function Vc(s,e){const{doc:t,blockClass:r,blockSelector:i,excludeAttribute:n,inlineStylesheet:a,maskInputOptions:l={},maskInputFn:o,dataURLOptions:u={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:d,newlyAddedElement:p=!1,rootId:m}=e,g=Fc(s,r,i),f=kc(s);let b={};const v=s.attributes.length;for(let y=0;y<v;y++){const C=s.attributes[y];ls(C.name,n)||io(f,C.name,C.value)||(b[C.name]=so(t,f,_e(C.name),C.value))}if(f==="link"&&a){const y=Array.from(t.styleSheets).find(x=>x.href===s.href);let C=null;y&&(C=os(y)),C&&(delete b.rel,delete b.href,b._cssText=C)}if(f==="style"&&s.sheet){let y=os(s.sheet);y&&(s.childNodes.length>1&&(y=Ll(y,s)),b._cssText=y)}if(f==="input"||f==="textarea"||f==="select"){const y=s.value,C=s.checked;b.type!=="radio"&&b.type!=="checkbox"&&b.type!=="submit"&&b.type!=="button"&&y?b.value=cr({element:s,type:ur(s),tagName:f,value:y,maskInputOptions:l,maskInputFn:o}):C&&(b.checked=C)}if(f==="option"&&(s.selected&&!l.select?b.selected=!0:delete b.selected),f==="dialog"&&s.open&&(b.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),f==="canvas"&&h){if(s.__context==="2d")Rl(s)||(b.rr_dataURL=s.toDataURL(u.type,u.quality));else if(!("__context"in s)){const y=s.toDataURL(u.type,u.quality),C=t.createElement("canvas");C.width=s.width,C.height=s.height;const x=C.toDataURL(u.type,u.quality);y!==x&&(b.rr_dataURL=y)}}if(f==="img"&&c){He||(He=t.createElement("canvas"),Bi=He.getContext("2d"));const y=s,C=y.currentSrc||y.getAttribute("src")||"<unknown-src>",x=y.crossOrigin,E=()=>{y.removeEventListener("load",E);try{He.width=y.naturalWidth,He.height=y.naturalHeight,Bi.drawImage(y,0,0),b.rr_dataURL=He.toDataURL(u.type,u.quality)}catch($){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?E():y.addEventListener("load",E);return}else console.warn(`Cannot inline img src=${C}! Error: ${$}`)}y.crossOrigin==="anonymous"&&(x?b.crossOrigin=x:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?E():y.addEventListener("load",E)}if(f==="audio"||f==="video"){const y=b;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(p||(s.scrollLeft&&(b.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(b.rr_scrollTop=s.scrollTop)),g){const{width:y,height:C}=s.getBoundingClientRect();b={class:b.class,rr_width:`${y}px`,rr_height:`${C}px`}}f==="iframe"&&!d(b.src)&&(s.contentDocument||(b.rr_src=b.src),delete b.src);let S;try{customElements.get(f)&&(S=!0)}catch(y){}return{type:K.Element,tagName:f,attributes:b,childNodes:[],isSVG:_c(s)||void 0,needBlock:g,rootId:m,isCustom:S}}function H(s){return s==null?"":s.toLowerCase()}function jc(s,e){if(e.comment&&s.type===K.Comment)return!0;if(s.type===K.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"&&Xn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(H(s.attributes.name).match(/^msapplication-tile(image|color)$/)||H(s.attributes.name)==="application-name"||H(s.attributes.rel)==="icon"||H(s.attributes.rel)==="apple-touch-icon"||H(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&H(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(H(s.attributes.property).match(/^(og|twitter|fb):/)||H(s.attributes.name).match(/^(og|twitter):/)||H(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(H(s.attributes.name)==="robots"||H(s.attributes.name)==="googlebot"||H(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(H(s.attributes.name)==="author"||H(s.attributes.name)==="generator"||H(s.attributes.name)==="framework"||H(s.attributes.name)==="publisher"||H(s.attributes.name)==="progid"||H(s.attributes.property).match(/^article:/)||H(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(H(s.attributes.name)==="google-site-verification"||H(s.attributes.name)==="yandex-verification"||H(s.attributes.name)==="csrf-token"||H(s.attributes.name)==="p:domain_verify"||H(s.attributes.name)==="verify-v1"||H(s.attributes.name)==="verification"||H(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ge(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:l,excludeAttribute:o,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g={},inlineImages:f=!1,recordCanvas:b=!1,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:y=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:E=()=>!1,newlyAddedElement:$=!1,cssCaptured:_=!1,selectorOptions:F}=e;let{needsMask:T}=e,{preserveWhiteSpace:U=!0}=e;T||(T=no(s,a,l,T===void 0));const Z=Wc(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:o,needsMask:T,inlineStylesheet:c,maskInputOptions:h,maskTextFn:d,maskInputFn:p,dataURLOptions:g,inlineImages:f,recordCanvas:b,keepIframeSrcFn:E,newlyAddedElement:$,cssCaptured:_});if(!Z)return console.warn(s,"not serialized"),null;let J;r.hasNode(s)?J=r.getId(s):jc(Z,m)||!U&&Z.type===K.Text&&!Z.textContent.replace(/^\s+|\s+$/gm,"").length?J=pt:J=ro();const I=Object.assign(Z,{id:J});if(sr(s)||s.nodeType===Node.TEXT_NODE){if(sr(s)&&F!==null&&F!==void 0)try{const X={maxPathDepth:F.maxPathDepth,enableSvgFingerprint:F.enableSvgFingerprint,fallbackToBody:F.fallbackToBody},ue=Oc(s,X);ue&&(I.selector=ue)}catch(X){console.warn("Failed to generate SEQL selector:",X)}s.nodeType===Node.TEXT_NODE&&(I.isVisible=Pl(s)),s.nodeType===Node.ELEMENT_NODE&&(I.isVisible=Vs(s),I.isInteractive=Ul(s))}if(r.add(s,I),J===pt)return null;v&&v(s);let P=!u;if(I.type===K.Element){P=P&&!I.needBlock,delete I.needBlock;const X=Q.shadowRoot(s);X&&ht(X)&&(I.isShadowHost=!0)}if((I.type===K.Document||I.type===K.Element)&&P){m.headWhitespace&&I.type===K.Element&&I.tagName==="head"&&(U=!1);const X={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:T,maskTextClass:a,maskTextSelector:l,excludeAttribute:o,skipChild:u,inlineStylesheet:c,maskInputOptions:h,maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:f,recordCanvas:b,preserveWhiteSpace:U,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:E,cssCaptured:!1,selectorOptions:F};if(!(I.type===K.Element&&I.tagName==="textarea"&&I.attributes.value!==void 0)){I.type===K.Element&&I.attributes._cssText!==void 0&&typeof I.attributes._cssText=="string"&&(X.cssCaptured=!0);for(const Ie of Array.from(Q.childNodes(s))){const ae=Ge(Ie,X);ae&&I.childNodes.push(ae)}}let ue=null;if(sr(s)&&(ue=Q.shadowRoot(s)))for(const Ie of Array.from(Q.childNodes(ue))){const ae=Ge(Ie,X);ae&&(ht(ue)&&(ae.isShadow=!0),I.childNodes.push(ae))}}const te=Q.parentNode(s);return te&&ut(te)&&ht(te)&&(I.isShadow=!0),I.type===K.Element&&I.tagName==="iframe"&&zc(s,()=>{const X=s.contentDocument;if(X&&S){const ue=Ge(X,{doc:X,mirror:r,blockClass:i,blockSelector:n,needsMask:T,maskTextClass:a,maskTextSelector:l,excludeAttribute:o,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:f,recordCanvas:b,preserveWhiteSpace:U,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:E,selectorOptions:F});ue&&S(s,ue)}},y),I.type===K.Element&&I.tagName==="link"&&typeof I.attributes.rel=="string"&&(I.attributes.rel==="stylesheet"||I.attributes.rel==="preload"&&typeof I.attributes.href=="string"&&Xn(I.attributes.href)==="css")&&Bc(s,()=>{if(C){const X=Ge(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:T,maskTextClass:a,maskTextSelector:l,excludeAttribute:o,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:f,recordCanvas:b,preserveWhiteSpace:U,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:E,selectorOptions:F});X&&C(s,X)}},x),I}function Gc(s,e){var T,U,Z,J;const{mirror:t=new Jn,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:a=null,excludeAttribute:l=/.^/,inlineStylesheet:o=!0,inlineImages:u=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:d,maskInputFn:p,slimDOM:m=!1,dataURLOptions:g,preserveWhiteSpace:f,onSerialize:b,onIframeLoad:v,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:x=()=>!1,selector:E}=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,_=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,F=E===!1?null:E===!0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:E===void 0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:{maxPathDepth:(T=E.maxPathDepth)!=null?T:10,enableSvgFingerprint:(U=E.enableSvgFingerprint)!=null?U:!0,confidenceThreshold:(Z=E.confidenceThreshold)!=null?Z:.3,fallbackToBody:(J=E.fallbackToBody)!=null?J:!0};return Ge(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:!1,inlineStylesheet:o,maskInputOptions:$,maskTextFn:d,maskInputFn:p,slimDOMOptions:_,dataURLOptions:g,inlineImages:u,recordCanvas:c,preserveWhiteSpace:f,onSerialize:b,onIframeLoad:v,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:x,newlyAddedElement:!1,selectorOptions:F})}function Yc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Zc(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 Js={exports:{}},R=String,oo=function(){return{isColorSupported:!1,reset:R,bold:R,dim:R,italic:R,underline:R,inverse:R,hidden:R,strikethrough:R,black:R,red:R,green:R,yellow:R,blue:R,magenta:R,cyan:R,white:R,gray:R,bgBlack:R,bgRed:R,bgGreen:R,bgYellow:R,bgBlue:R,bgMagenta:R,bgCyan:R,bgWhite:R,blackBright:R,redBright:R,greenBright:R,yellowBright:R,blueBright:R,magentaBright:R,cyanBright:R,whiteBright:R,bgBlackBright:R,bgRedBright:R,bgGreenBright:R,bgYellowBright:R,bgBlueBright:R,bgMagentaBright:R,bgCyanBright:R,bgWhiteBright:R}};Js.exports=oo();Js.exports.createColors=oo;var Jc=Js.exports;const Xc={},Kc=Object.freeze(Object.defineProperty({__proto__:null,default:Xc},Symbol.toStringTag,{value:"Module"})),fe=Zc(Kc);let Hi=Jc,Ui=fe,cs=class ao extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),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,ao)}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=Hi.isColorSupported);let r=c=>c,i=c=>c,n=c=>c;if(e){let{bold:c,gray:h,red:d}=Hi.createColors(!0);i=p=>c(d(p)),r=p=>h(p),Ui&&(n=p=>Ui(p))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),o=Math.min(this.line+2,a.length),u=String(o).length;return a.slice(l,o).map((c,h)=>{let d=l+1+h,p=" "+(" "+d).slice(-u)+" | ";if(d===this.line){if(c.length>160){let g=20,f=Math.max(0,this.column-g),b=Math.max(this.column+g,this.endColumn+g),v=c.slice(f,b),S=r(p.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,g-1)).replace(/[^\t]/g," ");return i(">")+r(p)+n(v)+`
|
|
12
|
-
`+
|
|
11
|
+
Solution: Ensure element and root parameter are from the same document context.`)}function Oc(s,e={}){var H,Z,X,I;var t;if(!s||!s.ownerDocument||!s.isConnected)return null;const r=A(A({},ec),e);if(r.root)try{Mc(s,r.root)}catch(P){return console.error("Cross-document generation detected:",P),null}const i=(H=r.cache)!=null?H:Rc(),n=i.getEID(s);if(n!==void 0)return n;if(s.tagName.toLowerCase()==="html"){const P=new Ui(r,i),te=kc(s,r,P);return i.setEID(s,te),te}const a=new tc(r,i),l=new ac(r,i),o=new Ui(r,i),u=new xc,c=a.findAnchor(s);if(!c&&!r.fallbackToBody)return null;const h=(X=(Z=c==null?void 0:c.element)!=null?Z:(t=s.ownerDocument)==null?void 0:t.body)!=null?X:null;if(!h)return null;const d=!c||c.tier==="C",p=h.tagName.toLowerCase(),m=h.parentElement;let g;if(m&&p!=="body"&&p!=="html"){const P=Array.from(m.children).indexOf(h);P!==-1&&(g=P+1)}const f=o.extract(h),b={tag:h.tagName.toLowerCase(),semantics:f,score:(I=c==null?void 0:c.score)!=null?I:ye.DEGRADED_SCORE,degraded:d,nthChild:g},C=l.buildPath(h,s,o),v=o.extract(s);r.enableSvgFingerprint&&Nc(s)&&(v.svg=u.fingerprint(s));const y=s.parentElement;let S;if(y){const P=Array.from(y.children).indexOf(s);P!==-1&&(S=P+1)}const x={tag:s.tagName.toLowerCase(),semantics:v,score:o.scoreElement(s),nthChild:S},E=[],$={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},L=b.degraded||C.degraded,F=Tc(b.degraded,C),D={version:"1.0",anchor:b,path:C.path,target:x,constraints:E,fallback:$,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:r.source,degraded:L,degradationReason:F}};return D.meta.confidence=Ac(D),D.meta.confidence<r.confidenceThreshold?null:(i.setEID(s,D),D)}function Nc(s){return s.namespaceURI==="http://www.w3.org/2000/svg"||s.tagName.toLowerCase()==="svg"||s instanceof SVGElement}function Tc(s,e){if(s&&e.degraded)return"anchor-and-path-degraded";if(s)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function kc(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 lo={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function ji(s){return s==="id"?101:Ne[s]!==void 0?Ne[s]:s.startsWith("data-")?Ne["data-*"]:s.startsWith("aria-")?Ne["aria-*"]:0}function Dc(s){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(s)}function Lc(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 Pc(s,e){const t=A(A({},lo),e),r=`v${s.version}`,i=Jr(s.anchor,!1,t),n=s.path.length>0?s.path.map(o=>Jr(o,!1,t)).join(" > ")+" > ":"",a=Jr(s.target,!0,t),l=t.includeConstraints?_c(s):"";return`${r}: ${i} :: ${n}${a}${l}`}function Jr(s,e=!1,t=lo){const{tag:r,semantics:i}=s;let n=r;const a=[],l=A({},i.attributes);i.id&&(l.id=i.id),i.role&&!l.role&&(l.role=i.role);const o=Object.entries(l).map(([h,d])=>{const p=ji(h),m=h==="href"||h==="src"?ao(h,d):d;return{name:h,value:m,priority:p}}).filter(h=>h.name!=="id"&&h.name!=="class"&&io.has(h.name)||no.has(h.name)&&oo(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");o.sort((h,d)=>d.priority-h.priority);const u=o.slice(0,t.maxAttributes);u.sort((h,d)=>h.name.localeCompare(d.name));for(const{name:h,value:d}of u)a.push(`${h}="${ds(d)}"`);if(t.includeText&&i.text&&!Lc(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&a.push(`text="${ds(h)}"`)}let c=a;if(a.length>0&&(e&&t.simplifyTarget&&i.id&&(c=a.filter(h=>{const d=h.split("=")[0];return ji(d)>=60||d==="text"||d==="id"||d==="role"})),c.length>0&&c.sort((h,d)=>h.localeCompare(d))),i.classes&&i.classes.length>0){const h=nc(i.classes),d=!!i.id||a.some(p=>p.startsWith("href=")||p.startsWith("data-testid=")||p.startsWith("text=")||p.startsWith("role="));if(!(e&&t.simplifyTarget&&d)&&h.length>0){const p=h.sort().slice(0,t.maxClasses);n+=p.map(m=>`.${m}`).join("")}}if(c.length>0&&(n+=`[${c.join(",")}]`),"nthChild"in s&&s.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(Dc);e&&t.simplifyTarget&&h||(n+=`#${s.nthChild}`)}return n}function _c(s){if(!s.constraints||s.constraints.length===0)return"";const e=[];for(const t of s.constraints)switch(t.type){case"uniqueness":e.push("unique=true");break;case"position":t.params&&t.params.strategy&&e.push(`pos=${t.params.strategy}`);break;case"text-proximity":if(t.params&&t.params.reference){const r=ds(String(t.params.reference));e.push(`text="${r}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function ds(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function Fc(s,e,t){const r=Oc(s,e);return r?Pc(r,t):null}let zc=1;const Bc=new RegExp("[^a-z0-9-_:]"),wt=-2;function co(){return zc++}function Wc(s){if(s instanceof HTMLFormElement)return"form";const e=Fe(s.tagName);return Bc.test(e)?"div":e}let Ue,Gi;const Hc=/^[^ \t\n\r\u000c]+/,Uc=/^[, \t\n\r\u000c]+/;function Vc(s,e){if(e.trim()==="")return e;let t=0;function r(n){let a;const l=n.exec(e.substring(t));return l?(a=l[0],t+=a.length,a):""}const i=[];for(;r(Uc),!(t>=e.length);){let n=r(Hc);if(n.slice(-1)===",")n=Ge(s,n.substring(0,n.length-1)),i.push(n);else{let a="";n=Ge(s,n);let l=!1;for(;;){const o=e.charAt(t);if(o===""){i.push((n+a).trim());break}else if(l)o===")"&&(l=!1);else if(o===","){t+=1,i.push((n+a).trim());break}else o==="("&&(l=!0);a+=o,t+=1}}}return i.join(", ")}const Yi=new WeakMap;function Ge(s,e){return!e||e.trim()===""?e:Qs(s,e)}function jc(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Qs(s,e){let t=Yi.get(s);if(t||(t=s.createElement("a"),Yi.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function uo(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")?Ge(s,r):t==="srcset"?Vc(s,r):t==="style"?yr(r,Qs(s)):e==="object"&&t==="data"?Ge(s,r):r)}function ho(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function fs(s,e){return e?typeof e=="string"?s.includes(e):e.test(s):!1}function Gc(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 br(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?br(Q.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?br(Q.parentNode(s),e,t):!1}function fo(s,e,t,r){let i;if(cr(s)){if(i=s,!Q.childNodes(i).length)return!1}else{if(Q.parentElement(s)===null)return!1;i=Q.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(br(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 Yc(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 a="about:blank";if(r.location.href!==a||s.src===a||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Zc(s,e,t){let r=!1,i;try{i=s.sheet}catch(a){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function Jc(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:a,needsMask:l,inlineStylesheet:o,maskInputOptions:u={},maskTextFn:c,maskInputFn:h,dataURLOptions:d={},inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:f=!1,cssCaptured:b=!1}=e,C=Xc(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:q.Document,childNodes:[],compatMode:s.compatMode}:{type:q.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:q.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:C};case s.ELEMENT_NODE:return qc(s,{doc:t,blockClass:i,blockSelector:n,excludeAttribute:a,inlineStylesheet:o,maskInputOptions:u,maskInputFn:h,dataURLOptions:d,inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:f,rootId:C});case s.TEXT_NODE:return Kc(s,{doc:t,needsMask:l,maskTextFn:c,rootId:C,cssCaptured:b});case s.CDATA_SECTION_NODE:return{type:q.CDATA,textContent:"",rootId:C};case s.COMMENT_NODE:return{type:q.Comment,textContent:Q.textContent(s)||"",rootId:C};default:return!1}}function Xc(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Kc(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,a=Q.parentNode(s),l=a&&a.tagName;let o="";const u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?o="SCRIPT_PLACEHOLDER":n||(o=Q.textContent(s),u&&o&&(o=yr(o,Qs(e.doc)))),!u&&!c&&o&&t&&(o=r?r(o,Q.parentElement(s)):o.replace(/[\S]/g,"*")),{type:q.Text,textContent:o||"",rootId:i}}function qc(s,e){const{doc:t,blockClass:r,blockSelector:i,excludeAttribute:n,inlineStylesheet:a,maskInputOptions:l={},maskInputFn:o,dataURLOptions:u={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:d,newlyAddedElement:p=!1,rootId:m}=e,g=Gc(s,r,i),f=Wc(s);let b={};const C=s.attributes.length;for(let y=0;y<C;y++){const S=s.attributes[y];fs(S.name,n)||ho(f,S.name,S.value)||(b[S.name]=uo(t,f,Fe(S.name),S.value))}if(f==="link"&&a){const y=Array.from(t.styleSheets).find(x=>x.href===s.href);let S=null;y&&(S=hs(y)),S&&(delete b.rel,delete b.href,b._cssText=S)}if(f==="style"&&s.sheet){let y=hs(s.sheet);y&&(s.childNodes.length>1&&(y=Ul(y,s)),b._cssText=y)}if(f==="input"||f==="textarea"||f==="select"){const y=s.value,S=s.checked;b.type!=="radio"&&b.type!=="checkbox"&&b.type!=="submit"&&b.type!=="button"&&y?b.value=mr({element:s,type:gr(s),tagName:f,value:y,maskInputOptions:l,maskInputFn:o}):S&&(b.checked=S)}if(f==="option"&&(s.selected&&!l.select?b.selected=!0:delete b.selected),f==="dialog"&&s.open&&(b.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),f==="canvas"&&h){if(s.__context==="2d")Pl(s)||(b.rr_dataURL=s.toDataURL(u.type,u.quality));else if(!("__context"in s)){const y=s.toDataURL(u.type,u.quality),S=t.createElement("canvas");S.width=s.width,S.height=s.height;const x=S.toDataURL(u.type,u.quality);y!==x&&(b.rr_dataURL=y)}}if(f==="img"&&c){Ue||(Ue=t.createElement("canvas"),Gi=Ue.getContext("2d"));const y=s,S=y.currentSrc||y.getAttribute("src")||"<unknown-src>",x=y.crossOrigin,E=()=>{y.removeEventListener("load",E);try{Ue.width=y.naturalWidth,Ue.height=y.naturalHeight,Gi.drawImage(y,0,0),b.rr_dataURL=Ue.toDataURL(u.type,u.quality)}catch($){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?E():y.addEventListener("load",E);return}else console.warn(`Cannot inline img src=${S}! Error: ${$}`)}y.crossOrigin==="anonymous"&&(x?b.crossOrigin=x:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?E():y.addEventListener("load",E)}if(f==="audio"||f==="video"){const y=b;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(p||(s.scrollLeft&&(b.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(b.rr_scrollTop=s.scrollTop)),g){const{width:y,height:S}=s.getBoundingClientRect();b={class:b.class,rr_width:`${y}px`,rr_height:`${S}px`}}f==="iframe"&&!d(b.src)&&(s.contentDocument||(b.rr_src=b.src),delete b.src);let v;try{customElements.get(f)&&(v=!0)}catch(y){}return{type:q.Element,tagName:f,attributes:b,childNodes:[],isSVG:jc(s)||void 0,needBlock:g,rootId:m,isCustom:v}}function U(s){return s==null?"":s.toLowerCase()}function Qc(s,e){if(e.comment&&s.type===q.Comment)return!0;if(s.type===q.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"&&so(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(U(s.attributes.name).match(/^msapplication-tile(image|color)$/)||U(s.attributes.name)==="application-name"||U(s.attributes.rel)==="icon"||U(s.attributes.rel)==="apple-touch-icon"||U(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&U(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(U(s.attributes.property).match(/^(og|twitter|fb):/)||U(s.attributes.name).match(/^(og|twitter):/)||U(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(U(s.attributes.name)==="robots"||U(s.attributes.name)==="googlebot"||U(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(U(s.attributes.name)==="author"||U(s.attributes.name)==="generator"||U(s.attributes.name)==="framework"||U(s.attributes.name)==="publisher"||U(s.attributes.name)==="progid"||U(s.attributes.property).match(/^article:/)||U(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(U(s.attributes.name)==="google-site-verification"||U(s.attributes.name)==="yandex-verification"||U(s.attributes.name)==="csrf-token"||U(s.attributes.name)==="p:domain_verify"||U(s.attributes.name)==="verify-v1"||U(s.attributes.name)==="verification"||U(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ye(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:l,excludeAttribute:o,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g={},inlineImages:f=!1,recordCanvas:b=!1,onSerialize:C,onIframeLoad:v,iframeLoadTimeout:y=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:E=()=>!1,newlyAddedElement:$=!1,cssCaptured:L=!1,selectorOptions:F}=e;let{needsMask:D}=e,{preserveWhiteSpace:H=!0}=e;D||(D=fo(s,a,l,D===void 0));const Z=Jc(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,excludeAttribute:o,needsMask:D,inlineStylesheet:c,maskInputOptions:h,maskTextFn:d,maskInputFn:p,dataURLOptions:g,inlineImages:f,recordCanvas:b,keepIframeSrcFn:E,newlyAddedElement:$,cssCaptured:L});if(!Z)return console.warn(s,"not serialized"),null;let X;r.hasNode(s)?X=r.getId(s):Qc(Z,m)||!H&&Z.type===q.Text&&!Z.textContent.replace(/^\s+|\s+$/gm,"").length?X=wt:X=co();const I=Object.assign(Z,{id:X});if(cr(s)||s.nodeType===Node.TEXT_NODE){if(cr(s)&&F!==null&&F!==void 0)try{const J={maxPathDepth:F.maxPathDepth,enableSvgFingerprint:F.enableSvgFingerprint,fallbackToBody:F.fallbackToBody},ue=Fc(s,J);ue&&(I.selector=ue)}catch(J){console.warn("Failed to generate SEQL selector:",J)}s.nodeType===Node.TEXT_NODE&&(I.isVisible=Vl(s)),s.nodeType===Node.ELEMENT_NODE&&(I.isVisible=Js(s),I.isInteractive=Kl(s))}if(r.add(s,I),X===wt)return null;C&&C(s);let P=!u;if(I.type===q.Element){P=P&&!I.needBlock,delete I.needBlock;const J=Q.shadowRoot(s);J&>(J)&&(I.isShadowHost=!0)}if((I.type===q.Document||I.type===q.Element)&&P){m.headWhitespace&&I.type===q.Element&&I.tagName==="head"&&(H=!1);const J={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:D,maskTextClass:a,maskTextSelector:l,excludeAttribute:o,skipChild:u,inlineStylesheet:c,maskInputOptions:h,maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:f,recordCanvas:b,preserveWhiteSpace:H,onSerialize:C,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:E,cssCaptured:!1,selectorOptions:F};if(!(I.type===q.Element&&I.tagName==="textarea"&&I.attributes.value!==void 0)){I.type===q.Element&&I.attributes._cssText!==void 0&&typeof I.attributes._cssText=="string"&&(J.cssCaptured=!0);for(const it of Array.from(Q.childNodes(s))){const fe=Ye(it,J);fe&&I.childNodes.push(fe)}}let ue=null;if(cr(s)&&(ue=Q.shadowRoot(s)))for(const it of Array.from(Q.childNodes(ue))){const fe=Ye(it,J);fe&&(gt(ue)&&(fe.isShadow=!0),I.childNodes.push(fe))}}const te=Q.parentNode(s);return te&&mt(te)&>(te)&&(I.isShadow=!0),I.type===q.Element&&I.tagName==="iframe"&&Yc(s,()=>{const J=s.contentDocument;if(J&&v){const ue=Ye(J,{doc:J,mirror:r,blockClass:i,blockSelector:n,needsMask:D,maskTextClass:a,maskTextSelector:l,excludeAttribute:o,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:f,recordCanvas:b,preserveWhiteSpace:H,onSerialize:C,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:E,selectorOptions:F});ue&&v(s,ue)}},y),I.type===q.Element&&I.tagName==="link"&&typeof I.attributes.rel=="string"&&(I.attributes.rel==="stylesheet"||I.attributes.rel==="preload"&&typeof I.attributes.href=="string"&&so(I.attributes.href)==="css")&&Zc(s,()=>{if(S){const J=Ye(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:D,maskTextClass:a,maskTextSelector:l,excludeAttribute:o,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:d,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:f,recordCanvas:b,preserveWhiteSpace:H,onSerialize:C,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:E,selectorOptions:F});J&&S(s,J)}},x),I}function eu(s,e){var D,H,Z,X;const{mirror:t=new ro,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:a=null,excludeAttribute:l=/.^/,inlineStylesheet:o=!0,inlineImages:u=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:d,maskInputFn:p,slimDOM:m=!1,dataURLOptions:g,preserveWhiteSpace:f,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:S,keepIframeSrcFn:x=()=>!1,selector:E}=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,L=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,F=E===!1?null:E===!0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:E===void 0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:{maxPathDepth:(D=E.maxPathDepth)!=null?D:10,enableSvgFingerprint:(H=E.enableSvgFingerprint)!=null?H:!0,confidenceThreshold:(Z=E.confidenceThreshold)!=null?Z:.3,fallbackToBody:(X=E.fallbackToBody)!=null?X:!0};return Ye(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:!1,inlineStylesheet:o,maskInputOptions:$,maskTextFn:d,maskInputFn:p,slimDOMOptions:L,dataURLOptions:g,inlineImages:u,recordCanvas:c,preserveWhiteSpace:f,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:S,keepIframeSrcFn:x,newlyAddedElement:!1,selectorOptions:F})}function tu(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function ru(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 ei={exports:{}},M=String,po=function(){return{isColorSupported:!1,reset:M,bold:M,dim:M,italic:M,underline:M,inverse:M,hidden:M,strikethrough:M,black:M,red:M,green:M,yellow:M,blue:M,magenta:M,cyan:M,white:M,gray:M,bgBlack:M,bgRed:M,bgGreen:M,bgYellow:M,bgBlue:M,bgMagenta:M,bgCyan:M,bgWhite:M,blackBright:M,redBright:M,greenBright:M,yellowBright:M,blueBright:M,magentaBright:M,cyanBright:M,whiteBright:M,bgBlackBright:M,bgRedBright:M,bgGreenBright:M,bgYellowBright:M,bgBlueBright:M,bgMagentaBright:M,bgCyanBright:M,bgWhiteBright:M}};ei.exports=po();ei.exports.createColors=po;var su=ei.exports;const iu={},nu=Object.freeze(Object.defineProperty({__proto__:null,default:iu},Symbol.toStringTag,{value:"Module"})),pe=ru(nu);let Zi=su,Ji=pe,ps=class mo extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),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,mo)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Zi.isColorSupported);let r=c=>c,i=c=>c,n=c=>c;if(e){let{bold:c,gray:h,red:d}=Zi.createColors(!0);i=p=>c(d(p)),r=p=>h(p),Ji&&(n=p=>Ji(p))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),o=Math.min(this.line+2,a.length),u=String(o).length;return a.slice(l,o).map((c,h)=>{let d=l+1+h,p=" "+(" "+d).slice(-u)+" | ";if(d===this.line){if(c.length>160){let g=20,f=Math.max(0,this.column-g),b=Math.max(this.column+g,this.endColumn+g),C=c.slice(f,b),v=r(p.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,g-1)).replace(/[^\t]/g," ");return i(">")+r(p)+n(C)+`
|
|
12
|
+
`+v+i("^")}let m=r(p.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(p)+n(c)+`
|
|
13
13
|
`+m+i("^")}return" "+r(p)+n(c)}).join(`
|
|
14
14
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
15
15
|
|
|
16
16
|
`+e+`
|
|
17
|
-
`),this.name+": "+this.message+e}};var
|
|
17
|
+
`),this.name+": "+this.message+e}};var ti=ps;ps.default=ps;const Xi={after:`
|
|
18
18
|
`,beforeClose:`
|
|
19
19
|
`,beforeComment:`
|
|
20
20
|
`,beforeDecl:`
|
|
21
21
|
`,beforeOpen:" ",beforeRule:`
|
|
22
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
23
|
-
`)){let a=this.raw(e,null,"indent");if(a.length)for(let l=0;l<n;l++)r+=a}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],a=this.raw(n,"before");a&&this.builder(a),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
|
|
22
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function ou(s){return s[0].toUpperCase()+s.slice(1)}let ms=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(`
|
|
23
|
+
`)){let a=this.raw(e,null,"indent");if(a.length)for(let l=0;l<n;l++)r+=a}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],a=this.raw(n,"before");a&&this.builder(a),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 Xi[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]!="undefined")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+ou(r);this[l]?i=this[l](a,e):a.walk(o=>{if(i=o.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=Xi[r]),a.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(`
|
|
24
24
|
`)&&(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(`
|
|
25
25
|
`)&&(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(`
|
|
26
26
|
`)&&(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(`
|
|
27
27
|
`)&&(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(`
|
|
28
|
-
`);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
|
|
29
|
-
`?(t=1,r+=1):t+=1}return i}let
|
|
30
|
-
`?(t=1,r+=1):t+=1;return{column:t,line:r,offset:a}}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:we(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:we(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let a=t.slice(we(t,this.source.start),we(t,this.source.end)).indexOf(e.word);a!==-1&&(r=this.positionInside(a),i=this.positionInside(a+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:we(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:we(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 tu().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 a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let l=this[a];if(Array.isArray(l))r[a]=l.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof l=="object"&&l.toJSON)r[a]=l.toJSON(null,t);else if(a==="source"){if(l==null)continue;let o=t.get(l.input);o==null&&(o=n,t.set(l.input,n),n++),r[a]={end:l.end,inputId:o,start:l.start}}else r[a]=l}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ru){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 Ar=fs;fs.default=fs;let iu=Ar,ps=class extends iu{constructor(e){super(e),this.type="comment"}};var Ir=ps;ps.default=ps;let nu=Ar,ms=class extends nu{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ie(A({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Er=ms;ms.default=ms;let co=Ir,uo=Er,ou=Ar,{isClean:ho,my:fo}=It,Ks,po,mo,qs;function go(s){return s.map(e=>(e.nodes&&(e.nodes=go(e.nodes)),delete e.source,e))}function yo(s){if(s[ho]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)yo(e)}let ve=class bo extends ou{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,a)=>i(n.toProxy(),a):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 a of i)this.proxyOf.nodes.splice(r+1,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<n&&(this.indexes[a]=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 a;for(let l in this.indexes)a=this.indexes[l],r<=a&&(this.indexes[l]=a+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=go(po(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 uo(e)]}else if(e.selector||e.selectors)e=[new qs(e)];else if(e.name)e=[new Ks(e)];else if(e.text)e=[new co(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[fo]||bo.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[ho]&&yo(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)}))}};ve.registerParse=s=>{po=s};ve.registerRule=s=>{qs=s};ve.registerAtRule=s=>{Ks=s};ve.registerRoot=s=>{mo=s};var Fe=ve;ve.default=ve;ve.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Ks.prototype):s.type==="rule"?Object.setPrototypeOf(s,qs.prototype):s.type==="decl"?Object.setPrototypeOf(s,uo.prototype):s.type==="comment"?Object.setPrototypeOf(s,co.prototype):s.type==="root"&&Object.setPrototypeOf(s,mo.prototype),s[fo]=!0,s.nodes&&s.nodes.forEach(e=>{ve.rebuild(e)})};let wo=Fe,fr=class extends wo{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 Qs=fr;fr.default=fr;wo.registerAtRule(fr);let au=Fe,So,Co,mt=class extends au{constructor(e){super(A({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new So(new Co,this,e).stringify()}};mt.registerLazyResult=s=>{So=s};mt.registerProcessor=s=>{Co=s};var ei=mt;mt.default=mt;let lu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",cu=(s=21)=>{let e="",t=s|0;for(;t--;)e+=lu[Math.random()*64|0];return e};var uu={nanoid:cu};let{existsSync:hu,readFileSync:du}=fe,{dirname:jr,join:fu}=fe,{SourceMapConsumer:ji,SourceMapGenerator:Gi}=fe;function pu(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let gs=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=jr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new ji(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,/,a=e.match(i)||e.match(n);if(a)return decodeURIComponent(e.substr(a[0].length));let l=e.match(t)||e.match(r);if(l)return pu(e.substr(l[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/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=jr(e),hu(e))return this.mapFile=e,du(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 ji)return Gi.fromSourceMap(t).toString();if(t instanceof Gi)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=fu(jr(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 vo=gs;gs.default=gs;let{nanoid:mu}=uu,{isAbsolute:ys,resolve:bs}=fe,{SourceMapConsumer:gu,SourceMapGenerator:yu}=fe,{fileURLToPath:Yi,pathToFileURL:Pt}=fe,Zi=Xs,bu=vo,Gr=fe,Yr=Symbol("lineToIndexCache"),wu=!!(gu&&yu),Ji=!!(bs&&ys);function Xi(s){if(s[Yr])return s[Yr];let e=s.css.split(`
|
|
31
|
-
`),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[
|
|
32
|
-
`," "];return
|
|
28
|
+
`);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 go=ms;ms.default=ms;let au=go;function gs(s,e){new au(e).stringify(s)}var Mr=gs;gs.default=gs;var Ot={};Ot.isClean=Symbol("isClean");Ot.my=Symbol("my");let lu=ti,cu=go,uu=Mr,{isClean:lt,my:hu}=Ot;function ys(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(a=>ys(a,t)):(n==="object"&&i!==null&&(i=ys(i)),t[r]=i)}return t}function ve(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]===`
|
|
29
|
+
`?(t=1,r+=1):t+=1}return i}let bs=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[lt]=!1,this[hu]=!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=ys(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 lu(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[lt]=!0}markDirty(){if(this[lt]){this[lt]=!1;let e=this;for(;e=e.parent;)e[lt]=!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(ve(r,this.source.start),ve(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=ve(i,this.source.start),a=n+e;for(let l=n;l<a;l++)i[l]===`
|
|
30
|
+
`?(t=1,r+=1):t+=1;return{column:t,line:r,offset:a}}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:ve(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:ve(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let a=t.slice(ve(t,this.source.start),ve(t,this.source.end)).indexOf(e.word);a!==-1&&(r=this.positionInside(a),i=this.positionInside(a+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:ve(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:ve(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 cu().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 a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let l=this[a];if(Array.isArray(l))r[a]=l.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof l=="object"&&l.toJSON)r[a]=l.toJSON(null,t);else if(a==="source"){if(l==null)continue;let o=t.get(l.input);o==null&&(o=n,t.set(l.input,n),n++),r[a]={end:l.end,inputId:o,start:l.start}}else r[a]=l}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=uu){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 Or=bs;bs.default=bs;let du=Or,ws=class extends du{constructor(e){super(e),this.type="comment"}};var Nr=ws;ws.default=ws;let fu=Or,Ss=class extends fu{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=oe(A({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Tr=Ss;Ss.default=Ss;let yo=Nr,bo=Tr,pu=Or,{isClean:wo,my:So}=Ot,ri,Co,vo,si;function xo(s){return s.map(e=>(e.nodes&&(e.nodes=xo(e.nodes)),delete e.source,e))}function Ao(s){if(s[wo]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Ao(e)}let Ie=class Io extends pu{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,a)=>i(n.toProxy(),a):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 a of i)this.proxyOf.nodes.splice(r+1,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<n&&(this.indexes[a]=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 a;for(let l in this.indexes)a=this.indexes[l],r<=a&&(this.indexes[l]=a+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=xo(Co(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 bo(e)]}else if(e.selector||e.selectors)e=[new si(e)];else if(e.name)e=[new ri(e)];else if(e.text)e=[new yo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[So]||Io.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[wo]&&Ao(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)}))}};Ie.registerParse=s=>{Co=s};Ie.registerRule=s=>{si=s};Ie.registerAtRule=s=>{ri=s};Ie.registerRoot=s=>{vo=s};var ze=Ie;Ie.default=Ie;Ie.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,ri.prototype):s.type==="rule"?Object.setPrototypeOf(s,si.prototype):s.type==="decl"?Object.setPrototypeOf(s,bo.prototype):s.type==="comment"?Object.setPrototypeOf(s,yo.prototype):s.type==="root"&&Object.setPrototypeOf(s,vo.prototype),s[So]=!0,s.nodes&&s.nodes.forEach(e=>{Ie.rebuild(e)})};let Eo=ze,wr=class extends Eo{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 ii=wr;wr.default=wr;Eo.registerAtRule(wr);let mu=ze,$o,Ro,St=class extends mu{constructor(e){super(A({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new $o(new Ro,this,e).stringify()}};St.registerLazyResult=s=>{$o=s};St.registerProcessor=s=>{Ro=s};var ni=St;St.default=St;let gu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",yu=(s=21)=>{let e="",t=s|0;for(;t--;)e+=gu[Math.random()*64|0];return e};var bu={nanoid:yu};let{existsSync:wu,readFileSync:Su}=pe,{dirname:Xr,join:Cu}=pe,{SourceMapConsumer:Ki,SourceMapGenerator:qi}=pe;function vu(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Cs=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=Xr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Ki(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,/,a=e.match(i)||e.match(n);if(a)return decodeURIComponent(e.substr(a[0].length));let l=e.match(t)||e.match(r);if(l)return vu(e.substr(l[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/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=Xr(e),wu(e))return this.mapFile=e,Su(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 Ki)return qi.fromSourceMap(t).toString();if(t instanceof qi)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=Cu(Xr(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 Mo=Cs;Cs.default=Cs;let{nanoid:xu}=bu,{isAbsolute:vs,resolve:xs}=pe,{SourceMapConsumer:Au,SourceMapGenerator:Iu}=pe,{fileURLToPath:Qi,pathToFileURL:Ht}=pe,en=ti,Eu=Mo,Kr=pe,qr=Symbol("lineToIndexCache"),$u=!!(Au&&Iu),tn=!!(xs&&vs);function rn(s){if(s[qr])return s[qr];let e=s.css.split(`
|
|
31
|
+
`),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[qr]=t,t}let Sr=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&&(!tn||/^\w+:\/\//.test(t.from)||vs(t.from)?this.file=t.from:this.file=xs(t.from)),tn&&$u){let r=new Eu(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 "+xu(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,a,l,o,u;if(t&&typeof t=="object"){let h=t,d=r;if(typeof h.offset=="number"){o=h.offset;let p=this.fromOffset(o);t=p.line,r=p.col}else t=h.line,r=h.column,o=this.fromLineAndColumn(t,r);if(typeof d.offset=="number"){l=d.offset;let p=this.fromOffset(l);a=p.line,n=p.col}else a=d.line,n=d.column,l=this.fromLineAndColumn(d.line,d.column)}else if(r)o=this.fromLineAndColumn(t,r);else{o=t;let h=this.fromOffset(o);t=h.line,r=h.col}let c=this.origin(t,r,a,n);return c?u=new en(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,i.plugin):u=new en(e,a===void 0?t:{column:r,line:t},a===void 0?r:{column:n,line:a},this.css,this.file,i.plugin),u.input={column:r,endColumn:n,endLine:a,endOffset:l,line:t,offset:o,source:this.css},this.file&&(Ht&&(u.input.url=Ht(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(e,t){return rn(this)[e-1]+t-1}fromOffset(e){let t=rn(this),r=t[t.length-1],i=0;if(e>=r)i=t.length-1;else{let n=t.length-2,a;for(;i<n;)if(a=i+(n-i>>1),e<t[a])n=a-1;else if(e>=t[a+1])i=a+1;else{i=a;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:xs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),a=n.originalPositionFor({column:t,line:e});if(!a.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let o;vs(a.source)?o=Ht(a.source):o=new URL(a.source,this.map.consumer().sourceRoot||Ht(this.map.mapFile));let u={column:a.column,endColumn:l&&l.column,endLine:l&&l.line,line:a.line,url:o.toString()};if(o.protocol==="file:")if(Qi)u.file=Qi(o);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(a.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=A({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var kr=Sr;Sr.default=Sr;Kr&&Kr.registerInput&&Kr.registerInput(Sr);let Oo=ze,No,To,Xe=class extends Oo{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 No(new To,this,e).stringify()}};Xe.registerLazyResult=s=>{No=s};Xe.registerProcessor=s=>{To=s};var Nt=Xe;Xe.default=Xe;Oo.registerRoot(Xe);let Ct={comma(s){return Ct.split(s,[","],!0)},space(s){let e=[" ",`
|
|
32
|
+
`," "];return Ct.split(s,e)},split(s,e,t){let r=[],i="",n=!1,a=0,l=!1,o="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===o&&(l=!1):c==='"'||c==="'"?(l=!0,o=c):c==="("?a+=1:c===")"?a>0&&(a-=1):a===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var ko=Ct;Ct.default=Ct;let Do=ze,Ru=ko,Cr=class extends Do{get selectors(){return Ru.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 oi=Cr;Cr.default=Cr;Do.registerRule(Cr);let Mu=ii,Ou=Nr,Nu=Tr,Tu=kr,ku=Mo,Du=Nt,Lu=oi;function vt(s,e){if(Array.isArray(s))return s.map(a=>vt(a));let i=s,{inputs:t}=i,r=He(i,["inputs"]);if(t){e=[];for(let a of t){let l=oe(A({},a),{__proto__:Tu.prototype});l.map&&(l.map=oe(A({},l.map),{__proto__:ku.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(a=>vt(a,e))),r.source){let n=r.source,{inputId:a}=n,l=He(n,["inputId"]);r.source=l,a!=null&&(r.source.input=e[a])}if(r.type==="root")return new Du(r);if(r.type==="decl")return new Nu(r);if(r.type==="rule")return new Lu(r);if(r.type==="comment")return new Ou(r);if(r.type==="atrule")return new Mu(r);throw new Error("Unknown node type: "+s.type)}var Pu=vt;vt.default=vt;let{dirname:ur,relative:Lo,resolve:Po,sep:_o}=pe,{SourceMapConsumer:Fo,SourceMapGenerator:hr}=pe,{pathToFileURL:sn}=pe,_u=kr,Fu=!!(Fo&&hr),zu=!!(ur&&Po&&Lo&&_o),Bu=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=`
|
|
33
33
|
`;this.css.includes(`\r
|
|
34
34
|
`)&&(t=`\r
|
|
35
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||
|
|
36
|
-
`),t=l.length-n):t+=l.length,o&&u!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.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?
|
|
37
|
-
`.charCodeAt(0),it=" ".charCodeAt(0),zt="\f".charCodeAt(0),Bt=" ".charCodeAt(0),Wt="\r".charCodeAt(0),ku="[".charCodeAt(0),Du="]".charCodeAt(0),Lu="(".charCodeAt(0),Pu=")".charCodeAt(0),_u="{".charCodeAt(0),Fu="}".charCodeAt(0),zu=";".charCodeAt(0),Bu="*".charCodeAt(0),Wu=":".charCodeAt(0),Hu="@".charCodeAt(0),Ht=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ut=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Uu=/.[\r\n"'(/\\]/,en=/[\da-f]/i;var Vu=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,u,c,h,d,p,m,g=r.length,f=0,b=[],v=[];function S(){return f}function y($){throw e.error("Unclosed "+$,f)}function C(){return v.length===0&&f>=g}function x($){if(v.length)return v.pop();if(f>=g)return;let _=$?$.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Ft:case it:case Bt:case Wt:case zt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===it||n===Ft||n===Bt||n===Wt||n===zt);c=["space",r.slice(f,o)],f=o-1;break}case ku:case Du:case _u:case Fu:case Wu:case zu:case Pu:{let F=String.fromCharCode(n);c=[F,F,f];break}case Lu:{if(m=b.length?b.pop()[1]:"",p=r.charCodeAt(f+1),m==="url"&&p!==Zr&&p!==qi&&p!==it&&p!==Ft&&p!==Bt&&p!==zt&&p!==Wt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||_){o=f;break}else y("bracket");for(d=o;r.charCodeAt(d-1)===_t;)d-=1,h=!h}while(h);c=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||Uu.test(a)?c=["(","(",f]:(c=["brackets",a,f,o],f=o);break}case Zr:case qi:{u=n===Zr?"'":'"',o=f;do{if(h=!1,o=r.indexOf(u,o+1),o===-1)if(i||_){o=f+1;break}else y("string");for(d=o;r.charCodeAt(d-1)===_t;)d-=1,h=!h}while(h);c=["string",r.slice(f,o+1),f,o],f=o;break}case Hu:{Ht.lastIndex=f+1,Ht.test(r),Ht.lastIndex===0?o=r.length-1:o=Ht.lastIndex-2,c=["at-word",r.slice(f,o+1),f,o],f=o;break}case _t:{for(o=f,l=!0;r.charCodeAt(o+1)===_t;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==Qi&&n!==it&&n!==Ft&&n!==Bt&&n!==Wt&&n!==zt&&(o+=1,en.test(r.charAt(o)))){for(;en.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===it&&(o+=1)}c=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Qi&&r.charCodeAt(f+1)===Bu?(o=r.indexOf("*/",f+2)+1,o===0&&(i||_?o=r.length:y("comment")),c=["comment",r.slice(f,o+1),f,o],f=o):(Ut.lastIndex=f+1,Ut.test(r),Ut.lastIndex===0?o=r.length-1:o=Ut.lastIndex-2,c=["word",r.slice(f,o+1),f,o],b.push(c),f=o);break}}return f++,c}function E($){v.push($)}return{back:E,endOfFile:C,nextToken:x,position:S}};let ju=Qs,Gu=Ir,Yu=Er,Zu=Et,tn=ti,Ju=Vu;const rn={empty:!0,space:!0};function Xu(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Ku=class{constructor(e){this.input=e,this.root=new Zu,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 ju;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.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(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.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[a,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 a}r=i}return!1}comment(e){let t=new Gu;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let 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=Ju(this.input)}decl(e,t){let r=new Yu;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]||Xu(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 u=e[0][0];if(u===":"||u==="space"||u==="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 a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let d=u;d>0;d--){let p=c[d][0];if(h.trim().startsWith("!")&&p!=="space")break;h=c.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=a.map(u=>u[1]).join(""),a=[]),this.raw(r,"value",a.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 tn;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,a=[],l=e[1].startsWith("--"),o=[],u=e;for(;u;){if(r=u[0],o.push(u),r==="("||r==="[")n||(n=u),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(u=o[o.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}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,a,l=r.length,o="",u=!0,c,h;for(let d=0;d<l;d+=1)n=r[d],a=n[0],a==="space"&&d===l-1&&!i?u=!1:a==="comment"?(h=r[d-1]?r[d-1][0]:"empty",c=r[d+1]?r[d+1][0]:"empty",!rn[h]&&!rn[c]?o.slice(-1)===","?u=!1:o+=n[1]:u=!1):o+=n[1];if(!u){let d=r.reduce((p,m)=>p+m[1],"");e.raws[t]={raw:d,value:o}}e[t]=o}rule(e){e.pop();let t=new tn;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 qu=Ku;let Qu=Fe,eh=$r,th=qu;function gr(s,e){let t=new eh(s,e),r=new th(t);try{r.parse()}catch(i){throw i}return r.root}var ri=gr;gr.default=gr;Qu.registerParse(gr);let ws=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 ko=ws;ws.default=ws;let rh=ko,Ss=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 rh(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var si=Ss;Ss.default=Ss;let sh=Fe,ih=ei,nh=To,oh=ri,sn=si,ah=Et,lh=xr,{isClean:ge,my:ch}=It;const uh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},hh={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},dh={Once:!0,postcssPlugin:!0,prepare:!0},Xe=0;function nt(s){return typeof s=="object"&&typeof s.then=="function"}function Do(s){let e=!1,t=uh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Xe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Xe,t+"Exit"]:[t,t+"Exit"]}function nn(s){let e;return s.type==="document"?e=["Document",Xe,"DocumentExit"]:s.type==="root"?e=["Root",Xe,"RootExit"]:e=Do(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Cs(s){return s[ge]=!1,s.nodes&&s.nodes.forEach(e=>Cs(e)),s}let vs={},Ke=class Lo{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=Cs(t);else if(t instanceof Lo||t instanceof sn)i=Cs(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=oh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[ch]&&sh.rebuild(i)}this.result=new sn(e,i,r),this.helpers=ie(A({},vs),{postcss:vs,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?A(A({},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(!hh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!dh[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(nt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ge];){e[ge]=!0;let t=[nn(e)];for(;t.length>0;){let r=this.visitTick(t);if(nt(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 nt(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=lh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new nh(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(nt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ge];)e[ge]=!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(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(nt(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[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[ge]){l[ge]=!0,e.push(nn(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===Xe){r.nodes&&r.nodes.length&&(r[ge]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[ge]=!0;let t=Do(e);for(let r of t)if(r===Xe)e.nodes&&e.each(i=>{i[ge]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Ke.registerPostcss=s=>{vs=s};var Po=Ke;Ke.default=Ke;ah.registerLazyResult(Ke);ih.registerLazyResult(Ke);let fh=To,ph=ri;const mh=si;let gh=xr;let xs=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=ph;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=gh;this.result=new mh(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new fh(n,i,this._opts,t);if(l.isMap()){let[o,u]=l.generate();o&&(this.result.css=o),u&&(this.result.map=u)}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 yh=xs;xs.default=xs;let bh=ei,wh=Po,Sh=yh,Ch=Et,bt=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 Sh(this,e,t):new wh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var vh=bt;bt.default=bt;Ch.registerProcessor(bt);bh.registerProcessor(bt);let _o=Qs,Fo=Ir,xh=Fe,Ah=Xs,zo=Er,Bo=ei,Ih=Ru,Eh=$r,$h=Po,Rh=Eo,Mh=Ar,Oh=ri,ii=vh,Nh=si,Wo=Et,Ho=ti,Th=xr,kh=ko;function B(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ii(s)}B.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
35
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||ur(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Fo(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(),zu&&Fu&&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=hr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new hr({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 hr({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,a;this.stringify(this.root,(l,o,u)=>{if(this.css+=l,o&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=l.match(/\n/g),a?(e+=a.length,n=l.lastIndexOf(`
|
|
36
|
+
`),t=l.length-n):t+=l.length,o&&u!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.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?ur(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=ur(Po(r,this.mapOpts.annotation)));let i=Lo(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 _u(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(sn){let r=sn(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;_o==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var zo=Bu;const Qr="'".charCodeAt(0),nn='"'.charCodeAt(0),Ut="\\".charCodeAt(0),on="/".charCodeAt(0),Vt=`
|
|
37
|
+
`.charCodeAt(0),ct=" ".charCodeAt(0),jt="\f".charCodeAt(0),Gt=" ".charCodeAt(0),Yt="\r".charCodeAt(0),Wu="[".charCodeAt(0),Hu="]".charCodeAt(0),Uu="(".charCodeAt(0),Vu=")".charCodeAt(0),ju="{".charCodeAt(0),Gu="}".charCodeAt(0),Yu=";".charCodeAt(0),Zu="*".charCodeAt(0),Ju=":".charCodeAt(0),Xu="@".charCodeAt(0),Zt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Jt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ku=/.[\r\n"'(/\\]/,an=/[\da-f]/i;var qu=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,u,c,h,d,p,m,g=r.length,f=0,b=[],C=[];function v(){return f}function y($){throw e.error("Unclosed "+$,f)}function S(){return C.length===0&&f>=g}function x($){if(C.length)return C.pop();if(f>=g)return;let L=$?$.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Vt:case ct:case Gt:case Yt:case jt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===ct||n===Vt||n===Gt||n===Yt||n===jt);c=["space",r.slice(f,o)],f=o-1;break}case Wu:case Hu:case ju:case Gu:case Ju:case Yu:case Vu:{let F=String.fromCharCode(n);c=[F,F,f];break}case Uu:{if(m=b.length?b.pop()[1]:"",p=r.charCodeAt(f+1),m==="url"&&p!==Qr&&p!==nn&&p!==ct&&p!==Vt&&p!==Gt&&p!==jt&&p!==Yt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||L){o=f;break}else y("bracket");for(d=o;r.charCodeAt(d-1)===Ut;)d-=1,h=!h}while(h);c=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||Ku.test(a)?c=["(","(",f]:(c=["brackets",a,f,o],f=o);break}case Qr:case nn:{u=n===Qr?"'":'"',o=f;do{if(h=!1,o=r.indexOf(u,o+1),o===-1)if(i||L){o=f+1;break}else y("string");for(d=o;r.charCodeAt(d-1)===Ut;)d-=1,h=!h}while(h);c=["string",r.slice(f,o+1),f,o],f=o;break}case Xu:{Zt.lastIndex=f+1,Zt.test(r),Zt.lastIndex===0?o=r.length-1:o=Zt.lastIndex-2,c=["at-word",r.slice(f,o+1),f,o],f=o;break}case Ut:{for(o=f,l=!0;r.charCodeAt(o+1)===Ut;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==on&&n!==ct&&n!==Vt&&n!==Gt&&n!==Yt&&n!==jt&&(o+=1,an.test(r.charAt(o)))){for(;an.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===ct&&(o+=1)}c=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===on&&r.charCodeAt(f+1)===Zu?(o=r.indexOf("*/",f+2)+1,o===0&&(i||L?o=r.length:y("comment")),c=["comment",r.slice(f,o+1),f,o],f=o):(Jt.lastIndex=f+1,Jt.test(r),Jt.lastIndex===0?o=r.length-1:o=Jt.lastIndex-2,c=["word",r.slice(f,o+1),f,o],b.push(c),f=o);break}}return f++,c}function E($){C.push($)}return{back:E,endOfFile:S,nextToken:x,position:v}};let Qu=ii,eh=Nr,th=Tr,rh=Nt,ln=oi,sh=qu;const cn={empty:!0,space:!0};function ih(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let nh=class{constructor(e){this.input=e,this.root=new rh,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 Qu;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.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(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.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[a,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 a}r=i}return!1}comment(e){let t=new eh;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=sh(this.input)}decl(e,t){let r=new th;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]||ih(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 u=e[0][0];if(u===":"||u==="space"||u==="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 a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let d=u;d>0;d--){let p=c[d][0];if(h.trim().startsWith("!")&&p!=="space")break;h=c.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=a.map(u=>u[1]).join(""),a=[]),this.raw(r,"value",a.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 ln;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,a=[],l=e[1].startsWith("--"),o=[],u=e;for(;u;){if(r=u[0],o.push(u),r==="("||r==="[")n||(n=u),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(u=o[o.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}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,a,l=r.length,o="",u=!0,c,h;for(let d=0;d<l;d+=1)n=r[d],a=n[0],a==="space"&&d===l-1&&!i?u=!1:a==="comment"?(h=r[d-1]?r[d-1][0]:"empty",c=r[d+1]?r[d+1][0]:"empty",!cn[h]&&!cn[c]?o.slice(-1)===","?u=!1:o+=n[1]:u=!1):o+=n[1];if(!u){let d=r.reduce((p,m)=>p+m[1],"");e.raws[t]={raw:d,value:o}}e[t]=o}rule(e){e.pop();let t=new ln;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 oh=nh;let ah=ze,lh=kr,ch=oh;function vr(s,e){let t=new lh(s,e),r=new ch(t);try{r.parse()}catch(i){throw i}return r.root}var ai=vr;vr.default=vr;ah.registerParse(vr);let As=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 Bo=As;As.default=As;let uh=Bo,Is=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 uh(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var li=Is;Is.default=Is;let hh=ze,dh=ni,fh=zo,ph=ai,un=li,mh=Nt,gh=Mr,{isClean:be,my:yh}=Ot;const bh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},wh={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},Sh={Once:!0,postcssPlugin:!0,prepare:!0},Ke=0;function ut(s){return typeof s=="object"&&typeof s.then=="function"}function Wo(s){let e=!1,t=bh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Ke,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Ke,t+"Exit"]:[t,t+"Exit"]}function hn(s){let e;return s.type==="document"?e=["Document",Ke,"DocumentExit"]:s.type==="root"?e=["Root",Ke,"RootExit"]:e=Wo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Es(s){return s[be]=!1,s.nodes&&s.nodes.forEach(e=>Es(e)),s}let $s={},qe=class Ho{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=Es(t);else if(t instanceof Ho||t instanceof un)i=Es(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=ph;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[yh]&&hh.rebuild(i)}this.result=new un(e,i,r),this.helpers=oe(A({},$s),{postcss:$s,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?A(A({},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(!wh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Sh[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(ut(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[be];){e[be]=!0;let t=[hn(e)];for(;t.length>0;){let r=this.visitTick(t);if(ut(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 ut(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=gh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new fh(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(ut(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[be];)e[be]=!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(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ut(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[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[be]){l[be]=!0,e.push(hn(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===Ke){r.nodes&&r.nodes.length&&(r[be]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[be]=!0;let t=Wo(e);for(let r of t)if(r===Ke)e.nodes&&e.each(i=>{i[be]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};qe.registerPostcss=s=>{$s=s};var Uo=qe;qe.default=qe;mh.registerLazyResult(qe);dh.registerLazyResult(qe);let Ch=zo,vh=ai;const xh=li;let Ah=Mr;let Rs=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=vh;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=Ah;this.result=new xh(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new Ch(n,i,this._opts,t);if(l.isMap()){let[o,u]=l.generate();o&&(this.result.css=o),u&&(this.result.map=u)}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 Ih=Rs;Rs.default=Rs;let Eh=ni,$h=Uo,Rh=Ih,Mh=Nt,xt=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 Rh(this,e,t):new $h(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Oh=xt;xt.default=xt;Mh.registerProcessor(xt);Eh.registerProcessor(xt);let Vo=ii,jo=Nr,Nh=ze,Th=ti,Go=Tr,Yo=ni,kh=Pu,Dh=kr,Lh=Uo,Ph=ko,_h=Or,Fh=ai,ci=Oh,zh=li,Zo=Nt,Jo=oi,Bh=Mr,Wh=Bo;function B(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ci(s)}B.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
38
38
|
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:
|
|
39
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new
|
|
40
|
-
`+
|
|
39
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new ci().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(a,l,o){return B([i(o)]).process(a,l)},i};B.stringify=Bh;B.parse=Fh;B.fromJSON=kh;B.list=Ph;B.comment=s=>new jo(s);B.atRule=s=>new Vo(s);B.decl=s=>new Go(s);B.rule=s=>new Jo(s);B.root=s=>new Zo(s);B.document=s=>new Yo(s);B.CssSyntaxError=Th;B.Declaration=Go;B.Container=Nh;B.Processor=ci;B.Document=Yo;B.Comment=jo;B.Warning=Wh;B.AtRule=Vo;B.Result=zh;B.Input=Dh;B.Rule=Jo;B.Root=Zo;B.Node=_h;Lh.registerPostcss(B);var Hh=B;B.default=B;const G=tu(Hh);G.stringify;G.fromJSON;G.plugin;G.parse;G.list;G.document;G.comment;G.atRule;G.rule;G.decl;G.root;G.CssSyntaxError;G.Declaration;G.Container;G.Processor;G.Document;G.Comment;G.Warning;G.AtRule;G.Result;G.Input;G.Rule;G.Root;G.Node;var Uh=Object.defineProperty,Vh=(s,e,t)=>e in s?Uh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,he=(s,e,t)=>Vh(s,typeof e!="symbol"?e+"":e,t);const jh=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Gh=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Xo=new WeakSet,Yh=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(Yh.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();jh.includes(r)&&Xo.add(this)}};const Zh=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){Zh.call(this,s,e,t)};function dn(){document.querySelectorAll("*").forEach(e=>{Gh.forEach(t=>{e.hasAttribute(t)&&Xo.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?dn():document.addEventListener("DOMContentLoaded",dn)}catch(s){}function Jh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Xh(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 ui={exports:{}},O=String,Ko=function(){return{isColorSupported:!1,reset:O,bold:O,dim:O,italic:O,underline:O,inverse:O,hidden:O,strikethrough:O,black:O,red:O,green:O,yellow:O,blue:O,magenta:O,cyan:O,white:O,gray:O,bgBlack:O,bgRed:O,bgGreen:O,bgYellow:O,bgBlue:O,bgMagenta:O,bgCyan:O,bgWhite:O,blackBright:O,redBright:O,greenBright:O,yellowBright:O,blueBright:O,magentaBright:O,cyanBright:O,whiteBright:O,bgBlackBright:O,bgRedBright:O,bgGreenBright:O,bgYellowBright:O,bgBlueBright:O,bgMagentaBright:O,bgCyanBright:O,bgWhiteBright:O}};ui.exports=Ko();ui.exports.createColors=Ko;var Kh=ui.exports;const qh={},Qh=Object.freeze(Object.defineProperty({__proto__:null,default:qh},Symbol.toStringTag,{value:"Module"})),me=Xh(Qh);let fn=Kh,pn=me,Ms=class qo extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),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,qo)}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=fn.isColorSupported);let r=c=>c,i=c=>c,n=c=>c;if(e){let{bold:c,gray:h,red:d}=fn.createColors(!0);i=p=>c(d(p)),r=p=>h(p),pn&&(n=p=>pn(p))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),o=Math.min(this.line+2,a.length),u=String(o).length;return a.slice(l,o).map((c,h)=>{let d=l+1+h,p=" "+(" "+d).slice(-u)+" | ";if(d===this.line){if(c.length>160){let g=20,f=Math.max(0,this.column-g),b=Math.max(this.column+g,this.endColumn+g),C=c.slice(f,b),v=r(p.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,g-1)).replace(/[^\t]/g," ");return i(">")+r(p)+n(C)+`
|
|
40
|
+
`+v+i("^")}let m=r(p.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(p)+n(c)+`
|
|
41
41
|
`+m+i("^")}return" "+r(p)+n(c)}).join(`
|
|
42
42
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
43
43
|
|
|
44
44
|
`+e+`
|
|
45
|
-
`),this.name+": "+this.message+e}};var
|
|
45
|
+
`),this.name+": "+this.message+e}};var hi=Ms;Ms.default=Ms;const mn={after:`
|
|
46
46
|
`,beforeClose:`
|
|
47
47
|
`,beforeComment:`
|
|
48
48
|
`,beforeDecl:`
|
|
49
49
|
`,beforeOpen:" ",beforeRule:`
|
|
50
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
51
|
-
`)){let a=this.raw(e,null,"indent");if(a.length)for(let l=0;l<n;l++)r+=a}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],a=this.raw(n,"before");a&&this.builder(a),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
|
|
50
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function ed(s){return s[0].toUpperCase()+s.slice(1)}let Os=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(`
|
|
51
|
+
`)){let a=this.raw(e,null,"indent");if(a.length)for(let l=0;l<n;l++)r+=a}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],a=this.raw(n,"before");a&&this.builder(a),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 mn[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]!="undefined")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+ed(r);this[l]?i=this[l](a,e):a.walk(o=>{if(i=o.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=mn[r]),a.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(`
|
|
52
52
|
`)&&(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(`
|
|
53
53
|
`)&&(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(`
|
|
54
54
|
`)&&(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(`
|
|
55
55
|
`)&&(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(`
|
|
56
|
-
`);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
|
|
57
|
-
`?(t=1,r+=1):t+=1}return i}let
|
|
58
|
-
`?(t=1,r+=1):t+=1;return{column:t,line:r,offset:a}}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:Se(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:Se(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let a=t.slice(Se(t,this.source.start),Se(t,this.source.end)).indexOf(e.word);a!==-1&&(r=this.positionInside(a),i=this.positionInside(a+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:Se(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:Se(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 Jh().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 a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let l=this[a];if(Array.isArray(l))r[a]=l.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof l=="object"&&l.toJSON)r[a]=l.toJSON(null,t);else if(a==="source"){if(l==null)continue;let o=t.get(l.input);o==null&&(o=n,t.set(l.input,n),n++),r[a]={end:l.end,inputId:o,start:l.start}}else r[a]=l}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Xh){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 Mr=Rs;Rs.default=Rs;let qh=Mr,Ms=class extends qh{constructor(e){super(e),this.type="comment"}};var Or=Ms;Ms.default=Ms;let Qh=Mr,Os=class extends Qh{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ie(A({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Nr=Os;Os.default=Os;let Yo=Or,Zo=Nr,ed=Mr,{isClean:Jo,my:Xo}=$t,ai,Ko,qo,li;function Qo(s){return s.map(e=>(e.nodes&&(e.nodes=Qo(e.nodes)),delete e.source,e))}function ea(s){if(s[Jo]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)ea(e)}let xe=class ta extends ed{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,a)=>i(n.toProxy(),a):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 a of i)this.proxyOf.nodes.splice(r+1,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<n&&(this.indexes[a]=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 a;for(let l in this.indexes)a=this.indexes[l],r<=a&&(this.indexes[l]=a+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Qo(Ko(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 Zo(e)]}else if(e.selector||e.selectors)e=[new li(e)];else if(e.name)e=[new ai(e)];else if(e.text)e=[new Yo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Xo]||ta.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Jo]&&ea(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)}))}};xe.registerParse=s=>{Ko=s};xe.registerRule=s=>{li=s};xe.registerAtRule=s=>{ai=s};xe.registerRoot=s=>{qo=s};var ze=xe;xe.default=xe;xe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,ai.prototype):s.type==="rule"?Object.setPrototypeOf(s,li.prototype):s.type==="decl"?Object.setPrototypeOf(s,Zo.prototype):s.type==="comment"?Object.setPrototypeOf(s,Yo.prototype):s.type==="root"&&Object.setPrototypeOf(s,qo.prototype),s[Xo]=!0,s.nodes&&s.nodes.forEach(e=>{xe.rebuild(e)})};let ra=ze,yr=class extends ra{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 ci=yr;yr.default=yr;ra.registerAtRule(yr);let td=ze,sa,ia,wt=class extends td{constructor(e){super(A({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new sa(new ia,this,e).stringify()}};wt.registerLazyResult=s=>{sa=s};wt.registerProcessor=s=>{ia=s};var ui=wt;wt.default=wt;let rd="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",sd=(s=21)=>{let e="",t=s|0;for(;t--;)e+=rd[Math.random()*64|0];return e};var id={nanoid:sd};let{existsSync:nd,readFileSync:od}=pe,{dirname:Jr,join:ad}=pe,{SourceMapConsumer:un,SourceMapGenerator:hn}=pe;function ld(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Ns=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=Jr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new un(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,/,a=e.match(i)||e.match(n);if(a)return decodeURIComponent(e.substr(a[0].length));let l=e.match(t)||e.match(r);if(l)return ld(e.substr(l[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/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=Jr(e),nd(e))return this.mapFile=e,od(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 un)return hn.fromSourceMap(t).toString();if(t instanceof hn)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=ad(Jr(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 na=Ns;Ns.default=Ns;let{nanoid:cd}=id,{isAbsolute:Ts,resolve:ks}=pe,{SourceMapConsumer:ud,SourceMapGenerator:hd}=pe,{fileURLToPath:dn,pathToFileURL:Vt}=pe,fn=oi,dd=na,Xr=pe,Kr=Symbol("lineToIndexCache"),fd=!!(ud&&hd),pn=!!(ks&&Ts);function mn(s){if(s[Kr])return s[Kr];let e=s.css.split(`
|
|
59
|
-
`),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[
|
|
60
|
-
`," "];return
|
|
56
|
+
`);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 Qo=Os;Os.default=Os;let td=Qo;function Ns(s,e){new td(e).stringify(s)}var Dr=Ns;Ns.default=Ns;var Tt={};Tt.isClean=Symbol("isClean");Tt.my=Symbol("my");let rd=hi,sd=Qo,id=Dr,{isClean:ht,my:nd}=Tt;function Ts(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(a=>Ts(a,t)):(n==="object"&&i!==null&&(i=Ts(i)),t[r]=i)}return t}function xe(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]===`
|
|
57
|
+
`?(t=1,r+=1):t+=1}return i}let ks=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[ht]=!1,this[nd]=!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=Ts(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 rd(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[ht]=!0}markDirty(){if(this[ht]){this[ht]=!1;let e=this;for(;e=e.parent;)e[ht]=!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(xe(r,this.source.start),xe(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=xe(i,this.source.start),a=n+e;for(let l=n;l<a;l++)i[l]===`
|
|
58
|
+
`?(t=1,r+=1):t+=1;return{column:t,line:r,offset:a}}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:xe(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:xe(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let a=t.slice(xe(t,this.source.start),xe(t,this.source.end)).indexOf(e.word);a!==-1&&(r=this.positionInside(a),i=this.positionInside(a+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:xe(t,e.start)}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line,offset:xe(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 sd().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 a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let l=this[a];if(Array.isArray(l))r[a]=l.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof l=="object"&&l.toJSON)r[a]=l.toJSON(null,t);else if(a==="source"){if(l==null)continue;let o=t.get(l.input);o==null&&(o=n,t.set(l.input,n),n++),r[a]={end:l.end,inputId:o,start:l.start}}else r[a]=l}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=id){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 Lr=ks;ks.default=ks;let od=Lr,Ds=class extends od{constructor(e){super(e),this.type="comment"}};var Pr=Ds;Ds.default=Ds;let ad=Lr,Ls=class extends ad{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=oe(A({},e),{value:String(e.value)})),super(e),this.type="decl"}};var _r=Ls;Ls.default=Ls;let ea=Pr,ta=_r,ld=Lr,{isClean:ra,my:sa}=Tt,di,ia,na,fi;function oa(s){return s.map(e=>(e.nodes&&(e.nodes=oa(e.nodes)),delete e.source,e))}function aa(s){if(s[ra]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)aa(e)}let Ee=class la extends ld{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,a)=>i(n.toProxy(),a):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 a of i)this.proxyOf.nodes.splice(r+1,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<n&&(this.indexes[a]=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 a;for(let l in this.indexes)a=this.indexes[l],r<=a&&(this.indexes[l]=a+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=oa(ia(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 ta(e)]}else if(e.selector||e.selectors)e=[new fi(e)];else if(e.name)e=[new di(e)];else if(e.text)e=[new ea(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[sa]||la.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[ra]&&aa(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)}))}};Ee.registerParse=s=>{ia=s};Ee.registerRule=s=>{fi=s};Ee.registerAtRule=s=>{di=s};Ee.registerRoot=s=>{na=s};var Be=Ee;Ee.default=Ee;Ee.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,di.prototype):s.type==="rule"?Object.setPrototypeOf(s,fi.prototype):s.type==="decl"?Object.setPrototypeOf(s,ta.prototype):s.type==="comment"?Object.setPrototypeOf(s,ea.prototype):s.type==="root"&&Object.setPrototypeOf(s,na.prototype),s[sa]=!0,s.nodes&&s.nodes.forEach(e=>{Ee.rebuild(e)})};let ca=Be,xr=class extends ca{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 pi=xr;xr.default=xr;ca.registerAtRule(xr);let cd=Be,ua,ha,At=class extends cd{constructor(e){super(A({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new ua(new ha,this,e).stringify()}};At.registerLazyResult=s=>{ua=s};At.registerProcessor=s=>{ha=s};var mi=At;At.default=At;let ud="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",hd=(s=21)=>{let e="",t=s|0;for(;t--;)e+=ud[Math.random()*64|0];return e};var dd={nanoid:hd};let{existsSync:fd,readFileSync:pd}=me,{dirname:es,join:md}=me,{SourceMapConsumer:gn,SourceMapGenerator:yn}=me;function gd(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Ps=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=es(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new gn(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,/,a=e.match(i)||e.match(n);if(a)return decodeURIComponent(e.substr(a[0].length));let l=e.match(t)||e.match(r);if(l)return gd(e.substr(l[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/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=es(e),fd(e))return this.mapFile=e,pd(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 gn)return yn.fromSourceMap(t).toString();if(t instanceof yn)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=md(es(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 da=Ps;Ps.default=Ps;let{nanoid:yd}=dd,{isAbsolute:_s,resolve:Fs}=me,{SourceMapConsumer:bd,SourceMapGenerator:wd}=me,{fileURLToPath:bn,pathToFileURL:Xt}=me,wn=hi,Sd=da,ts=me,rs=Symbol("lineToIndexCache"),Cd=!!(bd&&wd),Sn=!!(Fs&&_s);function Cn(s){if(s[rs])return s[rs];let e=s.css.split(`
|
|
59
|
+
`),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[rs]=t,t}let Ar=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&&(!Sn||/^\w+:\/\//.test(t.from)||_s(t.from)?this.file=t.from:this.file=Fs(t.from)),Sn&&Cd){let r=new Sd(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 "+yd(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,a,l,o,u;if(t&&typeof t=="object"){let h=t,d=r;if(typeof h.offset=="number"){o=h.offset;let p=this.fromOffset(o);t=p.line,r=p.col}else t=h.line,r=h.column,o=this.fromLineAndColumn(t,r);if(typeof d.offset=="number"){l=d.offset;let p=this.fromOffset(l);a=p.line,n=p.col}else a=d.line,n=d.column,l=this.fromLineAndColumn(d.line,d.column)}else if(r)o=this.fromLineAndColumn(t,r);else{o=t;let h=this.fromOffset(o);t=h.line,r=h.col}let c=this.origin(t,r,a,n);return c?u=new wn(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,i.plugin):u=new wn(e,a===void 0?t:{column:r,line:t},a===void 0?r:{column:n,line:a},this.css,this.file,i.plugin),u.input={column:r,endColumn:n,endLine:a,endOffset:l,line:t,offset:o,source:this.css},this.file&&(Xt&&(u.input.url=Xt(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(e,t){return Cn(this)[e-1]+t-1}fromOffset(e){let t=Cn(this),r=t[t.length-1],i=0;if(e>=r)i=t.length-1;else{let n=t.length-2,a;for(;i<n;)if(a=i+(n-i>>1),e<t[a])n=a-1;else if(e>=t[a+1])i=a+1;else{i=a;break}}return{col:e-t[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Fs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),a=n.originalPositionFor({column:t,line:e});if(!a.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let o;_s(a.source)?o=Xt(a.source):o=new URL(a.source,this.map.consumer().sourceRoot||Xt(this.map.mapFile));let u={column:a.column,endColumn:l&&l.column,endLine:l&&l.line,line:a.line,url:o.toString()};if(o.protocol==="file:")if(bn)u.file=bn(o);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(a.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=A({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var Fr=Ar;Ar.default=Ar;ts&&ts.registerInput&&ts.registerInput(Ar);let fa=Be,pa,ma,Qe=class extends fa{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 pa(new ma,this,e).stringify()}};Qe.registerLazyResult=s=>{pa=s};Qe.registerProcessor=s=>{ma=s};var kt=Qe;Qe.default=Qe;fa.registerRoot(Qe);let It={comma(s){return It.split(s,[","],!0)},space(s){let e=[" ",`
|
|
60
|
+
`," "];return It.split(s,e)},split(s,e,t){let r=[],i="",n=!1,a=0,l=!1,o="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===o&&(l=!1):c==='"'||c==="'"?(l=!0,o=c):c==="("?a+=1:c===")"?a>0&&(a-=1):a===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var ga=It;It.default=It;let ya=Be,vd=ga,Ir=class extends ya{get selectors(){return vd.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 gi=Ir;Ir.default=Ir;ya.registerRule(Ir);let xd=pi,Ad=Pr,Id=_r,Ed=Fr,$d=da,Rd=kt,Md=gi;function Et(s,e){if(Array.isArray(s))return s.map(a=>Et(a));let i=s,{inputs:t}=i,r=He(i,["inputs"]);if(t){e=[];for(let a of t){let l=oe(A({},a),{__proto__:Ed.prototype});l.map&&(l.map=oe(A({},l.map),{__proto__:$d.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(a=>Et(a,e))),r.source){let n=r.source,{inputId:a}=n,l=He(n,["inputId"]);r.source=l,a!=null&&(r.source.input=e[a])}if(r.type==="root")return new Rd(r);if(r.type==="decl")return new Id(r);if(r.type==="rule")return new Md(r);if(r.type==="comment")return new Ad(r);if(r.type==="atrule")return new xd(r);throw new Error("Unknown node type: "+s.type)}var Od=Et;Et.default=Et;let{dirname:dr,relative:ba,resolve:wa,sep:Sa}=me,{SourceMapConsumer:Ca,SourceMapGenerator:fr}=me,{pathToFileURL:vn}=me,Nd=Fr,Td=!!(Ca&&fr),kd=!!(dr&&wa&&ba&&Sa),Dd=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=`
|
|
61
61
|
`;this.css.includes(`\r
|
|
62
62
|
`)&&(t=`\r
|
|
63
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||
|
|
64
|
-
`),t=l.length-n):t+=l.length,o&&u!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.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?
|
|
65
|
-
`.charCodeAt(0),at=" ".charCodeAt(0),Yt="\f".charCodeAt(0),Zt=" ".charCodeAt(0),Jt="\r".charCodeAt(0),$d="[".charCodeAt(0),Rd="]".charCodeAt(0),Md="(".charCodeAt(0),Od=")".charCodeAt(0),Nd="{".charCodeAt(0),Td="}".charCodeAt(0),kd=";".charCodeAt(0),Dd="*".charCodeAt(0),Ld=":".charCodeAt(0),Pd="@".charCodeAt(0),Xt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Kt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_d=/.[\r\n"'(/\\]/,wn=/[\da-f]/i;var Fd=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,u,c,h,d,p,m,g=r.length,f=0,b=[],v=[];function S(){return f}function y($){throw e.error("Unclosed "+$,f)}function C(){return v.length===0&&f>=g}function x($){if(v.length)return v.pop();if(f>=g)return;let _=$?$.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Gt:case at:case Zt:case Jt:case Yt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===at||n===Gt||n===Zt||n===Jt||n===Yt);c=["space",r.slice(f,o)],f=o-1;break}case $d:case Rd:case Nd:case Td:case Ld:case kd:case Od:{let F=String.fromCharCode(n);c=[F,F,f];break}case Md:{if(m=b.length?b.pop()[1]:"",p=r.charCodeAt(f+1),m==="url"&&p!==qr&&p!==yn&&p!==at&&p!==Gt&&p!==Zt&&p!==Yt&&p!==Jt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||_){o=f;break}else y("bracket");for(d=o;r.charCodeAt(d-1)===jt;)d-=1,h=!h}while(h);c=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||_d.test(a)?c=["(","(",f]:(c=["brackets",a,f,o],f=o);break}case qr:case yn:{u=n===qr?"'":'"',o=f;do{if(h=!1,o=r.indexOf(u,o+1),o===-1)if(i||_){o=f+1;break}else y("string");for(d=o;r.charCodeAt(d-1)===jt;)d-=1,h=!h}while(h);c=["string",r.slice(f,o+1),f,o],f=o;break}case Pd:{Xt.lastIndex=f+1,Xt.test(r),Xt.lastIndex===0?o=r.length-1:o=Xt.lastIndex-2,c=["at-word",r.slice(f,o+1),f,o],f=o;break}case jt:{for(o=f,l=!0;r.charCodeAt(o+1)===jt;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==bn&&n!==at&&n!==Gt&&n!==Zt&&n!==Jt&&n!==Yt&&(o+=1,wn.test(r.charAt(o)))){for(;wn.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===at&&(o+=1)}c=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===bn&&r.charCodeAt(f+1)===Dd?(o=r.indexOf("*/",f+2)+1,o===0&&(i||_?o=r.length:y("comment")),c=["comment",r.slice(f,o+1),f,o],f=o):(Kt.lastIndex=f+1,Kt.test(r),Kt.lastIndex===0?o=r.length-1:o=Kt.lastIndex-2,c=["word",r.slice(f,o+1),f,o],b.push(c),f=o);break}}return f++,c}function E($){v.push($)}return{back:E,endOfFile:C,nextToken:x,position:S}};let zd=ci,Bd=Or,Wd=Nr,Hd=Rt,Sn=hi,Ud=Fd;const Cn={empty:!0,space:!0};function Vd(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let jd=class{constructor(e){this.input=e,this.root=new Hd,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 zd;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.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(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.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[a,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 a}r=i}return!1}comment(e){let t=new Bd;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=Ud(this.input)}decl(e,t){let r=new Wd;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]||Vd(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 u=e[0][0];if(u===":"||u==="space"||u==="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 a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let d=u;d>0;d--){let p=c[d][0];if(h.trim().startsWith("!")&&p!=="space")break;h=c.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=a.map(u=>u[1]).join(""),a=[]),this.raw(r,"value",a.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 Sn;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,a=[],l=e[1].startsWith("--"),o=[],u=e;for(;u;){if(r=u[0],o.push(u),r==="("||r==="[")n||(n=u),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(u=o[o.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}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,a,l=r.length,o="",u=!0,c,h;for(let d=0;d<l;d+=1)n=r[d],a=n[0],a==="space"&&d===l-1&&!i?u=!1:a==="comment"?(h=r[d-1]?r[d-1][0]:"empty",c=r[d+1]?r[d+1][0]:"empty",!Cn[h]&&!Cn[c]?o.slice(-1)===","?u=!1:o+=n[1]:u=!1):o+=n[1];if(!u){let d=r.reduce((p,m)=>p+m[1],"");e.raws[t]={raw:d,value:o}}e[t]=o}rule(e){e.pop();let t=new Sn;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 Gd=jd;let Yd=ze,Zd=Tr,Jd=Gd;function Sr(s,e){let t=new Zd(s,e),r=new Jd(t);try{r.parse()}catch(i){throw i}return r.root}var di=Sr;Sr.default=Sr;Yd.registerParse(Sr);let Ds=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 ga=Ds;Ds.default=Ds;let Xd=ga,Ls=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 Xd(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var fi=Ls;Ls.default=Ls;let Kd=ze,qd=ui,Qd=ma,ef=di,vn=fi,tf=Rt,rf=Rr,{isClean:ye,my:sf}=$t;const nf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},of={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},af={Once:!0,postcssPlugin:!0,prepare:!0},Qe=0;function lt(s){return typeof s=="object"&&typeof s.then=="function"}function ya(s){let e=!1,t=nf[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Qe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Qe,t+"Exit"]:[t,t+"Exit"]}function xn(s){let e;return s.type==="document"?e=["Document",Qe,"DocumentExit"]:s.type==="root"?e=["Root",Qe,"RootExit"]:e=ya(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Ps(s){return s[ye]=!1,s.nodes&&s.nodes.forEach(e=>Ps(e)),s}let _s={},et=class ba{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=Ps(t);else if(t instanceof ba||t instanceof vn)i=Ps(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=ef;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[sf]&&Kd.rebuild(i)}this.result=new vn(e,i,r),this.helpers=ie(A({},_s),{postcss:_s,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?A(A({},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(!of[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!af[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(lt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ye];){e[ye]=!0;let t=[xn(e)];for(;t.length>0;){let r=this.visitTick(t);if(lt(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 lt(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=rf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Qd(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(lt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ye];)e[ye]=!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(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(lt(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[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[ye]){l[ye]=!0,e.push(xn(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===Qe){r.nodes&&r.nodes.length&&(r[ye]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[ye]=!0;let t=ya(e);for(let r of t)if(r===Qe)e.nodes&&e.each(i=>{i[ye]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};et.registerPostcss=s=>{_s=s};var wa=et;et.default=et;tf.registerLazyResult(et);qd.registerLazyResult(et);let lf=ma,cf=di;const uf=fi;let hf=Rr;let Fs=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=cf;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=hf;this.result=new uf(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new lf(n,i,this._opts,t);if(l.isMap()){let[o,u]=l.generate();o&&(this.result.css=o),u&&(this.result.map=u)}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 df=Fs;Fs.default=Fs;let ff=ui,pf=wa,mf=df,gf=Rt,vt=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 mf(this,e,t):new pf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var yf=vt;vt.default=vt;gf.registerProcessor(vt);ff.registerProcessor(vt);let Sa=ci,Ca=Or,bf=ze,wf=oi,va=Nr,xa=ui,Sf=vd,Cf=Tr,vf=wa,xf=ca,Af=Mr,If=di,pi=yf,Ef=fi,Aa=Rt,Ia=hi,$f=Rr,Rf=ga;function W(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new pi(s)}W.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
63
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||dr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Ca(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(),kd&&Td&&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=fr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new fr({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 fr({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,a;this.stringify(this.root,(l,o,u)=>{if(this.css+=l,o&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),a=l.match(/\n/g),a?(e+=a.length,n=l.lastIndexOf(`
|
|
64
|
+
`),t=l.length-n):t+=l.length,o&&u!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.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?dr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=dr(wa(r,this.mapOpts.annotation)));let i=ba(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 Nd(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(vn){let r=vn(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;Sa==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var va=Dd;const ss="'".charCodeAt(0),xn='"'.charCodeAt(0),Kt="\\".charCodeAt(0),An="/".charCodeAt(0),qt=`
|
|
65
|
+
`.charCodeAt(0),dt=" ".charCodeAt(0),Qt="\f".charCodeAt(0),er=" ".charCodeAt(0),tr="\r".charCodeAt(0),Ld="[".charCodeAt(0),Pd="]".charCodeAt(0),_d="(".charCodeAt(0),Fd=")".charCodeAt(0),zd="{".charCodeAt(0),Bd="}".charCodeAt(0),Wd=";".charCodeAt(0),Hd="*".charCodeAt(0),Ud=":".charCodeAt(0),Vd="@".charCodeAt(0),rr=/[\t\n\f\r "#'()/;[\\\]{}]/g,sr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,jd=/.[\r\n"'(/\\]/,In=/[\da-f]/i;var Gd=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,u,c,h,d,p,m,g=r.length,f=0,b=[],C=[];function v(){return f}function y($){throw e.error("Unclosed "+$,f)}function S(){return C.length===0&&f>=g}function x($){if(C.length)return C.pop();if(f>=g)return;let L=$?$.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case qt:case dt:case er:case tr:case Qt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===dt||n===qt||n===er||n===tr||n===Qt);c=["space",r.slice(f,o)],f=o-1;break}case Ld:case Pd:case zd:case Bd:case Ud:case Wd:case Fd:{let F=String.fromCharCode(n);c=[F,F,f];break}case _d:{if(m=b.length?b.pop()[1]:"",p=r.charCodeAt(f+1),m==="url"&&p!==ss&&p!==xn&&p!==dt&&p!==qt&&p!==er&&p!==Qt&&p!==tr){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||L){o=f;break}else y("bracket");for(d=o;r.charCodeAt(d-1)===Kt;)d-=1,h=!h}while(h);c=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||jd.test(a)?c=["(","(",f]:(c=["brackets",a,f,o],f=o);break}case ss:case xn:{u=n===ss?"'":'"',o=f;do{if(h=!1,o=r.indexOf(u,o+1),o===-1)if(i||L){o=f+1;break}else y("string");for(d=o;r.charCodeAt(d-1)===Kt;)d-=1,h=!h}while(h);c=["string",r.slice(f,o+1),f,o],f=o;break}case Vd:{rr.lastIndex=f+1,rr.test(r),rr.lastIndex===0?o=r.length-1:o=rr.lastIndex-2,c=["at-word",r.slice(f,o+1),f,o],f=o;break}case Kt:{for(o=f,l=!0;r.charCodeAt(o+1)===Kt;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==An&&n!==dt&&n!==qt&&n!==er&&n!==tr&&n!==Qt&&(o+=1,In.test(r.charAt(o)))){for(;In.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===dt&&(o+=1)}c=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===An&&r.charCodeAt(f+1)===Hd?(o=r.indexOf("*/",f+2)+1,o===0&&(i||L?o=r.length:y("comment")),c=["comment",r.slice(f,o+1),f,o],f=o):(sr.lastIndex=f+1,sr.test(r),sr.lastIndex===0?o=r.length-1:o=sr.lastIndex-2,c=["word",r.slice(f,o+1),f,o],b.push(c),f=o);break}}return f++,c}function E($){C.push($)}return{back:E,endOfFile:S,nextToken:x,position:v}};let Yd=pi,Zd=Pr,Jd=_r,Xd=kt,En=gi,Kd=Gd;const $n={empty:!0,space:!0};function qd(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Qd=class{constructor(e){this.input=e,this.root=new Xd,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 Yd;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.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(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.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[a,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 a}r=i}return!1}comment(e){let t=new Zd;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=Kd(this.input)}decl(e,t){let r=new Jd;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]||qd(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 u=e[0][0];if(u===":"||u==="space"||u==="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 a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let d=u;d>0;d--){let p=c[d][0];if(h.trim().startsWith("!")&&p!=="space")break;h=c.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=a.map(u=>u[1]).join(""),a=[]),this.raw(r,"value",a.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 En;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,a=[],l=e[1].startsWith("--"),o=[],u=e;for(;u;){if(r=u[0],o.push(u),r==="("||r==="[")n||(n=u),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(u=o[o.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}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,a,l=r.length,o="",u=!0,c,h;for(let d=0;d<l;d+=1)n=r[d],a=n[0],a==="space"&&d===l-1&&!i?u=!1:a==="comment"?(h=r[d-1]?r[d-1][0]:"empty",c=r[d+1]?r[d+1][0]:"empty",!$n[h]&&!$n[c]?o.slice(-1)===","?u=!1:o+=n[1]:u=!1):o+=n[1];if(!u){let d=r.reduce((p,m)=>p+m[1],"");e.raws[t]={raw:d,value:o}}e[t]=o}rule(e){e.pop();let t=new En;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 ef=Qd;let tf=Be,rf=Fr,sf=ef;function Er(s,e){let t=new rf(s,e),r=new sf(t);try{r.parse()}catch(i){throw i}return r.root}var yi=Er;Er.default=Er;tf.registerParse(Er);let zs=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 xa=zs;zs.default=zs;let nf=xa,Bs=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 nf(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}};var bi=Bs;Bs.default=Bs;let of=Be,af=mi,lf=va,cf=yi,Rn=bi,uf=kt,hf=Dr,{isClean:we,my:df}=Tt;const ff={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},pf={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},mf={Once:!0,postcssPlugin:!0,prepare:!0},et=0;function ft(s){return typeof s=="object"&&typeof s.then=="function"}function Aa(s){let e=!1,t=ff[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,et,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,et,t+"Exit"]:[t,t+"Exit"]}function Mn(s){let e;return s.type==="document"?e=["Document",et,"DocumentExit"]:s.type==="root"?e=["Root",et,"RootExit"]:e=Aa(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Ws(s){return s[we]=!1,s.nodes&&s.nodes.forEach(e=>Ws(e)),s}let Hs={},tt=class Ia{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=Ws(t);else if(t instanceof Ia||t instanceof Rn)i=Ws(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=cf;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[df]&&of.rebuild(i)}this.result=new Rn(e,i,r),this.helpers=oe(A({},Hs),{postcss:Hs,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?A(A({},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(!pf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!mf[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(ft(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[we];){e[we]=!0;let t=[Mn(e)];for(;t.length>0;){let r=this.visitTick(t);if(ft(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 ft(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=hf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new lf(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(ft(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[we];)e[we]=!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(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ft(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[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[we]){l[we]=!0,e.push(Mn(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===et){r.nodes&&r.nodes.length&&(r[we]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[we]=!0;let t=Aa(e);for(let r of t)if(r===et)e.nodes&&e.each(i=>{i[we]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};tt.registerPostcss=s=>{Hs=s};var Ea=tt;tt.default=tt;uf.registerLazyResult(tt);af.registerLazyResult(tt);let gf=va,yf=yi;const bf=bi;let wf=Dr;let Us=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=yf;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=wf;this.result=new bf(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new gf(n,i,this._opts,t);if(l.isMap()){let[o,u]=l.generate();o&&(this.result.css=o),u&&(this.result.map=u)}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 Sf=Us;Us.default=Us;let Cf=mi,vf=Ea,xf=Sf,Af=kt,$t=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 xf(this,e,t):new vf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var If=$t;$t.default=$t;Af.registerProcessor($t);Cf.registerProcessor($t);let $a=pi,Ra=Pr,Ef=Be,$f=hi,Ma=_r,Oa=mi,Rf=Od,Mf=Fr,Of=Ea,Nf=ga,Tf=Lr,kf=yi,wi=If,Df=bi,Na=kt,Ta=gi,Lf=Dr,Pf=xa;function W(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new wi(s)}W.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
66
66
|
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:
|
|
67
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new
|
|
67
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...a);return l.postcssPlugin=e,l.postcssVersion=new wi().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(a,l,o){return W([i(o)]).process(a,l)},i};W.stringify=Lf;W.parse=kf;W.fromJSON=Rf;W.list=Nf;W.comment=s=>new Ra(s);W.atRule=s=>new $a(s);W.decl=s=>new Ma(s);W.rule=s=>new Ta(s);W.root=s=>new Na(s);W.document=s=>new Oa(s);W.CssSyntaxError=$f;W.Declaration=Ma;W.Container=Ef;W.Processor=wi;W.Document=Oa;W.Comment=Ra;W.Warning=Pf;W.AtRule=$a;W.Result=Df;W.Input=Mf;W.Rule=Ta;W.Root=Na;W.Node=Tf;Of.registerPostcss(W);var _f=W;W.default=W;const Y=Jh(_f);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;class Si{constructor(...e){he(this,"parentElement",null),he(this,"parentNode",null),he(this,"ownerDocument"),he(this,"firstChild",null),he(this,"lastChild",null),he(this,"previousSibling",null),he(this,"nextSibling",null),he(this,"ELEMENT_NODE",1),he(this,"TEXT_NODE",3),he(this,"nodeType"),he(this,"nodeName"),he(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof Si){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const On={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Nn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ir={},Ff=()=>!!globalThis.Zone;function Ci(s){if(ir[s])return ir[s];const e=globalThis[s],t=e.prototype,r=s in On?On[s]:void 0,i=!!(r&&r.every(l=>{var o,u;return!!((u=(o=Object.getOwnPropertyDescriptor(t,l))==null?void 0:o.get)!=null&&u.toString().includes("[native code]"))})),n=s in Nn?Nn[s]:void 0,a=!!(n&&n.every(l=>{var o;return typeof t[l]=="function"&&((o=t[l])==null?void 0:o.toString().includes("[native code]"))}));if(i&&a&&!Ff())return ir[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const o=l.contentWindow;if(!o)return e.prototype;const u=o[s].prototype;return document.body.removeChild(l),u?ir[s]=u:t}catch(l){return t}}const is={};function De(s,e,t){var r;const i=`${s}.${String(t)}`;if(is[i])return is[i].call(e);const n=Ci(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(is[i]=a,a.call(e)):e[t]}const ns={};function ka(s,e,t){const r=`${s}.${String(t)}`;if(ns[r])return ns[r].bind(e);const n=Ci(s)[t];return typeof n!="function"?e[t]:(ns[r]=n,n.bind(e))}function zf(s){return De("Node",s,"childNodes")}function Bf(s){return De("Node",s,"parentNode")}function Wf(s){return De("Node",s,"parentElement")}function Hf(s){return De("Node",s,"textContent")}function Uf(s,e){return ka("Node",s,"contains")(e)}function Vf(s){return ka("Node",s,"getRootNode")()}function jf(s){return!s||!("host"in s)?null:De("ShadowRoot",s,"host")}function Gf(s){return s.styleSheets}function Yf(s){return!s||!("shadowRoot"in s)?null:De("Element",s,"shadowRoot")}function Zf(s,e){return De("Element",s,"querySelector")(e)}function Jf(s,e){return De("Element",s,"querySelectorAll")(e)}function Da(){return Ci("MutationObserver").constructor}function $e(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 Xf(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 Kf(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,a=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<a&&i.left<n,o=(t=r.getComputedStyle)==null?void 0:t.call(r,s),c=!!o&&o.display!=="none"&&o.visibility!=="hidden"&&(parseFloat(o.opacity)||0)>0&&l;let h=0;if(c){const p=Math.max(0,Math.min(i.right,n)-Math.max(i.left,0)),m=Math.max(0,Math.min(i.bottom,a)-Math.max(i.top,0)),g=p*m,f=i.width*i.height;h=f>0?g/f:0}return{isVisible:c,ratio:h}}const N={childNodes:zf,parentNode:Bf,parentElement:Wf,textContent:Hf,contains:Uf,getRootNode:Vf,host:jf,styleSheets:Gf,shadowRoot:Yf,querySelector:Zf,querySelectorAll:Jf,mutationObserver:Da,patch:$e,describeNode:Xf,getElementVisibility:Kf};function ee(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const Ve=`Please stop import mirror directly. Instead of that,\r
|
|
68
68
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
69
|
-
or you can use record.mirror to access the mirror instance during recording.`;let En={map:{},getId(){return console.error(Ue),-1},getNode(){return console.error(Ue),null},removeNodeFromMap(){console.error(Ue)},has(){return console.error(Ue),!1},reset(){console.error(Ue)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(En=new Proxy(En,{get(s,e,t){return e==="map"&&console.error(Ue),Reflect.get(s,e,t)}}));function xt(s,e,t={}){let r=null,i=0;return function(...n){const a=Date.now();!i&&t.leading===!1&&(i=a);const l=e-(a-i),o=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=a,s.apply(o,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(o,n)},l))}}function kr(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(a){setTimeout(()=>{t.set.call(this,a)},0),n&&n.set&&n.set.call(this,a)}}),()=>kr(s,e,n||{},!0)}function de(){return Math.round(performance.timeOrigin+performance.now())}function Ra(s=window){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=O.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=O.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function Ma(s=window){const e=s.document;return s.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function Oa(s=window){const e=s.document;return s.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function yi(s){return s?s.nodeType===s.ELEMENT_NODE?s:O.parentElement(s):null}function re(s,e,t,r){if(!s)return!1;const i=yi(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(dr(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Vf(s,e){return e.getId(s)!==-1}function ts(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===pt}function Na(s,e){if(ut(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=O.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Na(r,e):!0}function zs(s){return!!s.changedTouches}function jf(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Ta(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function ka(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Bs(s){return s?s instanceof mi&&"shadowRoot"in s?!!s.shadowRoot:!!O.shadowRoot(s):!1}class Gf{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Da(s){var e;let t=null;return"getRootNode"in s&&((e=O.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&O.host(O.getRootNode(s))&&(t=O.host(O.getRootNode(s))),t}function Yf(s){let e=s,t;for(;t=Da(e);)e=t;return e}function Zf(s){const e=s.ownerDocument;if(!e)return!1;const t=Yf(s);return O.contains(e,t)}function La(s){const e=s.ownerDocument;return e?O.contains(e,s)||Zf(s):!1}var L=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(L||{}),k=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s[s.Visibility=17]="Visibility",s))(k||{}),ne=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(ne||{}),Ce=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(Ce||{}),tt=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(tt||{}),Ve=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Ve||{}),Pa=(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))(Pa||{});const Qt={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},be={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},Jf={MIN_CONFIDENCE_FOR_SKIP:.7},$n=["form","main","nav","section","article","footer","header"],Rn=["form","navigation","main","region","contentinfo","complementary","banner","search"],Xf=["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"],Me={"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},_a=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),Kf={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function At(s){return!!(/^[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)||/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(s)&&(/\d/.test(s)||/[A-Z]/.test(s))||/^radix-/.test(s)||/^mui-\d+$/.test(s))}const Fa=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function za(s){return s.trim().split(/\s+/).some(e=>At(e))}class qf{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}findAnchor(e){if(this.cache){const o=this.cache.getAnchor(e);if(o!==void 0)return o}const t=e.tagName.toLowerCase(),r=e.ownerDocument;if(t==="html"){const o={element:e,score:1,tier:"A",depth:0};return this.cacheResult(e,o),o}if(t==="head"||this.isInsideHead(e)){const o=r==null?void 0:r.documentElement;if(o){const u={element:o,score:1,tier:"A",depth:0};return this.cacheResult(e,u),u}}if(t==="body"){const o=r==null?void 0:r.documentElement;if(o){const u={element:o,score:1,tier:"A",depth:0};return this.cacheResult(e,u),u}}let i=e.parentElement,n=0,a=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return a||{element:i,score:be.DEGRADED_SCORE,tier:"C",depth:n};const o=this.scoreAnchor(i);if(o>0){const u=this.applyDepthPenalty(o,n),c=this.getTier(i),h={element:i,score:u,tier:c,depth:n};if(c==="A")return h;(!a||u>a.score)&&(a=h)}i=i.parentElement,n++}const l=a;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const r=e.tagName.toLowerCase();$n.includes(r)&&(t+=be.SEMANTIC_TAG);const i=e.getAttribute("role");i&&Rn.includes(i)&&(t+=be.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=be.ARIA_LABEL);const n=e.id;return n&&!At(n)&&(t+=be.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=be.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=be.DEPTH_PENALTY_THRESHOLD)return e;const r=(t-be.DEPTH_PENALTY_THRESHOLD)*be.DEPTH_PENALTY_FACTOR;return Math.max(0,e-r)}getTier(e){const t=e.tagName.toLowerCase();if($n.includes(t))return"A";const r=e.getAttribute("role");return r&&Rn.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 Qf=[/^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,}/],ep=[/^\[/,/^(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)?:/,/\/([\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 bi(s){return Qf.some(e=>e.test(s))}function wi(s){return s.length<=2||/^\d/.test(s)?!0:ep.some(e=>e.test(s))}function tp(s){return!bi(s)&&!wi(s)}function rp(s){return s.filter(e=>tp(e))}function sp(s){const e=[],t=[];for(const r of s)wi(r)||bi(r)?t.push(r):e.push(r);return{semantic:e,utility:t}}function Mn(s){return wi(s)||bi(s)}const On=s=>s.replace(/([#:.[\]@])/g,"\\$1");class ip{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 a=[];let l=t.parentElement;for(;l&&l!==e&&a.length<this.maxDepth;)a.unshift(l),l=l.parentElement;const o=a.length>=this.maxDepth&&l!==e;if(!o&&l!==e)return console.warn("[PathBuilder] Target is not a descendant of anchor"),{path:[],degraded:!0,degradationReason:"target-not-descendant-of-anchor"};let u=this.filterNoise(a);return u=this.ensureUniqueness(a,u,e,t,r),{path:u.map(c=>{const h=c.parentElement;let d;if(h){const p=Array.from(h.children).indexOf(c);p!==-1&&(d=p+1)}return{tag:c.tagName.toLowerCase(),semantics:r.extract(c),score:r.scoreElement(c),nthChild:d}}),degraded:o,degradationReason:o?"path-depth-overflow":void 0}}buildPathNodes(e,t,r){return this.buildPath(e,t,r).path}ensureUniqueness(e,t,r,i,n){const a=this.buildTestSelector(r,t,i);try{const l=i.ownerDocument;if(!l)return t;let o;if(this.cache){const c=this.cache.getSelectorResults(a);c!==void 0?o=c:(o=Array.from(l.querySelectorAll(a)),this.cache.setSelectorResults(a,o))}else o=l.querySelectorAll(a);if(o.length<=1)return t;const u=e.filter(c=>!t.includes(c));for(const c of u){if(n.scoreElement(c)<Jf.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,c,e),d=this.buildTestSelector(r,h,i);try{let p;if(this.cache){const m=this.cache.getSelectorResults(d);m!==void 0?p=m:(p=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,p))}else p=l.querySelectorAll(d);if(p.length===1)return h;p.length<o.length&&(t=h)}catch(p){}}return t}catch(l){return t}}insertNodeInOrder(e,t,r){const i=r.indexOf(t),n=[...e];let a=0;for(let l=0;l<n.length&&!(r.indexOf(n[l])>i);l++)a=l+1;return n.splice(a,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&&!At(e.id)&&(t+=`#${On(e.id)}`);for(const r of Array.from(e.classList))Mn(r)||(t+=`.${On(r)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return Xf.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(!Mn(r))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!At(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(a=>a.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(a=>{const l=a.parentElement;let o;if(l){const u=Array.from(l.children).indexOf(a);u!==-1&&(o=u+1)}return{tag:a.tagName.toLowerCase(),semantics:r.extract(a),score:r.scoreElement(a),nthChild:o}}),degraded:!1}}}function np(s){return s?s.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const op={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function ap(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 lp(s,e){if(!s)return s;const t=s.startsWith("http://")||s.startsWith("https://"),[r,i]=s.split("#"),[n,a]=r.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&a&&(l+=`?${a}`),i&&(e.removeDynamicHashes&&ap(i)||(l+=`#${i}`)),l}function Ba(s,e,t={}){if(!e)return e;const r=A(A({},op),t);return s==="href"||s==="src"?lp(e,r):e}const cp=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],up=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],hp=["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"],dp=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],fp=["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"],pp=["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"],mp=["data-category","data-action","data-label","data-value"],gp=["id","name","type","placeholder","title","for","alt","href"],yp=["disabled","checked","selected","hidden","readonly","required","value"],bp=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function wp(s,e){return cp.includes(s)?!0:up.includes(s)||hp.includes(s)||dp.some(t=>s.startsWith(t))?!1:fp.includes(s)?!0:pp.some(t=>s.startsWith(t))||mp.includes(s)?!1:s.startsWith("data-")&&s.endsWith("-id")?!0:s==="id"?!bp.some(t=>t.test(e)):gp.includes(s)?!0:yp.includes(s)?!1:!!s.startsWith("data-")}class Nn{constructor(e,t){var r;this.includeUtilityClasses=(r=e.includeUtilityClasses)!=null?r:!1,this.cache=t}extract(e){if(this.cache){const a=this.cache.getSemantics(e);if(a!==void 0)return a}const t={},r=e.id;if(r&&!At(r)&&(t.id=r),e.classList.length>0){const a=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=a;else{const{semantic:l}=sp(a);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 a=this.extractText(e);a&&(t.text=a)}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!!(_a.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 Me[e]!==void 0?Me[e]:e.startsWith("data-")?Me["data-*"]:e.startsWith("aria-")?Me["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)||!wp(i,r.value)||Fa.has(i)&&za(r.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?Ba(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=np(t);if(!r)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,a=r.length>i?r.slice(0,i)+"...":r;return{raw:n,normalized:a}}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 Sp{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 a=e.querySelector("title");return a!=null&&a.textContent&&(i.titleText=a.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,a,l,o,u,c,h,d;const r=[];switch(t){case"circle":r.push(`r=${(i=e.getAttribute("r"))!=null?i:"0"}`);break;case"rect":{const p=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),m=parseFloat((a=e.getAttribute("height"))!=null?a:"0");p>0&&m>0&&r.push(`ratio=${(p/m).toFixed(2)}`)}break;case"ellipse":{const p=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),m=parseFloat((o=e.getAttribute("ry"))!=null?o:"0");p>0&&m>0&&r.push(`ratio=${(p/m).toFixed(2)}`)}break;case"line":{const p=parseFloat((u=e.getAttribute("x1"))!=null?u:"0"),m=parseFloat((c=e.getAttribute("y1"))!=null?c:"0"),g=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),f=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),b=Math.atan2(f-m,g-p);r.push(`angle=${b.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 Cp(s,e=0){const t=s.anchor.score,r=s.path.length>0?s.path.reduce((l,o)=>l+o.score,0)/s.path.length:.5,i=s.target.score,n=t*Qt.ANCHOR+r*Qt.PATH+i*Qt.TARGET+e*Qt.UNIQUENESS,a=s.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-a))}class vp{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 xp{constructor(e={}){var t,r;this.eidCache=new WeakMap,this.selectorResultCache=new vp((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 ie(A({},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 Ap(s){return new xp(s)}let rs=null;function Ip(){return rs||(rs=Ap()),rs}function Tn(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:
|
|
69
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Tn={map:{},getId(){return console.error(Ve),-1},getNode(){return console.error(Ve),null},removeNodeFromMap(){console.error(Ve)},has(){return console.error(Ve),!1},reset(){console.error(Ve)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Tn=new Proxy(Tn,{get(s,e,t){return e==="map"&&console.error(Ve),Reflect.get(s,e,t)}}));function Rt(s,e,t={}){let r=null,i=0;return function(...n){const a=Date.now();!i&&t.leading===!1&&(i=a);const l=e-(a-i),o=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=a,s.apply(o,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(o,n)},l))}}function zr(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(a){setTimeout(()=>{t.set.call(this,a)},0),n&&n.set&&n.set.call(this,a)}}),()=>zr(s,e,n||{},!0)}function re(){return Math.round(performance.timeOrigin+performance.now())}function La(s=window){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=N.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=N.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function Pa(s=window){const e=s.document;return s.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function _a(s=window){const e=s.document;return s.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function vi(s){return s?s.nodeType===s.ELEMENT_NODE?s:N.parentElement(s):null}function se(s,e,t,r){if(!s)return!1;const i=vi(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(br(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function qf(s,e){return e.getId(s)!==-1}function os(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===wt}function Fa(s,e){if(mt(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=N.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Fa(r,e):!0}function Vs(s){return!!s.changedTouches}function Qf(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function za(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Ba(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function js(s){return s?s instanceof Si&&"shadowRoot"in s?!!s.shadowRoot:!!N.shadowRoot(s):!1}class ep{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Wa(s){var e;let t=null;return"getRootNode"in s&&((e=N.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&N.host(N.getRootNode(s))&&(t=N.host(N.getRootNode(s))),t}function tp(s){let e=s,t;for(;t=Wa(e);)e=t;return e}function rp(s){const e=s.ownerDocument;if(!e)return!1;const t=tp(s);return N.contains(e,t)}function Ha(s){const e=s.ownerDocument;return e?N.contains(e,s)||rp(s):!1}var _=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(_||{}),T=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s[s.Visibility=17]="Visibility",s))(T||{}),ae=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(ae||{}),Ae=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(Ae||{}),rt=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(rt||{}),je=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(je||{}),Ua=(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))(Ua||{});const nr={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},Se={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},sp={MIN_CONFIDENCE_FOR_SKIP:.7},kn=["form","main","nav","section","article","footer","header"],Dn=["form","navigation","main","region","contentinfo","complementary","banner","search"],ip=["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"],Te={"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},Va=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),np={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function Mt(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 ja=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function Ga(s){return s.trim().split(/\s+/).some(e=>Mt(e))}class op{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}findAnchor(e){if(this.cache){const o=this.cache.getAnchor(e);if(o!==void 0)return o}const t=e.tagName.toLowerCase(),r=e.ownerDocument;if(t==="html"){const o={element:e,score:1,tier:"A",depth:0};return this.cacheResult(e,o),o}if(t==="head"||this.isInsideHead(e)){const o=r==null?void 0:r.documentElement;if(o){const u={element:o,score:1,tier:"A",depth:0};return this.cacheResult(e,u),u}}if(t==="body"){const o=r==null?void 0:r.documentElement;if(o){const u={element:o,score:1,tier:"A",depth:0};return this.cacheResult(e,u),u}}let i=e.parentElement,n=0,a=null;for(;i&&n<this.maxDepth;){if(i.tagName.toLowerCase()==="body")return a||{element:i,score:Se.DEGRADED_SCORE,tier:"C",depth:n};const o=this.scoreAnchor(i);if(o>0){const u=this.applyDepthPenalty(o,n),c=this.getTier(i),h={element:i,score:u,tier:c,depth:n};if(c==="A")return h;(!a||u>a.score)&&(a=h)}i=i.parentElement,n++}const l=a;return this.cache&&this.cache.setAnchor(e,l),l}scoreAnchor(e){let t=0;const r=e.tagName.toLowerCase();kn.includes(r)&&(t+=Se.SEMANTIC_TAG);const i=e.getAttribute("role");i&&Dn.includes(i)&&(t+=Se.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=Se.ARIA_LABEL);const n=e.id;return n&&!Mt(n)&&(t+=Se.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=Se.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=Se.DEPTH_PENALTY_THRESHOLD)return e;const r=(t-Se.DEPTH_PENALTY_THRESHOLD)*Se.DEPTH_PENALTY_FACTOR;return Math.max(0,e-r)}getTier(e){const t=e.tagName.toLowerCase();if(kn.includes(t))return"A";const r=e.getAttribute("role");return r&&Dn.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 ap=[/^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,}/],lp=[/^\[/,/^(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 xi(s){return ap.some(e=>e.test(s))}function Ai(s){return s.length<=2||/^\d/.test(s)?!0:lp.some(e=>e.test(s))}function cp(s){return!xi(s)&&!Ai(s)}function up(s){return s.filter(e=>cp(e))}function hp(s){const e=[],t=[];for(const r of s)Ai(r)||xi(r)?t.push(r):e.push(r);return{semantic:e,utility:t}}function Ln(s){return Ai(s)||xi(s)}const Pn=s=>s.replace(/([#:.[\]@])/g,"\\$1");class dp{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 a=[];let l=t.parentElement;for(;l&&l!==e&&a.length<this.maxDepth;)a.unshift(l),l=l.parentElement;const o=a.length>=this.maxDepth&&l!==e;if(!o&&l!==e)return console.warn("[PathBuilder] Target is not a descendant of anchor"),{path:[],degraded:!0,degradationReason:"target-not-descendant-of-anchor"};let u=this.filterNoise(a);return u=this.ensureUniqueness(a,u,e,t,r),{path:u.map(c=>{const h=c.parentElement;let d;if(h){const p=Array.from(h.children).indexOf(c);p!==-1&&(d=p+1)}return{tag:c.tagName.toLowerCase(),semantics:r.extract(c),score:r.scoreElement(c),nthChild:d}}),degraded:o,degradationReason:o?"path-depth-overflow":void 0}}buildPathNodes(e,t,r){return this.buildPath(e,t,r).path}ensureUniqueness(e,t,r,i,n){const a=this.buildTestSelector(r,t,i);try{const l=i.ownerDocument;if(!l)return t;let o;if(this.cache){const c=this.cache.getSelectorResults(a);c!==void 0?o=c:(o=Array.from(l.querySelectorAll(a)),this.cache.setSelectorResults(a,o))}else o=l.querySelectorAll(a);if(o.length<=1)return t;const u=e.filter(c=>!t.includes(c));for(const c of u){if(n.scoreElement(c)<sp.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,c,e),d=this.buildTestSelector(r,h,i);try{let p;if(this.cache){const m=this.cache.getSelectorResults(d);m!==void 0?p=m:(p=Array.from(l.querySelectorAll(d)),this.cache.setSelectorResults(d,p))}else p=l.querySelectorAll(d);if(p.length===1)return h;p.length<o.length&&(t=h)}catch(p){}}return t}catch(l){return t}}insertNodeInOrder(e,t,r){const i=r.indexOf(t),n=[...e];let a=0;for(let l=0;l<n.length&&!(r.indexOf(n[l])>i);l++)a=l+1;return n.splice(a,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&&!Mt(e.id)&&(t+=`#${Pn(e.id)}`);for(const r of Array.from(e.classList))Ln(r)||(t+=`.${Pn(r)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return ip.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(!Ln(r))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!Mt(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(a=>a.tagName.toLowerCase()==="head")===-1?{path:[],degraded:!0,degradationReason:"head-not-found-in-path"}:{path:i.map(a=>{const l=a.parentElement;let o;if(l){const u=Array.from(l.children).indexOf(a);u!==-1&&(o=u+1)}return{tag:a.tagName.toLowerCase(),semantics:r.extract(a),score:r.scoreElement(a),nthChild:o}}),degraded:!1}}}function fp(s){return s?s.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const pp={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function mp(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 gp(s,e){if(!s)return s;const t=s.startsWith("http://")||s.startsWith("https://"),[r,i]=s.split("#"),[n,a]=r.split("?");let l=n;return t&&e.preserveQueryForAbsolute&&a&&(l+=`?${a}`),i&&(e.removeDynamicHashes&&mp(i)||(l+=`#${i}`)),l}function Ya(s,e,t={}){if(!e)return e;const r=A(A({},pp),t);return s==="href"||s==="src"?gp(e,r):e}const yp=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],bp=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],wp=["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"],Sp=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],Cp=["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"],vp=["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"],xp=["data-category","data-action","data-label","data-value"],Ap=["id","name","type","placeholder","title","for","alt","href"],Ip=["disabled","checked","selected","hidden","readonly","required","value"],Ep=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function $p(s,e){return yp.includes(s)?!0:bp.includes(s)||wp.includes(s)||Sp.some(t=>s.startsWith(t))?!1:Cp.includes(s)?!0:vp.some(t=>s.startsWith(t))||xp.includes(s)?!1:s.startsWith("data-")&&s.endsWith("-id")?!0:s==="id"?!Ep.some(t=>t.test(e)):Ap.includes(s)?!0:Ip.includes(s)?!1:!!s.startsWith("data-")}class _n{constructor(e,t){var r;this.includeUtilityClasses=(r=e.includeUtilityClasses)!=null?r:!1,this.cache=t}extract(e){if(this.cache){const a=this.cache.getSemantics(e);if(a!==void 0)return a}const t={},r=e.id;if(r&&!Mt(r)&&(t.id=r),e.classList.length>0){const a=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=a;else{const{semantic:l}=hp(a);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 a=this.extractText(e);a&&(t.text=a)}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!!(Va.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 Te[e]!==void 0?Te[e]:e.startsWith("data-")?Te["data-*"]:e.startsWith("aria-")?Te["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)||!$p(i,r.value)||ja.has(i)&&Ga(r.value)||this.getAttributePriority(i)===0)continue;const n=i==="href"||i==="src"?Ya(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=fp(t);if(!r)return null;const i=100,n=t.length>i?t.slice(0,i)+"...":t,a=r.length>i?r.slice(0,i)+"...":r;return{raw:n,normalized:a}}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 Rp{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 a=e.querySelector("title");return a!=null&&a.textContent&&(i.titleText=a.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,a,l,o,u,c,h,d;const r=[];switch(t){case"circle":r.push(`r=${(i=e.getAttribute("r"))!=null?i:"0"}`);break;case"rect":{const p=parseFloat((n=e.getAttribute("width"))!=null?n:"0"),m=parseFloat((a=e.getAttribute("height"))!=null?a:"0");p>0&&m>0&&r.push(`ratio=${(p/m).toFixed(2)}`)}break;case"ellipse":{const p=parseFloat((l=e.getAttribute("rx"))!=null?l:"0"),m=parseFloat((o=e.getAttribute("ry"))!=null?o:"0");p>0&&m>0&&r.push(`ratio=${(p/m).toFixed(2)}`)}break;case"line":{const p=parseFloat((u=e.getAttribute("x1"))!=null?u:"0"),m=parseFloat((c=e.getAttribute("y1"))!=null?c:"0"),g=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),f=parseFloat((d=e.getAttribute("y2"))!=null?d:"0"),b=Math.atan2(f-m,g-p);r.push(`angle=${b.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 Mp(s,e=0){const t=s.anchor.score,r=s.path.length>0?s.path.reduce((l,o)=>l+o.score,0)/s.path.length:.5,i=s.target.score,n=t*nr.ANCHOR+r*nr.PATH+i*nr.TARGET+e*nr.UNIQUENESS,a=s.anchor.degraded?.2:0;return Math.max(0,Math.min(1,n-a))}class Op{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 Np{constructor(e={}){var t,r;this.eidCache=new WeakMap,this.selectorResultCache=new Op((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 oe(A({},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 Tp(s){return new Np(s)}let as=null;function kp(){return as||(as=Tp()),as}function Fn(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:
|
|
70
70
|
1. The element is detached from the DOM
|
|
71
71
|
2. The element was created but never attached
|
|
72
|
-
3. You are working with a document node instead of an element`)}function
|
|
72
|
+
3. You are working with a document node instead of an element`)}function Dp(s,e){if(!e)return;const t=Fn(s),r=e instanceof Document?e:Fn(e);if(t!==r)throw new Error(`Cross-document operation detected: element and root are from different documents.
|
|
73
73
|
Common causes:
|
|
74
74
|
1. Working with iframe: pass iframe.contentDocument as root parameter
|
|
75
75
|
2. Element from one iframe, root from another
|
|
76
76
|
3. Element from main document, root from iframe (or vice versa)
|
|
77
77
|
|
|
78
|
-
Solution: Ensure element and root parameter are from the same document context.`)}function $p(s,e={}){var U,Z,J,I;var t;if(!s||!s.ownerDocument||!s.isConnected)return null;const r=A(A({},Kf),e);if(r.root)try{Ep(s,r.root)}catch(P){return console.error("Cross-document generation detected:",P),null}const i=(U=r.cache)!=null?U:Ip(),n=i.getEID(s);if(n!==void 0)return n;if(s.tagName.toLowerCase()==="html"){const P=new Nn(r,i),te=Op(s,r,P);return i.setEID(s,te),te}const a=new qf(r,i),l=new ip(r,i),o=new Nn(r,i),u=new Sp,c=a.findAnchor(s);if(!c&&!r.fallbackToBody)return null;const h=(J=(Z=c==null?void 0:c.element)!=null?Z:(t=s.ownerDocument)==null?void 0:t.body)!=null?J:null;if(!h)return null;const d=!c||c.tier==="C",p=h.tagName.toLowerCase(),m=h.parentElement;let g;if(m&&p!=="body"&&p!=="html"){const P=Array.from(m.children).indexOf(h);P!==-1&&(g=P+1)}const f=o.extract(h),b={tag:h.tagName.toLowerCase(),semantics:f,score:(I=c==null?void 0:c.score)!=null?I:be.DEGRADED_SCORE,degraded:d,nthChild:g},v=l.buildPath(h,s,o),S=o.extract(s);r.enableSvgFingerprint&&Rp(s)&&(S.svg=u.fingerprint(s));const y=s.parentElement;let C;if(y){const P=Array.from(y.children).indexOf(s);P!==-1&&(C=P+1)}const x={tag:s.tagName.toLowerCase(),semantics:S,score:o.scoreElement(s),nthChild:C},E=[],$={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},_=b.degraded||v.degraded,F=Mp(b.degraded,v),T={version:"1.0",anchor:b,path:v.path,target:x,constraints:E,fallback:$,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:r.source,degraded:_,degradationReason:F}};return T.meta.confidence=Cp(T),T.meta.confidence<r.confidenceThreshold?null:(i.setEID(s,T),T)}function Rp(s){return s.namespaceURI==="http://www.w3.org/2000/svg"||s.tagName.toLowerCase()==="svg"||s instanceof SVGElement}function Mp(s,e){if(s&&e.degraded)return"anchor-and-path-degraded";if(s)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function Op(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 Wa={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function kn(s){return s==="id"?101:Me[s]!==void 0?Me[s]:s.startsWith("data-")?Me["data-*"]:s.startsWith("aria-")?Me["aria-*"]:0}function Np(s){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(s)}function Tp(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 kp(s,e){const t=A(A({},Wa),e),r=`v${s.version}`,i=ss(s.anchor,!1,t),n=s.path.length>0?s.path.map(o=>ss(o,!1,t)).join(" > ")+" > ":"",a=ss(s.target,!0,t),l=t.includeConstraints?Dp(s):"";return`${r}: ${i} :: ${n}${a}${l}`}function ss(s,e=!1,t=Wa){const{tag:r,semantics:i}=s;let n=r;const a=[],l=A({},i.attributes);i.id&&(l.id=i.id),i.role&&!l.role&&(l.role=i.role);const o=Object.entries(l).map(([h,d])=>{const p=kn(h),m=h==="href"||h==="src"?Ba(h,d):d;return{name:h,value:m,priority:p}}).filter(h=>h.name!=="id"&&h.name!=="class"&&_a.has(h.name)||Fa.has(h.name)&&za(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");o.sort((h,d)=>d.priority-h.priority);const u=o.slice(0,t.maxAttributes);u.sort((h,d)=>h.name.localeCompare(d.name));for(const{name:h,value:d}of u)a.push(`${h}="${Ws(d)}"`);if(t.includeText&&i.text&&!Tp(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&a.push(`text="${Ws(h)}"`)}let c=a;if(a.length>0&&(e&&t.simplifyTarget&&i.id&&(c=a.filter(h=>{const d=h.split("=")[0];return kn(d)>=60||d==="text"||d==="id"||d==="role"})),c.length>0&&c.sort((h,d)=>h.localeCompare(d))),i.classes&&i.classes.length>0){const h=rp(i.classes),d=!!i.id||a.some(p=>p.startsWith("href=")||p.startsWith("data-testid=")||p.startsWith("text=")||p.startsWith("role="));if(!(e&&t.simplifyTarget&&d)&&h.length>0){const p=h.sort().slice(0,t.maxClasses);n+=p.map(m=>`.${m}`).join("")}}if(c.length>0&&(n+=`[${c.join(",")}]`),"nthChild"in s&&s.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(Np);e&&t.simplifyTarget&&h||(n+=`#${s.nthChild}`)}return n}function Dp(s){if(!s.constraints||s.constraints.length===0)return"";const e=[];for(const t of s.constraints)switch(t.type){case"uniqueness":e.push("unique=true");break;case"position":t.params&&t.params.strategy&&e.push(`pos=${t.params.strategy}`);break;case"text-proximity":if(t.params&&t.params.reference){const r=Ws(String(t.params.reference));e.push(`text="${r}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function Ws(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function Lp(s,e,t){const r=$p(s,e);return r?kp(r,t):null}const ct={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0};function Pp(s){var e,t,r,i;return s===!1?null:s===!0||s===void 0?A({},ct):{maxPathDepth:(e=s.maxPathDepth)!=null?e:ct.maxPathDepth,enableSvgFingerprint:(t=s.enableSvgFingerprint)!=null?t:ct.enableSvgFingerprint,confidenceThreshold:(r=s.confidenceThreshold)!=null?r:ct.confidenceThreshold,fallbackToBody:(i=s.fallbackToBody)!=null?i:ct.fallbackToBody}}function Dn(s,e,t,r){const i=e.getMeta(s),n=i==null?void 0:i.selector;if(n&&!(r!=null&&r.force))return n;const a=s.nodeType===Node.ELEMENT_NODE?s:yi(s);if(!a)return n;const l=e.getMeta(a),o=l==null?void 0:l.selector;if(o&&!(r!=null&&r.force))return o;if(!t)return o!=null?o:n;const u={maxPathDepth:t.maxPathDepth,enableSvgFingerprint:t.enableSvgFingerprint,fallbackToBody:t.fallbackToBody};try{const c=Lp(a,u);if(c)return l?l.selector=c:i&&(i.selector=c),c}catch(c){}return o!=null?o:n}function Ln(s){return"__ln"in s}class _p{constructor(){w(this,"length",0),w(this,"head",null),w(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Ln(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Ln(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Pn=(s,e)=>`${s}@${e}`,Fp=new Set(["id","class","name","role","title","alt","placeholder","for","type"]);function zp(s){const e=s.toLowerCase();return Fp.has(e)||e.startsWith("data-")||e.startsWith("aria-")}class Bp{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"excludeAttribute"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"selectorOptions",null),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new _p,i=o=>{let u=o,c=pt;for(;c===pt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=o=>{const u=O.parentNode(o);if(!u||!La(o))return;let c=!1;if(o.nodeType===Node.TEXT_NODE){const m=u.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=ut(u)?this.mirror.getId(Da(o)):this.mirror.getId(u),d=i(o);if(h===-1||d===-1)return r.addNode(o);const p=Ge(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{Ta(m,this.mirror)&&this.iframeManager.addIframe(m),ka(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Bs(o)&&this.shadowDomManager.addShadowRoot(O.shadowRoot(o),this.doc)},onIframeLoad:(m,g)=>{this.iframeManager.attachIframe(m,g),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,g)=>{this.stylesheetManager.attachLinkElement(m,g)},cssCaptured:c,selectorOptions:this.selectorOptions});p&&(e.push({parentId:h,nextId:d,node:p}),t.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const o of this.movedSet)_n(this.removesSubTreeCache,o,this.mirror)&&!this.movedSet.has(O.parentNode(o))||n(o);for(const o of this.addedSet)!Fn(this.droppedSet,o)&&!_n(this.removesSubTreeCache,o,this.mirror)||Fn(this.movedSet,o)?n(o):this.droppedSet.add(o);let a=null;for(;r.length;){let o=null;if(a){const u=this.mirror.getId(O.parentNode(a.value)),c=i(a.value);u!==-1&&c!==-1&&(o=a)}if(!o){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(O.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){o=c;break}else{const p=c.value,m=O.parentNode(p);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const g=O.host(m);if(this.mirror.getId(g)!==-1){o=c;break}}}}}}if(!o){for(;r.head;)r.removeNode(r.head.value);break}a=o.previous,r.removeNode(o.value),n(o.value)}const l={texts:this.texts.map(o=>{const u=o.node,c=O.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:o.value,selector:Dn(u,this.mirror,this.selectorOptions)}}).filter(o=>!t.has(o.id)).filter(o=>this.mirror.has(o.id)),attributes:this.attributes.map(o=>{const{attributes:u}=o;if(typeof u.style=="string"){const c=JSON.stringify(o.styleDiff),h=JSON.stringify(o._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=o.styleDiff)}return{id:this.mirror.getId(o.node),attributes:u,selector:Dn(o.node,this.mirror,this.selectorOptions,{force:Object.keys(u).some(zp)})}}).filter(o=>!t.has(o.id)).filter(o=>this.mirror.has(o.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(O.childNodes(e),i=>O.textContent(i)||"").join("");t.attributes.value=cr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:ur(e),value:r,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!ts(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=O.textContent(e.target);!re(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:no(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,yi(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);const a=t[r],l=typeof a=="boolean",o=document.contains(t),u=Vs(t),c=ls(r,this.excludeAttribute);if(i===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(a===""||a===null||typeof a=="undefined")){console.debug(`[${de()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:O.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c});return}if(ls(r,this.excludeAttribute)){console.debug(`[${de()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:O.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c});return}if(r==="value"){const p=ur(t);i=cr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:p,value:i,maskInputFn:this.maskInputFn})}if(re(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let d=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(d||(d={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(d),this.attributeMap.set(e.target,d)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!io(t.tagName,r))if(d.attributes[r]=so(this.doc,_e(t.tagName),_e(r),i),r!=="class"&&(e.oldValue===null||i===""||i!==e.oldValue)&&console.debug(`[${de()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[i===e.oldValue?"no change in value":null,i===a?"mirrored in DOM property":null,i===d.attributes[r]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:O.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,transformedValue:d.attributes[r],excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c}),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(g){this.unattachedDoc=this.doc}const m=this.unattachedDoc.createElement("span");e.oldValue&&m.setAttribute("style",e.oldValue);for(const g of Array.from(t.style)){const f=t.style.getPropertyValue(g),b=t.style.getPropertyPriority(g);f!==m.style.getPropertyValue(g)||b!==m.style.getPropertyPriority(g)?b===""?d.styleDiff[g]=f:d.styleDiff[g]=[f,b]:d._unchangedStyles[g]=[f,b]}for(const g of Array.from(m.style))t.style.getPropertyValue(g)===""&&(d.styleDiff[g]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?d.attributes.rr_open_mode="modal":d.attributes.rr_open_mode="non-modal");break}case"childList":{if(re(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=ut(e.target)?this.mirror.getId(O.host(e.target)):this.mirror.getId(e.target);re(e.target,this.blockClass,this.blockSelector,!1)||ts(t,this.mirror,this.slimDOMOptions)||!Vf(t,this.mirror)||(this.addedSet.has(t)?(Hs(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Na(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Pn(r,i)]?Hs(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:ut(e.target)&&ht(e.target)?!0:void 0}),Wp(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(ts(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Pn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);re(e,this.blockClass,this.blockSelector,!1)||(O.childNodes(e).forEach(r=>this.genAdds(r)),Bs(e)&&O.childNodes(O.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","selectorOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Hs(s,e){s.delete(e),O.childNodes(e).forEach(t=>Hs(s,t))}function Wp(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),O.childNodes(r).forEach(i=>t.push(i)))}}function _n(s,e,t){return s.size===0?!1:Hp(s,e)}function Hp(s,e,t){const r=O.parentNode(e);return r?s.has(r):!1}function Fn(s,e){return s.size===0?!1:Ha(s,e)}function Ha(s,e){const t=O.parentNode(e);return t?s.has(t)?!0:Ha(s,t):!1}let dt;function Up(s){dt=s}function Vp(){dt=void 0}const D=s=>dt?(...t)=>{try{return s(...t)}catch(r){if(dt&&dt(r)===!0)return;throw r}}:s,Pe=[];function rt(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Ua(s,e){const t=new Bp;Pe.push(t),t.init(s);const r=new($a())(D(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function jp({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let a=[],l;const o=xt(D(h=>{const d=Date.now()-l;s(a.map(p=>(p.timeOffset-=d,p)),h),a=[],l=null}),n),u=D(xt(D(h=>{const d=rt(h),{clientX:p,clientY:m}=zs(h)?h.changedTouches[0]:h;l||(l=de()),a.push({x:p,y:m,id:r.getId(d),timeOffset:de()-l}),o(typeof DragEvent!="undefined"&&h instanceof DragEvent?k.Drag:h instanceof MouseEvent?k.MouseMove:k.TouchMove)}),i,{trailing:!1})),c=[ee("mousemove",u,t),ee("touchmove",u,t),ee("drag",u,t)];return D(()=>{c.forEach(h=>h())})}function Gp({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const a=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let o=null;const u=c=>h=>{const d=rt(h);if(re(d,r,i,!0))return;let p=null,m=c;if("pointerType"in h){switch(h.pointerType){case"mouse":p=Ce.Mouse;break;case"touch":p=Ce.Touch;break;case"pen":p=Ce.Pen;break}p===Ce.Touch?ne[c]===ne.MouseDown?m="TouchStart":ne[c]===ne.MouseUp&&(m="TouchEnd"):Ce.Pen}else zs(h)&&(p=Ce.Touch);p!==null?(o=p,(m.startsWith("Touch")&&p===Ce.Touch||m.startsWith("Mouse")&&p===Ce.Mouse)&&(p=null)):ne[c]===ne.Click&&(p=o,o=null);const g=zs(h)?h.changedTouches[0]:h;if(!g)return;const f=t.getId(d),{clientX:b,clientY:v}=g;D(s)(A({type:ne[m],id:f,x:b,y:v},p!==null&&{pointerType:p}))};return Object.keys(ne).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&a[c]!==!1).forEach(c=>{let h=_e(c);const d=u(c);if(window.PointerEvent)switch(ne[c]){case ne.MouseDown:case ne.MouseUp:h=h.replace("mouse","pointer");break;case ne.TouchStart:case ne.TouchEnd:return}l.push(ee(h,d,e))}),D(()=>{l.forEach(c=>c())})}function Va({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const a=D(xt(D(l=>{const o=rt(l);if(!o||re(o,r,i,!0))return;const u=t.getId(o);if(o===e&&e.defaultView){const c=Ra(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:o.scrollLeft,y:o.scrollTop})}),n.scroll||100));return ee("scroll",a,e)}function Yp({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=D(xt(D(()=>{const n=Ma(),a=Oa();(t!==n||r!==a)&&(s({width:Number(a),height:Number(n)}),t=n,r=a)}),200));return ee("resize",i,e)}function Zp({navigationCb:s,doc:e,sampling:t}){if(t.navigation===!1)return()=>{};const r=e.defaultView;if(!r)return()=>{};let i=r.location.href;const n=[],a=D(u=>{const c=r.location.href;c!==i&&(s({href:c,oldHref:i,navigationType:u}),i=c)}),l=Ae(r.history,"pushState",function(u){return function(...c){const h=u.apply(this,c);return a("pushState"),h}});n.push(l);const o=Ae(r.history,"replaceState",function(u){return function(...c){const h=u.apply(this,c);return a("replaceState"),h}});return n.push(o),n.push(ee("popstate",()=>a("popstate"),r)),n.push(ee("hashchange",()=>a("hashchange"),r)),D(()=>{n.forEach(u=>u())})}const is=["INPUT","TEXTAREA","SELECT"],zn=new WeakMap,Jp=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],Bn=new WeakMap;function Xp({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:a,maskInputOptions:l,maskInputFn:o,sampling:u,userTriggeredOnInput:c}){function h(S){let y=rt(S);const C=S.isTrusted,x=y&&y.tagName;if(y&&x==="OPTION"&&(y=O.parentElement(y)),!y||!x||is.indexOf(x)<0||re(y,r,i,!0)||y.classList.contains(n)||a&&y.matches(a))return;let E=y.value,$=!1;const _=ur(y)||"";_==="radio"||_==="checkbox"?$=y.checked:(l[x.toLowerCase()]||l[_])&&(E=cr({element:y,maskInputOptions:l,tagName:x,type:_,value:E,maskInputFn:o})),d(y,c?{text:E,isChecked:$,userTriggered:C}:{text:E,isChecked:$});const F=y.name;_==="radio"&&F&&$&&e.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach(T=>{if(T!==y){const U=T.value;d(T,c?{text:U,isChecked:!$,userTriggered:!1}:{text:U,isChecked:!$})}})}function d(S,y){const C=zn.get(S),x=S,E=x.hasAttribute("placeholder"),$=x.value==="",_=typeof x.defaultValue=="string"?x.defaultValue==="":!0,F=!y.userTriggered,T=!C||C.text==="",U=E&&$&&_&&T&&F&&!y.isChecked&&x.type!=="hidden"&&is.includes(x.tagName),Z=x.tagName==="INPUT"&&x.type==="text"&&!y.userTriggered&&y.text===x.defaultValue&&!C&&x.hasAttribute("placeholder"),J=!y.userTriggered&&x.value===x.defaultValue&&!C&&x.hasAttribute("placeholder")&&!y.isChecked&&x.type!=="hidden"&&is.includes(x.tagName),I=x.type==="checkbox"&&!y.userTriggered&&!y.isChecked&&!C,P=x.type==="radio"&&!y.userTriggered&&!y.isChecked&&!C;if(U||Z||J||I||P){console.debug(`[${de()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:O.describeNode(x),tag:x.tagName,nodeType:x.nodeType,attribute:x.attributes,value:x.value,isLikelyPhantom:U,isRenderDrivenTextInput:Z,isValueFromDefault:J,isPhantomCheckbox:I,isPhantomRadio:P});return}if(!C||C.text!==y.text||C.isChecked!==y.isChecked){zn.set(S,y);const te=t.getId(S);D(s)(ie(A({},y),{id:te}))}}const m=(u.input==="last"?["change"]:["input","change"]).map(S=>ee(S,D(h),e)),g=S=>{const y=rt(S);if(!y||!y.tagName)return;if(u.input==="all"){h(S);return}const C=y.tagName,x=S.key,E=Jp.includes(x),$=C==="TEXTAREA",_=e.activeElement===y,F=y.value,T=Bn.get(y);if(Bn.set(y,F),!_){h(S);return}if(E){if(!$){h(S);return}let U=T!=null?T:"",Z=0;const J=2,I=()=>{const P=y.value,te=e.activeElement===y,X=P!==U;if(!te){h(S);return}if(X)Z=0,U=P;else if(Z++,Z>=J){h(S);return}requestAnimationFrame(I)};requestAnimationFrame(I);return}};m.push(ee("keydown",D(g),e));const f=e.defaultView;if(!f)return()=>{m.forEach(S=>S())};const b=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),v=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&m.push(...v.map(S=>kr(S[0],S[1],{set(){D(h)({target:this,isTrusted:!1})}},!1,f))),D(()=>{m.forEach(S=>S())})}function Cr(s){const e=[];function t(r,i){if(er("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||er("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||er("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||er("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(a)}return i}return t(s,e)}function $e(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Kp({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:D((c,h,d)=>{const[p,m]=d,{id:g,styleId:f}=$e(h,e,t.styleMirror);return(g&&g!==-1||f&&f!==-1)&&s({id:g,styleId:f,adds:[{rule:p,index:m}]}),c.apply(h,d)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,d=this.cssRules.length){const p=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[p,d])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:D((c,h,d)=>{const[p]=d,{id:m,styleId:g}=$e(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,removes:[{index:p}]}),c.apply(h,d)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:D((c,h,d)=>{const[p]=d,{id:m,styleId:g}=$e(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,replace:p}),c.apply(h,d)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:D((c,h,d)=>{const[p]=d,{id:m,styleId:g}=$e(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,replaceSync:p}),c.apply(h,d)})}));const o={};tr("CSSGroupingRule")?o.CSSGroupingRule=r.CSSGroupingRule:(tr("CSSMediaRule")&&(o.CSSMediaRule=r.CSSMediaRule),tr("CSSConditionRule")&&(o.CSSConditionRule=r.CSSConditionRule),tr("CSSSupportsRule")&&(o.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(o).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:D((d,p,m)=>{const[g,f]=m,{id:b,styleId:v}=$e(p.parentStyleSheet,e,t.styleMirror);return(b&&b!==-1||v&&v!==-1)&&s({id:b,styleId:v,adds:[{rule:g,index:[...Cr(p),f||0]}]}),d.apply(p,m)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:D((d,p,m)=>{const[g]=m,{id:f,styleId:b}=$e(p.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||b&&b!==-1)&&s({id:f,styleId:b,removes:[{index:[...Cr(p),g]}]}),d.apply(p,m)})})}),D(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,a&&(r.CSSStyleSheet.prototype.replace=a),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(o).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function ja({mirror:s,stylesheetManager:e},t){var r,i,n;let a=null;t.nodeName==="#document"?a=s.getId(t):a=s.getId(O.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,o=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!l||!o?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var u;return(u=o.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=o.set)==null?void 0:c.call(this,u);if(a!==null&&a!==-1)try{e.adoptStyleSheets(u,a)}catch(d){}return h}}),D(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function qp({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:D((l,o,u)=>{var c;const[h,d,p]=u;if(t.has(h))return n.apply(o,[h,d,p]);const{id:m,styleId:g}=$e((c=o.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,set:{property:h,value:d,priority:p},index:Cr(o.parentRule)}),l.apply(o,u)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:D((l,o,u)=>{var c;const[h]=u;if(t.has(h))return a.apply(o,[h]);const{id:d,styleId:p}=$e((c=o.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(d&&d!==-1||p&&p!==-1)&&s({id:d,styleId:p,remove:{property:h},index:Cr(o.parentRule)}),l.apply(o,u)})}),D(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=a})}function Qp({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const a=D(o=>xt(D(u=>{const c=rt(u);if(!c||re(c,e,t,!0))return;const{currentTime:h,volume:d,muted:p,playbackRate:m,loop:g}=c;s({type:o,id:r.getId(c),currentTime:h,volume:d,muted:p,playbackRate:m,loop:g})}),i.media||500)),l=[ee("play",a(Ve.Play),n),ee("pause",a(Ve.Pause),n),ee("seeked",a(Ve.Seeked),n),ee("volumechange",a(Ve.VolumeChange),n),ee("ratechange",a(Ve.RateChange),n)];return D(()=>{l.forEach(o=>o())})}function em({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(o,u,c){const h=new n(o,u,c);return i.set(h,{family:o,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(ArrayBuffer.isView(u)?new Uint8Array(u.buffer,u.byteOffset,u.byteLength):new Uint8Array(u)))}),h};const a=Ae(e.fonts,"add",function(l){return function(o){return setTimeout(D(()=>{const u=i.get(o);u&&(s(u),i.delete(o))}),0),l.apply(this,[o])}});return r.push(()=>{t.FontFace=n}),r.push(a),D(()=>{r.forEach(l=>l())})}function tm(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let a=!0;const l=D(()=>{const o=e.getSelection();if(!o||a&&(o!=null&&o.isCollapsed))return;a=o.isCollapsed||!1;const u=[],c=o.rangeCount||0;for(let h=0;h<c;h++){const d=o.getRangeAt(h),{startContainer:p,startOffset:m,endContainer:g,endOffset:f}=d;re(p,r,i,!0)||re(g,r,i,!0)||u.push({start:t.getId(p),startOffset:m,end:t.getId(g),endOffset:f})}n({ranges:u})});return l(),ee("selectionchange",l)}function rm({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Ae(t.customElements,"define",function(i){return function(n,a,l){try{e({define:{name:n}})}catch(o){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,a,l])}})}function sm(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:a,navigationCb:l,inputCb:o,mediaInteractionCb:u,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:d,fontCb:p,selectionCb:m,customElementCb:g}=s;s.mutationCb=(...f)=>{e.mutation&&e.mutation(...f),t(...f)},s.mousemoveCb=(...f)=>{e.mousemove&&e.mousemove(...f),r(...f)},s.mouseInteractionCb=(...f)=>{e.mouseInteraction&&e.mouseInteraction(...f),i(...f)},s.scrollCb=(...f)=>{e.scroll&&e.scroll(...f),n(...f)},s.viewportResizeCb=(...f)=>{e.viewportResize&&e.viewportResize(...f),a(...f)},s.navigationCb=(...f)=>{e.navigation&&e.navigation(...f),l(...f)},s.inputCb=(...f)=>{e.input&&e.input(...f),o(...f)},s.mediaInteractionCb=(...f)=>{e.mediaInteaction&&e.mediaInteaction(...f),u(...f)},s.styleSheetRuleCb=(...f)=>{e.styleSheetRule&&e.styleSheetRule(...f),c(...f)},s.styleDeclarationCb=(...f)=>{e.styleDeclaration&&e.styleDeclaration(...f),h(...f)},s.canvasMutationCb=(...f)=>{e.canvasMutation&&e.canvasMutation(...f),d(...f)},s.fontCb=(...f)=>{e.font&&e.font(...f),p(...f)},s.selectionCb=(...f)=>{e.selection&&e.selection(...f),m(...f)},s.customElementCb=(...f)=>{e.customElement&&e.customElement(...f),g(...f)}}function im(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};sm(s,e);let r;s.recordDOM&&(r=Ua(s,s.doc));const i=jp(s),n=Gp(s),a=Va(s),l=Yp(s,{win:t}),o=Zp(s),u=Xp(s),c=Qp(s);let h=()=>{},d=()=>{},p=()=>{},m=()=>{};s.recordDOM&&(h=Kp(s,{win:t}),d=ja(s,s.doc),p=qp(s,{win:t}),s.collectFonts&&(m=em(s)));const g=tm(s),f=rm(s),b=[];for(const v of s.plugins)b.push(v.observer(v.callback,t,v.options));return D(()=>{var v;Pe.forEach(S=>S.reset()),(v=s.visibilityManager)==null||v.reset(),r==null||r.disconnect(),i(),n(),a(),l(),o(),u(),c(),h(),d(),p(),m(),g(),f(),b.forEach(S=>S())})}function er(s){return typeof window[s]!="undefined"}function tr(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Wn{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),a=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),a.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class nm{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new Wn(ro)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Wn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case L.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:L.IncrementalSnapshot,data:{source:k.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case L.Meta:case L.Load:case L.DomContentLoaded:return!1;case L.Plugin:return t;case L.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case L.IncrementalSnapshot:switch(t.data.source){case k.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case k.Drag:case k.TouchMove:case k.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case k.ViewportResize:return!1;case k.MediaInteraction:case k.MouseInteraction:case k.Scroll:case k.CanvasMutation:case k.Input:return this.replaceIds(t.data,e,["id"]),t;case k.StyleSheetRule:case k.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case k.Font:return t;case k.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case k.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Pa.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class om{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!ht(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Ua(ie(A({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Va(ie(A({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(O.host(e))),this.restoreHandlers.push(ja({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Ae(e.prototype,"attachShadow",function(i){return function(n){const a=i.call(this,n),l=O.shadowRoot(this);return l&&La(this)&&r.addShadowRoot(l,t),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ye="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",am=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var rr=0;rr<Ye.length;rr++)am[Ye.charCodeAt(rr)]=rr;var lm=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Ye[e[t]>>2],i+=Ye[(e[t]&3)<<4|e[t+1]>>4],i+=Ye[(e[t+1]&15)<<2|e[t+2]>>6],i+=Ye[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Hn=new Map;function cm(s,e){let t=Hn.get(s);return t||(t=new Map,Hn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Ga=(s,e,t)=>{if(!s||!(Za(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=cm(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function lr(s,e,t){if(s instanceof Array)return s.map(r=>lr(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=lm(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[lr(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[lr(s.data,e,t),s.width,s.height]};if(Za(s,e)||typeof s=="object"){const r=s.constructor.name,i=Ga(s,e,t);return{rr_type:r,index:i}}}}return s}const Ya=(s,e,t)=>s.map(r=>lr(r,e,t)),Za=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function um(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const a of n)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=Ae(e.CanvasRenderingContext2D.prototype,a,function(o){return function(...u){return re(this.canvas,t,r,!0)||setTimeout(()=>{const c=Ya(u,e,this);s(this.canvas,{type:tt["2D"],property:a,args:c})},0),o.apply(this,u)}});i.push(l)}catch(l){const o=kr(e.CanvasRenderingContext2D.prototype,a,{set(u){s(this.canvas,{type:tt["2D"],property:a,args:[u],setter:!0})}});i.push(o)}return()=>{i.forEach(a=>a())}}function hm(s){return s==="experimental-webgl"?"webgl":s}function Un(s,e,t,r){const i=[];try{const n=Ae(s.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...o){if(!re(this,e,t,!0)){const u=hm(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(o[0]&&typeof o[0]=="object"){const c=o[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[l,...o])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function Vn(s,e,t,r,i,n){const a=[],l=Object.getOwnPropertyNames(s);for(const o of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof s[o]!="function")continue;const u=Ae(s,o,function(c){return function(...h){const d=c.apply(this,h);if(Ga(d,n,this),"tagName"in this.canvas&&!re(this.canvas,r,i,!0)){const p=Ya(h,n,this),m={type:e,property:o,args:p};t(this.canvas,m)}return d}});a.push(u)}catch(u){const c=kr(s,o,{set(h){t(this.canvas,{type:e,property:o,args:[h],setter:!0})}});a.push(c)}return a}function dm(s,e,t,r){const i=[];return i.push(...Vn(e.WebGLRenderingContext.prototype,tt.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...Vn(e.WebGL2RenderingContext.prototype,tt.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const Ja="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",fm=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),jn=typeof self!="undefined"&&self.Blob&&new Blob([fm(Ja)],{type:"text/javascript;charset=utf-8"});function pm(s){let e;try{if(e=jn&&(self.URL||self.webkitURL).createObjectURL(jn),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+Ja,{name:s==null?void 0:s.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class mm{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(this,"processMutation",(o,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:a,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&t==="all"&&this.initCanvasMutationObserver(r,i,n),a&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const a=Un(t,r,i,!0),l=new Map,o=new pm;o.onmessage=m=>{const{id:g}=m.data;if(l.set(g,!1),!("base64"in m.data))return;const{base64:f,type:b,width:v,height:S}=m.data;this.mutationCb({id:g,type:tt["2D"],commands:[{property:"clearRect",args:[0,0,v,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:b}]},0,0]}]})};const u=1e3/e;let c=0,h;const d=()=>{const m=[];return t.document.querySelectorAll("canvas").forEach(g=>{re(g,r,i,!0)||m.push(g)}),m},p=m=>{if(c&&m-c<u){h=requestAnimationFrame(p);return}c=m,d().forEach(async g=>{var f;const b=this.mirror.getId(g);if(l.get(b)||g.width===0||g.height===0)return;if(l.set(b,!0),["webgl","webgl2"].includes(g.__context)){const S=g.getContext(g.__context);((f=S==null?void 0:S.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&S.clear(S.COLOR_BUFFER_BIT)}const v=await createImageBitmap(g);o.postMessage({id:b,bitmap:v,width:g.width,height:g.height,dataURLOptions:n.dataURLOptions},[v])}),h=requestAnimationFrame(p)};h=requestAnimationFrame(p),this.resetObservers=()=>{a(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Un(e,t,r,!1),n=um(this.processMutation.bind(this),e,t,r),a=dm(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(a=>{const u=a,{type:l}=u;return We(u,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}function gm(s,e,t){var c,h,d,p,m,g;const r=(c=t==null?void 0:t.root)!=null?c:null,i=(h=t==null?void 0:t.threshold)!=null?h:.5,n=(d=t==null?void 0:t.sensitivity)!=null?d:.05,a=ym((p=t==null?void 0:t.rootMargin)!=null?p:"0px"),l=new Map,o=bm(r),u=wm(o,a);for(const f of s){const b=f.getBoundingClientRect();let v=vm(),S=0;b.width>0&&b.height>0&&(v=Sm(b,u),S=Cm(b,v),S=Math.round(S*100)/100);const y=xm(f),C=(m=e.get(f))!=null?m:null,x=(g=C==null?void 0:C.intersectionRatio)!=null?g:0,E=S,$=(C==null?void 0:C.isStyleVisible)&&x>i,_=y&&E>i;!C||$!==_||$!==_&&Math.abs(E-x)>n?l.set(f,{target:f,isVisible:_,isStyleVisible:y,intersectionRatio:E,intersectionRect:v,oldValue:C}):l.set(f,C)}return l}function ym(s){const e=s.trim().split(/\s+/),t=(r,i)=>r.endsWith("%")?parseFloat(r)/100*i:parseFloat(r)||0;return function(r){const i=t(e[0]||"0px",r.height),n=t(e[1]||e[0]||"0px",r.width),a=t(e[2]||e[0]||"0px",r.height),l=t(e[3]||e[1]||e[0]||"0px",r.width);return{top:i,right:n,bottom:a,left:l,width:0,height:0}}}function bm(s){return s?s.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function wm(s,e){const t=e(s);return new DOMRect(s.left-t.left,s.top-t.top,s.width+t.left+t.right,s.height+t.top+t.bottom)}function Sm(s,e){const t=Math.max(s.top,e.top),r=Math.max(s.left,e.left),i=Math.min(s.bottom,e.bottom),n=Math.min(s.right,e.right),a=Math.max(0,n-r),l=Math.max(0,i-t);return{top:t,left:r,bottom:i,right:n,width:a,height:l}}function Cm(s,e){const t=s.width*s.height,r=e.width*e.height;return t>0?r/t:0}function vm(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function xm(s){const e=getComputedStyle(s);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class Am{constructor(e){var u,c,h,d,p,m;w(this,"frozen",!1),w(this,"locked",!1),w(this,"pending",new Map),w(this,"mirror"),w(this,"mutationCb"),w(this,"rafId",null),w(this,"intervalId",null),w(this,"rafThrottle"),w(this,"lastFlushTime",0),w(this,"elements",new Set),w(this,"previousState",new Map),w(this,"root",null),w(this,"threshold"),w(this,"sensitivity"),w(this,"rootMargin"),w(this,"hasInitialized",!1),w(this,"mode","none"),w(this,"debounce",50),w(this,"throttle",100),w(this,"buffer",new Map),w(this,"debounceTimer",null),w(this,"lastThrottleTime",0),w(this,"disabled",!1),w(this,"notifyActivity");const{doc:t,mirror:r,sampling:i,mutationCb:n,notifyActivity:a}=e;if(this.mirror=r,this.mutationCb=n,this.notifyActivity=a,this.rootMargin="0px",i===!1){this.disabled=!0;return}const l=typeof i=="object"&&i!==null?i:{};this.mode=(u=l==null?void 0:l.mode)!=null?u:"none",this.debounce=Number((c=l==null?void 0:l.debounce)!=null?c:100),this.throttle=Number((h=l==null?void 0:l.throttle)!=null?h:100),this.threshold=Number((d=l==null?void 0:l.threshold)!=null?d:.5),this.sensitivity=Number((p=l==null?void 0:l.sensitivity)!=null?p:.05),this.rafThrottle=Number((m=l==null?void 0:l.rafThrottle)!=null?m:50),t.querySelectorAll("*").forEach(g=>this.observe(g)),new MutationObserver(g=>{g.forEach(f=>{f.addedNodes.forEach(b=>{b.nodeType===Node.ELEMENT_NODE&&(this.observe(b),b.querySelectorAll("*").forEach(v=>this.observe(v)))}),f.removedNodes.forEach(b=>{b.nodeType===Node.ELEMENT_NODE&&this.unobserve(b)})})}).observe(t.body,{childList:!0,subtree:!0}),this.startPendingFlushLoop()}startPendingFlushLoop(){if(!this.disabled)if(typeof requestAnimationFrame=="function"){const e=t=>{t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations()),this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}else{const e=()=>{const t=performance.now();t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations())};this.intervalId=setInterval(e,this.rafThrottle)}}flushPendingVisibilityMutations(){if(this.disabled||this.frozen||this.locked||this.elements.size===0)return;const e=gm(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,r]of e.entries()){const i=this.previousState.get(t);if(!i||i.isVisible!==r.isVisible||Math.abs(i.intersectionRatio-r.intersectionRatio)>this.sensitivity){const a=this.mirror.getId(t);a!==-1&&this.buffer.set(t,{id:a,isVisible:r.isVisible,ratio:r.intersectionRatio}),this.previousState.set(t,r)}}if(this.previousState=e,!this.hasInitialized){this.hasInitialized=!0,this.buffer.clear();return}this.scheduleEmit()}scheduleEmit(){if(this.mode==="debounce")clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.flushBuffer(),this.debounce);else if(this.mode==="throttle"){const e=performance.now();e-this.lastThrottleTime>=this.throttle&&(this.lastThrottleTime=e,this.flushBuffer())}else this.flushBuffer()}flushBuffer(){var e;this.buffer.size!==0&&((e=this.notifyActivity)==null||e.call(this,this.buffer.size),this.mutationCb({mutations:Array.from(this.buffer.values())}),this.buffer.clear())}observe(e){this.disabled||this.elements.add(e)}unobserve(e){this.disabled||(this.elements.delete(e),this.previousState.delete(e),this.pending.delete(e))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1,this.flushPendingVisibilityMutations()}lock(){this.locked=!0}unlock(){this.locked=!1}reset(){this.elements.clear(),this.previousState.clear(),this.pending.clear(),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}}class Im{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new Gf),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let a;this.styleMirror.has(n)?a=this.styleMirror.getId(n):(a=this.styleMirror.add(n),i.push({styleId:a,rules:Array.from(n.rules||CSSRule,(l,o)=>({rule:Zn(l,n.href),index:o}))})),r.styleIds.push(a)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Em{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}const $m="3.1.1-alpha.2";let j,De,ns,Ze=!1;const vr=[];let Le;function Rm(s){return new Promise(t=>{const r=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})},i=(()=>{let n=!1;return()=>{n||(n=!0,r())}})();["interactive","complete"].includes(s.document.readyState)?i():(s.addEventListener("DOMContentLoaded",i,{once:!0}),s.addEventListener("load",i,{once:!0}),setTimeout(()=>{i()},5e3))})}try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Ri=s.contentWindow)==null?void 0:Ri.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const ce=$l();function oe(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryNvm:i,blockClass:n="rr-block",blockSelector:a=null,ignoreClass:l="rr-ignore",ignoreSelector:o=null,excludeAttribute:u,maskTextClass:c="rr-mask",maskTextSelector:h=null,inlineStylesheet:d=!0,maskAllInputs:p,maskInputOptions:m,slimDOMOptions:g,maskInputFn:f,maskTextFn:b,hooks:v,packFn:S,sampling:y={},dataURLOptions:C={},mousemoveWait:x,recordDOM:E=!0,recordCanvas:$=!1,recordCrossOriginIframes:_=!1,recordAfter:F=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",flushCustomEvent:T=s.flushCustomEvent!==void 0?s.flushCustomEvent:"after",userTriggeredOnInput:U=!1,collectFonts:Z=!1,inlineImages:J=!1,plugins:I,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:te=new Set([]),selector:X,errorHandler:ue}=s;Up(ue);const Ie=_?window.parent===window:!0;let ae=!1;if(!Ie)try{window.parent.document&&(ae=!1)}catch(N){ae=!0}if(Ie&&!e)throw new Error("emit function is required");if(!Ie&&!ae)return()=>{};x!==void 0&&y.mousemove===void 0&&(y.mousemove=x),ce.reset();const Dr=u===void 0?/.^/:u,Lr=p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:m!==void 0?m:{password:!0},Pr=g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:g==="all",headMetaDescKeywords:g==="all",headTitleMutations:g==="all"}:g||{},Si=Pp(X);jf();let Ci,_r=0,Mt=0;const vi=N=>{for(const se of I||[])se.eventProcessor&&(N=se.eventProcessor(N));return S&&!ae&&(N=S(N)),N};j=(N,se)=>{var V;const q=N;if(q.timestamp=de(),(V=Pe[0])!=null&&V.isFrozen()&&q.type!==L.FullSnapshot&&!(q.type===L.IncrementalSnapshot&&q.data.source===k.Mutation)&&(Pe.forEach(he=>he.unfreeze()),Ee==null||Ee.unfreeze()),Ie)e==null||e(vi(q),se);else if(ae){const he={type:"rrweb",event:vi(q),isCheckout:se};window.parent.postMessage(he,"*")}if(q.type===L.FullSnapshot)Ci=q,_r=0,Mt=0;else if(q.type===L.IncrementalSnapshot){if(q.data.source===k.Mutation&&q.data.isAttachIframe)return;if(q.data.source!==k.Visibility){_r++;const he=r&&_r>=r,Be=t&&q.timestamp-Ci.timestamp>t;(he||Be)&&De(!0)}}};const Ot=N=>{j({type:L.IncrementalSnapshot,data:A({source:k.Mutation},N)})},Xa=N=>{j({type:L.IncrementalSnapshot,data:A({source:k.Visibility},N)})},xi=N=>j({type:L.IncrementalSnapshot,data:A({source:k.Scroll},N)}),Ai=N=>j({type:L.IncrementalSnapshot,data:A({source:k.CanvasMutation},N)}),Ka=N=>j({type:L.IncrementalSnapshot,data:A({source:k.AdoptedStyleSheet},N)}),Te=new Im({mutationCb:Ot,adoptedStyleSheetCb:Ka}),ke=new nm({mirror:ce,mutationCb:Ot,stylesheetManager:Te,recordCrossOriginIframes:_,wrappedEmit:j});for(const N of I||[])N.getMirror&&N.getMirror({nodeMirror:ce,crossOriginIframeMirror:ke.crossOriginIframeMirror,crossOriginIframeStyleMirror:ke.crossOriginIframeStyleMirror});const Fr=new Em;ns=new mm({recordCanvas:$,mutationCb:Ai,win:window,blockClass:n,blockSelector:a,mirror:ce,sampling:y.canvas,dataURLOptions:C});const Nt=new om({mutationCb:Ot,scrollCb:xi,bypassOptions:{blockClass:n,blockSelector:a,maskTextClass:c,maskTextSelector:h,excludeAttribute:Dr,inlineStylesheet:d,maskInputOptions:Lr,dataURLOptions:C,maskTextFn:b,maskInputFn:f,recordCanvas:$,inlineImages:J,sampling:y,slimDOMOptions:Pr,iframeManager:ke,stylesheetManager:Te,canvasManager:ns,keepIframeSrcFn:P,processedNodeManager:Fr,selectorOptions:Si},mirror:ce}),qa=E&&(i!=null||(y==null?void 0:y.visibility)!==void 0&&(y==null?void 0:y.visibility)!==!1);let Ee;if(qa){const N=typeof(y==null?void 0:y.visibility)=="object"&&(y==null?void 0:y.visibility)!==null?y.visibility:{},se=N.recordVisibility===!0;Ee=new Am({doc:document,mirror:ce,sampling:N,mutationCb:se?Xa:()=>{},notifyActivity:i!=null?V=>{Mt+=V,Mt>=i&&(De(!0),Mt=0)}:void 0})}De=(N=!1)=>{if(!E)return;j({type:L.Meta,data:{href:window.location.href,width:Oa(),height:Ma()}},N),Te.reset(),Nt.init(),Pe.forEach(V=>V.lock()),Ee==null||Ee.lock();const se=Gc(document,{mirror:ce,blockClass:n,blockSelector:a,maskTextClass:c,maskTextSelector:h,excludeAttribute:Dr,inlineStylesheet:d,maskAllInputs:Lr,maskTextFn:b,maskInputFn:f,slimDOM:Pr,dataURLOptions:C,recordCanvas:$,inlineImages:J,onSerialize:V=>{Ta(V,ce)&&ke.addIframe(V),ka(V,ce)&&Te.trackLinkElement(V),Bs(V)&&Nt.addShadowRoot(O.shadowRoot(V),document)},onIframeLoad:(V,q)=>{ke.attachIframe(V,q),Nt.observeAttachShadow(V)},onStylesheetLoad:(V,q)=>{Te.attachLinkElement(V,q)},keepIframeSrcFn:P,selector:X});if(!se)return console.warn("Failed to snapshot the document");j({type:L.FullSnapshot,data:{node:se,initialOffset:Ra(window)}},N),Pe.forEach(V=>V.unlock()),Ee==null||Ee.unlock(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Te.adoptStyleSheets(document.adoptedStyleSheets,ce.getId(document))},Le=()=>{for(const N of vr)j(N);vr.length=0};try{const N=[],se=he=>{var Be;return D(im)({mutationCb:Ot,mousemoveCb:(z,zr)=>j({type:L.IncrementalSnapshot,data:{source:zr,positions:z}}),mouseInteractionCb:z=>j({type:L.IncrementalSnapshot,data:A({source:k.MouseInteraction},z)}),scrollCb:xi,viewportResizeCb:z=>j({type:L.IncrementalSnapshot,data:A({source:k.ViewportResize},z)}),navigationCb:z=>{console.debug(`[${de()}] [rrweb:record/navigation] \u{1F9ED} Navigation detected:`,z.navigationType,z.oldHref,"\u2192",z.href),De(!0)},inputCb:z=>j({type:L.IncrementalSnapshot,data:A({source:k.Input},z)}),mediaInteractionCb:z=>j({type:L.IncrementalSnapshot,data:A({source:k.MediaInteraction},z)}),styleSheetRuleCb:z=>j({type:L.IncrementalSnapshot,data:A({source:k.StyleSheetRule},z)}),styleDeclarationCb:z=>j({type:L.IncrementalSnapshot,data:A({source:k.StyleDeclaration},z)}),canvasMutationCb:Ai,visibilityManager:Ee,fontCb:z=>j({type:L.IncrementalSnapshot,data:A({source:k.Font},z)}),selectionCb:z=>{j({type:L.IncrementalSnapshot,data:A({source:k.Selection},z)})},customElementCb:z=>{j({type:L.IncrementalSnapshot,data:A({source:k.CustomElement},z)})},blockClass:n,ignoreClass:l,ignoreSelector:o,maskTextClass:c,maskTextSelector:h,excludeAttribute:Dr,maskInputOptions:Lr,inlineStylesheet:d,sampling:y,recordDOM:E,recordCanvas:$,inlineImages:J,userTriggeredOnInput:U,collectFonts:Z,doc:he,maskInputFn:f,maskTextFn:b,keepIframeSrcFn:P,blockSelector:a,slimDOMOptions:Pr,dataURLOptions:C,selectorOptions:Si,mirror:ce,iframeManager:ke,stylesheetManager:Te,shadowDomManager:Nt,processedNodeManager:Fr,canvasManager:ns,ignoreCSSAttributes:te,plugins:((Be=I==null?void 0:I.filter(z=>z.observer))==null?void 0:Be.map(z=>({observer:z.observer,options:z.options,callback:zr=>j({type:L.Plugin,data:{plugin:z.name,payload:zr}})})))||[]},v)};ke.addLoadListener(he=>{try{N.push(se(he.contentDocument))}catch(Be){console.warn(Be)}});const V=()=>{T==="before"&&Le(),De(),N.push(se(document)),Ze=!0,T==="after"&&Le()},q=async()=>{T==="before"&&Le(),F==="DOMContentStabilized"&&(console.debug(`[${de()}] [rrweb:record] \u{1F7E2} Waiting for DOM stabilization...`),await Rm(window),console.debug(`[${de()}] [rrweb:record] \u2705 DOM stabilized, starting recording`)),console.debug(`[${de()}] [rrweb:record] \u2705 Init dom and takeFullSnapshot `),De(),N.push(se(document)),Ze=!0,T==="after"&&Le()};return document.readyState==="interactive"||document.readyState==="complete"?V():(N.push(ee("DOMContentLoaded",()=>{j({type:L.DomContentLoaded,data:{}}),F==="DOMContentLoaded"&&V()})),N.push(ee("load",()=>{j({type:L.Load,data:{}}),F==="load"&&V()},window))),()=>{Le(),N.forEach(he=>he()),Fr.destroy(),Ze=!1,Vp()}}catch(N){console.warn(N)}}oe.getVersion=()=>$m;oe.isRecording=()=>Ze;oe.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${vr.length} events`),Le()};oe.addCustomEvent=(s,e)=>{const t={type:L.Custom,data:{tag:s,payload:e}};if(!Ze){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${s}`),vr.push(t);return}j(t)};oe.freezePage=()=>{Pe.forEach(s=>s.freeze())};oe.takeFullSnapshot=s=>{if(!Ze)throw new Error("please take full snapshot after start recording");De(s)};oe.mirror=ce;var Gn;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(Gn||(Gn={}));const{getVersion:pg}=oe,{isRecording:mg}=oe,{flushCustomEventQueue:gg}=oe,{addCustomEvent:yg}=oe,{freezePage:bg}=oe,{takeFullSnapshot:wg}=oe;exports.record=oe;
|
|
78
|
+
Solution: Ensure element and root parameter are from the same document context.`)}function Lp(s,e={}){var H,Z,X,I;var t;if(!s||!s.ownerDocument||!s.isConnected)return null;const r=A(A({},np),e);if(r.root)try{Dp(s,r.root)}catch(P){return console.error("Cross-document generation detected:",P),null}const i=(H=r.cache)!=null?H:kp(),n=i.getEID(s);if(n!==void 0)return n;if(s.tagName.toLowerCase()==="html"){const P=new _n(r,i),te=Fp(s,r,P);return i.setEID(s,te),te}const a=new op(r,i),l=new dp(r,i),o=new _n(r,i),u=new Rp,c=a.findAnchor(s);if(!c&&!r.fallbackToBody)return null;const h=(X=(Z=c==null?void 0:c.element)!=null?Z:(t=s.ownerDocument)==null?void 0:t.body)!=null?X:null;if(!h)return null;const d=!c||c.tier==="C",p=h.tagName.toLowerCase(),m=h.parentElement;let g;if(m&&p!=="body"&&p!=="html"){const P=Array.from(m.children).indexOf(h);P!==-1&&(g=P+1)}const f=o.extract(h),b={tag:h.tagName.toLowerCase(),semantics:f,score:(I=c==null?void 0:c.score)!=null?I:Se.DEGRADED_SCORE,degraded:d,nthChild:g},C=l.buildPath(h,s,o),v=o.extract(s);r.enableSvgFingerprint&&Pp(s)&&(v.svg=u.fingerprint(s));const y=s.parentElement;let S;if(y){const P=Array.from(y.children).indexOf(s);P!==-1&&(S=P+1)}const x={tag:s.tagName.toLowerCase(),semantics:v,score:o.scoreElement(s),nthChild:S},E=[],$={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},L=b.degraded||C.degraded,F=_p(b.degraded,C),D={version:"1.0",anchor:b,path:C.path,target:x,constraints:E,fallback:$,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:r.source,degraded:L,degradationReason:F}};return D.meta.confidence=Mp(D),D.meta.confidence<r.confidenceThreshold?null:(i.setEID(s,D),D)}function Pp(s){return s.namespaceURI==="http://www.w3.org/2000/svg"||s.tagName.toLowerCase()==="svg"||s instanceof SVGElement}function _p(s,e){if(s&&e.degraded)return"anchor-and-path-degraded";if(s)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}function Fp(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 Za={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function zn(s){return s==="id"?101:Te[s]!==void 0?Te[s]:s.startsWith("data-")?Te["data-*"]:s.startsWith("aria-")?Te["aria-*"]:0}function zp(s){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(s)}function Bp(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 Wp(s,e){const t=A(A({},Za),e),r=`v${s.version}`,i=ls(s.anchor,!1,t),n=s.path.length>0?s.path.map(o=>ls(o,!1,t)).join(" > ")+" > ":"",a=ls(s.target,!0,t),l=t.includeConstraints?Hp(s):"";return`${r}: ${i} :: ${n}${a}${l}`}function ls(s,e=!1,t=Za){const{tag:r,semantics:i}=s;let n=r;const a=[],l=A({},i.attributes);i.id&&(l.id=i.id),i.role&&!l.role&&(l.role=i.role);const o=Object.entries(l).map(([h,d])=>{const p=zn(h),m=h==="href"||h==="src"?Ya(h,d):d;return{name:h,value:m,priority:p}}).filter(h=>h.name!=="id"&&h.name!=="class"&&Va.has(h.name)||ja.has(h.name)&&Ga(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");o.sort((h,d)=>d.priority-h.priority);const u=o.slice(0,t.maxAttributes);u.sort((h,d)=>h.name.localeCompare(d.name));for(const{name:h,value:d}of u)a.push(`${h}="${Gs(d)}"`);if(t.includeText&&i.text&&!Bp(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&a.push(`text="${Gs(h)}"`)}let c=a;if(a.length>0&&(e&&t.simplifyTarget&&i.id&&(c=a.filter(h=>{const d=h.split("=")[0];return zn(d)>=60||d==="text"||d==="id"||d==="role"})),c.length>0&&c.sort((h,d)=>h.localeCompare(d))),i.classes&&i.classes.length>0){const h=up(i.classes),d=!!i.id||a.some(p=>p.startsWith("href=")||p.startsWith("data-testid=")||p.startsWith("text=")||p.startsWith("role="));if(!(e&&t.simplifyTarget&&d)&&h.length>0){const p=h.sort().slice(0,t.maxClasses);n+=p.map(m=>`.${m}`).join("")}}if(c.length>0&&(n+=`[${c.join(",")}]`),"nthChild"in s&&s.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(zp);e&&t.simplifyTarget&&h||(n+=`#${s.nthChild}`)}return n}function Hp(s){if(!s.constraints||s.constraints.length===0)return"";const e=[];for(const t of s.constraints)switch(t.type){case"uniqueness":e.push("unique=true");break;case"position":t.params&&t.params.strategy&&e.push(`pos=${t.params.strategy}`);break;case"text-proximity":if(t.params&&t.params.reference){const r=Gs(String(t.params.reference));e.push(`text="${r}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function Gs(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function Up(s,e,t){const r=Lp(s,e);return r?Wp(r,t):null}const pt={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:0,fallbackToBody:!0};function Vp(s){var e,t,r,i;return s===!1?null:s===!0||s===void 0?A({},pt):{maxPathDepth:(e=s.maxPathDepth)!=null?e:pt.maxPathDepth,enableSvgFingerprint:(t=s.enableSvgFingerprint)!=null?t:pt.enableSvgFingerprint,confidenceThreshold:(r=s.confidenceThreshold)!=null?r:pt.confidenceThreshold,fallbackToBody:(i=s.fallbackToBody)!=null?i:pt.fallbackToBody}}function Bn(s,e,t,r){const i=e.getMeta(s),n=i==null?void 0:i.selector;if(n&&!(r!=null&&r.force))return n;const a=s.nodeType===Node.ELEMENT_NODE?s:vi(s);if(!a)return n;const l=e.getMeta(a),o=l==null?void 0:l.selector;if(o&&!(r!=null&&r.force))return o;if(!t)return o!=null?o:n;const u={maxPathDepth:t.maxPathDepth,enableSvgFingerprint:t.enableSvgFingerprint,fallbackToBody:t.fallbackToBody};try{const c=Up(a,u);if(c)return l?l.selector=c:i&&(i.selector=c),c}catch(c){}return o!=null?o:n}function Wn(s){return"__ln"in s}class jp{constructor(){w(this,"length",0),w(this,"head",null),w(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Wn(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Wn(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Hn=(s,e)=>`${s}@${e}`,Gp=new Set(["id","class","name","role","title","alt","placeholder","for","type"]);function Yp(s){const e=s.toLowerCase();return Gp.has(e)||e.startsWith("data-")||e.startsWith("aria-")}class Zp{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"excludeAttribute"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"selectorOptions",null),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new jp,i=o=>{let u=o,c=wt;for(;c===wt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=o=>{const u=N.parentNode(o);if(!u||!Ha(o))return;let c=!1;if(o.nodeType===Node.TEXT_NODE){const m=u.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=mt(u)?this.mirror.getId(Wa(o)):this.mirror.getId(u),d=i(o);if(h===-1||d===-1)return r.addNode(o);const p=Ye(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{za(m,this.mirror)&&this.iframeManager.addIframe(m),Ba(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),js(o)&&this.shadowDomManager.addShadowRoot(N.shadowRoot(o),this.doc)},onIframeLoad:(m,g)=>{this.iframeManager.attachIframe(m,g),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,g)=>{this.stylesheetManager.attachLinkElement(m,g)},cssCaptured:c,selectorOptions:this.selectorOptions});p&&(e.push({parentId:h,nextId:d,node:p}),t.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const o of this.movedSet)Un(this.removesSubTreeCache,o,this.mirror)&&!this.movedSet.has(N.parentNode(o))||n(o);for(const o of this.addedSet)!Vn(this.droppedSet,o)&&!Un(this.removesSubTreeCache,o,this.mirror)||Vn(this.movedSet,o)?n(o):this.droppedSet.add(o);let a=null;for(;r.length;){let o=null;if(a){const u=this.mirror.getId(N.parentNode(a.value)),c=i(a.value);u!==-1&&c!==-1&&(o=a)}if(!o){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(N.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){o=c;break}else{const p=c.value,m=N.parentNode(p);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const g=N.host(m);if(this.mirror.getId(g)!==-1){o=c;break}}}}}}if(!o){for(;r.head;)r.removeNode(r.head.value);break}a=o.previous,r.removeNode(o.value),n(o.value)}const l={texts:this.texts.map(o=>{const u=o.node,c=N.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:o.value,selector:Bn(u,this.mirror,this.selectorOptions)}}).filter(o=>!t.has(o.id)).filter(o=>this.mirror.has(o.id)),attributes:this.attributes.map(o=>{const{attributes:u}=o;if(typeof u.style=="string"){const c=JSON.stringify(o.styleDiff),h=JSON.stringify(o._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=o.styleDiff)}return{id:this.mirror.getId(o.node),attributes:u,selector:Bn(o.node,this.mirror,this.selectorOptions,{force:Object.keys(u).some(Yp)})}}).filter(o=>!t.has(o.id)).filter(o=>this.mirror.has(o.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(N.childNodes(e),i=>N.textContent(i)||"").join("");t.attributes.value=mr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:gr(e),value:r,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!os(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=N.textContent(e.target);!se(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:fo(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,vi(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);const a=t[r],l=typeof a=="boolean",o=document.contains(t),u=Js(t),c=fs(r,this.excludeAttribute);if(i===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(a===""||a===null||typeof a=="undefined")){console.debug(`[${re()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:N.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c});return}if(fs(r,this.excludeAttribute)){console.debug(`[${re()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:N.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c});return}if(r==="value"){const p=gr(t);i=mr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:p,value:i,maskInputFn:this.maskInputFn})}if(se(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let d=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(d||(d={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(d),this.attributeMap.set(e.target,d)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!ho(t.tagName,r))if(d.attributes[r]=uo(this.doc,Fe(t.tagName),Fe(r),i),r!=="class"&&(e.oldValue===null||i===""||i!==e.oldValue)&&console.debug(`[${re()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[i===e.oldValue?"no change in value":null,i===a?"mirrored in DOM property":null,i===d.attributes[r]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:N.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,transformedValue:d.attributes[r],excludeAttribute:this.excludeAttribute,propValue:a,isBooleanAttr:l,inDOM:o,isVisible:u,isExcludeAttributeName:c}),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(g){this.unattachedDoc=this.doc}const m=this.unattachedDoc.createElement("span");e.oldValue&&m.setAttribute("style",e.oldValue);for(const g of Array.from(t.style)){const f=t.style.getPropertyValue(g),b=t.style.getPropertyPriority(g);f!==m.style.getPropertyValue(g)||b!==m.style.getPropertyPriority(g)?b===""?d.styleDiff[g]=f:d.styleDiff[g]=[f,b]:d._unchangedStyles[g]=[f,b]}for(const g of Array.from(m.style))t.style.getPropertyValue(g)===""&&(d.styleDiff[g]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?d.attributes.rr_open_mode="modal":d.attributes.rr_open_mode="non-modal");break}case"childList":{if(se(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=mt(e.target)?this.mirror.getId(N.host(e.target)):this.mirror.getId(e.target);se(e.target,this.blockClass,this.blockSelector,!1)||os(t,this.mirror,this.slimDOMOptions)||!qf(t,this.mirror)||(this.addedSet.has(t)?(Ys(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Fa(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Hn(r,i)]?Ys(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:mt(e.target)&>(e.target)?!0:void 0}),Jp(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(os(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Hn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);se(e,this.blockClass,this.blockSelector,!1)||(N.childNodes(e).forEach(r=>this.genAdds(r)),js(e)&&N.childNodes(N.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","selectorOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}resetBuffers(){this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.mapRemoves=[],this.movedMap={},this.attributes=[],this.texts=[],this.attributeMap=new WeakMap,this.removes=[]}unsetFrozen(){this.frozen=!1,this.canvasManager.unfreeze()}}function Ys(s,e){s.delete(e),N.childNodes(e).forEach(t=>Ys(s,t))}function Jp(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),N.childNodes(r).forEach(i=>t.push(i)))}}function Un(s,e,t){return s.size===0?!1:Xp(s,e)}function Xp(s,e,t){const r=N.parentNode(e);return r?s.has(r):!1}function Vn(s,e){return s.size===0?!1:Ja(s,e)}function Ja(s,e){const t=N.parentNode(e);return t?s.has(t)?!0:Ja(s,t):!1}let yt;function Kp(s){yt=s}function qp(){yt=void 0}const k=s=>yt?(...t)=>{try{return s(...t)}catch(r){if(yt&&yt(r)===!0)return;throw r}}:s,Ce=[];function st(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Xa(s,e){const t=new Zp;Ce.push(t),t.init(s);const r=new(Da())(k(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Qp({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let a=[],l;const o=Rt(k(h=>{const d=Date.now()-l;s(a.map(p=>(p.timeOffset-=d,p)),h),a=[],l=null}),n),u=k(Rt(k(h=>{const d=st(h),{clientX:p,clientY:m}=Vs(h)?h.changedTouches[0]:h;l||(l=re()),a.push({x:p,y:m,id:r.getId(d),timeOffset:re()-l}),o(typeof DragEvent!="undefined"&&h instanceof DragEvent?T.Drag:h instanceof MouseEvent?T.MouseMove:T.TouchMove)}),i,{trailing:!1})),c=[ee("mousemove",u,t),ee("touchmove",u,t),ee("drag",u,t)];return k(()=>{c.forEach(h=>h())})}function em({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const a=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let o=null;const u=c=>h=>{const d=st(h);if(se(d,r,i,!0))return;let p=null,m=c;if("pointerType"in h){switch(h.pointerType){case"mouse":p=Ae.Mouse;break;case"touch":p=Ae.Touch;break;case"pen":p=Ae.Pen;break}p===Ae.Touch?ae[c]===ae.MouseDown?m="TouchStart":ae[c]===ae.MouseUp&&(m="TouchEnd"):Ae.Pen}else Vs(h)&&(p=Ae.Touch);p!==null?(o=p,(m.startsWith("Touch")&&p===Ae.Touch||m.startsWith("Mouse")&&p===Ae.Mouse)&&(p=null)):ae[c]===ae.Click&&(p=o,o=null);const g=Vs(h)?h.changedTouches[0]:h;if(!g)return;const f=t.getId(d),{clientX:b,clientY:C}=g;k(s)(A({type:ae[m],id:f,x:b,y:C},p!==null&&{pointerType:p}))};return Object.keys(ae).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&a[c]!==!1).forEach(c=>{let h=Fe(c);const d=u(c);if(window.PointerEvent)switch(ae[c]){case ae.MouseDown:case ae.MouseUp:h=h.replace("mouse","pointer");break;case ae.TouchStart:case ae.TouchEnd:return}l.push(ee(h,d,e))}),k(()=>{l.forEach(c=>c())})}function Ka({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const a=k(Rt(k(l=>{const o=st(l);if(!o||se(o,r,i,!0))return;const u=t.getId(o);if(o===e&&e.defaultView){const c=La(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:o.scrollLeft,y:o.scrollTop})}),n.scroll||100));return ee("scroll",a,e)}function tm({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=k(Rt(k(()=>{const n=Pa(),a=_a();(t!==n||r!==a)&&(s({width:Number(a),height:Number(n)}),t=n,r=a)}),200));return ee("resize",i,e)}function rm({navigationCb:s,doc:e,sampling:t}){if(t.navigation===!1)return()=>{};const r=e.defaultView;if(!r)return()=>{};let i=r.location.href;const n=[],a=k(u=>{const c=r.location.href;c!==i&&(s({href:c,oldHref:i,navigationType:u}),i=c)}),l=$e(r.history,"pushState",function(u){return function(...c){const h=u.apply(this,c);return a("pushState"),h}});n.push(l);const o=$e(r.history,"replaceState",function(u){return function(...c){const h=u.apply(this,c);return a("replaceState"),h}});return n.push(o),n.push(ee("popstate",()=>a("popstate"),r)),n.push(ee("hashchange",()=>a("hashchange"),r)),k(()=>{n.forEach(u=>u())})}const cs=["INPUT","TEXTAREA","SELECT"],jn=new WeakMap,sm=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],Gn=new WeakMap;function im({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:a,maskInputOptions:l,maskInputFn:o,sampling:u,userTriggeredOnInput:c}){function h(v){let y=st(v);const S=v.isTrusted,x=y&&y.tagName;if(y&&x==="OPTION"&&(y=N.parentElement(y)),!y||!x||cs.indexOf(x)<0||se(y,r,i,!0)||y.classList.contains(n)||a&&y.matches(a))return;let E=y.value,$=!1;const L=gr(y)||"";L==="radio"||L==="checkbox"?$=y.checked:(l[x.toLowerCase()]||l[L])&&(E=mr({element:y,maskInputOptions:l,tagName:x,type:L,value:E,maskInputFn:o})),d(y,c?{text:E,isChecked:$,userTriggered:S}:{text:E,isChecked:$});const F=y.name;L==="radio"&&F&&$&&e.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach(D=>{if(D!==y){const H=D.value;d(D,c?{text:H,isChecked:!$,userTriggered:!1}:{text:H,isChecked:!$})}})}function d(v,y){const S=jn.get(v),x=v,E=x.hasAttribute("placeholder"),$=x.value==="",L=typeof x.defaultValue=="string"?x.defaultValue==="":!0,F=!y.userTriggered,D=!S||S.text==="",H=E&&$&&L&&D&&F&&!y.isChecked&&x.type!=="hidden"&&cs.includes(x.tagName),Z=x.tagName==="INPUT"&&x.type==="text"&&!y.userTriggered&&y.text===x.defaultValue&&!S&&x.hasAttribute("placeholder"),X=!y.userTriggered&&x.value===x.defaultValue&&!S&&x.hasAttribute("placeholder")&&!y.isChecked&&x.type!=="hidden"&&cs.includes(x.tagName),I=x.type==="checkbox"&&!y.userTriggered&&!y.isChecked&&!S,P=x.type==="radio"&&!y.userTriggered&&!y.isChecked&&!S;if(H||Z||X||I||P){console.debug(`[${re()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:N.describeNode(x),tag:x.tagName,nodeType:x.nodeType,attribute:x.attributes,value:x.value,isLikelyPhantom:H,isRenderDrivenTextInput:Z,isValueFromDefault:X,isPhantomCheckbox:I,isPhantomRadio:P});return}if(!S||S.text!==y.text||S.isChecked!==y.isChecked){jn.set(v,y);const te=t.getId(v);k(s)(oe(A({},y),{id:te}))}}const m=(u.input==="last"?["change"]:["input","change"]).map(v=>ee(v,k(h),e)),g=v=>{const y=st(v);if(!y||!y.tagName)return;if(u.input==="all"){h(v);return}const S=y.tagName,x=v.key,E=sm.includes(x),$=S==="TEXTAREA",L=e.activeElement===y,F=y.value,D=Gn.get(y);if(Gn.set(y,F),!L){h(v);return}if(E){if(!$){h(v);return}let H=D!=null?D:"",Z=0;const X=2,I=()=>{const P=y.value,te=e.activeElement===y,J=P!==H;if(!te){h(v);return}if(J)Z=0,H=P;else if(Z++,Z>=X){h(v);return}requestAnimationFrame(I)};requestAnimationFrame(I);return}};m.push(ee("keydown",k(g),e));const f=e.defaultView;if(!f)return()=>{m.forEach(v=>v())};const b=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),C=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&m.push(...C.map(v=>zr(v[0],v[1],{set(){k(h)({target:this,isTrusted:!1})}},!1,f))),k(()=>{m.forEach(v=>v())})}function $r(s){const e=[];function t(r,i){if(or("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||or("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||or("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||or("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(a)}return i}return t(s,e)}function Oe(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function nm({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:k((c,h,d)=>{const[p,m]=d,{id:g,styleId:f}=Oe(h,e,t.styleMirror);return(g&&g!==-1||f&&f!==-1)&&s({id:g,styleId:f,adds:[{rule:p,index:m}]}),c.apply(h,d)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,d=this.cssRules.length){const p=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[p,d])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:k((c,h,d)=>{const[p]=d,{id:m,styleId:g}=Oe(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,removes:[{index:p}]}),c.apply(h,d)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:k((c,h,d)=>{const[p]=d,{id:m,styleId:g}=Oe(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,replace:p}),c.apply(h,d)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:k((c,h,d)=>{const[p]=d,{id:m,styleId:g}=Oe(h,e,t.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,replaceSync:p}),c.apply(h,d)})}));const o={};ar("CSSGroupingRule")?o.CSSGroupingRule=r.CSSGroupingRule:(ar("CSSMediaRule")&&(o.CSSMediaRule=r.CSSMediaRule),ar("CSSConditionRule")&&(o.CSSConditionRule=r.CSSConditionRule),ar("CSSSupportsRule")&&(o.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(o).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:k((d,p,m)=>{const[g,f]=m,{id:b,styleId:C}=Oe(p.parentStyleSheet,e,t.styleMirror);return(b&&b!==-1||C&&C!==-1)&&s({id:b,styleId:C,adds:[{rule:g,index:[...$r(p),f||0]}]}),d.apply(p,m)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:k((d,p,m)=>{const[g]=m,{id:f,styleId:b}=Oe(p.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||b&&b!==-1)&&s({id:f,styleId:b,removes:[{index:[...$r(p),g]}]}),d.apply(p,m)})})}),k(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,a&&(r.CSSStyleSheet.prototype.replace=a),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(o).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function qa({mirror:s,stylesheetManager:e},t){var r,i,n;let a=null;t.nodeName==="#document"?a=s.getId(t):a=s.getId(N.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,o=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!l||!o?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var u;return(u=o.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=o.set)==null?void 0:c.call(this,u);if(a!==null&&a!==-1)try{e.adoptStyleSheets(u,a)}catch(d){}return h}}),k(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function om({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:k((l,o,u)=>{var c;const[h,d,p]=u;if(t.has(h))return n.apply(o,[h,d,p]);const{id:m,styleId:g}=Oe((c=o.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||g&&g!==-1)&&s({id:m,styleId:g,set:{property:h,value:d,priority:p},index:$r(o.parentRule)}),l.apply(o,u)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:k((l,o,u)=>{var c;const[h]=u;if(t.has(h))return a.apply(o,[h]);const{id:d,styleId:p}=Oe((c=o.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(d&&d!==-1||p&&p!==-1)&&s({id:d,styleId:p,remove:{property:h},index:$r(o.parentRule)}),l.apply(o,u)})}),k(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=a})}function am({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const a=k(o=>Rt(k(u=>{const c=st(u);if(!c||se(c,e,t,!0))return;const{currentTime:h,volume:d,muted:p,playbackRate:m,loop:g}=c;s({type:o,id:r.getId(c),currentTime:h,volume:d,muted:p,playbackRate:m,loop:g})}),i.media||500)),l=[ee("play",a(je.Play),n),ee("pause",a(je.Pause),n),ee("seeked",a(je.Seeked),n),ee("volumechange",a(je.VolumeChange),n),ee("ratechange",a(je.RateChange),n)];return k(()=>{l.forEach(o=>o())})}function lm({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(o,u,c){const h=new n(o,u,c);return i.set(h,{family:o,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(ArrayBuffer.isView(u)?new Uint8Array(u.buffer,u.byteOffset,u.byteLength):new Uint8Array(u)))}),h};const a=$e(e.fonts,"add",function(l){return function(o){return setTimeout(k(()=>{const u=i.get(o);u&&(s(u),i.delete(o))}),0),l.apply(this,[o])}});return r.push(()=>{t.FontFace=n}),r.push(a),k(()=>{r.forEach(l=>l())})}function cm(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let a=!0;const l=k(()=>{const o=e.getSelection();if(!o||a&&(o!=null&&o.isCollapsed))return;a=o.isCollapsed||!1;const u=[],c=o.rangeCount||0;for(let h=0;h<c;h++){const d=o.getRangeAt(h),{startContainer:p,startOffset:m,endContainer:g,endOffset:f}=d;se(p,r,i,!0)||se(g,r,i,!0)||u.push({start:t.getId(p),startOffset:m,end:t.getId(g),endOffset:f})}n({ranges:u})});return l(),ee("selectionchange",l)}function um({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:$e(t.customElements,"define",function(i){return function(n,a,l){try{e({define:{name:n}})}catch(o){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,a,l])}})}function hm(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:a,navigationCb:l,inputCb:o,mediaInteractionCb:u,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:d,fontCb:p,selectionCb:m,customElementCb:g}=s;s.mutationCb=(...f)=>{e.mutation&&e.mutation(...f),t(...f)},s.mousemoveCb=(...f)=>{e.mousemove&&e.mousemove(...f),r(...f)},s.mouseInteractionCb=(...f)=>{e.mouseInteraction&&e.mouseInteraction(...f),i(...f)},s.scrollCb=(...f)=>{e.scroll&&e.scroll(...f),n(...f)},s.viewportResizeCb=(...f)=>{e.viewportResize&&e.viewportResize(...f),a(...f)},s.navigationCb=(...f)=>{e.navigation&&e.navigation(...f),l(...f)},s.inputCb=(...f)=>{e.input&&e.input(...f),o(...f)},s.mediaInteractionCb=(...f)=>{e.mediaInteaction&&e.mediaInteaction(...f),u(...f)},s.styleSheetRuleCb=(...f)=>{e.styleSheetRule&&e.styleSheetRule(...f),c(...f)},s.styleDeclarationCb=(...f)=>{e.styleDeclaration&&e.styleDeclaration(...f),h(...f)},s.canvasMutationCb=(...f)=>{e.canvasMutation&&e.canvasMutation(...f),d(...f)},s.fontCb=(...f)=>{e.font&&e.font(...f),p(...f)},s.selectionCb=(...f)=>{e.selection&&e.selection(...f),m(...f)},s.customElementCb=(...f)=>{e.customElement&&e.customElement(...f),g(...f)}}function dm(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};hm(s,e);let r;s.recordDOM&&(r=Xa(s,s.doc));const i=Qp(s),n=em(s),a=Ka(s),l=tm(s,{win:t}),o=rm(s),u=im(s),c=am(s);let h=()=>{},d=()=>{},p=()=>{},m=()=>{};s.recordDOM&&(h=nm(s,{win:t}),d=qa(s,s.doc),p=om(s,{win:t}),s.collectFonts&&(m=lm(s)));const g=cm(s),f=um(s),b=[];for(const C of s.plugins)b.push(C.observer(C.callback,t,C.options));return k(()=>{var C;Ce.forEach(v=>v.reset()),(C=s.visibilityManager)==null||C.reset(),r==null||r.disconnect(),i(),n(),a(),l(),o(),u(),c(),h(),d(),p(),m(),g(),f(),b.forEach(v=>v())})}function or(s){return typeof window[s]!="undefined"}function ar(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Yn{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),a=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),a.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class fm{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new Yn(co)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Yn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case _.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:_.IncrementalSnapshot,data:{source:T.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case _.Meta:case _.Load:case _.DomContentLoaded:return!1;case _.Plugin:return t;case _.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case _.IncrementalSnapshot:switch(t.data.source){case T.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case T.Drag:case T.TouchMove:case T.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case T.ViewportResize:return!1;case T.MediaInteraction:case T.MouseInteraction:case T.Scroll:case T.CanvasMutation:case T.Input:return this.replaceIds(t.data,e,["id"]),t;case T.StyleSheetRule:case T.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case T.Font:return t;case T.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case T.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Ua.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class pm{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!gt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Xa(oe(A({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Ka(oe(A({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(N.host(e))),this.restoreHandlers.push(qa({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push($e(e.prototype,"attachShadow",function(i){return function(n){const a=i.call(this,n),l=N.shadowRoot(this);return l&&Ha(this)&&r.addShadowRoot(l,t),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mm=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var lr=0;lr<Ze.length;lr++)mm[Ze.charCodeAt(lr)]=lr;var gm=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Ze[e[t]>>2],i+=Ze[(e[t]&3)<<4|e[t+1]>>4],i+=Ze[(e[t+1]&15)<<2|e[t+2]>>6],i+=Ze[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Zn=new Map;function ym(s,e){let t=Zn.get(s);return t||(t=new Map,Zn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Qa=(s,e,t)=>{if(!s||!(tl(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=ym(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function pr(s,e,t){if(s instanceof Array)return s.map(r=>pr(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=gm(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[pr(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[pr(s.data,e,t),s.width,s.height]};if(tl(s,e)||typeof s=="object"){const r=s.constructor.name,i=Qa(s,e,t);return{rr_type:r,index:i}}}}return s}const el=(s,e,t)=>s.map(r=>pr(r,e,t)),tl=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function bm(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const a of n)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=$e(e.CanvasRenderingContext2D.prototype,a,function(o){return function(...u){return se(this.canvas,t,r,!0)||setTimeout(()=>{const c=el(u,e,this);s(this.canvas,{type:rt["2D"],property:a,args:c})},0),o.apply(this,u)}});i.push(l)}catch(l){const o=zr(e.CanvasRenderingContext2D.prototype,a,{set(u){s(this.canvas,{type:rt["2D"],property:a,args:[u],setter:!0})}});i.push(o)}return()=>{i.forEach(a=>a())}}function wm(s){return s==="experimental-webgl"?"webgl":s}function Jn(s,e,t,r){const i=[];try{const n=$e(s.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...o){if(!se(this,e,t,!0)){const u=wm(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(o[0]&&typeof o[0]=="object"){const c=o[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[l,...o])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function Xn(s,e,t,r,i,n){const a=[],l=Object.getOwnPropertyNames(s);for(const o of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof s[o]!="function")continue;const u=$e(s,o,function(c){return function(...h){const d=c.apply(this,h);if(Qa(d,n,this),"tagName"in this.canvas&&!se(this.canvas,r,i,!0)){const p=el(h,n,this),m={type:e,property:o,args:p};t(this.canvas,m)}return d}});a.push(u)}catch(u){const c=zr(s,o,{set(h){t(this.canvas,{type:e,property:o,args:[h],setter:!0})}});a.push(c)}return a}function Sm(s,e,t,r){const i=[];return i.push(...Xn(e.WebGLRenderingContext.prototype,rt.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...Xn(e.WebGL2RenderingContext.prototype,rt.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const rl="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Cm=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Kn=typeof self!="undefined"&&self.Blob&&new Blob([Cm(rl)],{type:"text/javascript;charset=utf-8"});function vm(s){let e;try{if(e=Kn&&(self.URL||self.webkitURL).createObjectURL(Kn),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+rl,{name:s==null?void 0:s.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class xm{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(this,"processMutation",(o,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:a,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&t==="all"&&this.initCanvasMutationObserver(r,i,n),a&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const a=Jn(t,r,i,!0),l=new Map,o=new vm;o.onmessage=m=>{const{id:g}=m.data;if(l.set(g,!1),!("base64"in m.data))return;const{base64:f,type:b,width:C,height:v}=m.data;this.mutationCb({id:g,type:rt["2D"],commands:[{property:"clearRect",args:[0,0,C,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:b}]},0,0]}]})};const u=1e3/e;let c=0,h;const d=()=>{const m=[];return t.document.querySelectorAll("canvas").forEach(g=>{se(g,r,i,!0)||m.push(g)}),m},p=m=>{if(c&&m-c<u){h=requestAnimationFrame(p);return}c=m,d().forEach(async g=>{var f;const b=this.mirror.getId(g);if(l.get(b)||g.width===0||g.height===0)return;if(l.set(b,!0),["webgl","webgl2"].includes(g.__context)){const v=g.getContext(g.__context);((f=v==null?void 0:v.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const C=await createImageBitmap(g);o.postMessage({id:b,bitmap:C,width:g.width,height:g.height,dataURLOptions:n.dataURLOptions},[C])}),h=requestAnimationFrame(p)};h=requestAnimationFrame(p),this.resetObservers=()=>{a(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Jn(e,t,r,!1),n=bm(this.processMutation.bind(this),e,t,r),a=Sm(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(a=>{const u=a,{type:l}=u;return He(u,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}function qn(s,e,t){var c,h,d,p,m,g;const r=(c=t==null?void 0:t.root)!=null?c:null,i=(h=t==null?void 0:t.threshold)!=null?h:.5,n=(d=t==null?void 0:t.sensitivity)!=null?d:.05,a=Am((p=t==null?void 0:t.rootMargin)!=null?p:"0px"),l=new Map,o=Im(r),u=Em(o,a);for(const f of s){const b=f.getBoundingClientRect();let C=Mm(),v=0;b.width>0&&b.height>0&&(C=$m(b,u),v=Rm(b,C),v=Math.round(v*100)/100);const y=Om(f),S=(m=e.get(f))!=null?m:null,x=(g=S==null?void 0:S.intersectionRatio)!=null?g:0,E=v,$=(S==null?void 0:S.isStyleVisible)&&x>i,L=y&&E>i;!S||$!==L||$!==L&&Math.abs(E-x)>n?l.set(f,{target:f,isVisible:L,isStyleVisible:y,intersectionRatio:E,intersectionRect:C,oldValue:S}):l.set(f,S)}return l}function Am(s){const e=s.trim().split(/\s+/),t=(r,i)=>r.endsWith("%")?parseFloat(r)/100*i:parseFloat(r)||0;return function(r){const i=t(e[0]||"0px",r.height),n=t(e[1]||e[0]||"0px",r.width),a=t(e[2]||e[0]||"0px",r.height),l=t(e[3]||e[1]||e[0]||"0px",r.width);return{top:i,right:n,bottom:a,left:l,width:0,height:0}}}function Im(s){return s?s.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function Em(s,e){const t=e(s);return new DOMRect(s.left-t.left,s.top-t.top,s.width+t.left+t.right,s.height+t.top+t.bottom)}function $m(s,e){const t=Math.max(s.top,e.top),r=Math.max(s.left,e.left),i=Math.min(s.bottom,e.bottom),n=Math.min(s.right,e.right),a=Math.max(0,n-r),l=Math.max(0,i-t);return{top:t,left:r,bottom:i,right:n,width:a,height:l}}function Rm(s,e){const t=s.width*s.height,r=e.width*e.height;return t>0?r/t:0}function Mm(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function Om(s){const e=getComputedStyle(s);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class Nm{constructor(e){var u,c,h,d,p,m;w(this,"frozen",!1),w(this,"locked",!1),w(this,"pending",new Map),w(this,"mirror"),w(this,"mutationCb"),w(this,"rafId",null),w(this,"intervalId",null),w(this,"rafThrottle"),w(this,"lastFlushTime",0),w(this,"elements",new Set),w(this,"previousState",new Map),w(this,"root",null),w(this,"threshold"),w(this,"sensitivity"),w(this,"rootMargin"),w(this,"hasInitialized",!1),w(this,"mode","none"),w(this,"debounce",50),w(this,"throttle",100),w(this,"buffer",new Map),w(this,"debounceTimer",null),w(this,"lastThrottleTime",0),w(this,"disabled",!1),w(this,"notifyActivity");const{doc:t,mirror:r,sampling:i,mutationCb:n,notifyActivity:a}=e;if(this.mirror=r,this.mutationCb=n,this.notifyActivity=a,this.rootMargin="0px",i===!1){this.disabled=!0;return}const l=typeof i=="object"&&i!==null?i:{};this.mode=(u=l==null?void 0:l.mode)!=null?u:"none",this.debounce=Number((c=l==null?void 0:l.debounce)!=null?c:100),this.throttle=Number((h=l==null?void 0:l.throttle)!=null?h:100),this.threshold=Number((d=l==null?void 0:l.threshold)!=null?d:.5),this.sensitivity=Number((p=l==null?void 0:l.sensitivity)!=null?p:.05),this.rafThrottle=Number((m=l==null?void 0:l.rafThrottle)!=null?m:50),t.querySelectorAll("*").forEach(g=>this.observe(g)),new MutationObserver(g=>{g.forEach(f=>{f.addedNodes.forEach(b=>{b.nodeType===Node.ELEMENT_NODE&&(this.observe(b),b.querySelectorAll("*").forEach(C=>this.observe(C)))}),f.removedNodes.forEach(b=>{b.nodeType===Node.ELEMENT_NODE&&this.unobserve(b)})})}).observe(t.body,{childList:!0,subtree:!0}),this.startPendingFlushLoop()}startPendingFlushLoop(){if(!this.disabled)if(typeof requestAnimationFrame=="function"){const e=t=>{t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations()),this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}else{const e=()=>{const t=performance.now();t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations())};this.intervalId=setInterval(e,this.rafThrottle)}}flushPendingVisibilityMutations(){if(this.disabled||this.frozen||this.locked||this.elements.size===0)return;const e=qn(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,r]of e.entries()){const i=this.previousState.get(t);if(!i||i.isVisible!==r.isVisible||Math.abs(i.intersectionRatio-r.intersectionRatio)>this.sensitivity){const a=this.mirror.getId(t);a!==-1&&this.buffer.set(t,{id:a,isVisible:r.isVisible,ratio:r.intersectionRatio}),this.previousState.set(t,r)}}if(this.previousState=e,!this.hasInitialized){this.hasInitialized=!0,this.buffer.clear();return}this.scheduleEmit()}scheduleEmit(){if(this.mode==="debounce")clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.flushBuffer(),this.debounce);else if(this.mode==="throttle"){const e=performance.now();e-this.lastThrottleTime>=this.throttle&&(this.lastThrottleTime=e,this.flushBuffer())}else this.flushBuffer()}flushBuffer(){var e;if(this.frozen||this.locked||this.buffer.size===0)return;const t=Array.from(this.buffer.values()),r=t.length;this.buffer.clear(),this.mutationCb({mutations:t}),(e=this.notifyActivity)==null||e.call(this,r)}observe(e){this.disabled||this.elements.add(e)}unobserve(e){this.disabled||(this.elements.delete(e),this.previousState.delete(e),this.pending.delete(e))}freeze(){this.frozen=!0,this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}unfreeze(){this.frozen=!1,this.flushPendingVisibilityMutations()}lock(){this.locked=!0,this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}unlock(){this.locked=!1,this.buffer.clear(),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),!this.disabled&&this.elements.size>0&&(this.previousState=qn(this.elements,new Map,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin}))}unsetFrozen(){this.frozen=!1}reset(){this.elements.clear(),this.previousState.clear(),this.pending.clear(),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}}class Tm{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new ep),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let a;this.styleMirror.has(n)?a=this.styleMirror.getId(n):(a=this.styleMirror.add(n),i.push({styleId:a,rules:Array.from(n.rules||CSSRule,(l,o)=>({rule:to(l,n.href),index:o}))})),r.styleIds.push(a)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class km{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}const Dm="3.1.1-alpha.3";let j,Me,us,Je=!1;const Rr=[];let _e;function Lm(s){return new Promise(t=>{const r=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})},i=(()=>{let n=!1;return()=>{n||(n=!0,r())}})();["interactive","complete"].includes(s.document.readyState)?i():(s.addEventListener("DOMContentLoaded",i,{once:!0}),s.addEventListener("load",i,{once:!0}),setTimeout(()=>{i()},5e3))})}try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Di=s.contentWindow)==null?void 0:Di.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const de=Ll();function le(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryNvm:i,checkoutDebounce:n,blockClass:a="rr-block",blockSelector:l=null,ignoreClass:o="rr-ignore",ignoreSelector:u=null,excludeAttribute:c,maskTextClass:h="rr-mask",maskTextSelector:d=null,inlineStylesheet:p=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:f,maskInputFn:b,maskTextFn:C,hooks:v,packFn:y,sampling:S={},dataURLOptions:x={},mousemoveWait:E,recordDOM:$=!0,recordCanvas:L=!1,recordCrossOriginIframes:F=!1,recordAfter:D=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",flushCustomEvent:H=s.flushCustomEvent!==void 0?s.flushCustomEvent:"after",userTriggeredOnInput:Z=!1,collectFonts:X=!1,inlineImages:I=!1,plugins:P,keepIframeSrcFn:te=()=>!1,ignoreCSSAttributes:J=new Set([]),selector:ue,errorHandler:it}=s;Kp(it);const fe=F?window.parent===window:!0;let nt=!1;if(!fe)try{window.parent.document&&(nt=!1)}catch(R){nt=!0}if(fe&&!e)throw new Error("emit function is required");if(!fe&&!nt)return()=>{};E!==void 0&&S.mousemove===void 0&&(S.mousemove=E),de.reset();const Br=c===void 0?/.^/:c,Wr=m===!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}:g!==void 0?g:{password:!0},Hr=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all",headTitleMutations:f==="all"}:f||{},Ii=Vp(ue);Qf();let Ei,Ur=0,Dt=0,$i=0,We=!1,ge=null,ot=null;const Ri=R=>{for(const ne of P||[])ne.eventProcessor&&(R=ne.eventProcessor(R));return y&&!nt&&(R=y(R)),R},Lt=()=>{ge=null,We=!1,ot=null,Me(!0),Ce.forEach(R=>{R.resetBuffers(),R.unsetFrozen()}),ie&&ie.unsetFrozen()};j=(R,ne)=>{var V;const K=R;if(K.timestamp=re(),K.checkoutId=$i,(V=Ce[0])!=null&&V.isFrozen()&&!We&&K.type!==_.FullSnapshot&&!(K.type===_.IncrementalSnapshot&&K.data.source===T.Mutation)&&(Ce.forEach(ce=>ce.unfreeze()),ie==null||ie.unfreeze()),fe)e==null||e(Ri(K),ne);else if(nt){const ce={type:"rrweb",event:Ri(K),isCheckout:ne};window.parent.postMessage(ce,"*")}if(K.type===_.FullSnapshot)Ei=K,Ur=0,Dt=0;else if(K.type===_.IncrementalSnapshot){if(K.data.source===T.Mutation&&K.data.isAttachIframe)return;if(K.data.source!==T.Visibility){Ur++;const ce=r&&Ur>=r,Re=t&&K.timestamp-Ei.timestamp>t;if(ce||Re)if(n){We||(We=!0,ot=re(),Ce.forEach(ol=>ol.freeze()),ie==null||ie.freeze()),ge&&clearTimeout(ge);const z=re()-ot,at=n*3;z>=at?Lt():ge=setTimeout(()=>Lt(),n)}else Me(!0)}}};const Pt=R=>{j({type:_.IncrementalSnapshot,data:A({source:T.Mutation},R)})},sl=R=>{j({type:_.IncrementalSnapshot,data:A({source:T.Visibility},R)})},Mi=R=>j({type:_.IncrementalSnapshot,data:A({source:T.Scroll},R)}),Oi=R=>j({type:_.IncrementalSnapshot,data:A({source:T.CanvasMutation},R)}),il=R=>j({type:_.IncrementalSnapshot,data:A({source:T.AdoptedStyleSheet},R)}),Le=new Tm({mutationCb:Pt,adoptedStyleSheetCb:il}),Pe=new fm({mirror:de,mutationCb:Pt,stylesheetManager:Le,recordCrossOriginIframes:F,wrappedEmit:j});for(const R of P||[])R.getMirror&&R.getMirror({nodeMirror:de,crossOriginIframeMirror:Pe.crossOriginIframeMirror,crossOriginIframeStyleMirror:Pe.crossOriginIframeStyleMirror});const Vr=new km;us=new xm({recordCanvas:L,mutationCb:Oi,win:window,blockClass:a,blockSelector:l,mirror:de,sampling:S.canvas,dataURLOptions:x});const _t=new pm({mutationCb:Pt,scrollCb:Mi,bypassOptions:{blockClass:a,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:Br,inlineStylesheet:p,maskInputOptions:Wr,dataURLOptions:x,maskTextFn:C,maskInputFn:b,recordCanvas:L,inlineImages:I,sampling:S,slimDOMOptions:Hr,iframeManager:Pe,stylesheetManager:Le,canvasManager:us,keepIframeSrcFn:te,processedNodeManager:Vr,selectorOptions:Ii},mirror:de}),nl=$&&(i!=null||(S==null?void 0:S.visibility)!==void 0&&(S==null?void 0:S.visibility)!==!1);let ie;if(nl){const R=typeof(S==null?void 0:S.visibility)=="object"&&(S==null?void 0:S.visibility)!==null?S.visibility:{},ne=R.recordVisibility===!0;ie=new Nm({doc:document,mirror:de,sampling:R,mutationCb:ne?sl:()=>{},notifyActivity:i!=null?V=>{if(Dt+=V,Dt>=i)if(Dt=0,n){We||(We=!0,ot=re(),Ce.forEach(Re=>Re.freeze()),ie==null||ie.freeze()),ge&&clearTimeout(ge);const K=re()-ot,ce=n*3;K>=ce?Lt():ge=setTimeout(()=>Lt(),n)}else Me(!0)}:void 0})}Me=(R=!1)=>{if(!$)return;$i++,j({type:_.Meta,data:{href:window.location.href,width:_a(),height:Pa()}},R),Le.reset(),_t.init(),Ce.forEach(V=>V.lock()),ie==null||ie.lock();const ne=eu(document,{mirror:de,blockClass:a,blockSelector:l,maskTextClass:h,maskTextSelector:d,excludeAttribute:Br,inlineStylesheet:p,maskAllInputs:Wr,maskTextFn:C,maskInputFn:b,slimDOM:Hr,dataURLOptions:x,recordCanvas:L,inlineImages:I,onSerialize:V=>{za(V,de)&&Pe.addIframe(V),Ba(V,de)&&Le.trackLinkElement(V),js(V)&&_t.addShadowRoot(N.shadowRoot(V),document)},onIframeLoad:(V,K)=>{Pe.attachIframe(V,K),_t.observeAttachShadow(V)},onStylesheetLoad:(V,K)=>{Le.attachLinkElement(V,K)},keepIframeSrcFn:te,selector:ue});if(!ne)return console.warn("Failed to snapshot the document");j({type:_.FullSnapshot,data:{node:ne,initialOffset:La(window)}},R),Ce.forEach(V=>V.unlock()),ie==null||ie.unlock(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Le.adoptStyleSheets(document.adoptedStyleSheets,de.getId(document))},_e=()=>{for(const R of Rr)j(R);Rr.length=0};try{const R=[],ne=ce=>{var Re;return k(dm)({mutationCb:Pt,mousemoveCb:(z,at)=>j({type:_.IncrementalSnapshot,data:{source:at,positions:z}}),mouseInteractionCb:z=>j({type:_.IncrementalSnapshot,data:A({source:T.MouseInteraction},z)}),scrollCb:Mi,viewportResizeCb:z=>j({type:_.IncrementalSnapshot,data:A({source:T.ViewportResize},z)}),navigationCb:z=>{console.debug(`[${re()}] [rrweb:record/navigation] \u{1F9ED} Navigation detected:`,z.navigationType,z.oldHref,"\u2192",z.href),Me(!0)},inputCb:z=>j({type:_.IncrementalSnapshot,data:A({source:T.Input},z)}),mediaInteractionCb:z=>j({type:_.IncrementalSnapshot,data:A({source:T.MediaInteraction},z)}),styleSheetRuleCb:z=>j({type:_.IncrementalSnapshot,data:A({source:T.StyleSheetRule},z)}),styleDeclarationCb:z=>j({type:_.IncrementalSnapshot,data:A({source:T.StyleDeclaration},z)}),canvasMutationCb:Oi,visibilityManager:ie,fontCb:z=>j({type:_.IncrementalSnapshot,data:A({source:T.Font},z)}),selectionCb:z=>{j({type:_.IncrementalSnapshot,data:A({source:T.Selection},z)})},customElementCb:z=>{j({type:_.IncrementalSnapshot,data:A({source:T.CustomElement},z)})},blockClass:a,ignoreClass:o,ignoreSelector:u,maskTextClass:h,maskTextSelector:d,excludeAttribute:Br,maskInputOptions:Wr,inlineStylesheet:p,sampling:S,recordDOM:$,recordCanvas:L,inlineImages:I,userTriggeredOnInput:Z,collectFonts:X,doc:ce,maskInputFn:b,maskTextFn:C,keepIframeSrcFn:te,blockSelector:l,slimDOMOptions:Hr,dataURLOptions:x,selectorOptions:Ii,mirror:de,iframeManager:Pe,stylesheetManager:Le,shadowDomManager:_t,processedNodeManager:Vr,canvasManager:us,ignoreCSSAttributes:J,plugins:((Re=P==null?void 0:P.filter(z=>z.observer))==null?void 0:Re.map(z=>({observer:z.observer,options:z.options,callback:at=>j({type:_.Plugin,data:{plugin:z.name,payload:at}})})))||[]},v)};Pe.addLoadListener(ce=>{try{R.push(ne(ce.contentDocument))}catch(Re){console.warn(Re)}});const V=()=>{H==="before"&&_e(),Me(),R.push(ne(document)),Je=!0,H==="after"&&_e()},K=async()=>{H==="before"&&_e(),D==="DOMContentStabilized"&&(console.debug(`[${re()}] [rrweb:record] \u{1F7E2} Waiting for DOM stabilization...`),await Lm(window),console.debug(`[${re()}] [rrweb:record] \u2705 DOM stabilized, starting recording`)),console.debug(`[${re()}] [rrweb:record] \u2705 Init dom and takeFullSnapshot `),Me(),R.push(ne(document)),Je=!0,H==="after"&&_e()};return document.readyState==="interactive"||document.readyState==="complete"?V():(R.push(ee("DOMContentLoaded",()=>{j({type:_.DomContentLoaded,data:{}}),D==="DOMContentLoaded"&&V()})),R.push(ee("load",()=>{j({type:_.Load,data:{}}),D==="load"&&V()},window))),()=>{ge&&(clearTimeout(ge),ge=null),_e(),R.forEach(ce=>ce()),Vr.destroy(),Je=!1,qp()}}catch(R){console.warn(R)}}le.getVersion=()=>Dm;le.isRecording=()=>Je;le.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${Rr.length} events`),_e()};le.addCustomEvent=(s,e)=>{const t={type:_.Custom,data:{tag:s,payload:e}};if(!Je){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${s}`),Rr.push(t);return}j(t)};le.freezePage=()=>{Ce.forEach(s=>s.freeze())};le.takeFullSnapshot=s=>{if(!Je)throw new Error("please take full snapshot after start recording");Me(s)};le.mirror=de;var Qn;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(Qn||(Qn={}));const{getVersion:Cg}=le,{isRecording:vg}=le,{flushCustomEventQueue:xg}=le,{addCustomEvent:Ag}=le,{freezePage:Ig}=le,{takeFullSnapshot:Eg}=le;exports.record=le;
|
|
79
79
|
;if (typeof module.exports == "object" && typeof exports == "object") {
|
|
80
80
|
var __cp = (to, from, except, desc) => {
|
|
81
81
|
if ((from && typeof from === "object") || typeof from === "function") {
|