@bugdump/sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +154 -0
- package/dist/index.cjs +517 -0
- package/dist/index.d.cts +270 -0
- package/dist/index.d.ts +270 -0
- package/dist/index.global.js +576 -0
- package/dist/index.js +517 -0
- package/package.json +58 -0
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
var Bugdump=(function(exports){'use strict';var dl="https://api.bugdump.io";function ki(n){return {projectKey:n.projectKey,endpoint:(n.endpoint||dl).replace(/\/+$/,"")}}function zr(){return {initialized:false,config:null,user:null,customContext:{},widgetOpen:false}}var It=class{endpoint;apiKey;constructor(e,t){this.endpoint=e,this.apiKey=t;}async submitReport(e){return this.post("/api/widget/v1/reports",e)}async requestUpload(e){return this.post("/api/widget/v1/reports/upload",e)}async uploadFileToS3(e,t,r){let i=new FormData;for(let[o,l]of Object.entries(t))i.append(o,l);i.append("file",r);let s=await fetch(e,{method:"POST",body:i});if(!s.ok)throw new Ze("S3_UPLOAD_FAILED",s.status)}async post(e,t){let r=`${this.endpoint}${e}`,i=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json","Bugdump-API-Key":this.apiKey},body:JSON.stringify(t)});if(!i.ok){let s;try{s=await i.json();}catch{}throw new Ze(s?.error||`HTTP_${i.status}`,i.status,s?.details)}return await i.json()}},Ze=class extends Error{code;statusCode;details;constructor(e,t,r){super(`Bugdump API error: ${e} (${t})`),this.name="BugdumpApiError",this.code=e,this.statusCode=t,this.details=r;}};var Pi=["log","warn","error","info","debug"],Rt=class{buffer=[];originals=new Map;active=false;start(){if(!this.active){this.active=true;for(let e of Pi)this.originals.set(e,console[e].bind(console)),console[e]=(...t)=>{this.push({level:e,args:this.serializeArgs(t),timestamp:Date.now()}),this.originals.get(e)(...t);};}}stop(){if(this.active){this.active=false;for(let e of Pi){let t=this.originals.get(e);t&&(console[e]=t);}this.originals.clear();}}flush(){let e=[...this.buffer];return this.buffer=[],e}push(e){this.buffer.push(e),this.buffer.length>50&&this.buffer.shift();}serializeArgs(e){return e.map(t=>{if(t==null||typeof t=="string"||typeof t=="number"||typeof t=="boolean")return t;try{return JSON.parse(JSON.stringify(t,this.circularReplacer()))}catch{return String(t)}})}circularReplacer(){let e=new WeakSet;return (t,r)=>{if(typeof r=="object"&&r!==null){if(e.has(r))return "[Circular]";e.add(r);}return r}}};var Et=class{buffer=[];originalFetch=null;originalXhrOpen=null;originalXhrSend=null;active=false;start(){this.active||(this.active=true,this.patchFetch(),this.patchXhr());}stop(){this.active&&(this.active=false,this.restoreFetch(),this.restoreXhr());}flush(){let e=[...this.buffer];return this.buffer=[],e}push(e){this.buffer.push(e),this.buffer.length>30&&this.buffer.shift();}patchFetch(){this.originalFetch=window.fetch;let e=this;window.fetch=async function(t,r){let i=r?.method?.toUpperCase()||"GET",s=typeof t=="string"?t:t instanceof URL?t.href:t.url,o=Date.now(),l=e.extractHeaders(r?.headers);try{let a=await e.originalFetch.call(window,t,r);return e.push({method:i,url:s,status:a.status,statusText:a.statusText,requestHeaders:l,responseHeaders:e.extractHeaders(a.headers),duration:Date.now()-o,startedAt:o,error:null}),a}catch(a){throw e.push({method:i,url:s,status:null,statusText:null,requestHeaders:l,responseHeaders:{},duration:Date.now()-o,startedAt:o,error:a instanceof Error?a.message:String(a)}),a}};}restoreFetch(){this.originalFetch&&(window.fetch=this.originalFetch,this.originalFetch=null);}patchXhr(){this.originalXhrOpen=XMLHttpRequest.prototype.open,this.originalXhrSend=XMLHttpRequest.prototype.send;let e=this;XMLHttpRequest.prototype.open=function(t,r){return this.__bd_method=t.toUpperCase(),this.__bd_url=typeof r=="string"?r:r.href,e.originalXhrOpen.apply(this,arguments)},XMLHttpRequest.prototype.send=function(t){let r=Date.now(),i=this.__bd_method||"GET",s=this.__bd_url||"",o=()=>{e.push({method:i,url:s,status:this.status||null,statusText:this.statusText||null,requestHeaders:{},responseHeaders:e.parseXhrResponseHeaders(this.getAllResponseHeaders()),duration:Date.now()-r,startedAt:r,error:this.status===0?"Network error":null}),this.removeEventListener("loadend",o);};return this.addEventListener("loadend",o),e.originalXhrSend.call(this,t)};}restoreXhr(){this.originalXhrOpen&&(XMLHttpRequest.prototype.open=this.originalXhrOpen,this.originalXhrOpen=null),this.originalXhrSend&&(XMLHttpRequest.prototype.send=this.originalXhrSend,this.originalXhrSend=null);}extractHeaders(e){let t={};if(!e)return t;if(e instanceof Headers)e.forEach((r,i)=>{t[i]=r;});else if(Array.isArray(e))for(let[r,i]of e)t[r]=i;else for(let[r,i]of Object.entries(e))t[r]=i;return t}parseXhrResponseHeaders(e){let t={};if(!e)return t;for(let r of e.trim().split(/[\r\n]+/)){let i=r.indexOf(":");if(i===-1)continue;let s=r.slice(0,i).trim().toLowerCase(),o=r.slice(i+1).trim();t[s]=o;}return t}};var pl=Object.defineProperty,ml=(n,e,t)=>e in n?pl(n,e,{enumerable:true,configurable:true,writable:true,value:t}):n[e]=t,w=(n,e,t)=>ml(n,typeof e!="symbol"?e+"":e,t),Ti,gl=Object.defineProperty,yl=(n,e,t)=>e in n?gl(n,e,{enumerable:true,configurable:true,writable:true,value:t}):n[e]=t,Li=(n,e,t)=>yl(n,typeof e!="symbol"?e+"":e,t),G=(n=>(n[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment",n))(G||{}),Di={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},_i={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ot={},wl=()=>!!globalThis.Zone;function Yn(n){if(Ot[n])return Ot[n];let e=globalThis[n],t=e.prototype,r=n in Di?Di[n]: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]"))})),s=n in _i?_i[n]:void 0,o=!!(s&&s.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!wl())return Ot[n]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let u=a[n].prototype;return document.body.removeChild(l),u?Ot[n]=u:t}catch{return t}}var Wr={};function ge(n,e,t){var r;let i=`${n}.${String(t)}`;if(Wr[i])return Wr[i].call(e);let s=Yn(n),o=(r=Object.getOwnPropertyDescriptor(s,t))==null?void 0:r.get;return o?(Wr[i]=o,o.call(e)):e[t]}var jr={};function Ts(n,e,t){let r=`${n}.${String(t)}`;if(jr[r])return jr[r].bind(e);let s=Yn(n)[t];return typeof s!="function"?e[t]:(jr[r]=s,s.bind(e))}function bl(n){return ge("Node",n,"ownerDocument")}function vl(n){return ge("Node",n,"childNodes")}function Sl(n){return ge("Node",n,"parentNode")}function Cl(n){return ge("Node",n,"parentElement")}function xl(n){return ge("Node",n,"textContent")}function Il(n,e){return Ts("Node",n,"contains")(e)}function Rl(n){return Ts("Node",n,"getRootNode")()}function El(n){return !n||!("host"in n)?null:ge("ShadowRoot",n,"host")}function Ol(n){return n.styleSheets}function Ml(n){return !n||!("shadowRoot"in n)?null:ge("Element",n,"shadowRoot")}function Al(n,e){return ge("Element",n,"querySelector")(e)}function $l(n,e){return ge("Element",n,"querySelectorAll")(e)}function kl(){return Yn("MutationObserver").constructor}function Pl(n,e,t){try{if(!(e in n))return ()=>{};let r=n[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),n[e]=i,()=>{n[e]=r;}}catch{return ()=>{}}}var X={ownerDocument:bl,childNodes:vl,parentNode:Sl,parentElement:Cl,textContent:xl,contains:Il,getRootNode:Rl,host:El,styleSheets:Ol,shadowRoot:Ml,querySelector:Al,querySelectorAll:$l,mutationObserver:kl,patch:Pl};function Ls(n){return n.nodeType===n.ELEMENT_NODE}function tt(n){let e=n&&"host"in n&&"mode"in n&&X.host(n)||null;return !!(e&&"shadowRoot"in e&&X.shadowRoot(e)===n)}function rt(n){return Object.prototype.toString.call(n)==="[object ShadowRoot]"}function Tl(n){return n.includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}function Ll(n){let{cssText:e}=n;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(n.href)})`];return n.layerName===""?t.push("layer"):n.layerName&&t.push(`layer(${n.layerName})`),n.supportsText&&t.push(`supports(${n.supportsText})`),n.media.length&&t.push(n.media.mediaText),t.join(" ")+";"}function nn(n){try{let e=n.rules||n.cssRules;if(!e)return null;let t=n.href;!t&&n.ownerNode&&(t=n.ownerNode.baseURI);let r=Array.from(e,i=>Ds(i,t)).join("");return Tl(r)}catch{return null}}function Ds(n,e){if(_l(n)){let t;try{t=nn(n.styleSheet)||Ll(n);}catch{t=n.cssText;}return n.styleSheet.href?sr(t,n.styleSheet.href):t}else {let t=n.cssText;return Nl(n)&&n.selectorText.includes(":")&&(t=Dl(t)),e?sr(t,e):t}}function Dl(n){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return n.replace(e,"$1\\$2")}function _l(n){return "styleSheet"in n}function Nl(n){return "selectorText"in n}var rr=class{constructor(){Li(this,"idNodeMap",new Map),Li(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){let 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){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t);}replace(e,t){let r=this.getNode(e);if(r){let 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 Bl(){return new rr}function nr({element:n,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:s}){let o=i||"",l=r&&xe(r);return (e[t.toLowerCase()]||l&&e[l])&&(s?o=s(o,n):o="*".repeat(o.length)),o}function xe(n){return n.toLowerCase()}var Ni="__rrweb_original__";function Fl(n){let e=n.getContext("2d");if(!e)return true;let t=50;for(let r=0;r<n.width;r+=t)for(let i=0;i<n.height;i+=t){let s=e.getImageData,o=Ni in s?s[Ni]:s;if(new Uint32Array(o.call(e,r,i,Math.min(t,n.width-r),Math.min(t,n.height-i)).data.buffer).some(a=>a!==0))return false}return true}function ir(n){let e=n.type;return n.hasAttribute("data-rr-is-password")?"password":e?xe(e):null}function _s(n,e){let t;try{t=new URL(n,e??window.location.href);}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return i?.[1]??null}function Ul(n){let e="";return n.indexOf("//")>-1?e=n.split("/").slice(0,3).join("/"):e=n.split("/")[0],e=e.split("?")[0],e}var Hl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,zl=/^(?:[a-z+]+:)?\/\//i,Wl=/^www\..*/i,jl=/^(data:)([^,]*),(.*)/i;function sr(n,e){return (n||"").replace(Hl,(t,r,i,s,o,l)=>{let a=i||o||l,u=r||s||"";if(!a)return t;if(zl.test(a)||Wl.test(a))return `url(${u}${a}${u})`;if(jl.test(a))return `url(${u}${a}${u})`;if(a[0]==="/")return `url(${u}${Ul(e)+a}${u})`;let c=e.split("/"),h=a.split("/");c.pop();for(let p of h)p!=="."&&(p===".."?c.pop():c.push(p));return `url(${u}${c.join("/")}${u})`})}function Mt(n,e=false){return e?n.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):n.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Vl(n,e,t=false){let r=Array.from(e.childNodes),i=[],s=0;if(r.length>1&&n&&typeof n=="string"){let o=Mt(n,t),l=o.length/n.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){let u=Mt(r[a].textContent,t),c=100,h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let p=u.substring(0,h),g=o.split(p),m=-1;if(g.length===2)m=g[0].length;else if(g.length>2&&g[0]===""&&r[a-1].textContent!=="")m=o.indexOf(p,1);else if(g.length===1){if(p=p.substring(0,p.length-1),g=o.split(p),g.length<=1)return i.push(n),i;h=c+1;}else h===u.length-1&&(m=o.indexOf(p));if(g.length>=2&&h>c){let d=r[a-1].textContent;if(d&&typeof d=="string"){let f=Mt(d).length;m=o.indexOf(p,f);}m===-1&&(m=g[0].length);}if(m!==-1){let d=Math.floor(m/l);for(;d>0&&d<n.length;){if(s+=1,s>50*r.length)return i.push(n),i;let f=Mt(n.substring(0,d),t);if(f.length===m){i.push(n.substring(0,d)),n=n.substring(d),o=o.substring(m);break}else f.length<m?d+=Math.max(1,Math.floor((m-f.length)/l)):d-=Math.max(1,Math.floor((f.length-m)*l));}break}}}}return i.push(n),i}function Gl(n,e){return Vl(n,e).join("/* rr_split */")}var Yl=1,Xl=new RegExp("[^a-z0-9-_:]"),it=-2;function Ns(){return Yl++}function Zl(n){if(n instanceof HTMLFormElement)return "form";let e=xe(n.tagName);return Xl.test(e)?"div":e}var Oe,Bi,Jl=/^[^ \t\n\r\u000c]+/,ql=/^[, \t\n\r\u000c]+/;function Kl(n,e){if(e.trim()==="")return e;let t=0;function r(s){let o,l=s.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}let i=[];for(;r(ql),!(t>=e.length);){let s=r(Jl);if(s.slice(-1)===",")s=$e(n,s.substring(0,s.length-1)),i.push(s);else {let o="";s=$e(n,s);let l=false;for(;;){let a=e.charAt(t);if(a===""){i.push((s+o).trim());break}else if(l)a===")"&&(l=false);else if(a===","){t+=1,i.push((s+o).trim());break}else a==="("&&(l=true);o+=a,t+=1;}}}return i.join(", ")}var Fi=new WeakMap;function $e(n,e){return !e||e.trim()===""?e:Xn(n,e)}function Ql(n){return !!(n.tagName==="svg"||n.ownerSVGElement)}function Xn(n,e){let t=Fi.get(n);if(t||(t=n.createElement("a"),Fi.set(n,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Bs(n,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(n,r):t==="srcset"?Kl(n,r):t==="style"?sr(r,Xn(n)):e==="object"&&t==="data"?$e(n,r):r)}function Fs(n,e,t){return ["video","audio"].includes(n)&&e==="autoplay"}function eu(n,e,t){try{if(typeof e=="string"){if(n.classList.contains(e))return !0}else for(let r=n.classList.length;r--;){let i=n.classList[r];if(e.test(i))return !0}if(t)return n.matches(t)}catch{}return false}function or(n,e,t){if(!n)return false;if(n.nodeType!==n.ELEMENT_NODE)return t?or(X.parentNode(n),e,t):false;for(let r=n.classList.length;r--;){let i=n.classList[r];if(e.test(i))return true}return t?or(X.parentNode(n),e,t):false}function Us(n,e,t,r){let i;if(Ls(n)){if(i=n,!X.childNodes(i).length)return false}else {if(X.parentElement(n)===null)return false;i=X.parentElement(n);}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return !0}else if(i.classList.contains(e))return !0}else if(or(i,e,r))return !0;if(t){if(r){if(i.closest(t))return !0}else if(i.matches(t))return !0}}catch{}return false}function tu(n,e,t){let r=n.contentWindow;if(!r)return;let i=false,s;try{s=r.document.readyState;}catch{return}if(s!=="complete"){let l=setTimeout(()=>{i||(e(),i=true);},t);n.addEventListener("load",()=>{clearTimeout(l),i=true,e();});return}let o="about:blank";if(r.location.href!==o||n.src===o||n.src==="")return setTimeout(e,0),n.addEventListener("load",e);n.addEventListener("load",e);}function ru(n,e,t){let r=false,i;try{i=n.sheet;}catch{return}if(i)return;let s=setTimeout(()=>{r||(e(),r=true);},t);n.addEventListener("load",()=>{clearTimeout(s),r=true,e();});}function nu(n,e){let{doc:t,mirror:r,blockClass:i,blockSelector:s,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:p,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:d=false,cssCaptured:f=false}=e,b=iu(t,r);switch(n.nodeType){case n.DOCUMENT_NODE:return n.compatMode!=="CSS1Compat"?{type:G.Document,childNodes:[],compatMode:n.compatMode}:{type:G.Document,childNodes:[]};case n.DOCUMENT_TYPE_NODE:return {type:G.DocumentType,name:n.name,publicId:n.publicId,systemId:n.systemId,rootId:b};case n.ELEMENT_NODE:return ou(n,{doc:t,blockClass:i,blockSelector:s,inlineStylesheet:l,maskInputOptions:a,maskInputFn:c,dataURLOptions:h,inlineImages:p,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:d,rootId:b});case n.TEXT_NODE:return su(n,{doc:t,needsMask:o,maskTextFn:u,rootId:b,cssCaptured:f});case n.CDATA_SECTION_NODE:return {type:G.CDATA,textContent:"",rootId:b};case n.COMMENT_NODE:return {type:G.Comment,textContent:X.textContent(n)||"",rootId:b};default:return false}}function iu(n,e){if(!e.hasNode(n))return;let t=e.getId(n);return t===1?void 0:t}function su(n,e){let{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:s}=e,o=X.parentNode(n),l=o&&o.tagName,a="",u=l==="STYLE"?true:void 0,c=l==="SCRIPT"?true:void 0;return c?a="SCRIPT_PLACEHOLDER":s||(a=X.textContent(n),u&&a&&(a=sr(a,Xn(e.doc)))),!u&&!c&&a&&t&&(a=r?r(a,X.parentElement(n)):a.replace(/[\S]/g,"*")),{type:G.Text,textContent:a||"",rootId:i}}function ou(n,e){let{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:s,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:p=false,rootId:g}=e,m=eu(n,r,i),d=Zl(n),f={},b=n.attributes.length;for(let y=0;y<b;y++){let C=n.attributes[y];Fs(d,C.name,C.value)||(f[C.name]=Bs(t,d,xe(C.name),C.value));}if(d==="link"&&s){let y=Array.from(t.styleSheets).find(k=>k.href===n.href),C=null;y&&(C=nn(y)),C&&(delete f.rel,delete f.href,f._cssText=C);}if(d==="style"&&n.sheet){let y=nn(n.sheet);y&&(n.childNodes.length>1&&(y=Gl(y,n)),f._cssText=y);}if(["input","textarea","select"].includes(d)){let y=n.value,C=n.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=nr({element:n,type:ir(n),tagName:d,value:y,maskInputOptions:o,maskInputFn:l}):C&&(f.checked=C);}if(d==="option"&&(n.selected&&!o.select?f.selected=true:delete f.selected),d==="dialog"&&n.open&&(f.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&c){if(n.__context==="2d")Fl(n)||(f.rr_dataURL=n.toDataURL(a.type,a.quality));else if(!("__context"in n)){let y=n.toDataURL(a.type,a.quality),C=t.createElement("canvas");C.width=n.width,C.height=n.height;let k=C.toDataURL(a.type,a.quality);y!==k&&(f.rr_dataURL=y);}}if(d==="img"&&u){Oe||(Oe=t.createElement("canvas"),Bi=Oe.getContext("2d"));let y=n,C=y.currentSrc||y.getAttribute("src")||"<unknown-src>",k=y.crossOrigin,T=()=>{y.removeEventListener("load",T);try{Oe.width=y.naturalWidth,Oe.height=y.naturalHeight,Bi.drawImage(y,0,0),f.rr_dataURL=Oe.toDataURL(a.type,a.quality);}catch(j){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?T():y.addEventListener("load",T);return}else console.warn(`Cannot inline img src=${C}! Error: ${j}`);}y.crossOrigin==="anonymous"&&(k?f.crossOrigin=k:y.removeAttribute("crossorigin"));};y.complete&&y.naturalWidth!==0?T():y.addEventListener("load",T);}if(["audio","video"].includes(d)){let y=f;y.rr_mediaState=n.paused?"paused":"played",y.rr_mediaCurrentTime=n.currentTime,y.rr_mediaPlaybackRate=n.playbackRate,y.rr_mediaMuted=n.muted,y.rr_mediaLoop=n.loop,y.rr_mediaVolume=n.volume;}if(p||(n.scrollLeft&&(f.rr_scrollLeft=n.scrollLeft),n.scrollTop&&(f.rr_scrollTop=n.scrollTop)),m){let{width:y,height:C}=n.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${C}px`};}d==="iframe"&&!h(f.src)&&(n.contentDocument||(f.rr_src=f.src),delete f.src);let v;try{customElements.get(d)&&(v=!0);}catch{}return {type:G.Element,tagName:d,attributes:f,childNodes:[],isSVG:Ql(n)||void 0,needBlock:m,rootId:g,isCustom:v}}function L(n){return n==null?"":n.toLowerCase()}function Hs(n){return n===true||n==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaVerification:true,headMetaAuthorship:n==="all",headMetaDescKeywords:n==="all",headTitleMutations:n==="all"}:n||{}}function au(n,e){if(e.comment&&n.type===G.Comment)return true;if(n.type===G.Element){if(e.script&&(n.tagName==="script"||n.tagName==="link"&&(n.attributes.rel==="preload"&&n.attributes.as==="script"||n.attributes.rel==="modulepreload")||n.tagName==="link"&&n.attributes.rel==="prefetch"&&typeof n.attributes.href=="string"&&_s(n.attributes.href)==="js"))return true;if(e.headFavicon&&(n.tagName==="link"&&n.attributes.rel==="shortcut icon"||n.tagName==="meta"&&(L(n.attributes.name).match(/^msapplication-tile(image|color)$/)||L(n.attributes.name)==="application-name"||L(n.attributes.rel)==="icon"||L(n.attributes.rel)==="apple-touch-icon"||L(n.attributes.rel)==="shortcut icon")))return true;if(n.tagName==="meta"){if(e.headMetaDescKeywords&&L(n.attributes.name).match(/^description|keywords$/))return true;if(e.headMetaSocial&&(L(n.attributes.property).match(/^(og|twitter|fb):/)||L(n.attributes.name).match(/^(og|twitter):/)||L(n.attributes.name)==="pinterest"))return true;if(e.headMetaRobots&&(L(n.attributes.name)==="robots"||L(n.attributes.name)==="googlebot"||L(n.attributes.name)==="bingbot"))return true;if(e.headMetaHttpEquiv&&n.attributes["http-equiv"]!==void 0)return true;if(e.headMetaAuthorship&&(L(n.attributes.name)==="author"||L(n.attributes.name)==="generator"||L(n.attributes.name)==="framework"||L(n.attributes.name)==="publisher"||L(n.attributes.name)==="progid"||L(n.attributes.property).match(/^article:/)||L(n.attributes.property).match(/^product:/)))return true;if(e.headMetaVerification&&(L(n.attributes.name)==="google-site-verification"||L(n.attributes.name)==="yandex-verification"||L(n.attributes.name)==="csrf-token"||L(n.attributes.name)==="p:domain_verify"||L(n.attributes.name)==="verify-v1"||L(n.attributes.name)==="verification"||L(n.attributes.name)==="shopify-checkout-api-token"))return true}}return false}function ke(n,e){let{doc:t,mirror:r,blockClass:i,blockSelector:s,maskTextClass:o,maskTextSelector:l,skipChild:a=false,inlineStylesheet:u=true,maskInputOptions:c={},maskTextFn:h,maskInputFn:p,slimDOMOptions:g,dataURLOptions:m={},inlineImages:d=false,recordCanvas:f=false,onSerialize:b,onIframeLoad:v,iframeLoadTimeout:y=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:T=()=>false,newlyAddedElement:j=false,cssCaptured:N=false}=e,{needsMask:W}=e,{preserveWhiteSpace:Y=true}=e;W||(W=Us(n,o,l,W===void 0));let te=nu(n,{doc:t,mirror:r,blockClass:i,blockSelector:s,needsMask:W,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,dataURLOptions:m,inlineImages:d,recordCanvas:f,keepIframeSrcFn:T,newlyAddedElement:j,cssCaptured:N});if(!te)return console.warn(n,"not serialized"),null;let ue;r.hasNode(n)?ue=r.getId(n):au(te,g)||!Y&&te.type===G.Text&&!te.textContent.replace(/^\s+|\s+$/gm,"").length?ue=it:ue=Ns();let O=Object.assign(te,{id:ue});if(r.add(n,O),ue===it)return null;b&&b(n);let Ye=!a;if(O.type===G.Element){Ye=Ye&&!O.needBlock,delete O.needBlock;let V=X.shadowRoot(n);V&&rt(V)&&(O.isShadowHost=true);}if((O.type===G.Document||O.type===G.Element)&&Ye){g.headWhitespace&&O.type===G.Element&&O.tagName==="head"&&(Y=false);let V={doc:t,mirror:r,blockClass:i,blockSelector:s,needsMask:W,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:g,dataURLOptions:m,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:k,keepIframeSrcFn:T,cssCaptured:false};if(!(O.type===G.Element&&O.tagName==="textarea"&&O.attributes.value!==void 0)){O.type===G.Element&&O.attributes._cssText!==void 0&&typeof O.attributes._cssText=="string"&&(V.cssCaptured=true);for(let be of Array.from(X.childNodes(n))){let ce=ke(be,V);ce&&O.childNodes.push(ce);}}let re=null;if(Ls(n)&&(re=X.shadowRoot(n)))for(let be of Array.from(X.childNodes(re))){let ce=ke(be,V);ce&&(rt(re)&&(ce.isShadow=true),O.childNodes.push(ce));}}let Xe=X.parentNode(n);return Xe&&tt(Xe)&&rt(Xe)&&(O.isShadow=true),O.type===G.Element&&O.tagName==="iframe"&&tu(n,()=>{let V=n.contentDocument;if(V&&v){let re=ke(V,{doc:V,mirror:r,blockClass:i,blockSelector:s,needsMask:W,maskTextClass:o,maskTextSelector:l,skipChild:false,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:g,dataURLOptions:m,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:k,keepIframeSrcFn:T});re&&v(n,re);}},y),O.type===G.Element&&O.tagName==="link"&&typeof O.attributes.rel=="string"&&(O.attributes.rel==="stylesheet"||O.attributes.rel==="preload"&&typeof O.attributes.href=="string"&&_s(O.attributes.href)==="css")&&ru(n,()=>{if(C){let V=ke(n,{doc:t,mirror:r,blockClass:i,blockSelector:s,needsMask:W,maskTextClass:o,maskTextSelector:l,skipChild:false,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:g,dataURLOptions:m,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:k,keepIframeSrcFn:T});V&&C(n,V);}},k),O}function lu(n,e){let{mirror:t=new rr,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=true,inlineImages:a=false,recordCanvas:u=false,maskAllInputs:c=false,maskTextFn:h,maskInputFn:p,slimDOM:g=false,dataURLOptions:m,preserveWhiteSpace:d,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:k=()=>false}=e||{},T=c===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:c===false?{password:true}:c,j=Hs(g);return ke(n,{doc:n,mirror:t,blockClass:r,blockSelector:i,maskTextClass:s,maskTextSelector:o,skipChild:false,inlineStylesheet:l,maskInputOptions:T,maskTextFn:h,maskInputFn:p,slimDOMOptions:j,dataURLOptions:m,inlineImages:a,recordCanvas:u,preserveWhiteSpace:d,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:k,newlyAddedElement:false})}function uu(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function cu(n){if(n.__esModule)return n;var e=n.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:true}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:true,get:function(){return n[r]}});}),t}var Zn={exports:{}},D=String,zs=function(){return {isColorSupported:false,reset:D,bold:D,dim:D,italic:D,underline:D,inverse:D,hidden:D,strikethrough:D,black:D,red:D,green:D,yellow:D,blue:D,magenta:D,cyan:D,white:D,gray:D,bgBlack:D,bgRed:D,bgGreen:D,bgYellow:D,bgBlue:D,bgMagenta:D,bgCyan:D,bgWhite:D}};Zn.exports=zs();Zn.exports.createColors=zs;var hu=Zn.exports,fu={},du=Object.freeze(Object.defineProperty({__proto__:null,default:fu},Symbol.toStringTag,{value:"Module"})),oe=cu(du),Ui=hu,Hi=oe,sn=class Ws extends Error{constructor(e,t,r,i,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),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,Ws);}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=Ui.isColorSupported),Hi&&e&&(t=Hi(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),s=Math.min(this.line+2,r.length),o=String(s).length,l,a;if(e){let{bold:u,gray:c,red:h}=Ui.createColors(true);l=p=>u(h(p)),a=p=>c(p);}else l=a=u=>u;return r.slice(i,s).map((u,c)=>{let h=i+1+c,p=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let g=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
|
|
2
|
+
`+g+l("^")}return " "+a(p)+u}).join(`
|
|
3
|
+
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
4
|
+
|
|
5
|
+
`+e+`
|
|
6
|
+
`),this.name+": "+this.message+e}},Jn=sn;sn.default=sn;var pt={};pt.isClean=Symbol("isClean");pt.my=Symbol("my");var zi={after:`
|
|
7
|
+
`,beforeClose:`
|
|
8
|
+
`,beforeComment:`
|
|
9
|
+
`,beforeDecl:`
|
|
10
|
+
`,beforeOpen:" ",beforeRule:`
|
|
11
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function pu(n){return n[0].toUpperCase()+n.slice(1)}var on=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 s=(e.raws.between||"")+(t?";":"");this.builder(r+i+s,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,s=0;for(;i&&i.type!=="root";)s+=1,i=i.parent;if(r.includes(`
|
|
12
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<s;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 s=e.nodes[i],o=this.raw(s,"before");o&&this.builder(o),this.stringify(s,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 s=e.parent;if(r==="before"&&(!s||s.type==="root"&&s.first===e||s&&s.type==="document"))return "";if(!s)return zi[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"+pu(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i<"u")return false});}return typeof i>"u"&&(i=zi[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
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),false}),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
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),false}),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
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),false}),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 false}),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
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),false}),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,""),false}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return false}),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 s=r.raws.before.split(`
|
|
17
|
+
`);return t=s[s.length-1],t=t.replace(/\S/g,""),false}}),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 false}),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);}},js=on;on.default=on;var mu=js;function an(n,e){new mu(e).stringify(n);}var br=an;an.default=an;var{isClean:At,my:gu}=pt,yu=Jn,wu=js,bu=br;function ln(n,e){let t=new n.constructor;for(let r in n){if(!Object.prototype.hasOwnProperty.call(n,r)||r==="proxyCache")continue;let i=n[r],s=typeof i;r==="parent"&&s==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>ln(o,t)):(s==="object"&&i!==null&&(i=ln(i)),t[r]=i);}return t}var un=class{constructor(e={}){this.raws={},this[At]=false,this[gu]=true;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=ln(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 yu(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()),true}}}markDirty(){if(this[At]){this[At]=false;let e=this;for(;e=e.parent;)e[At]=false;}}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,s=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
|
|
18
|
+
`?(i=1,s+=1):i+=1;return {column:i,line:s}}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(),s=i.indexOf(e.word);s!==-1&&(t=this.positionInside(s,i),r=this.positionInside(s+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 wu().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=false;for(let i of e)i===this?r=true: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 s=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=s,t.set(l.input,s),s++),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=bu){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r;}),t}warn(e,t,r){let i={node:this};for(let s in r)i[s]=r[s];return e.warn(t,i)}get proxyOf(){return this}},vr=un;un.default=un;var vu=vr,cn=class extends vu{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]==="$"}},Sr=cn;cn.default=cn;var Su="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",xu=(n=21)=>{let e="",t=n;for(;t--;)e+=Su[Math.random()*64|0];return e},Iu={nanoid:xu},{SourceMapConsumer:Wi,SourceMapGenerator:ji}=oe,{existsSync:Ru,readFileSync:Eu}=oe,{dirname:Vr,join:Ou}=oe;function Mu(n){return Buffer?Buffer.from(n,"base64").toString():window.atob(n)}var hn=class{constructor(e,t){if(t.map===false)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=Vr(this.mapFile)),i&&(this.text=i);}consumer(){return this.consumerCache||(this.consumerCache=new Wi(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,/,s=/^data:application\/json,/;if(i.test(e)||s.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Mu(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?false:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let 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=Vr(e),Ru(e))return this.mapFile=e,Eu(e,"utf-8").toString().trim()}loadMap(e,t){if(t===false)return false;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let 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 Wi)return ji.fromSourceMap(t).toString();if(t instanceof ji)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=Ou(Vr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Vs=hn;hn.default=hn;var{SourceMapConsumer:Au,SourceMapGenerator:$u}=oe,{fileURLToPath:Vi,pathToFileURL:$t}=oe,{isAbsolute:fn,resolve:dn}=oe,{nanoid:ku}=Iu,Gr=oe,Gi=Jn,Pu=Vs,Yr=Symbol("fromOffsetCache"),Tu=!!(Au&&$u),Yi=!!(dn&&fn),ar=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]==="\uFFFE"?(this.hasBOM=true,this.css=this.css.slice(1)):this.hasBOM=false,t.from&&(!Yi||/^\w+:\/\//.test(t.from)||fn(t.from)?this.file=t.from:this.file=dn(t.from)),Yi&&Tu){let r=new Pu(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 "+ku(6)+">"),this.map&&(this.map.file=this.from);}error(e,t,r,i={}){let s,o,l;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col;}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,l=h.col;}else o=c.line,l=c.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?s=new Gi(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):s=new Gi(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,i.plugin),s.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&($t&&(s.input.url=$t(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,r;if(this[Yr])r=this[Yr];else {let s=this.css.split(`
|
|
19
|
+
`);r=new Array(s.length);let o=0;for(let l=0,a=s.length;l<a;l++)r[l]=o,o+=s[l].length+1;this[Yr]=r;}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else {let s=r.length-2,o;for(;i<s;)if(o=i+(s-i>>1),e<r[o])s=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:dn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return false;let s=this.map.consumer(),o=s.originalPositionFor({column:t,line:e});if(!o.source)return false;let l;typeof r=="number"&&(l=s.originalPositionFor({column:i,line:r}));let a;fn(o.source)?a=$t(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||$t(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 c=s.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of ["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},Cr=ar;ar.default=ar;Gr&&Gr.registerInput&&Gr.registerInput(ar);var{SourceMapConsumer:Gs,SourceMapGenerator:Jt}=oe,{dirname:qt,relative:Ys,resolve:Xs,sep:Zs}=oe,{pathToFileURL:Xi}=oe,Lu=Cr,Du=!!(Gs&&Jt),_u=!!(qt&&Xs&&Ys&&Zs),Nu=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
|
+
`;this.css.includes(`\r
|
|
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||qt(e.file),i;this.mapOpts.sourcesContent===false?(i=new Gs(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!==false)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t);}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""));}generate(){if(this.clearAnnotation(),_u&&Du&&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=Jt.fromSourceMap(e,{ignoreInvalidMapping:true});}else this.map=new Jt({file:this.outputFile(),ignoreInvalidMapping:true}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Jt({file:this.outputFile(),ignoreInvalidMapping:true});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,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))),s=l.match(/\n/g),s?(e+=s.length,o=l.lastIndexOf(`
|
|
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()?true:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):true}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==true?false:this.previous().length?this.previous().some(t=>t.inline):true}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()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?qt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=qt(Xs(r,this.mapOpts.annotation)));let i=Ys(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t);}});else {let e=new 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]=true;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(Xi){let r=Xi(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;Zs==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Js=Nu,Bu=vr,pn=class extends Bu{constructor(e){super(e),this.type="comment";}},xr=pn;pn.default=pn;var{isClean:qs,my:Ks}=pt,Qs=Sr,eo=xr,Fu=vr,to,qn,Kn,ro;function no(n){return n.map(e=>(e.nodes&&(e.nodes=no(e.nodes)),delete e.source,e))}function io(n){if(n[qs]=false,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)io(e);}var pe=class so extends Fu{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!==false);)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"?(s,o)=>i(s.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...s)=>r(i.toProxy(),...s)):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()),true}}}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 s;for(let o in this.indexes)s=this.indexes[o],r<s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":false,s=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of s)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+s.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=no(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 Qs(e)];}else if(e.selector)e=[new qn(e)];else if(e.name)e=[new Kn(e)];else if(e.text)e=[new eo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Ks]||so.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[qs]&&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(s){throw t.addToError(s)}return i!==false&&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]}};pe.registerParse=n=>{to=n;};pe.registerRule=n=>{qn=n;};pe.registerAtRule=n=>{Kn=n;};pe.registerRoot=n=>{ro=n;};var Ie=pe;pe.default=pe;pe.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,Kn.prototype):n.type==="rule"?Object.setPrototypeOf(n,qn.prototype):n.type==="decl"?Object.setPrototypeOf(n,Qs.prototype):n.type==="comment"?Object.setPrototypeOf(n,eo.prototype):n.type==="root"&&Object.setPrototypeOf(n,ro.prototype),n[Ks]=true,n.nodes&&n.nodes.forEach(e=>{pe.rebuild(e);});};var Uu=Ie,oo,ao,st=class extends Uu{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[]);}toResult(e={}){return new oo(new ao,this,e).stringify()}};st.registerLazyResult=n=>{oo=n;};st.registerProcessor=n=>{ao=n;};var Qn=st;st.default=st;var Zi={},lo=function(e){Zi[e]||(Zi[e]=true,typeof console<"u"&&console.warn&&console.warn(e));},mn=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}},uo=mn;mn.default=mn;var Hu=uo,gn=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 Hu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},ei=gn;gn.default=gn;var Xr=39,Ji=34,kt=92,qi=47,Pt=10,Je=32,Tt=12,Lt=9,Dt=13,zu=91,Wu=93,ju=40,Vu=41,Gu=123,Yu=125,Xu=59,Zu=42,Ju=58,qu=64,_t=/[\t\n\f\r "#'()/;[\\\]{}]/g,Nt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ku=/.[\r\n"'(/\\]/,Ki=/[\da-f]/i,Qu=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,s,o,l,a,u,c,h,p,g,m,d=r.length,f=0,b=[],v=[];function y(){return f}function C(N){throw e.error("Unclosed "+N,f)}function k(){return v.length===0&&f>=d}function T(N){if(v.length)return v.pop();if(f>=d)return;let W=N?N.ignoreUnclosed:false;switch(s=r.charCodeAt(f),s){case Pt:case Je:case Lt:case Dt:case Tt:{o=f;do o+=1,s=r.charCodeAt(o);while(s===Je||s===Pt||s===Lt||s===Dt||s===Tt);m=["space",r.slice(f,o)],f=o-1;break}case zu:case Wu:case Gu:case Yu:case Ju:case Xu:case Vu:{let Y=String.fromCharCode(s);m=[Y,Y,f];break}case ju:{if(p=b.length?b.pop()[1]:"",g=r.charCodeAt(f+1),p==="url"&&g!==Xr&&g!==Ji&&g!==Je&&g!==Pt&&g!==Lt&&g!==Tt&&g!==Dt){o=f;do{if(c=false,o=r.indexOf(")",o+1),o===-1)if(i||W){o=f;break}else C("bracket");for(h=o;r.charCodeAt(h-1)===kt;)h-=1,c=!c;}while(c);m=["brackets",r.slice(f,o+1),f,o],f=o;}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||Ku.test(a)?m=["(","(",f]:(m=["brackets",a,f,o],f=o);break}case Xr:case Ji:{l=s===Xr?"'":'"',o=f;do{if(c=false,o=r.indexOf(l,o+1),o===-1)if(i||W){o=f+1;break}else C("string");for(h=o;r.charCodeAt(h-1)===kt;)h-=1,c=!c;}while(c);m=["string",r.slice(f,o+1),f,o],f=o;break}case qu:{_t.lastIndex=f+1,_t.test(r),_t.lastIndex===0?o=r.length-1:o=_t.lastIndex-2,m=["at-word",r.slice(f,o+1),f,o],f=o;break}case kt:{for(o=f,u=true;r.charCodeAt(o+1)===kt;)o+=1,u=!u;if(s=r.charCodeAt(o+1),u&&s!==qi&&s!==Je&&s!==Pt&&s!==Lt&&s!==Dt&&s!==Tt&&(o+=1,Ki.test(r.charAt(o)))){for(;Ki.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Je&&(o+=1);}m=["word",r.slice(f,o+1),f,o],f=o;break}default:{s===qi&&r.charCodeAt(f+1)===Zu?(o=r.indexOf("*/",f+2)+1,o===0&&(i||W?o=r.length:C("comment")),m=["comment",r.slice(f,o+1),f,o],f=o):(Nt.lastIndex=f+1,Nt.test(r),Nt.lastIndex===0?o=r.length-1:o=Nt.lastIndex-2,m=["word",r.slice(f,o+1),f,o],b.push(m),f=o);break}}return f++,m}function j(N){v.push(N);}return {back:j,endOfFile:k,nextToken:T,position:y}},co=Ie,lr=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)}},ti=lr;lr.default=lr;co.registerAtRule(lr);var ho=Ie,fo,po,Te=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 s of i)s.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()}};Te.registerLazyResult=n=>{fo=n;};Te.registerProcessor=n=>{po=n;};var mt=Te;Te.default=Te;ho.registerRoot(Te);var ot={comma(n){return ot.split(n,[","],true)},space(n){let e=[" ",`
|
|
24
|
+
`," "];return ot.split(n,e)},split(n,e,t){let r=[],i="",s=false,o=0,l=false,a="",u=false;for(let c of n)u?u=false:c==="\\"?u=true:l?c===a&&(l=false):c==='"'||c==="'"?(l=true,a=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(s=true),s?(i!==""&&r.push(i.trim()),i="",s=false):i+=c;return (t||i!=="")&&r.push(i.trim()),r}},mo=ot;ot.default=ot;var go=Ie,ec=mo,ur=class extends go{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return ec.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);}},ri=ur;ur.default=ur;go.registerRule(ur);var tc=Sr,rc=Qu,nc=xr,ic=ti,sc=mt,Qi=ri,es={empty:true,space:true};function oc(n){for(let e=n.length-1;e>=0;e--){let t=n[e],r=t[3]||t[2];if(r)return r}}var ac=class{constructor(e){this.input=e,this.root=new sc,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}};}atrule(e){let t=new ic;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,s,o=false,l=false,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=true;break}else if(r==="{"){l=true;break}else if(r==="}"){if(a.length>0){for(s=a.length-1,i=a[s];i&&i[0]==="space";)i=a[--s];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=true;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t);}checkMissedSemicolon(e){let t=this.colon(e);if(t===false)return;let r=0,i;for(let s=t-1;s>=0&&(i=e[s],!(i[0]!=="space"&&(r+=1,r===2)));s--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,s;for(let[o,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!s)this.doubleColon(r);else {if(s[0]==="word"&&s[1]==="progid")continue;return o}s=r;}return false}comment(e){let t=new nc;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=rc(this.input);}decl(e,t){let r=new tc;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=true,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||oc(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 s;for(;e.length;)if(s=e.shift(),s[0]===":"){r.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[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(s=e[u],s[1].toLowerCase()==="!important"){r.important=true;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(s[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let p=u;p>0;p--){let g=c[p][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h;}h.trim().indexOf("!")===0&&(r.important=true,r.raws.important=h,e=c);}if(s[0]!=="space"&&s[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 Qi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t;}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e);}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position());}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="");}}getPosition(e){let t=this.input.fromOffset(e);return {column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=false);}other(e){let t=false,r=null,i=false,s=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")s||(s=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")s||(s=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=true;break}else r===":"&&(i=true);else r===o[o.length-1]&&(o.pop(),o.length===0&&(s=null));u=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(t=true),o.length>0&&this.unclosedBracket(s),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 s,o,l=r.length,a="",u=true,c,h;for(let p=0;p<l;p+=1)s=r[p],o=s[0],o==="space"&&p===l-1&&!i?u=false:o==="comment"?(h=r[p-1]?r[p-1][0]:"empty",c=r[p+1]?r[p+1][0]:"empty",!es[h]&&!es[c]?a.slice(-1)===","?u=false:a+=s[1]:u=false):a+=s[1];if(!u){let p=r.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:p,value:a};}e[t]=a;}rule(e){e.pop();let t=new Qi;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})}},lc=ac,uc=Ie,cc=lc,hc=Cr;function cr(n,e){let t=new hc(n,e),r=new cc(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
|
+
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
|
+
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 ni=cr;cr.default=cr;uc.registerParse(cr);var{isClean:he,my:fc}=pt,dc=Js,pc=br,mc=Ie,gc=Qn,yc=lo,ts=ei,wc=ni,bc=mt,vc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Sc={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},Cc={Once:true,postcssPlugin:true,prepare:true},Le=0;function qe(n){return typeof n=="object"&&typeof n.then=="function"}function yo(n){let e=false,t=vc[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,Le,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,Le,t+"Exit"]:[t,t+"Exit"]}function rs(n){let e;return n.type==="document"?e=["Document",Le,"DocumentExit"]:n.type==="root"?e=["Root",Le,"RootExit"]:e=yo(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}function yn(n){return n[he]=false,n.nodes&&n.nodes.forEach(e=>yn(e)),n}var wn={},De=class wo{constructor(e,t,r){this.stringified=false,this.processed=false;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=yn(t);else if(t instanceof wo||t instanceof ts)i=yn(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=false),r.map.prev=t.map);else {let s=wc;r.syntax&&(s=r.syntax.parse),r.parser&&(s=r.parser),s.parse&&(s=s.parse);try{i=s(t,r);}catch(o){this.processed=true,this.error=o;}i&&!i[fc]&&mc.rebuild(i);}this.result=new ts(e,i,r),this.helpers={...wn,postcss:wn,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s);}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,s=r.postcssVersion,o=this.result.processor.version,l=s.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 "+s+". 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(!Sc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Cc[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(qe(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]=true;let t=[rs(e)];for(;t.length>0;){let r=this.visitTick(t);if(qe(r))try{await r;}catch(i){let s=t[t.length-1].node;throw this.handleError(i,s)}}}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(s=>r(s,this.helpers));await Promise.all(i);}else await r(e,this.helpers);}catch(i){throw this.handleError(i)}}}return this.processed=true,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return qe(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let e=this.result.opts,t=pc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new dc(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=true,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(qe(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[he];)e[he]=true,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e);}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||yc("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 s;try{s=i(t,this.helpers);}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return true;if(qe(s))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]=true,e.push(rs(l));return}t.iterator=0,delete r.indexes[o];}let s=t.events;for(;t.eventIndex<s.length;){let o=s[t.eventIndex];if(t.eventIndex+=1,o===Le){r.nodes&&r.nodes.length&&(r[he]=true,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop();}walkSync(e){e[he]=true;let t=yo(e);for(let r of t)if(r===Le)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=n=>{wn=n;};var bo=De;De.default=De;bc.registerLazyResult(De);gc.registerLazyResult(De);var xc=Js,Ic=br,Rc=lo,Ec=ni,Oc=ei,bn=class{constructor(e,t,r){t=t.toString(),this.stringified=false,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,s=Ic;this.result=new Oc(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new xc(s,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||Rc("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"}},Mc=bn;bn.default=bn;var Ac=Mc,$c=bo,kc=Qn,Pc=mt,at=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===true?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 Ac(this,e,t):new $c(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Tc=at;at.default=at;Pc.registerProcessor(at);kc.registerProcessor(at);var Lc=Sr,Dc=Vs,_c=xr,Nc=ti,Bc=Cr,Fc=mt,Uc=ri;function lt(n,e){if(Array.isArray(n))return n.map(i=>lt(i));let{inputs:t,...r}=n;if(t){e=[];for(let i of t){let s={...i,__proto__:Bc.prototype};s.map&&(s.map={...s.map,__proto__:Dc.prototype}),e.push(s);}}if(r.nodes&&(r.nodes=n.nodes.map(i=>lt(i,e))),r.source){let{inputId:i,...s}=r.source;r.source=s,i!=null&&(r.source.input=e[i]);}if(r.type==="root")return new Fc(r);if(r.type==="decl")return new Lc(r);if(r.type==="rule")return new Uc(r);if(r.type==="comment")return new _c(r);if(r.type==="atrule")return new Nc(r);throw new Error("Unknown node type: "+n.type)}var Hc=lt;lt.default=lt;var zc=Jn,vo=Sr,Wc=bo,jc=Ie,ii=Tc,Vc=br,Gc=Hc,So=Qn,Yc=uo,Co=xr,xo=ti,Xc=ei,Zc=Cr,Jc=ni,qc=mo,Io=ri,Ro=mt,Kc=vr;function A(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new ii(n)}A.plugin=function(e,t){let r=false;function i(...o){console&&console.warn&&!r&&(r=true,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
28
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
29
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new ii().version,l}let s;return Object.defineProperty(i,"postcss",{get(){return s||(s=i()),s}}),i.process=function(o,l,a){return A([i(a)]).process(o,l)},i};A.stringify=Vc;A.parse=Jc;A.fromJSON=Gc;A.list=qc;A.comment=n=>new Co(n);A.atRule=n=>new xo(n);A.decl=n=>new vo(n);A.rule=n=>new Io(n);A.root=n=>new Ro(n);A.document=n=>new So(n);A.CssSyntaxError=zc;A.Declaration=vo;A.Container=jc;A.Processor=ii;A.Document=So;A.Comment=Co;A.Warning=Yc;A.AtRule=xo;A.Result=Xc;A.Input=Zc;A.Rule=Io;A.Root=Ro;A.Node=Kc;Wc.registerPostcss(A);var Qc=A;A.default=A;var B=uu(Qc);B.stringify;B.fromJSON;B.plugin;B.parse;B.list;B.document;B.comment;B.atRule;B.rule;B.decl;B.root;B.CssSyntaxError;B.Declaration;B.Container;B.Processor;B.Document;B.Comment;B.Warning;B.AtRule;B.Result;B.Input;B.Rule;B.Root;B.Node;var eh=Object.defineProperty,th=(n,e,t)=>e in n?eh(n,e,{enumerable:true,configurable:true,writable:true,value:t}):n[e]=t,ne=(n,e,t)=>th(n,typeof e!="symbol"?e+"":e,t);function rh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function nh(n){if(n.__esModule)return n;var e=n.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:true}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:true,get:function(){return n[r]}});}),t}var si={exports:{}},_=String,Eo=function(){return {isColorSupported:false,reset:_,bold:_,dim:_,italic:_,underline:_,inverse:_,hidden:_,strikethrough:_,black:_,red:_,green:_,yellow:_,blue:_,magenta:_,cyan:_,white:_,gray:_,bgBlack:_,bgRed:_,bgGreen:_,bgYellow:_,bgBlue:_,bgMagenta:_,bgCyan:_,bgWhite:_}};si.exports=Eo();si.exports.createColors=Eo;var ih=si.exports,sh={},oh=Object.freeze(Object.defineProperty({__proto__:null,default:sh},Symbol.toStringTag,{value:"Module"})),ae=nh(oh),ns=ih,is=ae,vn=class Oo extends Error{constructor(e,t,r,i,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),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,Oo);}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=ns.isColorSupported),is&&e&&(t=is(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),s=Math.min(this.line+2,r.length),o=String(s).length,l,a;if(e){let{bold:u,gray:c,red:h}=ns.createColors(true);l=p=>u(h(p)),a=p=>c(p);}else l=a=u=>u;return r.slice(i,s).map((u,c)=>{let h=i+1+c,p=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let g=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
|
|
30
|
+
`+g+l("^")}return " "+a(p)+u}).join(`
|
|
31
|
+
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
32
|
+
|
|
33
|
+
`+e+`
|
|
34
|
+
`),this.name+": "+this.message+e}},oi=vn;vn.default=vn;var gt={};gt.isClean=Symbol("isClean");gt.my=Symbol("my");var ss={after:`
|
|
35
|
+
`,beforeClose:`
|
|
36
|
+
`,beforeComment:`
|
|
37
|
+
`,beforeDecl:`
|
|
38
|
+
`,beforeOpen:" ",beforeRule:`
|
|
39
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function ah(n){return n[0].toUpperCase()+n.slice(1)}var Sn=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 s=(e.raws.between||"")+(t?";":"");this.builder(r+i+s,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,s=0;for(;i&&i.type!=="root";)s+=1,i=i.parent;if(r.includes(`
|
|
40
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<s;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 s=e.nodes[i],o=this.raw(s,"before");o&&this.builder(o),this.stringify(s,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 s=e.parent;if(r==="before"&&(!s||s.type==="root"&&s.first===e||s&&s.type==="document"))return "";if(!s)return ss[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"+ah(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i<"u")return false});}return typeof i>"u"&&(i=ss[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
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),false}),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
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),false}),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
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),false}),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 false}),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
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),false}),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,""),false}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return false}),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 s=r.raws.before.split(`
|
|
45
|
+
`);return t=s[s.length-1],t=t.replace(/\S/g,""),false}}),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 false}),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);}},Mo=Sn;Sn.default=Sn;var lh=Mo;function Cn(n,e){new lh(e).stringify(n);}var Ir=Cn;Cn.default=Cn;var{isClean:Bt,my:uh}=gt,ch=oi,hh=Mo,fh=Ir;function xn(n,e){let t=new n.constructor;for(let r in n){if(!Object.prototype.hasOwnProperty.call(n,r)||r==="proxyCache")continue;let i=n[r],s=typeof i;r==="parent"&&s==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>xn(o,t)):(s==="object"&&i!==null&&(i=xn(i)),t[r]=i);}return t}var In=class{constructor(e={}){this.raws={},this[Bt]=false,this[uh]=true;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=xn(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 ch(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()),true}}}markDirty(){if(this[Bt]){this[Bt]=false;let e=this;for(;e=e.parent;)e[Bt]=false;}}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,s=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
|
|
46
|
+
`?(i=1,s+=1):i+=1;return {column:i,line:s}}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(),s=i.indexOf(e.word);s!==-1&&(t=this.positionInside(s,i),r=this.positionInside(s+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 hh().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=false;for(let i of e)i===this?r=true: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 s=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=s,t.set(l.input,s),s++),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=fh){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r;}),t}warn(e,t,r){let i={node:this};for(let s in r)i[s]=r[s];return e.warn(t,i)}get proxyOf(){return this}},Rr=In;In.default=In;var dh=Rr,Rn=class extends dh{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]==="$"}},Er=Rn;Rn.default=Rn;var ph="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",gh=(n=21)=>{let e="",t=n;for(;t--;)e+=ph[Math.random()*64|0];return e},yh={nanoid:gh},{SourceMapConsumer:os,SourceMapGenerator:as}=ae,{existsSync:wh,readFileSync:bh}=ae,{dirname:Zr,join:vh}=ae;function Sh(n){return Buffer?Buffer.from(n,"base64").toString():window.atob(n)}var En=class{constructor(e,t){if(t.map===false)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=Zr(this.mapFile)),i&&(this.text=i);}consumer(){return this.consumerCache||(this.consumerCache=new os(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,/,s=/^data:application\/json,/;if(i.test(e)||s.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Sh(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?false:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let 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=Zr(e),wh(e))return this.mapFile=e,bh(e,"utf-8").toString().trim()}loadMap(e,t){if(t===false)return false;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let 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 os)return as.fromSourceMap(t).toString();if(t instanceof as)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=vh(Zr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Ao=En;En.default=En;var{SourceMapConsumer:Ch,SourceMapGenerator:xh}=ae,{fileURLToPath:ls,pathToFileURL:Ft}=ae,{isAbsolute:On,resolve:Mn}=ae,{nanoid:Ih}=yh,Jr=ae,us=oi,Rh=Ao,qr=Symbol("fromOffsetCache"),Eh=!!(Ch&&xh),cs=!!(Mn&&On),hr=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]==="\uFFFE"?(this.hasBOM=true,this.css=this.css.slice(1)):this.hasBOM=false,t.from&&(!cs||/^\w+:\/\//.test(t.from)||On(t.from)?this.file=t.from:this.file=Mn(t.from)),cs&&Eh){let r=new Rh(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 "+Ih(6)+">"),this.map&&(this.map.file=this.from);}error(e,t,r,i={}){let s,o,l;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col;}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,l=h.col;}else o=c.line,l=c.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?s=new us(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):s=new us(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,i.plugin),s.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Ft&&(s.input.url=Ft(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,r;if(this[qr])r=this[qr];else {let s=this.css.split(`
|
|
47
|
+
`);r=new Array(s.length);let o=0;for(let l=0,a=s.length;l<a;l++)r[l]=o,o+=s[l].length+1;this[qr]=r;}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else {let s=r.length-2,o;for(;i<s;)if(o=i+(s-i>>1),e<r[o])s=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:Mn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return false;let s=this.map.consumer(),o=s.originalPositionFor({column:t,line:e});if(!o.source)return false;let l;typeof r=="number"&&(l=s.originalPositionFor({column:i,line:r}));let a;On(o.source)?a=Ft(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Ft(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(ls)u.file=ls(a);else throw new Error("file: protocol is not available in this PostCSS build");let c=s.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of ["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},Or=hr;hr.default=hr;Jr&&Jr.registerInput&&Jr.registerInput(hr);var{SourceMapConsumer:$o,SourceMapGenerator:Kt}=ae,{dirname:Qt,relative:ko,resolve:Po,sep:To}=ae,{pathToFileURL:hs}=ae,Oh=Or,Mh=!!($o&&Kt),Ah=!!(Qt&&Po&&ko&&To),$h=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
|
+
`;this.css.includes(`\r
|
|
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||Qt(e.file),i;this.mapOpts.sourcesContent===false?(i=new $o(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!==false)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t);}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""));}generate(){if(this.clearAnnotation(),Ah&&Mh&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t;}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Kt.fromSourceMap(e,{ignoreInvalidMapping:true});}else this.map=new Kt({file:this.outputFile(),ignoreInvalidMapping:true}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Kt({file:this.outputFile(),ignoreInvalidMapping:true});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,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))),s=l.match(/\n/g),s?(e+=s.length,o=l.lastIndexOf(`
|
|
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()?true:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):true}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==true?false:this.previous().length?this.previous().some(t=>t.inline):true}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()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Qt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Qt(Po(r,this.mapOpts.annotation)));let i=ko(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 Oh(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]=true;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(hs){let r=hs(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;To==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Lo=$h,kh=Rr,An=class extends kh{constructor(e){super(e),this.type="comment";}},Mr=An;An.default=An;var{isClean:Do,my:_o}=gt,No=Er,Bo=Mr,Ph=Rr,Fo,ai,li,Uo;function Ho(n){return n.map(e=>(e.nodes&&(e.nodes=Ho(e.nodes)),delete e.source,e))}function zo(n){if(n[Do]=false,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)zo(e);}var me=class Wo extends Ph{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!==false);)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"?(s,o)=>i(s.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...s)=>r(i.toProxy(),...s)):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()),true}}}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 s;for(let o in this.indexes)s=this.indexes[o],r<s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":false,s=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of s)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+s.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Ho(Fo(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 No(e)];}else if(e.selector)e=[new ai(e)];else if(e.name)e=[new li(e)];else if(e.text)e=[new Bo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[_o]||Wo.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Do]&&zo(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(s){throw t.addToError(s)}return i!==false&&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=n=>{Fo=n;};me.registerRule=n=>{ai=n;};me.registerAtRule=n=>{li=n;};me.registerRoot=n=>{Uo=n;};var Re=me;me.default=me;me.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,li.prototype):n.type==="rule"?Object.setPrototypeOf(n,ai.prototype):n.type==="decl"?Object.setPrototypeOf(n,No.prototype):n.type==="comment"?Object.setPrototypeOf(n,Bo.prototype):n.type==="root"&&Object.setPrototypeOf(n,Uo.prototype),n[_o]=true,n.nodes&&n.nodes.forEach(e=>{me.rebuild(e);});};var Th=Re,jo,Vo,ut=class extends Th{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[]);}toResult(e={}){return new jo(new Vo,this,e).stringify()}};ut.registerLazyResult=n=>{jo=n;};ut.registerProcessor=n=>{Vo=n;};var ui=ut;ut.default=ut;var fs={},Go=function(e){fs[e]||(fs[e]=true,typeof console<"u"&&console.warn&&console.warn(e));},$n=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}},Yo=$n;$n.default=$n;var Lh=Yo,kn=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 Lh(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},ci=kn;kn.default=kn;var Kr=39,ds=34,Ut=92,ps=47,Ht=10,Ke=32,zt=12,Wt=9,jt=13,Dh=91,_h=93,Nh=40,Bh=41,Fh=123,Uh=125,Hh=59,zh=42,Wh=58,jh=64,Vt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Gt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Vh=/.[\r\n"'(/\\]/,ms=/[\da-f]/i,Gh=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,s,o,l,a,u,c,h,p,g,m,d=r.length,f=0,b=[],v=[];function y(){return f}function C(N){throw e.error("Unclosed "+N,f)}function k(){return v.length===0&&f>=d}function T(N){if(v.length)return v.pop();if(f>=d)return;let W=N?N.ignoreUnclosed:false;switch(s=r.charCodeAt(f),s){case Ht:case Ke:case Wt:case jt:case zt:{o=f;do o+=1,s=r.charCodeAt(o);while(s===Ke||s===Ht||s===Wt||s===jt||s===zt);m=["space",r.slice(f,o)],f=o-1;break}case Dh:case _h:case Fh:case Uh:case Wh:case Hh:case Bh:{let Y=String.fromCharCode(s);m=[Y,Y,f];break}case Nh:{if(p=b.length?b.pop()[1]:"",g=r.charCodeAt(f+1),p==="url"&&g!==Kr&&g!==ds&&g!==Ke&&g!==Ht&&g!==Wt&&g!==zt&&g!==jt){o=f;do{if(c=false,o=r.indexOf(")",o+1),o===-1)if(i||W){o=f;break}else C("bracket");for(h=o;r.charCodeAt(h-1)===Ut;)h-=1,c=!c;}while(c);m=["brackets",r.slice(f,o+1),f,o],f=o;}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||Vh.test(a)?m=["(","(",f]:(m=["brackets",a,f,o],f=o);break}case Kr:case ds:{l=s===Kr?"'":'"',o=f;do{if(c=false,o=r.indexOf(l,o+1),o===-1)if(i||W){o=f+1;break}else C("string");for(h=o;r.charCodeAt(h-1)===Ut;)h-=1,c=!c;}while(c);m=["string",r.slice(f,o+1),f,o],f=o;break}case jh:{Vt.lastIndex=f+1,Vt.test(r),Vt.lastIndex===0?o=r.length-1:o=Vt.lastIndex-2,m=["at-word",r.slice(f,o+1),f,o],f=o;break}case Ut:{for(o=f,u=true;r.charCodeAt(o+1)===Ut;)o+=1,u=!u;if(s=r.charCodeAt(o+1),u&&s!==ps&&s!==Ke&&s!==Ht&&s!==Wt&&s!==jt&&s!==zt&&(o+=1,ms.test(r.charAt(o)))){for(;ms.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ke&&(o+=1);}m=["word",r.slice(f,o+1),f,o],f=o;break}default:{s===ps&&r.charCodeAt(f+1)===zh?(o=r.indexOf("*/",f+2)+1,o===0&&(i||W?o=r.length:C("comment")),m=["comment",r.slice(f,o+1),f,o],f=o):(Gt.lastIndex=f+1,Gt.test(r),Gt.lastIndex===0?o=r.length-1:o=Gt.lastIndex-2,m=["word",r.slice(f,o+1),f,o],b.push(m),f=o);break}}return f++,m}function j(N){v.push(N);}return {back:j,endOfFile:k,nextToken:T,position:y}},Xo=Re,fr=class extends Xo{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)}},hi=fr;fr.default=fr;Xo.registerAtRule(fr);var Zo=Re,Jo,qo,_e=class extends Zo{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 s of i)s.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 Jo(new qo,this,e).stringify()}};_e.registerLazyResult=n=>{Jo=n;};_e.registerProcessor=n=>{qo=n;};var yt=_e;_e.default=_e;Zo.registerRoot(_e);var ct={comma(n){return ct.split(n,[","],true)},space(n){let e=[" ",`
|
|
52
|
+
`," "];return ct.split(n,e)},split(n,e,t){let r=[],i="",s=false,o=0,l=false,a="",u=false;for(let c of n)u?u=false:c==="\\"?u=true:l?c===a&&(l=false):c==='"'||c==="'"?(l=true,a=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(s=true),s?(i!==""&&r.push(i.trim()),i="",s=false):i+=c;return (t||i!=="")&&r.push(i.trim()),r}},Ko=ct;ct.default=ct;var Qo=Re,Yh=Ko,dr=class extends Qo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return Yh.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);}},fi=dr;dr.default=dr;Qo.registerRule(dr);var Xh=Er,Zh=Gh,Jh=Mr,qh=hi,Kh=yt,gs=fi,ys={empty:true,space:true};function Qh(n){for(let e=n.length-1;e>=0;e--){let t=n[e],r=t[3]||t[2];if(r)return r}}var ef=class{constructor(e){this.input=e,this.root=new Kh,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}};}atrule(e){let t=new qh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,s,o=false,l=false,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=true;break}else if(r==="{"){l=true;break}else if(r==="}"){if(a.length>0){for(s=a.length-1,i=a[s];i&&i[0]==="space";)i=a[--s];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=true;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t);}checkMissedSemicolon(e){let t=this.colon(e);if(t===false)return;let r=0,i;for(let s=t-1;s>=0&&(i=e[s],!(i[0]!=="space"&&(r+=1,r===2)));s--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,s;for(let[o,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!s)this.doubleColon(r);else {if(s[0]==="word"&&s[1]==="progid")continue;return o}s=r;}return false}comment(e){let t=new Jh;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=Zh(this.input);}decl(e,t){let r=new Xh;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=true,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Qh(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 s;for(;e.length;)if(s=e.shift(),s[0]===":"){r.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[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(s=e[u],s[1].toLowerCase()==="!important"){r.important=true;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(s[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let p=u;p>0;p--){let g=c[p][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h;}h.trim().indexOf("!")===0&&(r.important=true,r.raws.important=h,e=c);}if(s[0]!=="space"&&s[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 gs;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t;}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e);}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position());}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="");}}getPosition(e){let t=this.input.fromOffset(e);return {column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=false);}other(e){let t=false,r=null,i=false,s=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")s||(s=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")s||(s=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=true;break}else r===":"&&(i=true);else r===o[o.length-1]&&(o.pop(),o.length===0&&(s=null));u=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(t=true),o.length>0&&this.unclosedBracket(s),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 s,o,l=r.length,a="",u=true,c,h;for(let p=0;p<l;p+=1)s=r[p],o=s[0],o==="space"&&p===l-1&&!i?u=false:o==="comment"?(h=r[p-1]?r[p-1][0]:"empty",c=r[p+1]?r[p+1][0]:"empty",!ys[h]&&!ys[c]?a.slice(-1)===","?u=false:a+=s[1]:u=false):a+=s[1];if(!u){let p=r.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:p,value:a};}e[t]=a;}rule(e){e.pop();let t=new gs;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})}},tf=ef,rf=Re,nf=tf,sf=Or;function pr(n,e){let t=new sf(n,e),r=new nf(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
|
+
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
|
+
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 di=pr;pr.default=pr;rf.registerParse(pr);var{isClean:fe,my:of}=gt,af=Lo,lf=Ir,uf=Re,cf=ui,hf=Go,ws=ci,ff=di,df=yt,pf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},mf={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},gf={Once:true,postcssPlugin:true,prepare:true},Ne=0;function Qe(n){return typeof n=="object"&&typeof n.then=="function"}function ea(n){let e=false,t=pf[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,Ne,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,Ne,t+"Exit"]:[t,t+"Exit"]}function bs(n){let e;return n.type==="document"?e=["Document",Ne,"DocumentExit"]:n.type==="root"?e=["Root",Ne,"RootExit"]:e=ea(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}function Pn(n){return n[fe]=false,n.nodes&&n.nodes.forEach(e=>Pn(e)),n}var Tn={},Be=class ta{constructor(e,t,r){this.stringified=false,this.processed=false;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Pn(t);else if(t instanceof ta||t instanceof ws)i=Pn(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=false),r.map.prev=t.map);else {let s=ff;r.syntax&&(s=r.syntax.parse),r.parser&&(s=r.parser),s.parse&&(s=s.parse);try{i=s(t,r);}catch(o){this.processed=true,this.error=o;}i&&!i[of]&&uf.rebuild(i);}this.result=new ws(e,i,r),this.helpers={...Tn,postcss:Tn,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s);}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,s=r.postcssVersion,o=this.result.processor.version,l=s.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 "+s+". 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(!mf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!gf[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(Qe(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]=true;let t=[bs(e)];for(;t.length>0;){let r=this.visitTick(t);if(Qe(r))try{await r;}catch(i){let s=t[t.length-1].node;throw this.handleError(i,s)}}}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(s=>r(s,this.helpers));await Promise.all(i);}else await r(e,this.helpers);}catch(i){throw this.handleError(i)}}}return this.processed=true,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Qe(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let e=this.result.opts,t=lf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new af(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=true,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Qe(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];)e[fe]=true,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e);}return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this.opts||hf("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 s;try{s=i(t,this.helpers);}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return true;if(Qe(s))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]=true,e.push(bs(l));return}t.iterator=0,delete r.indexes[o];}let s=t.events;for(;t.eventIndex<s.length;){let o=s[t.eventIndex];if(t.eventIndex+=1,o===Ne){r.nodes&&r.nodes.length&&(r[fe]=true,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop();}walkSync(e){e[fe]=true;let t=ea(e);for(let r of t)if(r===Ne)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=n=>{Tn=n;};var ra=Be;Be.default=Be;df.registerLazyResult(Be);cf.registerLazyResult(Be);var yf=Lo,wf=Ir,bf=Go,vf=di,Sf=ci,Ln=class{constructor(e,t,r){t=t.toString(),this.stringified=false,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,s=wf;this.result=new Sf(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new yf(s,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||bf("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=vf;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"}},Cf=Ln;Ln.default=Ln;var xf=Cf,If=ra,Rf=ui,Ef=yt,ht=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===true?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 xf(this,e,t):new If(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Of=ht;ht.default=ht;Ef.registerProcessor(ht);Rf.registerProcessor(ht);var Mf=Er,Af=Ao,$f=Mr,kf=hi,Pf=Or,Tf=yt,Lf=fi;function ft(n,e){if(Array.isArray(n))return n.map(i=>ft(i));let{inputs:t,...r}=n;if(t){e=[];for(let i of t){let s={...i,__proto__:Pf.prototype};s.map&&(s.map={...s.map,__proto__:Af.prototype}),e.push(s);}}if(r.nodes&&(r.nodes=n.nodes.map(i=>ft(i,e))),r.source){let{inputId:i,...s}=r.source;r.source=s,i!=null&&(r.source.input=e[i]);}if(r.type==="root")return new Tf(r);if(r.type==="decl")return new Mf(r);if(r.type==="rule")return new Lf(r);if(r.type==="comment")return new $f(r);if(r.type==="atrule")return new kf(r);throw new Error("Unknown node type: "+n.type)}var Df=ft;ft.default=ft;var _f=oi,na=Er,Nf=ra,Bf=Re,pi=Of,Ff=Ir,Uf=Df,ia=ui,Hf=Yo,sa=Mr,oa=hi,zf=ci,Wf=Or,jf=di,Vf=Ko,aa=fi,la=yt,Gf=Rr;function $(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new pi(n)}$.plugin=function(e,t){let r=false;function i(...o){console&&console.warn&&!r&&(r=true,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
56
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
57
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new pi().version,l}let s;return Object.defineProperty(i,"postcss",{get(){return s||(s=i()),s}}),i.process=function(o,l,a){return $([i(a)]).process(o,l)},i};$.stringify=Ff;$.parse=jf;$.fromJSON=Uf;$.list=Vf;$.comment=n=>new sa(n);$.atRule=n=>new oa(n);$.decl=n=>new na(n);$.rule=n=>new aa(n);$.root=n=>new la(n);$.document=n=>new ia(n);$.CssSyntaxError=_f;$.Declaration=na;$.Container=Bf;$.Processor=pi;$.Document=ia;$.Comment=sa;$.Warning=Hf;$.AtRule=oa;$.Result=zf;$.Input=Wf;$.Rule=aa;$.Root=la;$.Node=Gf;Nf.registerPostcss($);var Yf=$;$.default=$;var F=rh(Yf);F.stringify;F.fromJSON;F.plugin;F.parse;F.list;F.document;F.comment;F.atRule;F.rule;F.decl;F.root;F.CssSyntaxError;F.Declaration;F.Container;F.Processor;F.Document;F.Comment;F.Warning;F.AtRule;F.Result;F.Input;F.Rule;F.Root;F.Node;var Dn=class n{constructor(...e){ne(this,"parentElement",null),ne(this,"parentNode",null),ne(this,"ownerDocument"),ne(this,"firstChild",null),ne(this,"lastChild",null),ne(this,"previousSibling",null),ne(this,"nextSibling",null),ne(this,"ELEMENT_NODE",1),ne(this,"TEXT_NODE",3),ne(this,"nodeType"),ne(this,"nodeName"),ne(this,"RRNodeType");}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof n){if(e.ownerDocument!==this.ownerDocument)return false;if(e===this)return true}else return false;for(;e.parentNode;){if(e.parentNode===this)return true;e=e.parentNode;}return false}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return "RRNode"}},vs={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ss={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Yt={},Xf=()=>!!globalThis.Zone;function mi(n){if(Yt[n])return Yt[n];let e=globalThis[n],t=e.prototype,r=n in vs?vs[n]: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]"))})),s=n in Ss?Ss[n]:void 0,o=!!(s&&s.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!Xf())return Yt[n]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let u=a[n].prototype;return document.body.removeChild(l),u?Yt[n]=u:t}catch{return t}}var Qr={};function ye(n,e,t){var r;let i=`${n}.${String(t)}`;if(Qr[i])return Qr[i].call(e);let s=mi(n),o=(r=Object.getOwnPropertyDescriptor(s,t))==null?void 0:r.get;return o?(Qr[i]=o,o.call(e)):e[t]}var en={};function ua(n,e,t){let r=`${n}.${String(t)}`;if(en[r])return en[r].bind(e);let s=mi(n)[t];return typeof s!="function"?e[t]:(en[r]=s,s.bind(e))}function Zf(n){return ye("Node",n,"ownerDocument")}function Jf(n){return ye("Node",n,"childNodes")}function qf(n){return ye("Node",n,"parentNode")}function Kf(n){return ye("Node",n,"parentElement")}function Qf(n){return ye("Node",n,"textContent")}function ed(n,e){return ua("Node",n,"contains")(e)}function td(n){return ua("Node",n,"getRootNode")()}function rd(n){return !n||!("host"in n)?null:ye("ShadowRoot",n,"host")}function nd(n){return n.styleSheets}function id(n){return !n||!("shadowRoot"in n)?null:ye("Element",n,"shadowRoot")}function sd(n,e){return ye("Element",n,"querySelector")(e)}function od(n,e){return ye("Element",n,"querySelectorAll")(e)}function ca(){return mi("MutationObserver").constructor}function Ee(n,e,t){try{if(!(e in n))return ()=>{};let r=n[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),n[e]=i,()=>{n[e]=r;}}catch{return ()=>{}}}var x={ownerDocument:Zf,childNodes:Jf,parentNode:qf,parentElement:Kf,textContent:Qf,contains:ed,getRootNode:td,host:rd,styleSheets:nd,shadowRoot:id,querySelector:sd,querySelectorAll:od,mutationObserver:ca,patch:Ee};function J(n,e,t=document){let r={capture:true,passive:true};return t.addEventListener(n,e,r),()=>t.removeEventListener(n,e,r)}var Me=`Please stop import mirror directly. Instead of that,\r
|
|
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.`,Cs={map:{},getId(){return console.error(Me),-1},getNode(){return console.error(Me),null},removeNodeFromMap(){console.error(Me);},has(){return console.error(Me),false},reset(){console.error(Me);}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Cs=new Proxy(Cs,{get(n,e,t){return e==="map"&&console.error(Me),Reflect.get(n,e,t)}}));function dt(n,e,t={}){let r=null,i=0;return function(...s){let o=Date.now();!i&&t.leading===false&&(i=o);let l=e-(o-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=o,n.apply(a,s)):!r&&t.trailing!==false&&(r=setTimeout(()=>{i=t.leading===false?0:Date.now(),r=null,n.apply(a,s);},l));}}function Ar(n,e,t,r,i=window){let s=i.Object.getOwnPropertyDescriptor(n,e);return i.Object.defineProperty(n,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o);},0),s&&s.set&&s.set.call(this,o);}}),()=>Ar(n,e,s||{},true)}var mr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(mr=()=>new Date().getTime());function ha(n){var e,t,r,i;let s=n.document;return {left:s.scrollingElement?s.scrollingElement.scrollLeft:n.pageXOffset!==void 0?n.pageXOffset:s.documentElement.scrollLeft||s?.body&&((e=x.parentElement(s.body))==null?void 0:e.scrollLeft)||((t=s?.body)==null?void 0:t.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:n.pageYOffset!==void 0?n.pageYOffset:s?.documentElement.scrollTop||s?.body&&((r=x.parentElement(s.body))==null?void 0:r.scrollTop)||((i=s?.body)==null?void 0:i.scrollTop)||0}}function fa(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function da(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function pa(n){return n?n.nodeType===n.ELEMENT_NODE?n:x.parentElement(n):null}function q(n,e,t,r){if(!n)return false;let i=pa(n);if(!i)return false;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return !0}else if(or(i,e,r))return !0}catch{}return !!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function ad(n,e){return e.getId(n)!==-1}function tn(n,e,t){return n.tagName==="TITLE"&&t.headTitleMutations?true:e.getId(n)===it}function ma(n,e){if(tt(n))return false;let t=e.getId(n);if(!e.has(t))return true;let r=x.parentNode(n);return r&&r.nodeType===n.DOCUMENT_NODE?false:r?ma(r,e):true}function _n(n){return !!n.changedTouches}function ld(n=window){"NodeList"in n&&!n.NodeList.prototype.forEach&&(n.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in n&&!n.DOMTokenList.prototype.forEach&&(n.DOMTokenList.prototype.forEach=Array.prototype.forEach);}function ga(n,e){return !!(n.nodeName==="IFRAME"&&e.getMeta(n))}function ya(n,e){return !!(n.nodeName==="LINK"&&n.nodeType===n.ELEMENT_NODE&&n.getAttribute&&n.getAttribute("rel")==="stylesheet"&&e.getMeta(n))}function Nn(n){return n?n instanceof Dn&&"shadowRoot"in n?!!n.shadowRoot:!!x.shadowRoot(n):false}var Bn=class{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(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(n){var e;let t=null;return "getRootNode"in n&&((e=x.getRootNode(n))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&x.host(x.getRootNode(n))&&(t=x.host(x.getRootNode(n))),t}function ud(n){let e=n,t;for(;t=wa(e);)e=t;return e}function cd(n){let e=x.ownerDocument(n);if(!e)return false;let t=ud(n);return x.contains(e,t)}function ba(n){let e=x.ownerDocument(n);return e?x.contains(e,n)||cd(n):false}var E=(n=>(n[n.DomContentLoaded=0]="DomContentLoaded",n[n.Load=1]="Load",n[n.FullSnapshot=2]="FullSnapshot",n[n.IncrementalSnapshot=3]="IncrementalSnapshot",n[n.Meta=4]="Meta",n[n.Custom=5]="Custom",n[n.Plugin=6]="Plugin",n))(E||{}),I=(n=>(n[n.Mutation=0]="Mutation",n[n.MouseMove=1]="MouseMove",n[n.MouseInteraction=2]="MouseInteraction",n[n.Scroll=3]="Scroll",n[n.ViewportResize=4]="ViewportResize",n[n.Input=5]="Input",n[n.TouchMove=6]="TouchMove",n[n.MediaInteraction=7]="MediaInteraction",n[n.StyleSheetRule=8]="StyleSheetRule",n[n.CanvasMutation=9]="CanvasMutation",n[n.Font=10]="Font",n[n.Log=11]="Log",n[n.Drag=12]="Drag",n[n.StyleDeclaration=13]="StyleDeclaration",n[n.Selection=14]="Selection",n[n.AdoptedStyleSheet=15]="AdoptedStyleSheet",n[n.CustomElement=16]="CustomElement",n))(I||{}),K=(n=>(n[n.MouseUp=0]="MouseUp",n[n.MouseDown=1]="MouseDown",n[n.Click=2]="Click",n[n.ContextMenu=3]="ContextMenu",n[n.DblClick=4]="DblClick",n[n.Focus=5]="Focus",n[n.Blur=6]="Blur",n[n.TouchStart=7]="TouchStart",n[n.TouchMove_Departed=8]="TouchMove_Departed",n[n.TouchEnd=9]="TouchEnd",n[n.TouchCancel=10]="TouchCancel",n))(K||{}),de=(n=>(n[n.Mouse=0]="Mouse",n[n.Pen=1]="Pen",n[n.Touch=2]="Touch",n))(de||{}),Fe=(n=>(n[n["2D"]=0]="2D",n[n.WebGL=1]="WebGL",n[n.WebGL2=2]="WebGL2",n))(Fe||{}),Ae=(n=>(n[n.Play=0]="Play",n[n.Pause=1]="Pause",n[n.Seeked=2]="Seeked",n[n.VolumeChange=3]="VolumeChange",n[n.RateChange=4]="RateChange",n))(Ae||{}),va=(n=>(n[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment",n))(va||{});function xs(n){return "__ln"in n}var Fn=class{constructor(){w(this,"length",0),w(this,"head",null),w(this,"tail",null);}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&xs(e.previousSibling)){let 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&&xs(e.nextSibling)&&e.nextSibling.__ln.previous){let 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){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--);}},Is=(n,e)=>`${n}@${e}`,Un=class{constructor(){w(this,"frozen",false),w(this,"locked",false),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit();}),w(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new Fn,i=a=>{let u=a,c=it;for(;c===it;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},s=a=>{let u=x.parentNode(a);if(!u||!ba(a))return;let c=false;if(a.nodeType===Node.TEXT_NODE){let m=u.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(u)&&(c=true);}let h=tt(u)?this.mirror.getId(wa(a)):this.mirror.getId(u),p=i(a);if(h===-1||p===-1)return r.addNode(a);let g=ke(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:true,newlyAddedElement:true,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{ga(m,this.mirror)&&this.iframeManager.addIframe(m),ya(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Nn(a)&&this.shadowDomManager.addShadowRoot(x.shadowRoot(a),this.doc);},onIframeLoad:(m,d)=>{this.iframeManager.attachIframe(m,d),this.shadowDomManager.observeAttachShadow(m);},onStylesheetLoad:(m,d)=>{this.stylesheetManager.attachLinkElement(m,d);},cssCaptured:c});g&&(e.push({parentId:h,nextId:p,node:g}),t.add(g.id));};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)Rs(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(x.parentNode(a))||s(a);for(let a of this.addedSet)!Es(this.droppedSet,a)&&!Rs(this.removesSubTreeCache,a,this.mirror)||Es(this.movedSet,a)?s(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){let u=this.mirror.getId(x.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(a=o);}if(!a){let u=r.tail;for(;u;){let c=u;if(u=u.previous,c){let h=this.mirror.getId(x.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){a=c;break}else {let g=c.value,m=x.parentNode(g);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let d=x.host(m);if(this.mirror.getId(d)!==-1){a=c;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),s(a.value);}let l={texts:this.texts.map(a=>{let u=a.node,c=x.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=>{let{attributes:u}=a;if(typeof u.style=="string"){let 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));}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let r=Array.from(x.childNodes(e),i=>x.textContent(i)||"").join("");t.attributes.value=nr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:ir(e),value:r,maskInputFn:this.maskInputFn});}),w(this,"processMutation",e=>{if(!tn(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case "characterData":{let t=x.textContent(e.target);!q(e.target,this.blockClass,this.blockSelector,false)&&t!==e.oldValue&&this.texts.push({value:Us(e.target,this.maskTextClass,this.maskTextSelector,true)&&t?this.maskTextFn?this.maskTextFn(t,pa(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case "attributes":{let t=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let o=ir(t);i=nr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn});}if(q(e.target,this.blockClass,this.blockSelector,false)||i===e.oldValue)return;let s=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Fs(t.tagName,r))if(s.attributes[r]=Bs(this.doc,xe(t.tagName),xe(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument();}catch{this.unattachedDoc=this.doc;}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let l of Array.from(t.style)){let a=t.style.getPropertyValue(l),u=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||u!==o.style.getPropertyPriority(l)?u===""?s.styleDiff[l]=a:s.styleDiff[l]=[a,u]:s._unchangedStyles[l]=[a,u];}for(let l of Array.from(o.style))t.style.getPropertyValue(l)===""&&(s.styleDiff[l]=false);}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?s.attributes.rr_open_mode="modal":s.attributes.rr_open_mode="non-modal");break}case "childList":{if(q(e.target,this.blockClass,this.blockSelector,true))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),i=tt(e.target)?this.mirror.getId(x.host(e.target)):this.mirror.getId(e.target);q(e.target,this.blockClass,this.blockSelector,false)||tn(t,this.mirror,this.slimDOMOptions)||!ad(t,this.mirror)||(this.addedSet.has(t)?(Hn(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[Is(r,i)]?Hn(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:tt(e.target)&&rt(e.target)?true:void 0}),hd(t,this.removesSubTreeCache))),this.mapRemoves.push(t));});break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(tn(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[Is(this.mirror.getId(e),r)]=true);}else this.addedSet.add(e),this.droppedSet.delete(e);q(e,this.blockClass,this.blockSelector,false)||(x.childNodes(e).forEach(r=>this.genAdds(r)),Nn(e)&&x.childNodes(x.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=true,this.canvasManager.freeze();}unfreeze(){this.frozen=false,this.canvasManager.unfreeze(),this.emit();}isFrozen(){return this.frozen}lock(){this.locked=true,this.canvasManager.lock();}unlock(){this.locked=false,this.canvasManager.unlock(),this.emit();}reset(){this.shadowDomManager.reset(),this.canvasManager.reset();}};function Hn(n,e){n.delete(e),x.childNodes(e).forEach(t=>Hn(n,t));}function hd(n,e){let t=[n];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),x.childNodes(r).forEach(i=>t.push(i)));}}function Rs(n,e,t){return n.size===0?false:fd(n,e)}function fd(n,e,t){let r=x.parentNode(e);return r?n.has(r):false}function Es(n,e){return n.size===0?false:Sa(n,e)}function Sa(n,e){let t=x.parentNode(e);return t?n.has(t)?true:Sa(n,t):false}var nt;function dd(n){nt=n;}function pd(){nt=void 0;}var R=n=>nt?(...t)=>{try{return n(...t)}catch(r){if(nt&&nt(r)===true)return;throw r}}:n,Ce=[];function wt(n){try{if("composedPath"in n){let e=n.composedPath();if(e.length)return e[0]}else if("path"in n&&n.path.length)return n.path[0]}catch{}return n&&n.target}function Ca(n,e){let t=new Un;Ce.push(t),t.init(n);let r=new(ca())(R(t.processMutations.bind(t)));return r.observe(e,{attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true,childList:true,subtree:true}),r}function md({mousemoveCb:n,sampling:e,doc:t,mirror:r}){if(e.mousemove===false)return ()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,s=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],l,a=dt(R(h=>{let p=Date.now()-l;n(o.map(g=>(g.timeOffset-=p,g)),h),o=[],l=null;}),s),u=R(dt(R(h=>{let p=wt(h),{clientX:g,clientY:m}=_n(h)?h.changedTouches[0]:h;l||(l=mr()),o.push({x:g,y:m,id:r.getId(p),timeOffset:mr()-l}),a(typeof DragEvent<"u"&&h instanceof DragEvent?I.Drag:h instanceof MouseEvent?I.MouseMove:I.TouchMove);}),i,{trailing:!1})),c=[J("mousemove",u,t),J("touchmove",u,t),J("drag",u,t)];return R(()=>{c.forEach(h=>h());})}function gd({mouseInteractionCb:n,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:s}){if(s.mouseInteraction===false)return ()=>{};let o=s.mouseInteraction===true||s.mouseInteraction===void 0?{}:s.mouseInteraction,l=[],a=null,u=c=>h=>{let p=wt(h);if(q(p,r,i,true))return;let g=null,m=c;if("pointerType"in h){switch(h.pointerType){case "mouse":g=de.Mouse;break;case "touch":g=de.Touch;break;case "pen":g=de.Pen;break}g===de.Touch?K[c]===K.MouseDown?m="TouchStart":K[c]===K.MouseUp&&(m="TouchEnd"):de.Pen;}else _n(h)&&(g=de.Touch);g!==null?(a=g,(m.startsWith("Touch")&&g===de.Touch||m.startsWith("Mouse")&&g===de.Mouse)&&(g=null)):K[c]===K.Click&&(g=a,a=null);let d=_n(h)?h.changedTouches[0]:h;if(!d)return;let f=t.getId(p),{clientX:b,clientY:v}=d;R(n)({type:K[m],id:f,x:b,y:v,...g!==null&&{pointerType:g}});};return Object.keys(K).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==false).forEach(c=>{let h=xe(c),p=u(c);if(window.PointerEvent)switch(K[c]){case K.MouseDown:case K.MouseUp:h=h.replace("mouse","pointer");break;case K.TouchStart:case K.TouchEnd:return}l.push(J(h,p,e));}),R(()=>{l.forEach(c=>c());})}function xa({scrollCb:n,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:s}){let o=R(dt(R(l=>{let a=wt(l);if(!a||q(a,r,i,!0))return;let u=t.getId(a);if(a===e&&e.defaultView){let c=ha(e.defaultView);n({id:u,x:c.left,y:c.top});}else n({id:u,x:a.scrollLeft,y:a.scrollTop});}),s.scroll||100));return J("scroll",o,e)}function yd({viewportResizeCb:n},{win:e}){let t=-1,r=-1,i=R(dt(R(()=>{let s=fa(),o=da();(t!==s||r!==o)&&(n({width:Number(o),height:Number(s)}),t=s,r=o);}),200));return J("resize",i,e)}var wd=["INPUT","TEXTAREA","SELECT"],Os=new WeakMap;function bd({inputCb:n,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:s,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:c}){function h(v){let y=wt(v),C=v.isTrusted,k=y&&y.tagName;if(y&&k==="OPTION"&&(y=x.parentElement(y)),!y||!k||wd.indexOf(k)<0||q(y,r,i,true)||y.classList.contains(s)||o&&y.matches(o))return;let T=y.value,j=false,N=ir(y)||"";N==="radio"||N==="checkbox"?j=y.checked:(l[k.toLowerCase()]||l[N])&&(T=nr({element:y,maskInputOptions:l,tagName:k,type:N,value:T,maskInputFn:a})),p(y,c?{text:T,isChecked:j,userTriggered:C}:{text:T,isChecked:j});let W=y.name;N==="radio"&&W&&j&&e.querySelectorAll(`input[type="radio"][name="${W}"]`).forEach(Y=>{if(Y!==y){let te=Y.value;p(Y,c?{text:te,isChecked:!j,userTriggered:false}:{text:te,isChecked:!j});}});}function p(v,y){let C=Os.get(v);if(!C||C.text!==y.text||C.isChecked!==y.isChecked){Os.set(v,y);let k=t.getId(v);R(n)({...y,id:k});}}let m=(u.input==="last"?["change"]:["input","change"]).map(v=>J(v,R(h),e)),d=e.defaultView;if(!d)return ()=>{m.forEach(v=>v());};let f=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),b=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&m.push(...b.map(v=>Ar(v[0],v[1],{set(){R(h)({target:this,isTrusted:false});}},false,d))),R(()=>{m.forEach(v=>v());})}function gr(n){let e=[];function t(r,i){if(Xt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Xt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Xt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Xt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o);}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o);}return i}return t(n,e)}function we(n,e,t){let r,i;return n?(n.ownerNode?r=e.getId(n.ownerNode):i=t.getId(n),{styleId:i,id:r}):{}}function vd({styleSheetRuleCb:n,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return ()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:R((c,h,p)=>{let[g,m]=p,{id:d,styleId:f}=we(h,e,t.styleMirror);return (d&&d!==-1||f&&f!==-1)&&n({id:d,styleId:f,adds:[{rule:g,index:m}]}),c.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,p=this.cssRules.length){let g=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[g,p])};let s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:R((c,h,p)=>{let[g]=p,{id:m,styleId:d}=we(h,e,t.styleMirror);return (m&&m!==-1||d&&d!==-1)&&n({id:m,styleId:d,removes:[{index:g}]}),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)=>{let[g]=p,{id:m,styleId:d}=we(h,e,t.styleMirror);return (m&&m!==-1||d&&d!==-1)&&n({id:m,styleId:d,replace:g}),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)=>{let[g]=p,{id:m,styleId:d}=we(h,e,t.styleMirror);return (m&&m!==-1||d&&d!==-1)&&n({id:m,styleId:d,replaceSync:g}),c.apply(h,p)})}));let a={};Zt("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Zt("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Zt("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Zt("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));let 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,g,m)=>{let[d,f]=m,{id:b,styleId:v}=we(g.parentStyleSheet,e,t.styleMirror);return (b&&b!==-1||v&&v!==-1)&&n({id:b,styleId:v,adds:[{rule:d,index:[...gr(g),f||0]}]}),p.apply(g,m)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:R((p,g,m)=>{let[d]=m,{id:f,styleId:b}=we(g.parentStyleSheet,e,t.styleMirror);return (f&&f!==-1||b&&b!==-1)&&n({id:f,styleId:b,removes:[{index:[...gr(g),d]}]}),p.apply(g,m)})});}),R(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=s,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 Ia({mirror:n,stylesheetManager:e},t){var r,i,s;let o=null;t.nodeName==="#document"?o=n.getId(t):o=n.getId(x.host(t));let l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(s=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:s.ShadowRoot,a=l?.prototype?Object.getOwnPropertyDescriptor(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;let 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 Sd({styleDeclarationCb:n,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){let s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:R((l,a,u)=>{var c;let[h,p,g]=u;if(t.has(h))return s.apply(a,[h,p,g]);let{id:m,styleId:d}=we((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return (m&&m!==-1||d&&d!==-1)&&n({id:m,styleId:d,set:{property:h,value:p,priority:g},index:gr(a.parentRule)}),l.apply(a,u)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:R((l,a,u)=>{var c;let[h]=u;if(t.has(h))return o.apply(a,[h]);let{id:p,styleId:g}=we((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return (p&&p!==-1||g&&g!==-1)&&n({id:p,styleId:g,remove:{property:h},index:gr(a.parentRule)}),l.apply(a,u)})}),R(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o;})}function Cd({mediaInteractionCb:n,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:s}){let o=R(a=>dt(R(u=>{let c=wt(u);if(!c||q(c,e,t,!0))return;let{currentTime:h,volume:p,muted:g,playbackRate:m,loop:d}=c;n({type:a,id:r.getId(c),currentTime:h,volume:p,muted:g,playbackRate:m,loop:d});}),i.media||500)),l=[J("play",o(Ae.Play),s),J("pause",o(Ae.Pause),s),J("seeked",o(Ae.Seeked),s),J("volumechange",o(Ae.VolumeChange),s),J("ratechange",o(Ae.RateChange),s)];return R(()=>{l.forEach(a=>a());})}function xd({fontCb:n,doc:e}){let t=e.defaultView;if(!t)return ()=>{};let r=[],i=new WeakMap,s=t.FontFace;t.FontFace=function(a,u,c){let h=new s(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};let o=Ee(e.fonts,"add",function(l){return function(a){return setTimeout(R(()=>{let u=i.get(a);u&&(n(u),i.delete(a));}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=s;}),r.push(o),R(()=>{r.forEach(l=>l());})}function Id(n){let{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:s}=n,o=true,l=R(()=>{let a=e.getSelection();if(!a||o&&a?.isCollapsed)return;o=a.isCollapsed||!1;let u=[],c=a.rangeCount||0;for(let h=0;h<c;h++){let p=a.getRangeAt(h),{startContainer:g,startOffset:m,endContainer:d,endOffset:f}=p;q(g,r,i,!0)||q(d,r,i,!0)||u.push({start:t.getId(g),startOffset:m,end:t.getId(d),endOffset:f});}s({ranges:u});});return l(),J("selectionchange",l)}function Rd({doc:n,customElementCb:e}){let t=n.defaultView;return !t||!t.customElements?()=>{}:Ee(t.customElements,"define",function(i){return function(s,o,l){try{e({define:{name:s}});}catch{console.warn(`Custom element callback failed for ${s}`);}return i.apply(this,[s,o,l])}})}function Ed(n,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:p,selectionCb:g,customElementCb:m}=n;n.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d);},n.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d);},n.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),i(...d);},n.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),s(...d);},n.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),o(...d);},n.inputCb=(...d)=>{e.input&&e.input(...d),l(...d);},n.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),a(...d);},n.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),u(...d);},n.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),c(...d);},n.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d);},n.fontCb=(...d)=>{e.font&&e.font(...d),p(...d);},n.selectionCb=(...d)=>{e.selection&&e.selection(...d),g(...d);},n.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),m(...d);};}function Od(n,e={}){let t=n.doc.defaultView;if(!t)return ()=>{};Ed(n,e);let r;n.recordDOM&&(r=Ca(n,n.doc));let i=md(n),s=gd(n),o=xa(n),l=yd(n,{win:t}),a=bd(n),u=Cd(n),c=()=>{},h=()=>{},p=()=>{},g=()=>{};n.recordDOM&&(c=vd(n,{win:t}),h=Ia(n,n.doc),p=Sd(n,{win:t}),n.collectFonts&&(g=xd(n)));let m=Id(n),d=Rd(n),f=[];for(let b of n.plugins)f.push(b.observer(b.callback,t,b.options));return R(()=>{Ce.forEach(b=>b.reset()),r?.disconnect(),i(),s(),o(),l(),a(),u(),c(),h(),p(),g(),m(),d(),f.forEach(b=>b());})}function Xt(n){return typeof window[n]<"u"}function Zt(n){return !!(typeof window[n]<"u"&&window[n].prototype&&"insertRule"in window[n].prototype&&"deleteRule"in window[n].prototype)}var yr=class{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e;}getId(e,t,r,i){let s=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e),l=s.get(t);return l||(l=this.generateIdFn(),s.set(t,l),o.set(l,t)),l}getIds(e,t){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(s=>this.getId(e,s,r,i))}getRemoteId(e,t,r){let i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let s=i.get(t);return s||-1}getRemoteIds(e,t){let 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}},zn=class{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new yr(Ns)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new yr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this));}addIframe(e){this.iframes.set(e,true),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e);}addLoadListener(e){this.loadListener=e;}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:true}),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){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let s=this.transformCrossOriginEvent(i,t.data.event);s&&this.wrappedEmit(s,t.data.isCheckout);}transformCrossOriginEvent(e,t){var r;switch(t.type){case E.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:E.IncrementalSnapshot,data:{source:I.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:true}}}case E.Meta:case E.Load:case E.DomContentLoaded:return false;case E.Plugin:return t;case E.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case E.IncrementalSnapshot:switch(t.data.source){case I.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let s=this.crossOriginIframeRootIdMap.get(e);s&&this.patchRootIdOnNode(i.node,s);}),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 I.Drag:case I.TouchMove:case I.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"]);}),t;case I.ViewportResize:return false;case I.MediaInteraction:case I.MouseInteraction:case I.Scroll:case I.CanvasMutation:case I.Input:return this.replaceIds(t.data,e,["id"]),t;case I.StyleSheetRule:case I.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case I.Font:return t;case I.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"]);}),t;case I.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 false}replace(e,t,r,i){for(let s of i)!Array.isArray(t[s])&&typeof t[s]!="number"||(Array.isArray(t[s])?t[s]=e.getIds(r,t[s]):t[s]=e.getId(r,t[s]));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);});}},Wn=class{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init();}init(){this.reset(),this.patchAttachShadow(Element,document);}addShadowRoot(e,t){if(!rt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=Ca({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(xa({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(x.host(e))),this.restoreHandlers.push(Ia({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e));},0);}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument);}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(Ee(e.prototype,"attachShadow",function(i){return function(s){let o=i.call(this,s),l=x.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;}},Pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Md=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(et=0;et<Pe.length;et++)Md[Pe.charCodeAt(et)]=et;var et,Ad=function(n){var e=new Uint8Array(n),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Pe[e[t]>>2],i+=Pe[(e[t]&3)<<4|e[t+1]>>4],i+=Pe[(e[t+1]&15)<<2|e[t+2]>>6],i+=Pe[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},Ms=new Map;function $d(n,e){let t=Ms.get(n);return t||(t=new Map,Ms.set(n,t)),t.has(e)||t.set(e,[]),t.get(e)}var Ra=(n,e,t)=>{if(!n||!(Oa(n,e)||typeof n=="object"))return;let r=n.constructor.name,i=$d(t,r),s=i.indexOf(n);return s===-1&&(s=i.length,i.push(n)),s};function er(n,e,t){if(n instanceof Array)return n.map(r=>er(r,e,t));if(n===null)return n;if(n instanceof Float32Array||n instanceof Float64Array||n instanceof Int32Array||n instanceof Uint32Array||n instanceof Uint8Array||n instanceof Uint16Array||n instanceof Int16Array||n instanceof Int8Array||n instanceof Uint8ClampedArray)return {rr_type:n.constructor.name,args:[Object.values(n)]};if(n instanceof ArrayBuffer){let r=n.constructor.name,i=Ad(n);return {rr_type:r,base64:i}}else {if(n instanceof DataView)return {rr_type:n.constructor.name,args:[er(n.buffer,e,t),n.byteOffset,n.byteLength]};if(n instanceof HTMLImageElement){let r=n.constructor.name,{src:i}=n;return {rr_type:r,src:i}}else if(n instanceof HTMLCanvasElement){let r="HTMLImageElement",i=n.toDataURL();return {rr_type:r,src:i}}else {if(n instanceof ImageData)return {rr_type:n.constructor.name,args:[er(n.data,e,t),n.width,n.height]};if(Oa(n,e)||typeof n=="object"){let r=n.constructor.name,i=Ra(n,e,t);return {rr_type:r,index:i}}}}return n}var Ea=(n,e,t)=>n.map(r=>er(r,e,t)),Oa=(n,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>n instanceof e[i]);function kd(n,e,t,r){let i=[],s=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of s)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let l=Ee(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...u){return q(this.canvas,t,r,!0)||setTimeout(()=>{let c=Ea(u,e,this);n(this.canvas,{type:Fe["2D"],property:o,args:c});},0),a.apply(this,u)}});i.push(l);}catch{let l=Ar(e.CanvasRenderingContext2D.prototype,o,{set(a){n(this.canvas,{type:Fe["2D"],property:o,args:[a],setter:true});}});i.push(l);}return ()=>{i.forEach(o=>o());}}function Pd(n){return n==="experimental-webgl"?"webgl":n}function As(n,e,t,r){let i=[];try{let s=Ee(n.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!q(this,e,t,!0)){let u=Pd(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]=="object"){let c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0);}else a.splice(0,1,{preserveDrawingBuffer:!0});}return o.apply(this,[l,...a])}});i.push(s);}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext");}return ()=>{i.forEach(s=>s());}}function $s(n,e,t,r,i,s){let o=[],l=Object.getOwnPropertyNames(n);for(let a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof n[a]!="function")continue;let u=Ee(n,a,function(c){return function(...h){let p=c.apply(this,h);if(Ra(p,s,this),"tagName"in this.canvas&&!q(this.canvas,r,i,!0)){let g=Ea(h,s,this),m={type:e,property:a,args:g};t(this.canvas,m);}return p}});o.push(u);}catch{let u=Ar(n,a,{set(c){t(this.canvas,{type:e,property:a,args:[c],setter:true});}});o.push(u);}return o}function Td(n,e,t,r){let i=[];return i.push(...$s(e.WebGLRenderingContext.prototype,Fe.WebGL,n,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...$s(e.WebGL2RenderingContext.prototype,Fe.WebGL2,n,t,r,e)),()=>{i.forEach(s=>s());}}var Ma="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Ld=n=>Uint8Array.from(atob(n),e=>e.charCodeAt(0)),ks=typeof window<"u"&&window.Blob&&new Blob([Ld(Ma)],{type:"text/javascript;charset=utf-8"});function Dd(n){let e;try{if(e=ks&&(window.URL||window.webkitURL).createObjectURL(ks),!e)throw "";let t=new Worker(e,{name:n?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e);}),t}catch{return new Worker("data:text/javascript;base64,"+Ma,{name:n?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e);}}var jn=class{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",false),w(this,"locked",false),w(this,"processMutation",(a,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);});let{sampling:t="all",win:r,blockClass:i,blockSelector:s,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,s),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,s,{dataURLOptions:l});}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers();}freeze(){this.frozen=true;}unfreeze(){this.frozen=false;}lock(){this.locked=true;}unlock(){this.locked=false;}initCanvasFPSObserver(e,t,r,i,s){let o=As(t,r,i,true),l=new Map,a=new Dd;a.onmessage=m=>{let{id:d}=m.data;if(l.set(d,false),!("base64"in m.data))return;let{base64:f,type:b,width:v,height:y}=m.data;this.mutationCb({id:d,type:Fe["2D"],commands:[{property:"clearRect",args:[0,0,v,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:b}]},0,0]}]});};let u=1e3/e,c=0,h,p=()=>{let m=[];return t.document.querySelectorAll("canvas").forEach(d=>{q(d,r,i,true)||m.push(d);}),m},g=m=>{if(c&&m-c<u){h=requestAnimationFrame(g);return}c=m,p().forEach(async d=>{var f;let b=this.mirror.getId(d);if(l.get(b)||d.width===0||d.height===0)return;if(l.set(b,true),["webgl","webgl2"].includes(d.__context)){let y=d.getContext(d.__context);((f=y?.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===false&&y.clear(y.COLOR_BUFFER_BIT);}let v=await createImageBitmap(d);a.postMessage({id:b,bitmap:v,width:d.width,height:d.height,dataURLOptions:s.dataURLOptions},[v]);}),h=requestAnimationFrame(g);};h=requestAnimationFrame(g),this.resetObservers=()=>{o(),cancelAnimationFrame(h);};}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=As(e,t,r,false),s=kd(this.processMutation.bind(this),e,t,r),o=Td(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),s(),o();};}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations());}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e);};requestAnimationFrame(e);}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r);}),requestAnimationFrame(()=>this.flushPendingCanvasMutations());}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let i=r.map(o=>{let{type:l,...a}=o;return a}),{type:s}=r[0];this.mutationCb({id:t,type:s,commands:i}),this.pendingCanvasMutations.delete(e);}},Vn=class{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new Bn),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb;}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e);}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e));}adoptStyleSheets(e,t){if(e.length===0)return;let r={id:t,styleIds:[]},i=[];for(let s of e){let o;this.styleMirror.has(s)?o=this.styleMirror.getId(s):(o=this.styleMirror.add(s),i.push({styleId:o,rules:Array.from(s.rules||CSSRule,(l,a)=>({rule:Ds(l,s.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){}},Gn=class{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",false);}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=true,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=false;})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t));}destroy(){}},z,tr,rn,wr=false;try{if(Array.from([1],n=>n*2)[0]!==2){let n=document.createElement("iframe");document.body.appendChild(n),Array.from=((Ti=n.contentWindow)==null?void 0:Ti.Array.from)||Array.from,document.body.removeChild(n);}}catch(n){console.debug("Unable to override Array.from",n);}var se=Bl();function Ue(n={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:s=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=true,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:g,maskInputFn:m,maskTextFn:d,hooks:f,packFn:b,sampling:v={},dataURLOptions:y={},mousemoveWait:C,recordDOM:k=true,recordCanvas:T=false,recordCrossOriginIframes:j=false,recordAfter:N=n.recordAfter==="DOMContentLoaded"?n.recordAfter:"load",userTriggeredOnInput:W=false,collectFonts:Y=false,inlineImages:te=false,plugins:ue,keepIframeSrcFn:O=()=>false,ignoreCSSAttributes:Ye=new Set([]),errorHandler:Xe}=n;dd(Xe);let V=j?window.parent===window:true,re=false;if(!V)try{window.parent.document&&(re=!1);}catch{re=true;}if(V&&!e)throw new Error("emit function is required");if(!V&&!re)return ()=>{};C!==void 0&&v.mousemove===void 0&&(v.mousemove=C),se.reset();let be=h===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:p!==void 0?p:{password:true},ce=Hs(g);ld();let Oi,Fr=0,Mi=M=>{for(let ie of ue||[])ie.eventProcessor&&(M=ie.eventProcessor(M));return b&&!re&&(M=b(M)),M};z=(M,ie)=>{var U;let H=M;if(H.timestamp=mr(),(U=Ce[0])!=null&&U.isFrozen()&&H.type!==E.FullSnapshot&&!(H.type===E.IncrementalSnapshot&&H.data.source===I.Mutation)&&Ce.forEach(Q=>Q.unfreeze()),V)e?.(Mi(H),ie);else if(re){let Q={type:"rrweb",event:Mi(H),origin:window.location.origin,isCheckout:ie};window.parent.postMessage(Q,"*");}if(H.type===E.FullSnapshot)Oi=H,Fr=0;else if(H.type===E.IncrementalSnapshot){if(H.data.source===I.Mutation&&H.data.isAttachIframe)return;Fr++;let Q=r&&Fr>=r,P=t&&H.timestamp-Oi.timestamp>t;(Q||P)&&tr(true);}};let Ct=M=>{z({type:E.IncrementalSnapshot,data:{source:I.Mutation,...M}});},Ai=M=>z({type:E.IncrementalSnapshot,data:{source:I.Scroll,...M}}),$i=M=>z({type:E.IncrementalSnapshot,data:{source:I.CanvasMutation,...M}}),fl=M=>z({type:E.IncrementalSnapshot,data:{source:I.AdoptedStyleSheet,...M}}),ve=new Vn({mutationCb:Ct,adoptedStyleSheetCb:fl}),Se=new zn({mirror:se,mutationCb:Ct,stylesheetManager:ve,recordCrossOriginIframes:j,wrappedEmit:z});for(let M of ue||[])M.getMirror&&M.getMirror({nodeMirror:se,crossOriginIframeMirror:Se.crossOriginIframeMirror,crossOriginIframeStyleMirror:Se.crossOriginIframeStyleMirror});let Ur=new Gn;rn=new jn({recordCanvas:T,mutationCb:$i,win:window,blockClass:i,blockSelector:s,mirror:se,sampling:v.canvas,dataURLOptions:y});let xt=new Wn({mutationCb:Ct,scrollCb:Ai,bypassOptions:{blockClass:i,blockSelector:s,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:be,dataURLOptions:y,maskTextFn:d,maskInputFn:m,recordCanvas:T,inlineImages:te,sampling:v,slimDOMOptions:ce,iframeManager:Se,stylesheetManager:ve,canvasManager:rn,keepIframeSrcFn:O,processedNodeManager:Ur},mirror:se});tr=(M=false)=>{if(!k)return;z({type:E.Meta,data:{href:window.location.href,width:da(),height:fa()}},M),ve.reset(),xt.init(),Ce.forEach(U=>U.lock());let ie=lu(document,{mirror:se,blockClass:i,blockSelector:s,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:be,maskTextFn:d,maskInputFn:m,slimDOM:ce,dataURLOptions:y,recordCanvas:T,inlineImages:te,onSerialize:U=>{ga(U,se)&&Se.addIframe(U),ya(U,se)&&ve.trackLinkElement(U),Nn(U)&&xt.addShadowRoot(x.shadowRoot(U),document);},onIframeLoad:(U,H)=>{Se.attachIframe(U,H),xt.observeAttachShadow(U);},onStylesheetLoad:(U,H)=>{ve.attachLinkElement(U,H);},keepIframeSrcFn:O});if(!ie)return console.warn("Failed to snapshot the document");z({type:E.FullSnapshot,data:{node:ie,initialOffset:ha(window)}},M),Ce.forEach(U=>U.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ve.adoptStyleSheets(document.adoptedStyleSheets,se.getId(document));};try{let M=[],ie=H=>{var Q;return R(Od)({mutationCb:Ct,mousemoveCb:(P,Hr)=>z({type:E.IncrementalSnapshot,data:{source:Hr,positions:P}}),mouseInteractionCb:P=>z({type:E.IncrementalSnapshot,data:{source:I.MouseInteraction,...P}}),scrollCb:Ai,viewportResizeCb:P=>z({type:E.IncrementalSnapshot,data:{source:I.ViewportResize,...P}}),inputCb:P=>z({type:E.IncrementalSnapshot,data:{source:I.Input,...P}}),mediaInteractionCb:P=>z({type:E.IncrementalSnapshot,data:{source:I.MediaInteraction,...P}}),styleSheetRuleCb:P=>z({type:E.IncrementalSnapshot,data:{source:I.StyleSheetRule,...P}}),styleDeclarationCb:P=>z({type:E.IncrementalSnapshot,data:{source:I.StyleDeclaration,...P}}),canvasMutationCb:$i,fontCb:P=>z({type:E.IncrementalSnapshot,data:{source:I.Font,...P}}),selectionCb:P=>{z({type:E.IncrementalSnapshot,data:{source:I.Selection,...P}});},customElementCb:P=>{z({type:E.IncrementalSnapshot,data:{source:I.CustomElement,...P}});},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:u,maskInputOptions:be,inlineStylesheet:c,sampling:v,recordDOM:k,recordCanvas:T,inlineImages:te,userTriggeredOnInput:W,collectFonts:Y,doc:H,maskInputFn:m,maskTextFn:d,keepIframeSrcFn:O,blockSelector:s,slimDOMOptions:ce,dataURLOptions:y,mirror:se,iframeManager:Se,stylesheetManager:ve,shadowDomManager:xt,processedNodeManager:Ur,canvasManager:rn,ignoreCSSAttributes:Ye,plugins:((Q=ue?.filter(P=>P.observer))==null?void 0:Q.map(P=>({observer:P.observer,options:P.options,callback:Hr=>z({type:E.Plugin,data:{plugin:P.name,payload:Hr}})})))||[]},f)};Se.addLoadListener(H=>{try{M.push(ie(H.contentDocument));}catch(Q){console.warn(Q);}});let U=()=>{tr(),M.push(ie(document)),wr=!0;};return ["interactive","complete"].includes(document.readyState)?U():(M.push(J("DOMContentLoaded",()=>{z({type:E.DomContentLoaded,data:{}}),N==="DOMContentLoaded"&&U();})),M.push(J("load",()=>{z({type:E.Load,data:{}}),N==="load"&&U();},window))),()=>{M.forEach(H=>{try{H();}catch(Q){String(Q).toLowerCase().includes("cross-origin")||console.warn(Q);}}),Ur.destroy(),wr=!1,pd();}}catch(M){console.warn(M);}}Ue.addCustomEvent=(n,e)=>{if(!wr)throw new Error("please add custom event after start recording");z({type:E.Custom,data:{tag:n,payload:e}});};Ue.freezePage=()=>{Ce.forEach(n=>n.freeze());};Ue.takeFullSnapshot=n=>{if(!wr)throw new Error("please take full snapshot after start recording");tr(n);};Ue.mirror=se;var Ps;(function(n){n[n.NotStarted=0]="NotStarted",n[n.Running=1]="Running",n[n.Stopped=2]="Stopped";})(Ps||(Ps={}));var _d=3e4,$r=class{buffer=[];stopFn=null;active=false;start(){if(this.active)return;this.active=true;let e=Ue({emit:t=>{this.buffer.push(t),this.pruneOldEvents();},sampling:{mousemove:true,mouseInteraction:true,scroll:150,input:"last"},blockClass:"bugdump-block",maskAllInputs:true});e&&(this.stopFn=e);}stop(){this.active&&(this.active=false,this.stopFn&&(this.stopFn(),this.stopFn=null));}flush(){this.pruneOldEvents();let e=[...this.buffer];return this.buffer=[],e}pruneOldEvents(){let e=Date.now()-_d,t=this.buffer.findIndex(r=>r.timestamp>=e);t===-1?this.buffer=[]:t>0&&(this.buffer=this.buffer.slice(t));}};function Aa(){return {timing:Nd(),memory:Bd(),resources:Fd()}}function Nd(){let n=performance.getEntriesByType("navigation");if(n.length===0)return null;let e=n[0],t=performance.getEntriesByType("paint"),r=t.find(s=>s.name==="first-paint"),i=t.find(s=>s.name==="first-contentful-paint");return {domContentLoaded:e.domContentLoadedEventEnd>0?Math.round(e.domContentLoadedEventEnd):null,loadComplete:e.loadEventEnd>0?Math.round(e.loadEventEnd):null,firstPaint:r?Math.round(r.startTime):null,firstContentfulPaint:i?Math.round(i.startTime):null,ttfb:e.responseStart>0?Math.round(e.responseStart):null}}function Bd(){let n=performance;return n.memory?{usedJSHeapSize:n.memory.usedJSHeapSize,totalJSHeapSize:n.memory.totalJSHeapSize,jsHeapSizeLimit:n.memory.jsHeapSizeLimit}:null}function Fd(){return performance.getEntriesByType("resource").slice(-20).map(e=>({name:e.name,type:e.initiatorType,duration:Math.round(e.duration),size:e.transferSize||0}))}function $a(){return {userAgent:navigator.userAgent,language:navigator.language,platform:navigator.platform,viewport:{width:window.innerWidth,height:window.innerHeight},screenResolution:{width:screen.width,height:screen.height},devicePixelRatio:window.devicePixelRatio||1,url:window.location.href,referrer:document.referrer,timestamp:Date.now()}}var S={primary:"#6366f1",primaryHover:"#4f46e5",primaryText:"#ffffff",bg:"#ffffff",bgSecondary:"#f9fafb",bgHover:"#f3f4f6",border:"#e5e7eb",borderFocus:"#6366f1",text:"#111827",textSecondary:"#6b7280",textMuted:"#9ca3af",danger:"#ef4444",dangerHover:"#dc2626",overlay:"rgba(0, 0, 0, 0.5)",shadow:"rgba(0, 0, 0, 0.15)",shadowLight:"rgba(0, 0, 0, 0.08)"};function ka(){return `
|
|
60
|
+
* {
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
margin: 0;
|
|
63
|
+
padding: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.bd-trigger {
|
|
67
|
+
position: fixed;
|
|
68
|
+
bottom: 20px;
|
|
69
|
+
right: 20px;
|
|
70
|
+
width: 56px;
|
|
71
|
+
height: 56px;
|
|
72
|
+
border-radius: 50%;
|
|
73
|
+
background: ${S.primary};
|
|
74
|
+
color: ${S.primaryText};
|
|
75
|
+
border: none;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
box-shadow: 0 4px 12px ${S.shadow};
|
|
81
|
+
transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
|
|
82
|
+
z-index: 2147483647;
|
|
83
|
+
outline: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.bd-trigger:hover {
|
|
87
|
+
background: ${S.primaryHover};
|
|
88
|
+
transform: scale(1.05);
|
|
89
|
+
box-shadow: 0 6px 16px ${S.shadow};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.bd-trigger:active {
|
|
93
|
+
transform: scale(0.97);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.bd-trigger svg {
|
|
97
|
+
width: 24px;
|
|
98
|
+
height: 24px;
|
|
99
|
+
fill: currentColor;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.bd-trigger--open svg {
|
|
103
|
+
transition: transform 0.2s;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.bd-panel {
|
|
107
|
+
position: fixed;
|
|
108
|
+
bottom: 88px;
|
|
109
|
+
right: 20px;
|
|
110
|
+
width: 380px;
|
|
111
|
+
max-height: calc(100vh - 120px);
|
|
112
|
+
background: ${S.bg};
|
|
113
|
+
border-radius: 16px;
|
|
114
|
+
box-shadow: 0 8px 32px ${S.shadow}, 0 2px 8px ${S.shadowLight};
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-direction: column;
|
|
117
|
+
overflow: hidden;
|
|
118
|
+
transform: translateY(10px);
|
|
119
|
+
opacity: 0;
|
|
120
|
+
transition: transform 0.25s ease-out, opacity 0.25s ease-out;
|
|
121
|
+
pointer-events: none;
|
|
122
|
+
z-index: 2147483646;
|
|
123
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
124
|
+
font-size: 14px;
|
|
125
|
+
line-height: 1.5;
|
|
126
|
+
color: ${S.text};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.bd-panel--visible {
|
|
130
|
+
transform: translateY(0);
|
|
131
|
+
opacity: 1;
|
|
132
|
+
pointer-events: auto;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.bd-panel__header {
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: space-between;
|
|
139
|
+
padding: 16px 20px;
|
|
140
|
+
border-bottom: 1px solid ${S.border};
|
|
141
|
+
background: ${S.bgSecondary};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.bd-panel__title {
|
|
145
|
+
font-size: 16px;
|
|
146
|
+
font-weight: 600;
|
|
147
|
+
color: ${S.text};
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.bd-panel__close {
|
|
151
|
+
background: none;
|
|
152
|
+
border: none;
|
|
153
|
+
cursor: pointer;
|
|
154
|
+
color: ${S.textSecondary};
|
|
155
|
+
padding: 4px;
|
|
156
|
+
border-radius: 6px;
|
|
157
|
+
display: flex;
|
|
158
|
+
align-items: center;
|
|
159
|
+
justify-content: center;
|
|
160
|
+
transition: color 0.15s, background-color 0.15s;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.bd-panel__close:hover {
|
|
164
|
+
color: ${S.text};
|
|
165
|
+
background: ${S.bgHover};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.bd-panel__close svg {
|
|
169
|
+
width: 18px;
|
|
170
|
+
height: 18px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.bd-panel__body {
|
|
174
|
+
flex: 1;
|
|
175
|
+
overflow-y: auto;
|
|
176
|
+
padding: 16px 20px;
|
|
177
|
+
display: flex;
|
|
178
|
+
flex-direction: column;
|
|
179
|
+
gap: 12px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.bd-textarea {
|
|
183
|
+
width: 100%;
|
|
184
|
+
min-height: 100px;
|
|
185
|
+
padding: 10px 12px;
|
|
186
|
+
border: 1px solid ${S.border};
|
|
187
|
+
border-radius: 8px;
|
|
188
|
+
resize: vertical;
|
|
189
|
+
font-family: inherit;
|
|
190
|
+
font-size: 14px;
|
|
191
|
+
line-height: 1.5;
|
|
192
|
+
color: ${S.text};
|
|
193
|
+
background: ${S.bg};
|
|
194
|
+
outline: none;
|
|
195
|
+
transition: border-color 0.15s;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.bd-textarea::placeholder {
|
|
199
|
+
color: ${S.textMuted};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.bd-textarea:focus {
|
|
203
|
+
border-color: ${S.borderFocus};
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.bd-action-bar {
|
|
207
|
+
display: flex;
|
|
208
|
+
gap: 4px;
|
|
209
|
+
flex-wrap: wrap;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.bd-action-btn {
|
|
213
|
+
display: inline-flex;
|
|
214
|
+
align-items: center;
|
|
215
|
+
gap: 6px;
|
|
216
|
+
padding: 6px 10px;
|
|
217
|
+
border: 1px solid ${S.border};
|
|
218
|
+
border-radius: 6px;
|
|
219
|
+
background: ${S.bg};
|
|
220
|
+
color: ${S.textSecondary};
|
|
221
|
+
font-size: 13px;
|
|
222
|
+
font-family: inherit;
|
|
223
|
+
cursor: pointer;
|
|
224
|
+
transition: color 0.15s, border-color 0.15s, background-color 0.15s;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.bd-action-btn:hover {
|
|
228
|
+
color: ${S.text};
|
|
229
|
+
border-color: ${S.textSecondary};
|
|
230
|
+
background: ${S.bgSecondary};
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.bd-action-btn:disabled {
|
|
234
|
+
opacity: 0.5;
|
|
235
|
+
cursor: not-allowed;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.bd-action-btn svg {
|
|
239
|
+
width: 16px;
|
|
240
|
+
height: 16px;
|
|
241
|
+
flex-shrink: 0;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.bd-attachments {
|
|
245
|
+
display: flex;
|
|
246
|
+
gap: 8px;
|
|
247
|
+
flex-wrap: wrap;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.bd-attachment {
|
|
251
|
+
position: relative;
|
|
252
|
+
width: 64px;
|
|
253
|
+
height: 64px;
|
|
254
|
+
border-radius: 8px;
|
|
255
|
+
overflow: hidden;
|
|
256
|
+
border: 1px solid ${S.border};
|
|
257
|
+
background: ${S.bgSecondary};
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.bd-attachment img,
|
|
261
|
+
.bd-attachment video {
|
|
262
|
+
width: 100%;
|
|
263
|
+
height: 100%;
|
|
264
|
+
object-fit: cover;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.bd-attachment__icon {
|
|
268
|
+
width: 100%;
|
|
269
|
+
height: 100%;
|
|
270
|
+
display: flex;
|
|
271
|
+
align-items: center;
|
|
272
|
+
justify-content: center;
|
|
273
|
+
color: ${S.textSecondary};
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.bd-attachment__icon svg {
|
|
277
|
+
width: 24px;
|
|
278
|
+
height: 24px;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.bd-attachment__remove {
|
|
282
|
+
position: absolute;
|
|
283
|
+
top: -4px;
|
|
284
|
+
right: -4px;
|
|
285
|
+
width: 20px;
|
|
286
|
+
height: 20px;
|
|
287
|
+
border-radius: 50%;
|
|
288
|
+
background: ${S.danger};
|
|
289
|
+
color: ${S.primaryText};
|
|
290
|
+
border: 2px solid ${S.bg};
|
|
291
|
+
cursor: pointer;
|
|
292
|
+
display: flex;
|
|
293
|
+
align-items: center;
|
|
294
|
+
justify-content: center;
|
|
295
|
+
font-size: 10px;
|
|
296
|
+
line-height: 1;
|
|
297
|
+
padding: 0;
|
|
298
|
+
transition: background-color 0.15s;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.bd-attachment__remove:hover {
|
|
302
|
+
background: ${S.dangerHover};
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.bd-attachment__remove svg {
|
|
306
|
+
width: 10px;
|
|
307
|
+
height: 10px;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.bd-reporter-toggle {
|
|
311
|
+
display: flex;
|
|
312
|
+
align-items: center;
|
|
313
|
+
gap: 6px;
|
|
314
|
+
background: none;
|
|
315
|
+
border: none;
|
|
316
|
+
cursor: pointer;
|
|
317
|
+
font-size: 13px;
|
|
318
|
+
font-family: inherit;
|
|
319
|
+
color: ${S.textSecondary};
|
|
320
|
+
padding: 0;
|
|
321
|
+
transition: color 0.15s;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.bd-reporter-toggle:hover {
|
|
325
|
+
color: ${S.text};
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.bd-reporter-toggle svg {
|
|
329
|
+
width: 14px;
|
|
330
|
+
height: 14px;
|
|
331
|
+
transition: transform 0.2s;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.bd-reporter-toggle--open svg {
|
|
335
|
+
transform: rotate(90deg);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.bd-reporter-fields {
|
|
339
|
+
display: none;
|
|
340
|
+
flex-direction: column;
|
|
341
|
+
gap: 8px;
|
|
342
|
+
padding-top: 4px;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.bd-reporter-fields--visible {
|
|
346
|
+
display: flex;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.bd-input {
|
|
350
|
+
width: 100%;
|
|
351
|
+
padding: 8px 12px;
|
|
352
|
+
border: 1px solid ${S.border};
|
|
353
|
+
border-radius: 8px;
|
|
354
|
+
font-family: inherit;
|
|
355
|
+
font-size: 14px;
|
|
356
|
+
color: ${S.text};
|
|
357
|
+
background: ${S.bg};
|
|
358
|
+
outline: none;
|
|
359
|
+
transition: border-color 0.15s;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.bd-input::placeholder {
|
|
363
|
+
color: ${S.textMuted};
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.bd-input:focus {
|
|
367
|
+
border-color: ${S.borderFocus};
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.bd-panel__footer {
|
|
371
|
+
padding: 12px 20px;
|
|
372
|
+
border-top: 1px solid ${S.border};
|
|
373
|
+
display: flex;
|
|
374
|
+
justify-content: flex-end;
|
|
375
|
+
gap: 8px;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.bd-send-btn {
|
|
379
|
+
display: inline-flex;
|
|
380
|
+
align-items: center;
|
|
381
|
+
gap: 6px;
|
|
382
|
+
padding: 8px 20px;
|
|
383
|
+
background: ${S.primary};
|
|
384
|
+
color: ${S.primaryText};
|
|
385
|
+
border: none;
|
|
386
|
+
border-radius: 8px;
|
|
387
|
+
font-size: 14px;
|
|
388
|
+
font-weight: 500;
|
|
389
|
+
font-family: inherit;
|
|
390
|
+
cursor: pointer;
|
|
391
|
+
transition: background-color 0.15s, opacity 0.15s;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.bd-send-btn:hover {
|
|
395
|
+
background: ${S.primaryHover};
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.bd-send-btn:disabled {
|
|
399
|
+
opacity: 0.5;
|
|
400
|
+
cursor: not-allowed;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.bd-send-btn svg {
|
|
404
|
+
width: 16px;
|
|
405
|
+
height: 16px;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.bd-success {
|
|
409
|
+
display: flex;
|
|
410
|
+
flex-direction: column;
|
|
411
|
+
align-items: center;
|
|
412
|
+
justify-content: center;
|
|
413
|
+
gap: 12px;
|
|
414
|
+
padding: 40px 20px;
|
|
415
|
+
text-align: center;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.bd-success svg {
|
|
419
|
+
width: 48px;
|
|
420
|
+
height: 48px;
|
|
421
|
+
color: #22c55e;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.bd-success__title {
|
|
425
|
+
font-size: 16px;
|
|
426
|
+
font-weight: 600;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.bd-success__subtitle {
|
|
430
|
+
font-size: 14px;
|
|
431
|
+
color: ${S.textSecondary};
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.bd-annotation-overlay {
|
|
435
|
+
position: fixed;
|
|
436
|
+
top: 0;
|
|
437
|
+
left: 0;
|
|
438
|
+
width: 100%;
|
|
439
|
+
height: 100%;
|
|
440
|
+
z-index: 2147483647;
|
|
441
|
+
background: ${S.overlay};
|
|
442
|
+
display: flex;
|
|
443
|
+
flex-direction: column;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.bd-annotation-toolbar {
|
|
447
|
+
display: flex;
|
|
448
|
+
align-items: center;
|
|
449
|
+
gap: 4px;
|
|
450
|
+
padding: 8px 12px;
|
|
451
|
+
background: rgba(0, 0, 0, 0.85);
|
|
452
|
+
color: ${S.primaryText};
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.bd-annotation-toolbar button {
|
|
456
|
+
padding: 6px 10px;
|
|
457
|
+
background: transparent;
|
|
458
|
+
color: ${S.primaryText};
|
|
459
|
+
border: 1px solid transparent;
|
|
460
|
+
border-radius: 6px;
|
|
461
|
+
font-size: 13px;
|
|
462
|
+
font-family: inherit;
|
|
463
|
+
cursor: pointer;
|
|
464
|
+
transition: background-color 0.15s, border-color 0.15s;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.bd-annotation-toolbar button:hover {
|
|
468
|
+
background: rgba(255, 255, 255, 0.1);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.bd-annotation-toolbar button.active {
|
|
472
|
+
background: rgba(255, 255, 255, 0.2);
|
|
473
|
+
border-color: rgba(255, 255, 255, 0.3);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.bd-annotation-toolbar__spacer {
|
|
477
|
+
flex: 1;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.bd-annotation-toolbar__confirm {
|
|
481
|
+
background: #22c55e !important;
|
|
482
|
+
color: ${S.primaryText} !important;
|
|
483
|
+
font-weight: 500;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.bd-annotation-toolbar__confirm:hover {
|
|
487
|
+
background: #16a34a !important;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.bd-annotation-toolbar__cancel {
|
|
491
|
+
color: ${S.textMuted} !important;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.bd-annotation-canvas-wrap {
|
|
495
|
+
flex: 1;
|
|
496
|
+
display: flex;
|
|
497
|
+
align-items: center;
|
|
498
|
+
justify-content: center;
|
|
499
|
+
overflow: hidden;
|
|
500
|
+
position: relative;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.bd-spinner {
|
|
504
|
+
width: 20px;
|
|
505
|
+
height: 20px;
|
|
506
|
+
border: 2px solid ${S.primaryText};
|
|
507
|
+
border-top-color: transparent;
|
|
508
|
+
border-radius: 50%;
|
|
509
|
+
animation: bd-spin 0.6s linear infinite;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
@keyframes bd-spin {
|
|
513
|
+
to { transform: rotate(360deg); }
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.bd-file-input {
|
|
517
|
+
display: none;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
@media (max-width: 440px) {
|
|
521
|
+
.bd-panel {
|
|
522
|
+
right: 0;
|
|
523
|
+
left: 0;
|
|
524
|
+
bottom: 76px;
|
|
525
|
+
width: 100%;
|
|
526
|
+
max-height: calc(100vh - 100px);
|
|
527
|
+
border-radius: 16px 16px 0 0;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
`}function gi(){return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2l1.88 1.88"/><path d="M14.12 3.88 16 2"/><path d="M9 7.13v-1a3.003 3.003 0 1 1 6 0v1"/><path d="M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6"/><path d="M12 20v-9"/><path d="M6.53 9C4.6 8.8 3 7.1 3 5"/><path d="M6 13H2"/><path d="M3 21c0-2.1 1.7-3.9 3.8-4"/><path d="M20.97 5c0 2.1-1.6 3.8-3.5 4"/><path d="M22 13h-4"/><path d="M17.2 17c2.1.1 3.8 1.9 3.8 4"/></svg>'}function kr(){return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>'}function Pa(){return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"/></svg>'}function Ta(){return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z"/><circle cx="12" cy="13" r="3"/></svg>'}function yi(){return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>'}function wi(){return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m22 2-7 20-4-9-9-4z"/><path d="M22 2 11 13"/></svg>'}function La(){return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"/></svg>'}function Da(){return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><path d="m9 11 3 3L22 4"/></svg>'}function _a(){return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg>'}function Na(){return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>'}function Ba(){return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="6" y="6" width="12" height="12" rx="2"/></svg>'}function Fa(n,e){if(n.match(/^[a-z]+:\/\//i))return n;if(n.match(/^\/\//))return window.location.protocol+n;if(n.match(/^[a-z]+:/i))return n;let t=document.implementation.createHTMLDocument(),r=t.createElement("base"),i=t.createElement("a");return t.head.appendChild(r),t.body.appendChild(i),e&&(r.href=e),i.href=n,i.href}var Ua=(()=>{let n=0,e=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return ()=>(n+=1,`u${e()}${n}`)})();function le(n){let e=[];for(let t=0,r=n.length;t<r;t++)e.push(n[t]);return e}var He=null;function Tr(n={}){return He||(n.includeStyleProperties?(He=n.includeStyleProperties,He):(He=le(window.getComputedStyle(document.documentElement)),He))}function Pr(n,e){let r=(n.ownerDocument.defaultView||window).getComputedStyle(n).getPropertyValue(e);return r?parseFloat(r.replace("px","")):0}function Ud(n){let e=Pr(n,"border-left-width"),t=Pr(n,"border-right-width");return n.clientWidth+e+t}function Hd(n){let e=Pr(n,"border-top-width"),t=Pr(n,"border-bottom-width");return n.clientHeight+e+t}function bi(n,e={}){let t=e.width||Ud(n),r=e.height||Hd(n);return {width:t,height:r}}function Ha(){let n,e;try{e=process;}catch{}let t=e&&e.env?e.env.devicePixelRatio:null;return t&&(n=parseInt(t,10),Number.isNaN(n)&&(n=1)),n||window.devicePixelRatio||1}var ee=16384;function za(n){(n.width>ee||n.height>ee)&&(n.width>ee&&n.height>ee?n.width>n.height?(n.height*=ee/n.width,n.width=ee):(n.width*=ee/n.height,n.height=ee):n.width>ee?(n.height*=ee/n.width,n.width=ee):(n.width*=ee/n.height,n.height=ee));}function Wa(n,e={}){return n.toBlob?new Promise(t=>{n.toBlob(t,e.type?e.type:"image/png",e.quality?e.quality:1);}):new Promise(t=>{let r=window.atob(n.toDataURL(e.type?e.type:void 0,e.quality?e.quality:void 0).split(",")[1]),i=r.length,s=new Uint8Array(i);for(let o=0;o<i;o+=1)s[o]=r.charCodeAt(o);t(new Blob([s],{type:e.type?e.type:"image/png"}));})}function ze(n){return new Promise((e,t)=>{let r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>e(r));});},r.onerror=t,r.crossOrigin="anonymous",r.decoding="async",r.src=n;})}async function zd(n){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(n)).then(encodeURIComponent).then(e=>`data:image/svg+xml;charset=utf-8,${e}`)}async function ja(n,e,t){let r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${e}`),i.setAttribute("height",`${t}`),i.setAttribute("viewBox",`0 0 ${e} ${t}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),i.appendChild(s),s.appendChild(n),zd(i)}var Z=(n,e)=>{if(n instanceof e)return true;let t=Object.getPrototypeOf(n);return t===null?false:t.constructor.name===e.name||Z(t,e)};function Wd(n){let e=n.getPropertyValue("content");return `${n.cssText} content: '${e.replace(/'|"/g,"")}';`}function jd(n,e){return Tr(e).map(t=>{let r=n.getPropertyValue(t),i=n.getPropertyPriority(t);return `${t}: ${r}${i?" !important":""};`}).join(" ")}function Vd(n,e,t,r){let i=`.${n}:${e}`,s=t.cssText?Wd(t):jd(t,r);return document.createTextNode(`${i}{${s}}`)}function Va(n,e,t,r){let i=window.getComputedStyle(n,t),s=i.getPropertyValue("content");if(s===""||s==="none")return;let o=Ua();try{e.className=`${e.className} ${o}`;}catch{return}let l=document.createElement("style");l.appendChild(Vd(o,t,i,r)),e.appendChild(l);}function Ga(n,e,t){Va(n,e,":before",t),Va(n,e,":after",t);}var Ya="application/font-woff",Xa="image/jpeg",Gd={woff:Ya,woff2:Ya,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Xa,jpeg:Xa,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Yd(n){let e=/\.([^./]*?)$/g.exec(n);return e?e[1]:""}function We(n){let e=Yd(n).toLowerCase();return Gd[e]||""}function Xd(n){return n.split(/,/)[1]}function bt(n){return n.search(/^(data:)/)!==-1}function Si(n,e){return `data:${e};base64,${n}`}async function Ci(n,e,t){let r=await fetch(n,e);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);let i=await r.blob();return new Promise((s,o)=>{let l=new FileReader;l.onerror=o,l.onloadend=()=>{try{s(t({res:r,result:l.result}));}catch(a){o(a);}},l.readAsDataURL(i);})}var vi={};function Zd(n,e,t){let r=n.replace(/\?.*/,"");return t&&(r=n),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),e?`[${e}]${r}`:r}async function je(n,e,t){let r=Zd(n,e,t.includeQueryParams);if(vi[r]!=null)return vi[r];t.cacheBust&&(n+=(/\?/.test(n)?"&":"?")+new Date().getTime());let i;try{let s=await Ci(n,t.fetchRequestInit,({res:o,result:l})=>(e||(e=o.headers.get("Content-Type")||""),Xd(l)));i=Si(s,e);}catch(s){i=t.imagePlaceholder||"";let o=`Failed to fetch resource: ${n}`;s&&(o=typeof s=="string"?s:s.message),o&&console.warn(o);}return vi[r]=i,i}async function Jd(n){let e=n.toDataURL();return e==="data:,"?n.cloneNode(false):ze(e)}async function qd(n,e){if(n.currentSrc){let s=document.createElement("canvas"),o=s.getContext("2d");s.width=n.clientWidth,s.height=n.clientHeight,o?.drawImage(n,0,0,s.width,s.height);let l=s.toDataURL();return ze(l)}let t=n.poster,r=We(t),i=await je(t,r,e);return ze(i)}async function Kd(n,e){var t;try{if(!((t=n?.contentDocument)===null||t===void 0)&&t.body)return await vt(n.contentDocument.body,e,!0)}catch{}return n.cloneNode(false)}async function Qd(n,e){return Z(n,HTMLCanvasElement)?Jd(n):Z(n,HTMLVideoElement)?qd(n,e):Z(n,HTMLIFrameElement)?Kd(n,e):n.cloneNode(Za(n))}var ep=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SLOT",Za=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SVG";async function tp(n,e,t){var r,i;if(Za(e))return e;let s=[];return ep(n)&&n.assignedNodes?s=le(n.assignedNodes()):Z(n,HTMLIFrameElement)&&(!((r=n.contentDocument)===null||r===void 0)&&r.body)?s=le(n.contentDocument.body.childNodes):s=le(((i=n.shadowRoot)!==null&&i!==void 0?i:n).childNodes),s.length===0||Z(n,HTMLVideoElement)||await s.reduce((o,l)=>o.then(()=>vt(l,t)).then(a=>{a&&e.appendChild(a);}),Promise.resolve()),e}function rp(n,e,t){let r=e.style;if(!r)return;let i=window.getComputedStyle(n);i.cssText?(r.cssText=i.cssText,r.transformOrigin=i.transformOrigin):Tr(t).forEach(s=>{let o=i.getPropertyValue(s);s==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),Z(n,HTMLIFrameElement)&&s==="display"&&o==="inline"&&(o="block"),s==="d"&&e.getAttribute("d")&&(o=`path(${e.getAttribute("d")})`),r.setProperty(s,o,i.getPropertyPriority(s));});}function np(n,e){Z(n,HTMLTextAreaElement)&&(e.innerHTML=n.value),Z(n,HTMLInputElement)&&e.setAttribute("value",n.value);}function ip(n,e){if(Z(n,HTMLSelectElement)){let r=Array.from(e.children).find(i=>n.value===i.getAttribute("value"));r&&r.setAttribute("selected","");}}function sp(n,e,t){return Z(e,Element)&&(rp(n,e,t),Ga(n,e,t),np(n,e),ip(n,e)),e}async function op(n,e){let t=n.querySelectorAll?n.querySelectorAll("use"):[];if(t.length===0)return n;let r={};for(let s=0;s<t.length;s++){let l=t[s].getAttribute("xlink:href");if(l){let a=n.querySelector(l),u=document.querySelector(l);!a&&u&&!r[l]&&(r[l]=await vt(u,e,true));}}let i=Object.values(r);if(i.length){let s="http://www.w3.org/1999/xhtml",o=document.createElementNS(s,"svg");o.setAttribute("xmlns",s),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";let l=document.createElementNS(s,"defs");o.appendChild(l);for(let a=0;a<i.length;a++)l.appendChild(i[a]);n.appendChild(o);}return n}async function vt(n,e,t){return !t&&e.filter&&!e.filter(n)?null:Promise.resolve(n).then(r=>Qd(r,e)).then(r=>tp(n,r,e)).then(r=>sp(n,r,e)).then(r=>op(r,e))}var Ja=/url\((['"]?)([^'"]+?)\1\)/g,ap=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,lp=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function up(n){let e=n.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`,"g")}function cp(n){let e=[];return n.replace(Ja,(t,r,i)=>(e.push(i),t)),e.filter(t=>!bt(t))}async function hp(n,e,t,r,i){try{let s=t?Fa(e,t):e,o=We(e),l;if(i);else l=await je(s,o,r);return n.replace(up(e),`$1${l}$3`)}catch{}return n}function fp(n,{preferredFontFormat:e}){return e?n.replace(lp,t=>{for(;;){let[r,,i]=ap.exec(t)||[];if(!i)return "";if(i===e)return `src: ${r};`}}):n}function xi(n){return n.search(Ja)!==-1}async function Lr(n,e,t){if(!xi(n))return n;let r=fp(n,t);return cp(r).reduce((s,o)=>s.then(l=>hp(l,o,e,t)),Promise.resolve(r))}async function Ve(n,e,t){var r;let i=(r=e.style)===null||r===void 0?void 0:r.getPropertyValue(n);if(i){let s=await Lr(i,null,t);return e.style.setProperty(n,s,e.style.getPropertyPriority(n)),true}return false}async function dp(n,e){await Ve("background",n,e)||await Ve("background-image",n,e),await Ve("mask",n,e)||await Ve("-webkit-mask",n,e)||await Ve("mask-image",n,e)||await Ve("-webkit-mask-image",n,e);}async function pp(n,e){let t=Z(n,HTMLImageElement);if(!(t&&!bt(n.src))&&!(Z(n,SVGImageElement)&&!bt(n.href.baseVal)))return;let r=t?n.src:n.href.baseVal,i=await je(r,We(r),e);await new Promise((s,o)=>{n.onload=s,n.onerror=e.onImageErrorHandler?(...a)=>{try{s(e.onImageErrorHandler(...a));}catch(u){o(u);}}:o;let l=n;l.decode&&(l.decode=s),l.loading==="lazy"&&(l.loading="eager"),t?(n.srcset="",n.src=i):n.href.baseVal=i;});}async function mp(n,e){let r=le(n.childNodes).map(i=>Ii(i,e));await Promise.all(r).then(()=>n);}async function Ii(n,e){Z(n,Element)&&(await dp(n,e),await pp(n,e),await mp(n,e));}function qa(n,e){let{style:t}=n;e.backgroundColor&&(t.backgroundColor=e.backgroundColor),e.width&&(t.width=`${e.width}px`),e.height&&(t.height=`${e.height}px`);let r=e.style;return r!=null&&Object.keys(r).forEach(i=>{t[i]=r[i];}),n}var Ka={};async function Qa(n){let e=Ka[n];if(e!=null)return e;let r=await(await fetch(n)).text();return e={url:n,cssText:r},Ka[n]=e,e}async function el(n,e){let t=n.cssText,r=/url\(["']?([^"')]+)["']?\)/g,s=(t.match(/url\([^)]+\)/g)||[]).map(async o=>{let l=o.replace(r,"$1");return l.startsWith("https://")||(l=new URL(l,n.url).href),Ci(l,e.fetchRequestInit,({result:a})=>(t=t.replace(o,`url(${a})`),[o,a]))});return Promise.all(s).then(()=>t)}function tl(n){if(n==null)return [];let e=[],t=/(\/\*[\s\S]*?\*\/)/gi,r=n.replace(t,""),i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){let a=i.exec(r);if(a===null)break;e.push(a[0]);}r=r.replace(i,"");let s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",l=new RegExp(o,"gi");for(;;){let a=s.exec(r);if(a===null){if(a=l.exec(r),a===null)break;s.lastIndex=l.lastIndex;}else l.lastIndex=s.lastIndex;e.push(a[0]);}return e}async function gp(n,e){let t=[],r=[];return n.forEach(i=>{if("cssRules"in i)try{le(i.cssRules||[]).forEach((s,o)=>{if(s.type===CSSRule.IMPORT_RULE){let l=o+1,a=s.href,u=Qa(a).then(c=>el(c,e)).then(c=>tl(c).forEach(h=>{try{i.insertRule(h,h.startsWith("@import")?l+=1:i.cssRules.length);}catch(p){console.error("Error inserting rule from remote css",{rule:h,error:p});}})).catch(c=>{console.error("Error loading remote css",c.toString());});r.push(u);}});}catch(s){let o=n.find(l=>l.href==null)||document.styleSheets[0];i.href!=null&&r.push(Qa(i.href).then(l=>el(l,e)).then(l=>tl(l).forEach(a=>{o.insertRule(a,o.cssRules.length);})).catch(l=>{console.error("Error loading remote stylesheet",l);})),console.error("Error inlining remote css file",s);}}),Promise.all(r).then(()=>(n.forEach(i=>{if("cssRules"in i)try{le(i.cssRules||[]).forEach(s=>{t.push(s);});}catch(s){console.error(`Error while reading CSS rules from ${i.href}`,s);}}),t))}function yp(n){return n.filter(e=>e.type===CSSRule.FONT_FACE_RULE).filter(e=>xi(e.style.getPropertyValue("src")))}async function wp(n,e){if(n.ownerDocument==null)throw new Error("Provided element is not within a Document");let t=le(n.ownerDocument.styleSheets),r=await gp(t,e);return yp(r)}function rl(n){return n.trim().replace(/["']/g,"")}function bp(n){let e=new Set;function t(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(s=>{e.add(rl(s));}),Array.from(r.children).forEach(s=>{s instanceof HTMLElement&&t(s);});}return t(n),e}async function nl(n,e){let t=await wp(n,e),r=bp(n);return (await Promise.all(t.filter(s=>r.has(rl(s.style.fontFamily))).map(s=>{let o=s.parentStyleSheet?s.parentStyleSheet.href:null;return Lr(s.cssText,o,e)}))).join(`
|
|
531
|
+
`)}async function il(n,e){let t=e.fontEmbedCSS!=null?e.fontEmbedCSS:e.skipFonts?null:await nl(n,e);if(t){let r=document.createElement("style"),i=document.createTextNode(t);r.appendChild(i),n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r);}}async function vp(n,e={}){let{width:t,height:r}=bi(n,e),i=await vt(n,e,true);return await il(i,e),await Ii(i,e),qa(i,e),await ja(i,t,r)}async function Sp(n,e={}){let{width:t,height:r}=bi(n,e),i=await vp(n,e),s=await ze(i),o=document.createElement("canvas"),l=o.getContext("2d"),a=e.pixelRatio||Ha(),u=e.canvasWidth||t,c=e.canvasHeight||r;return o.width=u*a,o.height=c*a,e.skipAutoScale||za(o),o.style.width=`${u}`,o.style.height=`${c}`,e.backgroundColor&&(l.fillStyle=e.backgroundColor,l.fillRect(0,0,o.width,o.height)),l.drawImage(s,0,0,o.width,o.height),o}async function sl(n,e={}){let t=await Sp(n,e);return await Wa(t)}var Cp=.85,xp="image/jpeg";async function Dr(n={}){let{quality:e=Cp,target:t=document.body,filter:r}=n,i=t.scrollWidth,s=t.scrollHeight,o=await sl(t,{quality:e,type:xp,filter:r,cacheBust:true});if(!o)throw new Error("Screenshot capture failed: no blob produced");return {blob:o,width:i,height:s}}var _r=Math.PI/6,Ip="#ff0000",Rp=3,Ep=16,Op=10,Mp=0;function St(){return `ann_${Date.now()}_${++Mp}`}function ol(n,e,t,r,i){let s=Math.atan2(t.y-e.y,t.x-e.x);n.save(),n.strokeStyle=r,n.fillStyle=r,n.lineWidth=i,n.lineCap="round",n.lineJoin="round",n.beginPath(),n.moveTo(e.x,e.y),n.lineTo(t.x,t.y),n.stroke(),n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(t.x-15*Math.cos(s-_r),t.y-15*Math.sin(s-_r)),n.lineTo(t.x-15*Math.cos(s+_r),t.y-15*Math.sin(s+_r)),n.closePath(),n.fill(),n.restore();}function al(n,e,t,r,i){n.save(),n.strokeStyle=r,n.lineWidth=i,n.lineCap="round",n.lineJoin="round",n.strokeRect(e.x,e.y,t.x-e.x,t.y-e.y),n.restore();}function Ap(n,e,t,r,i){n.save(),n.font=`${i}px sans-serif`,n.textBaseline="top";let s=4,o=n.measureText(t),l=i*1.2;n.fillStyle="rgba(0, 0, 0, 0.6)",n.fillRect(e.x-s,e.y-s,o.width+s*2,l+s*2),n.fillStyle=r,n.fillText(t,e.x,e.y),n.restore();}function ll(n,e,t,r,i){let s=Math.min(t.x,r.x),o=Math.min(t.y,r.y),l=Math.abs(r.x-t.x),a=Math.abs(r.y-t.y);l===0||a===0||(n.save(),n.filter=`blur(${i}px)`,n.drawImage(e,s,o,l,a,s,o,l,a),n.filter="none",n.strokeStyle="rgba(128, 128, 128, 0.5)",n.lineWidth=1,n.setLineDash([4,4]),n.strokeRect(s,o,l,a),n.setLineDash([]),n.restore());}function ul(n,e,t,r){if(e.length<2)return;n.save(),n.strokeStyle=t,n.lineWidth=r,n.lineCap="round",n.lineJoin="round";let i=e[0];n.beginPath(),n.moveTo(i.x,i.y);for(let s=1;s<e.length;s++){let o=e[s];n.lineTo(o.x,o.y);}n.stroke(),n.restore();}function cl(n,e,t){switch(t.tool){case "arrow":ol(n,t.start,t.end,t.color,t.lineWidth);break;case "box":al(n,t.start,t.end,t.color,t.lineWidth);break;case "text":Ap(n,t.position,t.text,t.color,t.fontSize);break;case "blur":ll(n,e,t.start,t.end,t.blurRadius);break;case "freehand":ul(n,t.points,t.color,t.lineWidth);break}}function hl(n,e){for(let t of e)cl(n,n.canvas,t);}var Ge=class{constructor(e,t,r){this.container=e;this.width=t;this.height=r;this.canvas=document.createElement("canvas"),this.canvas.width=t,this.canvas.height=r,this.canvas.style.cssText="position:absolute;top:0;left:0;width:100%;height:100%;cursor:crosshair;touch-action:none;";let i=this.canvas.getContext("2d");if(!i)throw new Error("Failed to get 2D canvas context");this.ctx=i,this.onPointerDownBound=this.onPointerDown.bind(this),this.onPointerMoveBound=this.onPointerMove.bind(this),this.onPointerUpBound=this.onPointerUp.bind(this),this.canvas.addEventListener("pointerdown",this.onPointerDownBound),this.canvas.addEventListener("pointermove",this.onPointerMoveBound),this.canvas.addEventListener("pointerup",this.onPointerUpBound),this.container.appendChild(this.canvas);}canvas;ctx;operations=[];currentTool="arrow";color=Ip;lineWidth=Rp;fontSize=Ep;blurRadius=Op;isDrawing=false;startPoint=null;currentPoints=[];screenshotImage=null;onPointerDownBound;onPointerMoveBound;onPointerUpBound;setScreenshotImage(e){this.screenshotImage=e,this.redraw();}setTool(e){this.currentTool=e;}getTool(){return this.currentTool}setColor(e){this.color=e;}setLineWidth(e){this.lineWidth=e;}setFontSize(e){this.fontSize=e;}setBlurRadius(e){this.blurRadius=e;}getOperations(){return [...this.operations]}undo(){this.operations.pop(),this.redraw();}clear(){this.operations=[],this.redraw();}addTextAtPosition(e,t){let r={id:St(),tool:"text",color:this.color,lineWidth:this.lineWidth,position:e,text:t,fontSize:this.fontSize,timestamp:Date.now()};this.operations.push(r),this.redraw();}destroy(){this.canvas.removeEventListener("pointerdown",this.onPointerDownBound),this.canvas.removeEventListener("pointermove",this.onPointerMoveBound),this.canvas.removeEventListener("pointerup",this.onPointerUpBound),this.canvas.remove();}getCanvasPoint(e){let t=this.canvas.getBoundingClientRect();return {x:(e.clientX-t.left)/t.width*this.width,y:(e.clientY-t.top)/t.height*this.height}}onPointerDown(e){e.preventDefault(),this.canvas.setPointerCapture(e.pointerId);let t=this.getCanvasPoint(e);if(this.startPoint=t,this.currentTool==="text"){this.promptTextInput(t);return}this.isDrawing=true,this.currentTool==="freehand"&&(this.currentPoints=[t]);}onPointerMove(e){if(!this.isDrawing||!this.startPoint)return;e.preventDefault();let t=this.getCanvasPoint(e);this.currentTool==="freehand"&&this.currentPoints.push(t),this.redraw(),this.drawPreview(t);}onPointerUp(e){if(!this.isDrawing||!this.startPoint)return;e.preventDefault();let t=this.getCanvasPoint(e);switch(this.currentTool){case "arrow":this.operations.push({id:St(),tool:"arrow",color:this.color,lineWidth:this.lineWidth,start:this.startPoint,end:t,timestamp:Date.now()});break;case "box":this.operations.push({id:St(),tool:"box",color:this.color,lineWidth:this.lineWidth,start:this.startPoint,end:t,timestamp:Date.now()});break;case "blur":this.operations.push({id:St(),tool:"blur",color:this.color,lineWidth:this.lineWidth,start:this.startPoint,end:t,blurRadius:this.blurRadius,timestamp:Date.now()});break;case "freehand":this.currentPoints.push(t),this.operations.push({id:St(),tool:"freehand",color:this.color,lineWidth:this.lineWidth,points:[...this.currentPoints],timestamp:Date.now()}),this.currentPoints=[];break;}this.isDrawing=false,this.startPoint=null,this.redraw();}promptTextInput(e){let t=prompt("Enter annotation text:");t&&this.addTextAtPosition(e,t);}drawPreview(e){if(this.startPoint)switch(this.currentTool){case "arrow":ol(this.ctx,this.startPoint,e,this.color,this.lineWidth);break;case "box":al(this.ctx,this.startPoint,e,this.color,this.lineWidth);break;case "blur":ll(this.ctx,this.canvas,this.startPoint,e,this.blurRadius);break;case "freehand":ul(this.ctx,this.currentPoints,this.color,this.lineWidth);break;}}redraw(){this.ctx.clearRect(0,0,this.width,this.height),this.screenshotImage&&this.ctx.drawImage(this.screenshotImage,0,0,this.width,this.height);for(let e of this.operations)cl(this.ctx,this.canvas,e);}};var $p=0;function Ri(){return `att_${Date.now()}_${++$p}`}var Nr=class{constructor(e){this.shadowRoot=e;this.elements=this.createDOM(),this.bindEvents();}elements;attachments=[];visible=false;submitting=false;recording=false;mediaRecorder=null;mediaStream=null;recordedChunks=[];reporterVisible=false;annotationOverlay=null;annotationContainer=null;onSubmit=null;onClose=null;setOnSubmit(e){this.onSubmit=e;}setOnClose(e){this.onClose=e;}show(){this.visible=true,this.elements.root.classList.add("bd-panel--visible"),this.elements.textarea.focus();}hide(){this.visible=false,this.elements.root.classList.remove("bd-panel--visible");}isVisible(){return this.visible}reset(){this.elements.textarea.value="",this.elements.nameInput.value="",this.elements.emailInput.value="",this.revokeAttachmentUrls(),this.attachments=[],this.renderAttachments(),this.showFormView(),this.setSubmitting(false);}setReporterInfo(e,t){this.elements.nameInput.value=e,this.elements.emailInput.value=t;}getElement(){return this.elements.root}destroy(){this.stopRecording(),this.destroyAnnotation(),this.revokeAttachmentUrls(),this.elements.root.remove();}createDOM(){let e=document.createElement("div");e.className="bd-panel",e.innerHTML=`
|
|
532
|
+
<div class="bd-panel__header">
|
|
533
|
+
<span class="bd-panel__title">Report a bug</span>
|
|
534
|
+
<button class="bd-panel__close" aria-label="Close">${kr()}</button>
|
|
535
|
+
</div>
|
|
536
|
+
<div class="bd-panel__body" data-role="body">
|
|
537
|
+
<textarea class="bd-textarea" placeholder="Describe the bug you found..." rows="4"></textarea>
|
|
538
|
+
<div class="bd-action-bar">
|
|
539
|
+
<button class="bd-action-btn" data-action="attach">${Pa()} Attach</button>
|
|
540
|
+
<button class="bd-action-btn" data-action="screenshot">${Ta()} Screenshot</button>
|
|
541
|
+
<button class="bd-action-btn" data-action="record">${yi()} Record</button>
|
|
542
|
+
</div>
|
|
543
|
+
<div class="bd-attachments" data-role="attachments"></div>
|
|
544
|
+
<button class="bd-reporter-toggle" data-action="toggle-reporter">
|
|
545
|
+
${La()} Reporter info
|
|
546
|
+
</button>
|
|
547
|
+
<div class="bd-reporter-fields" data-role="reporter-fields">
|
|
548
|
+
<input class="bd-input" type="text" placeholder="Your name" data-role="name" />
|
|
549
|
+
<input class="bd-input" type="email" placeholder="Your email" data-role="email" />
|
|
550
|
+
</div>
|
|
551
|
+
<input class="bd-file-input" type="file" multiple data-role="file-input" />
|
|
552
|
+
</div>
|
|
553
|
+
<div class="bd-success" data-role="success" style="display:none">
|
|
554
|
+
${Da()}
|
|
555
|
+
<div class="bd-success__title">Bug report sent!</div>
|
|
556
|
+
<div class="bd-success__subtitle">Thank you for your feedback.</div>
|
|
557
|
+
</div>
|
|
558
|
+
<div class="bd-panel__footer">
|
|
559
|
+
<button class="bd-send-btn" data-action="send">${wi()} Send report</button>
|
|
560
|
+
</div>
|
|
561
|
+
`;let t=i=>e.querySelector(i);return {root:e,textarea:t(".bd-textarea"),nameInput:t('[data-role="name"]'),emailInput:t('[data-role="email"]'),sendBtn:t('[data-action="send"]'),screenshotBtn:t('[data-action="screenshot"]'),recordBtn:t('[data-action="record"]'),attachBtn:t('[data-action="attach"]'),fileInput:t('[data-role="file-input"]'),attachmentsList:t('[data-role="attachments"]'),reporterToggle:t('[data-action="toggle-reporter"]'),reporterFields:t('[data-role="reporter-fields"]'),body:t('[data-role="body"]'),successView:t('[data-role="success"]')}}bindEvents(){this.elements.root.querySelector(".bd-panel__close").addEventListener("click",()=>this.handleClose()),this.elements.sendBtn.addEventListener("click",()=>this.handleSubmit()),this.elements.screenshotBtn.addEventListener("click",()=>this.handleScreenshot()),this.elements.recordBtn.addEventListener("click",()=>this.handleRecord()),this.elements.attachBtn.addEventListener("click",()=>this.elements.fileInput.click()),this.elements.fileInput.addEventListener("change",()=>this.handleFileSelect()),this.elements.reporterToggle.addEventListener("click",()=>this.toggleReporter()),this.elements.attachmentsList.addEventListener("click",t=>{let i=t.target.closest("[data-remove-id]");if(i){let s=i.dataset.removeId;this.removeAttachment(s);}});}handleClose(){this.onClose?.();}async handleSubmit(){let e=this.elements.textarea.value.trim();if(!e){this.elements.textarea.focus();return}if(!(this.submitting||!this.onSubmit)){this.setSubmitting(true);try{await this.onSubmit({description:e,reporterName:this.elements.nameInput.value.trim(),reporterEmail:this.elements.emailInput.value.trim(),attachments:[...this.attachments]}),this.showSuccessView(),setTimeout(()=>{this.reset(),this.handleClose();},2e3);}catch{this.setSubmitting(false);}}}async handleScreenshot(){this.elements.screenshotBtn.disabled=true;try{this.hide(),await kp(100);let e=await Dr({filter:i=>!(i instanceof HTMLElement&&i.tagName.toLowerCase()==="bugdump-widget")}),t=URL.createObjectURL(e.blob),r=await Pp(t);this.showAnnotationOverlay(r,e.blob,e.width,e.height);}catch{this.show();}finally{this.elements.screenshotBtn.disabled=false;}}showAnnotationOverlay(e,t,r,i){this.annotationContainer=document.createElement("div"),this.annotationContainer.className="bd-annotation-overlay";let s=document.createElement("div");s.className="bd-annotation-toolbar",s.innerHTML=`
|
|
562
|
+
<button class="active" data-tool="arrow">Arrow</button>
|
|
563
|
+
<button data-tool="box">Box</button>
|
|
564
|
+
<button data-tool="freehand">Draw</button>
|
|
565
|
+
<button data-tool="text">Text</button>
|
|
566
|
+
<button data-tool="blur">Blur</button>
|
|
567
|
+
<div class="bd-annotation-toolbar__spacer"></div>
|
|
568
|
+
<button data-annotation-action="undo">Undo</button>
|
|
569
|
+
<button class="bd-annotation-toolbar__cancel" data-annotation-action="cancel">Cancel</button>
|
|
570
|
+
<button class="bd-annotation-toolbar__confirm" data-annotation-action="confirm">Done</button>
|
|
571
|
+
`;let o=document.createElement("div");o.className="bd-annotation-canvas-wrap",this.annotationContainer.appendChild(s),this.annotationContainer.appendChild(o),document.body.appendChild(this.annotationContainer),this.annotationOverlay=new Ge(o,r,i),this.annotationOverlay.setScreenshotImage(e),s.addEventListener("click",l=>{let u=l.target.closest("button");if(!u)return;let c=u.dataset.tool;if(c){this.annotationOverlay?.setTool(c),s.querySelectorAll("[data-tool]").forEach(p=>p.classList.remove("active")),u.classList.add("active");return}let h=u.dataset.annotationAction;h==="undo"?this.annotationOverlay?.undo():h==="cancel"?(URL.revokeObjectURL(e.src),this.destroyAnnotation(),this.show()):h==="confirm"&&this.finishAnnotation(t,e);});}finishAnnotation(e,t){let r=this.annotationOverlay?.getOperations()??[],i=URL.createObjectURL(e);this.addAttachment({id:Ri(),type:"screenshot",blob:e,name:`screenshot-${Date.now()}.jpg`,thumbnailUrl:i,annotations:r.length>0?r:void 0}),URL.revokeObjectURL(t.src),this.destroyAnnotation(),this.show();}destroyAnnotation(){this.annotationOverlay?.destroy(),this.annotationOverlay=null,this.annotationContainer?.remove(),this.annotationContainer=null;}async handleRecord(){if(this.recording){this.stopRecording();return}try{this.mediaStream=await navigator.mediaDevices.getDisplayMedia({video:!0,audio:!1}),this.recordedChunks=[],this.mediaRecorder=new MediaRecorder(this.mediaStream,{mimeType:Tp()}),this.mediaRecorder.ondataavailable=e=>{e.data.size>0&&this.recordedChunks.push(e.data);},this.mediaRecorder.onstop=()=>{let e=new Blob(this.recordedChunks,{type:this.mediaRecorder?.mimeType||"video/webm"}),t=URL.createObjectURL(e);this.addAttachment({id:Ri(),type:"recording",blob:e,name:`recording-${Date.now()}.webm`,thumbnailUrl:t}),this.cleanupMediaStream(),this.setRecordingState(!1);},this.mediaStream.getVideoTracks()[0]?.addEventListener("ended",()=>{this.stopRecording();}),this.mediaRecorder.start(),this.setRecordingState(!0);}catch{this.cleanupMediaStream(),this.setRecordingState(false);}}stopRecording(){this.mediaRecorder&&this.mediaRecorder.state!=="inactive"&&this.mediaRecorder.stop(),this.cleanupMediaStream();}cleanupMediaStream(){this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>e.stop()),this.mediaStream=null);}setRecordingState(e){this.recording=e,e?(this.elements.recordBtn.innerHTML=`${Ba()} Stop`,this.elements.recordBtn.style.color="#ef4444"):(this.elements.recordBtn.innerHTML=`${yi()} Record`,this.elements.recordBtn.style.color="");}handleFileSelect(){let e=this.elements.fileInput.files;if(e){for(let t=0;t<e.length;t++){let r=e[t],s=r.type.startsWith("image/")?URL.createObjectURL(r):void 0;this.addAttachment({id:Ri(),type:"file",blob:r,name:r.name,thumbnailUrl:s});}this.elements.fileInput.value="";}}addAttachment(e){this.attachments.push(e),this.renderAttachments();}removeAttachment(e){let t=this.attachments.findIndex(i=>i.id===e);if(t===-1)return;let r=this.attachments[t];r.thumbnailUrl&&URL.revokeObjectURL(r.thumbnailUrl),this.attachments.splice(t,1),this.renderAttachments();}renderAttachments(){let e=this.elements.attachmentsList;if(e.innerHTML="",this.attachments.length===0){e.style.display="none";return}e.style.display="flex";for(let t of this.attachments){let r=document.createElement("div");r.className="bd-attachment";let i;t.thumbnailUrl&&t.type!=="recording"?i=`<img src="${t.thumbnailUrl}" alt="${t.name}" />`:t.type==="recording"&&t.thumbnailUrl?i=`<video src="${t.thumbnailUrl}" muted></video>`:i=`<div class="bd-attachment__icon">${_a()}</div>`,r.innerHTML=`
|
|
572
|
+
${i}
|
|
573
|
+
<button class="bd-attachment__remove" data-remove-id="${t.id}" aria-label="Remove">
|
|
574
|
+
${Na()}
|
|
575
|
+
</button>
|
|
576
|
+
`,e.appendChild(r);}}toggleReporter(){this.reporterVisible=!this.reporterVisible,this.elements.reporterToggle.classList.toggle("bd-reporter-toggle--open",this.reporterVisible),this.elements.reporterFields.classList.toggle("bd-reporter-fields--visible",this.reporterVisible);}setSubmitting(e){this.submitting=e,this.elements.sendBtn.disabled=e,e?this.elements.sendBtn.innerHTML='<span class="bd-spinner"></span> Sending...':this.elements.sendBtn.innerHTML=`${wi()} Send report`;}showSuccessView(){this.elements.body.style.display="none",this.elements.successView.style.display="flex";let e=this.elements.root.querySelector(".bd-panel__footer");e.style.display="none";}showFormView(){this.elements.body.style.display="flex",this.elements.successView.style.display="none";let e=this.elements.root.querySelector(".bd-panel__footer");e.style.display="flex";}revokeAttachmentUrls(){for(let e of this.attachments)e.thumbnailUrl&&URL.revokeObjectURL(e.thumbnailUrl);}};function kp(n){return new Promise(e=>setTimeout(e,n))}function Pp(n){return new Promise((e,t)=>{let r=new Image;r.onload=()=>e(r),r.onerror=t,r.src=n;})}function Tp(){let n=["video/webm;codecs=vp9","video/webm;codecs=vp8","video/webm","video/mp4"];for(let e of n)if(MediaRecorder.isTypeSupported(e))return e;return "video/webm"}var Br=class{host;shadowRoot;triggerBtn;panel;open=false;onSubmit=null;constructor(){this.host=document.createElement("bugdump-widget"),this.host.style.cssText="all:initial;position:fixed;z-index:2147483647;",this.shadowRoot=this.host.attachShadow({mode:"closed"});let e=document.createElement("style");e.textContent=ka(),this.shadowRoot.appendChild(e),this.triggerBtn=this.createTriggerButton(),this.shadowRoot.appendChild(this.triggerBtn),this.panel=new Nr(this.shadowRoot),this.shadowRoot.appendChild(this.panel.getElement()),this.panel.setOnClose(()=>this.close()),document.body.appendChild(this.host);}setOnSubmit(e){this.onSubmit=e,this.panel.setOnSubmit(e);}setReporterInfo(e,t){this.panel.setReporterInfo(e,t);}toggle(){this.open?this.close():this.openPanel();}openPanel(){this.open||(this.open=true,this.triggerBtn.classList.add("bd-trigger--open"),this.triggerBtn.innerHTML=kr(),this.panel.show());}close(){this.open&&(this.open=false,this.triggerBtn.classList.remove("bd-trigger--open"),this.triggerBtn.innerHTML=gi(),this.panel.hide());}isOpen(){return this.open}destroy(){this.panel.destroy(),this.host.remove();}createTriggerButton(){let e=document.createElement("button");return e.className="bd-trigger",e.setAttribute("aria-label","Report a bug"),e.innerHTML=gi(),e.addEventListener("click",()=>this.toggle()),e}};var Ei=class n{static instance=null;state;httpClient=null;consoleCollector;networkCollector;sessionReplayCollector;widget=null;constructor(){this.state=zr(),this.consoleCollector=new Rt,this.networkCollector=new Et,this.sessionReplayCollector=new $r;}static init(e){if(n.instance)return n.instance;let t=new n,r=ki(e);return t.state.config=r,t.state.initialized=true,t.httpClient=new It(r.endpoint,r.projectKey),t.consoleCollector.start(),t.networkCollector.start(),t.sessionReplayCollector.start(),t.mountWidget(),n.instance=t,t}static getInstance(){return n.instance}identify(e){this.ensureInitialized(),this.state.user=e,this.widget&&this.widget.setReporterInfo(e.name||"",e.email||"");}setContext(e){this.ensureInitialized(),this.state.customContext={...this.state.customContext,...e};}open(){this.ensureInitialized(),this.state.widgetOpen=true,this.widget?.openPanel();}close(){this.ensureInitialized(),this.state.widgetOpen=false,this.widget?.close();}collectTelemetry(){return this.ensureInitialized(),{consoleLogs:this.consoleCollector.flush(),networkRequests:this.networkCollector.flush(),sessionReplayEvents:this.sessionReplayCollector.flush(),performance:Aa(),metadata:$a()}}destroy(){this.widget?.destroy(),this.widget=null,this.consoleCollector.stop(),this.networkCollector.stop(),this.sessionReplayCollector.stop(),this.state=zr(),this.httpClient=null,n.instance=null;}getConfig(){return this.state.config}getUser(){return this.state.user}getContext(){return this.state.customContext}getHttpClient(){return this.ensureInitialized(),this.httpClient}isWidgetOpen(){return this.state.widgetOpen}mountWidget(){typeof document>"u"||(this.widget=new Br,this.widget.setOnSubmit(e=>this.handleSubmit(e)));}async handleSubmit(e){let t=this.httpClient,r=this.collectTelemetry(),i=r.metadata,s=[];for(let l of e.attachments){let a=await t.requestUpload({originalName:l.name,mimeType:l.blob.type,size:l.blob.size});await t.uploadFileToS3(a.url,a.fields,l.blob);let u=l.type==="file"?"screenshot":l.type;s.push({fileId:a.fileId,type:u,metadata:l.annotations?{annotations:l.annotations}:void 0});}let o={description:e.description,reporterName:e.reporterName||this.state.user?.name||void 0,reporterEmail:e.reporterEmail||this.state.user?.email||void 0,reporterExternalId:this.state.user?.id||void 0,pageUrl:i.url,referrerUrl:i.referrer||void 0,userAgent:i.userAgent,viewport:i.viewport,consoleLogs:r.consoleLogs,networkRequests:r.networkRequests,performance:r.performance,customContext:Object.keys(this.state.customContext).length>0?this.state.customContext:void 0,attachments:s.length>0?s:void 0};await t.submitReport(o);}ensureInitialized(){if(!this.state.initialized)throw new Error("Bugdump SDK is not initialized. Call Bugdump.init() first.")}};exports.AnnotationOverlay=Ge;exports.Bugdump=Ei;exports.BugdumpApiError=Ze;exports.captureScreenshot=Dr;exports.renderOperationsToCanvas=hl;return exports;})({});
|