PageSourceSearch

https://bellaria.at/_next/static/chunks/d2e02e1eacc16928.js

js bellaria.at collected 2026-10-05 23:44:56 UTC 295,250 bytes, 4 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65770,(e,t,r)=>{var n={675:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,i=l(e),s=i[0],a=i[1],c=new o((s+a)*3/4-a),u=0,d=a>0?s-4:s;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=0,a=n-o;s<a;s+=16383)i.push(function(e,t,n){for(var o,i=[],s=t;s<n;s+=3)o=(e[s]<<16&0xff0000)+(e[s+1]<<8&65280)+(255&e[s+2]),i.push(r[o>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}(e,s,s+16383>a?a:s+16383));return 1===o?i.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===o&&i.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),i.join("")};for(var r=[],n=[],o="u">typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=i.length;s<a;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},72:function(e,t,r){"use strict";var n=r(675),o=r(783),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var n=e,o=t;if(("string"!=typeof o||""===o)&&(o="utf8"),!a.isEncoding(o))throw TypeError("Unknown encoding: "+o);var i=0|f(n,o),l=s(i),c=l.write(n,o);return c!==i&&(l=l.slice(0,c)),l}if(ArrayBuffer.isView(e))return d(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(M(e,ArrayBuffer)||e&&M(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(M(e,SharedArrayBuffer)||e&&M(e.buffer,SharedArrayBuffer)))return function(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),a.prototype),n}(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var u=e.valueOf&&e.valueOf();if(null!=u&&u!==e)return a.from(u,t,r);var p=function(e){if(a.isBuffer(e)){var t=0|h(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?s(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(p)return p;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),s(e<0?0:0|h(e))}function d(e){for(var t=e.length<0?0:0|h(e.length),r=s(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}t.Buffer=a,t.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!a.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return(c(e),e<=0)?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)},a.allocUnsafe=function(e){return u(e)},a.allocUnsafeSlow=function(e){return u(e)};function h(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function f(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||M(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return x(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return E(e).length;default:if(o)return n?-1:x(e).length;t=(""+t).toLowerCase(),o=!0}}function p(e,t,r){var o,i,s,a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=R[e[i]];return o}(this,t,r);case"utf8":case"utf-8":return w(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}(this,t,r);case"base64":return o=this,i=t,s=r,0===i&&s===o.length?n.fromByteArray(o):n.fromByteArray(o.slice(i,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}(this,t,r);default:if(a)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,o){var i;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(i=r*=1)!=i&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(o)return -1;else r=e.length-1;else if(r<0)if(!o)return -1;else r=0;if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,o);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(
vendor: 12,881 bytes, line 1
1o)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return y(e,[t],r,n,o)}throw TypeError("val must be string, number or Buffer")}function y(e,t,r,n,o){var i,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;s=2,a/=2,l/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var u=-1;for(i=r;i<a;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*s}else -1!==u&&(i-=i-u),u=-1}else for(r+l>a&&(r=a-l),i=r;i>=0;i--){for(var d=!0,h=0;h<l;h++)if(c(e,i+h)!==c(t,h)){d=!1;break}if(d)return i}return -1}a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(M(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),M(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:+(n<r)},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=a.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(M(i,Uint8Array)&&(i=a.from(i)),!a.isBuffer(i))throw TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},a.byteLength=f,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?w(this,0,e):p.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,o){if(M(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var i=o-n,s=r-t,l=Math.min(i,s),c=this.slice(n,o),u=e.slice(t,r),d=0;d<l;++d)if(c[d]!==u[d]){i=c[d],s=u[d];break}return i<s?-1:+(s<i)},a.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)};function w(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,s,a,l,c=e[o],u=null,d=c>239?4:c>223?3:c>191?2:1;if(o+d<=r)switch(d){case 1:c<128&&(u=c);break;case 2:(192&(i=e[o+1]))==128&&(l=(31&c)<<6|63&i)>127&&(u=l);break;case 3:i=e[o+1],s=e[o+2],(192&i)==128&&(192&s)==128&&(l=(15&c)<<12|(63&i)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],(192&i)==128&&(192&s)==128&&(192&a)==128&&(l=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=d}var h=n,f=h.length;if(f<=4096)return String.fromCharCode.apply(String,h);for(var p="",m=0;m<f;)p+=String.fromCharCode.apply(String,h.slice(m,m+=4096));return p}function b(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function v(e,t,r,n,o,i){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function C(e,t,r,n,o,i){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function S(e,t,r,n,i){return t*=1,r>>>=0,i||C(e,t,r,4,34028234663852886e22,-34028234663852886e22),o.write(e,t,r,n,23,4),r+4}function I(e,t,r,n,i){return t*=1,r>>>=0,i||C(e,t,r,8,17976931348623157e292,-17976931348623157e292),o.write(e,t,r,n,52,8),r+8}a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o,i,s,a,l,c,u,d,h=this.length-t;if((void 0===r||r>h)&&(r=h),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var f=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a,l=parseInt(t.substr(2*s,2),16);if((a=l)!=a)break;e[r+s]=l}return s}(this,e,t,r);case"utf8":case"utf-8":return o=t,i=r,O(x(e,this.length-o),this,o,i);case"ascii":return s=t,a=r,O(A(e),this,s,a);case"latin1":case"binary":return function(e,t,r,n){return O(A(t),e,r,n)}(this,e,t,r);case"base64":return l=t,c=r,O(E(e),this,l,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u=t,d=r,O(function(e,t){for(var r,n,o=[],i=0;i<e.length&&!((t-=2)<0);++i)n=(r=e.charCodeAt(i))>>8,o.push(r%256),o.push(n);return o}(e,this.length-u),this,u,d);default:if(f)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},a.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},a.prototype.readInt8=function(e,t){return(e>>>=0,t||b(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),o.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),o.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),o.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),o.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;v(this,e,t,r,o,0)}var i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},a.prototype.writeUIntBE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;v(this,e,t,r,o,0)}var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var o=Math.pow(2,8*r-1);v(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s|0)-a&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var o=Math.pow(2,8*r-1);v(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s|0)-a&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,r){return S(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return S(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return I(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return I(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var i=o-1;i>=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return o},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var o,i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var s=a.isBuffer(e)?e:a.from(e,n),l=s.length;
1if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=s[o%l]}return this};var k=/[^+/0-9A-Za-z-_]/g;function x(e,t){t=t||1/0;for(var r,n=e.length,o=null,i=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319||s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return i}function A(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function E(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(k,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function O(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length)&&!(o>=e.length);++o)t[o+r]=e[o];return o}function M(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var R=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)t[n+o]=e[r]+e[o];return t}()},783:function(e,t){t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,l=(1<<a)-1,c=l>>1,u=-7,d=r?o-1:0,h=r?-1:1,f=e[t+d];for(d+=h,i=f&(1<<-u)-1,f>>=-u,u+=a;u>0;i=256*i+e[t+d],d+=h,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=n;u>0;s=256*s+e[t+d],d+=h,u-=8);if(0===i)i=1-c;else{if(i===l)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,n),i-=c}return(f?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,l,c=8*i-o-1,u=(1<<c)-1,d=u>>1,h=5960464477539062e-23*(23===o),f=n?0:i-1,p=n?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(a=+!!isNaN(t),s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+d>=1?t+=h/l:t+=h*Math.pow(2,1-d),t*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,o),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;e[r+f]=255&a,f+=p,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;e[r+f]=255&s,f+=p,s/=256,c-=8);e[r+f-p]|=128*m}}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}},s=!0;try{n[e](r,r.exports,i),s=!1}finally{s&&delete o[e]}return r.exports}i.ab="/ROOT/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/buffer/",t.exports=i(72)},53186,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={cancelIdleCallback:function(){return s},requestIdleCallback:function(){return i}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i="u">typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},s="u">typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},13017,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return b},handleClientScriptLoad:function(){return g},initScriptLoader:function(){return y}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=e.r(81258),s=e.r(44066),a=e.r(98134),l=i._(e.r(29080)),c=s._(e.r(75201)),u=e.r(44934),d=e.r(15536),h=e.r(53186),f=new Map,p=new Set,m=e=>{let{src:t,id:r,onLoad:n=()=>{},onReady:o=null,dangerouslySetInnerHTML:i,children:s="",strategy:a="afterInteractive",onError:c,stylesheets:u}=e,h=r||t;if(h&&p.has(h))return;if(f.has(t)){p.add(h),f.get(t).then(n,c);return}let m=()=>{o&&o(),p.add(h)},g=document.createElement("script"),y=new Promise((e,t)=>{g.addEventListener("load",function(t){e(),n&&n.call(this,t),m()}),g.addEventListener("error",function(e){t(e)})}).catch(function(e){c&&c(e)});i?(g.innerHTML=i.__html||"",m()):s?(g.textContent="string"==typeof s?s:Array.isArray(s)?s.join(""):"",m()):t&&(g.src=t,f.set(t,y)),(0,d.setAttributesFromProps)(g,e),"w
1orker"===a&&g.setAttribute("type","text/partytown"),g.setAttribute("data-nscript",a),u&&(e=>{if(l.default.preinit)return e.forEach(e=>{l.default.preinit(e,{as:"style"})});if("u">typeof window){let t=document.head;e.forEach(e=>{let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,t.appendChild(r)})}})(u),document.body.appendChild(g)};function g(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>m(e))}):m(e)}function y(e){e.forEach(g),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");p.add(t)})}function w(e){let{id:t,src:r="",onLoad:n=()=>{},onReady:o=null,strategy:i="afterInteractive",onError:s,stylesheets:d,...f}=e,{updateScripts:g,scripts:y,getIsSsr:w,appDir:b,nonce:v}=(0,c.useContext)(u.HeadManagerContext);v=f.nonce||v;let C=(0,c.useRef)(!1);(0,c.useEffect)(()=>{let e=t||r;C.current||(o&&e&&p.has(e)&&o(),C.current=!0)},[o,t,r]);let S=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{if(!S.current){if("afterInteractive"===i)m(e);else"lazyOnload"===i&&("complete"===document.readyState?(0,h.requestIdleCallback)(()=>m(e)):window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>m(e))}));S.current=!0}},[e,i]),("beforeInteractive"===i||"worker"===i)&&(g?(y[i]=(y[i]||[]).concat([{id:t,src:r,onLoad:n,onReady:o,onError:s,...f,nonce:v}]),g(y)):w&&w()?p.add(t||r):w&&!w()&&m({...e,nonce:v})),b){if(d&&d.forEach(e=>{l.default.preinit(e,{as:"style"})}),"beforeInteractive"===i)if(!r)return f.dangerouslySetInnerHTML&&(f.children=f.dangerouslySetInnerHTML.__html,delete f.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:v,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${JSON.stringify([0,{...f,id:t}])})`}});else return l.default.preload(r,f.integrity?{as:"script",integrity:f.integrity,nonce:v,crossOrigin:f.crossOrigin}:{as:"script",nonce:v,crossOrigin:f.crossOrigin}),(0,a.jsx)("script",{nonce:v,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${JSON.stringify([r,{...f,id:t}])})`}});"afterInteractive"===i&&r&&l.default.preload(r,f.integrity?{as:"script",integrity:f.integrity,nonce:v,crossOrigin:f.crossOrigin}:{as:"script",nonce:v,crossOrigin:f.crossOrigin})}return null}Object.defineProperty(w,"__nextScript",{value:!0});let b=w;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},82397,(e,t,r)=>{t.exports=e.r(13017)},50694,e=>{"use strict";let t,r,n,o,i,s,a,l,c,u,d,h,f,p,m,g,y,w,b,v,C,S;var I=e.i(65770),k=e.i(82637),x=Object.defineProperty,A=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?x(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},E=Object.defineProperty,O=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?E(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},M=((oM=M||{})[oM.Document=0]="Document",oM[oM.DocumentType=1]="DocumentType",oM[oM.Element=2]="Element",oM[oM.Text=3]="Text",oM[oM.CDATA=4]="CDATA",oM[oM.Comment=5]="Comment",oM);let R={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},P={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},T={};function L(e){if(T[e])return T[e];let t=globalThis[e],r=t.prototype,n=e in R?R[e]:void 0,o=!!(n&&n.every(e=>{var t,n;return!!(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),i=e in P?P[e]:void 0,s=!!(i&&i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(o&&s&&!globalThis.Zone)return T[e]=t.prototype,t.prototype;try{let n=document.createElement("iframe");document.body.appendChild(n);let o=n.contentWindow;if(!o)return t.prototype;let i=o[e].prototype;if(document.body.removeChild(n),!i)return r;return T[e]=i}catch{return r}}let D={};function N(e,t,r){var n;let o=`${e}.${String(r)}`;if(D[o])return D[o].call(t);let i=null==(n=Object.getOwnPropertyDescriptor(L(e),r))?void 0:n.get;return i?(D[o]=i,i.call(t)):t[r]}let _=function(e){return N("Node",e,"childNodes")},j=function(e){return N("Node",e,"parentNode")},U=function(e){return N("Node",e,"parentElement")},B=function(e){return N("Node",e,"textContent")},F=function(e){return e&&"shadowRoot"in e?N("Element",e,"shadowRoot"):null};
1function $(e){return e.nodeType===e.ELEMENT_NODE}function z(e){var t;let r=e&&"host"in e&&"mode"in e&&((t=e)&&"host"in t?N("ShadowRoot",t,"host"):null)||null;return!!(r&&"shadowRoot"in r&&F(r)===e)}function V(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function W(e){try{var t;let r=e.rules||e.cssRules;if(!r)return null;let n=e.href;return!n&&e.ownerNode&&(n=e.ownerNode.baseURI),(t=Array.from(r,e=>G(e,n)).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}}function G(e,t){if("styleSheet"in e){let t;try{t=W(e.styleSheet)||function(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(r){t=e.cssText}return e.styleSheet.href?er(t,e.styleSheet.href):t}{let r=e.cssText;return("selectorText"in e&&e.selectorText.includes(":")&&(r=r.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t)?er(r,t):r}}class H{constructor(){O(this,"idNodeMap",new Map),O(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?(null==(t=this.getMeta(e))?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let 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){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Y({element:e,maskInputOptions:t,tagName:r,type:n,value:o,maskInputFn:i}){let s=o||"",a=n&&J(n);return(t[r.toLowerCase()]||a&&t[a])&&(s=i?i(s,e):"*".repeat(s.length)),s}function J(e){return e.toLowerCase()}let Z="__rrweb_original__";function q(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?J(t):null}function X(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}let n=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==n?void 0:n[1])??null}let K=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Q=/^(?:[a-z+]+:)?\/\//i,ee=/^www\..*/i,et=/^(data:)([^,]*),(.*)/i;function er(e,t){return(e||"").replace(K,(e,r,n,o,i,s)=>{let a=n||i||s,l=r||o||"";if(!a)return e;if(Q.test(a)||ee.test(a)||et.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${(t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]+a}${l})`;let c=t.split("/"),u=a.split("/");for(let e of(c.pop(),u))if("."===e)continue;else".."===e?c.pop():c.push(e);return`url(${l}${c.join("/")}${l})`})}function en(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}let eo=1,ei=RegExp("[^a-z0-9-_:]");function es(){return eo++}let ea=/^[^ \t\n\r\u000c]+/,el=/^[, \t\n\r\u000c]+/,ec=new WeakMap;function eu(e,t){return t&&""!==t.trim()?ed(e,t):t}function ed(e,t){let r=ec.get(e);if(r||(r=e.createElement("a"),ec.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function eh(e,t,r,n){if(!n)return n;if("src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0])return eu(e,n);if("background"===r&&["table","td","th"].includes(t))return eu(e,n);if("srcset"===r)return function(e,t){if(""===t.trim())return t;let r=0;function n(e){let n,o=e.exec(t.substring(r));return o?(n=o[0],r+=n.length,n):""}let o=[];for(;n(el),!(r>=t.length);){let i=n(ea);if(","===i.slice(-1))i=eu(e,i.substring(0,i.length-1)),o.push(i);else{let n="";i=eu(e,i);let s=!1;for(;;){let e=t.charAt(r);if(""===e){o.push((i+n).trim());break}if(s)")"===e&&(s=!1);else if(","===e){r+=1,o.push((i+n).trim());break}else"("===e&&(s=!0);n+=e,r+=1}}}return o.join(", ")}(e,n);if("style"===r)return er(n,ed(e));else if("object"===t&&"data"===r)return eu(e,n);return n}function ef(e,t,r){return["video","audio"].includes(e)&&"autoplay"===t}function ep(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&ep(j(e),t,r);for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}return!!r&&ep(j(e),t,r)}function em(e,t,r,n){let o;if($(e)){if(!_(o=e).length)return!1}else{if(null===U(e))return!1;o=U(e)}
1try{if("string"==typeof t){if(n){if(o.closest(`.${t}`))return!0}else if(o.classList.contains(t))return!0}else if(ep(o,t,n))return!0;if(r){if(n){if(o.closest(r))return!0}else if(o.matches(r))return!0}}catch(e){}return!1}function eg(e){return null==e?"":e.toLowerCase()}function ey(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:e||{}}function ew(e,n){let o,{doc:i,mirror:s,blockClass:a,blockSelector:l,maskTextClass:c,maskTextSelector:u,skipChild:d=!1,inlineStylesheet:h=!0,maskInputOptions:f={},maskTextFn:p,maskInputFn:m,slimDOMOptions:g,dataURLOptions:y={},inlineImages:w=!1,recordCanvas:b=!1,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:S=5e3,onStylesheetLoad:I,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:A=!1,cssCaptured:E=!1}=n,{needsMask:O}=n,{preserveWhiteSpace:R=!0}=n;O||(O=em(e,c,u,void 0===O));let P=function(e,n){let{doc:o,mirror:i,blockClass:s,blockSelector:a,needsMask:l,inlineStylesheet:c,maskInputOptions:u={},maskTextFn:d,maskInputFn:h,dataURLOptions:f={},inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:y=!1,cssCaptured:w=!1}=n,b=function(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return 1===r?void 0:r}(o,i);switch(e.nodeType){case e.DOCUMENT_NODE:if("CSS1Compat"!==e.compatMode)return{type:M.Document,childNodes:[],compatMode:e.compatMode};return{type:M.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:M.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return function(e,n){let o,{doc:i,blockClass:s,blockSelector:a,inlineStylesheet:l,maskInputOptions:c={},maskInputFn:u,dataURLOptions:d={},inlineImages:h,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:g}=n,y=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,s,a),w=function(e){if(e instanceof HTMLFormElement)return"form";let t=J(e.tagName);return ei.test(t)?"div":t}(e),b={},v=e.attributes.length;for(let t=0;t<v;t++){let r=e.attributes[t];
1ef(w,r.name,r.value)||(b[r.name]=eh(i,w,J(r.name),r.value))}if("link"===w&&l){let t=Array.from(i.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=W(t)),r&&(delete b.rel,delete b.href,b._cssText=r)}if("style"===w&&e.sheet){let t=W(e.sheet);t&&(e.childNodes.length>1&&(t=(function(e,t,r=!1){let n=Array.from(t.childNodes),o=[],i=0;if(n.length>1&&e&&"string"==typeof e){let t=en(e,r),s=t.length/e.length;for(let a=1;a<n.length;a++)if(n[a].textContent&&"string"==typeof n[a].textContent){let l=en(n[a].textContent,r),c=3;for(;c<l.length&&(l[c].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,c),1));c++);for(;c<l.length;c++){let u=l.substring(0,c),d=t.split(u),h=-1;if(2===d.length)h=d[0].length;else if(d.length>2&&""===d[0]&&""!==n[a-1].textContent)h=t.indexOf(u,1);else if(1===d.length){if(u=u.substring(0,u.length-1),(d=t.split(u)).length<=1)return o.push(e),o;c=101}else c===l.length-1&&(h=t.indexOf(u));if(d.length>=2&&c>100){let e=n[a-1].textContent;if(e&&"string"==typeof e){let r=en(e).length;h=t.indexOf(u,r)}-1===h&&(h=d[0].length)}if(-1!==h){let a=Math.floor(h/s);for(;a>0&&a<e.length;){if((i+=1)>50*n.length)return o.push(e),o;let l=en(e.substring(0,a),r);if(l.length===h){o.push(e.substring(0,a)),e=e.substring(a),t=t.substring(h);break}l.length<h?a+=Math.max(1,Math.floor((h-l.length)/s)):a-=Math.max(1,Math.floor((l.length-h)*s))}break}}}}return o.push(e),o})(t,e).join("/* rr_split */")),b._cssText=t)}if(["input","textarea","select"].includes(w)){let t=e.value,r=e.checked;"radio"!==b.type&&"checkbox"!==b.type&&"submit"!==b.type&&"button"!==b.type&&t?b.value=Y({element:e,type:q(e),tagName:w,value:t,maskInputOptions:c,maskInputFn:u}):r&&(b.checked=r)}if("option"===w&&(e.selected&&!c.select?b.selected=!0:delete b.selected),"dialog"===w&&e.open&&(b.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),"canvas"===w&&f){if("2d"===e.__context)!function(e){let t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let n=0;n<e.height;n+=50){let o=t.getImageData;if(new Uint32Array((Z in o?o[Z]:o).call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some(e=>0!==e))return!1}return!0}(e)&&(b.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){let t=e.toDataURL(d.type,d.quality),r=i.createElement("canvas");r.width=e.width,r.height=e.height,t!==r.toDataURL(d.type,d.quality)&&(b.rr_dataURL=t)}}if("img"===w&&h){t||(r=(t=i.createElement("canvas")).getContext("2d"));let n=e.currentSrc||e.getAttribute("src")||"<unknown-src>",o=e.crossOrigin,s=()=>{e.removeEventListener("load",s);try{t.width=e.naturalWidth,t.height=e.naturalHeight,r.drawImage(e,0,0),b.rr_dataURL=t.toDataURL(d.type,d.quality)}catch(t){if("anonymous"!==e.crossOrigin){e.crossOrigin="anonymous",e.complete&&0!==e.naturalWidth?s():e.addEventListener("load",s);return}console.warn(`Cannot inline img src=${n}! Error: ${t}`)}"anonymous"===e.crossOrigin&&(o?b.crossOrigin=o:e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?s():e.addEventListener("load",s)}if(["audio","video"].includes(w)){let t=b;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}if(!m&&(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),y){let{width:t,height:r}=e.getBoundingClientRect();b={class:b.class,rr_width:`${t}px`,rr_height:`${r}px`}}"iframe"!==w||p(b.src)||(e.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(w)&&(o=!0)}catch(e){}return{type:M.Element,tagName:w,attributes:b,childNodes:[],isSVG:!!("svg"===e.tagName||e.ownerSVGElement)||void 0,needBlock:y,rootId:g,isCustom:o}}(e,{doc:o,blockClass:s,blockSelector:a,inlineStylesheet:c,maskInputOptions:u,maskInputFn:h,dataURLOptions:f,inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:y,rootId:b});case e.TEXT_NODE:return function(e,t){let{needsMask:r,maskTextFn:n,rootId:o,cssCaptured:i}=t,s=j(e),a=s&&s.tagName,l="",c="STYLE"===a||void 0,u="SCRIPT"===a||void 0;return u?l="SCRIPT_PLACEHOLDER":!i&&(l=B(e),c&&l&&(l=er(l,ed(t.doc)))),!c&&!u&&l&&r&&(l=n?n(l,U(e)):l.replace(/[\S]/g,"*")),{type:M.Text,textContent:l||"",rootId:o}}(e,{doc:o,needsMask:l,maskTextFn:d,rootId:b,cssCaptured:w});case e.CDATA_SECTION_NODE:return{type:M.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:M.Comment,textContent:B(e)||"",rootId:b};default:return!1}}(e,{doc:i,mirror:s,blockClass:a,blockSelector:l,needsMask:O,inlineStylesheet:h,maskInputOptions:f,maskTextFn:p,maskInputFn:m,dataURLOptions:y,inlineImages:w,recordCanvas:b,keepIframeSrcFn:x,newlyAddedElement:A,cssCaptured:E});if(!P)return console.warn(e,"not serialized"),null;o=s.hasNode(e)?s.getId(e):!function(e,t){if(t.comment&&e.type===M.Comment)return!0;
1if(e.type===M.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===X(e.attributes.href)))return!0;else if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(eg(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===eg(e.attributes.name)||"icon"===eg(e.attributes.rel)||"apple-touch-icon"===eg(e.attributes.rel)||"shortcut icon"===eg(e.attributes.rel))))return!0;else if("meta"===e.tagName){if(t.headMetaDescKeywords&&eg(e.attributes.name).match(/^description|keywords$/))return!0;else if(t.headMetaSocial&&(eg(e.attributes.property).match(/^(og|twitter|fb):/)||eg(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===eg(e.attributes.name)))return!0;else if(t.headMetaRobots&&("robots"===eg(e.attributes.name)||"googlebot"===eg(e.attributes.name)||"bingbot"===eg(e.attributes.name)))return!0;else if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;else if(t.headMetaAuthorship&&("author"===eg(e.attributes.name)||"generator"===eg(e.attributes.name)||"framework"===eg(e.attributes.name)||"publisher"===eg(e.attributes.name)||"progid"===eg(e.attributes.name)||eg(e.attributes.property).match(/^article:/)||eg(e.attributes.property).match(/^product:/)))return!0;else if(t.headMetaVerification&&("google-site-verification"===eg(e.attributes.name)||"yandex-verification"===eg(e.attributes.name)||"csrf-token"===eg(e.attributes.name)||"p:domain_verify"===eg(e.attributes.name)||"verify-v1"===eg(e.attributes.name)||"verification"===eg(e.attributes.name)||"shopify-checkout-api-token"===eg(e.attributes.name)))return!0}}return!1}(P,g)&&(R||P.type!==M.Text||P.textContent.replace(/^\s+|\s+$/gm,"").length)?es():-2;let T=Object.assign(P,{id:o});if(s.add(e,T),-2===o)return null;v&&v(e);let L=!d;if(T.type===M.Element){L=L&&!T.needBlock,delete T.needBlock;let t=F(e);t&&V(t)&&(T.isShadowHost=!0)}if((T.type===M.Document||T.type===M.Element)&&L){g.headWhitespace&&T.type===M.Element&&"head"===T.tagName&&(R=!1);let t={doc:i,mirror:s,blockClass:a,blockSelector:l,needsMask:O,maskTextClass:c,maskTextSelector:u,skipChild:d,inlineStylesheet:h,maskInputOptions:f,maskTextFn:p,maskInputFn:m,slimDOMOptions:g,dataURLOptions:y,inlineImages:w,recordCanvas:b,preserveWhiteSpace:R,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:S,onStylesheetLoad:I,stylesheetLoadTimeout:k,keepIframeSrcFn:x,cssCaptured:!1};if(T.type===M.Element&&"textarea"===T.tagName&&void 0!==T.attributes.value);else for(let r of(T.type===M.Element&&void 0!==T.attributes._cssText&&"string"==typeof T.attributes._cssText&&(t.cssCaptured=!0),Array.from(_(e)))){let e=ew(r,t);e&&T.childNodes.push(e)}let r=null;if($(e)&&(r=F(e)))for(let e of Array.from(_(r))){let n=ew(e,t);n&&(V(r)&&(n.isShadow=!0),T.childNodes.push(n))}}let D=j(e);return D&&z(D)&&V(D)&&(T.isShadow=!0),T.type===M.Element&&"iframe"===T.tagName&&function(e,t,r){let n,o=e.contentWindow;if(!o)return;let i=!1;try{n=o.document.readyState}catch(e){return}if("complete"!==n){let n=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(n),i=!0,t()});return}let s="about:blank";if(o.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{let t=e.contentDocument;if(t&&C){let r=ew(t,{doc:t,mirror:s,blockClass:a,blockSelector:l,needsMask:O,maskTextClass:c,maskTextSelector:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskTextFn:p,maskInputFn:m,slimDOMOptions:g,dataURLOptions:y,inlineImages:w,recordCanvas:b,preserveWhiteSpace:R,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:S,onStylesheetLoad:I,stylesheetLoadTimeout:k,keepIframeSrcFn:x});r&&C(e,r)}},S),T.type===M.Element&&"link"===T.tagName&&"string"==typeof T.attributes.rel&&("stylesheet"===T.attributes.rel||"preload"===T.attributes.rel&&"string"==typeof T.attributes.href&&"css"===X(T.attributes.href))&&function(e,t,r){let n,o=!1;try{n=e.sheet}catch(e){return}if(n)return;let i=setTimeout(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{clearTimeout(i),o=!0,t()})}(e,()=>{if(I){let t=ew(e,{doc:i,mirror:s,blockClass:a,blockSelector:l,needsMask:O,maskTextClass:c,maskTextSelector:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:f,maskTextFn:p,maskInputFn:m,slimDOMOptions:g,dataURLOptions:y,inlineImages:w,recordCanvas:b,preserveWhiteSpace:R,onSerialize:v,onIframeLoad:C,iframeLoadTimeout:S,onStylesheetLoad:I,stylesheetLoadTimeout:k,keepIframeSrcFn:x});t&&I(e,t)}},k),T}RegExp(/(max|min)-device-(width|height)/.source,"g");var eb={exports:{}},ev=String,eC=function(){return{isColorSupported:!1,reset:ev,bold:ev,dim:ev,italic:ev,underline:ev,inverse:ev,hidden:ev,strikethrough:ev,black:ev,red:ev,green:ev,yellow:ev,blue:ev,magenta:ev,cyan:ev,white:ev,gray:ev,bgBlack:ev,bgRed:ev,bgGreen:ev,bgYellow:ev,bgBlue:ev,bgMagenta:ev,bgCyan:ev,bgWhite:ev}};
1eb.exports=eC(),eb.exports.createColors=eC;var eS=eb.exports;let eI=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),ek=class e extends Error{constructor(t,r,n,o,i,s){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),o&&(this.source=o),s&&(this.plugin=s),void 0!==r&&void 0!==n&&("number"==typeof r?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.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){let t,r;if(!this.source)return"";let n=this.source;null==e&&(e=eS.isColorSupported),eI&&e&&(n=eI(n));let o=n.split(/\r?\n/),i=Math.max(this.line-3,0),s=Math.min(this.line+2,o.length),a=String(s).length;if(e){let{bold:e,gray:n,red:o}=eS.createColors(!0);t=t=>e(o(t)),r=e=>n(e)}else t=r=e=>e;return o.slice(i,s).map((e,n)=>{let o=i+1+n,s=" "+(" "+o).slice(-a)+" | ";if(o===this.line){let n=r(s.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return t(">")+r(s)+e+"\n "+n+t("^")}return" "+r(s)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};ek.default=ek;var ex={};ex.isClean=Symbol("isClean"),ex.my=Symbol("my");let eA={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1},eE=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+n+o,e)}}beforeAfter(e,t){let r;r="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 n=e.parent,o=0;for(;n&&"root"!==n.type;)o+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<o;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let o=e.nodes[n],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(e,t,r){let n;if(r||(r=t),t&&void 0!==(n=e.raws[t]))return n;let o=e.parent;if("before"===r&&(!o||"root"===o.type&&o.first===e||o&&"document"===o.type))return"";if(!o)return eA[r];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[r])return i.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{var s;let o="raw"+((s=r)[0].toUpperCase()+s.slice(1));this[o]?n=this[o](i,e):i.walk(e=>{if(void 0!==(n=e.raws[t]))return!1})}return void 0===n&&(n=eA[r]),i.rawCache[r]=n,n}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).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return(t=r.raws.before).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&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(e){let t;return e.raws.indent?e.raws.indent:(e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=(t=e[e.length-1]).replace(/\S/g,""),!1}}),t)}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};function eO(e,t){new eE(t).stringify(e)}eE.default=eE,eO.default=eO;let{isClean:eM,my:eR}=ex,eP=class{constructor(e={}){for(let t in this.raws={},this[eM]=!1,this[eR]=!0,e)if("nodes"===t)for(let r of(this.nodes=[],e[t]))"function"==typeof r.clone?this.append(r.clone()):this.append(r);else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=function e(t,r){let n=new t.constructor;for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||"proxyCache"===o)continue;let i=t[o],s=typeof i;"parent"===o&&"object"===s?r&&(n[o]=r):"source"===o?n[o]=i:Array.isArray(i)?n[o]=i.map(t=>e(t,n)):("object"===s&&null!==i&&(i=e(i)),n[o]=i)}return n}(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}
1error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new ek(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>e[t]===r||(e[t]=r,("prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0)}}markDirty(){if(this[eM]){this[eM]=!1;let e=this;for(;e=e.parent;)e[eM]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,o=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(n=1,o+=1):n+=1;return{column:n,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),o=n.indexOf(e.word);-1!==o&&(t=this.positionInside(o,n),r=this.positionInside(o+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new eE().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let o=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||"parent"===e||"proxyCache"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let i=t.get(n.input);null==i&&(i=o,t.set(n.input,o),o++),r[e]={end:n.end,inputId:i,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=eO){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}};eP.default=eP;let eT=eP,eL=class extends eT{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]}};eL.default=eL;let{SourceMapConsumer:eD,SourceMapGenerator:eN}=eI,{existsSync:e_,readFileSync:ej}=eI,{dirname:eU,join:eB}=eI,eF=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=eU(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new eD(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)){var t;return t=e.substr(RegExp.lastMatch.length),I.Buffer.from(t,"base64").toString()}throw Error("Unsupported source map encoding "+e.match(/data:application\/json;([^,]+),/)[1])}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);
1if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=eU(e),e_(e))return this.mapFile=e,ej(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t)if("string"==typeof t)return t;else if("function"==typeof t){let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw Error("Unable to load previous source map: "+r.toString());return e}}else if(t instanceof eD)return eN.fromSourceMap(t).toString();else if(t instanceof eN)return t.toString();else if(this.isMap(t))return JSON.stringify(t);else throw Error("Unsupported previous source map format: "+t.toString());else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let t=this.annotation;return e&&(t=eB(eU(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)}};eF.default=eF;let{SourceMapConsumer:e$,SourceMapGenerator:ez}=eI,{fileURLToPath:eV,pathToFileURL:eW}=eI,{isAbsolute:eG,resolve:eH}=eI,{nanoid:eY}={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",o=r;for(;o--;)n+=e[Math.random()*e.length|0];return n}}
1,eJ=Symbol("fromOffsetCache"),eZ=!!(e$&&ez),eq=!!(eH&&eG),eX=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\uFEFF"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!eq||/^\w+:\/\//.test(t.from)||eG(t.from)?this.file=t.from:this.file=eH(t.from)),eq&&eZ){let e=new eF(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 "+eY(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let o,i,s;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);i=e.line,s=e.col}else i=n.line,s=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,i,s);return(o=a?new ek(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,n.plugin):new ek(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:s,line:i},this.css,this.file,n.plugin)).input={column:r,endColumn:s,endLine:i,line:t,source:this.css},this.file&&(eW&&(o.input.url=eW(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[eJ])r=this[eJ];else{let e=this.css.split("\n");r=Array(e.length);let t=0;for(let n=0,o=e.length;n<o;n++)r[n]=t,t+=e[n].length+1;this[eJ]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,o=r.length-2;for(;n<o;)if(e<r[t=n+(o-n>>1)])o=t-1;else if(e>=r[t+1])n=t+1;else{n=t;break}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:eH(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){let o,i;if(!this.map)return!1;let s=this.map.consumer(),a=s.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(o=s.originalPositionFor({column:n,line:r})),i=eG(a.source)?eW(a.source):new URL(a.source,this.map.consumer().sourceRoot||eW(this.map.mapFile));let l={column:a.column,endColumn:o&&o.column,endLine:o&&o.line,line:a.line,url:i.toString()};if("file:"===i.protocol)if(eV)l.file=eV(i);else throw Error("file: protocol is not available in this PostCSS build");let c=s.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}};eX.default=eX,eI&&eI.registerInput&&eI.registerInput(eX);let{SourceMapConsumer:eK,SourceMapGenerator:eQ}=eI,{dirname:e0,relative:e1,resolve:e2,sep:e5}=eI,{pathToFileURL:e3}=eI,e8=!!(eK&&eQ),e6=!!(e0&&e2&&e1&&e5),e4=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,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,r=this.toUrl(this.path(e.file)),n=e.root||e0(e.file);!1===this.mapOpts.sourcesContent?(t=new eK(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).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(),e6&&e8&&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=eQ.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new eQ({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(){let e,t;this.css="",this.map=new eQ({file:this.outputFile(),ignoreInvalidMapping:!0});let r=1,n=1,o="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(s,a,l)=>{if(this.css+=s,a&&"end"!==l&&(i.generated.line=r,i.generated.column=n-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):(i.source=o,i.original.line=1,i.original.column=0),this.map.addMapping(i)),(e=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),n=s.length-t):n+=s.length,a&&"start"!==l){let e=a.parent||{raws:{}};(!("decl"===a.type||"atrule"===a.type&&!a.nodes)||a!==e.last||e.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=r,i.generated.column=n-2):(i.source=o,i.original.line=1,i.original.column=0,i.generated.line=r,i.generated.column=n-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||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?e0(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=e0(e2(r,this.mapOpts.annotation)));let n=e1(r,e);return this.memoizedPaths.set(e,n),n}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 eX(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,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 I.Buffer.from(e).toString("base64")}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(e3){let t=e3(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===e5&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},e9=eP,e7=class extends e9{constructor(e){super(e),this.type="comment"}};e7.default=e7;let{isClean:te,my:tt}=ex,tr=eP,tn=class e extends tr{append(...e){for(let t of e)for(let e of this.normalize(t,this.last))this.proxyOf.nodes.push(e);return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){let t,r;if(!this.proxyOf.nodes)return;let n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],!1!==(r=e(this.proxyOf.nodes[t],t)));)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){if("proxyOf"===t)return e;if(!e[t])return e[t];if("each"===t||"string"==typeof t&&t.startsWith("walk"))return(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e));if("every"===t||"some"===t)return r=>e[t]((e,...t)=>r(e.toProxy(),...t));if("root"===t)return()=>
1e.root().toProxy();else if("nodes"===t)return e.nodes.map(e=>e.toProxy());else if("first"===t||"last"===t)return e[t].toProxy();else return e[t]},set:(e,t,r)=>e[t]===r||(e[t]=r,("name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),o=this.normalize(t,this.proxyOf.nodes[n]).reverse();for(let t of(n=this.index(e),o))this.proxyOf.nodes.splice(n+1,0,t);for(let e in this.indexes)n<(r=this.indexes[e])&&(this.indexes[e]=r+o.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),o=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],o).reverse();for(let t of(n=this.index(e),i))this.proxyOf.nodes.splice(n,0,t);for(let e in this.indexes)n<=(r=this.indexes[e])&&(this.indexes[e]=r+i.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(n(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(let e of t=t.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if("root"===t.type&&"document"!==this.type)for(let e of t=t.nodes.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new eL(t)]}else if(t.selector)t=[new o(t)];else if(t.name)t=[new i(t)];else if(t.text)t=[new e7(t)];else throw Error("Unknown node type in node creation");return t.map(t=>(t[tt]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[te]&&function e(t){if(t[te]=!1,t.proxyOf.nodes)for(let r of t.proxyOf.nodes)e(r)}(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){for(let t of e=e.reverse()){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;for(let r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||(!t.fast||n.value.includes(t.fast))&&(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};tn.registerParse=e=>{n=e},tn.registerRule=e=>{o=e},tn.registerAtRule=e=>{i=e},tn.registerRoot=e=>{s=e},tn.default=tn,tn.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,i.prototype):"rule"===e.type?Object.setPrototypeOf(e,o.prototype):"decl"===e.type?Object.setPrototypeOf(e,eL.prototype):"comment"===e.type?Object.setPrototypeOf(e,e7.prototype):"root"===e.type&&Object.setPrototypeOf(e,s.prototype),e[tt]=!0,e.nodes&&e.nodes.forEac
1h(e=>{tn.rebuild(e)})};let to=tn,ti=class extends to{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new a(new l,this,e).stringify()}};ti.registerLazyResult=e=>{a=e},ti.registerProcessor=e=>{l=e},ti.default=ti;let ts=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};ts.default=ts;let ta=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){!t.plugin&&this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new ts(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};ta.default=ta;let tl=/[\t\n\f\r "#'()/;[\\\]{}]/g,tc=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,tu=/.[\r\n"'(/\\]/,td=/[\da-f]/i,th=tn,tf=class extends th{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)}};tf.default=tf,th.registerAtRule(tf);let tp=tn,tm=class extends tp{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t){if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before}return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new c(new u,this,e).stringify()}};tm.registerLazyResult=e=>{c=e},tm.registerProcessor=e=>{u=e},tm.default=tm,tp.registerRoot(tm);let tg={comma:e=>tg.split(e,[","],!0),space:e=>tg.split(e,[" ","\n","	"]),split(e,t,r){let n=[],o="",i=!1,s=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?s+=1:")"===r?s>0&&(s-=1):0===s&&t.includes(r)&&(i=!0),i?(""!==o&&n.push(o.trim()),o="",i=!1):o+=r;return(r||""!==o)&&n.push(o.trim()),n}};tg.default=tg;let ty=tn,tw=class extends ty{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return tg.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};tw.default=tw,ty.registerRule(tw);let tb=function(e,t={}){let r,n,o,i,s,a,l,c,u,d,h=e.css.valueOf(),f=t.ignoreErrors,p=h.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>=p},nextToken:function(e){if(y.length)return y.pop();if(m>=p)return;let t=!!e&&e.ignoreUnclosed;switch(r=h.charCodeAt(m)){case 10:case 32:case 9:case 13:case 12:n=m;do n+=1,r=h.charCodeAt(n);while(32===r||10===r||9===r||13===r||12===r)d=["space",h.slice(m,n)],m=n-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(r);d=[e,e,m];break}case 40:if(c=g.length?g.pop()[1]:"",u=h.charCodeAt(m+1),"url"===c&&39!==u&&34!==u&&32!==u&&10!==u&&9!==u&&12!==u&&13!==u){n=m;do{if(a=!1,-1===(n=h.indexOf(")",n+1)))if(f||t){n=m;break}else w("bracket");for(l=n;
192===h.charCodeAt(l-1);)l-=1,a=!a}while(a)d=["brackets",h.slice(m,n+1),m,n],m=n}else n=h.indexOf(")",m+1),i=h.slice(m,n+1),-1===n||tu.test(i)?d=["(","(",m]:(d=["brackets",i,m,n],m=n);break;case 39:case 34:o=39===r?"'":'"',n=m;do{if(a=!1,-1===(n=h.indexOf(o,n+1)))if(f||t){n=m+1;break}else w("string");for(l=n;92===h.charCodeAt(l-1);)l-=1,a=!a}while(a)d=["string",h.slice(m,n+1),m,n],m=n;break;case 64:tl.lastIndex=m+1,tl.test(h),n=0===tl.lastIndex?h.length-1:tl.lastIndex-2,d=["at-word",h.slice(m,n+1),m,n],m=n;break;case 92:for(n=m,s=!0;92===h.charCodeAt(n+1);)n+=1,s=!s;if(r=h.charCodeAt(n+1),s&&47!==r&&32!==r&&10!==r&&9!==r&&13!==r&&12!==r&&(n+=1,td.test(h.charAt(n)))){for(;td.test(h.charAt(n+1));)n+=1;32===h.charCodeAt(n+1)&&(n+=1)}d=["word",h.slice(m,n+1),m,n],m=n;break;default:47===r&&42===h.charCodeAt(m+1)?(0===(n=h.indexOf("*/",m+2)+1)&&(f||t?n=h.length:w("comment")),d=["comment",h.slice(m,n+1),m,n]):(tc.lastIndex=m+1,tc.test(h),n=0===tc.lastIndex?h.length-1:tc.lastIndex-2,d=["word",h.slice(m,n+1),m,n],g.push(d)),m=n}return m++,d},position:function(){return m}}},tv={empty:!0,space:!0},tC=class{constructor(e){this.input=e,this.root=new tm,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,o=new tf;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,s=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length)if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}else if("{"===t){s=!0;break}else if("}"===t){if(a.length>0){for(n=a.length-1,r=a[n];r&&"space"===r[0];)r=a[--n];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(o.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(o,"params",a),i&&(e=a[a.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),s&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t,r=this.colon(e);if(!1===r)return;let n=0;for(let o=r-1;o>=0&&("space"===(t=e[o])[0]||2!==(n+=1));o--);throw this.input.error("Missed semicolon","word"===t[0]?t[3]+1:t[2])}colon(e){let t,r,n=0;for(let[o,i]of e.entries()){if("("===(t=i[0])&&(n+=1),")"===t&&(n-=1),0===n&&":"===t)if(r)if("word"===r[0]&&"progid"===r[1])continue;else return o;else this.doubleColon(i);r=i}return!1}comment(e){let t=new e7;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=tb(this.input)}decl(e,t){let r,n,o=new eL;this.init(o,e[0][2]);let i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),o.source.end=this.getPosition(i[3]||i[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(e)),o.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),o.raws.before+=e.shift()[1];for(o.source.start=this.getPosition(e[0][2]),o.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;o.prop+=e.shift()[1]}for(o.raws.between="";e.length;){if(":"===(r=e.shift())[0]){o.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),o.raws.between+=r[1]}("_"===o.prop[0]||"*"===o.prop[0])&&(o.raws.before+=o.prop[0],o.prop=o.prop.slice(1));let s=[];for(;e.length&&("space"===(n=e[0][0])||"comment"===n);)s.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if("!important"===(r=e[t])[1].toLowerCase()){o.important=!0;let r=this.stringFrom(e,t);" !important"!==(r=this.spacesFromEnd(e)+r)&&(o.raws.important=r);break}if("important"===r[1].toLowerCase()){let r=e.slice(0),n="";for(let e=t;e>0;e--){let t=r[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=r.pop()[1]+n}0===n.trim().indexOf("!")&&(o.important=!0,o.raws.important=n,e=r)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(o.raws.between+=s.map(e=>e[1]).join(""),s=[]),this.raw(o,"value",s.concat(e),t),o.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 tw;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,o=null,i=[],s=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)o||(o=l),i.push("("===r?")":"]");else if(s&&n&&"{"===r)o||(o=l),i.push("}");else if(0===i.length)if(";"===r)if(n)return void this.decl(a,s);else break;else if("{"===r)return void this.rule(a);else if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}else":"===r&&(n=!0);else r===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));l=this.tokenizer.nextToken()}
1if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&n){if(!s)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let o,i,s,a,l=r.length,c="",u=!0;for(let e=0;e<l;e+=1)"space"!==(i=(o=r[e])[0])||e!==l-1||n?"comment"===i?(a=r[e-1]?r[e-1][0]:"empty",s=r[e+1]?r[e+1][0]:"empty",tv[a]||tv[s]||","===c.slice(-1)?u=!1:c+=o[1]):c+=o[1]:u=!1;if(!u){let n=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:n,value:c}}e[t]=c}rule(e){e.pop();let t=new tw;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};function tS(e,t){let r=new tC(new eX(e,t));try{r.parse()}catch(e){throw e}return r.root}tS.default=tS,tn.registerParse(tS);let{isClean:tI,my:tk}=ex,tx={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},tA={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},tE={Once:!0,postcssPlugin:!0,prepare:!0};function tO(e){return"object"==typeof e&&"function"==typeof e.then}function tM(e){let t=!1,r=tx[e.type];return("decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append)?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function tR(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:tM(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function tP(e){return e[tI]=!1,e.nodes&&e.nodes.forEach(e=>tP(e)),e}let tT={},tL=class e{constructor(t,r,n){let o;if(this.stringified=!1,this.processed=!1,"object"==typeof r&&null!==r&&("root"===r.type||"document"===r.type))o=tP(r);else if(r instanceof e||r instanceof ta)o=tP(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=tS;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{o=e(r,n)}catch(e){this.processed=!0,this.error=e}o&&!o[tk]&&tn.rebuild(o)}this.result=new ta(t,o,n),this.helpers={...tT,postcss:tT,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!tA[r]&&/^[A-Z]/.test(r))throw Error(`Unknown event ${r} in ${t.postcssPlugin}
1. Try to update PostCSS (${this.processor.version} now).`);if(!tE[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(tO(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[tI];){e[tI]=!0;let t=[tR(e)];for(;t.length>0;){let e=this.visitTick(t);if(tO(e))try{await e}catch(r){let e=t[t.length-1].node;throw this.handleError(r,e)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));if(tO(t[0]))return Promise.all(t);return t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=eO;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new e4(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(tO(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[tI];)e[tI]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(tO(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(n.length>0&&t.visitorIndex<n.length){let[e,o]=n[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return o(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let n,o=t.iterator;for(;n=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!n[tI]){n[tI]=!0,e.push(tR(n));return}t.iterator=0,delete r.indexes[o]}let o=t.events;for(;t.eventIndex<o.length;){let e=o[t.eventIndex];if(t.eventIndex+=1,0===e){r.nodes&&r.nodes.length&&(r[tI]=!0,t.iterator=r.getIterator());return}if(this.listeners[e]){t.visitors=this.listeners[e];return}}e.pop()}walkSync(e){for(let t of(e[tI]=!0,tM(e)))if(0===t)e.nodes&&e.each(e=>{e[tI]||this.walkSync(e)});else{let r=this.listeners[t];if(r&&this.visitSync(r,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"}};tL.registerPostcss=e=>{tT=e},tL.default=tL,tm.registerLazyResult(tL),ti.registerLazyResult(tL);let tD=class{constructor(e,t,r){let n;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0,this.result=new ta(this._processor,n,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new e4(eO,n,this._opts,t);
1if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){let e;if(this._root)return this._root;try{e=tS(this._css,this._opts)}catch(e){this.error=e}if(!this.error)return this._root=e,e;throw this.error}get[Symbol.toStringTag](){return"NoWorkResult"}};tD.default=tD;let tN=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"==typeof r&&(r.parse||r.stringify));else throw Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new tL(this,e,t):new tD(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};function t_(e,t){if(Array.isArray(e))return e.map(e=>t_(e));let{inputs:r,...n}=e;if(r)for(let e of(t=[],r)){let r={...e,__proto__:eX.prototype};r.map&&(r.map={...r.map,__proto__:eF.prototype}),t.push(r)}if(n.nodes&&(n.nodes=e.nodes.map(e=>t_(e,t))),n.source){let{inputId:e,...r}=n.source;n.source=r,null!=e&&(n.source.input=t[e])}if("root"===n.type)return new tm(n);if("decl"===n.type)return new eL(n);if("rule"===n.type)return new tw(n);if("comment"===n.type)return new e7(n);if("atrule"===n.type)return new tf(n);else throw Error("Unknown node type: "+e.type)}function tj(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new tN(e)}tN.default=tN,tm.registerProcessor(tN),ti.registerProcessor(tN),t_.default=t_,tj.plugin=function(e,t){let r,n=!1;function o(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),k.default.env.LANG&&k.default.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let i=t(...r);return i.postcssPlugin=e,i.postcssVersion=new tN().version,i}return Object.defineProperty(o,"postcss",{get:()=>(r||(r=o()),r)}),o.process=function(e,t,r){return tj([o(r)]).process(e,t)},o},tj.stringify=eO,tj.parse=tS,tj.fromJSON=t_,tj.list=tg,tj.comment=e=>new e7(e),tj.atRule=e=>new tf(e),tj.decl=e=>new eL(e),tj.rule=e=>new tw(e),tj.root=e=>new tm(e),tj.document=e=>new ti(e),tj.CssSyntaxError=ek,tj.Declaration=eL,tj.Container=tn,tj.Processor=tN,tj.Document=ti,tj.Comment=e7,tj.Warning=ts,tj.AtRule=tf,tj.Result=ta,tj.Input=eX,tj.Rule=tw,tj.Root=tm,tj.Node=eP,tL.registerPostcss(tj),tj.default=tj;let tU=tj&&tj.__esModule&&Object.prototype.hasOwnProperty.call(tj,"default")?tj.default:tj;tU.stringify,tU.fromJSON,tU.plugin,tU.parse,tU.list,tU.document,tU.comment,tU.atRule,tU.rule,tU.decl,tU.root,tU.CssSyntaxError,tU.Declaration,tU.Container,tU.Processor,tU.Document,tU.Comment,tU.Warning,tU.AtRule,tU.Result,tU.Input,tU.Rule,tU.Root,tU.Node;var tB=Object.defineProperty,tF=(e,t,r)=>{let n;return(n="symbol"!=typeof t?t+"":t)in e?tB(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r},t$={exports:{}},tz=String,tV=function(){return{isColorSupported:!1,reset:tz,bold:tz,dim:tz,italic:tz,underline:tz,inverse:tz,hidden:tz,strikethrough:tz,black:tz,red:tz,green:tz,yellow:tz,blue:tz,magenta:tz,cyan:tz,white:tz,gray:tz,bgBlack:tz,bgRed:tz,bgGreen:tz,bgYellow:tz,bgBlue:tz,bgMagenta:tz,bgCyan:tz,bgWhite:tz}};t$.exports=tV(),t$.exports.createColors=tV;var tW=t$.exports;let tG=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};
1return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),tH=class e extends Error{constructor(t,r,n,o,i,s){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),o&&(this.source=o),s&&(this.plugin=s),void 0!==r&&void 0!==n&&("number"==typeof r?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.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){let t,r;if(!this.source)return"";let n=this.source;null==e&&(e=tW.isColorSupported),tG&&e&&(n=tG(n));let o=n.split(/\r?\n/),i=Math.max(this.line-3,0),s=Math.min(this.line+2,o.length),a=String(s).length;if(e){let{bold:e,gray:n,red:o}=tW.createColors(!0);t=t=>e(o(t)),r=e=>n(e)}else t=r=e=>e;return o.slice(i,s).map((e,n)=>{let o=i+1+n,s=" "+(" "+o).slice(-a)+" | ";if(o===this.line){let n=r(s.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return t(">")+r(s)+e+"\n "+n+t("^")}return" "+r(s)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};tH.default=tH;var tY={};tY.isClean=Symbol("isClean"),tY.my=Symbol("my");let tJ={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1},tZ=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+n+o,e)}}beforeAfter(e,t){let r;r="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 n=e.parent,o=0;for(;n&&"root"!==n.type;)o+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<o;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let o=e.nodes[n],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(e,t,r){let n;if(r||(r=t),t&&void 0!==(n=e.raws[t]))return n;let o=e.parent;if("before"===r&&(!o||"root"===o.type&&o.first===e||o&&"document"===o.type))return"";if(!o)return tJ[r];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[r])return i.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{var s;let o="raw"+((s=r)[0].toUpperCase()+s.slice(1));this[o]?n=this[o](i,e):i.walk(e=>{if(void 0!==(n=e.raws[t]))return!1})}return void 0===n&&(n=tJ[r]),i.rawCache[r]=n,n}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).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return(t=r.raws.before).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&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(e){let t;return e.raws.indent?e.raws.indent:(e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=(t=e[e.length-1]).replace(/\S/g,""),!1}}),t)}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};function tq(e,t){new tZ(t).stringify(e)}tZ.default=tZ,tq.default=tq;let{isClean:tX,my:tK}=tY,tQ=class{constructor(e={}){for(let t in this.raws={},this[tX]=!1,this[tK]=!0,e)if("nodes"===t)for(let r of(this.nodes=[],e[t]))"function"==typeof r.clone?this.append(r.clone()):this.append(r);else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=function e(t,r){let n=new t.constructor;for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||"proxyCache"===o)continue;let i=t[o],s=typeof i;"parent"===o&&"object"===s?r&&(n[o]=r):"source"===o?n[o]=i:Array.isArray(i)?n[o]=i.map(t=>e(t,n)):("object"===s&&null!==i&&(i=e(i)),n[o]=i)}return n}(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}
1error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new tH(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>e[t]===r||(e[t]=r,("prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0)}}markDirty(){if(this[tX]){this[tX]=!1;let e=this;for(;e=e.parent;)e[tX]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,o=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(n=1,o+=1):n+=1;return{column:n,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),o=n.indexOf(e.word);-1!==o&&(t=this.positionInside(o,n),r=this.positionInside(o+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new tZ().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let o=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||"parent"===e||"proxyCache"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let i=t.get(n.input);null==i&&(i=o,t.set(n.input,o),o++),r[e]={end:n.end,inputId:i,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=tq){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}};tQ.default=tQ;let t0=tQ,t1=class extends t0{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]}};t1.default=t1;let{SourceMapConsumer:t2,SourceMapGenerator:t5}=tG,{existsSync:t3,readFileSync:t8}=tG,{dirname:t6,join:t4}=tG,t9=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=t6(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new t2(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)){var t;return t=e.substr(RegExp.lastMatch.length),I.Buffer.from(t,"base64").toString()}throw Error("Unsupported source map encoding "+e.match(/data:application\/json;([^,]+),/)[1])}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);
1if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=t6(e),t3(e))return this.mapFile=e,t8(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t)if("string"==typeof t)return t;else if("function"==typeof t){let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw Error("Unable to load previous source map: "+r.toString());return e}}else if(t instanceof t2)return t5.fromSourceMap(t).toString();else if(t instanceof t5)return t.toString();else if(this.isMap(t))return JSON.stringify(t);else throw Error("Unsupported previous source map format: "+t.toString());else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let t=this.annotation;return e&&(t=t4(t6(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)}};t9.default=t9;let{SourceMapConsumer:t7,SourceMapGenerator:re}=tG,{fileURLToPath:rt,pathToFileURL:rr}=tG,{isAbsolute:rn,resolve:ro}=tG,{nanoid:ri}={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",o=r;for(;o--;)n+=e[Math.random()*e.length|0];return n}}
1,rs=Symbol("fromOffsetCache"),ra=!!(t7&&re),rl=!!(ro&&rn),rc=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\uFEFF"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!rl||/^\w+:\/\//.test(t.from)||rn(t.from)?this.file=t.from:this.file=ro(t.from)),rl&&ra){let e=new t9(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 "+ri(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let o,i,s;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);i=e.line,s=e.col}else i=n.line,s=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,i,s);return(o=a?new tH(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,n.plugin):new tH(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:s,line:i},this.css,this.file,n.plugin)).input={column:r,endColumn:s,endLine:i,line:t,source:this.css},this.file&&(rr&&(o.input.url=rr(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[rs])r=this[rs];else{let e=this.css.split("\n");r=Array(e.length);let t=0;for(let n=0,o=e.length;n<o;n++)r[n]=t,t+=e[n].length+1;this[rs]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,o=r.length-2;for(;n<o;)if(e<r[t=n+(o-n>>1)])o=t-1;else if(e>=r[t+1])n=t+1;else{n=t;break}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ro(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){let o,i;if(!this.map)return!1;let s=this.map.consumer(),a=s.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(o=s.originalPositionFor({column:n,line:r})),i=rn(a.source)?rr(a.source):new URL(a.source,this.map.consumer().sourceRoot||rr(this.map.mapFile));let l={column:a.column,endColumn:o&&o.column,endLine:o&&o.line,line:a.line,url:i.toString()};if("file:"===i.protocol)if(rt)l.file=rt(i);else throw Error("file: protocol is not available in this PostCSS build");let c=s.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}};rc.default=rc,tG&&tG.registerInput&&tG.registerInput(rc);let{SourceMapConsumer:ru,SourceMapGenerator:rd}=tG,{dirname:rh,relative:rf,resolve:rp,sep:rm}=tG,{pathToFileURL:rg}=tG,ry=!!(ru&&rd),rw=!!(rh&&rp&&rf&&rm),rb=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,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,r=this.toUrl(this.path(e.file)),n=e.root||rh(e.file);!1===this.mapOpts.sourcesContent?(t=new ru(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).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(),rw&&ry&&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=rd.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new rd({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(){let e,t;this.css="",this.map=new rd({file:this.outputFile(),ignoreInvalidMapping:!0});let r=1,n=1,o="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(s,a,l)=>{if(this.css+=s,a&&"end"!==l&&(i.generated.line=r,i.generated.column=n-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):(i.source=o,i.original.line=1,i.original.column=0),this.map.addMapping(i)),(e=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),n=s.length-t):n+=s.length,a&&"start"!==l){let e=a.parent||{raws:{}};(!("decl"===a.type||"atrule"===a.type&&!a.nodes)||a!==e.last||e.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=r,i.generated.column=n-2):(i.source=o,i.original.line=1,i.original.column=0,i.generated.line=r,i.generated.column=n-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||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?rh(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=rh(rp(r,this.mapOpts.annotation)));let n=rf(r,e);return this.memoizedPaths.set(e,n),n}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 rc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,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 I.Buffer.from(e).toString("base64")}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(rg){let t=rg(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===rm&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},rv=tQ,rC=class extends rv{constructor(e){super(e),this.type="comment"}};rC.default=rC;let{isClean:rS,my:rI}=tY,rk=tQ,rx=class e extends rk{append(...e){for(let t of e)for(let e of this.normalize(t,this.last))this.proxyOf.nodes.push(e);return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){let t,r;if(!this.proxyOf.nodes)return;let n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],!1!==(r=e(this.proxyOf.nodes[t],t)));)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){if("proxyOf"===t)return e;if(!e[t])return e[t];if("each"===t||"string"==typeof t&&t.startsWith("walk"))return(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e));if("every"===t||"some"===t)return r=>e[t]((e,...t)=>r(e.toProxy(),...t));if("root"===t)return()=>
1e.root().toProxy();else if("nodes"===t)return e.nodes.map(e=>e.toProxy());else if("first"===t||"last"===t)return e[t].toProxy();else return e[t]},set:(e,t,r)=>e[t]===r||(e[t]=r,("name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),o=this.normalize(t,this.proxyOf.nodes[n]).reverse();for(let t of(n=this.index(e),o))this.proxyOf.nodes.splice(n+1,0,t);for(let e in this.indexes)n<(r=this.indexes[e])&&(this.indexes[e]=r+o.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),o=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],o).reverse();for(let t of(n=this.index(e),i))this.proxyOf.nodes.splice(n,0,t);for(let e in this.indexes)n<=(r=this.indexes[e])&&(this.indexes[e]=r+i.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(d(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(let e of t=t.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if("root"===t.type&&"document"!==this.type)for(let e of t=t.nodes.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new t1(t)]}else if(t.selector)t=[new h(t)];else if(t.name)t=[new f(t)];else if(t.text)t=[new rC(t)];else throw Error("Unknown node type in node creation");return t.map(t=>(t[rI]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[rS]&&function e(t){if(t[rS]=!1,t.proxyOf.nodes)for(let r of t.proxyOf.nodes)e(r)}(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){for(let t of e=e.reverse()){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;for(let r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||(!t.fast||n.value.includes(t.fast))&&(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};rx.registerParse=e=>{d=e},rx.registerRule=e=>{h=e},rx.registerAtRule=e=>{f=e},rx.registerRoot=e=>{p=e},rx.default=rx,rx.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,f.prototype):"rule"===e.type?Object.setPrototypeOf(e,h.prototype):"decl"===e.type?Object.setPrototypeOf(e,t1.prototype):"comment"===e.type?Object.setPrototypeOf(e,rC.prototype):"root"===e.type&&Object.setPrototypeOf(e,p.prototype),e[rI]=!0,e.nodes&&e.nodes.forEac
1h(e=>{rx.rebuild(e)})};let rA=rx,rE=class extends rA{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new m(new g,this,e).stringify()}};rE.registerLazyResult=e=>{m=e},rE.registerProcessor=e=>{g=e},rE.default=rE;let rO=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};rO.default=rO;let rM=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){!t.plugin&&this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new rO(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};rM.default=rM;let rR=/[\t\n\f\r "#'()/;[\\\]{}]/g,rP=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,rT=/.[\r\n"'(/\\]/,rL=/[\da-f]/i,rD=rx,rN=class extends rD{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)}};rN.default=rN,rD.registerAtRule(rN);let r_=rx,rj=class extends r_{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t){if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before}return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new y(new w,this,e).stringify()}};rj.registerLazyResult=e=>{y=e},rj.registerProcessor=e=>{w=e},rj.default=rj,r_.registerRoot(rj);let rU={comma:e=>rU.split(e,[","],!0),space:e=>rU.split(e,[" ","\n","	"]),split(e,t,r){let n=[],o="",i=!1,s=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?s+=1:")"===r?s>0&&(s-=1):0===s&&t.includes(r)&&(i=!0),i?(""!==o&&n.push(o.trim()),o="",i=!1):o+=r;return(r||""!==o)&&n.push(o.trim()),n}};rU.default=rU;let rB=rx,rF=class extends rB{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return rU.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};rF.default=rF,rB.registerRule(rF);let r$=function(e,t={}){let r,n,o,i,s,a,l,c,u,d,h=e.css.valueOf(),f=t.ignoreErrors,p=h.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>=p},nextToken:function(e){if(y.length)return y.pop();if(m>=p)return;let t=!!e&&e.ignoreUnclosed;switch(r=h.charCodeAt(m)){case 10:case 32:case 9:case 13:case 12:n=m;do n+=1,r=h.charCodeAt(n);while(32===r||10===r||9===r||13===r||12===r)d=["space",h.slice(m,n)],m=n-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(r);d=[e,e,m];break}case 40:if(c=g.length?g.pop()[1]:"",u=h.charCodeAt(m+1),"url"===c&&39!==u&&34!==u&&32!==u&&10!==u&&9!==u&&12!==u&&13!==u){n=m;do{if(a=!1,-1===(n=h.indexOf(")",n+1)))if(f||t){n=m;break}else w("bracket");for(l=n;
192===h.charCodeAt(l-1);)l-=1,a=!a}while(a)d=["brackets",h.slice(m,n+1),m,n],m=n}else n=h.indexOf(")",m+1),i=h.slice(m,n+1),-1===n||rT.test(i)?d=["(","(",m]:(d=["brackets",i,m,n],m=n);break;case 39:case 34:o=39===r?"'":'"',n=m;do{if(a=!1,-1===(n=h.indexOf(o,n+1)))if(f||t){n=m+1;break}else w("string");for(l=n;92===h.charCodeAt(l-1);)l-=1,a=!a}while(a)d=["string",h.slice(m,n+1),m,n],m=n;break;case 64:rR.lastIndex=m+1,rR.test(h),n=0===rR.lastIndex?h.length-1:rR.lastIndex-2,d=["at-word",h.slice(m,n+1),m,n],m=n;break;case 92:for(n=m,s=!0;92===h.charCodeAt(n+1);)n+=1,s=!s;if(r=h.charCodeAt(n+1),s&&47!==r&&32!==r&&10!==r&&9!==r&&13!==r&&12!==r&&(n+=1,rL.test(h.charAt(n)))){for(;rL.test(h.charAt(n+1));)n+=1;32===h.charCodeAt(n+1)&&(n+=1)}d=["word",h.slice(m,n+1),m,n],m=n;break;default:47===r&&42===h.charCodeAt(m+1)?(0===(n=h.indexOf("*/",m+2)+1)&&(f||t?n=h.length:w("comment")),d=["comment",h.slice(m,n+1),m,n]):(rP.lastIndex=m+1,rP.test(h),n=0===rP.lastIndex?h.length-1:rP.lastIndex-2,d=["word",h.slice(m,n+1),m,n],g.push(d)),m=n}return m++,d},position:function(){return m}}},rz={empty:!0,space:!0},rV=class{constructor(e){this.input=e,this.root=new rj,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,o=new rN;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,s=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length)if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}else if("{"===t){s=!0;break}else if("}"===t){if(a.length>0){for(n=a.length-1,r=a[n];r&&"space"===r[0];)r=a[--n];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(o.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(o,"params",a),i&&(e=a[a.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),s&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t,r=this.colon(e);if(!1===r)return;let n=0;for(let o=r-1;o>=0&&("space"===(t=e[o])[0]||2!==(n+=1));o--);throw this.input.error("Missed semicolon","word"===t[0]?t[3]+1:t[2])}colon(e){let t,r,n=0;for(let[o,i]of e.entries()){if("("===(t=i[0])&&(n+=1),")"===t&&(n-=1),0===n&&":"===t)if(r)if("word"===r[0]&&"progid"===r[1])continue;else return o;else this.doubleColon(i);r=i}return!1}comment(e){let t=new rC;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=r$(this.input)}decl(e,t){let r,n,o=new t1;this.init(o,e[0][2]);let i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),o.source.end=this.getPosition(i[3]||i[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(e)),o.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),o.raws.before+=e.shift()[1];for(o.source.start=this.getPosition(e[0][2]),o.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;o.prop+=e.shift()[1]}for(o.raws.between="";e.length;){if(":"===(r=e.shift())[0]){o.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),o.raws.between+=r[1]}("_"===o.prop[0]||"*"===o.prop[0])&&(o.raws.before+=o.prop[0],o.prop=o.prop.slice(1));let s=[];for(;e.length&&("space"===(n=e[0][0])||"comment"===n);)s.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if("!important"===(r=e[t])[1].toLowerCase()){o.important=!0;let r=this.stringFrom(e,t);" !important"!==(r=this.spacesFromEnd(e)+r)&&(o.raws.important=r);break}if("important"===r[1].toLowerCase()){let r=e.slice(0),n="";for(let e=t;e>0;e--){let t=r[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=r.pop()[1]+n}0===n.trim().indexOf("!")&&(o.important=!0,o.raws.important=n,e=r)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(o.raws.between+=s.map(e=>e[1]).join(""),s=[]),this.raw(o,"value",s.concat(e),t),o.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 rF;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,o=null,i=[],s=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)o||(o=l),i.push("("===r?")":"]");else if(s&&n&&"{"===r)o||(o=l),i.push("}");else if(0===i.length)if(";"===r)if(n)return void this.decl(a,s);else break;else if("{"===r)return void this.rule(a);else if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}else":"===r&&(n=!0);else r===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));l=this.tokenizer.nextToken()}
1if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&n){if(!s)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let o,i,s,a,l=r.length,c="",u=!0;for(let e=0;e<l;e+=1)"space"!==(i=(o=r[e])[0])||e!==l-1||n?"comment"===i?(a=r[e-1]?r[e-1][0]:"empty",s=r[e+1]?r[e+1][0]:"empty",rz[a]||rz[s]||","===c.slice(-1)?u=!1:c+=o[1]):c+=o[1]:u=!1;if(!u){let n=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:n,value:c}}e[t]=c}rule(e){e.pop();let t=new rF;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};function rW(e,t){let r=new rV(new rc(e,t));try{r.parse()}catch(e){throw e}return r.root}rW.default=rW,rx.registerParse(rW);let{isClean:rG,my:rH}=tY,rY={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},rJ={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},rZ={Once:!0,postcssPlugin:!0,prepare:!0};function rq(e){return"object"==typeof e&&"function"==typeof e.then}function rX(e){let t=!1,r=rY[e.type];return("decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append)?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function rK(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:rX(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function rQ(e){return e[rG]=!1,e.nodes&&e.nodes.forEach(e=>rQ(e)),e}let r0={},r1=class e{constructor(t,r,n){let o;if(this.stringified=!1,this.processed=!1,"object"==typeof r&&null!==r&&("root"===r.type||"document"===r.type))o=rQ(r);else if(r instanceof e||r instanceof rM)o=rQ(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=rW;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{o=e(r,n)}catch(e){this.processed=!0,this.error=e}o&&!o[rH]&&rx.rebuild(o)}this.result=new rM(t,o,n),this.helpers={...r0,postcss:r0,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!rJ[r]&&/^[A-Z]/.test(r))throw Error(`Unknown event ${r} in ${t.postcssPlugin}
1. Try to update PostCSS (${this.processor.version} now).`);if(!rZ[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(rq(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[rG];){e[rG]=!0;let t=[rK(e)];for(;t.length>0;){let e=this.visitTick(t);if(rq(e))try{await e}catch(r){let e=t[t.length-1].node;throw this.handleError(r,e)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));if(rq(t[0]))return Promise.all(t);return t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=tq;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new rb(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(rq(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[rG];)e[rG]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(rq(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(n.length>0&&t.visitorIndex<n.length){let[e,o]=n[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return o(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let n,o=t.iterator;for(;n=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!n[rG]){n[rG]=!0,e.push(rK(n));return}t.iterator=0,delete r.indexes[o]}let o=t.events;for(;t.eventIndex<o.length;){let e=o[t.eventIndex];if(t.eventIndex+=1,0===e){r.nodes&&r.nodes.length&&(r[rG]=!0,t.iterator=r.getIterator());return}if(this.listeners[e]){t.visitors=this.listeners[e];return}}e.pop()}walkSync(e){for(let t of(e[rG]=!0,rX(e)))if(0===t)e.nodes&&e.each(e=>{e[rG]||this.walkSync(e)});else{let r=this.listeners[t];if(r&&this.visitSync(r,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"}};r1.registerPostcss=e=>{r0=e},r1.default=r1,rj.registerLazyResult(r1),rE.registerLazyResult(r1);let r2=class{constructor(e,t,r){let n;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0,this.result=new rM(this._processor,n,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get:()=>o.root});let i=new rb(tq,n,this._opts,t);
1if(i.isMap()){let[e,t]=i.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else i.clearAnnotation(),this.result.css=i.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){let e;if(this._root)return this._root;try{e=rW(this._css,this._opts)}catch(e){this.error=e}if(!this.error)return this._root=e,e;throw this.error}get[Symbol.toStringTag](){return"NoWorkResult"}};r2.default=r2;let r5=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"==typeof r&&(r.parse||r.stringify));else throw Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new r1(this,e,t):new r2(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};function r3(e,t){if(Array.isArray(e))return e.map(e=>r3(e));let{inputs:r,...n}=e;if(r)for(let e of(t=[],r)){let r={...e,__proto__:rc.prototype};r.map&&(r.map={...r.map,__proto__:t9.prototype}),t.push(r)}if(n.nodes&&(n.nodes=e.nodes.map(e=>r3(e,t))),n.source){let{inputId:e,...r}=n.source;n.source=r,null!=e&&(n.source.input=t[e])}if("root"===n.type)return new rj(n);if("decl"===n.type)return new t1(n);if("rule"===n.type)return new rF(n);if("comment"===n.type)return new rC(n);if("atrule"===n.type)return new rN(n);else throw Error("Unknown node type: "+e.type)}function r8(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new r5(e)}r5.default=r5,rj.registerProcessor(r5),rE.registerProcessor(r5),r3.default=r3,r8.plugin=function(e,t){let r,n=!1;function o(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),k.default.env.LANG&&k.default.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let i=t(...r);return i.postcssPlugin=e,i.postcssVersion=new r5().version,i}return Object.defineProperty(o,"postcss",{get:()=>(r||(r=o()),r)}),o.process=function(e,t,r){return r8([o(r)]).process(e,t)},o},r8.stringify=tq,r8.parse=rW,r8.fromJSON=r3,r8.list=rU,r8.comment=e=>new rC(e),r8.atRule=e=>new rN(e),r8.decl=e=>new t1(e),r8.rule=e=>new rF(e),r8.root=e=>new rj(e),r8.document=e=>new rE(e),r8.CssSyntaxError=tH,r8.Declaration=t1,r8.Container=rx,r8.Processor=r5,r8.Document=rE,r8.Comment=rC,r8.Warning=rO,r8.AtRule=rN,r8.Result=rM,r8.Input=rc,r8.Rule=rF,r8.Root=rj,r8.Node=tQ,r1.registerPostcss(r8),r8.default=r8;let r6=r8&&r8.__esModule&&Object.prototype.hasOwnProperty.call(r8,"default")?r8.default:r8;r6.stringify,r6.fromJSON,r6.plugin,r6.parse,r6.list,r6.document,r6.comment,r6.atRule,r6.rule,r6.decl,r6.root,r6.CssSyntaxError,r6.Declaration,r6.Container,r6.Processor,r6.Document,r6.Comment,r6.Warning,r6.AtRule,r6.Result,r6.Input,r6.Rule,r6.Root,r6.Node;var r4=((oR=r4||{})[oR.Document=0]="Document",oR[oR.DocumentType=1]="DocumentType",oR[oR.Element=2]="Element",oR[oR.Text=3]="Text",oR[oR.CDATA=4]="CDATA",oR[oR.Comment=5]="Comment",oR);class r9{constructor(...e){tF(this,"parentElement",null),tF(this,"parentNode",null),tF(this,"ownerDocument"),tF(this,"firstChild",null),tF(this,"lastChild",null),tF(this,"previousSibling",null),tF(this,"nextSibling",null),tF(this,"ELEMENT_NODE",1),tF(this,"TEXT_NODE",3),tF(this,"nodeType"),tF(this,"nodeName"),tF(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof r9)||e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}var r7=((oP=r7||{})[oP.PLACEHOLDER=0]="PLACEHOLDER",oP[oP.ELEMENT_NODE=1]="ELEMENT_NODE",oP[oP.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",oP[oP.TEXT_NODE=3]="TEXT_NODE",oP[oP.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",oP[oP.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",oP[oP.ENTITY_NODE=6]="ENTITY_NODE",oP[oP.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",oP[oP.COMMENT_NODE=8]="COMMENT_NODE",oP[oP.DOCUMENT_NODE=9]="DOCUMENT_NODE",oP[oP.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",oP[oP.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",oP);let ne={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},nt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},nr={};function nn(e){if(nr[e])return nr[e];let t=globalThis[e],r=t.prototype,n=e in ne?ne[e]:void 0,o=!!(n&&n.every(e=>{var t,n;return!!(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),i=e in nt?nt[e]:void 0,s=!!(i&&i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(o&&s&&!globalThis.Zone)return nr[e]=t.prototype,t.prototype;try{let n=document.createElement("iframe");document.body.appendChild(n);let o=n.contentWindow;if(!o)return t.prototype;let i=o[e].prototype;if(document.body.removeChild(n),!i)return r;return nr[e]=i}catch{return r}}let no={};function ni(e,t,r){var n;let o=`${e}.${String(r)}`;if(no[o])return no[o].call(t);let i=null==(n=Object.getOwnPropertyDescriptor(nn(e),r))?void 0:n.get;return i?(no[o]=i,i.call(t)):t[r]}let ns={};function na(e,t,r){let n=`${e}.${String(r)}`;if(ns[n])return ns[n].bind(t);let o=nn(e)[r];return"function"!=typeof o?t[r]:(ns[n]=o,o.bind(t))}function nl(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],o=r(n);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch{return()=>{}}}let nc=function(e){return ni("Node",e,"ownerDocument")},nu=function(e){return ni("Node",e,"childNodes")},nd=function(e){return ni("Node",e,"parentNode")},nh=function(e){return ni("Node",e,"parentElement")},nf=function(e){return ni("Node",e,"textContent")},np=function(e,t){return na("Node",e,"contains")(t)},nm=function(e){return na("Node",e,"getRootNode")()},ng=function(e){return e&&"host"in e?ni("ShadowRoot",e,"host"):null},ny=function(e){return e&&"shadowRoot"in e?ni("Element",e,"shadowRoot"):null};function nw(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}let nb="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.",nv={map:{},getId:()=>(console.error(nb),-1),getNode:()=>(console.error(nb),null),removeNodeFromMap(){console.error(nb)},has:()=>(console.error(nb),!1),reset(){console.error(nb)}};function nC(e,t,r={}){let n=null,o=0;return function(...i){let s=Date.now();o||!1!==r.leading||(o=s);let a=t-(s-o),l=this;a<=0||a>t?(n&&(clearTimeout(n),n=null),o=s,e.apply(l,i)):n||!1===r.trailing||(n=setTimeout(()=>{o=!1===r.leading?0:Date.now(),n=null,e.apply(l,i)},a))}}function nS(e,t,r,n,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>nS(e,t,i||{},!0)}"u">typeof window&&window.Proxy&&window.Reflect&&(nv=new Proxy(nv,{get:(e,t,r)=>("map"===t&&console.error(nb),Reflect.get(e,t,r))}));let nI=Date.now;function nk(e){var t,r,n,o;let 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=nh(i.body))?void 0:t.scrollLeft)||(null==(r=null==i?void 0:i.body)?void 0:r.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(n=nh(i.body))?void 0:n.scrollTop)||(null==(o=null==i?void 0:i.body)?void 0:o.scrollTop)||0}}function nx(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function nA(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function nE(e){return e?e.nodeType===e.ELEMENT_NODE?e:nh(e):null}function nO(e,t,r,n){if(!e)return!1;let o=nE(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t)||n&&null!==o.closest("."+t))return!0}else if(ep(o,t,n))return!0}catch(e){}return!!(r&&(o.matches(r)||n&&null!==o.closest(r)))||!1}function nM(e,t,r){return"TITLE"===e.tagName&&!!r.headTitleMutations||-2===t.getId(e)}function nR(e){return!!e.changedTouches}
1function nP(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))}function nT(e,t){return!!("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function nL(e){return!!e&&(e instanceof r9&&"shadowRoot"in e?!!e.shadowRoot:!!ny(e))}/[1-9][0-9]{12}/.test(Date.now().toString())||(nI=()=>new Date().getTime());class nD{constructor(){A(this,"id",1),A(this,"styleIDMap",new WeakMap),A(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){let r;return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r)}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function nN(e){var t;let r=null;return"getRootNode"in e&&(null==(t=nm(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ng(nm(e))&&(r=ng(nm(e))),r}function n_(e){var t;let r,n=nc(e);return!!n&&(np(n,e)||!!(r=nc(t=e))&&np(r,function(e){let t,r=e;for(;t=nN(r);)r=t;return r}(t)))}var nj=((oT=nj||{})[oT.DomContentLoaded=0]="DomContentLoaded",oT[oT.Load=1]="Load",oT[oT.FullSnapshot=2]="FullSnapshot",oT[oT.IncrementalSnapshot=3]="IncrementalSnapshot",oT[oT.Meta=4]="Meta",oT[oT.Custom=5]="Custom",oT[oT.Plugin=6]="Plugin",oT),nU=((oL=nU||{})[oL.Mutation=0]="Mutation",oL[oL.MouseMove=1]="MouseMove",oL[oL.MouseInteraction=2]="MouseInteraction",oL[oL.Scroll=3]="Scroll",oL[oL.ViewportResize=4]="ViewportResize",oL[oL.Input=5]="Input",oL[oL.TouchMove=6]="TouchMove",oL[oL.MediaInteraction=7]="MediaInteraction",oL[oL.StyleSheetRule=8]="StyleSheetRule",oL[oL.CanvasMutation=9]="CanvasMutation",oL[oL.Font=10]="Font",oL[oL.Log=11]="Log",oL[oL.Drag=12]="Drag",oL[oL.StyleDeclaration=13]="StyleDeclaration",oL[oL.Selection=14]="Selection",oL[oL.AdoptedStyleSheet=15]="AdoptedStyleSheet",oL[oL.CustomElement=16]="CustomElement",oL),nB=((oD=nB||{})[oD.MouseUp=0]="MouseUp",oD[oD.MouseDown=1]="MouseDown",oD[oD.Click=2]="Click",oD[oD.ContextMenu=3]="ContextMenu",oD[oD.DblClick=4]="DblClick",oD[oD.Focus=5]="Focus",oD[oD.Blur=6]="Blur",oD[oD.TouchStart=7]="TouchStart",oD[oD.TouchMove_Departed=8]="TouchMove_Departed",oD[oD.TouchEnd=9]="TouchEnd",oD[oD.TouchCancel=10]="TouchCancel",oD),nF=((oN=nF||{})[oN.Mouse=0]="Mouse",oN[oN.Pen=1]="Pen",oN[oN.Touch=2]="Touch",oN),n$=((o_=n$||{})[o_["2D"]=0]="2D",o_[o_.WebGL=1]="WebGL",o_[o_.WebGL2=2]="WebGL2",o_),nz=((oj=nz||{})[oj.Play=0]="Play",oj[oj.Pause=1]="Pause",oj[oj.Seeked=2]="Seeked",oj[oj.VolumeChange=3]="VolumeChange",oj[oj.RateChange=4]="RateChange",oj),nV=((oU=nV||{}).Start="start",oU.Pause="pause",oU.Resume="resume",oU.Resize="resize",oU.Finish="finish",oU.FullsnapshotRebuilded="fullsnapshot-rebuilded",oU.LoadStylesheetStart="load-stylesheet-start",oU.LoadStylesheetEnd="load-stylesheet-end",oU.SkipStart="skip-start",oU.SkipEnd="skip-end",oU.MouseInteraction="mouse-interaction",oU.EventCast="event-cast",oU.CustomEvent="custom-event",oU.Flush="flush",oU.StateChange="state-change",oU.PlayBack="play-back",oU.Destroy="destroy",oU),nW=((oB=nW||{})[oB.Document=0]="Document",oB[oB.DocumentType=1]="DocumentType",oB[oB.Element=2]="Element",oB[oB.Text=3]="Text",oB[oB.CDATA=4]="CDATA",oB[oB.Comment=5]="Comment",oB);class nG{constructor(){A(this,"length",0),A(this,"head",null),A(this,"tail",null)}get(e){if(e>=this.length)throw Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&"__ln"in e.previousSibling){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&"__ln"in e.nextSibling&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;
1this.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--)}}let nH=(e,t)=>`${e}@${t}`;class nY{constructor(){A(this,"frozen",!1),A(this,"locked",!1),A(this,"texts",[]),A(this,"attributes",[]),A(this,"attributeMap",new WeakMap),A(this,"removes",[]),A(this,"mapRemoves",[]),A(this,"movedMap",{}),A(this,"addedSet",new Set),A(this,"movedSet",new Set),A(this,"droppedSet",new Set),A(this,"removesSubTreeCache",new Set),A(this,"mutationCb"),A(this,"blockClass"),A(this,"blockSelector"),A(this,"maskTextClass"),A(this,"maskTextSelector"),A(this,"inlineStylesheet"),A(this,"maskInputOptions"),A(this,"maskTextFn"),A(this,"maskInputFn"),A(this,"keepIframeSrcFn"),A(this,"recordCanvas"),A(this,"inlineImages"),A(this,"slimDOMOptions"),A(this,"dataURLOptions"),A(this,"doc"),A(this,"mirror"),A(this,"iframeManager"),A(this,"stylesheetManager"),A(this,"shadowDomManager"),A(this,"canvasManager"),A(this,"processedNodeManager"),A(this,"unattachedDoc"),A(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),A(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new nG,n=e=>{let t=e,r=-2;for(;-2===r;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},o=o=>{let i=nd(o);if(!i||!n_(o))return;let s=!1;if(o.nodeType===Node.TEXT_NODE){let e=i.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(i)&&(s=!0)}let a=z(i)?this.mirror.getId(nN(o)):this.mirror.getId(i),l=n(o);if(-1===a||-1===l)return r.addNode(o);let c=ew(o,{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=>{nP(e,this.mirror)&&this.iframeManager.addIframe(e),nT(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),nL(o)&&this.shadowDomManager.addShadowRoot(ny(o),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:s});c&&(e.push({parentId:a,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)(!nZ(this.removesSubTreeCache,e,this.mirror)||this.movedSet.has(nd(e)))&&o(e);for(let e of this.addedSet)nq(this.droppedSet,e)||nZ(this.removesSubTreeCache,e,this.mirror)?nq(this.movedSet,e)?o(e):this.droppedSet.add(e):o(e);let i=null;for(;r.length;){let e=null;if(i){let t=this.mirror.getId(nd(i.value)),r=n(i.value);-1!==t&&-1!==r&&(e=i)}if(!e){let t=r.tail;for(;t;){let r=t;if(t=t.previous,r){let t=this.mirror.getId(nd(r.value));if(-1===n(r.value))continue;if(-1!==t){e=r;break}{let t=nd(r.value);if(t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let n=ng(t);if(-1!==this.mirror.getId(n)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}i=e.previous,r.removeNode(e.value),o(e.value)}let s={texts:this.texts.map(e=>{let t=e.node,r=nd(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if("string"==typeof t.style){let r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+n).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};(s.texts.length||s.attributes.length||s.removes.length||s.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(s))}),A(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let r=Array.from(nu(e),e=>nf(e)||"").join("");t.attributes.value=Y({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:q(e),value:r,maskInputFn:this.maskInputFn})}),A(this,"processMutation",e=>{if(!nM(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=nf(e.target);nO(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:em(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,nE(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,n=e.target.getAttribute(r);if("value"===r){let e=q(t);n=Y({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:n,maskInputFn:this.maskInputFn})}if(nO(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let o=this.attributeMap.get(e.target);
1if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(n))if(t.contentDocument)return;else r="rr_src";if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!ef(t.tagName,r))if(o.attributes[r]=eh(this.doc,J(t.tagName),J(r),n),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}let r=this.unattachedDoc.createElement("span");for(let n of(e.oldValue&&r.setAttribute("style",e.oldValue),Array.from(t.style))){let e=t.style.getPropertyValue(n),i=t.style.getPropertyPriority(n);e!==r.style.getPropertyValue(n)||i!==r.style.getPropertyPriority(n)?""===i?o.styleDiff[n]=e:o.styleDiff[n]=[e,i]:o._unchangedStyles[n]=[e,i]}for(let e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(o.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":if(nO(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=>{let r=this.mirror.getId(t),n=z(e.target)?this.mirror.getId(ng(e.target)):this.mirror.getId(e.target);nO(e.target,this.blockClass,this.blockSelector,!1)||nM(t,this.mirror,this.slimDOMOptions)||-1===this.mirror.getId(t)||(this.addedSet.has(t)?(nJ(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||function e(t,r){if(z(t))return!1;let n=r.getId(t);if(!r.has(n))return!0;let o=nd(t);return(!o||o.nodeType!==t.DOCUMENT_NODE)&&(!o||e(o,r))}(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[nH(r,n)]?nJ(this.movedSet,t):(this.removes.push({parentId:n,id:r,isShadow:!!(z(e.target)&&V(e.target))||void 0}),function(e,t){let r=[e];for(;r.length;){let e=r.pop();t.has(e)||(t.add(e),nu(e).forEach(e=>r.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),A(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(nM(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[nH(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);!nO(e,this.blockClass,this.blockSelector,!1)&&(nu(e).forEach(e=>this.genAdds(e)),nL(e)&&nu(ny(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 nJ(e,t){e.delete(t),nu(t).forEach(t=>nJ(e,t))}function nZ(e,t,r){var n;let o;return 0!==e.size&&(n=e,!!(o=nd(t))&&n.has(o))}function nq(e,t){return 0!==e.size&&function e(t,r){let n=nd(r);return!!n&&(!!t.has(n)||e(t,n))}(e,t)}let nX=e=>b?(...t)=>{try{return e(...t)}catch(e){if(b&&!0===b(e))return;throw e}}:e,nK=[];function nQ(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function n0(e,t){let r=new nY;nK.push(r),r.init(e);let n=new(nn("MutationObserver")).constructor(nX(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function n1({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,sampling:i}){return nw("scroll",nX(nC(nX(i=>{let s=nQ(i);if(!s||nO(s,n,o,!0))return;let a=r.getId(s);if(s===t&&t.defaultView){let r=nk(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:s.scrollLeft,y:s.scrollTop})}),i.scroll||100)),t)}let n2=["INPUT","TEXTAREA","SELECT"],n5=new WeakMap;function n3(e){var t=[];if(n9("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||n9("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||n9("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||n9("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){let r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){let r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}function n8(e,t,r){let n,o;return e?(e.ownerNode?n=t.getId(e.ownerNode):o=r.getId(e),{styleId:o,id:n}):{}}function n6({mirror:e,stylesheetManager:t},r){var n,o,i;let s=null;s="#document"===r.nodeName?e.getId(r):e.getId(ng(r));let a="#document"===r.nodeName?null==(n=r.defaultView)?void 0:n.Document:null==(i=null==(o=r.ownerDocument)?void 0:o.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!==s&&-1!==s&&a&&l?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var r;let n=null==(r=l.set)?void 0:r.call(this,e);if(null!==s&&-1!==s)try{t.adoptStyleSheets(e,s)}catch(e){}return n}}),nX(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function n4(e,t={}){let r,n=e.doc.defaultView;if(!n)return()=>{};
1!function(e,t){let{mutationCb:r,mousemoveCb:n,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:s,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:d,fontCb:h,selectionCb:f,customElementCb:p}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),n(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),o(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),i(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),s(...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),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),d(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),h(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),f(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),p(...e)}
1}(e,t),e.recordDOM&&(r=n0(e,e.doc));let o=function({mousemoveCb:e,sampling:t,doc:r,mirror:n}){let o;if(!1===t.mousemove)return()=>{};let i="number"==typeof t.mousemove?t.mousemove:50,s="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,a=[],l=nC(nX(t=>{let r=Date.now()-o;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],o=null}),s),c=nX(nC(nX(e=>{let t=nQ(e),{clientX:r,clientY:i}=nR(e)?e.changedTouches[0]:e;o||(o=nI()),a.push({x:r,y:i,id:n.getId(t),timeOffset:nI()-o}),l("u">typeof DragEvent&&e instanceof DragEvent?nU.Drag:e instanceof MouseEvent?nU.MouseMove:nU.TouchMove)}),i,{trailing:!1})),u=[nw("mousemove",c,r),nw("touchmove",c,r),nw("drag",c,r)];return nX(()=>{u.forEach(e=>e())})}(e),i=function({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,sampling:i}){if(!1===i.mouseInteraction)return()=>{};let s=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,a=[],l=null;return Object.keys(nB).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]).forEach(i=>{let s=J(i),c=t=>{let s=nQ(t);if(nO(s,n,o,!0))return;let a=null,c=i;if("pointerType"in t){switch(t.pointerType){case"mouse":a=nF.Mouse;break;case"touch":a=nF.Touch;break;case"pen":a=nF.Pen}a===nF.Touch?nB[i]===nB.MouseDown?c="TouchStart":nB[i]===nB.MouseUp&&(c="TouchEnd"):nF.Pen}else nR(t)&&(a=nF.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===nF.Touch||c.startsWith("Mouse")&&a===nF.Mouse)&&(a=null)):nB[i]===nB.Click&&(a=l,l=null);let u=nR(t)?t.changedTouches[0]:t;if(!u)return;let d=r.getId(s),{clientX:h,clientY:f}=u;nX(e)({type:nB[c],id:d,x:h,y:f,...null!==a&&{pointerType:a}})};if(window.PointerEvent)switch(nB[i]){case nB.MouseDown:case nB.MouseUp:s=s.replace("mouse","pointer");break;case nB.TouchStart:case nB.TouchEnd:return}a.push(nw(s,c,t))}),nX(()=>{a.forEach(e=>e())})}(e),s=n1(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,n=-1;return nw("resize",nX(nC(nX(()=>{let t=nx(),o=nA();(r!==t||n!==o)&&(e({width:Number(o),height:Number(t)}),r=t,n=o)}),200)),t)}(e,{win:n}),l=function({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:o,ignoreClass:i,ignoreSelector:s,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:u}){function d(e){let r=nQ(e),c=e.isTrusted,d=r&&r.tagName;if(r&&"OPTION"===d&&(r=nh(r)),!r||!d||0>n2.indexOf(d)||nO(r,n,o,!0)||r.classList.contains(i)||s&&r.matches(s))return;let f=r.value,p=!1,m=q(r)||"";"radio"===m||"checkbox"===m?p=r.checked:(a[d.toLowerCase()]||a[m])&&(f=Y({element:r,maskInputOptions:a,tagName:d,type:m,value:f,maskInputFn:l})),h(r,u?{text:f,isChecked:p,userTriggered:c}:{text:f,isChecked:p});let g=r.name;"radio"===m&&g&&p&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==r){let t=e.value;h(e,u?{text:t,isChecked:!p,userTriggered:!1}:{text:t,isChecked:!p})}})}function h(t,n){let o=n5.get(t);if(!o||o.text!==n.text||o.isChecked!==n.isChecked){n5.set(t,n);let o=r.getId(t);nX(e)({...n,id:o})}}let f=("last"===c.input?["change"]:["input","change"]).map(e=>nw(e,nX(d),t)),p=t.defaultView;if(!p)return()=>{f.forEach(e=>e())};let m=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),g=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&f.push(...g.map(e=>nS(e[0],e[1],{set(){nX(d)({target:this,isTrusted:!1})}},!1,p))),nX(()=>{f.forEach(e=>e())})}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:o,doc:i}){let s=nX(i=>nC(nX(o=>{let s=nQ(o);if(!s||nO(s,t,r,!0))return;let{currentTime:a,volume:l,muted:c,playbackRate:u,loop:d}=s;e({type:i,id:n.getId(s),currentTime:a,volume:l,muted:c,playbackRate:u,loop:d})}),o.media||500)),a=[nw("play",s(nz.Play),i),nw("pause",s(nz.Pause),i),nw("seeked",s(nz.Seeked),i),nw("volumechange",s(nz.VolumeChange),i),nw("ratechange",s(nz.RateChange),i)];return nX(()=>{a.forEach(e=>e())})}(e),u=()=>{},d=()=>{},h=()=>{},f=()=>{};e.recordDOM&&(u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){let o,i;if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let s=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:nX((n,o,i)=>{let[s,a]=i,{id:l,styleId:c}=n8(o,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:s,index:a}]}),n.apply(o,i)})}),n.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){let o=`${e} { ${t} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[o,r])};let a=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:nX((n,o,i)=>{let[s]=i,{id:a,styleId:l}=n8(o,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:s}]}),n.apply(o,i)})}),n.CSSStyleSheet.prototype.removeRule=function(e){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[e])}
1,n.CSSStyleSheet.prototype.replace&&(o=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:nX((n,o,i)=>{let[s]=i,{id:a,styleId:l}=n8(o,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:s}),n.apply(o,i)})})),n.CSSStyleSheet.prototype.replaceSync&&(i=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(i,{apply:nX((n,o,i)=>{let[s]=i,{id:a,styleId:l}=n8(o,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:s}),n.apply(o,i)})}));let l={};n7("CSSGroupingRule")?l.CSSGroupingRule=n.CSSGroupingRule:(n7("CSSMediaRule")&&(l.CSSMediaRule=n.CSSMediaRule),n7("CSSConditionRule")&&(l.CSSConditionRule=n.CSSConditionRule),n7("CSSSupportsRule")&&(l.CSSSupportsRule=n.CSSSupportsRule));let c={};return Object.entries(l).forEach(([n,o])=>{c[n]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(c[n].insertRule,{apply:nX((n,o,i)=>{let[s,a]=i,{id:l,styleId:c}=n8(o.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:s,index:[...n3(o),a||0]}]}),n.apply(o,i)})}),o.prototype.deleteRule=new Proxy(c[n].deleteRule,{apply:nX((n,o,i)=>{let[s]=i,{id:a,styleId:l}=n8(o.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...n3(o),s]}]}),n.apply(o,i)})})}),nX(()=>{n.CSSStyleSheet.prototype.insertRule=s,n.CSSStyleSheet.prototype.deleteRule=a,o&&(n.CSSStyleSheet.prototype.replace=o),i&&(n.CSSStyleSheet.prototype.replaceSync=i),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}(e,{win:n}),d=n6(e,e.doc),h=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:nX((o,s,a)=>{var l;let[c,u,d]=a;if(r.has(c))return i.apply(s,[c,u,d]);let{id:h,styleId:f}=n8(null==(l=s.parentRule)?void 0:l.parentStyleSheet,t,n.styleMirror);return(h&&-1!==h||f&&-1!==f)&&e({id:h,styleId:f,set:{property:c,value:u,priority:d},index:n3(s.parentRule)}),o.apply(s,a)})});let s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:nX((o,i,a)=>{var l;let[c]=a;if(r.has(c))return s.apply(i,[c]);let{id:u,styleId:d}=n8(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,n.styleMirror);return(u&&-1!==u||d&&-1!==d)&&e({id:u,styleId:d,remove:{property:c},index:n3(i.parentRule)}),o.apply(i,a)})}),nX(()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s})}(e,{win:n}),e.collectFonts&&(f=function({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let n=[],o=new WeakMap,i=r.FontFace;r.FontFace=function(e,t,r){let n=new i(e,t,r);return o.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};let s=nl(t.fonts,"add",function(t){return function(r){return setTimeout(nX(()=>
1{let t=o.get(r);t&&(e(t),o.delete(r))}),0),t.apply(this,[r])}});return n.push(()=>{r.FontFace=i}),n.push(s),nX(()=>{n.forEach(e=>e())})}(e)));let p=function(e){let{doc:t,mirror:r,blockClass:n,blockSelector:o,selectionCb:i}=e,s=!0,a=nX(()=>{let e=t.getSelection();if(!e||s&&(null==e?void 0:e.isCollapsed))return;s=e.isCollapsed||!1;let a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){let{startContainer:i,startOffset:s,endContainer:l,endOffset:c}=e.getRangeAt(t);nO(i,n,o,!0)||nO(l,n,o,!0)||a.push({start:r.getId(i),startOffset:s,end:r.getId(l),endOffset:c})}i({ranges:a})});return a(),nw("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){let r=e.defaultView;return r&&r.customElements?nl(r.customElements,"define",function(e){return function(r,n,o){try{t({define:{name:r}})}catch(e){console.warn(`Custom element callback failed for ${r}`)}return e.apply(this,[r,n,o])}}):()=>{}}(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,n,t.options));return nX(()=>{nK.forEach(e=>e.reset()),null==r||r.disconnect(),o(),i(),s(),a(),l(),c(),u(),d(),h(),f(),p(),m(),g.forEach(e=>e())})}function n9(e){return void 0!==window[e]}function n7(e){return!!(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class oe{constructor(e){A(this,"iframeIdToRemoteIdMap",new WeakMap),A(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,n){let o=r||this.getIdToRemoteIdMap(e),i=n||this.getRemoteIdToIdMap(e),s=o.get(t);return s||(s=this.generateIdFn(),o.set(t,s),i.set(s,t)),s}getIds(e,t){let r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,n))}getRemoteId(e,t,r){let n=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;let o=n.get(t);return o||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class ot{constructor(e){A(this,"iframes",new WeakMap),A(this,"crossOriginIframeMap",new WeakMap),A(this,"crossOriginIframeMirror",new oe(es)),A(this,"crossOriginIframeStyleMirror"),A(this,"crossOriginIframeRootIdMap",new WeakMap),A(this,"mirror"),A(this,"mutationCb"),A(this,"wrappedEmit"),A(this,"loadListener"),A(this,"stylesheetManager"),A(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new oe(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(n=this.loadListener)||n.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){if("rrweb"!==e.data.type||e.origin!==e.data.origin||!e.source)return;let t=this.crossOriginIframeMap.get(e.source);if(!t)return;let r=this.transformCrossOriginEvent(t,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case nj.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:nj.IncrementalSnapshot,data:{source:nU.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case nj.Meta:case nj.Load:case nj.DomContentLoaded:break;case nj.Plugin:return t;case nj.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case nj.IncrementalSnapshot:switch(t.data.source){case nU.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);let r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}
1),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 nU.Drag:case nU.TouchMove:case nU.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case nU.ViewportResize:return!1;case nU.MediaInteraction:case nU.MouseInteraction:case nU.Scroll:case nU.CanvasMutation:case nU.Input:return this.replaceIds(t.data,e,["id"]),t;case nU.StyleSheetRule:case nU.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case nU.Font:return t;case nU.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case nU.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,r,n){for(let o of n)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===nW.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class or{constructor(e){A(this,"shadowDoms",new WeakSet),A(this,"mutationCb"),A(this,"scrollCb"),A(this,"bypassOptions"),A(this,"mirror"),A(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(!V(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=n0({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(n1({...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(ng(e))),this.restoreHandlers.push(n6({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(nl(e.prototype,"attachShadow",function(e){return function(n){let o=e.call(this,n),i=ny(this);return i&&n_(this)&&r.addShadowRoot(i,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var on="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oo="u"<typeof Uint8Array?[]:new Uint8Array(256),oi=0;oi<on.length;oi++)oo[on.charCodeAt(oi)]=oi;var os=function(e){var t,r=new Uint8Array(e),n=r.length,o="";for(t=0;t<n;t+=3)o+=on[r[t]>>2],o+=on[(3&r[t])<<4|r[t+1]>>4],o+=on[(15&r[t+1])<<2|r[t+2]>>6],o+=on[63&r[t+2]];return n%3==2?o=o.substring(0,o.length-1)+"=":n%3==1&&(o=o.substring(0,o.length-2)+"=="),o};let oa=new Map,ol=(e,t,r)=>{let n;if(!e||!(ou(e,t)||"object"==typeof e))return;let o=e.constructor.name,i=((n=oa.get(r))||(n=new Map,oa.set(r,n)),n.has(o)||n.set(o,[]),n.get(o)),s=i.indexOf(e);return -1===s&&(s=i.length,i.push(e)),s},oc=(e,t,r)=>e.map(e=>(function e(t,r,n){if(t instanceof Array)return t.map(t=>e(t,r,n));if(null===t);else if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};else if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:os(t)};else if(t instanceof DataView)return{rr_type:t.constructor.name,args:[e(t.buffer,r,n),t.byteOffset,t.byteLength]};else if(t instanceof HTMLImageElement){let e=t.constructor.name,{src:r}=t;return{rr_type:e,src:r}}else if(t instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:t.toDataURL()};else if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[e(t.data,r,n),t.width,t.height]};else if(ou(t,r)||"object"==typeof t)return{rr_type:t.constructor.name,index:ol(t,r,n)};return t}
1)(e,t,r)),ou=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]).find(r=>e instanceof t[r]);function od(e,t,r,n){let o=[];try{let i=nl(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(o,...i){if(!nO(this,t,r,!0)){let e="experimental-webgl"===o?"webgl":o;if("__context"in this||(this.__context=e),n&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){let e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[o,...i])}});o.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(e=>e())}}function oh(e,t,r,n,o,i){let s=[];for(let a of Object.getOwnPropertyNames(e))if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if("function"!=typeof e[a])continue;let l=nl(e,a,function(e){return function(...s){let l=e.apply(this,s);if(ol(l,i,this),"tagName"in this.canvas&&!nO(this.canvas,n,o,!0)){let e=oc(s,i,this),n={type:t,property:a,args:e};r(this.canvas,n)}return l}});s.push(l)}catch{let n=nS(e,a,{set(e){r(this.canvas,{type:t,property:a,args:[e],setter:!0})}});s.push(n)}return s}let of="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3B
1hcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",op="u">typeof window&&window.Blob&&new Blob([Uint8Array.from(atob(of),e=>e.charCodeAt(0))],{type:"text/javascript;charset=utf-8"});function om(e){let t;try{if(!(t=op&&(window.URL||window.webkitURL).createObjectURL(op)))throw"";let r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),r}catch(t){return new Worker("data:text/javascript;base64,"+of,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class og{constructor(e){A(this,"pendingCanvasMutations",new Map),A(this,"rafStamps",{latestId:0,invokeId:null}),A(this,"mirror"),A(this,"mutationCb"),A(this,"resetObservers"),A(this,"frozen",!1),A(this,"locked",!1),A(this,"processMutation",(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});const{sampling:t="all",win:r,blockClass:n,blockSelector:o,recordCanvas:i,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(r,n,o),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,n,o,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,n,o){let i,s=od(t,r,n,!0),a=new Map,l=new om;l.onmessage=e=>{let{id:t}=e.data;if(a.set(t,!1),!("base64"in e.data))return;let{base64:r,type:n,width:o,height:i}=e.data;this.mutationCb({id:t,type:n$["2D"],commands:[{property:"clearRect",args:[0,0,o,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:n}]},0,0]}]})};let c=1e3/e,u=0,d=e=>{let s;if(u&&e-u<c){i=requestAnimationFrame(d);return}
1u=e,(s=[],t.document.querySelectorAll("canvas").forEach(e=>{nO(e,r,n,!0)||s.push(e)}),s).forEach(async e=>{var t;let r=this.mirror.getId(e);if(a.get(r)||0===e.width||0===e.height)return;if(a.set(r,!0),["webgl","webgl2"].includes(e.__context)){let r=e.getContext(e.__context);(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)===!1&&r.clear(r.COLOR_BUFFER_BIT)}let n=await createImageBitmap(e);l.postMessage({id:r,bitmap:n,width:e.width,height:e.height,dataURLOptions:o.dataURLOptions},[n])}),i=requestAnimationFrame(d)};i=requestAnimationFrame(d),this.resetObservers=()=>{s(),cancelAnimationFrame(i)}}initCanvasMutationObserver(e,t,r){var n;let o;this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=od(e,t,r,!1),s=function(e,t,r,n){let o=[];for(let i of Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype))try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])continue;let s=nl(t.CanvasRenderingContext2D.prototype,i,function(o){return function(...s){return nO(this.canvas,r,n,!0)||setTimeout(()=>{let r=oc(s,t,this);e(this.canvas,{type:n$["2D"],property:i,args:r})},0),o.apply(this,s)}});o.push(s)}catch{let r=nS(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:n$["2D"],property:i,args:[t],setter:!0})}});o.push(r)}return()=>{o.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),a=(n=this.processMutation.bind(this),(o=[]).push(...oh(e.WebGLRenderingContext.prototype,n$.WebGL,n,t,r,e)),void 0!==e.WebGL2RenderingContext&&o.push(...oh(e.WebGL2RenderingContext.prototype,n$.WebGL2,n,t,r,e)),()=>{o.forEach(e=>e())});this.resetObservers=()=>{i(),s(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;let n=r.map(e=>{let{type:t,...r}=e;return r}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:n}),this.pendingCanvasMutations.delete(e)}}class oy{constructor(e){A(this,"trackedLinkElements",new WeakSet),A(this,"mutationCb"),A(this,"adoptedStyleSheetCb"),A(this,"styleMirror",new nD),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;let r={id:t,styleIds:[]},n=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,r)=>({rule:G(e,t.href),index:r}))})),r.styleIds.push(e)}n.length>0&&(r.styles=n),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class ow{constructor(){A(this,"nodeMap",new WeakMap),A(this,"active",!1)}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let ob=!1;try{if(2!==Array.from([1],e=>2*e)[0]){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(o$=e.contentWindow)?void 0:o$.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}let ov=new H;function oC(e={}){let t,{emit:r,checkoutEveryNms:n,checkoutEveryNth:o,blockClass:i="rr-block",blockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskTextClass:c="rr-mask",maskTextSelector:u=null,inlineStylesheet:d=!0,maskAllInputs:h,maskInputOptions:f,slimDOMOptions:p,maskInputFn:m,maskTextFn:g,hooks:y,packFn:w,sampling:I={},dataURLOptions:k={},mousemoveWait:x,recordDOM:A=!0,recordCanvas:E=!1,recordCrossOriginIframes:O=!1,recordAfter:M="DOMContentLoaded"===e.recordAfter?e.recordAfter:"load",userTriggeredOnInput:R=!1,collectFonts:P=!1,inlineImages:T=!1,plugins:L,keepIframeSrcFn:D=()=>!1,ignoreCSSAttributes:N=new Set([]),errorHandler:_}=e;b=_;let j=!O||window.parent===window,U=!1;if(!j)try{window.parent.document&&(U=!1)}catch(e){U=!0}if(j&&!r)throw Error("emit function is required");if(!j&&!U)return()=>{};void 0!==x&&void 0===I.mousemove&&(I.mousemove=x),ov.reset();let B=!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}:void 0!==f?f:{password:!0},F=ey(p);!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();let $=0,z=e=>{for(let t of L||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!U&&(e=w(e)),e};v=(e,i)=>{var s;if(e.timestamp=nI(),(null==(s=nK[0])?void 0:s.isFrozen())&&e.type!==nj.FullSnapshot&&(e.type!==nj.IncrementalSnapshot||e.data.source!==nU.Mutation)&&nK.forEach(e
1=>e.unfreeze()),j)null==r||r(z(e),i);else if(U){let t={type:"rrweb",event:z(e),origin:window.location.origin,isCheckout:i};window.parent.postMessage(t,"*")}if(e.type===nj.FullSnapshot)t=e,$=0;else if(e.type===nj.IncrementalSnapshot){if(e.data.source===nU.Mutation&&e.data.isAttachIframe)return;$++;let r=o&&$>=o,i=n&&e.timestamp-t.timestamp>n;(r||i)&&C(!0)}};let V=e=>{v({type:nj.IncrementalSnapshot,data:{source:nU.Mutation,...e}})},W=e=>v({type:nj.IncrementalSnapshot,data:{source:nU.Scroll,...e}}),G=e=>v({type:nj.IncrementalSnapshot,data:{source:nU.CanvasMutation,...e}}),Y=new oy({mutationCb:V,adoptedStyleSheetCb:e=>v({type:nj.IncrementalSnapshot,data:{source:nU.AdoptedStyleSheet,...e}})}),J=new ot({mirror:ov,mutationCb:V,stylesheetManager:Y,recordCrossOriginIframes:O,wrappedEmit:v});for(let e of L||[])e.getMirror&&e.getMirror({nodeMirror:ov,crossOriginIframeMirror:J.crossOriginIframeMirror,crossOriginIframeStyleMirror:J.crossOriginIframeStyleMirror});let Z=new ow;S=new og({recordCanvas:E,mutationCb:G,win:window,blockClass:i,blockSelector:s,mirror:ov,sampling:I.canvas,dataURLOptions:k});let q=new or({mutationCb:V,scrollCb:W,bypassOptions:{blockClass:i,blockSelector:s,maskTextClass:c,maskTextSelector:u,inlineStylesheet:d,maskInputOptions:B,dataURLOptions:k,maskTextFn:g,maskInputFn:m,recordCanvas:E,inlineImages:T,sampling:I,slimDOMOptions:F,iframeManager:J,stylesheetManager:Y,canvasManager:S,keepIframeSrcFn:D,processedNodeManager:Z},mirror:ov});C=(e=!1)=>{if(!A)return;v({type:nj.Meta,data:{href:window.location.href,width:nA(),height:nx()}},e),Y.reset(),q.init(),nK.forEach(e=>e.lock());let t=function(e,t){let{mirror:r=new H,blockClass:n="rr-block",blockSelector:o=null,maskTextClass:i="rr-mask",maskTextSelector:s=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:d,maskInputFn:h,slimDOM:f=!1,dataURLOptions:p,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:C=()=>!1}=t||{};return ew(e,{doc:e,mirror:r,blockClass:n,blockSelector:o,maskTextClass:i,maskTextSelector:s,skipChild:!1,inlineStylesheet:a,maskInputOptions:!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}:!1===u?{password:!0}:u,maskTextFn:d,maskInputFn:h,slimDOMOptions:ey(f),dataURLOptions:p,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:ov,blockClass:i,blockSelector:s,maskTextClass:c,maskTextSelector:u,inlineStylesheet:d,maskAllInputs:B,maskTextFn:g,maskInputFn:m,slimDOM:F,dataURLOptions:k,recordCanvas:E,inlineImages:T,onSerialize:e=>{nP(e,ov)&&J.addIframe(e),nT(e,ov)&&Y.trackLinkElement(e),nL(e)&&q.addShadowRoot(ny(e),document)},onIframeLoad:(e,t)=>{J.attachIframe(e,t),q.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Y.attachLinkElement(e,t)},keepIframeSrcFn:D});if(!t)return console.warn("Failed to snapshot the document");v({type:nj.FullSnapshot,data:{node:t,initialOffset:nk(window)}},e),nK.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,ov.getId(document))};try{let e=[],t=e=>{var t;return nX(n4)({mutationCb:V,mousemoveCb:(e,t)=>v({type:nj.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>v({type:nj.IncrementalSnapshot,data:{source:nU.MouseInteraction,...e}}),scrollCb:W,viewportResizeCb:e=>v({type:nj.IncrementalSnapshot,data:{source:nU.ViewportResize,...e}}),inputCb:e=>v({type:nj.IncrementalSnapshot,data:{source:nU.Input,...e}}),mediaInteractionCb:e=>v({type:nj.IncrementalSnapshot,data:{source:nU.MediaInteraction,...e}}),styleSheetRuleCb:e=>v({type:nj.IncrementalSnapshot,data:{source:nU.StyleSheetRule,...e}}),styleDeclarationCb:e=>v({type:nj.IncrementalSnapshot,data:{source:nU.StyleDeclaration,...e}}),canvasMutationCb:G,fontCb:e=>v({type:nj.IncrementalSnapshot,data:{source:nU.Font,...e}}),selectionCb:e=>{v({type:nj.IncrementalSnapshot,data:{source:nU.Selection,...e}})},customElementCb:e=>{v({type:nj.IncrementalSnapshot,data:{source:nU.CustomElement,...e}})},blockClass:i,ignoreClass:a,ignoreSelector:l,maskTextClass:c,maskTextSelector:u,maskInputOptions:B,inlineStylesheet:d,sampling:I,recordDOM:A,recordCanvas:E,inlineImages:T,userTriggeredOnInput:R,collectFonts:P,doc:e,maskInputFn:m,maskTextFn:g,keepIframeSrcFn:D,blockSelector:s,slimDOMOptions:F,dataURLOptions:k,mirror:ov,iframeManager:J,stylesheetManager:Y,shadowDomManager:q,processedNodeManager:Z,canvasManager:S,ignoreCSSAttributes:N,plugins:(null==(t=null==L?void 0:L.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>v({type:nj.Plugin,data:{plugin:e.name,payload:t}}
1)})))||[]},y)};J.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}});let r=()=>{C(),e.push(t(document)),ob=!0};return["interactive","complete"].includes(document.readyState)?r():(e.push(nw("DOMContentLoaded",()=>{v({type:nj.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&r()})),e.push(nw("load",()=>{v({type:nj.Load,data:{}}),"load"===M&&r()},window))),()=>{e.forEach(e=>{try{e()}catch(e){String(e).toLowerCase().includes("cross-origin")||console.warn(e)}}),Z.destroy(),ob=!1,b=void 0}}catch(e){console.warn(e)}}oC.addCustomEvent=(e,t)=>{if(!ob)throw Error("please add custom event after start recording");v({type:nj.Custom,data:{tag:e,payload:t}})},oC.freezePage=()=>{nK.forEach(e=>e.freeze())},oC.takeFullSnapshot=e=>{if(!ob)throw Error("please take full snapshot after start recording");C(e)},oC.mirror=ov,(oF=oz||(oz={}))[oF.NotStarted=0]="NotStarted",oF[oF.Running=1]="Running",oF[oF.Stopped=2]="Stopped";let{addCustomEvent:oS}=oC,{freezePage:oI}=oC,{takeFullSnapshot:ok}=oC;var ox=Object.defineProperty,oA=(e,t)=>()=>(e&&(t=e(e=0)),t);function oE(e,t){if(typeof document>"u"||typeof window>"u")return;oV&&oV();let r=e.maxEventsPerChunk??200,n=e.flushIntervalMs??1e4,o=e.maxPayloadBytes??1048576,i=[],s=0,a=null;function l(e){if(0===i.length)return;let r=JSON.stringify(i);if(new TextEncoder().encode(r).length>o){if(i.length>1){let t=Math.floor(i.length/2),r=i.slice(0,t),n=i.slice(t),o=e&&r.some(e=>2===e.type);i=r,l(o),i=n,l(!1);return}i=[];return}let n=i[0].timestamp,a=i[i.length-1].timestamp;try{t({chunk_index:s,events_count:i.length,is_full_snapshot:e,started_at:new Date(n).toISOString(),ended_at:new Date(a).toISOString(),payload:r}),s+=1,i=[]}catch(e){throw console.error("[ReplayRecorder] sendChunk failed",e),e}}let c=!1!==e.maskAllText,u=e.unmaskTextSelector,d=oC({emit(e,t){var n;let o;i.push(e),o=(n=!!t)||i.some(e=>2===e.type),i.length>=r?l(o):n&&i.length>0&&l(!0)},checkoutEveryNms:n,maskAllInputs:e.maskAllInputs??!0,maskTextSelector:c?"*":"[data-openpanel-replay-mask]",maskTextFn:c&&u?(e,t)=>t?.closest(u)?e:e.replace(/\S/g,"*"):void 0,blockSelector:e.blockSelector??"[data-openpanel-replay-block]",blockClass:e.blockClass,ignoreSelector:e.ignoreSelector});function h(){"hidden"===document.visibilityState&&i.length>0&&l(i.some(e=>2===e.type))}function f(){i.length>0&&l(i.some(e=>2===e.type))}a=setInterval(()=>{i.length>0&&l(i.some(e=>2===e.type))},n),document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",f),oV=()=>{i.length>0&&l(i.some(e=>2===e.type)),a&&(clearInterval(a),a=null),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",f),d?.(),oV=null}}function oO(){oV&&oV()}var oM,oR,oP,oT,oL,oD,oN,o_,oj,oU,oB,oF,o$,oz,oV,oW=oA(()=>{oV=null}),oG={},oH={startReplayRecorder:()=>oE,stopReplayRecorder:()=>oO};for(var oY in oH)ox(oG,oY,{get:oH[oY],enumerable:!0});oA(()=>{oW()}),"u">typeof document&&document.currentScript;var oJ=e.i(82397),oZ=e.i(75201);function oq({profileId:e,cdnUrl:t,scriptUrl:r,globalProperties:n,strategy:o="afterInteractive",...i}){let s,a=[{name:"init",value:{...i,sdk:"nextjs",sdkVersion:"1.4.0"}}];return e&&a.push({name:"identify",value:{profileId:e}}),n&&a.push({name:"setGlobalProperties",value:n}),oZ.default.createElement(oZ.default.Fragment,null,oZ.default.createElement(oJ.default,{async:!0,defer:!0,src:(s=r||t||"https://openpanel.dev/op1.js").endsWith(".js")?`${s}?v=1.4.0`:s}),oZ.default.createElement(oJ.default,{dangerouslySetInnerHTML:{__html:`window.op=window.op||function(){var n=[];return new Proxy(function(){arguments.length&&n.push([].slice.call(arguments))},{get:function(t,r){return"q"===r?n:function(){n.push([r].concat([].slice.call(arguments)))}} ,has:function(t,r){return"q"===r}}) }();
2          ${a.map(e=>{let t;return`window.op('${e.name}', ${"object"==typeof(t=e.value)&&null!=t?`{${Object.entries(t).map(([e,t])=>"filter"===e?`"${e}":${t}`:`"${e}":${JSON.stringify(t)}`).join(",")}}`:JSON.stringify(t)});`}).join(`
3`)}`},id:"openpanel-init",strategy:o}))}function oX(){return{track:oQ,screenView:o0,identify:o1,increment:o2,decrement:o5,clear:ie,setGlobalProperties:oK,revenue:o9,flushRevenue:o7,clearRevenue:o6,pendingRevenue:o4,fetchDeviceId:o3,getDeviceId:o8}}function oK(e){window.op?.("setGlobalProperties",e)}function oQ(e,t){window.op?.("track",e,t)}function o0(e,t){window.op?.("screenView",e,t)}function o1(e){window.op?.("identify",e)}function o2(e){window.op?.("increment",e)}function o5(e){window.op("decrement",e)}function o3(){return window.op.fetchDeviceId()}function o8(){return window.op.getDeviceId()}function o6(){window.op.clearRevenue()}function o4(e,t){window.op.pendingRevenue(e,t)}function o9(e,t){return window.op.revenue(e,t)}function o7(){return window.op.flushRevenue()}function ie(){window.op?.("clear")}e.s(["OpenPanelComponent",()=>oq,"useOpenPanel",()=>oX],50694)},65151,22081,27077,17349,e=>{"use strict";function t(){return{allowedActions:["accept","reject","customize"],layout:[["reject","accept"],"customize"],direction:"row",primaryActions:["customize"],uiProfile:"compact"}}function r(e){if(null===e||"object"!=typeof e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(e=>r(e)).join(",")}]`;let t=Object.entries(e).filter(([,e])=>void 0!==e).sort(([e],[t])=>e.localeCompare(t));return`{${t.map(([e,t])=>`${JSON.stringify(e)}:${r(t)}`).join(",")}}`}async function n(e){let t=globalThis.crypto?.subtle;if(t){let r=new TextEncoder().encode(e);return Array.from(new Uint8Array(await t.digest("SHA-256",r))).map(e=>e.toString(16).padStart(2,"0")).join("")}return o(e)}function o(e){let t=new TextEncoder().encode(e),r=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc
376c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),n=8*t.length,o=t.length+9+63>>6<<6>>>0,i=new Uint8Array(o);i.set(t),i[t.length]=128;let s=new DataView(i.buffer);s.setUint32(o-8,Math.floor(n/0x100000000),!1),s.setUint32(o-4,n>>>0,!1);let a=new Uint32Array([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),l=new Uint32Array(64),c=(e,t)=>e>>>t|e<<32-t;for(let e=0;e<o;e+=64){for(let t=0;t<16;t++)l[t]=s.getUint32(e+4*t,!1);for(let e=16;e<64;e++){let t=c(l[e-15],7)^c(l[e-15],18)^l[e-15]>>>3,r=c(l[e-2],17)^c(l[e-2],19)^l[e-2]>>>10;l[e]=l[e-16]+t+l[e-7]+r>>>0}let[t,n,o,i,u,d,h,f]=a;for(let e=0;e<64;e++){let s=f+(c(u,6)^c(u,11)^c(u,25))+(u&d^~u&h)+r[e]+l[e]>>>0,a=(c(t,2)^c(t,13)^c(t,22))+(t&n^t&o^n&o)>>>0;f=h,h=d,d=u,u=i+s>>>0,i=o,o=n,n=t,t=s+a>>>0}a[0]=a[0]+t>>>0,a[1]=a[1]+n>>>0,a[2]=a[2]+o>>>0,a[3]=a[3]+i>>>0,a[4]=a[4]+u>>>0,a[5]=a[5]+d>>>0,a[6]=a[6]+h>>>0,a[7]=a[7]+f>>>0}return Array.from(a).map(e=>e.toString(16).padStart(8,"0")).join("")}async function i(e){return n(r(e))}async function s(e){return i(e)}async function a(e){return i({model:e.model,consent:e.consent?{expiryDays:e.consent.expiryDays,scopeMode:e.consent.scopeMode,categories:e.consent.categories,preselectedCategories:e.consent.preselectedCategories,gpc:e.consent.gpc}:void 0,ui:e.ui?{mode:e.ui.mode,banner:e.ui.banner?{allowedActions:e.ui.banner.allowedActions,primaryActions:e.ui.banner.primaryActions,layout:e.ui.banner.layout,direction:e.ui.banner.direction}:void 0,dialog:e.ui.dialog?{allowedActions:e.ui.dialog.allowedActions,primaryActions:e.ui.dialog.primaryActions,layout:e.ui.dialog.layout,direction:e.ui.dialog.direction}:void 0}:void 0,proof:e.proof?{storeIp:e.proof.storeIp,storeUserAgent:e.proof.storeUserAgent,storeLanguage:e.proof.storeLanguage}:void 0})}let l="default",c=new Set(["bg","cs","cy","da","de","el","en","es","et","fi","fr","ga","he","hr","hu","id","is","it","lb","lt","lv","mt","nb","nl","nn","pl","pt","rm","ro","sk","sl","sv","zh"]);function u(e){if(!e)return;let t=e.split(",")[0]?.split(";")[0]?.trim().toLowerCase();if(t)return t.split("-")[0]??void 0}function d(e){if(e&&0!==e.length)return[...new Set(e)]}function h(e){if(!e||0===e.length)return;let t=[...new Set(e.map(e=>e.trim()).filter(Boolean))];return t.length>0?t:void 0}function f(e){return e.trim().toUpperCase()}let p=new WeakMap;function m(e){return e.consent?.model??"opt-in"}function g(e){return"iab"===m(e)?["*"]:h(e.consent?.categories)}function y(e){return e.consent?.scopeMode??"permissive"}function w(e){return!!e&&Object.values(e).some(e=>Array.isArray(e)?e.length>0:void 0!==e)}function b(e){return(e.match.countries?.length??0)>0||(e.match.regions?.length??0)>0}function v(e,t){let r=e.id?.trim();return r?`'${r}'`:`at index ${t}`}function C(e){if(!Array.isArray(e))return{ok:!1,errors:["Policy config must be an array of policy objects."]};let t=[];for(let r=0;r<e.length;r++){let n=e[r];n&&"object"==typeof n&&"match"in n&&n.match||t.push(`Policy at index ${r} is invalid: missing required 'match' property.`)}return t.length>0?{ok:!1,errors:t}:{ok:!0,output:e}}function S(e){let t,r;if(!e)return;let n=d(e?.allowedActions),o=function(e,t){let r=e?.layout;if(!r||0===r.length)return t&&t.length>0?[t]:void 0;let n=t&&t.length>0?new Set(t):void 0,o=[],i=new Set;for(let e of r){let t=d(Array.isArray(e)?e:[e]);if(!t||0===t.length)continue;let r=t.filter(e=>!i.has(e)&&(!n||!!n.has(e))&&(i.add(e),!0));r.length>0&&o.push(r)}if(0!==o.length)return o}(e,n),i=function(e){if(e&&0!==e.length)return e.flat()}(o)??n,s=Object.entries({allowedActions:n,primaryActions:function(e,t){let r=e?.primaryActions;if(r&&0!==r.length){if(t&&t.length>0){let e=r.filter(e=>t.includes(e));return e.length>0?e:void 0}return r}}(e,i),layout:o,direction:"row"===(t=e?.direction)||"column"===t?t:void 0,uiProfile:"balanced"===(r=e?.uiProfile)||"compact"===r||"strict"===r?r:void 0,scrollLock:"boolean"==typeof e?.scrollLock?e.scrollLock:void 0}).filter(([,e])=>void 0!==e);return 0!==s.length?Object.fromEntries(s):void 0}function I(e,t){let r,{errors:n}=(r=C(e)).ok?{errors:function(e,t){let r=[];e.filter(e=>e.match.isDefault).length>1&&r.push("Only one default policy is allowed"),e.filter(e=>e.match.fallback).length>1&&r.push("Only one fallback policy is allowed"),e.some(e=>e.consent?.model==="iab")&&t&&!0!==t.iabEnabled&&r.push('Policies using consent.model="iab" require top-level iab.enabled=true');let n=e.find(e=>e.consent?.model==="iab"&&!!e.ui&&(void 0!==e.ui.mode||w(e.ui.banner)||w(e.ui.dialog)));n&&r.push(`Policy '${n.id}' uses consent.model="iab" and cannot define ui.* overrides. IAB banner/dialog controls are fixed by TCF mode.`);let o=e.find(e=>e.consent?.model==="iab"&&(e.consent?.preselectedCategories?.length??0)>0);for(let[t,n]of(o&&r.push(`Policy '${o.id}' uses consent.model="iab" and cannot define consent.preselectedCategories.`),e.entries())){let e=v(n,t);for(let t of["banner","dialog"]){let o=n.ui?.[t];if(!o)continue;let i=o.allowedActions;if(i&&i.length>0&&o.primaryActions&&o.primaryActions.length>0)for(let n of o.primaryActions)i.includes(n)||r.push(`Policy ${e} ui.${t}.primaryActions '${n}' is not in allowedActions [${i.join(", ")}].`);let s=o.layout;if(s){let n=new Set,o=i?new Set(i):void 0;for(let a of s){let s=Array.isArray(a)?a:[a];if(0===s.length){r.push(`Policy ${e} ui.${t}.layout contains an empty action group.`);continue}for(let a of s)o&&!o.has(a)&&r.push(`Policy ${e} ui.${t}.layout contains '${a}' which is not in allowedActions [${i?.join(", ")}].`),n.has(a)&&r.push(`Policy ${e} ui.${t}.layout contains duplicate action '${a}'.`),n.add(a)}if(i&&n.size!==i.length){let o=i.filter(e=>!n.has(e));o.length>0&&r.push(`Policy ${e} ui.${t}.layout must include every allowed action. Missing [${o.join(", ")}].`)}}}}let i=new Map;for(let[t,n]of e.entries()){let e=n.id?.trim();if(!e){r.push(`Policy ${v(n,t)} is missing a non-empty id.`);continue}let o=i.get(e);void 0!==o?r.push(`Policy IDs must be unique. Duplicate id '${e}' found at indexes ${o} and ${t}.`):i.set(e,t),n.match.isDefault||n.match.fallback||b(n)||r.push(`Policy '${e}' has no matcher. Add countries or regions, or set match.isDefault=true.`)}return r}(r.output,t),warnings:function(e){if(0===e.length)return[];let t=new Set;0===e.filter(e=>e.match.isDefault).length&&t.add("No default policy configured. Requests that do not match region/country will have no active policy."),0===e.filter(e=>e.match.fallback).length&&t.add("No fallback policy configured. If geo-location fails, no policy will apply. Mark a strict policy with match.fallback=true.");let r=new Map,n=new Map;for(let[o,i]of e.entries()){let e=i.id?.trim()||`policy_index_${o}`,s=v(i,o);for(let n of(i.match.isDefault&&b(i)&&t.add(`Policy ${s} is marked as default and also defines explicit matchers. Explicit matchers are ignored for default resolution.`),i.match.countries??[])){let o=n.toUpperCase(),i=r.get(o);i?t.add(`Country matcher '${o}' appears in multiple policies (${i} and '${e}'). First match wins by array order.`):r.set(o,`'${e}'`)}for(let r of i.match.regions??[]){let o=`${r.country.toUpperCase()}-${r.region.toUpperCase()}`,i=n.get(o);i?t.add(`Region matcher '${o}' appears in multiple policies (${i} and '${e}'). First match wins by array order.`):n.set(o,`'${e}'`)}}return[...t]}(r.output)}:{errors:r.errors,warnings:[]};if(n.length>0)throw Error(n[0])}async function k(e){var t,r,n;let o,i;try{(o=function(e){if(void 0===e)return;let t=C(e);if(!t.ok)throw Error(t.errors[0]);return t.output}(e.policies))&&o.length>0&&I(o,void 0===e.iabEnabled?void 0:{iabEnabled:e.iabEnabled})}catch{return}if(!o||0===o.length)return;let a=(t=e.countryCode)?t.toUpperCase():null,l=(r=e.regionCode)?(r.includes("-")?r.split("-").pop():r)?.toUpperCase().trim()??null:null,c=function(e){let{c
3ompiled:t,countryCode:r,regionCode:n}=e;if(r&&n){var o,i;let e=t.regions.get((o=r,i=n,`${o}:${i}`));if(e)return{policy:e,matchedBy:"region"}}if(r){let e=t.countries.get(r);if(e)return{policy:e,matchedBy:"country"}}return!r&&t.fallbackPolicy?{policy:t.fallbackPolicy,matchedBy:"fallback"}:t.defaultPolicy?{policy:t.defaultPolicy,matchedBy:"default"}:void 0}({compiled:function(e){let t=p.get(e);if(t)return t;let r=function(e){let t={regions:new Map,countries:new Map};for(let i of e){for(let e of i.match.regions??[]){var r,n,o;let s={country:f((r=e).country),region:r.region.trim().toUpperCase()},a=(n=s.country,o=s.region,`${n}:${o}`);t.regions.has(a)||t.regions.set(a,i)}for(let e of i.match.countries??[]){let r=f(e);t.countries.has(r)||t.countries.set(r,i)}t.defaultPolicy||!0!==i.match.isDefault||(t.defaultPolicy=i),t.fallbackPolicy||!0!==i.match.fallback||(t.fallbackPolicy=i)}return t}(e);return p.set(e,r),r}(o),countryCode:a,regionCode:l});if(!c)return;let u=(i=m(n=c.policy),{id:n.id,model:i,i18n:n.i18n,consent:{expiryDays:n.consent?.expiryDays,scopeMode:y(n),categories:g(n),preselectedCategories:function(e){if("iab"===m(e))return;let t=e.consent?.preselectedCategories;if(!t||0===t.length)return;let r=g(e);return"strict"!==y(e)||!r||0===r.length||r.includes("*")?h(t):h(t.filter(e=>r.includes(e)))}(n),gpc:n.consent?.gpc},ui:"iab"===i?void 0:{mode:n.ui?.mode,banner:S(n.ui?.banner),dialog:S(n.ui?.dialog)},proof:{storeIp:n.proof?.storeIp,storeUserAgent:n.proof?.storeUserAgent,storeLanguage:n.proof?.storeLanguage}}),d=await s(u);return{policy:u,matchedBy:c.matchedBy,fingerprint:d}}let x={common:{acceptAll:"Accept All",rejectAll:"Reject All",customize:"Customize",save:"Save Settings",close:"Close",securedBy:"Secured by"},cookieBanner:{title:"We value your privacy",description:"This site uses cookies to improve your browsing experience, analyze site traffic, and show personalized content."},consentManagerDialog:{title:"Privacy Settings",description:"Customize your privacy settings here. You can choose which types of cookies and tracking technologies you allow."},consentTypes:{necessary:{title:"Strictly Necessary",description:"These cookies are essential for the website to function properly and cannot be disabled."},functionality:{title:"Functionality",description:"These cookies enable enhanced functionality and personalization of the website."},marketing:{title:"Marketing",description:"These cookies are used to deliver relevant advertisements and track their effectiveness."},measurement:{title:"Analytics",description:"These cookies help us understand how visitors interact with the website and improve its performance."},experience:{title:"Experience",description:"These cookies help us provide a better user experience and test new features."}},frame:{title:"Accept {category} consent to view this content.",actionButton:"Enable {category} consent",policyBlocked:"This content is unavailable under your region's consent policy."},legalLinks:{privacyPolicy:"Privacy Policy",cookiePolicy:"Cookie Policy",termsOfService:"Terms of Service"},iab:{banner:{title:"Privacy Settings",description:"We and our {partnerCount} partners store and/or access information on your device and process personal data, such as unique identifiers and browsing data, for this website, to:",partnersLink:"{count} partners",andMore:"And {count} more...",legitimateInterestNotice:"Some partners claim a legitimate interest to process your data. You have the right to object to this processing, customize your choices, and withdraw your consent at any time.",scopeServiceSpecific:"Your consent applies only to this website and will not affect other services.",scopeGroup:"Your choice applies across our websites in this group."},preferenceCenter:{title:"Privacy Settings",description:"Customize your privacy settings here. You can choose which types of cookies and tracking technologies you allow.",tabs:{purposes:"Purposes",vendors:"Vendors"},purposeItem:{partners:"{count} partners",vendorsUseLegitimateInterest:"{count} vendors claim legitimate interest",examples:"Examples",partnersUsingPurpose:"Partners Using This Purpose",withYourPermission:"With Your Permission",legitimateInterest:"Legitimate Interest",objectButton:"Object",objected:"Objected",rightToObject:"You have the right to object to processing based on legitimate interest."},specialPurposes:{title:"Essential Functions (Required)",tooltip:"These are required for site functionality and security. Per IAB TCF, you cannot object to these special purposes."},vendorList:{search:"Search vendors...",showingCount:"{filtered} of {total} vendors",iabVendorsHeading:"IAB Registered Vendors",iabVendorsNotice:"These partners are registered with the IAB Transparency & Consent Framework (TCF), an industry standard for managing consent",customVendorsHeading:"Custom Partners",customVendorsNotice:"These are custom partners not registered with IAB Transparency & Consent Framework (TCF). They process data based on your consent and may have different privacy practices than IAB-registered vendors.",purposes:"Purposes",specialPurposes:"Special Purposes",specialFeatures:"Special Features",features:"Features",dataCategories:"Data Categories",usesCookies:"Uses Cookies",nonCookieAccess:"Non-Cookie Access",maxAge:"Max Age: {days}d",retention:"Retention: {days}d",legitimateInterest:"Leg. Interest",privacyPolicy:"Privacy Policy",storageDisclosure:"Storage Disclosure",requiredNotice:"Required for site functionality, cannot be disabled"},footer:{consentStorage:'Consent preferences are stored in a cookie named "euconsent-v2" for 13 months. The storage duration may be refreshed when you update your preferences.'}},common:{acceptAll:"Accept All",rejectAll:"Reject All",customize:"Customize",saveSettings:"Save Settings",loading:"Loading...",showingSelectedVendor:"Showing selected vendor",clearSelection:"Clear",customPartner:"Custom partner not registered with IAB"}}};function A(e){return!(!e||"object"!=typeof e||Array.isArray(e))}function E(e,t){let r={};for(let n of["cookieBanner","consentManagerDialog","common","consentTypes","frame","legalLinks","iab"]){let o=e[n],i=t[n];(o||i)&&(r[n]=function e(t,r){if(!t&&!r)return{};let n={};if(t)for(let e of Object.keys(t))n[e]=t[e];if(!r)return n;for(let o of Object.keys(r)){let i=r[o];if(void 0===i)continue;let s=t?t[o]:void 0;A(s)&&A(i)?n[o]=e(s,i):n[o]=i}return n}(o,i))}return r}function O(e,t){let r=t?.fallback??"en";if(!e.length)return r;for(let r of function(e){if(!e)return[];let t=e.split(",").map((e,t)=>{let[r,...n]=e.split(";"),o=r?.trim().toLowerCase();if(!o)return null;let i=1;for(let e of n){let t=e.trim().toLowerCase();if(!t.startsWith("q="))continue;let r=Number.parseFloat(t.slice(2));Number.isFinite(r)&&(i=r);break}
3return{code:o.split("-")[0]??o,quality:i,index:t}}).filter(e=>!!e).sort((e,t)=>t.quality!==e.quality?t.quality-e.quality:e.index-t.index),r=new Set,n=[];for(let e of t)r.has(e.code)||(r.add(e.code),n.push(e.code));return n}(t?.header))if(e.includes(r))return r;return r}function M(e){let t=e?.disableAutoLanguageSwitch===void 0?void 0:!e.disableAutoLanguageSwitch;return{messages:e?.i18n?.messages??e?.translations??{},locale:e?.i18n?.locale??e?.defaultLanguage,detectBrowserLanguage:e?.i18n?.detectBrowserLanguage??t}}function R(e){return{translations:e.messages,defaultLanguage:e.locale,disableAutoLanguageSwitch:void 0===e.detectBrowserLanguage?void 0:!e.detectBrowserLanguage}}function P(e,t){if(e||t)return R(M({...e??{},...t?{i18n:t}:{}}))}let T=e=>{let t,r=new Set,n=(e,n)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=n?n:"object"!=typeof o||null===o)?o:Object.assign({},t,o),r.forEach(r=>r(t,e))}},o=()=>t,i={setState:n,getState:o,getInitialState:()=>s,subscribe:e=>(r.add(e),()=>r.delete(e))},s=t=e(n,o,i);return i},L=/^\/+/;function D(e,t=null,r=null,n=null){return{data:t,error:r,ok:e,response:n}}function N(e,t=500,r="HANDLER_ERROR",n){return function(e,t=500,r="ERROR",n){return D(!1,null,{message:e,status:t,code:r,cause:n},null)}(e,t,r,n)}async function _(e,t,r){let n=e[t];if(!n){let e=N(`No endpoint handler found for '${String(t)}'`,404,"ENDPOINT_NOT_FOUND");if(r?.throw)throw Error(`No endpoint handler found for '${String(t)}'`);return e}try{let e=await n(r);return{data:e.data,error:e.error,ok:e.ok??!e.error,response:e.response}}catch(t){let e=N(t instanceof Error?t.message:String(t),0,"HANDLER_ERROR",t);if(r?.throw)throw t;return e}}async function j(e,t,r,n){let o=r.replace(L,"").split("/")[0],i=t[r];if(i)try{return await i(n)}catch(e){return N(e instanceof Error?e.message:String(e),0,"HANDLER_ERROR",e)}return o&&o in e?await _(e,o,n):N(`No endpoint handler found for '${r}'`,404,"ENDPOINT_NOT_FOUND")}
3async function U(e,t){let r=("init"in e&&e.init,"init");return await _(e,r,t)}async function B(e,t){return await _(e,"setConsent",t)}class F{endpointHandlers;dynamicHandlers={};constructor(e){this.endpointHandlers=e.endpointHandlers}async init(e){return U(this.endpointHandlers,e)}async setConsent(e){return B(this.endpointHandlers,e)}async identifyUser(e){if(this.endpointHandlers.identifyUser)return this.endpointHandlers.identifyUser(e);let t=e.body?.id;return t?this.$fetch(`/subjects/${t}`,{...e,method:"PATCH"}):{ok:!1,data:null,response:null,error:{message:"Subject ID is required to identify user",status:400,code:"MISSING_SUBJECT_ID"}}}registerHandler(e,t){this.dynamicHandlers[e]=t}async $fetch(e,t){return j(this.endpointHandlers,this.dynamicHandlers,e,t)}}let $=[500,502,503,504],z=[400,401,403,404],V,W=/^(?:[a-z+]+:)?\/\//i,G=()=>{};function H(e){return e?{log:(...e)=>console.log("[c15t]",...e),debug:(...e)=>console.debug("[c15t]",...e)}:{log:G,debug:G}}let Y=H(!1),J=e=>new Promise(t=>setTimeout(t,e));function Z(e){return e?.subjectId||e?.id}function q(e){let t=e.length;for(;t>0&&"/"===e[t-1];)t--;return e.slice(0,t)}async function X(e,t,r){let n={...e.retryConfig,...r?.retryConfig||{},retryableStatusCodes:r?.retryConfig?.retryableStatusCodes??e.retryConfig.retryableStatusCodes??$,nonRetryableStatusCodes:r?.retryConfig?.nonRetryableStatusCodes??e.retryConfig.nonRetryableStatusCodes??z},{maxRetries:o,initialDelayMs:i,backoffFactor:s,retryableStatusCodes:a,nonRetryableStatusCodes:l,retryOnNetworkError:c}=n,u=0,d=i,h=null;for(;u<=(o??0);){let i,f="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),p=e.customFetch||globalThis.fetch,m=function(e,t){if(W.test(e)){let r=new URL(e),n=q(r.pathname),o=t.replace(L,"");return r.pathname=`${n}/${o}`,r.toString()}let r=q(e),n=t.replace(L,"");return`${r}/${n}`}(e.backendURL,t);try{i=new URL(m)}catch{i=new URL(m,window.location.origin)}if(r?.query)for(let[e,t]of Object.entries(r.query))void 0!==t&&i.searchParams.append(e,String(t));
3let g={method:r?.method||"GET",mode:e.corsMode,credentials:"include",headers:{...e.headers,"X-Request-ID":f,...r?.headers},...r?.fetchOptions};r?.body&&"GET"!==g.method&&(g.body=JSON.stringify(r.body));try{let e=await p(i.toString(),g),c=null,f=null;try{let t=e.headers.get("content-type");t?.includes("application/json")&&204!==e.status&&"0"!==e.headers.get("content-length")?c=await e.json():204===e.status&&(c=null)}catch(e){f=e}if(f){let n=D(!1,null,{message:"Failed to parse response",status:e.status,code:"PARSE_ERROR",cause:f},e);if(r?.onError?.(n,t),r?.throw)throw Error("Failed to parse response");return n}if(e.status>=200&&e.status<300){let t=D(!0,c,null,e);return r?.onSuccess?.(t),t}let m=c,y=D(!1,null,{message:m?.message||`Request failed with status ${e.status}`,status:e.status,code:m?.code||"API_ERROR",details:m?.details||null},e);h=y;let w=!1;if(l?.includes(e.status))Y.debug(`Not retrying request to ${t} with status ${e.status} (nonRetryableStatusCodes)`),w=!1;else if("function"==typeof n.shouldRetry)try{w=n.shouldRetry(e,{attemptsMade:u,url:i.toString(),method:g.method||"GET"}),Y.debug(`Custom retry strategy for ${t} with status ${e.status}: ${w}`)}catch{w=a?.includes(e.status)??!1,Y.debug(`Custom retry strategy failed, falling back to status code check: ${w}`)}else w=a?.includes(e.status)??!1,Y.debug(`Standard retry check for ${t} with status ${e.status}: ${w}`);if(!w||u>=(o??0)){if(r?.onError?.(y,t),r?.throw)throw Error(y.error?.message||"Request failed");return y}u++,await J(d??0),d=(d??0)*(s??2)}catch(i){if(i&&"Failed to parse response"===i.message)throw i;let e=!(i instanceof Response),n=D(!1,null,{message:i instanceof Error?i.message:String(i),status:0,code:"NETWORK_ERROR",cause:i},null);if(h=n,!(e&&c)||u>=(o??0)){if(r?.onError?.(n,t),r?.throw)throw i;return n}u++,await J(d??0),d=(d??0)*(s??2)}}let f=h||D(!1,null,{message:`Request failed after ${o} retries`,status:0,code:"MAX_RETRIES_EXCEEDED"},null);if(r?.onError?.(f,t),r?.throw)throw Error(`Request failed after ${o} retries`);return f}function K(e){return{expiryDays:e?.defaultExpiryDays??365,crossSubdomain:e?.crossSubdomain??!1,domain:e?.defaultDomain??"",path:"/",secure:"u">typeof window&&"https:"===window.location.protocol,sameSite:"Lax"}}function Q(){if("u"<typeof window)return"";let e=window.location.hostname;if("localhost"===e||/^\d+\.\d+\.\d+\.\d+$/.test(e))return e;let t=e.split(".");return t.length>=2?`.${t.slice(-2).join(".")}`:e}let ee={consents:"c",consentInfo:"i",timestamp:"ts",iabCustomVendorConsents:"icv",iabCustomVendorLegitimateInterests:"icvli",time:"t",type:"y",id:"id",subjectId:"sid",externalId:"eid",materialPolicyFingerprint:"mpf",identityProvider:"idp"},et=Object.entries(ee).reduce((e,[t,r])=>(e[r]=t,e),{});function er(e,t,r,n){if("u"<typeof document)return;let o={...K(n),...r};o.crossSubdomain&&!r?.domain&&(o.domain=Q());try{let r;if("string"==typeof t)r=t;else{var i;let e=function e(t,r=""){let n={};for(let[o,i]of Object.entries(t)){let t=r?`${r}.${o}`:o;null==i?n[t]="":"boolean"==typeof i?i&&(n[t]="1"):"object"!=typeof i||Array.isArray(i)?n[t]=String(i):Object.assign(n,e(i,t))}return n}(t);i=function(e){let t={};for(let[r,n]of Object.entries(e))t[r.split(".").map(e=>ee[e]||e).join(".")]=n;return t}(e),r=Object.entries(i).map(([e,t])=>`${e}:${t}`).join(",")}let n=new Date;n.setTime(n.getTime()+24*o.expiryDays*36e5);let s=`expires=${n.toUTCString()}`,a=[`${e}=${r}`,s,`path=${o.path}`];o.domain&&a.push(`domain=${o.domain}`),o.secure&&a.push("secure"),o.sameSite&&a.push(`SameSite=${o.sameSite}`),document.cookie=a.join("; ")}catch(t){console.warn(`Failed to set cookie "${e}":`,t)}}function en(e,t,r){if("u"<typeof document)return;let n={...K(r),...t};n.crossSubdomain&&!t?.domain&&(n.domain=Q());try{let t=[`${e}=`,"expires=Thu, 01 Jan 1970 00:00:00 GMT",`path=${n.path}`];n.domain&&t.push(`domain=${n.domain}`),document.cookie=t.join("; ")}catch(t){console.warn(`Failed to delete cookie "${e}":`,t)}}let eo={translations:{en:x},defaultLanguage:"en",disableAutoLanguageSwitch:!1},ei=[{defaultValue:!0,description:"These trackers are used for activities that are strictly necessary to operate or deliver the service you requested from us and, therefore, do not require you to consent.",disabled:!0,display:!0,gdprType:1,name:"necessary"},{defaultValue:!1,description:"These trackers enable basic interactions and functionalities that allow you to access selected features of our service and facilitate your communication with us.",display:!1,gdprType:2,name:"functionality"},{defaultValue:!1,description:"These trackers help us to measure traffic and analyze your behavior to improve our service.",display:!1,gdprType:4,name:"measurement"},{defaultValue:!1,description:"These trackers help us to improve the quality of your user experience and enable interactions with external 
3content, networks, and platforms.",display:!1,gdprType:3,name:"experience"},{defaultValue:!1,description:"These trackers help us to deliver personalized ads or marketing content to you, and to measure their performance.",display:!1,gdprType:5,name:"marketing"}],es=ei.map(e=>e.name),ea="c15t",el="privacy-consent-storage",ec={debug:!1,config:{pkg:"c15t",version:"2.0.4",mode:"Unknown"},consents:ei.reduce((e,t)=>(e[t.name]=t.defaultValue,e),{}),selectedConsents:ei.reduce((e,t)=>(e[t.name]=t.defaultValue,e),{}),consentInfo:null,branding:"c15t",activeUI:"none",isLoadingConsentInfo:!1,hasFetchedBanner:!1,lastBannerFetchData:null,consentCategories:["necessary"],callbacks:{},locationInfo:null,overrides:void 0,legalLinks:{},translationConfig:eo,user:void 0,networkBlocker:void 0,storageConfig:void 0,includeNonDisplayedConsents:!1,consentTypes:ei,iframeBlockerConfig:{disableAutomaticBlocking:!1},scripts:[],loadedScripts:{},scriptIdMap:{},model:"opt-in",policyBanner:{},policyDialog:{},policyCategories:null,policyScopeMode:null,initDataSource:null,initDataSourceDetail:null,iab:null,reloadOnConsentRevoked:!0,ssrDataUsed:!1,ssrSkippedReason:null};function eu(e){if("string"!=typeof e)return;let t=e.trim();if(""!==t&&"undefined"!==t&&"null"!==t)return t}function ed(e){let t=eu(e.externalId),r=eu(e.identityProvider);return{...t?{externalId:t}:{},...r?{identityProvider:r}:{}}}function eh(e){if(!e)return e;let t={...e},{externalId:r,identityProvider:n}=ed({externalId:t.externalId,identityProvider:t.identityProvider});return r?t.externalId=r:delete t.externalId,n?t.identityProvider=n:delete t.identityProvider,t}function ef(e,t,r){let n=!1,o=!1,i=r?.storageKey||ea,s=em(r),a={...{...s,...e,consentInfo:eh(e.consentInfo||s?.consentInfo?{...s?.consentInfo??{},...e.consentInfo??{}}:void 0),iabCustomVendorConsents:e.iabCustomVendorConsents??s?.iabCustomVendorConsents,iabCustomVendorLegitimateInterests:e.iabCustomVendorLegitimateInterests??s?.iabCustomVendorLegitimateInterests}};a.iabCustomVendorConsents&&0!==Object.keys(a.iabCustomVendorConsents).length||delete a.iabCustomVendorConsents,a.iabCustomVendorLegitimateInterests&&0!==Object.keys(a.iabCustomVendorLegitimateInterests).length||delete a.iabCustomVendorLegitimateInterests;try{"u">typeof window&&window.localStorage&&(window.localStorage.setItem(i,JSON.stringify(a)),n=!0)}catch(e){console.warn("Failed to save consent to localStorage:",e)}try{er(i,a,t,r),o=!0}catch(e){console.warn("Failed to save consent to cookie:",e)}if(!n&&!o)throw Error("Failed to save consent to any storage method")}function ep(e){let t=e.consents||{},r={...t};for(let e of es)r[e]=t[e]??!1;return{...e,consents:r}}function em(e){!function(e){let t=e?.storageKey||ea;if(t!==el)try{if("u">typeof window&&window.localStorage){if(window.localStorage.getItem(t))return void window.localStorage.removeItem(el);let e=window.localStorage.getItem(el);e&&(window.localStorage.setItem(t,e),window.localStorage.removeItem(el),Y.log(`Migrated consent data from "${el}" to "${t}"`))}}catch(e){console.warn("[c15t] Failed to migrate legacy storage:",e)}}(e);let t=e?.storageKey||ea,r=null,n=null;try{if("u">typeof window&&window.localStorage){let e=window.localStorage.getItem(t);e&&(r=JSON.parse(e))}}catch(e){console.warn("Failed to read consent from localStorage:",e)}try{n=function(e){if("u"<typeof document)return null;try{let t=`${e}=`;for(let e of document.cookie.split(";")){let r=e;for(;" "===r.charAt(0);)r=r.substring(1);if(0===r.indexOf(t)){let e=r.substring(t.length);if(e.includes(":")){let t=function(e){if(!e)return{};let t={};for(let r of e.split(",")){let e=r.indexOf(":");if(-1===e)continue;let n=r.substring(0,e),o=r.substring(e+1);t[n]=o}return t}(e),r=function(e){let t={};for(let[r,n]of Object.entries(e))t[r.split(".").map(e=>et[e]||e).join(".")]=n;return t}(t);return function(e){let t={};for(let[r,n]of Object.entries(e)){let e=r.split(".");if(0===e.length)continue;let o=t;for(let t=0;t<e.length-1;t++){let r=e[t];void 0!==r&&(o[r]||(o[r]={}),o=o[r])}let i=e[e.length-1];void 0!==i&&("1"===n?o[i]=!0:"0"===n?o[i]=!1:""===n?o[i]=null:Number.isNaN(Number(n))||""===n?o[i]=n:o[i]=Number(n))}return t}(r)}return e}}return null}catch(t){return console.warn(`Failed to get cookie "${e}":`,t),null}}(t)}
3catch(e){console.warn("Failed to read consent from cookie:",e)}let o=null,i=null;if(n?(o=n,i="cookie"):r&&(o=r,i="localStorage"),o&&i){let r=e?.crossSubdomain===!0||!!e?.defaultDomain;if("localStorage"!==i||n){if("cookie"===i)try{if("u">typeof window&&window.localStorage){let e=o;"object"==typeof e&&null!==e&&"consents"in e&&(e=ep(e));let n=null;try{let e=window.localStorage.getItem(t);if(e){let t=JSON.parse(e);n="object"==typeof t&&null!==t&&"consents"in t?ep(t):t}}catch{n=null}let i=JSON.stringify(e),s=JSON.stringify(n);i!==s&&(window.localStorage.setItem(t,i),n?r?Y.log("Updated localStorage with consent from cookie (cross-subdomain mode)"):Y.log("Updated localStorage with consent from cookie"):Y.log("Synced consent from cookie to localStorage"))}}catch(e){console.warn("[c15t] Failed to sync consent to localStorage:",e)}}else try{er(t,o,void 0,e),Y.log("Synced consent from localStorage to cookie")}catch(e){console.warn("[c15t] Failed to sync consent to cookie:",e)}}if(o&&function(e){if("object"!=typeof e||null===e)return!1;let t=e.consentInfo;if(!t||"object"!=typeof t)return!1;let r="string"==typeof t.id,n="string"==typeof t.subjectId;return r&&!n}(o))return Y.log("Detected legacy consent format (v1.x). Re-consent required for v2.0."),eg(void 0,e),null;if(o&&"object"==typeof o){let e=ep(o);return"object"==typeof e&&null!==e&&"consentInfo"in e&&(e.consentInfo=eh(e.consentInfo)),e}return o}function eg(e,t){let r=t?.storageKey||ea;try{"u">typeof window&&window.localStorage&&(window.localStorage.removeItem(r),r!==el&&window.localStorage.removeItem(el))}catch(e){console.warn("Failed to remove consent from localStorage:",e)}try{en(r,e,t),r!==el&&en(el,e,t)}catch(e){console.warn("Failed to remove consent cookie:",e)}}let ey="/subjects",ew="/subjects";async function eb(e,t,r,n,o){try{let i=await X(e,t,{method:r,...n});if(i.ok)return i;return console.warn(`API request failed, falling back to offline mode for ${t}`),o(n)}catch(e){return console.warn(`Error calling ${t}, falling back to offline mode:`,e),o(n)}}async function ev(e){let t="c15t-pending-identify-submissions",r=Z(e?.body);try{if("u">typeof window&&e?.body&&window.localStorage){let n=[];try{let e=window.localStorage.getItem(t);e&&(n=JSON.parse(e))}catch(e){console.warn("Error parsing pending identify submissions:",e),n=[]}let o=e.body;n.some(e=>Z(e)===r&&e.externalId===o.externalId)||(n.push(o),window.localStorage.setItem(t,JSON.stringify(n)),Y.log("Queued identify user submission for retry on next page load"))}}catch(e){console.warn("Failed to write to localStorage in identify offline fallback:",e)}let n=D(!0,null,null,null);return e?.onSuccess&&await e.onSuccess(n),n}async function eC(e,t,r){let{body:n,...o}=r,i=Z(n);if(!n||!i)return{ok:!1,data:null,response:null,error:{message:"Subject ID is required to identify user",status:400,code:"MISSING_SUBJECT_ID"}};let s=em(t);ef({consents:s?.consents||{},consentInfo:{...s?.consentInfo,time:s?.consentInfo?.time||Date.now(),subjectId:i,externalId:n.externalId,identityProvider:n.identityProvider}},void 0,t);let{subjectId:a,id:l,...c}=n;return eb(e,`${ew}/${i}`,"PATCH",{...o,body:c},async e=>{let t={subjectId:i,...e?.body};return ev({...e,body:t})})}function eS(e){return e.explicitPolicy?e.explicitPolicy:{id:"offline_opt_in_banner",model:"opt-in",consent:{expiryDays:365},ui:{mode:"banner",banner:t(),dialog:t()}}}function eI(e){let t={jurisdiction:e.jurisdiction??"NONE",location:{countryCode:e.countryCode??null,regionCode:e.regionCode??null},translations:{language:e.language??"en",translations:e.translations??x},branding:"c15t",gvl:e.gvl??null};return e.policy&&(t.policy=e.policy),e.policyDecision&&(t.policyDecision=e.policyDecision),e.policySnapshotToken&&(t.policySnapshotToken=e.policySnapshotToken),t}async function ek(e,t){let r=D(!0,t,null,null);return e?.onSuccess&&await e.onSuccess(r),r}async function ex(e,t){let r=eS({}),n=null;if(t?.enabled&&"iab"===r.model)try{let e=t._module?.fetchGVL;e&&(n=await e(t.vendorIds))}catch(e){console.warn("Failed to fetch GVL in offline fallback:",e)}let o=eI({countryCode:e?.headers?.["x-c15t-country"]??null,regionCode:e?.headers?.["x-c15t-region"]??null,gvl:n,policy:r});return ek(e,o)}async function eA(e,t,r){try{let n=await X(e,"/init",{method:"GET",...t});if(n.ok)return n;return console.warn("API request failed, falling back to offline mode for consent banner"),ex(t,r)}catch(e){return console.warn("Error fetching consent banner info, falling back to offline mode:",e),ex(t,r)}}let eE="c15t-pending-consent-submissions",eO="c15t-pending-identify-submissions";async function eM(e,t){let r=[...t];for(let t=0;t<3&&r.length>0;t++){let n=[];for(let t=0;t<r.length;t++){let o=r[t];
3if(o)try{let{externalId:r,identityProvider:i}=ed({externalId:o.externalSubjectId,identityProvider:o.identityProvider}),s={...o,...r?{externalSubjectId:r}:{},...i?{identityProvider:i}:{}};r||delete s.externalSubjectId,i||delete s.identityProvider,Y.log("Retrying consent submission:",o),(await X(e,ey,{method:"POST",body:s})).ok&&(Y.log("Successfully resubmitted consent"),n.push(t))}catch(e){console.warn("Failed to resend consent submission:",e)}}for(let e=n.length-1;e>=0;e--){let t=n[e];void 0!==t&&r.splice(t,1)}if(0===r.length)break;t<2&&await J(1e3*(t+1))}try{"u">typeof window&&window.localStorage&&(r.length>0?(window.localStorage.setItem(eE,JSON.stringify(r)),Y.log(`${r.length} consent submissions still pending for future retry`)):(window.localStorage.removeItem(eE),Y.log("All pending consent submissions processed successfully")))}catch(e){console.warn("Error updating pending submissions storage:",e)}}async function eR(e,t){let r=[...t];for(let t=0;t<3&&r.length>0;t++){let n=[];for(let t=0;t<r.length;t++){let o=r[t];if(!o)continue;let i=Z(o);if(!i){console.warn("Dropping pending identify submission without a subject ID"),n.push(t);continue}if(!o.externalId){console.warn("Dropping pending identify submission without an externalId"),n.push(t);continue}try{Y.log("Retrying identify user submission:",o);let r=`${ew}/${i}`,{subjectId:s,id:a,...l}=o;(await X(e,r,{method:"PATCH",body:l})).ok&&(Y.log("Successfully resubmitted identify user"),n.push(t))}catch(e){console.warn("Failed to resend identify user submission:",e)}}for(let e=n.length-1;e>=0;e--){let t=n[e];void 0!==t&&r.splice(t,1)}if(0===r.length)break;t<2&&await J(1e3*(t+1))}try{"u">typeof window&&window.localStorage&&(r.length>0?(window.localStorage.setItem(eO,JSON.stringify(r)),Y.log(`${r.length} identify submissions still pending for future retry`)):(window.localStorage.removeItem(eO),Y.log("All pending identify submissions processed successfully")))}catch(e){console.warn("Error updating pending identify submissions storage:",e)}}async function eP(e,t){let r="c15t-pending-consent-submissions",n=t?.body?.subjectId;try{if("u">typeof window&&(ef({consents:t?.body?.preferences||{},consentInfo:{time:Date.now(),subjectId:n,externalId:t?.body?.externalSubjectId,identityProvider:t?.body?.identityProvider}},void 0,e),t?.body&&window.localStorage)){let e=[];try{let t=window.localStorage.getItem(r);t&&(e=JSON.parse(t))}catch(t){console.warn("Error parsing pending submissions:",t),e=[]}let n=t.body;e.some(e=>JSON.stringify(e)===JSON.stringify(n))||(e.push(n),window.localStorage.setItem(r,JSON.stringify(e)),Y.log("Queued consent submission for retry on next page load"))}}catch(e){console.warn("Failed to write to localStorage in offline fallback:",e)}let o=D(!0,null,null,null);return t?.onSuccess&&await t.onSuccess(o),o}async function eT(e,t,r){return ef({consents:r?.body?.preferences||{},consentInfo:{time:Date.now(),subjectId:r?.body?.subjectId,externalId:r?.body?.externalSubjectId,identityProvider:r?.body?.identityProvider}},void 0,t),await eb(e,ey,"POST",r,async e=>eP(t,e))}class eL{backendURL;storageConfig;iabConfig;headers;customFetch;corsMode;retryConfig;fetcherContext;constructor(e){this.backendURL=e.backendURL.endsWith("/")?e.backendURL.slice(0,-1):e.backendURL,this.headers={"Content-Type":"application/json",...e.headers},this.customFetch=e.customFetch,this.corsMode=e.corsMode||"cors",this.storageConfig=e.storageConfig,this.iabConfig=e.iabConfig,this.retryConfig={maxRetries:e.retryConfig?.maxRetries??3??3,initialDelayMs:e.retryConfig?.initialDelayMs??100??100,backoffFactor:e.retryConfig?.backoffFactor??2??2,retryableStatusCodes:e.retryConfig?.retryableStatusCodes??$,nonRetryableStatusCodes:e.retryConfig?.nonRetryableStatusCodes??z,shouldRetry:e.retryConfig?.shouldRetry??V,retryOnNetworkError:e.retryConfig?.retryOnNetworkError??!0},this.fetcherContext={backendURL:this.backendURL,headers:this.headers,customFetch:this.customFetch,corsMode:this.corsMode,retryConfig:this.retryConfig},this.checkPendingConsentSubmissions(),this.checkPendingIdentifySubmissions()}async init(e){return eA(this.fetcherContext,e,this.iabConfig)}async setConsent(e){return eT(this.fetcherContext,this.storageConfig,e)}async identifyUser(e){return eC(this.fetcherContext,this.storageConfig,e)}async $fetch(e,t){return X(this.fetcherContext,e,t)}checkPendingConsentSubmissions(){!function(e,t){if(!("u"<typeof window)&&window.localStorage)try{window.localStorage.setItem("c15t-storage-test-key","test"),window.localStorage.removeItem("c15t-storage-test-key");let e=window.localStorage.getItem(eE);if(!e)return;let r=JSON.parse(e);if(!r.length)return void window.localStorage.removeItem(eE);Y.log(`Found ${r.length} pending consent submission(s) to retry`),setTimeout(()=>{t(r)},2e3)}catch(e){console.warn("Failed to check for pending consent submissions:",e)}}(this.fetcherContext,e=>this.processPendingConsentSubmissions(e))}async processPendingConsentSubmissions(e){return eM(this.fetcherContext,e)}checkPendingIdentifySubmissions(){!function(e,t){if(!("u"<typeof window)&&window.localStorage)try{let e=window.localStorage.getItem(eO);if(!e)return;let r=JSON.parse(e);if(!r.length)return void window.localStorage.removeItem(eO);Y.log(`Found ${r.length} pending identify user submission(s) to retry`),setTimeout(()=>{t(r)},2500)}catch(e){console.warn("Failed to check for pending identify submissions:",e)}}(this.fetcherContext,e=>this.processPendingIdentifySubmissions(e))}async processPendingIdentifySubmissions(e){return eR(this.fetcherContext,e)}}function eD(e=null){return D(!0,e)}async function eN(e){let t=eD();return e?.onSuccess&&await e.onSuccess(t),t}function e_(e){if(!e)return;let t=e.split(",")[0]?.split(";")[0]?.trim().toLowerCase();if(t)return t.split("-")[0]??void 0}async function ej(e,t,r,n){var o,i,s,a;let d,h,f=t?.headers?.["x-c15t-country"]??"GB",p=t?.headers?.["x-c15t-region"]??null,m=t?.headers?.["accept-language"]??null,g=function(e,t){let r={EU:new Set(["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE"]),EEA:new Set(["IS","NO","LI"]),UK:new Set(["GB"]),CH:new Set(["CH"]),BR:new Set(["BR"]),CA:new Set(["CA"]),AU:new Set(["AU"]),JP:new Set(["JP"]),KR:new Set(["KR"]),CA_QC_REGIONS:new Set(["QC"])},n="NONE";if(e){let o=e.toUpperCase(),i=t&&"string"==typeof t?(t.includes("-")?t.split("-").pop():t).toUpperCase():null;if("CA"===o&&i&&r.CA_QC_REGIONS.has(i))return"QC_LAW25";for(let{sets:e,code:t}of[{sets:[r.EU,r.EEA,r.UK],code:"GDPR"},{sets:[r.CH],code:"CH"},{sets:[r.BR],code:"BR"},{sets:[r.CA],code:"PIPEDA"},{sets:[r.AU],code:"AU"},{sets:[r.JP],code:"APPI"},{sets:[r.KR],code:"PIPA"}])if(e.some(e=>e.has(o))){n=t;break}}return n}(f,p),y=n?.policyPacks,w=n?.policyPacks!==void 0,b=function(e){let t,r=(t=e.i18n?.messages)&&Object.keys(t).length>0?t:e.customTranslations&&Object.keys(e.customTranslations).length>0?{[l]:{translations:e.customTranslations}}:{},n=Object.keys(r).sort(),o=e.i18n?.defaultProfile??l,i=[],s=[];for(let t of(e.customTranslations&&Object.keys(e.customTranslations).length>0&&s.push("`customTranslations` is deprecated. Migrate to `i18n.messages`."),n.length>0&&!r[o]&&s.push(`Default i18n profile '${o}' is not configured. Fallbacks may skip expected default profile behavior.`),e.policies??[])){if(!t.i18n)continue;let e=function(e){let t=e.policyProfile??e.defaultProfile;return e.profiles[t]?t:e.defaultProfile}({profiles:r,defaultProfile:o,policyProfile:t.i18n.messageProfile}),a=u(t.i18n.language);t.i18n.messageProfile&&!r[t.i18n.messageProfile]&&i.push(`Policy '${t.id}' references missing i18n profile '${t.i18n.messageProfile}'.`);let l=r[e],d=!!l&&Object.keys(l.translations??{}).length>0;if(t.i18n.messageProfile&&!d&&i.push(`Policy '${t.id}' references i18n profile '${t.i18n.messageProfile}' with no configured translations.`),t.i18n.messageProfile||t.i18n.language||s.push(`Policy '${t.id}' defines i18n without language or messageProfile. Runtime will use request language + default profile.`),!a)continue;let h=n.length>0?function(e){let t=u(e.profile?.fallbackLanguage)??"en",r=Object.keys(e.profile?.translations??{}).sort();return r.includes(t)?t:r.includes("en")?"en":r[0]??t}({profile:l}):"en",f=!!l?.translations[a]||!!l?.translations[h],p=0===n.length&&c.has(a);f||p||i.push(`Policy '${t.id}' i18n language '${a}' has no configured translation in profile '${e}', and no configured fallback exists.`)}return{profiles:n,errors:i,warnings:s}}({i18n:n?.i18n,policies:y});for(let e of b.warnings)console.warn(`[c15t] offlinePolicy.i18n: ${e}`);if(b.errors.length>0)throw Error(`Invalid offlinePolicy.i18n configuration:
4${b.errors.map(e=>`- ${e}`).join("\n")}`);y&&y.length>0&&I(y,{iabEnabled:r?.enabled===!0});let v=y&&y.length>
40?await k({policies:y,countryCode:f,regionCode:p,jurisdiction:g,iabEnabled:r?.enabled===!0}):void 0,C=!n?.policy&&!v&&!w,S={...n,policy:n?.policy??v?.policy??(w?{id:"offline_no_banner",model:"none",ui:{mode:"none"}}:void 0)??(C?eS({}):void 0),policyDecision:n?.policyDecision??(v?{policyId:v.policy.id,fingerprint:v.fingerprint,matchedBy:v.matchedBy,country:f,region:p,jurisdiction:g}:void 0)};if(n?.i18n?.messages&&Object.keys(n.i18n.messages).length>0){let e,t,r,a,l,c,u,f,p,g,y=(t=(i={profiles:e=(o={acceptLanguage:m,i18n:n.i18n,policyI18n:S.policy?.i18n}).i18n.messages??{},defaultProfile:o.i18n.defaultProfile??"default",policyProfile:o.policyI18n?.messageProfile}).policyProfile??i.defaultProfile,r=i.profiles[t]?t:i.defaultProfile,a=Object.keys(e[r]?.translations??{}).sort(),s={profile:e[r]},l=e_(s.profile?.fallbackLanguage)??"en",u=(c=Object.keys(s.profile?.translations??{}).sort()).includes(l)?l:c.includes("en")?"en":c[0]??l,f=e_(o.policyI18n?.language)??O(a,{header:o.acceptLanguage,fallback:u}),p=e[r]?.translations[f]?f:u,g=e[r]?.translations[p],{language:p,translations:g?E(x,g):x});d=y.language,h=y.translations}else if(e?.translations&&Object.keys(e.translations).length>0){let t,r,n=e.translations;d=O(Object.keys(n),{header:m,fallback:(a=e.defaultLanguage,t=Object.keys(n).sort(),(r=a?.toLowerCase())&&t.includes(r)?r:t.includes("en")?"en":t[0]??"en")}),h=E(x,n[d]??{})}else d=O(Object.keys(eo.translations),{header:m,fallback:eo.defaultLanguage??"en"}),h=eo.translations[d];let A=null;if(r?.enabled&&S.policy?.model==="iab")if(r.gvl)A=r.gvl;else try{let e=r._module?.fetchGVL;e&&(A=await e(r.vendorIds))}catch(e){console.warn("Failed to fetch GVL in offline mode:",e)}let M=eD(eI({jurisdiction:g,countryCode:f,regionCode:p,language:d,translations:h,gvl:A,policy:S.policy,policyDecision:S.policyDecision,policySnapshotToken:S.policySnapshotToken}));return t?.onSuccess&&await t.onSuccess(M),M}async function eU(e,t){let r=t?.body?.subjectId;try{"u">typeof window&&ef({consentInfo:{time:Date.now(),subjectId:r,externalId:t?.body?.externalSubjectId,identityProvider:t?.body?.identityProvider},consents:t?.body?.preferences||{}},void 0,e)}catch(e){console.warn("Failed to write to storage:",e)}return await eN(t)}class eB{storageConfig;initialTranslationConfig;iabConfig;policyConfig;constructor(e,t,r,n){this.storageConfig=e,this.initialTranslationConfig=t,this.iabConfig=r,this.policyConfig=n}async init(e){return ej(this.initialTranslationConfig,e,this.iabConfig,this.policyConfig)}async setConsent(e){return eU(this.storageConfig,e)}async identifyUser(e){return console.warn("identifyUser called in offline mode - external ID will not be linked"),eN(e)}async $fetch(e,t){return await eN(t)}}let eF="hosted",e$=!1;function ez(e){if("c15t"===e){let e="u">typeof globalThis&&"process"in globalThis?globalThis.process?.env?.NODE_ENV:void 0;return e$||"production"===e||(e$=!0,console.warn("[c15t] `mode: 'c15t'` is deprecated and will be removed in a future major release. Use `mode: 'hosted'` instead.")),eF}return"offline"===e||"custom"===e?e:eF}function eV(e){return void 0!==e.offlinePolicy?e.offlinePolicy:e.store?.offlinePolicy}let eW=new Map;function eG(e){let t,n=function(e){var t;let n=ez(e.mode),i=eV(e),s=(t=e.storageConfig)?Object.keys(t).sort().map(e=>{let r=t[e];return null==r?`${e}:null`:`${e}:${String(r)}`}).join("|"):"",a=s?`:storage:${s}`:"";if("offline"===n){let t=e.store?.initialTranslationConfig?.translations,n=e.store?.initialTranslationConfig?.defaultLanguage,s="";s=t?`:translations:${Object.keys(t).sort().join(",")}`:"";let l="";l=n?`:default-language:${n}`:"";let c=e.store?.iab,u="";u=c?.enabled?":iab:enabled":"";let d="";return i&&(d=`:policy:${o(r(i))}`),`offline${a}${s}${l}${u}${d}`}if("custom"===n){let t=Object.keys(("endpointHandlers"in e?e.endpointHandlers:void 0)||{}).sort().join(",");return`custom:${t}${a}`}let l="";if("headers"in e&&e.headers){let t=Object.keys(e.headers).sort();l=`:headers:${t.map(t=>`${t}=${e.headers?.[t]}`).join(",")}`}return`hosted:${e.backendURL||""}${l}${a}`}(e);if(eW.has(n)){if("offline"!==e.mode&&"custom"!==e.mode&&"headers"in e&&e.headers){let t=eW.get(n);t instanceof eL&&(t.headers={"Content-Type":"application/json",...e.headers})}let t=eW.get(n);if(t)return new Proxy(t,{get:(e,t)=>e[t]})}let i=ez(e.mode);
4switch(i){case"custom":t=new F({endpointHandlers:e.endpointHandlers});break;case"offline":{let r=e.store?.iab,n=eV(e);t=new eB(e.storageConfig,e.store?.initialTranslationConfig,r?{enabled:r.enabled,vendorIds:r.vendors,gvl:r.gvl,_module:r._module}:void 0,n);break}case"hosted":{let r=e.store?.iab;t=new eL({backendURL:e.backendURL||"/api/c15t",headers:e.headers,customFetch:e.customFetch,retryConfig:e.retryConfig,storageConfig:e.storageConfig,iabConfig:r?{enabled:r.enabled,vendorIds:r.vendors,gvl:r.gvl,_module:r._module}:void 0});break}default:t=function(e){throw Error(`Unsupported client mode: ${String(e)}`)}(i)}return eW.set(n,t),t}let eH="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";function eY(){let e=crypto.getRandomValues(new Uint8Array(20)),t=Date.now()-17e11,r=Math.floor(t/0x100000000),n=t>>>0;return e[0]=r>>>24&255,e[1]=r>>>16&255,e[2]=r>>>8&255,e[3]=255&r,e[4]=n>>>24&255,e[5]=n>>>16&255,e[6]=n>>>8&255,e[7]=255&n,`sub_${function(e){let t=BigInt(58),r=BigInt(0);for(let t of e)r=r*BigInt(256)+BigInt(t);let n=[];for(;r>0;){let e=r%t;n.unshift(eH.charAt(Number(e))),r/=t}for(let t of e)if(0===t)n.unshift(eH.charAt(0));else break;return n.join("")||eH.charAt(0)}(e)}`}function eJ(e){return es.includes(e)}function eZ(e,t){if(!t||0===t.length||t.includes("*"))return e;let r=new Set(["necessary",...t]),n={};for(let[t,o]of Object.entries(e))n[t]=!!r.has(t)&&o;return n}function eq(e,t){let r=Array.from(new Set(e));if(!t||0===t.length||t.includes("*"))return r;let n=new Set(["necessary",...t.filter(eJ)]),o=r.filter(e=>n.has(e));return o.includes("necessary")||o.unshift("necessary"),o}function eX(e,t="permissive"){return"strict"===t&&Array.isArray(e)&&e.length>0&&!e.includes("*")}function eK(e,t,r="permissive"){return e}function eQ(e,t){if(0===e.length)throw TypeError(`${t} condition cannot be empty`)}function e0(e,t,r){return function e(t,r){if("string"==typeof t){var n,o;if(!(t in r))throw Error(`Consent category "${t}" not found in consent state`);return r[t]||!1}if("object"==typeof t&&null!==t){if("and"in t){let o;return n=t.and,eQ(o=Array.isArray(n)?n:[n],"AND"),o.every(t=>e(t,r))}if("or"in t){let n;return o=t.or,eQ(n=Array.isArray(o)?o:[o],"OR"),n.some(t=>e(t,r))}if("not"in t)return!e(t.not,r)}throw TypeError(`Invalid condition structure: ${JSON.stringify(t)}`)}(e,r?eK(t,r.policyCategories,r.policyScopeMode):t)}function e1(e){let t=new Set;return!function e(r){"string"==typeof r?t.add(r):"object"==typeof r&&null!==r&&("and"in r?(Array.isArray(r.and)?r.and:[r.and]).forEach(e):"or"in r?(Array.isArray(r.or)?r.or:[r.or]).forEac
4h(e):"not"in r&&e(r.not))}(e),Array.from(t)}function e2(e,t){let r=e.getAttribute("data-src"),n=function(e){let t=e.getAttribute("data-category");if(t){if(!es.includes(t))throw Error(`Invalid category attribute "${t}" on iframe. Must be one of: ${es.join(", ")}`);return t}}(e);!n||(e0(n,t)?r&&!e.src&&(e.src=r,e.removeAttribute("data-src")):e.src&&e.removeAttribute("src"))}function e5(){if("u"<typeof document)return[];let e=document.querySelectorAll("iframe[data-category]"),t=new Set;return e?(e.forEach(e=>{let r=e.getAttribute("data-category");if(!r)return;let n=r.trim();es.includes(n)&&t.add(n)}),Array.from(t)):[]}function e3(e){if("u"<typeof document)return;let t=document.querySelectorAll("iframe");t&&t.forEach(t=>{e2(t,e)})}let e8=["reject","accept","customize"];function e6(e){return e&&0!==e.length?[...new Set(e)]:[]}function e4(e){let t=e6(e.allowedActions);return t.length>0?t:[...e8]}function e9(e){let t=e6(e.allowedActions);if(0===t.length)return[];if(!e.layout||0===e.layout.length)return[[...t]];let r=new Set(t),n=[],o=new Set;for(let t of e.layout){let e=e6(Array.isArray(t)?t:[t]).filter(e=>!(!r.has(e)||o.has(e))&&(o.add(e),!0));e.length>0&&n.push(e)}return n.length>0?n:[[...t]]}function e7(e){var t;return(t=e9({allowedActions:e.allowedActions,layout:e.layout}))&&0!==t.length?t.flatMap(e=>Array.isArray(e)?e:[e]):[]}function te(e){let t=e.orderedActions.includes("customize")?["customize"]:[];if(!e.primaryActions||0===e.primaryActions.length)return t;let r=e.primaryActions.filter(t=>e.orderedActions.includes(t));return r.length>0?r:t}function tt(e){return"column"===e?"column":"row"}function tr(e){var t;let r="balanced"===(t=e.uiProfile)||"compact"===t||"strict"===t?t:"compact",n=new Set(e.actionGroups.flat()).size,o=e.actionGroups.length>1,i="column"===e.direction;return"strict"===r||"balanced"===r&&(n<=2||3===n&&(o||i))}function tn(e){return!!e&&Object.values(e).some(e=>Array.isArray(e)?e.length>0:void 0!==e)}function to(){if("u"<typeof window)return!1;try{let e=window.navigator.globalPrivacyControl;return!0===e||"1"===e}catch{return!1}}let ti=/^https?:\/\//;function ts(e){let t=e.toString();return t.endsWith("/")?t.slice(0,-1):t}function ta(e){let t=function(e){try{let t="/"===e?e:e.endsWith("/")?e.slice(0,-1):e;if(ti.test(t))return ts(new URL(t));if(!t.startsWith("/"))return;return ts(new URL(t,window.location.origin))}catch{return}}(e.backendURL);if(!t)return;let r=to();return{backendURL:t,country:e.overrides?.country,region:e.overrides?.region,language:e.overrides?.language,gpc:e.overrides?.gpc??("boolean"==typeof r&&r),credentials:e.credentials??"include"}}function tl(e,t){return e.backendURL===t.backendURL&&e.gpc===t.gpc&&(void 0===t.country||e.country===t.country)&&(void 0===t.region||e.region===t.region)&&(void 0===t.language||e.language===t.language)&&(void 0===e.credentials||e.credentials===t.credentials)}let tc="__c15tScriptDebugListeners",tu=null;function td(e){let t={...e,timestamp:Date.now()};for(let e of function(){if("u"<typeof window)return tu||(tu=new Set),tu;let e=window,t=e[tc];if(t)return t;let r=new Set;return e[tc]=r,r}())try{e(t)}catch(e){console.error("Failed to handle c15t script debug event listener",e)}return t}function th(){if("u">typeof crypto&&crypto.randomUUID)return crypto.randomUUID().replace(/-/g,"").substring(0,8);if("u">typeof crypto&&crypto.getRandomValues){let e=new Uint8Array(4);return crypto.getRandomValues(e),Array.from(e,e=>e.toString(36)).join("").padEnd(8,"0").substring(0,8)}return Math.random().toString(36).substring(2).padEnd(8,"0").substring(0,8)}function tf(e,t,r){return t?(r[e]||(r[e]=th()),r[e]):`c15t-script-${e}`}let tp=new Map;function tm(e){return tp.has(e)}function tg(e){tp.delete(e)}function ty(e,t,r){if(r?.model==="iab"&&r.iabConsent&&(void 0!==e.vendorId||e.iabPurposes||e.iabLegIntPurposes||e.iabSpecialFeatures)){var n=r.iabConsent;if(void 0!==e.vendorId){let t=String(e.vendorId);if(!n.vendorConsents[t])return!1}return(!e.iabPurposes||!(e.iabPurposes.length>0)||!!e.iabPurposes.every(e=>!0===n.purposeConsents[e]))&&(!e.iabLegIntPurposes||!(e.iabLegIntPurposes.length>0)||!!e.iabLegIntPurposes.every(e=>!0===n.purposeLegitimateInterests[e]))&&(!e.iabSpecialFeatures||!(e.iabSpecialFeatures.length>0)||!!e.iabSpecialFeatures.every(e=>!0===n.specialFeatureOptIns[e]))&&!0}return e0(e.category,t)}function tw(e,t,r,n,o){td({source:"script-loader",scope:"lifecycle",action:t,message:r,scriptId:e.id,elementId:n?.elementId,hasConsent:n?.hasConsent,callback:function(e,t){if("callback_start"===e||"callback_complete"===e||"callback_error"===e)return t?.callback}(t,o),data:o})}function tb(e,t,r,n){if(r){tw(e,"callback_start",`${t} started`,n,{callback:t});try{r(n),tw(e,"callback_complete",`${t} completed`,n,{callback:t})}catch(r){throw tw(e,"callback_error",`${t} failed`,n,{callback:t,error:r instanceof Error?r.message:"string"==typeof r?r:"Unknown error"}),r}}}function tv(e,t,r={},n){let o=[];
4return e.forEach(e=>{var i,s,a;let l=ty(e,t,n);if(!e.alwaysLoad&&!l)return void tw(e,"skipped","Script skipped due to missing consent",{hasConsent:l},{reason:"missing_consent"});if(tm(e.id)){let n={id:e.id,elementId:tf(e.id,!1!==e.anonymizeId,r),hasConsent:l,consents:t};tw(e,"already_loaded","Script already loaded; running consent sync",n),tb(e,"onConsentChange",e.onConsentChange,n);return}if(e.src&&e.textContent)throw Error(`Script '${e.id}' cannot have both 'src' and 'textContent'. Choose one.`);if(!e.src&&!e.textContent&&!e.callbackOnly)throw Error(`Script '${e.id}' must have either 'src', 'textContent', or 'callbackOnly' set to true.`);if(!0===e.callbackOnly){let n=!1!==e.anonymizeId,s=tf(e.id,n,r),a={id:e.id,elementId:s,consents:t,hasConsent:l};tb(e,"onBeforeLoad",e.onBeforeLoad,a),tb(e,"onLoad",e.onLoad,a),i=e.id,tp.set(i,null),o.push(e.id),tw(e,"loaded","Callback-only script marked as loaded",a,{callbackOnly:!0});return}let c=!1!==e.anonymizeId,u=tf(e.id,c,r);if(!0===e.persistAfterConsentRevoked){let r=document.getElementById(u);if(r){let n={id:e.id,hasConsent:l,elementId:u,consents:t,element:r};tw(e,"already_loaded","Persisted script element already exists; reusing it",n,{reason:"persisted_element"}),tb(e,"onConsentChange",e.onConsentChange,n),tb(e,"onLoad",e.onLoad,n),s=e.id,tp.set(s,r),o.push(e.id),tw(e,"loaded","Existing script element marked as loaded",n,{reusedElement:!0});return}}let d=document.createElement("script");d.id=u,e.src?d.src=e.src:e.textContent&&(d.textContent=e.textContent),e.fetchPriority&&(d.fetchPriority=e.fetchPriority),e.async&&(d.async=!0),e.defer&&(d.defer=!0),e.nonce&&(d.nonce=e.nonce),e.attributes&&Object.entries(e.attributes).forEach(([e,t])=>{d.setAttribute(e,t)});let h={id:e.id,hasConsent:l,elementId:u,consents:t,element:d};e.onLoad&&(e.textContent?setTimeout(()=>{tb(e,"onLoad",e.onLoad,{...h})},0):(tw(e,"load_listener_attached","Attached load listener",h),d.addEventListener("load",()=>{tb(e,"onLoad",e.onLoad,{...h})}))),e.onError&&(e.textContent||(tw(e,"error_listener_attached","Attached error listener",h),d.addEventListener("error",()=>{tb(e,"onError",e.onError,{...h,error:Error(`Failed to load script: ${e.src}`)})}))),tb(e,"onBeforeLoad",e.onBeforeLoad,h);let f=e.target??"head",p="body"===f?document.body:document.head;if(!p)throw Error(`Document ${f} is not available for script injection`);p.appendChild(d),tw(e,"element_appended",`Script element appended to ${f}`,h,{target:f}),a=e.id,tp.set(a,d),o.push(e.id),tw(e,"loaded","Script marked as loaded",h)}),o}let tC="c15t:pending-consent-sync";function tS(e,t,r){let n=new Set(t),o=[],i=[];for(let t of r)n.has(t.name)&&(e[t.name]?o.push(t.name):i.push(t.name));return{allowedCategories:o,deniedCategories:i}}async function tI({manager:e,type:t,get:r,set:n,options:o,emitConsentChanged:i}){let{callbacks:s,selectedConsents:l,consents:c,consentTypes:u,updateScripts:d,updateIframeConsents:h,updateNetworkBlockerConsents:f,consentCategories:p,locationInfo:m,model:g,consentInfo:y,reloadOnConsentRevoked:w,lastBannerFetchData:b}=r(),v={...c},C={...l??c??{}},S=Date.now();if("all"===t)for(let e of u)p.includes(e.name)&&(C[e.name]=!0);else if("necessary"===t)for(let e of u)C[e.name]=!0===e.disabled&&e.defaultValue;let I=b?.policy,k=I?.consent?.categories,x=eX(k,I?.consent?.scopeMode??null),A=x?eZ(C,k):C,E=x?function(e,t){if(!t||0===t.length||t.includes("*"))return e;let r=new Set(["necessary",...t]),n={};for(let[t,o]of Object.entries(e))r.has(t)&&(n[t]=o);return n}(A,k):A,O=u.some(e=>v[e.name]!==A[e.name]),M=tS(A,p,u),R=tS(v,p,u),P=O?{preferences:A,previousPreferences:v,allowedCategories:M.allowedCategories,deniedCategories:M.deniedCategories,previousAllowedCategories:R.allowedCategories,previousDeniedCategories:R.deniedCategories}:null,T=b?.policy?await a(b.policy):void 0,L=y?.subjectId;L||(L=eY());let D=ed({externalId:r().consentInfo?.externalId,identityProvider:r().consentInfo?.identityProvider}),N=ed({externalId:r().user?.id,identityProvider:r().user?.identityProvider}),_=D.externalId??N.externalId,j=D.identityProvider??N.identityProvider,U={time:S,subjectId:L,materialPolicyFingerprint:T,..._?{externalId:_}:{}
4,...j?{identityProvider:j}:{}},B=function(e,t,r,n,o){if(!n||null===r)return!1;let i=new Set(o.filter(e=>e.disabled).map(e=>e.name));return Object.entries(t).some(([t,r])=>!i.has(t)&&!0===e[t]&&!1===r)}(v,A,y,w,u);if(n({consents:A,selectedConsents:A,activeUI:"none",consentInfo:U}),ef({consents:A,consentInfo:U},void 0,r().storageConfig),B){let e={type:t,subjectId:L,preferences:E,givenAt:S,jurisdiction:m?.jurisdiction??void 0,jurisdictionModel:g,domain:window.location.hostname,uiSource:o?.uiSource??"api",policySnapshotToken:b?.policySnapshotToken,..._?{externalId:_}:{},...j?{identityProvider:j}:{}};try{localStorage.setItem(tC,JSON.stringify(e))}catch{}s.onConsentSet?.({preferences:A}),P&&i?.(P),s.onBeforeConsentRevocationReload?.({preferences:A}),window.location.reload();return}await new Promise(e=>setTimeout(e,0)),h(),d(),f(),s.onConsentSet?.({preferences:A}),P&&i?.(P);let F=await e.setConsent({body:{type:"cookie_banner",domain:window.location.hostname,preferences:E,subjectId:L,jurisdiction:m?.jurisdiction??void 0,jurisdictionModel:g??void 0,givenAt:S,uiSource:o?.uiSource??"api",consentAction:t,policySnapshotToken:b?.policySnapshotToken,..._?{externalSubjectId:_}:{},...j?{identityProvider:j}:{}}});if(!F.ok){let e=F.error?.message??"Failed to save consents";s.onError?.({error:e}),s.onError||console.error(e)}}function tk(e,t,r,n,o,i){let s="none"===n?null:n??(null==e||"NONE"===e?null:t&&["UK_GDPR","GDPR"].includes(e)?"iab":["UK_GDPR","GDPR","CH","BR","APPI","PIPA","QC_LAW25"].includes(e)?"opt-in":["CCPA","AU","PIPEDA"].includes(e)?"opt-out":"opt-in"),a=!!(void 0===i||i)&&(void 0!==o?o:to());return{consentModel:s,autoGrantedConsents:(null===s||"opt-out"===s)&&null===r?{necessary:!0,functionality:!0,experience:!0,marketing:!a,measurement:!a}:null}}async function tx(e,t,r,n,o){let{set:i,get:s}=t,l=s(),c=e.policy?await a(e.policy):void 0;if(l.consentInfo&&c){let e=l.consentInfo.materialPolicyFingerprint;if(e&&e!==c){let e=l.consentTypes.reduce((e,t)=>(e[t.name]=t.defaultValue,e),{});eg(void 0,l.storageConfig),i({consents:e,selectedConsents:e,consentInfo:null})}else if(!e){let e={...l.consentInfo,materialPolicyFingerprint:c};ef({consents:l.consents,consentInfo:e},void 0,l.storageConfig),i({consentInfo:e})}}let{consentInfo:u}=s(),d=s().iab;if(t.iabConfig&&!d){let e=t.iabConfig._module;e?(d=e.createIABManager(t.iabConfig,s,i,t.manager),i({iab:d})):console.error('[c15t] IAB config provided without IAB module. Install @c15t/iab and use the iab() wrapper: `import { iab } from "@c15t/iab"; iab({ cmpId: ... })`')}let h=d?.config.enabled&&!n,f=d?.config.enabled&&!h;h&&console.warn("IAB mode disabled: Server returned 200 without GVL. Client IAB settings overridden.");let{consentModel:p,autoGrantedConsents:m}=tk(e.jurisdiction??null,f,u,e.policy?.model,s().overrides?.gpc,e.policy?.consent?.gpc),g=function(e,t,r,n){let{get:o,initialTranslationConfig:i}=t,{consentInfo:s,consentTypes:a}=o(),{translations:l,location:c}=e,{consentModel:u,autoGrantedConsents:d}=tk(e.jurisdiction??null,r,s,e.policy?.model,t.get().overrides?.gpc,e.policy?.consent?.gpc),h={model:u,isLoadingConsentInfo:!1,branding:e.branding??"c15t",hasFetchedBanner:!0,lastBannerFetchData:e,locationInfo:{countryCode:c?.countryCode??null,regionCode:c?.regionCode??null,jurisdiction:e.jurisdiction??null},policyBanner:{allowedActions:e.policy?.ui?.banner?.allowedActions,primaryActions:e.policy?.ui?.banner?.primaryActions,layout:e.policy?.ui?.banner?.layout,direction:e.policy?.ui?.banner?.direction,uiProfile:e.policy?.ui?.banner?.uiProfile,scrollLock:e.policy?.ui?.banner?.scrollLock},policyDialog:{allowedActions:e.policy?.ui?.dialog?.allowedActions,primaryActions:e.policy?.ui?.dialog?.primaryActions,layout:e.policy?.ui?.dialog?.layout,direction:e.policy?.ui?.dialog?.direction,uiProfile:e.policy?.ui?.dialog?.uiProfile,scrollLock:e.policy?.ui?.dialog?.scrollLock},policyCategories:e.policy?.consent?.categories??null,policyScopeMode:e.policy?.consent?.scopeMode??null,initDataSource:n?.initDataSource??null,initDataSourceDetail:n?.initDataSourceDetail??null};null===s&&(e.policy?.ui?.mode?h.activeUI=e.policy.ui.mode:h.activeUI=u?"banner":"none"),d&&(h.consents=d,h.selectedConsents=d);let f=e.policy?.consent?.categories,p=eX(f,e.policy?.consent?.scopeMode??null);if(p){let e=eq(es,f);h.consentCategories=e,h.consents=eZ(h.consents??o().consents,e),h.selectedConsents=eZ(h.selectedConsents??o().selectedConsents,e)}let m=e.policy?.consent?.preselectedCategories;if(null===s&&!d&&Array.isArray(m)&&m.length>0){let e=h.consentCategories??o().consentCategories,t=p?eq(e,f):e,r=new Set(eq(t,m)),n=h.selectedConsents??o().selectedConsents;h.selectedConsents=a.length>0?a.reduce((e,t)=>
4(e[t.name]=!0===t.disabled?t.defaultValue:r.has(t.name),e),{}):Object.fromEntries(Object.keys(n).map(e=>[e,"necessary"===e||r.has(e)]))}if(l?.language&&l?.translations){let e,t,r,n;e=i?.translations?{translations:i.translations}:void 0,r=!(t=function(e,t){let r=M(e),n=t?M(t):void 0,o={en:x};for(let e of[r.messages,n?.messages])if(e)for(let[t,r]of Object.entries(e)){if(!r)continue;let e=o[t]||o.en;o[t]=E(e,r)}return R({messages:o,locale:n?.locale??r.locale,detectBrowserLanguage:n?.detectBrowserLanguage??r.detectBrowserLanguage})}({translations:{[l.language]:l.translations},disableAutoLanguageSwitch:!0,defaultLanguage:l.language},e)).disableAutoLanguageSwitch,n=function(e,t,r=!1){if(r||"u"<typeof window)return t||"en";let n=window.navigator.language?.split("-")[0]||"";return n&&n in e?n:t||"en"}(t.translations,t.defaultLanguage,!r),h.translationConfig={...t,defaultLanguage:n}}return h}(e,t,f,o);if(h&&d?g.iab={...d,config:{...d.config,enabled:!1}}:d&&null!=e.cmpId&&(g.iab={...d,config:{...d.config,cmpId:e.cmpId}}),i(g),!function(e,t,r){let{get:n}=t,{callbacks:o}=n(),{translations:i}=e;r&&o?.onConsentSet?.({preferences:r}),i?.language&&i?.translations&&o?.onBannerFetched?.({jurisdiction:e.jurisdiction,location:e.location,translations:{language:i.language,translations:i.translations}})}(e,t,m),s().updateScripts(),f&&"iab"===p&&d){let r=e.customVendors??[],o=d.config.customVendors??[],a=new Set(r.map(e=>e.id)),l=[...r,...o.filter(e=>!a.has(e.id))],c={...d.config,customVendors:l,...null!=e.cmpId&&{cmpId:e.cmpId}},u=t.iabConfig?._module;u&&u.initializeIABMode(c,{set:i,get:s},n).catch(e=>{console.error("Failed to initialize IAB mode in updateStore:",e)})}}async function tA(e){let{get:t,set:r,manager:n}=e,{callbacks:o}=t();if("u"<typeof window)return;let i=function(e){try{if(window.localStorage)return window.localStorage.setItem("c15t-storage-test-key","test"),window.localStorage.removeItem("c15t-storage-test-key"),!0}catch(t){console.warn("localStorage not available, skipping consent banner:",t),e({isLoadingConsentInfo:!1,activeUI:"none"})}return!1}(r);if(!i)return;r({isLoadingConsentInfo:!0}),function(e,t){try{let r=localStorage.getItem(tC);if(!r)return;localStorage.removeItem(tC);let n=JSON.parse(r),{externalId:o,identityProvider:i}=ed({externalId:n.externalId,identityProvider:n.identityProvider});e.setConsent({body:{type:"cookie_banner",domain:n.domain,preferences:n.preferences,subjectId:n.subjectId,jurisdiction:n.jurisdiction,jurisdictionModel:n.jurisdictionModel??void 0,givenAt:n.givenAt,uiSource:n.uiSource??"api",policySnapshotToken:n.policySnapshotToken,...o?{externalSubjectId:o}:{},...i?{identityProvider:i}:{}}}).then(e=>{if(!e.ok){let r=e.error?.message??"Failed to sync consent after reload";t.onError?.({error:r}),t.onError||console.error("Failed to sync consent after reload:",r)}}).catch(e=>{let r=e instanceof Error?e.message:"Failed to sync consent after reload";t.onError?.({error:r}),t.onError||console.error("Failed to sync consent after reload:",e)})}catch{}}(n,o);let s=await tE(e);return s||tO(e,i,n,o)}async function tE(e){let{ssrData:t,set:r}=e;if(!t)return void r({ssrDataUsed:!1,ssrSkippedReason:"no_data"});let n=await t;if(n?.init&&!function(e,t){let r=t.metadata?.requestContext;if(!r||!e.backendURL)return!0;let n=ta({backendURL:e.backendURL,overrides:e.get().overrides,credentials:e.requestCredentials});return!n||tl(r,n)}(e,n))return void r({ssrDataUsed:!1,ssrSkippedReason:"context_mismatch"});if(n?.init){var o;let t,i,s,a,l=(o=n,t=o.metadata?.cache,i=o.metadata?.requestDurationMs,s=["via=ssr"],t?.detail&&s.push(t.detail),"number"==typeof i&&Number.isFinite(i)&&s.push(`duration=${Math.max(0,Math.round(i))}ms`),a=s.length>0?s.join(", "):null,t?.isHit===!0?{initDataSource:"backend-cache-hit",initDataSourceDetail:a}:t?{initDataSource:"backend",initDataSourceDetail:a}:{initDataSource:"ssr",initDataSourceDetail:a});return await tx(n.init,e,!0,n.gvl,{initDataSource:l.initDataSource,initDataSourceDetail:l.initDataSourceDetail}),r({ssrDataUsed:!0,ssrSkippedReason:null}),n.init}r({ssrDataUsed:!1,ssrSkippedReason:"fetch_failed"})}
4async function tO(e,t,r,n){let{set:o,get:i}=e;try{let{language:o,country:s,region:a}=e.get().overrides??{},l=await r.init({headers:{...o&&{"accept-language":o},...s&&{"x-c15t-country":s},...a&&{"x-c15t-region":a}},onError:n.onError?e=>{n.onError?.({error:e.error?.message||"Unknown error"})}:void 0}),{data:c,error:u}=l;if(u||!c)throw Error(`Failed to fetch consent banner info: ${u?.message}`);let d=function(e,t){let r=e?.response??null;if(r){let e=function(e){let t=null,r=!1;for(let n of["x-vercel-cache","cf-cache-status","x-cache","cache-status"]){let o=e.get(n);if(o){t=`${n}=${o}`,r=/\b(hit|stale|revalidated|updating)\b/i.test(o);break}}let n=e.get("age"),o=n?Number.parseInt(n,10):NaN,i=Number.isFinite(o)&&o>0,s=i?`age=${o}`:null;return{isCacheHit:r||i,detail:t&&s?`${t}, ${s}`:t??s}}(r.headers);return e.isCacheHit?{initDataSource:"backend-cache-hit",initDataSourceDetail:e.detail}:{initDataSource:"backend",initDataSourceDetail:e.detail}}return"offline"===t?{initDataSource:"offline-mode",initDataSourceDetail:null}:"custom"===t?{initDataSource:"custom",initDataSourceDetail:null}:"hosted"===t||"c15t"===t?{initDataSource:"offline-fallback",initDataSourceDetail:null}:{initDataSource:"backend",initDataSourceDetail:null}}(l,i().config.mode);return await tx(c,e,t,c.gvl??void 0,d),c}catch(t){console.error("Error fetching consent banner information:",t),o({isLoadingConsentInfo:!1,activeUI:"none"});let e=t instanceof Error?t.message:"Unknown error fetching consent banner information";n.onError?.({error:e});return}}function tM(e){return e?e.toUpperCase():"GET"}function tR(e,t,r){if(!r||!1===r.enabled||!r.rules||0===r.rules.length)return{shouldBlock:!1};let n=function(e){if(!e)return null;try{if("u"<typeof window)return null;return new URL(e,window.location.href)}catch{return null}}(e.url);if(!n)return{shouldBlock:!1};let o=tM(e.method);for(let e of r.rules)if(function(e,t,r){var n;return!!function(e,t){if(!e)return!1;let r=t.domain.trim().toLowerCase(),n=e.trim().toLowerCase();if(!r||!n)return!1;if(n===r)return!0;let o=`.${r}`;return n.endsWith(o)}(e.hostname,r)&&(n=e.pathname,!!("string"!=typeof r.pathIncludes||n&&n.includes(r.pathIncludes))&&!!function(e,t){if(!t.methods||0===t.methods.length)return!0;if(!e)return!1;let r=tM(e);return t.methods.some(e=>tM(e)===r)}(t,r))}(n,o,e)&&!e0(e.category,t))return{shouldBlock:!0,rule:e};return{shouldBlock:!1}}let tP=e=>{if("u"<typeof window)return null;try{return em(e)}catch(e){return console.error("Failed to retrieve stored consent:",e),null}},tT="/api/c15t",tL=new Map,tD=new Map;function tN(e){return"offline"===e||"custom"===e?e:"hosted"}function t_(e,t){var r,n;let o,{mode:i,backendURL:s,store:a,i18n:l,translations:c,storageConfig:u,enabled:d,iab:h,offlinePolicy:f,consentCategories:p,debug:m,headers:g,customFetch:y,retryConfig:w,endpointHandlers:b,...v}=e,{initialI18nConfig:C,initialTranslationConfig:S,ssrData:I,config:k,...x}=v,{initialI18nConfig:A,initialTranslationConfig:E,ssrData:O,config:R,...L}=a??{},D=P(c??a?.initialTranslationConfig,l??a?.initialI18nConfig),N=D?M(D):void 0,_=N?Object.keys(N.messages).sort():[],j=h??L.iab,U=f??L.offlinePolicy,B=u??L.storageConfig,F=d??L.enabled,$=s||tT,z=I??O,V=(o=!1===(r={mode:i,backendURL:s,endpointHandlers:"endpointHandlers"in e?e.endpointHandlers:void 0,storageConfig:B,defaultLanguage:N?.locale,languageSetKey:_.length>0?_.join(","):void 0,offlinePolicyKey:U?JSON.stringify(U):void 0,enabled:F}).enabled?"disabled":"enabled",[tN(r.mode),r.backendURL??"default",r.endpointHandlers?"custom":"none",r.storageConfig?.storageKey??"default",r.defaultLanguage??"default",r.languageSetKey??"default",r.offlinePolicyKey??"default",o].join(":")),W=tL.get(V);if(!W){let t={...L,initialTranslationConfig:D,iab:j,offlinePolicy:U};W="offline"===i?eG({mode:"offline",store:t,storageConfig:B}):"custom"===i&&"endpointHandlers"in e?eG({mode:"custom",endpointHandlers:e.endpointHandlers,store:t,storageConfig:B}):eG({mode:"c15t"===i?"c15t":"hosted",backendURL:s||tT,store:t,storageConfig:B}),tL.set(V,W)}let G=tD.get(V);if(!G){let r=tN(i),o=R??k,s="hosted"!==r||"u"<typeof window||z?void 0:(n={backendURL:$,overrides:e.overrides,credentials:"include"},function(e){let t=function(){if(!("u"<typeof window))return window}
4();if(!t)return;let r=ta({backendURL:e.backendURL,overrides:e.overrides,credentials:e.credentials});if(!r)return;let n=Object.values(t.__c15tInitialDataPromises??{}).filter(e=>{let t=e.requestContext;return!!t&&tl(t,r)});return 1===n.length?n[0]:void 0}(n)?.promise);G=((e,t={})=>{let r,{namespace:n="c15tStore",iab:o,ssrData:i,initialConsentCategories:s,initialTranslationConfig:a,initialI18nConfig:l,enabled:c,debug:u,...d}=t,h=a||l?P(a,l):void 0;Y=H(!0===t.debug);let f=tP(t.storageConfig),p=new Set,m=(r=(r,i)=>{let a,l,c,u,m,g,y,w,b,v,C,S;return{...ec,...d,namespace:n,iab:null,...s&&{consentCategories:s},...f?{consents:f.consents,selectedConsents:f.consents,consentInfo:f.consentInfo,user:f.consentInfo?.externalId?{id:f.consentInfo.externalId,identityProvider:f.consentInfo.identityProvider}:void 0,activeUI:"none",isLoadingConsentInfo:!1}:{activeUI:"none",isLoadingConsentInfo:!0},setActiveUI:(e,t={})=>{if("none"===e||"dialog"===e)return void r({activeUI:e});if(t.force)return void r({activeUI:"banner"});let n=i();tP()||n.consentInfo||n.isLoadingConsentInfo||r({activeUI:"banner"})},setSelectedConsent:(e,t)=>{r(r=>{let n=r.consentTypes.find(t=>t.name===e);return n?.disabled?r:{selectedConsents:{...r.selectedConsents,[e]:t}}})},saveConsents:async(t,n)=>await tI({manager:e,type:t,get:i,set:r,options:n,emitConsentChanged:e=>{for(let t of(i().callbacks.onConsentChanged?.(e),p))t(e)}}),setConsent:(e,t)=>{r(r=>{let n=r.consentTypes.find(t=>t.name===e);return n?.disabled?r:{selectedConsents:{...r.consents,[e]:t}}}),i().saveConsents("custom")},resetConsents:()=>{r(()=>{let e=ei.reduce((e,t)=>(e[t.name]=t.defaultValue,e),{});return eg(void 0,t.storageConfig),{consents:e,selectedConsents:e,consentInfo:null}})},setConsentCategories:e=>r(()=>{let{policyCategories:t,policyScopeMode:r}=i();return eX(t,r)?{consentCategories:eq(e,t)}:{consentCategories:Array.from(new Set(e))}}),setCallback:(e,t)=>{let n=i();if(r(r=>({callbacks:{...r.callbacks,[e]:t}})),"onConsentSet"===e&&t&&"function"==typeof t&&t?.({preferences:n.consents}),"onBannerFetched"===e&&n.hasFetchedBanner&&n.lastBannerFetchData&&t&&"function"==typeof t){let{lastBannerFetchData:e}=n,r=e.jurisdiction??"NONE";t?.({jurisdiction:{code:r,message:""},location:{countryCode:e.location.countryCode??null,regionCode:e.location.regionCode??null},translations:{language:e.translations.language,translations:e.translations.translations}})}},subscribeToConsentChanges:e=>(p.add(e),()=>{p.delete(e)}),setLocationInfo:e=>r({locationInfo:e}),initConsentManager:()=>tA({manager:e,ssrData:t.ssrData,backendURL:t.__internal?.backendURL,requestCredentials:t.__internal?.requestCredentials,initialTranslationConfig:h,iabConfig:o,get:i,set:r}),getDisplayedConsents:()=>{let{consentCategories:e,consentTypes:t}=i();return t.filter(t=>e.includes(t.name))},hasConsented:()=>{let{consentInfo:e}=i();return null!=e},has:e=>{let{consents:t,policyCategories:r,policyScopeMode:n}=i();return e0(e,t,{policyCategories:r,policyScopeMode:n})},setTranslationConfig:e=>{r({translationConfig:e})},updateConsentCategories:e=>{let{consentCategories:t,policyCategories:n,policyScopeMode:o}=i(),s=new Set([...t,...e]);r({consentCategories:eX(n,o)?eq(Array.from(s),n):Array.from(s)})},identifyUser:async t=>{let n=i().consentInfo,o=n?.subjectId;r({user:t}),o&&(String(n?.externalId)!==String(t.id)||n?.identityProvider!==t.identityProvider)&&(await e.identifyUser({body:{subjectId:o,externalId:t.id,identityProvider:t.identityProvider}}),r({consentInfo:{...n,time:n?.time||Date.now(),subjectId:o,externalId:t.id,identityProvider:t.identityProvider}}))},unstable_acceptPolicyConsent:async t=>{let n=i(),o=n.consentInfo,s=o?.subjectId??eY(),a=ed({externalId:o?.externalId,identityProvider:o?.identityProvider}),l=ed({externalId:n.user?.id,identityProvider:n.user?.identityProvider}),c=ed({externalId:t.externalId,identityProvider:t.identityProvider}),u=c.externalId??a.externalId??l.externalId,d=c.identityProvider??a.identityProvider??l.identityProvider,h=t.givenAt??Date.now(),f=t.domain??("u">typeof window?window.location.hostname:"localhost"),p="privacy_policy"===t.type||"terms_and_conditions"===t.type||"dpa"===t.type,m={};if(p)if(t.documentSnapshotToken)m={documentSnapshotToken:t.documentSnapshotToken};else if(t.policyHash)m={policyHash:t.policyHash};else if(t.policyId)m={policyId:t.policyId};else throw Error("Legal document consent requires documentSnapshotToken, policyHash, or policyId.");let g=await e.setConsent({body:{type:t.type,subjectId:s,domain:f,givenAt:h,uiSource:t.uiSource??"api",...m,...t.metadata?{metadata:t.metadata}:{},...t.preferences?{preferences:t.preferences}:{},...u?{externalSubjectId:u}:{}
4,...d?{identityProvider:d}:{}}});if(!g.ok||!g.data){let e=g.error?.message??"Failed to accept policy consent";i().callbacks.onError?.({error:e});let t=Error(e);throw t.code=g.error?.code,t.details=g.error?.details??null,t.status=g.error?.status,t}let y={...g.data,givenAt:g.data.givenAt instanceof Date?g.data.givenAt:new Date(g.data.givenAt)},w=i(),b={...w.consentInfo,time:h,subjectId:s,...u?{externalId:u}:{},...d?{identityProvider:d}:{}};return r({consentInfo:b,...u?{user:{id:u,identityProvider:d}}:{}}),ef({consents:w.consents,consentInfo:b},void 0,w.storageConfig),y},setOverrides:async n=>(r({overrides:{...i().overrides,...n}}),await tA({manager:e,backendURL:t.__internal?.backendURL,requestCredentials:t.__internal?.requestCredentials,initialTranslationConfig:h,get:i,set:r})),setLanguage:async e=>await i().setOverrides({...i().overrides??{},language:e}),...(a=()=>{let{scripts:e,consents:t,scriptIdMap:n,model:o,iab:s,policyCategories:a,policyScopeMode:l}=i(),c=s?.config.enabled?{vendorConsents:s.vendorConsents,vendorLegitimateInterests:s.vendorLegitimateInterests,purposeConsents:s.purposeConsents,purposeLegitimateInterests:s.purposeLegitimateInterests,specialFeatureOptIns:s.specialFeatureOptIns}:void 0,u=function(e,t,r={},n){let o=function(e,t,r={},n){let o=[];return e.forEach(e=>{let i=ty(e,t,n);if(tm(e.id)&&!e.alwaysLoad&&!i){var s;let n=(s=e.id,tp.get(s)),a={id:e.id,elementId:tf(e.id,!1!==e.anonymizeId,r),hasConsent:i,consents:t,element:n&&null!==n?n:void 0};!0===e.callbackOnly||null===n?(tg(e.id),o.push(e.id),tw(e,"unloaded","Callback-only script marked as unloaded",a,{callbackOnly:!0})):n&&(e.persistAfterConsentRevoked?(tg(e.id),o.push(e.id),tw(e,"unloaded","Persistent script marked as unloaded without removing element",a,{removedElement:!1,persistAfterConsentRevoked:!0})):(n.remove(),tg(e.id),o.push(e.id),tw(e,"unloaded","Script element removed after consent revocation",a,{removedElement:!0})))}}),o}(e,t,r,n);return{loaded:tv(e,t,r,n),unloaded:o}}(e,eK(t,a,l),n,{model:o,iabConsent:c}),d={...i().loadedScripts};return u.loaded.forEach(e=>{d[e]=!0}),u.unloaded.forEach(e=>{d[e]=!1}),r({loadedScripts:d}),u},{updateScripts:()=>a(),setScripts:e=>{let t=i(),n={...t.scriptIdMap};e.forEach(e=>{!1!==e.anonymizeId&&(n[e.id]=th())});let o=e.flatMap(e=>e1(e.category));r({scripts:[...t.scripts,...e],scriptIdMap:n}),i().updateConsentCategories(o),a()},removeScript:e=>{let t=i();if(tm(e)){let t=tp.get(e);t&&(t.remove(),tg(e))}let n={...t.scriptIdMap};delete n[e],r({scripts:t.scripts.filter(t=>t.id!==e),loadedScripts:{...t.loadedScripts,[e]:!1},scriptIdMap:n})},reloadScript:e=>{let t=i(),r=t.iab?.config.enabled?{vendorConsents:t.iab.vendorConsents,vendorLegitimateInterests:t.iab.vendorLegitimateInterests,purposeConsents:t.iab.purposeConsents,purposeLegitimateInterests:t.iab.purposeLegitimateInterests,specialFeatureOptIns:t.iab.specialFeatureOptIns}:void 0,n=eK(t.consents,t.policyCategories,t.policyScopeMode);return function(e,t,r,n={},o){let i=t.find(t=>t.id===e);if(!i)return!1;if(tm(e)){let t=tp.get(e);!0===i.callbackOnly||null===t?tg(e):t&&(i.persistAfterConsentRevoked||t.remove(),tg(e))}return i.alwaysLoad||ty(i,r,o)?(tv([i],r,n,o),!0):(tw(i,"skipped","Reload skipped due to missing consent",{hasConsent:!1,elementId:tf(i.id,!1!==i.anonymizeId,n)},{reason:"reload_missing_consent"}),!1)}(e,t.scripts,n,t.scriptIdMap,{model:t.model,iabConsent:r})},isScriptLoaded:e=>tm(e),getLoadedScriptIds:()=>Array.from(tp.keys())}),...(l=null,c=!1,{initializeIframeBlocker:()=>{var e;let t;if(c||"u"<typeof document)return;let r=i(),n=eK(r.consents,r.policyCategories,r.policyScopeMode);if(r.iframeBlockerConfig?.disableAutomaticBlocking)return;let o=()=>{let e=e5();e.length>0&&i().updateConsentCategories(e)};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",o):o(),setTimeout(o,100),e3(n),e=e=>i().updateConsentCategories(e),(t=new MutationObserver(t=>{let r=(()=>{let e=i();return eK(e.consents,e.policyCategories,e.policyScopeMode)})(),n=!1;if(t.forEach(e=>{e.addedNodes.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){e.tagName&&"IFRAME"===e.tagName.toUpperCase()&&(e2(e,r),e.hasAttribute("data-category")&&(n=!0));let t=e.querySelectorAll?.("iframe");t&&t.length>
40&&t.forEach(e=>{e2(e,r),e.hasAttribute("data-category")&&(n=!0)})}})}),n&&e){let t=e5();t.length>0&&e(t)}})).observe(document.body,{childList:!0,subtree:!0}),l=t,c=!0},updateIframeConsents:()=>{if(!c||"u"<typeof document)return;let e=i(),{consents:t,iframeBlockerConfig:r}=e;r?.disableAutomaticBlocking||e3(eK(t,e.policyCategories,e.policyScopeMode))},destroyIframeBlocker:()=>{if(!c||"u"<typeof document)return;let{iframeBlockerConfig:e}=i();e?.disableAutomaticBlocking||(l&&(l.disconnect(),l=null),c=!1)}}),...(u=null,m=null,g=null,y=!1,w=null,b=(e,t)=>{if(e){if(!1!==e.logBlockedRequests){let e=t.rule?.id??"unknown";console.warn("[c15t] Network request blocked by consent manager",{method:t.method,url:t.url,ruleId:e})}e.onRequestBlocked&&e.onRequestBlocked(t)}},v=()=>w||i().consents,C=()=>{"u"<typeof window||"function"!=typeof window.fetch||u||(u=window.fetch,window.fetch=(e,t)=>{let r,n=i().networkBlocker;if(!u)throw Error("Network blocker fetch wrapper not initialized.");if(!(n?.enabled&&n?.rules&&n?.rules.length>0))return u.call(window,e,t);let o="GET";t?.method?o=t.method:e instanceof Request&&(o=e.method);let{shouldBlock:s,rule:a}=tR({url:r="string"==typeof e||e instanceof URL?e.toString():e.url,method:o},v(),n);return s?(b(n,{method:o,url:r,rule:a}),Promise.resolve(new Response(null,{status:451,statusText:"Request blocked by consent manager"}))):u.call(window,e,t)})},S=()=>{"u"<typeof window||void 0===window.XMLHttpRequest||"function"!=typeof window.XMLHttpRequest.prototype.open||"function"!=typeof window.XMLHttpRequest.prototype.send||m||g||(m=window.XMLHttpRequest.prototype.open,g=window.XMLHttpRequest.prototype.send,window.XMLHttpRequest.prototype.open=function(e,t,r,n,o){if(this.__c15tMethod=e,this.__c15tUrl=t,!m)throw Error("Network blocker XHR open wrapper not initialized.");return m.call(this,e,t,r??!0,n,o)},window.XMLHttpRequest.prototype.send=function(e){let t=i().networkBlocker;if(t?.enabled!==!1&&t?.rules&&t?.rules.length>0){let e=this.__c15tMethod||"GET",r=this.__c15tUrl||"",{shouldBlock:n,rule:o}=tR({url:r,method:e},v(),t);if(n){b(t,{method:e,url:r,rule:o});try{this.abort()}catch{}let n=new ProgressEvent("error");"function"==typeof this.onerror&&this.onerror(n),this.dispatchEvent(n);return}}if(!g)throw Error("Network blocker XHR send wrapper not initialized.");return g.call(this,e)})},{initializeNetworkBlocker:()=>{if(y||"u"<typeof window)return;let e=i(),t=e.networkBlocker;t?.enabled&&t?.rules&&t?.rules.length>0&&(w=e.consents,C(),S(),y=!0)},updateNetworkBlockerConsents:()=>{y&&(w=i().consents)},setNetworkBlocker:e=>{let t=e?.enabled!==!1&&e?.rules&&e?.rules.length>0;if(r({networkBlocker:e}),!t){if(!y||"u"<typeof window)return;u&&(window.fetch=u,u=null),m&&g&&(window.XMLHttpRequest.prototype.open=m,window.XMLHttpRequest.prototype.send=g,m=null,g=null),w=null,y=!1;return}y||(w=i().consents,C(),S(),y=!0)},destroyNetworkBlocker:()=>{!y||"u"<typeof window||(u&&(window.fetch=u,u=null),m&&g&&(window.XMLHttpRequest.prototype.open=m,window.XMLHttpRequest.prototype.send=g,m=null,g=null),w=null,y=!1)}})}})?T(r):T;return m.getState().initializeIframeBlocker(),t.networkBlocker&&(m.setState({networkBlocker:t.networkBlocker}),m.getState().initializeNetworkBlocker()),t.scripts&&t.scripts.length>0&&m.getState().updateConsentCategories(t.scripts.flatMap(e=>e1(e.category))),"u">typeof window&&(window[n]=m,m.getState().callbacks.onConsentSet?.({preferences:m.getState().consents}),t.user&&m.getState().identifyUser(t.user),m.getState().initConsentManager()),m})(W,{config:{...o??{},pkg:t?.pkg||"c15t",version:t?.version||"2.0.4",mode:r,meta:{...o?.meta??{},..."hosted"===r?{backendURL:$,requestCredentials:"include"}:{}}},...x,...L,iab:j,offlinePolicy:U,storageConfig:B,enabled:F,initialTranslationConfig:D,initialConsentCategories:p,ssrData:z??s,debug:m,__internal:"hosted"===r?{backendURL:$,requestCredentials:"include"}:void 0}),tD.set(V,G)}return{consentManager:W,consentStore:G,cacheKey:V}}function tj(){tL.clear(),tD.clear(),eW.clear()}e.s(["clearConsentRuntimeCache",()=>tj,"defaultTranslationConfig",()=>eo,"emitScriptDebugEvent",()=>td,"getOrCreateConsentRuntime",()=>t_,"has",()=>e0,"hasPolicyHints",()=>tn,"resolvePolicyActionGroups",()=>e9,"resolvePolicyAllowedActions",()=>e4,"resolvePolicyDirection",()=>tt,"resolvePolicyOrderedActions",()=>e7,"resolvePolicyPrimaryActions",()=>te,"shouldFillPolicyActions",()=>tr],22081);var tU=e.i(75201);let tB=(0,tU.createContext)(void 0);function tF(){let e=(0,tU.useContext)(tB);if(void 0===e)throw Error("useConsentManager must be used within a ConsentManagerProvider");let{consents:t,consentInfo:r,consentCategories:n,consentTypes:o,policyCategories:i,policyScopeMode:s}=e.state,a=(0,tU.useRef)(e.store);a.current=e.store;let l=(0,tU.useCallback)(e=>e0(e,t,{policyCategories:i,policyScopeMode:s}),[t,i,s]),c=(0,tU.useCallback)(()=>null!=r,[r]),u=(0,tU.useCallback)(()=>o.filter(e=>n.includes(e.name)),[o,n]),d=(0,tU.useCallback)(e=>a.current.getState().subscribeToConsentChanges(e),[]);return{...e.state,has:l,hasConsented:c,getDisplayedConsents:u,subscribeToConsentChanges:d,manager:e.manager}}e.s(["ConsentStateContext",()=>tB],27077),e.s(["useConsentManager",()=>tF],65151);let t$={clientId:"2eb27d4f-8e32-4f0e-b875-a62882de4c9c",clientSecret:e.i(82637).default.env.OPENPANEL_CLIENT_SECRET||"",apiUrl:"https://wa.brutal.ai/api",gtmContainerId:"GTM-WT9PVBKQ"};e.s(["analyticsConfig",0,t$],17349)},48892,41048,e=>{"use strict";
4var t=e.i(98134),r=e.i(75201),n=e.i(65151),o=e.i(50694),i=e.i(17349);function s(){let e=(0,o.useOpenPanel)(),{has:t}=(0,n.useConsentManager)();return{track:function(r,n){e.track(r,n),i.analyticsConfig.gtmContainerId&&(t("measurement")||t("marketing"))&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:r,...n}))},identify:function(t){e.identify(t)}}}e.s(["useAnalytics",()=>s],41048);let a=(0,r.createContext)(void 0),l="restaurant-cart-v3";function c(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function u(e){if(!c(e))return null;let t="string"==typeof e.de?e.de.trim():"",r="string"==typeof e.en?e.en.trim():"";return t&&r?{de:t,en:r}:null}function d({children:e}){let[n,o]=(0,r.useState)([]),[i,d]=(0,r.useState)(!1),{track:h}=s();(0,r.useEffect)(()=>{try{let e=localStorage.getItem(l);if(e){let t=JSON.parse(e);Array.isArray(t)&&o(t.map(e=>(function(e){var t;let r;if(!c(e))return null;let n="string"==typeof e.menuItemId?e.menuItemId.trim():"",o=u(e.name),i=(r=Math.trunc(Number(e.quantity)),!Number.isFinite(r)||r<=0?null:r),s=Math.round(Number(e.unitPriceCents)),a=Array.isArray(t=e.optionIds)?Array.from(new Set(t.filter(e=>"string"==typeof e).map(e=>e.trim()).filter(Boolean))).sort():[],l=Array.isArray(e.selectedOptions)?e.selectedOptions.map(e=>(function(e){if(!c(e))return null;let t="string"==typeof e.optionId?e.optionId.trim():"",r="string"==typeof e.optionKey?e.optionKey.trim():"",n="string"==typeof e.groupId?e.groupId.trim():"",o="str
4ing"==typeof e.groupKey?e.groupKey.trim():"",i=u(e.optionName),s=u(e.groupName),a=Number(e.priceDeltaCents);return t&&r&&n&&o&&i&&s&&Number.isFinite(a)?{optionId:t,optionKey:r,optionName:i,groupId:n,groupKey:o,groupName:s,priceDeltaCents:Math.round(a)}:null})(e)).filter(e=>null!==e):[];return n&&o&&i&&Number.isFinite(s)&&l.map(e=>e.optionId).sort().join(",")===a.join(",")?{id:"string"==typeof e.id&&e.id.trim()?e.id.trim():`${n}::${a.join(",")}`,menuItemId:n,optionIds:a,name:o,selectedOptions:l,unitPriceCents:s,quantity:i}:null})(e)).filter(e=>null!==e))}}catch{}d(!0)},[]),(0,r.useEffect)(()=>{if(i)try{localStorage.setItem(l,JSON.stringify(n))}catch{}},[n,i]);let f=(0,r.useCallback)(e=>{let t=e.quantity??1,r=n.find(t=>t.id===e.id)?n.map(r=>r.id===e.id?{...r,quantity:r.quantity+t}:r):[...n,{...e,quantity:t}];o(r);let i=r.reduce((e,t)=>e+t.quantity,0),s=r.reduce((e,t)=>e+t.unitPriceCents*t.quantity,0);h("item_added_to_cart",{menu_item_id:e.menuItemId,item_name:e.name.de,unit_price_cents:e.unitPriceCents,quantity:t,cart_size_after:i,cart_subtotal_after_cents:s})},[n,h]),p=(0,r.useCallback)(e=>{o(t=>t.filter(t=>t.id!==e))},[]),m=(0,r.useCallback)((e,t)=>{t<=0?o(t=>t.filter(t=>t.id!==e)):o(r=>r.map(r=>r.id===e?{...r,quantity:t}:r))},[]),g=(0,r.useCallback)(()=>{o([])},[]),y=(0,r.useMemo)(()=>n.reduce((e,t)=>e+t.quantity,0),[n]),w=(0,r.useMemo)(()=>n.reduce((e,t)=>e+t.unitPriceCents*t.quantity,0)/100,[n]),b=(0,r.useMemo)(()=>({items:n,addItem:f,removeItem:p,updateQuantity:m,clearCart:g,totalItems:y,subtotal:w}),[n,f,p,m,g,y,w]);return(0,t.jsx)(a,{value:b,children:e})}function h(){let e=(0,r.useContext)(a);if(!e)throw Error("useCart must be used within a CartProvider");return e}e.s(["default",()=>d,"useCart",()=>h],48892)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.