@bworlds/launchkit 0.1.1 → 0.1.5
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/launchkit.cjs +26 -26
- package/dist/launchkit.cjs.map +1 -1
- package/dist/launchkit.js +2033 -1951
- package/dist/launchkit.js.map +1 -1
- package/dist/launchkit.umd.js +26 -26
- package/dist/launchkit.umd.js.map +1 -1
- package/package.json +10 -7
package/dist/launchkit.cjs
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var Wa=Object.defineProperty,Ha=(s,e,t)=>e in s?Wa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,S=(s,e,t)=>Ha(s,typeof e!="symbol"?e+"":e,t),gi,ja=Object.defineProperty,Ga=(s,e,t)=>e in s?ja(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,yi=(s,e,t)=>Ga(s,typeof e!="symbol"?e+"":e,t),K=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(K||{});const wi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},bi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},wt={},Va=()=>!!globalThis.Zone;function Ps(s){if(wt[s])return wt[s];const e=globalThis[s],t=e.prototype,r=s in wi?wi[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=s in bi?bi[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!Va())return wt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?wt[s]=u:t}catch{return t}}const Ar={};function we(s,e,t){var r;const i=`${s}.${String(t)}`;if(Ar[i])return Ar[i].call(e);const n=Ps(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Ar[i]=o,o.call(e)):e[t]}const Or={};function On(s,e,t){const r=`${s}.${String(t)}`;if(Or[r])return Or[r].bind(e);const n=Ps(s)[t];return typeof n!="function"?e[t]:(Or[r]=n,n.bind(e))}function Ya(s){return we("Node",s,"childNodes")}function Za(s){return we("Node",s,"parentNode")}function Ja(s){return we("Node",s,"parentElement")}function Xa(s){return we("Node",s,"textContent")}function Ka(s,e){return On("Node",s,"contains")(e)}function Qa(s){return On("Node",s,"getRootNode")()}function qa(s){return!s||!("host"in s)?null:we("ShadowRoot",s,"host")}function el(s){return s.styleSheets}function tl(s){return!s||!("shadowRoot"in s)?null:we("Element",s,"shadowRoot")}function rl(s,e){return we("Element",s,"querySelector")(e)}function sl(s,e){return we("Element",s,"querySelectorAll")(e)}function il(){return Ps("MutationObserver").constructor}const q={childNodes:Ya,parentNode:Za,parentElement:Ja,textContent:Xa,contains:Ka,getRootNode:Qa,host:qa,styleSheets:el,shadowRoot:tl,querySelector:rl,querySelectorAll:sl,mutationObserver:il};function $n(s){return s.nodeType===s.ELEMENT_NODE}function Xe(s){const e=s&&"host"in s&&"mode"in s&&q.host(s)||null;return!!(e&&"shadowRoot"in e&&q.shadowRoot(e)===s)}function Ke(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function nl(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function ol(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Yr(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>Nn(i,t)).join("");return nl(r)}catch{return null}}function Nn(s,e){if(ll(s)){let t;try{t=Yr(s.styleSheet)||ol(s)}catch{t=s.cssText}return s.styleSheet.href?Qt(t,s.styleSheet.href):t}else{let t=s.cssText;return ul(s)&&s.selectorText.includes(":")&&(t=al(t)),e?Qt(t,e):t}}function al(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function ll(s){return"styleSheet"in s}function ul(s){return"selectorText"in s}class Tn{constructor(){yi(this,"idNodeMap",new Map),yi(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function cl(){return new Tn}function Ds({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const l=r&&Ie(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function Ie(s){return s.toLowerCase()}const vi="__rrweb_original__";function hl(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const n=e.getImageData,o=vi in n?n[vi]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Ls(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Ie(e):null}function Pn(s,e){let t;try{t=new URL(s,e??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(i==null?void 0:i[1])??null}function fl(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const dl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,pl=/^(?:[a-z+]+:)?\/\//i,ml=/^www\..*/i,gl=/^(data:)([^,]*),(.*)/i;function Qt(s,e){return(s||"").replace(dl,(t,r,i,n,o,l)=>{const a=i||o||l,u=r||n||"";if(!a)return t;if(pl.test(a)||ml.test(a))return`url(${u}${a}${u})`;if(gl.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${fl(e)+a}${u})`;const c=e.split("/"),h=a.split("/");c.pop();for(const p of h)p!=="."&&(p===".."?c.pop():c.push(p));return`url(${u}${c.join("/")}${u})`})}function $r(s){return s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function yl(s,e){const t=Array.from(e.childNodes),r=[];if(t.length>1&&s&&typeof s=="string"){const i=$r(s);for(let n=1;n<t.length;n++)if(t[n].textContent&&typeof t[n].textContent=="string"){const o=$r(t[n].textContent);for(let l=3;l<o.length;l++){const a=o.substring(0,l);if(i.split(a).length===2){const u=i.indexOf(a);for(let c=u;c<s.length;c++)if($r(s.substring(0,c)).length===u){r.push(s.substring(0,c)),s=s.substring(c);break}break}}}}return r.push(s),r}function wl(s,e){return yl(s,e).join("/* rr_split */")}let bl=1;const vl=new RegExp("[^a-z0-9-_:]"),qe=-2;function Dn(){return bl++}function Sl(s){if(s instanceof HTMLFormElement)return"form";const e=Ie(s.tagName);return vl.test(e)?"div":e}let Ee,Si;const Cl=/^[^ \t\n\r\u000c]+/,_l=/^[, \t\n\r\u000c]+/;function xl(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o;const l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}const i=[];for(;r(_l),!(t>=e.length);){let n=r(Cl);if(n.slice(-1)===",")n=Oe(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=Oe(s,n);let l=!1;for(;;){const a=e.charAt(t);if(a===""){i.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return i.join(", ")}const Ci=new WeakMap;function Oe(s,e){return!e||e.trim()===""?e:Fs(s,e)}function Il(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Fs(s,e){let t=Ci.get(s);if(t||(t=s.createElement("a"),Ci.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Ln(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Oe(s,r):t==="srcset"?xl(s,r):t==="style"?Qt(r,Fs(s)):e==="object"&&t==="data"?Oe(s,r):r)}function Fn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function Rl(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch{}return!1}function qt(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?qt(q.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?qt(q.parentNode(s),e,t):!1}function Un(s,e,t,r){let i;if($n(s)){if(i=s,!q.childNodes(i).length)return!1}else{if(q.parentElement(s)===null)return!1;i=q.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(qt(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}function kl(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch{return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function El(s,e,t){let r=!1,i;try{i=s.sheet}catch{return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function Ml(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m=!1,cssCaptured:f=!1}=e,v=Al(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:K.Document,childNodes:[],compatMode:s.compatMode}:{type:K.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:K.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:v};case s.ELEMENT_NODE:return $l(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:c,dataURLOptions:h,inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m,rootId:v});case s.TEXT_NODE:return Ol(s,{doc:t,needsMask:o,maskTextFn:u,rootId:v,cssCaptured:f});case s.CDATA_SECTION_NODE:return{type:K.CDATA,textContent:"",rootId:v};case s.COMMENT_NODE:return{type:K.Comment,textContent:q.textContent(s)||"",rootId:v};default:return!1}}function Al(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Ol(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=q.parentNode(s),l=o&&o.tagName;let a="";const u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?a="SCRIPT_PLACEHOLDER":n||(a=q.textContent(s),u&&a&&(a=Qt(a,Fs(e.doc)))),!u&&!c&&a&&t&&(a=r?r(a,q.parentElement(s)):a.replace(/[\S]/g,"*")),{type:K.Text,textContent:a||"",rootId:i}}function $l(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:d}=e,g=Rl(s,r,i),m=Sl(s);let f={};const v=s.attributes.length;for(let y=0;y<v;y++){const C=s.attributes[y];Fn(m,C.name,C.value)||(f[C.name]=Ln(t,m,Ie(C.name),C.value))}if(m==="link"&&n){const y=Array.from(t.styleSheets).find(k=>k.href===s.href);let C=null;y&&(C=Yr(y)),C&&(delete f.rel,delete f.href,f._cssText=C)}if(m==="style"&&s.sheet){let y=Yr(s.sheet);y&&(s.childNodes.length>1&&(y=wl(y,s)),f._cssText=y)}if(m==="input"||m==="textarea"||m==="select"){const y=s.value,C=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=Ds({element:s,type:Ls(s),tagName:m,value:y,maskInputOptions:o,maskInputFn:l}):C&&(f.checked=C)}if(m==="option"&&(s.selected&&!o.select?f.selected=!0:delete f.selected),m==="dialog"&&s.open&&(f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&c){if(s.__context==="2d")hl(s)||(f.rr_dataURL=s.toDataURL(a.type,a.quality));else if(!("__context"in s)){const y=s.toDataURL(a.type,a.quality),C=t.createElement("canvas");C.width=s.width,C.height=s.height;const k=C.toDataURL(a.type,a.quality);y!==k&&(f.rr_dataURL=y)}}if(m==="img"&&u){Ee||(Ee=t.createElement("canvas"),Si=Ee.getContext("2d"));const y=s,C=y.currentSrc||y.getAttribute("src")||"<unknown-src>",k=y.crossOrigin,M=()=>{y.removeEventListener("load",M);try{Ee.width=y.naturalWidth,Ee.height=y.naturalHeight,Si.drawImage(y,0,0),f.rr_dataURL=Ee.toDataURL(a.type,a.quality)}catch(V){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?M():y.addEventListener("load",M);return}else console.warn(`Cannot inline img src=${C}! Error: ${V}`)}y.crossOrigin==="anonymous"&&(k?f.crossOrigin=k:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?M():y.addEventListener("load",M)}if(m==="audio"||m==="video"){const y=f;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(p||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),g){const{width:y,height:C}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${C}px`}}m==="iframe"&&!h(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let b;try{customElements.get(m)&&(b=!0)}catch{}return{type:K.Element,tagName:m,attributes:f,childNodes:[],isSVG:Il(s)||void 0,needBlock:g,rootId:d,isCustom:b}}function L(s){return s==null?"":s.toLowerCase()}function Nl(s,e){if(e.comment&&s.type===K.Comment)return!0;if(s.type===K.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"||s.attributes.rel==="modulepreload")&&s.attributes.as==="script"||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Pn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(L(s.attributes.name).match(/^msapplication-tile(image|color)$/)||L(s.attributes.name)==="application-name"||L(s.attributes.rel)==="icon"||L(s.attributes.rel)==="apple-touch-icon"||L(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&L(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(L(s.attributes.property).match(/^(og|twitter|fb):/)||L(s.attributes.name).match(/^(og|twitter):/)||L(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(L(s.attributes.name)==="robots"||L(s.attributes.name)==="googlebot"||L(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(L(s.attributes.name)==="author"||L(s.attributes.name)==="generator"||L(s.attributes.name)==="framework"||L(s.attributes.name)==="publisher"||L(s.attributes.name)==="progid"||L(s.attributes.property).match(/^article:/)||L(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(L(s.attributes.name)==="google-site-verification"||L(s.attributes.name)==="yandex-verification"||L(s.attributes.name)==="csrf-token"||L(s.attributes.name)==="p:domain_verify"||L(s.attributes.name)==="verify-v1"||L(s.attributes.name)==="verification"||L(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function $e(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g={},inlineImages:m=!1,recordCanvas:f=!1,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:V=!1,cssCaptured:O=!1}=e;let{needsMask:D}=e,{preserveWhiteSpace:Y=!0}=e;D||(D=Un(s,o,l,D===void 0));const W=Ml(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:D,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:f,keepIframeSrcFn:M,newlyAddedElement:V,cssCaptured:O});if(!W)return console.warn(s,"not serialized"),null;let Q;r.hasNode(s)?Q=r.getId(s):Nl(W,d)||!Y&&W.type===K.Text&&!W.textContent.replace(/^\s+|\s+$/gm,"").length?Q=qe:Q=Dn();const E=Object.assign(W,{id:Q});if(r.add(s,E),Q===qe)return null;v&&v(s);let je=!a;if(E.type===K.Element){je=je&&!E.needBlock,delete E.needBlock;const J=q.shadowRoot(s);J&&Ke(J)&&(E.isShadowHost=!0)}if((E.type===K.Document||E.type===K.Element)&&je){d.headWhitespace&&E.type===K.Element&&E.tagName==="head"&&(Y=!1);const J={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:D,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:k,keepIframeSrcFn:M,cssCaptured:!1};if(!(E.type===K.Element&&E.tagName==="textarea"&&E.attributes.value!==void 0)){E.type===K.Element&&E.attributes._cssText!==void 0&&typeof E.attributes._cssText=="string"&&(J.cssCaptured=!0);for(const ve of Array.from(q.childNodes(s))){const ue=$e(ve,J);ue&&E.childNodes.push(ue)}}let se=null;if($n(s)&&(se=q.shadowRoot(s)))for(const ve of Array.from(q.childNodes(se))){const ue=$e(ve,J);ue&&(Ke(se)&&(ue.isShadow=!0),E.childNodes.push(ue))}}const Ge=q.parentNode(s);return Ge&&Xe(Ge)&&Ke(Ge)&&(E.isShadow=!0),E.type===K.Element&&E.tagName==="iframe"&&kl(s,()=>{const J=s.contentDocument;if(J&&b){const se=$e(J,{doc:J,mirror:r,blockClass:i,blockSelector:n,needsMask:D,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:k,keepIframeSrcFn:M});se&&b(s,se)}},y),E.type===K.Element&&E.tagName==="link"&&typeof E.attributes.rel=="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href=="string"&&Pn(E.attributes.href)==="css")&&El(s,()=>{if(C){const J=$e(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:D,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:k,keepIframeSrcFn:M});J&&C(s,J)}},k),E}function Tl(s,e){const{mirror:t=new Tn,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:p,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:k=()=>!1}=e||{};return $e(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:c===!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}:c===!1?{password:!0}:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:d==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:d===!1?{}:d,dataURLOptions:g,inlineImages:a,recordCanvas:u,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:k,newlyAddedElement:!1})}function Pl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Dl(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Us={exports:{}},F=String,Bn=function(){return{isColorSupported:!1,reset:F,bold:F,dim:F,italic:F,underline:F,inverse:F,hidden:F,strikethrough:F,black:F,red:F,green:F,yellow:F,blue:F,magenta:F,cyan:F,white:F,gray:F,bgBlack:F,bgRed:F,bgGreen:F,bgYellow:F,bgBlue:F,bgMagenta:F,bgCyan:F,bgWhite:F}};Us.exports=Bn();Us.exports.createColors=Bn;var Ll=Us.exports;const Fl={},Ul=Object.freeze(Object.defineProperty({__proto__:null,default:Fl},Symbol.toStringTag,{value:"Module"})),ae=Dl(Ul);let _i=Ll,xi=ae,Zr=class zn extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,zn)}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(e){if(!this.source)return"";let t=this.source;e==null&&(e=_i.isColorSupported),xi&&e&&(t=xi(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:c,red:h}=_i.createColors(!0);l=p=>u(h(p)),a=p=>c(p)}else l=a=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,p=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let d=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var ja=Object.defineProperty,Ha=(s,e,t)=>e in s?ja(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,S=(s,e,t)=>Ha(s,typeof e!="symbol"?e+"":e,t),yi,Ga=Object.defineProperty,Va=(s,e,t)=>e in s?Ga(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,wi=(s,e,t)=>Va(s,typeof e!="symbol"?e+"":e,t),X=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(X||{});const bi={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},vi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yt={},Ya=()=>!!globalThis.Zone;function Fs(s){if(yt[s])return yt[s];const e=globalThis[s],t=e.prototype,r=s in bi?bi[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=s in vi?vi[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!Ya())return yt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?yt[s]=u:t}catch{return t}}const Tr={};function ye(s,e,t){var r;const i=`${s}.${String(t)}`;if(Tr[i])return Tr[i].call(e);const n=Fs(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Tr[i]=o,o.call(e)):e[t]}const Pr={};function $n(s,e,t){const r=`${s}.${String(t)}`;if(Pr[r])return Pr[r].bind(e);const n=Fs(s)[t];return typeof n!="function"?e[t]:(Pr[r]=n,n.bind(e))}function Za(s){return ye("Node",s,"ownerDocument")}function Ja(s){return ye("Node",s,"childNodes")}function Xa(s){return ye("Node",s,"parentNode")}function Ka(s){return ye("Node",s,"parentElement")}function Qa(s){return ye("Node",s,"textContent")}function qa(s,e){return $n("Node",s,"contains")(e)}function el(s){return $n("Node",s,"getRootNode")()}function tl(s){return!s||!("host"in s)?null:ye("ShadowRoot",s,"host")}function rl(s){return s.styleSheets}function sl(s){return!s||!("shadowRoot"in s)?null:ye("Element",s,"shadowRoot")}function il(s,e){return ye("Element",s,"querySelector")(e)}function nl(s,e){return ye("Element",s,"querySelectorAll")(e)}function ol(){return Fs("MutationObserver").constructor}function al(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch{return()=>{}}}const K={ownerDocument:Za,childNodes:Ja,parentNode:Xa,parentElement:Ka,textContent:Qa,contains:qa,getRootNode:el,host:tl,styleSheets:rl,shadowRoot:sl,querySelector:il,querySelectorAll:nl,mutationObserver:ol,patch:al};function Nn(s){return s.nodeType===s.ELEMENT_NODE}function Xe(s){const e=s&&"host"in s&&"mode"in s&&K.host(s)||null;return!!(e&&"shadowRoot"in e&&K.shadowRoot(e)===s)}function Ke(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function ll(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function ul(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Xr(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&(t=s.ownerNode.baseURI);const r=Array.from(e,i=>Tn(i,t)).join("");return ll(r)}catch{return null}}function Tn(s,e){if(hl(s)){let t;try{t=Xr(s.styleSheet)||ul(s)}catch{t=s.cssText}return s.styleSheet.href?er(t,s.styleSheet.href):t}else{let t=s.cssText;return fl(s)&&s.selectorText.includes(":")&&(t=cl(t)),e?er(t,e):t}}function cl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function hl(s){return"styleSheet"in s}function fl(s){return"selectorText"in s}class Pn{constructor(){wi(this,"idNodeMap",new Map),wi(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function pl(){return new Pn}function Qt({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const l=r&&Ie(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function Ie(s){return s.toLowerCase()}const Si="__rrweb_original__";function dl(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const n=e.getImageData,o=Si in n?n[Si]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function qt(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Ie(e):null}function Dn(s,e){let t;try{t=new URL(s,e??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(i==null?void 0:i[1])??null}function ml(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const gl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,yl=/^(?:[a-z+]+:)?\/\//i,wl=/^www\..*/i,bl=/^(data:)([^,]*),(.*)/i;function er(s,e){return(s||"").replace(gl,(t,r,i,n,o,l)=>{const a=i||o||l,u=r||n||"";if(!a)return t;if(yl.test(a)||wl.test(a))return`url(${u}${a}${u})`;if(bl.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${ml(e)+a}${u})`;const h=e.split("/"),c=a.split("/");h.pop();for(const p of c)p!=="."&&(p===".."?h.pop():h.push(p));return`url(${u}${h.join("/")}${u})`})}function wt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function vl(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let o=wt(s,t);const l=o.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){const u=wt(r[a].textContent,t),h=100;let c=3;for(;c<u.length&&(u[c].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,c),1)!==-1);c++);for(;c<u.length;c++){let p=u.substring(0,c),d=o.split(p),g=-1;if(d.length===2)g=d[0].length;else if(d.length>2&&d[0]===""&&r[a-1].textContent!=="")g=o.indexOf(p,1);else if(d.length===1){if(p=p.substring(0,p.length-1),d=o.split(p),d.length<=1)return i.push(s),i;c=h+1}else c===u.length-1&&(g=o.indexOf(p));if(d.length>=2&&c>h){const m=r[a-1].textContent;if(m&&typeof m=="string"){const f=wt(m).length;g=o.indexOf(p,f)}g===-1&&(g=d[0].length)}if(g!==-1){let m=Math.floor(g/l);for(;m>0&&m<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const f=wt(s.substring(0,m),t);if(f.length===g){i.push(s.substring(0,m)),s=s.substring(m),o=o.substring(g);break}else f.length<g?m+=Math.max(1,Math.floor((g-f.length)/l)):m-=Math.max(1,Math.floor((f.length-g)*l))}break}}}}return i.push(s),i}function Sl(s,e){return vl(s,e).join("/* rr_split */")}let Cl=1;const _l=new RegExp("[^a-z0-9-_:]"),qe=-2;function Ln(){return Cl++}function xl(s){if(s instanceof HTMLFormElement)return"form";const e=Ie(s.tagName);return _l.test(e)?"div":e}let Ae,Ci;const Il=/^[^ \t\n\r\u000c]+/,Rl=/^[, \t\n\r\u000c]+/;function kl(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o;const l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}const i=[];for(;r(Rl),!(t>=e.length);){let n=r(Il);if(n.slice(-1)===",")n=$e(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=$e(s,n);let l=!1;for(;;){const a=e.charAt(t);if(a===""){i.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return i.join(", ")}const _i=new WeakMap;function $e(s,e){return!e||e.trim()===""?e:Us(s,e)}function El(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Us(s,e){let t=_i.get(s);if(t||(t=s.createElement("a"),_i.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Fn(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&["table","td","th"].includes(e)?$e(s,r):t==="srcset"?kl(s,r):t==="style"?er(r,Us(s)):e==="object"&&t==="data"?$e(s,r):r)}function Un(s,e,t){return["video","audio"].includes(s)&&e==="autoplay"}function Al(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch{}return!1}function tr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?tr(K.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?tr(K.parentNode(s),e,t):!1}function Bn(s,e,t,r){let i;if(Nn(s)){if(i=s,!K.childNodes(i).length)return!1}else{if(K.parentElement(s)===null)return!1;i=K.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(tr(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}function Ml(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch{return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Ol(s,e,t){let r=!1,i;try{i=s.sheet}catch{return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function $l(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:u,maskInputFn:h,dataURLOptions:c={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m=!1,cssCaptured:f=!1}=e,v=Nl(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:X.Document,childNodes:[],compatMode:s.compatMode}:{type:X.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:X.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:v};case s.ELEMENT_NODE:return Pl(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:h,dataURLOptions:c,inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m,rootId:v});case s.TEXT_NODE:return Tl(s,{doc:t,needsMask:o,maskTextFn:u,rootId:v,cssCaptured:f});case s.CDATA_SECTION_NODE:return{type:X.CDATA,textContent:"",rootId:v};case s.COMMENT_NODE:return{type:X.Comment,textContent:K.textContent(s)||"",rootId:v};default:return!1}}function Nl(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Tl(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=K.parentNode(s),l=o&&o.tagName;let a="";const u=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0;return h?a="SCRIPT_PLACEHOLDER":n||(a=K.textContent(s),u&&a&&(a=er(a,Us(e.doc)))),!u&&!h&&a&&t&&(a=r?r(a,K.parentElement(s)):a.replace(/[\S]/g,"*")),{type:X.Text,textContent:a||"",rootId:i}}function Pl(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:c,newlyAddedElement:p=!1,rootId:d}=e,g=Al(s,r,i),m=xl(s);let f={};const v=s.attributes.length;for(let y=0;y<v;y++){const C=s.attributes[y];Un(m,C.name,C.value)||(f[C.name]=Fn(t,m,Ie(C.name),C.value))}if(m==="link"&&n){const y=Array.from(t.styleSheets).find(I=>I.href===s.href);let C=null;y&&(C=Xr(y)),C&&(delete f.rel,delete f.href,f._cssText=C)}if(m==="style"&&s.sheet){let y=Xr(s.sheet);y&&(s.childNodes.length>1&&(y=Sl(y,s)),f._cssText=y)}if(["input","textarea","select"].includes(m)){const y=s.value,C=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=Qt({element:s,type:qt(s),tagName:m,value:y,maskInputOptions:o,maskInputFn:l}):C&&(f.checked=C)}if(m==="option"&&(s.selected&&!o.select?f.selected=!0:delete f.selected),m==="dialog"&&s.open&&(f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&h){if(s.__context==="2d")dl(s)||(f.rr_dataURL=s.toDataURL(a.type,a.quality));else if(!("__context"in s)){const y=s.toDataURL(a.type,a.quality),C=t.createElement("canvas");C.width=s.width,C.height=s.height;const I=C.toDataURL(a.type,a.quality);y!==I&&(f.rr_dataURL=y)}}if(m==="img"&&u){Ae||(Ae=t.createElement("canvas"),Ci=Ae.getContext("2d"));const y=s,C=y.currentSrc||y.getAttribute("src")||"<unknown-src>",I=y.crossOrigin,O=()=>{y.removeEventListener("load",O);try{Ae.width=y.naturalWidth,Ae.height=y.naturalHeight,Ci.drawImage(y,0,0),f.rr_dataURL=Ae.toDataURL(a.type,a.quality)}catch(B){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?O():y.addEventListener("load",O);return}else console.warn(`Cannot inline img src=${C}! Error: ${B}`)}y.crossOrigin==="anonymous"&&(I?f.crossOrigin=I:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?O():y.addEventListener("load",O)}if(["audio","video"].includes(m)){const y=f;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(p||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),g){const{width:y,height:C}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${C}px`}}m==="iframe"&&!c(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let b;try{customElements.get(m)&&(b=!0)}catch{}return{type:X.Element,tagName:m,attributes:f,childNodes:[],isSVG:El(s)||void 0,needBlock:g,rootId:d,isCustom:b}}function L(s){return s==null?"":s.toLowerCase()}function zn(s){return s===!0||s==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:s==="all",headMetaDescKeywords:s==="all",headTitleMutations:s==="all"}:s||{}}function Dl(s,e){if(e.comment&&s.type===X.Comment)return!0;if(s.type===X.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Dn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(L(s.attributes.name).match(/^msapplication-tile(image|color)$/)||L(s.attributes.name)==="application-name"||L(s.attributes.rel)==="icon"||L(s.attributes.rel)==="apple-touch-icon"||L(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&L(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(L(s.attributes.property).match(/^(og|twitter|fb):/)||L(s.attributes.name).match(/^(og|twitter):/)||L(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(L(s.attributes.name)==="robots"||L(s.attributes.name)==="googlebot"||L(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(L(s.attributes.name)==="author"||L(s.attributes.name)==="generator"||L(s.attributes.name)==="framework"||L(s.attributes.name)==="publisher"||L(s.attributes.name)==="progid"||L(s.attributes.property).match(/^article:/)||L(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(L(s.attributes.name)==="google-site-verification"||L(s.attributes.name)==="yandex-verification"||L(s.attributes.name)==="csrf-token"||L(s.attributes.name)==="p:domain_verify"||L(s.attributes.name)==="verify-v1"||L(s.attributes.name)==="verification"||L(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ne(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:u=!0,maskInputOptions:h={},maskTextFn:c,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g={},inlineImages:m=!1,recordCanvas:f=!1,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:B=!1,cssCaptured:T=!1}=e;let{needsMask:A}=e,{preserveWhiteSpace:z=!0}=e;A||(A=Bn(s,o,l,A===void 0));const re=$l(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:A,inlineStylesheet:u,maskInputOptions:h,maskTextFn:c,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:f,keepIframeSrcFn:O,newlyAddedElement:B,cssCaptured:T});if(!re)return console.warn(s,"not serialized"),null;let ue;r.hasNode(s)?ue=r.getId(s):Dl(re,d)||!z&&re.type===X.Text&&!re.textContent.replace(/^\s+|\s+$/gm,"").length?ue=qe:ue=Ln();const E=Object.assign(re,{id:ue});if(r.add(s,E),ue===qe)return null;v&&v(s);let He=!a;if(E.type===X.Element){He=He&&!E.needBlock,delete E.needBlock;const Z=K.shadowRoot(s);Z&&Ke(Z)&&(E.isShadowHost=!0)}if((E.type===X.Document||E.type===X.Element)&&He){d.headWhitespace&&E.type===X.Element&&E.tagName==="head"&&(z=!1);const Z={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:A,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:u,maskInputOptions:h,maskTextFn:c,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:z,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:O,cssCaptured:!1};if(!(E.type===X.Element&&E.tagName==="textarea"&&E.attributes.value!==void 0)){E.type===X.Element&&E.attributes._cssText!==void 0&&typeof E.attributes._cssText=="string"&&(Z.cssCaptured=!0);for(const ve of Array.from(K.childNodes(s))){const ce=Ne(ve,Z);ce&&E.childNodes.push(ce)}}let se=null;if(Nn(s)&&(se=K.shadowRoot(s)))for(const ve of Array.from(K.childNodes(se))){const ce=Ne(ve,Z);ce&&(Ke(se)&&(ce.isShadow=!0),E.childNodes.push(ce))}}const Ge=K.parentNode(s);return Ge&&Xe(Ge)&&Ke(Ge)&&(E.isShadow=!0),E.type===X.Element&&E.tagName==="iframe"&&Ml(s,()=>{const Z=s.contentDocument;if(Z&&b){const se=Ne(Z,{doc:Z,mirror:r,blockClass:i,blockSelector:n,needsMask:A,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:c,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:z,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:O});se&&b(s,se)}},y),E.type===X.Element&&E.tagName==="link"&&typeof E.attributes.rel=="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href=="string"&&Dn(E.attributes.href)==="css")&&Ol(s,()=>{if(C){const Z=Ne(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:A,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:c,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:z,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:O});Z&&C(s,Z)}},I),E}function Ll(s,e){const{mirror:t=new Pn,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:c,maskInputFn:p,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:I=()=>!1}=e||{},O=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:h===!1?{password:!0}:h,B=zn(d);return Ne(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:O,maskTextFn:c,maskInputFn:p,slimDOMOptions:B,dataURLOptions:g,inlineImages:a,recordCanvas:u,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:I,newlyAddedElement:!1})}function Fl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Ul(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Bs={exports:{}},F=String,Wn=function(){return{isColorSupported:!1,reset:F,bold:F,dim:F,italic:F,underline:F,inverse:F,hidden:F,strikethrough:F,black:F,red:F,green:F,yellow:F,blue:F,magenta:F,cyan:F,white:F,gray:F,bgBlack:F,bgRed:F,bgGreen:F,bgYellow:F,bgBlue:F,bgMagenta:F,bgCyan:F,bgWhite:F}};Bs.exports=Wn();Bs.exports.createColors=Wn;var Bl=Bs.exports;const zl={},Wl=Object.freeze(Object.defineProperty({__proto__:null,default:zl},Symbol.toStringTag,{value:"Module"})),ae=Ul(Wl);let xi=Bl,Ii=ae,Kr=class jn extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,jn)}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(e){if(!this.source)return"";let t=this.source;e==null&&(e=xi.isColorSupported),Ii&&e&&(t=Ii(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:h,red:c}=xi.createColors(!0);l=p=>u(c(p)),a=p=>h(p)}else l=a=u=>u;return r.slice(i,n).map((u,h)=>{let c=i+1+h,p=" "+(" "+c).slice(-o)+" | ";if(c===this.line){let d=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
|
|
2
2
|
`+d+l("^")}return" "+a(p)+u}).join(`
|
|
3
3
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
4
4
|
|
|
5
5
|
`+e+`
|
|
6
|
-
`),this.name+": "+this.message+e}};var
|
|
6
|
+
`),this.name+": "+this.message+e}};var zs=Kr;Kr.default=Kr;var ut={};ut.isClean=Symbol("isClean");ut.my=Symbol("my");const Ri={after:`
|
|
7
7
|
`,beforeClose:`
|
|
8
8
|
`,beforeComment:`
|
|
9
9
|
`,beforeDecl:`
|
|
10
10
|
`,beforeOpen:" ",beforeRule:`
|
|
11
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
12
|
-
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return
|
|
11
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function jl(s){return s[0].toUpperCase()+s.slice(1)}let Qr=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
|
|
12
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Ri[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+jl(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Ri[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
|
|
13
13
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
14
14
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
15
15
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
|
|
16
16
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let n=r.raws.before.split(`
|
|
17
|
-
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var
|
|
18
|
-
`?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new
|
|
19
|
-
`);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[
|
|
17
|
+
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Hn=Qr;Qr.default=Qr;let Hl=Hn;function qr(s,e){new Hl(e).stringify(s)}var wr=qr;qr.default=qr;let{isClean:bt,my:Gl}=ut,Vl=zs,Yl=Hn,Zl=wr;function es(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>es(o,t)):(n==="object"&&i!==null&&(i=es(i)),t[r]=i)}return t}let ts=class{constructor(e={}){this.raws={},this[bt]=!1,this[Gl]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=es(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Vl(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[bt]){this[bt]=!1;let e=this;for(;e=e.parent;)e[bt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
|
|
18
|
+
`?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Yl().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Zl){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var br=ts;ts.default=ts;let Jl=br,rs=class extends Jl{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var vr=rs;rs.default=rs;let Xl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Kl=(s=21)=>{let e="",t=s;for(;t--;)e+=Xl[Math.random()*64|0];return e};var Ql={nanoid:Kl};let{SourceMapConsumer:ki,SourceMapGenerator:Ei}=ae,{existsSync:ql,readFileSync:eu}=ae,{dirname:Dr,join:tu}=ae;function ru(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let ss=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Dr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new ki(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return ru(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Dr(e),ql(e))return this.mapFile=e,eu(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof ki)return Ei.fromSourceMap(t).toString();if(t instanceof Ei)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=tu(Dr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Gn=ss;ss.default=ss;let{SourceMapConsumer:su,SourceMapGenerator:iu}=ae,{fileURLToPath:Ai,pathToFileURL:vt}=ae,{isAbsolute:is,resolve:ns}=ae,{nanoid:nu}=Ql,Lr=ae,Mi=zs,ou=Gn,Fr=Symbol("fromOffsetCache"),au=!!(su&&iu),Oi=!!(ns&&is),rr=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Oi||/^\w+:\/\//.test(t.from)||is(t.from)?this.file=t.from:this.file=ns(t.from)),Oi&&au){let r=new ou(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+nu(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,l;if(t&&typeof t=="object"){let u=t,h=r;if(typeof u.offset=="number"){let c=this.fromOffset(u.offset);t=c.line,r=c.col}else t=u.line,r=u.column;if(typeof h.offset=="number"){let c=this.fromOffset(h.offset);o=c.line,l=c.col}else o=h.line,l=h.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,l);return a?n=new Mi(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,i.plugin):n=new Mi(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(vt&&(n.input.url=vt(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Fr])r=this[Fr];else{let n=this.css.split(`
|
|
19
|
+
`);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[Fr]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ns(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let a;is(o.source)?a=vt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||vt(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Ai)u.file=Ai(a);else throw new Error("file: protocol is not available in this PostCSS build");let h=n.sourceContentFor(o.source);return h&&(u.source=h),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Sr=rr;rr.default=rr;Lr&&Lr.registerInput&&Lr.registerInput(rr);let{SourceMapConsumer:Vn,SourceMapGenerator:Wt}=ae,{dirname:jt,relative:Yn,resolve:Zn,sep:Jn}=ae,{pathToFileURL:$i}=ae,lu=Sr,uu=!!(Vn&&Wt),cu=!!(jt&&Zn&&Yn&&Jn),hu=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
20
20
|
`;this.css.includes(`\r
|
|
21
21
|
`)&&(t=`\r
|
|
22
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||
|
|
23
|
-
`),t=l.length-o):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.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(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Ht(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Ht(Vn(r,this.mapOpts.annotation)));let i=Gn(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new nu(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Oi){let r=Oi(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Yn==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Zn=lu;let uu=mr,ss=class extends uu{constructor(e){super(e),this.type="comment"}};var wr=ss;ss.default=ss;let{isClean:Jn,my:Xn}=ct,Kn=gr,Qn=wr,cu=mr,qn,zs,Ws,eo;function to(s){return s.map(e=>(e.nodes&&(e.nodes=to(e.nodes)),delete e.source,e))}function ro(s){if(s[Jn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)ro(e)}let me=class so extends cu{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=to(qn(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Kn(e)]}else if(e.selector)e=[new zs(e)];else if(e.name)e=[new Ws(e)];else if(e.text)e=[new Qn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Xn]||so.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Jn]&&ro(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};me.registerParse=s=>{qn=s};me.registerRule=s=>{zs=s};me.registerAtRule=s=>{Ws=s};me.registerRoot=s=>{eo=s};var Re=me;me.default=me;me.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Ws.prototype):s.type==="rule"?Object.setPrototypeOf(s,zs.prototype):s.type==="decl"?Object.setPrototypeOf(s,Kn.prototype):s.type==="comment"?Object.setPrototypeOf(s,Qn.prototype):s.type==="root"&&Object.setPrototypeOf(s,eo.prototype),s[Xn]=!0,s.nodes&&s.nodes.forEach(e=>{me.rebuild(e)})};let hu=Re,io,no,et=class extends hu{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new io(new no,this,e).stringify()}};et.registerLazyResult=s=>{io=s};et.registerProcessor=s=>{no=s};var Hs=et;et.default=et;let $i={};var oo=function(e){$i[e]||($i[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let is=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var ao=is;is.default=is;let fu=ao,ns=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new fu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var js=ns;ns.default=ns;const Dr=39,Ni=34,St=92,Ti=47,Ct=10,Ve=32,_t=12,xt=9,It=13,du=91,pu=93,mu=40,gu=41,yu=123,wu=125,bu=59,vu=42,Su=58,Cu=64,Rt=/[\t\n\f\r "#'()/;[\\\]{}]/g,kt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_u=/.[\r\n"'(/\\]/,Pi=/[\da-f]/i;var xu=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,p,d,g,m=r.length,f=0,v=[],b=[];function y(){return f}function C(O){throw e.error("Unclosed "+O,f)}function k(){return b.length===0&&f>=m}function M(O){if(b.length)return b.pop();if(f>=m)return;let D=O?O.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Ct:case Ve:case xt:case It:case _t:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ve||n===Ct||n===xt||n===It||n===_t);g=["space",r.slice(f,o)],f=o-1;break}case du:case pu:case yu:case wu:case Su:case bu:case gu:{let Y=String.fromCharCode(n);g=[Y,Y,f];break}case mu:{if(p=v.length?v.pop()[1]:"",d=r.charCodeAt(f+1),p==="url"&&d!==Dr&&d!==Ni&&d!==Ve&&d!==Ct&&d!==xt&&d!==_t&&d!==It){o=f;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||D){o=f;break}else C("bracket");for(h=o;r.charCodeAt(h-1)===St;)h-=1,c=!c}while(c);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||_u.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Dr:case Ni:{l=n===Dr?"'":'"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(i||D){o=f+1;break}else C("string");for(h=o;r.charCodeAt(h-1)===St;)h-=1,c=!c}while(c);g=["string",r.slice(f,o+1),f,o],f=o;break}case Cu:{Rt.lastIndex=f+1,Rt.test(r),Rt.lastIndex===0?o=r.length-1:o=Rt.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case St:{for(o=f,u=!0;r.charCodeAt(o+1)===St;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Ti&&n!==Ve&&n!==Ct&&n!==xt&&n!==It&&n!==_t&&(o+=1,Pi.test(r.charAt(o)))){for(;Pi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ve&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Ti&&r.charCodeAt(f+1)===vu?(o=r.indexOf("*/",f+2)+1,o===0&&(i||D?o=r.length:C("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(kt.lastIndex=f+1,kt.test(r),kt.lastIndex===0?o=r.length-1:o=kt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],v.push(g),f=o);break}}return f++,g}function V(O){b.push(O)}return{back:V,endOfFile:k,nextToken:M,position:y}};let lo=Re,tr=class extends lo{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Gs=tr;tr.default=tr;lo.registerAtRule(tr);let uo=Re,co,ho,Te=class extends uo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new co(new ho,this,e).stringify()}};Te.registerLazyResult=s=>{co=s};Te.registerProcessor=s=>{ho=s};var ht=Te;Te.default=Te;uo.registerRoot(Te);let tt={comma(s){return tt.split(s,[","],!0)},space(s){let e=[" ",`
|
|
24
|
-
`," "];return tt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",u=!1;for(let
|
|
22
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||jt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Vn(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),cu&&uu&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Wt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Wt({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 Wt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=l.match(/\n/g),n?(e+=n.length,o=l.lastIndexOf(`
|
|
23
|
+
`),t=l.length-o):t+=l.length,a&&u!=="start"){let h=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==h.last||h.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.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(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?jt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=jt(Zn(r,this.mapOpts.annotation)));let i=Yn(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new lu(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if($i){let r=$i(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Jn==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Xn=hu;let fu=br,os=class extends fu{constructor(e){super(e),this.type="comment"}};var Cr=os;os.default=os;let{isClean:Kn,my:Qn}=ut,qn=vr,eo=Cr,pu=br,to,Ws,js,ro;function so(s){return s.map(e=>(e.nodes&&(e.nodes=so(e.nodes)),delete e.source,e))}function io(s){if(s[Kn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)io(e)}let me=class no extends pu{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=so(to(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new qn(e)]}else if(e.selector)e=[new Ws(e)];else if(e.name)e=[new js(e)];else if(e.text)e=[new eo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Qn]||no.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Kn]&&io(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};me.registerParse=s=>{to=s};me.registerRule=s=>{Ws=s};me.registerAtRule=s=>{js=s};me.registerRoot=s=>{ro=s};var Re=me;me.default=me;me.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,js.prototype):s.type==="rule"?Object.setPrototypeOf(s,Ws.prototype):s.type==="decl"?Object.setPrototypeOf(s,qn.prototype):s.type==="comment"?Object.setPrototypeOf(s,eo.prototype):s.type==="root"&&Object.setPrototypeOf(s,ro.prototype),s[Qn]=!0,s.nodes&&s.nodes.forEach(e=>{me.rebuild(e)})};let du=Re,oo,ao,et=class extends du{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new oo(new ao,this,e).stringify()}};et.registerLazyResult=s=>{oo=s};et.registerProcessor=s=>{ao=s};var Hs=et;et.default=et;let Ni={};var lo=function(e){Ni[e]||(Ni[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let as=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var uo=as;as.default=as;let mu=uo,ls=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new mu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Gs=ls;ls.default=ls;const Ur=39,Ti=34,St=92,Pi=47,Ct=10,Ve=32,_t=12,xt=9,It=13,gu=91,yu=93,wu=40,bu=41,vu=123,Su=125,Cu=59,_u=42,xu=58,Iu=64,Rt=/[\t\n\f\r "#'()/;[\\\]{}]/g,kt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ru=/.[\r\n"'(/\\]/,Di=/[\da-f]/i;var ku=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,h,c,p,d,g,m=r.length,f=0,v=[],b=[];function y(){return f}function C(T){throw e.error("Unclosed "+T,f)}function I(){return b.length===0&&f>=m}function O(T){if(b.length)return b.pop();if(f>=m)return;let A=T?T.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Ct:case Ve:case xt:case It:case _t:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ve||n===Ct||n===xt||n===It||n===_t);g=["space",r.slice(f,o)],f=o-1;break}case gu:case yu:case vu:case Su:case xu:case Cu:case bu:{let z=String.fromCharCode(n);g=[z,z,f];break}case wu:{if(p=v.length?v.pop()[1]:"",d=r.charCodeAt(f+1),p==="url"&&d!==Ur&&d!==Ti&&d!==Ve&&d!==Ct&&d!==xt&&d!==_t&&d!==It){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||A){o=f;break}else C("bracket");for(c=o;r.charCodeAt(c-1)===St;)c-=1,h=!h}while(h);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||Ru.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Ur:case Ti:{l=n===Ur?"'":'"',o=f;do{if(h=!1,o=r.indexOf(l,o+1),o===-1)if(i||A){o=f+1;break}else C("string");for(c=o;r.charCodeAt(c-1)===St;)c-=1,h=!h}while(h);g=["string",r.slice(f,o+1),f,o],f=o;break}case Iu:{Rt.lastIndex=f+1,Rt.test(r),Rt.lastIndex===0?o=r.length-1:o=Rt.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case St:{for(o=f,u=!0;r.charCodeAt(o+1)===St;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Pi&&n!==Ve&&n!==Ct&&n!==xt&&n!==It&&n!==_t&&(o+=1,Di.test(r.charAt(o)))){for(;Di.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ve&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Pi&&r.charCodeAt(f+1)===_u?(o=r.indexOf("*/",f+2)+1,o===0&&(i||A?o=r.length:C("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(kt.lastIndex=f+1,kt.test(r),kt.lastIndex===0?o=r.length-1:o=kt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],v.push(g),f=o);break}}return f++,g}function B(T){b.push(T)}return{back:B,endOfFile:I,nextToken:O,position:y}};let co=Re,sr=class extends co{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Vs=sr;sr.default=sr;co.registerAtRule(sr);let ho=Re,fo,po,Pe=class extends ho{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new fo(new po,this,e).stringify()}};Pe.registerLazyResult=s=>{fo=s};Pe.registerProcessor=s=>{po=s};var ct=Pe;Pe.default=Pe;ho.registerRoot(Pe);let tt={comma(s){return tt.split(s,[","],!0)},space(s){let e=[" ",`
|
|
24
|
+
`," "];return tt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",u=!1;for(let h of s)u?u=!1:h==="\\"?u=!0:l?h===a&&(l=!1):h==='"'||h==="'"?(l=!0,a=h):h==="("?o+=1:h===")"?o>0&&(o-=1):o===0&&e.includes(h)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=h;return(t||i!=="")&&r.push(i.trim()),r}};var mo=tt;tt.default=tt;let go=Re,Eu=mo,ir=class extends go{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Eu.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Ys=ir;ir.default=ir;go.registerRule(ir);let Au=vr,Mu=ku,Ou=Cr,$u=Vs,Nu=ct,Li=Ys;const Fi={empty:!0,space:!0};function Tu(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Pu=class{constructor(e){this.input=e,this.root=new Nu,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new $u;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new Ou;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Mu(this.input)}decl(e,t){let r=new Au;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Tu(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let h=this.stringFrom(e,u);h=this.spacesFromEnd(e)+h,h!==" !important"&&(r.raws.important=h);break}else if(n[1].toLowerCase()==="important"){let h=e.slice(0),c="";for(let p=u;p>0;p--){let d=h[p][0];if(c.trim().indexOf("!")===0&&d!=="space")break;c=h.pop()[1]+c}c.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=c,e=h)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Li;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",u=!0,h,c;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?u=!1:o==="comment"?(c=r[p-1]?r[p-1][0]:"empty",h=r[p+1]?r[p+1][0]:"empty",!Fi[c]&&!Fi[h]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new Li;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Du=Pu;let Lu=Re,Fu=Du,Uu=Sr;function nr(s,e){let t=new Uu(s,e),r=new Fu(t);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
|
|
25
25
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
|
|
26
26
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
|
|
27
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}var Ys=sr;sr.default=sr;Tu.registerParse(sr);let{isClean:he,my:Lu}=ct,Fu=Zn,Uu=pr,Bu=Re,zu=Hs,Wu=oo,Fi=js,Hu=Ys,ju=ht;const Gu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Vu={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},Yu={Once:!0,postcssPlugin:!0,prepare:!0},Pe=0;function Ye(s){return typeof s=="object"&&typeof s.then=="function"}function mo(s){let e=!1,t=Gu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Pe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Pe,t+"Exit"]:[t,t+"Exit"]}function Ui(s){let e;return s.type==="document"?e=["Document",Pe,"DocumentExit"]:s.type==="root"?e=["Root",Pe,"RootExit"]:e=mo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function os(s){return s[he]=!1,s.nodes&&s.nodes.forEach(e=>os(e)),s}let as={},De=class go{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=os(t);else if(t instanceof go||t instanceof Fi)i=os(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Hu;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[Lu]&&Bu.rebuild(i)}this.result=new Fi(e,i,r),this.helpers={...as,postcss:as,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...n,...n.prepare(this.result)}:n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,n=r.postcssVersion,o=this.result.processor.version,l=n.split("."),a=o.split(".");(l[0]!==a[0]||parseInt(l[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Vu[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Yu[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Ye(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[he];){e[he]=!0;let t=[Ui(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ye(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Ye(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Uu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Fu(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Ye(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[he];)e[he]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||Wu("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ye(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[he]){l[he]=!0,e.push(Ui(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Pe){r.nodes&&r.nodes.length&&(r[he]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[he]=!0;let t=mo(e);for(let r of t)if(r===Pe)e.nodes&&e.each(i=>{i[he]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};De.registerPostcss=s=>{as=s};var yo=De;De.default=De;ju.registerLazyResult(De);zu.registerLazyResult(De);let Zu=Zn,Ju=pr,Xu=oo,Ku=Ys;const Qu=js;let ls=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Ju;this.result=new Qu(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Zu(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||Xu("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Ku;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var qu=ls;ls.default=ls;let ec=qu,tc=yo,rc=Hs,sc=ht,rt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new ec(this,e,t):new tc(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var ic=rt;rt.default=rt;sc.registerProcessor(rt);rc.registerProcessor(rt);let nc=gr,oc=Hn,ac=wr,lc=Gs,uc=yr,cc=ht,hc=Vs;function st(s,e){if(Array.isArray(s))return s.map(i=>st(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:uc.prototype};n.map&&(n.map={...n.map,__proto__:oc.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>st(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new cc(r);if(r.type==="decl")return new nc(r);if(r.type==="rule")return new hc(r);if(r.type==="comment")return new ac(r);if(r.type==="atrule")return new lc(r);throw new Error("Unknown node type: "+s.type)}var fc=st;st.default=st;let dc=Bs,wo=gr,pc=yo,mc=Re,Zs=ic,gc=pr,yc=fc,bo=Hs,wc=ao,vo=wr,So=Gs,bc=js,vc=yr,Sc=Ys,Cc=fo,Co=Vs,_o=ht,_c=mr;function $(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Zs(s)}$.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
27
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}var Zs=nr;nr.default=nr;Lu.registerParse(nr);let{isClean:he,my:Bu}=ut,zu=Xn,Wu=wr,ju=Re,Hu=Hs,Gu=lo,Ui=Gs,Vu=Zs,Yu=ct;const Zu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ju={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},Xu={Once:!0,postcssPlugin:!0,prepare:!0},De=0;function Ye(s){return typeof s=="object"&&typeof s.then=="function"}function yo(s){let e=!1,t=Zu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,De,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,De,t+"Exit"]:[t,t+"Exit"]}function Bi(s){let e;return s.type==="document"?e=["Document",De,"DocumentExit"]:s.type==="root"?e=["Root",De,"RootExit"]:e=yo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function us(s){return s[he]=!1,s.nodes&&s.nodes.forEach(e=>us(e)),s}let cs={},Le=class wo{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=us(t);else if(t instanceof wo||t instanceof Ui)i=us(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Vu;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[Bu]&&ju.rebuild(i)}this.result=new Ui(e,i,r),this.helpers={...cs,postcss:cs,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...n,...n.prepare(this.result)}:n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,n=r.postcssVersion,o=this.result.processor.version,l=n.split("."),a=o.split(".");(l[0]!==a[0]||parseInt(l[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Ju[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Xu[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Ye(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[he];){e[he]=!0;let t=[Bi(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ye(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Ye(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Wu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new zu(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Ye(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[he];)e[he]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||Gu("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ye(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[he]){l[he]=!0,e.push(Bi(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===De){r.nodes&&r.nodes.length&&(r[he]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[he]=!0;let t=yo(e);for(let r of t)if(r===De)e.nodes&&e.each(i=>{i[he]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Le.registerPostcss=s=>{cs=s};var bo=Le;Le.default=Le;Yu.registerLazyResult(Le);Hu.registerLazyResult(Le);let Ku=Xn,Qu=wr,qu=lo,ec=Zs;const tc=Gs;let hs=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Qu;this.result=new tc(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Ku(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||qu("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=ec;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var rc=hs;hs.default=hs;let sc=rc,ic=bo,nc=Hs,oc=ct,rt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new sc(this,e,t):new ic(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var ac=rt;rt.default=rt;oc.registerProcessor(rt);nc.registerProcessor(rt);let lc=vr,uc=Gn,cc=Cr,hc=Vs,fc=Sr,pc=ct,dc=Ys;function st(s,e){if(Array.isArray(s))return s.map(i=>st(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:fc.prototype};n.map&&(n.map={...n.map,__proto__:uc.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>st(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new pc(r);if(r.type==="decl")return new lc(r);if(r.type==="rule")return new dc(r);if(r.type==="comment")return new cc(r);if(r.type==="atrule")return new hc(r);throw new Error("Unknown node type: "+s.type)}var mc=st;st.default=st;let gc=zs,vo=vr,yc=bo,wc=Re,Js=ac,bc=wr,vc=mc,So=Hs,Sc=uo,Co=Cr,_o=Vs,Cc=Gs,_c=Sr,xc=Zs,Ic=mo,xo=Ys,Io=ct,Rc=br;function $(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Js(s)}$.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
28
28
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
29
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new
|
|
29
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Js().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return $([i(a)]).process(o,l)},i};$.stringify=bc;$.parse=xc;$.fromJSON=vc;$.list=Ic;$.comment=s=>new Co(s);$.atRule=s=>new _o(s);$.decl=s=>new vo(s);$.rule=s=>new xo(s);$.root=s=>new Io(s);$.document=s=>new So(s);$.CssSyntaxError=gc;$.Declaration=vo;$.Container=wc;$.Processor=Js;$.Document=So;$.Comment=Co;$.Warning=Sc;$.AtRule=_o;$.Result=Cc;$.Input=_c;$.Rule=xo;$.Root=Io;$.Node=Rc;yc.registerPostcss($);var kc=$;$.default=$;const W=Fl(kc);W.stringify;W.fromJSON;W.plugin;W.parse;W.list;W.document;W.comment;W.atRule;W.rule;W.decl;W.root;W.CssSyntaxError;W.Declaration;W.Container;W.Processor;W.Document;W.Comment;W.Warning;W.AtRule;W.Result;W.Input;W.Rule;W.Root;W.Node;var Ec=Object.defineProperty,Ac=(s,e,t)=>e in s?Ec(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ie=(s,e,t)=>Ac(s,typeof e!="symbol"?e+"":e,t);function Mc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Oc(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Xs={exports:{}},U=String,Ro=function(){return{isColorSupported:!1,reset:U,bold:U,dim:U,italic:U,underline:U,inverse:U,hidden:U,strikethrough:U,black:U,red:U,green:U,yellow:U,blue:U,magenta:U,cyan:U,white:U,gray:U,bgBlack:U,bgRed:U,bgGreen:U,bgYellow:U,bgBlue:U,bgMagenta:U,bgCyan:U,bgWhite:U}};Xs.exports=Ro();Xs.exports.createColors=Ro;var $c=Xs.exports;const Nc={},Tc=Object.freeze(Object.defineProperty({__proto__:null,default:Nc},Symbol.toStringTag,{value:"Module"})),le=Oc(Tc);let zi=$c,Wi=le,fs=class ko extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,ko)}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(e){if(!this.source)return"";let t=this.source;e==null&&(e=zi.isColorSupported),Wi&&e&&(t=Wi(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:h,red:c}=zi.createColors(!0);l=p=>u(c(p)),a=p=>h(p)}else l=a=u=>u;return r.slice(i,n).map((u,h)=>{let c=i+1+h,p=" "+(" "+c).slice(-o)+" | ";if(c===this.line){let d=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
|
|
30
30
|
`+d+l("^")}return" "+a(p)+u}).join(`
|
|
31
31
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
32
32
|
|
|
33
33
|
`+e+`
|
|
34
|
-
`),this.name+": "+this.message+e}};var
|
|
34
|
+
`),this.name+": "+this.message+e}};var Ks=fs;fs.default=fs;var ht={};ht.isClean=Symbol("isClean");ht.my=Symbol("my");const ji={after:`
|
|
35
35
|
`,beforeClose:`
|
|
36
36
|
`,beforeComment:`
|
|
37
37
|
`,beforeDecl:`
|
|
38
38
|
`,beforeOpen:" ",beforeRule:`
|
|
39
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
40
|
-
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return
|
|
39
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Pc(s){return s[0].toUpperCase()+s.slice(1)}let ps=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
|
|
40
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return ji[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+Pc(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=ji[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
|
|
41
41
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
42
42
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
43
43
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
|
|
44
44
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let n=r.raws.before.split(`
|
|
45
|
-
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var
|
|
46
|
-
`?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new
|
|
47
|
-
`);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[
|
|
45
|
+
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Eo=ps;ps.default=ps;let Dc=Eo;function ds(s,e){new Dc(e).stringify(s)}var _r=ds;ds.default=ds;let{isClean:Et,my:Lc}=ht,Fc=Ks,Uc=Eo,Bc=_r;function ms(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>ms(o,t)):(n==="object"&&i!==null&&(i=ms(i)),t[r]=i)}return t}let gs=class{constructor(e={}){this.raws={},this[Et]=!1,this[Lc]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ms(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Fc(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Et]){this[Et]=!1;let e=this;for(;e=e.parent;)e[Et]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
|
|
46
|
+
`?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Uc().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Bc){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var xr=gs;gs.default=gs;let zc=xr,ys=class extends zc{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Ir=ys;ys.default=ys;let Wc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",jc=(s=21)=>{let e="",t=s;for(;t--;)e+=Wc[Math.random()*64|0];return e};var Hc={nanoid:jc};let{SourceMapConsumer:Hi,SourceMapGenerator:Gi}=le,{existsSync:Gc,readFileSync:Vc}=le,{dirname:Br,join:Yc}=le;function Zc(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let ws=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Br(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Hi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Zc(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Br(e),Gc(e))return this.mapFile=e,Vc(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Hi)return Gi.fromSourceMap(t).toString();if(t instanceof Gi)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Yc(Br(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Ao=ws;ws.default=ws;let{SourceMapConsumer:Jc,SourceMapGenerator:Xc}=le,{fileURLToPath:Vi,pathToFileURL:At}=le,{isAbsolute:bs,resolve:vs}=le,{nanoid:Kc}=Hc,zr=le,Yi=Ks,Qc=Ao,Wr=Symbol("fromOffsetCache"),qc=!!(Jc&&Xc),Zi=!!(vs&&bs),or=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Zi||/^\w+:\/\//.test(t.from)||bs(t.from)?this.file=t.from:this.file=vs(t.from)),Zi&&qc){let r=new Qc(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Kc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,l;if(t&&typeof t=="object"){let u=t,h=r;if(typeof u.offset=="number"){let c=this.fromOffset(u.offset);t=c.line,r=c.col}else t=u.line,r=u.column;if(typeof h.offset=="number"){let c=this.fromOffset(h.offset);o=c.line,l=c.col}else o=h.line,l=h.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,l);return a?n=new Yi(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,i.plugin):n=new Yi(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(At&&(n.input.url=At(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Wr])r=this[Wr];else{let n=this.css.split(`
|
|
47
|
+
`);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[Wr]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:vs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let a;bs(o.source)?a=At(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||At(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Vi)u.file=Vi(a);else throw new Error("file: protocol is not available in this PostCSS build");let h=n.sourceContentFor(o.source);return h&&(u.source=h),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Rr=or;or.default=or;zr&&zr.registerInput&&zr.registerInput(or);let{SourceMapConsumer:Mo,SourceMapGenerator:Ht}=le,{dirname:Gt,relative:Oo,resolve:$o,sep:No}=le,{pathToFileURL:Ji}=le,eh=Rr,th=!!(Mo&&Ht),rh=!!(Gt&&$o&&Oo&&No),sh=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
48
48
|
`;this.css.includes(`\r
|
|
49
49
|
`)&&(t=`\r
|
|
50
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Gt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new
|
|
51
|
-
`),t=l.length-o):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.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(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Gt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Gt(Ao(r,this.mapOpts.annotation)));let i=Mo(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Kc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Zi){let r=Zi(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Oo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var $o=eh;let th=vr,ws=class extends th{constructor(e){super(e),this.type="comment"}};var _r=ws;ws.default=ws;let{isClean:No,my:To}=ft,Po=Sr,Do=_r,rh=vr,Lo,Ks,Qs,Fo;function Uo(s){return s.map(e=>(e.nodes&&(e.nodes=Uo(e.nodes)),delete e.source,e))}function Bo(s){if(s[No]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Bo(e)}let ge=class zo extends rh{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Uo(Lo(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Po(e)]}else if(e.selector)e=[new Ks(e)];else if(e.name)e=[new Qs(e)];else if(e.text)e=[new Do(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[To]||zo.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[No]&&Bo(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};ge.registerParse=s=>{Lo=s};ge.registerRule=s=>{Ks=s};ge.registerAtRule=s=>{Qs=s};ge.registerRoot=s=>{Fo=s};var ke=ge;ge.default=ge;ge.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Qs.prototype):s.type==="rule"?Object.setPrototypeOf(s,Ks.prototype):s.type==="decl"?Object.setPrototypeOf(s,Po.prototype):s.type==="comment"?Object.setPrototypeOf(s,Do.prototype):s.type==="root"&&Object.setPrototypeOf(s,Fo.prototype),s[To]=!0,s.nodes&&s.nodes.forEach(e=>{ge.rebuild(e)})};let sh=ke,Wo,Ho,it=class extends sh{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Wo(new Ho,this,e).stringify()}};it.registerLazyResult=s=>{Wo=s};it.registerProcessor=s=>{Ho=s};var qs=it;it.default=it;let Ji={};var jo=function(e){Ji[e]||(Ji[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let bs=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Go=bs;bs.default=bs;let ih=Go,vs=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new ih(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var ei=vs;vs.default=vs;const Br=39,Xi=34,At=92,Ki=47,Ot=10,Ze=32,$t=12,Nt=9,Tt=13,nh=91,oh=93,ah=40,lh=41,uh=123,ch=125,hh=59,fh=42,dh=58,ph=64,Pt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Dt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,mh=/.[\r\n"'(/\\]/,Qi=/[\da-f]/i;var gh=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,p,d,g,m=r.length,f=0,v=[],b=[];function y(){return f}function C(O){throw e.error("Unclosed "+O,f)}function k(){return b.length===0&&f>=m}function M(O){if(b.length)return b.pop();if(f>=m)return;let D=O?O.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Ot:case Ze:case Nt:case Tt:case $t:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ze||n===Ot||n===Nt||n===Tt||n===$t);g=["space",r.slice(f,o)],f=o-1;break}case nh:case oh:case uh:case ch:case dh:case hh:case lh:{let Y=String.fromCharCode(n);g=[Y,Y,f];break}case ah:{if(p=v.length?v.pop()[1]:"",d=r.charCodeAt(f+1),p==="url"&&d!==Br&&d!==Xi&&d!==Ze&&d!==Ot&&d!==Nt&&d!==$t&&d!==Tt){o=f;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||D){o=f;break}else C("bracket");for(h=o;r.charCodeAt(h-1)===At;)h-=1,c=!c}while(c);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||mh.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Br:case Xi:{l=n===Br?"'":'"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(i||D){o=f+1;break}else C("string");for(h=o;r.charCodeAt(h-1)===At;)h-=1,c=!c}while(c);g=["string",r.slice(f,o+1),f,o],f=o;break}case ph:{Pt.lastIndex=f+1,Pt.test(r),Pt.lastIndex===0?o=r.length-1:o=Pt.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case At:{for(o=f,u=!0;r.charCodeAt(o+1)===At;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Ki&&n!==Ze&&n!==Ot&&n!==Nt&&n!==Tt&&n!==$t&&(o+=1,Qi.test(r.charAt(o)))){for(;Qi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ze&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Ki&&r.charCodeAt(f+1)===fh?(o=r.indexOf("*/",f+2)+1,o===0&&(i||D?o=r.length:C("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(Dt.lastIndex=f+1,Dt.test(r),Dt.lastIndex===0?o=r.length-1:o=Dt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],v.push(g),f=o);break}}return f++,g}function V(O){b.push(O)}return{back:V,endOfFile:k,nextToken:M,position:y}};let Vo=ke,nr=class extends Vo{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var ti=nr;nr.default=nr;Vo.registerAtRule(nr);let Yo=ke,Zo,Jo,Le=class extends Yo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Zo(new Jo,this,e).stringify()}};Le.registerLazyResult=s=>{Zo=s};Le.registerProcessor=s=>{Jo=s};var dt=Le;Le.default=Le;Yo.registerRoot(Le);let nt={comma(s){return nt.split(s,[","],!0)},space(s){let e=[" ",`
|
|
52
|
-
`," "];return nt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",u=!1;for(let
|
|
50
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Gt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Mo(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),rh&&th&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ht.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ht({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 Ht({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=l.match(/\n/g),n?(e+=n.length,o=l.lastIndexOf(`
|
|
51
|
+
`),t=l.length-o):t+=l.length,a&&u!=="start"){let h=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==h.last||h.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.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(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Gt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Gt($o(r,this.mapOpts.annotation)));let i=Oo(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new eh(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ji){let r=Ji(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;No==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var To=sh;let ih=xr,Ss=class extends ih{constructor(e){super(e),this.type="comment"}};var kr=Ss;Ss.default=Ss;let{isClean:Po,my:Do}=ht,Lo=Ir,Fo=kr,nh=xr,Uo,Qs,qs,Bo;function zo(s){return s.map(e=>(e.nodes&&(e.nodes=zo(e.nodes)),delete e.source,e))}function Wo(s){if(s[Po]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Wo(e)}let ge=class jo extends nh{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=zo(Uo(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Lo(e)]}else if(e.selector)e=[new Qs(e)];else if(e.name)e=[new qs(e)];else if(e.text)e=[new Fo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Do]||jo.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Po]&&Wo(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}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]}};ge.registerParse=s=>{Uo=s};ge.registerRule=s=>{Qs=s};ge.registerAtRule=s=>{qs=s};ge.registerRoot=s=>{Bo=s};var ke=ge;ge.default=ge;ge.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,qs.prototype):s.type==="rule"?Object.setPrototypeOf(s,Qs.prototype):s.type==="decl"?Object.setPrototypeOf(s,Lo.prototype):s.type==="comment"?Object.setPrototypeOf(s,Fo.prototype):s.type==="root"&&Object.setPrototypeOf(s,Bo.prototype),s[Do]=!0,s.nodes&&s.nodes.forEach(e=>{ge.rebuild(e)})};let oh=ke,Ho,Go,it=class extends oh{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ho(new Go,this,e).stringify()}};it.registerLazyResult=s=>{Ho=s};it.registerProcessor=s=>{Go=s};var ei=it;it.default=it;let Xi={};var Vo=function(e){Xi[e]||(Xi[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let Cs=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Yo=Cs;Cs.default=Cs;let ah=Yo,_s=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new ah(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var ti=_s;_s.default=_s;const jr=39,Ki=34,Mt=92,Qi=47,Ot=10,Ze=32,$t=12,Nt=9,Tt=13,lh=91,uh=93,ch=40,hh=41,fh=123,ph=125,dh=59,mh=42,gh=58,yh=64,Pt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Dt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,wh=/.[\r\n"'(/\\]/,qi=/[\da-f]/i;var bh=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,h,c,p,d,g,m=r.length,f=0,v=[],b=[];function y(){return f}function C(T){throw e.error("Unclosed "+T,f)}function I(){return b.length===0&&f>=m}function O(T){if(b.length)return b.pop();if(f>=m)return;let A=T?T.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Ot:case Ze:case Nt:case Tt:case $t:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ze||n===Ot||n===Nt||n===Tt||n===$t);g=["space",r.slice(f,o)],f=o-1;break}case lh:case uh:case fh:case ph:case gh:case dh:case hh:{let z=String.fromCharCode(n);g=[z,z,f];break}case ch:{if(p=v.length?v.pop()[1]:"",d=r.charCodeAt(f+1),p==="url"&&d!==jr&&d!==Ki&&d!==Ze&&d!==Ot&&d!==Nt&&d!==$t&&d!==Tt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||A){o=f;break}else C("bracket");for(c=o;r.charCodeAt(c-1)===Mt;)c-=1,h=!h}while(h);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||wh.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case jr:case Ki:{l=n===jr?"'":'"',o=f;do{if(h=!1,o=r.indexOf(l,o+1),o===-1)if(i||A){o=f+1;break}else C("string");for(c=o;r.charCodeAt(c-1)===Mt;)c-=1,h=!h}while(h);g=["string",r.slice(f,o+1),f,o],f=o;break}case yh:{Pt.lastIndex=f+1,Pt.test(r),Pt.lastIndex===0?o=r.length-1:o=Pt.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case Mt:{for(o=f,u=!0;r.charCodeAt(o+1)===Mt;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Qi&&n!==Ze&&n!==Ot&&n!==Nt&&n!==Tt&&n!==$t&&(o+=1,qi.test(r.charAt(o)))){for(;qi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ze&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Qi&&r.charCodeAt(f+1)===mh?(o=r.indexOf("*/",f+2)+1,o===0&&(i||A?o=r.length:C("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(Dt.lastIndex=f+1,Dt.test(r),Dt.lastIndex===0?o=r.length-1:o=Dt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],v.push(g),f=o);break}}return f++,g}function B(T){b.push(T)}return{back:B,endOfFile:I,nextToken:O,position:y}};let Zo=ke,ar=class extends Zo{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var ri=ar;ar.default=ar;Zo.registerAtRule(ar);let Jo=ke,Xo,Ko,Fe=class extends Jo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Xo(new Ko,this,e).stringify()}};Fe.registerLazyResult=s=>{Xo=s};Fe.registerProcessor=s=>{Ko=s};var ft=Fe;Fe.default=Fe;Jo.registerRoot(Fe);let nt={comma(s){return nt.split(s,[","],!0)},space(s){let e=[" ",`
|
|
52
|
+
`," "];return nt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",u=!1;for(let h of s)u?u=!1:h==="\\"?u=!0:l?h===a&&(l=!1):h==='"'||h==="'"?(l=!0,a=h):h==="("?o+=1:h===")"?o>0&&(o-=1):o===0&&e.includes(h)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=h;return(t||i!=="")&&r.push(i.trim()),r}};var Qo=nt;nt.default=nt;let qo=ke,vh=Qo,lr=class extends qo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return vh.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var si=lr;lr.default=lr;qo.registerRule(lr);let Sh=Ir,Ch=bh,_h=kr,xh=ri,Ih=ft,en=si;const tn={empty:!0,space:!0};function Rh(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let kh=class{constructor(e){this.input=e,this.root=new Ih,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new xh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new _h;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Ch(this.input)}decl(e,t){let r=new Sh;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Rh(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let h=this.stringFrom(e,u);h=this.spacesFromEnd(e)+h,h!==" !important"&&(r.raws.important=h);break}else if(n[1].toLowerCase()==="important"){let h=e.slice(0),c="";for(let p=u;p>0;p--){let d=h[p][0];if(c.trim().indexOf("!")===0&&d!=="space")break;c=h.pop()[1]+c}c.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=c,e=h)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new en;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",u=!0,h,c;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?u=!1:o==="comment"?(c=r[p-1]?r[p-1][0]:"empty",h=r[p+1]?r[p+1][0]:"empty",!tn[c]&&!tn[h]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new en;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Eh=kh;let Ah=ke,Mh=Eh,Oh=Rr;function ur(s,e){let t=new Oh(s,e),r=new Mh(t);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
|
|
53
53
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
|
|
54
54
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
|
|
55
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}var si=ar;ar.default=ar;Rh.registerParse(ar);let{isClean:fe,my:Mh}=ft,Ah=$o,Oh=br,$h=ke,Nh=qs,Th=jo,tn=ei,Ph=si,Dh=dt;const Lh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Fh={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},Uh={Once:!0,postcssPlugin:!0,prepare:!0},Fe=0;function Je(s){return typeof s=="object"&&typeof s.then=="function"}function Qo(s){let e=!1,t=Lh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Fe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Fe,t+"Exit"]:[t,t+"Exit"]}function rn(s){let e;return s.type==="document"?e=["Document",Fe,"DocumentExit"]:s.type==="root"?e=["Root",Fe,"RootExit"]:e=Qo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Ss(s){return s[fe]=!1,s.nodes&&s.nodes.forEach(e=>Ss(e)),s}let Cs={},Ue=class qo{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Ss(t);else if(t instanceof qo||t instanceof tn)i=Ss(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Ph;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[Mh]&&$h.rebuild(i)}this.result=new tn(e,i,r),this.helpers={...Cs,postcss:Cs,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...n,...n.prepare(this.result)}:n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,n=r.postcssVersion,o=this.result.processor.version,l=n.split("."),a=o.split(".");(l[0]!==a[0]||parseInt(l[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Fh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Uh[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Je(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];){e[fe]=!0;let t=[rn(e)];for(;t.length>0;){let r=this.visitTick(t);if(Je(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Je(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Oh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Ah(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Je(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];)e[fe]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||Th("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Je(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[fe]){l[fe]=!0,e.push(rn(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Fe){r.nodes&&r.nodes.length&&(r[fe]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[fe]=!0;let t=Qo(e);for(let r of t)if(r===Fe)e.nodes&&e.each(i=>{i[fe]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Ue.registerPostcss=s=>{Cs=s};var ea=Ue;Ue.default=Ue;Dh.registerLazyResult(Ue);Nh.registerLazyResult(Ue);let Bh=$o,zh=br,Wh=jo,Hh=si;const jh=ei;let _s=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=zh;this.result=new jh(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Bh(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||Wh("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Hh;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Gh=_s;_s.default=_s;let Vh=Gh,Yh=ea,Zh=qs,Jh=dt,ot=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Vh(this,e,t):new Yh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Xh=ot;ot.default=ot;Jh.registerProcessor(ot);Zh.registerProcessor(ot);let Kh=Sr,Qh=ko,qh=_r,ef=ti,tf=Cr,rf=dt,sf=ri;function at(s,e){if(Array.isArray(s))return s.map(i=>at(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:tf.prototype};n.map&&(n.map={...n.map,__proto__:Qh.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>at(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new rf(r);if(r.type==="decl")return new Kh(r);if(r.type==="rule")return new sf(r);if(r.type==="comment")return new qh(r);if(r.type==="atrule")return new ef(r);throw new Error("Unknown node type: "+s.type)}var nf=at;at.default=at;let of=Xs,ta=Sr,af=ea,lf=ke,ii=Xh,uf=br,cf=nf,ra=qs,hf=Go,sa=_r,ia=ti,ff=ei,df=Cr,pf=si,mf=Xo,na=ri,oa=dt,gf=vr;function N(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ii(s)}N.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
55
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}var ii=ur;ur.default=ur;Ah.registerParse(ur);let{isClean:fe,my:$h}=ht,Nh=To,Th=_r,Ph=ke,Dh=ei,Lh=Vo,rn=ti,Fh=ii,Uh=ft;const Bh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},zh={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},Wh={Once:!0,postcssPlugin:!0,prepare:!0},Ue=0;function Je(s){return typeof s=="object"&&typeof s.then=="function"}function ea(s){let e=!1,t=Bh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Ue,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Ue,t+"Exit"]:[t,t+"Exit"]}function sn(s){let e;return s.type==="document"?e=["Document",Ue,"DocumentExit"]:s.type==="root"?e=["Root",Ue,"RootExit"]:e=ea(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function xs(s){return s[fe]=!1,s.nodes&&s.nodes.forEach(e=>xs(e)),s}let Is={},Be=class ta{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=xs(t);else if(t instanceof ta||t instanceof rn)i=xs(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Fh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[$h]&&Ph.rebuild(i)}this.result=new rn(e,i,r),this.helpers={...Is,postcss:Is,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...n,...n.prepare(this.result)}:n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,n=r.postcssVersion,o=this.result.processor.version,l=n.split("."),a=o.split(".");(l[0]!==a[0]||parseInt(l[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!zh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Wh[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Je(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];){e[fe]=!0;let t=[sn(e)];for(;t.length>0;){let r=this.visitTick(t);if(Je(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Je(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Th;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Nh(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Je(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];)e[fe]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||Lh("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Je(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[fe]){l[fe]=!0,e.push(sn(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Ue){r.nodes&&r.nodes.length&&(r[fe]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[fe]=!0;let t=ea(e);for(let r of t)if(r===Ue)e.nodes&&e.each(i=>{i[fe]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Be.registerPostcss=s=>{Is=s};var ra=Be;Be.default=Be;Uh.registerLazyResult(Be);Dh.registerLazyResult(Be);let jh=To,Hh=_r,Gh=Vo,Vh=ii;const Yh=ti;let Rs=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Hh;this.result=new Yh(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new jh(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||Gh("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Vh;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Zh=Rs;Rs.default=Rs;let Jh=Zh,Xh=ra,Kh=ei,Qh=ft,ot=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Jh(this,e,t):new Xh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var qh=ot;ot.default=ot;Qh.registerProcessor(ot);Kh.registerProcessor(ot);let ef=Ir,tf=Ao,rf=kr,sf=ri,nf=Rr,of=ft,af=si;function at(s,e){if(Array.isArray(s))return s.map(i=>at(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:nf.prototype};n.map&&(n.map={...n.map,__proto__:tf.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>at(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new of(r);if(r.type==="decl")return new ef(r);if(r.type==="rule")return new af(r);if(r.type==="comment")return new rf(r);if(r.type==="atrule")return new sf(r);throw new Error("Unknown node type: "+s.type)}var lf=at;at.default=at;let uf=Ks,sa=Ir,cf=ra,hf=ke,ni=qh,ff=_r,pf=lf,ia=ei,df=Yo,na=kr,oa=ri,mf=ti,gf=Rr,yf=ii,wf=Qo,aa=si,la=ft,bf=xr;function N(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ni(s)}N.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
56
56
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
57
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new
|
|
57
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new ni().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return N([i(a)]).process(o,l)},i};N.stringify=ff;N.parse=yf;N.fromJSON=pf;N.list=wf;N.comment=s=>new na(s);N.atRule=s=>new oa(s);N.decl=s=>new sa(s);N.rule=s=>new aa(s);N.root=s=>new la(s);N.document=s=>new ia(s);N.CssSyntaxError=uf;N.Declaration=sa;N.Container=hf;N.Processor=ni;N.Document=ia;N.Comment=na;N.Warning=df;N.AtRule=oa;N.Result=mf;N.Input=gf;N.Rule=aa;N.Root=la;N.Node=bf;cf.registerPostcss(N);var vf=N;N.default=N;const j=Mc(vf);j.stringify;j.fromJSON;j.plugin;j.parse;j.list;j.document;j.comment;j.atRule;j.rule;j.decl;j.root;j.CssSyntaxError;j.Declaration;j.Container;j.Processor;j.Document;j.Comment;j.Warning;j.AtRule;j.Result;j.Input;j.Rule;j.Root;j.Node;class oi{constructor(...e){ie(this,"parentElement",null),ie(this,"parentNode",null),ie(this,"ownerDocument"),ie(this,"firstChild",null),ie(this,"lastChild",null),ie(this,"previousSibling",null),ie(this,"nextSibling",null),ie(this,"ELEMENT_NODE",1),ie(this,"TEXT_NODE",3),ie(this,"nodeType"),ie(this,"nodeName"),ie(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof oi){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const nn={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},on={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Lt={},Sf=()=>!!globalThis.Zone;function ai(s){if(Lt[s])return Lt[s];const e=globalThis[s],t=e.prototype,r=s in nn?nn[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=s in on?on[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!Sf())return Lt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?Lt[s]=u:t}catch{return t}}const Hr={};function we(s,e,t){var r;const i=`${s}.${String(t)}`;if(Hr[i])return Hr[i].call(e);const n=ai(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Hr[i]=o,o.call(e)):e[t]}const Gr={};function ua(s,e,t){const r=`${s}.${String(t)}`;if(Gr[r])return Gr[r].bind(e);const n=ai(s)[t];return typeof n!="function"?e[t]:(Gr[r]=n,n.bind(e))}function Cf(s){return we("Node",s,"ownerDocument")}function _f(s){return we("Node",s,"childNodes")}function xf(s){return we("Node",s,"parentNode")}function If(s){return we("Node",s,"parentElement")}function Rf(s){return we("Node",s,"textContent")}function kf(s,e){return ua("Node",s,"contains")(e)}function Ef(s){return ua("Node",s,"getRootNode")()}function Af(s){return!s||!("host"in s)?null:we("ShadowRoot",s,"host")}function Mf(s){return s.styleSheets}function Of(s){return!s||!("shadowRoot"in s)?null:we("Element",s,"shadowRoot")}function $f(s,e){return we("Element",s,"querySelector")(e)}function Nf(s,e){return we("Element",s,"querySelectorAll")(e)}function ca(){return ai("MutationObserver").constructor}function Ee(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch{return()=>{}}}const _={ownerDocument:Cf,childNodes:_f,parentNode:xf,parentElement:If,textContent:Rf,contains:kf,getRootNode:Ef,host:Af,styleSheets:Mf,shadowRoot:Of,querySelector:$f,querySelectorAll:Nf,mutationObserver:ca,patch:Ee};function Q(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const Me=`Please stop import mirror directly. Instead of that,\r
|
|
58
58
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
59
|
-
or you can use record.mirror to access the mirror instance during recording.`;let on={map:{},getId(){return console.error(Me),-1},getNode(){return console.error(Me),null},removeNodeFromMap(){console.error(Me)},has(){return console.error(Me),!1},reset(){console.error(Me)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(on=new Proxy(on,{get(s,e,t){return e==="map"&&console.error(Me),Reflect.get(s,e,t)}}));function lt(s,e,t={}){let r=null,i=0;return function(...n){const o=Date.now();!i&&t.leading===!1&&(i=o);const l=e-(o-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(a,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(a,n)},l))}}function xr(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>xr(s,e,n||{},!0)}function He(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch{return()=>{}}}let lr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(lr=()=>new Date().getTime());function ua(s){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=_.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=_.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function ca(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ha(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function fa(s){return s?s.nodeType===s.ELEMENT_NODE?s:_.parentElement(s):null}function te(s,e,t,r){if(!s)return!1;const i=fa(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(qt(i,e,r))return!0}catch{}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Af(s,e){return e.getId(s)!==-1}function Hr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===qe}function da(s,e){if(Xe(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=_.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?da(r,e):!0}function xs(s){return!!s.changedTouches}function Of(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function pa(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function ma(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Is(s){return s?s instanceof ni&&"shadowRoot"in s?!!s.shadowRoot:!!_.shadowRoot(s):!1}class $f{constructor(){S(this,"id",1),S(this,"styleIDMap",new WeakMap),S(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function ga(s){var e;let t=null;return"getRootNode"in s&&((e=_.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&_.host(_.getRootNode(s))&&(t=_.host(_.getRootNode(s))),t}function Nf(s){let e=s,t;for(;t=ga(e);)e=t;return e}function Tf(s){const e=s.ownerDocument;if(!e)return!1;const t=Nf(s);return _.contains(e,t)}function ya(s){const e=s.ownerDocument;return e?_.contains(e,s)||Tf(s):!1}var I=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(I||{}),x=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(x||{}),re=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(re||{}),de=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(de||{}),Be=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Be||{}),Ae=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Ae||{}),wa=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(wa||{});function an(s){return"__ln"in s}class Pf{constructor(){S(this,"length",0),S(this,"head",null),S(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&an(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&an(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const ln=(s,e)=>`${s}@${e}`;class Df{constructor(){S(this,"frozen",!1),S(this,"locked",!1),S(this,"texts",[]),S(this,"attributes",[]),S(this,"attributeMap",new WeakMap),S(this,"removes",[]),S(this,"mapRemoves",[]),S(this,"movedMap",{}),S(this,"addedSet",new Set),S(this,"movedSet",new Set),S(this,"droppedSet",new Set),S(this,"removesSubTreeCache",new Set),S(this,"mutationCb"),S(this,"blockClass"),S(this,"blockSelector"),S(this,"maskTextClass"),S(this,"maskTextSelector"),S(this,"inlineStylesheet"),S(this,"maskInputOptions"),S(this,"maskTextFn"),S(this,"maskInputFn"),S(this,"keepIframeSrcFn"),S(this,"recordCanvas"),S(this,"inlineImages"),S(this,"slimDOMOptions"),S(this,"dataURLOptions"),S(this,"doc"),S(this,"mirror"),S(this,"iframeManager"),S(this,"stylesheetManager"),S(this,"shadowDomManager"),S(this,"canvasManager"),S(this,"processedNodeManager"),S(this,"unattachedDoc"),S(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),S(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Pf,i=a=>{let u=a,c=qe;for(;c===qe;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=a=>{const u=_.parentNode(a);if(!u||!ya(a))return;let c=!1;if(a.nodeType===Node.TEXT_NODE){const g=u.tagName;if(g==="TEXTAREA")return;g==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=Xe(u)?this.mirror.getId(ga(a)):this.mirror.getId(u),p=i(a);if(h===-1||p===-1)return r.addNode(a);const d=$e(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:g=>{pa(g,this.mirror)&&this.iframeManager.addIframe(g),ma(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),Is(a)&&this.shadowDomManager.addShadowRoot(_.shadowRoot(a),this.doc)},onIframeLoad:(g,m)=>{this.iframeManager.attachIframe(g,m),this.shadowDomManager.observeAttachShadow(g)},onStylesheetLoad:(g,m)=>{this.stylesheetManager.attachLinkElement(g,m)},cssCaptured:c});d&&(e.push({parentId:h,nextId:p,node:d}),t.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)un(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(_.parentNode(a))||n(a);for(const a of this.addedSet)!cn(this.droppedSet,a)&&!un(this.removesSubTreeCache,a,this.mirror)||cn(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){const u=this.mirror.getId(_.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(a=o)}if(!a){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(_.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){a=c;break}else{const d=c.value,g=_.parentNode(d);if(g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=_.host(g);if(this.mirror.getId(m)!==-1){a=c;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),n(a.value)}const l={texts:this.texts.map(a=>{const u=a.node,c=_.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style=="string"){const c=JSON.stringify(a.styleDiff),h=JSON.stringify(a._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),S(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(_.childNodes(e),r=>_.textContent(r)||"").join("")}),S(this,"processMutation",e=>{if(!Hr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=_.textContent(e.target);!te(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Un(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,fa(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){const o=Ls(t);i=Ds({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(te(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Fn(t.tagName,r))if(n.attributes[r]=Ln(this.doc,Ie(t.tagName),Ie(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(const l of Array.from(t.style)){const a=t.style.getPropertyValue(l),u=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||u!==o.style.getPropertyPriority(l)?u===""?n.styleDiff[l]=a:n.styleDiff[l]=[a,u]:n._unchangedStyles[l]=[a,u]}for(const l of Array.from(o.style))t.style.getPropertyValue(l)===""&&(n.styleDiff[l]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(te(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=Xe(e.target)?this.mirror.getId(_.host(e.target)):this.mirror.getId(e.target);te(e.target,this.blockClass,this.blockSelector,!1)||Hr(t,this.mirror,this.slimDOMOptions)||!Af(t,this.mirror)||(this.addedSet.has(t)?(Rs(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||da(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ln(r,i)]?Rs(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Xe(e.target)&&Ke(e.target)?!0:void 0}),Lf(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),S(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Hr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[ln(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);te(e,this.blockClass,this.blockSelector,!1)||(_.childNodes(e).forEach(r=>this.genAdds(r)),Is(e)&&_.childNodes(_.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!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 Rs(s,e){s.delete(e),_.childNodes(e).forEach(t=>Rs(s,t))}function Lf(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),_.childNodes(r).forEach(i=>t.push(i)))}}function un(s,e,t){return s.size===0?!1:Ff(s,e)}function Ff(s,e,t){const r=_.parentNode(e);return r?s.has(r):!1}function cn(s,e){return s.size===0?!1:ba(s,e)}function ba(s,e){const t=_.parentNode(e);return t?s.has(t)?!0:ba(s,t):!1}let Qe;function Uf(s){Qe=s}function Bf(){Qe=void 0}const R=s=>Qe?(...t)=>{try{return s(...t)}catch(r){if(Qe&&Qe(r)===!0)return;throw r}}:s,xe=[];function pt(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch{}return s&&s.target}function va(s,e){const t=new Df;xe.push(t),t.init(s);const r=new(la())(R(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function zf({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],l;const a=lt(R(h=>{const p=Date.now()-l;s(o.map(d=>(d.timeOffset-=p,d)),h),o=[],l=null}),n),u=R(lt(R(h=>{const p=pt(h),{clientX:d,clientY:g}=xs(h)?h.changedTouches[0]:h;l||(l=lr()),o.push({x:d,y:g,id:r.getId(p),timeOffset:lr()-l}),a(typeof DragEvent<"u"&&h instanceof DragEvent?x.Drag:h instanceof MouseEvent?x.MouseMove:x.TouchMove)}),i,{trailing:!1})),c=[ee("mousemove",u,t),ee("touchmove",u,t),ee("drag",u,t)];return R(()=>{c.forEach(h=>h())})}function Wf({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let a=null;const u=c=>h=>{const p=pt(h);if(te(p,r,i,!0))return;let d=null,g=c;if("pointerType"in h){switch(h.pointerType){case"mouse":d=de.Mouse;break;case"touch":d=de.Touch;break;case"pen":d=de.Pen;break}d===de.Touch?re[c]===re.MouseDown?g="TouchStart":re[c]===re.MouseUp&&(g="TouchEnd"):de.Pen}else xs(h)&&(d=de.Touch);d!==null?(a=d,(g.startsWith("Touch")&&d===de.Touch||g.startsWith("Mouse")&&d===de.Mouse)&&(d=null)):re[c]===re.Click&&(d=a,a=null);const m=xs(h)?h.changedTouches[0]:h;if(!m)return;const f=t.getId(p),{clientX:v,clientY:b}=m;R(s)({type:re[g],id:f,x:v,y:b,...d!==null&&{pointerType:d}})};return Object.keys(re).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=Ie(c);const p=u(c);if(window.PointerEvent)switch(re[c]){case re.MouseDown:case re.MouseUp:h=h.replace("mouse","pointer");break;case re.TouchStart:case re.TouchEnd:return}l.push(ee(h,p,e))}),R(()=>{l.forEach(c=>c())})}function Sa({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const o=R(lt(R(l=>{const a=pt(l);if(!a||te(a,r,i,!0))return;const u=t.getId(a);if(a===e&&e.defaultView){const c=ua(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return ee("scroll",o,e)}function Hf({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=R(lt(R(()=>{const n=ca(),o=ha();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return ee("resize",i,e)}const jf=["INPUT","TEXTAREA","SELECT"],hn=new WeakMap;function Gf({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:c}){function h(b){let y=pt(b);const C=b.isTrusted,k=y&&y.tagName;if(y&&k==="OPTION"&&(y=_.parentElement(y)),!y||!k||jf.indexOf(k)<0||te(y,r,i,!0)||y.classList.contains(n)||o&&y.matches(o))return;let M=y.value,V=!1;const O=Ls(y)||"";O==="radio"||O==="checkbox"?V=y.checked:(l[k.toLowerCase()]||l[O])&&(M=Ds({element:y,maskInputOptions:l,tagName:k,type:O,value:M,maskInputFn:a})),p(y,c?{text:M,isChecked:V,userTriggered:C}:{text:M,isChecked:V});const D=y.name;O==="radio"&&D&&V&&e.querySelectorAll(`input[type="radio"][name="${D}"]`).forEach(Y=>{if(Y!==y){const W=Y.value;p(Y,c?{text:W,isChecked:!V,userTriggered:!1}:{text:W,isChecked:!V})}})}function p(b,y){const C=hn.get(b);if(!C||C.text!==y.text||C.isChecked!==y.isChecked){hn.set(b,y);const k=t.getId(b);R(s)({...y,id:k})}}const g=(u.input==="last"?["change"]:["input","change"]).map(b=>ee(b,R(h),e)),m=e.defaultView;if(!m)return()=>{g.forEach(b=>b())};const f=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),v=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...v.map(b=>xr(b[0],b[1],{set(){R(h)({target:this,isTrusted:!1})}},!1,m))),R(()=>{g.forEach(b=>b())})}function ur(s){const e=[];function t(r,i){if(Ft("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ft("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ft("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ft("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function ye(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Vf({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:R((c,h,p)=>{const[d,g]=p,{id:m,styleId:f}=ye(h,e,t.styleMirror);return(m&&m!==-1||f&&f!==-1)&&s({id:m,styleId:f,adds:[{rule:d,index:g}]}),c.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,p=this.cssRules.length){const d=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,p])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:R((c,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,removes:[{index:d}]}),c.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:R((c,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replace:d}),c.apply(h,p)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:R((c,h,p)=>{const[d]=p,{id:g,styleId:m}=ye(h,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replaceSync:d}),c.apply(h,p)})}));const a={};Ut("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Ut("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Ut("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Ut("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(a).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:R((p,d,g)=>{const[m,f]=g,{id:v,styleId:b}=ye(d.parentStyleSheet,e,t.styleMirror);return(v&&v!==-1||b&&b!==-1)&&s({id:v,styleId:b,adds:[{rule:m,index:[...ur(d),f||0]}]}),p.apply(d,g)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:R((p,d,g)=>{const[m]=g,{id:f,styleId:v}=ye(d.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||v&&v!==-1)&&s({id:f,styleId:v,removes:[{index:[...ur(d),m]}]}),p.apply(d,g)})})}),R(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function Ca({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(_.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var u;return(u=a.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=a.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch{}return h}}),R(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Yf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:R((l,a,u)=>{var c;const[h,p,d]=u;if(t.has(h))return n.apply(a,[h,p,d]);const{id:g,styleId:m}=ye((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,set:{property:h,value:p,priority:d},index:ur(a.parentRule)}),l.apply(a,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:R((l,a,u)=>{var c;const[h]=u;if(t.has(h))return o.apply(a,[h]);const{id:p,styleId:d}=ye((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||d&&d!==-1)&&s({id:p,styleId:d,remove:{property:h},index:ur(a.parentRule)}),l.apply(a,u)})}),R(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Zf({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const o=R(a=>lt(R(u=>{const c=pt(u);if(!c||te(c,e,t,!0))return;const{currentTime:h,volume:p,muted:d,playbackRate:g,loop:m}=c;s({type:a,id:r.getId(c),currentTime:h,volume:p,muted:d,playbackRate:g,loop:m})}),i.media||500)),l=[ee("play",o(Ae.Play),n),ee("pause",o(Ae.Pause),n),ee("seeked",o(Ae.Seeked),n),ee("volumechange",o(Ae.VolumeChange),n),ee("ratechange",o(Ae.RateChange),n)];return R(()=>{l.forEach(a=>a())})}function Jf({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,u,c){const h=new n(a,u,c);return i.set(h,{family:a,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const o=He(e.fonts,"add",function(l){return function(a){return setTimeout(R(()=>{const u=i.get(a);u&&(s(u),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),R(()=>{r.forEach(l=>l())})}function Xf(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let o=!0;const l=R(()=>{const a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;const u=[],c=a.rangeCount||0;for(let h=0;h<c;h++){const p=a.getRangeAt(h),{startContainer:d,startOffset:g,endContainer:m,endOffset:f}=p;te(d,r,i,!0)||te(m,r,i,!0)||u.push({start:t.getId(d),startOffset:g,end:t.getId(m),endOffset:f})}n({ranges:u})});return l(),ee("selectionchange",l)}function Kf({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:He(t.customElements,"define",function(i){return function(n,o,l){try{e({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,l])}})}function Qf(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:p,selectionCb:d,customElementCb:g}=s;s.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),t(...m)},s.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),r(...m)},s.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},s.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),n(...m)},s.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),o(...m)},s.inputCb=(...m)=>{e.input&&e.input(...m),l(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),a(...m)},s.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),u(...m)},s.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),c(...m)},s.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),h(...m)},s.fontCb=(...m)=>{e.font&&e.font(...m),p(...m)},s.selectionCb=(...m)=>{e.selection&&e.selection(...m),d(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),g(...m)}}function qf(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Qf(s,e);let r;s.recordDOM&&(r=va(s,s.doc));const i=zf(s),n=Wf(s),o=Sa(s),l=Hf(s,{win:t}),a=Gf(s),u=Zf(s);let c=()=>{},h=()=>{},p=()=>{},d=()=>{};s.recordDOM&&(c=Vf(s,{win:t}),h=Ca(s,s.doc),p=Yf(s,{win:t}),s.collectFonts&&(d=Jf(s)));const g=Xf(s),m=Kf(s),f=[];for(const v of s.plugins)f.push(v.observer(v.callback,t,v.options));return R(()=>{xe.forEach(v=>v.reset()),r==null||r.disconnect(),i(),n(),o(),l(),a(),u(),c(),h(),p(),d(),g(),m(),f.forEach(v=>v())})}function Ft(s){return typeof window[s]<"u"}function Ut(s){return!!(typeof window[s]<"u"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class fn{constructor(e){S(this,"iframeIdToRemoteIdMap",new WeakMap),S(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class ed{constructor(e){S(this,"iframes",new WeakMap),S(this,"crossOriginIframeMap",new WeakMap),S(this,"crossOriginIframeMirror",new fn(Dn)),S(this,"crossOriginIframeStyleMirror"),S(this,"crossOriginIframeRootIdMap",new WeakMap),S(this,"mirror"),S(this,"mutationCb"),S(this,"wrappedEmit"),S(this,"loadListener"),S(this,"stylesheetManager"),S(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new fn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case I.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:I.IncrementalSnapshot,data:{source:x.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case I.Meta:case I.Load:case I.DomContentLoaded:return!1;case I.Plugin:return t;case I.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case I.IncrementalSnapshot:switch(t.data.source){case x.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.Drag:case x.TouchMove:case x.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.ViewportResize:return!1;case x.MediaInteraction:case x.MouseInteraction:case x.Scroll:case x.CanvasMutation:case x.Input:return this.replaceIds(t.data,e,["id"]),t;case x.StyleSheetRule:case x.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case x.Font:return t;case x.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case x.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==wa.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class td{constructor(e){S(this,"shadowDoms",new WeakSet),S(this,"mutationCb"),S(this,"scrollCb"),S(this,"bypassOptions"),S(this,"mirror"),S(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Ke(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=va({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Sa({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(_.host(e))),this.restoreHandlers.push(Ca({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(He(e.prototype,"attachShadow",function(i){return function(n){const o=i.call(this,n),l=_.shadowRoot(this);return l&&ya(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",rd=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Bt=0;Bt<Ne.length;Bt++)rd[Ne.charCodeAt(Bt)]=Bt;var sd=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Ne[e[t]>>2],i+=Ne[(e[t]&3)<<4|e[t+1]>>4],i+=Ne[(e[t+1]&15)<<2|e[t+2]>>6],i+=Ne[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const dn=new Map;function id(s,e){let t=dn.get(s);return t||(t=new Map,dn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const _a=(s,e,t)=>{if(!s||!(Ia(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=id(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function Vt(s,e,t){if(s instanceof Array)return s.map(r=>Vt(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=sd(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Vt(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Vt(s.data,e,t),s.width,s.height]};if(Ia(s,e)||typeof s=="object"){const r=s.constructor.name,i=_a(s,e,t);return{rr_type:r,index:i}}}}return s}const xa=(s,e,t)=>s.map(r=>Vt(r,e,t)),Ia=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function nd(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=He(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...u){return te(this.canvas,t,r,!0)||setTimeout(()=>{const c=xa(u,e,this);s(this.canvas,{type:Be["2D"],property:o,args:c})},0),a.apply(this,u)}});i.push(l)}catch{const l=xr(e.CanvasRenderingContext2D.prototype,o,{set(a){s(this.canvas,{type:Be["2D"],property:o,args:[a],setter:!0})}});i.push(l)}return()=>{i.forEach(o=>o())}}function od(s){return s==="experimental-webgl"?"webgl":s}function pn(s,e,t,r){const i=[];try{const n=He(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!te(this,e,t,!0)){const u=od(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]=="object"){const c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});i.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function mn(s,e,t,r,i,n){const o=[],l=Object.getOwnPropertyNames(s);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;const u=He(s,a,function(c){return function(...h){const p=c.apply(this,h);if(_a(p,n,this),"tagName"in this.canvas&&!te(this.canvas,r,i,!0)){const d=xa(h,n,this),g={type:e,property:a,args:d};t(this.canvas,g)}return p}});o.push(u)}catch{const u=xr(s,a,{set(c){t(this.canvas,{type:e,property:a,args:[c],setter:!0})}});o.push(u)}return o}function ad(s,e,t,r){const i=[];return i.push(...mn(e.WebGLRenderingContext.prototype,Be.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...mn(e.WebGL2RenderingContext.prototype,Be.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const Ra="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",ld=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),gn=typeof window<"u"&&window.Blob&&new Blob([ld(Ra)],{type:"text/javascript;charset=utf-8"});function ud(s){let e;try{if(e=gn&&(window.URL||window.webkitURL).createObjectURL(gn),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+Ra,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class cd{constructor(e){S(this,"pendingCanvasMutations",new Map),S(this,"rafStamps",{latestId:0,invokeId:null}),S(this,"mirror"),S(this,"mutationCb"),S(this,"resetObservers"),S(this,"frozen",!1),S(this,"locked",!1),S(this,"processMutation",(a,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const o=pn(t,r,i,!0),l=new Map,a=new ud;a.onmessage=g=>{const{id:m}=g.data;if(l.set(m,!1),!("base64"in g.data))return;const{base64:f,type:v,width:b,height:y}=g.data;this.mutationCb({id:m,type:Be["2D"],commands:[{property:"clearRect",args:[0,0,b,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:v}]},0,0]}]})};const u=1e3/e;let c=0,h;const p=()=>{const g=[];return t.document.querySelectorAll("canvas").forEach(m=>{te(m,r,i,!0)||g.push(m)}),g},d=g=>{if(c&&g-c<u){h=requestAnimationFrame(d);return}c=g,p().forEach(async m=>{var f;const v=this.mirror.getId(m);if(l.get(v)||m.width===0||m.height===0)return;if(l.set(v,!0),["webgl","webgl2"].includes(m.__context)){const y=m.getContext(m.__context);((f=y==null?void 0:y.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const b=await createImageBitmap(m);a.postMessage({id:v,bitmap:b,width:m.width,height:m.height,dataURLOptions:n.dataURLOptions},[b])}),h=requestAnimationFrame(d)};h=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=pn(e,t,r,!1),n=nd(this.processMutation.bind(this),e,t,r),o=ad(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(o=>{const{type:l,...a}=o;return a}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class hd{constructor(e){S(this,"trackedLinkElements",new WeakSet),S(this,"mutationCb"),S(this,"adoptedStyleSheetCb"),S(this,"styleMirror",new $f),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:Nn(l,n.href),index:a}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class fd{constructor(){S(this,"nodeMap",new WeakMap),S(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let G,Yt,jr,cr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((gi=s.contentWindow)==null?void 0:gi.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const oe=cl();function mt(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:d,maskInputFn:g,maskTextFn:m,hooks:f,packFn:v,sampling:b={},dataURLOptions:y={},mousemoveWait:C,recordDOM:k=!0,recordCanvas:M=!1,recordCrossOriginIframes:V=!1,recordAfter:O=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:D=!1,collectFonts:Y=!1,inlineImages:W=!1,plugins:Q,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:je=new Set([]),errorHandler:Ge}=s;Uf(Ge);const J=V?window.parent===window:!0;let se=!1;if(!J)try{window.parent.document&&(se=!1)}catch{se=!0}if(J&&!e)throw new Error("emit function is required");if(!J&&!se)return()=>{};C!==void 0&&b.mousemove===void 0&&(b.mousemove=C),oe.reset();const ve=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}:p!==void 0?p:{password:!0},ue=d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:d==="all",headMetaDescKeywords:d==="all",headTitleMutations:d==="all"}:d||{};Of();let fi,kr=0;const di=A=>{for(const ne of Q||[])ne.eventProcessor&&(A=ne.eventProcessor(A));return v&&!se&&(A=v(A)),A};G=(A,ne)=>{var H;const j=A;if(j.timestamp=lr(),(H=xe[0])!=null&&H.isFrozen()&&j.type!==I.FullSnapshot&&!(j.type===I.IncrementalSnapshot&&j.data.source===x.Mutation)&&xe.forEach(ce=>ce.unfreeze()),J)e==null||e(di(j),ne);else if(se){const ce={type:"rrweb",event:di(j),origin:window.location.origin,isCheckout:ne};window.parent.postMessage(ce,"*")}if(j.type===I.FullSnapshot)fi=j,kr=0;else if(j.type===I.IncrementalSnapshot){if(j.data.source===x.Mutation&&j.data.isAttachIframe)return;kr++;const ce=r&&kr>=r,T=t&&j.timestamp-fi.timestamp>t;(ce||T)&&Yt(!0)}};const gt=A=>{G({type:I.IncrementalSnapshot,data:{source:x.Mutation,...A}})},pi=A=>G({type:I.IncrementalSnapshot,data:{source:x.Scroll,...A}}),mi=A=>G({type:I.IncrementalSnapshot,data:{source:x.CanvasMutation,...A}}),za=A=>G({type:I.IncrementalSnapshot,data:{source:x.AdoptedStyleSheet,...A}}),Se=new hd({mutationCb:gt,adoptedStyleSheetCb:za}),Ce=new ed({mirror:oe,mutationCb:gt,stylesheetManager:Se,recordCrossOriginIframes:V,wrappedEmit:G});for(const A of Q||[])A.getMirror&&A.getMirror({nodeMirror:oe,crossOriginIframeMirror:Ce.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ce.crossOriginIframeStyleMirror});const Er=new fd;jr=new cd({recordCanvas:M,mutationCb:mi,win:window,blockClass:i,blockSelector:n,mirror:oe,sampling:b.canvas,dataURLOptions:y});const yt=new td({mutationCb:gt,scrollCb:pi,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:ve,dataURLOptions:y,maskTextFn:m,maskInputFn:g,recordCanvas:M,inlineImages:W,sampling:b,slimDOMOptions:ue,iframeManager:Ce,stylesheetManager:Se,canvasManager:jr,keepIframeSrcFn:E,processedNodeManager:Er},mirror:oe});Yt=(A=!1)=>{if(!k)return;G({type:I.Meta,data:{href:window.location.href,width:ha(),height:ca()}},A),Se.reset(),yt.init(),xe.forEach(H=>H.lock());const ne=Tl(document,{mirror:oe,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:ve,maskTextFn:m,maskInputFn:g,slimDOM:ue,dataURLOptions:y,recordCanvas:M,inlineImages:W,onSerialize:H=>{pa(H,oe)&&Ce.addIframe(H),ma(H,oe)&&Se.trackLinkElement(H),Is(H)&&yt.addShadowRoot(_.shadowRoot(H),document)},onIframeLoad:(H,j)=>{Ce.attachIframe(H,j),yt.observeAttachShadow(H)},onStylesheetLoad:(H,j)=>{Se.attachLinkElement(H,j)},keepIframeSrcFn:E});if(!ne)return console.warn("Failed to snapshot the document");G({type:I.FullSnapshot,data:{node:ne,initialOffset:ua(window)}},A),xe.forEach(H=>H.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Se.adoptStyleSheets(document.adoptedStyleSheets,oe.getId(document))};try{const A=[],ne=j=>{var ce;return R(qf)({mutationCb:gt,mousemoveCb:(T,Mr)=>G({type:I.IncrementalSnapshot,data:{source:Mr,positions:T}}),mouseInteractionCb:T=>G({type:I.IncrementalSnapshot,data:{source:x.MouseInteraction,...T}}),scrollCb:pi,viewportResizeCb:T=>G({type:I.IncrementalSnapshot,data:{source:x.ViewportResize,...T}}),inputCb:T=>G({type:I.IncrementalSnapshot,data:{source:x.Input,...T}}),mediaInteractionCb:T=>G({type:I.IncrementalSnapshot,data:{source:x.MediaInteraction,...T}}),styleSheetRuleCb:T=>G({type:I.IncrementalSnapshot,data:{source:x.StyleSheetRule,...T}}),styleDeclarationCb:T=>G({type:I.IncrementalSnapshot,data:{source:x.StyleDeclaration,...T}}),canvasMutationCb:mi,fontCb:T=>G({type:I.IncrementalSnapshot,data:{source:x.Font,...T}}),selectionCb:T=>{G({type:I.IncrementalSnapshot,data:{source:x.Selection,...T}})},customElementCb:T=>{G({type:I.IncrementalSnapshot,data:{source:x.CustomElement,...T}})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:u,maskInputOptions:ve,inlineStylesheet:c,sampling:b,recordDOM:k,recordCanvas:M,inlineImages:W,userTriggeredOnInput:D,collectFonts:Y,doc:j,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:E,blockSelector:n,slimDOMOptions:ue,dataURLOptions:y,mirror:oe,iframeManager:Ce,stylesheetManager:Se,shadowDomManager:yt,processedNodeManager:Er,canvasManager:jr,ignoreCSSAttributes:je,plugins:((ce=Q==null?void 0:Q.filter(T=>T.observer))==null?void 0:ce.map(T=>({observer:T.observer,options:T.options,callback:Mr=>G({type:I.Plugin,data:{plugin:T.name,payload:Mr}})})))||[]},f)};Ce.addLoadListener(j=>{try{A.push(ne(j.contentDocument))}catch(ce){console.warn(ce)}});const H=()=>{Yt(),A.push(ne(document)),cr=!0};return document.readyState==="interactive"||document.readyState==="complete"?H():(A.push(ee("DOMContentLoaded",()=>{G({type:I.DomContentLoaded,data:{}}),O==="DOMContentLoaded"&&H()})),A.push(ee("load",()=>{G({type:I.Load,data:{}}),O==="load"&&H()},window))),()=>{A.forEach(j=>j()),Er.destroy(),cr=!1,Bf()}}catch(A){console.warn(A)}}mt.addCustomEvent=(s,e)=>{if(!cr)throw new Error("please add custom event after start recording");G({type:I.Custom,data:{tag:s,payload:e}})};mt.freezePage=()=>{xe.forEach(s=>s.freeze())};mt.takeFullSnapshot=s=>{if(!cr)throw new Error("please take full snapshot after start recording");Yt(s)};mt.mirror=oe;var yn;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(yn||(yn={}));const dd=['input[type="password"]','input[type="credit-card"]','input[autocomplete="cc-number"]','input[autocomplete="cc-csc"]','input[autocomplete="cc-exp"]','input[autocomplete="cc-exp-month"]','input[autocomplete="cc-exp-year"]','input[autocomplete="new-password"]','input[autocomplete="current-password"]','input[name*="password"]','input[name*="passwd"]','input[name*="secret"]','input[name*="token"]','input[name*="apikey"]','input[name*="api_key"]','input[name*="api-key"]','input[name*="credit"]','input[name*="card"]','input[name*="cvv"]','input[name*="cvc"]','input[name*="ssn"]','input[id*="password"]','input[id*="secret"]','input[id*="token"]',"[data-private]","[data-mask]","[data-sensitive]"];function pd(){return dd.join(", ")}function md(){return"[data-private-text], [data-mask-text]"}function gd(s){return s.matches(pd())}function yd(s){return s?{maskAllInputs:!1,maskTextSelector:md(),maskInputOptions:{password:!0},maskInputFn:(e,t)=>gd(t)?"*".repeat(Math.min(e.length,20)):e,blockSelector:"[data-recorder-block], [data-bw-recorder-ui], #bw-recorder-root",ignoreSelector:"[data-recorder-ignore]"}:{maskAllInputs:!1,maskTextSelector:null,maskInputOptions:{}}}const wd=900*1e3,bd=30*1e3,vd=100;class Sd{constructor(e){this.state="idle",this.events=[],this.stopFn=null,this.startTime=0,this.pauseTime=0,this.totalPausedDuration=0,this.chunkIndex=0,this.maxDurationTimer=null,this.chunkTimer=null,this.uploader=null,this.metadata=null,this.onEventCallback=null,this.config={...e,maxDuration:e.maxDuration??wd,maskInputs:e.maskInputs??!0}}setUploader(e){this.uploader=e}onEvent(e){this.onEventCallback=e}getState(){return this.state}getElapsedTime(){return this.state==="idle"||this.startTime===0?0:this.state==="paused"?this.pauseTime-this.startTime-this.totalPausedDuration:Date.now()-this.startTime-this.totalPausedDuration}getEvents(){return[...this.events]}async start(){var r,i;if(this.state!=="idle")throw new Error(`Cannot start recording: state is ${this.state}`);if(this.setState("recording"),this.startTime=Date.now(),this.events=[],this.chunkIndex=0,this.totalPausedDuration=0,this.metadata={url:window.location.href,userAgent:navigator.userAgent,viewport:{width:window.innerWidth,height:window.innerHeight},startedAt:this.startTime},this.uploader)try{await this.uploader.start(this.metadata)}catch(n){throw(i=(r=this.config).onError)==null||i.call(r,n),this.setState("idle"),n}const e=yd(this.config.maskInputs),t=mt({emit:n=>this.handleEvent(n),maskAllInputs:e.maskAllInputs,maskTextSelector:e.maskTextSelector??void 0,maskInputFn:e.maskInputFn,blockSelector:e.blockSelector,recordCanvas:!0,collectFonts:!0,inlineStylesheet:!0,sampling:{mousemove:!0,mouseInteraction:!0,scroll:150,input:"last"}});this.stopFn=t??null,this.maxDurationTimer=setTimeout(()=>{this.stop()},this.config.maxDuration),this.chunkTimer=setInterval(()=>{this.flushChunk()},bd)}pause(){if(this.state!=="recording")throw new Error(`Cannot pause: state is ${this.state}`);this.setState("paused"),this.pauseTime=Date.now()}resume(){if(this.state!=="paused")throw new Error(`Cannot resume: state is ${this.state}`);this.totalPausedDuration+=Date.now()-this.pauseTime,this.setState("recording")}async stop(e=[]){var t,r,i,n;if(this.state==="idle"||this.state==="stopped")return null;if(this.maxDurationTimer&&(clearTimeout(this.maxDurationTimer),this.maxDurationTimer=null),this.chunkTimer&&(clearInterval(this.chunkTimer),this.chunkTimer=null),this.stopFn&&(this.stopFn(),this.stopFn=null),this.setState("stopped"),await this.flushChunk(),this.uploader)try{const o=await this.uploader.complete(this.getElapsedTime(),this.events.length,e);return(r=(t=this.config).onComplete)==null||r.call(t,o),o}catch(o){return(n=(i=this.config).onError)==null||n.call(i,o),null}return null}handleEvent(e){var t;this.state!=="paused"&&(this.events.push(e),(t=this.onEventCallback)==null||t.call(this,e),this.events.length>=vd&&this.flushChunk())}async flushChunk(){var t,r;if(this.events.length===0||!this.uploader)return;const e={index:this.chunkIndex++,events:[...this.events],timestamp:Date.now()};this.events=[];try{await this.uploader.uploadChunk(e)}catch(i){this.events=[...e.events,...this.events],this.chunkIndex--,(r=(t=this.config).onError)==null||r.call(t,i)}}setState(e){var t,r;this.state=e,(r=(t=this.config).onStateChange)==null||r.call(t,e)}reset(){this.stop(),this.state="idle",this.events=[],this.startTime=0,this.pauseTime=0,this.totalPausedDuration=0,this.chunkIndex=0,this.metadata=null}}class Cd{constructor(){this.markers=[],this.recordingStartTime=0,this.isRecording=!1,this.captureDebounceTimer=null}setStartTime(e){this.recordingStartTime=e,this.isRecording=!0}getMarkers(){return[...this.markers]}getCount(){return this.markers.length}capture(e){if(!this.isRecording||this.recordingStartTime===0)return null;const t={timestamp:Date.now()-this.recordingStartTime,eventType:e};return this.markers.push(t),console.log("[BWorlds Recorder] Screenshot marker added",{timestamp:t.timestamp,eventType:t.eventType,totalMarkers:this.markers.length}),t}captureDebounced(e,t=500){this.captureDebounceTimer&&clearTimeout(this.captureDebounceTimer),this.captureDebounceTimer=setTimeout(()=>{this.capture(e),this.captureDebounceTimer=null},t)}stop(){this.isRecording=!1,this.captureDebounceTimer&&(clearTimeout(this.captureDebounceTimer),this.captureDebounceTimer=null)}reset(){this.markers=[],this.recordingStartTime=0,this.isRecording=!1,this.captureDebounceTimer&&(clearTimeout(this.captureDebounceTimer),this.captureDebounceTimer=null)}}class _d{constructor(e){this.lastScrollY=0,this.viewportHeight=0,this.observers=[],this.isRecording=!1,this.hasInitialScreenshot=!1,this.handleScroll=()=>{if(!this.isRecording)return;const t=window.scrollY;Math.abs(t-this.lastScrollY)>this.viewportHeight*.5&&(this.lastScrollY=t,this.screenshotCapture.captureDebounced("scroll",500))},this.handleFormSubmit=t=>{this.isRecording&&this.triggerScreenshot("form_submit")},this.handleNavigation=()=>{this.isRecording&&setTimeout(()=>{this.triggerScreenshot("navigation")},500)},this.screenshotCapture=e,this.viewportHeight=window.innerHeight}start(){this.isRecording||(this.isRecording=!0,this.lastScrollY=window.scrollY,this.viewportHeight=window.innerHeight,this.hasInitialScreenshot=!1,this.setupModalDetection(),this.setupScrollDetection(),this.setupFormDetection(),this.setupNavigationDetection(),setTimeout(()=>{this.isRecording&&!this.hasInitialScreenshot&&(this.hasInitialScreenshot=!0,this.triggerScreenshot("load"))},500))}stop(){this.isRecording=!1,this.observers.forEach(e=>e.disconnect()),this.observers=[],window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("popstate",this.handleNavigation)}handleRrwebEvent(e){this.isRecording&&e.type===I.IncrementalSnapshot&&e.data.source}triggerScreenshot(e){this.isRecording&&this.screenshotCapture.capture(e)}setupModalDetection(){const e=new MutationObserver(t=>{for(const r of t){if(r.type==="childList"){for(const i of r.addedNodes)if(i instanceof HTMLElement&&this.isModal(i)){setTimeout(()=>{this.triggerScreenshot("modal_open")},300);return}}if(r.type==="attributes"){const i=r.target;if(r.attributeName==="open"&&i.tagName==="DIALOG"&&i.hasAttribute("open")){setTimeout(()=>{this.triggerScreenshot("modal_open")},300);return}}}});e.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["open","aria-hidden","aria-modal"]}),this.observers.push(e)}isModal(e){if(e.tagName.toLowerCase()==="dialog"||e.getAttribute("role")==="dialog"||e.getAttribute("role")==="alertdialog"||e.getAttribute("aria-modal")==="true")return!0;const r=e.className.toLowerCase(),i=["modal","dialog","overlay","popup","lightbox"];for(const o of i)if(r.includes(o))return!0;const n=window.getComputedStyle(e);if((n.position==="fixed"||n.position==="absolute")&&parseInt(n.zIndex)>100){const o=e.getBoundingClientRect(),l=window.innerWidth*window.innerHeight;if(o.width*o.height>l*.3)return!0}return!1}setupScrollDetection(){window.addEventListener("scroll",this.handleScroll,{passive:!0})}setupFormDetection(){document.addEventListener("submit",this.handleFormSubmit,!0)}setupNavigationDetection(){window.addEventListener("popstate",this.handleNavigation);const e=history.pushState.bind(history),t=history.replaceState.bind(history);history.pushState=(...r)=>{e(...r),this.handleNavigation()},history.replaceState=(...r)=>{t(...r),this.handleNavigation()}}destroy(){this.stop(),document.removeEventListener("submit",this.handleFormSubmit,!0)}}class xd{constructor(){this.recordingId="",this.sessionToken="",this.metadata=null,this.chunks=[],this.screenshotMarkers=[]}async start(e){return this.recordingId=`rec_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,this.sessionToken=`tok_${Math.random().toString(36).substr(2,16)}`,this.metadata=e,this.chunks=[],this.screenshotMarkers=[],console.log("[BWorlds Recorder] Recording started",{recordingId:this.recordingId,metadata:{url:e.url,viewport:e.viewport,startedAt:new Date(e.startedAt).toISOString()}}),{token:this.sessionToken,recordingId:this.recordingId,expiresAt:Date.now()+3600*1e3}}async uploadChunk(e){this.chunks.push(e),console.log("[BWorlds Recorder] Chunk uploaded",{recordingId:this.recordingId,chunkIndex:e.index,eventCount:e.events.length,totalEvents:this.chunks.reduce((t,r)=>t+r.events.length,0)})}async complete(e,t,r){this.screenshotMarkers=r;const i={recordingId:this.recordingId,playbackUrl:`https://app.bworlds.com/recordings/${this.recordingId}`,duration:e,eventCount:this.chunks.reduce((n,o)=>n+o.events.length,0),screenshotCount:r.length};return console.log("[BWorlds Recorder] Recording completed",{...i,metadata:this.metadata,screenshotMarkers:r.map(n=>({timestamp:n.timestamp,eventType:n.eventType}))}),console.log("[BWorlds Recorder] Recording data summary:",{chunks:this.chunks.length,screenshotMarkers:r.length,totalEvents:i.eventCount,duration:`${Math.round(e/1e3)}s`}),i}getData(){return{metadata:this.metadata,chunks:this.chunks,screenshotMarkers:this.screenshotMarkers}}}class Id{constructor(e,t){this.sessionToken="",this.recordingId="",this.apiEndpoint=e,this.apiKey=t}async start(e){const t=await fetch(`${this.apiEndpoint}/api/recordings/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({api_key:this.apiKey,metadata:{url:e.url,user_agent:e.userAgent,viewport:e.viewport}})});if(!t.ok)throw new Error(`Failed to start recording: ${t.statusText}`);const r=await t.json();return this.sessionToken=r.session_token,this.recordingId=r.recording_id,{token:r.session_token,recordingId:r.recording_id,expiresAt:r.expires_at}}async uploadChunk(e){const t=await fetch(`${this.apiEndpoint}/api/recordings/${this.recordingId}/chunk`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.sessionToken}`},body:JSON.stringify({events:e.events,chunk_index:e.index})});if(!t.ok)throw new Error(`Failed to upload chunk: ${t.statusText}`)}async complete(e,t,r){const i=await fetch(`${this.apiEndpoint}/api/recordings/${this.recordingId}/complete`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.sessionToken}`},body:JSON.stringify({duration_ms:e,event_count:t,screenshot_markers:r.map(o=>({timestamp_ms:o.timestamp,event_type:o.eventType}))})});if(!i.ok)throw new Error(`Failed to complete recording: ${i.statusText}`);const n=await i.json();return{recordingId:this.recordingId,playbackUrl:n.playback_url,duration:e,eventCount:t,screenshotCount:r.length}}}var Ir,P,ka,_e,wn,Ea,Ma,Aa,ai,ks,Es,ut={},Oa=[],Rd=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Rr=Array.isArray;function pe(s,e){for(var t in e)s[t]=e[t];return s}function li(s){s&&s.parentNode&&s.parentNode.removeChild(s)}function kd(s,e,t){var r,i,n,o={};for(n in e)n=="key"?r=e[n]:n=="ref"?i=e[n]:o[n]=e[n];if(arguments.length>2&&(o.children=arguments.length>3?Ir.call(arguments,2):t),typeof s=="function"&&s.defaultProps!=null)for(n in s.defaultProps)o[n]===void 0&&(o[n]=s.defaultProps[n]);return Zt(s,o,r,i,null)}function Zt(s,e,t,r,i){var n={type:s,props:e,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++ka,__i:-1,__u:0};return i==null&&P.vnode!=null&&P.vnode(n),n}function ze(s){return s.children}function Jt(s,e){this.props=s,this.context=e}function We(s,e){if(e==null)return s.__?We(s.__,s.__i+1):null;for(var t;e<s.__k.length;e++)if((t=s.__k[e])!=null&&t.__e!=null)return t.__e;return typeof s.type=="function"?We(s):null}function $a(s){var e,t;if((s=s.__)!=null&&s.__c!=null){for(s.__e=s.__c.base=null,e=0;e<s.__k.length;e++)if((t=s.__k[e])!=null&&t.__e!=null){s.__e=s.__c.base=t.__e;break}return $a(s)}}function bn(s){(!s.__d&&(s.__d=!0)&&_e.push(s)&&!hr.__r++||wn!=P.debounceRendering)&&((wn=P.debounceRendering)||Ea)(hr)}function hr(){for(var s,e,t,r,i,n,o,l=1;_e.length;)_e.length>l&&_e.sort(Ma),s=_e.shift(),l=_e.length,s.__d&&(t=void 0,r=void 0,i=(r=(e=s).__v).__e,n=[],o=[],e.__P&&((t=pe({},r)).__v=r.__v+1,P.vnode&&P.vnode(t),ui(e.__P,t,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,n,i??We(r),!!(32&r.__u),o),t.__v=r.__v,t.__.__k[t.__i]=t,Pa(n,t,o),r.__e=r.__=null,t.__e!=i&&$a(t)));hr.__r=0}function Na(s,e,t,r,i,n,o,l,a,u,c){var h,p,d,g,m,f,v,b=r&&r.__k||Oa,y=e.length;for(a=Ed(t,e,b,a,y),h=0;h<y;h++)(d=t.__k[h])!=null&&(p=d.__i==-1?ut:b[d.__i]||ut,d.__i=h,f=ui(s,d,p,i,n,o,l,a,u,c),g=d.__e,d.ref&&p.ref!=d.ref&&(p.ref&&ci(p.ref,null,d),c.push(d.ref,d.__c||g,d)),m==null&&g!=null&&(m=g),(v=!!(4&d.__u))||p.__k===d.__k?a=Ta(d,a,s,v):typeof d.type=="function"&&f!==void 0?a=f:g&&(a=g.nextSibling),d.__u&=-7);return t.__e=m,a}function Ed(s,e,t,r,i){var n,o,l,a,u,c=t.length,h=c,p=0;for(s.__k=new Array(i),n=0;n<i;n++)(o=e[n])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=s.__k[n]=Zt(null,o,null,null,null):Rr(o)?o=s.__k[n]=Zt(ze,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=s.__k[n]=Zt(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):s.__k[n]=o,a=n+p,o.__=s,o.__b=s.__b+1,l=null,(u=o.__i=Md(o,t,a,h))!=-1&&(h--,(l=t[u])&&(l.__u|=2)),l==null||l.__v==null?(u==-1&&(i>c?p--:i<c&&p++),typeof o.type!="function"&&(o.__u|=4)):u!=a&&(u==a-1?p--:u==a+1?p++:(u>a?p--:p++,o.__u|=4))):s.__k[n]=null;if(h)for(n=0;n<c;n++)(l=t[n])!=null&&(2&l.__u)==0&&(l.__e==r&&(r=We(l)),La(l,l));return r}function Ta(s,e,t,r){var i,n;if(typeof s.type=="function"){for(i=s.__k,n=0;i&&n<i.length;n++)i[n]&&(i[n].__=s,e=Ta(i[n],e,t,r));return e}s.__e!=e&&(r&&(e&&s.type&&!e.parentNode&&(e=We(s)),t.insertBefore(s.__e,e||null)),e=s.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Md(s,e,t,r){var i,n,o,l=s.key,a=s.type,u=e[t],c=u!=null&&(2&u.__u)==0;if(u===null&&l==null||c&&l==u.key&&a==u.type)return t;if(r>(c?1:0)){for(i=t-1,n=t+1;i>=0||n<e.length;)if((u=e[o=i>=0?i--:n++])!=null&&(2&u.__u)==0&&l==u.key&&a==u.type)return o}return-1}function vn(s,e,t){e[0]=="-"?s.setProperty(e,t??""):s[e]=t==null?"":typeof t!="number"||Rd.test(e)?t:t+"px"}function zt(s,e,t,r,i){var n,o;e:if(e=="style")if(typeof t=="string")s.style.cssText=t;else{if(typeof r=="string"&&(s.style.cssText=r=""),r)for(e in r)t&&e in t||vn(s.style,e,"");if(t)for(e in t)r&&t[e]==r[e]||vn(s.style,e,t[e])}else if(e[0]=="o"&&e[1]=="n")n=e!=(e=e.replace(Aa,"$1")),o=e.toLowerCase(),e=o in s||e=="onFocusOut"||e=="onFocusIn"?o.slice(2):e.slice(2),s.l||(s.l={}),s.l[e+n]=t,t?r?t.u=r.u:(t.u=ai,s.addEventListener(e,n?Es:ks,n)):s.removeEventListener(e,n?Es:ks,n);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in s)try{s[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!="-"?s.removeAttribute(e):s.setAttribute(e,e=="popover"&&t==1?"":t))}}function Sn(s){return function(e){if(this.l){var t=this.l[e.type+s];if(e.t==null)e.t=ai++;else if(e.t<t.u)return;return t(P.event?P.event(e):e)}}}function ui(s,e,t,r,i,n,o,l,a,u){var c,h,p,d,g,m,f,v,b,y,C,k,M,V,O,D,Y,W=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(a=!!(32&t.__u),n=[l=e.__e=t.__e]),(c=P.__b)&&c(e);e:if(typeof W=="function")try{if(v=e.props,b="prototype"in W&&W.prototype.render,y=(c=W.contextType)&&r[c.__c],C=c?y?y.props.value:c.__:r,t.__c?f=(h=e.__c=t.__c).__=h.__E:(b?e.__c=h=new W(v,C):(e.__c=h=new Jt(v,C),h.constructor=W,h.render=Od),y&&y.sub(h),h.state||(h.state={}),h.__n=r,p=h.__d=!0,h.__h=[],h._sb=[]),b&&h.__s==null&&(h.__s=h.state),b&&W.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=pe({},h.__s)),pe(h.__s,W.getDerivedStateFromProps(v,h.__s))),d=h.props,g=h.state,h.__v=e,p)b&&W.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),b&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(b&&W.getDerivedStateFromProps==null&&v!==d&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(v,C),e.__v==t.__v||!h.__e&&h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(v,h.__s,C)===!1){for(e.__v!=t.__v&&(h.props=v,h.state=h.__s,h.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.some(function(Q){Q&&(Q.__=e)}),k=0;k<h._sb.length;k++)h.__h.push(h._sb[k]);h._sb=[],h.__h.length&&o.push(h);break e}h.componentWillUpdate!=null&&h.componentWillUpdate(v,h.__s,C),b&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(d,g,m)})}if(h.context=C,h.props=v,h.__P=s,h.__e=!1,M=P.__r,V=0,b){for(h.state=h.__s,h.__d=!1,M&&M(e),c=h.render(h.props,h.state,h.context),O=0;O<h._sb.length;O++)h.__h.push(h._sb[O]);h._sb=[]}else do h.__d=!1,M&&M(e),c=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++V<25);h.state=h.__s,h.getChildContext!=null&&(r=pe(pe({},r),h.getChildContext())),b&&!p&&h.getSnapshotBeforeUpdate!=null&&(m=h.getSnapshotBeforeUpdate(d,g)),D=c,c!=null&&c.type===ze&&c.key==null&&(D=Da(c.props.children)),l=Na(s,Rr(D)?D:[D],e,t,r,i,n,o,l,a,u),h.base=e.__e,e.__u&=-161,h.__h.length&&o.push(h),f&&(h.__E=h.__=null)}catch(Q){if(e.__v=null,a||n!=null)if(Q.then){for(e.__u|=a?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;n[n.indexOf(l)]=null,e.__e=l}else{for(Y=n.length;Y--;)li(n[Y]);Ms(e)}else e.__e=t.__e,e.__k=t.__k,Q.then||Ms(e);P.__e(Q,e,t)}else n==null&&e.__v==t.__v?(e.__k=t.__k,e.__e=t.__e):l=e.__e=Ad(t.__e,e,t,r,i,n,o,a,u);return(c=P.diffed)&&c(e),128&e.__u?void 0:l}function Ms(s){s&&s.__c&&(s.__c.__e=!0),s&&s.__k&&s.__k.forEach(Ms)}function Pa(s,e,t){for(var r=0;r<t.length;r++)ci(t[r],t[++r],t[++r]);P.__c&&P.__c(e,s),s.some(function(i){try{s=i.__h,i.__h=[],s.some(function(n){n.call(i)})}catch(n){P.__e(n,i.__v)}})}function Da(s){return typeof s!="object"||s==null||s.__b&&s.__b>0?s:Rr(s)?s.map(Da):pe({},s)}function Ad(s,e,t,r,i,n,o,l,a){var u,c,h,p,d,g,m,f=t.props||ut,v=e.props,b=e.type;if(b=="svg"?i="http://www.w3.org/2000/svg":b=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),n!=null){for(u=0;u<n.length;u++)if((d=n[u])&&"setAttribute"in d==!!b&&(b?d.localName==b:d.nodeType==3)){s=d,n[u]=null;break}}if(s==null){if(b==null)return document.createTextNode(v);s=document.createElementNS(i,b,v.is&&v),l&&(P.__m&&P.__m(e,n),l=!1),n=null}if(b==null)f===v||l&&s.data==v||(s.data=v);else{if(n=n&&Ir.call(s.childNodes),!l&&n!=null)for(f={},u=0;u<s.attributes.length;u++)f[(d=s.attributes[u]).name]=d.value;for(u in f)if(d=f[u],u!="children"){if(u=="dangerouslySetInnerHTML")h=d;else if(!(u in v)){if(u=="value"&&"defaultValue"in v||u=="checked"&&"defaultChecked"in v)continue;zt(s,u,null,d,i)}}for(u in v)d=v[u],u=="children"?p=d:u=="dangerouslySetInnerHTML"?c=d:u=="value"?g=d:u=="checked"?m=d:l&&typeof d!="function"||f[u]===d||zt(s,u,d,f[u],i);if(c)l||h&&(c.__html==h.__html||c.__html==s.innerHTML)||(s.innerHTML=c.__html),e.__k=[];else if(h&&(s.innerHTML=""),Na(e.type=="template"?s.content:s,Rr(p)?p:[p],e,t,r,b=="foreignObject"?"http://www.w3.org/1999/xhtml":i,n,o,n?n[0]:t.__k&&We(t,0),l,a),n!=null)for(u=n.length;u--;)li(n[u]);l||(u="value",b=="progress"&&g==null?s.removeAttribute("value"):g!=null&&(g!==s[u]||b=="progress"&&!g||b=="option"&&g!=f[u])&&zt(s,u,g,f[u],i),u="checked",m!=null&&m!=s[u]&&zt(s,u,m,f[u],i))}return s}function ci(s,e,t){try{if(typeof s=="function"){var r=typeof s.__u=="function";r&&s.__u(),r&&e==null||(s.__u=s(e))}else s.current=e}catch(i){P.__e(i,t)}}function La(s,e,t){var r,i;if(P.unmount&&P.unmount(s),(r=s.ref)&&(r.current&&r.current!=s.__e||ci(r,null,e)),(r=s.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(n){P.__e(n,e)}r.base=r.__P=null}if(r=s.__k)for(i=0;i<r.length;i++)r[i]&&La(r[i],e,t||typeof s.type!="function");t||li(s.__e),s.__c=s.__=s.__e=void 0}function Od(s,e,t){return this.constructor(s,t)}function fr(s,e,t){var r,i,n,o;e==document&&(e=document.documentElement),P.__&&P.__(s,e),i=(r=!1)?null:e.__k,n=[],o=[],ui(e,s=e.__k=kd(ze,null,[s]),i||ut,ut,e.namespaceURI,i?null:e.firstChild?Ir.call(e.childNodes):null,n,i?i.__e:e.firstChild,r,o),Pa(n,s,o)}Ir=Oa.slice,P={__e:function(s,e,t,r){for(var i,n,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((n=i.constructor)&&n.getDerivedStateFromError!=null&&(i.setState(n.getDerivedStateFromError(s)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(s,r||{}),o=i.__d),o)return i.__E=i}catch(l){s=l}throw s}},ka=0,Jt.prototype.setState=function(s,e){var t;t=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=pe({},this.state),typeof s=="function"&&(s=s(pe({},t),this.props)),s&&pe(t,s),s!=null&&this.__v&&(e&&this._sb.push(e),bn(this))},Jt.prototype.forceUpdate=function(s){this.__v&&(this.__e=!0,s&&this.__h.push(s),bn(this))},Jt.prototype.render=ze,_e=[],Ea=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ma=function(s,e){return s.__v.__b-e.__v.__b},hr.__r=0,Aa=/(PointerCapture)$|Capture$/i,ai=0,ks=Sn(!1),Es=Sn(!0);var $d=0;function w(s,e,t,r,i,n){e||(e={});var o,l,a=e;if("ref"in a)for(l in a={},e)l=="ref"?o=e[l]:a[l]=e[l];var u={type:s,props:a,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--$d,__i:-1,__u:0,__source:i,__self:n};if(typeof s=="function"&&(o=s.defaultProps))for(l in o)a[l]===void 0&&(a[l]=o[l]);return P.vnode&&P.vnode(u),u}const As="bw-recorder-styles",Nd=`
|
|
59
|
+
or you can use record.mirror to access the mirror instance during recording.`;let an={map:{},getId(){return console.error(Me),-1},getNode(){return console.error(Me),null},removeNodeFromMap(){console.error(Me)},has(){return console.error(Me),!1},reset(){console.error(Me)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(an=new Proxy(an,{get(s,e,t){return e==="map"&&console.error(Me),Reflect.get(s,e,t)}}));function lt(s,e,t={}){let r=null,i=0;return function(...n){const o=Date.now();!i&&t.leading===!1&&(i=o);const l=e-(o-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(a,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(a,n)},l))}}function Er(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>Er(s,e,n||{},!0)}let cr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(cr=()=>new Date().getTime());function ha(s){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=_.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=_.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function fa(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function pa(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function da(s){return s?s.nodeType===s.ELEMENT_NODE?s:_.parentElement(s):null}function q(s,e,t,r){if(!s)return!1;const i=da(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(tr(i,e,r))return!0}catch{}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Tf(s,e){return e.getId(s)!==-1}function Vr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===qe}function ma(s,e){if(Xe(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=_.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?ma(r,e):!0}function ks(s){return!!s.changedTouches}function Pf(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function ga(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function ya(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Es(s){return s?s instanceof oi&&"shadowRoot"in s?!!s.shadowRoot:!!_.shadowRoot(s):!1}class Df{constructor(){S(this,"id",1),S(this,"styleIDMap",new WeakMap),S(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function wa(s){var e;let t=null;return"getRootNode"in s&&((e=_.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&_.host(_.getRootNode(s))&&(t=_.host(_.getRootNode(s))),t}function Lf(s){let e=s,t;for(;t=wa(e);)e=t;return e}function Ff(s){const e=_.ownerDocument(s);if(!e)return!1;const t=Lf(s);return _.contains(e,t)}function ba(s){const e=_.ownerDocument(s);return e?_.contains(e,s)||Ff(s):!1}var R=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(R||{}),x=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(x||{}),ee=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(ee||{}),pe=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(pe||{}),ze=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(ze||{}),Oe=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Oe||{}),va=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(va||{});function ln(s){return"__ln"in s}class Uf{constructor(){S(this,"length",0),S(this,"head",null),S(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&ln(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&ln(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const un=(s,e)=>`${s}@${e}`;class Bf{constructor(){S(this,"frozen",!1),S(this,"locked",!1),S(this,"texts",[]),S(this,"attributes",[]),S(this,"attributeMap",new WeakMap),S(this,"removes",[]),S(this,"mapRemoves",[]),S(this,"movedMap",{}),S(this,"addedSet",new Set),S(this,"movedSet",new Set),S(this,"droppedSet",new Set),S(this,"removesSubTreeCache",new Set),S(this,"mutationCb"),S(this,"blockClass"),S(this,"blockSelector"),S(this,"maskTextClass"),S(this,"maskTextSelector"),S(this,"inlineStylesheet"),S(this,"maskInputOptions"),S(this,"maskTextFn"),S(this,"maskInputFn"),S(this,"keepIframeSrcFn"),S(this,"recordCanvas"),S(this,"inlineImages"),S(this,"slimDOMOptions"),S(this,"dataURLOptions"),S(this,"doc"),S(this,"mirror"),S(this,"iframeManager"),S(this,"stylesheetManager"),S(this,"shadowDomManager"),S(this,"canvasManager"),S(this,"processedNodeManager"),S(this,"unattachedDoc"),S(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),S(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Uf,i=a=>{let u=a,h=qe;for(;h===qe;)u=u&&u.nextSibling,h=u&&this.mirror.getId(u);return h},n=a=>{const u=_.parentNode(a);if(!u||!ba(a))return;let h=!1;if(a.nodeType===Node.TEXT_NODE){const g=u.tagName;if(g==="TEXTAREA")return;g==="STYLE"&&this.addedSet.has(u)&&(h=!0)}const c=Xe(u)?this.mirror.getId(wa(a)):this.mirror.getId(u),p=i(a);if(c===-1||p===-1)return r.addNode(a);const d=Ne(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:g=>{ga(g,this.mirror)&&this.iframeManager.addIframe(g),ya(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),Es(a)&&this.shadowDomManager.addShadowRoot(_.shadowRoot(a),this.doc)},onIframeLoad:(g,m)=>{this.iframeManager.attachIframe(g,m),this.shadowDomManager.observeAttachShadow(g)},onStylesheetLoad:(g,m)=>{this.stylesheetManager.attachLinkElement(g,m)},cssCaptured:h});d&&(e.push({parentId:c,nextId:p,node:d}),t.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)cn(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(_.parentNode(a))||n(a);for(const a of this.addedSet)!hn(this.droppedSet,a)&&!cn(this.removesSubTreeCache,a,this.mirror)||hn(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){const u=this.mirror.getId(_.parentNode(o.value)),h=i(o.value);u!==-1&&h!==-1&&(a=o)}if(!a){let u=r.tail;for(;u;){const h=u;if(u=u.previous,h){const c=this.mirror.getId(_.parentNode(h.value));if(i(h.value)===-1)continue;if(c!==-1){a=h;break}else{const d=h.value,g=_.parentNode(d);if(g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=_.host(g);if(this.mirror.getId(m)!==-1){a=h;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),n(a.value)}const l={texts:this.texts.map(a=>{const u=a.node,h=_.parentNode(u);return h&&h.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(h),{id:this.mirror.getId(u),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style=="string"){const h=JSON.stringify(a.styleDiff),c=JSON.stringify(a._unchangedStyles);h.length<u.style.length&&(h+c).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),S(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(_.childNodes(e),i=>_.textContent(i)||"").join("");t.attributes.value=Qt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:qt(e),value:r,maskInputFn:this.maskInputFn})}),S(this,"processMutation",e=>{if(!Vr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=_.textContent(e.target);!q(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Bn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,da(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){const o=qt(t);i=Qt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(q(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Un(t.tagName,r))if(n.attributes[r]=Fn(this.doc,Ie(t.tagName),Ie(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(const l of Array.from(t.style)){const a=t.style.getPropertyValue(l),u=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||u!==o.style.getPropertyPriority(l)?u===""?n.styleDiff[l]=a:n.styleDiff[l]=[a,u]:n._unchangedStyles[l]=[a,u]}for(const l of Array.from(o.style))t.style.getPropertyValue(l)===""&&(n.styleDiff[l]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(q(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=Xe(e.target)?this.mirror.getId(_.host(e.target)):this.mirror.getId(e.target);q(e.target,this.blockClass,this.blockSelector,!1)||Vr(t,this.mirror,this.slimDOMOptions)||!Tf(t,this.mirror)||(this.addedSet.has(t)?(As(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||ma(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[un(r,i)]?As(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Xe(e.target)&&Ke(e.target)?!0:void 0}),zf(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),S(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Vr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[un(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);q(e,this.blockClass,this.blockSelector,!1)||(_.childNodes(e).forEach(r=>this.genAdds(r)),Es(e)&&_.childNodes(_.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!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 As(s,e){s.delete(e),_.childNodes(e).forEach(t=>As(s,t))}function zf(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),_.childNodes(r).forEach(i=>t.push(i)))}}function cn(s,e,t){return s.size===0?!1:Wf(s,e)}function Wf(s,e,t){const r=_.parentNode(e);return r?s.has(r):!1}function hn(s,e){return s.size===0?!1:Sa(s,e)}function Sa(s,e){const t=_.parentNode(e);return t?s.has(t)?!0:Sa(s,t):!1}let Qe;function jf(s){Qe=s}function Hf(){Qe=void 0}const k=s=>Qe?(...t)=>{try{return s(...t)}catch(r){if(Qe&&Qe(r)===!0)return;throw r}}:s,xe=[];function pt(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch{}return s&&s.target}function Ca(s,e){const t=new Bf;xe.push(t),t.init(s);const r=new(ca())(k(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Gf({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],l;const a=lt(k(c=>{const p=Date.now()-l;s(o.map(d=>(d.timeOffset-=p,d)),c),o=[],l=null}),n),u=k(lt(k(c=>{const p=pt(c),{clientX:d,clientY:g}=ks(c)?c.changedTouches[0]:c;l||(l=cr()),o.push({x:d,y:g,id:r.getId(p),timeOffset:cr()-l}),a(typeof DragEvent<"u"&&c instanceof DragEvent?x.Drag:c instanceof MouseEvent?x.MouseMove:x.TouchMove)}),i,{trailing:!1})),h=[Q("mousemove",u,t),Q("touchmove",u,t),Q("drag",u,t)];return k(()=>{h.forEach(c=>c())})}function Vf({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let a=null;const u=h=>c=>{const p=pt(c);if(q(p,r,i,!0))return;let d=null,g=h;if("pointerType"in c){switch(c.pointerType){case"mouse":d=pe.Mouse;break;case"touch":d=pe.Touch;break;case"pen":d=pe.Pen;break}d===pe.Touch?ee[h]===ee.MouseDown?g="TouchStart":ee[h]===ee.MouseUp&&(g="TouchEnd"):pe.Pen}else ks(c)&&(d=pe.Touch);d!==null?(a=d,(g.startsWith("Touch")&&d===pe.Touch||g.startsWith("Mouse")&&d===pe.Mouse)&&(d=null)):ee[h]===ee.Click&&(d=a,a=null);const m=ks(c)?c.changedTouches[0]:c;if(!m)return;const f=t.getId(p),{clientX:v,clientY:b}=m;k(s)({type:ee[g],id:f,x:v,y:b,...d!==null&&{pointerType:d}})};return Object.keys(ee).filter(h=>Number.isNaN(Number(h))&&!h.endsWith("_Departed")&&o[h]!==!1).forEach(h=>{let c=Ie(h);const p=u(h);if(window.PointerEvent)switch(ee[h]){case ee.MouseDown:case ee.MouseUp:c=c.replace("mouse","pointer");break;case ee.TouchStart:case ee.TouchEnd:return}l.push(Q(c,p,e))}),k(()=>{l.forEach(h=>h())})}function _a({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const o=k(lt(k(l=>{const a=pt(l);if(!a||q(a,r,i,!0))return;const u=t.getId(a);if(a===e&&e.defaultView){const h=ha(e.defaultView);s({id:u,x:h.left,y:h.top})}else s({id:u,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return Q("scroll",o,e)}function Yf({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=k(lt(k(()=>{const n=fa(),o=pa();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return Q("resize",i,e)}const Zf=["INPUT","TEXTAREA","SELECT"],fn=new WeakMap;function Jf({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:h}){function c(b){let y=pt(b);const C=b.isTrusted,I=y&&y.tagName;if(y&&I==="OPTION"&&(y=_.parentElement(y)),!y||!I||Zf.indexOf(I)<0||q(y,r,i,!0)||y.classList.contains(n)||o&&y.matches(o))return;let O=y.value,B=!1;const T=qt(y)||"";T==="radio"||T==="checkbox"?B=y.checked:(l[I.toLowerCase()]||l[T])&&(O=Qt({element:y,maskInputOptions:l,tagName:I,type:T,value:O,maskInputFn:a})),p(y,h?{text:O,isChecked:B,userTriggered:C}:{text:O,isChecked:B});const A=y.name;T==="radio"&&A&&B&&e.querySelectorAll(`input[type="radio"][name="${A}"]`).forEach(z=>{if(z!==y){const re=z.value;p(z,h?{text:re,isChecked:!B,userTriggered:!1}:{text:re,isChecked:!B})}})}function p(b,y){const C=fn.get(b);if(!C||C.text!==y.text||C.isChecked!==y.isChecked){fn.set(b,y);const I=t.getId(b);k(s)({...y,id:I})}}const g=(u.input==="last"?["change"]:["input","change"]).map(b=>Q(b,k(c),e)),m=e.defaultView;if(!m)return()=>{g.forEach(b=>b())};const f=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),v=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...v.map(b=>Er(b[0],b[1],{set(){k(c)({target:this,isTrusted:!1})}},!1,m))),k(()=>{g.forEach(b=>b())})}function hr(s){const e=[];function t(r,i){if(Ft("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ft("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ft("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ft("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function be(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Xf({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:k((h,c,p)=>{const[d,g]=p,{id:m,styleId:f}=be(c,e,t.styleMirror);return(m&&m!==-1||f&&f!==-1)&&s({id:m,styleId:f,adds:[{rule:d,index:g}]}),h.apply(c,p)})}),r.CSSStyleSheet.prototype.addRule=function(h,c,p=this.cssRules.length){const d=`${h} { ${c} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,p])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:k((h,c,p)=>{const[d]=p,{id:g,styleId:m}=be(c,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,removes:[{index:d}]}),h.apply(c,p)})}),r.CSSStyleSheet.prototype.removeRule=function(h){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[h])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:k((h,c,p)=>{const[d]=p,{id:g,styleId:m}=be(c,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replace:d}),h.apply(c,p)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:k((h,c,p)=>{const[d]=p,{id:g,styleId:m}=be(c,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replaceSync:d}),h.apply(c,p)})}));const a={};Ut("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Ut("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Ut("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Ut("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(a).forEach(([h,c])=>{u[h]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=new Proxy(u[h].insertRule,{apply:k((p,d,g)=>{const[m,f]=g,{id:v,styleId:b}=be(d.parentStyleSheet,e,t.styleMirror);return(v&&v!==-1||b&&b!==-1)&&s({id:v,styleId:b,adds:[{rule:m,index:[...hr(d),f||0]}]}),p.apply(d,g)})}),c.prototype.deleteRule=new Proxy(u[h].deleteRule,{apply:k((p,d,g)=>{const[m]=g,{id:f,styleId:v}=be(d.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||v&&v!==-1)&&s({id:f,styleId:v,removes:[{index:[...hr(d),m]}]}),p.apply(d,g)})})}),k(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([h,c])=>{c.prototype.insertRule=u[h].insertRule,c.prototype.deleteRule=u[h].deleteRule})})}function xa({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(_.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var u;return(u=a.get)==null?void 0:u.call(this)},set(u){var h;const c=(h=a.set)==null?void 0:h.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch{}return c}}),k(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Kf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:k((l,a,u)=>{var h;const[c,p,d]=u;if(t.has(c))return n.apply(a,[c,p,d]);const{id:g,styleId:m}=be((h=a.parentRule)==null?void 0:h.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,set:{property:c,value:p,priority:d},index:hr(a.parentRule)}),l.apply(a,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:k((l,a,u)=>{var h;const[c]=u;if(t.has(c))return o.apply(a,[c]);const{id:p,styleId:d}=be((h=a.parentRule)==null?void 0:h.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||d&&d!==-1)&&s({id:p,styleId:d,remove:{property:c},index:hr(a.parentRule)}),l.apply(a,u)})}),k(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Qf({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const o=k(a=>lt(k(u=>{const h=pt(u);if(!h||q(h,e,t,!0))return;const{currentTime:c,volume:p,muted:d,playbackRate:g,loop:m}=h;s({type:a,id:r.getId(h),currentTime:c,volume:p,muted:d,playbackRate:g,loop:m})}),i.media||500)),l=[Q("play",o(Oe.Play),n),Q("pause",o(Oe.Pause),n),Q("seeked",o(Oe.Seeked),n),Q("volumechange",o(Oe.VolumeChange),n),Q("ratechange",o(Oe.RateChange),n)];return k(()=>{l.forEach(a=>a())})}function qf({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,u,h){const c=new n(a,u,h);return i.set(c,{family:a,buffer:typeof u!="string",descriptors:h,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),c};const o=Ee(e.fonts,"add",function(l){return function(a){return setTimeout(k(()=>{const u=i.get(a);u&&(s(u),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),k(()=>{r.forEach(l=>l())})}function ep(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let o=!0;const l=k(()=>{const a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;const u=[],h=a.rangeCount||0;for(let c=0;c<h;c++){const p=a.getRangeAt(c),{startContainer:d,startOffset:g,endContainer:m,endOffset:f}=p;q(d,r,i,!0)||q(m,r,i,!0)||u.push({start:t.getId(d),startOffset:g,end:t.getId(m),endOffset:f})}n({ranges:u})});return l(),Q("selectionchange",l)}function tp({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Ee(t.customElements,"define",function(i){return function(n,o,l){try{e({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,l])}})}function rp(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:h,canvasMutationCb:c,fontCb:p,selectionCb:d,customElementCb:g}=s;s.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),t(...m)},s.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),r(...m)},s.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},s.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),n(...m)},s.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),o(...m)},s.inputCb=(...m)=>{e.input&&e.input(...m),l(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),a(...m)},s.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),u(...m)},s.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),h(...m)},s.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),c(...m)},s.fontCb=(...m)=>{e.font&&e.font(...m),p(...m)},s.selectionCb=(...m)=>{e.selection&&e.selection(...m),d(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),g(...m)}}function sp(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};rp(s,e);let r;s.recordDOM&&(r=Ca(s,s.doc));const i=Gf(s),n=Vf(s),o=_a(s),l=Yf(s,{win:t}),a=Jf(s),u=Qf(s);let h=()=>{},c=()=>{},p=()=>{},d=()=>{};s.recordDOM&&(h=Xf(s,{win:t}),c=xa(s,s.doc),p=Kf(s,{win:t}),s.collectFonts&&(d=qf(s)));const g=ep(s),m=tp(s),f=[];for(const v of s.plugins)f.push(v.observer(v.callback,t,v.options));return k(()=>{xe.forEach(v=>v.reset()),r==null||r.disconnect(),i(),n(),o(),l(),a(),u(),h(),c(),p(),d(),g(),m(),f.forEach(v=>v())})}function Ft(s){return typeof window[s]<"u"}function Ut(s){return!!(typeof window[s]<"u"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class pn{constructor(e){S(this,"iframeIdToRemoteIdMap",new WeakMap),S(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class ip{constructor(e){S(this,"iframes",new WeakMap),S(this,"crossOriginIframeMap",new WeakMap),S(this,"crossOriginIframeMirror",new pn(Ln)),S(this,"crossOriginIframeStyleMirror"),S(this,"crossOriginIframeRootIdMap",new WeakMap),S(this,"mirror"),S(this,"mutationCb"),S(this,"wrappedEmit"),S(this,"loadListener"),S(this,"stylesheetManager"),S(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new pn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case R.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:R.IncrementalSnapshot,data:{source:x.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case R.Meta:case R.Load:case R.DomContentLoaded:return!1;case R.Plugin:return t;case R.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case R.IncrementalSnapshot:switch(t.data.source){case x.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.Drag:case x.TouchMove:case x.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.ViewportResize:return!1;case x.MediaInteraction:case x.MouseInteraction:case x.Scroll:case x.CanvasMutation:case x.Input:return this.replaceIds(t.data,e,["id"]),t;case x.StyleSheetRule:case x.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case x.Font:return t;case x.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case x.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==va.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class np{constructor(e){S(this,"shadowDoms",new WeakSet),S(this,"mutationCb"),S(this,"scrollCb"),S(this,"bypassOptions"),S(this,"mirror"),S(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Ke(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Ca({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(_a({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(_.host(e))),this.restoreHandlers.push(xa({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Ee(e.prototype,"attachShadow",function(i){return function(n){const o=i.call(this,n),l=_.shadowRoot(this);return l&&ba(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",op=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Bt=0;Bt<Te.length;Bt++)op[Te.charCodeAt(Bt)]=Bt;var ap=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Te[e[t]>>2],i+=Te[(e[t]&3)<<4|e[t+1]>>4],i+=Te[(e[t+1]&15)<<2|e[t+2]>>6],i+=Te[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const dn=new Map;function lp(s,e){let t=dn.get(s);return t||(t=new Map,dn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Ia=(s,e,t)=>{if(!s||!(ka(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=lp(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function Vt(s,e,t){if(s instanceof Array)return s.map(r=>Vt(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=ap(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Vt(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Vt(s.data,e,t),s.width,s.height]};if(ka(s,e)||typeof s=="object"){const r=s.constructor.name,i=Ia(s,e,t);return{rr_type:r,index:i}}}}return s}const Ra=(s,e,t)=>s.map(r=>Vt(r,e,t)),ka=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function up(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=Ee(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...u){return q(this.canvas,t,r,!0)||setTimeout(()=>{const h=Ra(u,e,this);s(this.canvas,{type:ze["2D"],property:o,args:h})},0),a.apply(this,u)}});i.push(l)}catch{const l=Er(e.CanvasRenderingContext2D.prototype,o,{set(a){s(this.canvas,{type:ze["2D"],property:o,args:[a],setter:!0})}});i.push(l)}return()=>{i.forEach(o=>o())}}function cp(s){return s==="experimental-webgl"?"webgl":s}function mn(s,e,t,r){const i=[];try{const n=Ee(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!q(this,e,t,!0)){const u=cp(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]=="object"){const h=a[0];h.preserveDrawingBuffer||(h.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});i.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function gn(s,e,t,r,i,n){const o=[],l=Object.getOwnPropertyNames(s);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;const u=Ee(s,a,function(h){return function(...c){const p=h.apply(this,c);if(Ia(p,n,this),"tagName"in this.canvas&&!q(this.canvas,r,i,!0)){const d=Ra(c,n,this),g={type:e,property:a,args:d};t(this.canvas,g)}return p}});o.push(u)}catch{const u=Er(s,a,{set(h){t(this.canvas,{type:e,property:a,args:[h],setter:!0})}});o.push(u)}return o}function hp(s,e,t,r){const i=[];return i.push(...gn(e.WebGLRenderingContext.prototype,ze.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...gn(e.WebGL2RenderingContext.prototype,ze.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const Ea="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",fp=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),yn=typeof window<"u"&&window.Blob&&new Blob([fp(Ea)],{type:"text/javascript;charset=utf-8"});function pp(s){let e;try{if(e=yn&&(window.URL||window.webkitURL).createObjectURL(yn),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+Ea,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class dp{constructor(e){S(this,"pendingCanvasMutations",new Map),S(this,"rafStamps",{latestId:0,invokeId:null}),S(this,"mirror"),S(this,"mutationCb"),S(this,"resetObservers"),S(this,"frozen",!1),S(this,"locked",!1),S(this,"processMutation",(a,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const o=mn(t,r,i,!0),l=new Map,a=new pp;a.onmessage=g=>{const{id:m}=g.data;if(l.set(m,!1),!("base64"in g.data))return;const{base64:f,type:v,width:b,height:y}=g.data;this.mutationCb({id:m,type:ze["2D"],commands:[{property:"clearRect",args:[0,0,b,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:v}]},0,0]}]})};const u=1e3/e;let h=0,c;const p=()=>{const g=[];return t.document.querySelectorAll("canvas").forEach(m=>{q(m,r,i,!0)||g.push(m)}),g},d=g=>{if(h&&g-h<u){c=requestAnimationFrame(d);return}h=g,p().forEach(async m=>{var f;const v=this.mirror.getId(m);if(l.get(v)||m.width===0||m.height===0)return;if(l.set(v,!0),["webgl","webgl2"].includes(m.__context)){const y=m.getContext(m.__context);((f=y==null?void 0:y.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const b=await createImageBitmap(m);a.postMessage({id:v,bitmap:b,width:m.width,height:m.height,dataURLOptions:n.dataURLOptions},[b])}),c=requestAnimationFrame(d)};c=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=mn(e,t,r,!1),n=up(this.processMutation.bind(this),e,t,r),o=hp(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(o=>{const{type:l,...a}=o;return a}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class mp{constructor(e){S(this,"trackedLinkElements",new WeakSet),S(this,"mutationCb"),S(this,"adoptedStyleSheetCb"),S(this,"styleMirror",new Df),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:Tn(l,n.href),index:a}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class gp{constructor(){S(this,"nodeMap",new WeakMap),S(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let V,Yt,Yr,fr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((yi=s.contentWindow)==null?void 0:yi.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const oe=pl();function dt(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:u=null,inlineStylesheet:h=!0,maskAllInputs:c,maskInputOptions:p,slimDOMOptions:d,maskInputFn:g,maskTextFn:m,hooks:f,packFn:v,sampling:b={},dataURLOptions:y={},mousemoveWait:C,recordDOM:I=!0,recordCanvas:O=!1,recordCrossOriginIframes:B=!1,recordAfter:T=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:A=!1,collectFonts:z=!1,inlineImages:re=!1,plugins:ue,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:He=new Set([]),errorHandler:Ge}=s;jf(Ge);const Z=B?window.parent===window:!0;let se=!1;if(!Z)try{window.parent.document&&(se=!1)}catch{se=!0}if(Z&&!e)throw new Error("emit function is required");if(!Z&&!se)return()=>{};C!==void 0&&b.mousemove===void 0&&(b.mousemove=C),oe.reset();const ve=c===!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}:p!==void 0?p:{password:!0},ce=zn(d);Pf();let pi,Or=0;const di=M=>{for(const ne of ue||[])ne.eventProcessor&&(M=ne.eventProcessor(M));return v&&!se&&(M=v(M)),M};V=(M,ne)=>{var H;const G=M;if(G.timestamp=cr(),(H=xe[0])!=null&&H.isFrozen()&&G.type!==R.FullSnapshot&&!(G.type===R.IncrementalSnapshot&&G.data.source===x.Mutation)&&xe.forEach(te=>te.unfreeze()),Z)e==null||e(di(G),ne);else if(se){const te={type:"rrweb",event:di(G),origin:window.location.origin,isCheckout:ne};window.parent.postMessage(te,"*")}if(G.type===R.FullSnapshot)pi=G,Or=0;else if(G.type===R.IncrementalSnapshot){if(G.data.source===x.Mutation&&G.data.isAttachIframe)return;Or++;const te=r&&Or>=r,P=t&&G.timestamp-pi.timestamp>t;(te||P)&&Yt(!0)}};const mt=M=>{V({type:R.IncrementalSnapshot,data:{source:x.Mutation,...M}})},mi=M=>V({type:R.IncrementalSnapshot,data:{source:x.Scroll,...M}}),gi=M=>V({type:R.IncrementalSnapshot,data:{source:x.CanvasMutation,...M}}),Wa=M=>V({type:R.IncrementalSnapshot,data:{source:x.AdoptedStyleSheet,...M}}),Se=new mp({mutationCb:mt,adoptedStyleSheetCb:Wa}),Ce=new ip({mirror:oe,mutationCb:mt,stylesheetManager:Se,recordCrossOriginIframes:B,wrappedEmit:V});for(const M of ue||[])M.getMirror&&M.getMirror({nodeMirror:oe,crossOriginIframeMirror:Ce.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ce.crossOriginIframeStyleMirror});const $r=new gp;Yr=new dp({recordCanvas:O,mutationCb:gi,win:window,blockClass:i,blockSelector:n,mirror:oe,sampling:b.canvas,dataURLOptions:y});const gt=new np({mutationCb:mt,scrollCb:mi,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:h,maskInputOptions:ve,dataURLOptions:y,maskTextFn:m,maskInputFn:g,recordCanvas:O,inlineImages:re,sampling:b,slimDOMOptions:ce,iframeManager:Ce,stylesheetManager:Se,canvasManager:Yr,keepIframeSrcFn:E,processedNodeManager:$r},mirror:oe});Yt=(M=!1)=>{if(!I)return;V({type:R.Meta,data:{href:window.location.href,width:pa(),height:fa()}},M),Se.reset(),gt.init(),xe.forEach(H=>H.lock());const ne=Ll(document,{mirror:oe,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:h,maskAllInputs:ve,maskTextFn:m,maskInputFn:g,slimDOM:ce,dataURLOptions:y,recordCanvas:O,inlineImages:re,onSerialize:H=>{ga(H,oe)&&Ce.addIframe(H),ya(H,oe)&&Se.trackLinkElement(H),Es(H)&>.addShadowRoot(_.shadowRoot(H),document)},onIframeLoad:(H,G)=>{Ce.attachIframe(H,G),gt.observeAttachShadow(H)},onStylesheetLoad:(H,G)=>{Se.attachLinkElement(H,G)},keepIframeSrcFn:E});if(!ne)return console.warn("Failed to snapshot the document");V({type:R.FullSnapshot,data:{node:ne,initialOffset:ha(window)}},M),xe.forEach(H=>H.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Se.adoptStyleSheets(document.adoptedStyleSheets,oe.getId(document))};try{const M=[],ne=G=>{var te;return k(sp)({mutationCb:mt,mousemoveCb:(P,Nr)=>V({type:R.IncrementalSnapshot,data:{source:Nr,positions:P}}),mouseInteractionCb:P=>V({type:R.IncrementalSnapshot,data:{source:x.MouseInteraction,...P}}),scrollCb:mi,viewportResizeCb:P=>V({type:R.IncrementalSnapshot,data:{source:x.ViewportResize,...P}}),inputCb:P=>V({type:R.IncrementalSnapshot,data:{source:x.Input,...P}}),mediaInteractionCb:P=>V({type:R.IncrementalSnapshot,data:{source:x.MediaInteraction,...P}}),styleSheetRuleCb:P=>V({type:R.IncrementalSnapshot,data:{source:x.StyleSheetRule,...P}}),styleDeclarationCb:P=>V({type:R.IncrementalSnapshot,data:{source:x.StyleDeclaration,...P}}),canvasMutationCb:gi,fontCb:P=>V({type:R.IncrementalSnapshot,data:{source:x.Font,...P}}),selectionCb:P=>{V({type:R.IncrementalSnapshot,data:{source:x.Selection,...P}})},customElementCb:P=>{V({type:R.IncrementalSnapshot,data:{source:x.CustomElement,...P}})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:u,maskInputOptions:ve,inlineStylesheet:h,sampling:b,recordDOM:I,recordCanvas:O,inlineImages:re,userTriggeredOnInput:A,collectFonts:z,doc:G,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:E,blockSelector:n,slimDOMOptions:ce,dataURLOptions:y,mirror:oe,iframeManager:Ce,stylesheetManager:Se,shadowDomManager:gt,processedNodeManager:$r,canvasManager:Yr,ignoreCSSAttributes:He,plugins:((te=ue==null?void 0:ue.filter(P=>P.observer))==null?void 0:te.map(P=>({observer:P.observer,options:P.options,callback:Nr=>V({type:R.Plugin,data:{plugin:P.name,payload:Nr}})})))||[]},f)};Ce.addLoadListener(G=>{try{M.push(ne(G.contentDocument))}catch(te){console.warn(te)}});const H=()=>{Yt(),M.push(ne(document)),fr=!0};return["interactive","complete"].includes(document.readyState)?H():(M.push(Q("DOMContentLoaded",()=>{V({type:R.DomContentLoaded,data:{}}),T==="DOMContentLoaded"&&H()})),M.push(Q("load",()=>{V({type:R.Load,data:{}}),T==="load"&&H()},window))),()=>{M.forEach(G=>{try{G()}catch(te){String(te).toLowerCase().includes("cross-origin")||console.warn(te)}}),$r.destroy(),fr=!1,Hf()}}catch(M){console.warn(M)}}dt.addCustomEvent=(s,e)=>{if(!fr)throw new Error("please add custom event after start recording");V({type:R.Custom,data:{tag:s,payload:e}})};dt.freezePage=()=>{xe.forEach(s=>s.freeze())};dt.takeFullSnapshot=s=>{if(!fr)throw new Error("please take full snapshot after start recording");Yt(s)};dt.mirror=oe;var wn;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(wn||(wn={}));const yp=['input[type="password"]','input[type="credit-card"]','input[autocomplete="cc-number"]','input[autocomplete="cc-csc"]','input[autocomplete="cc-exp"]','input[autocomplete="cc-exp-month"]','input[autocomplete="cc-exp-year"]','input[autocomplete="new-password"]','input[autocomplete="current-password"]','input[name*="password"]','input[name*="passwd"]','input[name*="secret"]','input[name*="token"]','input[name*="apikey"]','input[name*="api_key"]','input[name*="api-key"]','input[name*="credit"]','input[name*="card"]','input[name*="cvv"]','input[name*="cvc"]','input[name*="ssn"]','input[id*="password"]','input[id*="secret"]','input[id*="token"]',"[data-private]","[data-mask]","[data-sensitive]"];function wp(){return yp.join(", ")}function bp(){return"[data-private-text], [data-mask-text]"}function vp(s){return s.matches(wp())}function Sp(s){return s?{maskAllInputs:!1,maskTextSelector:bp(),maskInputOptions:{password:!0},maskInputFn:(e,t)=>vp(t)?"*".repeat(Math.min(e.length,20)):e,blockSelector:"[data-recorder-block], [data-bw-recorder-ui], #bw-recorder-root",ignoreSelector:"[data-recorder-ignore]"}:{maskAllInputs:!1,maskTextSelector:null,maskInputOptions:{}}}const Cp=900*1e3,_p=30*1e3,xp=100;class Ip{constructor(e){this.state="idle",this.events=[],this.stopFn=null,this.startTime=0,this.pauseTime=0,this.totalPausedDuration=0,this.chunkIndex=0,this.maxDurationTimer=null,this.chunkTimer=null,this.uploader=null,this.metadata=null,this.onEventCallback=null,this.config={...e,maxDuration:e.maxDuration??Cp,maskInputs:e.maskInputs??!0}}setUploader(e){this.uploader=e}onEvent(e){this.onEventCallback=e}getState(){return this.state}getElapsedTime(){return this.state==="idle"||this.startTime===0?0:this.state==="paused"?this.pauseTime-this.startTime-this.totalPausedDuration:Date.now()-this.startTime-this.totalPausedDuration}getEvents(){return[...this.events]}async start(){var r,i;if(this.state!=="idle")throw new Error(`Cannot start recording: state is ${this.state}`);if(this.setState("recording"),this.startTime=Date.now(),this.events=[],this.chunkIndex=0,this.totalPausedDuration=0,this.metadata={url:window.location.href,userAgent:navigator.userAgent,viewport:{width:window.innerWidth,height:window.innerHeight},startedAt:this.startTime},this.uploader)try{await this.uploader.start(this.metadata)}catch(n){throw(i=(r=this.config).onError)==null||i.call(r,n),this.setState("idle"),n}const e=Sp(this.config.maskInputs),t=dt({emit:n=>this.handleEvent(n),maskAllInputs:e.maskAllInputs,maskTextSelector:e.maskTextSelector??void 0,maskInputFn:e.maskInputFn,blockSelector:e.blockSelector,recordCanvas:!0,collectFonts:!0,inlineStylesheet:!0,sampling:{mousemove:!0,mouseInteraction:!0,scroll:150,input:"last"}});this.stopFn=t??null,this.maxDurationTimer=setTimeout(()=>{this.stop()},this.config.maxDuration),this.chunkTimer=setInterval(()=>{this.flushChunk()},_p)}pause(){if(this.state!=="recording")throw new Error(`Cannot pause: state is ${this.state}`);this.setState("paused"),this.pauseTime=Date.now()}resume(){if(this.state!=="paused")throw new Error(`Cannot resume: state is ${this.state}`);this.totalPausedDuration+=Date.now()-this.pauseTime,this.setState("recording")}async stop(e=[]){var t,r,i,n;if(this.state==="idle"||this.state==="stopped")return null;if(this.maxDurationTimer&&(clearTimeout(this.maxDurationTimer),this.maxDurationTimer=null),this.chunkTimer&&(clearInterval(this.chunkTimer),this.chunkTimer=null),this.stopFn&&(this.stopFn(),this.stopFn=null),this.setState("stopped"),await this.flushChunk(),this.uploader)try{const o=await this.uploader.complete(this.getElapsedTime(),this.events.length,e);return(r=(t=this.config).onComplete)==null||r.call(t,o),o}catch(o){return(n=(i=this.config).onError)==null||n.call(i,o),null}return null}handleEvent(e){var t;this.state!=="paused"&&(this.events.push(e),(t=this.onEventCallback)==null||t.call(this,e),this.events.length>=xp&&this.flushChunk())}async flushChunk(){var t,r;if(this.events.length===0||!this.uploader)return;const e={index:this.chunkIndex++,events:[...this.events],timestamp:Date.now()};this.events=[];try{await this.uploader.uploadChunk(e)}catch(i){this.events=[...e.events,...this.events],this.chunkIndex--,(r=(t=this.config).onError)==null||r.call(t,i)}}setState(e){var t,r;this.state=e,(r=(t=this.config).onStateChange)==null||r.call(t,e)}reset(){this.stop(),this.state="idle",this.events=[],this.startTime=0,this.pauseTime=0,this.totalPausedDuration=0,this.chunkIndex=0,this.metadata=null}}class Rp{constructor(){this.markers=[],this.recordingStartTime=0,this.isRecording=!1,this.captureDebounceTimer=null}setStartTime(e){this.recordingStartTime=e,this.isRecording=!0}getMarkers(){return[...this.markers]}getCount(){return this.markers.length}capture(e){if(!this.isRecording||this.recordingStartTime===0)return null;const t={timestamp:Date.now()-this.recordingStartTime,eventType:e};return this.markers.push(t),console.log("[BWorlds Recorder] Screenshot marker added",{timestamp:t.timestamp,eventType:t.eventType,totalMarkers:this.markers.length}),t}captureDebounced(e,t=500){this.captureDebounceTimer&&clearTimeout(this.captureDebounceTimer),this.captureDebounceTimer=setTimeout(()=>{this.capture(e),this.captureDebounceTimer=null},t)}stop(){this.isRecording=!1,this.captureDebounceTimer&&(clearTimeout(this.captureDebounceTimer),this.captureDebounceTimer=null)}reset(){this.markers=[],this.recordingStartTime=0,this.isRecording=!1,this.captureDebounceTimer&&(clearTimeout(this.captureDebounceTimer),this.captureDebounceTimer=null)}}class kp{constructor(e){this.lastScrollY=0,this.viewportHeight=0,this.observers=[],this.isRecording=!1,this.hasInitialScreenshot=!1,this.handleScroll=()=>{if(!this.isRecording)return;const t=window.scrollY;Math.abs(t-this.lastScrollY)>this.viewportHeight*.5&&(this.lastScrollY=t,this.screenshotCapture.captureDebounced("scroll",500))},this.handleFormSubmit=t=>{this.isRecording&&this.triggerScreenshot("form_submit")},this.handleNavigation=()=>{this.isRecording&&setTimeout(()=>{this.triggerScreenshot("navigation")},500)},this.screenshotCapture=e,this.viewportHeight=window.innerHeight}start(){this.isRecording||(this.isRecording=!0,this.lastScrollY=window.scrollY,this.viewportHeight=window.innerHeight,this.hasInitialScreenshot=!1,this.setupModalDetection(),this.setupScrollDetection(),this.setupFormDetection(),this.setupNavigationDetection(),setTimeout(()=>{this.isRecording&&!this.hasInitialScreenshot&&(this.hasInitialScreenshot=!0,this.triggerScreenshot("load"))},500))}stop(){this.isRecording=!1,this.observers.forEach(e=>e.disconnect()),this.observers=[],window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("popstate",this.handleNavigation)}handleRrwebEvent(e){this.isRecording&&e.type===R.IncrementalSnapshot&&e.data.source}triggerScreenshot(e){this.isRecording&&this.screenshotCapture.capture(e)}setupModalDetection(){const e=new MutationObserver(t=>{for(const r of t){if(r.type==="childList"){for(const i of r.addedNodes)if(i instanceof HTMLElement&&this.isModal(i)){setTimeout(()=>{this.triggerScreenshot("modal_open")},300);return}}if(r.type==="attributes"){const i=r.target;if(r.attributeName==="open"&&i.tagName==="DIALOG"&&i.hasAttribute("open")){setTimeout(()=>{this.triggerScreenshot("modal_open")},300);return}}}});e.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["open","aria-hidden","aria-modal"]}),this.observers.push(e)}isModal(e){if(e.tagName.toLowerCase()==="dialog"||e.getAttribute("role")==="dialog"||e.getAttribute("role")==="alertdialog"||e.getAttribute("aria-modal")==="true")return!0;const r=e.className.toLowerCase(),i=["modal","dialog","overlay","popup","lightbox"];for(const o of i)if(r.includes(o))return!0;const n=window.getComputedStyle(e);if((n.position==="fixed"||n.position==="absolute")&&parseInt(n.zIndex)>100){const o=e.getBoundingClientRect(),l=window.innerWidth*window.innerHeight;if(o.width*o.height>l*.3)return!0}return!1}setupScrollDetection(){window.addEventListener("scroll",this.handleScroll,{passive:!0})}setupFormDetection(){document.addEventListener("submit",this.handleFormSubmit,!0)}setupNavigationDetection(){window.addEventListener("popstate",this.handleNavigation);const e=history.pushState.bind(history),t=history.replaceState.bind(history);history.pushState=(...r)=>{e(...r),this.handleNavigation()},history.replaceState=(...r)=>{t(...r),this.handleNavigation()}}destroy(){this.stop(),document.removeEventListener("submit",this.handleFormSubmit,!0)}}class Ep{constructor(){this.recordingId="",this.sessionToken="",this.metadata=null,this.chunks=[],this.screenshotMarkers=[]}async start(e){return this.recordingId=`rec_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,this.sessionToken=`tok_${Math.random().toString(36).substr(2,16)}`,this.metadata=e,this.chunks=[],this.screenshotMarkers=[],console.log("[BWorlds Recorder] Recording started",{recordingId:this.recordingId,metadata:{url:e.url,viewport:e.viewport,startedAt:new Date(e.startedAt).toISOString()}}),{token:this.sessionToken,recordingId:this.recordingId,expiresAt:Date.now()+3600*1e3}}async uploadChunk(e){this.chunks.push(e),console.log("[BWorlds Recorder] Chunk uploaded",{recordingId:this.recordingId,chunkIndex:e.index,eventCount:e.events.length,totalEvents:this.chunks.reduce((t,r)=>t+r.events.length,0)})}async complete(e,t,r){this.screenshotMarkers=r;const i={recordingId:this.recordingId,playbackUrl:`https://app.bworlds.com/recordings/${this.recordingId}`,duration:e,eventCount:this.chunks.reduce((n,o)=>n+o.events.length,0),screenshotCount:r.length};return console.log("[BWorlds Recorder] Recording completed",{...i,metadata:this.metadata,screenshotMarkers:r.map(n=>({timestamp:n.timestamp,eventType:n.eventType}))}),console.log("[BWorlds Recorder] Recording data summary:",{chunks:this.chunks.length,screenshotMarkers:r.length,totalEvents:i.eventCount,duration:`${Math.round(e/1e3)}s`}),i}getData(){return{metadata:this.metadata,chunks:this.chunks,screenshotMarkers:this.screenshotMarkers}}}class Ap{constructor(e,t){this.sessionToken="",this.recordingId="",this.apiEndpoint=e,this.apiKey=t}async start(e){const t=await fetch(`${this.apiEndpoint}/api/recordings/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({api_key:this.apiKey,metadata:{url:e.url,user_agent:e.userAgent,viewport:e.viewport}})});if(!t.ok)throw new Error(`Failed to start recording: ${t.statusText}`);const r=await t.json();return this.sessionToken=r.session_token,this.recordingId=r.recording_id,{token:r.session_token,recordingId:r.recording_id,expiresAt:r.expires_at}}async uploadChunk(e){const t=await fetch(`${this.apiEndpoint}/api/recordings/${this.recordingId}/chunk`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.sessionToken}`},body:JSON.stringify({events:e.events,chunk_index:e.index})});if(!t.ok)throw new Error(`Failed to upload chunk: ${t.statusText}`)}async complete(e,t,r){const i=await fetch(`${this.apiEndpoint}/api/recordings/${this.recordingId}/complete`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.sessionToken}`},body:JSON.stringify({duration_ms:e,event_count:t,screenshot_markers:r.map(o=>({timestamp_ms:o.timestamp,event_type:o.eventType}))})});if(!i.ok)throw new Error(`Failed to complete recording: ${i.statusText}`);const n=await i.json();return{recordingId:this.recordingId,playbackUrl:n.playback_url,duration:e,eventCount:t,screenshotCount:r.length}}}var Ar,D,Aa,_e,bn,Ma,Oa,$a,li,Ms,Os,pr={},dr=[],Mp=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Mr=Array.isArray;function de(s,e){for(var t in e)s[t]=e[t];return s}function ui(s){s&&s.parentNode&&s.parentNode.removeChild(s)}function Op(s,e,t){var r,i,n,o={};for(n in e)n=="key"?r=e[n]:n=="ref"?i=e[n]:o[n]=e[n];if(arguments.length>2&&(o.children=arguments.length>3?Ar.call(arguments,2):t),typeof s=="function"&&s.defaultProps!=null)for(n in s.defaultProps)o[n]===void 0&&(o[n]=s.defaultProps[n]);return Zt(s,o,r,i,null)}function Zt(s,e,t,r,i){var n={type:s,props:e,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Aa,__i:-1,__u:0};return i==null&&D.vnode!=null&&D.vnode(n),n}function We(s){return s.children}function Jt(s,e){this.props=s,this.context=e}function je(s,e){if(e==null)return s.__?je(s.__,s.__i+1):null;for(var t;e<s.__k.length;e++)if((t=s.__k[e])!=null&&t.__e!=null)return t.__e;return typeof s.type=="function"?je(s):null}function $p(s){if(s.__P&&s.__d){var e=s.__v,t=e.__e,r=[],i=[],n=de({},e);n.__v=e.__v+1,D.vnode&&D.vnode(n),ci(s.__P,n,e,s.__n,s.__P.namespaceURI,32&e.__u?[t]:null,r,t??je(e),!!(32&e.__u),i),n.__v=e.__v,n.__.__k[n.__i]=n,Da(r,n,i),e.__e=e.__=null,n.__e!=t&&Na(n)}}function Na(s){if((s=s.__)!=null&&s.__c!=null)return s.__e=s.__c.base=null,s.__k.some(function(e){if(e!=null&&e.__e!=null)return s.__e=s.__c.base=e.__e}),Na(s)}function vn(s){(!s.__d&&(s.__d=!0)&&_e.push(s)&&!mr.__r++||bn!=D.debounceRendering)&&((bn=D.debounceRendering)||Ma)(mr)}function mr(){for(var s,e=1;_e.length;)_e.length>e&&_e.sort(Oa),s=_e.shift(),e=_e.length,$p(s);mr.__r=0}function Ta(s,e,t,r,i,n,o,l,a,u,h){var c,p,d,g,m,f,v,b=r&&r.__k||dr,y=e.length;for(a=Np(t,e,b,a,y),c=0;c<y;c++)(d=t.__k[c])!=null&&(p=d.__i!=-1&&b[d.__i]||pr,d.__i=c,f=ci(s,d,p,i,n,o,l,a,u,h),g=d.__e,d.ref&&p.ref!=d.ref&&(p.ref&&hi(p.ref,null,d),h.push(d.ref,d.__c||g,d)),m==null&&g!=null&&(m=g),(v=!!(4&d.__u))||p.__k===d.__k?a=Pa(d,a,s,v):typeof d.type=="function"&&f!==void 0?a=f:g&&(a=g.nextSibling),d.__u&=-7);return t.__e=m,a}function Np(s,e,t,r,i){var n,o,l,a,u,h=t.length,c=h,p=0;for(s.__k=new Array(i),n=0;n<i;n++)(o=e[n])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=s.__k[n]=Zt(null,o,null,null,null):Mr(o)?o=s.__k[n]=Zt(We,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=s.__k[n]=Zt(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):s.__k[n]=o,a=n+p,o.__=s,o.__b=s.__b+1,l=null,(u=o.__i=Tp(o,t,a,c))!=-1&&(c--,(l=t[u])&&(l.__u|=2)),l==null||l.__v==null?(u==-1&&(i>h?p--:i<h&&p++),typeof o.type!="function"&&(o.__u|=4)):u!=a&&(u==a-1?p--:u==a+1?p++:(u>a?p--:p++,o.__u|=4))):s.__k[n]=null;if(c)for(n=0;n<h;n++)(l=t[n])!=null&&(2&l.__u)==0&&(l.__e==r&&(r=je(l)),Fa(l,l));return r}function Pa(s,e,t,r){var i,n;if(typeof s.type=="function"){for(i=s.__k,n=0;i&&n<i.length;n++)i[n]&&(i[n].__=s,e=Pa(i[n],e,t,r));return e}s.__e!=e&&(r&&(e&&s.type&&!e.parentNode&&(e=je(s)),t.insertBefore(s.__e,e||null)),e=s.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Tp(s,e,t,r){var i,n,o,l=s.key,a=s.type,u=e[t],h=u!=null&&(2&u.__u)==0;if(u===null&&l==null||h&&l==u.key&&a==u.type)return t;if(r>(h?1:0)){for(i=t-1,n=t+1;i>=0||n<e.length;)if((u=e[o=i>=0?i--:n++])!=null&&(2&u.__u)==0&&l==u.key&&a==u.type)return o}return-1}function Sn(s,e,t){e[0]=="-"?s.setProperty(e,t??""):s[e]=t==null?"":typeof t!="number"||Mp.test(e)?t:t+"px"}function zt(s,e,t,r,i){var n,o;e:if(e=="style")if(typeof t=="string")s.style.cssText=t;else{if(typeof r=="string"&&(s.style.cssText=r=""),r)for(e in r)t&&e in t||Sn(s.style,e,"");if(t)for(e in t)r&&t[e]==r[e]||Sn(s.style,e,t[e])}else if(e[0]=="o"&&e[1]=="n")n=e!=(e=e.replace($a,"$1")),o=e.toLowerCase(),e=o in s||e=="onFocusOut"||e=="onFocusIn"?o.slice(2):e.slice(2),s.l||(s.l={}),s.l[e+n]=t,t?r?t.u=r.u:(t.u=li,s.addEventListener(e,n?Os:Ms,n)):s.removeEventListener(e,n?Os:Ms,n);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in s)try{s[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!="-"?s.removeAttribute(e):s.setAttribute(e,e=="popover"&&t==1?"":t))}}function Cn(s){return function(e){if(this.l){var t=this.l[e.type+s];if(e.t==null)e.t=li++;else if(e.t<t.u)return;return t(D.event?D.event(e):e)}}}function ci(s,e,t,r,i,n,o,l,a,u){var h,c,p,d,g,m,f,v,b,y,C,I,O,B,T,A=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(a=!!(32&t.__u),n=[l=e.__e=t.__e]),(h=D.__b)&&h(e);e:if(typeof A=="function")try{if(v=e.props,b="prototype"in A&&A.prototype.render,y=(h=A.contextType)&&r[h.__c],C=h?y?y.props.value:h.__:r,t.__c?f=(c=e.__c=t.__c).__=c.__E:(b?e.__c=c=new A(v,C):(e.__c=c=new Jt(v,C),c.constructor=A,c.render=Dp),y&&y.sub(c),c.state||(c.state={}),c.__n=r,p=c.__d=!0,c.__h=[],c._sb=[]),b&&c.__s==null&&(c.__s=c.state),b&&A.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=de({},c.__s)),de(c.__s,A.getDerivedStateFromProps(v,c.__s))),d=c.props,g=c.state,c.__v=e,p)b&&A.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),b&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(b&&A.getDerivedStateFromProps==null&&v!==d&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(v,C),e.__v==t.__v||!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(v,c.__s,C)===!1){e.__v!=t.__v&&(c.props=v,c.state=c.__s,c.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.some(function(z){z&&(z.__=e)}),dr.push.apply(c.__h,c._sb),c._sb=[],c.__h.length&&o.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(v,c.__s,C),b&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(d,g,m)})}if(c.context=C,c.props=v,c.__P=s,c.__e=!1,I=D.__r,O=0,b)c.state=c.__s,c.__d=!1,I&&I(e),h=c.render(c.props,c.state,c.context),dr.push.apply(c.__h,c._sb),c._sb=[];else do c.__d=!1,I&&I(e),h=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++O<25);c.state=c.__s,c.getChildContext!=null&&(r=de(de({},r),c.getChildContext())),b&&!p&&c.getSnapshotBeforeUpdate!=null&&(m=c.getSnapshotBeforeUpdate(d,g)),B=h!=null&&h.type===We&&h.key==null?La(h.props.children):h,l=Ta(s,Mr(B)?B:[B],e,t,r,i,n,o,l,a,u),c.base=e.__e,e.__u&=-161,c.__h.length&&o.push(c),f&&(c.__E=c.__=null)}catch(z){if(e.__v=null,a||n!=null)if(z.then){for(e.__u|=a?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;n[n.indexOf(l)]=null,e.__e=l}else{for(T=n.length;T--;)ui(n[T]);$s(e)}else e.__e=t.__e,e.__k=t.__k,z.then||$s(e);D.__e(z,e,t)}else n==null&&e.__v==t.__v?(e.__k=t.__k,e.__e=t.__e):l=e.__e=Pp(t.__e,e,t,r,i,n,o,a,u);return(h=D.diffed)&&h(e),128&e.__u?void 0:l}function $s(s){s&&(s.__c&&(s.__c.__e=!0),s.__k&&s.__k.some($s))}function Da(s,e,t){for(var r=0;r<t.length;r++)hi(t[r],t[++r],t[++r]);D.__c&&D.__c(e,s),s.some(function(i){try{s=i.__h,i.__h=[],s.some(function(n){n.call(i)})}catch(n){D.__e(n,i.__v)}})}function La(s){return typeof s!="object"||s==null||s.__b>0?s:Mr(s)?s.map(La):de({},s)}function Pp(s,e,t,r,i,n,o,l,a){var u,h,c,p,d,g,m,f=t.props||pr,v=e.props,b=e.type;if(b=="svg"?i="http://www.w3.org/2000/svg":b=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),n!=null){for(u=0;u<n.length;u++)if((d=n[u])&&"setAttribute"in d==!!b&&(b?d.localName==b:d.nodeType==3)){s=d,n[u]=null;break}}if(s==null){if(b==null)return document.createTextNode(v);s=document.createElementNS(i,b,v.is&&v),l&&(D.__m&&D.__m(e,n),l=!1),n=null}if(b==null)f===v||l&&s.data==v||(s.data=v);else{if(n=n&&Ar.call(s.childNodes),!l&&n!=null)for(f={},u=0;u<s.attributes.length;u++)f[(d=s.attributes[u]).name]=d.value;for(u in f)d=f[u],u=="dangerouslySetInnerHTML"?c=d:u=="children"||u in v||u=="value"&&"defaultValue"in v||u=="checked"&&"defaultChecked"in v||zt(s,u,null,d,i);for(u in v)d=v[u],u=="children"?p=d:u=="dangerouslySetInnerHTML"?h=d:u=="value"?g=d:u=="checked"?m=d:l&&typeof d!="function"||f[u]===d||zt(s,u,d,f[u],i);if(h)l||c&&(h.__html==c.__html||h.__html==s.innerHTML)||(s.innerHTML=h.__html),e.__k=[];else if(c&&(s.innerHTML=""),Ta(e.type=="template"?s.content:s,Mr(p)?p:[p],e,t,r,b=="foreignObject"?"http://www.w3.org/1999/xhtml":i,n,o,n?n[0]:t.__k&&je(t,0),l,a),n!=null)for(u=n.length;u--;)ui(n[u]);l||(u="value",b=="progress"&&g==null?s.removeAttribute("value"):g!=null&&(g!==s[u]||b=="progress"&&!g||b=="option"&&g!=f[u])&&zt(s,u,g,f[u],i),u="checked",m!=null&&m!=s[u]&&zt(s,u,m,f[u],i))}return s}function hi(s,e,t){try{if(typeof s=="function"){var r=typeof s.__u=="function";r&&s.__u(),r&&e==null||(s.__u=s(e))}else s.current=e}catch(i){D.__e(i,t)}}function Fa(s,e,t){var r,i;if(D.unmount&&D.unmount(s),(r=s.ref)&&(r.current&&r.current!=s.__e||hi(r,null,e)),(r=s.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(n){D.__e(n,e)}r.base=r.__P=null}if(r=s.__k)for(i=0;i<r.length;i++)r[i]&&Fa(r[i],e,t||typeof s.type!="function");t||ui(s.__e),s.__c=s.__=s.__e=void 0}function Dp(s,e,t){return this.constructor(s,t)}function gr(s,e,t){var r,i,n,o;e==document&&(e=document.documentElement),D.__&&D.__(s,e),i=(r=!1)?null:e.__k,n=[],o=[],ci(e,s=e.__k=Op(We,null,[s]),i||pr,pr,e.namespaceURI,i?null:e.firstChild?Ar.call(e.childNodes):null,n,i?i.__e:e.firstChild,r,o),Da(n,s,o)}Ar=dr.slice,D={__e:function(s,e,t,r){for(var i,n,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((n=i.constructor)&&n.getDerivedStateFromError!=null&&(i.setState(n.getDerivedStateFromError(s)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(s,r||{}),o=i.__d),o)return i.__E=i}catch(l){s=l}throw s}},Aa=0,Jt.prototype.setState=function(s,e){var t;t=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=de({},this.state),typeof s=="function"&&(s=s(de({},t),this.props)),s&&de(t,s),s!=null&&this.__v&&(e&&this._sb.push(e),vn(this))},Jt.prototype.forceUpdate=function(s){this.__v&&(this.__e=!0,s&&this.__h.push(s),vn(this))},Jt.prototype.render=We,_e=[],Ma=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Oa=function(s,e){return s.__v.__b-e.__v.__b},mr.__r=0,$a=/(PointerCapture)$|Capture$/i,li=0,Ms=Cn(!1),Os=Cn(!0);var Lp=0;function w(s,e,t,r,i,n){e||(e={});var o,l,a=e;if("ref"in a)for(l in a={},e)l=="ref"?o=e[l]:a[l]=e[l];var u={type:s,props:a,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Lp,__i:-1,__u:0,__source:i,__self:n};if(typeof s=="function"&&(o=s.defaultProps))for(l in o)a[l]===void 0&&(a[l]=o[l]);return D.vnode&&D.vnode(u),u}const Ns="bw-recorder-styles",Fp=`
|
|
60
60
|
.bw-recorder-toolbar {
|
|
61
61
|
--bw-cream: #FAF7F2;
|
|
62
62
|
--bw-cream-dim: #F0EBE0;
|
|
@@ -255,7 +255,7 @@ or you can use record.mirror to access the mirror instance during recording.`;le
|
|
|
255
255
|
left: 0;
|
|
256
256
|
right: 0;
|
|
257
257
|
bottom: 0;
|
|
258
|
-
background:
|
|
258
|
+
background: #1F1F23;
|
|
259
259
|
display: flex;
|
|
260
260
|
align-items: center;
|
|
261
261
|
justify-content: center;
|
|
@@ -437,5 +437,5 @@ or you can use record.mirror to access the mirror instance during recording.`;le
|
|
|
437
437
|
color: #6b7280;
|
|
438
438
|
margin: 0;
|
|
439
439
|
}
|
|
440
|
-
`;let Xt=!1;function Fa(){if(Xt||typeof document>"u")return;if(document.getElementById(As)){Xt=!0;return}const s=document.createElement("style");s.id=As,s.textContent=Nd,document.head.appendChild(s),Xt=!0}function Td(){const s=document.getElementById(As);s&&(s.remove(),Xt=!1)}const Pd=()=>w("svg",{viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:w("path",{d:"M8 5v14l11-7z"})}),Dd=()=>w("svg",{viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:w("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}),Ld=()=>w("svg",{viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:w("path",{d:"M6 6h12v12H6z"})}),Fd=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",children:[w("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),w("circle",{cx:"12",cy:"13",r:"4"})]}),Ud=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",children:w("path",{d:"M20 6L9 17l-5-5"})}),Bd=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",class:"bw-spin",children:w("path",{d:"M12 2v4m0 12v4m10-10h-4M6 12H2m15.07-5.07l-2.83 2.83M9.76 14.24l-2.83 2.83m11.14 0l-2.83-2.83M9.76 9.76L6.93 6.93"})});function zd(s){const e=Math.floor(s/1e3),t=Math.floor(e/60),r=e%60;return`${t.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}function Wd({position:s,state:e,elapsedTime:t,result:r,onStart:i,onPause:n,onResume:o,onStop:l,onScreenshot:a,onRestart:u}){if(e==="idle")return w("div",{class:`bw-recorder-toolbar ${s}`,"data-bw-recorder-ui":!0,children:w("button",{class:"bw-toolbar-idle",onClick:i,type:"button",children:[w("span",{class:"bw-idle-icon"}),w("span",{class:"bw-idle-text",children:"Start Recording"}),w("span",{class:"bw-idle-logo",children:"bw"})]})});if(e==="stopped"&&r)return w("div",{class:`bw-recorder-toolbar ${s}`,"data-bw-recorder-ui":!0,children:w("div",{class:"bw-toolbar-complete",children:[w("span",{class:"bw-complete-icon",children:w(Ud,{})}),w("span",{class:"bw-complete-text",children:["Recording saved!"," ",w("a",{href:r.playbackUrl,target:"_blank",rel:"noopener noreferrer",children:"View"})]}),w("button",{class:"bw-restart-btn",onClick:u,type:"button",title:"Start new recording",children:"New"})]})});if(e==="stopped")return w("div",{class:`bw-recorder-toolbar ${s}`,"data-bw-recorder-ui":!0,children:w("div",{class:"bw-toolbar-complete",children:[w("span",{class:"bw-complete-icon bw-saving",children:w(Bd,{})}),w("span",{class:"bw-complete-text",children:"Saving..."})]})});const c=e==="recording",h=e==="paused";return w("div",{class:`bw-recorder-toolbar ${s}`,"data-bw-recorder-ui":!0,children:w("div",{class:"bw-toolbar-container",children:[w("div",{class:"bw-toolbar-status",children:[w("span",{class:`bw-status-indicator ${c?"recording":""} ${h?"paused":""}`}),w("span",{class:"bw-status-text",children:c?"Recording":"Paused"}),w("span",{class:"bw-status-time",children:zd(t)})]}),w("button",{class:"bw-toolbar-btn",onClick:c?n:o,title:c?"Pause":"Resume",type:"button",children:c?w(Dd,{}):w(Pd,{})}),w("button",{class:"bw-toolbar-btn stop",onClick:l,title:"Stop Recording",type:"button",children:w(Ld,{})}),w("div",{class:"bw-toolbar-divider"}),w("button",{class:"bw-toolbar-btn",onClick:a,title:"Take Screenshot",disabled:!c,type:"button",children:w(Fd,{})}),w("div",{class:"bw-toolbar-divider"}),w("span",{class:"bw-toolbar-logo",children:"bw"})]})})}class Hd{constructor(e="bottom-right"){this.container=null,this.state="idle",this.elapsedTime=0,this.result=null,this.updateInterval=null,this.getElapsedTime=null,this.onStartCallback=null,this.onPauseCallback=null,this.onResumeCallback=null,this.onStopCallback=null,this.onScreenshotCallback=null,this.onRestartCallback=null,this.position=e}mount(){this.container||(Fa(),this.container=document.createElement("div"),this.container.id="bw-recorder-root",this.container.setAttribute("data-bw-recorder-ui",""),document.body.appendChild(this.container),this.render())}unmount(){this.updateInterval&&(clearInterval(this.updateInterval),this.updateInterval=null),this.container&&(fr(null,this.container),this.container.remove(),this.container=null),Td()}setCallbacks(e){this.onStartCallback=e.onStart??null,this.onPauseCallback=e.onPause??null,this.onResumeCallback=e.onResume??null,this.onStopCallback=e.onStop??null,this.onScreenshotCallback=e.onScreenshot??null,this.onRestartCallback=e.onRestart??null,this.getElapsedTime=e.getElapsedTime??null}setState(e){this.state=e,e==="recording"?this.startTimeUpdates():(e==="stopped"||e==="idle")&&this.stopTimeUpdates(),this.render()}setResult(e){this.result=e,this.render()}reset(){this.state="idle",this.result=null,this.elapsedTime=0,this.render()}startTimeUpdates(){this.updateInterval||(this.updateInterval=setInterval(()=>{this.getElapsedTime&&(this.elapsedTime=this.getElapsedTime(),this.render())},100))}stopTimeUpdates(){this.updateInterval&&(clearInterval(this.updateInterval),this.updateInterval=null)}render(){this.container&&fr(w(Wd,{position:this.position,state:this.state,elapsedTime:this.elapsedTime,result:this.result,onStart:()=>{var e;return(e=this.onStartCallback)==null?void 0:e.call(this)},onPause:()=>{var e;return(e=this.onPauseCallback)==null?void 0:e.call(this)},onResume:()=>{var e;return(e=this.onResumeCallback)==null?void 0:e.call(this)},onStop:()=>{var e;return(e=this.onStopCallback)==null?void 0:e.call(this)},onScreenshot:()=>{var e;return(e=this.onScreenshotCallback)==null?void 0:e.call(this)},onRestart:()=>{var e;return(e=this.onRestartCallback)==null?void 0:e.call(this)}}),this.container)}}var Os,Z,Gr,Cn,$s=0,Ua=[],X=P,_n=X.__b,xn=X.__r,In=X.diffed,Rn=X.__c,kn=X.unmount,En=X.__;function jd(s,e){X.__h&&X.__h(Z,s,$s||e),$s=0;var t=Z.__H||(Z.__H={__:[],__h:[]});return s>=t.__.length&&t.__.push({}),t.__[s]}function Vr(s){return $s=1,Gd(Ba,s)}function Gd(s,e,t){var r=jd(Os++,2);if(r.t=s,!r.__c&&(r.__=[Ba(void 0,e),function(l){var a=r.__N?r.__N[0]:r.__[0],u=r.t(a,l);a!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=Z,!Z.__f)){var i=function(l,a,u){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(p){return!!p.__c});if(c.every(function(p){return!p.__N}))return!n||n.call(this,l,a,u);var h=r.__c.props!==l;return c.forEach(function(p){if(p.__N){var d=p.__[0];p.__=p.__N,p.__N=void 0,d!==p.__[0]&&(h=!0)}}),n&&n.call(this,l,a,u)||h};Z.__f=!0;var n=Z.shouldComponentUpdate,o=Z.componentWillUpdate;Z.componentWillUpdate=function(l,a,u){if(this.__e){var c=n;n=void 0,i(l,a,u),n=c}o&&o.call(this,l,a,u)},Z.shouldComponentUpdate=i}return r.__N||r.__}function Vd(){for(var s;s=Ua.shift();)if(s.__P&&s.__H)try{s.__H.__h.forEach(Kt),s.__H.__h.forEach(Ns),s.__H.__h=[]}catch(e){s.__H.__h=[],X.__e(e,s.__v)}}X.__b=function(s){Z=null,_n&&_n(s)},X.__=function(s,e){s&&e.__k&&e.__k.__m&&(s.__m=e.__k.__m),En&&En(s,e)},X.__r=function(s){xn&&xn(s),Os=0;var e=(Z=s.__c).__H;e&&(Gr===Z?(e.__h=[],Z.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.forEach(Kt),e.__h.forEach(Ns),e.__h=[],Os=0)),Gr=Z},X.diffed=function(s){In&&In(s);var e=s.__c;e&&e.__H&&(e.__H.__h.length&&(Ua.push(e)!==1&&Cn===X.requestAnimationFrame||((Cn=X.requestAnimationFrame)||Yd)(Vd)),e.__H.__.forEach(function(t){t.u&&(t.__H=t.u),t.u=void 0})),Gr=Z=null},X.__c=function(s,e){e.some(function(t){try{t.__h.forEach(Kt),t.__h=t.__h.filter(function(r){return!r.__||Ns(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],X.__e(r,t.__v)}}),Rn&&Rn(s,e)},X.unmount=function(s){kn&&kn(s);var e,t=s.__c;t&&t.__H&&(t.__H.__.forEach(function(r){try{Kt(r)}catch(i){e=i}}),t.__H=void 0,e&&X.__e(e,t.__v))};var Mn=typeof requestAnimationFrame=="function";function Yd(s){var e,t=function(){clearTimeout(r),Mn&&cancelAnimationFrame(e),setTimeout(s)},r=setTimeout(t,35);Mn&&(e=requestAnimationFrame(t))}function Kt(s){var e=Z,t=s.__c;typeof t=="function"&&(s.__c=void 0,t()),Z=e}function Ns(s){var e=Z;s.__c=s.__(),Z=e}function Ba(s,e){return typeof e=="function"?e(s):e}const dr="bw_invite_completed",Zd=()=>w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[w("path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9"}),w("path",{d:"m18 15 4-4"}),w("path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5"})]}),Jd=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[w("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),w("circle",{cx:"12",cy:"12",r:"3"})]}),Xd=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[w("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),w("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}),Kd=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[w("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),w("polyline",{points:"22 4 12 14.01 9 11.01"})]}),Qd=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",class:"bw-invite-spin",children:w("path",{d:"M12 2v4m0 12v4m10-10h-4M6 12H2m15.07-5.07l-2.83 2.83M9.76 14.24l-2.83 2.83m11.14 0l-2.83-2.83M9.76 9.76L6.93 6.93"})});function qd({email:s,onComplete:e,onLogin:t}){const[r,i]=Vr("form"),[n,o]=Vr(""),[l,a]=Vr(!1),u=h=>{h.preventDefault(),n.trim()&&(i("loading"),setTimeout(()=>{i("success"),localStorage.setItem(dr,JSON.stringify({email:s,timestamp:Date.now()})),setTimeout(()=>{e()},1500)},1200))},c=h=>{h.preventDefault(),localStorage.setItem(dr,JSON.stringify({email:s,timestamp:Date.now()})),t()};return w("div",{class:"bw-invite-overlay","data-bw-launchkit-ui":!0,children:w("div",{class:"bw-invite-dialog",children:r==="success"?w("div",{class:"bw-invite-success",children:[w("div",{class:"bw-invite-success-icon",children:w(Kd,{})}),w("h2",{class:"bw-invite-success-title",children:"You're in!"}),w("p",{class:"bw-invite-success-text",children:"Welcome aboard."})]}):w(ze,{children:[w("div",{class:"bw-invite-logo",children:w(Zd,{})}),w("h2",{class:"bw-invite-title",children:"Welcome"}),w("p",{class:"bw-invite-subtitle",children:"You've been invited. Set a password to continue."}),w("form",{class:"bw-invite-form",onSubmit:u,children:[w("div",{class:"bw-invite-field",children:w("input",{type:"email",value:s,readonly:!0,class:"bw-invite-input",placeholder:"Email address"})}),w("div",{class:"bw-invite-field",children:[w("input",{type:l?"text":"password",value:n,onInput:h=>o(h.target.value),class:"bw-invite-input",placeholder:"Password",disabled:r==="loading",autoFocus:!0}),w("button",{type:"button",class:"bw-invite-eye-btn",onClick:()=>a(!l),tabIndex:-1,children:l?w(Xd,{}):w(Jd,{})})]}),w("button",{type:"submit",class:"bw-invite-submit",disabled:r==="loading"||!n.trim(),children:r==="loading"?w(ze,{children:[w(Qd,{}),w("span",{children:"Setting up..."})]}):"Continue"})]}),w("p",{class:"bw-invite-login-text",children:["Already have an account?"," ",w("a",{href:"#",onClick:c,class:"bw-invite-login-link",children:"Log in"})]})]})})})}class Ts{constructor(e){this.container=null,this.onCompleteCallback=null,this.handleComplete=()=>{var t;this.unmount(),(t=this.onCompleteCallback)==null||t.call(this)},this.handleLogin=()=>{var t;this.unmount(),(t=this.onCompleteCallback)==null||t.call(this)},this.email=e}static isCompleted(){return typeof localStorage>"u"?!1:localStorage.getItem(dr)!==null}static clearCompletion(){typeof localStorage>"u"||localStorage.removeItem(dr)}mount(){this.container||(Fa(),this.container=document.createElement("div"),this.container.id="bw-invite-root",this.container.setAttribute("data-bw-launchkit-ui",""),document.body.appendChild(this.container),this.render())}unmount(){this.container&&(fr(null,this.container),this.container.remove(),this.container=null)}onComplete(e){this.onCompleteCallback=e}render(){this.container&&fr(w(qd,{email:this.email,onComplete:this.handleComplete,onLogin:this.handleLogin}),this.container)}}class hi{constructor(e){this.toolbar=null,this.isInitialized=!1;const t=e.onStateChange;this.config={apiEndpoint:"https://api.bworlds.com",maxDuration:900*1e3,maskInputs:!0,autoOpenPlayback:!0,toolbar:{enabled:!0,position:"bottom-right"},...e,onStateChange:n=>{this.handleStateChange(n),t==null||t(n)}},this.recorder=new Sd(this.config),this.screenshotMarker=new Cd,this.eventDetector=new _d(this.screenshotMarker);const i=this.config.apiEndpoint&&this.config.apiEndpoint!=="https://api.bworlds.com"?new Id(this.config.apiEndpoint,this.config.apiKey):new xd;this.recorder.setUploader(i),this.recorder.onEvent(n=>{this.eventDetector.handleRrwebEvent(n)})}init(){var e,t;if(!this.isInitialized&&(this.isInitialized=!0,((e=this.config.toolbar)==null?void 0:e.enabled)!==!1)){const r=((t=this.config.toolbar)==null?void 0:t.position)??"bottom-right";this.toolbar=new Hd(r),this.toolbar.setCallbacks({onStart:()=>this.start(),onPause:()=>this.pause(),onResume:()=>this.resume(),onStop:()=>this.stop(),onScreenshot:()=>this.screenshot(),onRestart:()=>this.restart(),getElapsedTime:()=>this.recorder.getElapsedTime()}),this.toolbar.mount()}}async start(){var e;await this.recorder.start(),this.screenshotMarker.setStartTime(Date.now()),this.eventDetector.start(),(e=this.toolbar)==null||e.setState("recording")}pause(){var e;this.recorder.pause(),(e=this.toolbar)==null||e.setState("paused")}resume(){var e;this.recorder.resume(),(e=this.toolbar)==null||e.setState("recording")}async stop(){var n,o,l;this.eventDetector.stop(),this.screenshotMarker.stop();const e=this.screenshotMarker.getMarkers(),t=await this.recorder.stop(e);if((n=this.toolbar)==null||n.setState("stopped"),t)return(o=this.toolbar)==null||o.setResult(t),this.config.autoOpenPlayback!==!1&&t.playbackUrl&&window.open(t.playbackUrl,"_blank"),t;const r=this.recorder.getEvents(),i={recordingId:`rec_${Date.now()}`,playbackUrl:"",duration:this.recorder.getElapsedTime(),eventCount:r.length,screenshotCount:e.length};return(l=this.toolbar)==null||l.setResult(i),i}screenshot(){this.screenshotMarker.capture("manual")}restart(){var e;this.eventDetector.destroy(),this.recorder.reset(),this.screenshotMarker.reset(),(e=this.toolbar)==null||e.reset()}getState(){return this.recorder.getState()}getElapsedTime(){return this.recorder.getElapsedTime()}destroy(){var e;this.eventDetector.destroy(),this.recorder.reset(),this.screenshotMarker.reset(),(e=this.toolbar)==null||e.unmount(),this.isInitialized=!1}handleStateChange(e){var t;(t=this.toolbar)==null||t.setState(e)}}const ep="_bw_record",tp="_bw_invite";function rp(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(ep)}function sp(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(tp)}function ip(s){if(Ts.isCompleted()){console.log("[BWorlds LaunchKit] Invite already completed");return}console.log("[BWorlds LaunchKit] Showing invite dialog for:",s);const e=new Ts(s);e.onComplete(()=>{console.log("[BWorlds LaunchKit] Invite flow completed")}),e.mount(),typeof window<"u"&&(window.__bwInviteDialog=e)}function np(s){const t=new URLSearchParams(window.location.search).get("_bw_api")||"http://localhost:3941";console.log("[BWorlds Recorder] Initializing with endpoint:",t);const r=new hi({apiKey:s,apiEndpoint:t,onComplete:i=>{console.log("[BWorlds Recorder] Recording complete:",i.playbackUrl)},onError:i=>{console.error("[BWorlds Recorder] Error:",i)}});r.init(),typeof window<"u"&&(window.__bwRecorder=r)}function op(){typeof window>"u"||(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>An()):An())}function An(){const s=rp(),e=sp();e&&ip(e),s&&np(s)}exports.DemoRecorder=hi;exports.InviteDialogController=Ts;exports.default=hi;exports.init=op;
|
|
440
|
+
`;let Xt=!1;function Ua(){if(Xt||typeof document>"u")return;if(document.getElementById(Ns)){Xt=!0;return}const s=document.createElement("style");s.id=Ns,s.textContent=Fp,document.head.appendChild(s),Xt=!0}function Up(){const s=document.getElementById(Ns);s&&(s.remove(),Xt=!1)}const Bp=()=>w("svg",{viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:w("path",{d:"M8 5v14l11-7z"})}),zp=()=>w("svg",{viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:w("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}),Wp=()=>w("svg",{viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:w("path",{d:"M6 6h12v12H6z"})}),jp=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",children:[w("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),w("circle",{cx:"12",cy:"13",r:"4"})]}),Hp=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",children:w("path",{d:"M20 6L9 17l-5-5"})}),Gp=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",class:"bw-spin",children:w("path",{d:"M12 2v4m0 12v4m10-10h-4M6 12H2m15.07-5.07l-2.83 2.83M9.76 14.24l-2.83 2.83m11.14 0l-2.83-2.83M9.76 9.76L6.93 6.93"})});function Vp(s){const e=Math.floor(s/1e3),t=Math.floor(e/60),r=e%60;return`${t.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}function Yp({position:s,state:e,elapsedTime:t,result:r,onStart:i,onPause:n,onResume:o,onStop:l,onScreenshot:a,onRestart:u}){if(e==="idle")return w("div",{class:`bw-recorder-toolbar ${s}`,"data-bw-recorder-ui":!0,children:w("button",{class:"bw-toolbar-idle",onClick:i,type:"button",children:[w("span",{class:"bw-idle-icon"}),w("span",{class:"bw-idle-text",children:"Start Recording"}),w("span",{class:"bw-idle-logo",children:"bw"})]})});if(e==="stopped"&&r)return w("div",{class:`bw-recorder-toolbar ${s}`,"data-bw-recorder-ui":!0,children:w("div",{class:"bw-toolbar-complete",children:[w("span",{class:"bw-complete-icon",children:w(Hp,{})}),w("span",{class:"bw-complete-text",children:["Recording saved!"," ",w("a",{href:r.playbackUrl,target:"_blank",rel:"noopener noreferrer",children:"View"})]}),w("button",{class:"bw-restart-btn",onClick:u,type:"button",title:"Start new recording",children:"New"})]})});if(e==="stopped")return w("div",{class:`bw-recorder-toolbar ${s}`,"data-bw-recorder-ui":!0,children:w("div",{class:"bw-toolbar-complete",children:[w("span",{class:"bw-complete-icon bw-saving",children:w(Gp,{})}),w("span",{class:"bw-complete-text",children:"Saving..."})]})});const h=e==="recording",c=e==="paused";return w("div",{class:`bw-recorder-toolbar ${s}`,"data-bw-recorder-ui":!0,children:w("div",{class:"bw-toolbar-container",children:[w("div",{class:"bw-toolbar-status",children:[w("span",{class:`bw-status-indicator ${h?"recording":""} ${c?"paused":""}`}),w("span",{class:"bw-status-text",children:h?"Recording":"Paused"}),w("span",{class:"bw-status-time",children:Vp(t)})]}),w("button",{class:"bw-toolbar-btn",onClick:h?n:o,title:h?"Pause":"Resume",type:"button",children:h?w(zp,{}):w(Bp,{})}),w("button",{class:"bw-toolbar-btn stop",onClick:l,title:"Stop Recording",type:"button",children:w(Wp,{})}),w("div",{class:"bw-toolbar-divider"}),w("button",{class:"bw-toolbar-btn",onClick:a,title:"Take Screenshot",disabled:!h,type:"button",children:w(jp,{})}),w("div",{class:"bw-toolbar-divider"}),w("span",{class:"bw-toolbar-logo",children:"bw"})]})})}class Zp{constructor(e="bottom-right"){this.container=null,this.state="idle",this.elapsedTime=0,this.result=null,this.updateInterval=null,this.getElapsedTime=null,this.onStartCallback=null,this.onPauseCallback=null,this.onResumeCallback=null,this.onStopCallback=null,this.onScreenshotCallback=null,this.onRestartCallback=null,this.position=e}mount(){this.container||(Ua(),this.container=document.createElement("div"),this.container.id="bw-recorder-root",this.container.setAttribute("data-bw-recorder-ui",""),document.body.appendChild(this.container),this.render())}unmount(){this.updateInterval&&(clearInterval(this.updateInterval),this.updateInterval=null),this.container&&(gr(null,this.container),this.container.remove(),this.container=null),Up()}setCallbacks(e){this.onStartCallback=e.onStart??null,this.onPauseCallback=e.onPause??null,this.onResumeCallback=e.onResume??null,this.onStopCallback=e.onStop??null,this.onScreenshotCallback=e.onScreenshot??null,this.onRestartCallback=e.onRestart??null,this.getElapsedTime=e.getElapsedTime??null}setState(e){this.state=e,e==="recording"?this.startTimeUpdates():(e==="stopped"||e==="idle")&&this.stopTimeUpdates(),this.render()}setResult(e){this.result=e,this.render()}reset(){this.state="idle",this.result=null,this.elapsedTime=0,this.render()}startTimeUpdates(){this.updateInterval||(this.updateInterval=setInterval(()=>{this.getElapsedTime&&(this.elapsedTime=this.getElapsedTime(),this.render())},100))}stopTimeUpdates(){this.updateInterval&&(clearInterval(this.updateInterval),this.updateInterval=null)}render(){this.container&&gr(w(Yp,{position:this.position,state:this.state,elapsedTime:this.elapsedTime,result:this.result,onStart:()=>{var e;return(e=this.onStartCallback)==null?void 0:e.call(this)},onPause:()=>{var e;return(e=this.onPauseCallback)==null?void 0:e.call(this)},onResume:()=>{var e;return(e=this.onResumeCallback)==null?void 0:e.call(this)},onStop:()=>{var e;return(e=this.onStopCallback)==null?void 0:e.call(this)},onScreenshot:()=>{var e;return(e=this.onScreenshotCallback)==null?void 0:e.call(this)},onRestart:()=>{var e;return(e=this.onRestartCallback)==null?void 0:e.call(this)}}),this.container)}}var Ts,Y,Zr,_n,Ps=0,Ba=[],J=D,xn=J.__b,In=J.__r,Rn=J.diffed,kn=J.__c,En=J.unmount,An=J.__;function Jp(s,e){J.__h&&J.__h(Y,s,Ps||e),Ps=0;var t=Y.__H||(Y.__H={__:[],__h:[]});return s>=t.__.length&&t.__.push({}),t.__[s]}function Jr(s){return Ps=1,Xp(za,s)}function Xp(s,e,t){var r=Jp(Ts++,2);if(r.t=s,!r.__c&&(r.__=[za(void 0,e),function(l){var a=r.__N?r.__N[0]:r.__[0],u=r.t(a,l);a!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=Y,!Y.__f)){var i=function(l,a,u){if(!r.__c.__H)return!0;var h=r.__c.__H.__.filter(function(p){return p.__c});if(h.every(function(p){return!p.__N}))return!n||n.call(this,l,a,u);var c=r.__c.props!==l;return h.some(function(p){if(p.__N){var d=p.__[0];p.__=p.__N,p.__N=void 0,d!==p.__[0]&&(c=!0)}}),n&&n.call(this,l,a,u)||c};Y.__f=!0;var n=Y.shouldComponentUpdate,o=Y.componentWillUpdate;Y.componentWillUpdate=function(l,a,u){if(this.__e){var h=n;n=void 0,i(l,a,u),n=h}o&&o.call(this,l,a,u)},Y.shouldComponentUpdate=i}return r.__N||r.__}function Kp(){for(var s;s=Ba.shift();){var e=s.__H;if(s.__P&&e)try{e.__h.some(Kt),e.__h.some(Ds),e.__h=[]}catch(t){e.__h=[],J.__e(t,s.__v)}}}J.__b=function(s){Y=null,xn&&xn(s)},J.__=function(s,e){s&&e.__k&&e.__k.__m&&(s.__m=e.__k.__m),An&&An(s,e)},J.__r=function(s){In&&In(s),Ts=0;var e=(Y=s.__c).__H;e&&(Zr===Y?(e.__h=[],Y.__h=[],e.__.some(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.some(Kt),e.__h.some(Ds),e.__h=[],Ts=0)),Zr=Y},J.diffed=function(s){Rn&&Rn(s);var e=s.__c;e&&e.__H&&(e.__H.__h.length&&(Ba.push(e)!==1&&_n===J.requestAnimationFrame||((_n=J.requestAnimationFrame)||Qp)(Kp)),e.__H.__.some(function(t){t.u&&(t.__H=t.u),t.u=void 0})),Zr=Y=null},J.__c=function(s,e){e.some(function(t){try{t.__h.some(Kt),t.__h=t.__h.filter(function(r){return!r.__||Ds(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],J.__e(r,t.__v)}}),kn&&kn(s,e)},J.unmount=function(s){En&&En(s);var e,t=s.__c;t&&t.__H&&(t.__H.__.some(function(r){try{Kt(r)}catch(i){e=i}}),t.__H=void 0,e&&J.__e(e,t.__v))};var Mn=typeof requestAnimationFrame=="function";function Qp(s){var e,t=function(){clearTimeout(r),Mn&&cancelAnimationFrame(e),setTimeout(s)},r=setTimeout(t,35);Mn&&(e=requestAnimationFrame(t))}function Kt(s){var e=Y,t=s.__c;typeof t=="function"&&(s.__c=void 0,t()),Y=e}function Ds(s){var e=Y;s.__c=s.__(),Y=e}function za(s,e){return typeof e=="function"?e(s):e}const yr="bw_invite_completed",qp=()=>w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[w("path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9"}),w("path",{d:"m18 15 4-4"}),w("path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5"})]}),ed=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[w("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),w("circle",{cx:"12",cy:"12",r:"3"})]}),td=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[w("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),w("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}),rd=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[w("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),w("polyline",{points:"22 4 12 14.01 9 11.01"})]}),sd=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",class:"bw-invite-spin",children:w("path",{d:"M12 2v4m0 12v4m10-10h-4M6 12H2m15.07-5.07l-2.83 2.83M9.76 14.24l-2.83 2.83m11.14 0l-2.83-2.83M9.76 9.76L6.93 6.93"})});function id({email:s,onComplete:e,onLogin:t}){const[r,i]=Jr("form"),[n,o]=Jr(""),[l,a]=Jr(!1),u=c=>{c.preventDefault(),n.trim()&&(i("loading"),setTimeout(()=>{i("success"),localStorage.setItem(yr,JSON.stringify({email:s,timestamp:Date.now()})),setTimeout(()=>{e()},1500)},1200))},h=c=>{c.preventDefault(),localStorage.setItem(yr,JSON.stringify({email:s,timestamp:Date.now()})),t()};return w("div",{class:"bw-invite-overlay","data-bw-launchkit-ui":!0,children:w("div",{class:"bw-invite-dialog",children:r==="success"?w("div",{class:"bw-invite-success",children:[w("div",{class:"bw-invite-success-icon",children:w(rd,{})}),w("h2",{class:"bw-invite-success-title",children:"You're in!"}),w("p",{class:"bw-invite-success-text",children:"Welcome aboard."})]}):w(We,{children:[w("div",{class:"bw-invite-logo",children:w(qp,{})}),w("h2",{class:"bw-invite-title",children:"Welcome"}),w("p",{class:"bw-invite-subtitle",children:"You've been invited. Set a password to continue."}),w("form",{class:"bw-invite-form",onSubmit:u,children:[w("div",{class:"bw-invite-field",children:w("input",{type:"email",value:s,readonly:!0,class:"bw-invite-input",placeholder:"Email address"})}),w("div",{class:"bw-invite-field",children:[w("input",{type:l?"text":"password",value:n,onInput:c=>o(c.target.value),class:"bw-invite-input",placeholder:"Password",disabled:r==="loading",autoFocus:!0}),w("button",{type:"button",class:"bw-invite-eye-btn",onClick:()=>a(!l),tabIndex:-1,children:l?w(td,{}):w(ed,{})})]}),w("button",{type:"submit",class:"bw-invite-submit",disabled:r==="loading"||!n.trim(),children:r==="loading"?w(We,{children:[w(sd,{}),w("span",{children:"Setting up..."})]}):"Continue"})]}),w("p",{class:"bw-invite-login-text",children:["Already have an account?"," ",w("a",{href:"#",onClick:h,class:"bw-invite-login-link",children:"Log in"})]})]})})})}class Ls{constructor(e){this.container=null,this.onCompleteCallback=null,this.handleComplete=()=>{var t;this.unmount(),(t=this.onCompleteCallback)==null||t.call(this)},this.handleLogin=()=>{var t;this.unmount(),(t=this.onCompleteCallback)==null||t.call(this)},this.email=e}static isCompleted(){return typeof localStorage>"u"?!1:localStorage.getItem(yr)!==null}static clearCompletion(){typeof localStorage>"u"||localStorage.removeItem(yr)}mount(){this.container||(Ua(),this.container=document.createElement("div"),this.container.id="bw-invite-root",this.container.setAttribute("data-bw-launchkit-ui",""),document.body.appendChild(this.container),this.render())}unmount(){this.container&&(gr(null,this.container),this.container.remove(),this.container=null)}onComplete(e){this.onCompleteCallback=e}render(){this.container&&gr(w(id,{email:this.email,onComplete:this.handleComplete,onLogin:this.handleLogin}),this.container)}}class fi{constructor(e){this.toolbar=null,this.isInitialized=!1;const t=e.onStateChange;this.config={apiEndpoint:"https://api.bworlds.com",maxDuration:900*1e3,maskInputs:!0,autoOpenPlayback:!0,toolbar:{enabled:!0,position:"bottom-right"},...e,onStateChange:n=>{this.handleStateChange(n),t==null||t(n)}},this.recorder=new Ip(this.config),this.screenshotMarker=new Rp,this.eventDetector=new kp(this.screenshotMarker);const i=this.config.apiEndpoint&&this.config.apiEndpoint!=="https://api.bworlds.com"?new Ap(this.config.apiEndpoint,this.config.apiKey):new Ep;this.recorder.setUploader(i),this.recorder.onEvent(n=>{this.eventDetector.handleRrwebEvent(n)})}init(){var e,t;if(!this.isInitialized&&(this.isInitialized=!0,((e=this.config.toolbar)==null?void 0:e.enabled)!==!1)){const r=((t=this.config.toolbar)==null?void 0:t.position)??"bottom-right";this.toolbar=new Zp(r),this.toolbar.setCallbacks({onStart:()=>this.start(),onPause:()=>this.pause(),onResume:()=>this.resume(),onStop:()=>this.stop(),onScreenshot:()=>this.screenshot(),onRestart:()=>this.restart(),getElapsedTime:()=>this.recorder.getElapsedTime()}),this.toolbar.mount()}}async start(){var e;await this.recorder.start(),this.screenshotMarker.setStartTime(Date.now()),this.eventDetector.start(),(e=this.toolbar)==null||e.setState("recording")}pause(){var e;this.recorder.pause(),(e=this.toolbar)==null||e.setState("paused")}resume(){var e;this.recorder.resume(),(e=this.toolbar)==null||e.setState("recording")}async stop(){var n,o,l;this.eventDetector.stop(),this.screenshotMarker.stop();const e=this.screenshotMarker.getMarkers(),t=await this.recorder.stop(e);if((n=this.toolbar)==null||n.setState("stopped"),t)return(o=this.toolbar)==null||o.setResult(t),this.config.autoOpenPlayback!==!1&&t.playbackUrl&&window.open(t.playbackUrl,"_blank"),t;const r=this.recorder.getEvents(),i={recordingId:`rec_${Date.now()}`,playbackUrl:"",duration:this.recorder.getElapsedTime(),eventCount:r.length,screenshotCount:e.length};return(l=this.toolbar)==null||l.setResult(i),i}screenshot(){this.screenshotMarker.capture("manual")}restart(){var e;this.eventDetector.destroy(),this.recorder.reset(),this.screenshotMarker.reset(),(e=this.toolbar)==null||e.reset()}getState(){return this.recorder.getState()}getElapsedTime(){return this.recorder.getElapsedTime()}destroy(){var e;this.eventDetector.destroy(),this.recorder.reset(),this.screenshotMarker.reset(),(e=this.toolbar)==null||e.unmount(),this.isInitialized=!1}handleStateChange(e){var t;(t=this.toolbar)==null||t.setState(e)}}const nd="_bw_record",od="_bw_invite";function ad(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(nd)}function ld(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(od)}function ud(s){if(Ls.isCompleted()){console.log("[BWorlds LaunchKit] Invite already completed");return}console.log("[BWorlds LaunchKit] Showing invite dialog for:",s);const e=new Ls(s);e.onComplete(()=>{console.log("[BWorlds LaunchKit] Invite flow completed")}),e.mount(),typeof window<"u"&&(window.__bwInviteDialog=e)}function cd(s){const t=new URLSearchParams(window.location.search).get("_bw_api")||"http://localhost:3941";console.log("[BWorlds Recorder] Initializing with endpoint:",t);const r=new fi({apiKey:s,apiEndpoint:t,onComplete:i=>{console.log("[BWorlds Recorder] Recording complete:",i.playbackUrl)},onError:i=>{console.error("[BWorlds Recorder] Error:",i)}});r.init(),typeof window<"u"&&(window.__bwRecorder=r)}function hd(){typeof window>"u"||(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>On()):On())}function On(){const s=ad(),e=ld();e&&ud(e),s&&cd(s)}exports.DemoRecorder=fi;exports.InviteDialogController=Ls;exports.default=fi;exports.init=hd;
|
|
441
441
|
//# sourceMappingURL=launchkit.cjs.map
|