@sessionvision/core 0.3.0 → 0.4.0
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 +14 -11
- package/dist/react/core/config.d.ts +14 -1
- package/dist/react/core/init.d.ts +25 -0
- package/dist/react/recorder/chunk.d.ts +59 -0
- package/dist/react/recorder/index.d.ts +46 -0
- package/dist/react/recorder/mask.d.ts +13 -0
- package/dist/react/recorder/rrweb.d.ts +19 -0
- package/dist/react/recorder/upload.d.ts +20 -0
- package/dist/react/types.d.ts +37 -1
- package/dist/sessionvision-recorder.js +13041 -0
- package/dist/sessionvision-recorder.js.map +1 -0
- package/dist/sessionvision-recorder.min.js +7 -0
- package/dist/sessionvision-recorder.min.js.map +1 -0
- package/dist/sessionvision.cjs.js +284 -12
- package/dist/sessionvision.cjs.js.map +1 -1
- package/dist/sessionvision.esm.js +284 -12
- package/dist/sessionvision.esm.js.map +1 -1
- package/dist/sessionvision.js +284 -12
- package/dist/sessionvision.js.map +1 -1
- package/dist/sessionvision.min.js +2 -2
- package/dist/sessionvision.min.js.map +1 -1
- package/dist/types/core/config.d.ts +14 -1
- package/dist/types/core/init.d.ts +25 -0
- package/dist/types/recorder/chunk.d.ts +59 -0
- package/dist/types/recorder/index.d.ts +46 -0
- package/dist/types/recorder/mask.d.ts +13 -0
- package/dist/types/recorder/rrweb.d.ts +19 -0
- package/dist/types/recorder/upload.d.ts +20 -0
- package/dist/types/types.d.ts +37 -1
- package/dist/vue/core/config.d.ts +14 -1
- package/dist/vue/core/init.d.ts +25 -0
- package/dist/vue/recorder/chunk.d.ts +59 -0
- package/dist/vue/recorder/index.d.ts +46 -0
- package/dist/vue/recorder/mask.d.ts +13 -0
- package/dist/vue/recorder/rrweb.d.ts +19 -0
- package/dist/vue/recorder/upload.d.ts +20 -0
- package/dist/vue/types.d.ts +37 -1
- package/package.json +5 -2
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Session Vision Core v0.4.0
|
|
3
|
+
* (c) 2026 Session Vision
|
|
4
|
+
* Released under the MIT License
|
|
5
|
+
*/
|
|
6
|
+
var SessionVisionRecorder=function(e){"use strict";const t="sessionvision_anonymous_id",r="sessionvision_session";function s(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();if("undefined"!=typeof crypto&&"function"==typeof crypto.getRandomValues){const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128,function(e){const t=[];for(let r=0;e.length>r;r++)t.push(e[r].toString(16).padStart(2,"0"));return[t.slice(0,4).join(""),t.slice(4,6).join(""),t.slice(6,8).join(""),t.slice(8,10).join(""),t.slice(10,16).join("")].join("-")}(e)}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function n(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}function i(){try{const e="__sessionvision_test__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}function o(){try{const e="__sessionvision_test__";return window.sessionStorage.setItem(e,e),window.sessionStorage.removeItem(e),!0}catch{return!1}}function a(e,t){if(!o())return!1;try{return window.sessionStorage.setItem(e,JSON.stringify(t)),!0}catch{return!1}}function l(e){if(!i())return null;try{return window.localStorage.getItem(e)}catch{return null}}let c=null;function h(){if(c)return c;const e=l(t);return e&&n(e)?(c=e,c):(c=s(),function(e,t){if(!i())return!1;try{return window.localStorage.setItem(e,t),!0}catch{return!1}}(t,c),c)}let u=null,p=18e5;function d(){const e=Date.now();if(u&&p>e-u.lastActivity)return f(u.id),u.id;const t=function(e){if(!o())return null;try{const t=window.sessionStorage.getItem(e);return null===t?null:JSON.parse(t)}catch{return null}}(r);return t&&n(t.id)&&p>e-t.lastActivity?(f(t.id),t.id):function(){const e=s();return u={id:e,lastActivity:Date.now()},a(r,u),e}()}function f(e){u={id:e,lastActivity:Date.now()},a(r,u)}let m=null;function g(){if(null!==m)return m;const e=l("sessionvision_user_id");return e?(m=e,m):null}class y{constructor(e){this.buffer=[],this.bufferSize=0,this.chunkNumber=0,this.flushTimer=null,this.tags={},this.chunkStartTime=0,this.hasFullSnapshot=!1,this.started=!1,this.handleVisibilityChange=()=>{"hidden"===document.visibilityState&&this.flush()},this.handleBeforeUnload=()=>{this.flush()},this.config=e.config,this.emit=e.emit,this.lastFlush=Date.now()}start(){this.started||(this.started=!0,this.lastFlush=Date.now(),this.flushTimer=setInterval(()=>{this.shouldFlush()&&this.flush()},5e3),"undefined"!=typeof document&&(document.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("beforeunload",this.handleBeforeUnload)))}stop(){this.started&&(this.started=!1,this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),"undefined"!=typeof document&&(document.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("beforeunload",this.handleBeforeUnload)),this.flush())}addEvent(e){this.started&&(0===this.buffer.length&&(this.chunkStartTime=e.timestamp),this.buffer.push(e),this.bufferSize+=JSON.stringify(e).length,2===e.type&&(this.hasFullSnapshot=!0),65536>this.bufferSize||this.flush())}setTags(e){this.tags={...this.tags,...e}}shouldFlush(){return!(0===this.buffer.length||65536>this.bufferSize&&5e3>Date.now()-this.lastFlush)}flush(){if(0===this.buffer.length)return;const e=this.buffer,t=0===this.chunkNumber,r=this.chunkStartTime,s=e[e.length-1].timestamp,n=this.hasFullSnapshot,i=Object.keys(this.tags).length>0?{...this.tags}:void 0;this.chunkNumber++,this.buffer=[],this.bufferSize=0,this.lastFlush=Date.now(),this.chunkStartTime=0,this.hasFullSnapshot=!1,i&&(this.tags={}),async function(e,t){const r=e.ingestHost+"/api/v1/ingest/events",s={$chunk_number:t.chunkNumber,$start_time:t.startTime,$end_time:t.endTime,$event_count:t.events.length,$full_snapshot_included:t.fullSnapshotIncluded,$events:t.events};t.tags&&Object.keys(t.tags).length>0&&(s.$tags=t.tags),t.isFirstChunk&&(s.$initial_url=window.location.href,s.$initial_path=window.location.pathname,s.$referrer=document.referrer,s.$screen_width=window.screen.width,s.$screen_height=window.screen.height);const n={projectToken:e.projectToken,events:[{event:"$recording",sessionId:d(),anonymousId:h(),userId:g(),timestamp:t.endTime,properties:s}]};for(let e=0;2>e;e++)try{const e=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0});if(e.ok||202===e.status)return!0;if(402===e.status)return!1;if(e.status>=400&&500>e.status)return!1;throw Error("Server error: "+e.status)}catch{0===e&&await new Promise(e=>setTimeout(e,2e3))}return!1}(this.config,{chunkNumber:this.chunkNumber,startTime:r,endTime:s,events:e,fullSnapshotIncluded:n,tags:i,isFirstChunk:t}).then(e=>{e||(this.config.debug&&console.warn("[SessionVision] Failed to upload recording chunk"),this.emit("recording:error",{message:"Chunk upload failed"}))}).catch(()=>{})}getChunkNumber(){return this.chunkNumber}getBufferSize(){return this.bufferSize}}var w,b=Object.defineProperty,v=(e,t,r)=>((e,t,r)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),S=Object.defineProperty,C=(e,t,r)=>((e,t,r)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),I=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(I||{});const k={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},x={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},O={};function M(e){if(O[e])return O[e];const t=globalThis[e],r=t.prototype,s=e in k?k[e]:void 0,n=!(!s||!s.every(e=>{var t,s;return!!(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:(""+s).includes("[native code]"))})),i=e in x?x[e]:void 0,o=!(!i||!i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:(""+t).includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return O[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(s),i?O[e]=i:r}catch{return r}}const A={};function R(e,t,r){var s;const n=`${e}.${r+""}`;if(A[n])return A[n].call(t);const i=M(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(A[n]=o,o.call(t)):t[r]}const E=function(e){return R("Node",e,"childNodes")},T=function(e){return R("Node",e,"parentNode")},N=function(e){return R("Node",e,"parentElement")},L=function(e){return R("Node",e,"textContent")},D=function(e){return e&&"host"in e?R("ShadowRoot",e,"host"):null},F=function(e){return e&&"shadowRoot"in e?R("Element",e,"shadowRoot"):null};function P(e){return e.nodeType===e.ELEMENT_NODE}function _(e){const t=e&&"host"in e&&"mode"in e&&D(e)||null;return!(!t||!("shadowRoot"in t)||F(t)!==e)}function U(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function z(e){try{const r=e.rules||e.cssRules;if(!r)return null;let s=e.href;!s&&e.ownerNode&&(s=e.ownerNode.baseURI);return(t=Array.from(r,e=>B(e,s)).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}var t}function B(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=z(e.styleSheet)||function(e){const{cssText:t}=e;if(3>t.split('"').length)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(r){t=e.cssText}return e.styleSheet.href?K(t,e.styleSheet.href):t}{let r=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=r.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t?K(r,t):r}}class j{constructor(){C(this,"idNodeMap",new Map),C(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?(null==(t=this.getMeta(e))?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){this.idNodeMap.set(t.id,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function W({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:i}){let o=n||"";const a=s&&V(s);return(t[r.toLowerCase()]||a&&t[a])&&(o=i?i(o,e):"*".repeat(o.length)),o}function V(e){return e.toLowerCase()}const G="__rrweb_original__";function Z(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?V(t):null}function X(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}const s=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==s?void 0:s[1])??null}const Y=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,J=/^(?:[a-z+]+:)?\/\//i,H=/^www\..*/i,$=/^(data:)([^,]*),(.*)/i;function K(e,t){return(e||"").replace(Y,(e,r,s,n,i,o)=>{const a=s||i||o,l=r||n||"";if(!a)return e;if(J.test(a)||H.test(a))return`url(${l}${a}${l})`;if($.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const c=t.split("/"),h=a.split("/");c.pop();for(const e of h)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${l})`})}function Q(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}let q=1;const ee=RegExp("[^a-z0-9-_:]");function te(){return q++}let re,se;const ne=/^[^ \t\n\r\u000c]+/,ie=/^[, \t\n\r\u000c]+/,oe=new WeakMap;function ae(e,t){return t&&""!==t.trim()?le(e,t):t}function le(e,t){let r=oe.get(e);if(r||(r=e.createElement("a"),oe.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function ce(e,t,r,s){return s?"src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0]||"background"===r&&["table","td","th"].includes(t)?ae(e,s):"srcset"===r?function(e,t){if(""===t.trim())return t;let r=0;function s(e){let s;const n=e.exec(t.substring(r));return n?(s=n[0],r+=s.length,s):""}const n=[];for(;s(ie),t.length>r;){let i=s(ne);if(","===i.slice(-1))i=ae(e,i.substring(0,i.length-1)),n.push(i);else{let s="";i=ae(e,i);let o=!1;for(;;){const e=t.charAt(r);if(""===e){n.push((i+s).trim());break}if(o)")"===e&&(o=!1);else{if(","===e){r+=1,n.push((i+s).trim());break}"("===e&&(o=!0)}s+=e,r+=1}}}return n.join(", ")}(e,s):"style"===r?K(s,le(e)):"object"===t&&"data"===r?ae(e,s):s:s}function he(e,t,r){return["video","audio"].includes(e)&&"autoplay"===t}function ue(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&ue(T(e),t,r);for(let r=e.classList.length;r--;)if(t.test(e.classList[r]))return!0;return!!r&&ue(T(e),t,r)}function pe(e,t,r,s){let n;if(P(e)){if(n=e,!E(n).length)return!1}else{if(null===N(e))return!1;n=N(e)}try{if("string"==typeof t){if(s){if(n.closest("."+t))return!0}else if(n.classList.contains(t))return!0}else if(ue(n,t,s))return!0;if(r)if(s){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(e){}return!1}function de(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:o,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:c,maskInputFn:h,dataURLOptions:u={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:m=!1,cssCaptured:g=!1}=t,y=function(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return 1===r?void 0:r}(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:I.Document,childNodes:[],compatMode:e.compatMode}:{type:I.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:I.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){const{doc:r,blockClass:s,blockSelector:n,inlineStylesheet:i,maskInputOptions:o={},maskInputFn:a,dataURLOptions:l={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:u,newlyAddedElement:p=!1,rootId:d}=t,f=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;)if(t.test(e.classList[r]))return!0;if(r)return e.matches(r)}catch(e){}return!1}(e,s,n),m=function(e){if(e instanceof HTMLFormElement)return"form";const t=V(e.tagName);return ee.test(t)?"div":t}(e);let g={};const y=e.attributes.length;for(let t=0;y>t;t++){const s=e.attributes[t];he(m,s.name)||(g[s.name]=ce(r,m,V(s.name),s.value))}if("link"===m&&i){const t=Array.from(r.styleSheets).find(t=>t.href===e.href);let s=null;t&&(s=z(t)),s&&(delete g.rel,delete g.href,g._cssText=s)}if("style"===m&&e.sheet){let t=z(e.sheet);t&&(e.childNodes.length>1&&(t=function(e,t){return function(e,t,r=!1){const s=Array.from(t.childNodes),n=[];let i=0;if(s.length>1&&e&&"string"==typeof e){let t=Q(e,r);const o=t.length/e.length;for(let a=1;s.length>a;a++)if(s[a].textContent&&"string"==typeof s[a].textContent){const l=Q(s[a].textContent,r),c=100;let h=3;for(;l.length>h&&(l[h].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,h),1));h++);for(;l.length>h;h++){let u=l.substring(0,h),p=t.split(u),d=-1;if(2===p.length)d=p[0].length;else if(p.length>2&&""===p[0]&&""!==s[a-1].textContent)d=t.indexOf(u,1);else if(1===p.length){if(u=u.substring(0,u.length-1),p=t.split(u),1>=p.length)return n.push(e),n;h=c+1}else h===l.length-1&&(d=t.indexOf(u));if(p.length>=2&&h>c){const e=s[a-1].textContent;if(e&&"string"==typeof e){const r=Q(e).length;d=t.indexOf(u,r)}-1===d&&(d=p[0].length)}if(-1!==d){let a=Math.floor(d/o);for(;a>0&&e.length>a;){if(i+=1,i>50*s.length)return n.push(e),n;const l=Q(e.substring(0,a),r);if(l.length===d){n.push(e.substring(0,a)),e=e.substring(a),t=t.substring(d);break}d>l.length?a+=Math.max(1,Math.floor((d-l.length)/o)):a-=Math.max(1,Math.floor((l.length-d)*o))}break}}}}return n.push(e),n}(e,t).join("/* rr_split */")}(t,e)),g._cssText=t)}if(["input","textarea","select"].includes(m)){const t=e.value,r=e.checked;"radio"!==g.type&&"checkbox"!==g.type&&"submit"!==g.type&&"button"!==g.type&&t?g.value=W({element:e,type:Z(e),tagName:m,value:t,maskInputOptions:o,maskInputFn:a}):r&&(g.checked=r)}if("option"===m&&(e.selected&&!o.select?g.selected=!0:delete g.selected),"dialog"===m&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),"canvas"===m&&h)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let r=0;e.width>r;r+=50)for(let s=0;e.height>s;s+=50){const n=t.getImageData;if(new Uint32Array((G in n?n[G]:n).call(t,r,s,Math.min(50,e.width-r),Math.min(50,e.height-s)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(g.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),s=r.createElement("canvas");s.width=e.width,s.height=e.height,t!==s.toDataURL(l.type,l.quality)&&(g.rr_dataURL=t)}if("img"===m&&c){re||(re=r.createElement("canvas"),se=re.getContext("2d"));const t=e,s=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{re.width=t.naturalWidth,re.height=t.naturalHeight,se.drawImage(t,0,0),g.rr_dataURL=re.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i));console.warn(`Cannot inline img src=${s}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(n?g.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}if(["audio","video"].includes(m)){const t=g;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}if(p||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),f){const{width:t,height:r}=e.getBoundingClientRect();g={class:g.class,rr_width:t+"px",rr_height:r+"px"}}let w;"iframe"!==m||u(g.src)||(e.contentDocument||(g.rr_src=g.src),delete g.src);try{customElements.get(m)&&(w=!0)}catch(e){}return{type:I.Element,tagName:m,attributes:g,childNodes:[],isSVG:(b=e,!("svg"!==b.tagName&&!b.ownerSVGElement)||void 0),needBlock:f,rootId:d,isCustom:w};var b}(e,{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:a,maskInputOptions:l,maskInputFn:h,dataURLOptions:u,inlineImages:p,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:m,rootId:y});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:i}=t,o=T(e),a=o&&o.tagName;let l="";const c="STYLE"===a||void 0,h="SCRIPT"===a||void 0;return h?l="SCRIPT_PLACEHOLDER":i||(l=L(e),c&&l&&(l=K(l,le(t.doc)))),!c&&!h&&l&&r&&(l=s?s(l,N(e)):l.replace(/[\S]/g,"*")),{type:I.Text,textContent:l||"",rootId:n}}(e,{doc:r,needsMask:o,maskTextFn:c,rootId:y,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:I.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:I.Comment,textContent:L(e)||"",rootId:y};default:return!1}}function fe(e){return null==e?"":e.toLowerCase()}function me(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:e||{}}function ge(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:C=()=>!1,newlyAddedElement:k=!1,cssCaptured:x=!1}=t;let{needsMask:O}=t,{preserveWhiteSpace:M=!0}=t;O||(O=pe(e,o,a,void 0===O));const A=de(e,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:O,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,keepIframeSrcFn:C,newlyAddedElement:k,cssCaptured:x});if(!A)return console.warn(e,"not serialized"),null;let R;R=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===I.Comment)return!0;if(e.type===I.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===X(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(fe(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===fe(e.attributes.name)||"icon"===fe(e.attributes.rel)||"apple-touch-icon"===fe(e.attributes.rel)||"shortcut icon"===fe(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&fe(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(fe(e.attributes.property).match(/^(og|twitter|fb):/)||fe(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===fe(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===fe(e.attributes.name)||"googlebot"===fe(e.attributes.name)||"bingbot"===fe(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===fe(e.attributes.name)||"generator"===fe(e.attributes.name)||"framework"===fe(e.attributes.name)||"publisher"===fe(e.attributes.name)||"progid"===fe(e.attributes.name)||fe(e.attributes.property).match(/^article:/)||fe(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===fe(e.attributes.name)||"yandex-verification"===fe(e.attributes.name)||"csrf-token"===fe(e.attributes.name)||"p:domain_verify"===fe(e.attributes.name)||"verify-v1"===fe(e.attributes.name)||"verification"===fe(e.attributes.name)||"shopify-checkout-api-token"===fe(e.attributes.name)))return!0}}return!1}(A,d)||!M&&A.type===I.Text&&!A.textContent.replace(/^\s+|\s+$/gm,"").length?-2:te();const N=Object.assign(A,{id:R});if(s.add(e,N),-2===R)return null;y&&y(e);let L=!l;if(N.type===I.Element){L=L&&!N.needBlock,delete N.needBlock;const t=F(e);t&&U(t)&&(N.isShadowHost=!0)}if((N.type===I.Document||N.type===I.Element)&&L){d.headWhitespace&&N.type===I.Element&&"head"===N.tagName&&(M=!1);const t={doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:M,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:S,keepIframeSrcFn:C,cssCaptured:!1};if(N.type===I.Element&&"textarea"===N.tagName&&void 0!==N.attributes.value);else{N.type===I.Element&&void 0!==N.attributes._cssText&&"string"==typeof N.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(E(e))){const e=ge(r,t);e&&N.childNodes.push(e)}}let k=null;if(P(e)&&(k=F(e)))for(const e of Array.from(E(k))){const r=ge(e,t);r&&(U(k)&&(r.isShadow=!0),N.childNodes.push(r))}}const D=T(e);return D&&_(D)&&U(D)&&(N.isShadow=!0),N.type===I.Element&&"iframe"===N.tagName&&function(e,t,r){const s=e.contentWindow;if(!s)return;let n,i=!1;try{n=s.document.readyState}catch(e){return}if("complete"!==n){const s=setTimeout(()=>{i||(t(),i=!0)},r);return void e.addEventListener("load",()=>{clearTimeout(s),i=!0,t()})}const o="about:blank";if(s.location.href!==o||e.src===o||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=e.contentDocument;if(t&&w){const r=ge(t,{doc:t,mirror:s,blockClass:n,blockSelector:i,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:M,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:S,keepIframeSrcFn:C});r&&w(e,r)}},b),N.type===I.Element&&"link"===N.tagName&&"string"==typeof N.attributes.rel&&("stylesheet"===N.attributes.rel||"preload"===N.attributes.rel&&"string"==typeof N.attributes.href&&"css"===X(N.attributes.href))&&function(e,t,r){let s,n=!1;try{s=e.sheet}catch(e){return}if(s)return;const i=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(i),n=!0,t()})}(e,()=>{if(v){const t=ge(e,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:M,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:S,keepIframeSrcFn:C});t&&v(e,t)}},S),N}function ye(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}var we={exports:{}},be=String,ve=function(){return{isColorSupported:!1,reset:be,bold:be,dim:be,italic:be,underline:be,inverse:be,hidden:be,strikethrough:be,black:be,red:be,green:be,yellow:be,blue:be,magenta:be,cyan:be,white:be,gray:be,bgBlack:be,bgRed:be,bgGreen:be,bgYellow:be,bgBlue:be,bgMagenta:be,bgCyan:be,bgWhite:be}};we.exports=ve(),we.exports.createColors=ve;var Se=we.exports;const Ce=ye(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ie=Se,ke=Ce,xe=class e extends Error{constructor(t,r,s,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Ie.isColorSupported),ke&&e&&(t=ke(t));let r,s,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=(o+"").length;if(e){let{bold:e,gray:t,red:n}=Ie.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(o)+e+"\n "+t+r("^")}return" "+s(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Oe=xe;xe.default=xe;var Me={};Me.isClean=Symbol("isClean"),Me.my=Symbol("my");const Ae={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Re=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes?this.block(e,r+s):this.builder(r+s+((e.raws.between||"")+(t?";":"")),e)}beforeAfter(e,t){let r;r=this.raw(e,null,"decl"===e.type?"beforeDecl":"comment"===e.type?"beforeComment":"before"===t?"beforeRule":"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;n>e;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;e.nodes.length>s;s++){let n=e.nodes[s],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==s||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"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Ae[r];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[r])return i.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((o=r)[0].toUpperCase()+o.slice(1));this[n]?s=this[n](i,e):i.walk(e=>{if(s=e.raws[t],void 0!==s)return!1})}var o;return void 0===s&&(s=Ae[r]),i.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.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 Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Ee=Re;Re.default=Re;let Te=Ee;function Ne(e,t){new Te(t).stringify(e)}var Le=Ne;Ne.default=Ne;let{isClean:De,my:Fe}=Me,Pe=Oe,_e=Ee,Ue=Le;function ze(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],i=typeof n;"parent"===s&&"object"===i?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map(e=>ze(e,r)):("object"===i&&null!==n&&(n=ze(n)),r[s]=n)}return r}let Be=class{constructor(e={}){this.raws={},this[De]=!1,this[Fe]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])this.append("function"==typeof r.clone?r.clone():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=ze(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:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Pe(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[De]){this[De]=!1;let e=this;for(;e=e.parent;)e[De]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=""+this).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||""+this,s=this.source.start.column,n=this.source.start.line;for(let t=0;e>t;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=""+this,n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}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}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(t.line>r.line||r.line===t.line&&t.column>=r.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new _e).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let i=t.get(s.input);null==i&&(i=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:i,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ue){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var je=Be;Be.default=Be;let We=je,Ve=class extends We{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:e.value+""}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Ge=Ve;Ve.default=Ve;var Ze={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Xe,SourceMapGenerator:Ye}=Ce,{existsSync:Je,readFileSync:He}=Ce,{dirname:$e,join:Ke}=Ce,Qe=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=this.loadMap(t.from,t.map?t.map.prev:void 0);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=$e(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Xe(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?""+Buffer.from(t,"base64"):window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=$e(e),Je(e))return this.mapFile=e,(""+He(e,"utf-8")).trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Xe)return""+Ye.fromSourceMap(t);if(t instanceof Ye)return""+t;if(this.isMap(t))return JSON.stringify(t);throw Error("Unsupported previous source map format: "+t)}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw Error("Unable to load previous source map: "+r);return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Ke($e(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}};var qe=Qe;Qe.default=Qe;let{SourceMapConsumer:et,SourceMapGenerator:tt}=Ce,{fileURLToPath:rt,pathToFileURL:st}=Ce,{isAbsolute:nt,resolve:it}=Ce,{nanoid:ot}=Ze,at=Ce,lt=Oe,ct=qe,ht=Symbol("fromOffsetCache"),ut=!(!et||!tt),pt=!(!it||!nt),dt=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=""+e,"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(this.file=!pt||/^\w+:\/\//.test(t.from)||nt(t.from)?t.from:it(t.from)),pt&&ut){let e=new ct(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+ot(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,i,o;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);i=e.line,o=e.col}else i=s.line,o=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,i,o);return n=a?new lt(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new lt(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:o,line:i},this.css,this.file,s.plugin),n.input={column:r,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(st&&(n.input.url=""+st(this.file)),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[ht])r=this[ht];else{let e=this.css.split("\n");r=Array(e.length);let t=0;for(let s=0,n=e.length;n>s;s++)r[s]=t,t+=e[s].length+1;this[ht]=r}t=r[r.length-1];let s=0;if(t>e){let t,n=r.length-2;for(;n>s;)if(t=s+(n-s>>1),r[t]>e)n=t-1;else{if(r[t+1]>e){s=t;break}s=t+1}}else s=r.length-1;return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:it(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=o.originalPositionFor({column:s,line:r})),i=nt(a.source)?st(a.source):new URL(a.source,this.map.consumer().sourceRoot||st(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:""+i};if("file:"===i.protocol){if(!rt)throw Error("file: protocol is not available in this PostCSS build");l.file=rt(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var ft=dt;dt.default=dt,at&&at.registerInput&&at.registerInput(dt);let{SourceMapConsumer:mt,SourceMapGenerator:gt}=Ce,{dirname:yt,relative:wt,resolve:bt,sep:vt}=Ce,{pathToFileURL:St}=Ce,Ct=ft,It=!(!mt||!gt),kt=!!(yt&&bt&&wt&&vt);var xt=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(""+this.map):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||yt(e.file);!1===this.mapOpts.sourcesContent?(t=new mt(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),kt&&It&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=gt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new gt({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new gt({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=r,i.generated.column=s-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=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(r+=e.length,t=o.lastIndexOf("\n"),s=o.length-t):s+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.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=r,i.generated.column=s-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=r,i.generated.column=s-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?yt(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=yt(bt(r,this.mapOpts.annotation)));let s=wt(r,e);return this.memoizedPaths.set(e,s),s}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 Ct(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,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(St){let t=""+St(e);return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===vt&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Ot=je,Mt=class extends Ot{constructor(e){super(e),this.type="comment"}};var At=Mt;Mt.default=Mt;let Rt,Et,Tt,Nt,{isClean:Lt,my:Dt}=Me,Ft=Ge,Pt=At,_t=je;function Ut(e){return e.map(e=>(e.nodes&&(e.nodes=Ut(e.nodes)),delete e.source,e))}function zt(e){if(e[Lt]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)zt(t)}let Bt=class e extends _t{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}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,r,s=this.getIterator();for(;this.proxyOf.nodes.length>this.indexes[s]&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}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)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],r>s&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s],0===s&&"prepend").reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s>r||(this.indexes[e]=r+n.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=Ut(Rt(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=t.value+""),t=[new Ft(t)]}else if(t.selector)t=[new Et(t)];else if(t.name)t=[new Tt(t)];else{if(!t.text)throw Error("Unknown node type in node creation");t=[new Pt(t)]}return t.map(t=>(t[Dt]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Lt]&&zt(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.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){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],e>t||(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?this.walk(e instanceof RegExp?(r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}:(r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?this.walk(e instanceof RegExp?(r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}:(r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?this.walk(e instanceof RegExp?(r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}:(r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}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]}};Bt.registerParse=e=>{Rt=e},Bt.registerRule=e=>{Et=e},Bt.registerAtRule=e=>{Tt=e},Bt.registerRoot=e=>{Nt=e};var jt=Bt;Bt.default=Bt,Bt.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Tt.prototype):"rule"===e.type?Object.setPrototypeOf(e,Et.prototype):"decl"===e.type?Object.setPrototypeOf(e,Ft.prototype):"comment"===e.type?Object.setPrototypeOf(e,Pt.prototype):"root"===e.type&&Object.setPrototypeOf(e,Nt.prototype),e[Dt]=!0,e.nodes&&e.nodes.forEach(e=>{Bt.rebuild(e)})};let Wt,Vt,Gt=jt,Zt=class extends Gt{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Wt(new Vt,this,e).stringify()}};Zt.registerLazyResult=e=>{Wt=e},Zt.registerProcessor=e=>{Vt=e};var Xt=Zt;Zt.default=Zt;let Yt=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Jt=Yt;Yt.default=Yt;let Ht=Jt,$t=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 Ht(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Kt=$t;$t.default=$t;const Qt=/[\t\n\f\r "#'()/;[\\\]{}]/g,qt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,er=/.[\r\n"'(/\\]/,tr=/[\da-f]/i;let rr=jt,sr=class extends rr{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var nr=sr;sr.default=sr,rr.registerAtRule(sr);let ir,or,ar=jt,lr=class extends ar{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new ir(new or,this,e).stringify()}};lr.registerLazyResult=e=>{ir=e},lr.registerProcessor=e=>{or=e};var cr=lr;lr.default=lr,ar.registerRoot(lr);let hr={comma:e=>hr.split(e,[","],!0),space:e=>hr.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(i=!0),i?(""!==n&&s.push(n.trim()),n="",i=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var ur=hr;hr.default=hr;let pr=jt,dr=ur,fr=class extends pr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return dr.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var mr=fr;fr.default=fr,pr.registerRule(fr);let gr=Ge,yr=At,wr=nr,br=cr,vr=mr;const Sr={empty:!0,space:!0};let Cr=jt,Ir=class{constructor(e){this.input=e,this.root=new br,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,n=new wr;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(n.source.end=this.getPosition((e=a[a.length-1])[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return i}this.doubleColon(t)}s=t}return!1}comment(e){let t=new yr;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 e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=function(e,t={}){let r,s,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case 10:case 32:case 9:case 13:case 12:s=m;do{s+=1,r=p.charCodeAt(s)}while(32===r||10===r||9===r||13===r||12===r);u=["space",p.slice(m,s)],m=s-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(r);u=[e,e,m];break}case 40:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&39!==h&&34!==h&&32!==h&&10!==h&&9!==h&&12!==h&&13!==h){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;92===p.charCodeAt(l-1);)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),i=p.slice(m,s+1),-1===s||er.test(i)?u=["(","(",m]:(u=["brackets",i,m,s],m=s);break;case 39:case 34:n=39===r?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;92===p.charCodeAt(l-1);)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case 64:Qt.lastIndex=m+1,Qt.test(p),s=0===Qt.lastIndex?p.length-1:Qt.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case 92:for(s=m,o=!0;92===p.charCodeAt(s+1);)s+=1,o=!o;if(r=p.charCodeAt(s+1),o&&47!==r&&32!==r&&10!==r&&9!==r&&13!==r&&12!==r&&(s+=1,tr.test(p.charAt(s)))){for(;tr.test(p.charAt(s+1));)s+=1;32===p.charCodeAt(s+1)&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:47===r&&42===p.charCodeAt(m+1)?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):(qt.lastIndex=m+1,qt.test(p),s=0===qt.lastIndex?p.length-1:qt.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}}(this.input)}decl(e,t){let r=new gr;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\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 i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=o.map(e=>e[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 vr;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),i.push("("===r?")":"]");else if(o&&s&&"{"===r)n||(n=l),i.push("}");else if(0===i.length){if(";"===r){if(s)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&s){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,i,o,a,l=r.length,c="",h=!0;for(let e=0;l>e;e+=1)n=r[e],i=n[0],"space"!==i||e!==l-1||s?"comment"===i?(a=r[e-1]?r[e-1][0]:"empty",o=r[e+1]?r[e+1][0]:"empty",Sr[a]||Sr[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new vr;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],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;e.length>s;s++)r+=e[s][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})}},kr=ft;function xr(e,t){let r=new kr(e,t),s=new Ir(r);try{s.parse()}catch(e){throw e}return s.root}var Or=xr;xr.default=xr,Cr.registerParse(xr);let{isClean:Mr,my:Ar}=Me,Rr=xt,Er=Le,Tr=jt,Nr=Xt,Lr=Kt,Dr=Or,Fr=cr;const Pr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},_r={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Ur={Once:!0,postcssPlugin:!0,prepare:!0};function zr(e){return"object"==typeof e&&"function"==typeof e.then}function Br(e){let t=!1,r=Pr[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function jr(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Br(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Wr(e){return e[Mr]=!1,e.nodes&&e.nodes.forEach(e=>Wr(e)),e}let Vr={},Gr=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof Lr)n=Wr(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=Dr;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[Ar]&&Tr.rebuild(n)}else n=Wr(r);this.result=new Lr(t,n,s),this.helpers={...Vr,postcss:Vr,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}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 Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin||(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!_r[r]&&/^[A-Z]/.test(r))throw Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ur[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;this.plugins.length>e;e++){let t=this.runOnRoot(this.plugins[e]);if(zr(t))try{await t}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Mr];){e[Mr]=!0;let t=[jr(e)];for(;t.length>0;){let e=this.visitTick(t);if(zr(e))try{await e}catch(e){throw this.handleError(e,t[t.length-1].node)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return zr(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Er;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Rr(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(zr(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Mr];)e[Mr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(zr(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&s.length>t.visitorIndex){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[Mr])return s[Mr]=!0,void e.push(jr(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;n.length>t.eventIndex;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[Mr]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Mr]=!0;let t=Br(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[Mr]||this.walkSync(e)});else{let t=this.listeners[r];if(t&&this.visitSync(t,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"}};Gr.registerPostcss=e=>{Vr=e};var Zr=Gr;Gr.default=Gr,Fr.registerLazyResult(Gr),Nr.registerLazyResult(Gr);let Xr=xt,Yr=Le,Jr=Or;const Hr=Kt;let $r=class{constructor(e,t,r){let s;t=""+t,this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=Yr;this.result=new Hr(this._processor,s,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Xr(n,s,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}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=Jr;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Kr=$r;$r.default=$r;let Qr=Kr,qr=Zr,es=Xt,ts=cr,rs=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"!=typeof r||!r.parse&&!r.stringify)throw Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new qr(this,e,t):new Qr(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var ss=rs;rs.default=rs,ts.registerProcessor(rs),es.registerProcessor(rs);let ns=Ge,is=qe,os=At,as=nr,ls=ft,cs=cr,hs=mr;function us(e,t){if(Array.isArray(e))return e.map(e=>us(e));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:ls.prototype};r.map&&(r.map={...r.map,__proto__:is.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>us(e,t))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new cs(s);if("decl"===s.type)return new ns(s);if("rule"===s.type)return new hs(s);if("comment"===s.type)return new os(s);if("atrule"===s.type)return new as(s);throw Error("Unknown node type: "+e.type)}var ps=us;us.default=us;let ds=Oe,fs=Ge,ms=Zr,gs=jt,ys=ss,ws=Le,bs=ps,vs=Xt,Ss=Jt,Cs=At,Is=nr,ks=Kt,xs=ft,Os=Or,Ms=ur,As=mr,Rs=cr,Es=je;function Ts(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new ys(e)}Ts.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new ys).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return Ts([n(r)]).process(e,t)},n},Ts.stringify=ws,Ts.parse=Os,Ts.fromJSON=bs,Ts.list=Ms,Ts.comment=e=>new Cs(e),Ts.atRule=e=>new Is(e),Ts.decl=e=>new fs(e),Ts.rule=e=>new As(e),Ts.root=e=>new Rs(e),Ts.document=e=>new vs(e),Ts.CssSyntaxError=ds,Ts.Declaration=fs,Ts.Container=gs,Ts.Processor=ys,Ts.Document=vs,Ts.Comment=Cs,Ts.Warning=Ss,Ts.AtRule=Is,Ts.Result=ks,Ts.Input=xs,Ts.Rule=As,Ts.Root=Rs,Ts.Node=Es,ms.registerPostcss(Ts),Ts.default=Ts;var Ns=Object.defineProperty,Ls=(e,t,r)=>((e,t,r)=>t in e?Ns(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Ds(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}var Fs={exports:{}},Ps=String,_s=function(){return{isColorSupported:!1,reset:Ps,bold:Ps,dim:Ps,italic:Ps,underline:Ps,inverse:Ps,hidden:Ps,strikethrough:Ps,black:Ps,red:Ps,green:Ps,yellow:Ps,blue:Ps,magenta:Ps,cyan:Ps,white:Ps,gray:Ps,bgBlack:Ps,bgRed:Ps,bgGreen:Ps,bgYellow:Ps,bgBlue:Ps,bgMagenta:Ps,bgCyan:Ps,bgWhite:Ps}};Fs.exports=_s(),Fs.exports.createColors=_s;var Us=Fs.exports;const zs=Ds(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Bs=Us,js=zs,Ws=class e extends Error{constructor(t,r,s,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Bs.isColorSupported),js&&e&&(t=js(t));let r,s,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=(o+"").length;if(e){let{bold:e,gray:t,red:n}=Bs.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(o)+e+"\n "+t+r("^")}return" "+s(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Vs=Ws;Ws.default=Ws;var Gs={};Gs.isClean=Symbol("isClean"),Gs.my=Symbol("my");const Zs={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Xs=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes?this.block(e,r+s):this.builder(r+s+((e.raws.between||"")+(t?";":"")),e)}beforeAfter(e,t){let r;r=this.raw(e,null,"decl"===e.type?"beforeDecl":"comment"===e.type?"beforeComment":"before"===t?"beforeRule":"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;n>e;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;e.nodes.length>s;s++){let n=e.nodes[s],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==s||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"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Zs[r];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[r])return i.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((o=r)[0].toUpperCase()+o.slice(1));this[n]?s=this[n](i,e):i.walk(e=>{if(s=e.raws[t],void 0!==s)return!1})}var o;return void 0===s&&(s=Zs[r]),i.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.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 Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Ys=Xs;Xs.default=Xs;let Js=Ys;function Hs(e,t){new Js(t).stringify(e)}var $s=Hs;Hs.default=Hs;let{isClean:Ks,my:Qs}=Gs,qs=Vs,en=Ys,tn=$s;function rn(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],i=typeof n;"parent"===s&&"object"===i?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map(e=>rn(e,r)):("object"===i&&null!==n&&(n=rn(n)),r[s]=n)}return r}let sn=class{constructor(e={}){this.raws={},this[Ks]=!1,this[Qs]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])this.append("function"==typeof r.clone?r.clone():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=rn(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:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new qs(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Ks]){this[Ks]=!1;let e=this;for(;e=e.parent;)e[Ks]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=""+this).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||""+this,s=this.source.start.column,n=this.source.start.line;for(let t=0;e>t;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=""+this,n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}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}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(t.line>r.line||r.line===t.line&&t.column>=r.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new en).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let i=t.get(s.input);null==i&&(i=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:i,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=tn){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var nn=sn;sn.default=sn;let on=nn,an=class extends on{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:e.value+""}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var ln=an;an.default=an;var cn={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:hn,SourceMapGenerator:un}=zs,{existsSync:pn,readFileSync:dn}=zs,{dirname:fn,join:mn}=zs,gn=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=this.loadMap(t.from,t.map?t.map.prev:void 0);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=fn(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new hn(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?""+Buffer.from(t,"base64"):window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=fn(e),pn(e))return this.mapFile=e,(""+dn(e,"utf-8")).trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof hn)return""+un.fromSourceMap(t);if(t instanceof un)return""+t;if(this.isMap(t))return JSON.stringify(t);throw Error("Unsupported previous source map format: "+t)}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw Error("Unable to load previous source map: "+r);return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=mn(fn(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}};var yn=gn;gn.default=gn;let{SourceMapConsumer:wn,SourceMapGenerator:bn}=zs,{fileURLToPath:vn,pathToFileURL:Sn}=zs,{isAbsolute:Cn,resolve:In}=zs,{nanoid:kn}=cn,xn=zs,On=Vs,Mn=yn,An=Symbol("fromOffsetCache"),Rn=!(!wn||!bn),En=!(!In||!Cn),Tn=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=""+e,"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(this.file=!En||/^\w+:\/\//.test(t.from)||Cn(t.from)?t.from:In(t.from)),En&&Rn){let e=new Mn(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+kn(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,i,o;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);i=e.line,o=e.col}else i=s.line,o=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,i,o);return n=a?new On(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new On(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:o,line:i},this.css,this.file,s.plugin),n.input={column:r,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(Sn&&(n.input.url=""+Sn(this.file)),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[An])r=this[An];else{let e=this.css.split("\n");r=Array(e.length);let t=0;for(let s=0,n=e.length;n>s;s++)r[s]=t,t+=e[s].length+1;this[An]=r}t=r[r.length-1];let s=0;if(t>e){let t,n=r.length-2;for(;n>s;)if(t=s+(n-s>>1),r[t]>e)n=t-1;else{if(r[t+1]>e){s=t;break}s=t+1}}else s=r.length-1;return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:In(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=o.originalPositionFor({column:s,line:r})),i=Cn(a.source)?Sn(a.source):new URL(a.source,this.map.consumer().sourceRoot||Sn(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:""+i};if("file:"===i.protocol){if(!vn)throw Error("file: protocol is not available in this PostCSS build");l.file=vn(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Nn=Tn;Tn.default=Tn,xn&&xn.registerInput&&xn.registerInput(Tn);let{SourceMapConsumer:Ln,SourceMapGenerator:Dn}=zs,{dirname:Fn,relative:Pn,resolve:_n,sep:Un}=zs,{pathToFileURL:zn}=zs,Bn=Nn,jn=!(!Ln||!Dn),Wn=!!(Fn&&_n&&Pn&&Un);var Vn=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(""+this.map):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||Fn(e.file);!1===this.mapOpts.sourcesContent?(t=new Ln(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Wn&&jn&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Dn.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Dn({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Dn({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(i.generated.line=r,i.generated.column=s-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=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(r+=e.length,t=o.lastIndexOf("\n"),s=o.length-t):s+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.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=r,i.generated.column=s-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=r,i.generated.column=s-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Fn(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Fn(_n(r,this.mapOpts.annotation)));let s=Pn(r,e);return this.memoizedPaths.set(e,s),s}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 Bn(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,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(zn){let t=""+zn(e);return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Un&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Gn=nn,Zn=class extends Gn{constructor(e){super(e),this.type="comment"}};var Xn=Zn;Zn.default=Zn;let Yn,Jn,Hn,$n,{isClean:Kn,my:Qn}=Gs,qn=ln,ei=Xn,ti=nn;function ri(e){return e.map(e=>(e.nodes&&(e.nodes=ri(e.nodes)),delete e.source,e))}function si(e){if(e[Kn]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)si(t)}let ni=class e extends ti{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}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,r,s=this.getIterator();for(;this.proxyOf.nodes.length>this.indexes[s]&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}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)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],r>s&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s],0===s&&"prepend").reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s>r||(this.indexes[e]=r+n.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=ri(Yn(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=t.value+""),t=[new qn(t)]}else if(t.selector)t=[new Jn(t)];else if(t.name)t=[new Hn(t)];else{if(!t.text)throw Error("Unknown node type in node creation");t=[new ei(t)]}return t.map(t=>(t[Qn]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Kn]&&si(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.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){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],e>t||(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?this.walk(e instanceof RegExp?(r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}:(r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?this.walk(e instanceof RegExp?(r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}:(r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?this.walk(e instanceof RegExp?(r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}:(r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}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]}};ni.registerParse=e=>{Yn=e},ni.registerRule=e=>{Jn=e},ni.registerAtRule=e=>{Hn=e},ni.registerRoot=e=>{$n=e};var ii=ni;ni.default=ni,ni.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Hn.prototype):"rule"===e.type?Object.setPrototypeOf(e,Jn.prototype):"decl"===e.type?Object.setPrototypeOf(e,qn.prototype):"comment"===e.type?Object.setPrototypeOf(e,ei.prototype):"root"===e.type&&Object.setPrototypeOf(e,$n.prototype),e[Qn]=!0,e.nodes&&e.nodes.forEach(e=>{ni.rebuild(e)})};let oi,ai,li=ii,ci=class extends li{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new oi(new ai,this,e).stringify()}};ci.registerLazyResult=e=>{oi=e},ci.registerProcessor=e=>{ai=e};var hi=ci;ci.default=ci;let ui=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var pi=ui;ui.default=ui;let di=pi,fi=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 di(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var mi=fi;fi.default=fi;const gi=/[\t\n\f\r "#'()/;[\\\]{}]/g,yi=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,wi=/.[\r\n"'(/\\]/,bi=/[\da-f]/i;let vi=ii,Si=class extends vi{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ci=Si;Si.default=Si,vi.registerAtRule(Si);let Ii,ki,xi=ii,Oi=class extends xi{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Ii(new ki,this,e).stringify()}};Oi.registerLazyResult=e=>{Ii=e},Oi.registerProcessor=e=>{ki=e};var Mi=Oi;Oi.default=Oi,xi.registerRoot(Oi);let Ai={comma:e=>Ai.split(e,[","],!0),space:e=>Ai.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(i=!0),i?(""!==n&&s.push(n.trim()),n="",i=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var Ri=Ai;Ai.default=Ai;let Ei=ii,Ti=Ri,Ni=class extends Ei{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ti.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Li=Ni;Ni.default=Ni,Ei.registerRule(Ni);let Di=ln,Fi=Xn,Pi=Ci,_i=Mi,Ui=Li;const zi={empty:!0,space:!0};let Bi=ii,ji=class{constructor(e){this.input=e,this.root=new _i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,n=new Pi;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(n.source.end=this.getPosition((e=a[a.length-1])[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return i}this.doubleColon(t)}s=t}return!1}comment(e){let t=new Fi;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 e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=function(e,t={}){let r,s,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=p.charCodeAt(m),r){case 10:case 32:case 9:case 13:case 12:s=m;do{s+=1,r=p.charCodeAt(s)}while(32===r||10===r||9===r||13===r||12===r);u=["space",p.slice(m,s)],m=s-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(r);u=[e,e,m];break}case 40:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&39!==h&&34!==h&&32!==h&&10!==h&&9!==h&&12!==h&&13!==h){s=m;do{if(a=!1,s=p.indexOf(")",s+1),-1===s){if(d||t){s=m;break}w("bracket")}for(l=s;92===p.charCodeAt(l-1);)l-=1,a=!a}while(a);u=["brackets",p.slice(m,s+1),m,s],m=s}else s=p.indexOf(")",m+1),i=p.slice(m,s+1),-1===s||wi.test(i)?u=["(","(",m]:(u=["brackets",i,m,s],m=s);break;case 39:case 34:n=39===r?"'":'"',s=m;do{if(a=!1,s=p.indexOf(n,s+1),-1===s){if(d||t){s=m+1;break}w("string")}for(l=s;92===p.charCodeAt(l-1);)l-=1,a=!a}while(a);u=["string",p.slice(m,s+1),m,s],m=s;break;case 64:gi.lastIndex=m+1,gi.test(p),s=0===gi.lastIndex?p.length-1:gi.lastIndex-2,u=["at-word",p.slice(m,s+1),m,s],m=s;break;case 92:for(s=m,o=!0;92===p.charCodeAt(s+1);)s+=1,o=!o;if(r=p.charCodeAt(s+1),o&&47!==r&&32!==r&&10!==r&&9!==r&&13!==r&&12!==r&&(s+=1,bi.test(p.charAt(s)))){for(;bi.test(p.charAt(s+1));)s+=1;32===p.charCodeAt(s+1)&&(s+=1)}u=["word",p.slice(m,s+1),m,s],m=s;break;default:47===r&&42===p.charCodeAt(m+1)?(s=p.indexOf("*/",m+2)+1,0===s&&(d||t?s=p.length:w("comment")),u=["comment",p.slice(m,s+1),m,s],m=s):(yi.lastIndex=m+1,yi.test(p),s=0===yi.lastIndex?p.length-1:yi.lastIndex-2,u=["word",p.slice(m,s+1),m,s],g.push(u),m=s)}return m++,u},position:function(){return m}}}(this.input)}decl(e,t){let r=new Di;this.init(r,e[0][2]);let s,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(s=e.shift(),":"===s[0]){r.raws.between+=s[1];break}"word"===s[0]&&/\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 i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(s=e[t],"!important"===s[1].toLowerCase()){r.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(r.raws.important=s);break}if("important"===s[1].toLowerCase()){let s=e.slice(0),n="";for(let e=t;e>0;e--){let t=s[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=s.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=s)}if("space"!==s[0]&&"comment"!==s[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=o.map(e=>e[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 Ui;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),i.push("("===r?")":"]");else if(o&&s&&"{"===r)n||(n=l),i.push("}");else if(0===i.length){if(";"===r){if(s)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&s){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,i,o,a,l=r.length,c="",h=!0;for(let e=0;l>e;e+=1)n=r[e],i=n[0],"space"!==i||e!==l-1||s?"comment"===i?(a=r[e-1]?r[e-1][0]:"empty",o=r[e+1]?r[e+1][0]:"empty",zi[a]||zi[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:c}}e[t]=c}rule(e){e.pop();let t=new Ui;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],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;e.length>s;s++)r+=e[s][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})}},Wi=Nn;function Vi(e,t){let r=new Wi(e,t),s=new ji(r);try{s.parse()}catch(e){throw e}return s.root}var Gi=Vi;Vi.default=Vi,Bi.registerParse(Vi);let{isClean:Zi,my:Xi}=Gs,Yi=Vn,Ji=$s,Hi=ii,$i=hi,Ki=mi,Qi=Gi,qi=Mi;const eo={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},to={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},ro={Once:!0,postcssPlugin:!0,prepare:!0};function so(e){return"object"==typeof e&&"function"==typeof e.then}function no(e){let t=!1,r=eo[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function io(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:no(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function oo(e){return e[Zi]=!1,e.nodes&&e.nodes.forEach(e=>oo(e)),e}let ao={},lo=class e{constructor(t,r,s){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof Ki)n=oo(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=Qi;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{n=e(r,s)}catch(e){this.processed=!0,this.error=e}n&&!n[Xi]&&Hi.rebuild(n)}else n=oo(r);this.result=new Ki(t,n,s),this.helpers={...ao,postcss:ao,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}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 Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin||(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!to[r]&&/^[A-Z]/.test(r))throw Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ro[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;this.plugins.length>e;e++){let t=this.runOnRoot(this.plugins[e]);if(so(t))try{await t}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Zi];){e[Zi]=!0;let t=[io(e)];for(;t.length>0;){let e=this.visitTick(t);if(so(e))try{await e}catch(e){throw this.handleError(e,t[t.length-1].node)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return so(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Ji;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Yi(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(so(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Zi];)e[Zi]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(so(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&s.length>t.visitorIndex){let[e,n]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let s,n=t.iterator;for(;s=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!s[Zi])return s[Zi]=!0,void e.push(io(s));t.iterator=0,delete r.indexes[n]}let n=t.events;for(;n.length>t.eventIndex;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[Zi]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Zi]=!0;let t=no(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[Zi]||this.walkSync(e)});else{let t=this.listeners[r];if(t&&this.visitSync(t,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"}};lo.registerPostcss=e=>{ao=e};var co=lo;lo.default=lo,qi.registerLazyResult(lo),$i.registerLazyResult(lo);let ho=Vn,uo=$s,po=Gi;const fo=mi;let mo=class{constructor(e,t,r){let s;t=""+t,this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let n=uo;this.result=new fo(this._processor,s,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new ho(n,s,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}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=po;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var go=mo;mo.default=mo;let yo=go,wo=co,bo=hi,vo=Mi,So=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"!=typeof r||!r.parse&&!r.stringify)throw Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new wo(this,e,t):new yo(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Co=So;So.default=So,vo.registerProcessor(So),bo.registerProcessor(So);let Io=ln,ko=yn,xo=Xn,Oo=Ci,Mo=Nn,Ao=Mi,Ro=Li;function Eo(e,t){if(Array.isArray(e))return e.map(e=>Eo(e));let{inputs:r,...s}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Mo.prototype};r.map&&(r.map={...r.map,__proto__:ko.prototype}),t.push(r)}}if(s.nodes&&(s.nodes=e.nodes.map(e=>Eo(e,t))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new Ao(s);if("decl"===s.type)return new Io(s);if("rule"===s.type)return new Ro(s);if("comment"===s.type)return new xo(s);if("atrule"===s.type)return new Oo(s);throw Error("Unknown node type: "+e.type)}var To=Eo;Eo.default=Eo;let No=Vs,Lo=ln,Do=co,Fo=ii,Po=Co,_o=$s,Uo=To,zo=hi,Bo=pi,jo=Xn,Wo=Ci,Vo=mi,Go=Nn,Zo=Gi,Xo=Ri,Yo=Li,Jo=Mi,Ho=nn;function $o(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Po(e)}$o.plugin=function(e,t){let r,s=!1;function n(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=(new Po).version,n}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return $o([n(r)]).process(e,t)},n},$o.stringify=_o,$o.parse=Zo,$o.fromJSON=Uo,$o.list=Xo,$o.comment=e=>new jo(e),$o.atRule=e=>new Wo(e),$o.decl=e=>new Lo(e),$o.rule=e=>new Yo(e),$o.root=e=>new Jo(e),$o.document=e=>new zo(e),$o.CssSyntaxError=No,$o.Declaration=Lo,$o.Container=Fo,$o.Processor=Po,$o.Document=zo,$o.Comment=jo,$o.Warning=Bo,$o.AtRule=Wo,$o.Result=Vo,$o.Input=Go,$o.Rule=Yo,$o.Root=Jo,$o.Node=Ho,Do.registerPostcss($o),$o.default=$o;class Ko{constructor(...e){Ls(this,"parentElement",null),Ls(this,"parentNode",null),Ls(this,"ownerDocument"),Ls(this,"firstChild",null),Ls(this,"lastChild",null),Ls(this,"previousSibling",null),Ls(this,"nextSibling",null),Ls(this,"ELEMENT_NODE",1),Ls(this,"TEXT_NODE",3),Ls(this,"nodeType"),Ls(this,"nodeName"),Ls(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof Ko))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Qo={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},qo={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ea={};function ta(e){if(ea[e])return ea[e];const t=globalThis[e],r=t.prototype,s=e in Qo?Qo[e]:void 0,n=!(!s||!s.every(e=>{var t,s;return!!(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:(""+s).includes("[native code]"))})),i=e in qo?qo[e]:void 0,o=!(!i||!i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:(""+t).includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return ea[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(s),i?ea[e]=i:r}catch{return r}}const ra={};function sa(e,t,r){var s;const n=`${e}.${r+""}`;if(ra[n])return ra[n].call(t);const i=ta(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(ra[n]=o,o.call(t)):t[r]}const na={};function ia(e,t,r){const s=`${e}.${r+""}`;if(na[s])return na[s].bind(t);const n=ta(e)[r];return"function"!=typeof n?t[r]:(na[s]=n,n.bind(t))}function oa(){return ta("MutationObserver").constructor}function aa(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],n=r(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch{return()=>{}}}const la=function(e){return sa("Node",e,"ownerDocument")},ca=function(e){return sa("Node",e,"childNodes")},ha=function(e){return sa("Node",e,"parentNode")},ua=function(e){return sa("Node",e,"parentElement")},pa=function(e){return sa("Node",e,"textContent")},da=function(e,t){return ia("Node",e,"contains")(t)},fa=function(e){return ia("Node",e,"getRootNode")()},ma=function(e){return e&&"host"in e?sa("ShadowRoot",e,"host"):null},ga=function(e){return e&&"shadowRoot"in e?sa("Element",e,"shadowRoot"):null};function ya(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const wa="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let ba={map:{},getId:()=>(console.error(wa),-1),getNode:()=>(console.error(wa),null),removeNodeFromMap(){console.error(wa)},has:()=>(console.error(wa),!1),reset(){console.error(wa)}};function va(e,t,r={}){let s=null,n=0;return function(...i){const o=Date.now();n||!1!==r.leading||(n=o);const a=t-(o-n),l=this;0>=a||a>t?(s&&(clearTimeout(s),s=null),n=o,e.apply(l,i)):s||!1===r.trailing||(s=setTimeout(()=>{n=!1===r.leading?0:Date.now(),s=null,e.apply(l,i)},a))}}function Sa(e,t,r,s,n=window){const i=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,s?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>Sa(e,t,i||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ba=new Proxy(ba,{get:(e,t,r)=>("map"===t&&console.error(wa),Reflect.get(e,t,r))}));let Ca=Date.now;function Ia(e){var t,r,s,n;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=ua(i.body))?void 0:t.scrollLeft)||(null==(r=null==i?void 0:i.body)?void 0:r.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(s=ua(i.body))?void 0:s.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}}function ka(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function xa(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Oa(e){return e?e.nodeType===e.ELEMENT_NODE?e:ua(e):null}function Ma(e,t,r,s){if(!e)return!1;const n=Oa(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(s&&null!==n.closest("."+t))return!0}else if(ue(n,t,s))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(s&&null!==n.closest(r))return!0}return!1}function Aa(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function Ra(e,t){if(_(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=ha(e);return(!s||s.nodeType!==e.DOCUMENT_NODE)&&(!s||Ra(s,t))}function Ea(e){return!!e.changedTouches}function Ta(e,t){return!("IFRAME"!==e.nodeName||!t.getMeta(e))}function Na(e,t){return!("LINK"!==e.nodeName||e.nodeType!==e.ELEMENT_NODE||!e.getAttribute||"stylesheet"!==e.getAttribute("rel")||!t.getMeta(e))}function La(e){return!!e&&(e instanceof Ko&&"shadowRoot"in e?!!e.shadowRoot:!!ga(e))}/[1-9][0-9]{12}/.test(""+Date.now())||(Ca=()=>(new Date).getTime());class Da{constructor(){v(this,"id",1),v(this,"styleIDMap",new WeakMap),v(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 r=void 0===t?this.id++: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 Fa(e){var t;let r=null;return"getRootNode"in e&&(null==(t=fa(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ma(fa(e))&&(r=ma(fa(e))),r}function Pa(e){const t=la(e);return!!t&&(da(t,e)||function(e){const t=la(e);if(!t)return!1;const r=function(e){let t,r=e;for(;t=Fa(r);)r=t;return r}(e);return da(t,r)}(e))}var _a=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(_a||{}),Ua=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Ua||{}),za=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(za||{}),Ba=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ba||{}),ja=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ja||{}),Wa=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Wa||{}),Va=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Va||{});function Ga(e){return"__ln"in e}class Za{constructor(){v(this,"length",0),v(this,"head",null),v(this,"tail",null)}get(e){if(e>=this.length)throw Error("Position outside of list range");let t=this.head;for(let r=0;e>r;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Ga(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Ga(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Xa=(e,t)=>`${e}@${t}`;class Ya{constructor(){v(this,"frozen",!1),v(this,"locked",!1),v(this,"texts",[]),v(this,"attributes",[]),v(this,"attributeMap",new WeakMap),v(this,"removes",[]),v(this,"mapRemoves",[]),v(this,"movedMap",{}),v(this,"addedSet",new Set),v(this,"movedSet",new Set),v(this,"droppedSet",new Set),v(this,"removesSubTreeCache",new Set),v(this,"mutationCb"),v(this,"blockClass"),v(this,"blockSelector"),v(this,"maskTextClass"),v(this,"maskTextSelector"),v(this,"inlineStylesheet"),v(this,"maskInputOptions"),v(this,"maskTextFn"),v(this,"maskInputFn"),v(this,"keepIframeSrcFn"),v(this,"recordCanvas"),v(this,"inlineImages"),v(this,"slimDOMOptions"),v(this,"dataURLOptions"),v(this,"doc"),v(this,"mirror"),v(this,"iframeManager"),v(this,"stylesheetManager"),v(this,"shadowDomManager"),v(this,"canvasManager"),v(this,"processedNodeManager"),v(this,"unattachedDoc"),v(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),v(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Za,s=e=>{let t=e,r=-2;for(;-2===r;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r},n=n=>{const i=ha(n);if(!i||!Pa(n))return;let o=!1;if(n.nodeType===Node.TEXT_NODE){const e=i.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(i)&&(o=!0)}const a=_(i)?this.mirror.getId(Fa(n)):this.mirror.getId(i),l=s(n);if(-1===a||-1===l)return r.addNode(n);const c=ge(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Ta(e,this.mirror)&&this.iframeManager.addIframe(e),Na(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),La(n)&&this.shadowDomManager.addShadowRoot(ga(n),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:o});c&&(e.push({parentId:a,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)Ha(this.removesSubTreeCache,e)&&!this.movedSet.has(ha(e))||n(e);for(const e of this.addedSet)$a(this.droppedSet,e)||Ha(this.removesSubTreeCache,e)?$a(this.movedSet,e)?n(e):this.droppedSet.add(e):n(e);let i=null;for(;r.length;){let e=null;if(i){const t=this.mirror.getId(ha(i.value)),r=s(i.value);-1!==t&&-1!==r&&(e=i)}if(!e){let t=r.tail;for(;t;){const r=t;if(t=t.previous,r){const t=this.mirror.getId(ha(r.value));if(-1===s(r.value))continue;if(-1!==t){e=r;break}{const t=ha(r.value);if(t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const s=ma(t);if(-1!==this.mirror.getId(s)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}i=e.previous,r.removeNode(e.value),n(e.value)}const o={texts:this.texts.map(e=>{const t=e.node,r=ha(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{const{attributes:t}=e;if("string"==typeof t.style){const r=JSON.stringify(e.styleDiff),s=JSON.stringify(e._unchangedStyles);t.style.length>r.length&&(r+s).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(o.texts.length||o.attributes.length||o.removes.length||o.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(o))}),v(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(ca(e),e=>pa(e)||"").join("");t.attributes.value=W({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Z(e),value:r,maskInputFn:this.maskInputFn})}),v(this,"processMutation",e=>{if(!Aa(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=pa(e.target);Ma(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:pe(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Oa(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,s=e.target.getAttribute(r);if("value"===r){const e=Z(t);s=W({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(Ma(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let n=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(s)){if(t.contentDocument)return;r="rr_src"}if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!he(t.tagName,r))if(n.attributes[r]=ce(this.doc,V(t.tagName),V(r),s),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const s=t.style.getPropertyValue(e),i=t.style.getPropertyPriority(e);s!==r.style.getPropertyValue(e)||i!==r.style.getPropertyPriority(e)?n.styleDiff[e]=""===i?s:[s,i]:n._unchangedStyles[e]=[s,i]}for(const e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(n.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===t.tagName&&(n.attributes.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal");break}case"childList":if(Ma(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),s=_(e.target)?this.mirror.getId(ma(e.target)):this.mirror.getId(e.target);Ma(e.target,this.blockClass,this.blockSelector,!1)||Aa(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Ja(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||Ra(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Xa(r,s)]?Ja(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:!(!_(e.target)||!U(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),ca(e).forEach(e=>r.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),v(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Aa(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[Xa(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ma(e,this.blockClass,this.blockSelector,!1)||(ca(e).forEach(e=>this.genAdds(e)),La(e)&&ca(ga(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ja(e,t){e.delete(t),ca(t).forEach(t=>Ja(e,t))}function Ha(e,t,r){return 0!==e.size&&function(e,t){const r=ha(t);return!!r&&e.has(r)}(e,t)}function $a(e,t){return 0!==e.size&&Ka(e,t)}function Ka(e,t){const r=ha(t);return!!r&&(!!e.has(r)||Ka(e,r))}let Qa;const qa=e=>Qa?(...t)=>{try{return e(...t)}catch(e){if(Qa&&!0===Qa(e))return;throw e}}:e,el=[];function tl(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function rl(e,t){const r=new Ya;el.push(r),r.init(e);const s=new(oa())(qa(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function sl({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:i}){return ya("scroll",qa(va(qa(i=>{const o=tl(i);if(!o||Ma(o,s,n,!0))return;const a=r.getId(o);if(o===t&&t.defaultView){const r=Ia(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}),i.scroll||100)),t)}const nl=["INPUT","TEXTAREA","SELECT"],il=new WeakMap;function ol(e){return function(e,t){if(hl("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||hl("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||hl("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||hl("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){const r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function al(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function ll({mirror:e,stylesheetManager:t},r){var s,n,i;let o=null;o=e.getId("#document"===r.nodeName?r:ma(r));const a="#document"===r.nodeName?null==(s=r.defaultView)?void 0:s.Document:null==(i=null==(n=r.ownerDocument)?void 0:n.defaultView)?void 0:i.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&a&&l?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var r;const s=null==(r=l.set)?void 0:r.call(this,e);if(null!==o&&-1!==o)try{t.adoptStyleSheets(e,o)}catch(e){}return s}}),qa(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function cl(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};let s;!function(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:n,scrollCb:i,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:u,fontCb:p,selectionCb:d,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),s(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),n(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),i(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),o(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),h(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),u(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),p(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),d(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(s=rl(e,e.doc));const n=function({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(!1===t.mousemove)return()=>{};const n="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let o,a=[];const l=va(qa(t=>{const r=Date.now()-o;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],o=null}),i),c=qa(va(qa(e=>{const t=tl(e),{clientX:r,clientY:n}=Ea(e)?e.changedTouches[0]:e;o||(o=Ca()),a.push({x:r,y:n,id:s.getId(t),timeOffset:Ca()-o}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?Ua.Drag:e instanceof MouseEvent?Ua.MouseMove:Ua.TouchMove)}),n,{trailing:!1})),h=[ya("mousemove",c,r),ya("touchmove",c,r),ya("drag",c,r)];return qa(()=>{h.forEach(e=>e())})}(e),i=function({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const o=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,a=[];let l=null;return Object.keys(za).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]).forEach(i=>{let o=V(i);const c=(t=>i=>{const o=tl(i);if(Ma(o,s,n,!0))return;let a=null,c=t;if("pointerType"in i){switch(i.pointerType){case"mouse":a=Ba.Mouse;break;case"touch":a=Ba.Touch;break;case"pen":a=Ba.Pen}a===Ba.Touch&&(za[t]===za.MouseDown?c="TouchStart":za[t]===za.MouseUp&&(c="TouchEnd"))}else Ea(i)&&(a=Ba.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===Ba.Touch||c.startsWith("Mouse")&&a===Ba.Mouse)&&(a=null)):za[t]===za.Click&&(a=l,l=null);const h=Ea(i)?i.changedTouches[0]:i;if(!h)return;const u=r.getId(o),{clientX:p,clientY:d}=h;qa(e)({type:za[c],id:u,x:p,y:d,...null!==a&&{pointerType:a}})})(i);if(window.PointerEvent)switch(za[i]){case za.MouseDown:case za.MouseUp:o=o.replace("mouse","pointer");break;case za.TouchStart:case za.TouchEnd:return}a.push(ya(o,c,t))}),qa(()=>{a.forEach(e=>e())})}(e),o=sl(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,s=-1;return ya("resize",qa(va(qa(()=>{const t=ka(),n=xa();r===t&&s===n||(e({width:Number(n),height:Number(t)}),r=t,s=n)}),200)),t)}(e,{win:r}),l=function({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,ignoreClass:i,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:h}){function u(e){let r=tl(e);const c=e.isTrusted,u=r&&r.tagName;if(r&&"OPTION"===u&&(r=ua(r)),!r||!u||0>nl.indexOf(u)||Ma(r,s,n,!0))return;if(r.classList.contains(i)||o&&r.matches(o))return;let d=r.value,f=!1;const m=Z(r)||"";"radio"===m||"checkbox"===m?f=r.checked:(a[u.toLowerCase()]||a[m])&&(d=W({element:r,maskInputOptions:a,tagName:u,type:m,value:d,maskInputFn:l})),p(r,h?{text:d,isChecked:f,userTriggered:c}:{text:d,isChecked:f});const g=r.name;"radio"===m&&g&&f&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==r){const t=e.value;p(e,h?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}})}function p(t,s){const n=il.get(t);if(!n||n.text!==s.text||n.isChecked!==s.isChecked){il.set(t,s);const n=r.getId(t);qa(e)({...s,id:n})}}const d=("last"===c.input?["change"]:["input","change"]).map(e=>ya(e,qa(u),t)),f=t.defaultView;if(!f)return()=>{d.forEach(e=>e())};const m=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value");return m&&m.set&&d.push(...[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]].map(e=>Sa(e[0],e[1],{set(){qa(u)({target:this,isTrusted:!1})}},!1,f))),qa(()=>{d.forEach(e=>e())})}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:n,doc:i}){const o=qa(i=>va(qa(n=>{const o=tl(n);if(!o||Ma(o,t,r,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:h,loop:u}=o;e({type:i,id:s.getId(o),currentTime:a,volume:l,muted:c,playbackRate:h,loop:u})}),n.media||500)),a=[ya("play",o(Wa.Play),i),ya("pause",o(Wa.Pause),i),ya("seeked",o(Wa.Seeked),i),ya("volumechange",o(Wa.VolumeChange),i),ya("ratechange",o(Wa.RateChange),i)];return qa(()=>{a.forEach(e=>e())})}(e);let h=()=>{},u=()=>{},p=()=>{},d=()=>{};e.recordDOM&&(h=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const n=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:qa((s,n,i)=>{const[o,a]=i,{id:l,styleId:c}=al(n,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:a}]}),s.apply(n,i)})}),s.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){return s.CSSStyleSheet.prototype.insertRule.call(this,`${e} { ${t} }`,r)};const i=s.CSSStyleSheet.prototype.deleteRule;let o,a;s.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:qa((s,n,i)=>{const[o]=i,{id:a,styleId:l}=al(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),s.apply(n,i)})}),s.CSSStyleSheet.prototype.removeRule=function(e){return s.CSSStyleSheet.prototype.deleteRule.call(this,e)},s.CSSStyleSheet.prototype.replace&&(o=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:qa((s,n,i)=>{const[o]=i,{id:a,styleId:l}=al(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),s.apply(n,i)})})),s.CSSStyleSheet.prototype.replaceSync&&(a=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:qa((s,n,i)=>{const[o]=i,{id:a,styleId:l}=al(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),s.apply(n,i)})}));const l={};ul("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(ul("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),ul("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),ul("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));const c={};return Object.entries(l).forEach(([s,n])=>{c[s]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(c[s].insertRule,{apply:qa((s,n,i)=>{const[o,a]=i,{id:l,styleId:c}=al(n.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:[...ol(n),a||0]}]}),s.apply(n,i)})}),n.prototype.deleteRule=new Proxy(c[s].deleteRule,{apply:qa((s,n,i)=>{const[o]=i,{id:a,styleId:l}=al(n.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...ol(n),o]}]}),s.apply(n,i)})})}),qa(()=>{s.CSSStyleSheet.prototype.insertRule=n,s.CSSStyleSheet.prototype.deleteRule=i,o&&(s.CSSStyleSheet.prototype.replace=o),a&&(s.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}(e,{win:r}),u=ll(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:n}){const i=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:qa((n,o,a)=>{var l;const[c,h,u]=a;if(r.has(c))return i.call(o,c,h,u);const{id:p,styleId:d}=al(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(p&&-1!==p||d&&-1!==d)&&e({id:p,styleId:d,set:{property:c,value:h,priority:u},index:ol(o.parentRule)}),n.apply(o,a)})});const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:qa((n,i,a)=>{var l;const[c]=a;if(r.has(c))return o.call(i,c);const{id:h,styleId:u}=al(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(h&&-1!==h||u&&-1!==u)&&e({id:h,styleId:u,remove:{property:c},index:ol(i.parentRule)}),n.apply(i,a)})}),qa(()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:r}),e.collectFonts&&(d=function({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],n=new WeakMap,i=r.FontFace;r.FontFace=function(e,t,r){const s=new i(e,t,r);return n.set(s,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),s};const o=aa(t.fonts,"add",function(t){return function(r){return setTimeout(qa(()=>{const t=n.get(r);t&&(e(t),n.delete(r))}),0),t.call(this,r)}});return s.push(()=>{r.FontFace=i}),s.push(o),qa(()=>{s.forEach(e=>e())})}(e)));const f=function(e){const{doc:t,mirror:r,blockClass:s,blockSelector:n,selectionCb:i}=e;let o=!0;const a=qa(()=>{const e=t.getSelection();if(!e||o&&(null==e?void 0:e.isCollapsed))return;o=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;l>t;t++){const i=e.getRangeAt(t),{startContainer:o,startOffset:l,endContainer:c,endOffset:h}=i;Ma(o,s,n,!0)||Ma(c,s,n,!0)||a.push({start:r.getId(o),startOffset:l,end:r.getId(c),endOffset:h})}i({ranges:a})});return a(),ya("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const r=e.defaultView;return r&&r.customElements?aa(r.customElements,"define",function(e){return function(r,s,n){try{t({define:{name:r}})}catch(e){console.warn("Custom element callback failed for "+r)}return e.call(this,r,s,n)}}):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,r,t.options));return qa(()=>{el.forEach(e=>e.reset()),null==s||s.disconnect(),n(),i(),o(),a(),l(),c(),h(),u(),p(),d(),f(),m(),g.forEach(e=>e())})}function hl(e){return void 0!==window[e]}function ul(e){return!!(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class pl{constructor(e){v(this,"iframeIdToRemoteIdMap",new WeakMap),v(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){const n=r||this.getIdToRemoteIdMap(e),i=s||this.getRemoteIdToIdMap(e);let o=n.get(t);return o||(o=this.generateIdFn(),n.set(t,o),i.set(o,t)),o}getIds(e,t){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,s))}getRemoteId(e,t,r){const s=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;return s.get(t)||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class dl{constructor(e){v(this,"iframes",new WeakMap),v(this,"crossOriginIframeMap",new WeakMap),v(this,"crossOriginIframeMirror",new pl(te)),v(this,"crossOriginIframeStyleMirror"),v(this,"crossOriginIframeRootIdMap",new WeakMap),v(this,"mirror"),v(this,"mutationCb"),v(this,"wrappedEmit"),v(this,"loadListener"),v(this,"stylesheetManager"),v(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new pl(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(s=this.loadListener)||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const r=this.crossOriginIframeMap.get(e.source);if(!r)return;const s=this.transformCrossOriginEvent(r,t.data.event);s&&this.wrappedEmit(s,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case _a.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:_a.IncrementalSnapshot,data:{source:Ua.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case _a.Meta:case _a.Load:case _a.DomContentLoaded:return!1;case _a.Plugin:return t;case _a.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case _a.IncrementalSnapshot:switch(t.data.source){case Ua.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Ua.Drag:case Ua.TouchMove:case Ua.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Ua.ViewportResize:return!1;case Ua.MediaInteraction:case Ua.MouseInteraction:case Ua.Scroll:case Ua.CanvasMutation:case Ua.Input:return this.replaceIds(t.data,e,["id"]),t;case Ua.StyleSheetRule:case Ua.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Ua.Font:return t;case Ua.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case Ua.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,r,s){for(const n of s)(Array.isArray(t[n])||"number"==typeof t[n])&&(t[n]=Array.isArray(t[n])?e.getIds(r,t[n]):e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===Va.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class fl{constructor(e){v(this,"shadowDoms",new WeakSet),v(this,"mutationCb"),v(this,"scrollCb"),v(this,"bypassOptions"),v(this,"mirror"),v(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(!U(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=rl({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(sl({...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(ma(e))),this.restoreHandlers.push(ll({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(aa(e.prototype,"attachShadow",function(e){return function(s){const n=e.call(this,s),i=ga(this);return i&&Pa(this)&&r.addShadowRoot(i,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var ml="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gl="undefined"==typeof Uint8Array?[]:new Uint8Array(256),yl=0;64>yl;yl++)gl[ml.charCodeAt(yl)]=yl;const wl=new Map,bl=(e,t,r)=>{if(!e||!Cl(e,t)&&"object"!=typeof e)return;const s=function(e,t){let r=wl.get(e);return r||(r=new Map,wl.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name);let n=s.indexOf(e);return-1===n&&(n=s.length,s.push(e)),n};function vl(e,t,r){if(e instanceof Array)return e.map(e=>vl(e,t,r));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:function(e){var t,r=new Uint8Array(e),s=r.length,n="";for(t=0;s>t;t+=3)n+=ml[r[t]>>2],n+=ml[(3&r[t])<<4|r[t+1]>>4],n+=ml[(15&r[t+1])<<2|r[t+2]>>6],n+=ml[63&r[t+2]];return s%3==2?n=n.substring(0,n.length-1)+"=":s%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[vl(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:r}=e;return{rr_type:t,src:r}}return e instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:e.toDataURL()}:e instanceof ImageData?{rr_type:e.constructor.name,args:[vl(e.data,t,r),e.width,e.height]}:Cl(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:bl(e,t,r)}:e}const Sl=(e,t,r)=>e.map(e=>vl(e,t,r)),Cl=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]).find(r=>e instanceof t[r]);function Il(e,t,r,s){const n=[];try{const i=aa(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(n,...i){if(!Ma(this,t,r,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(n);if("__context"in this||(this.__context=e),s&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){const e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.call(this,n,...i)}});n.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(e=>e())}}function kl(e,t,r,s,n,i){const o=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=aa(e,l,function(e){return function(...o){const a=e.apply(this,o);if(bl(a,i,this),"tagName"in this.canvas&&!Ma(this.canvas,s,n,!0)){const e=Sl(o,i,this);r(this.canvas,{type:t,property:l,args:e})}return a}});o.push(a)}catch{const s=Sa(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});o.push(s)}return o}const xl="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Ol="undefined"!=typeof window&&window.Blob&&new Blob([(Ml=xl,Uint8Array.from(atob(Ml),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var Ml;function Al(e){let t;try{if(t=Ol&&(window.URL||window.webkitURL).createObjectURL(Ol),!t)throw"";const r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),r}catch(t){return new Worker("data:text/javascript;base64,"+xl,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Rl{constructor(e){v(this,"pendingCanvasMutations",new Map),v(this,"rafStamps",{latestId:0,invokeId:null}),v(this,"mirror"),v(this,"mutationCb"),v(this,"resetObservers"),v(this,"frozen",!1),v(this,"locked",!1),v(this,"processMutation",(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});const{sampling:t="all",win:r,blockClass:s,blockSelector:n,recordCanvas:i,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(r,s,n),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,s,n,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,s,n){const i=Il(t,r,s,!0),o=new Map,a=new Al;a.onmessage=e=>{const{id:t}=e.data;if(o.set(t,!1),!("base64"in e.data))return;const{base64:r,type:s,width:n,height:i}=e.data;this.mutationCb({id:t,type:ja["2D"],commands:[{property:"clearRect",args:[0,0,n,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:s}]},0,0]}]})};const l=1e3/e;let c,h=0;const u=e=>{h&&l>e-h||(h=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{Ma(t,r,s,!0)||e.push(t)}),e})().forEach(async e=>{var t;const r=this.mirror.getId(e);if(o.get(r))return;if(0===e.width||0===e.height)return;if(o.set(r,!0),["webgl","webgl2"].includes(e.__context)){const r=e.getContext(e.__context);!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)}const s=await createImageBitmap(e);a.postMessage({id:r,bitmap:s,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[s])})),c=requestAnimationFrame(u)};c=requestAnimationFrame(u),this.resetObservers=()=>{i(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Il(e,t,r,!1),n=function(e,t,r,s){const n=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])continue;const i=aa(t.CanvasRenderingContext2D.prototype,o,function(n){return function(...i){return Ma(this.canvas,r,s,!0)||setTimeout(()=>{const r=Sl(i,t,this);e(this.canvas,{type:ja["2D"],property:o,args:r})},0),n.apply(this,i)}});n.push(i)}catch{const r=Sa(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:ja["2D"],property:o,args:[t],setter:!0})}});n.push(r)}return()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),i=function(e,t,r,s){const n=[];return n.push(...kl(t.WebGLRenderingContext.prototype,ja.WebGL,e,r,s,t)),void 0!==t.WebGL2RenderingContext&&n.push(...kl(t.WebGL2RenderingContext.prototype,ja.WebGL2,e,r,s,t)),()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),n(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;const s=r.map(e=>{const{type:t,...r}=e;return r}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:s}),this.pendingCanvasMutations.delete(e)}}class El{constructor(e){v(this,"trackedLinkElements",new WeakSet),v(this,"mutationCb"),v(this,"adoptedStyleSheetCb"),v(this,"styleMirror",new Da),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(0===e.length)return;const r={id:t,styleIds:[]},s=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),s.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,r)=>({rule:B(e,t.href),index:r}))})),r.styleIds.push(e)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Tl{constructor(){v(this,"nodeMap",new WeakMap),v(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let Nl,Ll,Dl,Fl=!1;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(w=e.contentWindow)?void 0:w.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Pl=new j;function _l(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:n="rr-block",blockSelector:i=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:h=!0,maskAllInputs:u,maskInputOptions:p,slimDOMOptions:d,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:w={},dataURLOptions:b={},mousemoveWait:v,recordDOM:S=!0,recordCanvas:C=!1,recordCrossOriginIframes:I=!1,recordAfter:k=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:O=!1,inlineImages:M=!1,plugins:A,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:E=new Set([]),errorHandler:T}=e;Qa=T;const N=!I||window.parent===window;let L=!1;if(!N)try{window.parent.document&&(L=!1)}catch(e){L=!0}if(N&&!t)throw Error("emit function is required");if(!N&&!L)return()=>{};void 0!==v&&void 0===w.mousemove&&(w.mousemove=v),Pl.reset();const D=!0===u?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==p?p:{password:!0},F=me(d);let P;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();let _=0;const U=e=>{for(const t of A||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!L&&(e=y(e)),e};Nl=(e,n)=>{var i;const o=e;if(o.timestamp=Ca(),!(null==(i=el[0])?void 0:i.isFrozen())||o.type===_a.FullSnapshot||o.type===_a.IncrementalSnapshot&&o.data.source===Ua.Mutation||el.forEach(e=>e.unfreeze()),N)null==t||t(U(o),n);else if(L){const e={type:"rrweb",event:U(o),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(o.type===_a.FullSnapshot)P=o,_=0;else if(o.type===_a.IncrementalSnapshot){if(o.data.source===Ua.Mutation&&o.data.isAttachIframe)return;_++,(s&&_>=s||r&&o.timestamp-P.timestamp>r)&&Ll(!0)}};const z=e=>{Nl({type:_a.IncrementalSnapshot,data:{source:Ua.Mutation,...e}})},B=e=>Nl({type:_a.IncrementalSnapshot,data:{source:Ua.Scroll,...e}}),W=e=>Nl({type:_a.IncrementalSnapshot,data:{source:Ua.CanvasMutation,...e}}),V=new El({mutationCb:z,adoptedStyleSheetCb:e=>Nl({type:_a.IncrementalSnapshot,data:{source:Ua.AdoptedStyleSheet,...e}})}),G=new dl({mirror:Pl,mutationCb:z,stylesheetManager:V,recordCrossOriginIframes:I,wrappedEmit:Nl});for(const e of A||[])e.getMirror&&e.getMirror({nodeMirror:Pl,crossOriginIframeMirror:G.crossOriginIframeMirror,crossOriginIframeStyleMirror:G.crossOriginIframeStyleMirror});const Z=new Tl;Dl=new Rl({recordCanvas:C,mutationCb:W,win:window,blockClass:n,blockSelector:i,mirror:Pl,sampling:w.canvas,dataURLOptions:b});const X=new fl({mutationCb:z,scrollCb:B,bypassOptions:{blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskInputOptions:D,dataURLOptions:b,maskTextFn:m,maskInputFn:f,recordCanvas:C,inlineImages:M,sampling:w,slimDOMOptions:F,iframeManager:G,stylesheetManager:V,canvasManager:Dl,keepIframeSrcFn:R,processedNodeManager:Z},mirror:Pl});Ll=(e=!1)=>{if(!S)return;Nl({type:_a.Meta,data:{href:window.location.href,width:xa(),height:ka()}},e),V.reset(),X.init(),el.forEach(e=>e.lock());const t=function(e,t){const{mirror:r=new j,blockClass:s="rr-block",blockSelector:n=null,maskTextClass:i="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:u,maskInputFn:p,slimDOM:d=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S=()=>!1}=t||{};return ge(e,{doc:e,mirror:r,blockClass:s,blockSelector:n,maskTextClass:i,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===h?{password:!0}:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:me(d),dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:Pl,blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskAllInputs:D,maskTextFn:m,maskInputFn:f,slimDOM:F,dataURLOptions:b,recordCanvas:C,inlineImages:M,onSerialize:e=>{Ta(e,Pl)&&G.addIframe(e),Na(e,Pl)&&V.trackLinkElement(e),La(e)&&X.addShadowRoot(ga(e),document)},onIframeLoad:(e,t)=>{G.attachIframe(e,t),X.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:R});if(!t)return console.warn("Failed to snapshot the document");Nl({type:_a.FullSnapshot,data:{node:t,initialOffset:Ia(window)}},e),el.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,Pl.getId(document))};try{const e=[],t=e=>{var t;return qa(cl)({mutationCb:z,mousemoveCb:(e,t)=>Nl({type:_a.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Nl({type:_a.IncrementalSnapshot,data:{source:Ua.MouseInteraction,...e}}),scrollCb:B,viewportResizeCb:e=>Nl({type:_a.IncrementalSnapshot,data:{source:Ua.ViewportResize,...e}}),inputCb:e=>Nl({type:_a.IncrementalSnapshot,data:{source:Ua.Input,...e}}),mediaInteractionCb:e=>Nl({type:_a.IncrementalSnapshot,data:{source:Ua.MediaInteraction,...e}}),styleSheetRuleCb:e=>Nl({type:_a.IncrementalSnapshot,data:{source:Ua.StyleSheetRule,...e}}),styleDeclarationCb:e=>Nl({type:_a.IncrementalSnapshot,data:{source:Ua.StyleDeclaration,...e}}),canvasMutationCb:W,fontCb:e=>Nl({type:_a.IncrementalSnapshot,data:{source:Ua.Font,...e}}),selectionCb:e=>{Nl({type:_a.IncrementalSnapshot,data:{source:Ua.Selection,...e}})},customElementCb:e=>{Nl({type:_a.IncrementalSnapshot,data:{source:Ua.CustomElement,...e}})},blockClass:n,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:D,inlineStylesheet:h,sampling:w,recordDOM:S,recordCanvas:C,inlineImages:M,userTriggeredOnInput:x,collectFonts:O,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:R,blockSelector:i,slimDOMOptions:F,dataURLOptions:b,mirror:Pl,iframeManager:G,stylesheetManager:V,shadowDomManager:X,processedNodeManager:Z,canvasManager:Dl,ignoreCSSAttributes:E,plugins:(null==(t=null==A?void 0:A.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>Nl({type:_a.Plugin,data:{plugin:e.name,payload:t}})})))||[]},g)};G.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}});const r=()=>{Ll(),e.push(t(document)),Fl=!0};return["interactive","complete"].includes(document.readyState)?r():(e.push(ya("DOMContentLoaded",()=>{Nl({type:_a.DomContentLoaded,data:{}}),"DOMContentLoaded"===k&&r()})),e.push(ya("load",()=>{Nl({type:_a.Load,data:{}}),"load"===k&&r()},window))),()=>{e.forEach(e=>{try{e()}catch(e){(e+"").toLowerCase().includes("cross-origin")||console.warn(e)}}),Z.destroy(),Fl=!1,Qa=void 0}}catch(e){console.warn(e)}}var Ul,zl;_l.addCustomEvent=(e,t)=>{if(!Fl)throw Error("please add custom event after start recording");Nl({type:_a.Custom,data:{tag:e,payload:t}})},_l.freezePage=()=>{el.forEach(e=>e.freeze())},_l.takeFullSnapshot=e=>{if(!Fl)throw Error("please take full snapshot after start recording");Ll(e)},_l.mirror=Pl,(zl=Ul||(Ul={}))[zl.NotStarted=0]="NotStarted",zl[zl.Running=1]="Running",zl[zl.Stopped=2]="Stopped";const Bl=[{name:"credit_card",pattern:/\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{4}/g,mask:"[CARD XXXX]"},{name:"ssn",pattern:/\b\d{3}-\d{2}-\d{4}\b/g,mask:"[SSN XXX-XX-XXXX]"},{name:"phone_us",pattern:/(?:\+1[\s.-]?)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}/g,mask:"[PHONE XXX-XXX-XXXX]"},{name:"email",pattern:/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}(?:\.[A-Za-z]{2,})?/g,mask:"[EMAIL]"}];function jl(e){if(!e)return e;let t=e;for(const e of Bl)e.pattern.lastIndex=0,t=t.replace(e.pattern,e.mask);return t}function Wl(e){return jl(e)}function Vl(e,t){return null!==t.getAttribute("data-sessionvision-unmask")?e:jl(e)}let Gl=null,Zl=null;let Xl=null,Yl=null,Jl=null;function Hl(){Gl&&_l.takeFullSnapshot()}const $l=new Map;function Kl(e,t){const r=$l.get(e);r&&r.forEach(e=>{try{e(t)}catch{}})}function Ql(e,t){$l.has(e)||$l.set(e,new Set),$l.get(e).add(t)}function ql(e,t){$l.get(e)?.delete(t)}let ec=null,tc=!1;function rc(e,t){if(e>=1)return!0;if(0>=e)return!1;const r=function(e){let t=2166136261;for(let r=0;e.length>r;r++)t^=e.charCodeAt(r),t=16777619*t>>>0;return t>>>0}(t);return 100*e>r%100}function sc(e,t){if(tc)return;ec=new y({config:e,emit:Kl}),ec.start();const r=e=>{ec?.addEvent(e)};try{(function(e,t){if(Gl)return;const r=function(e,t){return{emit:t,maskAllInputs:!1!==e.recording&&void 0!==e.recording?.maskAllInputs?e.recording.maskAllInputs:e.maskAllInputs,maskInputOptions:{password:!0,email:!0,tel:!0,text:!1},maskTextFn:Wl,maskInputFn:Vl,sampling:{mousemove:!0,mouseInteraction:!0,scroll:150,media:800,input:"last"},recordCanvas:!1,recordCrossOriginIframes:!1,collectFonts:!0,inlineStylesheet:!0,inlineImages:!1}}(e,t);Gl=_l(r)??null,Zl=setInterval(()=>{Gl&&_l.takeFullSnapshot()},3e5),"undefined"!=typeof window&&(Xl=history.pushState,history.pushState=function(...e){Xl.apply(this,e),Hl()},Yl=history.replaceState,history.replaceState=function(...e){Yl.apply(this,e),Hl()},Jl=Hl,window.addEventListener("popstate",Jl))})(e,r),tc=!0,e.debug&&console.log("[SessionVision] Recording started")}catch(t){e.debug&&console.warn("[SessionVision] Failed to start recording:",t),Kl("recording:error",t),ec.stop(),ec=null}}function nc(){tc&&(Gl&&(Gl(),Gl=null),Zl&&(clearInterval(Zl),Zl=null),Xl&&(history.pushState=Xl,Xl=null),Yl&&(history.replaceState=Yl,Yl=null),Jl&&(window.removeEventListener("popstate",Jl),Jl=null),ec&&(ec.stop(),ec=null),tc=!1)}function ic(){return tc&&null!==Gl}function oc(e){ec&&ec.setTags(e)}return"undefined"!=typeof window&&(window.__sessionvision_recorder={initRecorder:sc,stopRecorder:nc,isRecorderActive:ic,tagRecording:oc,shouldRecordSession:rc,on:Ql,off:ql}),e._resetRecorder=function(){nc(),$l.clear()},e.initRecorder=sc,e.isRecorderActive=ic,e.off=ql,e.on=Ql,e.shouldRecordSession=rc,e.stopRecorder=nc,e.tagRecording=oc,e}({});
|
|
7
|
+
//# sourceMappingURL=sessionvision-recorder.min.js.map
|