@brainfish-ai/web-tracker 0.0.27 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tracker.cjs.js +1 -1
- package/dist/tracker.cjs.js.gz +0 -0
- package/dist/tracker.es.js +1 -1
- package/dist/tracker.es.js.gz +0 -0
- package/dist/tracker.js +1 -1
- package/dist/tracker.js.gz +0 -0
- package/package.json +1 -1
package/dist/tracker.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=Object.defineProperty,t=(t,s,r)=>((t,s,r)=>s in t?e(t,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[s]=r)(t,"symbol"!=typeof s?s+"":s,r);const s=Object.create(null);s.open="0",s.close="1",s.ping="2",s.pong="3",s.message="4",s.upgrade="5",s.noop="6";const r=Object.create(null);Object.keys(s).forEach(e=>{r[s[e]]=e});const n={type:"error",data:"parser error"},i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),o="function"==typeof ArrayBuffer,a=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,l=({type:e,data:t},r,n)=>i&&t instanceof Blob?r?n(t):c(t,n):o&&(t instanceof ArrayBuffer||a(t))?r?n(t):c(new Blob([t]),n):n(s[e]+(t||"")),c=(e,t)=>{const s=new FileReader;return s.onload=function(){const e=s.result.split(",")[1];t("b"+(e||""))},s.readAsDataURL(e)};function h(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let u;const p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let Qb=0;Qb<64;Qb++)d[p.charCodeAt(Qb)]=Qb;const f="function"==typeof ArrayBuffer,m=(e,t)=>{if("string"!=typeof e)return{type:"message",data:y(e,t)};const s=e.charAt(0);if("b"===s)return{type:"message",data:g(e.substring(1),t)};return r[s]?e.length>1?{type:r[s],data:e.substring(1)}:{type:r[s]}:n},g=(e,t)=>{if(f){const s=(e=>{let t,s,r,n,i,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);const c=new ArrayBuffer(o),h=new Uint8Array(c);for(t=0;t<a;t+=4)s=d[e.charCodeAt(t)],r=d[e.charCodeAt(t+1)],n=d[e.charCodeAt(t+2)],i=d[e.charCodeAt(t+3)],h[l++]=s<<2|r>>4,h[l++]=(15&r)<<4|n>>2,h[l++]=(3&n)<<6|63&i;return c})(e);return y(s,t)}return{base64:!0,data:e}},y=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,w=String.fromCharCode(30);function b(){return new TransformStream({transform(e,t){!function(e,t){i&&e.data instanceof Blob?e.data.arrayBuffer().then(h).then(t):o&&(e.data instanceof ArrayBuffer||a(e.data))?t(h(e.data)):l(e,!1,e=>{u||(u=new TextEncoder),t(u.encode(e))})}(e,s=>{const r=s.length;let n;if(r<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,r);else if(r<65536){n=new Uint8Array(3);const e=new DataView(n.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{n=new Uint8Array(9);const e=new DataView(n.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!=typeof e.data&&(n[0]|=128),t.enqueue(n),t.enqueue(s)})}})}let v;function C(e){return e.reduce((e,t)=>e+t.length,0)}function S(e,t){if(e[0].length===t)return e.shift();const s=new Uint8Array(t);let r=0;for(let n=0;n<t;n++)s[n]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),s}function k(e){if(e)return function(e){for(var t in k.prototype)e[t]=k.prototype[t];return e}(e)}k.prototype.on=k.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},k.prototype.once=function(e,t){function s(){this.off(e,s),t.apply(this,arguments)}return s.fn=t,this.on(e,s),this},k.prototype.off=k.prototype.removeListener=k.prototype.removeAllListeners=k.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n=0;n<r.length;n++)if((s=r[n])===t||s.fn===t){r.splice(n,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},k.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),s=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(s){r=0;for(var n=(s=s.slice(0)).length;r<n;++r)s[r].apply(this,t)}return this},k.prototype.emitReserved=k.prototype.emit,k.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},k.prototype.hasListeners=function(e){return!!this.listeners(e).length};const I="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),x="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function O(e,...t){return t.reduce((t,s)=>(e.hasOwnProperty(s)&&(t[s]=e[s]),t),{})}const A=x.setTimeout,E=x.clearTimeout;function R(e,t){t.useNativeTimers?(e.setTimeoutFn=A.bind(x),e.clearTimeoutFn=E.bind(x)):(e.setTimeoutFn=x.setTimeout.bind(x),e.clearTimeoutFn=x.clearTimeout.bind(x))}function M(e){return"string"==typeof e?function(e){let t=0,s=0;for(let r=0,n=e.length;r<n;r++)t=e.charCodeAt(r),t<128?s+=1:t<2048?s+=2:t<55296||t>=57344?s+=3:(r++,s+=4);return s}(e):Math.ceil(1.33*(e.byteLength||e.size))}function N(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class T extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class _ extends k{constructor(e){super(),this.writable=!1,R(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new T(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=m(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let s in e)e.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(e[s]));return t}(e);return t.length?"?"+t:""}}class P extends _{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const s=e.split(w),r=[];for(let n=0;n<s.length;n++){const e=m(s[n],t);if(r.push(e),"error"===e.type)break}return r})(e,this.socket.binaryType).forEach(e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const s=e.length,r=new Array(s);let n=0;e.forEach((e,i)=>{l(e,!1,e=>{r[i]=e,++n===s&&t(r.join(w))})})})(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=N()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let L=!1;try{L="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(qb){}const D=L;function B(){}class F extends P{constructor(e){if(super(e),"undefined"!=typeof location){const t="https:"===location.protocol;let s=location.port;s||(s=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){const s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}class U extends k{constructor(e,t,s){super(),this.createRequest=e,R(this,s),this._opts=s,this._method=s.method||"GET",this._uri=t,this._data=void 0!==s.data?s.data:null,this._create()}_create(){var e;const t=O(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(t);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&s.setRequestHeader(e,this._opts.extraHeaders[e])}}catch(r){}if("POST"===this._method)try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(r){}try{s.setRequestHeader("Accept","*/*")}catch(r){}null===(e=this._opts.cookieJar)||void 0===e||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var e;3===s.readyState&&(null===(e=this._opts.cookieJar)||void 0===e||e.parseCookies(s.getResponseHeader("set-cookie"))),4===s.readyState&&(200===s.status||1223===s.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof s.status?s.status:0)},0))},s.send(this._data)}catch(r){return void this.setTimeoutFn(()=>{this._onError(r)},0)}"undefined"!=typeof document&&(this._index=U.requestsCount++,U.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=B,e)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete U.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(U.requestsCount=0,U.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",j);else if("function"==typeof addEventListener){addEventListener("onpagehide"in x?"pagehide":"unload",j,!1)}function j(){for(let e in U.requests)U.requests.hasOwnProperty(e)&&U.requests[e].abort()}const z=function(){const e=V({xdomain:!1});return e&&null!==e.responseType}();function V(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||D))return new XMLHttpRequest}catch(s){}if(!t)try{return new(x[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(s){}}const W="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class Y extends _{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,s=W?{}:O(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(qb){return this.emitReserved("error",qb)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;l(s,this.supportsBinary,e=>{try{this.doWrite(s,e)}catch(t){}r&&I(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=N()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const G=x.WebSocket||x.MozWebSocket;const Z={websocket:class extends Y{createSocket(e,t,s){return W?new G(e,t,s):t?new G(e,t):new G(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends _{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(qb){return this.emitReserved("error",qb)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=function(e,t){v||(v=new TextDecoder);const s=[];let r=0,i=-1,o=!1;return new TransformStream({transform(a,l){for(s.push(a);;){if(0===r){if(C(s)<1)break;const e=S(s,1);o=!(128&~e[0]),i=127&e[0],r=i<126?3:126===i?1:2}else if(1===r){if(C(s)<2)break;const e=S(s,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(2===r){if(C(s)<8)break;const e=S(s,8),t=new DataView(e.buffer,e.byteOffset,e.length),o=t.getUint32(0);if(o>Math.pow(2,21)-1){l.enqueue(n);break}i=o*Math.pow(2,32)+t.getUint32(4),r=3}else{if(C(s)<i)break;const e=S(s,i);l.enqueue(m(o?e:v.decode(e),t)),r=0}if(0===i||i>e){l.enqueue(n);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),r=b();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();const i=()=>{s.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;this._writer.write(s).then(()=>{r&&I(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}},polling:class extends F{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=z&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new U(V,this.uri(),e)}}},J=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,X=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function H(e){if(e.length>8e3)throw"URI too long";const t=e,s=e.indexOf("["),r=e.indexOf("]");-1!=s&&-1!=r&&(e=e.substring(0,s)+e.substring(s,r).replace(/:/g,";")+e.substring(r,e.length));let n=J.exec(e||""),i={},o=14;for(;o--;)i[X[o]]=n[o]||"";return-1!=s&&-1!=r&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(e,t){const s=/\/{2,9}/g,r=t.replace(s,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,i.path),i.queryKey=function(e,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(s[t]=r)}),s}(0,i.query),i}const K="function"==typeof addEventListener&&"function"==typeof removeEventListener,$=[];K&&addEventListener("offline",()=>{$.forEach(e=>e())},!1);class q extends k{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"==typeof e&&(t=e,e=null),e){const s=H(e);t.hostname=s.host,t.secure="https"===s.protocol||"wss"===s.protocol,t.port=s.port,s.query&&(t.query=s.query)}else t.host&&(t.hostname=H(t.host).host);R(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{const t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},s=e.split("&");for(let r=0,n=s.length;r<n;r++){let e=s[r].split("=");t[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return t}(this.opts.query)),K&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},$.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const s=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const e=this.opts.rememberUpgrade&&q.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",q.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const s=this.writeBuffer[t].data;if(s&&(e+=M(s)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,I(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,s){return this._sendPacket("message",e,t,s),this}send(e,t,s){return this._sendPacket("message",e,t,s),this}_sendPacket(e,t,s,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof s&&(r=s,s=null),"closing"===this.readyState||"closed"===this.readyState)return;(s=s||{}).compress=!1!==s.compress;const n={type:e,data:t,options:s};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},s=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(q.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),K&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const e=$.indexOf(this._offlineEventListener);-1!==e&&$.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}q.protocol=4;class Q extends q{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;q.priorWebsocketSuccess=!1;const r=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!s)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;q.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{s||"closed"!==this.readyState&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))};function n(){s||(s=!0,c(),t.close(),t=null)}const i=e=>{const s=new Error("probe error: "+e);s.transport=t.name,n(),this.emitReserved("upgradeError",s)};function o(){i("transport closed")}function a(){i("socket closed")}function l(e){t&&e.name!==t.name&&n()}const c=()=>{t.removeListener("open",r),t.removeListener("error",i),t.removeListener("close",o),this.off("close",a),this.off("upgrading",l)};t.once("open",r),t.once("error",i),t.once("close",o),this.once("close",a),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}}let ee=class extends Q{constructor(e,t={}){const s="object"==typeof e?e:t;(!s.transports||s.transports&&"string"==typeof s.transports[0])&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(e=>Z[e]).filter(e=>!!e)),super(e,s)}};const te="function"==typeof ArrayBuffer,se=Object.prototype.toString,re="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===se.call(Blob),ne="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===se.call(File);function ie(e){return te&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||re&&e instanceof Blob||ne&&e instanceof File}function oe(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,s=e.length;t<s;t++)if(oe(e[t]))return!0;return!1}if(ie(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return oe(e.toJSON(),!0);for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&oe(e[s]))return!0;return!1}function ae(e){const t=[],s=e.data,r=e;return r.data=le(s,t),r.attachments=t.length,{packet:r,buffers:t}}function le(e,t){if(!e)return e;if(ie(e)){const s={_placeholder:!0,num:t.length};return t.push(e),s}if(Array.isArray(e)){const s=new Array(e.length);for(let r=0;r<e.length;r++)s[r]=le(e[r],t);return s}if("object"==typeof e&&!(e instanceof Date)){const s={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(s[r]=le(e[r],t));return s}return e}function ce(e,t){return e.data=he(e.data,t),delete e.attachments,e}function he(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let s=0;s<e.length;s++)e[s]=he(e[s],t);else if("object"==typeof e)for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(e[s]=he(e[s],t));return e}const ue=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var pe,de;(de=pe||(pe={}))[de.CONNECT=0]="CONNECT",de[de.DISCONNECT=1]="DISCONNECT",de[de.EVENT=2]="EVENT",de[de.ACK=3]="ACK",de[de.CONNECT_ERROR=4]="CONNECT_ERROR",de[de.BINARY_EVENT=5]="BINARY_EVENT",de[de.BINARY_ACK=6]="BINARY_ACK";function fe(e){return"[object Object]"===Object.prototype.toString.call(e)}class me extends k{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const s=t.type===pe.BINARY_EVENT;s||t.type===pe.BINARY_ACK?(t.type=s?pe.EVENT:pe.ACK,this.reconstructor=new ge(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!ie(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const s={type:Number(e.charAt(0))};if(void 0===pe[s.type])throw new Error("unknown packet type "+s.type);if(s.type===pe.BINARY_EVENT||s.type===pe.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const n=e.substring(r,t);if(n!=Number(n)||"-"!==e.charAt(t))throw new Error("Illegal attachments");s.attachments=Number(n)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}s.nsp=e.substring(r,t)}else s.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const s=e.charAt(t);if(null==s||Number(s)!=s){--t;break}if(t===e.length)break}s.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!me.isPayloadValid(s.type,r))throw new Error("invalid payload");s.data=r}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(t){return!1}}static isPayloadValid(e,t){switch(e){case pe.CONNECT:return fe(t);case pe.DISCONNECT:return void 0===t;case pe.CONNECT_ERROR:return"string"==typeof t||fe(t);case pe.EVENT:case pe.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===ue.indexOf(t[0]));case pe.ACK:case pe.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ge{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=ce(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const ye=Object.freeze(Object.defineProperty({__proto__:null,Decoder:me,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==pe.EVENT&&e.type!==pe.ACK||!oe(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===pe.EVENT?pe.BINARY_EVENT:pe.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==pe.BINARY_EVENT&&e.type!==pe.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=ae(e),s=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(s),r}},get PacketType(){return pe},protocol:5},Symbol.toStringTag,{value:"Module"}));function we(e,t,s){return e.on(t,s),function(){e.off(t,s)}}const be=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ve extends k{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[we(e,"open",this.onopen.bind(this)),we(e,"packet",this.onpacket.bind(this)),we(e,"error",this.onerror.bind(this)),we(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,r,n;if(be.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const i={type:pe.EVENT,data:t,options:{}};if(i.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,s=t.pop();this._registerAckCallback(e,s),i.id=e}const o=null===(r=null===(s=this.io.engine)||void 0===s?void 0:s.transport)||void 0===r?void 0:r.writable,a=this.connected&&!(null===(n=this.io.engine)||void 0===n?void 0:n._hasPingExpired());return this.flags.volatile&&!o||(a?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,t){var s;const r=null!==(s=this.flags.timeout)&&void 0!==s?s:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const n=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))},r),i=(...e)=>{this.io.clearTimeoutFn(n),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((s,r)=>{const n=(e,t)=>e?r(e):s(t);n.withError=!0,t.push(n),this.emit(e,...t)})}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>{if(s!==this._queue[0])return;return null!==e?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),s.pending=!1,this._drainQueue()}),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:pe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case pe.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case pe.EVENT:case pe.BINARY_EVENT:this.onevent(e);break;case pe.ACK:case pe.BINARY_ACK:this.onack(e);break;case pe.DISCONNECT:this.ondisconnect();break;case pe.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let s=!1;return function(...r){s||(s=!0,t.packet({type:pe.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:pe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const s of t)s.apply(this,e.data)}}}function Ce(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ce.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+s:e-s}return 0|Math.min(e,this.max)},Ce.prototype.reset=function(){this.attempts=0},Ce.prototype.setMin=function(e){this.ms=e},Ce.prototype.setMax=function(e){this.max=e},Ce.prototype.setJitter=function(e){this.jitter=e};class Se extends k{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,R(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(s=t.randomizationFactor)&&void 0!==s?s:.5),this.backoff=new Ce({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||ye;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new ee(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const r=we(t,"open",function(){s.onopen(),e&&e()}),n=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},i=we(t,"error",n);if(!1!==this._timeout){const e=this._timeout,s=this.setTimeoutFn(()=>{r(),n(new Error("timeout")),t.close()},e);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}return this.subs.push(r),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(we(e,"ping",this.onping.bind(this)),we(e,"data",this.ondata.bind(this)),we(e,"error",this.onerror.bind(this)),we(e,"close",this.onclose.bind(this)),we(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){I(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new ve(this,e,t),this.nsps[e]=s),s}_destroy(e){const t=Object.keys(this.nsps);for(const s of t){if(this.nsps[s].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),null===(s=this.engine)||void 0===s||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const ke={};function Ie(e,t){"object"==typeof e&&(t=e,e=void 0);const s=function(e,t="",s){let r=e;s=s||"undefined"!=typeof location&&location,null==e&&(e=s.protocol+"//"+s.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?s.protocol+e:s.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==s?s.protocol+"//"+e:"https://"+e),r=H(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const n=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+n+":"+r.port+t,r.href=r.protocol+"://"+n+(s&&s.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=s.source,n=s.id,i=s.path,o=ke[n]&&i in ke[n].nsps;let a;return t.forceNew||t["force new connection"]||!1===t.multiplex||o?a=new Se(r,t):(ke[n]||(ke[n]=new Se(r,t)),a=ke[n]),s.query&&!t.query&&(t.query=s.queryKey),a.socket(s.path,t)}Object.assign(Ie,{Manager:Se,Socket:ve,io:Ie,connect:Ie});class xe{constructor(e){t(this,"socket"),t(this,"encode"),t(this,"decode"),this.socket=Ie(e.baseUrl,{transports:["websocket"],path:"/analytics/ws",auth:{token:e.authToken},query:e.query}),this.encode=e.encoder??(e=>function(e){const t=(new TextEncoder).encode(e);if("undefined"!=typeof window&&"function"==typeof window.btoa){const e=Array.from(t,e=>String.fromCharCode(e)).join("");return btoa(e)}if("undefined"!=typeof Buffer)return Buffer.from(t).toString("base64");throw new Error("[utils.base64Encode]: Unsupported environment")}(JSON.stringify(e))),this.decode=e.decoder??(e=>JSON.parse((e=>{if("undefined"!=typeof window&&"function"==typeof window.atob){const t=atob(e),s=t.length,r=new Uint8Array(s);for(let e=0;e<s;e++)r[e]=t.charCodeAt(e);return(new TextDecoder).decode(r)}if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf-8");throw new Error("[utils.base64Decode]: Unsupported environment")})(e)))}send(e,t,s){"function"==typeof s?this.socket.emit(e,this.encode(t),s):this.socket.emit(e,this.encode(t))}on(e,t){this.socket.on(e,e=>t(this.decode(e)))}}class Oe{constructor(e){t(this,"baseUrl"),t(this,"authToken"),t(this,"sdkMetadata"),this.baseUrl=e.baseUrl,this.authToken=e.authToken,this.sdkMetadata=e.sdkMetadata}async send(e,t){const s=new URL(e,this.baseUrl),r={...t,...this.sdkMetadata&&{sdk:this.sdkMetadata}};try{const e=await fetch(s.toString(),{method:"POST",headers:{"Content-Type":"application/json",...this.authToken&&{Authorization:`Bearer ${this.authToken}`}},body:JSON.stringify(r)});if(!e.ok)return null;let t;try{t=await e.json()}catch{t={}}return t}catch(n){}}}class Ae{constructor(e){if(t(this,"defaultTTL"),t(this,"items"),this.defaultTTL=e,e<=0)throw new Error("Default TTL must be a positive number.");this.items=new Map,this.defaultTTL=e,setInterval(()=>this.cleanup(),e)}add(e,t){const s=void 0!==t?t:this.defaultTTL;if(s<=0)throw new Error("TTL must be a positive number.");const r=Date.now()+s;this.items.set(e,r)}has(e){const t=this.items.get(e);return void 0!==t&&(!(Date.now()>t)||(this.items.delete(e),!1))}delete(e){this.items.delete(e)}get size(){return this.cleanup(),this.items.size}clear(){this.items.clear()}cleanup(){const e=Date.now();for(const[t,s]of this.items.entries())s<=e&&this.items.delete(t)}toArray(){return this.cleanup(),Array.from(this.items.keys())}}let Ee=null;var Re,Me,Ne,Te;"undefined"!=typeof window&&window.addEventListener("message",e=>{if("https://agent.brainfi.sh"===e.origin&&"REQUEST_USER_IDENTITY"===e.data?.type&&Ee&&e.source){const t=document.querySelector("#bf-iframe-container .trigger-iframe");if(!t||e.source!==t.contentWindow)return void console.warn("BrainfishWidgetWarn: Rejected REQUEST_USER_IDENTITY from untrusted iframe source:",e.origin);e.source.postMessage({type:"USER_IDENTIFY",payload:Ee},e.origin)}}),(Me=Re||(Re={})).OpenUrl="openUrl",Me.CallPhone="callPhone",Me.SendEmail="sendEmail",Me.TriggerEvent="triggerEvent",(Te=Ne||(Ne={})).Button="button",Te.Link="link";const _e=class e{constructor(s){t(this,"options"),t(this,"client"),t(this,"httpClient"),t(this,"userId"),t(this,"global"),t(this,"queue",[]),t(this,"knownEvents",["nudge.show"]),t(this,"eventListeners",{}),t(this,"recentNudgeIds",new Ae(1e3)),t(this,"trackingDisabled",!1),this.options=s;const r={sdk_name:s.sdk||"node",sdk_version:s.sdkVersion||""},n=s.apiUrl||"https://analytic.brainfi.sh",i=s.accessKey;this.client=new xe({baseUrl:n,authToken:i,query:r}),this.httpClient=new Oe({baseUrl:n,authToken:i,sdkMetadata:{name:s.sdk||"node",version:s.sdkVersion||""}}),"undefined"!=typeof window&&"undefined"!=typeof localStorage&&(this.trackingDisabled="true"===localStorage.getItem(e.TRACKING_DISABLED_KEY)),this.setupIncomingPayloadHandler()}init(){}ready(){this.options.waitForUser=!1,this.flush()}setupIncomingPayloadHandler(){this.client.on("e",this.handleIncomingPayload.bind(this))}handleIncomingPayload(e){if("nudge.show"===e.type){const{nudgeId:t}=e.payload;if(this.recentNudgeIds.has(t))return;this.recentNudgeIds.add(t),this.dispatchEventListeners("nudge.show",e.payload)}}dispatchEventListeners(e,t){this.eventListeners[e]?.forEach(e=>e(t))}on(e,t){this.knownEvents.includes(e)&&(this.eventListeners[e]||(this.eventListeners[e]=[]),this.eventListeners[e].push(t))}off(e,t){this.knownEvents.includes(e)&&this.eventListeners[e]&&(this.eventListeners[e]=this.eventListeners[e].filter(e=>e!==t),0===this.eventListeners[e].length&&delete this.eventListeners[e])}async send(e,t){return this.options.disabled||this.trackingDisabled||this.options.filter&&!this.options.filter(e)?Promise.resolve():this.options.waitForUser&&!this.userId?(this.queue.push(e),Promise.resolve()):this.client.send("t",e,t)}setGlobalProperties(e){this.global={...this.global,...e}}async track(e,t,s){return this.send({type:"event.track",payload:{name:e,userId:t?.userId??this.userId,properties:{...this.global??{},...t??{},...s?{_bfOverrides:s}:{}}}})}async identify(e){e.userId?(this.userId=e.userId,this.flush()):console.warn("BrainfishWidgetWarn: `.identify` called without a userId. User identification requires a valid userId to be provided.");const t=new Set(["userId","firstName","lastName","email","phone","avatar","properties"]),s=Object.keys(e).filter(e=>!t.has(e));s.length>0&&console.warn(`BrainfishWidgetWarn: The following fields are not recognized as main identifier fields: ${s.join(", ")}. Please place custom fields under the 'properties' object instead. Note: Using fields incorrectly may cause user identification to not work as expected.`),e.phone&&!/^\+[1-9]\d{1,14}$/.test(e.phone)&&console.warn("BrainfishWidgetWarn: phone should be in E.164 format (e.g., +14155552671). Providing the correct format ensures accurate user identification."),Ee=e;const r=document.querySelector("#bf-iframe-container .trigger-iframe");if(r){const t=()=>{r.contentWindow&&r.contentWindow.postMessage({type:"USER_IDENTIFY",payload:e},"*")};r.contentWindow&&t(),r.addEventListener("load",t)}if(Object.keys(e).length>1)return this.send({type:"user.identify",payload:{...e,properties:{...this.global,...e.properties}}})}async record(e){if(this.options.disabled)return Promise.resolve(null);if(this.trackingDisabled)return Promise.resolve(null);const t={type:"event.record",payload:{events:e,userId:this.userId}};if(this.options.filter&&!this.options.filter(t))return Promise.resolve(null);const s=await this.httpClient.send("/s",{events:e,userId:this.userId});return s?.sessionId||null}async alias(e){return this.send({type:"user.alias",payload:e})}async increment(e){return this.send({type:"user.increment",payload:e})}async decrement(e){return this.send({type:"user.decrement",payload:e})}clear(){this.userId=void 0}flush(){this.queue.forEach(e=>{this.send({...e,payload:{...e.payload,userId:e.payload.userId??this.userId}})}),this.queue=[]}disableTracking(){this.trackingDisabled=!0,"undefined"!=typeof window&&"undefined"!=typeof localStorage&&localStorage.setItem(e.TRACKING_DISABLED_KEY,"true")}enableTracking(){this.trackingDisabled=!1,"undefined"!=typeof window&&"undefined"!=typeof localStorage&&localStorage.removeItem(e.TRACKING_DISABLED_KEY),console.log("Brainfish tracking re-enabled. Refresh page for full effect.")}isTrackingDisabled(){return this.trackingDisabled}};t(_e,"TRACKING_DISABLED_KEY","bf_tracking_disabled");let Pe=_e;var Le,De=Object.defineProperty,Be=(e,t,s)=>((e,t,s)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),Fe=Object.defineProperty,Ue=(e,t,s)=>((e,t,s)=>t in e?Fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),je=(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))(je||{});const ze={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ve={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},We={};function Ye(e){if(We[e])return We[e];const t=globalThis[e],s=t.prototype,r=e in ze?ze[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in Ve?Ve[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return We[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?We[e]=i:s}catch{return s}}const Ge={};function Ze(e,t,s){var r;const n=`${e}.${String(s)}`;if(Ge[n])return Ge[n].call(t);const i=Ye(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(Ge[n]=o,o.call(t)):t[s]}const Je={};function Xe(e,t,s){const r=`${e}.${String(s)}`;if(Je[r])return Je[r].bind(t);const n=Ye(e)[s];return"function"!=typeof n?t[s]:(Je[r]=n,n.bind(t))}const He={childNodes:function(e){return Ze("Node",e,"childNodes")},parentNode:function(e){return Ze("Node",e,"parentNode")},parentElement:function(e){return Ze("Node",e,"parentElement")},textContent:function(e){return Ze("Node",e,"textContent")},contains:function(e,t){return Xe("Node",e,"contains")(t)},getRootNode:function(e){return Xe("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ze("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ze("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ze("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ze("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Ye("MutationObserver").constructor}};function Ke(e){return e.nodeType===e.ELEMENT_NODE}function $e(e){const t=e&&"host"in e&&"mode"in e&&He.host(e)||null;return Boolean(t&&"shadowRoot"in t&&He.shadowRoot(t)===e)}function qe(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Qe(e){try{const s=e.rules||e.cssRules;if(!s)return null;let r=e.href;!r&&e.ownerNode&&e.ownerNode.ownerDocument&&(r=e.ownerNode.ownerDocument.location.href);const n=Array.from(s,e=>et(e,r)).join("");return(t=n).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(s){return null}var t}function et(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=Qe(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const s=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?s.push("layer"):e.layerName&&s.push(`layer(${e.layerName})`),e.supportsText&&s.push(`supports(${e.supportsText})`),e.media.length&&s.push(e.media.mediaText),s.join(" ")+";"}(e)}catch(s){t=e.cssText}return e.styleSheet.href?ut(t,e.styleSheet.href):t}{let s=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(s=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(s)),t?ut(s,t):s}}let tt=class{constructor(){Ue(this,"idNodeMap",new Map),Ue(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-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){const s=t.id;this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t)}replace(e,t){const s=this.getNode(e);if(s){const e=this.nodeMetaMap.get(s);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function st({element:e,maskInputOptions:t,tagName:s,type:r,value:n,maskInputFn:i}){let o=n||"";const a=r&&rt(r);return(t[s.toLowerCase()]||a&&t[a])&&(o=i?i(o,e):"*".repeat(o.length)),o}function rt(e){return e.toLowerCase()}const nt="__rrweb_original__";function it(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?rt(t):null}function ot(e,t){let s;try{s=new URL(e,t??window.location.href)}catch(qb){return null}const r=s.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==r?void 0:r[1])??null}const at=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,lt=/^(?:[a-z+]+:)?\/\//i,ct=/^www\..*/i,ht=/^(data:)([^,]*),(.*)/i;function ut(e,t){return(e||"").replace(at,(e,s,r,n,i,o)=>{const a=r||i||o,l=s||n||"";if(!a)return e;if(lt.test(a)||ct.test(a))return`url(${l}${a}${l})`;if(ht.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 t of h)"."!==t&&(".."===t?c.pop():c.push(t));return`url(${l}${c.join("/")}${l})`})}function pt(e){return e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function dt(e,t){return function(e,t){const s=Array.from(t.childNodes),r=[];if(s.length>1&&e&&"string"==typeof e){const t=pt(e);for(let n=1;n<s.length;n++)if(s[n].textContent&&"string"==typeof s[n].textContent){const i=pt(s[n].textContent);for(let s=3;s<i.length;s++){const n=i.substring(0,s);if(2===t.split(n).length){const s=t.indexOf(n);for(let t=s;t<e.length;t++)if(pt(e.substring(0,t)).length===s){r.push(e.substring(0,t)),e=e.substring(t);break}break}}}}return r.push(e),r}(e,t).join("/* rr_split */")}let ft=1;const mt=new RegExp("[^a-z0-9-_:]");function gt(){return ft++}let yt,wt;const bt=/^[^ \t\n\r\u000c]+/,vt=/^[, \t\n\r\u000c]+/;const Ct=new WeakMap;function St(e,t){return t&&""!==t.trim()?It(e,t):t}function kt(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function It(e,t){let s=Ct.get(e);if(s||(s=e.createElement("a"),Ct.set(e,s)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return s.setAttribute("href",t),s.href}function xt(e,t,s,r){return r?"src"===s||"href"===s&&("use"!==t||"#"!==r[0])||"xlink:href"===s&&"#"!==r[0]?St(e,r):"background"!==s||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===s?function(e,t){if(""===t.trim())return t;let s=0;function r(e){let r;const n=e.exec(t.substring(s));return n?(r=n[0],s+=r.length,r):""}const n=[];for(;r(vt),!(s>=t.length);){let i=r(bt);if(","===i.slice(-1))i=St(e,i.substring(0,i.length-1)),n.push(i);else{let r="";i=St(e,i);let o=!1;for(;;){const e=t.charAt(s);if(""===e){n.push((i+r).trim());break}if(o)")"===e&&(o=!1);else{if(","===e){s+=1,n.push((i+r).trim());break}"("===e&&(o=!0)}r+=e,s+=1}}}return n.join(", ")}(e,r):"style"===s?ut(r,It(e)):"object"===t&&"data"===s?St(e,r):r:St(e,r):r}function Ot(e,t,s){return("video"===e||"audio"===e)&&"autoplay"===t}function At(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!s&&At(He.parentNode(e),t,s);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!s&&At(He.parentNode(e),t,s)}function Et(e,t,s,r){let n;if(Ke(e)){if(n=e,!He.childNodes(n).length)return!1}else{if(null===He.parentElement(e))return!1;n=He.parentElement(e)}try{if("string"==typeof t){if(r){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(At(n,t,r))return!0;if(s)if(r){if(n.closest(s))return!0}else if(n.matches(s))return!0}catch(i){}return!1}function Rt(e,t){const{doc:s,mirror:r,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 s=t.getId(e);return 1===s?void 0:s}(s,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:je.Document,childNodes:[],compatMode:e.compatMode}:{type:je.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:je.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){const{doc:s,blockClass:r,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,s){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const r=e.classList[s];if(t.test(r))return!0}if(s)return e.matches(s)}catch(r){}return!1}(e,r,n),m=function(e){if(e instanceof HTMLFormElement)return"form";const t=rt(e.tagName);return mt.test(t)?"div":t}(e);let g={};const y=e.attributes.length;for(let v=0;v<y;v++){const t=e.attributes[v];Ot(m,t.name,t.value)||(g[t.name]=xt(s,m,rt(t.name),t.value))}if("link"===m&&i){const t=Array.from(s.styleSheets).find(t=>t.href===e.href);let r=null;t&&(r=Qe(t)),r&&(delete g.rel,delete g.href,g._cssText=r)}if("style"===m&&e.sheet){let t=Qe(e.sheet);t&&(e.childNodes.length>1&&(t=dt(t,e)),g._cssText=t)}if("input"===m||"textarea"===m||"select"===m){const t=e.value,s=e.checked;"radio"!==g.type&&"checkbox"!==g.type&&"submit"!==g.type&&"button"!==g.type&&t?g.value=st({element:e,type:it(e),tagName:m,value:t,maskInputOptions:o,maskInputFn:a}):s&&(g.checked=s)}"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");if("canvas"===m&&h)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let s=0;s<e.width;s+=50)for(let r=0;r<e.height;r+=50){const n=t.getImageData,i=nt in n?n[nt]:n;if(new Uint32Array(i.call(t,s,r,Math.min(50,e.width-s),Math.min(50,e.height-r)).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),r=s.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(l.type,l.quality)&&(g.rr_dataURL=t)}if("img"===m&&c){yt||(yt=s.createElement("canvas"),wt=yt.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{yt.width=t.naturalWidth,yt.height=t.naturalHeight,wt.drawImage(t,0,0),g.rr_dataURL=yt.toDataURL(l.type,l.quality)}catch(qb){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=${r}! Error: ${qb}`)}"anonymous"===t.crossOrigin&&(n?g.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}if("audio"===m||"video"===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}p||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop));if(f){const{width:t,height:s}=e.getBoundingClientRect();g={class:g.class,rr_width:`${t}px`,rr_height:`${s}px`}}"iframe"!==m||u(g.src)||(e.contentDocument||(g.rr_src=g.src),delete g.src);let w;try{customElements.get(m)&&(w=!0)}catch(b){}return{type:je.Element,tagName:m,attributes:g,childNodes:[],isSVG:kt(e)||void 0,needBlock:f,rootId:d,isCustom:w}}(e,{doc:s,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:s,maskTextFn:r,rootId:n,cssCaptured:i}=t,o=He.parentNode(e),a=o&&o.tagName;let l="";const c="STYLE"===a||void 0,h="SCRIPT"===a||void 0;h?l="SCRIPT_PLACEHOLDER":i||(l=He.textContent(e),c&&l&&(l=ut(l,It(t.doc))));!c&&!h&&l&&s&&(l=r?r(l,He.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:je.Text,textContent:l||"",rootId:n}}(e,{doc:s,needsMask:o,maskTextFn:c,rootId:y,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:je.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:je.Comment,textContent:He.textContent(e)||"",rootId:y};default:return!1}}function Mt(e){return null==e?"":e.toLowerCase()}function Nt(e,t){const{doc:s,mirror:r,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:C=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:k=!1,cssCaptured:I=!1}=t;let{needsMask:x}=t,{preserveWhiteSpace:O=!0}=t;if(!x){x=Et(e,o,a,void 0===x)}const A=Rt(e,{doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:x,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:k,cssCaptured:I});if(!A)return console.warn(e,"not serialized"),null;let E;E=r.hasNode(e)?r.getId(e):function(e,t){if(t.comment&&e.type===je.Comment)return!0;if(e.type===je.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===ot(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Mt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Mt(e.attributes.name)||"icon"===Mt(e.attributes.rel)||"apple-touch-icon"===Mt(e.attributes.rel)||"shortcut icon"===Mt(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Mt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Mt(e.attributes.property).match(/^(og|twitter|fb):/)||Mt(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Mt(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Mt(e.attributes.name)||"googlebot"===Mt(e.attributes.name)||"bingbot"===Mt(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Mt(e.attributes.name)||"generator"===Mt(e.attributes.name)||"framework"===Mt(e.attributes.name)||"publisher"===Mt(e.attributes.name)||"progid"===Mt(e.attributes.name)||Mt(e.attributes.property).match(/^article:/)||Mt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Mt(e.attributes.name)||"yandex-verification"===Mt(e.attributes.name)||"csrf-token"===Mt(e.attributes.name)||"p:domain_verify"===Mt(e.attributes.name)||"verify-v1"===Mt(e.attributes.name)||"verification"===Mt(e.attributes.name)||"shopify-checkout-api-token"===Mt(e.attributes.name)))return!0}}return!1}(A,d)||!O&&A.type===je.Text&&!A.textContent.replace(/^\s+|\s+$/gm,"").length?-2:gt();const R=Object.assign(A,{id:E});if(r.add(e,R),-2===E)return null;y&&y(e);let M=!l;if(R.type===je.Element){M=M&&!R.needBlock,delete R.needBlock;const t=He.shadowRoot(e);t&&qe(t)&&(R.isShadowHost=!0)}if((R.type===je.Document||R.type===je.Element)&&M){d.headWhitespace&&R.type===je.Element&&"head"===R.tagName&&(O=!1);const t={doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S,cssCaptured:!1};if(R.type===je.Element&&"textarea"===R.tagName&&void 0!==R.attributes.value);else{R.type===je.Element&&void 0!==R.attributes._cssText&&"string"==typeof R.attributes._cssText&&(t.cssCaptured=!0);for(const s of Array.from(He.childNodes(e))){const e=Nt(s,t);e&&R.childNodes.push(e)}}let k=null;if(Ke(e)&&(k=He.shadowRoot(e)))for(const e of Array.from(He.childNodes(k))){const s=Nt(e,t);s&&(qe(k)&&(s.isShadow=!0),R.childNodes.push(s))}}const N=He.parentNode(e);return N&&$e(N)&&qe(N)&&(R.isShadow=!0),R.type===je.Element&&"iframe"===R.tagName&&function(e,t,s){const r=e.contentWindow;if(!r)return;let n,i=!1;try{n=r.document.readyState}catch(a){return}if("complete"!==n){const r=setTimeout(()=>{i||(t(),i=!0)},s);return void e.addEventListener("load",()=>{clearTimeout(r),i=!0,t()})}const o="about:blank";if(r.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 s=Nt(t,{doc:t,mirror:r,blockClass:n,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S});s&&w(e,s)}},b),R.type===je.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===ot(R.attributes.href))&&function(e,t,s){let r,n=!1;try{r=e.sheet}catch(o){return}if(r)return;const i=setTimeout(()=>{n||(t(),n=!0)},s);e.addEventListener("load",()=>{clearTimeout(i),n=!0,t()})}(e,()=>{if(v){const t=Nt(e,{doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S});t&&v(e,t)}},C),R}function Tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _t(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var Pt={exports:{}},Lt=String,Dt=function(){return{isColorSupported:!1,reset:Lt,bold:Lt,dim:Lt,italic:Lt,underline:Lt,inverse:Lt,hidden:Lt,strikethrough:Lt,black:Lt,red:Lt,green:Lt,yellow:Lt,blue:Lt,magenta:Lt,cyan:Lt,white:Lt,gray:Lt,bgBlack:Lt,bgRed:Lt,bgGreen:Lt,bgYellow:Lt,bgBlue:Lt,bgMagenta:Lt,bgCyan:Lt,bgWhite:Lt}};Pt.exports=Dt(),Pt.exports.createColors=Dt;var Bt=Pt.exports;const Ft=_t(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ut=Bt,jt=Ft,zt=class e extends Error{constructor(t,s,r,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!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.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=Ut.isColorSupported),jt&&e&&(t=jt(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=Ut.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=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=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Vt=zt;zt.default=zt;var Wt={};Wt.isClean=Symbol("isClean"),Wt.my=Symbol("my");const Yt={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Gt=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Yt[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Yt[s]),i.rawCache[s]=r,r}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 s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}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(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.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(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.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 s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Zt=Gt;Gt.default=Gt;let Jt=Zt;function Xt(e,t){new Jt(t).stringify(e)}var Ht=Xt;Xt.default=Xt;let{isClean:Kt,my:$t}=Wt,qt=Vt,Qt=Zt,es=Ht;function ts(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>ts(e,s)):("object"===i&&null!==n&&(n=ts(n)),s[r]=n)}return s}let ss=class{constructor(e={}){this.raws={},this[Kt]=!1,this[$t]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ts(this);for(let s in e)t[s]=e[s];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:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new qt(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Kt]){this[Kt]=!1;let e=this;for(;e=e.parent;)e[Kt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,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},s=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 r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new Qt).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,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=es){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var rs=ss;ss.default=ss;let ns=rs,is=class extends ns{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var os=is;is.default=is;var as={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:ls,SourceMapGenerator:cs}=Ft,{existsSync:hs,readFileSync:us}=Ft,{dirname:ps,join:ds}=Ft;let fs=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ps(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new ls(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").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}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 s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=ps(e),hs(e))return this.mapFile=e,us(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof ls)return cs.fromSourceMap(t).toString();if(t instanceof cs)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=ds(ps(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var ms=fs;fs.default=fs;let{SourceMapConsumer:gs,SourceMapGenerator:ys}=Ft,{fileURLToPath:ws,pathToFileURL:bs}=Ft,{isAbsolute:vs,resolve:Cs}=Ft,{nanoid:Ss}=as,ks=Ft,Is=Vt,xs=ms,Os=Symbol("fromOffsetCache"),As=Boolean(gs&&ys),Es=Boolean(Cs&&vs),Rs=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Es||/^\w+:\/\//.test(t.from)||vs(t.from)?this.file=t.from:this.file=Cs(t.from)),Es&&As){let e=new xs(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 "+Ss(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new Is(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,r.plugin):new Is(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(bs&&(n.input.url=bs(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[Os])s=this[Os];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[Os]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Cs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){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 s&&(n=o.originalPositionFor({column:r,line:s})),i=vs(a.source)?bs(a.source):new URL(a.source,this.map.consumer().sourceRoot||bs(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!ws)throw new Error("file: protocol is not available in this PostCSS build");l.file=ws(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 Ms=Rs;Rs.default=Rs,ks&&ks.registerInput&&ks.registerInput(Rs);let{SourceMapConsumer:Ns,SourceMapGenerator:Ts}=Ft,{dirname:_s,relative:Ps,resolve:Ls,sep:Ds}=Ft,{pathToFileURL:Bs}=Ft,Fs=Ms,Us=Boolean(Ns&&Ts),js=Boolean(_s&&Ls&&Ps&&Ds);var zs=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,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.toString()):"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,s=this.toUrl(this.path(e.file)),r=e.root||_s(e.file);!1===this.mapOpts.sourcesContent?(t=new Ns(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}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(),js&&Us&&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=Ts.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ts({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 Ts({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=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=s,i.generated.column=r-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?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=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=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-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 s=this.opts.to?_s(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=_s(Ls(s,this.mapOpts.annotation)));let r=Ps(s,e);return this.memoizedPaths.set(e,r),r}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 Fs(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,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(Bs){let t=Bs(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Ds&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let Vs=rs,Ws=class extends Vs{constructor(e){super(e),this.type="comment"}};var Ys=Ws;Ws.default=Ws;let Gs,Zs,Js,Xs,{isClean:Hs,my:Ks}=Wt,$s=os,qs=Ys,Qs=rs;function er(e){return e.map(e=>(e.nodes&&(e.nodes=er(e.nodes)),delete e.source,e))}function tr(e){if(e[Hs]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)tr(t)}let sr=class e extends Qs{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,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}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")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(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,s)=>(e[t]===s||(e[t]=s,"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 s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=er(Gs(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 new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new $s(t)]}else if(t.selector)t=[new Zs(t)];else if(t.name)t=[new Js(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new qs(t)]}return t.map(t=>(t[Ks]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Hs]&&tr(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.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 s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}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]}};sr.registerParse=e=>{Gs=e},sr.registerRule=e=>{Zs=e},sr.registerAtRule=e=>{Js=e},sr.registerRoot=e=>{Xs=e};var rr=sr;sr.default=sr,sr.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Js.prototype):"rule"===e.type?Object.setPrototypeOf(e,Zs.prototype):"decl"===e.type?Object.setPrototypeOf(e,$s.prototype):"comment"===e.type?Object.setPrototypeOf(e,qs.prototype):"root"===e.type&&Object.setPrototypeOf(e,Xs.prototype),e[Ks]=!0,e.nodes&&e.nodes.forEach(e=>{sr.rebuild(e)})};let nr,ir,or=rr,ar=class extends or{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new nr(new ir,this,e).stringify()}};ar.registerLazyResult=e=>{nr=e},ar.registerProcessor=e=>{ir=e};var lr=ar;ar.default=ar;let cr={};var hr=function(e){cr[e]||(cr[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let ur=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 s in t)this[s]=t[s]}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 pr=ur;ur.default=ur;let dr=pr,fr=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new dr(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var mr=fr;fr.default=fr;const gr="'".charCodeAt(0),yr='"'.charCodeAt(0),wr="\\".charCodeAt(0),br="/".charCodeAt(0),vr="\n".charCodeAt(0),Cr=" ".charCodeAt(0),Sr="\f".charCodeAt(0),kr="\t".charCodeAt(0),Ir="\r".charCodeAt(0),xr="[".charCodeAt(0),Or="]".charCodeAt(0),Ar="(".charCodeAt(0),Er=")".charCodeAt(0),Rr="{".charCodeAt(0),Mr="}".charCodeAt(0),Nr=";".charCodeAt(0),Tr="*".charCodeAt(0),_r=":".charCodeAt(0),Pr="@".charCodeAt(0),Lr=/[\t\n\f\r "#'()/;[\\\]{}]/g,Dr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Br=/.[\r\n"'(/\\]/,Fr=/[\da-f]/i;let Ur=rr,jr=class extends Ur{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 zr=jr;jr.default=jr,Ur.registerAtRule(jr);let Vr,Wr,Yr=rr,Gr=class extends Yr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new Vr(new Wr,this,e).stringify()}};Gr.registerLazyResult=e=>{Vr=e},Gr.registerProcessor=e=>{Wr=e};var Zr=Gr;Gr.default=Gr,Yr.registerRoot(Gr);let Jr={comma:e=>Jr.split(e,[","],!0),space:e=>Jr.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Xr=Jr;Jr.default=Jr;let Hr=rr,Kr=Xr,$r=class extends Hr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Kr.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var qr=$r;$r.default=$r,Hr.registerRule($r);let Qr=os,en=function(e,t={}){let s,r,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(s=p.charCodeAt(m),s){case vr:case Cr:case kr:case Ir:case Sr:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===Cr||s===vr||s===kr||s===Ir||s===Sr);u=["space",p.slice(m,r)],m=r-1;break;case xr:case Or:case Rr:case Mr:case _r:case Nr:case Er:{let e=String.fromCharCode(s);u=[e,e,m];break}case Ar:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==gr&&h!==yr&&h!==Cr&&h!==vr&&h!==kr&&h!==Sr&&h!==Ir){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===wr;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||Br.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case gr:case yr:n=s===gr?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===wr;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case Pr:Lr.lastIndex=m+1,Lr.test(p),r=0===Lr.lastIndex?p.length-1:Lr.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case wr:for(r=m,o=!0;p.charCodeAt(r+1)===wr;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==br&&s!==Cr&&s!==vr&&s!==kr&&s!==Ir&&s!==Sr&&(r+=1,Fr.test(p.charAt(r)))){for(;Fr.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===Cr&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===br&&p.charCodeAt(m+1)===Tr?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(Dr.lastIndex=m+1,Dr.test(p),r=0===Dr.lastIndex?p.length-1:Dr.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},tn=Ys,sn=zr,rn=Zr,nn=qr;const on={empty:!0,space:!0};let an=rr,ln=class{constructor(e){this.input=e,this.root=new rn,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,s,r,n=new sn;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(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[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&&(e=a[a.length-1],n.source.end=this.getPosition(e[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 s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new tn;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=en(this.input)}decl(e,t){let s=new Qr;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.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 a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.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 nn;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,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===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&&r){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,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",on[a]||on[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new nn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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})}},cn=Ms;function hn(e,t){let s=new cn(e,t),r=new ln(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var un=hn;hn.default=hn,an.registerParse(hn);let{isClean:pn,my:dn}=Wt,fn=zs,mn=Ht,gn=rr,yn=lr,wn=hr,bn=mr,vn=un,Cn=Zr;const Sn={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},kn={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},In={Once:!0,postcssPlugin:!0,prepare:!0};function xn(e){return"object"==typeof e&&"function"==typeof e.then}function On(e){let t=!1,s=Sn[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function An(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:On(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function En(e){return e[pn]=!1,e.nodes&&e.nodes.forEach(e=>En(e)),e}let Rn={},Mn=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof bn)n=En(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=vn;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[dn]&&gn.rebuild(n)}else n=En(s);this.result=new bn(t,n,r),this.helpers={...Rn,postcss:Rn,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 new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(qb){console&&console.error&&console.error(qb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!kn[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!In[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(xn(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[pn];){e[pn]=!0;let s=[An(e)];for(;s.length>0;){let e=this.visitTick(s);if(xn(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;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(t){throw this.handleError(t)}}}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 xn(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(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=mn;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new fn(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(xn(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[pn];)e[pn]=!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"production"!==process.env.NODE_ENV&&("from"in this.opts||wn("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(xn(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[pn])return r[pn]=!0,void e.push(An(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[pn]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[pn]=!0;let t=On(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[pn]||this.walkSync(e)});else{let t=this.listeners[s];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"}};Mn.registerPostcss=e=>{Rn=e};var Nn=Mn;Mn.default=Mn,Cn.registerLazyResult(Mn),yn.registerLazyResult(Mn);let Tn=zs,_n=Ht,Pn=hr,Ln=un;const Dn=mr;let Bn=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=_n;this.result=new Dn(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Tn(n,r,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"production"!==process.env.NODE_ENV&&("from"in this._opts||Pn("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Ln;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Fn=Bn;Bn.default=Bn;let Un=Fn,jn=Nn,zn=lr,Vn=Zr,Wn=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new jn(this,e,t):new Un(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Yn=Wn;Wn.default=Wn,Vn.registerProcessor(Wn),zn.registerProcessor(Wn);let Gn=os,Zn=ms,Jn=Ys,Xn=zr,Hn=Ms,Kn=Zr,$n=qr;function qn(e,t){if(Array.isArray(e))return e.map(e=>qn(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Hn.prototype};s.map&&(s.map={...s.map,__proto__:Zn.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>qn(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Kn(r);if("decl"===r.type)return new Gn(r);if("rule"===r.type)return new $n(r);if("comment"===r.type)return new Jn(r);if("atrule"===r.type)return new Xn(r);throw new Error("Unknown node type: "+e.type)}var Qn=qn;qn.default=qn;let ei=Vt,ti=os,si=Nn,ri=rr,ni=Yn,ii=Ht,oi=Qn,ai=lr,li=pr,ci=Ys,hi=zr,ui=mr,pi=Ms,di=un,fi=Xr,mi=qr,gi=Zr,yi=rs;function wi(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new ni(e)}wi.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!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(...s);return n.postcssPlugin=e,n.postcssVersion=(new ni).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return wi([n(s)]).process(e,t)},n},wi.stringify=ii,wi.parse=di,wi.fromJSON=oi,wi.list=fi,wi.comment=e=>new ci(e),wi.atRule=e=>new hi(e),wi.decl=e=>new ti(e),wi.rule=e=>new mi(e),wi.root=e=>new gi(e),wi.document=e=>new ai(e),wi.CssSyntaxError=ei,wi.Declaration=ti,wi.Container=ri,wi.Processor=ni,wi.Document=ai,wi.Comment=ci,wi.Warning=li,wi.AtRule=hi,wi.Result=ui,wi.Input=pi,wi.Rule=mi,wi.Root=gi,wi.Node=yi,si.registerPostcss(wi);var bi=wi;wi.default=wi;const vi=Tt(bi);vi.stringify,vi.fromJSON,vi.plugin,vi.parse,vi.list,vi.document,vi.comment,vi.atRule,vi.rule,vi.decl,vi.root,vi.CssSyntaxError,vi.Declaration,vi.Container,vi.Processor,vi.Document,vi.Comment,vi.Warning,vi.AtRule,vi.Result,vi.Input,vi.Rule,vi.Root,vi.Node;var Ci=Object.defineProperty,Si=(e,t,s)=>((e,t,s)=>t in e?Ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);function ki(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ii(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var xi={exports:{}},Oi=String,Ai=function(){return{isColorSupported:!1,reset:Oi,bold:Oi,dim:Oi,italic:Oi,underline:Oi,inverse:Oi,hidden:Oi,strikethrough:Oi,black:Oi,red:Oi,green:Oi,yellow:Oi,blue:Oi,magenta:Oi,cyan:Oi,white:Oi,gray:Oi,bgBlack:Oi,bgRed:Oi,bgGreen:Oi,bgYellow:Oi,bgBlue:Oi,bgMagenta:Oi,bgCyan:Oi,bgWhite:Oi}};xi.exports=Ai(),xi.exports.createColors=Ai;var Ei=xi.exports;const Ri=Ii(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Mi=Ei,Ni=Ri,Ti=class e extends Error{constructor(t,s,r,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!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.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=Mi.isColorSupported),Ni&&e&&(t=Ni(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=Mi.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=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=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var _i=Ti;Ti.default=Ti;var Pi={};Pi.isClean=Symbol("isClean"),Pi.my=Symbol("my");const Li={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Di=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Li[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Li[s]),i.rawCache[s]=r,r}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 s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}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(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.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(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.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 s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Bi=Di;Di.default=Di;let Fi=Bi;function Ui(e,t){new Fi(t).stringify(e)}var ji=Ui;Ui.default=Ui;let{isClean:zi,my:Vi}=Pi,Wi=_i,Yi=Bi,Gi=ji;function Zi(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Zi(e,s)):("object"===i&&null!==n&&(n=Zi(n)),s[r]=n)}return s}let Ji=class{constructor(e={}){this.raws={},this[zi]=!1,this[Vi]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}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=Zi(this);for(let s in e)t[s]=e[s];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:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Wi(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[zi]){this[zi]=!1;let e=this;for(;e=e.parent;)e[zi]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,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},s=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 r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new Yi).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,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Gi){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var Xi=Ji;Ji.default=Ji;let Hi=Xi,Ki=class extends Hi{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var $i=Ki;Ki.default=Ki;var qi={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Qi,SourceMapGenerator:eo}=Ri,{existsSync:to,readFileSync:so}=Ri,{dirname:ro,join:no}=Ri;let io=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ro(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Qi(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").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}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 s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=ro(e),to(e))return this.mapFile=e,so(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Qi)return eo.fromSourceMap(t).toString();if(t instanceof eo)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=no(ro(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var oo=io;io.default=io;let{SourceMapConsumer:ao,SourceMapGenerator:lo}=Ri,{fileURLToPath:co,pathToFileURL:ho}=Ri,{isAbsolute:uo,resolve:po}=Ri,{nanoid:fo}=qi,mo=Ri,go=_i,yo=oo,wo=Symbol("fromOffsetCache"),bo=Boolean(ao&&lo),vo=Boolean(po&&uo),Co=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!vo||/^\w+:\/\//.test(t.from)||uo(t.from)?this.file=t.from:this.file=po(t.from)),vo&&bo){let e=new yo(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 "+fo(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new go(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,r.plugin):new go(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(ho&&(n.input.url=ho(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[wo])s=this[wo];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[wo]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:po(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){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 s&&(n=o.originalPositionFor({column:r,line:s})),i=uo(a.source)?ho(a.source):new URL(a.source,this.map.consumer().sourceRoot||ho(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!co)throw new Error("file: protocol is not available in this PostCSS build");l.file=co(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 So=Co;Co.default=Co,mo&&mo.registerInput&&mo.registerInput(Co);let{SourceMapConsumer:ko,SourceMapGenerator:Io}=Ri,{dirname:xo,relative:Oo,resolve:Ao,sep:Eo}=Ri,{pathToFileURL:Ro}=Ri,Mo=So,No=Boolean(ko&&Io),To=Boolean(xo&&Ao&&Oo&&Eo);var _o=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,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.toString()):"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,s=this.toUrl(this.path(e.file)),r=e.root||xo(e.file);!1===this.mapOpts.sourcesContent?(t=new ko(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}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(),To&&No&&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=Io.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Io({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 Io({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=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=s,i.generated.column=r-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?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=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=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-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 s=this.opts.to?xo(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=xo(Ao(s,this.mapOpts.annotation)));let r=Oo(s,e);return this.memoizedPaths.set(e,r),r}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 Mo(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,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(Ro){let t=Ro(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Eo&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let Po=Xi,Lo=class extends Po{constructor(e){super(e),this.type="comment"}};var Do=Lo;Lo.default=Lo;let Bo,Fo,Uo,jo,{isClean:zo,my:Vo}=Pi,Wo=$i,Yo=Do,Go=Xi;function Zo(e){return e.map(e=>(e.nodes&&(e.nodes=Zo(e.nodes)),delete e.source,e))}function Jo(e){if(e[zo]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Jo(t)}let Xo=class e extends Go{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,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}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")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(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,s)=>(e[t]===s||(e[t]=s,"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 s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=Zo(Bo(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 new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Wo(t)]}else if(t.selector)t=[new Fo(t)];else if(t.name)t=[new Uo(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Yo(t)]}return t.map(t=>(t[Vo]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[zo]&&Jo(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.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 s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}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]}};Xo.registerParse=e=>{Bo=e},Xo.registerRule=e=>{Fo=e},Xo.registerAtRule=e=>{Uo=e},Xo.registerRoot=e=>{jo=e};var Ho=Xo;Xo.default=Xo,Xo.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Uo.prototype):"rule"===e.type?Object.setPrototypeOf(e,Fo.prototype):"decl"===e.type?Object.setPrototypeOf(e,Wo.prototype):"comment"===e.type?Object.setPrototypeOf(e,Yo.prototype):"root"===e.type&&Object.setPrototypeOf(e,jo.prototype),e[Vo]=!0,e.nodes&&e.nodes.forEach(e=>{Xo.rebuild(e)})};let Ko,$o,qo=Ho,Qo=class extends qo{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ko(new $o,this,e).stringify()}};Qo.registerLazyResult=e=>{Ko=e},Qo.registerProcessor=e=>{$o=e};var ea=Qo;Qo.default=Qo;let ta={};var sa=function(e){ta[e]||(ta[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let ra=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 s in t)this[s]=t[s]}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 na=ra;ra.default=ra;let ia=na,oa=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new ia(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var aa=oa;oa.default=oa;const la="'".charCodeAt(0),ca='"'.charCodeAt(0),ha="\\".charCodeAt(0),ua="/".charCodeAt(0),pa="\n".charCodeAt(0),da=" ".charCodeAt(0),fa="\f".charCodeAt(0),ma="\t".charCodeAt(0),ga="\r".charCodeAt(0),ya="[".charCodeAt(0),wa="]".charCodeAt(0),ba="(".charCodeAt(0),va=")".charCodeAt(0),Ca="{".charCodeAt(0),Sa="}".charCodeAt(0),ka=";".charCodeAt(0),Ia="*".charCodeAt(0),xa=":".charCodeAt(0),Oa="@".charCodeAt(0),Aa=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ea=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ra=/.[\r\n"'(/\\]/,Ma=/[\da-f]/i;let Na=Ho,Ta=class extends Na{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 _a=Ta;Ta.default=Ta,Na.registerAtRule(Ta);let Pa,La,Da=Ho,Ba=class extends Da{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new Pa(new La,this,e).stringify()}};Ba.registerLazyResult=e=>{Pa=e},Ba.registerProcessor=e=>{La=e};var Fa=Ba;Ba.default=Ba,Da.registerRoot(Ba);let Ua={comma:e=>Ua.split(e,[","],!0),space:e=>Ua.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var ja=Ua;Ua.default=Ua;let za=Ho,Va=ja,Wa=class extends za{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Va.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Ya=Wa;Wa.default=Wa,za.registerRule(Wa);let Ga=$i,Za=function(e,t={}){let s,r,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(s=p.charCodeAt(m),s){case pa:case da:case ma:case ga:case fa:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===da||s===pa||s===ma||s===ga||s===fa);u=["space",p.slice(m,r)],m=r-1;break;case ya:case wa:case Ca:case Sa:case xa:case ka:case va:{let e=String.fromCharCode(s);u=[e,e,m];break}case ba:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==la&&h!==ca&&h!==da&&h!==pa&&h!==ma&&h!==fa&&h!==ga){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===ha;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||Ra.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case la:case ca:n=s===la?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===ha;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case Oa:Aa.lastIndex=m+1,Aa.test(p),r=0===Aa.lastIndex?p.length-1:Aa.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case ha:for(r=m,o=!0;p.charCodeAt(r+1)===ha;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==ua&&s!==da&&s!==pa&&s!==ma&&s!==ga&&s!==fa&&(r+=1,Ma.test(p.charAt(r)))){for(;Ma.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===da&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===ua&&p.charCodeAt(m+1)===Ia?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(Ea.lastIndex=m+1,Ea.test(p),r=0===Ea.lastIndex?p.length-1:Ea.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Ja=Do,Xa=_a,Ha=Fa,Ka=Ya;const $a={empty:!0,space:!0};let qa=Ho,Qa=class{constructor(e){this.input=e,this.root=new Ha,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,s,r,n=new Xa;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(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[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&&(e=a[a.length-1],n.source.end=this.getPosition(e[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 s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Ja;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Za(this.input)}decl(e,t){let s=new Ga;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.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 a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.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 Ka;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,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===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&&r){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,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",$a[a]||$a[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Ka;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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})}},el=So;function tl(e,t){let s=new el(e,t),r=new Qa(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var sl=tl;tl.default=tl,qa.registerParse(tl);let{isClean:rl,my:nl}=Pi,il=_o,ol=ji,al=Ho,ll=ea,cl=sa,hl=aa,ul=sl,pl=Fa;const dl={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},fl={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},ml={Once:!0,postcssPlugin:!0,prepare:!0};function gl(e){return"object"==typeof e&&"function"==typeof e.then}function yl(e){let t=!1,s=dl[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function wl(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:yl(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function bl(e){return e[rl]=!1,e.nodes&&e.nodes.forEach(e=>bl(e)),e}let vl={},Cl=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof hl)n=bl(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=ul;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[nl]&&al.rebuild(n)}else n=bl(s);this.result=new hl(t,n,r),this.helpers={...vl,postcss:vl,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 new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(qb){console&&console.error&&console.error(qb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!fl[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ml[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(gl(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[rl];){e[rl]=!0;let s=[wl(e)];for(;s.length>0;){let e=this.visitTick(s);if(gl(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;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(t){throw this.handleError(t)}}}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 gl(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(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=ol;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new il(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(gl(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[rl];)e[rl]=!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"production"!==process.env.NODE_ENV&&("from"in this.opts||cl("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(gl(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[rl])return r[rl]=!0,void e.push(wl(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[rl]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[rl]=!0;let t=yl(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[rl]||this.walkSync(e)});else{let t=this.listeners[s];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"}};Cl.registerPostcss=e=>{vl=e};var Sl=Cl;Cl.default=Cl,pl.registerLazyResult(Cl),ll.registerLazyResult(Cl);let kl=_o,Il=ji,xl=sa,Ol=sl;const Al=aa;let El=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=Il;this.result=new Al(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new kl(n,r,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"production"!==process.env.NODE_ENV&&("from"in this._opts||xl("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Ol;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Rl=El;El.default=El;let Ml=Rl,Nl=Sl,Tl=ea,_l=Fa,Pl=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Nl(this,e,t):new Ml(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ll=Pl;Pl.default=Pl,_l.registerProcessor(Pl),Tl.registerProcessor(Pl);let Dl=$i,Bl=oo,Fl=Do,Ul=_a,jl=So,zl=Fa,Vl=Ya;function Wl(e,t){if(Array.isArray(e))return e.map(e=>Wl(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:jl.prototype};s.map&&(s.map={...s.map,__proto__:Bl.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>Wl(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new zl(r);if("decl"===r.type)return new Dl(r);if("rule"===r.type)return new Vl(r);if("comment"===r.type)return new Fl(r);if("atrule"===r.type)return new Ul(r);throw new Error("Unknown node type: "+e.type)}var Yl=Wl;Wl.default=Wl;let Gl=_i,Zl=$i,Jl=Sl,Xl=Ho,Hl=Ll,Kl=ji,$l=Yl,ql=ea,Ql=na,ec=Do,tc=_a,sc=aa,rc=So,nc=sl,ic=ja,oc=Ya,ac=Fa,lc=Xi;function cc(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Hl(e)}cc.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!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(...s);return n.postcssPlugin=e,n.postcssVersion=(new Hl).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return cc([n(s)]).process(e,t)},n},cc.stringify=Kl,cc.parse=nc,cc.fromJSON=$l,cc.list=ic,cc.comment=e=>new ec(e),cc.atRule=e=>new tc(e),cc.decl=e=>new Zl(e),cc.rule=e=>new oc(e),cc.root=e=>new ac(e),cc.document=e=>new ql(e),cc.CssSyntaxError=Gl,cc.Declaration=Zl,cc.Container=Xl,cc.Processor=Hl,cc.Document=ql,cc.Comment=ec,cc.Warning=Ql,cc.AtRule=tc,cc.Result=sc,cc.Input=rc,cc.Rule=oc,cc.Root=ac,cc.Node=lc,Jl.registerPostcss(cc);var hc=cc;cc.default=cc;const uc=ki(hc);uc.stringify,uc.fromJSON,uc.plugin,uc.parse,uc.list,uc.document,uc.comment,uc.atRule,uc.rule,uc.decl,uc.root,uc.CssSyntaxError,uc.Declaration,uc.Container,uc.Processor,uc.Document,uc.Comment,uc.Warning,uc.AtRule,uc.Result,uc.Input,uc.Rule,uc.Root,uc.Node;let pc=class e{constructor(...e){Si(this,"parentElement",null),Si(this,"parentNode",null),Si(this,"ownerDocument"),Si(this,"firstChild",null),Si(this,"lastChild",null),Si(this,"previousSibling",null),Si(this,"nextSibling",null),Si(this,"ELEMENT_NODE",1),Si(this,"TEXT_NODE",3),Si(this,"nodeType"),Si(this,"nodeName"),Si(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};const dc={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},fc={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},mc={};function gc(e){if(mc[e])return mc[e];const t=globalThis[e],s=t.prototype,r=e in dc?dc[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in fc?fc[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return mc[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?mc[e]=i:s}catch{return s}}const yc={};function wc(e,t,s){var r;const n=`${e}.${String(s)}`;if(yc[n])return yc[n].call(t);const i=gc(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(yc[n]=o,o.call(t)):t[s]}const bc={};function vc(e,t,s){const r=`${e}.${String(s)}`;if(bc[r])return bc[r].bind(t);const n=gc(e)[s];return"function"!=typeof n?t[s]:(bc[r]=n,n.bind(t))}function Cc(){return gc("MutationObserver").constructor}const Sc={childNodes:function(e){return wc("Node",e,"childNodes")},parentNode:function(e){return wc("Node",e,"parentNode")},parentElement:function(e){return wc("Node",e,"parentElement")},textContent:function(e){return wc("Node",e,"textContent")},contains:function(e,t){return vc("Node",e,"contains")(t)},getRootNode:function(e){return vc("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?wc("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?wc("Element",e,"shadowRoot"):null},querySelector:function(e,t){return wc("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return wc("Element",e,"querySelectorAll")(t)},mutationObserver:Cc};function kc(e,t,s=document){const r={capture:!0,passive:!0};return s.addEventListener(e,t,r),()=>s.removeEventListener(e,t,r)}const Ic="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 xc={map:{},getId:()=>(console.error(Ic),-1),getNode:()=>(console.error(Ic),null),removeNodeFromMap(){console.error(Ic)},has:()=>(console.error(Ic),!1),reset(){console.error(Ic)}};function Oc(e,t,s={}){let r=null,n=0;return function(...i){const o=Date.now();n||!1!==s.leading||(n=o);const a=t-(o-n),l=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),n=o,e.apply(l,i)):r||!1===s.trailing||(r=setTimeout(()=>{n=!1===s.leading?0:Date.now(),r=null,e.apply(l,i)},a))}}function Ac(e,t,s,r,n=window){const i=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,r?s:{set(e){setTimeout(()=>{s.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>Ac(e,t,i||{},!0)}function Ec(e,t,s){try{if(!(t in e))return()=>{};const r=e[t],n=s(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=n,()=>{e[t]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(xc=new Proxy(xc,{get:(e,t,s)=>("map"===t&&console.error(Ic),Reflect.get(e,t,s))}));let Rc=Date.now;function Mc(e){var t,s,r,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=Sc.parentElement(i.body))?void 0:t.scrollLeft)||(null==(s=null==i?void 0:i.body)?void 0:s.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==(r=Sc.parentElement(i.body))?void 0:r.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}}function Nc(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Tc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function _c(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:Sc.parentElement(e)}function Pc(e,t,s,r){if(!e)return!1;const n=_c(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(r&&null!==n.closest("."+t))return!0}else if(At(n,t,r))return!0}catch(i){}if(s){if(n.matches(s))return!0;if(r&&null!==n.closest(s))return!0}return!1}function Lc(e,t,s){return!("TITLE"!==e.tagName||!s.headTitleMutations)||-2===t.getId(e)}function Dc(e,t){if($e(e))return!1;const s=t.getId(e);if(!t.has(s))return!0;const r=Sc.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||Dc(r,t))}function Bc(e){return Boolean(e.changedTouches)}function Fc(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Uc(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function jc(e){return!!e&&(e instanceof pc&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Sc.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Rc=()=>(new Date).getTime());let zc=class{constructor(){Be(this,"id",1),Be(this,"styleIDMap",new WeakMap),Be(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 s;return s=void 0===t?this.id++:t,this.styleIDMap.set(e,s),this.idStyleMap.set(s,e),s}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 Vc(e){var t;let s=null;return"getRootNode"in e&&(null==(t=Sc.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Sc.host(Sc.getRootNode(e))&&(s=Sc.host(Sc.getRootNode(e))),s}function Wc(e){const t=e.ownerDocument;if(!t)return!1;const s=function(e){let t,s=e;for(;t=Vc(s);)s=t;return s}(e);return Sc.contains(t,s)}function Yc(e){const t=e.ownerDocument;return!!t&&(Sc.contains(t,e)||Wc(e))}var Gc=(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))(Gc||{}),Zc=(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))(Zc||{}),Jc=(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))(Jc||{}),Xc=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Xc||{}),Hc=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Hc||{}),Kc=(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))(Kc||{}),$c=(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))($c||{});function qc(e){return"__ln"in e}class Qc{constructor(){Be(this,"length",0),Be(this,"head",null),Be(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let s=0;s<e;s++)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&&qc(e.previousSibling)){const s=e.previousSibling.__ln.next;t.next=s,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,s&&(s.previous=t)}else if(e.nextSibling&&qc(e.nextSibling)&&e.nextSibling.__ln.previous){const s=e.nextSibling.__ln.previous;t.previous=s,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,s&&(s.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 eh=(e,t)=>`${e}@${t}`;class th{constructor(){Be(this,"frozen",!1),Be(this,"locked",!1),Be(this,"texts",[]),Be(this,"attributes",[]),Be(this,"attributeMap",new WeakMap),Be(this,"removes",[]),Be(this,"mapRemoves",[]),Be(this,"movedMap",{}),Be(this,"addedSet",new Set),Be(this,"movedSet",new Set),Be(this,"droppedSet",new Set),Be(this,"removesSubTreeCache",new Set),Be(this,"mutationCb"),Be(this,"blockClass"),Be(this,"blockSelector"),Be(this,"maskTextClass"),Be(this,"maskTextSelector"),Be(this,"inlineStylesheet"),Be(this,"maskInputOptions"),Be(this,"maskTextFn"),Be(this,"maskInputFn"),Be(this,"keepIframeSrcFn"),Be(this,"recordCanvas"),Be(this,"inlineImages"),Be(this,"slimDOMOptions"),Be(this,"dataURLOptions"),Be(this,"doc"),Be(this,"mirror"),Be(this,"iframeManager"),Be(this,"stylesheetManager"),Be(this,"shadowDomManager"),Be(this,"canvasManager"),Be(this,"processedNodeManager"),Be(this,"unattachedDoc"),Be(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),Be(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,s=new Qc,r=e=>{let t=e,s=-2;for(;-2===s;)t=t&&t.nextSibling,s=t&&this.mirror.getId(t);return s},n=n=>{const i=Sc.parentNode(n);if(!i||!Yc(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=$e(i)?this.mirror.getId(Vc(n)):this.mirror.getId(i),l=r(n);if(-1===a||-1===l)return s.addNode(n);const c=Nt(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=>{Fc(e,this.mirror)&&this.iframeManager.addIframe(e),Uc(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),jc(n)&&this.shadowDomManager.addShadowRoot(Sc.shadowRoot(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 a of this.movedSet)rh(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(Sc.parentNode(a))||n(a);for(const a of this.addedSet)nh(this.droppedSet,a)||rh(this.removesSubTreeCache,a,this.mirror)?nh(this.movedSet,a)?n(a):this.droppedSet.add(a):n(a);let i=null;for(;s.length;){let e=null;if(i){const t=this.mirror.getId(Sc.parentNode(i.value)),s=r(i.value);-1!==t&&-1!==s&&(e=i)}if(!e){let t=s.tail;for(;t;){const s=t;if(t=t.previous,s){const t=this.mirror.getId(Sc.parentNode(s.value));if(-1===r(s.value))continue;if(-1!==t){e=s;break}{const t=s.value,r=Sc.parentNode(t);if(r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=Sc.host(r);if(-1!==this.mirror.getId(t)){e=s;break}}}}}}if(!e){for(;s.head;)s.removeNode(s.head.value);break}i=e.previous,s.removeNode(e.value),n(e.value)}const o={texts:this.texts.map(e=>{const t=e.node,s=Sc.parentNode(t);return s&&"TEXTAREA"===s.tagName&&this.genTextAreaValueMutation(s),{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 s=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);s.length<t.style.length&&(s+r).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))}),Be(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(Sc.childNodes(e),e=>Sc.textContent(e)||"").join("")}),Be(this,"processMutation",e=>{if(!Lc(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=Sc.textContent(e.target);Pc(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:Et(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,_c(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const s=e.target;let r=e.attributeName,n=e.target.getAttribute(r);if("value"===r){const e=it(s);n=st({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:e,value:n,maskInputFn:this.maskInputFn})}if(Pc(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let i=this.attributeMap.get(e.target);if("IFRAME"===s.tagName&&"src"===r&&!this.keepIframeSrcFn(n)){if(s.contentDocument)return;r="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===r&&"INPUT"===s.tagName&&"password"===(e.oldValue||"").toLowerCase()&&s.setAttribute("data-rr-is-password","true"),!Ot(s.tagName,r))if(i.attributes[r]=xt(this.doc,rt(s.tagName),rt(r),n),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(s.style)){const t=s.style.getPropertyValue(e),n=s.style.getPropertyPriority(e);t!==r.style.getPropertyValue(e)||n!==r.style.getPropertyPriority(e)?i.styleDiff[e]=""===n?t:[t,n]:i._unchangedStyles[e]=[t,n]}for(const e of Array.from(r.style))""===s.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===s.tagName&&(s.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case"childList":if(Pc(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 s=this.mirror.getId(t),r=$e(e.target)?this.mirror.getId(Sc.host(e.target)):this.mirror.getId(e.target);Pc(e.target,this.blockClass,this.blockSelector,!1)||Lc(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(sh(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===s||Dc(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[eh(s,r)]?sh(this.movedSet,t):(this.removes.push({parentId:r,id:s,isShadow:!(!$e(e.target)||!qe(e.target))||void 0}),function(e,t){const s=[e];for(;s.length;){const e=s.pop();t.has(e)||(t.add(e),Sc.childNodes(e).forEach(e=>s.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),Be(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Lc(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let s=null;t&&this.mirror.hasNode(t)&&(s=this.mirror.getId(t)),s&&-1!==s&&(this.movedMap[eh(this.mirror.getId(e),s)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Pc(e,this.blockClass,this.blockSelector,!1)||(Sc.childNodes(e).forEach(e=>this.genAdds(e)),jc(e)&&Sc.childNodes(Sc.shadowRoot(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 sh(e,t){e.delete(t),Sc.childNodes(t).forEach(t=>sh(e,t))}function rh(e,t,s){return 0!==e.size&&function(e,t){const s=Sc.parentNode(t);return!!s&&e.has(s)}(e,t)}function nh(e,t){return 0!==e.size&&ih(e,t)}function ih(e,t){const s=Sc.parentNode(t);return!!s&&(!!e.has(s)||ih(e,s))}let oh;const ah=e=>{if(!oh)return e;return(...t)=>{try{return e(...t)}catch(s){if(oh&&!0===oh(s))return;throw s}}},lh=[];function ch(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 hh(e,t){const s=new th;lh.push(s),s.init(e);const r=new(Cc())(ah(s.processMutations.bind(s)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function uh({mouseInteractionCb:e,doc:t,mirror:s,blockClass:r,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(Jc).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]).forEach(i=>{let o=rt(i);const c=(t=>i=>{const o=ch(i);if(Pc(o,r,n,!0))return;let a=null,c=t;if("pointerType"in i){switch(i.pointerType){case"mouse":a=Xc.Mouse;break;case"touch":a=Xc.Touch;break;case"pen":a=Xc.Pen}a===Xc.Touch?Jc[t]===Jc.MouseDown?c="TouchStart":Jc[t]===Jc.MouseUp&&(c="TouchEnd"):Xc.Pen}else Bc(i)&&(a=Xc.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===Xc.Touch||c.startsWith("Mouse")&&a===Xc.Mouse)&&(a=null)):Jc[t]===Jc.Click&&(a=l,l=null);const h=Bc(i)?i.changedTouches[0]:i;if(!h)return;const u=s.getId(o),{clientX:p,clientY:d}=h;ah(e)({type:Jc[c],id:u,x:p,y:d,...null!==a&&{pointerType:a}})})(i);if(window.PointerEvent)switch(Jc[i]){case Jc.MouseDown:case Jc.MouseUp:o=o.replace("mouse","pointer");break;case Jc.TouchStart:case Jc.TouchEnd:return}a.push(kc(o,c,t))}),ah(()=>{a.forEach(e=>e())})}function ph({scrollCb:e,doc:t,mirror:s,blockClass:r,blockSelector:n,sampling:i}){return kc("scroll",ah(Oc(ah(i=>{const o=ch(i);if(!o||Pc(o,r,n,!0))return;const a=s.getId(o);if(o===t&&t.defaultView){const s=Mc(t.defaultView);e({id:a,x:s.left,y:s.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}),i.scroll||100)),t)}const dh=["INPUT","TEXTAREA","SELECT"],fh=new WeakMap;function mh(e){return function(e,t){if(bh("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||bh("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||bh("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||bh("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const s=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(s)}else if(e.parentStyleSheet){const s=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(s)}return t}(e,[])}function gh(e,t,s){let r,n;return e?(e.ownerNode?r=t.getId(e.ownerNode):n=s.getId(e),{styleId:n,id:r}):{}}function yh({mirror:e,stylesheetManager:t},s){var r,n,i;let o=null;o="#document"===s.nodeName?e.getId(s):e.getId(Sc.host(s));const a="#document"===s.nodeName?null==(r=s.defaultView)?void 0:r.Document:null==(i=null==(n=s.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(s,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var s;const r=null==(s=l.set)?void 0:s.call(this,e);if(null!==o&&-1!==o)try{t.adoptStyleSheets(e,o)}catch(n){}return r}}),ah(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function wh(e,t={}){const s=e.doc.defaultView;if(!s)return()=>{};let r;!function(e,t){const{mutationCb:s,mousemoveCb:r,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),s(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),r(...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&&(r=hh(e,e.doc));const n=function({mousemoveCb:e,sampling:t,doc:s,mirror:r}){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=Oc(ah(t=>{const s=Date.now()-o;e(a.map(e=>(e.timeOffset-=s,e)),t),a=[],o=null}),i),c=ah(Oc(ah(e=>{const t=ch(e),{clientX:s,clientY:n}=Bc(e)?e.changedTouches[0]:e;o||(o=Rc()),a.push({x:s,y:n,id:r.getId(t),timeOffset:Rc()-o}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?Zc.Drag:e instanceof MouseEvent?Zc.MouseMove:Zc.TouchMove)}),n,{trailing:!1})),h=[kc("mousemove",c,s),kc("touchmove",c,s),kc("drag",c,s)];return ah(()=>{h.forEach(e=>e())})}(e),i=uh(e),o=ph(e),a=function({viewportResizeCb:e},{win:t}){let s=-1,r=-1;return kc("resize",ah(Oc(ah(()=>{const t=Nc(),n=Tc();s===t&&r===n||(e({width:Number(n),height:Number(t)}),s=t,r=n)}),200)),t)}(e,{win:s}),l=function({inputCb:e,doc:t,mirror:s,blockClass:r,blockSelector:n,ignoreClass:i,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:h}){function u(e){let s=ch(e);const c=e.isTrusted,u=s&&s.tagName;if(s&&"OPTION"===u&&(s=Sc.parentElement(s)),!s||!u||dh.indexOf(u)<0||Pc(s,r,n,!0))return;if(s.classList.contains(i)||o&&s.matches(o))return;let d=s.value,f=!1;const m=it(s)||"";"radio"===m||"checkbox"===m?f=s.checked:(a[u.toLowerCase()]||a[m])&&(d=st({element:s,maskInputOptions:a,tagName:u,type:m,value:d,maskInputFn:l})),p(s,h?{text:d,isChecked:f,userTriggered:c}:{text:d,isChecked:f});const g=s.name;"radio"===m&&g&&f&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==s){const t=e.value;p(e,h?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}})}function p(t,r){const n=fh.get(t);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){fh.set(t,r);const n=s.getId(t);ah(e)({...r,id:n})}}const d=("last"===c.input?["change"]:["input","change"]).map(e=>kc(e,ah(u),t)),f=t.defaultView;if(!f)return()=>{d.forEach(e=>e())};const m=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),g=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&d.push(...g.map(e=>Ac(e[0],e[1],{set(){ah(u)({target:this,isTrusted:!1})}},!1,f))),ah(()=>{d.forEach(e=>e())})}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:r,sampling:n,doc:i}){const o=ah(i=>Oc(ah(n=>{const o=ch(n);if(!o||Pc(o,t,s,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:h,loop:u}=o;e({type:i,id:r.getId(o),currentTime:a,volume:l,muted:c,playbackRate:h,loop:u})}),n.media||500)),a=[kc("play",o(Kc.Play),i),kc("pause",o(Kc.Pause),i),kc("seeked",o(Kc.Seeked),i),kc("volumechange",o(Kc.VolumeChange),i),kc("ratechange",o(Kc.RateChange),i)];return ah(()=>{a.forEach(e=>e())})}(e);let h=()=>{},u=()=>{},p=()=>{},d=()=>{};e.recordDOM&&(h=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:s},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const n=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:ah((r,n,i)=>{const[o,a]=i,{id:l,styleId:c}=gh(n,t,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:a}]}),r.apply(n,i)})}),r.CSSStyleSheet.prototype.addRule=function(e,t,s=this.cssRules.length){const n=`${e} { ${t} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[n,s])};const i=r.CSSStyleSheet.prototype.deleteRule;let o,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ah((r,n,i)=>{const[o]=i,{id:a,styleId:l}=gh(n,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),r.apply(n,i)})}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:ah((r,n,i)=>{const[o]=i,{id:a,styleId:l}=gh(n,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),r.apply(n,i)})})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ah((r,n,i)=>{const[o]=i,{id:a,styleId:l}=gh(n,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),r.apply(n,i)})}));const l={};vh("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(vh("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),vh("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),vh("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(l).forEach(([r,n])=>{c[r]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(c[r].insertRule,{apply:ah((r,n,i)=>{const[o,a]=i,{id:l,styleId:c}=gh(n.parentStyleSheet,t,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:[...mh(n),a||0]}]}),r.apply(n,i)})}),n.prototype.deleteRule=new Proxy(c[r].deleteRule,{apply:ah((r,n,i)=>{const[o]=i,{id:a,styleId:l}=gh(n.parentStyleSheet,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...mh(n),o]}]}),r.apply(n,i)})})}),ah(()=>{r.CSSStyleSheet.prototype.insertRule=n,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}(e,{win:s}),u=yh(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:r},{win:n}){const i=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:ah((n,o,a)=>{var l;const[c,h,u]=a;if(s.has(c))return i.apply(o,[c,h,u]);const{id:p,styleId:d}=gh(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(p&&-1!==p||d&&-1!==d)&&e({id:p,styleId:d,set:{property:c,value:h,priority:u},index:mh(o.parentRule)}),n.apply(o,a)})});const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:ah((n,i,a)=>{var l;const[c]=a;if(s.has(c))return o.apply(i,[c]);const{id:h,styleId:u}=gh(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(h&&-1!==h||u&&-1!==u)&&e({id:h,styleId:u,remove:{property:c},index:mh(i.parentRule)}),n.apply(i,a)})}),ah(()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:s}),e.collectFonts&&(d=function({fontCb:e,doc:t}){const s=t.defaultView;if(!s)return()=>{};const r=[],n=new WeakMap,i=s.FontFace;s.FontFace=function(e,t,s){const r=new i(e,t,s);return n.set(r,{family:e,buffer:"string"!=typeof t,descriptors:s,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const o=Ec(t.fonts,"add",function(t){return function(s){return setTimeout(ah(()=>{const t=n.get(s);t&&(e(t),n.delete(s))}),0),t.apply(this,[s])}});return r.push(()=>{s.FontFace=i}),r.push(o),ah(()=>{r.forEach(e=>e())})}(e)));const f=function(e){const{doc:t,mirror:s,blockClass:r,blockSelector:n,selectionCb:i}=e;let o=!0;const a=ah(()=>{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;t<l;t++){const i=e.getRangeAt(t),{startContainer:o,startOffset:l,endContainer:c,endOffset:h}=i;Pc(o,r,n,!0)||Pc(c,r,n,!0)||a.push({start:s.getId(o),startOffset:l,end:s.getId(c),endOffset:h})}i({ranges:a})});return a(),kc("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const s=e.defaultView;return s&&s.customElements?Ec(s.customElements,"define",function(e){return function(s,r,n){try{t({define:{name:s}})}catch(i){console.warn(`Custom element callback failed for ${s}`)}return e.apply(this,[s,r,n])}}):()=>{}}(e),g=[];for(const y of e.plugins)g.push(y.observer(y.callback,s,y.options));return ah(()=>{lh.forEach(e=>e.reset()),null==r||r.disconnect(),n(),i(),o(),a(),l(),c(),h(),u(),p(),d(),f(),m(),g.forEach(e=>e())})}function bh(e){return void 0!==window[e]}function vh(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ch{constructor(e){Be(this,"iframeIdToRemoteIdMap",new WeakMap),Be(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,s,r){const n=s||this.getIdToRemoteIdMap(e),i=r||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 s=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,s,r))}getRemoteId(e,t,s){const r=s||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const n=r.get(t);return n||-1}getRemoteIds(e,t){const s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,s))}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 Sh{constructor(e){Be(this,"iframes",new WeakMap),Be(this,"crossOriginIframeMap",new WeakMap),Be(this,"crossOriginIframeMirror",new Ch(gt)),Be(this,"crossOriginIframeStyleMirror"),Be(this,"crossOriginIframeRootIdMap",new WeakMap),Be(this,"mirror"),Be(this,"mutationCb"),Be(this,"wrappedEmit"),Be(this,"loadListener"),Be(this,"stylesheetManager"),Be(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ch(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 s,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(s=e.contentWindow)||s.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.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 s=this.crossOriginIframeMap.get(e.source);if(!s)return;const r=this.transformCrossOriginEvent(s,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){var s;switch(t.type){case Gc.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(t.data.node,s),{timestamp:t.timestamp,type:Gc.IncrementalSnapshot,data:{source:Zc.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Gc.Meta:case Gc.Load:case Gc.DomContentLoaded:return!1;case Gc.Plugin:return t;case Gc.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Gc.IncrementalSnapshot:switch(t.data.source){case Zc.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const s=this.crossOriginIframeRootIdMap.get(e);s&&this.patchRootIdOnNode(t.node,s)}),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 Zc.Drag:case Zc.TouchMove:case Zc.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Zc.ViewportResize:return!1;case Zc.MediaInteraction:case Zc.MouseInteraction:case Zc.Scroll:case Zc.CanvasMutation:case Zc.Input:return this.replaceIds(t.data,e,["id"]),t;case Zc.StyleSheetRule:case Zc.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Zc.Font:return t;case Zc.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case Zc.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(s=t.data.styles)||s.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,s,r){for(const n of r)(Array.isArray(t[n])||"number"==typeof t[n])&&(Array.isArray(t[n])?t[n]=e.getIds(s,t[n]):t[n]=e.getId(s,t[n]));return t}replaceIds(e,t,s){return this.replace(this.crossOriginIframeMirror,e,t,s)}replaceStyleIds(e,t,s){return this.replace(this.crossOriginIframeStyleMirror,e,t,s)}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===$c.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class kh{constructor(e){Be(this,"shadowDoms",new WeakSet),Be(this,"mutationCb"),Be(this,"scrollCb"),Be(this,"bypassOptions"),Be(this,"mirror"),Be(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(!qe(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const s=hh({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(ph({...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(Sc.host(e))),this.restoreHandlers.push(yh({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 s=this;this.restoreHandlers.push(Ec(e.prototype,"attachShadow",function(e){return function(r){const n=e.call(this,r),i=Sc.shadowRoot(this);return i&&Yc(this)&&s.addShadowRoot(i,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Ih="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xh="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Oh=0;Oh<64;Oh++)xh[Ih.charCodeAt(Oh)]=Oh;const Ah=new Map;const Eh=(e,t,s)=>{if(!e||!Nh(e,t)&&"object"!=typeof e)return;const r=function(e,t){let s=Ah.get(e);return s||(s=new Map,Ah.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}(s,e.constructor.name);let n=r.indexOf(e);return-1===n&&(n=r.length,r.push(e)),n};function Rh(e,t,s){if(e instanceof Array)return e.map(e=>Rh(e,t,s));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,s=new Uint8Array(e),r=s.length,n="";for(t=0;t<r;t+=3)n+=Ih[s[t]>>2],n+=Ih[(3&s[t])<<4|s[t+1]>>4],n+=Ih[(15&s[t+1])<<2|s[t+2]>>6],n+=Ih[63&s[t+2]];return r%3==2?n=n.substring(0,n.length-1)+"=":r%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Rh(e.buffer,t,s),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:s}=e;return{rr_type:t,src:s}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Rh(e.data,t,s),e.width,e.height]}}if(Nh(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Eh(e,t,s)}}return e}const Mh=(e,t,s)=>e.map(e=>Rh(e,t,s)),Nh=(e,t)=>{const s=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(s.find(s=>e instanceof t[s]))};function Th(e,t,s,r){const n=[];try{const i=Ec(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(n,...i){if(!Pc(this,t,s,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(n);if("__context"in this||(this.__context=e),r&&["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.apply(this,[n,...i])}});n.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(e=>e())}}function _h(e,t,s,r,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=Ec(e,l,function(e){return function(...o){const a=e.apply(this,o);if(Eh(a,i,this),"tagName"in this.canvas&&!Pc(this.canvas,r,n,!0)){const e=Mh(o,i,this),r={type:t,property:l,args:e};s(this.canvas,r)}return a}});o.push(a)}catch{const r=Ac(e,l,{set(e){s(this.canvas,{type:t,property:l,args:[e],setter:!0})}});o.push(r)}return o}const Ph="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Lh="undefined"!=typeof window&&window.Blob&&new Blob([(Dh=Ph,Uint8Array.from(atob(Dh),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var Dh;function Bh(e){let t;try{if(t=Lh&&(window.URL||window.webkitURL).createObjectURL(Lh),!t)throw"";const s=new Worker(t,{name:null==e?void 0:e.name});return s.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),s}catch(s){return new Worker("data:text/javascript;base64,"+Ph,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Fh{constructor(e){Be(this,"pendingCanvasMutations",new Map),Be(this,"rafStamps",{latestId:0,invokeId:null}),Be(this,"mirror"),Be(this,"mutationCb"),Be(this,"resetObservers"),Be(this,"frozen",!1),Be(this,"locked",!1),Be(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:s,blockClass:r,blockSelector:n,recordCanvas:i,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(s,r,n),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,s,r,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,s,r,n){const i=Th(t,s,r,!0),o=new Map,a=new Bh;a.onmessage=e=>{const{id:t}=e.data;if(o.set(t,!1),!("base64"in e.data))return;const{base64:s,type:r,width:n,height:i}=e.data;this.mutationCb({id:t,type:Hc["2D"],commands:[{property:"clearRect",args:[0,0,n,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:r}]},0,0]}]})};const l=1e3/e;let c,h=0;const u=e=>{h&&e-h<l||(h=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{Pc(t,s,r,!0)||e.push(t)}),e})().forEach(async e=>{var t;const s=this.mirror.getId(e);if(o.get(s))return;if(0===e.width||0===e.height)return;if(o.set(s,!0),["webgl","webgl2"].includes(e.__context)){const s=e.getContext(e.__context);!1===(null==(t=null==s?void 0:s.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&s.clear(s.COLOR_BUFFER_BIT)}const r=await createImageBitmap(e);a.postMessage({id:s,bitmap:r,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[r])})),c=requestAnimationFrame(u)};c=requestAnimationFrame(u),this.resetObservers=()=>{i(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=Th(e,t,s,!1),n=function(e,t,s,r){const n=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])continue;const i=Ec(t.CanvasRenderingContext2D.prototype,o,function(n){return function(...i){return Pc(this.canvas,s,r,!0)||setTimeout(()=>{const s=Mh(i,t,this);e(this.canvas,{type:Hc["2D"],property:o,args:s})},0),n.apply(this,i)}});n.push(i)}catch{const s=Ac(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:Hc["2D"],property:o,args:[t],setter:!0})}});n.push(s)}return()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,s),i=function(e,t,s,r){const n=[];return n.push(..._h(t.WebGLRenderingContext.prototype,Hc.WebGL,e,s,r,t)),void 0!==t.WebGL2RenderingContext&&n.push(..._h(t.WebGL2RenderingContext.prototype,Hc.WebGL2,e,s,r,t)),()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,s);this.resetObservers=()=>{r(),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 s=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,s)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(e);if(!s||-1===t)return;const r=s.map(e=>{const{type:t,...s}=e;return s}),{type:n}=s[0];this.mutationCb({id:t,type:n,commands:r}),this.pendingCanvasMutations.delete(e)}}class Uh{constructor(e){Be(this,"trackedLinkElements",new WeakSet),Be(this,"mutationCb"),Be(this,"adoptedStyleSheetCb"),Be(this,"styleMirror",new zc),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 s={id:t,styleIds:[]},r=[];for(const n of e){let e;this.styleMirror.has(n)?e=this.styleMirror.getId(n):(e=this.styleMirror.add(n),r.push({styleId:e,rules:Array.from(n.rules||CSSRule,(e,t)=>({rule:et(e,n.href),index:t}))})),s.styleIds.push(e)}r.length>0&&(s.styles=r),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class jh{constructor(){Be(this,"nodeMap",new WeakMap),Be(this,"active",!1)}inOtherBuffer(e,t){const s=this.nodeMap.get(e);return s&&Array.from(s).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 zh,Vh,Wh,Yh=!1;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(Le=e.contentWindow)?void 0:Le.Array.from)||Array.from,document.body.removeChild(e)}}catch(qb){console.debug("Unable to override Array.from",qb)}const Gh=new tt;function Zh(e={}){const{emit:t,checkoutEveryNms:s,checkoutEveryNth:r,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:C=!0,recordCanvas:S=!1,recordCrossOriginIframes:k=!1,recordAfter:I=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:O=!1,inlineImages:A=!1,plugins:E,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:M=new Set([]),errorHandler:N}=e;oh=N;const T=!k||window.parent===window;let _=!1;if(!T)try{window.parent.document&&(_=!1)}catch(Z){_=!0}if(T&&!t)throw new Error("emit function is required");if(!T&&!_)return()=>{};void 0!==v&&void 0===w.mousemove&&(w.mousemove=v),Gh.reset();const P=!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},L=!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===d,headMetaDescKeywords:"all"===d,headTitleMutations:"all"===d}:d||{};let D;!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 B=0;const F=e=>{for(const t of E||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!_&&(e=y(e)),e};zh=(e,n)=>{var i;const o=e;if(o.timestamp=Rc(),!(null==(i=lh[0])?void 0:i.isFrozen())||o.type===Gc.FullSnapshot||o.type===Gc.IncrementalSnapshot&&o.data.source===Zc.Mutation||lh.forEach(e=>e.unfreeze()),T)null==t||t(F(o),n);else if(_){const e={type:"rrweb",event:F(o),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(o.type===Gc.FullSnapshot)D=o,B=0;else if(o.type===Gc.IncrementalSnapshot){if(o.data.source===Zc.Mutation&&o.data.isAttachIframe)return;B++;const e=r&&B>=r,t=s&&o.timestamp-D.timestamp>s;(e||t)&&Vh(!0)}};const U=e=>{zh({type:Gc.IncrementalSnapshot,data:{source:Zc.Mutation,...e}})},j=e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.Scroll,...e}}),z=e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.CanvasMutation,...e}}),V=new Uh({mutationCb:U,adoptedStyleSheetCb:e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.AdoptedStyleSheet,...e}})}),W=new Sh({mirror:Gh,mutationCb:U,stylesheetManager:V,recordCrossOriginIframes:k,wrappedEmit:zh});for(const X of E||[])X.getMirror&&X.getMirror({nodeMirror:Gh,crossOriginIframeMirror:W.crossOriginIframeMirror,crossOriginIframeStyleMirror:W.crossOriginIframeStyleMirror});const Y=new jh;Wh=new Fh({recordCanvas:S,mutationCb:z,win:window,blockClass:n,blockSelector:i,mirror:Gh,sampling:w.canvas,dataURLOptions:b});const G=new kh({mutationCb:U,scrollCb:j,bypassOptions:{blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskInputOptions:P,dataURLOptions:b,maskTextFn:m,maskInputFn:f,recordCanvas:S,inlineImages:A,sampling:w,slimDOMOptions:L,iframeManager:W,stylesheetManager:V,canvasManager:Wh,keepIframeSrcFn:R,processedNodeManager:Y},mirror:Gh});Vh=(e=!1)=>{if(!C)return;zh({type:Gc.Meta,data:{href:window.location.href,width:Tc(),height:Nc()}},e),V.reset(),G.init(),lh.forEach(e=>e.lock());const t=function(e,t){const{mirror:s=new tt,blockClass:r="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:C=()=>!1}=t||{};return Nt(e,{doc:e,mirror:s,blockClass:r,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:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:Gh,blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskAllInputs:P,maskTextFn:m,maskInputFn:f,slimDOM:L,dataURLOptions:b,recordCanvas:S,inlineImages:A,onSerialize:e=>{Fc(e,Gh)&&W.addIframe(e),Uc(e,Gh)&&V.trackLinkElement(e),jc(e)&&G.addShadowRoot(Sc.shadowRoot(e),document)},onIframeLoad:(e,t)=>{W.attachIframe(e,t),G.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:R});if(!t)return console.warn("Failed to snapshot the document");zh({type:Gc.FullSnapshot,data:{node:t,initialOffset:Mc(window)}},e),lh.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,Gh.getId(document))};try{const e=[],t=e=>{var t;return ah(wh)({mutationCb:U,mousemoveCb:(e,t)=>zh({type:Gc.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.MouseInteraction,...e}}),scrollCb:j,viewportResizeCb:e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.ViewportResize,...e}}),inputCb:e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.Input,...e}}),mediaInteractionCb:e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.MediaInteraction,...e}}),styleSheetRuleCb:e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.StyleSheetRule,...e}}),styleDeclarationCb:e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.StyleDeclaration,...e}}),canvasMutationCb:z,fontCb:e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.Font,...e}}),selectionCb:e=>{zh({type:Gc.IncrementalSnapshot,data:{source:Zc.Selection,...e}})},customElementCb:e=>{zh({type:Gc.IncrementalSnapshot,data:{source:Zc.CustomElement,...e}})},blockClass:n,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:P,inlineStylesheet:h,sampling:w,recordDOM:C,recordCanvas:S,inlineImages:A,userTriggeredOnInput:x,collectFonts:O,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:R,blockSelector:i,slimDOMOptions:L,dataURLOptions:b,mirror:Gh,iframeManager:W,stylesheetManager:V,shadowDomManager:G,processedNodeManager:Y,canvasManager:Wh,ignoreCSSAttributes:M,plugins:(null==(t=null==E?void 0:E.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>zh({type:Gc.Plugin,data:{plugin:e.name,payload:t}})})))||[]},g)};W.addLoadListener(s=>{try{e.push(t(s.contentDocument))}catch(r){console.warn(r)}});const s=()=>{Vh(),e.push(t(document)),Yh=!0};return"interactive"===document.readyState||"complete"===document.readyState?s():(e.push(kc("DOMContentLoaded",()=>{zh({type:Gc.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&s()})),e.push(kc("load",()=>{zh({type:Gc.Load,data:{}}),"load"===I&&s()},window))),()=>{e.forEach(e=>e()),Y.destroy(),Yh=!1,oh=void 0}}catch(J){console.warn(J)}}var Jh,Xh;Zh.addCustomEvent=(e,t)=>{if(!Yh)throw new Error("please add custom event after start recording");zh({type:Gc.Custom,data:{tag:e,payload:t}})},Zh.freezePage=()=>{lh.forEach(e=>e.freeze())},Zh.takeFullSnapshot=e=>{if(!Yh)throw new Error("please take full snapshot after start recording");Vh(e)},Zh.mirror=Gh,(Xh=Jh||(Jh={}))[Xh.NotStarted=0]="NotStarted",Xh[Xh.Running=1]="Running",Xh[Xh.Stopped=2]="Stopped";const{addCustomEvent:Hh}=Zh,{freezePage:Kh}=Zh,{takeFullSnapshot:$h}=Zh;class qh extends Array{constructor(){super()}isEmpty(){return 0===this.length}isFull(){return 10===this.length}flush(){return this.splice(0,this.length)}}class Qh{constructor(e){t(this,"agent"),t(this,"eventBuffer"),this.agent=e,this.eventBuffer=new qh}start(){document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&this.send()})}handle(e){e.type===Gc.FullSnapshot&&this.eventBuffer.find(e=>e.type===Gc.FullSnapshot)||(this.eventBuffer.push(e),this.eventBuffer.isFull()&&this.send())}async send(){if(!this.eventBuffer.isEmpty()&&this.agent.sendEvents){const e=this.eventBuffer.flush();await this.agent.sendEvents(e)}}}var eu,tu=(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))(tu||{}),su=(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))(su||{}),ru=(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))(ru||{}),nu=Object.defineProperty,iu=(e,t,s)=>((e,t,s)=>t in e?nu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),ou=Object.defineProperty,au=(e,t,s)=>((e,t,s)=>t in e?ou(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),lu=Object.defineProperty,cu=(e,t,s)=>((e,t,s)=>t in e?lu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);const hu={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},uu={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},pu={};function du(e){if(pu[e])return pu[e];const t=globalThis[e],s=t.prototype,r=e in hu?hu[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in uu?uu[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return pu[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?pu[e]=i:s}catch{return s}}const fu={};function mu(e,t,s){var r;const n=`${e}.${String(s)}`;if(fu[n])return fu[n].call(t);const i=du(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(fu[n]=o,o.call(t)):t[s]}const gu={};function yu(e,t,s){const r=`${e}.${String(s)}`;if(gu[r])return gu[r].bind(t);const n=du(e)[s];return"function"!=typeof n?t[s]:(gu[r]=n,n.bind(t))}const wu={childNodes:function(e){return mu("Node",e,"childNodes")},parentNode:function(e){return mu("Node",e,"parentNode")},parentElement:function(e){return mu("Node",e,"parentElement")},textContent:function(e){return mu("Node",e,"textContent")},contains:function(e,t){return yu("Node",e,"contains")(t)},getRootNode:function(e){return yu("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?mu("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?mu("Element",e,"shadowRoot"):null},querySelector:function(e,t){return mu("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return mu("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return du("MutationObserver").constructor}};class bu{constructor(){cu(this,"idNodeMap",new Map),cu(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-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){const s=t.id;this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t)}replace(e,t){const s=this.getNode(e);if(s){const e=this.nodeMetaMap.get(s);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function vu(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!s&&vu(wu.parentNode(e),t,s);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!s&&vu(wu.parentNode(e),t,s)}function Cu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Su(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var ku={exports:{}},Iu=String,xu=function(){return{isColorSupported:!1,reset:Iu,bold:Iu,dim:Iu,italic:Iu,underline:Iu,inverse:Iu,hidden:Iu,strikethrough:Iu,black:Iu,red:Iu,green:Iu,yellow:Iu,blue:Iu,magenta:Iu,cyan:Iu,white:Iu,gray:Iu,bgBlack:Iu,bgRed:Iu,bgGreen:Iu,bgYellow:Iu,bgBlue:Iu,bgMagenta:Iu,bgCyan:Iu,bgWhite:Iu}};ku.exports=xu(),ku.exports.createColors=xu;var Ou=ku.exports;const Au=Su(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Eu=Ou,Ru=Au,Mu=class e extends Error{constructor(t,s,r,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!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.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=Eu.isColorSupported),Ru&&e&&(t=Ru(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=Eu.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=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=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Nu=Mu;Mu.default=Mu;var Tu={};Tu.isClean=Symbol("isClean"),Tu.my=Symbol("my");const _u={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Pu=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return _u[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=_u[s]),i.rawCache[s]=r,r}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 s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}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(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.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(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.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 s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Lu=Pu;Pu.default=Pu;let Du=Lu;function Bu(e,t){new Du(t).stringify(e)}var Fu=Bu;Bu.default=Bu;let{isClean:Uu,my:ju}=Tu,zu=Nu,Vu=Lu,Wu=Fu;function Yu(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Yu(e,s)):("object"===i&&null!==n&&(n=Yu(n)),s[r]=n)}return s}let Gu=class{constructor(e={}){this.raws={},this[Uu]=!1,this[ju]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}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=Yu(this);for(let s in e)t[s]=e[s];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:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new zu(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Uu]){this[Uu]=!1;let e=this;for(;e=e.parent;)e[Uu]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,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},s=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 r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new Vu).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,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Wu){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var Zu=Gu;Gu.default=Gu;let Ju=Zu,Xu=class extends Ju{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Hu=Xu;Xu.default=Xu;var Ku={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:$u,SourceMapGenerator:qu}=Au,{existsSync:Qu,readFileSync:ep}=Au,{dirname:tp,join:sp}=Au;let rp=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=tp(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new $u(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").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}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 s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=tp(e),Qu(e))return this.mapFile=e,ep(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof $u)return qu.fromSourceMap(t).toString();if(t instanceof qu)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=sp(tp(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var np=rp;rp.default=rp;let{SourceMapConsumer:ip,SourceMapGenerator:op}=Au,{fileURLToPath:ap,pathToFileURL:lp}=Au,{isAbsolute:cp,resolve:hp}=Au,{nanoid:up}=Ku,pp=Au,dp=Nu,fp=np,mp=Symbol("fromOffsetCache"),gp=Boolean(ip&&op),yp=Boolean(hp&&cp),wp=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!yp||/^\w+:\/\//.test(t.from)||cp(t.from)?this.file=t.from:this.file=hp(t.from)),yp&&gp){let e=new fp(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 "+up(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new dp(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,r.plugin):new dp(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(lp&&(n.input.url=lp(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[mp])s=this[mp];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[mp]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:hp(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){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 s&&(n=o.originalPositionFor({column:r,line:s})),i=cp(a.source)?lp(a.source):new URL(a.source,this.map.consumer().sourceRoot||lp(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!ap)throw new Error("file: protocol is not available in this PostCSS build");l.file=ap(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 bp=wp;wp.default=wp,pp&&pp.registerInput&&pp.registerInput(wp);let{SourceMapConsumer:vp,SourceMapGenerator:Cp}=Au,{dirname:Sp,relative:kp,resolve:Ip,sep:xp}=Au,{pathToFileURL:Op}=Au,Ap=bp,Ep=Boolean(vp&&Cp),Rp=Boolean(Sp&&Ip&&kp&&xp);var Mp=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,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.toString()):"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,s=this.toUrl(this.path(e.file)),r=e.root||Sp(e.file);!1===this.mapOpts.sourcesContent?(t=new vp(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}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(),Rp&&Ep&&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=Cp.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Cp({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 Cp({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=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=s,i.generated.column=r-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?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=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=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-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 s=this.opts.to?Sp(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=Sp(Ip(s,this.mapOpts.annotation)));let r=kp(s,e);return this.memoizedPaths.set(e,r),r}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 Ap(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,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(Op){let t=Op(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===xp&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let Np=Zu,Tp=class extends Np{constructor(e){super(e),this.type="comment"}};var _p=Tp;Tp.default=Tp;let Pp,Lp,Dp,Bp,{isClean:Fp,my:Up}=Tu,jp=Hu,zp=_p,Vp=Zu;function Wp(e){return e.map(e=>(e.nodes&&(e.nodes=Wp(e.nodes)),delete e.source,e))}function Yp(e){if(e[Fp]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Yp(t)}let Gp=class e extends Vp{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,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}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")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(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,s)=>(e[t]===s||(e[t]=s,"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 s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=Wp(Pp(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 new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new jp(t)]}else if(t.selector)t=[new Lp(t)];else if(t.name)t=[new Dp(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new zp(t)]}return t.map(t=>(t[Up]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Fp]&&Yp(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.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 s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}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]}};Gp.registerParse=e=>{Pp=e},Gp.registerRule=e=>{Lp=e},Gp.registerAtRule=e=>{Dp=e},Gp.registerRoot=e=>{Bp=e};var Zp=Gp;Gp.default=Gp,Gp.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Dp.prototype):"rule"===e.type?Object.setPrototypeOf(e,Lp.prototype):"decl"===e.type?Object.setPrototypeOf(e,jp.prototype):"comment"===e.type?Object.setPrototypeOf(e,zp.prototype):"root"===e.type&&Object.setPrototypeOf(e,Bp.prototype),e[Up]=!0,e.nodes&&e.nodes.forEach(e=>{Gp.rebuild(e)})};let Jp,Xp,Hp=Zp,Kp=class extends Hp{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Jp(new Xp,this,e).stringify()}};Kp.registerLazyResult=e=>{Jp=e},Kp.registerProcessor=e=>{Xp=e};var $p=Kp;Kp.default=Kp;let qp={};var Qp=function(e){qp[e]||(qp[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let ed=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 s in t)this[s]=t[s]}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 td=ed;ed.default=ed;let sd=td,rd=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new sd(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var nd=rd;rd.default=rd;const id="'".charCodeAt(0),od='"'.charCodeAt(0),ad="\\".charCodeAt(0),ld="/".charCodeAt(0),cd="\n".charCodeAt(0),hd=" ".charCodeAt(0),ud="\f".charCodeAt(0),pd="\t".charCodeAt(0),dd="\r".charCodeAt(0),fd="[".charCodeAt(0),md="]".charCodeAt(0),gd="(".charCodeAt(0),yd=")".charCodeAt(0),wd="{".charCodeAt(0),bd="}".charCodeAt(0),vd=";".charCodeAt(0),Cd="*".charCodeAt(0),Sd=":".charCodeAt(0),kd="@".charCodeAt(0),Id=/[\t\n\f\r "#'()/;[\\\]{}]/g,xd=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Od=/.[\r\n"'(/\\]/,Ad=/[\da-f]/i;let Ed=Zp,Rd=class extends Ed{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 Md=Rd;Rd.default=Rd,Ed.registerAtRule(Rd);let Nd,Td,_d=Zp,Pd=class extends _d{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new Nd(new Td,this,e).stringify()}};Pd.registerLazyResult=e=>{Nd=e},Pd.registerProcessor=e=>{Td=e};var Ld=Pd;Pd.default=Pd,_d.registerRoot(Pd);let Dd={comma:e=>Dd.split(e,[","],!0),space:e=>Dd.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Bd=Dd;Dd.default=Dd;let Fd=Zp,Ud=Bd,jd=class extends Fd{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ud.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var zd=jd;jd.default=jd,Fd.registerRule(jd);let Vd=Hu,Wd=function(e,t={}){let s,r,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(s=p.charCodeAt(m),s){case cd:case hd:case pd:case dd:case ud:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===hd||s===cd||s===pd||s===dd||s===ud);u=["space",p.slice(m,r)],m=r-1;break;case fd:case md:case wd:case bd:case Sd:case vd:case yd:{let e=String.fromCharCode(s);u=[e,e,m];break}case gd:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==id&&h!==od&&h!==hd&&h!==cd&&h!==pd&&h!==ud&&h!==dd){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===ad;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||Od.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case id:case od:n=s===id?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===ad;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case kd:Id.lastIndex=m+1,Id.test(p),r=0===Id.lastIndex?p.length-1:Id.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case ad:for(r=m,o=!0;p.charCodeAt(r+1)===ad;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==ld&&s!==hd&&s!==cd&&s!==pd&&s!==dd&&s!==ud&&(r+=1,Ad.test(p.charAt(r)))){for(;Ad.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===hd&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===ld&&p.charCodeAt(m+1)===Cd?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(xd.lastIndex=m+1,xd.test(p),r=0===xd.lastIndex?p.length-1:xd.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Yd=_p,Gd=Md,Zd=Ld,Jd=zd;const Xd={empty:!0,space:!0};let Hd=Zp,Kd=class{constructor(e){this.input=e,this.root=new Zd,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,s,r,n=new Gd;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(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[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&&(e=a[a.length-1],n.source.end=this.getPosition(e[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 s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Yd;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Wd(this.input)}decl(e,t){let s=new Vd;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.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 a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.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 Jd;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,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===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&&r){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,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",Xd[a]||Xd[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Jd;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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})}},$d=bp;function qd(e,t){let s=new $d(e,t),r=new Kd(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var Qd=qd;qd.default=qd,Hd.registerParse(qd);let{isClean:ef,my:tf}=Tu,sf=Mp,rf=Fu,nf=Zp,of=$p,af=Qp,lf=nd,cf=Qd,hf=Ld;const uf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},pf={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},df={Once:!0,postcssPlugin:!0,prepare:!0};function ff(e){return"object"==typeof e&&"function"==typeof e.then}function mf(e){let t=!1,s=uf[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function gf(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:mf(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function yf(e){return e[ef]=!1,e.nodes&&e.nodes.forEach(e=>yf(e)),e}let wf={},bf=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof lf)n=yf(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=cf;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[tf]&&nf.rebuild(n)}else n=yf(s);this.result=new lf(t,n,r),this.helpers={...wf,postcss:wf,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 new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(qb){console&&console.error&&console.error(qb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!pf[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!df[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(ff(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ef];){e[ef]=!0;let s=[gf(e)];for(;s.length>0;){let e=this.visitTick(s);if(ff(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;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(t){throw this.handleError(t)}}}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 ff(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(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=rf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new sf(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(ff(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ef];)e[ef]=!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"production"!==process.env.NODE_ENV&&("from"in this.opts||af("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(ff(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[ef])return r[ef]=!0,void e.push(gf(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[ef]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[ef]=!0;let t=mf(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[ef]||this.walkSync(e)});else{let t=this.listeners[s];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"}};bf.registerPostcss=e=>{wf=e};var vf=bf;bf.default=bf,hf.registerLazyResult(bf),of.registerLazyResult(bf);let Cf=Mp,Sf=Fu,kf=Qp,If=Qd;const xf=nd;let Of=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=Sf;this.result=new xf(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Cf(n,r,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"production"!==process.env.NODE_ENV&&("from"in this._opts||kf("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=If;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Af=Of;Of.default=Of;let Ef=Af,Rf=vf,Mf=$p,Nf=Ld,Tf=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Rf(this,e,t):new Ef(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var _f=Tf;Tf.default=Tf,Nf.registerProcessor(Tf),Mf.registerProcessor(Tf);let Pf=Hu,Lf=np,Df=_p,Bf=Md,Ff=bp,Uf=Ld,jf=zd;function zf(e,t){if(Array.isArray(e))return e.map(e=>zf(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Ff.prototype};s.map&&(s.map={...s.map,__proto__:Lf.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>zf(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Uf(r);if("decl"===r.type)return new Pf(r);if("rule"===r.type)return new jf(r);if("comment"===r.type)return new Df(r);if("atrule"===r.type)return new Bf(r);throw new Error("Unknown node type: "+e.type)}var Vf=zf;zf.default=zf;let Wf=Nu,Yf=Hu,Gf=vf,Zf=Zp,Jf=_f,Xf=Fu,Hf=Vf,Kf=$p,$f=td,qf=_p,Qf=Md,em=nd,tm=bp,sm=Qd,rm=Bd,nm=zd,im=Ld,om=Zu;function am(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Jf(e)}am.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!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(...s);return n.postcssPlugin=e,n.postcssVersion=(new Jf).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return am([n(s)]).process(e,t)},n},am.stringify=Xf,am.parse=sm,am.fromJSON=Hf,am.list=rm,am.comment=e=>new qf(e),am.atRule=e=>new Qf(e),am.decl=e=>new Yf(e),am.rule=e=>new nm(e),am.root=e=>new im(e),am.document=e=>new Kf(e),am.CssSyntaxError=Wf,am.Declaration=Yf,am.Container=Zf,am.Processor=Jf,am.Document=Kf,am.Comment=qf,am.Warning=$f,am.AtRule=Qf,am.Result=em,am.Input=tm,am.Rule=nm,am.Root=im,am.Node=om,Gf.registerPostcss(am);var lm=am;am.default=am;const cm=Cu(lm);cm.stringify,cm.fromJSON,cm.plugin,cm.parse,cm.list,cm.document,cm.comment,cm.atRule,cm.rule,cm.decl,cm.root,cm.CssSyntaxError,cm.Declaration,cm.Container,cm.Processor,cm.Document,cm.Comment,cm.Warning,cm.AtRule,cm.Result,cm.Input,cm.Rule,cm.Root,cm.Node;var hm=Object.defineProperty,um=(e,t,s)=>((e,t,s)=>t in e?hm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);function pm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function dm(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var fm={exports:{}},mm=String,gm=function(){return{isColorSupported:!1,reset:mm,bold:mm,dim:mm,italic:mm,underline:mm,inverse:mm,hidden:mm,strikethrough:mm,black:mm,red:mm,green:mm,yellow:mm,blue:mm,magenta:mm,cyan:mm,white:mm,gray:mm,bgBlack:mm,bgRed:mm,bgGreen:mm,bgYellow:mm,bgBlue:mm,bgMagenta:mm,bgCyan:mm,bgWhite:mm}};fm.exports=gm(),fm.exports.createColors=gm;var ym=fm.exports;const wm=dm(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let bm=ym,vm=wm,Cm=class e extends Error{constructor(t,s,r,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!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.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=bm.isColorSupported),vm&&e&&(t=vm(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=bm.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=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=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Sm=Cm;Cm.default=Cm;var km={};km.isClean=Symbol("isClean"),km.my=Symbol("my");const Im={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let xm=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Im[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Im[s]),i.rawCache[s]=r,r}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 s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}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(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.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(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.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 s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Om=xm;xm.default=xm;let Am=Om;function Em(e,t){new Am(t).stringify(e)}var Rm=Em;Em.default=Em;let{isClean:Mm,my:Nm}=km,Tm=Sm,_m=Om,Pm=Rm;function Lm(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Lm(e,s)):("object"===i&&null!==n&&(n=Lm(n)),s[r]=n)}return s}let Dm=class{constructor(e={}){this.raws={},this[Mm]=!1,this[Nm]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}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=Lm(this);for(let s in e)t[s]=e[s];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:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Tm(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Mm]){this[Mm]=!1;let e=this;for(;e=e.parent;)e[Mm]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,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},s=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 r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new _m).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,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Pm){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var Bm=Dm;Dm.default=Dm;let Fm=Bm,Um=class extends Fm{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var jm=Um;Um.default=Um;var zm={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Vm,SourceMapGenerator:Wm}=wm,{existsSync:Ym,readFileSync:Gm}=wm,{dirname:Zm,join:Jm}=wm;let Xm=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Zm(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Vm(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").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}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 s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=Zm(e),Ym(e))return this.mapFile=e,Gm(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Vm)return Wm.fromSourceMap(t).toString();if(t instanceof Wm)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Jm(Zm(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Hm=Xm;Xm.default=Xm;let{SourceMapConsumer:Km,SourceMapGenerator:$m}=wm,{fileURLToPath:qm,pathToFileURL:Qm}=wm,{isAbsolute:eg,resolve:tg}=wm,{nanoid:sg}=zm,rg=wm,ng=Sm,ig=Hm,og=Symbol("fromOffsetCache"),ag=Boolean(Km&&$m),lg=Boolean(tg&&eg),cg=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!lg||/^\w+:\/\//.test(t.from)||eg(t.from)?this.file=t.from:this.file=tg(t.from)),lg&&ag){let e=new ig(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 "+sg(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new ng(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,r.plugin):new ng(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(Qm&&(n.input.url=Qm(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[og])s=this[og];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[og]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:tg(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){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 s&&(n=o.originalPositionFor({column:r,line:s})),i=eg(a.source)?Qm(a.source):new URL(a.source,this.map.consumer().sourceRoot||Qm(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!qm)throw new Error("file: protocol is not available in this PostCSS build");l.file=qm(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 hg=cg;cg.default=cg,rg&&rg.registerInput&&rg.registerInput(cg);let{SourceMapConsumer:ug,SourceMapGenerator:pg}=wm,{dirname:dg,relative:fg,resolve:mg,sep:gg}=wm,{pathToFileURL:yg}=wm,wg=hg,bg=Boolean(ug&&pg),vg=Boolean(dg&&mg&&fg&&gg);var Cg=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,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.toString()):"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,s=this.toUrl(this.path(e.file)),r=e.root||dg(e.file);!1===this.mapOpts.sourcesContent?(t=new ug(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}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(),vg&&bg&&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=pg.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new pg({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 pg({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=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=s,i.generated.column=r-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?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=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=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-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 s=this.opts.to?dg(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=dg(mg(s,this.mapOpts.annotation)));let r=fg(s,e);return this.memoizedPaths.set(e,r),r}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 wg(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,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(yg){let t=yg(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===gg&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let Sg=Bm,kg=class extends Sg{constructor(e){super(e),this.type="comment"}};var Ig=kg;kg.default=kg;let xg,Og,Ag,Eg,{isClean:Rg,my:Mg}=km,Ng=jm,Tg=Ig,_g=Bm;function Pg(e){return e.map(e=>(e.nodes&&(e.nodes=Pg(e.nodes)),delete e.source,e))}function Lg(e){if(e[Rg]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Lg(t)}let Dg=class e extends _g{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,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}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")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(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,s)=>(e[t]===s||(e[t]=s,"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 s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=Pg(xg(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 new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Ng(t)]}else if(t.selector)t=[new Og(t)];else if(t.name)t=[new Ag(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Tg(t)]}return t.map(t=>(t[Mg]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Rg]&&Lg(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.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 s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}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]}};Dg.registerParse=e=>{xg=e},Dg.registerRule=e=>{Og=e},Dg.registerAtRule=e=>{Ag=e},Dg.registerRoot=e=>{Eg=e};var Bg=Dg;Dg.default=Dg,Dg.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Ag.prototype):"rule"===e.type?Object.setPrototypeOf(e,Og.prototype):"decl"===e.type?Object.setPrototypeOf(e,Ng.prototype):"comment"===e.type?Object.setPrototypeOf(e,Tg.prototype):"root"===e.type&&Object.setPrototypeOf(e,Eg.prototype),e[Mg]=!0,e.nodes&&e.nodes.forEach(e=>{Dg.rebuild(e)})};let Fg,Ug,jg=Bg,zg=class extends jg{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Fg(new Ug,this,e).stringify()}};zg.registerLazyResult=e=>{Fg=e},zg.registerProcessor=e=>{Ug=e};var Vg=zg;zg.default=zg;let Wg={};var Yg=function(e){Wg[e]||(Wg[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Gg=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 s in t)this[s]=t[s]}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 Zg=Gg;Gg.default=Gg;let Jg=Zg,Xg=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new Jg(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Hg=Xg;Xg.default=Xg;const Kg="'".charCodeAt(0),$g='"'.charCodeAt(0),qg="\\".charCodeAt(0),Qg="/".charCodeAt(0),ey="\n".charCodeAt(0),ty=" ".charCodeAt(0),sy="\f".charCodeAt(0),ry="\t".charCodeAt(0),ny="\r".charCodeAt(0),iy="[".charCodeAt(0),oy="]".charCodeAt(0),ay="(".charCodeAt(0),ly=")".charCodeAt(0),cy="{".charCodeAt(0),hy="}".charCodeAt(0),uy=";".charCodeAt(0),py="*".charCodeAt(0),dy=":".charCodeAt(0),fy="@".charCodeAt(0),my=/[\t\n\f\r "#'()/;[\\\]{}]/g,gy=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,yy=/.[\r\n"'(/\\]/,wy=/[\da-f]/i;let by=Bg,vy=class extends by{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 Cy=vy;vy.default=vy,by.registerAtRule(vy);let Sy,ky,Iy=Bg,xy=class extends Iy{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new Sy(new ky,this,e).stringify()}};xy.registerLazyResult=e=>{Sy=e},xy.registerProcessor=e=>{ky=e};var Oy=xy;xy.default=xy,Iy.registerRoot(xy);let Ay={comma:e=>Ay.split(e,[","],!0),space:e=>Ay.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Ey=Ay;Ay.default=Ay;let Ry=Bg,My=Ey,Ny=class extends Ry{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return My.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Ty=Ny;Ny.default=Ny,Ry.registerRule(Ny);let _y=jm,Py=function(e,t={}){let s,r,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(s=p.charCodeAt(m),s){case ey:case ty:case ry:case ny:case sy:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===ty||s===ey||s===ry||s===ny||s===sy);u=["space",p.slice(m,r)],m=r-1;break;case iy:case oy:case cy:case hy:case dy:case uy:case ly:{let e=String.fromCharCode(s);u=[e,e,m];break}case ay:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==Kg&&h!==$g&&h!==ty&&h!==ey&&h!==ry&&h!==sy&&h!==ny){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===qg;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||yy.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case Kg:case $g:n=s===Kg?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===qg;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case fy:my.lastIndex=m+1,my.test(p),r=0===my.lastIndex?p.length-1:my.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case qg:for(r=m,o=!0;p.charCodeAt(r+1)===qg;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==Qg&&s!==ty&&s!==ey&&s!==ry&&s!==ny&&s!==sy&&(r+=1,wy.test(p.charAt(r)))){for(;wy.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===ty&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===Qg&&p.charCodeAt(m+1)===py?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(gy.lastIndex=m+1,gy.test(p),r=0===gy.lastIndex?p.length-1:gy.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Ly=Ig,Dy=Cy,By=Oy,Fy=Ty;const Uy={empty:!0,space:!0};let jy=Bg,zy=class{constructor(e){this.input=e,this.root=new By,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,s,r,n=new Dy;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(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[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&&(e=a[a.length-1],n.source.end=this.getPosition(e[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 s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Ly;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Py(this.input)}decl(e,t){let s=new _y;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.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 a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.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 Fy;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,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===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&&r){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,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",Uy[a]||Uy[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Fy;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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})}},Vy=hg;function Wy(e,t){let s=new Vy(e,t),r=new zy(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var Yy=Wy;Wy.default=Wy,jy.registerParse(Wy);let{isClean:Gy,my:Zy}=km,Jy=Cg,Xy=Rm,Hy=Bg,Ky=Vg,$y=Yg,qy=Hg,Qy=Yy,ew=Oy;const tw={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},sw={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},rw={Once:!0,postcssPlugin:!0,prepare:!0};function nw(e){return"object"==typeof e&&"function"==typeof e.then}function iw(e){let t=!1,s=tw[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function ow(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:iw(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function aw(e){return e[Gy]=!1,e.nodes&&e.nodes.forEach(e=>aw(e)),e}let lw={},cw=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof qy)n=aw(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=Qy;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[Zy]&&Hy.rebuild(n)}else n=aw(s);this.result=new qy(t,n,r),this.helpers={...lw,postcss:lw,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 new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(qb){console&&console.error&&console.error(qb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!sw[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!rw[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(nw(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Gy];){e[Gy]=!0;let s=[ow(e)];for(;s.length>0;){let e=this.visitTick(s);if(nw(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;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(t){throw this.handleError(t)}}}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 nw(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(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Xy;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Jy(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(nw(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Gy];)e[Gy]=!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"production"!==process.env.NODE_ENV&&("from"in this.opts||$y("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(nw(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[Gy])return r[Gy]=!0,void e.push(ow(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[Gy]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Gy]=!0;let t=iw(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[Gy]||this.walkSync(e)});else{let t=this.listeners[s];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"}};cw.registerPostcss=e=>{lw=e};var hw=cw;cw.default=cw,ew.registerLazyResult(cw),Ky.registerLazyResult(cw);let uw=Cg,pw=Rm,dw=Yg,fw=Yy;const mw=Hg;let gw=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=pw;this.result=new mw(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new uw(n,r,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"production"!==process.env.NODE_ENV&&("from"in this._opts||dw("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=fw;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var yw=gw;gw.default=gw;let ww=yw,bw=hw,vw=Vg,Cw=Oy,Sw=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new bw(this,e,t):new ww(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var kw=Sw;Sw.default=Sw,Cw.registerProcessor(Sw),vw.registerProcessor(Sw);let Iw=jm,xw=Hm,Ow=Ig,Aw=Cy,Ew=hg,Rw=Oy,Mw=Ty;function Nw(e,t){if(Array.isArray(e))return e.map(e=>Nw(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Ew.prototype};s.map&&(s.map={...s.map,__proto__:xw.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>Nw(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Rw(r);if("decl"===r.type)return new Iw(r);if("rule"===r.type)return new Mw(r);if("comment"===r.type)return new Ow(r);if("atrule"===r.type)return new Aw(r);throw new Error("Unknown node type: "+e.type)}var Tw=Nw;Nw.default=Nw;let _w=Sm,Pw=jm,Lw=hw,Dw=Bg,Bw=kw,Fw=Rm,Uw=Tw,jw=Vg,zw=Zg,Vw=Ig,Ww=Cy,Yw=Hg,Gw=hg,Zw=Yy,Jw=Ey,Xw=Ty,Hw=Oy,Kw=Bm;function $w(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Bw(e)}$w.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!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(...s);return n.postcssPlugin=e,n.postcssVersion=(new Bw).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return $w([n(s)]).process(e,t)},n},$w.stringify=Fw,$w.parse=Zw,$w.fromJSON=Uw,$w.list=Jw,$w.comment=e=>new Vw(e),$w.atRule=e=>new Ww(e),$w.decl=e=>new Pw(e),$w.rule=e=>new Xw(e),$w.root=e=>new Hw(e),$w.document=e=>new jw(e),$w.CssSyntaxError=_w,$w.Declaration=Pw,$w.Container=Dw,$w.Processor=Bw,$w.Document=jw,$w.Comment=Vw,$w.Warning=zw,$w.AtRule=Ww,$w.Result=Yw,$w.Input=Gw,$w.Rule=Xw,$w.Root=Hw,$w.Node=Kw,Lw.registerPostcss($w);var qw=$w;$w.default=$w;const Qw=pm(qw);Qw.stringify,Qw.fromJSON,Qw.plugin,Qw.parse,Qw.list,Qw.document,Qw.comment,Qw.atRule,Qw.rule,Qw.decl,Qw.root,Qw.CssSyntaxError,Qw.Declaration,Qw.Container,Qw.Processor,Qw.Document,Qw.Comment,Qw.Warning,Qw.AtRule,Qw.Result,Qw.Input,Qw.Rule,Qw.Root,Qw.Node;class eb{constructor(...e){um(this,"parentElement",null),um(this,"parentNode",null),um(this,"ownerDocument"),um(this,"firstChild",null),um(this,"lastChild",null),um(this,"previousSibling",null),um(this,"nextSibling",null),um(this,"ELEMENT_NODE",1),um(this,"TEXT_NODE",3),um(this,"nodeType"),um(this,"nodeName"),um(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 eb))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 new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const tb={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},sb={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},rb={};function nb(e){if(rb[e])return rb[e];const t=globalThis[e],s=t.prototype,r=e in tb?tb[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in sb?sb[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return rb[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?rb[e]=i:s}catch{return s}}const ib={};function ob(e,t,s){var r;const n=`${e}.${String(s)}`;if(ib[n])return ib[n].call(t);const i=nb(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(ib[n]=o,o.call(t)):t[s]}const ab={};function lb(e,t,s){const r=`${e}.${String(s)}`;if(ab[r])return ab[r].bind(t);const n=nb(e)[s];return"function"!=typeof n?t[s]:(ab[r]=n,n.bind(t))}const cb={childNodes:function(e){return ob("Node",e,"childNodes")},parentNode:function(e){return ob("Node",e,"parentNode")},parentElement:function(e){return ob("Node",e,"parentElement")},textContent:function(e){return ob("Node",e,"textContent")},contains:function(e,t){return lb("Node",e,"contains")(t)},getRootNode:function(e){return lb("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?ob("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?ob("Element",e,"shadowRoot"):null},querySelector:function(e,t){return ob("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return ob("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return nb("MutationObserver").constructor}};const hb="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 ub={map:{},getId:()=>(console.error(hb),-1),getNode:()=>(console.error(hb),null),removeNodeFromMap(){console.error(hb)},has:()=>(console.error(hb),!1),reset(){console.error(hb)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ub=new Proxy(ub,{get:(e,t,s)=>("map"===t&&console.error(hb),Reflect.get(e,t,s))}));let pb=Date.now;function db(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:cb.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(pb=()=>(new Date).getTime());function fb(e){var t;let s=null;return"getRootNode"in e&&(null==(t=cb.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&cb.host(cb.getRootNode(e))&&(s=cb.host(cb.getRootNode(e))),s}function mb(e){let t,s=e;for(;t=fb(s);)s=t;return s}function gb(e){const t=e.ownerDocument;if(!t)return!1;const s=mb(e);return cb.contains(t,s)}const yb=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){au(this,"id",1),au(this,"styleIDMap",new WeakMap),au(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 s;return s=void 0===t?this.id++:t,this.styleIDMap.set(e,s),this.idStyleMap.set(s,e),s}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return ub},closestElementOfNode:db,getBaseDimension:function e(t,s){var r,n;const i=null==(n=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:n.frameElement;if(!i||i===s)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),a=e(i,s),l=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,s){const r=t[s[0]];return 1===s.length?r:e(r.cssRules[s[1]].cssRules,s.slice(2))},getPositionsAndIndex:function(e){const t=[...e],s=t.pop();return{positions:t,index:s}},getRootShadowHost:mb,getShadowHost:fb,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,s,r,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=cb.parentElement(i.body))?void 0:t.scrollLeft)||(null==(s=null==i?void 0:i.body)?void 0:s.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==(r=cb.parentElement(i.body))?void 0:r.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof eb&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(cb.shadowRoot(e)))},hookSetter:function e(t,s,r,n,i=window){const o=i.Object.getOwnPropertyDescriptor(t,s);return i.Object.defineProperty(t,s,n?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>e(t,s,o||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(cb.contains(t,e)||gb(e))},isAncestorRemoved:function e(t,s){if(function(e){const t=e&&"host"in e&&"mode"in e&&wu.host(e)||null;return Boolean(t&&"shadowRoot"in t&&wu.shadowRoot(t)===e)}(t))return!1;const r=s.getId(t);if(!s.has(r))return!0;const n=cb.parentNode(t);return(!n||n.nodeType!==t.DOCUMENT_NODE)&&(!n||e(n,s))},isBlocked:function(e,t,s,r){if(!e)return!1;const n=db(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(r&&null!==n.closest("."+t))return!0}else if(vu(n,t,r))return!0}catch(i){}if(s){if(n.matches(s))return!0;if(r&&null!==n.closest(s))return!0}return!1},isIgnored:function(e,t,s){return!("TITLE"!==e.tagName||!s.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,s){s(t.value);for(let r=t.children.length-1;r>=0;r--)e(t.children[r],s)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return pb},on:function(e,t,s=document){const r={capture:!0,passive:!0};return s.addEventListener(e,t,r),()=>s.removeEventListener(e,t,r)},patch:function(e,t,s){try{if(!(t in e))return()=>{};const r=e[t],n=s(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=n,()=>{e[t]=r}}catch{return()=>{}}},polyfill: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)},queueToResolveTrees:function(e){const t={},s=(e,s)=>{const r={value:e,parent:s,children:[]};return t[e.node.id]=r,r},r=[];for(const n of e){const{nextId:e,parentId:i}=n;if(e&&e in t){const i=t[e];if(i.parent){const e=i.parent.children.indexOf(i);i.parent.children.splice(e,0,s(n,i.parent))}else{const e=r.indexOf(i);r.splice(e,0,s(n,null))}}else if(i in t){const e=t[i];e.children.push(s(n,e))}else r.push(s(n,null))}return r},shadowHostInDom:gb,throttle:function(e,t,s={}){let r=null,n=0;return function(...i){const o=Date.now();n||!1!==s.leading||(n=o);const a=t-(o-n),l=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),n=o,e.apply(l,i)):r||!1===s.trailing||(r=setTimeout(()=>{n=!1===s.leading?0:Date.now(),r=null,e.apply(l,i)},a))}},uniqueTextMutations:function(e){const t=new Set,s=[];for(let r=e.length;r--;){const n=e[r];t.has(n.id)||(s.push(n),t.add(n.id))}return s}},Symbol.toStringTag,{value:"Module"}));for(var wb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bb="undefined"==typeof Uint8Array?[]:new Uint8Array(256),vb=0;vb<64;vb++)bb[wb.charCodeAt(vb)]=vb;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),e=>e.charCodeAt(0)))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(eu=e.contentWindow)?void 0:eu.Array.from)||Array.from,document.body.removeChild(e)}}catch(qb){console.debug("Unable to override Array.from",qb)}var Cb;new bu,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Cb||(Cb={}));class Sb{constructor(e){iu(this,"fileName"),iu(this,"functionName"),iu(this,"lineNumber"),iu(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}const kb=/(^|@)\S+:\d+/,Ib=/^\s*at .*(\S+:\d+|\(native\))/m,xb=/^(eval@)?(\[native code])?$/,Ob={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Ib)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Ib)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(");const s=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=s?t.replace(s[0],""):t;const r=t.split(/\s+/).slice(1),n=this.extractLocation(s?s[1]:r.pop()),i=r.join(" ")||void 0,o=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new Sb({functionName:i,fileName:o,lineNumber:n[1],columnNumber:n[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(xb)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Sb({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,s=e.match(t),r=s&&s[1]?s[1]:void 0,n=this.extractLocation(e.replace(t,""));return new Sb({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){const t=/Line (\d+).*script (?:in )?(\S+)/i,s=e.message.split("\n"),r=[];for(let n=2,i=s.length;n<i;n+=2){const e=t.exec(s[n]);e&&r.push(new Sb({fileName:e[2],lineNumber:parseFloat(e[1])}))}return r},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,s=e.stacktrace.split("\n"),r=[];for(let n=0,i=s.length;n<i;n+=2){const e=t.exec(s[n]);e&&r.push(new Sb({functionName:e[3]||void 0,fileName:e[2],lineNumber:parseFloat(e[1])}))}return r},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(kb)&&!e.match(/^Error created at/)},this).map(function(e){const t=e.split("@"),s=this.extractLocation(t.pop()),r=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Sb({functionName:r,fileName:s[0],lineNumber:s[1],columnNumber:s[2]})},this)}};function Ab(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let s=e.localName;if(!s)break;s=s.toLowerCase();const r=e.parentElement,n=[];if(r.children&&r.children.length>0)for(let e=0;e<r.children.length;e++){const t=r.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===s&&n.push(t)}n.length>1&&(s+=`:eq(${n.indexOf(e)})`),t=s+(t?">"+t:""),e=r}return t}function Eb(e){return"[object Object]"===Object.prototype.toString.call(e)}function Rb(e,t){if(0===t)return!0;const s=Object.keys(e);for(const r of s)if(Eb(e[r])&&Rb(e[r],t-1))return!0;return!1}function Mb(e,t){const s={numOfKeysLimit:50,depthOfLimit:4};Object.assign(s,t);const r=[],n=[];return JSON.stringify(e,function(e,t){if(r.length>0){const s=r.indexOf(this);~s?r.splice(s+1):r.push(this),~s?n.splice(s,1/0,e):n.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Eb(e)&&Object.keys(e).length>s.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Eb(e)&&Rb(e,s.depthOfLimit))return!0;return!1}(t))return function(e){let t=e.toString();s.stringLengthLimit&&t.length>s.stringLengthLimit&&(t=`${t.slice(0,s.stringLengthLimit)}...`);return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){const e={};for(const s in t){const r=t[s];Array.isArray(r)?e[s]=Ab(r.length?r[0]:null):e[s]=r}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}const Nb={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Tb(e,t,s){const r=s?Object.assign({},Nb,s):Nb,n=r.logger;if(!n)return()=>{};let i;i="string"==typeof n?t[n]:n;let o=0,a=!1;const l=[];if(r.level.includes("error")){const s=t=>{const s=t.message,n=t.error,i=Ob.parse(n).map(e=>e.toString()),o=[Mb(s,r.stringifyOptions)];e({level:"error",trace:i,payload:o})};t.addEventListener("error",s),l.push(()=>{t.removeEventListener("error",s)});const n=t=>{let s,n;t.reason instanceof Error?(s=t.reason,n=[Mb(`Uncaught (in promise) ${s.name}: ${s.message}`,r.stringifyOptions)]):(s=new Error,n=[Mb("Uncaught (in promise)",r.stringifyOptions),Mb(t.reason,r.stringifyOptions)]);const i=Ob.parse(s).map(e=>e.toString());e({level:"error",trace:i,payload:n})};t.addEventListener("unhandledrejection",n),l.push(()=>{t.removeEventListener("unhandledrejection",n)})}for(const h of r.level)l.push(c(i,h));return()=>{l.forEach(e=>e())};function c(t,s){return t[s]?yb.patch(t,s,t=>(...n)=>{if(t.apply(this,n),!("assert"===s&&n[0]||a)){a=!0;try{const t=Ob.parse(new Error).map(e=>e.toString()).splice(1),i=("assert"===s?n.slice(1):n).map(e=>Mb(e,r.stringifyOptions));o++,o<r.lengthThreshold?e({level:s,trace:t,payload:i}):o===r.lengthThreshold&&e({level:"warn",trace:[],payload:[Mb("The number of log records reached the threshold.")]})}catch(i){t("rrweb logger error:",i,...n)}finally{a=!1}}}):()=>{}}}const _b={recordOptions:{blockClass:"bf-nocapture",blockSelector:void 0,ignoreClass:"bf-ignore-input",ignoreCSSAttributes:void 0,maskTextClass:"bf-mask",maskTextSelector:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,maskTextFn:void 0},recordConsolePlugin:{level:["error"],lengthThreshold:Number.POSITIVE_INFINITY,stringifyOptions:{stringLengthLimit:Number.POSITIVE_INFINITY,numOfKeysLimit:Number.POSITIVE_INFINITY,depthOfLimit:Number.POSITIVE_INFINITY}},samplingOptions:{scroll:150,media:1e3,canvas:8,input:"last"}};class Pb{constructor(e){var s;t(this,"options"),t(this,"stop"),this.options={..._b.recordOptions,emit:e,plugins:[(s=_b.recordConsolePlugin,{name:"rrweb/console@1",observer:Tb,options:s})],sampling:_b.samplingOptions},this.stop=null}static mockImplementation(e){throw new Error("Method not implemented.")}start(){this.stop=Zh(this.options)??null}getMirror(){return Zh.mirror}takeFullSnapshot(){return Zh.takeFullSnapshot()}}class Lb{constructor(e){t(this,"recordingManager"),t(this,"isRunning"),t(this,"events"),this.recordingManager=e,this.isRunning=!1,this.events=[]}start(){this.isRunning=!0}handle(e){this.isInitializingEvent(e)?this.events.push(e):this.stop(e)}isInitializingEvent(e){return[2,4].includes(e.type)||this.isSelectionEvent(e)||this.isConsoleEvent(e)}isSelectionEvent(e){return 3===e.type&&14===e.data.source}isConsoleEvent(e){return 6===e.type}stop(e){this.stamp(this.events,e.timestamp-1),this.publish(...this.events,e),this.events=[],this.isRunning=!1}stamp(e,t){e.forEach(e=>e.timestamp=t)}publish(...e){e.forEach(e=>{this.recordingManager.publishEvent(e)})}}function Db(e,t){void 0===t&&(t={});for(var s=function(e){for(var t=[],s=0;s<e.length;){var r=e[s];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:s,value:e[s++]});else{var n=1,i="";if("?"===e[a=s+1])throw new TypeError('Pattern cannot start with "?" at '.concat(a));for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0===--n){a++;break}}else if("("===e[a]&&(n++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at ".concat(a));i+=e[a++]}else i+=e[a++]+e[a++];if(n)throw new TypeError("Unbalanced pattern at ".concat(s));if(!i)throw new TypeError("Missing pattern at ".concat(s));t.push({type:"PATTERN",index:s,value:i}),s=a}else{for(var o="",a=s+1;a<e.length;){var l=e.charCodeAt(a);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;o+=e[a++]}if(!o)throw new TypeError("Missing parameter name at ".concat(s));t.push({type:"NAME",index:s,value:o}),s=a}else t.push({type:"CLOSE",index:s,value:e[s++]});else t.push({type:"OPEN",index:s,value:e[s++]});else t.push({type:"ESCAPED_CHAR",index:s++,value:e[s++]});else t.push({type:"MODIFIER",index:s,value:e[s++]})}return t.push({type:"END",index:s,value:""}),t}(e),r=t.prefixes,n=void 0===r?"./":r,i=t.delimiter,o=void 0===i?"/#?":i,a=[],l=0,c=0,h="",u=function(e){if(c<s.length&&s[c].type===e)return s[c++].value},p=function(e){var t=u(e);if(void 0!==t)return t;var r=s[c],n=r.type,i=r.index;throw new TypeError("Unexpected ".concat(n," at ").concat(i,", expected ").concat(e))},d=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t},f=function(e){var t=a[a.length-1],s=e||(t&&"string"==typeof t?t:"");if(t&&!s)throw new TypeError('Must have text between two parameters, missing text after "'.concat(t.name,'"'));return!s||function(e){for(var t=0,s=o;t<s.length;t++){var r=s[t];if(e.indexOf(r)>-1)return!0}return!1}(s)?"[^".concat(Fb(o),"]+?"):"(?:(?!".concat(Fb(s),")[^").concat(Fb(o),"])+?")};c<s.length;){var m=u("CHAR"),g=u("NAME"),y=u("PATTERN");if(g||y){var w=m||"";-1===n.indexOf(w)&&(h+=w,w=""),h&&(a.push(h),h=""),a.push({name:g||l++,prefix:w,suffix:"",pattern:y||f(w),modifier:u("MODIFIER")||""})}else{var b=m||u("ESCAPED_CHAR");if(b)h+=b;else if(h&&(a.push(h),h=""),u("OPEN")){w=d();var v=u("NAME")||"",C=u("PATTERN")||"",S=d();p("CLOSE"),a.push({name:v||(C?l++:""),pattern:v&&!C?f(w):C,prefix:w,suffix:S,modifier:u("MODIFIER")||""})}else p("END")}}return a}function Bb(e,t){var s=[];return function(e,t,s){void 0===s&&(s={});var r=s.decode,n=void 0===r?function(e){return e}:r;return function(s){var r=e.exec(s);if(!r)return!1;for(var i=r[0],o=r.index,a=Object.create(null),l=function(e){if(void 0===r[e])return"continue";var s=t[e-1];"*"===s.modifier||"+"===s.modifier?a[s.name]=r[e].split(s.prefix+s.suffix).map(function(e){return n(e,s)}):a[s.name]=n(r[e],s)},c=1;c<r.length;c++)l(c);return{path:i,index:o,params:a}}}(zb(e,s,t),s,t)}function Fb(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Ub(e){return e&&e.sensitive?"":"i"}function jb(e,t,s){return function(e,t,s){void 0===s&&(s={});for(var r=s.strict,n=void 0!==r&&r,i=s.start,o=void 0===i||i,a=s.end,l=void 0===a||a,c=s.encode,h=void 0===c?function(e){return e}:c,u=s.delimiter,p=void 0===u?"/#?":u,d=s.endsWith,f="[".concat(Fb(void 0===d?"":d),"]|$"),m="[".concat(Fb(p),"]"),g=o?"^":"",y=0,w=e;y<w.length;y++){var b=w[y];if("string"==typeof b)g+=Fb(h(b));else{var v=Fb(h(b.prefix)),C=Fb(h(b.suffix));if(b.pattern)if(t&&t.push(b),v||C)if("+"===b.modifier||"*"===b.modifier){var S="*"===b.modifier?"?":"";g+="(?:".concat(v,"((?:").concat(b.pattern,")(?:").concat(C).concat(v,"(?:").concat(b.pattern,"))*)").concat(C,")").concat(S)}else g+="(?:".concat(v,"(").concat(b.pattern,")").concat(C,")").concat(b.modifier);else{if("+"===b.modifier||"*"===b.modifier)throw new TypeError('Can not repeat "'.concat(b.name,'" without a prefix and suffix'));g+="(".concat(b.pattern,")").concat(b.modifier)}else g+="(?:".concat(v).concat(C,")").concat(b.modifier)}}if(l)n||(g+="".concat(m,"?")),g+=s.endsWith?"(?=".concat(f,")"):"$";else{var k=e[e.length-1],I="string"==typeof k?m.indexOf(k[k.length-1])>-1:void 0===k;n||(g+="(?:".concat(m,"(?=").concat(f,"))?")),I||(g+="(?=".concat(m,"|").concat(f,")"))}return new RegExp(g,Ub(s))}(Db(e,s),t,s)}function zb(e,t,s){return e instanceof RegExp?function(e,t){if(!t)return e;for(var s=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,n=s.exec(e.source);n;)t.push({name:n[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),n=s.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,s){var r=e.map(function(e){return zb(e,t,s).source});return new RegExp("(?:".concat(r.join("|"),")"),Ub(s))}(e,t,s):jb(e,t,s)}function Vb(e,t){if(function(){if("undefined"==typeof window)return!1;const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e}()&&!t)return!1;const s=window.location.pathname;for(const n of e)try{if(Bb(n,{decode:decodeURIComponent})(s))return!1}catch(r){if(n===s)return!1}return!0}const Wb=[su.MouseMove,su.MouseInteraction,su.Scroll,su.ViewportResize,su.Input,su.TouchMove,su.MediaInteraction,su.Drag];class Yb{constructor(e){t(this,"agent"),t(this,"recorder"),t(this,"stasher"),this.agent=e,this.recorder=new Pb(this.handleEvent.bind(this)),this.stasher=new Lb(this)}start(){this.recorder.start()}handleEvent(e){const t=new URL(window.location.href),s=t.origin+t.pathname;if(Vb(this.agent.recordingBlocklist,this.agent._allowLocalhostRecording)){if(this.agent.sessionManager.isIdle){if(!this.isInteractiveEvent(e))return;this.agent.handleActivityDuringIdle()}if(this.isClick(e)){let t=Zh.mirror.getNode(e.data.id);t&&this.nodeIsInteresting(t)&&(e.conversionData={},e.conversionData.eventType="click",e.conversionData.textContent=t.textContent,e.conversionData.htmlElement=t.nodeName?.toLowerCase(),e.conversionData.location=s)}this.isCustom(e)&&(e.conversionData={},e.conversionData.eventType="custom",e.conversionData.customEventType=e.data.tag,e.conversionData.location=s),this.stasher.isRunning?this.stasher.handle(e):this.publishEvent(e)}}publishEvent(e){this.agent.sender.handle(e),this.agent.timer&&this.agent.timer.restart()}startRecorderWithStasher(){this.stasher.start(),this.recorder=new Pb(this.handleEvent.bind(this)),this.recorder.start()}isClick(e){return e.type===tu.IncrementalSnapshot&&e.data.source===su.MouseInteraction&&e.data.type===ru.Click}nodeIsInteresting(e){return"BUTTON"===e.nodeName||"ANCHOR"===e.nodeName}isCustom(e){return e.type===tu.Custom}isInteractiveEvent(e){return e.type===tu.IncrementalSnapshot&&Wb.includes(e.data?.source)}}class Gb{constructor(e,s){t(this,"agent"),t(this,"MAX_IDLE_TIME"),t(this,"timeoutId"),this.agent=e,this.MAX_IDLE_TIME=s,this.timeoutId=0}restart(){this.stop(),this.start()}stop(){clearTimeout(this.timeoutId)}start(){this.timeoutId=window.setTimeout(this.agent.handleTimeout.bind(this.agent),this.MAX_IDLE_TIME)}}const Zb=class e{constructor(){t(this,"sessionId",null),t(this,"lastScreenViewEventTime",0),t(this,"isIdle",!1)}static getInstance(){return e.instance||(e.instance=new e),e.instance}determineSessionState(e){return!this.sessionId&&e?"new":this.sessionId&&e&&this.sessionId!==e?"changed":this.sessionId===e&&null!==this.sessionId?"active":"expired"}handleSessionTransition(e,t){switch(e){case"new":case"changed":this.updateIdleStatus(!1),t.takeFullSnapshot?.()}}updateSession(e,t={}){const s=this.determineSessionState(e);this.handleSessionTransition(s,t),this.sessionId=e}updateLastScreenViewEventTime(){this.lastScreenViewEventTime=Date.now()}updateIdleStatus(e){this.isIdle=e}getLastScreenViewEventTime(){return this.lastScreenViewEventTime}getCurrentSessionId(){return this.sessionId}};t(Zb,"instance");let Jb=Zb;const Xb=class e{constructor(){t(this,"recordingManager"),t(this,"sender"),t(this,"MAX_IDLE_TIME"),t(this,"timer"),t(this,"sendEvents"),t(this,"sendScreenViewEvent"),t(this,"recordingBlocklist",[]),t(this,"_allowLocalhostRecording"),t(this,"sessionCreationPromise",null),this.recordingManager=new Yb(this),this.sender=new Qh(this)}get sessionManager(){return e._sessionManager}async start({sendEvents:e,sendScreenViewEvent:t,recordingBlocklist:s,_allowLocalhostRecording:r}){this.sendEvents=e,this.sendScreenViewEvent=t,this.recordingBlocklist=s,this._allowLocalhostRecording=r,this.MAX_IDLE_TIME=6e4,this.timer=new Gb(this,this.MAX_IDLE_TIME),this.sender.start(),this.recordingManager.start()}handleTimeout(){this.recordingManager.recorder.stop&&this.recordingManager.recorder.stop(),this.sender.send(),this.recordingManager.startRecorderWithStasher(),e._sessionManager.updateIdleStatus(!0)}handleActivityDuringIdle(){null===e._sessionManager.getCurrentSessionId()&&(e._sessionManager.getLastScreenViewEventTime()>Date.now()-5e3||this.sessionCreationPromise||(this.sessionCreationPromise=this.createSession().finally(()=>{this.sessionCreationPromise=null})))}takeFullSnapshot(){return this.recordingManager.recorder.takeFullSnapshot()}static handleCustomEvent(e){Zh.addCustomEvent(e,null)}async createSession(){if(this.sendScreenViewEvent)try{this.sendScreenViewEvent({__path:window.location.href,__title:document.title,__is_session_refresh:!0})}catch(e){console.error("Failed to send screen_view event:",e)}}};t(Xb,"_sessionManager",Jb.getInstance());let Hb=Xb;function Kb(e){return e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace("-","").replace("_",""))}class $b extends Pe{constructor(e){if(super({sdk:"web",sdkVersion:"0.0.26",...e}),t(this,"lastPath",""),t(this,"debounceTimer",null),t(this,"agent"),t(this,"sessionManager",Jb.getInstance()),t(this,"recordingBlocklist",[]),t(this,"isRecordingActive",!1),this.options=e,this.agent=new Hb,this.recordingBlocklist=e.recordingBlocklist||[],!this.isServer()){this.setGlobalProperties({__referrer:document.referrer});const e=this.isTrackingDisabled();this.options.trackOutgoingLinks&&!e&&this.trackOutgoingLinks(),this.options.trackScreenViews&&this.trackScreenViews(),this.options.trackAttributes&&!e&&this.trackAttributes(),this.options.enableRecording&&!e&&(this.startRecording(),this.isRecordingActive=!0,console.log("Brainfish has started ambient learning"))}}debounce(e,t){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(e,t)}isServer(){return"undefined"==typeof document}trackOutgoingLinks(){this.isServer()||document.addEventListener("click",e=>{const t=e.target,s=t.closest("a");if(s&&t){const e=s.getAttribute("href");e?.startsWith("http")&&super.track("link_out",{href:e,text:s.innerText||s.getAttribute("title")||t.getAttribute("alt")||t.getAttribute("title")})}})}trackScreenViews(){if(this.isServer())return;this.screenView();const e=history.pushState;history.pushState=function(...t){const s=e.apply(this,t);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),s};const t=history.replaceState;history.replaceState=function(...e){const s=t.apply(this,e);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),s},window.addEventListener("popstate",function(){window.dispatchEvent(new Event("locationchange"))});const s=()=>this.debounce(()=>this.screenView(),100);this.options.trackHashChanges?window.addEventListener("hashchange",s):window.addEventListener("locationchange",s)}trackAttributes(){this.isServer()||document.addEventListener("click",e=>{const t=e.target,s=t.closest("button"),r=t.closest("a"),n=s?.getAttribute("data-track")?s:r?.getAttribute("data-track")?r:null;if(n){const e={};for(const s of n.attributes)s.name.startsWith("data-")&&"data-track"!==s.name&&(e[Kb(s.name.replace(/^data-/,""))]=s.value);const t=n.getAttribute("data-track");t&&super.track(t,e)}})}startRecording(){this.isServer()||this.agent.start({sendEvents:this.recordEventsToServer.bind(this),sendScreenViewEvent:this.sendScreenViewEvent.bind(this),recordingBlocklist:this.recordingBlocklist,_allowLocalhostRecording:this.options._allowLocalhostRecording})}async screenView(e,t){if(this.isServer())return;let s,r;if("string"==typeof e?(s=e,r=t):(s=window.location.href,r=e),this.lastPath===s)return;this.lastPath=s;const n={...r??{},__path:s,__title:document.title};this.sendScreenViewEvent(n)}async recordEventsToServer(e){const t=await this.record(e);this.sessionManager.updateSession(t,{takeFullSnapshot:()=>{this.agent.takeFullSnapshot()}})}sendScreenViewEvent(e){super.track("screen_view",e),this.sessionManager.updateLastScreenViewEventTime()}disableTracking(){super.disableTracking(),this.isRecordingActive&&(this.agent.recordingManager.recorder.stop&&this.agent.recordingManager.recorder.stop(),this.isRecordingActive=!1,console.log("Brainfish has stopped ambient learning"))}enableTracking(){super.enableTracking()}}(e=>{if(e.BrainfishAnalytics&&"q"in e.BrainfishAnalytics){const t=e.BrainfishAnalytics.q||[],s=t.findIndex(e=>"init"===e[0]);if(-1===s)return void console.warn("BrainfishAnalytics has not been initialized.");const[r]=t.splice(s,1),n=new $b(r[1]);t.forEach(e=>{e[0]in n&&n[e[0]](...e.slice(1))}),e.BrainfishAnalytics=(e,...t)=>{const s=n[e]?n[e].bind(n):void 0;if("function"==typeof s)return s(...t);console.warn(`Method ${e} does not exist on BrainfishAnalytics`)}}})(window);
|
|
1
|
+
"use strict";var e=Object.defineProperty,t=(t,s,r)=>((t,s,r)=>s in t?e(t,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[s]=r)(t,"symbol"!=typeof s?s+"":s,r);const s=Object.create(null);s.open="0",s.close="1",s.ping="2",s.pong="3",s.message="4",s.upgrade="5",s.noop="6";const r=Object.create(null);Object.keys(s).forEach(e=>{r[s[e]]=e});const n={type:"error",data:"parser error"},i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),o="function"==typeof ArrayBuffer,a=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,l=({type:e,data:t},r,n)=>i&&t instanceof Blob?r?n(t):c(t,n):o&&(t instanceof ArrayBuffer||a(t))?r?n(t):c(new Blob([t]),n):n(s[e]+(t||"")),c=(e,t)=>{const s=new FileReader;return s.onload=function(){const e=s.result.split(",")[1];t("b"+(e||""))},s.readAsDataURL(e)};function h(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let u;const p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let Qb=0;Qb<64;Qb++)d[p.charCodeAt(Qb)]=Qb;const f="function"==typeof ArrayBuffer,m=(e,t)=>{if("string"!=typeof e)return{type:"message",data:y(e,t)};const s=e.charAt(0);if("b"===s)return{type:"message",data:g(e.substring(1),t)};return r[s]?e.length>1?{type:r[s],data:e.substring(1)}:{type:r[s]}:n},g=(e,t)=>{if(f){const s=(e=>{let t,s,r,n,i,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);const c=new ArrayBuffer(o),h=new Uint8Array(c);for(t=0;t<a;t+=4)s=d[e.charCodeAt(t)],r=d[e.charCodeAt(t+1)],n=d[e.charCodeAt(t+2)],i=d[e.charCodeAt(t+3)],h[l++]=s<<2|r>>4,h[l++]=(15&r)<<4|n>>2,h[l++]=(3&n)<<6|63&i;return c})(e);return y(s,t)}return{base64:!0,data:e}},y=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,w=String.fromCharCode(30);function b(){return new TransformStream({transform(e,t){!function(e,t){i&&e.data instanceof Blob?e.data.arrayBuffer().then(h).then(t):o&&(e.data instanceof ArrayBuffer||a(e.data))?t(h(e.data)):l(e,!1,e=>{u||(u=new TextEncoder),t(u.encode(e))})}(e,s=>{const r=s.length;let n;if(r<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,r);else if(r<65536){n=new Uint8Array(3);const e=new DataView(n.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{n=new Uint8Array(9);const e=new DataView(n.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!=typeof e.data&&(n[0]|=128),t.enqueue(n),t.enqueue(s)})}})}let v;function C(e){return e.reduce((e,t)=>e+t.length,0)}function S(e,t){if(e[0].length===t)return e.shift();const s=new Uint8Array(t);let r=0;for(let n=0;n<t;n++)s[n]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),s}function k(e){if(e)return function(e){for(var t in k.prototype)e[t]=k.prototype[t];return e}(e)}k.prototype.on=k.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},k.prototype.once=function(e,t){function s(){this.off(e,s),t.apply(this,arguments)}return s.fn=t,this.on(e,s),this},k.prototype.off=k.prototype.removeListener=k.prototype.removeAllListeners=k.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n=0;n<r.length;n++)if((s=r[n])===t||s.fn===t){r.splice(n,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},k.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),s=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(s){r=0;for(var n=(s=s.slice(0)).length;r<n;++r)s[r].apply(this,t)}return this},k.prototype.emitReserved=k.prototype.emit,k.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},k.prototype.hasListeners=function(e){return!!this.listeners(e).length};const I="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),x="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function O(e,...t){return t.reduce((t,s)=>(e.hasOwnProperty(s)&&(t[s]=e[s]),t),{})}const A=x.setTimeout,E=x.clearTimeout;function R(e,t){t.useNativeTimers?(e.setTimeoutFn=A.bind(x),e.clearTimeoutFn=E.bind(x)):(e.setTimeoutFn=x.setTimeout.bind(x),e.clearTimeoutFn=x.clearTimeout.bind(x))}function M(e){return"string"==typeof e?function(e){let t=0,s=0;for(let r=0,n=e.length;r<n;r++)t=e.charCodeAt(r),t<128?s+=1:t<2048?s+=2:t<55296||t>=57344?s+=3:(r++,s+=4);return s}(e):Math.ceil(1.33*(e.byteLength||e.size))}function N(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class T extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class _ extends k{constructor(e){super(),this.writable=!1,R(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new T(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=m(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let s in e)e.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(e[s]));return t}(e);return t.length?"?"+t:""}}class P extends _{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const s=e.split(w),r=[];for(let n=0;n<s.length;n++){const e=m(s[n],t);if(r.push(e),"error"===e.type)break}return r})(e,this.socket.binaryType).forEach(e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const s=e.length,r=new Array(s);let n=0;e.forEach((e,i)=>{l(e,!1,e=>{r[i]=e,++n===s&&t(r.join(w))})})})(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=N()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let L=!1;try{L="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(qb){}const D=L;function B(){}class F extends P{constructor(e){if(super(e),"undefined"!=typeof location){const t="https:"===location.protocol;let s=location.port;s||(s=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){const s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}class U extends k{constructor(e,t,s){super(),this.createRequest=e,R(this,s),this._opts=s,this._method=s.method||"GET",this._uri=t,this._data=void 0!==s.data?s.data:null,this._create()}_create(){var e;const t=O(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(t);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&s.setRequestHeader(e,this._opts.extraHeaders[e])}}catch(r){}if("POST"===this._method)try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(r){}try{s.setRequestHeader("Accept","*/*")}catch(r){}null===(e=this._opts.cookieJar)||void 0===e||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var e;3===s.readyState&&(null===(e=this._opts.cookieJar)||void 0===e||e.parseCookies(s.getResponseHeader("set-cookie"))),4===s.readyState&&(200===s.status||1223===s.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof s.status?s.status:0)},0))},s.send(this._data)}catch(r){return void this.setTimeoutFn(()=>{this._onError(r)},0)}"undefined"!=typeof document&&(this._index=U.requestsCount++,U.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=B,e)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete U.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(U.requestsCount=0,U.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",j);else if("function"==typeof addEventListener){addEventListener("onpagehide"in x?"pagehide":"unload",j,!1)}function j(){for(let e in U.requests)U.requests.hasOwnProperty(e)&&U.requests[e].abort()}const z=function(){const e=V({xdomain:!1});return e&&null!==e.responseType}();function V(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||D))return new XMLHttpRequest}catch(s){}if(!t)try{return new(x[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(s){}}const W="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class Y extends _{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,s=W?{}:O(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(qb){return this.emitReserved("error",qb)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;l(s,this.supportsBinary,e=>{try{this.doWrite(s,e)}catch(t){}r&&I(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=N()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const G=x.WebSocket||x.MozWebSocket;const Z={websocket:class extends Y{createSocket(e,t,s){return W?new G(e,t,s):t?new G(e,t):new G(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends _{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(qb){return this.emitReserved("error",qb)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=function(e,t){v||(v=new TextDecoder);const s=[];let r=0,i=-1,o=!1;return new TransformStream({transform(a,l){for(s.push(a);;){if(0===r){if(C(s)<1)break;const e=S(s,1);o=!(128&~e[0]),i=127&e[0],r=i<126?3:126===i?1:2}else if(1===r){if(C(s)<2)break;const e=S(s,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(2===r){if(C(s)<8)break;const e=S(s,8),t=new DataView(e.buffer,e.byteOffset,e.length),o=t.getUint32(0);if(o>Math.pow(2,21)-1){l.enqueue(n);break}i=o*Math.pow(2,32)+t.getUint32(4),r=3}else{if(C(s)<i)break;const e=S(s,i);l.enqueue(m(o?e:v.decode(e),t)),r=0}if(0===i||i>e){l.enqueue(n);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),r=b();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();const i=()=>{s.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;this._writer.write(s).then(()=>{r&&I(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}},polling:class extends F{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=z&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new U(V,this.uri(),e)}}},J=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,X=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function H(e){if(e.length>8e3)throw"URI too long";const t=e,s=e.indexOf("["),r=e.indexOf("]");-1!=s&&-1!=r&&(e=e.substring(0,s)+e.substring(s,r).replace(/:/g,";")+e.substring(r,e.length));let n=J.exec(e||""),i={},o=14;for(;o--;)i[X[o]]=n[o]||"";return-1!=s&&-1!=r&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(e,t){const s=/\/{2,9}/g,r=t.replace(s,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,i.path),i.queryKey=function(e,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(s[t]=r)}),s}(0,i.query),i}const K="function"==typeof addEventListener&&"function"==typeof removeEventListener,$=[];K&&addEventListener("offline",()=>{$.forEach(e=>e())},!1);class q extends k{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"==typeof e&&(t=e,e=null),e){const s=H(e);t.hostname=s.host,t.secure="https"===s.protocol||"wss"===s.protocol,t.port=s.port,s.query&&(t.query=s.query)}else t.host&&(t.hostname=H(t.host).host);R(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{const t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},s=e.split("&");for(let r=0,n=s.length;r<n;r++){let e=s[r].split("=");t[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return t}(this.opts.query)),K&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},$.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const s=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const e=this.opts.rememberUpgrade&&q.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",q.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const s=this.writeBuffer[t].data;if(s&&(e+=M(s)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,I(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,s){return this._sendPacket("message",e,t,s),this}send(e,t,s){return this._sendPacket("message",e,t,s),this}_sendPacket(e,t,s,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof s&&(r=s,s=null),"closing"===this.readyState||"closed"===this.readyState)return;(s=s||{}).compress=!1!==s.compress;const n={type:e,data:t,options:s};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},s=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(q.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),K&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const e=$.indexOf(this._offlineEventListener);-1!==e&&$.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}q.protocol=4;class Q extends q{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;q.priorWebsocketSuccess=!1;const r=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!s)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;q.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{s||"closed"!==this.readyState&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))};function n(){s||(s=!0,c(),t.close(),t=null)}const i=e=>{const s=new Error("probe error: "+e);s.transport=t.name,n(),this.emitReserved("upgradeError",s)};function o(){i("transport closed")}function a(){i("socket closed")}function l(e){t&&e.name!==t.name&&n()}const c=()=>{t.removeListener("open",r),t.removeListener("error",i),t.removeListener("close",o),this.off("close",a),this.off("upgrading",l)};t.once("open",r),t.once("error",i),t.once("close",o),this.once("close",a),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}}let ee=class extends Q{constructor(e,t={}){const s="object"==typeof e?e:t;(!s.transports||s.transports&&"string"==typeof s.transports[0])&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(e=>Z[e]).filter(e=>!!e)),super(e,s)}};const te="function"==typeof ArrayBuffer,se=Object.prototype.toString,re="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===se.call(Blob),ne="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===se.call(File);function ie(e){return te&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||re&&e instanceof Blob||ne&&e instanceof File}function oe(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,s=e.length;t<s;t++)if(oe(e[t]))return!0;return!1}if(ie(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return oe(e.toJSON(),!0);for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&oe(e[s]))return!0;return!1}function ae(e){const t=[],s=e.data,r=e;return r.data=le(s,t),r.attachments=t.length,{packet:r,buffers:t}}function le(e,t){if(!e)return e;if(ie(e)){const s={_placeholder:!0,num:t.length};return t.push(e),s}if(Array.isArray(e)){const s=new Array(e.length);for(let r=0;r<e.length;r++)s[r]=le(e[r],t);return s}if("object"==typeof e&&!(e instanceof Date)){const s={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(s[r]=le(e[r],t));return s}return e}function ce(e,t){return e.data=he(e.data,t),delete e.attachments,e}function he(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let s=0;s<e.length;s++)e[s]=he(e[s],t);else if("object"==typeof e)for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(e[s]=he(e[s],t));return e}const ue=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var pe,de;(de=pe||(pe={}))[de.CONNECT=0]="CONNECT",de[de.DISCONNECT=1]="DISCONNECT",de[de.EVENT=2]="EVENT",de[de.ACK=3]="ACK",de[de.CONNECT_ERROR=4]="CONNECT_ERROR",de[de.BINARY_EVENT=5]="BINARY_EVENT",de[de.BINARY_ACK=6]="BINARY_ACK";function fe(e){return"[object Object]"===Object.prototype.toString.call(e)}class me extends k{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const s=t.type===pe.BINARY_EVENT;s||t.type===pe.BINARY_ACK?(t.type=s?pe.EVENT:pe.ACK,this.reconstructor=new ge(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!ie(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const s={type:Number(e.charAt(0))};if(void 0===pe[s.type])throw new Error("unknown packet type "+s.type);if(s.type===pe.BINARY_EVENT||s.type===pe.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const n=e.substring(r,t);if(n!=Number(n)||"-"!==e.charAt(t))throw new Error("Illegal attachments");s.attachments=Number(n)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}s.nsp=e.substring(r,t)}else s.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const s=e.charAt(t);if(null==s||Number(s)!=s){--t;break}if(t===e.length)break}s.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!me.isPayloadValid(s.type,r))throw new Error("invalid payload");s.data=r}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(t){return!1}}static isPayloadValid(e,t){switch(e){case pe.CONNECT:return fe(t);case pe.DISCONNECT:return void 0===t;case pe.CONNECT_ERROR:return"string"==typeof t||fe(t);case pe.EVENT:case pe.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===ue.indexOf(t[0]));case pe.ACK:case pe.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ge{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=ce(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const ye=Object.freeze(Object.defineProperty({__proto__:null,Decoder:me,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==pe.EVENT&&e.type!==pe.ACK||!oe(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===pe.EVENT?pe.BINARY_EVENT:pe.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==pe.BINARY_EVENT&&e.type!==pe.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=ae(e),s=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(s),r}},get PacketType(){return pe},protocol:5},Symbol.toStringTag,{value:"Module"}));function we(e,t,s){return e.on(t,s),function(){e.off(t,s)}}const be=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ve extends k{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[we(e,"open",this.onopen.bind(this)),we(e,"packet",this.onpacket.bind(this)),we(e,"error",this.onerror.bind(this)),we(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,r,n;if(be.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const i={type:pe.EVENT,data:t,options:{}};if(i.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,s=t.pop();this._registerAckCallback(e,s),i.id=e}const o=null===(r=null===(s=this.io.engine)||void 0===s?void 0:s.transport)||void 0===r?void 0:r.writable,a=this.connected&&!(null===(n=this.io.engine)||void 0===n?void 0:n._hasPingExpired());return this.flags.volatile&&!o||(a?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,t){var s;const r=null!==(s=this.flags.timeout)&&void 0!==s?s:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const n=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))},r),i=(...e)=>{this.io.clearTimeoutFn(n),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((s,r)=>{const n=(e,t)=>e?r(e):s(t);n.withError=!0,t.push(n),this.emit(e,...t)})}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>{if(s!==this._queue[0])return;return null!==e?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),s.pending=!1,this._drainQueue()}),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:pe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case pe.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case pe.EVENT:case pe.BINARY_EVENT:this.onevent(e);break;case pe.ACK:case pe.BINARY_ACK:this.onack(e);break;case pe.DISCONNECT:this.ondisconnect();break;case pe.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let s=!1;return function(...r){s||(s=!0,t.packet({type:pe.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:pe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const s of t)s.apply(this,e.data)}}}function Ce(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ce.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+s:e-s}return 0|Math.min(e,this.max)},Ce.prototype.reset=function(){this.attempts=0},Ce.prototype.setMin=function(e){this.ms=e},Ce.prototype.setMax=function(e){this.max=e},Ce.prototype.setJitter=function(e){this.jitter=e};class Se extends k{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,R(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(s=t.randomizationFactor)&&void 0!==s?s:.5),this.backoff=new Ce({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||ye;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new ee(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const r=we(t,"open",function(){s.onopen(),e&&e()}),n=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},i=we(t,"error",n);if(!1!==this._timeout){const e=this._timeout,s=this.setTimeoutFn(()=>{r(),n(new Error("timeout")),t.close()},e);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}return this.subs.push(r),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(we(e,"ping",this.onping.bind(this)),we(e,"data",this.ondata.bind(this)),we(e,"error",this.onerror.bind(this)),we(e,"close",this.onclose.bind(this)),we(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){I(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new ve(this,e,t),this.nsps[e]=s),s}_destroy(e){const t=Object.keys(this.nsps);for(const s of t){if(this.nsps[s].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),null===(s=this.engine)||void 0===s||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const ke={};function Ie(e,t){"object"==typeof e&&(t=e,e=void 0);const s=function(e,t="",s){let r=e;s=s||"undefined"!=typeof location&&location,null==e&&(e=s.protocol+"//"+s.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?s.protocol+e:s.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==s?s.protocol+"//"+e:"https://"+e),r=H(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const n=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+n+":"+r.port+t,r.href=r.protocol+"://"+n+(s&&s.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=s.source,n=s.id,i=s.path,o=ke[n]&&i in ke[n].nsps;let a;return t.forceNew||t["force new connection"]||!1===t.multiplex||o?a=new Se(r,t):(ke[n]||(ke[n]=new Se(r,t)),a=ke[n]),s.query&&!t.query&&(t.query=s.queryKey),a.socket(s.path,t)}Object.assign(Ie,{Manager:Se,Socket:ve,io:Ie,connect:Ie});class xe{constructor(e){t(this,"socket"),t(this,"encode"),t(this,"decode"),this.socket=Ie(e.baseUrl,{transports:["websocket"],path:"/analytics/ws",auth:{token:e.authToken},query:e.query}),this.encode=e.encoder??(e=>function(e){const t=(new TextEncoder).encode(e);if("undefined"!=typeof window&&"function"==typeof window.btoa){const e=Array.from(t,e=>String.fromCharCode(e)).join("");return btoa(e)}if("undefined"!=typeof Buffer)return Buffer.from(t).toString("base64");throw new Error("[utils.base64Encode]: Unsupported environment")}(JSON.stringify(e))),this.decode=e.decoder??(e=>JSON.parse((e=>{if("undefined"!=typeof window&&"function"==typeof window.atob){const t=atob(e),s=t.length,r=new Uint8Array(s);for(let e=0;e<s;e++)r[e]=t.charCodeAt(e);return(new TextDecoder).decode(r)}if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf-8");throw new Error("[utils.base64Decode]: Unsupported environment")})(e)))}send(e,t,s){"function"==typeof s?this.socket.emit(e,this.encode(t),s):this.socket.emit(e,this.encode(t))}on(e,t){this.socket.on(e,e=>t(this.decode(e)))}}class Oe{constructor(e){t(this,"baseUrl"),t(this,"authToken"),t(this,"sdkMetadata"),this.baseUrl=e.baseUrl,this.authToken=e.authToken,this.sdkMetadata=e.sdkMetadata}async send(e,t){const s=new URL(e,this.baseUrl),r={...t,...this.sdkMetadata&&{sdk:this.sdkMetadata}};try{const e=await fetch(s.toString(),{method:"POST",headers:{"Content-Type":"application/json",...this.authToken&&{Authorization:`Bearer ${this.authToken}`}},body:JSON.stringify(r)});if(!e.ok)return null;let t;try{t=await e.json()}catch{t={}}return t}catch(n){}}}class Ae{constructor(e){if(t(this,"defaultTTL"),t(this,"items"),this.defaultTTL=e,e<=0)throw new Error("Default TTL must be a positive number.");this.items=new Map,this.defaultTTL=e,setInterval(()=>this.cleanup(),e)}add(e,t){const s=void 0!==t?t:this.defaultTTL;if(s<=0)throw new Error("TTL must be a positive number.");const r=Date.now()+s;this.items.set(e,r)}has(e){const t=this.items.get(e);return void 0!==t&&(!(Date.now()>t)||(this.items.delete(e),!1))}delete(e){this.items.delete(e)}get size(){return this.cleanup(),this.items.size}clear(){this.items.clear()}cleanup(){const e=Date.now();for(const[t,s]of this.items.entries())s<=e&&this.items.delete(t)}toArray(){return this.cleanup(),Array.from(this.items.keys())}}let Ee=null;var Re,Me,Ne,Te;"undefined"!=typeof window&&window.addEventListener("message",e=>{if("https://agent.brainfi.sh"===e.origin&&"REQUEST_USER_IDENTITY"===e.data?.type&&Ee&&e.source){const t=document.querySelector("#bf-iframe-container .trigger-iframe");if(!t||e.source!==t.contentWindow)return void console.warn("BrainfishWidgetWarn: Rejected REQUEST_USER_IDENTITY from untrusted iframe source:",e.origin);e.source.postMessage({type:"USER_IDENTIFY",payload:Ee},e.origin)}}),(Me=Re||(Re={})).OpenUrl="openUrl",Me.CallPhone="callPhone",Me.SendEmail="sendEmail",Me.TriggerEvent="triggerEvent",(Te=Ne||(Ne={})).Button="button",Te.Link="link";const _e=class e{constructor(s){t(this,"options"),t(this,"client"),t(this,"httpClient"),t(this,"userId"),t(this,"global"),t(this,"queue",[]),t(this,"knownEvents",["nudge.show"]),t(this,"eventListeners",{}),t(this,"recentNudgeIds",new Ae(1e3)),t(this,"trackingDisabled",!1),this.options=s;const r={sdk_name:s.sdk||"node",sdk_version:s.sdkVersion||""},n=s.apiUrl||"https://analytic.brainfi.sh",i=s.accessKey;this.client=new xe({baseUrl:n,authToken:i,query:r}),this.httpClient=new Oe({baseUrl:n,authToken:i,sdkMetadata:{name:s.sdk||"node",version:s.sdkVersion||""}}),"undefined"!=typeof window&&"undefined"!=typeof localStorage&&(this.trackingDisabled="true"===localStorage.getItem(e.TRACKING_DISABLED_KEY)),this.setupIncomingPayloadHandler()}init(){}ready(){this.options.waitForUser=!1,this.flush()}setupIncomingPayloadHandler(){this.client.on("e",this.handleIncomingPayload.bind(this))}handleIncomingPayload(e){if("nudge.show"===e.type){const{nudgeId:t}=e.payload;if(this.recentNudgeIds.has(t))return;this.recentNudgeIds.add(t),this.dispatchEventListeners("nudge.show",e.payload)}}dispatchEventListeners(e,t){this.eventListeners[e]?.forEach(e=>e(t))}on(e,t){this.knownEvents.includes(e)&&(this.eventListeners[e]||(this.eventListeners[e]=[]),this.eventListeners[e].push(t))}off(e,t){this.knownEvents.includes(e)&&this.eventListeners[e]&&(this.eventListeners[e]=this.eventListeners[e].filter(e=>e!==t),0===this.eventListeners[e].length&&delete this.eventListeners[e])}async send(e,t){return this.options.disabled||this.trackingDisabled||this.options.filter&&!this.options.filter(e)?Promise.resolve():this.options.waitForUser&&!this.userId?(this.queue.push(e),Promise.resolve()):this.client.send("t",e,t)}setGlobalProperties(e){this.global={...this.global,...e}}async track(e,t,s){return this.send({type:"event.track",payload:{name:e,userId:t?.userId??this.userId,properties:{...this.global??{},...t??{},...s?{_bfOverrides:s}:{}}}})}async identify(e){e.userId?(this.userId=e.userId,this.flush()):console.warn("BrainfishWidgetWarn: `.identify` called without a userId. User identification requires a valid userId to be provided.");const t=new Set(["userId","firstName","lastName","email","phone","avatar","properties"]),s=Object.keys(e).filter(e=>!t.has(e));s.length>0&&console.warn(`BrainfishWidgetWarn: The following fields are not recognized as main identifier fields: ${s.join(", ")}. Please place custom fields under the 'properties' object instead. Note: Using fields incorrectly may cause user identification to not work as expected.`),e.phone&&!/^\+[1-9]\d{1,14}$/.test(e.phone)&&console.warn("BrainfishWidgetWarn: phone should be in E.164 format (e.g., +14155552671). Providing the correct format ensures accurate user identification."),Ee=e;const r=document.querySelector("#bf-iframe-container .trigger-iframe");if(r){const t=()=>{r.contentWindow&&r.contentWindow.postMessage({type:"USER_IDENTIFY",payload:e},"*")};r.contentWindow&&t(),r.addEventListener("load",t)}if(Object.keys(e).length>1)return this.send({type:"user.identify",payload:{...e,properties:{...this.global,...e.properties}}})}async record(e){if(this.options.disabled)return Promise.resolve(null);if(this.trackingDisabled)return Promise.resolve(null);const t={type:"event.record",payload:{events:e,userId:this.userId}};if(this.options.filter&&!this.options.filter(t))return Promise.resolve(null);const s=await this.httpClient.send("/s",{events:e,userId:this.userId});return s?.sessionId||null}async alias(e){return this.send({type:"user.alias",payload:e})}async increment(e){return this.send({type:"user.increment",payload:e})}async decrement(e){return this.send({type:"user.decrement",payload:e})}clear(){this.userId=void 0}flush(){this.queue.forEach(e=>{this.send({...e,payload:{...e.payload,userId:e.payload.userId??this.userId}})}),this.queue=[]}disableTracking(){this.trackingDisabled=!0,"undefined"!=typeof window&&"undefined"!=typeof localStorage&&localStorage.setItem(e.TRACKING_DISABLED_KEY,"true")}enableTracking(){this.trackingDisabled=!1,"undefined"!=typeof window&&"undefined"!=typeof localStorage&&localStorage.removeItem(e.TRACKING_DISABLED_KEY),console.log("Brainfish tracking re-enabled. Refresh page for full effect.")}isTrackingDisabled(){return this.trackingDisabled}};t(_e,"TRACKING_DISABLED_KEY","bf_tracking_disabled");let Pe=_e;var Le,De=Object.defineProperty,Be=(e,t,s)=>((e,t,s)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),Fe=Object.defineProperty,Ue=(e,t,s)=>((e,t,s)=>t in e?Fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),je=(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))(je||{});const ze={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ve={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},We={};function Ye(e){if(We[e])return We[e];const t=globalThis[e],s=t.prototype,r=e in ze?ze[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in Ve?Ve[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return We[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?We[e]=i:s}catch{return s}}const Ge={};function Ze(e,t,s){var r;const n=`${e}.${String(s)}`;if(Ge[n])return Ge[n].call(t);const i=Ye(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(Ge[n]=o,o.call(t)):t[s]}const Je={};function Xe(e,t,s){const r=`${e}.${String(s)}`;if(Je[r])return Je[r].bind(t);const n=Ye(e)[s];return"function"!=typeof n?t[s]:(Je[r]=n,n.bind(t))}const He={childNodes:function(e){return Ze("Node",e,"childNodes")},parentNode:function(e){return Ze("Node",e,"parentNode")},parentElement:function(e){return Ze("Node",e,"parentElement")},textContent:function(e){return Ze("Node",e,"textContent")},contains:function(e,t){return Xe("Node",e,"contains")(t)},getRootNode:function(e){return Xe("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ze("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ze("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ze("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ze("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Ye("MutationObserver").constructor}};function Ke(e){return e.nodeType===e.ELEMENT_NODE}function $e(e){const t=e&&"host"in e&&"mode"in e&&He.host(e)||null;return Boolean(t&&"shadowRoot"in t&&He.shadowRoot(t)===e)}function qe(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Qe(e){try{const s=e.rules||e.cssRules;if(!s)return null;let r=e.href;!r&&e.ownerNode&&e.ownerNode.ownerDocument&&(r=e.ownerNode.ownerDocument.location.href);const n=Array.from(s,e=>et(e,r)).join("");return(t=n).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(s){return null}var t}function et(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=Qe(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const s=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?s.push("layer"):e.layerName&&s.push(`layer(${e.layerName})`),e.supportsText&&s.push(`supports(${e.supportsText})`),e.media.length&&s.push(e.media.mediaText),s.join(" ")+";"}(e)}catch(s){t=e.cssText}return e.styleSheet.href?ut(t,e.styleSheet.href):t}{let s=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(s=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(s)),t?ut(s,t):s}}let tt=class{constructor(){Ue(this,"idNodeMap",new Map),Ue(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-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){const s=t.id;this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t)}replace(e,t){const s=this.getNode(e);if(s){const e=this.nodeMetaMap.get(s);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function st({element:e,maskInputOptions:t,tagName:s,type:r,value:n,maskInputFn:i}){let o=n||"";const a=r&&rt(r);return(t[s.toLowerCase()]||a&&t[a])&&(o=i?i(o,e):"*".repeat(o.length)),o}function rt(e){return e.toLowerCase()}const nt="__rrweb_original__";function it(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?rt(t):null}function ot(e,t){let s;try{s=new URL(e,t??window.location.href)}catch(qb){return null}const r=s.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==r?void 0:r[1])??null}const at=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,lt=/^(?:[a-z+]+:)?\/\//i,ct=/^www\..*/i,ht=/^(data:)([^,]*),(.*)/i;function ut(e,t){return(e||"").replace(at,(e,s,r,n,i,o)=>{const a=r||i||o,l=s||n||"";if(!a)return e;if(lt.test(a)||ct.test(a))return`url(${l}${a}${l})`;if(ht.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 t of h)"."!==t&&(".."===t?c.pop():c.push(t));return`url(${l}${c.join("/")}${l})`})}function pt(e){return e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function dt(e,t){return function(e,t){const s=Array.from(t.childNodes),r=[];if(s.length>1&&e&&"string"==typeof e){const t=pt(e);for(let n=1;n<s.length;n++)if(s[n].textContent&&"string"==typeof s[n].textContent){const i=pt(s[n].textContent);for(let s=3;s<i.length;s++){const n=i.substring(0,s);if(2===t.split(n).length){const s=t.indexOf(n);for(let t=s;t<e.length;t++)if(pt(e.substring(0,t)).length===s){r.push(e.substring(0,t)),e=e.substring(t);break}break}}}}return r.push(e),r}(e,t).join("/* rr_split */")}let ft=1;const mt=new RegExp("[^a-z0-9-_:]");function gt(){return ft++}let yt,wt;const bt=/^[^ \t\n\r\u000c]+/,vt=/^[, \t\n\r\u000c]+/;const Ct=new WeakMap;function St(e,t){return t&&""!==t.trim()?It(e,t):t}function kt(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function It(e,t){let s=Ct.get(e);if(s||(s=e.createElement("a"),Ct.set(e,s)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return s.setAttribute("href",t),s.href}function xt(e,t,s,r){return r?"src"===s||"href"===s&&("use"!==t||"#"!==r[0])||"xlink:href"===s&&"#"!==r[0]?St(e,r):"background"!==s||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===s?function(e,t){if(""===t.trim())return t;let s=0;function r(e){let r;const n=e.exec(t.substring(s));return n?(r=n[0],s+=r.length,r):""}const n=[];for(;r(vt),!(s>=t.length);){let i=r(bt);if(","===i.slice(-1))i=St(e,i.substring(0,i.length-1)),n.push(i);else{let r="";i=St(e,i);let o=!1;for(;;){const e=t.charAt(s);if(""===e){n.push((i+r).trim());break}if(o)")"===e&&(o=!1);else{if(","===e){s+=1,n.push((i+r).trim());break}"("===e&&(o=!0)}r+=e,s+=1}}}return n.join(", ")}(e,r):"style"===s?ut(r,It(e)):"object"===t&&"data"===s?St(e,r):r:St(e,r):r}function Ot(e,t,s){return("video"===e||"audio"===e)&&"autoplay"===t}function At(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!s&&At(He.parentNode(e),t,s);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!s&&At(He.parentNode(e),t,s)}function Et(e,t,s,r){let n;if(Ke(e)){if(n=e,!He.childNodes(n).length)return!1}else{if(null===He.parentElement(e))return!1;n=He.parentElement(e)}try{if("string"==typeof t){if(r){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(At(n,t,r))return!0;if(s)if(r){if(n.closest(s))return!0}else if(n.matches(s))return!0}catch(i){}return!1}function Rt(e,t){const{doc:s,mirror:r,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 s=t.getId(e);return 1===s?void 0:s}(s,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:je.Document,childNodes:[],compatMode:e.compatMode}:{type:je.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:je.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){const{doc:s,blockClass:r,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,s){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const r=e.classList[s];if(t.test(r))return!0}if(s)return e.matches(s)}catch(r){}return!1}(e,r,n),m=function(e){if(e instanceof HTMLFormElement)return"form";const t=rt(e.tagName);return mt.test(t)?"div":t}(e);let g={};const y=e.attributes.length;for(let v=0;v<y;v++){const t=e.attributes[v];Ot(m,t.name,t.value)||(g[t.name]=xt(s,m,rt(t.name),t.value))}if("link"===m&&i){const t=Array.from(s.styleSheets).find(t=>t.href===e.href);let r=null;t&&(r=Qe(t)),r&&(delete g.rel,delete g.href,g._cssText=r)}if("style"===m&&e.sheet){let t=Qe(e.sheet);t&&(e.childNodes.length>1&&(t=dt(t,e)),g._cssText=t)}if("input"===m||"textarea"===m||"select"===m){const t=e.value,s=e.checked;"radio"!==g.type&&"checkbox"!==g.type&&"submit"!==g.type&&"button"!==g.type&&t?g.value=st({element:e,type:it(e),tagName:m,value:t,maskInputOptions:o,maskInputFn:a}):s&&(g.checked=s)}"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");if("canvas"===m&&h)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let s=0;s<e.width;s+=50)for(let r=0;r<e.height;r+=50){const n=t.getImageData,i=nt in n?n[nt]:n;if(new Uint32Array(i.call(t,s,r,Math.min(50,e.width-s),Math.min(50,e.height-r)).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),r=s.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(l.type,l.quality)&&(g.rr_dataURL=t)}if("img"===m&&c){yt||(yt=s.createElement("canvas"),wt=yt.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{yt.width=t.naturalWidth,yt.height=t.naturalHeight,wt.drawImage(t,0,0),g.rr_dataURL=yt.toDataURL(l.type,l.quality)}catch(qb){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=${r}! Error: ${qb}`)}"anonymous"===t.crossOrigin&&(n?g.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}if("audio"===m||"video"===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}p||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop));if(f){const{width:t,height:s}=e.getBoundingClientRect();g={class:g.class,rr_width:`${t}px`,rr_height:`${s}px`}}"iframe"!==m||u(g.src)||(e.contentDocument||(g.rr_src=g.src),delete g.src);let w;try{customElements.get(m)&&(w=!0)}catch(b){}return{type:je.Element,tagName:m,attributes:g,childNodes:[],isSVG:kt(e)||void 0,needBlock:f,rootId:d,isCustom:w}}(e,{doc:s,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:s,maskTextFn:r,rootId:n,cssCaptured:i}=t,o=He.parentNode(e),a=o&&o.tagName;let l="";const c="STYLE"===a||void 0,h="SCRIPT"===a||void 0;h?l="SCRIPT_PLACEHOLDER":i||(l=He.textContent(e),c&&l&&(l=ut(l,It(t.doc))));!c&&!h&&l&&s&&(l=r?r(l,He.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:je.Text,textContent:l||"",rootId:n}}(e,{doc:s,needsMask:o,maskTextFn:c,rootId:y,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:je.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:je.Comment,textContent:He.textContent(e)||"",rootId:y};default:return!1}}function Mt(e){return null==e?"":e.toLowerCase()}function Nt(e,t){const{doc:s,mirror:r,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:C=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:k=!1,cssCaptured:I=!1}=t;let{needsMask:x}=t,{preserveWhiteSpace:O=!0}=t;if(!x){x=Et(e,o,a,void 0===x)}const A=Rt(e,{doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:x,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:k,cssCaptured:I});if(!A)return console.warn(e,"not serialized"),null;let E;E=r.hasNode(e)?r.getId(e):function(e,t){if(t.comment&&e.type===je.Comment)return!0;if(e.type===je.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===ot(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Mt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Mt(e.attributes.name)||"icon"===Mt(e.attributes.rel)||"apple-touch-icon"===Mt(e.attributes.rel)||"shortcut icon"===Mt(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Mt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Mt(e.attributes.property).match(/^(og|twitter|fb):/)||Mt(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Mt(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Mt(e.attributes.name)||"googlebot"===Mt(e.attributes.name)||"bingbot"===Mt(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Mt(e.attributes.name)||"generator"===Mt(e.attributes.name)||"framework"===Mt(e.attributes.name)||"publisher"===Mt(e.attributes.name)||"progid"===Mt(e.attributes.name)||Mt(e.attributes.property).match(/^article:/)||Mt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Mt(e.attributes.name)||"yandex-verification"===Mt(e.attributes.name)||"csrf-token"===Mt(e.attributes.name)||"p:domain_verify"===Mt(e.attributes.name)||"verify-v1"===Mt(e.attributes.name)||"verification"===Mt(e.attributes.name)||"shopify-checkout-api-token"===Mt(e.attributes.name)))return!0}}return!1}(A,d)||!O&&A.type===je.Text&&!A.textContent.replace(/^\s+|\s+$/gm,"").length?-2:gt();const R=Object.assign(A,{id:E});if(r.add(e,R),-2===E)return null;y&&y(e);let M=!l;if(R.type===je.Element){M=M&&!R.needBlock,delete R.needBlock;const t=He.shadowRoot(e);t&&qe(t)&&(R.isShadowHost=!0)}if((R.type===je.Document||R.type===je.Element)&&M){d.headWhitespace&&R.type===je.Element&&"head"===R.tagName&&(O=!1);const t={doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S,cssCaptured:!1};if(R.type===je.Element&&"textarea"===R.tagName&&void 0!==R.attributes.value);else{R.type===je.Element&&void 0!==R.attributes._cssText&&"string"==typeof R.attributes._cssText&&(t.cssCaptured=!0);for(const s of Array.from(He.childNodes(e))){const e=Nt(s,t);e&&R.childNodes.push(e)}}let k=null;if(Ke(e)&&(k=He.shadowRoot(e)))for(const e of Array.from(He.childNodes(k))){const s=Nt(e,t);s&&(qe(k)&&(s.isShadow=!0),R.childNodes.push(s))}}const N=He.parentNode(e);return N&&$e(N)&&qe(N)&&(R.isShadow=!0),R.type===je.Element&&"iframe"===R.tagName&&function(e,t,s){const r=e.contentWindow;if(!r)return;let n,i=!1;try{n=r.document.readyState}catch(a){return}if("complete"!==n){const r=setTimeout(()=>{i||(t(),i=!0)},s);return void e.addEventListener("load",()=>{clearTimeout(r),i=!0,t()})}const o="about:blank";if(r.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 s=Nt(t,{doc:t,mirror:r,blockClass:n,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S});s&&w(e,s)}},b),R.type===je.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===ot(R.attributes.href))&&function(e,t,s){let r,n=!1;try{r=e.sheet}catch(o){return}if(r)return;const i=setTimeout(()=>{n||(t(),n=!0)},s);e.addEventListener("load",()=>{clearTimeout(i),n=!0,t()})}(e,()=>{if(v){const t=Nt(e,{doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S});t&&v(e,t)}},C),R}function Tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _t(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var Pt={exports:{}},Lt=String,Dt=function(){return{isColorSupported:!1,reset:Lt,bold:Lt,dim:Lt,italic:Lt,underline:Lt,inverse:Lt,hidden:Lt,strikethrough:Lt,black:Lt,red:Lt,green:Lt,yellow:Lt,blue:Lt,magenta:Lt,cyan:Lt,white:Lt,gray:Lt,bgBlack:Lt,bgRed:Lt,bgGreen:Lt,bgYellow:Lt,bgBlue:Lt,bgMagenta:Lt,bgCyan:Lt,bgWhite:Lt}};Pt.exports=Dt(),Pt.exports.createColors=Dt;var Bt=Pt.exports;const Ft=_t(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ut=Bt,jt=Ft,zt=class e extends Error{constructor(t,s,r,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!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.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=Ut.isColorSupported),jt&&e&&(t=jt(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=Ut.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=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=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Vt=zt;zt.default=zt;var Wt={};Wt.isClean=Symbol("isClean"),Wt.my=Symbol("my");const Yt={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Gt=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Yt[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Yt[s]),i.rawCache[s]=r,r}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 s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}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(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.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(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.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 s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Zt=Gt;Gt.default=Gt;let Jt=Zt;function Xt(e,t){new Jt(t).stringify(e)}var Ht=Xt;Xt.default=Xt;let{isClean:Kt,my:$t}=Wt,qt=Vt,Qt=Zt,es=Ht;function ts(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>ts(e,s)):("object"===i&&null!==n&&(n=ts(n)),s[r]=n)}return s}let ss=class{constructor(e={}){this.raws={},this[Kt]=!1,this[$t]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ts(this);for(let s in e)t[s]=e[s];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:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new qt(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Kt]){this[Kt]=!1;let e=this;for(;e=e.parent;)e[Kt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,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},s=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 r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new Qt).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,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=es){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var rs=ss;ss.default=ss;let ns=rs,is=class extends ns{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var os=is;is.default=is;var as={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:ls,SourceMapGenerator:cs}=Ft,{existsSync:hs,readFileSync:us}=Ft,{dirname:ps,join:ds}=Ft;let fs=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ps(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new ls(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").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}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 s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=ps(e),hs(e))return this.mapFile=e,us(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof ls)return cs.fromSourceMap(t).toString();if(t instanceof cs)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=ds(ps(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var ms=fs;fs.default=fs;let{SourceMapConsumer:gs,SourceMapGenerator:ys}=Ft,{fileURLToPath:ws,pathToFileURL:bs}=Ft,{isAbsolute:vs,resolve:Cs}=Ft,{nanoid:Ss}=as,ks=Ft,Is=Vt,xs=ms,Os=Symbol("fromOffsetCache"),As=Boolean(gs&&ys),Es=Boolean(Cs&&vs),Rs=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Es||/^\w+:\/\//.test(t.from)||vs(t.from)?this.file=t.from:this.file=Cs(t.from)),Es&&As){let e=new xs(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 "+Ss(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new Is(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,r.plugin):new Is(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(bs&&(n.input.url=bs(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[Os])s=this[Os];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[Os]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Cs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){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 s&&(n=o.originalPositionFor({column:r,line:s})),i=vs(a.source)?bs(a.source):new URL(a.source,this.map.consumer().sourceRoot||bs(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!ws)throw new Error("file: protocol is not available in this PostCSS build");l.file=ws(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 Ms=Rs;Rs.default=Rs,ks&&ks.registerInput&&ks.registerInput(Rs);let{SourceMapConsumer:Ns,SourceMapGenerator:Ts}=Ft,{dirname:_s,relative:Ps,resolve:Ls,sep:Ds}=Ft,{pathToFileURL:Bs}=Ft,Fs=Ms,Us=Boolean(Ns&&Ts),js=Boolean(_s&&Ls&&Ps&&Ds);var zs=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,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.toString()):"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,s=this.toUrl(this.path(e.file)),r=e.root||_s(e.file);!1===this.mapOpts.sourcesContent?(t=new Ns(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}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(),js&&Us&&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=Ts.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ts({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 Ts({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=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=s,i.generated.column=r-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?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=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=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-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 s=this.opts.to?_s(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=_s(Ls(s,this.mapOpts.annotation)));let r=Ps(s,e);return this.memoizedPaths.set(e,r),r}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 Fs(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,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(Bs){let t=Bs(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Ds&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let Vs=rs,Ws=class extends Vs{constructor(e){super(e),this.type="comment"}};var Ys=Ws;Ws.default=Ws;let Gs,Zs,Js,Xs,{isClean:Hs,my:Ks}=Wt,$s=os,qs=Ys,Qs=rs;function er(e){return e.map(e=>(e.nodes&&(e.nodes=er(e.nodes)),delete e.source,e))}function tr(e){if(e[Hs]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)tr(t)}let sr=class e extends Qs{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,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}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")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(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,s)=>(e[t]===s||(e[t]=s,"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 s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=er(Gs(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 new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new $s(t)]}else if(t.selector)t=[new Zs(t)];else if(t.name)t=[new Js(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new qs(t)]}return t.map(t=>(t[Ks]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Hs]&&tr(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.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 s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}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]}};sr.registerParse=e=>{Gs=e},sr.registerRule=e=>{Zs=e},sr.registerAtRule=e=>{Js=e},sr.registerRoot=e=>{Xs=e};var rr=sr;sr.default=sr,sr.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Js.prototype):"rule"===e.type?Object.setPrototypeOf(e,Zs.prototype):"decl"===e.type?Object.setPrototypeOf(e,$s.prototype):"comment"===e.type?Object.setPrototypeOf(e,qs.prototype):"root"===e.type&&Object.setPrototypeOf(e,Xs.prototype),e[Ks]=!0,e.nodes&&e.nodes.forEach(e=>{sr.rebuild(e)})};let nr,ir,or=rr,ar=class extends or{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new nr(new ir,this,e).stringify()}};ar.registerLazyResult=e=>{nr=e},ar.registerProcessor=e=>{ir=e};var lr=ar;ar.default=ar;let cr={};var hr=function(e){cr[e]||(cr[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let ur=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 s in t)this[s]=t[s]}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 pr=ur;ur.default=ur;let dr=pr,fr=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new dr(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var mr=fr;fr.default=fr;const gr="'".charCodeAt(0),yr='"'.charCodeAt(0),wr="\\".charCodeAt(0),br="/".charCodeAt(0),vr="\n".charCodeAt(0),Cr=" ".charCodeAt(0),Sr="\f".charCodeAt(0),kr="\t".charCodeAt(0),Ir="\r".charCodeAt(0),xr="[".charCodeAt(0),Or="]".charCodeAt(0),Ar="(".charCodeAt(0),Er=")".charCodeAt(0),Rr="{".charCodeAt(0),Mr="}".charCodeAt(0),Nr=";".charCodeAt(0),Tr="*".charCodeAt(0),_r=":".charCodeAt(0),Pr="@".charCodeAt(0),Lr=/[\t\n\f\r "#'()/;[\\\]{}]/g,Dr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Br=/.[\r\n"'(/\\]/,Fr=/[\da-f]/i;let Ur=rr,jr=class extends Ur{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 zr=jr;jr.default=jr,Ur.registerAtRule(jr);let Vr,Wr,Yr=rr,Gr=class extends Yr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new Vr(new Wr,this,e).stringify()}};Gr.registerLazyResult=e=>{Vr=e},Gr.registerProcessor=e=>{Wr=e};var Zr=Gr;Gr.default=Gr,Yr.registerRoot(Gr);let Jr={comma:e=>Jr.split(e,[","],!0),space:e=>Jr.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Xr=Jr;Jr.default=Jr;let Hr=rr,Kr=Xr,$r=class extends Hr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Kr.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var qr=$r;$r.default=$r,Hr.registerRule($r);let Qr=os,en=function(e,t={}){let s,r,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(s=p.charCodeAt(m),s){case vr:case Cr:case kr:case Ir:case Sr:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===Cr||s===vr||s===kr||s===Ir||s===Sr);u=["space",p.slice(m,r)],m=r-1;break;case xr:case Or:case Rr:case Mr:case _r:case Nr:case Er:{let e=String.fromCharCode(s);u=[e,e,m];break}case Ar:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==gr&&h!==yr&&h!==Cr&&h!==vr&&h!==kr&&h!==Sr&&h!==Ir){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===wr;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||Br.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case gr:case yr:n=s===gr?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===wr;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case Pr:Lr.lastIndex=m+1,Lr.test(p),r=0===Lr.lastIndex?p.length-1:Lr.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case wr:for(r=m,o=!0;p.charCodeAt(r+1)===wr;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==br&&s!==Cr&&s!==vr&&s!==kr&&s!==Ir&&s!==Sr&&(r+=1,Fr.test(p.charAt(r)))){for(;Fr.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===Cr&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===br&&p.charCodeAt(m+1)===Tr?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(Dr.lastIndex=m+1,Dr.test(p),r=0===Dr.lastIndex?p.length-1:Dr.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},tn=Ys,sn=zr,rn=Zr,nn=qr;const on={empty:!0,space:!0};let an=rr,ln=class{constructor(e){this.input=e,this.root=new rn,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,s,r,n=new sn;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(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[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&&(e=a[a.length-1],n.source.end=this.getPosition(e[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 s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new tn;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=en(this.input)}decl(e,t){let s=new Qr;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.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 a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.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 nn;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,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===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&&r){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,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",on[a]||on[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new nn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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})}},cn=Ms;function hn(e,t){let s=new cn(e,t),r=new ln(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var un=hn;hn.default=hn,an.registerParse(hn);let{isClean:pn,my:dn}=Wt,fn=zs,mn=Ht,gn=rr,yn=lr,wn=hr,bn=mr,vn=un,Cn=Zr;const Sn={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},kn={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},In={Once:!0,postcssPlugin:!0,prepare:!0};function xn(e){return"object"==typeof e&&"function"==typeof e.then}function On(e){let t=!1,s=Sn[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function An(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:On(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function En(e){return e[pn]=!1,e.nodes&&e.nodes.forEach(e=>En(e)),e}let Rn={},Mn=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof bn)n=En(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=vn;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[dn]&&gn.rebuild(n)}else n=En(s);this.result=new bn(t,n,r),this.helpers={...Rn,postcss:Rn,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 new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(qb){console&&console.error&&console.error(qb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!kn[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!In[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(xn(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[pn];){e[pn]=!0;let s=[An(e)];for(;s.length>0;){let e=this.visitTick(s);if(xn(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;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(t){throw this.handleError(t)}}}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 xn(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(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=mn;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new fn(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(xn(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[pn];)e[pn]=!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"production"!==process.env.NODE_ENV&&("from"in this.opts||wn("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(xn(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[pn])return r[pn]=!0,void e.push(An(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[pn]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[pn]=!0;let t=On(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[pn]||this.walkSync(e)});else{let t=this.listeners[s];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"}};Mn.registerPostcss=e=>{Rn=e};var Nn=Mn;Mn.default=Mn,Cn.registerLazyResult(Mn),yn.registerLazyResult(Mn);let Tn=zs,_n=Ht,Pn=hr,Ln=un;const Dn=mr;let Bn=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=_n;this.result=new Dn(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Tn(n,r,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"production"!==process.env.NODE_ENV&&("from"in this._opts||Pn("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Ln;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Fn=Bn;Bn.default=Bn;let Un=Fn,jn=Nn,zn=lr,Vn=Zr,Wn=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new jn(this,e,t):new Un(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Yn=Wn;Wn.default=Wn,Vn.registerProcessor(Wn),zn.registerProcessor(Wn);let Gn=os,Zn=ms,Jn=Ys,Xn=zr,Hn=Ms,Kn=Zr,$n=qr;function qn(e,t){if(Array.isArray(e))return e.map(e=>qn(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Hn.prototype};s.map&&(s.map={...s.map,__proto__:Zn.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>qn(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Kn(r);if("decl"===r.type)return new Gn(r);if("rule"===r.type)return new $n(r);if("comment"===r.type)return new Jn(r);if("atrule"===r.type)return new Xn(r);throw new Error("Unknown node type: "+e.type)}var Qn=qn;qn.default=qn;let ei=Vt,ti=os,si=Nn,ri=rr,ni=Yn,ii=Ht,oi=Qn,ai=lr,li=pr,ci=Ys,hi=zr,ui=mr,pi=Ms,di=un,fi=Xr,mi=qr,gi=Zr,yi=rs;function wi(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new ni(e)}wi.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!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(...s);return n.postcssPlugin=e,n.postcssVersion=(new ni).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return wi([n(s)]).process(e,t)},n},wi.stringify=ii,wi.parse=di,wi.fromJSON=oi,wi.list=fi,wi.comment=e=>new ci(e),wi.atRule=e=>new hi(e),wi.decl=e=>new ti(e),wi.rule=e=>new mi(e),wi.root=e=>new gi(e),wi.document=e=>new ai(e),wi.CssSyntaxError=ei,wi.Declaration=ti,wi.Container=ri,wi.Processor=ni,wi.Document=ai,wi.Comment=ci,wi.Warning=li,wi.AtRule=hi,wi.Result=ui,wi.Input=pi,wi.Rule=mi,wi.Root=gi,wi.Node=yi,si.registerPostcss(wi);var bi=wi;wi.default=wi;const vi=Tt(bi);vi.stringify,vi.fromJSON,vi.plugin,vi.parse,vi.list,vi.document,vi.comment,vi.atRule,vi.rule,vi.decl,vi.root,vi.CssSyntaxError,vi.Declaration,vi.Container,vi.Processor,vi.Document,vi.Comment,vi.Warning,vi.AtRule,vi.Result,vi.Input,vi.Rule,vi.Root,vi.Node;var Ci=Object.defineProperty,Si=(e,t,s)=>((e,t,s)=>t in e?Ci(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);function ki(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ii(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var xi={exports:{}},Oi=String,Ai=function(){return{isColorSupported:!1,reset:Oi,bold:Oi,dim:Oi,italic:Oi,underline:Oi,inverse:Oi,hidden:Oi,strikethrough:Oi,black:Oi,red:Oi,green:Oi,yellow:Oi,blue:Oi,magenta:Oi,cyan:Oi,white:Oi,gray:Oi,bgBlack:Oi,bgRed:Oi,bgGreen:Oi,bgYellow:Oi,bgBlue:Oi,bgMagenta:Oi,bgCyan:Oi,bgWhite:Oi}};xi.exports=Ai(),xi.exports.createColors=Ai;var Ei=xi.exports;const Ri=Ii(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Mi=Ei,Ni=Ri,Ti=class e extends Error{constructor(t,s,r,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!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.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=Mi.isColorSupported),Ni&&e&&(t=Ni(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=Mi.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=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=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var _i=Ti;Ti.default=Ti;var Pi={};Pi.isClean=Symbol("isClean"),Pi.my=Symbol("my");const Li={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Di=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Li[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Li[s]),i.rawCache[s]=r,r}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 s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}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(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.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(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.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 s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Bi=Di;Di.default=Di;let Fi=Bi;function Ui(e,t){new Fi(t).stringify(e)}var ji=Ui;Ui.default=Ui;let{isClean:zi,my:Vi}=Pi,Wi=_i,Yi=Bi,Gi=ji;function Zi(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Zi(e,s)):("object"===i&&null!==n&&(n=Zi(n)),s[r]=n)}return s}let Ji=class{constructor(e={}){this.raws={},this[zi]=!1,this[Vi]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}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=Zi(this);for(let s in e)t[s]=e[s];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:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Wi(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[zi]){this[zi]=!1;let e=this;for(;e=e.parent;)e[zi]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,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},s=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 r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new Yi).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,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Gi){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var Xi=Ji;Ji.default=Ji;let Hi=Xi,Ki=class extends Hi{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var $i=Ki;Ki.default=Ki;var qi={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Qi,SourceMapGenerator:eo}=Ri,{existsSync:to,readFileSync:so}=Ri,{dirname:ro,join:no}=Ri;let io=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ro(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Qi(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").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}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 s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=ro(e),to(e))return this.mapFile=e,so(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Qi)return eo.fromSourceMap(t).toString();if(t instanceof eo)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=no(ro(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var oo=io;io.default=io;let{SourceMapConsumer:ao,SourceMapGenerator:lo}=Ri,{fileURLToPath:co,pathToFileURL:ho}=Ri,{isAbsolute:uo,resolve:po}=Ri,{nanoid:fo}=qi,mo=Ri,go=_i,yo=oo,wo=Symbol("fromOffsetCache"),bo=Boolean(ao&&lo),vo=Boolean(po&&uo),Co=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!vo||/^\w+:\/\//.test(t.from)||uo(t.from)?this.file=t.from:this.file=po(t.from)),vo&&bo){let e=new yo(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 "+fo(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new go(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,r.plugin):new go(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(ho&&(n.input.url=ho(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[wo])s=this[wo];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[wo]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:po(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){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 s&&(n=o.originalPositionFor({column:r,line:s})),i=uo(a.source)?ho(a.source):new URL(a.source,this.map.consumer().sourceRoot||ho(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!co)throw new Error("file: protocol is not available in this PostCSS build");l.file=co(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 So=Co;Co.default=Co,mo&&mo.registerInput&&mo.registerInput(Co);let{SourceMapConsumer:ko,SourceMapGenerator:Io}=Ri,{dirname:xo,relative:Oo,resolve:Ao,sep:Eo}=Ri,{pathToFileURL:Ro}=Ri,Mo=So,No=Boolean(ko&&Io),To=Boolean(xo&&Ao&&Oo&&Eo);var _o=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,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.toString()):"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,s=this.toUrl(this.path(e.file)),r=e.root||xo(e.file);!1===this.mapOpts.sourcesContent?(t=new ko(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}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(),To&&No&&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=Io.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Io({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 Io({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=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=s,i.generated.column=r-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?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=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=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-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 s=this.opts.to?xo(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=xo(Ao(s,this.mapOpts.annotation)));let r=Oo(s,e);return this.memoizedPaths.set(e,r),r}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 Mo(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,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(Ro){let t=Ro(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Eo&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let Po=Xi,Lo=class extends Po{constructor(e){super(e),this.type="comment"}};var Do=Lo;Lo.default=Lo;let Bo,Fo,Uo,jo,{isClean:zo,my:Vo}=Pi,Wo=$i,Yo=Do,Go=Xi;function Zo(e){return e.map(e=>(e.nodes&&(e.nodes=Zo(e.nodes)),delete e.source,e))}function Jo(e){if(e[zo]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Jo(t)}let Xo=class e extends Go{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,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}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")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(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,s)=>(e[t]===s||(e[t]=s,"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 s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=Zo(Bo(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 new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Wo(t)]}else if(t.selector)t=[new Fo(t)];else if(t.name)t=[new Uo(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Yo(t)]}return t.map(t=>(t[Vo]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[zo]&&Jo(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.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 s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}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]}};Xo.registerParse=e=>{Bo=e},Xo.registerRule=e=>{Fo=e},Xo.registerAtRule=e=>{Uo=e},Xo.registerRoot=e=>{jo=e};var Ho=Xo;Xo.default=Xo,Xo.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Uo.prototype):"rule"===e.type?Object.setPrototypeOf(e,Fo.prototype):"decl"===e.type?Object.setPrototypeOf(e,Wo.prototype):"comment"===e.type?Object.setPrototypeOf(e,Yo.prototype):"root"===e.type&&Object.setPrototypeOf(e,jo.prototype),e[Vo]=!0,e.nodes&&e.nodes.forEach(e=>{Xo.rebuild(e)})};let Ko,$o,qo=Ho,Qo=class extends qo{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ko(new $o,this,e).stringify()}};Qo.registerLazyResult=e=>{Ko=e},Qo.registerProcessor=e=>{$o=e};var ea=Qo;Qo.default=Qo;let ta={};var sa=function(e){ta[e]||(ta[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let ra=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 s in t)this[s]=t[s]}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 na=ra;ra.default=ra;let ia=na,oa=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new ia(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var aa=oa;oa.default=oa;const la="'".charCodeAt(0),ca='"'.charCodeAt(0),ha="\\".charCodeAt(0),ua="/".charCodeAt(0),pa="\n".charCodeAt(0),da=" ".charCodeAt(0),fa="\f".charCodeAt(0),ma="\t".charCodeAt(0),ga="\r".charCodeAt(0),ya="[".charCodeAt(0),wa="]".charCodeAt(0),ba="(".charCodeAt(0),va=")".charCodeAt(0),Ca="{".charCodeAt(0),Sa="}".charCodeAt(0),ka=";".charCodeAt(0),Ia="*".charCodeAt(0),xa=":".charCodeAt(0),Oa="@".charCodeAt(0),Aa=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ea=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ra=/.[\r\n"'(/\\]/,Ma=/[\da-f]/i;let Na=Ho,Ta=class extends Na{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 _a=Ta;Ta.default=Ta,Na.registerAtRule(Ta);let Pa,La,Da=Ho,Ba=class extends Da{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new Pa(new La,this,e).stringify()}};Ba.registerLazyResult=e=>{Pa=e},Ba.registerProcessor=e=>{La=e};var Fa=Ba;Ba.default=Ba,Da.registerRoot(Ba);let Ua={comma:e=>Ua.split(e,[","],!0),space:e=>Ua.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var ja=Ua;Ua.default=Ua;let za=Ho,Va=ja,Wa=class extends za{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Va.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Ya=Wa;Wa.default=Wa,za.registerRule(Wa);let Ga=$i,Za=function(e,t={}){let s,r,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(s=p.charCodeAt(m),s){case pa:case da:case ma:case ga:case fa:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===da||s===pa||s===ma||s===ga||s===fa);u=["space",p.slice(m,r)],m=r-1;break;case ya:case wa:case Ca:case Sa:case xa:case ka:case va:{let e=String.fromCharCode(s);u=[e,e,m];break}case ba:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==la&&h!==ca&&h!==da&&h!==pa&&h!==ma&&h!==fa&&h!==ga){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===ha;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||Ra.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case la:case ca:n=s===la?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===ha;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case Oa:Aa.lastIndex=m+1,Aa.test(p),r=0===Aa.lastIndex?p.length-1:Aa.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case ha:for(r=m,o=!0;p.charCodeAt(r+1)===ha;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==ua&&s!==da&&s!==pa&&s!==ma&&s!==ga&&s!==fa&&(r+=1,Ma.test(p.charAt(r)))){for(;Ma.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===da&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===ua&&p.charCodeAt(m+1)===Ia?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(Ea.lastIndex=m+1,Ea.test(p),r=0===Ea.lastIndex?p.length-1:Ea.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Ja=Do,Xa=_a,Ha=Fa,Ka=Ya;const $a={empty:!0,space:!0};let qa=Ho,Qa=class{constructor(e){this.input=e,this.root=new Ha,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,s,r,n=new Xa;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(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[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&&(e=a[a.length-1],n.source.end=this.getPosition(e[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 s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Ja;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Za(this.input)}decl(e,t){let s=new Ga;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.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 a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.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 Ka;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,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===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&&r){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,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",$a[a]||$a[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Ka;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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})}},el=So;function tl(e,t){let s=new el(e,t),r=new Qa(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var sl=tl;tl.default=tl,qa.registerParse(tl);let{isClean:rl,my:nl}=Pi,il=_o,ol=ji,al=Ho,ll=ea,cl=sa,hl=aa,ul=sl,pl=Fa;const dl={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},fl={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},ml={Once:!0,postcssPlugin:!0,prepare:!0};function gl(e){return"object"==typeof e&&"function"==typeof e.then}function yl(e){let t=!1,s=dl[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function wl(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:yl(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function bl(e){return e[rl]=!1,e.nodes&&e.nodes.forEach(e=>bl(e)),e}let vl={},Cl=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof hl)n=bl(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=ul;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[nl]&&al.rebuild(n)}else n=bl(s);this.result=new hl(t,n,r),this.helpers={...vl,postcss:vl,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 new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(qb){console&&console.error&&console.error(qb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!fl[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ml[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(gl(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[rl];){e[rl]=!0;let s=[wl(e)];for(;s.length>0;){let e=this.visitTick(s);if(gl(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;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(t){throw this.handleError(t)}}}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 gl(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(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=ol;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new il(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(gl(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[rl];)e[rl]=!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"production"!==process.env.NODE_ENV&&("from"in this.opts||cl("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(gl(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[rl])return r[rl]=!0,void e.push(wl(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[rl]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[rl]=!0;let t=yl(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[rl]||this.walkSync(e)});else{let t=this.listeners[s];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"}};Cl.registerPostcss=e=>{vl=e};var Sl=Cl;Cl.default=Cl,pl.registerLazyResult(Cl),ll.registerLazyResult(Cl);let kl=_o,Il=ji,xl=sa,Ol=sl;const Al=aa;let El=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=Il;this.result=new Al(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new kl(n,r,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"production"!==process.env.NODE_ENV&&("from"in this._opts||xl("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Ol;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Rl=El;El.default=El;let Ml=Rl,Nl=Sl,Tl=ea,_l=Fa,Pl=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Nl(this,e,t):new Ml(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ll=Pl;Pl.default=Pl,_l.registerProcessor(Pl),Tl.registerProcessor(Pl);let Dl=$i,Bl=oo,Fl=Do,Ul=_a,jl=So,zl=Fa,Vl=Ya;function Wl(e,t){if(Array.isArray(e))return e.map(e=>Wl(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:jl.prototype};s.map&&(s.map={...s.map,__proto__:Bl.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>Wl(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new zl(r);if("decl"===r.type)return new Dl(r);if("rule"===r.type)return new Vl(r);if("comment"===r.type)return new Fl(r);if("atrule"===r.type)return new Ul(r);throw new Error("Unknown node type: "+e.type)}var Yl=Wl;Wl.default=Wl;let Gl=_i,Zl=$i,Jl=Sl,Xl=Ho,Hl=Ll,Kl=ji,$l=Yl,ql=ea,Ql=na,ec=Do,tc=_a,sc=aa,rc=So,nc=sl,ic=ja,oc=Ya,ac=Fa,lc=Xi;function cc(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Hl(e)}cc.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!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(...s);return n.postcssPlugin=e,n.postcssVersion=(new Hl).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return cc([n(s)]).process(e,t)},n},cc.stringify=Kl,cc.parse=nc,cc.fromJSON=$l,cc.list=ic,cc.comment=e=>new ec(e),cc.atRule=e=>new tc(e),cc.decl=e=>new Zl(e),cc.rule=e=>new oc(e),cc.root=e=>new ac(e),cc.document=e=>new ql(e),cc.CssSyntaxError=Gl,cc.Declaration=Zl,cc.Container=Xl,cc.Processor=Hl,cc.Document=ql,cc.Comment=ec,cc.Warning=Ql,cc.AtRule=tc,cc.Result=sc,cc.Input=rc,cc.Rule=oc,cc.Root=ac,cc.Node=lc,Jl.registerPostcss(cc);var hc=cc;cc.default=cc;const uc=ki(hc);uc.stringify,uc.fromJSON,uc.plugin,uc.parse,uc.list,uc.document,uc.comment,uc.atRule,uc.rule,uc.decl,uc.root,uc.CssSyntaxError,uc.Declaration,uc.Container,uc.Processor,uc.Document,uc.Comment,uc.Warning,uc.AtRule,uc.Result,uc.Input,uc.Rule,uc.Root,uc.Node;let pc=class e{constructor(...e){Si(this,"parentElement",null),Si(this,"parentNode",null),Si(this,"ownerDocument"),Si(this,"firstChild",null),Si(this,"lastChild",null),Si(this,"previousSibling",null),Si(this,"nextSibling",null),Si(this,"ELEMENT_NODE",1),Si(this,"TEXT_NODE",3),Si(this,"nodeType"),Si(this,"nodeName"),Si(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};const dc={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},fc={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},mc={};function gc(e){if(mc[e])return mc[e];const t=globalThis[e],s=t.prototype,r=e in dc?dc[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in fc?fc[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return mc[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?mc[e]=i:s}catch{return s}}const yc={};function wc(e,t,s){var r;const n=`${e}.${String(s)}`;if(yc[n])return yc[n].call(t);const i=gc(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(yc[n]=o,o.call(t)):t[s]}const bc={};function vc(e,t,s){const r=`${e}.${String(s)}`;if(bc[r])return bc[r].bind(t);const n=gc(e)[s];return"function"!=typeof n?t[s]:(bc[r]=n,n.bind(t))}function Cc(){return gc("MutationObserver").constructor}const Sc={childNodes:function(e){return wc("Node",e,"childNodes")},parentNode:function(e){return wc("Node",e,"parentNode")},parentElement:function(e){return wc("Node",e,"parentElement")},textContent:function(e){return wc("Node",e,"textContent")},contains:function(e,t){return vc("Node",e,"contains")(t)},getRootNode:function(e){return vc("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?wc("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?wc("Element",e,"shadowRoot"):null},querySelector:function(e,t){return wc("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return wc("Element",e,"querySelectorAll")(t)},mutationObserver:Cc};function kc(e,t,s=document){const r={capture:!0,passive:!0};return s.addEventListener(e,t,r),()=>s.removeEventListener(e,t,r)}const Ic="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 xc={map:{},getId:()=>(console.error(Ic),-1),getNode:()=>(console.error(Ic),null),removeNodeFromMap(){console.error(Ic)},has:()=>(console.error(Ic),!1),reset(){console.error(Ic)}};function Oc(e,t,s={}){let r=null,n=0;return function(...i){const o=Date.now();n||!1!==s.leading||(n=o);const a=t-(o-n),l=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),n=o,e.apply(l,i)):r||!1===s.trailing||(r=setTimeout(()=>{n=!1===s.leading?0:Date.now(),r=null,e.apply(l,i)},a))}}function Ac(e,t,s,r,n=window){const i=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,r?s:{set(e){setTimeout(()=>{s.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>Ac(e,t,i||{},!0)}function Ec(e,t,s){try{if(!(t in e))return()=>{};const r=e[t],n=s(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=n,()=>{e[t]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(xc=new Proxy(xc,{get:(e,t,s)=>("map"===t&&console.error(Ic),Reflect.get(e,t,s))}));let Rc=Date.now;function Mc(e){var t,s,r,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=Sc.parentElement(i.body))?void 0:t.scrollLeft)||(null==(s=null==i?void 0:i.body)?void 0:s.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==(r=Sc.parentElement(i.body))?void 0:r.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}}function Nc(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Tc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function _c(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:Sc.parentElement(e)}function Pc(e,t,s,r){if(!e)return!1;const n=_c(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(r&&null!==n.closest("."+t))return!0}else if(At(n,t,r))return!0}catch(i){}if(s){if(n.matches(s))return!0;if(r&&null!==n.closest(s))return!0}return!1}function Lc(e,t,s){return!("TITLE"!==e.tagName||!s.headTitleMutations)||-2===t.getId(e)}function Dc(e,t){if($e(e))return!1;const s=t.getId(e);if(!t.has(s))return!0;const r=Sc.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||Dc(r,t))}function Bc(e){return Boolean(e.changedTouches)}function Fc(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Uc(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function jc(e){return!!e&&(e instanceof pc&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Sc.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Rc=()=>(new Date).getTime());let zc=class{constructor(){Be(this,"id",1),Be(this,"styleIDMap",new WeakMap),Be(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 s;return s=void 0===t?this.id++:t,this.styleIDMap.set(e,s),this.idStyleMap.set(s,e),s}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 Vc(e){var t;let s=null;return"getRootNode"in e&&(null==(t=Sc.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Sc.host(Sc.getRootNode(e))&&(s=Sc.host(Sc.getRootNode(e))),s}function Wc(e){const t=e.ownerDocument;if(!t)return!1;const s=function(e){let t,s=e;for(;t=Vc(s);)s=t;return s}(e);return Sc.contains(t,s)}function Yc(e){const t=e.ownerDocument;return!!t&&(Sc.contains(t,e)||Wc(e))}var Gc=(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))(Gc||{}),Zc=(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))(Zc||{}),Jc=(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))(Jc||{}),Xc=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Xc||{}),Hc=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Hc||{}),Kc=(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))(Kc||{}),$c=(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))($c||{});function qc(e){return"__ln"in e}class Qc{constructor(){Be(this,"length",0),Be(this,"head",null),Be(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let s=0;s<e;s++)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&&qc(e.previousSibling)){const s=e.previousSibling.__ln.next;t.next=s,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,s&&(s.previous=t)}else if(e.nextSibling&&qc(e.nextSibling)&&e.nextSibling.__ln.previous){const s=e.nextSibling.__ln.previous;t.previous=s,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,s&&(s.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 eh=(e,t)=>`${e}@${t}`;class th{constructor(){Be(this,"frozen",!1),Be(this,"locked",!1),Be(this,"texts",[]),Be(this,"attributes",[]),Be(this,"attributeMap",new WeakMap),Be(this,"removes",[]),Be(this,"mapRemoves",[]),Be(this,"movedMap",{}),Be(this,"addedSet",new Set),Be(this,"movedSet",new Set),Be(this,"droppedSet",new Set),Be(this,"removesSubTreeCache",new Set),Be(this,"mutationCb"),Be(this,"blockClass"),Be(this,"blockSelector"),Be(this,"maskTextClass"),Be(this,"maskTextSelector"),Be(this,"inlineStylesheet"),Be(this,"maskInputOptions"),Be(this,"maskTextFn"),Be(this,"maskInputFn"),Be(this,"keepIframeSrcFn"),Be(this,"recordCanvas"),Be(this,"inlineImages"),Be(this,"slimDOMOptions"),Be(this,"dataURLOptions"),Be(this,"doc"),Be(this,"mirror"),Be(this,"iframeManager"),Be(this,"stylesheetManager"),Be(this,"shadowDomManager"),Be(this,"canvasManager"),Be(this,"processedNodeManager"),Be(this,"unattachedDoc"),Be(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),Be(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,s=new Qc,r=e=>{let t=e,s=-2;for(;-2===s;)t=t&&t.nextSibling,s=t&&this.mirror.getId(t);return s},n=n=>{const i=Sc.parentNode(n);if(!i||!Yc(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=$e(i)?this.mirror.getId(Vc(n)):this.mirror.getId(i),l=r(n);if(-1===a||-1===l)return s.addNode(n);const c=Nt(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=>{Fc(e,this.mirror)&&this.iframeManager.addIframe(e),Uc(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),jc(n)&&this.shadowDomManager.addShadowRoot(Sc.shadowRoot(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 a of this.movedSet)rh(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(Sc.parentNode(a))||n(a);for(const a of this.addedSet)nh(this.droppedSet,a)||rh(this.removesSubTreeCache,a,this.mirror)?nh(this.movedSet,a)?n(a):this.droppedSet.add(a):n(a);let i=null;for(;s.length;){let e=null;if(i){const t=this.mirror.getId(Sc.parentNode(i.value)),s=r(i.value);-1!==t&&-1!==s&&(e=i)}if(!e){let t=s.tail;for(;t;){const s=t;if(t=t.previous,s){const t=this.mirror.getId(Sc.parentNode(s.value));if(-1===r(s.value))continue;if(-1!==t){e=s;break}{const t=s.value,r=Sc.parentNode(t);if(r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=Sc.host(r);if(-1!==this.mirror.getId(t)){e=s;break}}}}}}if(!e){for(;s.head;)s.removeNode(s.head.value);break}i=e.previous,s.removeNode(e.value),n(e.value)}const o={texts:this.texts.map(e=>{const t=e.node,s=Sc.parentNode(t);return s&&"TEXTAREA"===s.tagName&&this.genTextAreaValueMutation(s),{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 s=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);s.length<t.style.length&&(s+r).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))}),Be(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(Sc.childNodes(e),e=>Sc.textContent(e)||"").join("")}),Be(this,"processMutation",e=>{if(!Lc(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=Sc.textContent(e.target);Pc(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:Et(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,_c(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const s=e.target;let r=e.attributeName,n=e.target.getAttribute(r);if("value"===r){const e=it(s);n=st({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:e,value:n,maskInputFn:this.maskInputFn})}if(Pc(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let i=this.attributeMap.get(e.target);if("IFRAME"===s.tagName&&"src"===r&&!this.keepIframeSrcFn(n)){if(s.contentDocument)return;r="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===r&&"INPUT"===s.tagName&&"password"===(e.oldValue||"").toLowerCase()&&s.setAttribute("data-rr-is-password","true"),!Ot(s.tagName,r))if(i.attributes[r]=xt(this.doc,rt(s.tagName),rt(r),n),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(s.style)){const t=s.style.getPropertyValue(e),n=s.style.getPropertyPriority(e);t!==r.style.getPropertyValue(e)||n!==r.style.getPropertyPriority(e)?i.styleDiff[e]=""===n?t:[t,n]:i._unchangedStyles[e]=[t,n]}for(const e of Array.from(r.style))""===s.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===s.tagName&&(s.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case"childList":if(Pc(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 s=this.mirror.getId(t),r=$e(e.target)?this.mirror.getId(Sc.host(e.target)):this.mirror.getId(e.target);Pc(e.target,this.blockClass,this.blockSelector,!1)||Lc(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(sh(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===s||Dc(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[eh(s,r)]?sh(this.movedSet,t):(this.removes.push({parentId:r,id:s,isShadow:!(!$e(e.target)||!qe(e.target))||void 0}),function(e,t){const s=[e];for(;s.length;){const e=s.pop();t.has(e)||(t.add(e),Sc.childNodes(e).forEach(e=>s.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),Be(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Lc(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let s=null;t&&this.mirror.hasNode(t)&&(s=this.mirror.getId(t)),s&&-1!==s&&(this.movedMap[eh(this.mirror.getId(e),s)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Pc(e,this.blockClass,this.blockSelector,!1)||(Sc.childNodes(e).forEach(e=>this.genAdds(e)),jc(e)&&Sc.childNodes(Sc.shadowRoot(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 sh(e,t){e.delete(t),Sc.childNodes(t).forEach(t=>sh(e,t))}function rh(e,t,s){return 0!==e.size&&function(e,t){const s=Sc.parentNode(t);return!!s&&e.has(s)}(e,t)}function nh(e,t){return 0!==e.size&&ih(e,t)}function ih(e,t){const s=Sc.parentNode(t);return!!s&&(!!e.has(s)||ih(e,s))}let oh;const ah=e=>{if(!oh)return e;return(...t)=>{try{return e(...t)}catch(s){if(oh&&!0===oh(s))return;throw s}}},lh=[];function ch(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 hh(e,t){const s=new th;lh.push(s),s.init(e);const r=new(Cc())(ah(s.processMutations.bind(s)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function uh({mouseInteractionCb:e,doc:t,mirror:s,blockClass:r,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(Jc).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]).forEach(i=>{let o=rt(i);const c=(t=>i=>{const o=ch(i);if(Pc(o,r,n,!0))return;let a=null,c=t;if("pointerType"in i){switch(i.pointerType){case"mouse":a=Xc.Mouse;break;case"touch":a=Xc.Touch;break;case"pen":a=Xc.Pen}a===Xc.Touch?Jc[t]===Jc.MouseDown?c="TouchStart":Jc[t]===Jc.MouseUp&&(c="TouchEnd"):Xc.Pen}else Bc(i)&&(a=Xc.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===Xc.Touch||c.startsWith("Mouse")&&a===Xc.Mouse)&&(a=null)):Jc[t]===Jc.Click&&(a=l,l=null);const h=Bc(i)?i.changedTouches[0]:i;if(!h)return;const u=s.getId(o),{clientX:p,clientY:d}=h;ah(e)({type:Jc[c],id:u,x:p,y:d,...null!==a&&{pointerType:a}})})(i);if(window.PointerEvent)switch(Jc[i]){case Jc.MouseDown:case Jc.MouseUp:o=o.replace("mouse","pointer");break;case Jc.TouchStart:case Jc.TouchEnd:return}a.push(kc(o,c,t))}),ah(()=>{a.forEach(e=>e())})}function ph({scrollCb:e,doc:t,mirror:s,blockClass:r,blockSelector:n,sampling:i}){return kc("scroll",ah(Oc(ah(i=>{const o=ch(i);if(!o||Pc(o,r,n,!0))return;const a=s.getId(o);if(o===t&&t.defaultView){const s=Mc(t.defaultView);e({id:a,x:s.left,y:s.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}),i.scroll||100)),t)}const dh=["INPUT","TEXTAREA","SELECT"],fh=new WeakMap;function mh(e){return function(e,t){if(bh("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||bh("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||bh("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||bh("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const s=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(s)}else if(e.parentStyleSheet){const s=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(s)}return t}(e,[])}function gh(e,t,s){let r,n;return e?(e.ownerNode?r=t.getId(e.ownerNode):n=s.getId(e),{styleId:n,id:r}):{}}function yh({mirror:e,stylesheetManager:t},s){var r,n,i;let o=null;o="#document"===s.nodeName?e.getId(s):e.getId(Sc.host(s));const a="#document"===s.nodeName?null==(r=s.defaultView)?void 0:r.Document:null==(i=null==(n=s.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(s,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var s;const r=null==(s=l.set)?void 0:s.call(this,e);if(null!==o&&-1!==o)try{t.adoptStyleSheets(e,o)}catch(n){}return r}}),ah(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function wh(e,t={}){const s=e.doc.defaultView;if(!s)return()=>{};let r;!function(e,t){const{mutationCb:s,mousemoveCb:r,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),s(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),r(...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&&(r=hh(e,e.doc));const n=function({mousemoveCb:e,sampling:t,doc:s,mirror:r}){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=Oc(ah(t=>{const s=Date.now()-o;e(a.map(e=>(e.timeOffset-=s,e)),t),a=[],o=null}),i),c=ah(Oc(ah(e=>{const t=ch(e),{clientX:s,clientY:n}=Bc(e)?e.changedTouches[0]:e;o||(o=Rc()),a.push({x:s,y:n,id:r.getId(t),timeOffset:Rc()-o}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?Zc.Drag:e instanceof MouseEvent?Zc.MouseMove:Zc.TouchMove)}),n,{trailing:!1})),h=[kc("mousemove",c,s),kc("touchmove",c,s),kc("drag",c,s)];return ah(()=>{h.forEach(e=>e())})}(e),i=uh(e),o=ph(e),a=function({viewportResizeCb:e},{win:t}){let s=-1,r=-1;return kc("resize",ah(Oc(ah(()=>{const t=Nc(),n=Tc();s===t&&r===n||(e({width:Number(n),height:Number(t)}),s=t,r=n)}),200)),t)}(e,{win:s}),l=function({inputCb:e,doc:t,mirror:s,blockClass:r,blockSelector:n,ignoreClass:i,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:h}){function u(e){let s=ch(e);const c=e.isTrusted,u=s&&s.tagName;if(s&&"OPTION"===u&&(s=Sc.parentElement(s)),!s||!u||dh.indexOf(u)<0||Pc(s,r,n,!0))return;if(s.classList.contains(i)||o&&s.matches(o))return;let d=s.value,f=!1;const m=it(s)||"";"radio"===m||"checkbox"===m?f=s.checked:(a[u.toLowerCase()]||a[m])&&(d=st({element:s,maskInputOptions:a,tagName:u,type:m,value:d,maskInputFn:l})),p(s,h?{text:d,isChecked:f,userTriggered:c}:{text:d,isChecked:f});const g=s.name;"radio"===m&&g&&f&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==s){const t=e.value;p(e,h?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}})}function p(t,r){const n=fh.get(t);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){fh.set(t,r);const n=s.getId(t);ah(e)({...r,id:n})}}const d=("last"===c.input?["change"]:["input","change"]).map(e=>kc(e,ah(u),t)),f=t.defaultView;if(!f)return()=>{d.forEach(e=>e())};const m=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),g=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&d.push(...g.map(e=>Ac(e[0],e[1],{set(){ah(u)({target:this,isTrusted:!1})}},!1,f))),ah(()=>{d.forEach(e=>e())})}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:r,sampling:n,doc:i}){const o=ah(i=>Oc(ah(n=>{const o=ch(n);if(!o||Pc(o,t,s,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:h,loop:u}=o;e({type:i,id:r.getId(o),currentTime:a,volume:l,muted:c,playbackRate:h,loop:u})}),n.media||500)),a=[kc("play",o(Kc.Play),i),kc("pause",o(Kc.Pause),i),kc("seeked",o(Kc.Seeked),i),kc("volumechange",o(Kc.VolumeChange),i),kc("ratechange",o(Kc.RateChange),i)];return ah(()=>{a.forEach(e=>e())})}(e);let h=()=>{},u=()=>{},p=()=>{},d=()=>{};e.recordDOM&&(h=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:s},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const n=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:ah((r,n,i)=>{const[o,a]=i,{id:l,styleId:c}=gh(n,t,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:a}]}),r.apply(n,i)})}),r.CSSStyleSheet.prototype.addRule=function(e,t,s=this.cssRules.length){const n=`${e} { ${t} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[n,s])};const i=r.CSSStyleSheet.prototype.deleteRule;let o,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ah((r,n,i)=>{const[o]=i,{id:a,styleId:l}=gh(n,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),r.apply(n,i)})}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:ah((r,n,i)=>{const[o]=i,{id:a,styleId:l}=gh(n,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),r.apply(n,i)})})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ah((r,n,i)=>{const[o]=i,{id:a,styleId:l}=gh(n,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),r.apply(n,i)})}));const l={};vh("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(vh("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),vh("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),vh("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(l).forEach(([r,n])=>{c[r]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(c[r].insertRule,{apply:ah((r,n,i)=>{const[o,a]=i,{id:l,styleId:c}=gh(n.parentStyleSheet,t,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:[...mh(n),a||0]}]}),r.apply(n,i)})}),n.prototype.deleteRule=new Proxy(c[r].deleteRule,{apply:ah((r,n,i)=>{const[o]=i,{id:a,styleId:l}=gh(n.parentStyleSheet,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...mh(n),o]}]}),r.apply(n,i)})})}),ah(()=>{r.CSSStyleSheet.prototype.insertRule=n,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}(e,{win:s}),u=yh(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:r},{win:n}){const i=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:ah((n,o,a)=>{var l;const[c,h,u]=a;if(s.has(c))return i.apply(o,[c,h,u]);const{id:p,styleId:d}=gh(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(p&&-1!==p||d&&-1!==d)&&e({id:p,styleId:d,set:{property:c,value:h,priority:u},index:mh(o.parentRule)}),n.apply(o,a)})});const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:ah((n,i,a)=>{var l;const[c]=a;if(s.has(c))return o.apply(i,[c]);const{id:h,styleId:u}=gh(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(h&&-1!==h||u&&-1!==u)&&e({id:h,styleId:u,remove:{property:c},index:mh(i.parentRule)}),n.apply(i,a)})}),ah(()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:s}),e.collectFonts&&(d=function({fontCb:e,doc:t}){const s=t.defaultView;if(!s)return()=>{};const r=[],n=new WeakMap,i=s.FontFace;s.FontFace=function(e,t,s){const r=new i(e,t,s);return n.set(r,{family:e,buffer:"string"!=typeof t,descriptors:s,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const o=Ec(t.fonts,"add",function(t){return function(s){return setTimeout(ah(()=>{const t=n.get(s);t&&(e(t),n.delete(s))}),0),t.apply(this,[s])}});return r.push(()=>{s.FontFace=i}),r.push(o),ah(()=>{r.forEach(e=>e())})}(e)));const f=function(e){const{doc:t,mirror:s,blockClass:r,blockSelector:n,selectionCb:i}=e;let o=!0;const a=ah(()=>{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;t<l;t++){const i=e.getRangeAt(t),{startContainer:o,startOffset:l,endContainer:c,endOffset:h}=i;Pc(o,r,n,!0)||Pc(c,r,n,!0)||a.push({start:s.getId(o),startOffset:l,end:s.getId(c),endOffset:h})}i({ranges:a})});return a(),kc("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const s=e.defaultView;return s&&s.customElements?Ec(s.customElements,"define",function(e){return function(s,r,n){try{t({define:{name:s}})}catch(i){console.warn(`Custom element callback failed for ${s}`)}return e.apply(this,[s,r,n])}}):()=>{}}(e),g=[];for(const y of e.plugins)g.push(y.observer(y.callback,s,y.options));return ah(()=>{lh.forEach(e=>e.reset()),null==r||r.disconnect(),n(),i(),o(),a(),l(),c(),h(),u(),p(),d(),f(),m(),g.forEach(e=>e())})}function bh(e){return void 0!==window[e]}function vh(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ch{constructor(e){Be(this,"iframeIdToRemoteIdMap",new WeakMap),Be(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,s,r){const n=s||this.getIdToRemoteIdMap(e),i=r||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 s=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,s,r))}getRemoteId(e,t,s){const r=s||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const n=r.get(t);return n||-1}getRemoteIds(e,t){const s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,s))}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 Sh{constructor(e){Be(this,"iframes",new WeakMap),Be(this,"crossOriginIframeMap",new WeakMap),Be(this,"crossOriginIframeMirror",new Ch(gt)),Be(this,"crossOriginIframeStyleMirror"),Be(this,"crossOriginIframeRootIdMap",new WeakMap),Be(this,"mirror"),Be(this,"mutationCb"),Be(this,"wrappedEmit"),Be(this,"loadListener"),Be(this,"stylesheetManager"),Be(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ch(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 s,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(s=e.contentWindow)||s.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.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 s=this.crossOriginIframeMap.get(e.source);if(!s)return;const r=this.transformCrossOriginEvent(s,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){var s;switch(t.type){case Gc.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(t.data.node,s),{timestamp:t.timestamp,type:Gc.IncrementalSnapshot,data:{source:Zc.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Gc.Meta:case Gc.Load:case Gc.DomContentLoaded:return!1;case Gc.Plugin:return t;case Gc.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Gc.IncrementalSnapshot:switch(t.data.source){case Zc.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const s=this.crossOriginIframeRootIdMap.get(e);s&&this.patchRootIdOnNode(t.node,s)}),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 Zc.Drag:case Zc.TouchMove:case Zc.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Zc.ViewportResize:return!1;case Zc.MediaInteraction:case Zc.MouseInteraction:case Zc.Scroll:case Zc.CanvasMutation:case Zc.Input:return this.replaceIds(t.data,e,["id"]),t;case Zc.StyleSheetRule:case Zc.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Zc.Font:return t;case Zc.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case Zc.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(s=t.data.styles)||s.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,s,r){for(const n of r)(Array.isArray(t[n])||"number"==typeof t[n])&&(Array.isArray(t[n])?t[n]=e.getIds(s,t[n]):t[n]=e.getId(s,t[n]));return t}replaceIds(e,t,s){return this.replace(this.crossOriginIframeMirror,e,t,s)}replaceStyleIds(e,t,s){return this.replace(this.crossOriginIframeStyleMirror,e,t,s)}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===$c.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class kh{constructor(e){Be(this,"shadowDoms",new WeakSet),Be(this,"mutationCb"),Be(this,"scrollCb"),Be(this,"bypassOptions"),Be(this,"mirror"),Be(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(!qe(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const s=hh({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(ph({...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(Sc.host(e))),this.restoreHandlers.push(yh({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 s=this;this.restoreHandlers.push(Ec(e.prototype,"attachShadow",function(e){return function(r){const n=e.call(this,r),i=Sc.shadowRoot(this);return i&&Yc(this)&&s.addShadowRoot(i,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Ih="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xh="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Oh=0;Oh<64;Oh++)xh[Ih.charCodeAt(Oh)]=Oh;const Ah=new Map;const Eh=(e,t,s)=>{if(!e||!Nh(e,t)&&"object"!=typeof e)return;const r=function(e,t){let s=Ah.get(e);return s||(s=new Map,Ah.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}(s,e.constructor.name);let n=r.indexOf(e);return-1===n&&(n=r.length,r.push(e)),n};function Rh(e,t,s){if(e instanceof Array)return e.map(e=>Rh(e,t,s));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,s=new Uint8Array(e),r=s.length,n="";for(t=0;t<r;t+=3)n+=Ih[s[t]>>2],n+=Ih[(3&s[t])<<4|s[t+1]>>4],n+=Ih[(15&s[t+1])<<2|s[t+2]>>6],n+=Ih[63&s[t+2]];return r%3==2?n=n.substring(0,n.length-1)+"=":r%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Rh(e.buffer,t,s),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:s}=e;return{rr_type:t,src:s}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Rh(e.data,t,s),e.width,e.height]}}if(Nh(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Eh(e,t,s)}}return e}const Mh=(e,t,s)=>e.map(e=>Rh(e,t,s)),Nh=(e,t)=>{const s=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(s.find(s=>e instanceof t[s]))};function Th(e,t,s,r){const n=[];try{const i=Ec(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(n,...i){if(!Pc(this,t,s,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(n);if("__context"in this||(this.__context=e),r&&["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.apply(this,[n,...i])}});n.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(e=>e())}}function _h(e,t,s,r,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=Ec(e,l,function(e){return function(...o){const a=e.apply(this,o);if(Eh(a,i,this),"tagName"in this.canvas&&!Pc(this.canvas,r,n,!0)){const e=Mh(o,i,this),r={type:t,property:l,args:e};s(this.canvas,r)}return a}});o.push(a)}catch{const r=Ac(e,l,{set(e){s(this.canvas,{type:t,property:l,args:[e],setter:!0})}});o.push(r)}return o}const Ph="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Lh="undefined"!=typeof window&&window.Blob&&new Blob([(Dh=Ph,Uint8Array.from(atob(Dh),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var Dh;function Bh(e){let t;try{if(t=Lh&&(window.URL||window.webkitURL).createObjectURL(Lh),!t)throw"";const s=new Worker(t,{name:null==e?void 0:e.name});return s.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),s}catch(s){return new Worker("data:text/javascript;base64,"+Ph,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Fh{constructor(e){Be(this,"pendingCanvasMutations",new Map),Be(this,"rafStamps",{latestId:0,invokeId:null}),Be(this,"mirror"),Be(this,"mutationCb"),Be(this,"resetObservers"),Be(this,"frozen",!1),Be(this,"locked",!1),Be(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:s,blockClass:r,blockSelector:n,recordCanvas:i,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(s,r,n),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,s,r,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,s,r,n){const i=Th(t,s,r,!0),o=new Map,a=new Bh;a.onmessage=e=>{const{id:t}=e.data;if(o.set(t,!1),!("base64"in e.data))return;const{base64:s,type:r,width:n,height:i}=e.data;this.mutationCb({id:t,type:Hc["2D"],commands:[{property:"clearRect",args:[0,0,n,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:r}]},0,0]}]})};const l=1e3/e;let c,h=0;const u=e=>{h&&e-h<l||(h=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{Pc(t,s,r,!0)||e.push(t)}),e})().forEach(async e=>{var t;const s=this.mirror.getId(e);if(o.get(s))return;if(0===e.width||0===e.height)return;if(o.set(s,!0),["webgl","webgl2"].includes(e.__context)){const s=e.getContext(e.__context);!1===(null==(t=null==s?void 0:s.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&s.clear(s.COLOR_BUFFER_BIT)}const r=await createImageBitmap(e);a.postMessage({id:s,bitmap:r,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[r])})),c=requestAnimationFrame(u)};c=requestAnimationFrame(u),this.resetObservers=()=>{i(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=Th(e,t,s,!1),n=function(e,t,s,r){const n=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])continue;const i=Ec(t.CanvasRenderingContext2D.prototype,o,function(n){return function(...i){return Pc(this.canvas,s,r,!0)||setTimeout(()=>{const s=Mh(i,t,this);e(this.canvas,{type:Hc["2D"],property:o,args:s})},0),n.apply(this,i)}});n.push(i)}catch{const s=Ac(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:Hc["2D"],property:o,args:[t],setter:!0})}});n.push(s)}return()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,s),i=function(e,t,s,r){const n=[];return n.push(..._h(t.WebGLRenderingContext.prototype,Hc.WebGL,e,s,r,t)),void 0!==t.WebGL2RenderingContext&&n.push(..._h(t.WebGL2RenderingContext.prototype,Hc.WebGL2,e,s,r,t)),()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,s);this.resetObservers=()=>{r(),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 s=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,s)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(e);if(!s||-1===t)return;const r=s.map(e=>{const{type:t,...s}=e;return s}),{type:n}=s[0];this.mutationCb({id:t,type:n,commands:r}),this.pendingCanvasMutations.delete(e)}}class Uh{constructor(e){Be(this,"trackedLinkElements",new WeakSet),Be(this,"mutationCb"),Be(this,"adoptedStyleSheetCb"),Be(this,"styleMirror",new zc),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 s={id:t,styleIds:[]},r=[];for(const n of e){let e;this.styleMirror.has(n)?e=this.styleMirror.getId(n):(e=this.styleMirror.add(n),r.push({styleId:e,rules:Array.from(n.rules||CSSRule,(e,t)=>({rule:et(e,n.href),index:t}))})),s.styleIds.push(e)}r.length>0&&(s.styles=r),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class jh{constructor(){Be(this,"nodeMap",new WeakMap),Be(this,"active",!1)}inOtherBuffer(e,t){const s=this.nodeMap.get(e);return s&&Array.from(s).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 zh,Vh,Wh,Yh=!1;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(Le=e.contentWindow)?void 0:Le.Array.from)||Array.from,document.body.removeChild(e)}}catch(qb){console.debug("Unable to override Array.from",qb)}const Gh=new tt;function Zh(e={}){const{emit:t,checkoutEveryNms:s,checkoutEveryNth:r,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:C=!0,recordCanvas:S=!1,recordCrossOriginIframes:k=!1,recordAfter:I=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:O=!1,inlineImages:A=!1,plugins:E,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:M=new Set([]),errorHandler:N}=e;oh=N;const T=!k||window.parent===window;let _=!1;if(!T)try{window.parent.document&&(_=!1)}catch(Z){_=!0}if(T&&!t)throw new Error("emit function is required");if(!T&&!_)return()=>{};void 0!==v&&void 0===w.mousemove&&(w.mousemove=v),Gh.reset();const P=!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},L=!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===d,headMetaDescKeywords:"all"===d,headTitleMutations:"all"===d}:d||{};let D;!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 B=0;const F=e=>{for(const t of E||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!_&&(e=y(e)),e};zh=(e,n)=>{var i;const o=e;if(o.timestamp=Rc(),!(null==(i=lh[0])?void 0:i.isFrozen())||o.type===Gc.FullSnapshot||o.type===Gc.IncrementalSnapshot&&o.data.source===Zc.Mutation||lh.forEach(e=>e.unfreeze()),T)null==t||t(F(o),n);else if(_){const e={type:"rrweb",event:F(o),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(o.type===Gc.FullSnapshot)D=o,B=0;else if(o.type===Gc.IncrementalSnapshot){if(o.data.source===Zc.Mutation&&o.data.isAttachIframe)return;B++;const e=r&&B>=r,t=s&&o.timestamp-D.timestamp>s;(e||t)&&Vh(!0)}};const U=e=>{zh({type:Gc.IncrementalSnapshot,data:{source:Zc.Mutation,...e}})},j=e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.Scroll,...e}}),z=e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.CanvasMutation,...e}}),V=new Uh({mutationCb:U,adoptedStyleSheetCb:e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.AdoptedStyleSheet,...e}})}),W=new Sh({mirror:Gh,mutationCb:U,stylesheetManager:V,recordCrossOriginIframes:k,wrappedEmit:zh});for(const X of E||[])X.getMirror&&X.getMirror({nodeMirror:Gh,crossOriginIframeMirror:W.crossOriginIframeMirror,crossOriginIframeStyleMirror:W.crossOriginIframeStyleMirror});const Y=new jh;Wh=new Fh({recordCanvas:S,mutationCb:z,win:window,blockClass:n,blockSelector:i,mirror:Gh,sampling:w.canvas,dataURLOptions:b});const G=new kh({mutationCb:U,scrollCb:j,bypassOptions:{blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskInputOptions:P,dataURLOptions:b,maskTextFn:m,maskInputFn:f,recordCanvas:S,inlineImages:A,sampling:w,slimDOMOptions:L,iframeManager:W,stylesheetManager:V,canvasManager:Wh,keepIframeSrcFn:R,processedNodeManager:Y},mirror:Gh});Vh=(e=!1)=>{if(!C)return;zh({type:Gc.Meta,data:{href:window.location.href,width:Tc(),height:Nc()}},e),V.reset(),G.init(),lh.forEach(e=>e.lock());const t=function(e,t){const{mirror:s=new tt,blockClass:r="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:C=()=>!1}=t||{};return Nt(e,{doc:e,mirror:s,blockClass:r,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:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:Gh,blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskAllInputs:P,maskTextFn:m,maskInputFn:f,slimDOM:L,dataURLOptions:b,recordCanvas:S,inlineImages:A,onSerialize:e=>{Fc(e,Gh)&&W.addIframe(e),Uc(e,Gh)&&V.trackLinkElement(e),jc(e)&&G.addShadowRoot(Sc.shadowRoot(e),document)},onIframeLoad:(e,t)=>{W.attachIframe(e,t),G.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:R});if(!t)return console.warn("Failed to snapshot the document");zh({type:Gc.FullSnapshot,data:{node:t,initialOffset:Mc(window)}},e),lh.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,Gh.getId(document))};try{const e=[],t=e=>{var t;return ah(wh)({mutationCb:U,mousemoveCb:(e,t)=>zh({type:Gc.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.MouseInteraction,...e}}),scrollCb:j,viewportResizeCb:e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.ViewportResize,...e}}),inputCb:e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.Input,...e}}),mediaInteractionCb:e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.MediaInteraction,...e}}),styleSheetRuleCb:e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.StyleSheetRule,...e}}),styleDeclarationCb:e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.StyleDeclaration,...e}}),canvasMutationCb:z,fontCb:e=>zh({type:Gc.IncrementalSnapshot,data:{source:Zc.Font,...e}}),selectionCb:e=>{zh({type:Gc.IncrementalSnapshot,data:{source:Zc.Selection,...e}})},customElementCb:e=>{zh({type:Gc.IncrementalSnapshot,data:{source:Zc.CustomElement,...e}})},blockClass:n,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:P,inlineStylesheet:h,sampling:w,recordDOM:C,recordCanvas:S,inlineImages:A,userTriggeredOnInput:x,collectFonts:O,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:R,blockSelector:i,slimDOMOptions:L,dataURLOptions:b,mirror:Gh,iframeManager:W,stylesheetManager:V,shadowDomManager:G,processedNodeManager:Y,canvasManager:Wh,ignoreCSSAttributes:M,plugins:(null==(t=null==E?void 0:E.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>zh({type:Gc.Plugin,data:{plugin:e.name,payload:t}})})))||[]},g)};W.addLoadListener(s=>{try{e.push(t(s.contentDocument))}catch(r){console.warn(r)}});const s=()=>{Vh(),e.push(t(document)),Yh=!0};return"interactive"===document.readyState||"complete"===document.readyState?s():(e.push(kc("DOMContentLoaded",()=>{zh({type:Gc.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&s()})),e.push(kc("load",()=>{zh({type:Gc.Load,data:{}}),"load"===I&&s()},window))),()=>{e.forEach(e=>e()),Y.destroy(),Yh=!1,oh=void 0}}catch(J){console.warn(J)}}var Jh,Xh;Zh.addCustomEvent=(e,t)=>{if(!Yh)throw new Error("please add custom event after start recording");zh({type:Gc.Custom,data:{tag:e,payload:t}})},Zh.freezePage=()=>{lh.forEach(e=>e.freeze())},Zh.takeFullSnapshot=e=>{if(!Yh)throw new Error("please take full snapshot after start recording");Vh(e)},Zh.mirror=Gh,(Xh=Jh||(Jh={}))[Xh.NotStarted=0]="NotStarted",Xh[Xh.Running=1]="Running",Xh[Xh.Stopped=2]="Stopped";const{addCustomEvent:Hh}=Zh,{freezePage:Kh}=Zh,{takeFullSnapshot:$h}=Zh;class qh extends Array{constructor(){super()}isEmpty(){return 0===this.length}isFull(){return 10===this.length}flush(){return this.splice(0,this.length)}}class Qh{constructor(e){t(this,"agent"),t(this,"eventBuffer"),this.agent=e,this.eventBuffer=new qh}start(){document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&this.send()})}handle(e){e.type===Gc.FullSnapshot&&this.eventBuffer.find(e=>e.type===Gc.FullSnapshot)||(this.eventBuffer.push(e),this.eventBuffer.isFull()&&this.send())}async send(){if(!this.eventBuffer.isEmpty()&&this.agent.sendEvents){const e=this.eventBuffer.flush();await this.agent.sendEvents(e)}}}var eu,tu=(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))(tu||{}),su=(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))(su||{}),ru=(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))(ru||{}),nu=Object.defineProperty,iu=(e,t,s)=>((e,t,s)=>t in e?nu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),ou=Object.defineProperty,au=(e,t,s)=>((e,t,s)=>t in e?ou(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),lu=Object.defineProperty,cu=(e,t,s)=>((e,t,s)=>t in e?lu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);const hu={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},uu={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},pu={};function du(e){if(pu[e])return pu[e];const t=globalThis[e],s=t.prototype,r=e in hu?hu[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in uu?uu[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return pu[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?pu[e]=i:s}catch{return s}}const fu={};function mu(e,t,s){var r;const n=`${e}.${String(s)}`;if(fu[n])return fu[n].call(t);const i=du(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(fu[n]=o,o.call(t)):t[s]}const gu={};function yu(e,t,s){const r=`${e}.${String(s)}`;if(gu[r])return gu[r].bind(t);const n=du(e)[s];return"function"!=typeof n?t[s]:(gu[r]=n,n.bind(t))}const wu={childNodes:function(e){return mu("Node",e,"childNodes")},parentNode:function(e){return mu("Node",e,"parentNode")},parentElement:function(e){return mu("Node",e,"parentElement")},textContent:function(e){return mu("Node",e,"textContent")},contains:function(e,t){return yu("Node",e,"contains")(t)},getRootNode:function(e){return yu("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?mu("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?mu("Element",e,"shadowRoot"):null},querySelector:function(e,t){return mu("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return mu("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return du("MutationObserver").constructor}};class bu{constructor(){cu(this,"idNodeMap",new Map),cu(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-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){const s=t.id;this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t)}replace(e,t){const s=this.getNode(e);if(s){const e=this.nodeMetaMap.get(s);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function vu(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!s&&vu(wu.parentNode(e),t,s);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!s&&vu(wu.parentNode(e),t,s)}function Cu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Su(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var ku={exports:{}},Iu=String,xu=function(){return{isColorSupported:!1,reset:Iu,bold:Iu,dim:Iu,italic:Iu,underline:Iu,inverse:Iu,hidden:Iu,strikethrough:Iu,black:Iu,red:Iu,green:Iu,yellow:Iu,blue:Iu,magenta:Iu,cyan:Iu,white:Iu,gray:Iu,bgBlack:Iu,bgRed:Iu,bgGreen:Iu,bgYellow:Iu,bgBlue:Iu,bgMagenta:Iu,bgCyan:Iu,bgWhite:Iu}};ku.exports=xu(),ku.exports.createColors=xu;var Ou=ku.exports;const Au=Su(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Eu=Ou,Ru=Au,Mu=class e extends Error{constructor(t,s,r,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!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.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=Eu.isColorSupported),Ru&&e&&(t=Ru(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=Eu.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=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=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Nu=Mu;Mu.default=Mu;var Tu={};Tu.isClean=Symbol("isClean"),Tu.my=Symbol("my");const _u={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Pu=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return _u[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=_u[s]),i.rawCache[s]=r,r}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 s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}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(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.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(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.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 s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Lu=Pu;Pu.default=Pu;let Du=Lu;function Bu(e,t){new Du(t).stringify(e)}var Fu=Bu;Bu.default=Bu;let{isClean:Uu,my:ju}=Tu,zu=Nu,Vu=Lu,Wu=Fu;function Yu(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Yu(e,s)):("object"===i&&null!==n&&(n=Yu(n)),s[r]=n)}return s}let Gu=class{constructor(e={}){this.raws={},this[Uu]=!1,this[ju]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}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=Yu(this);for(let s in e)t[s]=e[s];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:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new zu(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Uu]){this[Uu]=!1;let e=this;for(;e=e.parent;)e[Uu]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,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},s=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 r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new Vu).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,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Wu){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var Zu=Gu;Gu.default=Gu;let Ju=Zu,Xu=class extends Ju{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Hu=Xu;Xu.default=Xu;var Ku={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:$u,SourceMapGenerator:qu}=Au,{existsSync:Qu,readFileSync:ep}=Au,{dirname:tp,join:sp}=Au;let rp=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=tp(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new $u(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").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}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 s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=tp(e),Qu(e))return this.mapFile=e,ep(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof $u)return qu.fromSourceMap(t).toString();if(t instanceof qu)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=sp(tp(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var np=rp;rp.default=rp;let{SourceMapConsumer:ip,SourceMapGenerator:op}=Au,{fileURLToPath:ap,pathToFileURL:lp}=Au,{isAbsolute:cp,resolve:hp}=Au,{nanoid:up}=Ku,pp=Au,dp=Nu,fp=np,mp=Symbol("fromOffsetCache"),gp=Boolean(ip&&op),yp=Boolean(hp&&cp),wp=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!yp||/^\w+:\/\//.test(t.from)||cp(t.from)?this.file=t.from:this.file=hp(t.from)),yp&&gp){let e=new fp(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 "+up(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new dp(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,r.plugin):new dp(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(lp&&(n.input.url=lp(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[mp])s=this[mp];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[mp]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:hp(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){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 s&&(n=o.originalPositionFor({column:r,line:s})),i=cp(a.source)?lp(a.source):new URL(a.source,this.map.consumer().sourceRoot||lp(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!ap)throw new Error("file: protocol is not available in this PostCSS build");l.file=ap(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 bp=wp;wp.default=wp,pp&&pp.registerInput&&pp.registerInput(wp);let{SourceMapConsumer:vp,SourceMapGenerator:Cp}=Au,{dirname:Sp,relative:kp,resolve:Ip,sep:xp}=Au,{pathToFileURL:Op}=Au,Ap=bp,Ep=Boolean(vp&&Cp),Rp=Boolean(Sp&&Ip&&kp&&xp);var Mp=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,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.toString()):"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,s=this.toUrl(this.path(e.file)),r=e.root||Sp(e.file);!1===this.mapOpts.sourcesContent?(t=new vp(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}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(),Rp&&Ep&&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=Cp.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Cp({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 Cp({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=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=s,i.generated.column=r-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?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=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=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-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 s=this.opts.to?Sp(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=Sp(Ip(s,this.mapOpts.annotation)));let r=kp(s,e);return this.memoizedPaths.set(e,r),r}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 Ap(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,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(Op){let t=Op(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===xp&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let Np=Zu,Tp=class extends Np{constructor(e){super(e),this.type="comment"}};var _p=Tp;Tp.default=Tp;let Pp,Lp,Dp,Bp,{isClean:Fp,my:Up}=Tu,jp=Hu,zp=_p,Vp=Zu;function Wp(e){return e.map(e=>(e.nodes&&(e.nodes=Wp(e.nodes)),delete e.source,e))}function Yp(e){if(e[Fp]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Yp(t)}let Gp=class e extends Vp{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,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}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")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(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,s)=>(e[t]===s||(e[t]=s,"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 s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=Wp(Pp(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 new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new jp(t)]}else if(t.selector)t=[new Lp(t)];else if(t.name)t=[new Dp(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new zp(t)]}return t.map(t=>(t[Up]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Fp]&&Yp(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.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 s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}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]}};Gp.registerParse=e=>{Pp=e},Gp.registerRule=e=>{Lp=e},Gp.registerAtRule=e=>{Dp=e},Gp.registerRoot=e=>{Bp=e};var Zp=Gp;Gp.default=Gp,Gp.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Dp.prototype):"rule"===e.type?Object.setPrototypeOf(e,Lp.prototype):"decl"===e.type?Object.setPrototypeOf(e,jp.prototype):"comment"===e.type?Object.setPrototypeOf(e,zp.prototype):"root"===e.type&&Object.setPrototypeOf(e,Bp.prototype),e[Up]=!0,e.nodes&&e.nodes.forEach(e=>{Gp.rebuild(e)})};let Jp,Xp,Hp=Zp,Kp=class extends Hp{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Jp(new Xp,this,e).stringify()}};Kp.registerLazyResult=e=>{Jp=e},Kp.registerProcessor=e=>{Xp=e};var $p=Kp;Kp.default=Kp;let qp={};var Qp=function(e){qp[e]||(qp[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let ed=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 s in t)this[s]=t[s]}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 td=ed;ed.default=ed;let sd=td,rd=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new sd(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var nd=rd;rd.default=rd;const id="'".charCodeAt(0),od='"'.charCodeAt(0),ad="\\".charCodeAt(0),ld="/".charCodeAt(0),cd="\n".charCodeAt(0),hd=" ".charCodeAt(0),ud="\f".charCodeAt(0),pd="\t".charCodeAt(0),dd="\r".charCodeAt(0),fd="[".charCodeAt(0),md="]".charCodeAt(0),gd="(".charCodeAt(0),yd=")".charCodeAt(0),wd="{".charCodeAt(0),bd="}".charCodeAt(0),vd=";".charCodeAt(0),Cd="*".charCodeAt(0),Sd=":".charCodeAt(0),kd="@".charCodeAt(0),Id=/[\t\n\f\r "#'()/;[\\\]{}]/g,xd=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Od=/.[\r\n"'(/\\]/,Ad=/[\da-f]/i;let Ed=Zp,Rd=class extends Ed{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 Md=Rd;Rd.default=Rd,Ed.registerAtRule(Rd);let Nd,Td,_d=Zp,Pd=class extends _d{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new Nd(new Td,this,e).stringify()}};Pd.registerLazyResult=e=>{Nd=e},Pd.registerProcessor=e=>{Td=e};var Ld=Pd;Pd.default=Pd,_d.registerRoot(Pd);let Dd={comma:e=>Dd.split(e,[","],!0),space:e=>Dd.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Bd=Dd;Dd.default=Dd;let Fd=Zp,Ud=Bd,jd=class extends Fd{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ud.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var zd=jd;jd.default=jd,Fd.registerRule(jd);let Vd=Hu,Wd=function(e,t={}){let s,r,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(s=p.charCodeAt(m),s){case cd:case hd:case pd:case dd:case ud:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===hd||s===cd||s===pd||s===dd||s===ud);u=["space",p.slice(m,r)],m=r-1;break;case fd:case md:case wd:case bd:case Sd:case vd:case yd:{let e=String.fromCharCode(s);u=[e,e,m];break}case gd:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==id&&h!==od&&h!==hd&&h!==cd&&h!==pd&&h!==ud&&h!==dd){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===ad;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||Od.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case id:case od:n=s===id?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===ad;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case kd:Id.lastIndex=m+1,Id.test(p),r=0===Id.lastIndex?p.length-1:Id.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case ad:for(r=m,o=!0;p.charCodeAt(r+1)===ad;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==ld&&s!==hd&&s!==cd&&s!==pd&&s!==dd&&s!==ud&&(r+=1,Ad.test(p.charAt(r)))){for(;Ad.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===hd&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===ld&&p.charCodeAt(m+1)===Cd?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(xd.lastIndex=m+1,xd.test(p),r=0===xd.lastIndex?p.length-1:xd.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Yd=_p,Gd=Md,Zd=Ld,Jd=zd;const Xd={empty:!0,space:!0};let Hd=Zp,Kd=class{constructor(e){this.input=e,this.root=new Zd,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,s,r,n=new Gd;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(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[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&&(e=a[a.length-1],n.source.end=this.getPosition(e[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 s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Yd;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Wd(this.input)}decl(e,t){let s=new Vd;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.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 a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.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 Jd;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,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===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&&r){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,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",Xd[a]||Xd[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Jd;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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})}},$d=bp;function qd(e,t){let s=new $d(e,t),r=new Kd(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var Qd=qd;qd.default=qd,Hd.registerParse(qd);let{isClean:ef,my:tf}=Tu,sf=Mp,rf=Fu,nf=Zp,of=$p,af=Qp,lf=nd,cf=Qd,hf=Ld;const uf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},pf={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},df={Once:!0,postcssPlugin:!0,prepare:!0};function ff(e){return"object"==typeof e&&"function"==typeof e.then}function mf(e){let t=!1,s=uf[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function gf(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:mf(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function yf(e){return e[ef]=!1,e.nodes&&e.nodes.forEach(e=>yf(e)),e}let wf={},bf=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof lf)n=yf(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=cf;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[tf]&&nf.rebuild(n)}else n=yf(s);this.result=new lf(t,n,r),this.helpers={...wf,postcss:wf,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 new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(qb){console&&console.error&&console.error(qb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!pf[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!df[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(ff(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ef];){e[ef]=!0;let s=[gf(e)];for(;s.length>0;){let e=this.visitTick(s);if(ff(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;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(t){throw this.handleError(t)}}}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 ff(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(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=rf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new sf(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(ff(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ef];)e[ef]=!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"production"!==process.env.NODE_ENV&&("from"in this.opts||af("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(ff(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[ef])return r[ef]=!0,void e.push(gf(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[ef]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[ef]=!0;let t=mf(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[ef]||this.walkSync(e)});else{let t=this.listeners[s];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"}};bf.registerPostcss=e=>{wf=e};var vf=bf;bf.default=bf,hf.registerLazyResult(bf),of.registerLazyResult(bf);let Cf=Mp,Sf=Fu,kf=Qp,If=Qd;const xf=nd;let Of=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=Sf;this.result=new xf(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Cf(n,r,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"production"!==process.env.NODE_ENV&&("from"in this._opts||kf("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=If;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Af=Of;Of.default=Of;let Ef=Af,Rf=vf,Mf=$p,Nf=Ld,Tf=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Rf(this,e,t):new Ef(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var _f=Tf;Tf.default=Tf,Nf.registerProcessor(Tf),Mf.registerProcessor(Tf);let Pf=Hu,Lf=np,Df=_p,Bf=Md,Ff=bp,Uf=Ld,jf=zd;function zf(e,t){if(Array.isArray(e))return e.map(e=>zf(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Ff.prototype};s.map&&(s.map={...s.map,__proto__:Lf.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>zf(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Uf(r);if("decl"===r.type)return new Pf(r);if("rule"===r.type)return new jf(r);if("comment"===r.type)return new Df(r);if("atrule"===r.type)return new Bf(r);throw new Error("Unknown node type: "+e.type)}var Vf=zf;zf.default=zf;let Wf=Nu,Yf=Hu,Gf=vf,Zf=Zp,Jf=_f,Xf=Fu,Hf=Vf,Kf=$p,$f=td,qf=_p,Qf=Md,em=nd,tm=bp,sm=Qd,rm=Bd,nm=zd,im=Ld,om=Zu;function am(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Jf(e)}am.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!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(...s);return n.postcssPlugin=e,n.postcssVersion=(new Jf).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return am([n(s)]).process(e,t)},n},am.stringify=Xf,am.parse=sm,am.fromJSON=Hf,am.list=rm,am.comment=e=>new qf(e),am.atRule=e=>new Qf(e),am.decl=e=>new Yf(e),am.rule=e=>new nm(e),am.root=e=>new im(e),am.document=e=>new Kf(e),am.CssSyntaxError=Wf,am.Declaration=Yf,am.Container=Zf,am.Processor=Jf,am.Document=Kf,am.Comment=qf,am.Warning=$f,am.AtRule=Qf,am.Result=em,am.Input=tm,am.Rule=nm,am.Root=im,am.Node=om,Gf.registerPostcss(am);var lm=am;am.default=am;const cm=Cu(lm);cm.stringify,cm.fromJSON,cm.plugin,cm.parse,cm.list,cm.document,cm.comment,cm.atRule,cm.rule,cm.decl,cm.root,cm.CssSyntaxError,cm.Declaration,cm.Container,cm.Processor,cm.Document,cm.Comment,cm.Warning,cm.AtRule,cm.Result,cm.Input,cm.Rule,cm.Root,cm.Node;var hm=Object.defineProperty,um=(e,t,s)=>((e,t,s)=>t in e?hm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);function pm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function dm(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var fm={exports:{}},mm=String,gm=function(){return{isColorSupported:!1,reset:mm,bold:mm,dim:mm,italic:mm,underline:mm,inverse:mm,hidden:mm,strikethrough:mm,black:mm,red:mm,green:mm,yellow:mm,blue:mm,magenta:mm,cyan:mm,white:mm,gray:mm,bgBlack:mm,bgRed:mm,bgGreen:mm,bgYellow:mm,bgBlue:mm,bgMagenta:mm,bgCyan:mm,bgWhite:mm}};fm.exports=gm(),fm.exports.createColors=gm;var ym=fm.exports;const wm=dm(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let bm=ym,vm=wm,Cm=class e extends Error{constructor(t,s,r,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!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.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=bm.isColorSupported),vm&&e&&(t=vm(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=bm.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=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=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Sm=Cm;Cm.default=Cm;var km={};km.isClean=Symbol("isClean"),km.my=Symbol("my");const Im={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let xm=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Im[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Im[s]),i.rawCache[s]=r,r}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 s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}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(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.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(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.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 s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Om=xm;xm.default=xm;let Am=Om;function Em(e,t){new Am(t).stringify(e)}var Rm=Em;Em.default=Em;let{isClean:Mm,my:Nm}=km,Tm=Sm,_m=Om,Pm=Rm;function Lm(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Lm(e,s)):("object"===i&&null!==n&&(n=Lm(n)),s[r]=n)}return s}let Dm=class{constructor(e={}){this.raws={},this[Mm]=!1,this[Nm]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}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=Lm(this);for(let s in e)t[s]=e[s];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:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Tm(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Mm]){this[Mm]=!1;let e=this;for(;e=e.parent;)e[Mm]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,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},s=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 r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new _m).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,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Pm){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var Bm=Dm;Dm.default=Dm;let Fm=Bm,Um=class extends Fm{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var jm=Um;Um.default=Um;var zm={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Vm,SourceMapGenerator:Wm}=wm,{existsSync:Ym,readFileSync:Gm}=wm,{dirname:Zm,join:Jm}=wm;let Xm=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Zm(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Vm(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").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}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 s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=Zm(e),Ym(e))return this.mapFile=e,Gm(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Vm)return Wm.fromSourceMap(t).toString();if(t instanceof Wm)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Jm(Zm(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Hm=Xm;Xm.default=Xm;let{SourceMapConsumer:Km,SourceMapGenerator:$m}=wm,{fileURLToPath:qm,pathToFileURL:Qm}=wm,{isAbsolute:eg,resolve:tg}=wm,{nanoid:sg}=zm,rg=wm,ng=Sm,ig=Hm,og=Symbol("fromOffsetCache"),ag=Boolean(Km&&$m),lg=Boolean(tg&&eg),cg=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!lg||/^\w+:\/\//.test(t.from)||eg(t.from)?this.file=t.from:this.file=tg(t.from)),lg&&ag){let e=new ig(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 "+sg(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new ng(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,r.plugin):new ng(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(Qm&&(n.input.url=Qm(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[og])s=this[og];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[og]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:tg(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){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 s&&(n=o.originalPositionFor({column:r,line:s})),i=eg(a.source)?Qm(a.source):new URL(a.source,this.map.consumer().sourceRoot||Qm(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!qm)throw new Error("file: protocol is not available in this PostCSS build");l.file=qm(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 hg=cg;cg.default=cg,rg&&rg.registerInput&&rg.registerInput(cg);let{SourceMapConsumer:ug,SourceMapGenerator:pg}=wm,{dirname:dg,relative:fg,resolve:mg,sep:gg}=wm,{pathToFileURL:yg}=wm,wg=hg,bg=Boolean(ug&&pg),vg=Boolean(dg&&mg&&fg&&gg);var Cg=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,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.toString()):"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,s=this.toUrl(this.path(e.file)),r=e.root||dg(e.file);!1===this.mapOpts.sourcesContent?(t=new ug(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}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(),vg&&bg&&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=pg.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new pg({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 pg({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=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=s,i.generated.column=r-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?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=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=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-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 s=this.opts.to?dg(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=dg(mg(s,this.mapOpts.annotation)));let r=fg(s,e);return this.memoizedPaths.set(e,r),r}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 wg(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,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(yg){let t=yg(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===gg&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let Sg=Bm,kg=class extends Sg{constructor(e){super(e),this.type="comment"}};var Ig=kg;kg.default=kg;let xg,Og,Ag,Eg,{isClean:Rg,my:Mg}=km,Ng=jm,Tg=Ig,_g=Bm;function Pg(e){return e.map(e=>(e.nodes&&(e.nodes=Pg(e.nodes)),delete e.source,e))}function Lg(e){if(e[Rg]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Lg(t)}let Dg=class e extends _g{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,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}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")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(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,s)=>(e[t]===s||(e[t]=s,"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 s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=Pg(xg(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 new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Ng(t)]}else if(t.selector)t=[new Og(t)];else if(t.name)t=[new Ag(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Tg(t)]}return t.map(t=>(t[Mg]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Rg]&&Lg(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.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 s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}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]}};Dg.registerParse=e=>{xg=e},Dg.registerRule=e=>{Og=e},Dg.registerAtRule=e=>{Ag=e},Dg.registerRoot=e=>{Eg=e};var Bg=Dg;Dg.default=Dg,Dg.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Ag.prototype):"rule"===e.type?Object.setPrototypeOf(e,Og.prototype):"decl"===e.type?Object.setPrototypeOf(e,Ng.prototype):"comment"===e.type?Object.setPrototypeOf(e,Tg.prototype):"root"===e.type&&Object.setPrototypeOf(e,Eg.prototype),e[Mg]=!0,e.nodes&&e.nodes.forEach(e=>{Dg.rebuild(e)})};let Fg,Ug,jg=Bg,zg=class extends jg{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Fg(new Ug,this,e).stringify()}};zg.registerLazyResult=e=>{Fg=e},zg.registerProcessor=e=>{Ug=e};var Vg=zg;zg.default=zg;let Wg={};var Yg=function(e){Wg[e]||(Wg[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Gg=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 s in t)this[s]=t[s]}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 Zg=Gg;Gg.default=Gg;let Jg=Zg,Xg=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new Jg(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Hg=Xg;Xg.default=Xg;const Kg="'".charCodeAt(0),$g='"'.charCodeAt(0),qg="\\".charCodeAt(0),Qg="/".charCodeAt(0),ey="\n".charCodeAt(0),ty=" ".charCodeAt(0),sy="\f".charCodeAt(0),ry="\t".charCodeAt(0),ny="\r".charCodeAt(0),iy="[".charCodeAt(0),oy="]".charCodeAt(0),ay="(".charCodeAt(0),ly=")".charCodeAt(0),cy="{".charCodeAt(0),hy="}".charCodeAt(0),uy=";".charCodeAt(0),py="*".charCodeAt(0),dy=":".charCodeAt(0),fy="@".charCodeAt(0),my=/[\t\n\f\r "#'()/;[\\\]{}]/g,gy=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,yy=/.[\r\n"'(/\\]/,wy=/[\da-f]/i;let by=Bg,vy=class extends by{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 Cy=vy;vy.default=vy,by.registerAtRule(vy);let Sy,ky,Iy=Bg,xy=class extends Iy{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new Sy(new ky,this,e).stringify()}};xy.registerLazyResult=e=>{Sy=e},xy.registerProcessor=e=>{ky=e};var Oy=xy;xy.default=xy,Iy.registerRoot(xy);let Ay={comma:e=>Ay.split(e,[","],!0),space:e=>Ay.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Ey=Ay;Ay.default=Ay;let Ry=Bg,My=Ey,Ny=class extends Ry{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return My.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Ty=Ny;Ny.default=Ny,Ry.registerRule(Ny);let _y=jm,Py=function(e,t={}){let s,r,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(s=p.charCodeAt(m),s){case ey:case ty:case ry:case ny:case sy:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===ty||s===ey||s===ry||s===ny||s===sy);u=["space",p.slice(m,r)],m=r-1;break;case iy:case oy:case cy:case hy:case dy:case uy:case ly:{let e=String.fromCharCode(s);u=[e,e,m];break}case ay:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==Kg&&h!==$g&&h!==ty&&h!==ey&&h!==ry&&h!==sy&&h!==ny){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===qg;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||yy.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case Kg:case $g:n=s===Kg?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===qg;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case fy:my.lastIndex=m+1,my.test(p),r=0===my.lastIndex?p.length-1:my.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case qg:for(r=m,o=!0;p.charCodeAt(r+1)===qg;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==Qg&&s!==ty&&s!==ey&&s!==ry&&s!==ny&&s!==sy&&(r+=1,wy.test(p.charAt(r)))){for(;wy.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===ty&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===Qg&&p.charCodeAt(m+1)===py?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(gy.lastIndex=m+1,gy.test(p),r=0===gy.lastIndex?p.length-1:gy.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Ly=Ig,Dy=Cy,By=Oy,Fy=Ty;const Uy={empty:!0,space:!0};let jy=Bg,zy=class{constructor(e){this.input=e,this.root=new By,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,s,r,n=new Dy;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(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[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&&(e=a[a.length-1],n.source.end=this.getPosition(e[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 s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Ly;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Py(this.input)}decl(e,t){let s=new _y;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.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 a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.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 Fy;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,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===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&&r){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,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",Uy[a]||Uy[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Fy;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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})}},Vy=hg;function Wy(e,t){let s=new Vy(e,t),r=new zy(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var Yy=Wy;Wy.default=Wy,jy.registerParse(Wy);let{isClean:Gy,my:Zy}=km,Jy=Cg,Xy=Rm,Hy=Bg,Ky=Vg,$y=Yg,qy=Hg,Qy=Yy,ew=Oy;const tw={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},sw={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},rw={Once:!0,postcssPlugin:!0,prepare:!0};function nw(e){return"object"==typeof e&&"function"==typeof e.then}function iw(e){let t=!1,s=tw[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function ow(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:iw(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function aw(e){return e[Gy]=!1,e.nodes&&e.nodes.forEach(e=>aw(e)),e}let lw={},cw=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof qy)n=aw(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=Qy;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[Zy]&&Hy.rebuild(n)}else n=aw(s);this.result=new qy(t,n,r),this.helpers={...lw,postcss:lw,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 new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(qb){console&&console.error&&console.error(qb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!sw[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!rw[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(nw(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Gy];){e[Gy]=!0;let s=[ow(e)];for(;s.length>0;){let e=this.visitTick(s);if(nw(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;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(t){throw this.handleError(t)}}}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 nw(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(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Xy;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Jy(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(nw(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Gy];)e[Gy]=!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"production"!==process.env.NODE_ENV&&("from"in this.opts||$y("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(nw(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[Gy])return r[Gy]=!0,void e.push(ow(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[Gy]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Gy]=!0;let t=iw(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[Gy]||this.walkSync(e)});else{let t=this.listeners[s];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"}};cw.registerPostcss=e=>{lw=e};var hw=cw;cw.default=cw,ew.registerLazyResult(cw),Ky.registerLazyResult(cw);let uw=Cg,pw=Rm,dw=Yg,fw=Yy;const mw=Hg;let gw=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=pw;this.result=new mw(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new uw(n,r,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"production"!==process.env.NODE_ENV&&("from"in this._opts||dw("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=fw;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var yw=gw;gw.default=gw;let ww=yw,bw=hw,vw=Vg,Cw=Oy,Sw=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new bw(this,e,t):new ww(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var kw=Sw;Sw.default=Sw,Cw.registerProcessor(Sw),vw.registerProcessor(Sw);let Iw=jm,xw=Hm,Ow=Ig,Aw=Cy,Ew=hg,Rw=Oy,Mw=Ty;function Nw(e,t){if(Array.isArray(e))return e.map(e=>Nw(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Ew.prototype};s.map&&(s.map={...s.map,__proto__:xw.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>Nw(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Rw(r);if("decl"===r.type)return new Iw(r);if("rule"===r.type)return new Mw(r);if("comment"===r.type)return new Ow(r);if("atrule"===r.type)return new Aw(r);throw new Error("Unknown node type: "+e.type)}var Tw=Nw;Nw.default=Nw;let _w=Sm,Pw=jm,Lw=hw,Dw=Bg,Bw=kw,Fw=Rm,Uw=Tw,jw=Vg,zw=Zg,Vw=Ig,Ww=Cy,Yw=Hg,Gw=hg,Zw=Yy,Jw=Ey,Xw=Ty,Hw=Oy,Kw=Bm;function $w(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Bw(e)}$w.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!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(...s);return n.postcssPlugin=e,n.postcssVersion=(new Bw).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return $w([n(s)]).process(e,t)},n},$w.stringify=Fw,$w.parse=Zw,$w.fromJSON=Uw,$w.list=Jw,$w.comment=e=>new Vw(e),$w.atRule=e=>new Ww(e),$w.decl=e=>new Pw(e),$w.rule=e=>new Xw(e),$w.root=e=>new Hw(e),$w.document=e=>new jw(e),$w.CssSyntaxError=_w,$w.Declaration=Pw,$w.Container=Dw,$w.Processor=Bw,$w.Document=jw,$w.Comment=Vw,$w.Warning=zw,$w.AtRule=Ww,$w.Result=Yw,$w.Input=Gw,$w.Rule=Xw,$w.Root=Hw,$w.Node=Kw,Lw.registerPostcss($w);var qw=$w;$w.default=$w;const Qw=pm(qw);Qw.stringify,Qw.fromJSON,Qw.plugin,Qw.parse,Qw.list,Qw.document,Qw.comment,Qw.atRule,Qw.rule,Qw.decl,Qw.root,Qw.CssSyntaxError,Qw.Declaration,Qw.Container,Qw.Processor,Qw.Document,Qw.Comment,Qw.Warning,Qw.AtRule,Qw.Result,Qw.Input,Qw.Rule,Qw.Root,Qw.Node;class eb{constructor(...e){um(this,"parentElement",null),um(this,"parentNode",null),um(this,"ownerDocument"),um(this,"firstChild",null),um(this,"lastChild",null),um(this,"previousSibling",null),um(this,"nextSibling",null),um(this,"ELEMENT_NODE",1),um(this,"TEXT_NODE",3),um(this,"nodeType"),um(this,"nodeName"),um(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 eb))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 new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const tb={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},sb={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},rb={};function nb(e){if(rb[e])return rb[e];const t=globalThis[e],s=t.prototype,r=e in tb?tb[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in sb?sb[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return rb[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?rb[e]=i:s}catch{return s}}const ib={};function ob(e,t,s){var r;const n=`${e}.${String(s)}`;if(ib[n])return ib[n].call(t);const i=nb(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(ib[n]=o,o.call(t)):t[s]}const ab={};function lb(e,t,s){const r=`${e}.${String(s)}`;if(ab[r])return ab[r].bind(t);const n=nb(e)[s];return"function"!=typeof n?t[s]:(ab[r]=n,n.bind(t))}const cb={childNodes:function(e){return ob("Node",e,"childNodes")},parentNode:function(e){return ob("Node",e,"parentNode")},parentElement:function(e){return ob("Node",e,"parentElement")},textContent:function(e){return ob("Node",e,"textContent")},contains:function(e,t){return lb("Node",e,"contains")(t)},getRootNode:function(e){return lb("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?ob("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?ob("Element",e,"shadowRoot"):null},querySelector:function(e,t){return ob("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return ob("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return nb("MutationObserver").constructor}};const hb="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 ub={map:{},getId:()=>(console.error(hb),-1),getNode:()=>(console.error(hb),null),removeNodeFromMap(){console.error(hb)},has:()=>(console.error(hb),!1),reset(){console.error(hb)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ub=new Proxy(ub,{get:(e,t,s)=>("map"===t&&console.error(hb),Reflect.get(e,t,s))}));let pb=Date.now;function db(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:cb.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(pb=()=>(new Date).getTime());function fb(e){var t;let s=null;return"getRootNode"in e&&(null==(t=cb.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&cb.host(cb.getRootNode(e))&&(s=cb.host(cb.getRootNode(e))),s}function mb(e){let t,s=e;for(;t=fb(s);)s=t;return s}function gb(e){const t=e.ownerDocument;if(!t)return!1;const s=mb(e);return cb.contains(t,s)}const yb=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){au(this,"id",1),au(this,"styleIDMap",new WeakMap),au(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 s;return s=void 0===t?this.id++:t,this.styleIDMap.set(e,s),this.idStyleMap.set(s,e),s}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return ub},closestElementOfNode:db,getBaseDimension:function e(t,s){var r,n;const i=null==(n=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:n.frameElement;if(!i||i===s)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),a=e(i,s),l=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,s){const r=t[s[0]];return 1===s.length?r:e(r.cssRules[s[1]].cssRules,s.slice(2))},getPositionsAndIndex:function(e){const t=[...e],s=t.pop();return{positions:t,index:s}},getRootShadowHost:mb,getShadowHost:fb,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,s,r,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=cb.parentElement(i.body))?void 0:t.scrollLeft)||(null==(s=null==i?void 0:i.body)?void 0:s.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==(r=cb.parentElement(i.body))?void 0:r.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof eb&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(cb.shadowRoot(e)))},hookSetter:function e(t,s,r,n,i=window){const o=i.Object.getOwnPropertyDescriptor(t,s);return i.Object.defineProperty(t,s,n?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>e(t,s,o||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(cb.contains(t,e)||gb(e))},isAncestorRemoved:function e(t,s){if(function(e){const t=e&&"host"in e&&"mode"in e&&wu.host(e)||null;return Boolean(t&&"shadowRoot"in t&&wu.shadowRoot(t)===e)}(t))return!1;const r=s.getId(t);if(!s.has(r))return!0;const n=cb.parentNode(t);return(!n||n.nodeType!==t.DOCUMENT_NODE)&&(!n||e(n,s))},isBlocked:function(e,t,s,r){if(!e)return!1;const n=db(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(r&&null!==n.closest("."+t))return!0}else if(vu(n,t,r))return!0}catch(i){}if(s){if(n.matches(s))return!0;if(r&&null!==n.closest(s))return!0}return!1},isIgnored:function(e,t,s){return!("TITLE"!==e.tagName||!s.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,s){s(t.value);for(let r=t.children.length-1;r>=0;r--)e(t.children[r],s)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return pb},on:function(e,t,s=document){const r={capture:!0,passive:!0};return s.addEventListener(e,t,r),()=>s.removeEventListener(e,t,r)},patch:function(e,t,s){try{if(!(t in e))return()=>{};const r=e[t],n=s(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=n,()=>{e[t]=r}}catch{return()=>{}}},polyfill: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)},queueToResolveTrees:function(e){const t={},s=(e,s)=>{const r={value:e,parent:s,children:[]};return t[e.node.id]=r,r},r=[];for(const n of e){const{nextId:e,parentId:i}=n;if(e&&e in t){const i=t[e];if(i.parent){const e=i.parent.children.indexOf(i);i.parent.children.splice(e,0,s(n,i.parent))}else{const e=r.indexOf(i);r.splice(e,0,s(n,null))}}else if(i in t){const e=t[i];e.children.push(s(n,e))}else r.push(s(n,null))}return r},shadowHostInDom:gb,throttle:function(e,t,s={}){let r=null,n=0;return function(...i){const o=Date.now();n||!1!==s.leading||(n=o);const a=t-(o-n),l=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),n=o,e.apply(l,i)):r||!1===s.trailing||(r=setTimeout(()=>{n=!1===s.leading?0:Date.now(),r=null,e.apply(l,i)},a))}},uniqueTextMutations:function(e){const t=new Set,s=[];for(let r=e.length;r--;){const n=e[r];t.has(n.id)||(s.push(n),t.add(n.id))}return s}},Symbol.toStringTag,{value:"Module"}));for(var wb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bb="undefined"==typeof Uint8Array?[]:new Uint8Array(256),vb=0;vb<64;vb++)bb[wb.charCodeAt(vb)]=vb;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),e=>e.charCodeAt(0)))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(eu=e.contentWindow)?void 0:eu.Array.from)||Array.from,document.body.removeChild(e)}}catch(qb){console.debug("Unable to override Array.from",qb)}var Cb;new bu,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Cb||(Cb={}));class Sb{constructor(e){iu(this,"fileName"),iu(this,"functionName"),iu(this,"lineNumber"),iu(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}const kb=/(^|@)\S+:\d+/,Ib=/^\s*at .*(\S+:\d+|\(native\))/m,xb=/^(eval@)?(\[native code])?$/,Ob={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Ib)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Ib)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(");const s=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=s?t.replace(s[0],""):t;const r=t.split(/\s+/).slice(1),n=this.extractLocation(s?s[1]:r.pop()),i=r.join(" ")||void 0,o=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new Sb({functionName:i,fileName:o,lineNumber:n[1],columnNumber:n[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(xb)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Sb({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,s=e.match(t),r=s&&s[1]?s[1]:void 0,n=this.extractLocation(e.replace(t,""));return new Sb({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){const t=/Line (\d+).*script (?:in )?(\S+)/i,s=e.message.split("\n"),r=[];for(let n=2,i=s.length;n<i;n+=2){const e=t.exec(s[n]);e&&r.push(new Sb({fileName:e[2],lineNumber:parseFloat(e[1])}))}return r},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,s=e.stacktrace.split("\n"),r=[];for(let n=0,i=s.length;n<i;n+=2){const e=t.exec(s[n]);e&&r.push(new Sb({functionName:e[3]||void 0,fileName:e[2],lineNumber:parseFloat(e[1])}))}return r},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(kb)&&!e.match(/^Error created at/)},this).map(function(e){const t=e.split("@"),s=this.extractLocation(t.pop()),r=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Sb({functionName:r,fileName:s[0],lineNumber:s[1],columnNumber:s[2]})},this)}};function Ab(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let s=e.localName;if(!s)break;s=s.toLowerCase();const r=e.parentElement,n=[];if(r.children&&r.children.length>0)for(let e=0;e<r.children.length;e++){const t=r.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===s&&n.push(t)}n.length>1&&(s+=`:eq(${n.indexOf(e)})`),t=s+(t?">"+t:""),e=r}return t}function Eb(e){return"[object Object]"===Object.prototype.toString.call(e)}function Rb(e,t){if(0===t)return!0;const s=Object.keys(e);for(const r of s)if(Eb(e[r])&&Rb(e[r],t-1))return!0;return!1}function Mb(e,t){const s={numOfKeysLimit:50,depthOfLimit:4};Object.assign(s,t);const r=[],n=[];return JSON.stringify(e,function(e,t){if(r.length>0){const s=r.indexOf(this);~s?r.splice(s+1):r.push(this),~s?n.splice(s,1/0,e):n.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Eb(e)&&Object.keys(e).length>s.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Eb(e)&&Rb(e,s.depthOfLimit))return!0;return!1}(t))return function(e){let t=e.toString();s.stringLengthLimit&&t.length>s.stringLengthLimit&&(t=`${t.slice(0,s.stringLengthLimit)}...`);return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){const e={};for(const s in t){const r=t[s];Array.isArray(r)?e[s]=Ab(r.length?r[0]:null):e[s]=r}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}const Nb={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Tb(e,t,s){const r=s?Object.assign({},Nb,s):Nb,n=r.logger;if(!n)return()=>{};let i;i="string"==typeof n?t[n]:n;let o=0,a=!1;const l=[];if(r.level.includes("error")){const s=t=>{const s=t.message,n=t.error,i=Ob.parse(n).map(e=>e.toString()),o=[Mb(s,r.stringifyOptions)];e({level:"error",trace:i,payload:o})};t.addEventListener("error",s),l.push(()=>{t.removeEventListener("error",s)});const n=t=>{let s,n;t.reason instanceof Error?(s=t.reason,n=[Mb(`Uncaught (in promise) ${s.name}: ${s.message}`,r.stringifyOptions)]):(s=new Error,n=[Mb("Uncaught (in promise)",r.stringifyOptions),Mb(t.reason,r.stringifyOptions)]);const i=Ob.parse(s).map(e=>e.toString());e({level:"error",trace:i,payload:n})};t.addEventListener("unhandledrejection",n),l.push(()=>{t.removeEventListener("unhandledrejection",n)})}for(const h of r.level)l.push(c(i,h));return()=>{l.forEach(e=>e())};function c(t,s){return t[s]?yb.patch(t,s,t=>(...n)=>{if(t.apply(this,n),!("assert"===s&&n[0]||a)){a=!0;try{const t=Ob.parse(new Error).map(e=>e.toString()).splice(1),i=("assert"===s?n.slice(1):n).map(e=>Mb(e,r.stringifyOptions));o++,o<r.lengthThreshold?e({level:s,trace:t,payload:i}):o===r.lengthThreshold&&e({level:"warn",trace:[],payload:[Mb("The number of log records reached the threshold.")]})}catch(i){t("rrweb logger error:",i,...n)}finally{a=!1}}}):()=>{}}}const _b={recordOptions:{blockClass:"bf-nocapture",blockSelector:void 0,ignoreClass:"bf-ignore-input",ignoreCSSAttributes:void 0,maskTextClass:"bf-mask",maskTextSelector:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,maskTextFn:void 0},recordConsolePlugin:{level:["error"],lengthThreshold:Number.POSITIVE_INFINITY,stringifyOptions:{stringLengthLimit:Number.POSITIVE_INFINITY,numOfKeysLimit:Number.POSITIVE_INFINITY,depthOfLimit:Number.POSITIVE_INFINITY}},samplingOptions:{scroll:150,media:1e3,canvas:8,input:"last"}};class Pb{constructor(e){var s;t(this,"options"),t(this,"stop"),this.options={..._b.recordOptions,emit:e,plugins:[(s=_b.recordConsolePlugin,{name:"rrweb/console@1",observer:Tb,options:s})],sampling:_b.samplingOptions},this.stop=null}static mockImplementation(e){throw new Error("Method not implemented.")}start(){this.stop=Zh(this.options)??null}getMirror(){return Zh.mirror}takeFullSnapshot(){return Zh.takeFullSnapshot()}}class Lb{constructor(e){t(this,"recordingManager"),t(this,"isRunning"),t(this,"events"),this.recordingManager=e,this.isRunning=!1,this.events=[]}start(){this.isRunning=!0}handle(e){this.isInitializingEvent(e)?this.events.push(e):this.stop(e)}isInitializingEvent(e){return[2,4].includes(e.type)||this.isSelectionEvent(e)||this.isConsoleEvent(e)}isSelectionEvent(e){return 3===e.type&&14===e.data.source}isConsoleEvent(e){return 6===e.type}stop(e){this.stamp(this.events,e.timestamp-1),this.publish(...this.events,e),this.events=[],this.isRunning=!1}stamp(e,t){e.forEach(e=>e.timestamp=t)}publish(...e){e.forEach(e=>{this.recordingManager.publishEvent(e)})}}function Db(e,t){void 0===t&&(t={});for(var s=function(e){for(var t=[],s=0;s<e.length;){var r=e[s];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:s,value:e[s++]});else{var n=1,i="";if("?"===e[a=s+1])throw new TypeError('Pattern cannot start with "?" at '.concat(a));for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0===--n){a++;break}}else if("("===e[a]&&(n++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at ".concat(a));i+=e[a++]}else i+=e[a++]+e[a++];if(n)throw new TypeError("Unbalanced pattern at ".concat(s));if(!i)throw new TypeError("Missing pattern at ".concat(s));t.push({type:"PATTERN",index:s,value:i}),s=a}else{for(var o="",a=s+1;a<e.length;){var l=e.charCodeAt(a);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;o+=e[a++]}if(!o)throw new TypeError("Missing parameter name at ".concat(s));t.push({type:"NAME",index:s,value:o}),s=a}else t.push({type:"CLOSE",index:s,value:e[s++]});else t.push({type:"OPEN",index:s,value:e[s++]});else t.push({type:"ESCAPED_CHAR",index:s++,value:e[s++]});else t.push({type:"MODIFIER",index:s,value:e[s++]})}return t.push({type:"END",index:s,value:""}),t}(e),r=t.prefixes,n=void 0===r?"./":r,i=t.delimiter,o=void 0===i?"/#?":i,a=[],l=0,c=0,h="",u=function(e){if(c<s.length&&s[c].type===e)return s[c++].value},p=function(e){var t=u(e);if(void 0!==t)return t;var r=s[c],n=r.type,i=r.index;throw new TypeError("Unexpected ".concat(n," at ").concat(i,", expected ").concat(e))},d=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t},f=function(e){var t=a[a.length-1],s=e||(t&&"string"==typeof t?t:"");if(t&&!s)throw new TypeError('Must have text between two parameters, missing text after "'.concat(t.name,'"'));return!s||function(e){for(var t=0,s=o;t<s.length;t++){var r=s[t];if(e.indexOf(r)>-1)return!0}return!1}(s)?"[^".concat(Fb(o),"]+?"):"(?:(?!".concat(Fb(s),")[^").concat(Fb(o),"])+?")};c<s.length;){var m=u("CHAR"),g=u("NAME"),y=u("PATTERN");if(g||y){var w=m||"";-1===n.indexOf(w)&&(h+=w,w=""),h&&(a.push(h),h=""),a.push({name:g||l++,prefix:w,suffix:"",pattern:y||f(w),modifier:u("MODIFIER")||""})}else{var b=m||u("ESCAPED_CHAR");if(b)h+=b;else if(h&&(a.push(h),h=""),u("OPEN")){w=d();var v=u("NAME")||"",C=u("PATTERN")||"",S=d();p("CLOSE"),a.push({name:v||(C?l++:""),pattern:v&&!C?f(w):C,prefix:w,suffix:S,modifier:u("MODIFIER")||""})}else p("END")}}return a}function Bb(e,t){var s=[];return function(e,t,s){void 0===s&&(s={});var r=s.decode,n=void 0===r?function(e){return e}:r;return function(s){var r=e.exec(s);if(!r)return!1;for(var i=r[0],o=r.index,a=Object.create(null),l=function(e){if(void 0===r[e])return"continue";var s=t[e-1];"*"===s.modifier||"+"===s.modifier?a[s.name]=r[e].split(s.prefix+s.suffix).map(function(e){return n(e,s)}):a[s.name]=n(r[e],s)},c=1;c<r.length;c++)l(c);return{path:i,index:o,params:a}}}(zb(e,s,t),s,t)}function Fb(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Ub(e){return e&&e.sensitive?"":"i"}function jb(e,t,s){return function(e,t,s){void 0===s&&(s={});for(var r=s.strict,n=void 0!==r&&r,i=s.start,o=void 0===i||i,a=s.end,l=void 0===a||a,c=s.encode,h=void 0===c?function(e){return e}:c,u=s.delimiter,p=void 0===u?"/#?":u,d=s.endsWith,f="[".concat(Fb(void 0===d?"":d),"]|$"),m="[".concat(Fb(p),"]"),g=o?"^":"",y=0,w=e;y<w.length;y++){var b=w[y];if("string"==typeof b)g+=Fb(h(b));else{var v=Fb(h(b.prefix)),C=Fb(h(b.suffix));if(b.pattern)if(t&&t.push(b),v||C)if("+"===b.modifier||"*"===b.modifier){var S="*"===b.modifier?"?":"";g+="(?:".concat(v,"((?:").concat(b.pattern,")(?:").concat(C).concat(v,"(?:").concat(b.pattern,"))*)").concat(C,")").concat(S)}else g+="(?:".concat(v,"(").concat(b.pattern,")").concat(C,")").concat(b.modifier);else{if("+"===b.modifier||"*"===b.modifier)throw new TypeError('Can not repeat "'.concat(b.name,'" without a prefix and suffix'));g+="(".concat(b.pattern,")").concat(b.modifier)}else g+="(?:".concat(v).concat(C,")").concat(b.modifier)}}if(l)n||(g+="".concat(m,"?")),g+=s.endsWith?"(?=".concat(f,")"):"$";else{var k=e[e.length-1],I="string"==typeof k?m.indexOf(k[k.length-1])>-1:void 0===k;n||(g+="(?:".concat(m,"(?=").concat(f,"))?")),I||(g+="(?=".concat(m,"|").concat(f,")"))}return new RegExp(g,Ub(s))}(Db(e,s),t,s)}function zb(e,t,s){return e instanceof RegExp?function(e,t){if(!t)return e;for(var s=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,n=s.exec(e.source);n;)t.push({name:n[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),n=s.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,s){var r=e.map(function(e){return zb(e,t,s).source});return new RegExp("(?:".concat(r.join("|"),")"),Ub(s))}(e,t,s):jb(e,t,s)}function Vb(e,t){if(function(){if("undefined"==typeof window)return!1;const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e}()&&!t)return!1;const s=window.location.pathname;for(const n of e)try{if(Bb(n,{decode:decodeURIComponent})(s))return!1}catch(r){if(n===s)return!1}return!0}const Wb=[su.MouseMove,su.MouseInteraction,su.Scroll,su.ViewportResize,su.Input,su.TouchMove,su.MediaInteraction,su.Drag];class Yb{constructor(e){t(this,"agent"),t(this,"recorder"),t(this,"stasher"),this.agent=e,this.recorder=new Pb(this.handleEvent.bind(this)),this.stasher=new Lb(this)}start(){this.recorder.start()}handleEvent(e){const t=new URL(window.location.href),s=t.origin+t.pathname;if(Vb(this.agent.recordingBlocklist,this.agent._allowLocalhostRecording)){if(this.agent.sessionManager.isIdle){if(!this.isInteractiveEvent(e))return;this.agent.handleActivityDuringIdle()}if(this.isClick(e)){let t=Zh.mirror.getNode(e.data.id);t&&this.nodeIsInteresting(t)&&(e.conversionData={},e.conversionData.eventType="click",e.conversionData.textContent=t.textContent,e.conversionData.htmlElement=t.nodeName?.toLowerCase(),e.conversionData.location=s)}this.isCustom(e)&&(e.conversionData={},e.conversionData.eventType="custom",e.conversionData.customEventType=e.data.tag,e.conversionData.location=s),this.stasher.isRunning?this.stasher.handle(e):this.publishEvent(e)}}publishEvent(e){this.agent.sender.handle(e),this.agent.timer&&this.agent.timer.restart()}startRecorderWithStasher(){this.stasher.start(),this.recorder=new Pb(this.handleEvent.bind(this)),this.recorder.start()}isClick(e){return e.type===tu.IncrementalSnapshot&&e.data.source===su.MouseInteraction&&e.data.type===ru.Click}nodeIsInteresting(e){return"BUTTON"===e.nodeName||"ANCHOR"===e.nodeName}isCustom(e){return e.type===tu.Custom}isInteractiveEvent(e){return e.type===tu.IncrementalSnapshot&&Wb.includes(e.data?.source)}}class Gb{constructor(e,s){t(this,"agent"),t(this,"MAX_IDLE_TIME"),t(this,"timeoutId"),this.agent=e,this.MAX_IDLE_TIME=s,this.timeoutId=0}restart(){this.stop(),this.start()}stop(){clearTimeout(this.timeoutId)}start(){this.timeoutId=window.setTimeout(this.agent.handleTimeout.bind(this.agent),this.MAX_IDLE_TIME)}}const Zb=class e{constructor(){t(this,"sessionId",null),t(this,"lastScreenViewEventTime",0),t(this,"isIdle",!1)}static getInstance(){return e.instance||(e.instance=new e),e.instance}determineSessionState(e){return!this.sessionId&&e?"new":this.sessionId&&e&&this.sessionId!==e?"changed":this.sessionId===e&&null!==this.sessionId?"active":"expired"}handleSessionTransition(e,t){switch(e){case"new":case"changed":this.updateIdleStatus(!1),t.takeFullSnapshot?.()}}updateSession(e,t={}){const s=this.determineSessionState(e);this.handleSessionTransition(s,t),this.sessionId=e}updateLastScreenViewEventTime(){this.lastScreenViewEventTime=Date.now()}updateIdleStatus(e){this.isIdle=e}getLastScreenViewEventTime(){return this.lastScreenViewEventTime}getCurrentSessionId(){return this.sessionId}};t(Zb,"instance");let Jb=Zb;const Xb=class e{constructor(){t(this,"recordingManager"),t(this,"sender"),t(this,"MAX_IDLE_TIME"),t(this,"timer"),t(this,"sendEvents"),t(this,"sendScreenViewEvent"),t(this,"recordingBlocklist",[]),t(this,"_allowLocalhostRecording"),t(this,"sessionCreationPromise",null),this.recordingManager=new Yb(this),this.sender=new Qh(this)}get sessionManager(){return e._sessionManager}async start({sendEvents:e,sendScreenViewEvent:t,recordingBlocklist:s,_allowLocalhostRecording:r}){this.sendEvents=e,this.sendScreenViewEvent=t,this.recordingBlocklist=s,this._allowLocalhostRecording=r,this.MAX_IDLE_TIME=6e4,this.timer=new Gb(this,this.MAX_IDLE_TIME),this.sender.start(),this.recordingManager.start()}handleTimeout(){this.recordingManager.recorder.stop&&this.recordingManager.recorder.stop(),this.sender.send(),this.recordingManager.startRecorderWithStasher(),e._sessionManager.updateIdleStatus(!0)}handleActivityDuringIdle(){null===e._sessionManager.getCurrentSessionId()&&(e._sessionManager.getLastScreenViewEventTime()>Date.now()-5e3||this.sessionCreationPromise||(this.sessionCreationPromise=this.createSession().finally(()=>{this.sessionCreationPromise=null})))}takeFullSnapshot(){return this.recordingManager.recorder.takeFullSnapshot()}static handleCustomEvent(e){Zh.addCustomEvent(e,null)}async createSession(){if(this.sendScreenViewEvent)try{this.sendScreenViewEvent({__path:window.location.href,__title:document.title,__is_session_refresh:!0})}catch(e){console.error("Failed to send screen_view event:",e)}}};t(Xb,"_sessionManager",Jb.getInstance());let Hb=Xb;function Kb(e){return e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace("-","").replace("_",""))}class $b extends Pe{constructor(e){if(super({sdk:"web",sdkVersion:"0.0.28",...e}),t(this,"lastPath",""),t(this,"debounceTimer",null),t(this,"agent"),t(this,"sessionManager",Jb.getInstance()),t(this,"recordingBlocklist",[]),t(this,"isRecordingActive",!1),this.options=e,this.agent=new Hb,this.recordingBlocklist=e.recordingBlocklist||[],!this.isServer()){this.setGlobalProperties({__referrer:document.referrer});const e=this.isTrackingDisabled();this.options.trackOutgoingLinks&&!e&&this.trackOutgoingLinks(),this.options.trackScreenViews&&this.trackScreenViews(),this.options.trackAttributes&&!e&&this.trackAttributes(),this.options.enableRecording&&!e&&(this.startRecording(),this.isRecordingActive=!0,console.log("Brainfish has started ambient learning"))}}debounce(e,t){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(e,t)}isServer(){return"undefined"==typeof document}trackOutgoingLinks(){this.isServer()||document.addEventListener("click",e=>{const t=e.target,s=t.closest("a");if(s&&t){const e=s.getAttribute("href");e?.startsWith("http")&&super.track("link_out",{href:e,text:s.innerText||s.getAttribute("title")||t.getAttribute("alt")||t.getAttribute("title")})}})}trackScreenViews(){if(this.isServer())return;this.screenView();const e=history.pushState;history.pushState=function(...t){const s=e.apply(this,t);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),s};const t=history.replaceState;history.replaceState=function(...e){const s=t.apply(this,e);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),s},window.addEventListener("popstate",function(){window.dispatchEvent(new Event("locationchange"))});const s=()=>this.debounce(()=>this.screenView(),100);this.options.trackHashChanges?window.addEventListener("hashchange",s):window.addEventListener("locationchange",s)}trackAttributes(){this.isServer()||document.addEventListener("click",e=>{const t=e.target,s=t.closest("button"),r=t.closest("a"),n=s?.getAttribute("data-track")?s:r?.getAttribute("data-track")?r:null;if(n){const e={};for(const s of n.attributes)s.name.startsWith("data-")&&"data-track"!==s.name&&(e[Kb(s.name.replace(/^data-/,""))]=s.value);const t=n.getAttribute("data-track");t&&super.track(t,e)}})}startRecording(){this.isServer()||this.agent.start({sendEvents:this.recordEventsToServer.bind(this),sendScreenViewEvent:this.sendScreenViewEvent.bind(this),recordingBlocklist:this.recordingBlocklist,_allowLocalhostRecording:this.options._allowLocalhostRecording})}async screenView(e,t){if(this.isServer())return;let s,r;if("string"==typeof e?(s=e,r=t):(s=window.location.href,r=e),this.lastPath===s)return;this.lastPath=s;const n={...r??{},__path:s,__title:document.title};this.sendScreenViewEvent(n)}async recordEventsToServer(e){const t=await this.record(e);this.sessionManager.updateSession(t,{takeFullSnapshot:()=>{this.agent.takeFullSnapshot()}})}sendScreenViewEvent(e){super.track("screen_view",e),this.sessionManager.updateLastScreenViewEventTime()}disableTracking(){super.disableTracking(),this.isRecordingActive&&(this.agent.recordingManager.recorder.stop&&this.agent.recordingManager.recorder.stop(),this.isRecordingActive=!1,console.log("Brainfish has stopped ambient learning"))}enableTracking(){super.enableTracking()}}(e=>{if(e.BrainfishAnalytics&&"q"in e.BrainfishAnalytics){const t=e.BrainfishAnalytics.q||[],s=t.findIndex(e=>"init"===e[0]);if(-1===s)return void console.warn("BrainfishAnalytics has not been initialized.");const[r]=t.splice(s,1),n=new $b(r[1]);t.forEach(e=>{e[0]in n&&n[e[0]](...e.slice(1))}),e.BrainfishAnalytics=(e,...t)=>{const s=n[e]?n[e].bind(n):void 0;if("function"==typeof s)return s(...t);console.warn(`Method ${e} does not exist on BrainfishAnalytics`)}}})(window);
|
|
2
2
|
//# sourceMappingURL=tracker.cjs.js.map
|