@leadping/consent 1.0.3 → 1.0.4
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/browser/index.js +9 -9
- package/dist/browser/index.js.map +3 -3
- package/dist/browser/leadping-consent.min.js +9 -9
- package/dist/browser/leadping-consent.min.js.map +3 -3
- package/dist/esm/capture.d.ts +6 -1
- package/dist/esm/capture.js +33 -15
- package/dist/esm/embed.js +32 -18
- package/dist/esm/types.d.ts +2 -1
- package/dist/leadping-consent.js +66 -36
- package/dist/leadping-consent.js.map +3 -3
- package/dist/leadping-consent.min.js +19 -19
- package/dist/leadping-consent.min.js.map +4 -4
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var LeadpingConsent=(()=>{var Rt=Object.defineProperty;var Mn=Object.getOwnPropertyDescriptor;var Nn=Object.getOwnPropertyNames;var On=Object.prototype.hasOwnProperty;var In=(e,t)=>{for(var s in t)Rt(e,s,{get:t[s],enumerable:!0})},An=(e,t,s,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Nn(t))!On.call(e,r)&&r!==s&&Rt(e,r,{get:()=>t[r],enumerable:!(a=Mn(t,r))||a.enumerable});return e};var Dn=e=>An(Rt({},"__esModule",{value:!0}),e);var Ka={};In(Ka,{ConsentCapture:()=>_e,attach:()=>Rn});var Tn=Object.defineProperty,_n=(e,t,s)=>t in e?Tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,I=(e,t,s)=>_n(e,typeof t!="symbol"?t+"":t,s),ls,kn=Object.defineProperty,Pn=(e,t,s)=>t in e?kn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,us=(e,t,s)=>Pn(e,typeof t!="symbol"?t+"":t,s),X=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(X||{}),cs={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},hs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},je={},Ai={},Ln=()=>!!globalThis.Zone;function Vr(e){if(je[e])return je[e];let t=globalThis[e],s=t.prototype,a=e in cs?cs[e]:void 0,r=!!(a&&a.every(m=>{var l,p;return!!((p=(l=Object.getOwnPropertyDescriptor(s,m))==null?void 0:l.get)!=null&&p.toString().includes("[native code]"))})),c=e in hs?hs[e]:void 0,f=!!(c&&c.every(m=>{var l;return typeof s[m]=="function"&&((l=s[m])==null?void 0:l.toString().includes("[native code]"))}));if(r&&f&&!Ln())return je[e]=t.prototype,t.prototype;try{let m=document.createElement("iframe");m.style.display="none",document.body.appendChild(m);let l=m.contentWindow;if(!l)return t.prototype;let p=l[e].prototype;if(!p)return m.remove(),s;let i=navigator.userAgent;return i.includes("Safari")&&!i.includes("Chrome")?(m.classList.add("rr-block"),m.setAttribute("__rrwebUntaintedMutationObserver",""),Ai[e]=()=>m.remove()):m.remove(),je[e]=p}catch{return s}}var Mt={};function ne(e,t,s){var a,r;let c=(a=Mt[e])==null?void 0:a[s];if(c)return c.call(t);let f=Vr(e),m=(r=Object.getOwnPropertyDescriptor(f,s))==null?void 0:r.get;return m?((Mt[e]||(Mt[e]={}))[s]=m,m.call(t)):t[s]}var Nt={};function Di(e,t,s){let a=`${e}.${String(s)}`;if(Nt[a])return Nt[a].bind(t);let c=Vr(e)[s];return typeof c!="function"?t[s]:(Nt[a]=c,c.bind(t))}function Fn(e){return ne("Node",e,"ownerDocument")}function Un(e){return ne("Node",e,"childNodes")}function Bn(e){return ne("Node",e,"parentNode")}function $n(e){return ne("Node",e,"parentElement")}function Wn(e){return ne("Node",e,"textContent")}function zn(e){return ne("Node",e,"firstChild")}function qn(e){return ne("Node",e,"lastChild")}function Vn(e){return ne("Node",e,"nextSibling")}function jn(e){return ne("Node",e,"previousSibling")}function Gn(e,t){return Di("Node",e,"contains")(t)}function Hn(e){return Di("Node",e,"getRootNode")()}function Yn(e){return!e||!("host"in e)?null:ne("ShadowRoot",e,"host")}function Jn(e){return e.styleSheets}function Xn(e){return!e||!("shadowRoot"in e)?null:ne("Element",e,"shadowRoot")}function Qn(e,t){return ne("Element",e,"querySelector")(t)}function Zn(e,t){return ne("Element",e,"querySelectorAll")(t)}function Kn(){return[Vr("MutationObserver").constructor,Ai.MutationObserver??(()=>{})]}var Ti=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ti=()=>new Date().getTime());function eo(e,t,s){try{if(!(t in e))return()=>{};let a=e[t],r=s(a);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:a}})),e[t]=r,()=>{e[t]=a}}catch{return()=>{}}}var Z={ownerDocument:Fn,childNodes:Un,parentNode:Bn,parentElement:$n,textContent:Wn,firstChild:zn,lastChild:qn,nextSibling:Vn,previousSibling:jn,contains:Gn,getRootNode:Hn,host:Yn,styleSheets:Jn,shadowRoot:Xn,querySelector:Qn,querySelectorAll:Zn,nowTimestamp:Ti,mutationObserverCtor:Kn,patch:eo};function _i(e){return e.nodeType===e.ELEMENT_NODE}function Le(e){let t=e&&"host"in e&&"mode"in e&&Z.host(e)||null;return!!(t&&"shadowRoot"in t&&Z.shadowRoot(t)===e)}function Fe(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function to(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function ro(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let s=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?s.push("layer"):e.layerName&&s.push(`layer(${e.layerName})`),e.supportsText&&s.push(`supports(${e.supportsText})`),e.media.length&&s.push(e.media.mediaText),s.join(" ")+";"}function Tr(e){try{let t=e.rules||e.cssRules;if(!t)return null;let s=e.href;!s&&e.ownerNode&&(s=e.ownerNode.baseURI);let a=Array.from(t,r=>ki(r,s)).join("");return to(a)}catch{return null}}function ki(e,t){if(io(e)){let s;try{s=Tr(e.styleSheet)||ro(e)}catch{s=e.cssText}return e.styleSheet.href?nt(s,e.styleSheet.href):s}else{let s=e.cssText;return no(e)&&e.selectorText.includes(":")&&(s=so(s)),t?nt(s,t):s}}function so(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function io(e){return"styleSheet"in e}function no(e){return"selectorText"in e}var rt=class{constructor(){us(this,"idNodeMap",new Map),us(this,"nodeMetaMap",new WeakMap)}getId(t){var s;return t?((s=this.getMeta(t))==null?void 0:s.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let s=this.getId(t);this.idNodeMap.delete(s),t.childNodes&&t.childNodes.forEach(a=>this.removeNodeFromMap(a))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,s){let a=s.id;this.idNodeMap.set(a,t),this.nodeMetaMap.set(t,s)}replace(t,s){let a=this.getNode(t);if(a){let r=this.nodeMetaMap.get(a);r&&this.nodeMetaMap.set(s,r)}this.idNodeMap.set(t,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function oo(){return new rt}function st({element:e,maskInputOptions:t,tagName:s,type:a,value:r,maskInputFn:c}){let f=r||"",m=a&&ve(a);return(t[s.toLowerCase()]||m&&t[m])&&(c?f=c(f,e):f="*".repeat(f.length)),f}function ve(e){return e.toLowerCase()}var fs="__rrweb_original__";function ao(e){let t=e.getContext("2d");if(!t)return!0;let s=50;for(let a=0;a<e.width;a+=s)for(let r=0;r<e.height;r+=s){let c=t.getImageData,f=fs in c?c[fs]:c;if(new Uint32Array(f.call(t,a,r,Math.min(s,e.width-a),Math.min(s,e.height-r)).data.buffer).some(l=>l!==0))return!1}return!0}function it(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ve(t):null}function Pi(e,t){let s;try{s=new URL(e,t??window.location.href)}catch{return null}let a=/\.([0-9a-z]+)(?:$)/i,r=s.pathname.match(a);return r?.[1]??null}function lo(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var uo=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,co=/^(?:[a-z+]+:)?\/\//i,ho=/^www\..*/i,fo=/^(data:)([^,]*),(.*)/i;function nt(e,t){return(e||"").replace(uo,(s,a,r,c,f,m)=>{let l=r||f||m,p=a||c||"";if(!l)return s;if(co.test(l)||ho.test(l))return`url(${p}${l}${p})`;if(fo.test(l))return`url(${p}${l}${p})`;if(l[0]==="/")return`url(${p}${lo(t)+l}${p})`;let i=l.split("#")[0],h=l.substring(i.length),o=t.split("#")[0].split("/"),n=i.split("/");o.pop();for(let d of n)d!=="."&&(d===".."?o.pop():o.push(d));return`url(${p}${o.join("/")}${h}${p})`})}var Li="(?:/\\*[^*]*\\*/)|[\\s;]",po=new RegExp(`${Li}|\\b(0)px?`,"g"),mo=new RegExp(Li,"g");function Ge(e,t=!1){return t?e.replace(mo,""):e.replace(po,"$1")}function go(e,t,s=!1){let a=Array.from(t.childNodes),r=[],c=0;if(a.length>1&&e&&typeof e=="string"){let f=Ge(e,s),m=f.length/e.length;for(let l=1;l<a.length;l++)if(a[l].textContent&&typeof a[l].textContent=="string"){let p=Ge(a[l].textContent,s),i=100,h=3;for(;h<p.length&&(p[h].match(/[a-zA-Z0-9]/)||p.indexOf(p.substring(0,h),1)!==-1);h++);for(;h<p.length;h++){let o=p.substring(0,h),n=f.split(o),d=-1;if(n.length===2)d=n[0].length;else if(n.length>2&&n[0]===""&&a[l-1].textContent!=="")d=f.indexOf(o,1);else if(n.length===1){if(o=o.substring(0,o.length-1),n=f.split(o),n.length<=1)return r.push(e),r;h=i+1}else h===p.length-1&&(d=f.indexOf(o));if(n.length>=2&&h>i){let u=a[l-1].textContent;if(u&&typeof u=="string"){let g=Ge(u).length;d=f.indexOf(o,g)}d===-1&&(d=n[0].length)}if(d!==-1){let u=Math.floor(d/m);for(;u>0&&u<e.length;){if(c+=1,c>50*a.length)return r.push(e),r;let g=Ge(e.substring(0,u),s);if(g.length===d){r.push(e.substring(0,u)),e=e.substring(u),f=f.substring(d);break}else g.length<d?u+=Math.max(1,Math.floor((d-g.length)/m)):u-=Math.max(1,Math.floor((g.length-d)*m))}break}}}}return r.push(e),r}function yo(e,t){return go(e,t).join("/* rr_split */")}var wo=1,bo=new RegExp("[^a-z0-9-_:]"),ot=-2;function Fi(){return wo++}function vo(e){if(e instanceof HTMLFormElement)return"form";let t=ve(e.tagName);return bo.test(t)?"div":t}var Me,ds,So=/^[^ \t\n\r\u000c]+/,Co=/^[, \t\n\r\u000c]+/;function Eo(e,t){if(t.trim()==="")return t;let s=0;function a(c){let f,m=c.exec(t.substring(s));return m?(f=m[0],s+=f.length,f):""}let r=[];for(;a(Co),!(s>=t.length);){let c=a(So);if(c.slice(-1)===",")c=Ie(e,c.substring(0,c.length-1)),r.push(c);else{let f="";c=Ie(e,c);let m=!1;for(;;){let l=t.charAt(s);if(l===""){r.push((c+f).trim());break}else if(m)l===")"&&(m=!1);else if(l===","){s+=1,r.push((c+f).trim());break}else l==="("&&(m=!0);f+=l,s+=1}}}return r.join(", ")}var ps=new WeakMap;function Ie(e,t){return!t||t.trim()===""?t:jr(e,t)}function xo(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function jr(e,t){let s=ps.get(e);if(s||(s=e.createElement("a"),ps.set(e,s)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return s.setAttribute("href",t),s.href}function Ui(e,t,s,a){return a&&(s==="src"||s==="href"&&!(t==="use"&&a[0]==="#")||s==="xlink:href"&&a[0]!=="#"||s==="background"&&["table","td","th"].includes(t)?Ie(e,a):s==="srcset"?Eo(e,a):s==="style"?nt(a,jr(e)):t==="object"&&s==="data"?Ie(e,a):a)}function Bi(e,t,s){return["video","audio"].includes(e)&&ve(t)==="autoplay"}function Ro(e,t,s){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let a=e.classList.length;a--;){let r=e.classList[a];if(t.test(r))return!0}if(s)return e.matches(s)}catch{}return!1}function at(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return s?at(Z.parentNode(e),t,s):!1;for(let a=e.classList.length;a--;){let r=e.classList[a];if(t.test(r))return!0}return s?at(Z.parentNode(e),t,s):!1}function $i(e,t,s,a){let r;if(_i(e)){if(r=e,!Z.childNodes(r).length)return!1}else{if(Z.parentElement(e)===null)return!1;r=Z.parentElement(e)}try{if(typeof t=="string"){if(a){if(r.closest(`.${t}`))return!0}else if(r.classList.contains(t))return!0}else if(at(r,t,a))return!0;if(s){if(a){if(r.closest(s))return!0}else if(r.matches(s))return!0}}catch{}return!1}function Mo(e,t,s){let a=e.contentWindow;if(!a)return;let r=!1,c;try{c=a.document.readyState}catch{return}if(c!=="complete"){let m=setTimeout(()=>{r||(t(),r=!0)},s);e.addEventListener("load",()=>{clearTimeout(m),r=!0,t()});return}let f="about:blank";if(a.location.href!==f||e.src===f||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function No(e,t,s){let a=!1,r;try{r=e.sheet}catch{return}if(r)return;let c=setTimeout(()=>{a||(t(),a=!0)},s);e.addEventListener("load",()=>{clearTimeout(c),a=!0,t()})}function Oo(e,t){let{doc:s,mirror:a,blockClass:r,blockSelector:c,needsMask:f,inlineStylesheet:m,maskInputOptions:l={},maskTextFn:p,maskInputFn:i,dataURLOptions:h={},inlineImages:o,recordCanvas:n,keepIframeSrcFn:d,newlyAddedElement:u=!1,cssCaptured:g=!1}=t,S=Io(s,a);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:X.Document,childNodes:[],compatMode:e.compatMode}:{type:X.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:X.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:S};case e.ELEMENT_NODE:return Do(e,{doc:s,blockClass:r,blockSelector:c,inlineStylesheet:m,maskInputOptions:l,maskInputFn:i,dataURLOptions:h,inlineImages:o,recordCanvas:n,keepIframeSrcFn:d,newlyAddedElement:u,rootId:S});case e.TEXT_NODE:return Ao(e,{doc:s,needsMask:f,maskTextFn:p,rootId:S,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:X.CDATA,textContent:"",rootId:S};case e.COMMENT_NODE:return{type:X.Comment,textContent:Z.textContent(e)||"",rootId:S};default:return!1}}function Io(e,t){if(!t.hasNode(e))return;let s=t.getId(e);return s===1?void 0:s}function Ao(e,t){let{needsMask:s,maskTextFn:a,rootId:r,cssCaptured:c}=t,f=Z.parentNode(e),m=f&&f.tagName,l="",p=m==="STYLE"?!0:void 0,i=m==="SCRIPT"?!0:void 0;return i?l="SCRIPT_PLACEHOLDER":c||(l=Z.textContent(e),p&&l&&(l=nt(l,jr(t.doc)))),!p&&!i&&l&&s&&(l=a?a(l,Z.parentElement(e)):l.replace(/[\S]/g,"*")),{type:X.Text,textContent:l||"",rootId:r}}function Do(e,t){let{doc:s,blockClass:a,blockSelector:r,inlineStylesheet:c,maskInputOptions:f={},maskInputFn:m,dataURLOptions:l={},inlineImages:p,recordCanvas:i,keepIframeSrcFn:h,newlyAddedElement:o=!1,rootId:n}=t,d=Ro(e,a,r),u=vo(e),g={},S=e.attributes.length;for(let v=0;v<S;v++){let E=e.attributes[v];Bi(u,E.name,E.value)||(g[E.name]=Ui(s,u,ve(E.name),E.value))}if(u==="link"&&c){let v=Array.from(s.styleSheets).find(y=>y.href===e.href),E=null;v&&(E=Tr(v)),E&&(delete g.rel,delete g.href,g._cssText=E)}if(u==="style"&&e.sheet){let v=Tr(e.sheet);v&&(e.childNodes.length>1&&(v=yo(v,e)),g._cssText=v)}if(["input","textarea","select"].includes(u)){let v=e.value,E=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&v?g.value=st({element:e,type:it(e),tagName:u,value:v,maskInputOptions:f,maskInputFn:m}):E&&(g.checked=E)}if(u==="option"&&(e.selected&&!f.select?g.selected=!0:delete g.selected),u==="dialog"&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),u==="canvas"&&i){if(e.__context==="2d")ao(e)||(g.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){let v=e.toDataURL(l.type,l.quality),E=s.createElement("canvas");E.width=e.width,E.height=e.height;let y=E.toDataURL(l.type,l.quality);v!==y&&(g.rr_dataURL=v)}}if(u==="img"&&p){Me||(Me=s.createElement("canvas"),ds=Me.getContext("2d"));let v=e,E=v.currentSrc||v.getAttribute("src")||"<unknown-src>",y=v.crossOrigin,w=()=>{v.removeEventListener("load",w);try{Me.width=v.naturalWidth,Me.height=v.naturalHeight,ds.drawImage(v,0,0),g.rr_dataURL=Me.toDataURL(l.type,l.quality)}catch(C){if(v.crossOrigin!=="anonymous"){v.crossOrigin="anonymous",v.complete&&v.naturalWidth!==0?w():v.addEventListener("load",w);return}else console.warn(`Cannot inline img src=${E}! Error: ${C}`)}v.crossOrigin==="anonymous"&&(y?g.crossOrigin=y:v.removeAttribute("crossorigin"))};v.complete&&v.naturalWidth!==0?w():v.addEventListener("load",w)}if(["audio","video"].includes(u)){let v=g;v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime,v.rr_mediaPlaybackRate=e.playbackRate,v.rr_mediaMuted=e.muted,v.rr_mediaLoop=e.loop,v.rr_mediaVolume=e.volume}if(o||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),d){let{width:v,height:E}=e.getBoundingClientRect();g={class:g.class,rr_width:`${v}px`,rr_height:`${E}px`}}u==="iframe"&&!h(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let b;try{customElements.get(u)&&(b=!0)}catch{}return{type:X.Element,tagName:u,attributes:g,childNodes:[],isSVG:xo(e)||void 0,needBlock:d,rootId:n,isCustom:b}}function z(e){return e==null?"":e.toLowerCase()}function Wi(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function To(e,t){if(t.comment&&e.type===X.Comment)return!0;if(e.type===X.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Pi(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(z(e.attributes.name).match(/^msapplication-tile(image|color)$/)||z(e.attributes.name)==="application-name"||z(e.attributes.rel)==="icon"||z(e.attributes.rel)==="apple-touch-icon"||z(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&z(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(z(e.attributes.property).match(/^(og|twitter|fb):/)||z(e.attributes.name).match(/^(og|twitter):/)||z(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(z(e.attributes.name)==="robots"||z(e.attributes.name)==="googlebot"||z(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(z(e.attributes.name)==="author"||z(e.attributes.name)==="generator"||z(e.attributes.name)==="framework"||z(e.attributes.name)==="publisher"||z(e.attributes.name)==="progid"||z(e.attributes.property).match(/^article:/)||z(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(z(e.attributes.name)==="google-site-verification"||z(e.attributes.name)==="yandex-verification"||z(e.attributes.name)==="csrf-token"||z(e.attributes.name)==="p:domain_verify"||z(e.attributes.name)==="verify-v1"||z(e.attributes.name)==="verification"||z(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ae(e,t){let{doc:s,mirror:a,blockClass:r,blockSelector:c,maskTextClass:f,maskTextSelector:m,skipChild:l=!1,inlineStylesheet:p=!0,maskInputOptions:i={},maskTextFn:h,maskInputFn:o,slimDOMOptions:n,dataURLOptions:d={},inlineImages:u=!1,recordCanvas:g=!1,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:y=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:C=!1,cssCaptured:R=!1}=t,{needsMask:O}=t,{preserveWhiteSpace:M=!0}=t;O||(O=$i(e,f,m,O===void 0));let T=Oo(e,{doc:s,mirror:a,blockClass:r,blockSelector:c,needsMask:O,inlineStylesheet:p,maskInputOptions:i,maskTextFn:h,maskInputFn:o,dataURLOptions:d,inlineImages:u,recordCanvas:g,keepIframeSrcFn:w,newlyAddedElement:C,cssCaptured:R});if(!T)return console.warn(e,"not serialized"),null;let A;a.hasNode(e)?A=a.getId(e):To(T,n)||!M&&T.type===X.Text&&!T.textContent.replace(/^\s+|\s+$/gm,"").length?A=ot:A=Fi();let x=Object.assign(T,{id:A});if(a.add(e,x),A===ot)return null;S&&S(e);let ce=!l;if(x.type===X.Element){ce=ce&&!x.needBlock,delete x.needBlock;let U=Z.shadowRoot(e);U&&Fe(U)&&(x.isShadowHost=!0)}if((x.type===X.Document||x.type===X.Element)&&ce){n.headWhitespace&&x.type===X.Element&&x.tagName==="head"&&(M=!1);let U={doc:s,mirror:a,blockClass:r,blockSelector:c,needsMask:O,maskTextClass:f,maskTextSelector:m,skipChild:l,inlineStylesheet:p,maskInputOptions:i,maskTextFn:h,maskInputFn:o,slimDOMOptions:n,dataURLOptions:d,inlineImages:u,recordCanvas:g,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:y,keepIframeSrcFn:w,cssCaptured:!1};if(!(x.type===X.Element&&x.tagName==="textarea"&&x.attributes.value!==void 0)){x.type===X.Element&&x.attributes._cssText!==void 0&&typeof x.attributes._cssText=="string"&&(U.cssCaptured=!0);for(let H of Array.from(Z.childNodes(e))){let Q=Ae(H,U);Q&&x.childNodes.push(Q)}}let F=null;if(_i(e)&&(F=Z.shadowRoot(e)))for(let H of Array.from(Z.childNodes(F))){let Q=Ae(H,U);Q&&(Fe(F)&&(Q.isShadow=!0),x.childNodes.push(Q))}}let se=Z.parentNode(e);return se&&Le(se)&&Fe(se)&&(x.isShadow=!0),x.type===X.Element&&x.tagName==="iframe"&&Mo(e,()=>{let U=e.contentDocument;if(U&&b){let F=Ae(U,{doc:U,mirror:a,blockClass:r,blockSelector:c,needsMask:O,maskTextClass:f,maskTextSelector:m,skipChild:!1,inlineStylesheet:p,maskInputOptions:i,maskTextFn:h,maskInputFn:o,slimDOMOptions:n,dataURLOptions:d,inlineImages:u,recordCanvas:g,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:y,keepIframeSrcFn:w});F&&b(e,F)}},v),x.type===X.Element&&x.tagName==="link"&&typeof x.attributes.rel=="string"&&(x.attributes.rel==="stylesheet"||x.attributes.rel==="preload"&&typeof x.attributes.href=="string"&&Pi(x.attributes.href)==="css")&&No(e,()=>{if(E){let U=Ae(e,{doc:s,mirror:a,blockClass:r,blockSelector:c,needsMask:O,maskTextClass:f,maskTextSelector:m,skipChild:!1,inlineStylesheet:p,maskInputOptions:i,maskTextFn:h,maskInputFn:o,slimDOMOptions:n,dataURLOptions:d,inlineImages:u,recordCanvas:g,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:y,keepIframeSrcFn:w});U&&E(e,U)}},y),x}function _o(e,t){let{mirror:s=new rt,blockClass:a="rr-block",blockSelector:r=null,maskTextClass:c="rr-mask",maskTextSelector:f=null,inlineStylesheet:m=!0,inlineImages:l=!1,recordCanvas:p=!1,maskAllInputs:i=!1,maskTextFn:h,maskInputFn:o,slimDOM:n=!1,dataURLOptions:d,preserveWhiteSpace:u,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:E,keepIframeSrcFn:y=()=>!1}=t,w=i===!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}:i===!1?{password:!0}:i,C=Wi(n);return Ae(e,{doc:e,mirror:s,blockClass:a,blockSelector:r,maskTextClass:c,maskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:w,maskTextFn:h,maskInputFn:o,slimDOMOptions:C,dataURLOptions:d,inlineImages:l,recordCanvas:p,preserveWhiteSpace:u,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:E,keepIframeSrcFn:y,newlyAddedElement:!1})}var ko=/(max|min)-device-(width|height)/,tl=new RegExp(ko.source,"g");function Po(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Lo(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var s=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(s,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}),s}var He={exports:{}},ms;function Fo(){if(ms)return He.exports;ms=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return He.exports=t(),He.exports.createColors=t,He.exports}var Uo={},Bo=Object.freeze(Object.defineProperty({__proto__:null,default:Uo},Symbol.toStringTag,{value:"Module"})),de=Lo(Bo),Ot,gs;function Gr(){if(gs)return Ot;gs=1;let e=Fo(),t=de;class s extends Error{constructor(r,c,f,m,l,p){super(r),this.name="CssSyntaxError",this.reason=r,l&&(this.file=l),m&&(this.source=m),p&&(this.plugin=p),typeof c<"u"&&typeof f<"u"&&(typeof c=="number"?(this.line=c,this.column=f):(this.line=c.line,this.column=c.column,this.endLine=f.line,this.endColumn=f.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";let c=this.source;r==null&&(r=e.isColorSupported),t&&r&&(c=t(c));let f=c.split(/\r?\n/),m=Math.max(this.line-3,0),l=Math.min(this.line+2,f.length),p=String(l).length,i,h;if(r){let{bold:o,gray:n,red:d}=e.createColors(!0);i=u=>o(d(u)),h=u=>n(u)}else i=h=o=>o;return f.slice(m,l).map((o,n)=>{let d=m+1+n,u=" "+(" "+d).slice(-p)+" | ";if(d===this.line){let g=h(u.replace(/\d/g," "))+o.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+h(u)+o+`
|
|
1
|
+
"use strict";var LeadpingConsent=(()=>{var Rt=Object.defineProperty;var Mn=Object.getOwnPropertyDescriptor;var Nn=Object.getOwnPropertyNames;var On=Object.prototype.hasOwnProperty;var In=(e,t)=>{for(var s in t)Rt(e,s,{get:t[s],enumerable:!0})},Dn=(e,t,s,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Nn(t))!On.call(e,r)&&r!==s&&Rt(e,r,{get:()=>t[r],enumerable:!(a=Mn(t,r))||a.enumerable});return e};var An=e=>Dn(Rt({},"__esModule",{value:!0}),e);var Ka={};In(Ka,{ConsentCapture:()=>ke,attach:()=>Rn});var be=class extends Error{};var Tn=Object.defineProperty,_n=(e,t,s)=>t in e?Tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,I=(e,t,s)=>_n(e,typeof t!="symbol"?t+"":t,s),ls,kn=Object.defineProperty,Pn=(e,t,s)=>t in e?kn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,us=(e,t,s)=>Pn(e,typeof t!="symbol"?t+"":t,s),X=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(X||{}),cs={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},hs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},je={},Di={},Ln=()=>!!globalThis.Zone;function Vr(e){if(je[e])return je[e];let t=globalThis[e],s=t.prototype,a=e in cs?cs[e]:void 0,r=!!(a&&a.every(m=>{var l,d;return!!((d=(l=Object.getOwnPropertyDescriptor(s,m))==null?void 0:l.get)!=null&&d.toString().includes("[native code]"))})),c=e in hs?hs[e]:void 0,f=!!(c&&c.every(m=>{var l;return typeof s[m]=="function"&&((l=s[m])==null?void 0:l.toString().includes("[native code]"))}));if(r&&f&&!Ln())return je[e]=t.prototype,t.prototype;try{let m=document.createElement("iframe");m.style.display="none",document.body.appendChild(m);let l=m.contentWindow;if(!l)return t.prototype;let d=l[e].prototype;if(!d)return m.remove(),s;let i=navigator.userAgent;return i.includes("Safari")&&!i.includes("Chrome")?(m.classList.add("rr-block"),m.setAttribute("__rrwebUntaintedMutationObserver",""),Di[e]=()=>m.remove()):m.remove(),je[e]=d}catch{return s}}var Mt={};function ne(e,t,s){var a,r;let c=(a=Mt[e])==null?void 0:a[s];if(c)return c.call(t);let f=Vr(e),m=(r=Object.getOwnPropertyDescriptor(f,s))==null?void 0:r.get;return m?((Mt[e]||(Mt[e]={}))[s]=m,m.call(t)):t[s]}var Nt={};function Ai(e,t,s){let a=`${e}.${String(s)}`;if(Nt[a])return Nt[a].bind(t);let c=Vr(e)[s];return typeof c!="function"?t[s]:(Nt[a]=c,c.bind(t))}function Fn(e){return ne("Node",e,"ownerDocument")}function Un(e){return ne("Node",e,"childNodes")}function Bn(e){return ne("Node",e,"parentNode")}function $n(e){return ne("Node",e,"parentElement")}function Wn(e){return ne("Node",e,"textContent")}function zn(e){return ne("Node",e,"firstChild")}function qn(e){return ne("Node",e,"lastChild")}function Vn(e){return ne("Node",e,"nextSibling")}function jn(e){return ne("Node",e,"previousSibling")}function Gn(e,t){return Ai("Node",e,"contains")(t)}function Hn(e){return Ai("Node",e,"getRootNode")()}function Yn(e){return!e||!("host"in e)?null:ne("ShadowRoot",e,"host")}function Jn(e){return e.styleSheets}function Xn(e){return!e||!("shadowRoot"in e)?null:ne("Element",e,"shadowRoot")}function Qn(e,t){return ne("Element",e,"querySelector")(t)}function Zn(e,t){return ne("Element",e,"querySelectorAll")(t)}function Kn(){return[Vr("MutationObserver").constructor,Di.MutationObserver??(()=>{})]}var Ti=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ti=()=>new Date().getTime());function eo(e,t,s){try{if(!(t in e))return()=>{};let a=e[t],r=s(a);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:a}})),e[t]=r,()=>{e[t]=a}}catch{return()=>{}}}var Z={ownerDocument:Fn,childNodes:Un,parentNode:Bn,parentElement:$n,textContent:Wn,firstChild:zn,lastChild:qn,nextSibling:Vn,previousSibling:jn,contains:Gn,getRootNode:Hn,host:Yn,styleSheets:Jn,shadowRoot:Xn,querySelector:Qn,querySelectorAll:Zn,nowTimestamp:Ti,mutationObserverCtor:Kn,patch:eo};function _i(e){return e.nodeType===e.ELEMENT_NODE}function Fe(e){let t=e&&"host"in e&&"mode"in e&&Z.host(e)||null;return!!(t&&"shadowRoot"in t&&Z.shadowRoot(t)===e)}function Ue(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function to(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function ro(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let s=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?s.push("layer"):e.layerName&&s.push(`layer(${e.layerName})`),e.supportsText&&s.push(`supports(${e.supportsText})`),e.media.length&&s.push(e.media.mediaText),s.join(" ")+";"}function Tr(e){try{let t=e.rules||e.cssRules;if(!t)return null;let s=e.href;!s&&e.ownerNode&&(s=e.ownerNode.baseURI);let a=Array.from(t,r=>ki(r,s)).join("");return to(a)}catch{return null}}function ki(e,t){if(io(e)){let s;try{s=Tr(e.styleSheet)||ro(e)}catch{s=e.cssText}return e.styleSheet.href?nt(s,e.styleSheet.href):s}else{let s=e.cssText;return no(e)&&e.selectorText.includes(":")&&(s=so(s)),t?nt(s,t):s}}function so(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function io(e){return"styleSheet"in e}function no(e){return"selectorText"in e}var rt=class{constructor(){us(this,"idNodeMap",new Map),us(this,"nodeMetaMap",new WeakMap)}getId(t){var s;return t?((s=this.getMeta(t))==null?void 0:s.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let s=this.getId(t);this.idNodeMap.delete(s),t.childNodes&&t.childNodes.forEach(a=>this.removeNodeFromMap(a))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,s){let a=s.id;this.idNodeMap.set(a,t),this.nodeMetaMap.set(t,s)}replace(t,s){let a=this.getNode(t);if(a){let r=this.nodeMetaMap.get(a);r&&this.nodeMetaMap.set(s,r)}this.idNodeMap.set(t,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function oo(){return new rt}function st({element:e,maskInputOptions:t,tagName:s,type:a,value:r,maskInputFn:c}){let f=r||"",m=a&&Se(a);return(t[s.toLowerCase()]||m&&t[m])&&(c?f=c(f,e):f="*".repeat(f.length)),f}function Se(e){return e.toLowerCase()}var fs="__rrweb_original__";function ao(e){let t=e.getContext("2d");if(!t)return!0;let s=50;for(let a=0;a<e.width;a+=s)for(let r=0;r<e.height;r+=s){let c=t.getImageData,f=fs in c?c[fs]:c;if(new Uint32Array(f.call(t,a,r,Math.min(s,e.width-a),Math.min(s,e.height-r)).data.buffer).some(l=>l!==0))return!1}return!0}function it(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Se(t):null}function Pi(e,t){let s;try{s=new URL(e,t??window.location.href)}catch{return null}let a=/\.([0-9a-z]+)(?:$)/i,r=s.pathname.match(a);return r?.[1]??null}function lo(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var uo=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,co=/^(?:[a-z+]+:)?\/\//i,ho=/^www\..*/i,fo=/^(data:)([^,]*),(.*)/i;function nt(e,t){return(e||"").replace(uo,(s,a,r,c,f,m)=>{let l=r||f||m,d=a||c||"";if(!l)return s;if(co.test(l)||ho.test(l))return`url(${d}${l}${d})`;if(fo.test(l))return`url(${d}${l}${d})`;if(l[0]==="/")return`url(${d}${lo(t)+l}${d})`;let i=l.split("#")[0],h=l.substring(i.length),o=t.split("#")[0].split("/"),n=i.split("/");o.pop();for(let p of n)p!=="."&&(p===".."?o.pop():o.push(p));return`url(${d}${o.join("/")}${h}${d})`})}var Li="(?:/\\*[^*]*\\*/)|[\\s;]",po=new RegExp(`${Li}|\\b(0)px?`,"g"),mo=new RegExp(Li,"g");function Ge(e,t=!1){return t?e.replace(mo,""):e.replace(po,"$1")}function go(e,t,s=!1){let a=Array.from(t.childNodes),r=[],c=0;if(a.length>1&&e&&typeof e=="string"){let f=Ge(e,s),m=f.length/e.length;for(let l=1;l<a.length;l++)if(a[l].textContent&&typeof a[l].textContent=="string"){let d=Ge(a[l].textContent,s),i=100,h=3;for(;h<d.length&&(d[h].match(/[a-zA-Z0-9]/)||d.indexOf(d.substring(0,h),1)!==-1);h++);for(;h<d.length;h++){let o=d.substring(0,h),n=f.split(o),p=-1;if(n.length===2)p=n[0].length;else if(n.length>2&&n[0]===""&&a[l-1].textContent!=="")p=f.indexOf(o,1);else if(n.length===1){if(o=o.substring(0,o.length-1),n=f.split(o),n.length<=1)return r.push(e),r;h=i+1}else h===d.length-1&&(p=f.indexOf(o));if(n.length>=2&&h>i){let u=a[l-1].textContent;if(u&&typeof u=="string"){let g=Ge(u).length;p=f.indexOf(o,g)}p===-1&&(p=n[0].length)}if(p!==-1){let u=Math.floor(p/m);for(;u>0&&u<e.length;){if(c+=1,c>50*a.length)return r.push(e),r;let g=Ge(e.substring(0,u),s);if(g.length===p){r.push(e.substring(0,u)),e=e.substring(u),f=f.substring(p);break}else g.length<p?u+=Math.max(1,Math.floor((p-g.length)/m)):u-=Math.max(1,Math.floor((g.length-p)*m))}break}}}}return r.push(e),r}function yo(e,t){return go(e,t).join("/* rr_split */")}var wo=1,bo=new RegExp("[^a-z0-9-_:]"),ot=-2;function Fi(){return wo++}function vo(e){if(e instanceof HTMLFormElement)return"form";let t=Se(e.tagName);return bo.test(t)?"div":t}var Ne,ds,So=/^[^ \t\n\r\u000c]+/,Co=/^[, \t\n\r\u000c]+/;function Eo(e,t){if(t.trim()==="")return t;let s=0;function a(c){let f,m=c.exec(t.substring(s));return m?(f=m[0],s+=f.length,f):""}let r=[];for(;a(Co),!(s>=t.length);){let c=a(So);if(c.slice(-1)===",")c=De(e,c.substring(0,c.length-1)),r.push(c);else{let f="";c=De(e,c);let m=!1;for(;;){let l=t.charAt(s);if(l===""){r.push((c+f).trim());break}else if(m)l===")"&&(m=!1);else if(l===","){s+=1,r.push((c+f).trim());break}else l==="("&&(m=!0);f+=l,s+=1}}}return r.join(", ")}var ps=new WeakMap;function De(e,t){return!t||t.trim()===""?t:jr(e,t)}function xo(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function jr(e,t){let s=ps.get(e);if(s||(s=e.createElement("a"),ps.set(e,s)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return s.setAttribute("href",t),s.href}function Ui(e,t,s,a){return a&&(s==="src"||s==="href"&&!(t==="use"&&a[0]==="#")||s==="xlink:href"&&a[0]!=="#"||s==="background"&&["table","td","th"].includes(t)?De(e,a):s==="srcset"?Eo(e,a):s==="style"?nt(a,jr(e)):t==="object"&&s==="data"?De(e,a):a)}function Bi(e,t,s){return["video","audio"].includes(e)&&Se(t)==="autoplay"}function Ro(e,t,s){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let a=e.classList.length;a--;){let r=e.classList[a];if(t.test(r))return!0}if(s)return e.matches(s)}catch{}return!1}function at(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return s?at(Z.parentNode(e),t,s):!1;for(let a=e.classList.length;a--;){let r=e.classList[a];if(t.test(r))return!0}return s?at(Z.parentNode(e),t,s):!1}function $i(e,t,s,a){let r;if(_i(e)){if(r=e,!Z.childNodes(r).length)return!1}else{if(Z.parentElement(e)===null)return!1;r=Z.parentElement(e)}try{if(typeof t=="string"){if(a){if(r.closest(`.${t}`))return!0}else if(r.classList.contains(t))return!0}else if(at(r,t,a))return!0;if(s){if(a){if(r.closest(s))return!0}else if(r.matches(s))return!0}}catch{}return!1}function Mo(e,t,s){let a=e.contentWindow;if(!a)return;let r=!1,c;try{c=a.document.readyState}catch{return}if(c!=="complete"){let m=setTimeout(()=>{r||(t(),r=!0)},s);e.addEventListener("load",()=>{clearTimeout(m),r=!0,t()});return}let f="about:blank";if(a.location.href!==f||e.src===f||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function No(e,t,s){let a=!1,r;try{r=e.sheet}catch{return}if(r)return;let c=setTimeout(()=>{a||(t(),a=!0)},s);e.addEventListener("load",()=>{clearTimeout(c),a=!0,t()})}function Oo(e,t){let{doc:s,mirror:a,blockClass:r,blockSelector:c,needsMask:f,inlineStylesheet:m,maskInputOptions:l={},maskTextFn:d,maskInputFn:i,dataURLOptions:h={},inlineImages:o,recordCanvas:n,keepIframeSrcFn:p,newlyAddedElement:u=!1,cssCaptured:g=!1}=t,S=Io(s,a);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:X.Document,childNodes:[],compatMode:e.compatMode}:{type:X.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:X.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:S};case e.ELEMENT_NODE:return Ao(e,{doc:s,blockClass:r,blockSelector:c,inlineStylesheet:m,maskInputOptions:l,maskInputFn:i,dataURLOptions:h,inlineImages:o,recordCanvas:n,keepIframeSrcFn:p,newlyAddedElement:u,rootId:S});case e.TEXT_NODE:return Do(e,{doc:s,needsMask:f,maskTextFn:d,rootId:S,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:X.CDATA,textContent:"",rootId:S};case e.COMMENT_NODE:return{type:X.Comment,textContent:Z.textContent(e)||"",rootId:S};default:return!1}}function Io(e,t){if(!t.hasNode(e))return;let s=t.getId(e);return s===1?void 0:s}function Do(e,t){let{needsMask:s,maskTextFn:a,rootId:r,cssCaptured:c}=t,f=Z.parentNode(e),m=f&&f.tagName,l="",d=m==="STYLE"?!0:void 0,i=m==="SCRIPT"?!0:void 0;return i?l="SCRIPT_PLACEHOLDER":c||(l=Z.textContent(e),d&&l&&(l=nt(l,jr(t.doc)))),!d&&!i&&l&&s&&(l=a?a(l,Z.parentElement(e)):l.replace(/[\S]/g,"*")),{type:X.Text,textContent:l||"",rootId:r}}function Ao(e,t){let{doc:s,blockClass:a,blockSelector:r,inlineStylesheet:c,maskInputOptions:f={},maskInputFn:m,dataURLOptions:l={},inlineImages:d,recordCanvas:i,keepIframeSrcFn:h,newlyAddedElement:o=!1,rootId:n}=t,p=Ro(e,a,r),u=vo(e),g={},S=e.attributes.length;for(let v=0;v<S;v++){let E=e.attributes[v];Bi(u,E.name,E.value)||(g[E.name]=Ui(s,u,Se(E.name),E.value))}if(u==="link"&&c){let v=Array.from(s.styleSheets).find(b=>b.href===e.href),E=null;v&&(E=Tr(v)),E&&(delete g.rel,delete g.href,g._cssText=E)}if(u==="style"&&e.sheet){let v=Tr(e.sheet);v&&(e.childNodes.length>1&&(v=yo(v,e)),g._cssText=v)}if(["input","textarea","select"].includes(u)){let v=e.value,E=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&v?g.value=st({element:e,type:it(e),tagName:u,value:v,maskInputOptions:f,maskInputFn:m}):E&&(g.checked=E)}if(u==="option"&&(e.selected&&!f.select?g.selected=!0:delete g.selected),u==="dialog"&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),u==="canvas"&&i){if(e.__context==="2d")ao(e)||(g.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){let v=e.toDataURL(l.type,l.quality),E=s.createElement("canvas");E.width=e.width,E.height=e.height;let b=E.toDataURL(l.type,l.quality);v!==b&&(g.rr_dataURL=v)}}if(u==="img"&&d){Ne||(Ne=s.createElement("canvas"),ds=Ne.getContext("2d"));let v=e,E=v.currentSrc||v.getAttribute("src")||"<unknown-src>",b=v.crossOrigin,w=()=>{v.removeEventListener("load",w);try{Ne.width=v.naturalWidth,Ne.height=v.naturalHeight,ds.drawImage(v,0,0),g.rr_dataURL=Ne.toDataURL(l.type,l.quality)}catch(C){if(v.crossOrigin!=="anonymous"){v.crossOrigin="anonymous",v.complete&&v.naturalWidth!==0?w():v.addEventListener("load",w);return}else console.warn(`Cannot inline img src=${E}! Error: ${C}`)}v.crossOrigin==="anonymous"&&(b?g.crossOrigin=b:v.removeAttribute("crossorigin"))};v.complete&&v.naturalWidth!==0?w():v.addEventListener("load",w)}if(["audio","video"].includes(u)){let v=g;v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime,v.rr_mediaPlaybackRate=e.playbackRate,v.rr_mediaMuted=e.muted,v.rr_mediaLoop=e.loop,v.rr_mediaVolume=e.volume}if(o||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),p){let{width:v,height:E}=e.getBoundingClientRect();g={class:g.class,rr_width:`${v}px`,rr_height:`${E}px`}}u==="iframe"&&!h(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let y;try{customElements.get(u)&&(y=!0)}catch{}return{type:X.Element,tagName:u,attributes:g,childNodes:[],isSVG:xo(e)||void 0,needBlock:p,rootId:n,isCustom:y}}function z(e){return e==null?"":e.toLowerCase()}function Wi(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function To(e,t){if(t.comment&&e.type===X.Comment)return!0;if(e.type===X.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Pi(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(z(e.attributes.name).match(/^msapplication-tile(image|color)$/)||z(e.attributes.name)==="application-name"||z(e.attributes.rel)==="icon"||z(e.attributes.rel)==="apple-touch-icon"||z(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&z(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(z(e.attributes.property).match(/^(og|twitter|fb):/)||z(e.attributes.name).match(/^(og|twitter):/)||z(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(z(e.attributes.name)==="robots"||z(e.attributes.name)==="googlebot"||z(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(z(e.attributes.name)==="author"||z(e.attributes.name)==="generator"||z(e.attributes.name)==="framework"||z(e.attributes.name)==="publisher"||z(e.attributes.name)==="progid"||z(e.attributes.property).match(/^article:/)||z(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(z(e.attributes.name)==="google-site-verification"||z(e.attributes.name)==="yandex-verification"||z(e.attributes.name)==="csrf-token"||z(e.attributes.name)==="p:domain_verify"||z(e.attributes.name)==="verify-v1"||z(e.attributes.name)==="verification"||z(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ae(e,t){let{doc:s,mirror:a,blockClass:r,blockSelector:c,maskTextClass:f,maskTextSelector:m,skipChild:l=!1,inlineStylesheet:d=!0,maskInputOptions:i={},maskTextFn:h,maskInputFn:o,slimDOMOptions:n,dataURLOptions:p={},inlineImages:u=!1,recordCanvas:g=!1,onSerialize:S,onIframeLoad:y,iframeLoadTimeout:v=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:b=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:C=!1,cssCaptured:R=!1}=t,{needsMask:O}=t,{preserveWhiteSpace:M=!0}=t;O||(O=$i(e,f,m,O===void 0));let T=Oo(e,{doc:s,mirror:a,blockClass:r,blockSelector:c,needsMask:O,inlineStylesheet:d,maskInputOptions:i,maskTextFn:h,maskInputFn:o,dataURLOptions:p,inlineImages:u,recordCanvas:g,keepIframeSrcFn:w,newlyAddedElement:C,cssCaptured:R});if(!T)return console.warn(e,"not serialized"),null;let D;a.hasNode(e)?D=a.getId(e):To(T,n)||!M&&T.type===X.Text&&!T.textContent.replace(/^\s+|\s+$/gm,"").length?D=ot:D=Fi();let x=Object.assign(T,{id:D});if(a.add(e,x),D===ot)return null;S&&S(e);let ce=!l;if(x.type===X.Element){ce=ce&&!x.needBlock,delete x.needBlock;let U=Z.shadowRoot(e);U&&Ue(U)&&(x.isShadowHost=!0)}if((x.type===X.Document||x.type===X.Element)&&ce){n.headWhitespace&&x.type===X.Element&&x.tagName==="head"&&(M=!1);let U={doc:s,mirror:a,blockClass:r,blockSelector:c,needsMask:O,maskTextClass:f,maskTextSelector:m,skipChild:l,inlineStylesheet:d,maskInputOptions:i,maskTextFn:h,maskInputFn:o,slimDOMOptions:n,dataURLOptions:p,inlineImages:u,recordCanvas:g,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:b,keepIframeSrcFn:w,cssCaptured:!1};if(!(x.type===X.Element&&x.tagName==="textarea"&&x.attributes.value!==void 0)){x.type===X.Element&&x.attributes._cssText!==void 0&&typeof x.attributes._cssText=="string"&&(U.cssCaptured=!0);for(let H of Array.from(Z.childNodes(e))){let Q=Ae(H,U);Q&&x.childNodes.push(Q)}}let F=null;if(_i(e)&&(F=Z.shadowRoot(e)))for(let H of Array.from(Z.childNodes(F))){let Q=Ae(H,U);Q&&(Ue(F)&&(Q.isShadow=!0),x.childNodes.push(Q))}}let se=Z.parentNode(e);return se&&Fe(se)&&Ue(se)&&(x.isShadow=!0),x.type===X.Element&&x.tagName==="iframe"&&Mo(e,()=>{let U=e.contentDocument;if(U&&y){let F=Ae(U,{doc:U,mirror:a,blockClass:r,blockSelector:c,needsMask:O,maskTextClass:f,maskTextSelector:m,skipChild:!1,inlineStylesheet:d,maskInputOptions:i,maskTextFn:h,maskInputFn:o,slimDOMOptions:n,dataURLOptions:p,inlineImages:u,recordCanvas:g,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:b,keepIframeSrcFn:w});F&&y(e,F)}},v),x.type===X.Element&&x.tagName==="link"&&typeof x.attributes.rel=="string"&&(x.attributes.rel==="stylesheet"||x.attributes.rel==="preload"&&typeof x.attributes.href=="string"&&Pi(x.attributes.href)==="css")&&No(e,()=>{if(E){let U=Ae(e,{doc:s,mirror:a,blockClass:r,blockSelector:c,needsMask:O,maskTextClass:f,maskTextSelector:m,skipChild:!1,inlineStylesheet:d,maskInputOptions:i,maskTextFn:h,maskInputFn:o,slimDOMOptions:n,dataURLOptions:p,inlineImages:u,recordCanvas:g,preserveWhiteSpace:M,onSerialize:S,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:b,keepIframeSrcFn:w});U&&E(e,U)}},b),x}function _o(e,t){let{mirror:s=new rt,blockClass:a="rr-block",blockSelector:r=null,maskTextClass:c="rr-mask",maskTextSelector:f=null,inlineStylesheet:m=!0,inlineImages:l=!1,recordCanvas:d=!1,maskAllInputs:i=!1,maskTextFn:h,maskInputFn:o,slimDOM:n=!1,dataURLOptions:p,preserveWhiteSpace:u,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:E,keepIframeSrcFn:b=()=>!1}=t,w=i===!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}:i===!1?{password:!0}:i,C=Wi(n);return Ae(e,{doc:e,mirror:s,blockClass:a,blockSelector:r,maskTextClass:c,maskTextSelector:f,skipChild:!1,inlineStylesheet:m,maskInputOptions:w,maskTextFn:h,maskInputFn:o,slimDOMOptions:C,dataURLOptions:p,inlineImages:l,recordCanvas:d,preserveWhiteSpace:u,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:E,keepIframeSrcFn:b,newlyAddedElement:!1})}var ko=/(max|min)-device-(width|height)/,rl=new RegExp(ko.source,"g");function Po(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Lo(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var s=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(s,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}),s}var He={exports:{}},ms;function Fo(){if(ms)return He.exports;ms=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return He.exports=t(),He.exports.createColors=t,He.exports}var Uo={},Bo=Object.freeze(Object.defineProperty({__proto__:null,default:Uo},Symbol.toStringTag,{value:"Module"})),de=Lo(Bo),Ot,gs;function Gr(){if(gs)return Ot;gs=1;let e=Fo(),t=de;class s extends Error{constructor(r,c,f,m,l,d){super(r),this.name="CssSyntaxError",this.reason=r,l&&(this.file=l),m&&(this.source=m),d&&(this.plugin=d),typeof c<"u"&&typeof f<"u"&&(typeof c=="number"?(this.line=c,this.column=f):(this.line=c.line,this.column=c.column,this.endLine=f.line,this.endColumn=f.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";let c=this.source;r==null&&(r=e.isColorSupported),t&&r&&(c=t(c));let f=c.split(/\r?\n/),m=Math.max(this.line-3,0),l=Math.min(this.line+2,f.length),d=String(l).length,i,h;if(r){let{bold:o,gray:n,red:p}=e.createColors(!0);i=u=>o(p(u)),h=u=>n(u)}else i=h=o=>o;return f.slice(m,l).map((o,n)=>{let p=m+1+n,u=" "+(" "+p).slice(-d)+" | ";if(p===this.line){let g=h(u.replace(/\d/g," "))+o.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+h(u)+o+`
|
|
2
2
|
`+g+i("^")}return" "+h(u)+o}).join(`
|
|
3
3
|
`)}toString(){let r=this.showSourceCode();return r&&(r=`
|
|
4
4
|
|
|
@@ -9,21 +9,21 @@
|
|
|
9
9
|
`,beforeDecl:`
|
|
10
10
|
`,beforeOpen:" ",beforeRule:`
|
|
11
11
|
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(a){return a[0].toUpperCase()+a.slice(1)}class s{constructor(r){this.builder=r}atrule(r,c){let f="@"+r.name,m=r.params?this.rawValue(r,"params"):"";if(typeof r.raws.afterName<"u"?f+=r.raws.afterName:m&&(f+=" "),r.nodes)this.block(r,f+m);else{let l=(r.raws.between||"")+(c?";":"");this.builder(f+m+l,r)}}beforeAfter(r,c){let f;r.type==="decl"?f=this.raw(r,null,"beforeDecl"):r.type==="comment"?f=this.raw(r,null,"beforeComment"):c==="before"?f=this.raw(r,null,"beforeRule"):f=this.raw(r,null,"beforeClose");let m=r.parent,l=0;for(;m&&m.type!=="root";)l+=1,m=m.parent;if(f.includes(`
|
|
12
|
-
`)){let
|
|
12
|
+
`)){let d=this.raw(r,null,"indent");if(d.length)for(let i=0;i<l;i++)f+=d}return f}block(r,c){let f=this.raw(r,"between","beforeOpen");this.builder(c+f+"{",r,"start");let m;r.nodes&&r.nodes.length?(this.body(r),m=this.raw(r,"after")):m=this.raw(r,"after","emptyBody"),m&&this.builder(m),this.builder("}",r,"end")}body(r){let c=r.nodes.length-1;for(;c>0&&r.nodes[c].type==="comment";)c-=1;let f=this.raw(r,"semicolon");for(let m=0;m<r.nodes.length;m++){let l=r.nodes[m],d=this.raw(l,"before");d&&this.builder(d),this.stringify(l,c!==m||f)}}comment(r){let c=this.raw(r,"left","commentLeft"),f=this.raw(r,"right","commentRight");this.builder("/*"+c+r.text+f+"*/",r)}decl(r,c){let f=this.raw(r,"between","colon"),m=r.prop+f+this.rawValue(r,"value");r.important&&(m+=r.raws.important||" !important"),c&&(m+=";"),this.builder(m,r)}document(r){this.body(r)}raw(r,c,f){let m;if(f||(f=c),c&&(m=r.raws[c],typeof m<"u"))return m;let l=r.parent;if(f==="before"&&(!l||l.type==="root"&&l.first===r||l&&l.type==="document"))return"";if(!l)return e[f];let d=r.root();if(d.rawCache||(d.rawCache={}),typeof d.rawCache[f]<"u")return d.rawCache[f];if(f==="before"||f==="after")return this.beforeAfter(r,f);{let i="raw"+t(f);this[i]?m=this[i](d,r):d.walk(h=>{if(m=h.raws[c],typeof m<"u")return!1})}return typeof m>"u"&&(m=e[f]),d.rawCache[f]=m,m}rawBeforeClose(r){let c;return r.walk(f=>{if(f.nodes&&f.nodes.length>0&&typeof f.raws.after<"u")return c=f.raws.after,c.includes(`
|
|
13
13
|
`)&&(c=c.replace(/[^\n]+$/,"")),!1}),c&&(c=c.replace(/\S/g,"")),c}rawBeforeComment(r,c){let f;return r.walkComments(m=>{if(typeof m.raws.before<"u")return f=m.raws.before,f.includes(`
|
|
14
14
|
`)&&(f=f.replace(/[^\n]+$/,"")),!1}),typeof f>"u"?f=this.raw(c,null,"beforeDecl"):f&&(f=f.replace(/\S/g,"")),f}rawBeforeDecl(r,c){let f;return r.walkDecls(m=>{if(typeof m.raws.before<"u")return f=m.raws.before,f.includes(`
|
|
15
15
|
`)&&(f=f.replace(/[^\n]+$/,"")),!1}),typeof f>"u"?f=this.raw(c,null,"beforeRule"):f&&(f=f.replace(/\S/g,"")),f}rawBeforeOpen(r){let c;return r.walk(f=>{if(f.type!=="decl"&&(c=f.raws.between,typeof c<"u"))return!1}),c}rawBeforeRule(r){let c;return r.walk(f=>{if(f.nodes&&(f.parent!==r||r.first!==f)&&typeof f.raws.before<"u")return c=f.raws.before,c.includes(`
|
|
16
16
|
`)&&(c=c.replace(/[^\n]+$/,"")),!1}),c&&(c=c.replace(/\S/g,"")),c}rawColon(r){let c;return r.walkDecls(f=>{if(typeof f.raws.between<"u")return c=f.raws.between.replace(/[^\s:]/g,""),!1}),c}rawEmptyBody(r){let c;return r.walk(f=>{if(f.nodes&&f.nodes.length===0&&(c=f.raws.after,typeof c<"u"))return!1}),c}rawIndent(r){if(r.raws.indent)return r.raws.indent;let c;return r.walk(f=>{let m=f.parent;if(m&&m!==r&&m.parent&&m.parent===r&&typeof f.raws.before<"u"){let l=f.raws.before.split(`
|
|
17
|
-
`);return c=l[l.length-1],c=c.replace(/\S/g,""),!1}}),c}rawSemicolon(r){let c;return r.walk(f=>{if(f.nodes&&f.nodes.length&&f.last.type==="decl"&&(c=f.raws.semicolon,typeof c<"u"))return!1}),c}rawValue(r,c){let f=r[c],m=r.raws[c];return m&&m.value===f?m.raw:f}root(r){this.body(r),r.raws.after&&this.builder(r.raws.after)}rule(r){this.block(r,this.rawValue(r,"selector")),r.raws.ownSemicolon&&this.builder(r.raws.ownSemicolon,r,"end")}stringify(r,c){if(!this[r.type])throw new Error("Unknown AST node type "+r.type+". Maybe you need to change PostCSS stringifier.");this[r.type](r,c)}}return It=s,s.default=s,It}var
|
|
18
|
-
`?(h=1,o+=1):h+=1;return{column:h,line:o}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let
|
|
19
|
-
`);S=new Array(v.length);let E=0;for(let
|
|
17
|
+
`);return c=l[l.length-1],c=c.replace(/\S/g,""),!1}}),c}rawSemicolon(r){let c;return r.walk(f=>{if(f.nodes&&f.nodes.length&&f.last.type==="decl"&&(c=f.raws.semicolon,typeof c<"u"))return!1}),c}rawValue(r,c){let f=r[c],m=r.raws[c];return m&&m.value===f?m.raw:f}root(r){this.body(r),r.raws.after&&this.builder(r.raws.after)}rule(r){this.block(r,this.rawValue(r,"selector")),r.raws.ownSemicolon&&this.builder(r.raws.ownSemicolon,r,"end")}stringify(r,c){if(!this[r.type])throw new Error("Unknown AST node type "+r.type+". Maybe you need to change PostCSS stringifier.");this[r.type](r,c)}}return It=s,s.default=s,It}var Dt,bs;function ht(){if(bs)return Dt;bs=1;let e=zi();function t(s,a){new e(a).stringify(s)}return Dt=t,t.default=t,Dt}var At,vs;function ft(){if(vs)return At;vs=1;let{isClean:e,my:t}=Hr(),s=Gr(),a=zi(),r=ht();function c(m,l){let d=new m.constructor;for(let i in m){if(!Object.prototype.hasOwnProperty.call(m,i)||i==="proxyCache")continue;let h=m[i],o=typeof h;i==="parent"&&o==="object"?l&&(d[i]=l):i==="source"?d[i]=h:Array.isArray(h)?d[i]=h.map(n=>c(n,d)):(o==="object"&&h!==null&&(h=c(h)),d[i]=h)}return d}class f{constructor(l={}){this.raws={},this[e]=!1,this[t]=!0;for(let d in l)if(d==="nodes"){this.nodes=[];for(let i of l[d])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[d]=l[d]}addToError(l){if(l.postcssNode=this,l.stack&&this.source&&/\n\s{4}at /.test(l.stack)){let d=this.source;l.stack=l.stack.replace(/\n\s{4}at /,`$&${d.input.from}:${d.start.line}:${d.start.column}$&`)}return l}after(l){return this.parent.insertAfter(this,l),this}assign(l={}){for(let d in l)this[d]=l[d];return this}before(l){return this.parent.insertBefore(this,l),this}cleanRaws(l){delete this.raws.before,delete this.raws.after,l||delete this.raws.between}clone(l={}){let d=c(this);for(let i in l)d[i]=l[i];return d}cloneAfter(l={}){let d=this.clone(l);return this.parent.insertAfter(this,d),d}cloneBefore(l={}){let d=this.clone(l);return this.parent.insertBefore(this,d),d}error(l,d={}){if(this.source){let{end:i,start:h}=this.rangeBy(d);return this.source.input.error(l,{column:h.column,line:h.line},{column:i.column,line:i.line},d)}return new s(l)}getProxyProcessor(){return{get(l,d){return d==="proxyOf"?l:d==="root"?()=>l.root().toProxy():l[d]},set(l,d,i){return l[d]===i||(l[d]=i,(d==="prop"||d==="value"||d==="name"||d==="params"||d==="important"||d==="text")&&l.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let l=this;for(;l=l.parent;)l[e]=!1}}next(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l+1]}positionBy(l,d){let i=this.source.start;if(l.index)i=this.positionInside(l.index,d);else if(l.word){d=this.toString();let h=d.indexOf(l.word);h!==-1&&(i=this.positionInside(h,d))}return i}positionInside(l,d){let i=d||this.toString(),h=this.source.start.column,o=this.source.start.line;for(let n=0;n<l;n++)i[n]===`
|
|
18
|
+
`?(h=1,o+=1):h+=1;return{column:h,line:o}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let d={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:d.column+1,line:d.line};if(l.word){let h=this.toString(),o=h.indexOf(l.word);o!==-1&&(d=this.positionInside(o,h),i=this.positionInside(o+l.word.length,h))}else l.start?d={column:l.start.column,line:l.start.line}:l.index&&(d=this.positionInside(l.index)),l.end?i={column:l.end.column,line:l.end.line}:typeof l.endIndex=="number"?i=this.positionInside(l.endIndex):l.index&&(i=this.positionInside(l.index+1));return(i.line<d.line||i.line===d.line&&i.column<=d.column)&&(i={column:d.column+1,line:d.line}),{end:i,start:d}}raw(l,d){return new a().raw(this,l,d)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let d=this,i=!1;for(let h of l)h===this?i=!0:i?(this.parent.insertAfter(d,h),d=h):this.parent.insertBefore(d,h);i||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,d){let i={},h=d==null;d=d||new Map;let o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let p=this[n];if(Array.isArray(p))i[n]=p.map(u=>typeof u=="object"&&u.toJSON?u.toJSON(null,d):u);else if(typeof p=="object"&&p.toJSON)i[n]=p.toJSON(null,d);else if(n==="source"){let u=d.get(p.input);u==null&&(u=o,d.set(p.input,o),o++),i[n]={end:p.end,inputId:u,start:p.start}}else i[n]=p}return h&&(i.inputs=[...d.keys()].map(n=>n.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(l=r){l.stringify&&(l=l.stringify);let d="";return l(this,i=>{d+=i}),d}warn(l,d,i){let h={node:this};for(let o in i)h[o]=i[o];return l.warn(d,h)}get proxyOf(){return this}}return At=f,f.default=f,At}var Tt,Ss;function dt(){if(Ss)return Tt;Ss=1;let e=ft();class t extends e{constructor(a){a&&typeof a.value<"u"&&typeof a.value!="string"&&(a={...a,value:String(a.value)}),super(a),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Tt=t,t.default=t,Tt}var _t,Cs;function $o(){if(Cs)return _t;Cs=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return _t={nanoid:(a=21)=>{let r="",c=a;for(;c--;)r+=e[Math.random()*64|0];return r},customAlphabet:(a,r=21)=>(c=r)=>{let f="",m=c;for(;m--;)f+=a[Math.random()*a.length|0];return f}},_t}var kt,Es;function qi(){if(Es)return kt;Es=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=de,{existsSync:s,readFileSync:a}=de,{dirname:r,join:c}=de;function f(l){return Buffer?Buffer.from(l,"base64").toString():window.atob(l)}class m{constructor(d,i){if(i.map===!1)return;this.loadAnnotation(d),this.inline=this.startWith(this.annotation,"data:");let h=i.map?i.map.prev:void 0,o=this.loadMap(i.from,h);!this.mapFile&&i.from&&(this.mapFile=i.from),this.mapFile&&(this.root=r(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(d){let i=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,o=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(o.test(d)||n.test(d))return decodeURIComponent(d.substr(RegExp.lastMatch.length));if(i.test(d)||h.test(d))return f(d.substr(RegExp.lastMatch.length));let p=d.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+p)}getAnnotationURL(d){return d.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(d){return typeof d!="object"?!1:typeof d.mappings=="string"||typeof d._mappings=="string"||Array.isArray(d.sections)}loadAnnotation(d){let i=d.match(/\/\*\s*# sourceMappingURL=/gm);if(!i)return;let h=d.lastIndexOf(i.pop()),o=d.indexOf("*/",h);h>-1&&o>-1&&(this.annotation=this.getAnnotationURL(d.substring(h,o)))}loadFile(d){if(this.root=r(d),s(d))return this.mapFile=d,a(d,"utf-8").toString().trim()}loadMap(d,i){if(i===!1)return!1;if(i){if(typeof i=="string")return i;if(typeof i=="function"){let h=i(d);if(h){let o=this.loadFile(h);if(!o)throw new Error("Unable to load previous source map: "+h.toString());return o}}else{if(i instanceof e)return t.fromSourceMap(i).toString();if(i instanceof t)return i.toString();if(this.isMap(i))return JSON.stringify(i);throw new Error("Unsupported previous source map format: "+i.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return d&&(h=c(r(d),h)),this.loadFile(h)}}}startWith(d,i){return d?d.substr(0,i.length)===i:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return kt=m,m.default=m,kt}var Pt,xs;function pt(){if(xs)return Pt;xs=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=de,{fileURLToPath:s,pathToFileURL:a}=de,{isAbsolute:r,resolve:c}=de,{nanoid:f}=$o(),m=de,l=Gr(),d=qi(),i=Symbol("fromOffsetCache"),h=!!(e&&t),o=!!(c&&r);class n{constructor(u,g={}){if(u===null||typeof u>"u"||typeof u=="object"&&!u.toString)throw new Error(`PostCSS received ${u} instead of CSS string`);if(this.css=u.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,g.from&&(!o||/^\w+:\/\//.test(g.from)||r(g.from)?this.file=g.from:this.file=c(g.from)),o&&h){let S=new d(this.css,g);if(S.text){this.map=S;let y=S.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+f(6)+">"),this.map&&(this.map.file=this.from)}error(u,g,S,y={}){let v,E,b;if(g&&typeof g=="object"){let C=g,R=S;if(typeof C.offset=="number"){let O=this.fromOffset(C.offset);g=O.line,S=O.col}else g=C.line,S=C.column;if(typeof R.offset=="number"){let O=this.fromOffset(R.offset);E=O.line,b=O.col}else E=R.line,b=R.column}else if(!S){let C=this.fromOffset(g);g=C.line,S=C.col}let w=this.origin(g,S,E,b);return w?v=new l(u,w.endLine===void 0?w.line:{column:w.column,line:w.line},w.endLine===void 0?w.column:{column:w.endColumn,line:w.endLine},w.source,w.file,y.plugin):v=new l(u,E===void 0?g:{column:S,line:g},E===void 0?S:{column:b,line:E},this.css,this.file,y.plugin),v.input={column:S,endColumn:b,endLine:E,line:g,source:this.css},this.file&&(a&&(v.input.url=a(this.file).toString()),v.input.file=this.file),v}fromOffset(u){let g,S;if(this[i])S=this[i];else{let v=this.css.split(`
|
|
19
|
+
`);S=new Array(v.length);let E=0;for(let b=0,w=v.length;b<w;b++)S[b]=E,E+=v[b].length+1;this[i]=S}g=S[S.length-1];let y=0;if(u>=g)y=S.length-1;else{let v=S.length-2,E;for(;y<v;)if(E=y+(v-y>>1),u<S[E])v=E-1;else if(u>=S[E+1])y=E+1;else{y=E;break}}return{col:u-S[y]+1,line:y+1}}mapResolve(u){return/^\w+:\/\//.test(u)?u:c(this.map.consumer().sourceRoot||this.map.root||".",u)}origin(u,g,S,y){if(!this.map)return!1;let v=this.map.consumer(),E=v.originalPositionFor({column:g,line:u});if(!E.source)return!1;let b;typeof S=="number"&&(b=v.originalPositionFor({column:y,line:S}));let w;r(E.source)?w=a(E.source):w=new URL(E.source,this.map.consumer().sourceRoot||a(this.map.mapFile));let C={column:E.column,endColumn:b&&b.column,endLine:b&&b.line,line:E.line,url:w.toString()};if(w.protocol==="file:")if(s)C.file=s(w);else throw new Error("file: protocol is not available in this PostCSS build");let R=v.sourceContentFor(E.source);return R&&(C.source=R),C}toJSON(){let u={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(u[g]=this[g]);return this.map&&(u.map={...this.map},u.map.consumerCache&&(u.map.consumerCache=void 0)),u}get from(){return this.file||this.id}}return Pt=n,n.default=n,m&&m.registerInput&&m.registerInput(n),Pt}var Lt,Rs;function Vi(){if(Rs)return Lt;Rs=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=de,{dirname:s,relative:a,resolve:r,sep:c}=de,{pathToFileURL:f}=de,m=pt(),l=!!(e&&t),d=!!(s&&r&&a&&c);class i{constructor(o,n,p,u){this.stringify=o,this.mapOpts=p.map||{},this.root=n,this.opts=p,this.css=u,this.originalCSS=u,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let o;this.isInline()?o="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?o=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?o=this.mapOpts.annotation(this.opts.to,this.root):o=this.outputFile()+".map";let n=`
|
|
20
20
|
`;this.css.includes(`\r
|
|
21
21
|
`)&&(n=`\r
|
|
22
|
-
`),this.css+=n+"/*# sourceMappingURL="+o+" */"}applyPrevMaps(){for(let o of this.previous()){let n=this.toUrl(this.path(o.file)),
|
|
23
|
-
`),n=b.length-S):n+=b.length,v&&E!=="start"){let y=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==y.last||y.raws.semicolon)&&(v.source&&v.source.end?(u.source=this.sourcePath(v),u.original.line=v.source.end.line,u.original.column=v.source.end.column-1,u.generated.line=o,u.generated.column=n-2,this.map.addMapping(u)):(u.source=d,u.original.line=1,u.original.column=0,u.generated.line=o,u.generated.column=n-1,this.map.addMapping(u)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(o=>o.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let o=this.mapOpts.annotation;return typeof o<"u"&&o!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(o=>o.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(o){if(this.mapOpts.absolute||o.charCodeAt(0)===60||/^\w+:\/\//.test(o))return o;let n=this.memoizedPaths.get(o);if(n)return n;let d=this.opts.to?s(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(d=s(r(d,this.mapOpts.annotation)));let u=a(d,o);return this.memoizedPaths.set(o,u),u}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(o=>{if(o.source&&o.source.input.map){let n=o.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let o=new m(this.originalCSS,this.opts);o.map&&this.previousMaps.push(o.map)}return this.previousMaps}setSourcesContent(){let o={};if(this.root)this.root.walk(n=>{if(n.source){let d=n.source.input.from;if(d&&!o[d]){o[d]=!0;let u=this.usesFileUrls?this.toFileUrl(d):this.toUrl(this.path(d));this.map.setSourceContent(u,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(o){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(o.source.input.from):this.toUrl(this.path(o.source.input.from))}toBase64(o){return Buffer?Buffer.from(o).toString("base64"):window.btoa(unescape(encodeURIComponent(o)))}toFileUrl(o){let n=this.memoizedFileURLs.get(o);if(n)return n;if(f){let d=f(o).toString();return this.memoizedFileURLs.set(o,d),d}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(o){let n=this.memoizedURLs.get(o);if(n)return n;c==="\\"&&(o=o.replace(/\\/g,"/"));let d=encodeURI(o).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(o,d),d}}return Lt=i,Lt}var Ft,Ms;function mt(){if(Ms)return Ft;Ms=1;let e=ft();class t extends e{constructor(a){super(a),this.type="comment"}}return Ft=t,t.default=t,Ft}var Ut,Ns;function Ee(){if(Ns)return Ut;Ns=1;let{isClean:e,my:t}=Hr(),s=dt(),a=mt(),r=ft(),c,f,m,l;function p(o){return o.map(n=>(n.nodes&&(n.nodes=p(n.nodes)),delete n.source,n))}function i(o){if(o[e]=!1,o.proxyOf.nodes)for(let n of o.proxyOf.nodes)i(n)}class h extends r{append(...n){for(let d of n){let u=this.normalize(d,this.last);for(let g of u)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let d of this.nodes)d.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let d=this.getIterator(),u,g;for(;this.indexes[d]<this.proxyOf.nodes.length&&(u=this.indexes[d],g=n(this.proxyOf.nodes[u],u),g!==!1);)this.indexes[d]+=1;return delete this.indexes[d],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,d){return d==="proxyOf"?n:n[d]?d==="each"||typeof d=="string"&&d.startsWith("walk")?(...u)=>n[d](...u.map(g=>typeof g=="function"?(S,b)=>g(S.toProxy(),b):g)):d==="every"||d==="some"?u=>n[d]((g,...S)=>u(g.toProxy(),...S)):d==="root"?()=>n.root().toProxy():d==="nodes"?n.nodes.map(u=>u.toProxy()):d==="first"||d==="last"?n[d].toProxy():n[d]:n[d]},set(n,d,u){return n[d]===u||(n[d]=u,(d==="name"||d==="params"||d==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,d){let u=this.index(n),g=this.normalize(d,this.proxyOf.nodes[u]).reverse();u=this.index(n);for(let b of g)this.proxyOf.nodes.splice(u+1,0,b);let S;for(let b in this.indexes)S=this.indexes[b],u<S&&(this.indexes[b]=S+g.length);return this.markDirty(),this}insertBefore(n,d){let u=this.index(n),g=u===0?"prepend":!1,S=this.normalize(d,this.proxyOf.nodes[u],g).reverse();u=this.index(n);for(let v of S)this.proxyOf.nodes.splice(u,0,v);let b;for(let v in this.indexes)b=this.indexes[v],u<=b&&(this.indexes[v]=b+S.length);return this.markDirty(),this}normalize(n,d){if(typeof n=="string")n=p(c(n).nodes);else if(typeof n>"u")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value>"u")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new s(n)]}else if(n.selector)n=[new f(n)];else if(n.name)n=[new m(n)];else if(n.text)n=[new a(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[t]||h.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&i(g),typeof g.raws.before>"u"&&d&&typeof d.raws.before<"u"&&(g.raws.before=d.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let d of n){let u=this.normalize(d,this.first,"prepend").reverse();for(let g of u)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+u.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let d;for(let u in this.indexes)d=this.indexes[u],d>=n&&(this.indexes[u]=d-1);return this.markDirty(),this}replaceValues(n,d,u){return u||(u=d,d={}),this.walkDecls(g=>{d.props&&!d.props.includes(g.prop)||d.fast&&!g.value.includes(d.fast)||(g.value=g.value.replace(n,u))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((d,u)=>{let g;try{g=n(d,u)}catch(S){throw d.addToError(S)}return g!==!1&&d.walk&&(g=d.walk(n)),g})}walkAtRules(n,d){return d?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="atrule"&&n.test(u.name))return d(u,g)}):this.walk((u,g)=>{if(u.type==="atrule"&&u.name===n)return d(u,g)}):(d=n,this.walk((u,g)=>{if(u.type==="atrule")return d(u,g)}))}walkComments(n){return this.walk((d,u)=>{if(d.type==="comment")return n(d,u)})}walkDecls(n,d){return d?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="decl"&&n.test(u.prop))return d(u,g)}):this.walk((u,g)=>{if(u.type==="decl"&&u.prop===n)return d(u,g)}):(d=n,this.walk((u,g)=>{if(u.type==="decl")return d(u,g)}))}walkRules(n,d){return d?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="rule"&&n.test(u.selector))return d(u,g)}):this.walk((u,g)=>{if(u.type==="rule"&&u.selector===n)return d(u,g)}):(d=n,this.walk((u,g)=>{if(u.type==="rule")return d(u,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=o=>{c=o},h.registerRule=o=>{f=o},h.registerAtRule=o=>{m=o},h.registerRoot=o=>{l=o},Ut=h,h.default=h,h.rebuild=o=>{o.type==="atrule"?Object.setPrototypeOf(o,m.prototype):o.type==="rule"?Object.setPrototypeOf(o,f.prototype):o.type==="decl"?Object.setPrototypeOf(o,s.prototype):o.type==="comment"?Object.setPrototypeOf(o,a.prototype):o.type==="root"&&Object.setPrototypeOf(o,l.prototype),o[t]=!0,o.nodes&&o.nodes.forEach(n=>{h.rebuild(n)})},Ut}var Bt,Os;function Yr(){if(Os)return Bt;Os=1;let e=Ee(),t,s;class a extends e{constructor(c){super({type:"document",...c}),this.nodes||(this.nodes=[])}toResult(c={}){return new t(new s,this,c).stringify()}}return a.registerLazyResult=r=>{t=r},a.registerProcessor=r=>{s=r},Bt=a,a.default=a,Bt}var $t,Is;function ji(){if(Is)return $t;Is=1;let e={};return $t=function(s){e[s]||(e[s]=!0,typeof console<"u"&&console.warn&&console.warn(s))},$t}var Wt,As;function Gi(){if(As)return Wt;As=1;class e{constructor(s,a={}){if(this.type="warning",this.text=s,a.node&&a.node.source){let r=a.node.rangeBy(a);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in a)this[r]=a[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}}return Wt=e,e.default=e,Wt}var zt,Ds;function Jr(){if(Ds)return zt;Ds=1;let e=Gi();class t{constructor(a,r,c){this.processor=a,this.messages=[],this.root=r,this.opts=c,this.css=void 0,this.map=void 0}toString(){return this.css}warn(a,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let c=new e(a,r);return this.messages.push(c),c}warnings(){return this.messages.filter(a=>a.type==="warning")}get content(){return this.css}}return zt=t,t.default=t,zt}var qt,Ts;function Wo(){if(Ts)return qt;Ts=1;let e=39,t=34,s=92,a=47,r=10,c=32,f=12,m=9,l=13,p=91,i=93,h=40,o=41,n=123,d=125,u=59,g=42,S=58,b=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return qt=function(R,O={}){let M=R.css.valueOf(),T=O.ignoreErrors,A,x,ce,se,U,F,H,Q,Y,B,ye=M.length,N=0,me=[],ae=[];function ke(){return N}function K(D){throw R.error("Unclosed "+D,N)}function he(){return ae.length===0&&N>=ye}function Se(D){if(ae.length)return ae.pop();if(N>=ye)return;let J=D?D.ignoreUnclosed:!1;switch(A=M.charCodeAt(N),A){case r:case c:case m:case l:case f:{x=N;do x+=1,A=M.charCodeAt(x);while(A===c||A===r||A===m||A===l||A===f);B=["space",M.slice(N,x)],N=x-1;break}case p:case i:case n:case d:case S:case u:case o:{let $=String.fromCharCode(A);B=[$,$,N];break}case h:{if(Q=me.length?me.pop()[1]:"",Y=M.charCodeAt(N+1),Q==="url"&&Y!==e&&Y!==t&&Y!==c&&Y!==r&&Y!==m&&Y!==f&&Y!==l){x=N;do{if(F=!1,x=M.indexOf(")",x+1),x===-1)if(T||J){x=N;break}else K("bracket");for(H=x;M.charCodeAt(H-1)===s;)H-=1,F=!F}while(F);B=["brackets",M.slice(N,x+1),N,x],N=x}else x=M.indexOf(")",N+1),se=M.slice(N,x+1),x===-1||y.test(se)?B=["(","(",N]:(B=["brackets",se,N,x],N=x);break}case e:case t:{ce=A===e?"'":'"',x=N;do{if(F=!1,x=M.indexOf(ce,x+1),x===-1)if(T||J){x=N+1;break}else K("string");for(H=x;M.charCodeAt(H-1)===s;)H-=1,F=!F}while(F);B=["string",M.slice(N,x+1),N,x],N=x;break}case b:{v.lastIndex=N+1,v.test(M),v.lastIndex===0?x=M.length-1:x=v.lastIndex-2,B=["at-word",M.slice(N,x+1),N,x],N=x;break}case s:{for(x=N,U=!0;M.charCodeAt(x+1)===s;)x+=1,U=!U;if(A=M.charCodeAt(x+1),U&&A!==a&&A!==c&&A!==r&&A!==m&&A!==l&&A!==f&&(x+=1,w.test(M.charAt(x)))){for(;w.test(M.charAt(x+1));)x+=1;M.charCodeAt(x+1)===c&&(x+=1)}B=["word",M.slice(N,x+1),N,x],N=x;break}default:{A===a&&M.charCodeAt(N+1)===g?(x=M.indexOf("*/",N+2)+1,x===0&&(T||J?x=M.length:K("comment")),B=["comment",M.slice(N,x+1),N,x],N=x):(E.lastIndex=N+1,E.test(M),E.lastIndex===0?x=M.length-1:x=E.lastIndex-2,B=["word",M.slice(N,x+1),N,x],me.push(B),N=x);break}}return N++,B}function we(D){ae.push(D)}return{back:we,endOfFile:he,nextToken:Se,position:ke}},qt}var Vt,_s;function Xr(){if(_s)return Vt;_s=1;let e=Ee();class t extends e{constructor(a){super(a),this.type="atrule"}append(...a){return this.proxyOf.nodes||(this.nodes=[]),super.append(...a)}prepend(...a){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...a)}}return Vt=t,t.default=t,e.registerAtRule(t),Vt}var jt,ks;function We(){if(ks)return jt;ks=1;let e=Ee(),t,s;class a extends e{constructor(c){super(c),this.type="root",this.nodes||(this.nodes=[])}normalize(c,f,m){let l=super.normalize(c);if(f){if(m==="prepend")this.nodes.length>1?f.raws.before=this.nodes[1].raws.before:delete f.raws.before;else if(this.first!==f)for(let p of l)p.raws.before=f.raws.before}return l}removeChild(c,f){let m=this.index(c);return!f&&m===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[m].raws.before),super.removeChild(c)}toResult(c={}){return new t(new s,this,c).stringify()}}return a.registerLazyResult=r=>{t=r},a.registerProcessor=r=>{s=r},jt=a,a.default=a,e.registerRoot(a),jt}var Gt,Ps;function Hi(){if(Ps)return Gt;Ps=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let s=[" ",`
|
|
24
|
-
`," "];return e.split(t,s)},split(t,s,a){let r=[],c="",f=!1,m=0,l=!1,p="",i=!1;for(let h of t)i?i=!1:h==="\\"?i=!0:l?h===p&&(l=!1):h==='"'||h==="'"?(l=!0,p=h):h==="("?m+=1:h===")"?m>0&&(m-=1):m===0&&s.includes(h)&&(f=!0),f?(c!==""&&r.push(c.trim()),c="",f=!1):c+=h;return(a||c!=="")&&r.push(c.trim()),r}};return Gt=e,e.default=e,Gt}var Ht,Ls;function Qr(){if(Ls)return Ht;Ls=1;let e=Ee(),t=Hi();class s extends e{constructor(r){super(r),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(r){let c=this.selector?this.selector.match(/,\s*/):null,f=c?c[0]:","+this.raw("between","beforeOpen");this.selector=r.join(f)}}return Ht=s,s.default=s,e.registerRule(s),Ht}var Yt,Fs;function zo(){if(Fs)return Yt;Fs=1;let e=dt(),t=Wo(),s=mt(),a=Xr(),r=We(),c=Qr(),f={empty:!0,space:!0};function m(p){for(let i=p.length-1;i>=0;i--){let h=p[i],o=h[3]||h[2];if(o)return o}}class l{constructor(i){this.input=i,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:i,start:{column:1,line:1,offset:0}}}atrule(i){let h=new a;h.name=i[1].slice(1),h.name===""&&this.unnamedAtrule(h,i),this.init(h,i[2]);let o,n,d,u=!1,g=!1,S=[],b=[];for(;!this.tokenizer.endOfFile();){if(i=this.tokenizer.nextToken(),o=i[0],o==="("||o==="["?b.push(o==="("?")":"]"):o==="{"&&b.length>0?b.push("}"):o===b[b.length-1]&&b.pop(),b.length===0)if(o===";"){h.source.end=this.getPosition(i[2]),h.source.end.offset++,this.semicolon=!0;break}else if(o==="{"){g=!0;break}else if(o==="}"){if(S.length>0){for(d=S.length-1,n=S[d];n&&n[0]==="space";)n=S[--d];n&&(h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++)}this.end(i);break}else S.push(i);else S.push(i);if(this.tokenizer.endOfFile()){u=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(h.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(h,"params",S),u&&(i=S[S.length-1],h.source.end=this.getPosition(i[3]||i[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),g&&(h.nodes=[],this.current=h)}checkMissedSemicolon(i){let h=this.colon(i);if(h===!1)return;let o=0,n;for(let d=h-1;d>=0&&(n=i[d],!(n[0]!=="space"&&(o+=1,o===2)));d--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(i){let h=0,o,n,d;for(let[u,g]of i.entries()){if(o=g,n=o[0],n==="("&&(h+=1),n===")"&&(h-=1),h===0&&n===":")if(!d)this.doubleColon(o);else{if(d[0]==="word"&&d[1]==="progid")continue;return u}d=o}return!1}comment(i){let h=new s;this.init(h,i[2]),h.source.end=this.getPosition(i[3]||i[2]),h.source.end.offset++;let o=i[1].slice(2,-2);if(/^\s*$/.test(o))h.text="",h.raws.left=o,h.raws.right="";else{let n=o.match(/^(\s*)([^]*\S)(\s*)$/);h.text=n[2],h.raws.left=n[1],h.raws.right=n[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(i,h){let o=new e;this.init(o,i[0][2]);let n=i[i.length-1];for(n[0]===";"&&(this.semicolon=!0,i.pop()),o.source.end=this.getPosition(n[3]||n[2]||m(i)),o.source.end.offset++;i[0][0]!=="word";)i.length===1&&this.unknownWord(i),o.raws.before+=i.shift()[1];for(o.source.start=this.getPosition(i[0][2]),o.prop="";i.length;){let b=i[0][0];if(b===":"||b==="space"||b==="comment")break;o.prop+=i.shift()[1]}o.raws.between="";let d;for(;i.length;)if(d=i.shift(),d[0]===":"){o.raws.between+=d[1];break}else d[0]==="word"&&/\w/.test(d[1])&&this.unknownWord([d]),o.raws.between+=d[1];(o.prop[0]==="_"||o.prop[0]==="*")&&(o.raws.before+=o.prop[0],o.prop=o.prop.slice(1));let u=[],g;for(;i.length&&(g=i[0][0],!(g!=="space"&&g!=="comment"));)u.push(i.shift());this.precheckMissedSemicolon(i);for(let b=i.length-1;b>=0;b--){if(d=i[b],d[1].toLowerCase()==="!important"){o.important=!0;let v=this.stringFrom(i,b);v=this.spacesFromEnd(i)+v,v!==" !important"&&(o.raws.important=v);break}else if(d[1].toLowerCase()==="important"){let v=i.slice(0),E="";for(let y=b;y>0;y--){let w=v[y][0];if(E.trim().indexOf("!")===0&&w!=="space")break;E=v.pop()[1]+E}E.trim().indexOf("!")===0&&(o.important=!0,o.raws.important=E,i=v)}if(d[0]!=="space"&&d[0]!=="comment")break}i.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(o.raws.between+=u.map(b=>b[1]).join(""),u=[]),this.raw(o,"value",u.concat(i),h),o.value.includes(":")&&!h&&this.checkMissedSemicolon(i)}doubleColon(i){throw this.input.error("Double colon",{offset:i[2]},{offset:i[2]+i[1].length})}emptyRule(i){let h=new c;this.init(h,i[2]),h.selector="",h.raws.between="",this.current=h}end(i){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(i[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(i)}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(i){if(this.spaces+=i[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(i){let h=this.input.fromOffset(i);return{column:h.col,line:h.line,offset:i}}init(i,h){this.current.push(i),i.source={input:this.input,start:this.getPosition(h)},i.raws.before=this.spaces,this.spaces="",i.type!=="comment"&&(this.semicolon=!1)}other(i){let h=!1,o=null,n=!1,d=null,u=[],g=i[1].startsWith("--"),S=[],b=i;for(;b;){if(o=b[0],S.push(b),o==="("||o==="[")d||(d=b),u.push(o==="("?")":"]");else if(g&&n&&o==="{")d||(d=b),u.push("}");else if(u.length===0)if(o===";")if(n){this.decl(S,g);return}else break;else if(o==="{"){this.rule(S);return}else if(o==="}"){this.tokenizer.back(S.pop()),h=!0;break}else o===":"&&(n=!0);else o===u[u.length-1]&&(u.pop(),u.length===0&&(d=null));b=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),u.length>0&&this.unclosedBracket(d),h&&n){if(!g)for(;S.length&&(b=S[S.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let i;for(;!this.tokenizer.endOfFile();)switch(i=this.tokenizer.nextToken(),i[0]){case"space":this.spaces+=i[1];break;case";":this.freeSemicolon(i);break;case"}":this.end(i);break;case"comment":this.comment(i);break;case"at-word":this.atrule(i);break;case"{":this.emptyRule(i);break;default:this.other(i);break}this.endFile()}precheckMissedSemicolon(){}raw(i,h,o,n){let d,u,g=o.length,S="",b=!0,v,E;for(let y=0;y<g;y+=1)d=o[y],u=d[0],u==="space"&&y===g-1&&!n?b=!1:u==="comment"?(E=o[y-1]?o[y-1][0]:"empty",v=o[y+1]?o[y+1][0]:"empty",!f[E]&&!f[v]?S.slice(-1)===","?b=!1:S+=d[1]:b=!1):S+=d[1];if(!b){let y=o.reduce((w,C)=>w+C[1],"");i.raws[h]={raw:y,value:S}}i[h]=S}rule(i){i.pop();let h=new c;this.init(h,i[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(i),this.raw(h,"selector",i),this.current=h}spacesAndCommentsFromEnd(i){let h,o="";for(;i.length&&(h=i[i.length-1][0],!(h!=="space"&&h!=="comment"));)o=i.pop()[1]+o;return o}spacesAndCommentsFromStart(i){let h,o="";for(;i.length&&(h=i[0][0],!(h!=="space"&&h!=="comment"));)o+=i.shift()[1];return o}spacesFromEnd(i){let h,o="";for(;i.length&&(h=i[i.length-1][0],h==="space");)o=i.pop()[1]+o;return o}stringFrom(i,h){let o="";for(let n=h;n<i.length;n++)o+=i[n][1];return i.splice(h,i.length-h),o}unclosedBlock(){let i=this.current.source.start;throw this.input.error("Unclosed block",i.line,i.column)}unclosedBracket(i){throw this.input.error("Unclosed bracket",{offset:i[2]},{offset:i[2]+1})}unexpectedClose(i){throw this.input.error("Unexpected }",{offset:i[2]},{offset:i[2]+1})}unknownWord(i){throw this.input.error("Unknown word",{offset:i[0][2]},{offset:i[0][2]+i[0][1].length})}unnamedAtrule(i,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return Yt=l,Yt}var Jt,Us;function Zr(){if(Us)return Jt;Us=1;let e=Ee(),t=zo(),s=pt();function a(r,c){let f=new s(r,c),m=new t(f);try{m.parse()}catch(l){throw l}return m.root}return Jt=a,a.default=a,e.registerParse(a),Jt}var Xt,Bs;function Yi(){if(Bs)return Xt;Bs=1;let{isClean:e,my:t}=Hr(),s=Vi(),a=ht(),r=Ee(),c=Yr(),f=ji(),m=Jr(),l=Zr(),p=We(),i={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},o={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function d(E){return typeof E=="object"&&typeof E.then=="function"}function u(E){let y=!1,w=i[E.type];return E.type==="decl"?y=E.prop.toLowerCase():E.type==="atrule"&&(y=E.name.toLowerCase()),y&&E.append?[w,w+"-"+y,n,w+"Exit",w+"Exit-"+y]:y?[w,w+"-"+y,w+"Exit",w+"Exit-"+y]:E.append?[w,n,w+"Exit"]:[w,w+"Exit"]}function g(E){let y;return E.type==="document"?y=["Document",n,"DocumentExit"]:E.type==="root"?y=["Root",n,"RootExit"]:y=u(E),{eventIndex:0,events:y,iterator:0,node:E,visitorIndex:0,visitors:[]}}function S(E){return E[e]=!1,E.nodes&&E.nodes.forEach(y=>S(y)),E}let b={};class v{constructor(y,w,C){this.stringified=!1,this.processed=!1;let R;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))R=S(w);else if(w instanceof v||w instanceof m)R=S(w.root),w.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let O=l;C.syntax&&(O=C.syntax.parse),C.parser&&(O=C.parser),O.parse&&(O=O.parse);try{R=O(w,C)}catch(M){this.processed=!0,this.error=M}R&&!R[t]&&r.rebuild(R)}this.result=new m(y,R,C),this.helpers={...b,postcss:b,result:this.result},this.plugins=this.processor.plugins.map(O=>typeof O=="object"&&O.prepare?{...O,...O.prepare(this.result)}:O)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,w){let C=this.result.lastPlugin;try{w&&w.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return y}prepareVisitors(){this.listeners={};let y=(w,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,R])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!h[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!o[C])if(typeof w[C]=="object")for(let R in w[C])R==="*"?y(w,C,w[C][R]):y(w,C+"-"+R.toLowerCase(),w[C][R]);else typeof w[C]=="function"&&y(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let w=this.plugins[y],C=this.runOnRoot(w);if(d(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[e];){y[e]=!0;let w=[g(y)];for(;w.length>0;){let C=this.visitTick(w);if(d(C))try{await C}catch(R){let O=w[w.length-1].node;throw this.handleError(R,O)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(y.type==="document"){let R=y.nodes.map(O=>C(O,this.helpers));await Promise.all(R)}else await C(y,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return d(w[0])?Promise.all(w):w}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,w=a;y.syntax&&(w=y.syntax.stringify),y.stringifier&&(w=y.stringifier),w.stringify&&(w=w.stringify);let R=new s(w,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let y of this.plugins){let w=this.runOnRoot(y);if(d(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[e];)y[e]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let w of y.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,w){return this.async().then(y,w)}toString(){return this.css}visitSync(y,w){for(let[C,R]of y){this.result.lastPlugin=C;let O;try{O=R(w,this.helpers)}catch(M){throw this.handleError(M,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(d(O))throw this.getAsyncError()}}visitTick(y){let w=y[y.length-1],{node:C,visitors:R}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(R.length>0&&w.visitorIndex<R.length){let[M,T]=R[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===R.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=M;try{return T(C.toProxy(),this.helpers)}catch(A){throw this.handleError(A,C)}}if(w.iterator!==0){let M=w.iterator,T;for(;T=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!T[e]){T[e]=!0,y.push(g(T));return}w.iterator=0,delete C.indexes[M]}let O=w.events;for(;w.eventIndex<O.length;){let M=O[w.eventIndex];if(w.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[e]=!0,w.iterator=C.getIterator());return}else if(this.listeners[M]){w.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[e]=!0;let w=u(y);for(let C of w)if(C===n)y.nodes&&y.each(R=>{R[e]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,y.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return v.registerPostcss=E=>{b=E},Xt=v,v.default=v,p.registerLazyResult(v),c.registerLazyResult(v),Xt}var Qt,$s;function qo(){if($s)return Qt;$s=1;let e=Vi(),t=ht(),s=ji(),a=Zr(),r=Jr();class c{constructor(m,l,p){l=l.toString(),this.stringified=!1,this._processor=m,this._css=l,this._opts=p,this._map=void 0;let i,h=t;this.result=new r(this._processor,i,this._opts),this.result.css=l;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let n=new e(h,i,this._opts,l);if(n.isMap()){let[d,u]=n.generate();d&&(this.result.css=d),u&&(this.result.map=u)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(m){return this.async().catch(m)}finally(m){return this.async().then(m,m)}sync(){if(this.error)throw this.error;return this.result}then(m,l){return this.async().then(m,l)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let m,l=a;try{m=l(this._css,this._opts)}catch(p){this.error=p}if(this.error)throw this.error;return this._root=m,m}get[Symbol.toStringTag](){return"NoWorkResult"}}return Qt=c,c.default=c,Qt}var Zt,Ws;function Vo(){if(Ws)return Zt;Ws=1;let e=qo(),t=Yi(),s=Yr(),a=We();class r{constructor(f=[]){this.version="8.4.38",this.plugins=this.normalize(f)}normalize(f){let m=[];for(let l of f)if(l.postcss===!0?l=l():l.postcss&&(l=l.postcss),typeof l=="object"&&Array.isArray(l.plugins))m=m.concat(l.plugins);else if(typeof l=="object"&&l.postcssPlugin)m.push(l);else if(typeof l=="function")m.push(l);else if(!(typeof l=="object"&&(l.parse||l.stringify)))throw new Error(l+" is not a PostCSS plugin");return m}process(f,m={}){return!this.plugins.length&&!m.parser&&!m.stringifier&&!m.syntax?new e(this,f,m):new t(this,f,m)}use(f){return this.plugins=this.plugins.concat(this.normalize([f])),this}}return Zt=r,r.default=r,a.registerProcessor(r),s.registerProcessor(r),Zt}var Kt,zs;function jo(){if(zs)return Kt;zs=1;let e=dt(),t=qi(),s=mt(),a=Xr(),r=pt(),c=We(),f=Qr();function m(l,p){if(Array.isArray(l))return l.map(o=>m(o));let{inputs:i,...h}=l;if(i){p=[];for(let o of i){let n={...o,__proto__:r.prototype};n.map&&(n.map={...n.map,__proto__:t.prototype}),p.push(n)}}if(h.nodes&&(h.nodes=l.nodes.map(o=>m(o,p))),h.source){let{inputId:o,...n}=h.source;h.source=n,o!=null&&(h.source.input=p[o])}if(h.type==="root")return new c(h);if(h.type==="decl")return new e(h);if(h.type==="rule")return new f(h);if(h.type==="comment")return new s(h);if(h.type==="atrule")return new a(h);throw new Error("Unknown node type: "+l.type)}return Kt=m,m.default=m,Kt}var er,qs;function Go(){if(qs)return er;qs=1;let e=Gr(),t=dt(),s=Yi(),a=Ee(),r=Vo(),c=ht(),f=jo(),m=Yr(),l=Gi(),p=mt(),i=Xr(),h=Jr(),o=pt(),n=Zr(),d=Hi(),u=Qr(),g=We(),S=ft();function b(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new r(v)}return b.plugin=function(E,y){let w=!1;function C(...O){console&&console.warn&&!w&&(w=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
22
|
+
`),this.css+=n+"/*# sourceMappingURL="+o+" */"}applyPrevMaps(){for(let o of this.previous()){let n=this.toUrl(this.path(o.file)),p=o.root||s(o.file),u;this.mapOpts.sourcesContent===!1?(u=new e(o.text),u.sourcesContent&&(u.sourcesContent=null)):u=o.consumer(),this.map.applySourceMap(u,n,this.toUrl(this.path(p)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let o;for(let n=this.root.nodes.length-1;n>=0;n--)o=this.root.nodes[n],o.type==="comment"&&o.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),d&&l&&this.isMap())return this.generateMap();{let o="";return this.stringify(this.root,n=>{o+=n}),[o]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let o=this.previous()[0].consumer();o.file=this.outputFile(),this.map=t.fromSourceMap(o,{ignoreInvalidMapping:!0})}else this.map=new t({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 t({file:this.outputFile(),ignoreInvalidMapping:!0});let o=1,n=1,p="<no source>",u={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,S;this.stringify(this.root,(y,v,E)=>{if(this.css+=y,v&&E!=="end"&&(u.generated.line=o,u.generated.column=n-1,v.source&&v.source.start?(u.source=this.sourcePath(v),u.original.line=v.source.start.line,u.original.column=v.source.start.column-1,this.map.addMapping(u)):(u.source=p,u.original.line=1,u.original.column=0,this.map.addMapping(u))),g=y.match(/\n/g),g?(o+=g.length,S=y.lastIndexOf(`
|
|
23
|
+
`),n=y.length-S):n+=y.length,v&&E!=="start"){let b=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==b.last||b.raws.semicolon)&&(v.source&&v.source.end?(u.source=this.sourcePath(v),u.original.line=v.source.end.line,u.original.column=v.source.end.column-1,u.generated.line=o,u.generated.column=n-2,this.map.addMapping(u)):(u.source=p,u.original.line=1,u.original.column=0,u.generated.line=o,u.generated.column=n-1,this.map.addMapping(u)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(o=>o.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let o=this.mapOpts.annotation;return typeof o<"u"&&o!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(o=>o.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(o){if(this.mapOpts.absolute||o.charCodeAt(0)===60||/^\w+:\/\//.test(o))return o;let n=this.memoizedPaths.get(o);if(n)return n;let p=this.opts.to?s(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=s(r(p,this.mapOpts.annotation)));let u=a(p,o);return this.memoizedPaths.set(o,u),u}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(o=>{if(o.source&&o.source.input.map){let n=o.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let o=new m(this.originalCSS,this.opts);o.map&&this.previousMaps.push(o.map)}return this.previousMaps}setSourcesContent(){let o={};if(this.root)this.root.walk(n=>{if(n.source){let p=n.source.input.from;if(p&&!o[p]){o[p]=!0;let u=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(u,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(o){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(o.source.input.from):this.toUrl(this.path(o.source.input.from))}toBase64(o){return Buffer?Buffer.from(o).toString("base64"):window.btoa(unescape(encodeURIComponent(o)))}toFileUrl(o){let n=this.memoizedFileURLs.get(o);if(n)return n;if(f){let p=f(o).toString();return this.memoizedFileURLs.set(o,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(o){let n=this.memoizedURLs.get(o);if(n)return n;c==="\\"&&(o=o.replace(/\\/g,"/"));let p=encodeURI(o).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(o,p),p}}return Lt=i,Lt}var Ft,Ms;function mt(){if(Ms)return Ft;Ms=1;let e=ft();class t extends e{constructor(a){super(a),this.type="comment"}}return Ft=t,t.default=t,Ft}var Ut,Ns;function xe(){if(Ns)return Ut;Ns=1;let{isClean:e,my:t}=Hr(),s=dt(),a=mt(),r=ft(),c,f,m,l;function d(o){return o.map(n=>(n.nodes&&(n.nodes=d(n.nodes)),delete n.source,n))}function i(o){if(o[e]=!1,o.proxyOf.nodes)for(let n of o.proxyOf.nodes)i(n)}class h extends r{append(...n){for(let p of n){let u=this.normalize(p,this.last);for(let g of u)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let p of this.nodes)p.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let p=this.getIterator(),u,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(u=this.indexes[p],g=n(this.proxyOf.nodes[u],u),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,p){return p==="proxyOf"?n:n[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...u)=>n[p](...u.map(g=>typeof g=="function"?(S,y)=>g(S.toProxy(),y):g)):p==="every"||p==="some"?u=>n[p]((g,...S)=>u(g.toProxy(),...S)):p==="root"?()=>n.root().toProxy():p==="nodes"?n.nodes.map(u=>u.toProxy()):p==="first"||p==="last"?n[p].toProxy():n[p]:n[p]},set(n,p,u){return n[p]===u||(n[p]=u,(p==="name"||p==="params"||p==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,p){let u=this.index(n),g=this.normalize(p,this.proxyOf.nodes[u]).reverse();u=this.index(n);for(let y of g)this.proxyOf.nodes.splice(u+1,0,y);let S;for(let y in this.indexes)S=this.indexes[y],u<S&&(this.indexes[y]=S+g.length);return this.markDirty(),this}insertBefore(n,p){let u=this.index(n),g=u===0?"prepend":!1,S=this.normalize(p,this.proxyOf.nodes[u],g).reverse();u=this.index(n);for(let v of S)this.proxyOf.nodes.splice(u,0,v);let y;for(let v in this.indexes)y=this.indexes[v],u<=y&&(this.indexes[v]=y+S.length);return this.markDirty(),this}normalize(n,p){if(typeof n=="string")n=d(c(n).nodes);else if(typeof n>"u")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value>"u")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new s(n)]}else if(n.selector)n=[new f(n)];else if(n.name)n=[new m(n)];else if(n.text)n=[new a(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[t]||h.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&i(g),typeof g.raws.before>"u"&&p&&typeof p.raws.before<"u"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let p of n){let u=this.normalize(p,this.first,"prepend").reverse();for(let g of u)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+u.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let p;for(let u in this.indexes)p=this.indexes[u],p>=n&&(this.indexes[u]=p-1);return this.markDirty(),this}replaceValues(n,p,u){return u||(u=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(n,u))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((p,u)=>{let g;try{g=n(p,u)}catch(S){throw p.addToError(S)}return g!==!1&&p.walk&&(g=p.walk(n)),g})}walkAtRules(n,p){return p?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="atrule"&&n.test(u.name))return p(u,g)}):this.walk((u,g)=>{if(u.type==="atrule"&&u.name===n)return p(u,g)}):(p=n,this.walk((u,g)=>{if(u.type==="atrule")return p(u,g)}))}walkComments(n){return this.walk((p,u)=>{if(p.type==="comment")return n(p,u)})}walkDecls(n,p){return p?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="decl"&&n.test(u.prop))return p(u,g)}):this.walk((u,g)=>{if(u.type==="decl"&&u.prop===n)return p(u,g)}):(p=n,this.walk((u,g)=>{if(u.type==="decl")return p(u,g)}))}walkRules(n,p){return p?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="rule"&&n.test(u.selector))return p(u,g)}):this.walk((u,g)=>{if(u.type==="rule"&&u.selector===n)return p(u,g)}):(p=n,this.walk((u,g)=>{if(u.type==="rule")return p(u,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=o=>{c=o},h.registerRule=o=>{f=o},h.registerAtRule=o=>{m=o},h.registerRoot=o=>{l=o},Ut=h,h.default=h,h.rebuild=o=>{o.type==="atrule"?Object.setPrototypeOf(o,m.prototype):o.type==="rule"?Object.setPrototypeOf(o,f.prototype):o.type==="decl"?Object.setPrototypeOf(o,s.prototype):o.type==="comment"?Object.setPrototypeOf(o,a.prototype):o.type==="root"&&Object.setPrototypeOf(o,l.prototype),o[t]=!0,o.nodes&&o.nodes.forEach(n=>{h.rebuild(n)})},Ut}var Bt,Os;function Yr(){if(Os)return Bt;Os=1;let e=xe(),t,s;class a extends e{constructor(c){super({type:"document",...c}),this.nodes||(this.nodes=[])}toResult(c={}){return new t(new s,this,c).stringify()}}return a.registerLazyResult=r=>{t=r},a.registerProcessor=r=>{s=r},Bt=a,a.default=a,Bt}var $t,Is;function ji(){if(Is)return $t;Is=1;let e={};return $t=function(s){e[s]||(e[s]=!0,typeof console<"u"&&console.warn&&console.warn(s))},$t}var Wt,Ds;function Gi(){if(Ds)return Wt;Ds=1;class e{constructor(s,a={}){if(this.type="warning",this.text=s,a.node&&a.node.source){let r=a.node.rangeBy(a);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in a)this[r]=a[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}}return Wt=e,e.default=e,Wt}var zt,As;function Jr(){if(As)return zt;As=1;let e=Gi();class t{constructor(a,r,c){this.processor=a,this.messages=[],this.root=r,this.opts=c,this.css=void 0,this.map=void 0}toString(){return this.css}warn(a,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let c=new e(a,r);return this.messages.push(c),c}warnings(){return this.messages.filter(a=>a.type==="warning")}get content(){return this.css}}return zt=t,t.default=t,zt}var qt,Ts;function Wo(){if(Ts)return qt;Ts=1;let e=39,t=34,s=92,a=47,r=10,c=32,f=12,m=9,l=13,d=91,i=93,h=40,o=41,n=123,p=125,u=59,g=42,S=58,y=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return qt=function(R,O={}){let M=R.css.valueOf(),T=O.ignoreErrors,D,x,ce,se,U,F,H,Q,Y,B,ye=M.length,N=0,me=[],ae=[];function Pe(){return N}function K(A){throw R.error("Unclosed "+A,N)}function he(){return ae.length===0&&N>=ye}function Ce(A){if(ae.length)return ae.pop();if(N>=ye)return;let J=A?A.ignoreUnclosed:!1;switch(D=M.charCodeAt(N),D){case r:case c:case m:case l:case f:{x=N;do x+=1,D=M.charCodeAt(x);while(D===c||D===r||D===m||D===l||D===f);B=["space",M.slice(N,x)],N=x-1;break}case d:case i:case n:case p:case S:case u:case o:{let $=String.fromCharCode(D);B=[$,$,N];break}case h:{if(Q=me.length?me.pop()[1]:"",Y=M.charCodeAt(N+1),Q==="url"&&Y!==e&&Y!==t&&Y!==c&&Y!==r&&Y!==m&&Y!==f&&Y!==l){x=N;do{if(F=!1,x=M.indexOf(")",x+1),x===-1)if(T||J){x=N;break}else K("bracket");for(H=x;M.charCodeAt(H-1)===s;)H-=1,F=!F}while(F);B=["brackets",M.slice(N,x+1),N,x],N=x}else x=M.indexOf(")",N+1),se=M.slice(N,x+1),x===-1||b.test(se)?B=["(","(",N]:(B=["brackets",se,N,x],N=x);break}case e:case t:{ce=D===e?"'":'"',x=N;do{if(F=!1,x=M.indexOf(ce,x+1),x===-1)if(T||J){x=N+1;break}else K("string");for(H=x;M.charCodeAt(H-1)===s;)H-=1,F=!F}while(F);B=["string",M.slice(N,x+1),N,x],N=x;break}case y:{v.lastIndex=N+1,v.test(M),v.lastIndex===0?x=M.length-1:x=v.lastIndex-2,B=["at-word",M.slice(N,x+1),N,x],N=x;break}case s:{for(x=N,U=!0;M.charCodeAt(x+1)===s;)x+=1,U=!U;if(D=M.charCodeAt(x+1),U&&D!==a&&D!==c&&D!==r&&D!==m&&D!==l&&D!==f&&(x+=1,w.test(M.charAt(x)))){for(;w.test(M.charAt(x+1));)x+=1;M.charCodeAt(x+1)===c&&(x+=1)}B=["word",M.slice(N,x+1),N,x],N=x;break}default:{D===a&&M.charCodeAt(N+1)===g?(x=M.indexOf("*/",N+2)+1,x===0&&(T||J?x=M.length:K("comment")),B=["comment",M.slice(N,x+1),N,x],N=x):(E.lastIndex=N+1,E.test(M),E.lastIndex===0?x=M.length-1:x=E.lastIndex-2,B=["word",M.slice(N,x+1),N,x],me.push(B),N=x);break}}return N++,B}function we(A){ae.push(A)}return{back:we,endOfFile:he,nextToken:Ce,position:Pe}},qt}var Vt,_s;function Xr(){if(_s)return Vt;_s=1;let e=xe();class t extends e{constructor(a){super(a),this.type="atrule"}append(...a){return this.proxyOf.nodes||(this.nodes=[]),super.append(...a)}prepend(...a){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...a)}}return Vt=t,t.default=t,e.registerAtRule(t),Vt}var jt,ks;function ze(){if(ks)return jt;ks=1;let e=xe(),t,s;class a extends e{constructor(c){super(c),this.type="root",this.nodes||(this.nodes=[])}normalize(c,f,m){let l=super.normalize(c);if(f){if(m==="prepend")this.nodes.length>1?f.raws.before=this.nodes[1].raws.before:delete f.raws.before;else if(this.first!==f)for(let d of l)d.raws.before=f.raws.before}return l}removeChild(c,f){let m=this.index(c);return!f&&m===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[m].raws.before),super.removeChild(c)}toResult(c={}){return new t(new s,this,c).stringify()}}return a.registerLazyResult=r=>{t=r},a.registerProcessor=r=>{s=r},jt=a,a.default=a,e.registerRoot(a),jt}var Gt,Ps;function Hi(){if(Ps)return Gt;Ps=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let s=[" ",`
|
|
24
|
+
`," "];return e.split(t,s)},split(t,s,a){let r=[],c="",f=!1,m=0,l=!1,d="",i=!1;for(let h of t)i?i=!1:h==="\\"?i=!0:l?h===d&&(l=!1):h==='"'||h==="'"?(l=!0,d=h):h==="("?m+=1:h===")"?m>0&&(m-=1):m===0&&s.includes(h)&&(f=!0),f?(c!==""&&r.push(c.trim()),c="",f=!1):c+=h;return(a||c!=="")&&r.push(c.trim()),r}};return Gt=e,e.default=e,Gt}var Ht,Ls;function Qr(){if(Ls)return Ht;Ls=1;let e=xe(),t=Hi();class s extends e{constructor(r){super(r),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(r){let c=this.selector?this.selector.match(/,\s*/):null,f=c?c[0]:","+this.raw("between","beforeOpen");this.selector=r.join(f)}}return Ht=s,s.default=s,e.registerRule(s),Ht}var Yt,Fs;function zo(){if(Fs)return Yt;Fs=1;let e=dt(),t=Wo(),s=mt(),a=Xr(),r=ze(),c=Qr(),f={empty:!0,space:!0};function m(d){for(let i=d.length-1;i>=0;i--){let h=d[i],o=h[3]||h[2];if(o)return o}}class l{constructor(i){this.input=i,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:i,start:{column:1,line:1,offset:0}}}atrule(i){let h=new a;h.name=i[1].slice(1),h.name===""&&this.unnamedAtrule(h,i),this.init(h,i[2]);let o,n,p,u=!1,g=!1,S=[],y=[];for(;!this.tokenizer.endOfFile();){if(i=this.tokenizer.nextToken(),o=i[0],o==="("||o==="["?y.push(o==="("?")":"]"):o==="{"&&y.length>0?y.push("}"):o===y[y.length-1]&&y.pop(),y.length===0)if(o===";"){h.source.end=this.getPosition(i[2]),h.source.end.offset++,this.semicolon=!0;break}else if(o==="{"){g=!0;break}else if(o==="}"){if(S.length>0){for(p=S.length-1,n=S[p];n&&n[0]==="space";)n=S[--p];n&&(h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++)}this.end(i);break}else S.push(i);else S.push(i);if(this.tokenizer.endOfFile()){u=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(h.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(h,"params",S),u&&(i=S[S.length-1],h.source.end=this.getPosition(i[3]||i[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),g&&(h.nodes=[],this.current=h)}checkMissedSemicolon(i){let h=this.colon(i);if(h===!1)return;let o=0,n;for(let p=h-1;p>=0&&(n=i[p],!(n[0]!=="space"&&(o+=1,o===2)));p--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(i){let h=0,o,n,p;for(let[u,g]of i.entries()){if(o=g,n=o[0],n==="("&&(h+=1),n===")"&&(h-=1),h===0&&n===":")if(!p)this.doubleColon(o);else{if(p[0]==="word"&&p[1]==="progid")continue;return u}p=o}return!1}comment(i){let h=new s;this.init(h,i[2]),h.source.end=this.getPosition(i[3]||i[2]),h.source.end.offset++;let o=i[1].slice(2,-2);if(/^\s*$/.test(o))h.text="",h.raws.left=o,h.raws.right="";else{let n=o.match(/^(\s*)([^]*\S)(\s*)$/);h.text=n[2],h.raws.left=n[1],h.raws.right=n[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(i,h){let o=new e;this.init(o,i[0][2]);let n=i[i.length-1];for(n[0]===";"&&(this.semicolon=!0,i.pop()),o.source.end=this.getPosition(n[3]||n[2]||m(i)),o.source.end.offset++;i[0][0]!=="word";)i.length===1&&this.unknownWord(i),o.raws.before+=i.shift()[1];for(o.source.start=this.getPosition(i[0][2]),o.prop="";i.length;){let y=i[0][0];if(y===":"||y==="space"||y==="comment")break;o.prop+=i.shift()[1]}o.raws.between="";let p;for(;i.length;)if(p=i.shift(),p[0]===":"){o.raws.between+=p[1];break}else p[0]==="word"&&/\w/.test(p[1])&&this.unknownWord([p]),o.raws.between+=p[1];(o.prop[0]==="_"||o.prop[0]==="*")&&(o.raws.before+=o.prop[0],o.prop=o.prop.slice(1));let u=[],g;for(;i.length&&(g=i[0][0],!(g!=="space"&&g!=="comment"));)u.push(i.shift());this.precheckMissedSemicolon(i);for(let y=i.length-1;y>=0;y--){if(p=i[y],p[1].toLowerCase()==="!important"){o.important=!0;let v=this.stringFrom(i,y);v=this.spacesFromEnd(i)+v,v!==" !important"&&(o.raws.important=v);break}else if(p[1].toLowerCase()==="important"){let v=i.slice(0),E="";for(let b=y;b>0;b--){let w=v[b][0];if(E.trim().indexOf("!")===0&&w!=="space")break;E=v.pop()[1]+E}E.trim().indexOf("!")===0&&(o.important=!0,o.raws.important=E,i=v)}if(p[0]!=="space"&&p[0]!=="comment")break}i.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(o.raws.between+=u.map(y=>y[1]).join(""),u=[]),this.raw(o,"value",u.concat(i),h),o.value.includes(":")&&!h&&this.checkMissedSemicolon(i)}doubleColon(i){throw this.input.error("Double colon",{offset:i[2]},{offset:i[2]+i[1].length})}emptyRule(i){let h=new c;this.init(h,i[2]),h.selector="",h.raws.between="",this.current=h}end(i){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(i[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(i)}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(i){if(this.spaces+=i[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(i){let h=this.input.fromOffset(i);return{column:h.col,line:h.line,offset:i}}init(i,h){this.current.push(i),i.source={input:this.input,start:this.getPosition(h)},i.raws.before=this.spaces,this.spaces="",i.type!=="comment"&&(this.semicolon=!1)}other(i){let h=!1,o=null,n=!1,p=null,u=[],g=i[1].startsWith("--"),S=[],y=i;for(;y;){if(o=y[0],S.push(y),o==="("||o==="[")p||(p=y),u.push(o==="("?")":"]");else if(g&&n&&o==="{")p||(p=y),u.push("}");else if(u.length===0)if(o===";")if(n){this.decl(S,g);return}else break;else if(o==="{"){this.rule(S);return}else if(o==="}"){this.tokenizer.back(S.pop()),h=!0;break}else o===":"&&(n=!0);else o===u[u.length-1]&&(u.pop(),u.length===0&&(p=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),u.length>0&&this.unclosedBracket(p),h&&n){if(!g)for(;S.length&&(y=S[S.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let i;for(;!this.tokenizer.endOfFile();)switch(i=this.tokenizer.nextToken(),i[0]){case"space":this.spaces+=i[1];break;case";":this.freeSemicolon(i);break;case"}":this.end(i);break;case"comment":this.comment(i);break;case"at-word":this.atrule(i);break;case"{":this.emptyRule(i);break;default:this.other(i);break}this.endFile()}precheckMissedSemicolon(){}raw(i,h,o,n){let p,u,g=o.length,S="",y=!0,v,E;for(let b=0;b<g;b+=1)p=o[b],u=p[0],u==="space"&&b===g-1&&!n?y=!1:u==="comment"?(E=o[b-1]?o[b-1][0]:"empty",v=o[b+1]?o[b+1][0]:"empty",!f[E]&&!f[v]?S.slice(-1)===","?y=!1:S+=p[1]:y=!1):S+=p[1];if(!y){let b=o.reduce((w,C)=>w+C[1],"");i.raws[h]={raw:b,value:S}}i[h]=S}rule(i){i.pop();let h=new c;this.init(h,i[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(i),this.raw(h,"selector",i),this.current=h}spacesAndCommentsFromEnd(i){let h,o="";for(;i.length&&(h=i[i.length-1][0],!(h!=="space"&&h!=="comment"));)o=i.pop()[1]+o;return o}spacesAndCommentsFromStart(i){let h,o="";for(;i.length&&(h=i[0][0],!(h!=="space"&&h!=="comment"));)o+=i.shift()[1];return o}spacesFromEnd(i){let h,o="";for(;i.length&&(h=i[i.length-1][0],h==="space");)o=i.pop()[1]+o;return o}stringFrom(i,h){let o="";for(let n=h;n<i.length;n++)o+=i[n][1];return i.splice(h,i.length-h),o}unclosedBlock(){let i=this.current.source.start;throw this.input.error("Unclosed block",i.line,i.column)}unclosedBracket(i){throw this.input.error("Unclosed bracket",{offset:i[2]},{offset:i[2]+1})}unexpectedClose(i){throw this.input.error("Unexpected }",{offset:i[2]},{offset:i[2]+1})}unknownWord(i){throw this.input.error("Unknown word",{offset:i[0][2]},{offset:i[0][2]+i[0][1].length})}unnamedAtrule(i,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return Yt=l,Yt}var Jt,Us;function Zr(){if(Us)return Jt;Us=1;let e=xe(),t=zo(),s=pt();function a(r,c){let f=new s(r,c),m=new t(f);try{m.parse()}catch(l){throw l}return m.root}return Jt=a,a.default=a,e.registerParse(a),Jt}var Xt,Bs;function Yi(){if(Bs)return Xt;Bs=1;let{isClean:e,my:t}=Hr(),s=Vi(),a=ht(),r=xe(),c=Yr(),f=ji(),m=Jr(),l=Zr(),d=ze(),i={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},o={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function p(E){return typeof E=="object"&&typeof E.then=="function"}function u(E){let b=!1,w=i[E.type];return E.type==="decl"?b=E.prop.toLowerCase():E.type==="atrule"&&(b=E.name.toLowerCase()),b&&E.append?[w,w+"-"+b,n,w+"Exit",w+"Exit-"+b]:b?[w,w+"-"+b,w+"Exit",w+"Exit-"+b]:E.append?[w,n,w+"Exit"]:[w,w+"Exit"]}function g(E){let b;return E.type==="document"?b=["Document",n,"DocumentExit"]:E.type==="root"?b=["Root",n,"RootExit"]:b=u(E),{eventIndex:0,events:b,iterator:0,node:E,visitorIndex:0,visitors:[]}}function S(E){return E[e]=!1,E.nodes&&E.nodes.forEach(b=>S(b)),E}let y={};class v{constructor(b,w,C){this.stringified=!1,this.processed=!1;let R;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))R=S(w);else if(w instanceof v||w instanceof m)R=S(w.root),w.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let O=l;C.syntax&&(O=C.syntax.parse),C.parser&&(O=C.parser),O.parse&&(O=O.parse);try{R=O(w,C)}catch(M){this.processed=!0,this.error=M}R&&!R[t]&&r.rebuild(R)}this.result=new m(b,R,C),this.helpers={...y,postcss:y,result:this.result},this.plugins=this.processor.plugins.map(O=>typeof O=="object"&&O.prepare?{...O,...O.prepare(this.result)}:O)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(b){return this.async().catch(b)}finally(b){return this.async().then(b,b)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(b,w){let C=this.result.lastPlugin;try{w&&w.addToError(b),this.error=b,b.name==="CssSyntaxError"&&!b.plugin?(b.plugin=C.postcssPlugin,b.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return b}prepareVisitors(){this.listeners={};let b=(w,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,R])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!h[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!o[C])if(typeof w[C]=="object")for(let R in w[C])R==="*"?b(w,C,w[C][R]):b(w,C+"-"+R.toLowerCase(),w[C][R]);else typeof w[C]=="function"&&b(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let b=0;b<this.plugins.length;b++){let w=this.plugins[b],C=this.runOnRoot(w);if(p(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[e];){b[e]=!0;let w=[g(b)];for(;w.length>0;){let C=this.visitTick(w);if(p(C))try{await C}catch(R){let O=w[w.length-1].node;throw this.handleError(R,O)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(b.type==="document"){let R=b.nodes.map(O=>C(O,this.helpers));await Promise.all(R)}else await C(b,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(b){this.result.lastPlugin=b;try{if(typeof b=="object"&&b.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>b.Once(C,this.helpers));return p(w[0])?Promise.all(w):w}return b.Once(this.result.root,this.helpers)}else if(typeof b=="function")return b(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let b=this.result.opts,w=a;b.syntax&&(w=b.syntax.stringify),b.stringifier&&(w=b.stringifier),w.stringify&&(w=w.stringify);let R=new s(w,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let b of this.plugins){let w=this.runOnRoot(b);if(p(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[e];)b[e]=!0,this.walkSync(b);if(this.listeners.OnceExit)if(b.type==="document")for(let w of b.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,b)}return this.result}then(b,w){return this.async().then(b,w)}toString(){return this.css}visitSync(b,w){for(let[C,R]of b){this.result.lastPlugin=C;let O;try{O=R(w,this.helpers)}catch(M){throw this.handleError(M,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(p(O))throw this.getAsyncError()}}visitTick(b){let w=b[b.length-1],{node:C,visitors:R}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){b.pop();return}if(R.length>0&&w.visitorIndex<R.length){let[M,T]=R[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===R.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=M;try{return T(C.toProxy(),this.helpers)}catch(D){throw this.handleError(D,C)}}if(w.iterator!==0){let M=w.iterator,T;for(;T=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!T[e]){T[e]=!0,b.push(g(T));return}w.iterator=0,delete C.indexes[M]}let O=w.events;for(;w.eventIndex<O.length;){let M=O[w.eventIndex];if(w.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[e]=!0,w.iterator=C.getIterator());return}else if(this.listeners[M]){w.visitors=this.listeners[M];return}}b.pop()}walkSync(b){b[e]=!0;let w=u(b);for(let C of w)if(C===n)b.nodes&&b.each(R=>{R[e]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,b.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return v.registerPostcss=E=>{y=E},Xt=v,v.default=v,d.registerLazyResult(v),c.registerLazyResult(v),Xt}var Qt,$s;function qo(){if($s)return Qt;$s=1;let e=Vi(),t=ht(),s=ji(),a=Zr(),r=Jr();class c{constructor(m,l,d){l=l.toString(),this.stringified=!1,this._processor=m,this._css=l,this._opts=d,this._map=void 0;let i,h=t;this.result=new r(this._processor,i,this._opts),this.result.css=l;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let n=new e(h,i,this._opts,l);if(n.isMap()){let[p,u]=n.generate();p&&(this.result.css=p),u&&(this.result.map=u)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(m){return this.async().catch(m)}finally(m){return this.async().then(m,m)}sync(){if(this.error)throw this.error;return this.result}then(m,l){return this.async().then(m,l)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let m,l=a;try{m=l(this._css,this._opts)}catch(d){this.error=d}if(this.error)throw this.error;return this._root=m,m}get[Symbol.toStringTag](){return"NoWorkResult"}}return Qt=c,c.default=c,Qt}var Zt,Ws;function Vo(){if(Ws)return Zt;Ws=1;let e=qo(),t=Yi(),s=Yr(),a=ze();class r{constructor(f=[]){this.version="8.4.38",this.plugins=this.normalize(f)}normalize(f){let m=[];for(let l of f)if(l.postcss===!0?l=l():l.postcss&&(l=l.postcss),typeof l=="object"&&Array.isArray(l.plugins))m=m.concat(l.plugins);else if(typeof l=="object"&&l.postcssPlugin)m.push(l);else if(typeof l=="function")m.push(l);else if(!(typeof l=="object"&&(l.parse||l.stringify)))throw new Error(l+" is not a PostCSS plugin");return m}process(f,m={}){return!this.plugins.length&&!m.parser&&!m.stringifier&&!m.syntax?new e(this,f,m):new t(this,f,m)}use(f){return this.plugins=this.plugins.concat(this.normalize([f])),this}}return Zt=r,r.default=r,a.registerProcessor(r),s.registerProcessor(r),Zt}var Kt,zs;function jo(){if(zs)return Kt;zs=1;let e=dt(),t=qi(),s=mt(),a=Xr(),r=pt(),c=ze(),f=Qr();function m(l,d){if(Array.isArray(l))return l.map(o=>m(o));let{inputs:i,...h}=l;if(i){d=[];for(let o of i){let n={...o,__proto__:r.prototype};n.map&&(n.map={...n.map,__proto__:t.prototype}),d.push(n)}}if(h.nodes&&(h.nodes=l.nodes.map(o=>m(o,d))),h.source){let{inputId:o,...n}=h.source;h.source=n,o!=null&&(h.source.input=d[o])}if(h.type==="root")return new c(h);if(h.type==="decl")return new e(h);if(h.type==="rule")return new f(h);if(h.type==="comment")return new s(h);if(h.type==="atrule")return new a(h);throw new Error("Unknown node type: "+l.type)}return Kt=m,m.default=m,Kt}var er,qs;function Go(){if(qs)return er;qs=1;let e=Gr(),t=dt(),s=Yi(),a=xe(),r=Vo(),c=ht(),f=jo(),m=Yr(),l=Gi(),d=mt(),i=Xr(),h=Jr(),o=pt(),n=Zr(),p=Hi(),u=Qr(),g=ze(),S=ft();function y(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new r(v)}return y.plugin=function(E,b){let w=!1;function C(...O){console&&console.warn&&!w&&(w=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
25
25
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(E+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
26
|
-
https://www.w3ctech.com/topic/2226`));let M=
|
|
26
|
+
https://www.w3ctech.com/topic/2226`));let M=b(...O);return M.postcssPlugin=E,M.postcssVersion=new r().version,M}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(O,M,T){return y([C(T)]).process(O,M)},C},y.stringify=c,y.parse=n,y.fromJSON=f,y.list=p,y.comment=v=>new d(v),y.atRule=v=>new i(v),y.decl=v=>new t(v),y.rule=v=>new u(v),y.root=v=>new g(v),y.document=v=>new m(v),y.CssSyntaxError=e,y.Declaration=t,y.Container=a,y.Processor=r,y.Document=m,y.Comment=d,y.Warning=l,y.AtRule=i,y.Result=h,y.Input=o,y.Rule=u,y.Root=g,y.Node=S,s.registerPostcss(y),er=y,y.default=y,er}var Ho=Go(),q=Po(Ho);q.stringify;q.fromJSON;q.plugin;q.parse;q.list;q.document;q.comment;q.atRule;q.rule;q.decl;q.root;q.CssSyntaxError;q.Declaration;q.Container;q.Processor;q.Document;q.Comment;q.Warning;q.AtRule;q.Result;q.Input;q.Rule;q.Root;q.Node;var Yo=Object.defineProperty,Jo=(e,t,s)=>t in e?Yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,le=(e,t,s)=>Jo(e,typeof t!="symbol"?t+"":t,s);Date.now().toString();function Xo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Qo(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var s=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(s,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}),s}var Je={exports:{}},Vs;function Zo(){if(Vs)return Je.exports;Vs=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return Je.exports=t(),Je.exports.createColors=t,Je.exports}var Ko={},ea=Object.freeze(Object.defineProperty({__proto__:null,default:Ko},Symbol.toStringTag,{value:"Module"})),pe=Qo(ea),tr,js;function Kr(){if(js)return tr;js=1;let e=Zo(),t=pe;class s extends Error{constructor(r,c,f,m,l,d){super(r),this.name="CssSyntaxError",this.reason=r,l&&(this.file=l),m&&(this.source=m),d&&(this.plugin=d),typeof c<"u"&&typeof f<"u"&&(typeof c=="number"?(this.line=c,this.column=f):(this.line=c.line,this.column=c.column,this.endLine=f.line,this.endColumn=f.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";let c=this.source;r==null&&(r=e.isColorSupported),t&&r&&(c=t(c));let f=c.split(/\r?\n/),m=Math.max(this.line-3,0),l=Math.min(this.line+2,f.length),d=String(l).length,i,h;if(r){let{bold:o,gray:n,red:p}=e.createColors(!0);i=u=>o(p(u)),h=u=>n(u)}else i=h=o=>o;return f.slice(m,l).map((o,n)=>{let p=m+1+n,u=" "+(" "+p).slice(-d)+" | ";if(p===this.line){let g=h(u.replace(/\d/g," "))+o.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+h(u)+o+`
|
|
27
27
|
`+g+i("^")}return" "+h(u)+o}).join(`
|
|
28
28
|
`)}toString(){let r=this.showSourceCode();return r&&(r=`
|
|
29
29
|
|
|
@@ -34,23 +34,23 @@ https://www.w3ctech.com/topic/2226`));let M=y(...O);return M.postcssPlugin=E,M.p
|
|
|
34
34
|
`,beforeDecl:`
|
|
35
35
|
`,beforeOpen:" ",beforeRule:`
|
|
36
36
|
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(a){return a[0].toUpperCase()+a.slice(1)}class s{constructor(r){this.builder=r}atrule(r,c){let f="@"+r.name,m=r.params?this.rawValue(r,"params"):"";if(typeof r.raws.afterName<"u"?f+=r.raws.afterName:m&&(f+=" "),r.nodes)this.block(r,f+m);else{let l=(r.raws.between||"")+(c?";":"");this.builder(f+m+l,r)}}beforeAfter(r,c){let f;r.type==="decl"?f=this.raw(r,null,"beforeDecl"):r.type==="comment"?f=this.raw(r,null,"beforeComment"):c==="before"?f=this.raw(r,null,"beforeRule"):f=this.raw(r,null,"beforeClose");let m=r.parent,l=0;for(;m&&m.type!=="root";)l+=1,m=m.parent;if(f.includes(`
|
|
37
|
-
`)){let
|
|
37
|
+
`)){let d=this.raw(r,null,"indent");if(d.length)for(let i=0;i<l;i++)f+=d}return f}block(r,c){let f=this.raw(r,"between","beforeOpen");this.builder(c+f+"{",r,"start");let m;r.nodes&&r.nodes.length?(this.body(r),m=this.raw(r,"after")):m=this.raw(r,"after","emptyBody"),m&&this.builder(m),this.builder("}",r,"end")}body(r){let c=r.nodes.length-1;for(;c>0&&r.nodes[c].type==="comment";)c-=1;let f=this.raw(r,"semicolon");for(let m=0;m<r.nodes.length;m++){let l=r.nodes[m],d=this.raw(l,"before");d&&this.builder(d),this.stringify(l,c!==m||f)}}comment(r){let c=this.raw(r,"left","commentLeft"),f=this.raw(r,"right","commentRight");this.builder("/*"+c+r.text+f+"*/",r)}decl(r,c){let f=this.raw(r,"between","colon"),m=r.prop+f+this.rawValue(r,"value");r.important&&(m+=r.raws.important||" !important"),c&&(m+=";"),this.builder(m,r)}document(r){this.body(r)}raw(r,c,f){let m;if(f||(f=c),c&&(m=r.raws[c],typeof m<"u"))return m;let l=r.parent;if(f==="before"&&(!l||l.type==="root"&&l.first===r||l&&l.type==="document"))return"";if(!l)return e[f];let d=r.root();if(d.rawCache||(d.rawCache={}),typeof d.rawCache[f]<"u")return d.rawCache[f];if(f==="before"||f==="after")return this.beforeAfter(r,f);{let i="raw"+t(f);this[i]?m=this[i](d,r):d.walk(h=>{if(m=h.raws[c],typeof m<"u")return!1})}return typeof m>"u"&&(m=e[f]),d.rawCache[f]=m,m}rawBeforeClose(r){let c;return r.walk(f=>{if(f.nodes&&f.nodes.length>0&&typeof f.raws.after<"u")return c=f.raws.after,c.includes(`
|
|
38
38
|
`)&&(c=c.replace(/[^\n]+$/,"")),!1}),c&&(c=c.replace(/\S/g,"")),c}rawBeforeComment(r,c){let f;return r.walkComments(m=>{if(typeof m.raws.before<"u")return f=m.raws.before,f.includes(`
|
|
39
39
|
`)&&(f=f.replace(/[^\n]+$/,"")),!1}),typeof f>"u"?f=this.raw(c,null,"beforeDecl"):f&&(f=f.replace(/\S/g,"")),f}rawBeforeDecl(r,c){let f;return r.walkDecls(m=>{if(typeof m.raws.before<"u")return f=m.raws.before,f.includes(`
|
|
40
40
|
`)&&(f=f.replace(/[^\n]+$/,"")),!1}),typeof f>"u"?f=this.raw(c,null,"beforeRule"):f&&(f=f.replace(/\S/g,"")),f}rawBeforeOpen(r){let c;return r.walk(f=>{if(f.type!=="decl"&&(c=f.raws.between,typeof c<"u"))return!1}),c}rawBeforeRule(r){let c;return r.walk(f=>{if(f.nodes&&(f.parent!==r||r.first!==f)&&typeof f.raws.before<"u")return c=f.raws.before,c.includes(`
|
|
41
41
|
`)&&(c=c.replace(/[^\n]+$/,"")),!1}),c&&(c=c.replace(/\S/g,"")),c}rawColon(r){let c;return r.walkDecls(f=>{if(typeof f.raws.between<"u")return c=f.raws.between.replace(/[^\s:]/g,""),!1}),c}rawEmptyBody(r){let c;return r.walk(f=>{if(f.nodes&&f.nodes.length===0&&(c=f.raws.after,typeof c<"u"))return!1}),c}rawIndent(r){if(r.raws.indent)return r.raws.indent;let c;return r.walk(f=>{let m=f.parent;if(m&&m!==r&&m.parent&&m.parent===r&&typeof f.raws.before<"u"){let l=f.raws.before.split(`
|
|
42
|
-
`);return c=l[l.length-1],c=c.replace(/\S/g,""),!1}}),c}rawSemicolon(r){let c;return r.walk(f=>{if(f.nodes&&f.nodes.length&&f.last.type==="decl"&&(c=f.raws.semicolon,typeof c<"u"))return!1}),c}rawValue(r,c){let f=r[c],m=r.raws[c];return m&&m.value===f?m.raw:f}root(r){this.body(r),r.raws.after&&this.builder(r.raws.after)}rule(r){this.block(r,this.rawValue(r,"selector")),r.raws.ownSemicolon&&this.builder(r.raws.ownSemicolon,r,"end")}stringify(r,c){if(!this[r.type])throw new Error("Unknown AST node type "+r.type+". Maybe you need to change PostCSS stringifier.");this[r.type](r,c)}}return rr=s,s.default=s,rr}var sr,Ys;function gt(){if(Ys)return sr;Ys=1;let e=Ji();function t(s,a){new e(a).stringify(s)}return sr=t,t.default=t,sr}var ir,Js;function yt(){if(Js)return ir;Js=1;let{isClean:e,my:t}=es(),s=Kr(),a=Ji(),r=gt();function c(m,l){let
|
|
43
|
-
`?(h=1,o+=1):h+=1;return{column:h,line:o}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let
|
|
44
|
-
`);S=new Array(v.length);let E=0;for(let
|
|
42
|
+
`);return c=l[l.length-1],c=c.replace(/\S/g,""),!1}}),c}rawSemicolon(r){let c;return r.walk(f=>{if(f.nodes&&f.nodes.length&&f.last.type==="decl"&&(c=f.raws.semicolon,typeof c<"u"))return!1}),c}rawValue(r,c){let f=r[c],m=r.raws[c];return m&&m.value===f?m.raw:f}root(r){this.body(r),r.raws.after&&this.builder(r.raws.after)}rule(r){this.block(r,this.rawValue(r,"selector")),r.raws.ownSemicolon&&this.builder(r.raws.ownSemicolon,r,"end")}stringify(r,c){if(!this[r.type])throw new Error("Unknown AST node type "+r.type+". Maybe you need to change PostCSS stringifier.");this[r.type](r,c)}}return rr=s,s.default=s,rr}var sr,Ys;function gt(){if(Ys)return sr;Ys=1;let e=Ji();function t(s,a){new e(a).stringify(s)}return sr=t,t.default=t,sr}var ir,Js;function yt(){if(Js)return ir;Js=1;let{isClean:e,my:t}=es(),s=Kr(),a=Ji(),r=gt();function c(m,l){let d=new m.constructor;for(let i in m){if(!Object.prototype.hasOwnProperty.call(m,i)||i==="proxyCache")continue;let h=m[i],o=typeof h;i==="parent"&&o==="object"?l&&(d[i]=l):i==="source"?d[i]=h:Array.isArray(h)?d[i]=h.map(n=>c(n,d)):(o==="object"&&h!==null&&(h=c(h)),d[i]=h)}return d}class f{constructor(l={}){this.raws={},this[e]=!1,this[t]=!0;for(let d in l)if(d==="nodes"){this.nodes=[];for(let i of l[d])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[d]=l[d]}addToError(l){if(l.postcssNode=this,l.stack&&this.source&&/\n\s{4}at /.test(l.stack)){let d=this.source;l.stack=l.stack.replace(/\n\s{4}at /,`$&${d.input.from}:${d.start.line}:${d.start.column}$&`)}return l}after(l){return this.parent.insertAfter(this,l),this}assign(l={}){for(let d in l)this[d]=l[d];return this}before(l){return this.parent.insertBefore(this,l),this}cleanRaws(l){delete this.raws.before,delete this.raws.after,l||delete this.raws.between}clone(l={}){let d=c(this);for(let i in l)d[i]=l[i];return d}cloneAfter(l={}){let d=this.clone(l);return this.parent.insertAfter(this,d),d}cloneBefore(l={}){let d=this.clone(l);return this.parent.insertBefore(this,d),d}error(l,d={}){if(this.source){let{end:i,start:h}=this.rangeBy(d);return this.source.input.error(l,{column:h.column,line:h.line},{column:i.column,line:i.line},d)}return new s(l)}getProxyProcessor(){return{get(l,d){return d==="proxyOf"?l:d==="root"?()=>l.root().toProxy():l[d]},set(l,d,i){return l[d]===i||(l[d]=i,(d==="prop"||d==="value"||d==="name"||d==="params"||d==="important"||d==="text")&&l.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let l=this;for(;l=l.parent;)l[e]=!1}}next(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l+1]}positionBy(l,d){let i=this.source.start;if(l.index)i=this.positionInside(l.index,d);else if(l.word){d=this.toString();let h=d.indexOf(l.word);h!==-1&&(i=this.positionInside(h,d))}return i}positionInside(l,d){let i=d||this.toString(),h=this.source.start.column,o=this.source.start.line;for(let n=0;n<l;n++)i[n]===`
|
|
43
|
+
`?(h=1,o+=1):h+=1;return{column:h,line:o}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let d={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:d.column+1,line:d.line};if(l.word){let h=this.toString(),o=h.indexOf(l.word);o!==-1&&(d=this.positionInside(o,h),i=this.positionInside(o+l.word.length,h))}else l.start?d={column:l.start.column,line:l.start.line}:l.index&&(d=this.positionInside(l.index)),l.end?i={column:l.end.column,line:l.end.line}:typeof l.endIndex=="number"?i=this.positionInside(l.endIndex):l.index&&(i=this.positionInside(l.index+1));return(i.line<d.line||i.line===d.line&&i.column<=d.column)&&(i={column:d.column+1,line:d.line}),{end:i,start:d}}raw(l,d){return new a().raw(this,l,d)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let d=this,i=!1;for(let h of l)h===this?i=!0:i?(this.parent.insertAfter(d,h),d=h):this.parent.insertBefore(d,h);i||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,d){let i={},h=d==null;d=d||new Map;let o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let p=this[n];if(Array.isArray(p))i[n]=p.map(u=>typeof u=="object"&&u.toJSON?u.toJSON(null,d):u);else if(typeof p=="object"&&p.toJSON)i[n]=p.toJSON(null,d);else if(n==="source"){let u=d.get(p.input);u==null&&(u=o,d.set(p.input,o),o++),i[n]={end:p.end,inputId:u,start:p.start}}else i[n]=p}return h&&(i.inputs=[...d.keys()].map(n=>n.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(l=r){l.stringify&&(l=l.stringify);let d="";return l(this,i=>{d+=i}),d}warn(l,d,i){let h={node:this};for(let o in i)h[o]=i[o];return l.warn(d,h)}get proxyOf(){return this}}return ir=f,f.default=f,ir}var nr,Xs;function wt(){if(Xs)return nr;Xs=1;let e=yt();class t extends e{constructor(a){a&&typeof a.value<"u"&&typeof a.value!="string"&&(a={...a,value:String(a.value)}),super(a),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return nr=t,t.default=t,nr}var or,Qs;function ta(){if(Qs)return or;Qs=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return or={nanoid:(a=21)=>{let r="",c=a;for(;c--;)r+=e[Math.random()*64|0];return r},customAlphabet:(a,r=21)=>(c=r)=>{let f="",m=c;for(;m--;)f+=a[Math.random()*a.length|0];return f}},or}var ar,Zs;function Xi(){if(Zs)return ar;Zs=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=pe,{existsSync:s,readFileSync:a}=pe,{dirname:r,join:c}=pe;function f(l){return Buffer?Buffer.from(l,"base64").toString():window.atob(l)}class m{constructor(d,i){if(i.map===!1)return;this.loadAnnotation(d),this.inline=this.startWith(this.annotation,"data:");let h=i.map?i.map.prev:void 0,o=this.loadMap(i.from,h);!this.mapFile&&i.from&&(this.mapFile=i.from),this.mapFile&&(this.root=r(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(d){let i=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,o=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(o.test(d)||n.test(d))return decodeURIComponent(d.substr(RegExp.lastMatch.length));if(i.test(d)||h.test(d))return f(d.substr(RegExp.lastMatch.length));let p=d.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+p)}getAnnotationURL(d){return d.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(d){return typeof d!="object"?!1:typeof d.mappings=="string"||typeof d._mappings=="string"||Array.isArray(d.sections)}loadAnnotation(d){let i=d.match(/\/\*\s*# sourceMappingURL=/gm);if(!i)return;let h=d.lastIndexOf(i.pop()),o=d.indexOf("*/",h);h>-1&&o>-1&&(this.annotation=this.getAnnotationURL(d.substring(h,o)))}loadFile(d){if(this.root=r(d),s(d))return this.mapFile=d,a(d,"utf-8").toString().trim()}loadMap(d,i){if(i===!1)return!1;if(i){if(typeof i=="string")return i;if(typeof i=="function"){let h=i(d);if(h){let o=this.loadFile(h);if(!o)throw new Error("Unable to load previous source map: "+h.toString());return o}}else{if(i instanceof e)return t.fromSourceMap(i).toString();if(i instanceof t)return i.toString();if(this.isMap(i))return JSON.stringify(i);throw new Error("Unsupported previous source map format: "+i.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return d&&(h=c(r(d),h)),this.loadFile(h)}}}startWith(d,i){return d?d.substr(0,i.length)===i:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return ar=m,m.default=m,ar}var lr,Ks;function bt(){if(Ks)return lr;Ks=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=pe,{fileURLToPath:s,pathToFileURL:a}=pe,{isAbsolute:r,resolve:c}=pe,{nanoid:f}=ta(),m=pe,l=Kr(),d=Xi(),i=Symbol("fromOffsetCache"),h=!!(e&&t),o=!!(c&&r);class n{constructor(u,g={}){if(u===null||typeof u>"u"||typeof u=="object"&&!u.toString)throw new Error(`PostCSS received ${u} instead of CSS string`);if(this.css=u.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,g.from&&(!o||/^\w+:\/\//.test(g.from)||r(g.from)?this.file=g.from:this.file=c(g.from)),o&&h){let S=new d(this.css,g);if(S.text){this.map=S;let y=S.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+f(6)+">"),this.map&&(this.map.file=this.from)}error(u,g,S,y={}){let v,E,b;if(g&&typeof g=="object"){let C=g,R=S;if(typeof C.offset=="number"){let O=this.fromOffset(C.offset);g=O.line,S=O.col}else g=C.line,S=C.column;if(typeof R.offset=="number"){let O=this.fromOffset(R.offset);E=O.line,b=O.col}else E=R.line,b=R.column}else if(!S){let C=this.fromOffset(g);g=C.line,S=C.col}let w=this.origin(g,S,E,b);return w?v=new l(u,w.endLine===void 0?w.line:{column:w.column,line:w.line},w.endLine===void 0?w.column:{column:w.endColumn,line:w.endLine},w.source,w.file,y.plugin):v=new l(u,E===void 0?g:{column:S,line:g},E===void 0?S:{column:b,line:E},this.css,this.file,y.plugin),v.input={column:S,endColumn:b,endLine:E,line:g,source:this.css},this.file&&(a&&(v.input.url=a(this.file).toString()),v.input.file=this.file),v}fromOffset(u){let g,S;if(this[i])S=this[i];else{let v=this.css.split(`
|
|
44
|
+
`);S=new Array(v.length);let E=0;for(let b=0,w=v.length;b<w;b++)S[b]=E,E+=v[b].length+1;this[i]=S}g=S[S.length-1];let y=0;if(u>=g)y=S.length-1;else{let v=S.length-2,E;for(;y<v;)if(E=y+(v-y>>1),u<S[E])v=E-1;else if(u>=S[E+1])y=E+1;else{y=E;break}}return{col:u-S[y]+1,line:y+1}}mapResolve(u){return/^\w+:\/\//.test(u)?u:c(this.map.consumer().sourceRoot||this.map.root||".",u)}origin(u,g,S,y){if(!this.map)return!1;let v=this.map.consumer(),E=v.originalPositionFor({column:g,line:u});if(!E.source)return!1;let b;typeof S=="number"&&(b=v.originalPositionFor({column:y,line:S}));let w;r(E.source)?w=a(E.source):w=new URL(E.source,this.map.consumer().sourceRoot||a(this.map.mapFile));let C={column:E.column,endColumn:b&&b.column,endLine:b&&b.line,line:E.line,url:w.toString()};if(w.protocol==="file:")if(s)C.file=s(w);else throw new Error("file: protocol is not available in this PostCSS build");let R=v.sourceContentFor(E.source);return R&&(C.source=R),C}toJSON(){let u={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(u[g]=this[g]);return this.map&&(u.map={...this.map},u.map.consumerCache&&(u.map.consumerCache=void 0)),u}get from(){return this.file||this.id}}return lr=n,n.default=n,m&&m.registerInput&&m.registerInput(n),lr}var ur,ei;function Qi(){if(ei)return ur;ei=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=pe,{dirname:s,relative:a,resolve:r,sep:c}=pe,{pathToFileURL:f}=pe,m=bt(),l=!!(e&&t),d=!!(s&&r&&a&&c);class i{constructor(o,n,p,u){this.stringify=o,this.mapOpts=p.map||{},this.root=n,this.opts=p,this.css=u,this.originalCSS=u,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let o;this.isInline()?o="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?o=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?o=this.mapOpts.annotation(this.opts.to,this.root):o=this.outputFile()+".map";let n=`
|
|
45
45
|
`;this.css.includes(`\r
|
|
46
46
|
`)&&(n=`\r
|
|
47
|
-
`),this.css+=n+"/*# sourceMappingURL="+o+" */"}applyPrevMaps(){for(let o of this.previous()){let n=this.toUrl(this.path(o.file)),
|
|
48
|
-
`),n=b.length-S):n+=b.length,v&&E!=="start"){let y=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==y.last||y.raws.semicolon)&&(v.source&&v.source.end?(u.source=this.sourcePath(v),u.original.line=v.source.end.line,u.original.column=v.source.end.column-1,u.generated.line=o,u.generated.column=n-2,this.map.addMapping(u)):(u.source=d,u.original.line=1,u.original.column=0,u.generated.line=o,u.generated.column=n-1,this.map.addMapping(u)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(o=>o.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let o=this.mapOpts.annotation;return typeof o<"u"&&o!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(o=>o.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(o){if(this.mapOpts.absolute||o.charCodeAt(0)===60||/^\w+:\/\//.test(o))return o;let n=this.memoizedPaths.get(o);if(n)return n;let d=this.opts.to?s(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(d=s(r(d,this.mapOpts.annotation)));let u=a(d,o);return this.memoizedPaths.set(o,u),u}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(o=>{if(o.source&&o.source.input.map){let n=o.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let o=new m(this.originalCSS,this.opts);o.map&&this.previousMaps.push(o.map)}return this.previousMaps}setSourcesContent(){let o={};if(this.root)this.root.walk(n=>{if(n.source){let d=n.source.input.from;if(d&&!o[d]){o[d]=!0;let u=this.usesFileUrls?this.toFileUrl(d):this.toUrl(this.path(d));this.map.setSourceContent(u,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(o){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(o.source.input.from):this.toUrl(this.path(o.source.input.from))}toBase64(o){return Buffer?Buffer.from(o).toString("base64"):window.btoa(unescape(encodeURIComponent(o)))}toFileUrl(o){let n=this.memoizedFileURLs.get(o);if(n)return n;if(f){let d=f(o).toString();return this.memoizedFileURLs.set(o,d),d}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(o){let n=this.memoizedURLs.get(o);if(n)return n;c==="\\"&&(o=o.replace(/\\/g,"/"));let d=encodeURI(o).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(o,d),d}}return ur=i,ur}var cr,ti;function vt(){if(ti)return cr;ti=1;let e=yt();class t extends e{constructor(a){super(a),this.type="comment"}}return cr=t,t.default=t,cr}var hr,ri;function xe(){if(ri)return hr;ri=1;let{isClean:e,my:t}=es(),s=wt(),a=vt(),r=yt(),c,f,m,l;function p(o){return o.map(n=>(n.nodes&&(n.nodes=p(n.nodes)),delete n.source,n))}function i(o){if(o[e]=!1,o.proxyOf.nodes)for(let n of o.proxyOf.nodes)i(n)}class h extends r{append(...n){for(let d of n){let u=this.normalize(d,this.last);for(let g of u)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let d of this.nodes)d.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let d=this.getIterator(),u,g;for(;this.indexes[d]<this.proxyOf.nodes.length&&(u=this.indexes[d],g=n(this.proxyOf.nodes[u],u),g!==!1);)this.indexes[d]+=1;return delete this.indexes[d],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,d){return d==="proxyOf"?n:n[d]?d==="each"||typeof d=="string"&&d.startsWith("walk")?(...u)=>n[d](...u.map(g=>typeof g=="function"?(S,b)=>g(S.toProxy(),b):g)):d==="every"||d==="some"?u=>n[d]((g,...S)=>u(g.toProxy(),...S)):d==="root"?()=>n.root().toProxy():d==="nodes"?n.nodes.map(u=>u.toProxy()):d==="first"||d==="last"?n[d].toProxy():n[d]:n[d]},set(n,d,u){return n[d]===u||(n[d]=u,(d==="name"||d==="params"||d==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,d){let u=this.index(n),g=this.normalize(d,this.proxyOf.nodes[u]).reverse();u=this.index(n);for(let b of g)this.proxyOf.nodes.splice(u+1,0,b);let S;for(let b in this.indexes)S=this.indexes[b],u<S&&(this.indexes[b]=S+g.length);return this.markDirty(),this}insertBefore(n,d){let u=this.index(n),g=u===0?"prepend":!1,S=this.normalize(d,this.proxyOf.nodes[u],g).reverse();u=this.index(n);for(let v of S)this.proxyOf.nodes.splice(u,0,v);let b;for(let v in this.indexes)b=this.indexes[v],u<=b&&(this.indexes[v]=b+S.length);return this.markDirty(),this}normalize(n,d){if(typeof n=="string")n=p(c(n).nodes);else if(typeof n>"u")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value>"u")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new s(n)]}else if(n.selector)n=[new f(n)];else if(n.name)n=[new m(n)];else if(n.text)n=[new a(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[t]||h.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&i(g),typeof g.raws.before>"u"&&d&&typeof d.raws.before<"u"&&(g.raws.before=d.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let d of n){let u=this.normalize(d,this.first,"prepend").reverse();for(let g of u)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+u.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let d;for(let u in this.indexes)d=this.indexes[u],d>=n&&(this.indexes[u]=d-1);return this.markDirty(),this}replaceValues(n,d,u){return u||(u=d,d={}),this.walkDecls(g=>{d.props&&!d.props.includes(g.prop)||d.fast&&!g.value.includes(d.fast)||(g.value=g.value.replace(n,u))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((d,u)=>{let g;try{g=n(d,u)}catch(S){throw d.addToError(S)}return g!==!1&&d.walk&&(g=d.walk(n)),g})}walkAtRules(n,d){return d?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="atrule"&&n.test(u.name))return d(u,g)}):this.walk((u,g)=>{if(u.type==="atrule"&&u.name===n)return d(u,g)}):(d=n,this.walk((u,g)=>{if(u.type==="atrule")return d(u,g)}))}walkComments(n){return this.walk((d,u)=>{if(d.type==="comment")return n(d,u)})}walkDecls(n,d){return d?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="decl"&&n.test(u.prop))return d(u,g)}):this.walk((u,g)=>{if(u.type==="decl"&&u.prop===n)return d(u,g)}):(d=n,this.walk((u,g)=>{if(u.type==="decl")return d(u,g)}))}walkRules(n,d){return d?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="rule"&&n.test(u.selector))return d(u,g)}):this.walk((u,g)=>{if(u.type==="rule"&&u.selector===n)return d(u,g)}):(d=n,this.walk((u,g)=>{if(u.type==="rule")return d(u,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=o=>{c=o},h.registerRule=o=>{f=o},h.registerAtRule=o=>{m=o},h.registerRoot=o=>{l=o},hr=h,h.default=h,h.rebuild=o=>{o.type==="atrule"?Object.setPrototypeOf(o,m.prototype):o.type==="rule"?Object.setPrototypeOf(o,f.prototype):o.type==="decl"?Object.setPrototypeOf(o,s.prototype):o.type==="comment"?Object.setPrototypeOf(o,a.prototype):o.type==="root"&&Object.setPrototypeOf(o,l.prototype),o[t]=!0,o.nodes&&o.nodes.forEach(n=>{h.rebuild(n)})},hr}var fr,si;function ts(){if(si)return fr;si=1;let e=xe(),t,s;class a extends e{constructor(c){super({type:"document",...c}),this.nodes||(this.nodes=[])}toResult(c={}){return new t(new s,this,c).stringify()}}return a.registerLazyResult=r=>{t=r},a.registerProcessor=r=>{s=r},fr=a,a.default=a,fr}var dr,ii;function Zi(){if(ii)return dr;ii=1;let e={};return dr=function(s){e[s]||(e[s]=!0,typeof console<"u"&&console.warn&&console.warn(s))},dr}var pr,ni;function Ki(){if(ni)return pr;ni=1;class e{constructor(s,a={}){if(this.type="warning",this.text=s,a.node&&a.node.source){let r=a.node.rangeBy(a);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in a)this[r]=a[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}}return pr=e,e.default=e,pr}var mr,oi;function rs(){if(oi)return mr;oi=1;let e=Ki();class t{constructor(a,r,c){this.processor=a,this.messages=[],this.root=r,this.opts=c,this.css=void 0,this.map=void 0}toString(){return this.css}warn(a,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let c=new e(a,r);return this.messages.push(c),c}warnings(){return this.messages.filter(a=>a.type==="warning")}get content(){return this.css}}return mr=t,t.default=t,mr}var gr,ai;function ra(){if(ai)return gr;ai=1;let e=39,t=34,s=92,a=47,r=10,c=32,f=12,m=9,l=13,p=91,i=93,h=40,o=41,n=123,d=125,u=59,g=42,S=58,b=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return gr=function(R,O={}){let M=R.css.valueOf(),T=O.ignoreErrors,A,x,ce,se,U,F,H,Q,Y,B,ye=M.length,N=0,me=[],ae=[];function ke(){return N}function K(D){throw R.error("Unclosed "+D,N)}function he(){return ae.length===0&&N>=ye}function Se(D){if(ae.length)return ae.pop();if(N>=ye)return;let J=D?D.ignoreUnclosed:!1;switch(A=M.charCodeAt(N),A){case r:case c:case m:case l:case f:{x=N;do x+=1,A=M.charCodeAt(x);while(A===c||A===r||A===m||A===l||A===f);B=["space",M.slice(N,x)],N=x-1;break}case p:case i:case n:case d:case S:case u:case o:{let $=String.fromCharCode(A);B=[$,$,N];break}case h:{if(Q=me.length?me.pop()[1]:"",Y=M.charCodeAt(N+1),Q==="url"&&Y!==e&&Y!==t&&Y!==c&&Y!==r&&Y!==m&&Y!==f&&Y!==l){x=N;do{if(F=!1,x=M.indexOf(")",x+1),x===-1)if(T||J){x=N;break}else K("bracket");for(H=x;M.charCodeAt(H-1)===s;)H-=1,F=!F}while(F);B=["brackets",M.slice(N,x+1),N,x],N=x}else x=M.indexOf(")",N+1),se=M.slice(N,x+1),x===-1||y.test(se)?B=["(","(",N]:(B=["brackets",se,N,x],N=x);break}case e:case t:{ce=A===e?"'":'"',x=N;do{if(F=!1,x=M.indexOf(ce,x+1),x===-1)if(T||J){x=N+1;break}else K("string");for(H=x;M.charCodeAt(H-1)===s;)H-=1,F=!F}while(F);B=["string",M.slice(N,x+1),N,x],N=x;break}case b:{v.lastIndex=N+1,v.test(M),v.lastIndex===0?x=M.length-1:x=v.lastIndex-2,B=["at-word",M.slice(N,x+1),N,x],N=x;break}case s:{for(x=N,U=!0;M.charCodeAt(x+1)===s;)x+=1,U=!U;if(A=M.charCodeAt(x+1),U&&A!==a&&A!==c&&A!==r&&A!==m&&A!==l&&A!==f&&(x+=1,w.test(M.charAt(x)))){for(;w.test(M.charAt(x+1));)x+=1;M.charCodeAt(x+1)===c&&(x+=1)}B=["word",M.slice(N,x+1),N,x],N=x;break}default:{A===a&&M.charCodeAt(N+1)===g?(x=M.indexOf("*/",N+2)+1,x===0&&(T||J?x=M.length:K("comment")),B=["comment",M.slice(N,x+1),N,x],N=x):(E.lastIndex=N+1,E.test(M),E.lastIndex===0?x=M.length-1:x=E.lastIndex-2,B=["word",M.slice(N,x+1),N,x],me.push(B),N=x);break}}return N++,B}function we(D){ae.push(D)}return{back:we,endOfFile:he,nextToken:Se,position:ke}},gr}var yr,li;function ss(){if(li)return yr;li=1;let e=xe();class t extends e{constructor(a){super(a),this.type="atrule"}append(...a){return this.proxyOf.nodes||(this.nodes=[]),super.append(...a)}prepend(...a){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...a)}}return yr=t,t.default=t,e.registerAtRule(t),yr}var wr,ui;function ze(){if(ui)return wr;ui=1;let e=xe(),t,s;class a extends e{constructor(c){super(c),this.type="root",this.nodes||(this.nodes=[])}normalize(c,f,m){let l=super.normalize(c);if(f){if(m==="prepend")this.nodes.length>1?f.raws.before=this.nodes[1].raws.before:delete f.raws.before;else if(this.first!==f)for(let p of l)p.raws.before=f.raws.before}return l}removeChild(c,f){let m=this.index(c);return!f&&m===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[m].raws.before),super.removeChild(c)}toResult(c={}){return new t(new s,this,c).stringify()}}return a.registerLazyResult=r=>{t=r},a.registerProcessor=r=>{s=r},wr=a,a.default=a,e.registerRoot(a),wr}var br,ci;function en(){if(ci)return br;ci=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let s=[" ",`
|
|
49
|
-
`," "];return e.split(t,s)},split(t,s,a){let r=[],c="",f=!1,m=0,l=!1,p="",i=!1;for(let h of t)i?i=!1:h==="\\"?i=!0:l?h===p&&(l=!1):h==='"'||h==="'"?(l=!0,p=h):h==="("?m+=1:h===")"?m>0&&(m-=1):m===0&&s.includes(h)&&(f=!0),f?(c!==""&&r.push(c.trim()),c="",f=!1):c+=h;return(a||c!=="")&&r.push(c.trim()),r}};return br=e,e.default=e,br}var vr,hi;function is(){if(hi)return vr;hi=1;let e=xe(),t=en();class s extends e{constructor(r){super(r),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(r){let c=this.selector?this.selector.match(/,\s*/):null,f=c?c[0]:","+this.raw("between","beforeOpen");this.selector=r.join(f)}}return vr=s,s.default=s,e.registerRule(s),vr}var Sr,fi;function sa(){if(fi)return Sr;fi=1;let e=wt(),t=ra(),s=vt(),a=ss(),r=ze(),c=is(),f={empty:!0,space:!0};function m(p){for(let i=p.length-1;i>=0;i--){let h=p[i],o=h[3]||h[2];if(o)return o}}class l{constructor(i){this.input=i,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:i,start:{column:1,line:1,offset:0}}}atrule(i){let h=new a;h.name=i[1].slice(1),h.name===""&&this.unnamedAtrule(h,i),this.init(h,i[2]);let o,n,d,u=!1,g=!1,S=[],b=[];for(;!this.tokenizer.endOfFile();){if(i=this.tokenizer.nextToken(),o=i[0],o==="("||o==="["?b.push(o==="("?")":"]"):o==="{"&&b.length>0?b.push("}"):o===b[b.length-1]&&b.pop(),b.length===0)if(o===";"){h.source.end=this.getPosition(i[2]),h.source.end.offset++,this.semicolon=!0;break}else if(o==="{"){g=!0;break}else if(o==="}"){if(S.length>0){for(d=S.length-1,n=S[d];n&&n[0]==="space";)n=S[--d];n&&(h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++)}this.end(i);break}else S.push(i);else S.push(i);if(this.tokenizer.endOfFile()){u=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(h.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(h,"params",S),u&&(i=S[S.length-1],h.source.end=this.getPosition(i[3]||i[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),g&&(h.nodes=[],this.current=h)}checkMissedSemicolon(i){let h=this.colon(i);if(h===!1)return;let o=0,n;for(let d=h-1;d>=0&&(n=i[d],!(n[0]!=="space"&&(o+=1,o===2)));d--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(i){let h=0,o,n,d;for(let[u,g]of i.entries()){if(o=g,n=o[0],n==="("&&(h+=1),n===")"&&(h-=1),h===0&&n===":")if(!d)this.doubleColon(o);else{if(d[0]==="word"&&d[1]==="progid")continue;return u}d=o}return!1}comment(i){let h=new s;this.init(h,i[2]),h.source.end=this.getPosition(i[3]||i[2]),h.source.end.offset++;let o=i[1].slice(2,-2);if(/^\s*$/.test(o))h.text="",h.raws.left=o,h.raws.right="";else{let n=o.match(/^(\s*)([^]*\S)(\s*)$/);h.text=n[2],h.raws.left=n[1],h.raws.right=n[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(i,h){let o=new e;this.init(o,i[0][2]);let n=i[i.length-1];for(n[0]===";"&&(this.semicolon=!0,i.pop()),o.source.end=this.getPosition(n[3]||n[2]||m(i)),o.source.end.offset++;i[0][0]!=="word";)i.length===1&&this.unknownWord(i),o.raws.before+=i.shift()[1];for(o.source.start=this.getPosition(i[0][2]),o.prop="";i.length;){let b=i[0][0];if(b===":"||b==="space"||b==="comment")break;o.prop+=i.shift()[1]}o.raws.between="";let d;for(;i.length;)if(d=i.shift(),d[0]===":"){o.raws.between+=d[1];break}else d[0]==="word"&&/\w/.test(d[1])&&this.unknownWord([d]),o.raws.between+=d[1];(o.prop[0]==="_"||o.prop[0]==="*")&&(o.raws.before+=o.prop[0],o.prop=o.prop.slice(1));let u=[],g;for(;i.length&&(g=i[0][0],!(g!=="space"&&g!=="comment"));)u.push(i.shift());this.precheckMissedSemicolon(i);for(let b=i.length-1;b>=0;b--){if(d=i[b],d[1].toLowerCase()==="!important"){o.important=!0;let v=this.stringFrom(i,b);v=this.spacesFromEnd(i)+v,v!==" !important"&&(o.raws.important=v);break}else if(d[1].toLowerCase()==="important"){let v=i.slice(0),E="";for(let y=b;y>0;y--){let w=v[y][0];if(E.trim().indexOf("!")===0&&w!=="space")break;E=v.pop()[1]+E}E.trim().indexOf("!")===0&&(o.important=!0,o.raws.important=E,i=v)}if(d[0]!=="space"&&d[0]!=="comment")break}i.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(o.raws.between+=u.map(b=>b[1]).join(""),u=[]),this.raw(o,"value",u.concat(i),h),o.value.includes(":")&&!h&&this.checkMissedSemicolon(i)}doubleColon(i){throw this.input.error("Double colon",{offset:i[2]},{offset:i[2]+i[1].length})}emptyRule(i){let h=new c;this.init(h,i[2]),h.selector="",h.raws.between="",this.current=h}end(i){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(i[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(i)}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(i){if(this.spaces+=i[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(i){let h=this.input.fromOffset(i);return{column:h.col,line:h.line,offset:i}}init(i,h){this.current.push(i),i.source={input:this.input,start:this.getPosition(h)},i.raws.before=this.spaces,this.spaces="",i.type!=="comment"&&(this.semicolon=!1)}other(i){let h=!1,o=null,n=!1,d=null,u=[],g=i[1].startsWith("--"),S=[],b=i;for(;b;){if(o=b[0],S.push(b),o==="("||o==="[")d||(d=b),u.push(o==="("?")":"]");else if(g&&n&&o==="{")d||(d=b),u.push("}");else if(u.length===0)if(o===";")if(n){this.decl(S,g);return}else break;else if(o==="{"){this.rule(S);return}else if(o==="}"){this.tokenizer.back(S.pop()),h=!0;break}else o===":"&&(n=!0);else o===u[u.length-1]&&(u.pop(),u.length===0&&(d=null));b=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),u.length>0&&this.unclosedBracket(d),h&&n){if(!g)for(;S.length&&(b=S[S.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let i;for(;!this.tokenizer.endOfFile();)switch(i=this.tokenizer.nextToken(),i[0]){case"space":this.spaces+=i[1];break;case";":this.freeSemicolon(i);break;case"}":this.end(i);break;case"comment":this.comment(i);break;case"at-word":this.atrule(i);break;case"{":this.emptyRule(i);break;default:this.other(i);break}this.endFile()}precheckMissedSemicolon(){}raw(i,h,o,n){let d,u,g=o.length,S="",b=!0,v,E;for(let y=0;y<g;y+=1)d=o[y],u=d[0],u==="space"&&y===g-1&&!n?b=!1:u==="comment"?(E=o[y-1]?o[y-1][0]:"empty",v=o[y+1]?o[y+1][0]:"empty",!f[E]&&!f[v]?S.slice(-1)===","?b=!1:S+=d[1]:b=!1):S+=d[1];if(!b){let y=o.reduce((w,C)=>w+C[1],"");i.raws[h]={raw:y,value:S}}i[h]=S}rule(i){i.pop();let h=new c;this.init(h,i[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(i),this.raw(h,"selector",i),this.current=h}spacesAndCommentsFromEnd(i){let h,o="";for(;i.length&&(h=i[i.length-1][0],!(h!=="space"&&h!=="comment"));)o=i.pop()[1]+o;return o}spacesAndCommentsFromStart(i){let h,o="";for(;i.length&&(h=i[0][0],!(h!=="space"&&h!=="comment"));)o+=i.shift()[1];return o}spacesFromEnd(i){let h,o="";for(;i.length&&(h=i[i.length-1][0],h==="space");)o=i.pop()[1]+o;return o}stringFrom(i,h){let o="";for(let n=h;n<i.length;n++)o+=i[n][1];return i.splice(h,i.length-h),o}unclosedBlock(){let i=this.current.source.start;throw this.input.error("Unclosed block",i.line,i.column)}unclosedBracket(i){throw this.input.error("Unclosed bracket",{offset:i[2]},{offset:i[2]+1})}unexpectedClose(i){throw this.input.error("Unexpected }",{offset:i[2]},{offset:i[2]+1})}unknownWord(i){throw this.input.error("Unknown word",{offset:i[0][2]},{offset:i[0][2]+i[0][1].length})}unnamedAtrule(i,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return Sr=l,Sr}var Cr,di;function ns(){if(di)return Cr;di=1;let e=xe(),t=sa(),s=bt();function a(r,c){let f=new s(r,c),m=new t(f);try{m.parse()}catch(l){throw l}return m.root}return Cr=a,a.default=a,e.registerParse(a),Cr}var Er,pi;function tn(){if(pi)return Er;pi=1;let{isClean:e,my:t}=es(),s=Qi(),a=gt(),r=xe(),c=ts(),f=Zi(),m=rs(),l=ns(),p=ze(),i={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},o={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function d(E){return typeof E=="object"&&typeof E.then=="function"}function u(E){let y=!1,w=i[E.type];return E.type==="decl"?y=E.prop.toLowerCase():E.type==="atrule"&&(y=E.name.toLowerCase()),y&&E.append?[w,w+"-"+y,n,w+"Exit",w+"Exit-"+y]:y?[w,w+"-"+y,w+"Exit",w+"Exit-"+y]:E.append?[w,n,w+"Exit"]:[w,w+"Exit"]}function g(E){let y;return E.type==="document"?y=["Document",n,"DocumentExit"]:E.type==="root"?y=["Root",n,"RootExit"]:y=u(E),{eventIndex:0,events:y,iterator:0,node:E,visitorIndex:0,visitors:[]}}function S(E){return E[e]=!1,E.nodes&&E.nodes.forEach(y=>S(y)),E}let b={};class v{constructor(y,w,C){this.stringified=!1,this.processed=!1;let R;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))R=S(w);else if(w instanceof v||w instanceof m)R=S(w.root),w.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let O=l;C.syntax&&(O=C.syntax.parse),C.parser&&(O=C.parser),O.parse&&(O=O.parse);try{R=O(w,C)}catch(M){this.processed=!0,this.error=M}R&&!R[t]&&r.rebuild(R)}this.result=new m(y,R,C),this.helpers={...b,postcss:b,result:this.result},this.plugins=this.processor.plugins.map(O=>typeof O=="object"&&O.prepare?{...O,...O.prepare(this.result)}:O)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,w){let C=this.result.lastPlugin;try{w&&w.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return y}prepareVisitors(){this.listeners={};let y=(w,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,R])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!h[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!o[C])if(typeof w[C]=="object")for(let R in w[C])R==="*"?y(w,C,w[C][R]):y(w,C+"-"+R.toLowerCase(),w[C][R]);else typeof w[C]=="function"&&y(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let w=this.plugins[y],C=this.runOnRoot(w);if(d(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[e];){y[e]=!0;let w=[g(y)];for(;w.length>0;){let C=this.visitTick(w);if(d(C))try{await C}catch(R){let O=w[w.length-1].node;throw this.handleError(R,O)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(y.type==="document"){let R=y.nodes.map(O=>C(O,this.helpers));await Promise.all(R)}else await C(y,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return d(w[0])?Promise.all(w):w}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,w=a;y.syntax&&(w=y.syntax.stringify),y.stringifier&&(w=y.stringifier),w.stringify&&(w=w.stringify);let R=new s(w,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let y of this.plugins){let w=this.runOnRoot(y);if(d(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[e];)y[e]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let w of y.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,w){return this.async().then(y,w)}toString(){return this.css}visitSync(y,w){for(let[C,R]of y){this.result.lastPlugin=C;let O;try{O=R(w,this.helpers)}catch(M){throw this.handleError(M,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(d(O))throw this.getAsyncError()}}visitTick(y){let w=y[y.length-1],{node:C,visitors:R}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(R.length>0&&w.visitorIndex<R.length){let[M,T]=R[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===R.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=M;try{return T(C.toProxy(),this.helpers)}catch(A){throw this.handleError(A,C)}}if(w.iterator!==0){let M=w.iterator,T;for(;T=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!T[e]){T[e]=!0,y.push(g(T));return}w.iterator=0,delete C.indexes[M]}let O=w.events;for(;w.eventIndex<O.length;){let M=O[w.eventIndex];if(w.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[e]=!0,w.iterator=C.getIterator());return}else if(this.listeners[M]){w.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[e]=!0;let w=u(y);for(let C of w)if(C===n)y.nodes&&y.each(R=>{R[e]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,y.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return v.registerPostcss=E=>{b=E},Er=v,v.default=v,p.registerLazyResult(v),c.registerLazyResult(v),Er}var xr,mi;function ia(){if(mi)return xr;mi=1;let e=Qi(),t=gt(),s=Zi(),a=ns(),r=rs();class c{constructor(m,l,p){l=l.toString(),this.stringified=!1,this._processor=m,this._css=l,this._opts=p,this._map=void 0;let i,h=t;this.result=new r(this._processor,i,this._opts),this.result.css=l;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let n=new e(h,i,this._opts,l);if(n.isMap()){let[d,u]=n.generate();d&&(this.result.css=d),u&&(this.result.map=u)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(m){return this.async().catch(m)}finally(m){return this.async().then(m,m)}sync(){if(this.error)throw this.error;return this.result}then(m,l){return this.async().then(m,l)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let m,l=a;try{m=l(this._css,this._opts)}catch(p){this.error=p}if(this.error)throw this.error;return this._root=m,m}get[Symbol.toStringTag](){return"NoWorkResult"}}return xr=c,c.default=c,xr}var Rr,gi;function na(){if(gi)return Rr;gi=1;let e=ia(),t=tn(),s=ts(),a=ze();class r{constructor(f=[]){this.version="8.4.38",this.plugins=this.normalize(f)}normalize(f){let m=[];for(let l of f)if(l.postcss===!0?l=l():l.postcss&&(l=l.postcss),typeof l=="object"&&Array.isArray(l.plugins))m=m.concat(l.plugins);else if(typeof l=="object"&&l.postcssPlugin)m.push(l);else if(typeof l=="function")m.push(l);else if(!(typeof l=="object"&&(l.parse||l.stringify)))throw new Error(l+" is not a PostCSS plugin");return m}process(f,m={}){return!this.plugins.length&&!m.parser&&!m.stringifier&&!m.syntax?new e(this,f,m):new t(this,f,m)}use(f){return this.plugins=this.plugins.concat(this.normalize([f])),this}}return Rr=r,r.default=r,a.registerProcessor(r),s.registerProcessor(r),Rr}var Mr,yi;function oa(){if(yi)return Mr;yi=1;let e=wt(),t=Xi(),s=vt(),a=ss(),r=bt(),c=ze(),f=is();function m(l,p){if(Array.isArray(l))return l.map(o=>m(o));let{inputs:i,...h}=l;if(i){p=[];for(let o of i){let n={...o,__proto__:r.prototype};n.map&&(n.map={...n.map,__proto__:t.prototype}),p.push(n)}}if(h.nodes&&(h.nodes=l.nodes.map(o=>m(o,p))),h.source){let{inputId:o,...n}=h.source;h.source=n,o!=null&&(h.source.input=p[o])}if(h.type==="root")return new c(h);if(h.type==="decl")return new e(h);if(h.type==="rule")return new f(h);if(h.type==="comment")return new s(h);if(h.type==="atrule")return new a(h);throw new Error("Unknown node type: "+l.type)}return Mr=m,m.default=m,Mr}var Nr,wi;function aa(){if(wi)return Nr;wi=1;let e=Kr(),t=wt(),s=tn(),a=xe(),r=na(),c=gt(),f=oa(),m=ts(),l=Ki(),p=vt(),i=ss(),h=rs(),o=bt(),n=ns(),d=en(),u=is(),g=ze(),S=yt();function b(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new r(v)}return b.plugin=function(E,y){let w=!1;function C(...O){console&&console.warn&&!w&&(w=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
47
|
+
`),this.css+=n+"/*# sourceMappingURL="+o+" */"}applyPrevMaps(){for(let o of this.previous()){let n=this.toUrl(this.path(o.file)),p=o.root||s(o.file),u;this.mapOpts.sourcesContent===!1?(u=new e(o.text),u.sourcesContent&&(u.sourcesContent=null)):u=o.consumer(),this.map.applySourceMap(u,n,this.toUrl(this.path(p)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let o;for(let n=this.root.nodes.length-1;n>=0;n--)o=this.root.nodes[n],o.type==="comment"&&o.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),d&&l&&this.isMap())return this.generateMap();{let o="";return this.stringify(this.root,n=>{o+=n}),[o]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let o=this.previous()[0].consumer();o.file=this.outputFile(),this.map=t.fromSourceMap(o,{ignoreInvalidMapping:!0})}else this.map=new t({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 t({file:this.outputFile(),ignoreInvalidMapping:!0});let o=1,n=1,p="<no source>",u={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,S;this.stringify(this.root,(y,v,E)=>{if(this.css+=y,v&&E!=="end"&&(u.generated.line=o,u.generated.column=n-1,v.source&&v.source.start?(u.source=this.sourcePath(v),u.original.line=v.source.start.line,u.original.column=v.source.start.column-1,this.map.addMapping(u)):(u.source=p,u.original.line=1,u.original.column=0,this.map.addMapping(u))),g=y.match(/\n/g),g?(o+=g.length,S=y.lastIndexOf(`
|
|
48
|
+
`),n=y.length-S):n+=y.length,v&&E!=="start"){let b=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==b.last||b.raws.semicolon)&&(v.source&&v.source.end?(u.source=this.sourcePath(v),u.original.line=v.source.end.line,u.original.column=v.source.end.column-1,u.generated.line=o,u.generated.column=n-2,this.map.addMapping(u)):(u.source=p,u.original.line=1,u.original.column=0,u.generated.line=o,u.generated.column=n-1,this.map.addMapping(u)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(o=>o.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let o=this.mapOpts.annotation;return typeof o<"u"&&o!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(o=>o.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(o){if(this.mapOpts.absolute||o.charCodeAt(0)===60||/^\w+:\/\//.test(o))return o;let n=this.memoizedPaths.get(o);if(n)return n;let p=this.opts.to?s(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=s(r(p,this.mapOpts.annotation)));let u=a(p,o);return this.memoizedPaths.set(o,u),u}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(o=>{if(o.source&&o.source.input.map){let n=o.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let o=new m(this.originalCSS,this.opts);o.map&&this.previousMaps.push(o.map)}return this.previousMaps}setSourcesContent(){let o={};if(this.root)this.root.walk(n=>{if(n.source){let p=n.source.input.from;if(p&&!o[p]){o[p]=!0;let u=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(u,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(o){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(o.source.input.from):this.toUrl(this.path(o.source.input.from))}toBase64(o){return Buffer?Buffer.from(o).toString("base64"):window.btoa(unescape(encodeURIComponent(o)))}toFileUrl(o){let n=this.memoizedFileURLs.get(o);if(n)return n;if(f){let p=f(o).toString();return this.memoizedFileURLs.set(o,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(o){let n=this.memoizedURLs.get(o);if(n)return n;c==="\\"&&(o=o.replace(/\\/g,"/"));let p=encodeURI(o).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(o,p),p}}return ur=i,ur}var cr,ti;function vt(){if(ti)return cr;ti=1;let e=yt();class t extends e{constructor(a){super(a),this.type="comment"}}return cr=t,t.default=t,cr}var hr,ri;function Re(){if(ri)return hr;ri=1;let{isClean:e,my:t}=es(),s=wt(),a=vt(),r=yt(),c,f,m,l;function d(o){return o.map(n=>(n.nodes&&(n.nodes=d(n.nodes)),delete n.source,n))}function i(o){if(o[e]=!1,o.proxyOf.nodes)for(let n of o.proxyOf.nodes)i(n)}class h extends r{append(...n){for(let p of n){let u=this.normalize(p,this.last);for(let g of u)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let p of this.nodes)p.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let p=this.getIterator(),u,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(u=this.indexes[p],g=n(this.proxyOf.nodes[u],u),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,p){return p==="proxyOf"?n:n[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...u)=>n[p](...u.map(g=>typeof g=="function"?(S,y)=>g(S.toProxy(),y):g)):p==="every"||p==="some"?u=>n[p]((g,...S)=>u(g.toProxy(),...S)):p==="root"?()=>n.root().toProxy():p==="nodes"?n.nodes.map(u=>u.toProxy()):p==="first"||p==="last"?n[p].toProxy():n[p]:n[p]},set(n,p,u){return n[p]===u||(n[p]=u,(p==="name"||p==="params"||p==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,p){let u=this.index(n),g=this.normalize(p,this.proxyOf.nodes[u]).reverse();u=this.index(n);for(let y of g)this.proxyOf.nodes.splice(u+1,0,y);let S;for(let y in this.indexes)S=this.indexes[y],u<S&&(this.indexes[y]=S+g.length);return this.markDirty(),this}insertBefore(n,p){let u=this.index(n),g=u===0?"prepend":!1,S=this.normalize(p,this.proxyOf.nodes[u],g).reverse();u=this.index(n);for(let v of S)this.proxyOf.nodes.splice(u,0,v);let y;for(let v in this.indexes)y=this.indexes[v],u<=y&&(this.indexes[v]=y+S.length);return this.markDirty(),this}normalize(n,p){if(typeof n=="string")n=d(c(n).nodes);else if(typeof n>"u")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value>"u")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new s(n)]}else if(n.selector)n=[new f(n)];else if(n.name)n=[new m(n)];else if(n.text)n=[new a(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[t]||h.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&i(g),typeof g.raws.before>"u"&&p&&typeof p.raws.before<"u"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let p of n){let u=this.normalize(p,this.first,"prepend").reverse();for(let g of u)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+u.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let p;for(let u in this.indexes)p=this.indexes[u],p>=n&&(this.indexes[u]=p-1);return this.markDirty(),this}replaceValues(n,p,u){return u||(u=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(n,u))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((p,u)=>{let g;try{g=n(p,u)}catch(S){throw p.addToError(S)}return g!==!1&&p.walk&&(g=p.walk(n)),g})}walkAtRules(n,p){return p?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="atrule"&&n.test(u.name))return p(u,g)}):this.walk((u,g)=>{if(u.type==="atrule"&&u.name===n)return p(u,g)}):(p=n,this.walk((u,g)=>{if(u.type==="atrule")return p(u,g)}))}walkComments(n){return this.walk((p,u)=>{if(p.type==="comment")return n(p,u)})}walkDecls(n,p){return p?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="decl"&&n.test(u.prop))return p(u,g)}):this.walk((u,g)=>{if(u.type==="decl"&&u.prop===n)return p(u,g)}):(p=n,this.walk((u,g)=>{if(u.type==="decl")return p(u,g)}))}walkRules(n,p){return p?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="rule"&&n.test(u.selector))return p(u,g)}):this.walk((u,g)=>{if(u.type==="rule"&&u.selector===n)return p(u,g)}):(p=n,this.walk((u,g)=>{if(u.type==="rule")return p(u,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=o=>{c=o},h.registerRule=o=>{f=o},h.registerAtRule=o=>{m=o},h.registerRoot=o=>{l=o},hr=h,h.default=h,h.rebuild=o=>{o.type==="atrule"?Object.setPrototypeOf(o,m.prototype):o.type==="rule"?Object.setPrototypeOf(o,f.prototype):o.type==="decl"?Object.setPrototypeOf(o,s.prototype):o.type==="comment"?Object.setPrototypeOf(o,a.prototype):o.type==="root"&&Object.setPrototypeOf(o,l.prototype),o[t]=!0,o.nodes&&o.nodes.forEach(n=>{h.rebuild(n)})},hr}var fr,si;function ts(){if(si)return fr;si=1;let e=Re(),t,s;class a extends e{constructor(c){super({type:"document",...c}),this.nodes||(this.nodes=[])}toResult(c={}){return new t(new s,this,c).stringify()}}return a.registerLazyResult=r=>{t=r},a.registerProcessor=r=>{s=r},fr=a,a.default=a,fr}var dr,ii;function Zi(){if(ii)return dr;ii=1;let e={};return dr=function(s){e[s]||(e[s]=!0,typeof console<"u"&&console.warn&&console.warn(s))},dr}var pr,ni;function Ki(){if(ni)return pr;ni=1;class e{constructor(s,a={}){if(this.type="warning",this.text=s,a.node&&a.node.source){let r=a.node.rangeBy(a);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in a)this[r]=a[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}}return pr=e,e.default=e,pr}var mr,oi;function rs(){if(oi)return mr;oi=1;let e=Ki();class t{constructor(a,r,c){this.processor=a,this.messages=[],this.root=r,this.opts=c,this.css=void 0,this.map=void 0}toString(){return this.css}warn(a,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let c=new e(a,r);return this.messages.push(c),c}warnings(){return this.messages.filter(a=>a.type==="warning")}get content(){return this.css}}return mr=t,t.default=t,mr}var gr,ai;function ra(){if(ai)return gr;ai=1;let e=39,t=34,s=92,a=47,r=10,c=32,f=12,m=9,l=13,d=91,i=93,h=40,o=41,n=123,p=125,u=59,g=42,S=58,y=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return gr=function(R,O={}){let M=R.css.valueOf(),T=O.ignoreErrors,D,x,ce,se,U,F,H,Q,Y,B,ye=M.length,N=0,me=[],ae=[];function Pe(){return N}function K(A){throw R.error("Unclosed "+A,N)}function he(){return ae.length===0&&N>=ye}function Ce(A){if(ae.length)return ae.pop();if(N>=ye)return;let J=A?A.ignoreUnclosed:!1;switch(D=M.charCodeAt(N),D){case r:case c:case m:case l:case f:{x=N;do x+=1,D=M.charCodeAt(x);while(D===c||D===r||D===m||D===l||D===f);B=["space",M.slice(N,x)],N=x-1;break}case d:case i:case n:case p:case S:case u:case o:{let $=String.fromCharCode(D);B=[$,$,N];break}case h:{if(Q=me.length?me.pop()[1]:"",Y=M.charCodeAt(N+1),Q==="url"&&Y!==e&&Y!==t&&Y!==c&&Y!==r&&Y!==m&&Y!==f&&Y!==l){x=N;do{if(F=!1,x=M.indexOf(")",x+1),x===-1)if(T||J){x=N;break}else K("bracket");for(H=x;M.charCodeAt(H-1)===s;)H-=1,F=!F}while(F);B=["brackets",M.slice(N,x+1),N,x],N=x}else x=M.indexOf(")",N+1),se=M.slice(N,x+1),x===-1||b.test(se)?B=["(","(",N]:(B=["brackets",se,N,x],N=x);break}case e:case t:{ce=D===e?"'":'"',x=N;do{if(F=!1,x=M.indexOf(ce,x+1),x===-1)if(T||J){x=N+1;break}else K("string");for(H=x;M.charCodeAt(H-1)===s;)H-=1,F=!F}while(F);B=["string",M.slice(N,x+1),N,x],N=x;break}case y:{v.lastIndex=N+1,v.test(M),v.lastIndex===0?x=M.length-1:x=v.lastIndex-2,B=["at-word",M.slice(N,x+1),N,x],N=x;break}case s:{for(x=N,U=!0;M.charCodeAt(x+1)===s;)x+=1,U=!U;if(D=M.charCodeAt(x+1),U&&D!==a&&D!==c&&D!==r&&D!==m&&D!==l&&D!==f&&(x+=1,w.test(M.charAt(x)))){for(;w.test(M.charAt(x+1));)x+=1;M.charCodeAt(x+1)===c&&(x+=1)}B=["word",M.slice(N,x+1),N,x],N=x;break}default:{D===a&&M.charCodeAt(N+1)===g?(x=M.indexOf("*/",N+2)+1,x===0&&(T||J?x=M.length:K("comment")),B=["comment",M.slice(N,x+1),N,x],N=x):(E.lastIndex=N+1,E.test(M),E.lastIndex===0?x=M.length-1:x=E.lastIndex-2,B=["word",M.slice(N,x+1),N,x],me.push(B),N=x);break}}return N++,B}function we(A){ae.push(A)}return{back:we,endOfFile:he,nextToken:Ce,position:Pe}},gr}var yr,li;function ss(){if(li)return yr;li=1;let e=Re();class t extends e{constructor(a){super(a),this.type="atrule"}append(...a){return this.proxyOf.nodes||(this.nodes=[]),super.append(...a)}prepend(...a){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...a)}}return yr=t,t.default=t,e.registerAtRule(t),yr}var wr,ui;function qe(){if(ui)return wr;ui=1;let e=Re(),t,s;class a extends e{constructor(c){super(c),this.type="root",this.nodes||(this.nodes=[])}normalize(c,f,m){let l=super.normalize(c);if(f){if(m==="prepend")this.nodes.length>1?f.raws.before=this.nodes[1].raws.before:delete f.raws.before;else if(this.first!==f)for(let d of l)d.raws.before=f.raws.before}return l}removeChild(c,f){let m=this.index(c);return!f&&m===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[m].raws.before),super.removeChild(c)}toResult(c={}){return new t(new s,this,c).stringify()}}return a.registerLazyResult=r=>{t=r},a.registerProcessor=r=>{s=r},wr=a,a.default=a,e.registerRoot(a),wr}var br,ci;function en(){if(ci)return br;ci=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let s=[" ",`
|
|
49
|
+
`," "];return e.split(t,s)},split(t,s,a){let r=[],c="",f=!1,m=0,l=!1,d="",i=!1;for(let h of t)i?i=!1:h==="\\"?i=!0:l?h===d&&(l=!1):h==='"'||h==="'"?(l=!0,d=h):h==="("?m+=1:h===")"?m>0&&(m-=1):m===0&&s.includes(h)&&(f=!0),f?(c!==""&&r.push(c.trim()),c="",f=!1):c+=h;return(a||c!=="")&&r.push(c.trim()),r}};return br=e,e.default=e,br}var vr,hi;function is(){if(hi)return vr;hi=1;let e=Re(),t=en();class s extends e{constructor(r){super(r),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(r){let c=this.selector?this.selector.match(/,\s*/):null,f=c?c[0]:","+this.raw("between","beforeOpen");this.selector=r.join(f)}}return vr=s,s.default=s,e.registerRule(s),vr}var Sr,fi;function sa(){if(fi)return Sr;fi=1;let e=wt(),t=ra(),s=vt(),a=ss(),r=qe(),c=is(),f={empty:!0,space:!0};function m(d){for(let i=d.length-1;i>=0;i--){let h=d[i],o=h[3]||h[2];if(o)return o}}class l{constructor(i){this.input=i,this.root=new r,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:i,start:{column:1,line:1,offset:0}}}atrule(i){let h=new a;h.name=i[1].slice(1),h.name===""&&this.unnamedAtrule(h,i),this.init(h,i[2]);let o,n,p,u=!1,g=!1,S=[],y=[];for(;!this.tokenizer.endOfFile();){if(i=this.tokenizer.nextToken(),o=i[0],o==="("||o==="["?y.push(o==="("?")":"]"):o==="{"&&y.length>0?y.push("}"):o===y[y.length-1]&&y.pop(),y.length===0)if(o===";"){h.source.end=this.getPosition(i[2]),h.source.end.offset++,this.semicolon=!0;break}else if(o==="{"){g=!0;break}else if(o==="}"){if(S.length>0){for(p=S.length-1,n=S[p];n&&n[0]==="space";)n=S[--p];n&&(h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++)}this.end(i);break}else S.push(i);else S.push(i);if(this.tokenizer.endOfFile()){u=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(h.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(h,"params",S),u&&(i=S[S.length-1],h.source.end=this.getPosition(i[3]||i[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),g&&(h.nodes=[],this.current=h)}checkMissedSemicolon(i){let h=this.colon(i);if(h===!1)return;let o=0,n;for(let p=h-1;p>=0&&(n=i[p],!(n[0]!=="space"&&(o+=1,o===2)));p--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(i){let h=0,o,n,p;for(let[u,g]of i.entries()){if(o=g,n=o[0],n==="("&&(h+=1),n===")"&&(h-=1),h===0&&n===":")if(!p)this.doubleColon(o);else{if(p[0]==="word"&&p[1]==="progid")continue;return u}p=o}return!1}comment(i){let h=new s;this.init(h,i[2]),h.source.end=this.getPosition(i[3]||i[2]),h.source.end.offset++;let o=i[1].slice(2,-2);if(/^\s*$/.test(o))h.text="",h.raws.left=o,h.raws.right="";else{let n=o.match(/^(\s*)([^]*\S)(\s*)$/);h.text=n[2],h.raws.left=n[1],h.raws.right=n[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(i,h){let o=new e;this.init(o,i[0][2]);let n=i[i.length-1];for(n[0]===";"&&(this.semicolon=!0,i.pop()),o.source.end=this.getPosition(n[3]||n[2]||m(i)),o.source.end.offset++;i[0][0]!=="word";)i.length===1&&this.unknownWord(i),o.raws.before+=i.shift()[1];for(o.source.start=this.getPosition(i[0][2]),o.prop="";i.length;){let y=i[0][0];if(y===":"||y==="space"||y==="comment")break;o.prop+=i.shift()[1]}o.raws.between="";let p;for(;i.length;)if(p=i.shift(),p[0]===":"){o.raws.between+=p[1];break}else p[0]==="word"&&/\w/.test(p[1])&&this.unknownWord([p]),o.raws.between+=p[1];(o.prop[0]==="_"||o.prop[0]==="*")&&(o.raws.before+=o.prop[0],o.prop=o.prop.slice(1));let u=[],g;for(;i.length&&(g=i[0][0],!(g!=="space"&&g!=="comment"));)u.push(i.shift());this.precheckMissedSemicolon(i);for(let y=i.length-1;y>=0;y--){if(p=i[y],p[1].toLowerCase()==="!important"){o.important=!0;let v=this.stringFrom(i,y);v=this.spacesFromEnd(i)+v,v!==" !important"&&(o.raws.important=v);break}else if(p[1].toLowerCase()==="important"){let v=i.slice(0),E="";for(let b=y;b>0;b--){let w=v[b][0];if(E.trim().indexOf("!")===0&&w!=="space")break;E=v.pop()[1]+E}E.trim().indexOf("!")===0&&(o.important=!0,o.raws.important=E,i=v)}if(p[0]!=="space"&&p[0]!=="comment")break}i.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(o.raws.between+=u.map(y=>y[1]).join(""),u=[]),this.raw(o,"value",u.concat(i),h),o.value.includes(":")&&!h&&this.checkMissedSemicolon(i)}doubleColon(i){throw this.input.error("Double colon",{offset:i[2]},{offset:i[2]+i[1].length})}emptyRule(i){let h=new c;this.init(h,i[2]),h.selector="",h.raws.between="",this.current=h}end(i){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(i[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(i)}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(i){if(this.spaces+=i[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(i){let h=this.input.fromOffset(i);return{column:h.col,line:h.line,offset:i}}init(i,h){this.current.push(i),i.source={input:this.input,start:this.getPosition(h)},i.raws.before=this.spaces,this.spaces="",i.type!=="comment"&&(this.semicolon=!1)}other(i){let h=!1,o=null,n=!1,p=null,u=[],g=i[1].startsWith("--"),S=[],y=i;for(;y;){if(o=y[0],S.push(y),o==="("||o==="[")p||(p=y),u.push(o==="("?")":"]");else if(g&&n&&o==="{")p||(p=y),u.push("}");else if(u.length===0)if(o===";")if(n){this.decl(S,g);return}else break;else if(o==="{"){this.rule(S);return}else if(o==="}"){this.tokenizer.back(S.pop()),h=!0;break}else o===":"&&(n=!0);else o===u[u.length-1]&&(u.pop(),u.length===0&&(p=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),u.length>0&&this.unclosedBracket(p),h&&n){if(!g)for(;S.length&&(y=S[S.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let i;for(;!this.tokenizer.endOfFile();)switch(i=this.tokenizer.nextToken(),i[0]){case"space":this.spaces+=i[1];break;case";":this.freeSemicolon(i);break;case"}":this.end(i);break;case"comment":this.comment(i);break;case"at-word":this.atrule(i);break;case"{":this.emptyRule(i);break;default:this.other(i);break}this.endFile()}precheckMissedSemicolon(){}raw(i,h,o,n){let p,u,g=o.length,S="",y=!0,v,E;for(let b=0;b<g;b+=1)p=o[b],u=p[0],u==="space"&&b===g-1&&!n?y=!1:u==="comment"?(E=o[b-1]?o[b-1][0]:"empty",v=o[b+1]?o[b+1][0]:"empty",!f[E]&&!f[v]?S.slice(-1)===","?y=!1:S+=p[1]:y=!1):S+=p[1];if(!y){let b=o.reduce((w,C)=>w+C[1],"");i.raws[h]={raw:b,value:S}}i[h]=S}rule(i){i.pop();let h=new c;this.init(h,i[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(i),this.raw(h,"selector",i),this.current=h}spacesAndCommentsFromEnd(i){let h,o="";for(;i.length&&(h=i[i.length-1][0],!(h!=="space"&&h!=="comment"));)o=i.pop()[1]+o;return o}spacesAndCommentsFromStart(i){let h,o="";for(;i.length&&(h=i[0][0],!(h!=="space"&&h!=="comment"));)o+=i.shift()[1];return o}spacesFromEnd(i){let h,o="";for(;i.length&&(h=i[i.length-1][0],h==="space");)o=i.pop()[1]+o;return o}stringFrom(i,h){let o="";for(let n=h;n<i.length;n++)o+=i[n][1];return i.splice(h,i.length-h),o}unclosedBlock(){let i=this.current.source.start;throw this.input.error("Unclosed block",i.line,i.column)}unclosedBracket(i){throw this.input.error("Unclosed bracket",{offset:i[2]},{offset:i[2]+1})}unexpectedClose(i){throw this.input.error("Unexpected }",{offset:i[2]},{offset:i[2]+1})}unknownWord(i){throw this.input.error("Unknown word",{offset:i[0][2]},{offset:i[0][2]+i[0][1].length})}unnamedAtrule(i,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return Sr=l,Sr}var Cr,di;function ns(){if(di)return Cr;di=1;let e=Re(),t=sa(),s=bt();function a(r,c){let f=new s(r,c),m=new t(f);try{m.parse()}catch(l){throw l}return m.root}return Cr=a,a.default=a,e.registerParse(a),Cr}var Er,pi;function tn(){if(pi)return Er;pi=1;let{isClean:e,my:t}=es(),s=Qi(),a=gt(),r=Re(),c=ts(),f=Zi(),m=rs(),l=ns(),d=qe(),i={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},o={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function p(E){return typeof E=="object"&&typeof E.then=="function"}function u(E){let b=!1,w=i[E.type];return E.type==="decl"?b=E.prop.toLowerCase():E.type==="atrule"&&(b=E.name.toLowerCase()),b&&E.append?[w,w+"-"+b,n,w+"Exit",w+"Exit-"+b]:b?[w,w+"-"+b,w+"Exit",w+"Exit-"+b]:E.append?[w,n,w+"Exit"]:[w,w+"Exit"]}function g(E){let b;return E.type==="document"?b=["Document",n,"DocumentExit"]:E.type==="root"?b=["Root",n,"RootExit"]:b=u(E),{eventIndex:0,events:b,iterator:0,node:E,visitorIndex:0,visitors:[]}}function S(E){return E[e]=!1,E.nodes&&E.nodes.forEach(b=>S(b)),E}let y={};class v{constructor(b,w,C){this.stringified=!1,this.processed=!1;let R;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))R=S(w);else if(w instanceof v||w instanceof m)R=S(w.root),w.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let O=l;C.syntax&&(O=C.syntax.parse),C.parser&&(O=C.parser),O.parse&&(O=O.parse);try{R=O(w,C)}catch(M){this.processed=!0,this.error=M}R&&!R[t]&&r.rebuild(R)}this.result=new m(b,R,C),this.helpers={...y,postcss:y,result:this.result},this.plugins=this.processor.plugins.map(O=>typeof O=="object"&&O.prepare?{...O,...O.prepare(this.result)}:O)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(b){return this.async().catch(b)}finally(b){return this.async().then(b,b)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(b,w){let C=this.result.lastPlugin;try{w&&w.addToError(b),this.error=b,b.name==="CssSyntaxError"&&!b.plugin?(b.plugin=C.postcssPlugin,b.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return b}prepareVisitors(){this.listeners={};let b=(w,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,R])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!h[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!o[C])if(typeof w[C]=="object")for(let R in w[C])R==="*"?b(w,C,w[C][R]):b(w,C+"-"+R.toLowerCase(),w[C][R]);else typeof w[C]=="function"&&b(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let b=0;b<this.plugins.length;b++){let w=this.plugins[b],C=this.runOnRoot(w);if(p(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[e];){b[e]=!0;let w=[g(b)];for(;w.length>0;){let C=this.visitTick(w);if(p(C))try{await C}catch(R){let O=w[w.length-1].node;throw this.handleError(R,O)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(b.type==="document"){let R=b.nodes.map(O=>C(O,this.helpers));await Promise.all(R)}else await C(b,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(b){this.result.lastPlugin=b;try{if(typeof b=="object"&&b.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>b.Once(C,this.helpers));return p(w[0])?Promise.all(w):w}return b.Once(this.result.root,this.helpers)}else if(typeof b=="function")return b(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let b=this.result.opts,w=a;b.syntax&&(w=b.syntax.stringify),b.stringifier&&(w=b.stringifier),w.stringify&&(w=w.stringify);let R=new s(w,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let b of this.plugins){let w=this.runOnRoot(b);if(p(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[e];)b[e]=!0,this.walkSync(b);if(this.listeners.OnceExit)if(b.type==="document")for(let w of b.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,b)}return this.result}then(b,w){return this.async().then(b,w)}toString(){return this.css}visitSync(b,w){for(let[C,R]of b){this.result.lastPlugin=C;let O;try{O=R(w,this.helpers)}catch(M){throw this.handleError(M,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(p(O))throw this.getAsyncError()}}visitTick(b){let w=b[b.length-1],{node:C,visitors:R}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){b.pop();return}if(R.length>0&&w.visitorIndex<R.length){let[M,T]=R[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===R.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=M;try{return T(C.toProxy(),this.helpers)}catch(D){throw this.handleError(D,C)}}if(w.iterator!==0){let M=w.iterator,T;for(;T=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!T[e]){T[e]=!0,b.push(g(T));return}w.iterator=0,delete C.indexes[M]}let O=w.events;for(;w.eventIndex<O.length;){let M=O[w.eventIndex];if(w.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[e]=!0,w.iterator=C.getIterator());return}else if(this.listeners[M]){w.visitors=this.listeners[M];return}}b.pop()}walkSync(b){b[e]=!0;let w=u(b);for(let C of w)if(C===n)b.nodes&&b.each(R=>{R[e]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,b.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return v.registerPostcss=E=>{y=E},Er=v,v.default=v,d.registerLazyResult(v),c.registerLazyResult(v),Er}var xr,mi;function ia(){if(mi)return xr;mi=1;let e=Qi(),t=gt(),s=Zi(),a=ns(),r=rs();class c{constructor(m,l,d){l=l.toString(),this.stringified=!1,this._processor=m,this._css=l,this._opts=d,this._map=void 0;let i,h=t;this.result=new r(this._processor,i,this._opts),this.result.css=l;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let n=new e(h,i,this._opts,l);if(n.isMap()){let[p,u]=n.generate();p&&(this.result.css=p),u&&(this.result.map=u)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(m){return this.async().catch(m)}finally(m){return this.async().then(m,m)}sync(){if(this.error)throw this.error;return this.result}then(m,l){return this.async().then(m,l)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let m,l=a;try{m=l(this._css,this._opts)}catch(d){this.error=d}if(this.error)throw this.error;return this._root=m,m}get[Symbol.toStringTag](){return"NoWorkResult"}}return xr=c,c.default=c,xr}var Rr,gi;function na(){if(gi)return Rr;gi=1;let e=ia(),t=tn(),s=ts(),a=qe();class r{constructor(f=[]){this.version="8.4.38",this.plugins=this.normalize(f)}normalize(f){let m=[];for(let l of f)if(l.postcss===!0?l=l():l.postcss&&(l=l.postcss),typeof l=="object"&&Array.isArray(l.plugins))m=m.concat(l.plugins);else if(typeof l=="object"&&l.postcssPlugin)m.push(l);else if(typeof l=="function")m.push(l);else if(!(typeof l=="object"&&(l.parse||l.stringify)))throw new Error(l+" is not a PostCSS plugin");return m}process(f,m={}){return!this.plugins.length&&!m.parser&&!m.stringifier&&!m.syntax?new e(this,f,m):new t(this,f,m)}use(f){return this.plugins=this.plugins.concat(this.normalize([f])),this}}return Rr=r,r.default=r,a.registerProcessor(r),s.registerProcessor(r),Rr}var Mr,yi;function oa(){if(yi)return Mr;yi=1;let e=wt(),t=Xi(),s=vt(),a=ss(),r=bt(),c=qe(),f=is();function m(l,d){if(Array.isArray(l))return l.map(o=>m(o));let{inputs:i,...h}=l;if(i){d=[];for(let o of i){let n={...o,__proto__:r.prototype};n.map&&(n.map={...n.map,__proto__:t.prototype}),d.push(n)}}if(h.nodes&&(h.nodes=l.nodes.map(o=>m(o,d))),h.source){let{inputId:o,...n}=h.source;h.source=n,o!=null&&(h.source.input=d[o])}if(h.type==="root")return new c(h);if(h.type==="decl")return new e(h);if(h.type==="rule")return new f(h);if(h.type==="comment")return new s(h);if(h.type==="atrule")return new a(h);throw new Error("Unknown node type: "+l.type)}return Mr=m,m.default=m,Mr}var Nr,wi;function aa(){if(wi)return Nr;wi=1;let e=Kr(),t=wt(),s=tn(),a=Re(),r=na(),c=gt(),f=oa(),m=ts(),l=Ki(),d=vt(),i=ss(),h=rs(),o=bt(),n=ns(),p=en(),u=is(),g=qe(),S=yt();function y(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new r(v)}return y.plugin=function(E,b){let w=!1;function C(...O){console&&console.warn&&!w&&(w=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
50
50
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(E+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
51
|
-
https://www.w3ctech.com/topic/2226`));let M=
|
|
51
|
+
https://www.w3ctech.com/topic/2226`));let M=b(...O);return M.postcssPlugin=E,M.postcssVersion=new r().version,M}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(O,M,T){return y([C(T)]).process(O,M)},C},y.stringify=c,y.parse=n,y.fromJSON=f,y.list=p,y.comment=v=>new d(v),y.atRule=v=>new i(v),y.decl=v=>new t(v),y.rule=v=>new u(v),y.root=v=>new g(v),y.document=v=>new m(v),y.CssSyntaxError=e,y.Declaration=t,y.Container=a,y.Processor=r,y.Document=m,y.Comment=d,y.Warning=l,y.AtRule=i,y.Result=h,y.Input=o,y.Rule=u,y.Root=g,y.Node=S,s.registerPostcss(y),Nr=y,y.default=y,Nr}var la=aa(),V=Xo(la);V.stringify;V.fromJSON;V.plugin;V.parse;V.list;V.document;V.comment;V.atRule;V.rule;V.decl;V.root;V.CssSyntaxError;V.Declaration;V.Container;V.Processor;V.Document;V.Comment;V.Warning;V.AtRule;V.Result;V.Input;V.Rule;V.Root;V.Node;var _r=class e{constructor(...t){le(this,"parentElement",null),le(this,"parentNode",null),le(this,"ownerDocument"),le(this,"firstChild",null),le(this,"lastChild",null),le(this,"previousSibling",null),le(this,"nextSibling",null),le(this,"ELEMENT_NODE",1),le(this,"TEXT_NODE",3),le(this,"nodeType"),le(this,"nodeName"),le(this,"RRNodeType")}get childNodes(){let t=[],s=this.firstChild;for(;s;)t.push(s),s=s.nextSibling;return t}contains(t){if(t instanceof e){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,s){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};var bi={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},vi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Qe={},rn={},ua=()=>!!globalThis.Zone;function os(e){if(Qe[e])return Qe[e];let t=globalThis[e],s=t.prototype,a=e in bi?bi[e]:void 0,r=!!(a&&a.every(m=>{var l,d;return!!((d=(l=Object.getOwnPropertyDescriptor(s,m))==null?void 0:l.get)!=null&&d.toString().includes("[native code]"))})),c=e in vi?vi[e]:void 0,f=!!(c&&c.every(m=>{var l;return typeof s[m]=="function"&&((l=s[m])==null?void 0:l.toString().includes("[native code]"))}));if(r&&f&&!ua())return Qe[e]=t.prototype,t.prototype;try{let m=document.createElement("iframe");m.style.display="none",document.body.appendChild(m);let l=m.contentWindow;if(!l)return t.prototype;let d=l[e].prototype;if(!d)return m.remove(),s;let i=navigator.userAgent;return i.includes("Safari")&&!i.includes("Chrome")?(m.classList.add("rr-block"),m.setAttribute("__rrwebUntaintedMutationObserver",""),rn[e]=()=>m.remove()):m.remove(),Qe[e]=d}catch{return s}}var Or={};function oe(e,t,s){var a,r;let c=(a=Or[e])==null?void 0:a[s];if(c)return c.call(t);let f=os(e),m=(r=Object.getOwnPropertyDescriptor(f,s))==null?void 0:r.get;return m?((Or[e]||(Or[e]={}))[s]=m,m.call(t)):t[s]}var Ir={};function sn(e,t,s){let a=`${e}.${String(s)}`;if(Ir[a])return Ir[a].bind(t);let c=os(e)[s];return typeof c!="function"?t[s]:(Ir[a]=c,c.bind(t))}function ca(e){return oe("Node",e,"ownerDocument")}function ha(e){return oe("Node",e,"childNodes")}function fa(e){return oe("Node",e,"parentNode")}function da(e){return oe("Node",e,"parentElement")}function pa(e){return oe("Node",e,"textContent")}function ma(e){return oe("Node",e,"firstChild")}function ga(e){return oe("Node",e,"lastChild")}function ya(e){return oe("Node",e,"nextSibling")}function wa(e){return oe("Node",e,"previousSibling")}function ba(e,t){return sn("Node",e,"contains")(t)}function va(e){return sn("Node",e,"getRootNode")()}function Sa(e){return!e||!("host"in e)?null:oe("ShadowRoot",e,"host")}function Ca(e){return e.styleSheets}function Ea(e){return!e||!("shadowRoot"in e)?null:oe("Element",e,"shadowRoot")}function xa(e,t){return oe("Element",e,"querySelector")(t)}function Ra(e,t){return oe("Element",e,"querySelectorAll")(t)}function nn(){return[os("MutationObserver").constructor,rn.MutationObserver??(()=>{})]}var $e=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||($e=()=>new Date().getTime());function Me(e,t,s){try{if(!(t in e))return()=>{};let a=e[t],r=s(a);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:a}})),e[t]=r,()=>{e[t]=a}}catch{return()=>{}}}var _={ownerDocument:ca,childNodes:ha,parentNode:fa,parentElement:da,textContent:pa,firstChild:ma,lastChild:ga,nextSibling:ya,previousSibling:wa,contains:ba,getRootNode:va,host:Sa,styleSheets:Ca,shadowRoot:Ea,querySelector:xa,querySelectorAll:Ra,nowTimestamp:$e,mutationObserverCtor:nn,patch:Me};function ee(e,t,s=document){let a={capture:!0,passive:!0};return s.addEventListener(e,t,a),()=>s.removeEventListener(e,t,a)}var Oe=`Please stop import mirror directly. Instead of that,\r
|
|
52
52
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
53
|
-
or you can use record.mirror to access the mirror instance during recording.`,Si={map:{},getId(){return console.error(Ne),-1},getNode(){return console.error(Ne),null},removeNodeFromMap(){console.error(Ne)},has(){return console.error(Ne),!1},reset(){console.error(Ne)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Si=new Proxy(Si,{get(e,t,s){return t==="map"&&console.error(Ne),Reflect.get(e,t,s)}}));function $e(e,t,s={}){let a=null,r=0;return function(...c){let f=Date.now();!r&&s.leading===!1&&(r=f);let m=t-(f-r),l=this;m<=0||m>t?(a&&(clearTimeout(a),a=null),r=f,e.apply(l,c)):!a&&s.trailing!==!1&&(a=setTimeout(()=>{r=s.leading===!1?0:Date.now(),a=null,e.apply(l,c)},m))}}function St(e,t,s,a,r=window){let c=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,a?s:{set(f){setTimeout(()=>{s.set.call(this,f)},0),c&&c.set&&c.set.call(this,f)}}),()=>St(e,t,c||{},!0)}function on(e){var t,s,a,r;let c=e.document;return{left:c.scrollingElement?c.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:c.documentElement.scrollLeft||c?.body&&((t=_.parentElement(c.body))==null?void 0:t.scrollLeft)||((s=c?.body)==null?void 0:s.scrollLeft)||0,top:c.scrollingElement?c.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:c?.documentElement.scrollTop||c?.body&&((a=_.parentElement(c.body))==null?void 0:a.scrollTop)||((r=c?.body)==null?void 0:r.scrollTop)||0}}function an(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ln(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function un(e){return e?e.nodeType===e.ELEMENT_NODE?e:_.parentElement(e):null}function te(e,t,s,a){if(!e)return!1;let r=un(e);if(!r)return!1;try{if(typeof t=="string"){if(r.classList.contains(t)||a&&r.closest("."+t)!==null)return!0}else if(at(r,t,a))return!0}catch{}return!!(s&&(r.matches(s)||a&&r.closest(s)!==null))}function Ma(e,t){return t.getId(e)!==-1}function Ar(e,t,s){return e.tagName==="TITLE"&&s.headTitleMutations?!0:t.getId(e)===ot}function cn(e,t){if(Le(e))return!1;let s=t.getId(e);if(!t.has(s))return!0;let a=_.parentNode(e);return a&&a.nodeType===e.DOCUMENT_NODE?!1:a?cn(a,t):!0}function kr(e){return!!e.changedTouches}function Na(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function hn(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function fn(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Pr(e){return e?e instanceof _r&&"shadowRoot"in e?!!e.shadowRoot:!!_.shadowRoot(e):!1}var Lr=class{constructor(){I(this,"id",1),I(this,"styleIDMap",new WeakMap),I(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,s){if(this.has(t))return this.getId(t);let a;return s===void 0?a=this.id++:a=s,this.styleIDMap.set(t,a),this.idStyleMap.set(a,t),a}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function dn(e){var t;let s=null;return"getRootNode"in e&&((t=_.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&_.host(_.getRootNode(e))&&(s=_.host(_.getRootNode(e))),s}function Oa(e){let t=e,s;for(;s=dn(t);)t=s;return t}function Ia(e){let t=_.ownerDocument(e);if(!t)return!1;let s=Oa(e);return _.contains(t,s)}function pn(e){let t=_.ownerDocument(e);return t?_.contains(t,e)||Ia(e):!1}var L=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e))(L||{}),k=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(k||{}),re=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(re||{}),ge=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ge||{}),Te=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Te||{}),Oe=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Oe||{});var mn=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(mn||{}),Ci=(e,t)=>`${e}@${t}`,Fr=class{constructor(){I(this,"frozen",!1),I(this,"locked",!1),I(this,"texts",[]),I(this,"attributes",[]),I(this,"attributeMap",new WeakMap),I(this,"removes",[]),I(this,"mapRemoves",[]),I(this,"movedMap",{}),I(this,"addedSet",new Set),I(this,"movedSet",new Set),I(this,"droppedSet",new Set),I(this,"removesSubTreeCache",new Set),I(this,"mutationCb"),I(this,"blockClass"),I(this,"blockSelector"),I(this,"maskTextClass"),I(this,"maskTextSelector"),I(this,"inlineStylesheet"),I(this,"maskInputOptions"),I(this,"maskTextFn"),I(this,"maskInputFn"),I(this,"keepIframeSrcFn"),I(this,"recordCanvas"),I(this,"inlineImages"),I(this,"slimDOMOptions"),I(this,"dataURLOptions"),I(this,"doc"),I(this,"mirror"),I(this,"iframeManager"),I(this,"stylesheetManager"),I(this,"shadowDomManager"),I(this,"canvasManager"),I(this,"processedNodeManager"),I(this,"unattachedDoc"),I(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),I(this,"emit",()=>{if(this.frozen||this.locked)return;let t=[],s=new Set;for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let o of this.movedSet){let n=_.parentNode(o);this.removesSubTreeCache.has(n)&&!this.movedSet.has(n)||this.addedSet.add(o)}let a=null,r=null,c=-1,f=null,m=!1,l=new Set,p=this.addedSet.values(),i=p.next();for(;this.addedSet.size;){if(a!==null&&this.addedSet.has(_.previousSibling(a)))f=a,a=_.previousSibling(a);else{for(this.addedSet.has(i.value)||(i=p.next()),a=i.value;;){if(r=_.parentNode(a),this.addedSet.has(r)){a=r;continue}break}if(l.has(r))r=null;else if(r){if(pn(r)?(m=Ei(this.droppedSet,r)||this.removesSubTreeCache.has(r),m&&Ei(this.movedSet,a)&&(m=!1)):m=!0,this.addedSet.has(_.lastChild(r)))a=_.lastChild(r),f=null;else for(;;){if(f=_.nextSibling(a),this.addedSet.has(f)){a=f;continue}break}if(c=Le(r)?this.mirror.getId(dn(a)):this.mirror.getId(r),c===-1&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let u=_.host(r);c=this.mirror.getId(u)}}}if(this.addedSet.delete(a),!r||c===-1){l.add(a);continue}else if(m){this.droppedSet.add(a);continue}let o=!1;if(a.nodeType===Node.TEXT_NODE){let u=r.tagName;if(u==="TEXTAREA")continue;u==="STYLE"&&s.has(c)&&(o=!0)}let n=f?this.mirror.getId(f):null;for(;n===ot;)f=f&&_.nextSibling(f),n=f&&this.mirror.getId(f);if(n===-1){console.warn("Couldn't record new node. Couldn't find mirror id for nextSibling:",f),a=null;continue}let d=Ae(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:u=>{hn(u,this.mirror)&&this.iframeManager.addIframe(u),fn(u,this.mirror)&&this.stylesheetManager.trackLinkElement(u),Pr(a)&&this.shadowDomManager.addShadowRoot(_.shadowRoot(a),this.doc)},onIframeLoad:(u,g)=>{this.iframeManager.attachIframe(u,g),this.shadowDomManager.observeAttachShadow(u)},onStylesheetLoad:(u,g)=>{this.stylesheetManager.attachLinkElement(u,g)},cssCaptured:o});d&&(t.push({parentId:c,nextId:n,node:d}),s.add(d.id))}let h={texts:this.texts.map(o=>{let n=o.node,d=_.parentNode(n);return d&&d.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(d),{id:this.mirror.getId(n),value:o.value}}).filter(o=>!s.has(o.id)).filter(o=>this.mirror.has(o.id)),attributes:this.attributes.map(o=>{let{attributes:n}=o;if(typeof n.style=="string"){let d=JSON.stringify(o.styleDiff),u=JSON.stringify(o._unchangedStyles);d.length<n.style.length&&(d+u).split("var(").length===n.style.split("var(").length&&(n.style=o.styleDiff)}return{id:this.mirror.getId(o.node),attributes:n}}).filter(o=>!s.has(o.id)).filter(o=>this.mirror.has(o.id)),removes:this.removes,adds:t};!h.texts.length&&!h.attributes.length&&!h.removes.length&&!h.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(h))}),I(this,"genTextAreaValueMutation",t=>{let s=this.attributeMap.get(t);s||(s={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t,s));let a=Array.from(_.childNodes(t),r=>_.textContent(r)||"").join("");s.attributes.value=st({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:it(t),value:a,maskInputFn:this.maskInputFn})}),I(this,"processMutation",t=>{if(!Ar(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{let s=_.textContent(t.target);!te(t.target,this.blockClass,this.blockSelector,!1)&&s!==t.oldValue&&this.texts.push({value:$i(t.target,this.maskTextClass,this.maskTextSelector,!0)&&s?this.maskTextFn?this.maskTextFn(s,un(t.target)):s.replace(/[\S]/g,"*"):s,node:t.target});break}case"attributes":{let s=t.target,a=ve(s.tagName),r=t.attributeName,c=t.target.getAttribute(r);if(r==="value"){let m=it(s);c=st({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:m,value:c,maskInputFn:this.maskInputFn})}if(te(t.target,this.blockClass,this.blockSelector,!1)||c===t.oldValue)return;let f=this.attributeMap.get(t.target);if(a==="iframe"&&r==="src"&&!this.keepIframeSrcFn(c))if(!s.contentDocument)r="rr_src";else return;if(f||(f={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(f),this.attributeMap.set(t.target,f)),r==="type"&&a==="input"&&(t.oldValue||"").toLowerCase()==="password"&&s.setAttribute("data-rr-is-password","true"),!Bi(a,r))if(f.attributes[r]=Ui(this.doc,a,ve(r),c),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let m=this.unattachedDoc.createElement("span");t.oldValue&&m.setAttribute("style",t.oldValue);for(let l of Array.from(s.style)){let p=s.style.getPropertyValue(l),i=s.style.getPropertyPriority(l);p!==m.style.getPropertyValue(l)||i!==m.style.getPropertyPriority(l)?i===""?f.styleDiff[l]=p:f.styleDiff[l]=[p,i]:f._unchangedStyles[l]=[p,i]}for(let l of Array.from(m.style))s.style.getPropertyValue(l)===""&&(f.styleDiff[l]=!1)}else r==="open"&&s.tagName==="DIALOG"&&(s.matches("dialog:modal")?f.attributes.rr_open_mode="modal":f.attributes.rr_open_mode="non-modal");break}case"childList":{if(te(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(s=>this.genAdds(s,t.target)),t.removedNodes.forEach(s=>{let a=this.mirror.getId(s),r=Le(t.target)?this.mirror.getId(_.host(t.target)):this.mirror.getId(t.target);te(t.target,this.blockClass,this.blockSelector,!1)||Ar(s,this.mirror,this.slimDOMOptions)||!Ma(s,this.mirror)||(this.addedSet.has(s)?(Ur(this.addedSet,s),this.droppedSet.add(s)):this.addedSet.has(t.target)&&a===-1||cn(t.target,this.mirror)||(this.movedSet.has(s)&&this.movedMap[Ci(a,r)]?Ur(this.movedSet,s):(this.removes.push({parentId:r,id:a,isShadow:Le(t.target)&&Fe(t.target)?!0:void 0}),Aa(s,this.removesSubTreeCache))),this.mapRemoves.push(s))});break}}}),I(this,"genAdds",(t,s)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Ar(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let a=null;s&&this.mirror.hasNode(s)&&(a=this.mirror.getId(s)),a&&a!==-1&&(this.movedMap[Ci(this.mirror.getId(t),a)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);te(t,this.blockClass,this.blockSelector,!1)||(_.childNodes(t).forEach(a=>this.genAdds(a)),Pr(t)&&_.childNodes(_.shadowRoot(t)).forEach(a=>{this.processedNodeManager.add(a,this),this.genAdds(a,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(s=>{this[s]=t[s]})}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 Ur(e,t){e.delete(t),_.childNodes(t).forEach(s=>Ur(e,s))}function Aa(e,t){let s=[e];for(;s.length;){let a=s.pop();t.has(a)||(t.add(a),_.childNodes(a).forEach(r=>s.push(r)))}}function Ei(e,t){return e.size===0?!1:gn(e,t)}function gn(e,t){if(e.has(t))return!0;let s=_.parentNode(t);return s?gn(e,s):!1}var Ue;function Da(e){Ue=e}function Ta(){Ue=void 0}var P=e=>Ue?(...s)=>{try{return e(...s)}catch(a){if(Ue&&Ue(a)===!0)return;throw a}}:e,Ce=[];function qe(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function yn(e,t){let s=new Fr;Ce.push(s),s.init(e);let[a,r]=nn(),c=new a(P(s.processMutations.bind(s)));return c.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[c,r]}function _a({mousemoveCb:e,sampling:t,doc:s,mirror:a}){if(t.mousemove===!1)return()=>{};let r=typeof t.mousemove=="number"?t.mousemove:50,c=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,f=[],m,l=$e(P(h=>{let o=Date.now()-m;e(f.map(n=>(n.timeOffset-=o,n)),h),f=[],m=null}),c),p=P($e(P(h=>{let o=qe(h),{clientX:n,clientY:d}=kr(h)?h.changedTouches[0]:h;m||(m=Be()),f.push({x:n,y:d,id:a.getId(o),timeOffset:Be()-m}),l(typeof DragEvent<"u"&&h instanceof DragEvent?k.Drag:h instanceof MouseEvent?k.MouseMove:k.TouchMove)}),r,{trailing:!1})),i=[ee("mousemove",p,s),ee("touchmove",p,s),ee("drag",p,s)];return P(()=>{i.forEach(h=>h())})}function ka({mouseInteractionCb:e,doc:t,mirror:s,blockClass:a,blockSelector:r,sampling:c}){if(c.mouseInteraction===!1)return()=>{};let f=c.mouseInteraction===!0||c.mouseInteraction===void 0?{}:c.mouseInteraction,m=[],l=null,p=i=>h=>{let o=qe(h);if(te(o,a,r,!0))return;let n=null,d=i;if("pointerType"in h){switch(h.pointerType){case"mouse":n=ge.Mouse;break;case"touch":n=ge.Touch;break;case"pen":n=ge.Pen;break}n===ge.Touch?re[i]===re.MouseDown?d="TouchStart":re[i]===re.MouseUp&&(d="TouchEnd"):ge.Pen}else kr(h)&&(n=ge.Touch);n!==null?(l=n,(d.startsWith("Touch")&&n===ge.Touch||d.startsWith("Mouse")&&n===ge.Mouse)&&(n=null)):re[i]===re.Click&&(n=l,l=null);let u=kr(h)?h.changedTouches[0]:h;if(!u)return;let g=s.getId(o),{clientX:S,clientY:b}=u;P(e)({type:re[d],id:g,x:S,y:b,...n!==null&&{pointerType:n}})};return Object.keys(re).filter(i=>Number.isNaN(Number(i))&&!i.endsWith("_Departed")&&f[i]!==!1).forEach(i=>{let h=ve(i),o=p(i);if(window.PointerEvent)switch(re[i]){case re.MouseDown:case re.MouseUp:h=h.replace("mouse","pointer");break;case re.TouchStart:case re.TouchEnd:return}m.push(ee(h,o,t))}),P(()=>{m.forEach(i=>i())})}function wn({scrollCb:e,doc:t,mirror:s,blockClass:a,blockSelector:r,sampling:c}){let f=P($e(P(m=>{let l=qe(m);if(!l||te(l,a,r,!0))return;let p=s.getId(l);if(l===t&&t.defaultView){let i=on(t.defaultView);e({id:p,x:i.left,y:i.top})}else e({id:p,x:l.scrollLeft,y:l.scrollTop})}),c.scroll||100));return ee("scroll",f,t)}function Pa({viewportResizeCb:e},{win:t}){let s=-1,a=-1,r=P($e(P(()=>{let c=an(),f=ln();(s!==c||a!==f)&&(e({width:Number(f),height:Number(c)}),s=c,a=f)}),200));return ee("resize",r,t)}var La=["INPUT","TEXTAREA","SELECT"],xi=new WeakMap;function Fa({inputCb:e,doc:t,mirror:s,blockClass:a,blockSelector:r,ignoreClass:c,ignoreSelector:f,maskInputOptions:m,maskInputFn:l,sampling:p,userTriggeredOnInput:i}){function h(b){let v=qe(b),E=b.isTrusted,y=v&&v.tagName;if(v&&y==="OPTION"&&(v=_.parentElement(v)),!v||!y||La.indexOf(y)<0||te(v,a,r,!0)||v.classList.contains(c)||f&&v.matches(f))return;let w=v.value,C=!1,R=it(v)||"";R==="radio"||R==="checkbox"?C=v.checked:(m[y.toLowerCase()]||m[R])&&(w=st({element:v,maskInputOptions:m,tagName:y,type:R,value:w,maskInputFn:l})),o(v,i?{text:w,isChecked:C,userTriggered:E}:{text:w,isChecked:C});let O=v.name;R==="radio"&&O&&C&&t.querySelectorAll(`input[type="radio"][name="${O}"]`).forEach(M=>{if(M!==v){let T=M.value;o(M,i?{text:T,isChecked:!C,userTriggered:!1}:{text:T,isChecked:!C})}})}function o(b,v){let E=xi.get(b);if(!E||E.text!==v.text||E.isChecked!==v.isChecked){xi.set(b,v);let y=s.getId(b);P(e)({...v,id:y})}}let d=(p.input==="last"?["change"]:["input","change"]).map(b=>ee(b,P(h),t)),u=t.defaultView;if(!u)return()=>{d.forEach(b=>b())};let g=u.Object.getOwnPropertyDescriptor(u.HTMLInputElement.prototype,"value"),S=[[u.HTMLInputElement.prototype,"value"],[u.HTMLInputElement.prototype,"checked"],[u.HTMLSelectElement.prototype,"value"],[u.HTMLTextAreaElement.prototype,"value"],[u.HTMLSelectElement.prototype,"selectedIndex"],[u.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&d.push(...S.map(b=>St(b[0],b[1],{set(){P(h)({target:this,isTrusted:!1})}},!1,u))),P(()=>{d.forEach(b=>b())})}function lt(e){let t=[];function s(a,r){if(Ze("CSSGroupingRule")&&a.parentRule instanceof CSSGroupingRule||Ze("CSSMediaRule")&&a.parentRule instanceof CSSMediaRule||Ze("CSSSupportsRule")&&a.parentRule instanceof CSSSupportsRule||Ze("CSSConditionRule")&&a.parentRule instanceof CSSConditionRule){let f=Array.from(a.parentRule.cssRules).indexOf(a);return r.unshift(f),s(a.parentRule,r)}else if(a.parentStyleSheet){let f=Array.from(a.parentStyleSheet.cssRules).indexOf(a);r.unshift(f)}return r}return s(e,t)}function be(e,t,s){let a,r;return e?(e.ownerNode?a=t.getId(e.ownerNode):r=s.getId(e),{styleId:r,id:a}):{}}function Ua({styleSheetRuleCb:e,mirror:t,stylesheetManager:s},{win:a}){if(!a.CSSStyleSheet||!a.CSSStyleSheet.prototype)return()=>{};let r=a.CSSStyleSheet.prototype.insertRule;a.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:P((i,h,o)=>{let[n,d]=o,{id:u,styleId:g}=be(h,t,s.styleMirror);return(u&&u!==-1||g&&g!==-1)&&e({id:u,styleId:g,adds:[{rule:n,index:d}]}),i.apply(h,o)})}),a.CSSStyleSheet.prototype.addRule=function(i,h,o=this.cssRules.length){let n=`${i} { ${h} }`;return a.CSSStyleSheet.prototype.insertRule.apply(this,[n,o])};let c=a.CSSStyleSheet.prototype.deleteRule;a.CSSStyleSheet.prototype.deleteRule=new Proxy(c,{apply:P((i,h,o)=>{let[n]=o,{id:d,styleId:u}=be(h,t,s.styleMirror);return(d&&d!==-1||u&&u!==-1)&&e({id:d,styleId:u,removes:[{index:n}]}),i.apply(h,o)})}),a.CSSStyleSheet.prototype.removeRule=function(i){return a.CSSStyleSheet.prototype.deleteRule.apply(this,[i])};let f;a.CSSStyleSheet.prototype.replace&&(f=a.CSSStyleSheet.prototype.replace,a.CSSStyleSheet.prototype.replace=new Proxy(f,{apply:P((i,h,o)=>{let[n]=o,{id:d,styleId:u}=be(h,t,s.styleMirror);return(d&&d!==-1||u&&u!==-1)&&e({id:d,styleId:u,replace:n}),i.apply(h,o)})}));let m;a.CSSStyleSheet.prototype.replaceSync&&(m=a.CSSStyleSheet.prototype.replaceSync,a.CSSStyleSheet.prototype.replaceSync=new Proxy(m,{apply:P((i,h,o)=>{let[n]=o,{id:d,styleId:u}=be(h,t,s.styleMirror);return(d&&d!==-1||u&&u!==-1)&&e({id:d,styleId:u,replaceSync:n}),i.apply(h,o)})}));let l={};Ke("CSSGroupingRule")?l.CSSGroupingRule=a.CSSGroupingRule:(Ke("CSSMediaRule")&&(l.CSSMediaRule=a.CSSMediaRule),Ke("CSSConditionRule")&&(l.CSSConditionRule=a.CSSConditionRule),Ke("CSSSupportsRule")&&(l.CSSSupportsRule=a.CSSSupportsRule));let p={};return Object.entries(l).forEach(([i,h])=>{p[i]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(p[i].insertRule,{apply:P((o,n,d)=>{let[u,g]=d,{id:S,styleId:b}=be(n.parentStyleSheet,t,s.styleMirror);return(S&&S!==-1||b&&b!==-1)&&e({id:S,styleId:b,adds:[{rule:u,index:[...lt(n),g||0]}]}),o.apply(n,d)})}),h.prototype.deleteRule=new Proxy(p[i].deleteRule,{apply:P((o,n,d)=>{let[u]=d,{id:g,styleId:S}=be(n.parentStyleSheet,t,s.styleMirror);return(g&&g!==-1||S&&S!==-1)&&e({id:g,styleId:S,removes:[{index:[...lt(n),u]}]}),o.apply(n,d)})})}),P(()=>{a.CSSStyleSheet.prototype.insertRule=r,a.CSSStyleSheet.prototype.deleteRule=c,f&&(a.CSSStyleSheet.prototype.replace=f),m&&(a.CSSStyleSheet.prototype.replaceSync=m),Object.entries(l).forEach(([i,h])=>{h.prototype.insertRule=p[i].insertRule,h.prototype.deleteRule=p[i].deleteRule})})}function bn({mirror:e,stylesheetManager:t},s){var a,r,c;let f=null;s.nodeName==="#document"?f=e.getId(s):f=e.getId(_.host(s));let m=s.nodeName==="#document"?(a=s.defaultView)==null?void 0:a.Document:(c=(r=s.ownerDocument)==null?void 0:r.defaultView)==null?void 0:c.ShadowRoot,l=m?.prototype?Object.getOwnPropertyDescriptor(m?.prototype,"adoptedStyleSheets"):void 0;return f===null||f===-1||!m||!l?()=>{}:(Object.defineProperty(s,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var p;return(p=l.get)==null?void 0:p.call(this)},set(p){var i;let h=(i=l.set)==null?void 0:i.call(this,p);if(f!==null&&f!==-1)try{t.adoptStyleSheets(p,f)}catch{}return h}}),P(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function Ba({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:a},{win:r}){let c=r.CSSStyleDeclaration.prototype.setProperty;r.CSSStyleDeclaration.prototype.setProperty=new Proxy(c,{apply:P((m,l,p)=>{var i;let[h,o,n]=p;if(s.has(h))return c.apply(l,[h,o,n]);let{id:d,styleId:u}=be((i=l.parentRule)==null?void 0:i.parentStyleSheet,t,a.styleMirror);return(d&&d!==-1||u&&u!==-1)&&e({id:d,styleId:u,set:{property:h,value:o,priority:n},index:lt(l.parentRule)}),m.apply(l,p)})});let f=r.CSSStyleDeclaration.prototype.removeProperty;return r.CSSStyleDeclaration.prototype.removeProperty=new Proxy(f,{apply:P((m,l,p)=>{var i;let[h]=p;if(s.has(h))return f.apply(l,[h]);let{id:o,styleId:n}=be((i=l.parentRule)==null?void 0:i.parentStyleSheet,t,a.styleMirror);return(o&&o!==-1||n&&n!==-1)&&e({id:o,styleId:n,remove:{property:h},index:lt(l.parentRule)}),m.apply(l,p)})}),P(()=>{r.CSSStyleDeclaration.prototype.setProperty=c,r.CSSStyleDeclaration.prototype.removeProperty=f})}function $a({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:a,sampling:r,doc:c}){let f=P(l=>$e(P(p=>{let i=qe(p);if(!i||te(i,t,s,!0))return;let{currentTime:h,volume:o,muted:n,playbackRate:d,loop:u}=i;e({type:l,id:a.getId(i),currentTime:h,volume:o,muted:n,playbackRate:d,loop:u})}),r.media||500)),m=[ee("play",f(Oe.Play),c),ee("pause",f(Oe.Pause),c),ee("seeked",f(Oe.Seeked),c),ee("volumechange",f(Oe.VolumeChange),c),ee("ratechange",f(Oe.RateChange),c)];return P(()=>{m.forEach(l=>l())})}function Wa({fontCb:e,doc:t}){let s=t.defaultView;if(!s)return()=>{};let a=[],r=new WeakMap,c=s.FontFace;s.FontFace=function(l,p,i){let h=new c(l,p,i);return r.set(h,{family:l,buffer:typeof p!="string",descriptors:i,fontSource:typeof p=="string"?p:JSON.stringify(Array.from(new Uint8Array(p)))}),h};let f=Re(t.fonts,"add",function(m){return function(l){return setTimeout(P(()=>{let p=r.get(l);p&&(e(p),r.delete(l))}),0),m.apply(this,[l])}});return a.push(()=>{s.FontFace=c}),a.push(f),P(()=>{a.forEach(m=>m())})}function za(e){let{doc:t,mirror:s,blockClass:a,blockSelector:r,selectionCb:c}=e,f=!0,m=P(()=>{let l=t.getSelection();if(!l||f&&l?.isCollapsed)return;f=l.isCollapsed||!1;let p=[],i=l.rangeCount||0;for(let h=0;h<i;h++){let o=l.getRangeAt(h),{startContainer:n,startOffset:d,endContainer:u,endOffset:g}=o;te(n,a,r,!0)||te(u,a,r,!0)||p.push({start:s.getId(n),startOffset:d,end:s.getId(u),endOffset:g})}c({ranges:p})});return m(),ee("selectionchange",m)}function qa({doc:e,customElementCb:t}){let s=e.defaultView;return!s||!s.customElements?()=>{}:Re(s.customElements,"define",function(r){return function(c,f,m){try{t({define:{name:c}})}catch{console.warn(`Custom element callback failed for ${c}`)}return r.apply(this,[c,f,m])}})}function Va(e,t){let{mutationCb:s,mousemoveCb:a,mouseInteractionCb:r,scrollCb:c,viewportResizeCb:f,inputCb:m,mediaInteractionCb:l,styleSheetRuleCb:p,styleDeclarationCb:i,canvasMutationCb:h,fontCb:o,selectionCb:n,customElementCb:d}=e;e.mutationCb=(...u)=>{t.mutation&&t.mutation(...u),s(...u)},e.mousemoveCb=(...u)=>{t.mousemove&&t.mousemove(...u),a(...u)},e.mouseInteractionCb=(...u)=>{t.mouseInteraction&&t.mouseInteraction(...u),r(...u)},e.scrollCb=(...u)=>{t.scroll&&t.scroll(...u),c(...u)},e.viewportResizeCb=(...u)=>{t.viewportResize&&t.viewportResize(...u),f(...u)},e.inputCb=(...u)=>{t.input&&t.input(...u),m(...u)},e.mediaInteractionCb=(...u)=>{t.mediaInteaction&&t.mediaInteaction(...u),l(...u)},e.styleSheetRuleCb=(...u)=>{t.styleSheetRule&&t.styleSheetRule(...u),p(...u)},e.styleDeclarationCb=(...u)=>{t.styleDeclaration&&t.styleDeclaration(...u),i(...u)},e.canvasMutationCb=(...u)=>{t.canvasMutation&&t.canvasMutation(...u),h(...u)},e.fontCb=(...u)=>{t.font&&t.font(...u),o(...u)},e.selectionCb=(...u)=>{t.selection&&t.selection(...u),n(...u)},e.customElementCb=(...u)=>{t.customElement&&t.customElement(...u),d(...u)}}function ja(e,t={}){let s=e.doc.defaultView;if(!s)return()=>{};Va(e,t);let a,r=()=>{};e.recordDOM&&([a,r]=yn(e,e.doc));let c=_a(e),f=ka(e),m=wn(e),l=Pa(e,{win:s}),p=Fa(e),i=$a(e),h=()=>{},o=()=>{},n=()=>{},d=()=>{};e.recordDOM&&(h=Ua(e,{win:s}),o=bn(e,e.doc),n=Ba(e,{win:s}),e.collectFonts&&(d=Wa(e)));let u=za(e),g=qa(e),S=[];for(let b of e.plugins)S.push(b.observer(b.callback,s,b.options));return P(()=>{Ce.forEach(b=>b.reset()),a?.disconnect(),r(),c(),f(),m(),l(),p(),i(),h(),o(),n(),d(),u(),g(),S.forEach(b=>b())})}function Ze(e){return typeof window[e]<"u"}function Ke(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var ut=class{constructor(t){I(this,"iframeIdToRemoteIdMap",new WeakMap),I(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,s,a,r){let c=a||this.getIdToRemoteIdMap(t),f=r||this.getRemoteIdToIdMap(t),m=c.get(s);return m||(m=this.generateIdFn(),c.set(s,m),f.set(m,s)),m}getIds(t,s){let a=this.getIdToRemoteIdMap(t),r=this.getRemoteIdToIdMap(t);return s.map(c=>this.getId(t,c,a,r))}getRemoteId(t,s,a){let r=a||this.getRemoteIdToIdMap(t);if(typeof s!="number")return s;let c=r.get(s);return c||-1}getRemoteIds(t,s){let a=this.getRemoteIdToIdMap(t);return s.map(r=>this.getRemoteId(t,r,a))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let s=this.iframeIdToRemoteIdMap.get(t);return s||(s=new Map,this.iframeIdToRemoteIdMap.set(t,s)),s}getRemoteIdToIdMap(t){let s=this.iframeRemoteIdToIdMap.get(t);return s||(s=new Map,this.iframeRemoteIdToIdMap.set(t,s)),s}},Br=class{constructor(t){I(this,"iframes",new WeakMap),I(this,"crossOriginIframeMap",new WeakMap),I(this,"crossOriginIframeMirror",new ut(Fi)),I(this,"crossOriginIframeStyleMirror"),I(this,"crossOriginIframeRootIdMap",new WeakMap),I(this,"mirror"),I(this,"mutationCb"),I(this,"wrappedEmit"),I(this,"loadListener"),I(this,"stylesheetManager"),I(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ut(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,s){var a,r;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:s}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((a=t.contentWindow)==null||a.addEventListener("message",this.handleMessage.bind(this))),(r=this.loadListener)==null||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){let s=t;if(s.data.type!=="rrweb"||s.origin!==s.data.origin||!t.source)return;let r=this.crossOriginIframeMap.get(t.source);if(!r)return;let c=this.transformCrossOriginEvent(r,s.data.event);c&&this.wrappedEmit(c,s.data.isCheckout)}transformCrossOriginEvent(t,s){var a;switch(s.type){case L.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(s.data.node,t);let r=s.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(s.data.node,r),{timestamp:s.timestamp,type:L.IncrementalSnapshot,data:{source:k.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:s.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case L.Meta:case L.Load:case L.DomContentLoaded:return!1;case L.Plugin:return s;case L.Custom:return this.replaceIds(s.data.payload,t,["id","parentId","previousId","nextId"]),s;case L.IncrementalSnapshot:switch(s.data.source){case k.Mutation:return s.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);let c=this.crossOriginIframeRootIdMap.get(t);c&&this.patchRootIdOnNode(r.node,c)}),s.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),s.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),s.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),s;case k.Drag:case k.TouchMove:case k.MouseMove:return s.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),s;case k.ViewportResize:return!1;case k.MediaInteraction:case k.MouseInteraction:case k.Scroll:case k.CanvasMutation:case k.Input:return this.replaceIds(s.data,t,["id"]),s;case k.StyleSheetRule:case k.StyleDeclaration:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleId"]),s;case k.Font:return s;case k.Selection:return s.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),s;case k.AdoptedStyleSheet:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleIds"]),(a=s.data.styles)==null||a.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),s}}return!1}replace(t,s,a,r){for(let c of r)!Array.isArray(s[c])&&typeof s[c]!="number"||(Array.isArray(s[c])?s[c]=t.getIds(a,s[c]):s[c]=t.getId(a,s[c]));return s}replaceIds(t,s,a){return this.replace(this.crossOriginIframeMirror,t,s,a)}replaceStyleIds(t,s,a){return this.replace(this.crossOriginIframeStyleMirror,t,s,a)}replaceIdOnNode(t,s){this.replaceIds(t,s,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(a=>{this.replaceIdOnNode(a,s)})}patchRootIdOnNode(t,s){t.type!==mn.Document&&!t.rootId&&(t.rootId=s),"childNodes"in t&&t.childNodes.forEach(a=>{this.patchRootIdOnNode(a,s)})}},$r=class{constructor(t){I(this,"shadowDoms",new WeakSet),I(this,"mutationCb"),I(this,"scrollCb"),I(this,"bypassOptions"),I(this,"mirror"),I(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,s){if(!Fe(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);let[a]=yn({...this.bypassOptions,doc:s,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>a.disconnect()),this.restoreHandlers.push(wn({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(_.host(t))),this.restoreHandlers.push(bn({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,s){let a=this;this.restoreHandlers.push(Re(t.prototype,"attachShadow",function(r){return function(c){let f=r.call(this,c),m=_.shadowRoot(this);return m&&pn(this)&&a.addShadowRoot(m,s),f}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},De="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ga=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Pe=0;Pe<De.length;Pe++)Ga[De.charCodeAt(Pe)]=Pe;var Pe,Ha=function(e){var t=new Uint8Array(e),s,a=t.length,r="";for(s=0;s<a;s+=3)r+=De[t[s]>>2],r+=De[(t[s]&3)<<4|t[s+1]>>4],r+=De[(t[s+1]&15)<<2|t[s+2]>>6],r+=De[t[s+2]&63];return a%3===2?r=r.substring(0,r.length-1)+"=":a%3===1&&(r=r.substring(0,r.length-2)+"=="),r};var Ri=new Map;function Ya(e,t){let s=Ri.get(e);return s||(s=new Map,Ri.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}var vn=(e,t,s)=>{if(!e||!(Cn(e,t)||typeof e=="object"))return;let a=e.constructor.name,r=Ya(s,a),c=r.indexOf(e);return c===-1&&(c=r.length,r.push(e)),c};function et(e,t,s){if(e instanceof Array)return e.map(a=>et(a,t,s));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let a=e.constructor.name,r=Ha(e);return{rr_type:a,base64:r}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[et(e.buffer,t,s),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let a=e.constructor.name,{src:r}=e;return{rr_type:a,src:r}}else if(e instanceof HTMLCanvasElement){let a="HTMLImageElement",r=e.toDataURL();return{rr_type:a,src:r}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[et(e.data,t,s),e.width,e.height]};if(Cn(e,t)||typeof e=="object"){let a=e.constructor.name,r=vn(e,t,s);return{rr_type:a,index:r}}}}return e}var Sn=(e,t,s)=>e.map(a=>et(a,t,s)),Cn=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof t[r]=="function").find(r=>e instanceof t[r]);function Ja(e,t,s,a){let r=[],c=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let f of c)try{if(typeof t.CanvasRenderingContext2D.prototype[f]!="function")continue;let m=Re(t.CanvasRenderingContext2D.prototype,f,function(l){return function(...p){return te(this.canvas,s,a,!0)||setTimeout(()=>{let i=Sn(p,t,this);e(this.canvas,{type:Te["2D"],property:f,args:i})},0),l.apply(this,p)}});r.push(m)}catch{let m=St(t.CanvasRenderingContext2D.prototype,f,{set(l){e(this.canvas,{type:Te["2D"],property:f,args:[l],setter:!0})}});r.push(m)}return()=>{r.forEach(f=>f())}}function Xa(e){return e==="experimental-webgl"?"webgl":e}function Mi(e,t,s,a){let r=[];try{let c=Re(e.HTMLCanvasElement.prototype,"getContext",function(f){return function(m,...l){if(!te(this,t,s,!0)){let p=Xa(m);if("__context"in this||(this.__context=p),a&&["webgl","webgl2"].includes(p))if(l[0]&&typeof l[0]=="object"){let i=l[0];i.preserveDrawingBuffer||(i.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return f.apply(this,[m,...l])}});r.push(c)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(c=>c())}}function Ni(e,t,s,a,r,c){let f=[],m=Object.getOwnPropertyNames(e);for(let l of m)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;let p=Re(e,l,function(i){return function(...h){let o=i.apply(this,h);if(vn(o,c,this),"tagName"in this.canvas&&!te(this.canvas,a,r,!0)){let n=Sn(h,c,this),d={type:t,property:l,args:n};s(this.canvas,d)}return o}});f.push(p)}catch{let p=St(e,l,{set(i){s(this.canvas,{type:t,property:l,args:[i],setter:!0})}});f.push(p)}return f}function Qa(e,t,s,a){let r=[];return typeof t.WebGLRenderingContext<"u"&&r.push(...Ni(t.WebGLRenderingContext.prototype,Te.WebGL,e,s,a,t)),typeof t.WebGL2RenderingContext<"u"&&r.push(...Ni(t.WebGL2RenderingContext.prototype,Te.WebGL2,e,s,a,t)),()=>{r.forEach(c=>c())}}var En=`(function() {
|
|
53
|
+
or you can use record.mirror to access the mirror instance during recording.`,Si={map:{},getId(){return console.error(Oe),-1},getNode(){return console.error(Oe),null},removeNodeFromMap(){console.error(Oe)},has(){return console.error(Oe),!1},reset(){console.error(Oe)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Si=new Proxy(Si,{get(e,t,s){return t==="map"&&console.error(Oe),Reflect.get(e,t,s)}}));function We(e,t,s={}){let a=null,r=0;return function(...c){let f=Date.now();!r&&s.leading===!1&&(r=f);let m=t-(f-r),l=this;m<=0||m>t?(a&&(clearTimeout(a),a=null),r=f,e.apply(l,c)):!a&&s.trailing!==!1&&(a=setTimeout(()=>{r=s.leading===!1?0:Date.now(),a=null,e.apply(l,c)},m))}}function St(e,t,s,a,r=window){let c=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,a?s:{set(f){setTimeout(()=>{s.set.call(this,f)},0),c&&c.set&&c.set.call(this,f)}}),()=>St(e,t,c||{},!0)}function on(e){var t,s,a,r;let c=e.document;return{left:c.scrollingElement?c.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:c.documentElement.scrollLeft||c?.body&&((t=_.parentElement(c.body))==null?void 0:t.scrollLeft)||((s=c?.body)==null?void 0:s.scrollLeft)||0,top:c.scrollingElement?c.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:c?.documentElement.scrollTop||c?.body&&((a=_.parentElement(c.body))==null?void 0:a.scrollTop)||((r=c?.body)==null?void 0:r.scrollTop)||0}}function an(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ln(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function un(e){return e?e.nodeType===e.ELEMENT_NODE?e:_.parentElement(e):null}function te(e,t,s,a){if(!e)return!1;let r=un(e);if(!r)return!1;try{if(typeof t=="string"){if(r.classList.contains(t)||a&&r.closest("."+t)!==null)return!0}else if(at(r,t,a))return!0}catch{}return!!(s&&(r.matches(s)||a&&r.closest(s)!==null))}function Ma(e,t){return t.getId(e)!==-1}function Dr(e,t,s){return e.tagName==="TITLE"&&s.headTitleMutations?!0:t.getId(e)===ot}function cn(e,t){if(Fe(e))return!1;let s=t.getId(e);if(!t.has(s))return!0;let a=_.parentNode(e);return a&&a.nodeType===e.DOCUMENT_NODE?!1:a?cn(a,t):!0}function kr(e){return!!e.changedTouches}function Na(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function hn(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function fn(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Pr(e){return e?e instanceof _r&&"shadowRoot"in e?!!e.shadowRoot:!!_.shadowRoot(e):!1}var Lr=class{constructor(){I(this,"id",1),I(this,"styleIDMap",new WeakMap),I(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,s){if(this.has(t))return this.getId(t);let a;return s===void 0?a=this.id++:a=s,this.styleIDMap.set(t,a),this.idStyleMap.set(a,t),a}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function dn(e){var t;let s=null;return"getRootNode"in e&&((t=_.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&_.host(_.getRootNode(e))&&(s=_.host(_.getRootNode(e))),s}function Oa(e){let t=e,s;for(;s=dn(t);)t=s;return t}function Ia(e){let t=_.ownerDocument(e);if(!t)return!1;let s=Oa(e);return _.contains(t,s)}function pn(e){let t=_.ownerDocument(e);return t?_.contains(t,e)||Ia(e):!1}var L=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e))(L||{}),k=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(k||{}),re=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(re||{}),ge=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ge||{}),_e=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(_e||{}),Ie=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Ie||{});var mn=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(mn||{}),Ci=(e,t)=>`${e}@${t}`,Fr=class{constructor(){I(this,"frozen",!1),I(this,"locked",!1),I(this,"texts",[]),I(this,"attributes",[]),I(this,"attributeMap",new WeakMap),I(this,"removes",[]),I(this,"mapRemoves",[]),I(this,"movedMap",{}),I(this,"addedSet",new Set),I(this,"movedSet",new Set),I(this,"droppedSet",new Set),I(this,"removesSubTreeCache",new Set),I(this,"mutationCb"),I(this,"blockClass"),I(this,"blockSelector"),I(this,"maskTextClass"),I(this,"maskTextSelector"),I(this,"inlineStylesheet"),I(this,"maskInputOptions"),I(this,"maskTextFn"),I(this,"maskInputFn"),I(this,"keepIframeSrcFn"),I(this,"recordCanvas"),I(this,"inlineImages"),I(this,"slimDOMOptions"),I(this,"dataURLOptions"),I(this,"doc"),I(this,"mirror"),I(this,"iframeManager"),I(this,"stylesheetManager"),I(this,"shadowDomManager"),I(this,"canvasManager"),I(this,"processedNodeManager"),I(this,"unattachedDoc"),I(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),I(this,"emit",()=>{if(this.frozen||this.locked)return;let t=[],s=new Set;for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let o of this.movedSet){let n=_.parentNode(o);this.removesSubTreeCache.has(n)&&!this.movedSet.has(n)||this.addedSet.add(o)}let a=null,r=null,c=-1,f=null,m=!1,l=new Set,d=this.addedSet.values(),i=d.next();for(;this.addedSet.size;){if(a!==null&&this.addedSet.has(_.previousSibling(a)))f=a,a=_.previousSibling(a);else{for(this.addedSet.has(i.value)||(i=d.next()),a=i.value;;){if(r=_.parentNode(a),this.addedSet.has(r)){a=r;continue}break}if(l.has(r))r=null;else if(r){if(pn(r)?(m=Ei(this.droppedSet,r)||this.removesSubTreeCache.has(r),m&&Ei(this.movedSet,a)&&(m=!1)):m=!0,this.addedSet.has(_.lastChild(r)))a=_.lastChild(r),f=null;else for(;;){if(f=_.nextSibling(a),this.addedSet.has(f)){a=f;continue}break}if(c=Fe(r)?this.mirror.getId(dn(a)):this.mirror.getId(r),c===-1&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let u=_.host(r);c=this.mirror.getId(u)}}}if(this.addedSet.delete(a),!r||c===-1){l.add(a);continue}else if(m){this.droppedSet.add(a);continue}let o=!1;if(a.nodeType===Node.TEXT_NODE){let u=r.tagName;if(u==="TEXTAREA")continue;u==="STYLE"&&s.has(c)&&(o=!0)}let n=f?this.mirror.getId(f):null;for(;n===ot;)f=f&&_.nextSibling(f),n=f&&this.mirror.getId(f);if(n===-1){console.warn("Couldn't record new node. Couldn't find mirror id for nextSibling:",f),a=null;continue}let p=Ae(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:u=>{hn(u,this.mirror)&&this.iframeManager.addIframe(u),fn(u,this.mirror)&&this.stylesheetManager.trackLinkElement(u),Pr(a)&&this.shadowDomManager.addShadowRoot(_.shadowRoot(a),this.doc)},onIframeLoad:(u,g)=>{this.iframeManager.attachIframe(u,g),this.shadowDomManager.observeAttachShadow(u)},onStylesheetLoad:(u,g)=>{this.stylesheetManager.attachLinkElement(u,g)},cssCaptured:o});p&&(t.push({parentId:c,nextId:n,node:p}),s.add(p.id))}let h={texts:this.texts.map(o=>{let n=o.node,p=_.parentNode(n);return p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p),{id:this.mirror.getId(n),value:o.value}}).filter(o=>!s.has(o.id)).filter(o=>this.mirror.has(o.id)),attributes:this.attributes.map(o=>{let{attributes:n}=o;if(typeof n.style=="string"){let p=JSON.stringify(o.styleDiff),u=JSON.stringify(o._unchangedStyles);p.length<n.style.length&&(p+u).split("var(").length===n.style.split("var(").length&&(n.style=o.styleDiff)}return{id:this.mirror.getId(o.node),attributes:n}}).filter(o=>!s.has(o.id)).filter(o=>this.mirror.has(o.id)),removes:this.removes,adds:t};!h.texts.length&&!h.attributes.length&&!h.removes.length&&!h.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(h))}),I(this,"genTextAreaValueMutation",t=>{let s=this.attributeMap.get(t);s||(s={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t,s));let a=Array.from(_.childNodes(t),r=>_.textContent(r)||"").join("");s.attributes.value=st({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:it(t),value:a,maskInputFn:this.maskInputFn})}),I(this,"processMutation",t=>{if(!Dr(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{let s=_.textContent(t.target);!te(t.target,this.blockClass,this.blockSelector,!1)&&s!==t.oldValue&&this.texts.push({value:$i(t.target,this.maskTextClass,this.maskTextSelector,!0)&&s?this.maskTextFn?this.maskTextFn(s,un(t.target)):s.replace(/[\S]/g,"*"):s,node:t.target});break}case"attributes":{let s=t.target,a=Se(s.tagName),r=t.attributeName,c=t.target.getAttribute(r);if(r==="value"){let m=it(s);c=st({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:m,value:c,maskInputFn:this.maskInputFn})}if(te(t.target,this.blockClass,this.blockSelector,!1)||c===t.oldValue)return;let f=this.attributeMap.get(t.target);if(a==="iframe"&&r==="src"&&!this.keepIframeSrcFn(c))if(!s.contentDocument)r="rr_src";else return;if(f||(f={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(f),this.attributeMap.set(t.target,f)),r==="type"&&a==="input"&&(t.oldValue||"").toLowerCase()==="password"&&s.setAttribute("data-rr-is-password","true"),!Bi(a,r))if(f.attributes[r]=Ui(this.doc,a,Se(r),c),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let m=this.unattachedDoc.createElement("span");t.oldValue&&m.setAttribute("style",t.oldValue);for(let l of Array.from(s.style)){let d=s.style.getPropertyValue(l),i=s.style.getPropertyPriority(l);d!==m.style.getPropertyValue(l)||i!==m.style.getPropertyPriority(l)?i===""?f.styleDiff[l]=d:f.styleDiff[l]=[d,i]:f._unchangedStyles[l]=[d,i]}for(let l of Array.from(m.style))s.style.getPropertyValue(l)===""&&(f.styleDiff[l]=!1)}else r==="open"&&s.tagName==="DIALOG"&&(s.matches("dialog:modal")?f.attributes.rr_open_mode="modal":f.attributes.rr_open_mode="non-modal");break}case"childList":{if(te(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(s=>this.genAdds(s,t.target)),t.removedNodes.forEach(s=>{let a=this.mirror.getId(s),r=Fe(t.target)?this.mirror.getId(_.host(t.target)):this.mirror.getId(t.target);te(t.target,this.blockClass,this.blockSelector,!1)||Dr(s,this.mirror,this.slimDOMOptions)||!Ma(s,this.mirror)||(this.addedSet.has(s)?(Ur(this.addedSet,s),this.droppedSet.add(s)):this.addedSet.has(t.target)&&a===-1||cn(t.target,this.mirror)||(this.movedSet.has(s)&&this.movedMap[Ci(a,r)]?Ur(this.movedSet,s):(this.removes.push({parentId:r,id:a,isShadow:Fe(t.target)&&Ue(t.target)?!0:void 0}),Da(s,this.removesSubTreeCache))),this.mapRemoves.push(s))});break}}}),I(this,"genAdds",(t,s)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Dr(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let a=null;s&&this.mirror.hasNode(s)&&(a=this.mirror.getId(s)),a&&a!==-1&&(this.movedMap[Ci(this.mirror.getId(t),a)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);te(t,this.blockClass,this.blockSelector,!1)||(_.childNodes(t).forEach(a=>this.genAdds(a)),Pr(t)&&_.childNodes(_.shadowRoot(t)).forEach(a=>{this.processedNodeManager.add(a,this),this.genAdds(a,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(s=>{this[s]=t[s]})}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 Ur(e,t){e.delete(t),_.childNodes(t).forEach(s=>Ur(e,s))}function Da(e,t){let s=[e];for(;s.length;){let a=s.pop();t.has(a)||(t.add(a),_.childNodes(a).forEach(r=>s.push(r)))}}function Ei(e,t){return e.size===0?!1:gn(e,t)}function gn(e,t){if(e.has(t))return!0;let s=_.parentNode(t);return s?gn(e,s):!1}var Be;function Aa(e){Be=e}function Ta(){Be=void 0}var P=e=>Be?(...s)=>{try{return e(...s)}catch(a){if(Be&&Be(a)===!0)return;throw a}}:e,Ee=[];function Ve(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function yn(e,t){let s=new Fr;Ee.push(s),s.init(e);let[a,r]=nn(),c=new a(P(s.processMutations.bind(s)));return c.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[c,r]}function _a({mousemoveCb:e,sampling:t,doc:s,mirror:a}){if(t.mousemove===!1)return()=>{};let r=typeof t.mousemove=="number"?t.mousemove:50,c=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,f=[],m,l=We(P(h=>{let o=Date.now()-m;e(f.map(n=>(n.timeOffset-=o,n)),h),f=[],m=null}),c),d=P(We(P(h=>{let o=Ve(h),{clientX:n,clientY:p}=kr(h)?h.changedTouches[0]:h;m||(m=$e()),f.push({x:n,y:p,id:a.getId(o),timeOffset:$e()-m}),l(typeof DragEvent<"u"&&h instanceof DragEvent?k.Drag:h instanceof MouseEvent?k.MouseMove:k.TouchMove)}),r,{trailing:!1})),i=[ee("mousemove",d,s),ee("touchmove",d,s),ee("drag",d,s)];return P(()=>{i.forEach(h=>h())})}function ka({mouseInteractionCb:e,doc:t,mirror:s,blockClass:a,blockSelector:r,sampling:c}){if(c.mouseInteraction===!1)return()=>{};let f=c.mouseInteraction===!0||c.mouseInteraction===void 0?{}:c.mouseInteraction,m=[],l=null,d=i=>h=>{let o=Ve(h);if(te(o,a,r,!0))return;let n=null,p=i;if("pointerType"in h){switch(h.pointerType){case"mouse":n=ge.Mouse;break;case"touch":n=ge.Touch;break;case"pen":n=ge.Pen;break}n===ge.Touch?re[i]===re.MouseDown?p="TouchStart":re[i]===re.MouseUp&&(p="TouchEnd"):ge.Pen}else kr(h)&&(n=ge.Touch);n!==null?(l=n,(p.startsWith("Touch")&&n===ge.Touch||p.startsWith("Mouse")&&n===ge.Mouse)&&(n=null)):re[i]===re.Click&&(n=l,l=null);let u=kr(h)?h.changedTouches[0]:h;if(!u)return;let g=s.getId(o),{clientX:S,clientY:y}=u;P(e)({type:re[p],id:g,x:S,y,...n!==null&&{pointerType:n}})};return Object.keys(re).filter(i=>Number.isNaN(Number(i))&&!i.endsWith("_Departed")&&f[i]!==!1).forEach(i=>{let h=Se(i),o=d(i);if(window.PointerEvent)switch(re[i]){case re.MouseDown:case re.MouseUp:h=h.replace("mouse","pointer");break;case re.TouchStart:case re.TouchEnd:return}m.push(ee(h,o,t))}),P(()=>{m.forEach(i=>i())})}function wn({scrollCb:e,doc:t,mirror:s,blockClass:a,blockSelector:r,sampling:c}){let f=P(We(P(m=>{let l=Ve(m);if(!l||te(l,a,r,!0))return;let d=s.getId(l);if(l===t&&t.defaultView){let i=on(t.defaultView);e({id:d,x:i.left,y:i.top})}else e({id:d,x:l.scrollLeft,y:l.scrollTop})}),c.scroll||100));return ee("scroll",f,t)}function Pa({viewportResizeCb:e},{win:t}){let s=-1,a=-1,r=P(We(P(()=>{let c=an(),f=ln();(s!==c||a!==f)&&(e({width:Number(f),height:Number(c)}),s=c,a=f)}),200));return ee("resize",r,t)}var La=["INPUT","TEXTAREA","SELECT"],xi=new WeakMap;function Fa({inputCb:e,doc:t,mirror:s,blockClass:a,blockSelector:r,ignoreClass:c,ignoreSelector:f,maskInputOptions:m,maskInputFn:l,sampling:d,userTriggeredOnInput:i}){function h(y){let v=Ve(y),E=y.isTrusted,b=v&&v.tagName;if(v&&b==="OPTION"&&(v=_.parentElement(v)),!v||!b||La.indexOf(b)<0||te(v,a,r,!0)||v.classList.contains(c)||f&&v.matches(f))return;let w=v.value,C=!1,R=it(v)||"";R==="radio"||R==="checkbox"?C=v.checked:(m[b.toLowerCase()]||m[R])&&(w=st({element:v,maskInputOptions:m,tagName:b,type:R,value:w,maskInputFn:l})),o(v,i?{text:w,isChecked:C,userTriggered:E}:{text:w,isChecked:C});let O=v.name;R==="radio"&&O&&C&&t.querySelectorAll(`input[type="radio"][name="${O}"]`).forEach(M=>{if(M!==v){let T=M.value;o(M,i?{text:T,isChecked:!C,userTriggered:!1}:{text:T,isChecked:!C})}})}function o(y,v){let E=xi.get(y);if(!E||E.text!==v.text||E.isChecked!==v.isChecked){xi.set(y,v);let b=s.getId(y);P(e)({...v,id:b})}}let p=(d.input==="last"?["change"]:["input","change"]).map(y=>ee(y,P(h),t)),u=t.defaultView;if(!u)return()=>{p.forEach(y=>y())};let g=u.Object.getOwnPropertyDescriptor(u.HTMLInputElement.prototype,"value"),S=[[u.HTMLInputElement.prototype,"value"],[u.HTMLInputElement.prototype,"checked"],[u.HTMLSelectElement.prototype,"value"],[u.HTMLTextAreaElement.prototype,"value"],[u.HTMLSelectElement.prototype,"selectedIndex"],[u.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...S.map(y=>St(y[0],y[1],{set(){P(h)({target:this,isTrusted:!1})}},!1,u))),P(()=>{p.forEach(y=>y())})}function lt(e){let t=[];function s(a,r){if(Ze("CSSGroupingRule")&&a.parentRule instanceof CSSGroupingRule||Ze("CSSMediaRule")&&a.parentRule instanceof CSSMediaRule||Ze("CSSSupportsRule")&&a.parentRule instanceof CSSSupportsRule||Ze("CSSConditionRule")&&a.parentRule instanceof CSSConditionRule){let f=Array.from(a.parentRule.cssRules).indexOf(a);return r.unshift(f),s(a.parentRule,r)}else if(a.parentStyleSheet){let f=Array.from(a.parentStyleSheet.cssRules).indexOf(a);r.unshift(f)}return r}return s(e,t)}function ve(e,t,s){let a,r;return e?(e.ownerNode?a=t.getId(e.ownerNode):r=s.getId(e),{styleId:r,id:a}):{}}function Ua({styleSheetRuleCb:e,mirror:t,stylesheetManager:s},{win:a}){if(!a.CSSStyleSheet||!a.CSSStyleSheet.prototype)return()=>{};let r=a.CSSStyleSheet.prototype.insertRule;a.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:P((i,h,o)=>{let[n,p]=o,{id:u,styleId:g}=ve(h,t,s.styleMirror);return(u&&u!==-1||g&&g!==-1)&&e({id:u,styleId:g,adds:[{rule:n,index:p}]}),i.apply(h,o)})}),a.CSSStyleSheet.prototype.addRule=function(i,h,o=this.cssRules.length){let n=`${i} { ${h} }`;return a.CSSStyleSheet.prototype.insertRule.apply(this,[n,o])};let c=a.CSSStyleSheet.prototype.deleteRule;a.CSSStyleSheet.prototype.deleteRule=new Proxy(c,{apply:P((i,h,o)=>{let[n]=o,{id:p,styleId:u}=ve(h,t,s.styleMirror);return(p&&p!==-1||u&&u!==-1)&&e({id:p,styleId:u,removes:[{index:n}]}),i.apply(h,o)})}),a.CSSStyleSheet.prototype.removeRule=function(i){return a.CSSStyleSheet.prototype.deleteRule.apply(this,[i])};let f;a.CSSStyleSheet.prototype.replace&&(f=a.CSSStyleSheet.prototype.replace,a.CSSStyleSheet.prototype.replace=new Proxy(f,{apply:P((i,h,o)=>{let[n]=o,{id:p,styleId:u}=ve(h,t,s.styleMirror);return(p&&p!==-1||u&&u!==-1)&&e({id:p,styleId:u,replace:n}),i.apply(h,o)})}));let m;a.CSSStyleSheet.prototype.replaceSync&&(m=a.CSSStyleSheet.prototype.replaceSync,a.CSSStyleSheet.prototype.replaceSync=new Proxy(m,{apply:P((i,h,o)=>{let[n]=o,{id:p,styleId:u}=ve(h,t,s.styleMirror);return(p&&p!==-1||u&&u!==-1)&&e({id:p,styleId:u,replaceSync:n}),i.apply(h,o)})}));let l={};Ke("CSSGroupingRule")?l.CSSGroupingRule=a.CSSGroupingRule:(Ke("CSSMediaRule")&&(l.CSSMediaRule=a.CSSMediaRule),Ke("CSSConditionRule")&&(l.CSSConditionRule=a.CSSConditionRule),Ke("CSSSupportsRule")&&(l.CSSSupportsRule=a.CSSSupportsRule));let d={};return Object.entries(l).forEach(([i,h])=>{d[i]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(d[i].insertRule,{apply:P((o,n,p)=>{let[u,g]=p,{id:S,styleId:y}=ve(n.parentStyleSheet,t,s.styleMirror);return(S&&S!==-1||y&&y!==-1)&&e({id:S,styleId:y,adds:[{rule:u,index:[...lt(n),g||0]}]}),o.apply(n,p)})}),h.prototype.deleteRule=new Proxy(d[i].deleteRule,{apply:P((o,n,p)=>{let[u]=p,{id:g,styleId:S}=ve(n.parentStyleSheet,t,s.styleMirror);return(g&&g!==-1||S&&S!==-1)&&e({id:g,styleId:S,removes:[{index:[...lt(n),u]}]}),o.apply(n,p)})})}),P(()=>{a.CSSStyleSheet.prototype.insertRule=r,a.CSSStyleSheet.prototype.deleteRule=c,f&&(a.CSSStyleSheet.prototype.replace=f),m&&(a.CSSStyleSheet.prototype.replaceSync=m),Object.entries(l).forEach(([i,h])=>{h.prototype.insertRule=d[i].insertRule,h.prototype.deleteRule=d[i].deleteRule})})}function bn({mirror:e,stylesheetManager:t},s){var a,r,c;let f=null;s.nodeName==="#document"?f=e.getId(s):f=e.getId(_.host(s));let m=s.nodeName==="#document"?(a=s.defaultView)==null?void 0:a.Document:(c=(r=s.ownerDocument)==null?void 0:r.defaultView)==null?void 0:c.ShadowRoot,l=m?.prototype?Object.getOwnPropertyDescriptor(m?.prototype,"adoptedStyleSheets"):void 0;return f===null||f===-1||!m||!l?()=>{}:(Object.defineProperty(s,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var d;return(d=l.get)==null?void 0:d.call(this)},set(d){var i;let h=(i=l.set)==null?void 0:i.call(this,d);if(f!==null&&f!==-1)try{t.adoptStyleSheets(d,f)}catch{}return h}}),P(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function Ba({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:a},{win:r}){let c=r.CSSStyleDeclaration.prototype.setProperty;r.CSSStyleDeclaration.prototype.setProperty=new Proxy(c,{apply:P((m,l,d)=>{var i;let[h,o,n]=d;if(s.has(h))return c.apply(l,[h,o,n]);let{id:p,styleId:u}=ve((i=l.parentRule)==null?void 0:i.parentStyleSheet,t,a.styleMirror);return(p&&p!==-1||u&&u!==-1)&&e({id:p,styleId:u,set:{property:h,value:o,priority:n},index:lt(l.parentRule)}),m.apply(l,d)})});let f=r.CSSStyleDeclaration.prototype.removeProperty;return r.CSSStyleDeclaration.prototype.removeProperty=new Proxy(f,{apply:P((m,l,d)=>{var i;let[h]=d;if(s.has(h))return f.apply(l,[h]);let{id:o,styleId:n}=ve((i=l.parentRule)==null?void 0:i.parentStyleSheet,t,a.styleMirror);return(o&&o!==-1||n&&n!==-1)&&e({id:o,styleId:n,remove:{property:h},index:lt(l.parentRule)}),m.apply(l,d)})}),P(()=>{r.CSSStyleDeclaration.prototype.setProperty=c,r.CSSStyleDeclaration.prototype.removeProperty=f})}function $a({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:a,sampling:r,doc:c}){let f=P(l=>We(P(d=>{let i=Ve(d);if(!i||te(i,t,s,!0))return;let{currentTime:h,volume:o,muted:n,playbackRate:p,loop:u}=i;e({type:l,id:a.getId(i),currentTime:h,volume:o,muted:n,playbackRate:p,loop:u})}),r.media||500)),m=[ee("play",f(Ie.Play),c),ee("pause",f(Ie.Pause),c),ee("seeked",f(Ie.Seeked),c),ee("volumechange",f(Ie.VolumeChange),c),ee("ratechange",f(Ie.RateChange),c)];return P(()=>{m.forEach(l=>l())})}function Wa({fontCb:e,doc:t}){let s=t.defaultView;if(!s)return()=>{};let a=[],r=new WeakMap,c=s.FontFace;s.FontFace=function(l,d,i){let h=new c(l,d,i);return r.set(h,{family:l,buffer:typeof d!="string",descriptors:i,fontSource:typeof d=="string"?d:JSON.stringify(Array.from(new Uint8Array(d)))}),h};let f=Me(t.fonts,"add",function(m){return function(l){return setTimeout(P(()=>{let d=r.get(l);d&&(e(d),r.delete(l))}),0),m.apply(this,[l])}});return a.push(()=>{s.FontFace=c}),a.push(f),P(()=>{a.forEach(m=>m())})}function za(e){let{doc:t,mirror:s,blockClass:a,blockSelector:r,selectionCb:c}=e,f=!0,m=P(()=>{let l=t.getSelection();if(!l||f&&l?.isCollapsed)return;f=l.isCollapsed||!1;let d=[],i=l.rangeCount||0;for(let h=0;h<i;h++){let o=l.getRangeAt(h),{startContainer:n,startOffset:p,endContainer:u,endOffset:g}=o;te(n,a,r,!0)||te(u,a,r,!0)||d.push({start:s.getId(n),startOffset:p,end:s.getId(u),endOffset:g})}c({ranges:d})});return m(),ee("selectionchange",m)}function qa({doc:e,customElementCb:t}){let s=e.defaultView;return!s||!s.customElements?()=>{}:Me(s.customElements,"define",function(r){return function(c,f,m){try{t({define:{name:c}})}catch{console.warn(`Custom element callback failed for ${c}`)}return r.apply(this,[c,f,m])}})}function Va(e,t){let{mutationCb:s,mousemoveCb:a,mouseInteractionCb:r,scrollCb:c,viewportResizeCb:f,inputCb:m,mediaInteractionCb:l,styleSheetRuleCb:d,styleDeclarationCb:i,canvasMutationCb:h,fontCb:o,selectionCb:n,customElementCb:p}=e;e.mutationCb=(...u)=>{t.mutation&&t.mutation(...u),s(...u)},e.mousemoveCb=(...u)=>{t.mousemove&&t.mousemove(...u),a(...u)},e.mouseInteractionCb=(...u)=>{t.mouseInteraction&&t.mouseInteraction(...u),r(...u)},e.scrollCb=(...u)=>{t.scroll&&t.scroll(...u),c(...u)},e.viewportResizeCb=(...u)=>{t.viewportResize&&t.viewportResize(...u),f(...u)},e.inputCb=(...u)=>{t.input&&t.input(...u),m(...u)},e.mediaInteractionCb=(...u)=>{t.mediaInteaction&&t.mediaInteaction(...u),l(...u)},e.styleSheetRuleCb=(...u)=>{t.styleSheetRule&&t.styleSheetRule(...u),d(...u)},e.styleDeclarationCb=(...u)=>{t.styleDeclaration&&t.styleDeclaration(...u),i(...u)},e.canvasMutationCb=(...u)=>{t.canvasMutation&&t.canvasMutation(...u),h(...u)},e.fontCb=(...u)=>{t.font&&t.font(...u),o(...u)},e.selectionCb=(...u)=>{t.selection&&t.selection(...u),n(...u)},e.customElementCb=(...u)=>{t.customElement&&t.customElement(...u),p(...u)}}function ja(e,t={}){let s=e.doc.defaultView;if(!s)return()=>{};Va(e,t);let a,r=()=>{};e.recordDOM&&([a,r]=yn(e,e.doc));let c=_a(e),f=ka(e),m=wn(e),l=Pa(e,{win:s}),d=Fa(e),i=$a(e),h=()=>{},o=()=>{},n=()=>{},p=()=>{};e.recordDOM&&(h=Ua(e,{win:s}),o=bn(e,e.doc),n=Ba(e,{win:s}),e.collectFonts&&(p=Wa(e)));let u=za(e),g=qa(e),S=[];for(let y of e.plugins)S.push(y.observer(y.callback,s,y.options));return P(()=>{Ee.forEach(y=>y.reset()),a?.disconnect(),r(),c(),f(),m(),l(),d(),i(),h(),o(),n(),p(),u(),g(),S.forEach(y=>y())})}function Ze(e){return typeof window[e]<"u"}function Ke(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var ut=class{constructor(t){I(this,"iframeIdToRemoteIdMap",new WeakMap),I(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,s,a,r){let c=a||this.getIdToRemoteIdMap(t),f=r||this.getRemoteIdToIdMap(t),m=c.get(s);return m||(m=this.generateIdFn(),c.set(s,m),f.set(m,s)),m}getIds(t,s){let a=this.getIdToRemoteIdMap(t),r=this.getRemoteIdToIdMap(t);return s.map(c=>this.getId(t,c,a,r))}getRemoteId(t,s,a){let r=a||this.getRemoteIdToIdMap(t);if(typeof s!="number")return s;let c=r.get(s);return c||-1}getRemoteIds(t,s){let a=this.getRemoteIdToIdMap(t);return s.map(r=>this.getRemoteId(t,r,a))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let s=this.iframeIdToRemoteIdMap.get(t);return s||(s=new Map,this.iframeIdToRemoteIdMap.set(t,s)),s}getRemoteIdToIdMap(t){let s=this.iframeRemoteIdToIdMap.get(t);return s||(s=new Map,this.iframeRemoteIdToIdMap.set(t,s)),s}},Br=class{constructor(t){I(this,"iframes",new WeakMap),I(this,"crossOriginIframeMap",new WeakMap),I(this,"crossOriginIframeMirror",new ut(Fi)),I(this,"crossOriginIframeStyleMirror"),I(this,"crossOriginIframeRootIdMap",new WeakMap),I(this,"mirror"),I(this,"mutationCb"),I(this,"wrappedEmit"),I(this,"loadListener"),I(this,"stylesheetManager"),I(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ut(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,s){var a,r;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:s}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((a=t.contentWindow)==null||a.addEventListener("message",this.handleMessage.bind(this))),(r=this.loadListener)==null||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){let s=t;if(s.data.type!=="rrweb"||s.origin!==s.data.origin||!t.source)return;let r=this.crossOriginIframeMap.get(t.source);if(!r)return;let c=this.transformCrossOriginEvent(r,s.data.event);c&&this.wrappedEmit(c,s.data.isCheckout)}transformCrossOriginEvent(t,s){var a;switch(s.type){case L.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(s.data.node,t);let r=s.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(s.data.node,r),{timestamp:s.timestamp,type:L.IncrementalSnapshot,data:{source:k.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:s.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case L.Meta:case L.Load:case L.DomContentLoaded:return!1;case L.Plugin:return s;case L.Custom:return this.replaceIds(s.data.payload,t,["id","parentId","previousId","nextId"]),s;case L.IncrementalSnapshot:switch(s.data.source){case k.Mutation:return s.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);let c=this.crossOriginIframeRootIdMap.get(t);c&&this.patchRootIdOnNode(r.node,c)}),s.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),s.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),s.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),s;case k.Drag:case k.TouchMove:case k.MouseMove:return s.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),s;case k.ViewportResize:return!1;case k.MediaInteraction:case k.MouseInteraction:case k.Scroll:case k.CanvasMutation:case k.Input:return this.replaceIds(s.data,t,["id"]),s;case k.StyleSheetRule:case k.StyleDeclaration:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleId"]),s;case k.Font:return s;case k.Selection:return s.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),s;case k.AdoptedStyleSheet:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleIds"]),(a=s.data.styles)==null||a.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),s}}return!1}replace(t,s,a,r){for(let c of r)!Array.isArray(s[c])&&typeof s[c]!="number"||(Array.isArray(s[c])?s[c]=t.getIds(a,s[c]):s[c]=t.getId(a,s[c]));return s}replaceIds(t,s,a){return this.replace(this.crossOriginIframeMirror,t,s,a)}replaceStyleIds(t,s,a){return this.replace(this.crossOriginIframeStyleMirror,t,s,a)}replaceIdOnNode(t,s){this.replaceIds(t,s,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(a=>{this.replaceIdOnNode(a,s)})}patchRootIdOnNode(t,s){t.type!==mn.Document&&!t.rootId&&(t.rootId=s),"childNodes"in t&&t.childNodes.forEach(a=>{this.patchRootIdOnNode(a,s)})}},$r=class{constructor(t){I(this,"shadowDoms",new WeakSet),I(this,"mutationCb"),I(this,"scrollCb"),I(this,"bypassOptions"),I(this,"mirror"),I(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,s){if(!Ue(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);let[a]=yn({...this.bypassOptions,doc:s,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>a.disconnect()),this.restoreHandlers.push(wn({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(_.host(t))),this.restoreHandlers.push(bn({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,s){let a=this;this.restoreHandlers.push(Me(t.prototype,"attachShadow",function(r){return function(c){let f=r.call(this,c),m=_.shadowRoot(this);return m&&pn(this)&&a.addShadowRoot(m,s),f}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ga=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Le=0;Le<Te.length;Le++)Ga[Te.charCodeAt(Le)]=Le;var Le,Ha=function(e){var t=new Uint8Array(e),s,a=t.length,r="";for(s=0;s<a;s+=3)r+=Te[t[s]>>2],r+=Te[(t[s]&3)<<4|t[s+1]>>4],r+=Te[(t[s+1]&15)<<2|t[s+2]>>6],r+=Te[t[s+2]&63];return a%3===2?r=r.substring(0,r.length-1)+"=":a%3===1&&(r=r.substring(0,r.length-2)+"=="),r};var Ri=new Map;function Ya(e,t){let s=Ri.get(e);return s||(s=new Map,Ri.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}var vn=(e,t,s)=>{if(!e||!(Cn(e,t)||typeof e=="object"))return;let a=e.constructor.name,r=Ya(s,a),c=r.indexOf(e);return c===-1&&(c=r.length,r.push(e)),c};function et(e,t,s){if(e instanceof Array)return e.map(a=>et(a,t,s));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let a=e.constructor.name,r=Ha(e);return{rr_type:a,base64:r}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[et(e.buffer,t,s),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let a=e.constructor.name,{src:r}=e;return{rr_type:a,src:r}}else if(e instanceof HTMLCanvasElement){let a="HTMLImageElement",r=e.toDataURL();return{rr_type:a,src:r}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[et(e.data,t,s),e.width,e.height]};if(Cn(e,t)||typeof e=="object"){let a=e.constructor.name,r=vn(e,t,s);return{rr_type:a,index:r}}}}return e}var Sn=(e,t,s)=>e.map(a=>et(a,t,s)),Cn=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof t[r]=="function").find(r=>e instanceof t[r]);function Ja(e,t,s,a){let r=[],c=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let f of c)try{if(typeof t.CanvasRenderingContext2D.prototype[f]!="function")continue;let m=Me(t.CanvasRenderingContext2D.prototype,f,function(l){return function(...d){return te(this.canvas,s,a,!0)||setTimeout(()=>{let i=Sn(d,t,this);e(this.canvas,{type:_e["2D"],property:f,args:i})},0),l.apply(this,d)}});r.push(m)}catch{let m=St(t.CanvasRenderingContext2D.prototype,f,{set(l){e(this.canvas,{type:_e["2D"],property:f,args:[l],setter:!0})}});r.push(m)}return()=>{r.forEach(f=>f())}}function Xa(e){return e==="experimental-webgl"?"webgl":e}function Mi(e,t,s,a){let r=[];try{let c=Me(e.HTMLCanvasElement.prototype,"getContext",function(f){return function(m,...l){if(!te(this,t,s,!0)){let d=Xa(m);if("__context"in this||(this.__context=d),a&&["webgl","webgl2"].includes(d))if(l[0]&&typeof l[0]=="object"){let i=l[0];i.preserveDrawingBuffer||(i.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return f.apply(this,[m,...l])}});r.push(c)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(c=>c())}}function Ni(e,t,s,a,r,c){let f=[],m=Object.getOwnPropertyNames(e);for(let l of m)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;let d=Me(e,l,function(i){return function(...h){let o=i.apply(this,h);if(vn(o,c,this),"tagName"in this.canvas&&!te(this.canvas,a,r,!0)){let n=Sn(h,c,this),p={type:t,property:l,args:n};s(this.canvas,p)}return o}});f.push(d)}catch{let d=St(e,l,{set(i){s(this.canvas,{type:t,property:l,args:[i],setter:!0})}});f.push(d)}return f}function Qa(e,t,s,a){let r=[];return typeof t.WebGLRenderingContext<"u"&&r.push(...Ni(t.WebGLRenderingContext.prototype,_e.WebGL,e,s,a,t)),typeof t.WebGL2RenderingContext<"u"&&r.push(...Ni(t.WebGL2RenderingContext.prototype,_e.WebGL2,e,s,a,t)),()=>{r.forEach(c=>c())}}var En=`(function() {
|
|
54
54
|
"use strict";
|
|
55
55
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
56
56
|
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
@@ -125,5 +125,5 @@ or you can use record.mirror to access the mirror instance during recording.`,Si
|
|
|
125
125
|
};
|
|
126
126
|
})();
|
|
127
127
|
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
128
|
-
`,Oi=typeof self<"u"&&self.Blob&&new Blob([En],{type:"text/javascript;charset=utf-8"});function Za(e){let t;try{if(t=Oi&&(self.URL||self.webkitURL).createObjectURL(Oi),!t)throw"";let s=new Worker(t,{name:e?.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),s}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(En),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Wr=class{constructor(t){I(this,"pendingCanvasMutations",new Map),I(this,"rafStamps",{latestId:0,invokeId:null}),I(this,"mirror"),I(this,"mutationCb"),I(this,"resetObservers"),I(this,"frozen",!1),I(this,"locked",!1),I(this,"processMutation",(l,p)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(p)});let{sampling:s="all",win:a,blockClass:r,blockSelector:c,recordCanvas:f,dataURLOptions:m}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,f&&s==="all"&&this.initCanvasMutationObserver(a,r,c),f&&typeof s=="number"&&this.initCanvasFPSObserver(s,a,r,c,{dataURLOptions:m})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,s,a,r,c){let f=Mi(s,a,r,!0),m=new Map,l=new Za;l.onmessage=d=>{let{id:u}=d.data;if(m.set(u,!1),!("base64"in d.data))return;let{base64:g,type:S,width:b,height:v}=d.data;this.mutationCb({id:u,type:Te["2D"],commands:[{property:"clearRect",args:[0,0,b,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:S}]},0,0]}]})};let p=1e3/t,i=0,h,o=()=>{let d=[];return s.document.querySelectorAll("canvas").forEach(u=>{te(u,a,r,!0)||d.push(u)}),d},n=d=>{if(i&&d-i<p){h=requestAnimationFrame(n);return}i=d,o().forEach(async u=>{var g;let S=this.mirror.getId(u);if(m.get(S)||u.width===0||u.height===0)return;if(m.set(S,!0),["webgl","webgl2"].includes(u.__context)){let v=u.getContext(u.__context);((g=v?.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}let b=await createImageBitmap(u);l.postMessage({id:S,bitmap:b,width:u.width,height:u.height,dataURLOptions:c.dataURLOptions},[b])}),h=requestAnimationFrame(n)};h=requestAnimationFrame(n),this.resetObservers=()=>{f(),cancelAnimationFrame(h)}}initCanvasMutationObserver(t,s,a){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let r=Mi(t,s,a,!1),c=Ja(this.processMutation.bind(this),t,s,a),f=Qa(this.processMutation.bind(this),t,s,a);this.resetObservers=()=>{r(),c(),f()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=s=>{this.rafStamps.latestId=s,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,s)=>{let a=this.mirror.getId(s);this.flushPendingCanvasMutationFor(s,a)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,s){if(this.frozen||this.locked)return;let a=this.pendingCanvasMutations.get(t);if(!a||s===-1)return;let r=a.map(f=>{let{type:m,...l}=f;return l}),{type:c}=a[0];this.mutationCb({id:s,type:c,commands:r}),this.pendingCanvasMutations.delete(t)}},zr=class{constructor(t){I(this,"trackedLinkElements",new WeakSet),I(this,"mutationCb"),I(this,"adoptedStyleSheetCb"),I(this,"styleMirror",new Lr),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,s){"_cssText"in s.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:s.id,attributes:s.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,s){if(t.length===0)return;let a={id:s,styleIds:[]},r=[];for(let c of t){let f;this.styleMirror.has(c)?f=this.styleMirror.getId(c):(f=this.styleMirror.add(c),r.push({styleId:f,rules:Array.from(c.rules||CSSRule,(m,l)=>({rule:ki(m,c.href),index:l}))})),a.styleIds.push(f)}r.length>0&&(a.styles=r),this.adoptedStyleSheetCb(a)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},qr=class{constructor(){I(this,"nodeMap",new WeakMap),I(this,"active",!1)}inOtherBuffer(t,s){let a=this.nodeMap.get(t);return a&&Array.from(a).some(r=>r!==s)}add(t,s){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(s))}destroy(){}},G,tt,Dr,ct=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((ls=e.contentWindow)==null?void 0:ls.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var fe=oo();function ue(e={}){let{emit:t,checkoutEveryNms:s,checkoutEveryNth:a,blockClass:r="rr-block",blockSelector:c=null,ignoreClass:f="rr-ignore",ignoreSelector:m=null,maskTextClass:l="rr-mask",maskTextSelector:p=null,inlineStylesheet:i=!0,maskAllInputs:h,maskInputOptions:o,slimDOMOptions:n,maskInputFn:d,maskTextFn:u,hooks:g,packFn:S,sampling:b={},dataURLOptions:v={},mousemoveWait:E,recordDOM:y=!0,recordCanvas:w=!1,recordCrossOriginIframes:C=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:O=!1,collectFonts:M=!1,inlineImages:T=!1,plugins:A,keepIframeSrcFn:x=()=>!1,ignoreCSSAttributes:ce=new Set([]),errorHandler:se}=e;Da(se);let U=C?window.parent===window:!0,F=!1;if(!U)try{window.parent.document&&(F=!1)}catch{F=!0}if(U&&!t)throw new Error("emit function is required");if(!U&&!F)return()=>{};E!==void 0&&b.mousemove===void 0&&(b.mousemove=E),fe.reset();let H=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}:o!==void 0?o:{password:!0},Q=Wi(n);Na();let Y,B=0,ye=D=>{for(let J of A||[])J.eventProcessor&&(D=J.eventProcessor(D));return S&&!F&&(D=S(D)),D};G=(D,J)=>{var $;let j=D;if(j.timestamp=Be(),($=Ce[0])!=null&&$.isFrozen()&&j.type!==L.FullSnapshot&&!(j.type===L.IncrementalSnapshot&&j.data.source===k.Mutation)&&Ce.forEach(ie=>ie.unfreeze()),U)t?.(ye(j),J);else if(F){let ie={type:"rrweb",event:ye(j),origin:window.location.origin,isCheckout:J};window.parent.postMessage(ie,"*")}if(j.type===L.FullSnapshot)Y=j,B=0;else if(j.type===L.IncrementalSnapshot){if(j.data.source===k.Mutation&&j.data.isAttachIframe)return;B++;let ie=a&&B>=a,W=s&&j.timestamp-Y.timestamp>s;(ie||W)&&tt(!0)}};let N=D=>{G({type:L.IncrementalSnapshot,data:{source:k.Mutation,...D}})},me=D=>G({type:L.IncrementalSnapshot,data:{source:k.Scroll,...D}}),ae=D=>G({type:L.IncrementalSnapshot,data:{source:k.CanvasMutation,...D}}),ke=D=>G({type:L.IncrementalSnapshot,data:{source:k.AdoptedStyleSheet,...D}}),K=new zr({mutationCb:N,adoptedStyleSheetCb:ke}),he=new Br({mirror:fe,mutationCb:N,stylesheetManager:K,recordCrossOriginIframes:C,wrappedEmit:G});for(let D of A||[])D.getMirror&&D.getMirror({nodeMirror:fe,crossOriginIframeMirror:he.crossOriginIframeMirror,crossOriginIframeStyleMirror:he.crossOriginIframeStyleMirror});let Se=new qr;Dr=new Wr({recordCanvas:w,mutationCb:ae,win:window,blockClass:r,blockSelector:c,mirror:fe,sampling:b.canvas,dataURLOptions:v});let we=new $r({mutationCb:N,scrollCb:me,bypassOptions:{blockClass:r,blockSelector:c,maskTextClass:l,maskTextSelector:p,inlineStylesheet:i,maskInputOptions:H,dataURLOptions:v,maskTextFn:u,maskInputFn:d,recordCanvas:w,inlineImages:T,sampling:b,slimDOMOptions:Q,iframeManager:he,stylesheetManager:K,canvasManager:Dr,keepIframeSrcFn:x,processedNodeManager:Se},mirror:fe});tt=(D=!1)=>{if(!y)return;G({type:L.Meta,data:{href:window.location.href,width:ln(),height:an()}},D),K.reset(),we.init(),Ce.forEach($=>$.lock());let J=_o(document,{mirror:fe,blockClass:r,blockSelector:c,maskTextClass:l,maskTextSelector:p,inlineStylesheet:i,maskAllInputs:H,maskTextFn:u,maskInputFn:d,slimDOM:Q,dataURLOptions:v,recordCanvas:w,inlineImages:T,onSerialize:$=>{hn($,fe)&&he.addIframe($),fn($,fe)&&K.trackLinkElement($),Pr($)&&we.addShadowRoot(_.shadowRoot($),document)},onIframeLoad:($,j)=>{he.attachIframe($,j),we.observeAttachShadow($)},onStylesheetLoad:($,j)=>{K.attachLinkElement($,j)},keepIframeSrcFn:x});if(!J)return console.warn("Failed to snapshot the document");G({type:L.FullSnapshot,data:{node:J,initialOffset:on(window)}},D),Ce.forEach($=>$.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&K.adoptStyleSheets(document.adoptedStyleSheets,fe.getId(document))};try{let D=[],J=j=>{var ie;return P(ja)({mutationCb:N,mousemoveCb:(W,xt)=>G({type:L.IncrementalSnapshot,data:{source:xt,positions:W}}),mouseInteractionCb:W=>G({type:L.IncrementalSnapshot,data:{source:k.MouseInteraction,...W}}),scrollCb:me,viewportResizeCb:W=>G({type:L.IncrementalSnapshot,data:{source:k.ViewportResize,...W}}),inputCb:W=>G({type:L.IncrementalSnapshot,data:{source:k.Input,...W}}),mediaInteractionCb:W=>G({type:L.IncrementalSnapshot,data:{source:k.MediaInteraction,...W}}),styleSheetRuleCb:W=>G({type:L.IncrementalSnapshot,data:{source:k.StyleSheetRule,...W}}),styleDeclarationCb:W=>G({type:L.IncrementalSnapshot,data:{source:k.StyleDeclaration,...W}}),canvasMutationCb:ae,fontCb:W=>G({type:L.IncrementalSnapshot,data:{source:k.Font,...W}}),selectionCb:W=>{G({type:L.IncrementalSnapshot,data:{source:k.Selection,...W}})},customElementCb:W=>{G({type:L.IncrementalSnapshot,data:{source:k.CustomElement,...W}})},blockClass:r,ignoreClass:f,ignoreSelector:m,maskTextClass:l,maskTextSelector:p,maskInputOptions:H,inlineStylesheet:i,sampling:b,recordDOM:y,recordCanvas:w,inlineImages:T,userTriggeredOnInput:O,collectFonts:M,doc:j,maskInputFn:d,maskTextFn:u,keepIframeSrcFn:x,blockSelector:c,slimDOMOptions:Q,dataURLOptions:v,mirror:fe,iframeManager:he,stylesheetManager:K,shadowDomManager:we,processedNodeManager:Se,canvasManager:Dr,ignoreCSSAttributes:ce,plugins:((ie=A?.filter(W=>W.observer))==null?void 0:ie.map(W=>({observer:W.observer,options:W.options,callback:xt=>G({type:L.Plugin,data:{plugin:W.name,payload:xt}})})))||[]},g)};he.addLoadListener(j=>{try{D.push(J(j.contentDocument))}catch(ie){console.warn(ie)}});let $=()=>{tt(),D.push(J(document)),ct=!0};return["interactive","complete"].includes(document.readyState)?$():(D.push(ee("DOMContentLoaded",()=>{G({type:L.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&$()})),D.push(ee("load",()=>{G({type:L.Load,data:{}}),R==="load"&&$()},window))),()=>{D.forEach(j=>{try{j()}catch(ie){String(ie).toLowerCase().includes("cross-origin")||console.warn(ie)}}),Se.destroy(),ct=!1,Ta()}}catch(D){console.warn(D)}}ue.addCustomEvent=(e,t)=>{if(!ct)throw new Error("please add custom event after start recording");G({type:L.Custom,data:{tag:e,payload:t}})};ue.freezePage=()=>{Ce.forEach(e=>e.freeze())};ue.takeFullSnapshot=e=>{if(!ct)throw new Error("please take full snapshot after start recording");tt(e)};ue.mirror=fe;var Ii;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Ii||(Ii={}));var rl=5*1e3;var{addCustomEvent:sl}=ue,{freezePage:il}=ue,{takeFullSnapshot:nl}=ue;function xn(e){let t=e.length;for(let s=0;s<e.length;s++){let a=e.charCodeAt(s);a<128||(a<2048?t++:a>=55296&&a<=56319&&s+1<e.length&&e.charCodeAt(s+1)>=56320&&e.charCodeAt(s+1)<=57343?(t+=2,s++):t+=2)}return t}var Ct=class{events=[];bytes=0;nextEvent=0;nextBatch=0;maxBytes=256*1024-128;get byteLength(){return this.bytes}get count(){return this.events.length}get lastEventNumber(){return this.nextEvent-1}get lastBatchNumber(){return this.nextBatch-1}canAppend(t){return this.events.length<4096&&this.bytes+xn(t)+1<=this.maxBytes}append(t){let s=xn(t)+1;if(s>this.maxBytes||this.bytes+s>this.maxBytes||this.events.length>=4096)throw new Error("Recording event exceeds the capture buffer limit.");this.events.push(t),this.bytes+=s,this.nextEvent++}seal(){if(this.events.length===0)return;if(this.nextBatch>=256)throw new Error("Recording exceeded the session batch limit.");let t=this.nextEvent-this.events.length,s=`{"firstEventNumber":${t},"events":[${this.events.join(",")}]}`;return this.events.length=0,this.bytes=0,{number:this.nextBatch++,firstEventNumber:t,lastEventNumber:this.nextEvent-1,body:s}}};var Ve=class extends Error{};var Et=class{constructor(t,s){this.baseUrl=t;this.token=s}baseUrl;token;abort=new AbortController;async put(t,s){let a=s,r={"Content-Type":"application/json","X-Leadping-Capture-Token":this.token};s.length>4096&&typeof CompressionStream<"u"&&(a=await new Response(new Blob([s]).stream().pipeThrough(new CompressionStream("gzip"))).arrayBuffer(),r["Content-Encoding"]="gzip");for(let c=0;c<5;c++){try{let f=await fetch(this.baseUrl+t,{method:"PUT",headers:r,body:a,credentials:"omit",redirect:"error",signal:AbortSignal.any([this.abort.signal,AbortSignal.timeout(15e3)])});if(f.ok)return;if(f.status<500&&f.status!==408&&f.status!==429)throw new Ve(`Capture rejected (${f.status}).`)}catch(f){if(f instanceof Ve||this.abort.signal.aborted)throw f}if(c===4)break;await this.delay(Math.min(8e3,500*2**c)+Math.random()*250)}throw new Error("Capture upload could not be acknowledged.")}dispose(){this.abort.abort()}delay(t){return new Promise((s,a)=>{this.abort.signal.throwIfAborted();let r=()=>{clearTimeout(c),a(this.abort.signal.reason)},c=setTimeout(()=>{this.abort.signal.removeEventListener("abort",r),s()},t);this.abort.signal.addEventListener("abort",r,{once:!0})})}};var _e=class e{constructor(t){this.options=t;if(e.active)throw new Error("Only one consent recorder may run in a document.");let s=new URL(t.apiUrl);if(s.protocol!=="https:"||s.username||s.password||s.search||s.hash)throw new Error("Capture API requires an HTTPS URL without credentials.");if(!/^[0-9a-f-]{36}$/i.test(t.session.sessionId)||t.session.form.origin!==location.origin||!t.form.contains(t.checkbox)||!t.form.contains(t.disclosure)||t.checkbox.type!=="checkbox"||t.checkbox.checked||t.checkbox.defaultChecked||t.disclosure.textContent!==t.session.form.disclosure)throw new Error("Form does not match the approved disclosure and unchecked consent control.");let a=Date.parse(t.session.expiresAt)-Date.now();if(!Number.isFinite(a)||a<=0||a>3600*1e3)throw new Error("Invalid or expired capture session.");this.transport=new Et(s.href.replace(/\/$/,"")+"/consent/sessions/"+t.session.sessionId,t.session.uploadToken),e.active=this;try{if(this.stopRecording=ue({emit:this.emit,maskAllInputs:!1,maskInputOptions:{},maskTextClass:/$^/,blockClass:/$^/,ignoreClass:"",slimDOMOptions:{},inlineStylesheet:!0,inlineImages:!0,recordCanvas:!1,recordCrossOriginIframes:!1,collectFonts:!1,sampling:{mousemove:100,mouseInteraction:!0,scroll:150,input:"all",media:1e3},errorHandler:()=>(this.fail(new Error("The page could not be fully recorded.")),!0)}),!this.stopRecording||this.failure)throw this.failure??new Error("Recorder failed to start.");t.checkbox.addEventListener("change",this.consentChanged),document.addEventListener("visibilitychange",this.visibilityChanged),this.interval=setInterval(this.backgroundFlush,3e3),this.expiry=setTimeout(()=>this.fail(new Error("Capture session expired.")),a),ue.addCustomEvent("leadping.disclosure",{formId:t.session.form.id})}catch(r){throw this.stop(),r}}options;static active;browser={userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,screenWidth:screen.width,screenHeight:screen.height,colorDepth:screen.colorDepth,pixelRatio:window.devicePixelRatio,hardwareConcurrency:navigator.hardwareConcurrency,maxTouchPoints:navigator.maxTouchPoints};buffer=new Ct;transport;pending=[];head=0;queuedBytes=0;sending;stopRecording;interval;expiry;failure;stopped=!1;finished;finish(t){return this.finished??=this.finishCore(t)}async flush(){if(this.failure)throw this.failure;for(this.seal();this.head<this.pending.length||this.sending;)this.sending??=this.send(),await this.sending;if(this.failure)throw this.failure}dispose(){this.stop(),this.transport.dispose()}async finishCore(t){if(this.stopped||this.failure)throw this.failure??new Error("Recorder is stopped.");let s=this.options.disclosure.textContent??"";if(s!==this.options.session.form.disclosure)throw new Error("The disclosure changed during capture. Start a new approved form session.");let a=this.options.checkbox.checked;return ue.addCustomEvent("leadping.submit",{accepted:a}),this.stop(),await this.flush(),await this.transport.put("/submission",JSON.stringify({lastBatchNumber:this.buffer.lastBatchNumber,lastEventNumber:this.buffer.lastEventNumber,accepted:a,observedDisclosure:s,recipient:t,browser:this.browser})),{sessionId:this.options.session.sessionId,uploadToken:this.options.session.uploadToken}}emit=t=>{if(!(this.stopped||this.failure))try{let s=JSON.stringify(t);this.buffer.canAppend(s)||this.seal(),this.buffer.append(s),this.buffer.byteLength>=64*1024&&this.backgroundFlush()}catch{this.fail(new Error("Recording exceeded its memory or event size limit."))}};seal(){let t=this.buffer.seal();if(t){if(this.queuedBytes+t.body.length*2>2*1024*1024)throw new Error("Recording upload backlog exceeded 2 MiB.");this.pending.push(t),this.queuedBytes+=t.body.length*2}}async send(){await Promise.resolve();try{for(;this.head<this.pending.length;){let t=this.pending[this.head];await this.transport.put("/batches/"+t.number,t.body),this.queuedBytes-=t.body.length*2,this.pending[this.head]=void 0,this.head++,this.head===this.pending.length&&(this.pending.length=0,this.head=0)}}catch(t){throw this.fail(t instanceof Error?t:new Error("Capture upload failed.")),this.failure}finally{this.sending=void 0}}consentChanged=()=>ue.addCustomEvent("leadping.consent",{accepted:this.options.checkbox.checked});visibilityChanged=()=>{document.visibilityState==="hidden"&&this.backgroundFlush()};backgroundFlush=()=>{this.flush().catch(t=>this.fail(t))};fail(t){this.failure||(this.failure=t,this.stop(),this.options.onError?.(t))}stop(){this.stopped=!0,this.stopRecording?.(),this.stopRecording=void 0,clearInterval(this.interval),clearTimeout(this.expiry),this.options.checkbox.removeEventListener("change",this.consentChanged),document.removeEventListener("visibilitychange",this.visibilityChanged),e.active===this&&(e.active=void 0)}};async function Rn(e){let t=e.dataset.domainId;if(!t)throw new Error("data-domain-id is required.");let s=document.querySelector(e.dataset.form??"#lead-form");if(!(s instanceof HTMLFormElement))throw new Error("Leadping form was not found.");if(s.dataset.leadpingAttached)throw new Error("Leadping is already attached to this form.");s.dataset.leadpingAttached="true";let a=s.querySelector("[data-leadping-disclosure]"),r=s.querySelector("[data-leadping-consent]"),c=document.createElement("p");c.setAttribute("role","status"),s.append(c);let f,m=!1,l=!1,p=d=>{m=!1,c.textContent="Unable to complete consent capture. Please reload to start again.",s.dispatchEvent(new CustomEvent("leadping:error",{detail:d}))},i=new URL(e.dataset.apiUrl??"https://consent.leadping.ai");if(i.protocol!=="https:"||i.username||i.password||i.search||i.hash||i.pathname!=="/")throw new Error("Leadping requires an HTTPS API origin.");let h=new URL(e.dataset.portalUrl??(i.hostname==="consent-local.leadping.ai"?"https://certificate-local.leadping.ai":"https://certificate.leadping.ai"));if(h.protocol!=="https:"||h.username||h.password||h.search||h.hash||h.pathname!=="/")throw new Error("Leadping requires an HTTPS portal origin.");let o=`${i.origin}/api/consent`,n=async(d,u)=>{let g=await fetch(o+d,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"omit",redirect:"error",body:JSON.stringify(u),signal:AbortSignal.timeout(3e4)});if(!g.ok)throw new Error(`Leadping request failed (${g.status}).`);return g};s.addEventListener("submit",async d=>{if(d.preventDefault(),!m||l||!f||!s.reportValidity())return;if(!(r instanceof HTMLInputElement)||!r.checked){c.textContent="Please check the consent box before submitting.";return}l=!0,m=!1,c.textContent="Submitting\u2026";let u=new FormData(s),g={};for(let b of["firstName","lastName","email","phone"]){let v=u.get(b);typeof v=="string"&&v&&(g[b]=v)}let S=!1;try{let b=await f.finish(g);S=!0;let v=await(await n("/certificates",b)).json();if(!/^[0-9a-f-]{36}$/i.test(v.certificateId))throw new Error("Invalid certificate response.");let E=`${h.origin}/${v.certificateId}`;c.textContent=`Certificate received: ${v.certificateId}. `;let y=document.createElement("a");y.href=E,y.textContent="View certificate and replay",y.target="_blank",y.rel="noopener noreferrer",c.append(y),s.dispatchEvent(new CustomEvent("leadping:success",{detail:{certificateId:v.certificateId,certificateUrl:E}}))}catch(b){p(b),S&&(c.textContent="Certificate issuance could not be confirmed. Please check before starting another recording.")}finally{f.dispose()}}),c.textContent="Loading consent\u2026";try{if(!(a instanceof HTMLElement)||!(r instanceof HTMLInputElement))throw new Error("Add data-leadping-disclosure and data-leadping-consent inside the form.");let d=await(await n(`/domains/${encodeURIComponent(t)}/sessions`,{pageUrl:location.href,disclosure:a.textContent??""})).json();r.checked=!1,f=new _e({apiUrl:i.origin+"/api",session:d,form:s,disclosure:a,checkbox:r,onError:p}),window.addEventListener("pagehide",()=>{m=!1,f?.dispose()},{once:!0}),m=!0,c.textContent="",s.dispatchEvent(new CustomEvent("leadping:ready"))}catch(d){throw f?.dispose(),p(d),d}}var as=document.currentScript;if(as instanceof HTMLScriptElement&&as.dataset.domainId){let e=()=>{Rn(as).catch(t=>console.error("Leadping consent initialization failed:",t))};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e()}return Dn(Ka);})();
|
|
128
|
+
`,Oi=typeof self<"u"&&self.Blob&&new Blob([En],{type:"text/javascript;charset=utf-8"});function Za(e){let t;try{if(t=Oi&&(self.URL||self.webkitURL).createObjectURL(Oi),!t)throw"";let s=new Worker(t,{name:e?.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),s}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(En),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Wr=class{constructor(t){I(this,"pendingCanvasMutations",new Map),I(this,"rafStamps",{latestId:0,invokeId:null}),I(this,"mirror"),I(this,"mutationCb"),I(this,"resetObservers"),I(this,"frozen",!1),I(this,"locked",!1),I(this,"processMutation",(l,d)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(d)});let{sampling:s="all",win:a,blockClass:r,blockSelector:c,recordCanvas:f,dataURLOptions:m}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,f&&s==="all"&&this.initCanvasMutationObserver(a,r,c),f&&typeof s=="number"&&this.initCanvasFPSObserver(s,a,r,c,{dataURLOptions:m})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,s,a,r,c){let f=Mi(s,a,r,!0),m=new Map,l=new Za;l.onmessage=p=>{let{id:u}=p.data;if(m.set(u,!1),!("base64"in p.data))return;let{base64:g,type:S,width:y,height:v}=p.data;this.mutationCb({id:u,type:_e["2D"],commands:[{property:"clearRect",args:[0,0,y,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:S}]},0,0]}]})};let d=1e3/t,i=0,h,o=()=>{let p=[];return s.document.querySelectorAll("canvas").forEach(u=>{te(u,a,r,!0)||p.push(u)}),p},n=p=>{if(i&&p-i<d){h=requestAnimationFrame(n);return}i=p,o().forEach(async u=>{var g;let S=this.mirror.getId(u);if(m.get(S)||u.width===0||u.height===0)return;if(m.set(S,!0),["webgl","webgl2"].includes(u.__context)){let v=u.getContext(u.__context);((g=v?.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}let y=await createImageBitmap(u);l.postMessage({id:S,bitmap:y,width:u.width,height:u.height,dataURLOptions:c.dataURLOptions},[y])}),h=requestAnimationFrame(n)};h=requestAnimationFrame(n),this.resetObservers=()=>{f(),cancelAnimationFrame(h)}}initCanvasMutationObserver(t,s,a){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let r=Mi(t,s,a,!1),c=Ja(this.processMutation.bind(this),t,s,a),f=Qa(this.processMutation.bind(this),t,s,a);this.resetObservers=()=>{r(),c(),f()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=s=>{this.rafStamps.latestId=s,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,s)=>{let a=this.mirror.getId(s);this.flushPendingCanvasMutationFor(s,a)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,s){if(this.frozen||this.locked)return;let a=this.pendingCanvasMutations.get(t);if(!a||s===-1)return;let r=a.map(f=>{let{type:m,...l}=f;return l}),{type:c}=a[0];this.mutationCb({id:s,type:c,commands:r}),this.pendingCanvasMutations.delete(t)}},zr=class{constructor(t){I(this,"trackedLinkElements",new WeakSet),I(this,"mutationCb"),I(this,"adoptedStyleSheetCb"),I(this,"styleMirror",new Lr),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,s){"_cssText"in s.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:s.id,attributes:s.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,s){if(t.length===0)return;let a={id:s,styleIds:[]},r=[];for(let c of t){let f;this.styleMirror.has(c)?f=this.styleMirror.getId(c):(f=this.styleMirror.add(c),r.push({styleId:f,rules:Array.from(c.rules||CSSRule,(m,l)=>({rule:ki(m,c.href),index:l}))})),a.styleIds.push(f)}r.length>0&&(a.styles=r),this.adoptedStyleSheetCb(a)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},qr=class{constructor(){I(this,"nodeMap",new WeakMap),I(this,"active",!1)}inOtherBuffer(t,s){let a=this.nodeMap.get(t);return a&&Array.from(a).some(r=>r!==s)}add(t,s){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(s))}destroy(){}},G,tt,Ar,ct=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((ls=e.contentWindow)==null?void 0:ls.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var fe=oo();function ue(e={}){let{emit:t,checkoutEveryNms:s,checkoutEveryNth:a,blockClass:r="rr-block",blockSelector:c=null,ignoreClass:f="rr-ignore",ignoreSelector:m=null,maskTextClass:l="rr-mask",maskTextSelector:d=null,inlineStylesheet:i=!0,maskAllInputs:h,maskInputOptions:o,slimDOMOptions:n,maskInputFn:p,maskTextFn:u,hooks:g,packFn:S,sampling:y={},dataURLOptions:v={},mousemoveWait:E,recordDOM:b=!0,recordCanvas:w=!1,recordCrossOriginIframes:C=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:O=!1,collectFonts:M=!1,inlineImages:T=!1,plugins:D,keepIframeSrcFn:x=()=>!1,ignoreCSSAttributes:ce=new Set([]),errorHandler:se}=e;Aa(se);let U=C?window.parent===window:!0,F=!1;if(!U)try{window.parent.document&&(F=!1)}catch{F=!0}if(U&&!t)throw new Error("emit function is required");if(!U&&!F)return()=>{};E!==void 0&&y.mousemove===void 0&&(y.mousemove=E),fe.reset();let H=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}:o!==void 0?o:{password:!0},Q=Wi(n);Na();let Y,B=0,ye=A=>{for(let J of D||[])J.eventProcessor&&(A=J.eventProcessor(A));return S&&!F&&(A=S(A)),A};G=(A,J)=>{var $;let j=A;if(j.timestamp=$e(),($=Ee[0])!=null&&$.isFrozen()&&j.type!==L.FullSnapshot&&!(j.type===L.IncrementalSnapshot&&j.data.source===k.Mutation)&&Ee.forEach(ie=>ie.unfreeze()),U)t?.(ye(j),J);else if(F){let ie={type:"rrweb",event:ye(j),origin:window.location.origin,isCheckout:J};window.parent.postMessage(ie,"*")}if(j.type===L.FullSnapshot)Y=j,B=0;else if(j.type===L.IncrementalSnapshot){if(j.data.source===k.Mutation&&j.data.isAttachIframe)return;B++;let ie=a&&B>=a,W=s&&j.timestamp-Y.timestamp>s;(ie||W)&&tt(!0)}};let N=A=>{G({type:L.IncrementalSnapshot,data:{source:k.Mutation,...A}})},me=A=>G({type:L.IncrementalSnapshot,data:{source:k.Scroll,...A}}),ae=A=>G({type:L.IncrementalSnapshot,data:{source:k.CanvasMutation,...A}}),Pe=A=>G({type:L.IncrementalSnapshot,data:{source:k.AdoptedStyleSheet,...A}}),K=new zr({mutationCb:N,adoptedStyleSheetCb:Pe}),he=new Br({mirror:fe,mutationCb:N,stylesheetManager:K,recordCrossOriginIframes:C,wrappedEmit:G});for(let A of D||[])A.getMirror&&A.getMirror({nodeMirror:fe,crossOriginIframeMirror:he.crossOriginIframeMirror,crossOriginIframeStyleMirror:he.crossOriginIframeStyleMirror});let Ce=new qr;Ar=new Wr({recordCanvas:w,mutationCb:ae,win:window,blockClass:r,blockSelector:c,mirror:fe,sampling:y.canvas,dataURLOptions:v});let we=new $r({mutationCb:N,scrollCb:me,bypassOptions:{blockClass:r,blockSelector:c,maskTextClass:l,maskTextSelector:d,inlineStylesheet:i,maskInputOptions:H,dataURLOptions:v,maskTextFn:u,maskInputFn:p,recordCanvas:w,inlineImages:T,sampling:y,slimDOMOptions:Q,iframeManager:he,stylesheetManager:K,canvasManager:Ar,keepIframeSrcFn:x,processedNodeManager:Ce},mirror:fe});tt=(A=!1)=>{if(!b)return;G({type:L.Meta,data:{href:window.location.href,width:ln(),height:an()}},A),K.reset(),we.init(),Ee.forEach($=>$.lock());let J=_o(document,{mirror:fe,blockClass:r,blockSelector:c,maskTextClass:l,maskTextSelector:d,inlineStylesheet:i,maskAllInputs:H,maskTextFn:u,maskInputFn:p,slimDOM:Q,dataURLOptions:v,recordCanvas:w,inlineImages:T,onSerialize:$=>{hn($,fe)&&he.addIframe($),fn($,fe)&&K.trackLinkElement($),Pr($)&&we.addShadowRoot(_.shadowRoot($),document)},onIframeLoad:($,j)=>{he.attachIframe($,j),we.observeAttachShadow($)},onStylesheetLoad:($,j)=>{K.attachLinkElement($,j)},keepIframeSrcFn:x});if(!J)return console.warn("Failed to snapshot the document");G({type:L.FullSnapshot,data:{node:J,initialOffset:on(window)}},A),Ee.forEach($=>$.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&K.adoptStyleSheets(document.adoptedStyleSheets,fe.getId(document))};try{let A=[],J=j=>{var ie;return P(ja)({mutationCb:N,mousemoveCb:(W,xt)=>G({type:L.IncrementalSnapshot,data:{source:xt,positions:W}}),mouseInteractionCb:W=>G({type:L.IncrementalSnapshot,data:{source:k.MouseInteraction,...W}}),scrollCb:me,viewportResizeCb:W=>G({type:L.IncrementalSnapshot,data:{source:k.ViewportResize,...W}}),inputCb:W=>G({type:L.IncrementalSnapshot,data:{source:k.Input,...W}}),mediaInteractionCb:W=>G({type:L.IncrementalSnapshot,data:{source:k.MediaInteraction,...W}}),styleSheetRuleCb:W=>G({type:L.IncrementalSnapshot,data:{source:k.StyleSheetRule,...W}}),styleDeclarationCb:W=>G({type:L.IncrementalSnapshot,data:{source:k.StyleDeclaration,...W}}),canvasMutationCb:ae,fontCb:W=>G({type:L.IncrementalSnapshot,data:{source:k.Font,...W}}),selectionCb:W=>{G({type:L.IncrementalSnapshot,data:{source:k.Selection,...W}})},customElementCb:W=>{G({type:L.IncrementalSnapshot,data:{source:k.CustomElement,...W}})},blockClass:r,ignoreClass:f,ignoreSelector:m,maskTextClass:l,maskTextSelector:d,maskInputOptions:H,inlineStylesheet:i,sampling:y,recordDOM:b,recordCanvas:w,inlineImages:T,userTriggeredOnInput:O,collectFonts:M,doc:j,maskInputFn:p,maskTextFn:u,keepIframeSrcFn:x,blockSelector:c,slimDOMOptions:Q,dataURLOptions:v,mirror:fe,iframeManager:he,stylesheetManager:K,shadowDomManager:we,processedNodeManager:Ce,canvasManager:Ar,ignoreCSSAttributes:ce,plugins:((ie=D?.filter(W=>W.observer))==null?void 0:ie.map(W=>({observer:W.observer,options:W.options,callback:xt=>G({type:L.Plugin,data:{plugin:W.name,payload:xt}})})))||[]},g)};he.addLoadListener(j=>{try{A.push(J(j.contentDocument))}catch(ie){console.warn(ie)}});let $=()=>{tt(),A.push(J(document)),ct=!0};return["interactive","complete"].includes(document.readyState)?$():(A.push(ee("DOMContentLoaded",()=>{G({type:L.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&$()})),A.push(ee("load",()=>{G({type:L.Load,data:{}}),R==="load"&&$()},window))),()=>{A.forEach(j=>{try{j()}catch(ie){String(ie).toLowerCase().includes("cross-origin")||console.warn(ie)}}),Ce.destroy(),ct=!1,Ta()}}catch(A){console.warn(A)}}ue.addCustomEvent=(e,t)=>{if(!ct)throw new Error("please add custom event after start recording");G({type:L.Custom,data:{tag:e,payload:t}})};ue.freezePage=()=>{Ee.forEach(e=>e.freeze())};ue.takeFullSnapshot=e=>{if(!ct)throw new Error("please take full snapshot after start recording");tt(e)};ue.mirror=fe;var Ii;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Ii||(Ii={}));var sl=5*1e3;var{addCustomEvent:il}=ue,{freezePage:nl}=ue,{takeFullSnapshot:ol}=ue;function xn(e){let t=e.length;for(let s=0;s<e.length;s++){let a=e.charCodeAt(s);a<128||(a<2048?t++:a>=55296&&a<=56319&&s+1<e.length&&e.charCodeAt(s+1)>=56320&&e.charCodeAt(s+1)<=57343?(t+=2,s++):t+=2)}return t}var Ct=class{events=[];bytes=0;nextEvent=0;nextBatch=0;maxBytes=256*1024-128;get byteLength(){return this.bytes}get count(){return this.events.length}get lastEventNumber(){return this.nextEvent-1}get lastBatchNumber(){return this.nextBatch-1}canAppend(t){return this.events.length<4096&&this.bytes+xn(t)+1<=this.maxBytes}append(t){let s=xn(t)+1;if(s>this.maxBytes||this.bytes+s>this.maxBytes||this.events.length>=4096)throw new Error("Recording event exceeds the capture buffer limit.");this.events.push(t),this.bytes+=s,this.nextEvent++}seal(){if(this.events.length===0)return;if(this.nextBatch>=256)throw new Error("Recording exceeded the session batch limit.");let t=this.nextEvent-this.events.length,s=`{"firstEventNumber":${t},"events":[${this.events.join(",")}]}`;return this.events.length=0,this.bytes=0,{number:this.nextBatch++,firstEventNumber:t,lastEventNumber:this.nextEvent-1,body:s}}};var Et=class{constructor(t,s){this.baseUrl=t;this.token=s}baseUrl;token;abort=new AbortController;async put(t,s){let a=s,r={"Content-Type":"application/json","X-Leadping-Capture-Token":this.token};s.length>4096&&typeof CompressionStream<"u"&&(a=await new Response(new Blob([s]).stream().pipeThrough(new CompressionStream("gzip"))).arrayBuffer(),r["Content-Encoding"]="gzip");for(let c=0;c<5;c++){try{let f=await fetch(this.baseUrl+t,{method:"PUT",headers:r,body:a,credentials:"omit",redirect:"error",signal:AbortSignal.any([this.abort.signal,AbortSignal.timeout(15e3)])});if(f.ok)return;if(f.status<500&&f.status!==408&&f.status!==429)throw new be(`Capture rejected (${f.status}).`)}catch(f){if(f instanceof be||this.abort.signal.aborted)throw f}if(c===4)break;await this.delay(Math.min(8e3,500*2**c)+Math.random()*250)}throw new Error("Capture upload could not be acknowledged.")}dispose(){this.abort.abort()}delay(t){return new Promise((s,a)=>{this.abort.signal.throwIfAborted();let r=()=>{clearTimeout(c),a(this.abort.signal.reason)},c=setTimeout(()=>{this.abort.signal.removeEventListener("abort",r),s()},t);this.abort.signal.addEventListener("abort",r,{once:!0})})}};var ke=class e{constructor(t){this.options=t;if(e.active)throw new Error("Only one consent recorder may run in a document.");let s=new URL(t.apiUrl);if(s.protocol!=="https:"||s.username||s.password||s.search||s.hash)throw new Error("Capture API requires an HTTPS URL without credentials.");if(!t.form.contains(t.checkbox)||!t.form.contains(t.disclosure)||t.checkbox.type!=="checkbox"||t.checkbox.checked||t.checkbox.defaultChecked)throw new Error("Form requires an unchecked consent control and disclosure.");this.observedDisclosure=t.disclosure.textContent??"",this.ready=Promise.resolve().then(()=>typeof t.session=="function"?t.session():t.session).then(a=>{if(this.disposed||this.failure)throw this.failure??new Error("Recorder is disposed.");if(!/^[0-9a-f-]{36}$/i.test(a.sessionId)||a.form.origin!==location.origin||a.form.disclosure!==this.observedDisclosure)throw new Error("Form does not match the approved disclosure.");let r=Date.parse(a.expiresAt)-Date.now();if(!Number.isFinite(r)||r<=0||r>3600*1e3)throw new Error("Invalid or expired capture session.");this.session=a,this.transport=new Et(s.href.replace(/\/$/,"")+"/consent/sessions/"+a.sessionId,a.uploadToken),this.stopped||(this.expiry=setTimeout(()=>this.fail(new Error("Capture session expired.")),r))}),this.ready.then(this.backgroundFlush).catch(a=>this.fail(a)),e.active=this;try{if(this.stopRecording=ue({emit:this.emit,maskAllInputs:!1,maskInputOptions:{},maskTextClass:/$^/,blockClass:/$^/,ignoreClass:"",slimDOMOptions:{},inlineStylesheet:!0,inlineImages:!0,recordCanvas:!1,recordCrossOriginIframes:!1,collectFonts:!1,sampling:{mousemove:100,mouseInteraction:!0,scroll:150,input:"all",media:1e3},errorHandler:()=>(this.fail(new Error("The page could not be fully recorded.")),!0)}),!this.stopRecording||this.failure)throw this.failure??new Error("Recorder failed to start.");t.checkbox.addEventListener("change",this.consentChanged),document.addEventListener("visibilitychange",this.visibilityChanged),this.interval=setInterval(this.backgroundFlush,3e3),ue.addCustomEvent("leadping.disclosure",{disclosure:this.observedDisclosure})}catch(a){throw this.dispose(),a}}options;static active;browser={userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,screenWidth:screen.width,screenHeight:screen.height,colorDepth:screen.colorDepth,pixelRatio:window.devicePixelRatio,hardwareConcurrency:navigator.hardwareConcurrency,maxTouchPoints:navigator.maxTouchPoints};buffer=new Ct;transport;ready;session;observedDisclosure;disposed=!1;pending=[];head=0;queuedBytes=0;sending;stopRecording;interval;expiry;failure;stopped=!1;finished;finish(t){return this.finished??=this.finishCore(t)}async flush(){if(this.failure)throw this.failure;if(this.seal(),await this.ready,this.failure||this.disposed)throw this.failure??new Error("Recorder is disposed.");for(;this.head<this.pending.length||this.sending;)this.sending??=this.send(),await this.sending;if(this.failure)throw this.failure}dispose(){this.disposed=!0,this.stop(),this.transport?.dispose()}async finishCore(t){if(this.stopped||this.failure)throw this.failure??new Error("Recorder is stopped.");let s=this.options.disclosure.textContent??"";if(s!==this.observedDisclosure)throw new Error("The disclosure changed during capture. Start a new approved form session.");let a=this.options.checkbox.checked;return ue.addCustomEvent("leadping.submit",{accepted:a}),this.stop(),await this.flush(),await this.transport.put("/submission",JSON.stringify({lastBatchNumber:this.buffer.lastBatchNumber,lastEventNumber:this.buffer.lastEventNumber,accepted:a,observedDisclosure:s,recipient:t,browser:this.browser})),{sessionId:this.session.sessionId,uploadToken:this.session.uploadToken}}emit=t=>{if(!(this.stopped||this.failure))try{let s=JSON.stringify(t);this.buffer.canAppend(s)||this.seal(),this.buffer.append(s),this.buffer.byteLength>=64*1024&&this.backgroundFlush()}catch{this.fail(new Error("Recording exceeded its memory or event size limit."))}};seal(){let t=this.buffer.seal();if(t){if(this.queuedBytes+t.body.length*2>2*1024*1024)throw new Error("Recording upload backlog exceeded 2 MiB.");this.pending.push(t),this.queuedBytes+=t.body.length*2}}async send(){await Promise.resolve();try{for(;this.head<this.pending.length;){let t=this.pending[this.head];await this.transport.put("/batches/"+t.number,t.body),this.queuedBytes-=t.body.length*2,this.pending[this.head]=void 0,this.head++,this.head===this.pending.length&&(this.pending.length=0,this.head=0)}}catch(t){throw this.fail(t instanceof Error?t:new Error("Capture upload failed.")),this.failure}finally{this.sending=void 0}}consentChanged=()=>ue.addCustomEvent("leadping.consent",{accepted:this.options.checkbox.checked});visibilityChanged=()=>{document.visibilityState==="hidden"&&this.backgroundFlush()};backgroundFlush=()=>{this.flush().catch(t=>this.fail(t))};fail(t){this.failure||(this.failure=t,this.stop(),this.options.onError?.(t))}stop(){this.stopped=!0,this.stopRecording?.(),this.stopRecording=void 0,clearInterval(this.interval),clearTimeout(this.expiry),this.options.checkbox.removeEventListener("change",this.consentChanged),document.removeEventListener("visibilitychange",this.visibilityChanged),e.active===this&&(e.active=void 0)}};async function Rn(e){let t=e.dataset.domainId;if(!t)throw new Error("data-domain-id is required.");let s=document.querySelector(e.dataset.form??"#lead-form");if(!(s instanceof HTMLFormElement))throw new Error("Leadping form was not found.");if(s.dataset.leadpingAttached)throw new Error("Leadping is already attached to this form.");s.dataset.leadpingAttached="true";let a=s.querySelector("[data-leadping-disclosure]"),r=s.querySelector("[data-leadping-consent]"),c=document.createElement("p");c.setAttribute("role","status"),s.append(c);let f,m=!1,l=n=>{c.textContent="Unable to complete consent capture. Please reload to start again.",s.dispatchEvent(new CustomEvent("leadping:error",{detail:n}))},d=new URL(e.dataset.apiUrl??"https://consent.leadping.ai");if(d.protocol!=="https:"||d.username||d.password||d.search||d.hash||d.pathname!=="/")throw new Error("Leadping requires an HTTPS API origin.");let i=new URL(e.dataset.portalUrl??(d.hostname==="consent-local.leadping.ai"?"https://certificate-local.leadping.ai":"https://certificate.leadping.ai"));if(i.protocol!=="https:"||i.username||i.password||i.search||i.hash||i.pathname!=="/")throw new Error("Leadping requires an HTTPS portal origin.");let h=`${d.origin}/api/consent`,o=async(n,p)=>{let u=n.endsWith("/sessions")?5:1;for(let g=0;g<u;g++){try{let S=await fetch(h+n,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"omit",redirect:"error",body:JSON.stringify(p),signal:AbortSignal.timeout(u>1?15e3:3e4)});if(S.ok)return S;throw S.status<500&&S.status!==408&&S.status!==429?new be(`Leadping request failed (${S.status}).`):new Error(`Leadping request failed (${S.status}).`)}catch(S){if(S instanceof be||g===u-1)throw S}await new Promise(S=>setTimeout(S,500*2**g))}throw new Error("Leadping session could not be started.")};s.addEventListener("submit",async n=>{if(n.preventDefault(),m||!f||!s.reportValidity())return;if(!(r instanceof HTMLInputElement)||!r.checked){c.textContent="Please check the consent box before submitting.";return}m=!0,c.textContent="Submitting\u2026";let p=new FormData(s),u={};for(let S of["firstName","lastName","email","phone"]){let y=p.get(S);typeof y=="string"&&y&&(u[S]=y)}let g=!1;try{let S=await f.finish(u);g=!0;let y=await(await o("/certificates",S)).json();if(!/^[0-9a-f-]{36}$/i.test(y.certificateId))throw new Error("Invalid certificate response.");let v=`${i.origin}/${y.certificateId}`;c.textContent=`Certificate received: ${y.certificateId}. `;let E=document.createElement("a");E.href=v,E.textContent="View certificate and replay",E.target="_blank",E.rel="noopener noreferrer",c.append(E),s.dispatchEvent(new CustomEvent("leadping:success",{detail:{certificateId:y.certificateId,certificateUrl:v}}))}catch(S){l(S),g&&(c.textContent="Certificate issuance could not be confirmed. Please check before starting another recording.")}finally{f.dispose()}}),c.textContent="Loading consent\u2026";try{if(!(a instanceof HTMLElement)||!(r instanceof HTMLInputElement))throw new Error("Add data-leadping-disclosure and data-leadping-consent inside the form.");let n=location.href,p=a.textContent??"";f=new ke({apiUrl:d.origin+"/api",session:async()=>(await o(`/domains/${encodeURIComponent(t)}/sessions`,{pageUrl:n,disclosure:p})).json(),form:s,disclosure:a,checkbox:r,onError:l}),window.addEventListener("pagehide",()=>{f?.dispose()},{once:!0}),await f.ready,m||(c.textContent=""),s.dispatchEvent(new CustomEvent("leadping:ready"))}catch(n){throw f?.dispose(),l(n),n}}var as=document.currentScript;if(as instanceof HTMLScriptElement&&as.dataset.domainId){let e=()=>{Rn(as).catch(t=>console.error("Leadping consent initialization failed:",t))};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e()}return An(Ka);})();
|
|
129
129
|
//# sourceMappingURL=leadping-consent.min.js.map
|