@influence-society-web/yuna-frontend 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+ "use strict";(()=>{var $d=Object.create;var Ca=Object.defineProperty;var Bd=Object.getOwnPropertyDescriptor;var jd=Object.getOwnPropertyNames;var zd=Object.getPrototypeOf,Ud=Object.prototype.hasOwnProperty;var Vd=(n,t,e)=>t in n?Ca(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var qd=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var Wd=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jd(t))!Ud.call(n,i)&&i!==e&&Ca(n,i,{get:()=>t[i],enumerable:!(r=Bd(t,i))||r.enumerable});return n};var Kd=(n,t,e)=>(e=n!=null?$d(zd(n)):{},Wd(t||!n||!n.__esModule?Ca(e,"default",{value:n,enumerable:!0}):e,n));var O=(n,t,e)=>(Vd(n,typeof t!="symbol"?t+"":t,e),e);var xc=qd((Ia,xa)=>{(function(n,t){typeof Ia=="object"&&typeof xa<"u"?xa.exports=t():typeof define=="function"&&define.amd?define(t):(n=n||self,n.JSBI=t())})(Ia,function(){"use strict";var n=Math.imul,t=Math.clz32;function e(N,H){(H==null||H>N.length)&&(H=N.length);for(var F=0,ne=Array(H);F<H;F++)ne[F]=N[F];return ne}function r(N){if(Array.isArray(N))return N}function i(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}function o(N,H,F){return H=f(H),$(N,S()?Reflect.construct(H,F||[],f(N).constructor):H.apply(N,F))}function a(N,H){if(!(N instanceof H))throw new TypeError("Cannot call a class as a function")}function s(N,H,F){if(S())return Reflect.construct.apply(null,arguments);var ne=[null];ne.push.apply(ne,H);var y=new(N.bind.apply(N,ne));return F&&V(y,F.prototype),y}function u(N,H){for(var F,ne=0;ne<H.length;ne++)F=H[ne],F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(N,Z(F.key),F)}function l(N,H,F){return H&&u(N.prototype,H),F&&u(N,F),Object.defineProperty(N,"prototype",{writable:!1}),N}function h(N,H){var F=typeof Symbol<"u"&&N[Symbol.iterator]||N["@@iterator"];if(!F){if(Array.isArray(N)||(F=Te(N))||H&&N&&typeof N.length=="number"){F&&(N=F);var ne=0,y=function(){};return{s:y,n:function(){return ne>=N.length?{done:!0}:{done:!1,value:N[ne++]}},e:function(v){throw v},f:y}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var L,c=!0,d=!1;return{s:function(){F=F.call(N)},n:function(){var v=F.next();return c=v.done,v},e:function(v){d=!0,L=v},f:function(){try{c||F.return==null||F.return()}finally{if(d)throw L}}}}function f(N){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(H){return H.__proto__||Object.getPrototypeOf(H)},f(N)}function p(N,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(H&&H.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),Object.defineProperty(N,"prototype",{writable:!1}),H&&V(N,H)}function E(N){try{return Function.toString.call(N).indexOf("[native code]")!==-1}catch{return typeof N=="function"}}function S(){try{var N=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(S=function(){return!!N})()}function k(N,H){var F=N==null?null:typeof Symbol<"u"&&N[Symbol.iterator]||N["@@iterator"];if(F!=null){var ne,y,L,c,d=[],v=!0,D=!1;try{if(L=(F=F.call(N)).next,H===0){if(Object(F)!==F)return;v=!1}else for(;!(v=(ne=L.call(F)).done)&&(d.push(ne.value),d.length!==H);v=!0);}catch(b){D=!0,y=b}finally{try{if(!v&&F.return!=null&&(c=F.return(),Object(c)!==c))return}finally{if(D)throw y}}return d}}function R(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $(N,H){if(H&&(typeof H=="object"||typeof H=="function"))return H;if(H!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return i(N)}function V(N,H){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(F,ne){return F.__proto__=ne,F},V(N,H)}function q(N,H){return r(N)||k(N,H)||Te(N,H)||R()}function U(N,H){if(typeof N!="object"||!N)return N;var F=N[Symbol.toPrimitive];if(F!==void 0){var ne=F.call(N,H||"default");if(typeof ne!="object")return ne;throw new TypeError("@@toPrimitive must return a primitive value.")}return(H==="string"?String:Number)(N)}function Z(N){var H=U(N,"string");return typeof H=="symbol"?H:H+""}function re(N){"@babel/helpers - typeof";return re=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},re(N)}function Te(N,H){if(N){if(typeof N=="string")return e(N,H);var F={}.toString.call(N).slice(8,-1);return F==="Object"&&N.constructor&&(F=N.constructor.name),F==="Map"||F==="Set"?Array.from(N):F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F)?e(N,H):void 0}}function Me(N){var H=typeof Map=="function"?new Map:void 0;return Me=function(F){function ne(){return s(F,arguments,f(this).constructor)}if(F===null||!E(F))return F;if(typeof F!="function")throw new TypeError("Super expression must either be null or a function");if(H!==void 0){if(H.has(F))return H.get(F);H.set(F,ne)}return ne.prototype=Object.create(F.prototype,{constructor:{value:ne,enumerable:!1,writable:!0,configurable:!0}}),V(ne,F)},Me(N)}var oe=function(N){var H=Math.abs,F=Math.max,ne=Math.floor;function y(L,c){var d;if(a(this,y),d=o(this,y,[L]),d.sign=c,Object.setPrototypeOf(d,y.prototype),L>y.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded");return d}return p(y,N),l(y,[{key:"toDebugString",value:function(){var c,d=["BigInt["],v=h(this);try{for(v.s();!(c=v.n()).done;){var D=c.value;d.push((D&&(D>>>0).toString(16))+", ")}}catch(b){v.e(b)}finally{v.f()}return d.push("]"),d.join("")}},{key:"toString",value:function(){var c=0<arguments.length&&arguments[0]!==void 0?arguments[0]:10;if(2>c||36<c)throw new RangeError("toString() radix argument must be between 2 and 36");return this.length===0?"0":c&c-1?y.__toStringGeneric(this,c,!1):y.__toStringBasePowerOfTwo(this,c)}},{key:"valueOf",value:function(){throw new Error("Convert JSBI instances to native numbers using `toNumber`.")}},{key:"__copy",value:function(){for(var c=new y(this.length,this.sign),d=0;d<this.length;d++)c[d]=this[d];return c}},{key:"__trim",value:function(){for(var c=this.length,d=this[c-1];d===0;)c--,d=this[c-1],this.pop();return c===0&&(this.sign=!1),this}},{key:"__initializeDigits",value:function(){for(var c=0;c<this.length;c++)this[c]=0}},{key:"__clzmsd",value:function(){return y.__clz30(this.__digit(this.length-1))}},{key:"__inplaceMultiplyAdd",value:function(c,d,v){v>this.length&&(v=this.length);for(var D=32767&c,b=c>>>15,_=0,I=d,C=0;C<v;C++){var Y=this.__digit(C),A=32767&Y,K=Y>>>15,ee=y.__imul(A,D),W=y.__imul(A,b),j=y.__imul(K,D),ie=y.__imul(K,b),le=I+ee+_;_=le>>>30,le&=1073741823,le+=((32767&W)<<15)+((32767&j)<<15),_+=le>>>30,I=ie+(W>>>15)+(j>>>15),this.__setDigit(C,1073741823&le)}if(_!==0||I!==0)throw new Error("implementation bug")}},{key:"__inplaceAdd",value:function(c,d,v){for(var D,b=0,_=0;_<v;_++)D=this.__halfDigit(d+_)+c.__halfDigit(_)+b,b=D>>>15,this.__setHalfDigit(d+_,32767&D);return b}},{key:"__inplaceSub",value:function(c,d,v){var D=v-1>>>1,b=0;if(1&d){d>>=1;for(var _=this.__digit(d),I=32767&_,C=0;C<D;C++){var Y=c.__digit(C),A=(_>>>15)-(32767&Y)-b;b=1&A>>>15,this.__setDigit(d+C,(32767&A)<<15|32767&I),_=this.__digit(d+C+1),I=(32767&_)-(Y>>>15)-b,b=1&I>>>15}var K=c.__digit(C),ee=(_>>>15)-(32767&K)-b;b=1&ee>>>15,this.__setDigit(d+C,(32767&ee)<<15|32767&I);var W=K>>>15;if(d+C+1>=this.length)throw new RangeError("out of bounds");!(1&v)&&(_=this.__digit(d+C+1),I=(32767&_)-W-b,b=1&I>>>15,this.__setDigit(d+c.length,1073709056&_|32767&I))}else{d>>=1;for(var j=0;j<c.length-1;j++){var ie=this.__digit(d+j),le=c.__digit(j),pe=(32767&ie)-(32767&le)-b;b=1&pe>>>15;var we=(ie>>>15)-(le>>>15)-b;b=1&we>>>15,this.__setDigit(d+j,(32767&we)<<15|32767&pe)}var Pe=this.__digit(d+j),je=c.__digit(j),Qe=(32767&Pe)-(32767&je)-b;b=1&Qe>>>15;var Vt=0;!(1&v)&&(Vt=(Pe>>>15)-(je>>>15)-b,b=1&Vt>>>15),this.__setDigit(d+j,(32767&Vt)<<15|32767&Qe)}return b}},{key:"__inplaceRightShift",value:function(c){if(c!==0){for(var d,v=this.__digit(0)>>>c,D=this.length-1,b=0;b<D;b++)d=this.__digit(b+1),this.__setDigit(b,1073741823&d<<30-c|v),v=d>>>c;this.__setDigit(D,v)}}},{key:"__digit",value:function(c){return this[c]}},{key:"__unsignedDigit",value:function(c){return this[c]>>>0}},{key:"__setDigit",value:function(c,d){this[c]=0|d}},{key:"__setDigitGrow",value:function(c,d){this[c]=0|d}},{key:"__halfDigitLength",value:function(){var c=this.length;return 32767>=this.__unsignedDigit(c-1)?2*c-1:2*c}},{key:"__halfDigit",value:function(c){return 32767&this[c>>>1]>>>15*(1&c)}},{key:"__setHalfDigit",value:function(c,d){var v=c>>>1,D=this.__digit(v),b=1&c?32767&D|d<<15:1073709056&D|32767&d;this.__setDigit(v,b)}}],[{key:"BigInt",value:function(c){var d=Number.isFinite;if(typeof c=="number"){if(c===0)return y.__zero();if(y.__isOneDigitInt(c))return 0>c?y.__oneDigit(-c,!0):y.__oneDigit(c,!1);if(!d(c)||ne(c)!==c)throw new RangeError("The number "+c+" cannot be converted to BigInt because it is not an integer");return y.__fromDouble(c)}if(typeof c=="string"){var v=y.__fromString(c);if(v===null)throw new SyntaxError("Cannot convert "+c+" to a BigInt");return v}if(typeof c=="boolean")return c===!0?y.__oneDigit(1,!1):y.__zero();if(re(c)==="object"){if(c.constructor===y)return c;var D=y.__toPrimitive(c);return y.BigInt(D)}throw new TypeError("Cannot convert "+c+" to a BigInt")}},{key:"toNumber",value:function(c){var d=c.length;if(d===0)return 0;if(d===1){var v=c.__unsignedDigit(0);return c.sign?-v:v}var D=c.__digit(d-1),b=y.__clz30(D),_=30*d-b;if(1024<_)return c.sign?-1/0:1/0;var I=_-1,C=D,Y=d-1,A=b+3,K=A===32?0:C<<A;K>>>=12;var ee=A-12,W=12<=A?0:C<<20+A,j=20+A;for(0<ee&&0<Y&&(Y--,C=c.__digit(Y),K|=C>>>30-ee,W=C<<ee+2,j=ee+2);0<j&&0<Y;)Y--,C=c.__digit(Y),W|=30<=j?C<<j-30:C>>>30-j,j-=30;var ie=y.__decideRounding(c,j,Y,C);if((ie===1||ie===0&&(1&W)==1)&&(W=W+1>>>0,W===0&&(K++,K>>>20!=0&&(K=0,I++,1023<I))))return c.sign?-1/0:1/0;var le=c.sign?-2147483648:0;return I=I+1023<<20,y.__kBitConversionInts[y.__kBitConversionIntHigh]=le|I|K,y.__kBitConversionInts[y.__kBitConversionIntLow]=W,y.__kBitConversionDouble[0]}},{key:"unaryMinus",value:function(c){if(c.length===0)return c;var d=c.__copy();return d.sign=!c.sign,d}},{key:"bitwiseNot",value:function(c){return c.sign?y.__absoluteSubOne(c).__trim():y.__absoluteAddOne(c,!0)}},{key:"exponentiate",value:function(c,d){if(d.sign)throw new RangeError("Exponent must be positive");if(d.length===0)return y.__oneDigit(1,!1);if(c.length===0)return c;if(c.length===1&&c.__digit(0)===1)return c.sign&&!(1&d.__digit(0))?y.unaryMinus(c):c;if(1<d.length)throw new RangeError("BigInt too big");var v=d.__unsignedDigit(0);if(v===1)return c;if(v>=y.__kMaxLengthBits)throw new RangeError("BigInt too big");if(c.length===1&&c.__digit(0)===2){var D=1+(0|v/30),b=c.sign&&(1&v)!=0,_=new y(D,b);_.__initializeDigits();var I=1<<v%30;return _.__setDigit(D-1,I),_}var C=null,Y=c;for(1&v&&(C=c),v>>=1;v!==0;v>>=1)Y=y.multiply(Y,Y),1&v&&(C===null?C=Y:C=y.multiply(C,Y));return C}},{key:"multiply",value:function(c,d){if(c.length===0)return c;if(d.length===0)return d;var v=c.length+d.length;30<=c.__clzmsd()+d.__clzmsd()&&v--;var D=new y(v,c.sign!==d.sign);D.__initializeDigits();for(var b=0;b<c.length;b++)y.__multiplyAccumulate(d,c.__digit(b),D,b);return D.__trim()}},{key:"divide",value:function(c,d){if(d.length===0)throw new RangeError("Division by zero");if(0>y.__absoluteCompare(c,d))return y.__zero();var v,D=c.sign!==d.sign,b=d.__unsignedDigit(0);if(d.length===1&&32767>=b){if(b===1)return D===c.sign?c:y.unaryMinus(c);v=y.__absoluteDivSmall(c,b,null)}else v=y.__absoluteDivLarge(c,d,!0,!1);return v.sign=D,v.__trim()}},{key:"remainder",value:function(c,d){if(d.length===0)throw new RangeError("Division by zero");if(0>y.__absoluteCompare(c,d))return c;var v=d.__unsignedDigit(0);if(d.length===1&&32767>=v){if(v===1)return y.__zero();var D=y.__absoluteModSmall(c,v);return D===0?y.__zero():y.__oneDigit(D,c.sign)}var b=y.__absoluteDivLarge(c,d,!1,!0);return b.sign=c.sign,b.__trim()}},{key:"add",value:function(c,d){var v=c.sign;return v===d.sign?y.__absoluteAdd(c,d,v):0<=y.__absoluteCompare(c,d)?y.__absoluteSub(c,d,v):y.__absoluteSub(d,c,!v)}},{key:"subtract",value:function(c,d){var v=c.sign;return v===d.sign?0<=y.__absoluteCompare(c,d)?y.__absoluteSub(c,d,v):y.__absoluteSub(d,c,!v):y.__absoluteAdd(c,d,v)}},{key:"leftShift",value:function(c,d){return d.length===0||c.length===0?c:d.sign?y.__rightShiftByAbsolute(c,d):y.__leftShiftByAbsolute(c,d)}},{key:"signedRightShift",value:function(c,d){return d.length===0||c.length===0?c:d.sign?y.__leftShiftByAbsolute(c,d):y.__rightShiftByAbsolute(c,d)}},{key:"unsignedRightShift",value:function(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}},{key:"lessThan",value:function(c,d){return 0>y.__compareToBigInt(c,d)}},{key:"lessThanOrEqual",value:function(c,d){return 0>=y.__compareToBigInt(c,d)}},{key:"greaterThan",value:function(c,d){return 0<y.__compareToBigInt(c,d)}},{key:"greaterThanOrEqual",value:function(c,d){return 0<=y.__compareToBigInt(c,d)}},{key:"equal",value:function(c,d){if(c.sign!==d.sign||c.length!==d.length)return!1;for(var v=0;v<c.length;v++)if(c.__digit(v)!==d.__digit(v))return!1;return!0}},{key:"notEqual",value:function(c,d){return!y.equal(c,d)}},{key:"bitwiseAnd",value:function(c,d){if(!c.sign&&!d.sign)return y.__absoluteAnd(c,d).__trim();if(c.sign&&d.sign){var v=F(c.length,d.length)+1,D=y.__absoluteSubOne(c,v),b=y.__absoluteSubOne(d);return D=y.__absoluteOr(D,b,D),y.__absoluteAddOne(D,!0,D).__trim()}if(c.sign){var _=[d,c];c=_[0],d=_[1]}return y.__absoluteAndNot(c,y.__absoluteSubOne(d)).__trim()}},{key:"bitwiseXor",value:function(c,d){if(!c.sign&&!d.sign)return y.__absoluteXor(c,d).__trim();if(c.sign&&d.sign){var v=F(c.length,d.length),D=y.__absoluteSubOne(c,v),b=y.__absoluteSubOne(d);return y.__absoluteXor(D,b,D).__trim()}var _=F(c.length,d.length)+1;if(c.sign){var I=[d,c];c=I[0],d=I[1]}var C=y.__absoluteSubOne(d,_);return C=y.__absoluteXor(C,c,C),y.__absoluteAddOne(C,!0,C).__trim()}},{key:"bitwiseOr",value:function(c,d){var v=F(c.length,d.length);if(!c.sign&&!d.sign)return y.__absoluteOr(c,d).__trim();if(c.sign&&d.sign){var D=y.__absoluteSubOne(c,v),b=y.__absoluteSubOne(d);return D=y.__absoluteAnd(D,b,D),y.__absoluteAddOne(D,!0,D).__trim()}if(c.sign){var _=[d,c];c=_[0],d=_[1]}var I=y.__absoluteSubOne(d,v);return I=y.__absoluteAndNot(I,c,I),y.__absoluteAddOne(I,!0,I).__trim()}},{key:"asIntN",value:function(c,d){if(d.length===0)return d;if(c=ne(c),0>c)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(c===0)return y.__zero();if(c>=y.__kMaxLengthBits)return d;var v=0|(c+29)/30;if(d.length<v)return d;var D=d.__unsignedDigit(v-1),b=1<<(c-1)%30;if(d.length===v&&D<b)return d;var _=(D&b)===b;if(!_)return y.__truncateToNBits(c,d);if(!d.sign)return y.__truncateAndSubFromPowerOfTwo(c,d,!0);if(!(D&b-1)){for(var I=v-2;0<=I;I--)if(d.__digit(I)!==0)return y.__truncateAndSubFromPowerOfTwo(c,d,!1);return d.length===v&&D===b?d:y.__truncateToNBits(c,d)}return y.__truncateAndSubFromPowerOfTwo(c,d,!1)}},{key:"asUintN",value:function(c,d){if(d.length===0)return d;if(c=ne(c),0>c)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(c===0)return y.__zero();if(d.sign){if(c>y.__kMaxLengthBits)throw new RangeError("BigInt too big");return y.__truncateAndSubFromPowerOfTwo(c,d,!1)}if(c>=y.__kMaxLengthBits)return d;var v=0|(c+29)/30;if(d.length<v)return d;var D=c%30;if(d.length==v){if(D===0)return d;var b=d.__digit(v-1);if(!(b>>>D))return d}return y.__truncateToNBits(c,d)}},{key:"ADD",value:function(c,d){if(c=y.__toPrimitive(c),d=y.__toPrimitive(d),typeof c=="string")return typeof d!="string"&&(d=d.toString()),c+d;if(typeof d=="string")return c.toString()+d;if(c=y.__toNumeric(c),d=y.__toNumeric(d),y.__isBigInt(c)&&y.__isBigInt(d))return y.add(c,d);if(typeof c=="number"&&typeof d=="number")return c+d;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}},{key:"LT",value:function(c,d){return y.__compare(c,d,0)}},{key:"LE",value:function(c,d){return y.__compare(c,d,1)}},{key:"GT",value:function(c,d){return y.__compare(c,d,2)}},{key:"GE",value:function(c,d){return y.__compare(c,d,3)}},{key:"EQ",value:function(c,d){for(;;){if(y.__isBigInt(c))return y.__isBigInt(d)?y.equal(c,d):y.EQ(d,c);if(typeof c=="number"){if(y.__isBigInt(d))return y.__equalToNumber(d,c);if(re(d)!=="object")return c==d;d=y.__toPrimitive(d)}else if(typeof c=="string"){if(y.__isBigInt(d))return c=y.__fromString(c),c!==null&&y.equal(c,d);if(re(d)!=="object")return c==d;d=y.__toPrimitive(d)}else if(typeof c=="boolean"){if(y.__isBigInt(d))return y.__equalToNumber(d,+c);if(re(d)!=="object")return c==d;d=y.__toPrimitive(d)}else if(re(c)==="symbol"){if(y.__isBigInt(d))return!1;if(re(d)!=="object")return c==d;d=y.__toPrimitive(d)}else if(re(c)==="object"){if(re(d)==="object"&&d.constructor!==y)return c==d;c=y.__toPrimitive(c)}else return c==d}}},{key:"NE",value:function(c,d){return!y.EQ(c,d)}},{key:"DataViewGetBigInt64",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0&&arguments[2];return y.asIntN(64,y.DataViewGetBigUint64(c,d,v))}},{key:"DataViewGetBigUint64",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0&&arguments[2],D=v?[4,0]:[0,4],b=q(D,2),_=b[0],I=b[1],C=c.getUint32(d+_,v),Y=c.getUint32(d+I,v),A=new y(3,!1);return A.__setDigit(0,1073741823&Y),A.__setDigit(1,(268435455&C)<<2|Y>>>30),A.__setDigit(2,C>>>28),A.__trim()}},{key:"DataViewSetBigInt64",value:function(c,d,v){var D=3<arguments.length&&arguments[3]!==void 0&&arguments[3];y.DataViewSetBigUint64(c,d,v,D)}},{key:"DataViewSetBigUint64",value:function(c,d,v){var D=3<arguments.length&&arguments[3]!==void 0&&arguments[3];v=y.asUintN(64,v);var b=0,_=0;if(0<v.length&&(_=v.__digit(0),1<v.length)){var I=v.__digit(1);_|=I<<30,b=I>>>2,2<v.length&&(b|=v.__digit(2)<<28)}var C=D?[4,0]:[0,4],Y=q(C,2),A=Y[0],K=Y[1];c.setUint32(d+A,b,D),c.setUint32(d+K,_,D)}},{key:"__zero",value:function(){return new y(0,!1)}},{key:"__oneDigit",value:function(c,d){var v=new y(1,d);return v.__setDigit(0,c),v}},{key:"__decideRounding",value:function(c,d,v,D){if(0<d)return-1;var b;if(0>d)b=-d-1;else{if(v===0)return-1;v--,D=c.__digit(v),b=29}var _=1<<b;if(!(D&_))return-1;if(_-=1,(D&_)!=0)return 1;for(;0<v;)if(v--,c.__digit(v)!==0)return 1;return 0}},{key:"__fromDouble",value:function(c){var d=0>c;y.__kBitConversionDouble[0]=c;var v,D=2047&y.__kBitConversionInts[y.__kBitConversionIntHigh]>>>20,b=D-1023,_=(0|b/30)+1,I=new y(_,d),C=1048576,Y=1048575&y.__kBitConversionInts[y.__kBitConversionIntHigh]|C,A=y.__kBitConversionInts[y.__kBitConversionIntLow],K=20,ee=b%30,W=0;if(ee<K){var j=K-ee;W=j+32,v=Y>>>j,Y=Y<<32-j|A>>>j,A<<=32-j}else if(ee===K)W=32,v=Y,Y=A,A=0;else{var ie=ee-K;W=32-ie,v=Y<<ie|A>>>32-ie,Y=A<<ie,A=0}I.__setDigit(_-1,v);for(var le=_-2;0<=le;le--)0<W?(W-=30,v=Y>>>2,Y=Y<<30|A>>>2,A<<=30):v=0,I.__setDigit(le,v);return I.__trim()}},{key:"__isWhitespace",value:function(c){return 13>=c&&9<=c||(159>=c?c==32:131071>=c?c==160||c==5760:196607>=c?(c&=131071,10>=c||c==40||c==41||c==47||c==95||c==4096):c==65279)}},{key:"__fromString",value:function(c){var d=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0,v=0,D=c.length,b=0;if(b===D)return y.__zero();for(var _=c.charCodeAt(b);y.__isWhitespace(_);){if(++b===D)return y.__zero();_=c.charCodeAt(b)}if(_===43){if(++b===D)return null;_=c.charCodeAt(b),v=1}else if(_===45){if(++b===D)return null;_=c.charCodeAt(b),v=-1}if(d===0){if(d=10,_===48){if(++b===D)return y.__zero();if(_=c.charCodeAt(b),_===88||_===120){if(d=16,++b===D)return null;_=c.charCodeAt(b)}else if(_===79||_===111){if(d=8,++b===D)return null;_=c.charCodeAt(b)}else if(_===66||_===98){if(d=2,++b===D)return null;_=c.charCodeAt(b)}}}else if(d===16&&_===48){if(++b===D)return y.__zero();if(_=c.charCodeAt(b),_===88||_===120){if(++b===D)return null;_=c.charCodeAt(b)}}if(v!==0&&d!==10)return null;for(;_===48;){if(++b===D)return y.__zero();_=c.charCodeAt(b)}var I=D-b,C=y.__kMaxBitsPerChar[d],Y=y.__kBitsPerCharTableMultiplier-1;if(I>1073741824/C)return null;var A=C*I+Y>>>y.__kBitsPerCharTableShift,K=0|(A+29)/30,ee=new y(K,!1),W=10>d?d:10,j=10<d?d-10:0;if(d&d-1){ee.__initializeDigits();var Qe=!1,Vt=0;do{for(var Gn,Rn=0,Kr=1;;){if(Gn=void 0,_-48>>>0<W)Gn=_-48;else if((32|_)-97>>>0<j)Gn=(32|_)-87;else{Qe=!0;break}var co=Kr*d;if(1073741823<co)break;if(Kr=co,Rn=Rn*d+Gn,Vt++,++b===D){Qe=!0;break}_=c.charCodeAt(b)}Y=30*y.__kBitsPerCharTableMultiplier-1;var lo=0|(C*Vt+Y>>>y.__kBitsPerCharTableShift)/30;ee.__inplaceMultiplyAdd(Kr,Rn,lo)}while(!Qe)}else{C>>=y.__kBitsPerCharTableShift;var ie=[],le=[],pe=!1;do{for(var we,Pe=0,je=0;;){if(we=void 0,_-48>>>0<W)we=_-48;else if((32|_)-97>>>0<j)we=(32|_)-87;else{pe=!0;break}if(je+=C,Pe=Pe<<C|we,++b===D){pe=!0;break}if(_=c.charCodeAt(b),30<je+C)break}ie.push(Pe),le.push(je)}while(!pe);y.__fillFromParts(ee,ie,le)}if(b!==D){if(!y.__isWhitespace(_))return null;for(b++;b<D;b++)if(_=c.charCodeAt(b),!y.__isWhitespace(_))return null}return ee.sign=v===-1,ee.__trim()}},{key:"__fillFromParts",value:function(c,d,v){for(var D=0,b=0,_=0,I=d.length-1;0<=I;I--){var C=d[I],Y=v[I];b|=C<<_,_+=Y,_===30?(c.__setDigit(D++,b),_=0,b=0):30<_&&(c.__setDigit(D++,1073741823&b),_-=30,b=C>>>Y-_)}if(b!==0){if(D>=c.length)throw new Error("implementation bug");c.__setDigit(D++,b)}for(;D<c.length;D++)c.__setDigit(D,0)}},{key:"__toStringBasePowerOfTwo",value:function(c,d){var v=c.length,D=d-1;D=(85&D>>>1)+(85&D),D=(51&D>>>2)+(51&D),D=(15&D>>>4)+(15&D);var b=D,_=d-1,I=c.__digit(v-1),C=y.__clz30(I),Y=30*v-C,A=0|(Y+b-1)/b;if(c.sign&&A++,268435456<A)throw new Error("string too long");for(var K=Array(A),ee=A-1,W=0,j=0,ie=0;ie<v-1;ie++){var le=c.__digit(ie),pe=(W|le<<j)&_;K[ee--]=y.__kConversionChars[pe];var we=b-j;for(W=le>>>we,j=30-we;j>=b;)K[ee--]=y.__kConversionChars[W&_],W>>>=b,j-=b}var Pe=(W|I<<j)&_;for(K[ee--]=y.__kConversionChars[Pe],W=I>>>b-j;W!==0;)K[ee--]=y.__kConversionChars[W&_],W>>>=b;if(c.sign&&(K[ee--]="-"),ee!==-1)throw new Error("implementation bug");return K.join("")}},{key:"__toStringGeneric",value:function(c,d,v){var D=c.length;if(D===0)return"";if(D===1){var b=c.__unsignedDigit(0).toString(d);return v===!1&&c.sign&&(b="-"+b),b}var _=30*D-y.__clz30(c.__digit(D-1)),I=y.__kMaxBitsPerChar[d],C=I-1,Y=_*y.__kBitsPerCharTableMultiplier;Y+=C-1,Y=0|Y/C;var A,K,ee=Y+1>>1,W=y.exponentiate(y.__oneDigit(d,!1),y.__oneDigit(ee,!1)),j=W.__unsignedDigit(0);if(W.length===1&&32767>=j){A=new y(c.length,!1),A.__initializeDigits();for(var ie,le=0,pe=2*c.length-1;0<=pe;pe--)ie=le<<15|c.__halfDigit(pe),A.__setHalfDigit(pe,0|ie/j),le=0|ie%j;K=le.toString(d)}else{var we=y.__absoluteDivLarge(c,W,!0,!0);A=we.quotient;var Pe=we.remainder.__trim();K=y.__toStringGeneric(Pe,d,!0)}A.__trim();for(var je=y.__toStringGeneric(A,d,!0);K.length<ee;)K="0"+K;return v===!1&&c.sign&&(je="-"+je),je+K}},{key:"__unequalSign",value:function(c){return c?-1:1}},{key:"__absoluteGreater",value:function(c){return c?-1:1}},{key:"__absoluteLess",value:function(c){return c?1:-1}},{key:"__compareToBigInt",value:function(c,d){var v=c.sign;if(v!==d.sign)return y.__unequalSign(v);var D=y.__absoluteCompare(c,d);return 0<D?y.__absoluteGreater(v):0>D?y.__absoluteLess(v):0}},{key:"__compareToNumber",value:function(c,d){if(y.__isOneDigitInt(d)){var v=c.sign,D=0>d;if(v!==D)return y.__unequalSign(v);if(c.length===0){if(D)throw new Error("implementation bug");return d===0?0:-1}if(1<c.length)return y.__absoluteGreater(v);var b=H(d),_=c.__unsignedDigit(0);return _>b?y.__absoluteGreater(v):_<b?y.__absoluteLess(v):0}return y.__compareToDouble(c,d)}},{key:"__compareToDouble",value:function(c,d){if(d!==d)return d;if(d===1/0)return-1;if(d===-1/0)return 1;var v=c.sign,D=0>d;if(v!==D)return y.__unequalSign(v);if(d===0)throw new Error("implementation bug: should be handled elsewhere");if(c.length===0)return-1;y.__kBitConversionDouble[0]=d;var b=2047&y.__kBitConversionInts[y.__kBitConversionIntHigh]>>>20;if(b==2047)throw new Error("implementation bug: handled elsewhere");var _=b-1023;if(0>_)return y.__absoluteGreater(v);var I=c.length,C=c.__digit(I-1),Y=y.__clz30(C),A=30*I-Y,K=_+1;if(A<K)return y.__absoluteLess(v);if(A>K)return y.__absoluteGreater(v);var ee=1048576,W=1048576|1048575&y.__kBitConversionInts[y.__kBitConversionIntHigh],j=y.__kBitConversionInts[y.__kBitConversionIntLow],ie=20,le=29-Y;if(le!==(0|(A-1)%30))throw new Error("implementation bug");var pe,we=0;if(le<ie){var Pe=ie-le;we=Pe+32,pe=W>>>Pe,W=W<<32-Pe|j>>>Pe,j<<=32-Pe}else if(le===ie)we=32,pe=W,W=j,j=0;else{var je=le-ie;we=32-je,pe=W<<je|j>>>32-je,W=j<<je,j=0}if(C>>>=0,pe>>>=0,C>pe)return y.__absoluteGreater(v);if(C<pe)return y.__absoluteLess(v);for(var Qe=I-2;0<=Qe;Qe--){0<we?(we-=30,pe=W>>>2,W=W<<30|j>>>2,j<<=30):pe=0;var Vt=c.__unsignedDigit(Qe);if(Vt>pe)return y.__absoluteGreater(v);if(Vt<pe)return y.__absoluteLess(v)}if(W!==0||j!==0){if(we===0)throw new Error("implementation bug");return y.__absoluteLess(v)}return 0}},{key:"__equalToNumber",value:function(c,d){return y.__isOneDigitInt(d)?d===0?c.length===0:c.length===1&&c.sign===0>d&&c.__unsignedDigit(0)===H(d):y.__compareToDouble(c,d)===0}},{key:"__comparisonResultToBool",value:function(c,d){return d===0?0>c:d===1?0>=c:d===2?0<c:d===3?0<=c:void 0}},{key:"__compare",value:function(c,d,v){if(c=y.__toPrimitive(c),d=y.__toPrimitive(d),typeof c=="string"&&typeof d=="string")switch(v){case 0:return c<d;case 1:return c<=d;case 2:return c>d;case 3:return c>=d}if(y.__isBigInt(c)&&typeof d=="string")return d=y.__fromString(d),d!==null&&y.__comparisonResultToBool(y.__compareToBigInt(c,d),v);if(typeof c=="string"&&y.__isBigInt(d))return c=y.__fromString(c),c!==null&&y.__comparisonResultToBool(y.__compareToBigInt(c,d),v);if(c=y.__toNumeric(c),d=y.__toNumeric(d),y.__isBigInt(c)){if(y.__isBigInt(d))return y.__comparisonResultToBool(y.__compareToBigInt(c,d),v);if(typeof d!="number")throw new Error("implementation bug");return y.__comparisonResultToBool(y.__compareToNumber(c,d),v)}if(typeof c!="number")throw new Error("implementation bug");if(y.__isBigInt(d))return y.__comparisonResultToBool(y.__compareToNumber(d,c),2^v);if(typeof d!="number")throw new Error("implementation bug");return v===0?c<d:v===1?c<=d:v===2?c>d:v===3?c>=d:void 0}},{key:"__absoluteAdd",value:function(c,d,v){if(c.length<d.length)return y.__absoluteAdd(d,c,v);if(c.length===0)return c;if(d.length===0)return c.sign===v?c:y.unaryMinus(c);var D=c.length;(c.__clzmsd()===0||d.length===c.length&&d.__clzmsd()===0)&&D++;for(var b,_=new y(D,v),I=0,C=0;C<d.length;C++)b=c.__digit(C)+d.__digit(C)+I,I=b>>>30,_.__setDigit(C,1073741823&b);for(;C<c.length;C++){var Y=c.__digit(C)+I;I=Y>>>30,_.__setDigit(C,1073741823&Y)}return C<_.length&&_.__setDigit(C,I),_.__trim()}},{key:"__absoluteSub",value:function(c,d,v){if(c.length===0)return c;if(d.length===0)return c.sign===v?c:y.unaryMinus(c);for(var D,b=new y(c.length,v),_=0,I=0;I<d.length;I++)D=c.__digit(I)-d.__digit(I)-_,_=1&D>>>30,b.__setDigit(I,1073741823&D);for(;I<c.length;I++){var C=c.__digit(I)-_;_=1&C>>>30,b.__setDigit(I,1073741823&C)}return b.__trim()}},{key:"__absoluteAddOne",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length;v===null?v=new y(D,d):v.sign=d;for(var b,_=1,I=0;I<D;I++)b=c.__digit(I)+_,_=b>>>30,v.__setDigit(I,1073741823&b);return _!==0&&v.__setDigitGrow(D,1),v}},{key:"__absoluteSubOne",value:function(c,d){var v=c.length;d=d||v;for(var D,b=new y(d,!1),_=1,I=0;I<v;I++)D=c.__digit(I)-_,_=1&D>>>30,b.__setDigit(I,1073741823&D);if(_!==0)throw new Error("implementation bug");for(var C=v;C<d;C++)b.__setDigit(C,0);return b}},{key:"__absoluteAnd",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;if(D<b){_=D;var I=c,C=D;c=d,D=b,d=I,b=C}var Y=_;v===null?v=new y(Y,!1):Y=v.length;for(var A=0;A<_;A++)v.__setDigit(A,c.__digit(A)&d.__digit(A));for(;A<Y;A++)v.__setDigit(A,0);return v}},{key:"__absoluteAndNot",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;D<b&&(_=D);var I=D;v===null?v=new y(I,!1):I=v.length;for(var C=0;C<_;C++)v.__setDigit(C,c.__digit(C)&~d.__digit(C));for(;C<D;C++)v.__setDigit(C,c.__digit(C));for(;C<I;C++)v.__setDigit(C,0);return v}},{key:"__absoluteOr",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;if(D<b){_=D;var I=c,C=D;c=d,D=b,d=I,b=C}var Y=D;v===null?v=new y(Y,!1):Y=v.length;for(var A=0;A<_;A++)v.__setDigit(A,c.__digit(A)|d.__digit(A));for(;A<D;A++)v.__setDigit(A,c.__digit(A));for(;A<Y;A++)v.__setDigit(A,0);return v}},{key:"__absoluteXor",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null,D=c.length,b=d.length,_=b;if(D<b){_=D;var I=c,C=D;c=d,D=b,d=I,b=C}var Y=D;v===null?v=new y(Y,!1):Y=v.length;for(var A=0;A<_;A++)v.__setDigit(A,c.__digit(A)^d.__digit(A));for(;A<D;A++)v.__setDigit(A,c.__digit(A));for(;A<Y;A++)v.__setDigit(A,0);return v}},{key:"__absoluteCompare",value:function(c,d){var v=c.length-d.length;if(v!=0)return v;for(var D=c.length-1;0<=D&&c.__digit(D)===d.__digit(D);)D--;return 0>D?0:c.__unsignedDigit(D)>d.__unsignedDigit(D)?1:-1}},{key:"__multiplyAccumulate",value:function(c,d,v,D){if(d!==0){for(var b=32767&d,_=d>>>15,I=0,C=0,Y=0;Y<c.length;Y++,D++){var A=v.__digit(D),K=c.__digit(Y),ee=32767&K,W=K>>>15,j=y.__imul(ee,b),ie=y.__imul(ee,_),le=y.__imul(W,b),pe=y.__imul(W,_);A+=C+j+I,I=A>>>30,A&=1073741823,A+=((32767&ie)<<15)+((32767&le)<<15),I+=A>>>30,C=pe+(ie>>>15)+(le>>>15),v.__setDigit(D,1073741823&A)}for(;I!==0||C!==0;D++){var we=v.__digit(D);we+=I+C,C=0,I=we>>>30,v.__setDigit(D,1073741823&we)}}}},{key:"__internalMultiplyAdd",value:function(c,d,v,D,b){for(var _=v,I=0,C=0;C<D;C++){var Y=c.__digit(C),A=y.__imul(32767&Y,d),K=y.__imul(Y>>>15,d),ee=A+((32767&K)<<15)+I+_;_=ee>>>30,I=K>>>15,b.__setDigit(C,1073741823&ee)}if(b.length>D)for(b.__setDigit(D++,_+I);D<b.length;)b.__setDigit(D++,0);else if(_+I!==0)throw new Error("implementation bug")}},{key:"__absoluteDivSmall",value:function(c,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;v===null&&(v=new y(c.length,!1));for(var D=0,b=2*c.length-1;0<=b;b-=2){var _=(D<<15|c.__halfDigit(b))>>>0,I=0|_/d;D=0|_%d,_=(D<<15|c.__halfDigit(b-1))>>>0;var C=0|_/d;D=0|_%d,v.__setDigit(b>>>1,I<<15|C)}return v}},{key:"__absoluteModSmall",value:function(c,d){for(var v,D=0,b=2*c.length-1;0<=b;b--)v=(D<<15|c.__halfDigit(b))>>>0,D=0|v%d;return D}},{key:"__absoluteDivLarge",value:function(c,d,v,D){var b=d.__halfDigitLength(),_=d.length,I=c.__halfDigitLength()-b,C=null;v&&(C=new y(I+2>>>1,!1),C.__initializeDigits());var Y=new y(b+2>>>1,!1);Y.__initializeDigits();var A=y.__clz15(d.__halfDigit(b-1));0<A&&(d=y.__specialLeftShift(d,A,0));for(var K=y.__specialLeftShift(c,A,1),ee=d.__halfDigit(b-1),W=0,j=I;0<=j;j--){var ie=32767,le=K.__halfDigit(j+b);if(le!==ee){var pe=(le<<15|K.__halfDigit(j+b-1))>>>0;ie=0|pe/ee;for(var we=0|pe%ee,Pe=d.__halfDigit(b-2),je=K.__halfDigit(j+b-2);y.__imul(ie,Pe)>>>0>(we<<16|je)>>>0&&(ie--,we+=ee,!(32767<we)););}y.__internalMultiplyAdd(d,ie,0,_,Y);var Qe=K.__inplaceSub(Y,j,b+1);Qe!==0&&(Qe=K.__inplaceAdd(d,j,b),K.__setHalfDigit(j+b,32767&K.__halfDigit(j+b)+Qe),ie--),v&&(1&j?W=ie<<15:C.__setDigit(j>>>1,W|ie))}if(D)return K.__inplaceRightShift(A),v?{quotient:C,remainder:K}:K;if(v)return C;throw new Error("unreachable")}},{key:"__clz15",value:function(c){return y.__clz30(c)-15}},{key:"__specialLeftShift",value:function(c,d,v){var D=c.length,b=D+v,_=new y(b,!1);if(d===0){for(var I=0;I<D;I++)_.__setDigit(I,c.__digit(I));return 0<v&&_.__setDigit(D,0),_}for(var C,Y=0,A=0;A<D;A++)C=c.__digit(A),_.__setDigit(A,1073741823&C<<d|Y),Y=C>>>30-d;return 0<v&&_.__setDigit(D,Y),_}},{key:"__leftShiftByAbsolute",value:function(c,d){var v=y.__toShiftAmount(d);if(0>v)throw new RangeError("BigInt too big");var D=0|v/30,b=v%30,_=c.length,I=b!==0&&c.__digit(_-1)>>>30-b!=0,C=_+D+(I?1:0),Y=new y(C,c.sign);if(b===0){for(var A=0;A<D;A++)Y.__setDigit(A,0);for(;A<C;A++)Y.__setDigit(A,c.__digit(A-D))}else{for(var K=0,ee=0;ee<D;ee++)Y.__setDigit(ee,0);for(var W,j=0;j<_;j++)W=c.__digit(j),Y.__setDigit(j+D,1073741823&W<<b|K),K=W>>>30-b;if(I)Y.__setDigit(_+D,K);else if(K!==0)throw new Error("implementation bug")}return Y.__trim()}},{key:"__rightShiftByAbsolute",value:function(c,d){var v=c.length,D=c.sign,b=y.__toShiftAmount(d);if(0>b)return y.__rightShiftByMaximum(D);var _=0|b/30,I=b%30,C=v-_;if(0>=C)return y.__rightShiftByMaximum(D);var Y=!1;if(D){var A=(1<<I)-1;if(c.__digit(_)&A)Y=!0;else for(var K=0;K<_;K++)if(c.__digit(K)!==0){Y=!0;break}}if(Y&&I===0){var ee=c.__digit(v-1),W=~ee==0;W&&C++}var j=new y(C,D);if(I===0){j.__setDigit(C-1,0);for(var ie=_;ie<v;ie++)j.__setDigit(ie-_,c.__digit(ie))}else{for(var le,pe=c.__digit(_)>>>I,we=v-_-1,Pe=0;Pe<we;Pe++)le=c.__digit(Pe+_+1),j.__setDigit(Pe,1073741823&le<<30-I|pe),pe=le>>>I;j.__setDigit(we,pe)}return Y&&(j=y.__absoluteAddOne(j,!0,j)),j.__trim()}},{key:"__rightShiftByMaximum",value:function(c){return c?y.__oneDigit(1,!0):y.__zero()}},{key:"__toShiftAmount",value:function(c){if(1<c.length)return-1;var d=c.__unsignedDigit(0);return d>y.__kMaxLengthBits?-1:d}},{key:"__toPrimitive",value:function(c){var d=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"default";if(re(c)!=="object"||c.constructor===y)return c;if(typeof Symbol<"u"&&re(Symbol.toPrimitive)==="symbol"&&c[Symbol.toPrimitive]){var v=c[Symbol.toPrimitive](d);if(re(v)!=="object")return v;throw new TypeError("Cannot convert object to primitive value")}var D=c.valueOf;if(D){var b=D.call(c);if(re(b)!=="object")return b}var _=c.toString;if(_){var I=_.call(c);if(re(I)!=="object")return I}throw new TypeError("Cannot convert object to primitive value")}},{key:"__toNumeric",value:function(c){return y.__isBigInt(c)?c:+c}},{key:"__isBigInt",value:function(c){return re(c)==="object"&&c!==null&&c.constructor===y}},{key:"__truncateToNBits",value:function(c,d){for(var v=0|(c+29)/30,D=new y(v,d.sign),b=v-1,_=0;_<b;_++)D.__setDigit(_,d.__digit(_));var I=d.__digit(b);if(c%30!=0){var C=32-c%30;I=I<<C>>>C}return D.__setDigit(b,I),D.__trim()}},{key:"__truncateAndSubFromPowerOfTwo",value:function(c,d,v){for(var D=Math.min,b,_=0|(c+29)/30,I=new y(_,v),C=0,Y=_-1,A=0,K=D(Y,d.length);C<K;C++)b=0-d.__digit(C)-A,A=1&b>>>30,I.__setDigit(C,1073741823&b);for(;C<Y;C++)I.__setDigit(C,0|1073741823&-A);var ee,W=Y<d.length?d.__digit(Y):0,j=c%30;if(j===0)ee=0-W-A,ee&=1073741823;else{var ie=32-j;W=W<<ie>>>ie;var le=1<<32-ie;ee=le-W-A,ee&=le-1}return I.__setDigit(Y,ee),I.__trim()}},{key:"__digitPow",value:function(c,d){for(var v=1;0<d;)1&d&&(v*=c),d>>>=1,c*=c;return v}},{key:"__detectBigEndian",value:function(){return y.__kBitConversionDouble[0]=-0,y.__kBitConversionInts[0]!==0}},{key:"__isOneDigitInt",value:function(c){return(1073741823&c)===c}}])}(Me(Array));return oe.__kMaxLength=33554432,oe.__kMaxLengthBits=oe.__kMaxLength<<5,oe.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],oe.__kBitsPerCharTableShift=5,oe.__kBitsPerCharTableMultiplier=1<<oe.__kBitsPerCharTableShift,oe.__kConversionChars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],oe.__kBitConversionBuffer=new ArrayBuffer(8),oe.__kBitConversionDouble=new Float64Array(oe.__kBitConversionBuffer),oe.__kBitConversionInts=new Int32Array(oe.__kBitConversionBuffer),oe.__kBitConversionIntHigh=oe.__detectBigEndian()?0:1,oe.__kBitConversionIntLow=oe.__detectBigEndian()?1:0,oe.__clz30=t?function(N){return t(N)-2}:function(N){var H=Math.LN2,F=Math.log;return N===0?30:0|29-(0|F(N>>>0)/H)},oe.__imul=n||function(N,H){return 0|N*H},oe})});var T=Kd(xc(),1),Ht=T.default.BigInt(0),mi=T.default.BigInt(1),Es=T.default.BigInt(2),Gd=T.default.BigInt(10),Zd=T.default.BigInt(24),Jd=T.default.BigInt(60),Xd=T.default.BigInt(1e3),Pi=T.default.BigInt(1e6),si=T.default.BigInt(1e9),dl=T.default.multiply(T.default.BigInt(3600),si),Qd=T.default.multiply(Jd,si),Yn=T.default.multiply(dl,Zd);function gn(n){return typeof n=="bigint"?T.default.BigInt(n.toString(10)):n}function hl(n){return T.default.equal(T.default.remainder(n,Es),Ht)}function Zn(n){return T.default.lessThan(n,Ht)?T.default.unaryMinus(n):n}function po(n,t){return T.default.lessThan(n,t)?-1:T.default.greaterThan(n,t)?1:0}function Qr(n,t){return{quotient:T.default.divide(n,t),remainder:T.default.remainder(n,t)}}var Pc,Rc,se="slot-epochNanoSeconds",ce="slot-iso-date",Re="slot-iso-date-time",Ye="slot-time",B="slot-calendar",ml="slot-date-brand",fl="slot-year-month-brand",pl="slot-month-day-brand",Ee="slot-time-zone",lt="slot-years",ut="slot-months",St="slot-weeks",dt="slot-days",ht="slot-hours",mt="slot-minutes",ft="slot-seconds",pt="slot-milliseconds",gt="slot-microseconds",kt="slot-nanoseconds",gl="date",yl="ym",vl="md",wl="time",bl="datetime",Dl="instant",sr="original",vr="timezone-canonical",Oa="timezone-original",ei="calendar-id",El="locale",Fa="options",_l=new WeakMap,Ya=Symbol.for("@@Temporal__GetSlots");(Pc=globalThis)[Ya]||(Pc[Ya]=function(n){return _l.get(n)});var Po=globalThis[Ya],Ha=Symbol.for("@@Temporal__CreateSlots");(Rc=globalThis)[Ha]||(Rc[Ha]=function(n){_l.set(n,Object.create(null))});var Tn=globalThis[Ha];function Dt(n,...t){if(!n||typeof n!="object")return!1;let e=Po(n);return!!e&&t.every(r=>r in e)}function m(n,t){let e=Po(n)?.[t];if(e===void 0)throw new TypeError(`Missing internal slot ${t}`);return e}function me(n,t,e){let r=Po(n);if(r===void 0)throw new TypeError("Missing slots for the given container");if(r[t])throw new TypeError(`${t} already has set`);r[t]=e}var $a={};function Cn(n,t){Object.defineProperty(n.prototype,Symbol.toStringTag,{value:t,writable:!1,enumerable:!1,configurable:!0});let e=Object.getOwnPropertyNames(n);for(let i=0;i<e.length;i++){let o=e[i],a=Object.getOwnPropertyDescriptor(n,o);a.configurable&&a.enumerable&&(a.enumerable=!1,Object.defineProperty(n,o,a))}let r=Object.getOwnPropertyNames(n.prototype);for(let i=0;i<r.length;i++){let o=r[i],a=Object.getOwnPropertyDescriptor(n.prototype,o);a.configurable&&a.enumerable&&(a.enumerable=!1,Object.defineProperty(n.prototype,o,a))}Ba(t,n),Ba(`${t}.prototype`,n.prototype)}function Ba(n,t){let e=`%${n}%`;if($a[e]!==void 0)throw new Error(`intrinsic ${n} already exists`);$a[e]=t}function Je(n){return $a[n]}function br(n,t){let e=n;if(e===0)return{div:e,mod:e};let r=Math.sign(e);e=Math.abs(e);let i=Math.trunc(1+Math.log10(e));if(t>=i)return{div:0*r,mod:r*e};if(t===0)return{div:r*e,mod:0*r};let o=e.toPrecision(i);return{div:r*Number.parseInt(o.slice(0,i-t),10),mod:r*Number.parseInt(o.slice(i-t),10)}}function Pa(n,t,e){let r=n,i=e;if(r===0)return i;let o=Math.sign(r)||Math.sign(i);r=Math.abs(r),i=Math.abs(i);let a=r.toPrecision(Math.trunc(1+Math.log10(r)));if(i===0)return o*Number.parseInt(a+"0".repeat(t),10);let s=a+i.toPrecision(Math.trunc(1+Math.log10(i))).padStart(t,"0");return o*Number.parseInt(s,10)}function Ro(n,t){let e=t==="negative";switch(n){case"ceil":return e?"zero":"infinity";case"floor":return e?"infinity":"zero";case"expand":return"infinity";case"trunc":return"zero";case"halfCeil":return e?"half-zero":"half-infinity";case"halfFloor":return e?"half-infinity":"half-zero";case"halfExpand":return"half-infinity";case"halfTrunc":return"half-zero";case"halfEven":return"half-even"}}function Ao(n,t,e,r,i){return i==="zero"?n:i==="infinity"?t:e<0?n:e>0?t:i==="half-zero"?n:i==="half-infinity"?t:r?n:t}var ke=class n{constructor(t){this.totalNs=gn(t),this.sec=T.default.toNumber(T.default.divide(this.totalNs,si)),this.subsec=T.default.toNumber(T.default.remainder(this.totalNs,si))}static validateNew(t,e){if(T.default.greaterThan(Zn(t),n.MAX))throw new RangeError(`${e} of duration time units cannot exceed ${n.MAX} s`);return new n(t)}static fromEpochNsDiff(t,e){let r=T.default.subtract(gn(t),gn(e));return new n(r)}static fromComponents(t,e,r,i,o,a){let s=T.default.add(T.default.add(T.default.add(T.default.add(T.default.add(T.default.BigInt(a),T.default.multiply(T.default.BigInt(o),Xd)),T.default.multiply(T.default.BigInt(i),Pi)),T.default.multiply(T.default.BigInt(r),si)),T.default.multiply(T.default.BigInt(e),Qd)),T.default.multiply(T.default.BigInt(t),dl));return n.validateNew(s,"total")}abs(){return new n(Zn(this.totalNs))}add(t){return n.validateNew(T.default.add(this.totalNs,t.totalNs),"sum")}add24HourDays(t){return n.validateNew(T.default.add(this.totalNs,T.default.multiply(T.default.BigInt(t),Yn)),"sum")}addToEpochNs(t){return T.default.add(gn(t),this.totalNs)}cmp(t){return po(this.totalNs,t.totalNs)}divmod(t){let{quotient:e,remainder:r}=Qr(this.totalNs,T.default.BigInt(t));return{quotient:T.default.toNumber(e),remainder:new n(r)}}fdiv(t){let e=gn(t),r=T.default.BigInt(e),{quotient:i,remainder:o}=Qr(this.totalNs,r),a=[],s,u=(T.default.lessThan(this.totalNs,Ht)?-1:1)*Math.sign(T.default.toNumber(e));for(;!T.default.equal(o,Ht)&&a.length<50;)o=T.default.multiply(o,Gd),{quotient:s,remainder:o}=Qr(o,r),a.push(Math.abs(T.default.toNumber(s)));return u*+(Zn(i).toString()+"."+a.join(""))}isZero(){return T.default.equal(this.totalNs,Ht)}round(t,e){let r=gn(t);if(T.default.equal(r,mi))return this;let{quotient:i,remainder:o}=Qr(this.totalNs,r),a=T.default.lessThan(this.totalNs,Ht)?"negative":"positive",s=T.default.multiply(Zn(i),r),u=T.default.add(s,r),l=po(Zn(T.default.multiply(o,Es)),r),h=Ro(e,a),f=T.default.equal(Zn(this.totalNs),s)?s:Ao(s,u,l,hl(i),h),p=a==="positive"?f:T.default.unaryMinus(f);return n.validateNew(p,"rounding")}sign(){return this.cmp(new n(Ht))}subtract(t){return n.validateNew(T.default.subtract(this.totalNs,t.totalNs),"difference")}};ke.MAX=T.default.BigInt("9007199254740991999999999"),ke.ZERO=new ke(Ht);var Ac=/[A-Za-z._][A-Za-z._0-9+-]*/,Ri=new RegExp(`(?:${/(?:[+-](?:[01][0-9]|2[0-3])(?::?[0-5][0-9])?)/.source}|(?:${Ac.source})(?:\\/(?:${Ac.source}))*)`),Ml=/(?:[+-]\d{6}|\d{4})/,go=/(?:0[1-9]|1[0-2])/,ja=/(?:0[1-9]|[12]\d|3[01])/,eh=new RegExp(`(${Ml.source})(?:-(${go.source})-(${ja.source})|(${go.source})(${ja.source}))`),Sl=/(\d{2})(?::(\d{2})(?::(\d{2})(?:[.,](\d{1,9}))?)?|(\d{2})(?:(\d{2})(?:[.,](\d{1,9}))?)?)?/,kl=/((?:[+-])(?:[01][0-9]|2[0-3])(?::?(?:[0-5][0-9])(?::?(?:[0-5][0-9])(?:[.,](?:\d{1,9}))?)?)?)/,Tl=new RegExp(`([zZ])|${kl.source}?`),Mr=/\[(!)?([a-z_][a-z0-9_-]*)=([A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)\]/g,th=new RegExp([`^${eh.source}`,`(?:(?:[tT]|\\s+)${Sl.source}(?:${Tl.source})?)?`,`(?:\\[!?(${Ri.source})\\])?`,`((?:${Mr.source})*)$`].join("")),nh=new RegExp([`^[tT]?${Sl.source}`,`(?:${Tl.source})?`,`(?:\\[!?${Ri.source}\\])?`,`((?:${Mr.source})*)$`].join("")),rh=new RegExp(`^(${Ml.source})-?(${go.source})(?:\\[!?${Ri.source}\\])?((?:${Mr.source})*)$`),ih=new RegExp(`^(?:--)?(${go.source})-?(${ja.source})(?:\\[!?${Ri.source}\\])?((?:${Mr.source})*)$`),Ra=/(\d+)(?:[.,](\d{1,9}))?/,oh=new RegExp(`(?:${Ra.source}H)?(?:${Ra.source}M)?(?:${Ra.source}S)?`),ah=new RegExp(`^([+-])?P${/(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/.source}(?:T(?!$)${oh.source})?$`,"i"),Hn=864e5,yo=1e6*Hn,sh=6e10,Cl=1e8*Hn,Sr=Qt(Cl),fi=T.default.unaryMinus(Sr),ch=T.default.add(T.default.subtract(fi,Yn),mi),lh=T.default.subtract(T.default.add(Sr,Yn),mi),uh=146097*Hn,Lc=-271821,Nc=275760,ci=Date.UTC(1847,0,1),dh=["iso8601","hebrew","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","islamicc","persian","ethiopic","ethioaa","ethiopic-amete-alem","coptic","chinese","dangi","roc","indian","buddhist","japanese","gregory"],hh=new Set(["ACT","AET","AGT","ART","AST","BET","BST","CAT","CNT","CST","CTT","EAT","ECT","IET","IST","JST","MIT","NET","NST","PLT","PNT","PRT","PST","SST","VST"]);function He(n){return typeof n=="object"&&n!==null||typeof n=="function"}function Lo(n){if(typeof n=="bigint")throw new TypeError("Cannot convert BigInt to number");return Number(n)}function No(n){if(typeof n=="symbol")throw new TypeError("Cannot convert a Symbol value to a String");return String(n)}function ue(n){let t=Lo(n);if(t===0)return 0;if(Number.isNaN(t)||t===1/0||t===-1/0)throw new RangeError("invalid number value");let e=Math.trunc(t);return e===0?0:e}function Oc(n,t){let e=ue(n);if(e<=0)throw t!==void 0?new RangeError(`property '${t}' cannot be a a number less than one`):new RangeError("Cannot convert a number less than one to a positive integer");return e}function Jt(n){let t=Lo(n);if(Number.isNaN(t))throw new RangeError("not a number");if(t===1/0||t===-1/0)throw new RangeError("infinity is out of range");if(!function(e){if(typeof e!="number"||Number.isNaN(e)||e===1/0||e===-1/0)return!1;let r=Math.abs(e);return Math.floor(r)===r}(t))throw new RangeError(`unsupported fractional value ${n}`);return t===0?0:t}function pi(n,t){return String(n).padStart(t,"0")}function Ue(n){if(typeof n!="string")throw new TypeError(`expected a string, not ${String(n)}`);return n}function za(n,t){if(He(n)){let e=n?.toString();if(typeof e=="string"||typeof e=="number")return e;throw new TypeError("Cannot convert object to primitive value")}return n}var Ua=["era","eraYear","year","month","monthCode","day","hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],mh={era:No,eraYear:ue,year:ue,month:Oc,monthCode:function(n){let t=Ue(za(n));if(t.length<3||t.length>4||t[0]!=="M"||"0123456789".indexOf(t[1])===-1||"0123456789".indexOf(t[2])===-1||t[1]+t[2]==="00"&&t[3]!=="L"||t[3]!=="L"&&t[3]!==void 0)throw new RangeError(`bad month code ${t}; must match M01-M99 or M00L-M99L`);return t},day:Oc,hour:ue,minute:ue,second:ue,millisecond:ue,microsecond:ue,nanosecond:ue,offset:function(n){let t=Ue(za(n));return Lr(t),t},timeZone:wt},fh={hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},kr=[["years","year","date"],["months","month","date"],["weeks","week","date"],["days","day","date"],["hours","hour","time"],["minutes","minute","time"],["seconds","second","time"],["milliseconds","millisecond","time"],["microseconds","microsecond","time"],["nanoseconds","nanosecond","time"]],Fc=Object.fromEntries(kr.map(n=>[n[0],n[1]])),ph=Object.fromEntries(kr.map(([n,t])=>[t,n])),li=kr.map(([,n])=>n),Tr={day:yo,hour:36e11,minute:6e10,second:1e9,millisecond:1e6,microsecond:1e3,nanosecond:1},vo=["days","hours","microseconds","milliseconds","minutes","months","nanoseconds","seconds","weeks","years"],gh=Intl.DateTimeFormat,Yc=new Map;function Il(n){let t=bi(n),e=Yc.get(t);return e===void 0&&(e=new gh("en-us",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),Yc.set(t,e)),e}function Ke(n){return Dt(n,se)&&!Dt(n,Ee,B)}function Oe(n){return Dt(n,lt,ut,dt,ht,mt,ft,pt,gt,kt)}function Fe(n){return Dt(n,ml)}function $e(n){return Dt(n,Ye)}function xe(n){return Dt(n,Re)}function Ge(n){return Dt(n,fl)}function Yt(n){return Dt(n,pl)}function fe(n){return Dt(n,se,Ee,B)}function x(n,t){if(!t(n))throw new TypeError("invalid receiver: method called with the wrong type of this-object")}function Pr(n){if(Dt(n,B)||Dt(n,Ee))throw new TypeError("with() does not support a calendar or timeZone property");if($e(n))throw new TypeError("with() does not accept Temporal.PlainTime, use withPlainTime() instead");if(n.calendar!==void 0)throw new TypeError("with() does not support a calendar property");if(n.timeZone!==void 0)throw new TypeError("with() does not support a timeZone property")}function Ai(n,t){return t==="never"||t==="auto"&&n==="iso8601"?"":`[${t==="critical"?"!":""}u-ca=${n}]`}function Oo(n){let t,e,r=!1;for(Mr.lastIndex=0;e=Mr.exec(n);){let{1:i,2:o,3:a}=e;if(o==="u-ca"){if(t===void 0)t=a,r=i==="!";else if(i==="!"||r)throw new RangeError(`Invalid annotations in ${n}: more than one u-ca present with critical flag`)}else if(i==="!")throw new RangeError(`Unrecognized annotation: !${o}=${a}`)}return t}function mn(n){let t=th.exec(n);if(!t)throw new RangeError(`invalid RFC 9557 string: ${n}`);let e=Oo(t[16]),r=t[1];if(r==="-000000")throw new RangeError(`invalid RFC 9557 string: ${n}`);let i=+r,o=+(t[2]??t[4]??1),a=+(t[3]??t[5]??1),s=t[6]!==void 0,u=+(t[6]??0),l=+(t[7]??t[10]??0),h=+(t[8]??t[11]??0);h===60&&(h=59);let f=(t[9]??t[12]??"")+"000000000",p=+f.slice(0,3),E=+f.slice(3,6),S=+f.slice(6,9),k,R=!1;t[13]?(k=void 0,R=!0):t[14]&&(k=t[14]);let $=t[15];return Cs(i,o,a,u,l,h,p,E,S),{year:i,month:o,day:a,time:s?{hour:u,minute:l,second:h,millisecond:p,microsecond:E,nanosecond:S}:"start-of-day",tzAnnotation:$,offset:k,z:R,calendar:e}}function xl(n){let t=nh.exec(n),e,r,i,o,a,s,u;if(t){u=Oo(t[10]),e=+(t[1]??0),r=+(t[2]??t[5]??0),i=+(t[3]??t[6]??0),i===60&&(i=59);let l=(t[4]??t[7]??"")+"000000000";if(o=+l.slice(0,3),a=+l.slice(3,6),s=+l.slice(6,9),t[8])throw new RangeError("Z designator not supported for PlainTime")}else{let l,h;if({time:l,z:h,calendar:u}=mn(n),l==="start-of-day")throw new RangeError(`time is missing in string: ${n}`);if(h)throw new RangeError("Z designator not supported for PlainTime");({hour:e,minute:r,second:i,millisecond:o,microsecond:a,nanosecond:s}=l)}if($o(e,r,i,o,a,s),/[tT ][0-9][0-9]/.test(n))return{hour:e,minute:r,second:i,millisecond:o,microsecond:a,nanosecond:s,calendar:u};try{let{month:l,day:h}=Ms(n);tr(1972,l,h)}catch{try{let{year:l,month:h}=_s(n);tr(l,h,1)}catch{return{hour:e,minute:r,second:i,millisecond:o,microsecond:a,nanosecond:s,calendar:u}}}throw new RangeError(`invalid RFC 9557 time-only string ${n}; may need a T prefix`)}function _s(n){let t=rh.exec(n),e,r,i,o;if(t){i=Oo(t[3]);let a=t[1];if(a==="-000000")throw new RangeError(`invalid RFC 9557 string: ${n}`);if(e=+a,r=+t[2],o=1,i!==void 0&&i!=="iso8601")throw new RangeError("YYYY-MM format is only valid with iso8601 calendar")}else{let a;if({year:e,month:r,calendar:i,day:o,z:a}=mn(n),a)throw new RangeError("Z designator not supported for PlainYearMonth")}return{year:e,month:r,calendar:i,referenceISODay:o}}function Ms(n){let t=ih.exec(n),e,r,i,o;if(t){if(i=Oo(t[3]),e=+t[1],r=+t[2],i!==void 0&&i!=="iso8601")throw new RangeError("MM-DD format is only valid with iso8601 calendar")}else{let a;if({month:e,day:r,calendar:i,year:o,z:a}=mn(n),a)throw new RangeError("Z designator not supported for PlainMonthDay")}return{month:e,day:r,calendar:i,referenceISOYear:o}}var Pl=new RegExp(`^${Ri.source}$`,"i"),Rl=new RegExp(`^${/([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])?)?/.source}$`);function Al(n){let t=vh.test(n)?"Seconds not allowed in offset time zone":"Invalid time zone";throw new RangeError(`${t}: ${n}`)}function Fn(n){return Pl.test(n)||Al(n),Rl.test(n)?{offsetMinutes:Lr(n)/6e10}:{tzName:n}}function ui(n,t,e,r){let i=n,o=t,a=e;switch(r){case"reject":tr(i,o,a);break;case"constrain":({year:i,month:o,day:a}=Zl(i,o,a))}return{year:i,month:o,day:a}}function Fo(n,t,e,r,i,o,a){let s=n,u=t,l=e,h=r,f=i,p=o;switch(a){case"reject":$o(s,u,l,h,f,p);break;case"constrain":s=yt(s,0,23),u=yt(u,0,59),l=yt(l,0,59),h=yt(h,0,999),f=yt(f,0,999),p=yt(p,0,999)}return{hour:s,minute:u,second:l,millisecond:h,microsecond:f,nanosecond:p}}function Ll(n){if(!He(n))throw new TypeError("invalid duration-like");let t={years:void 0,months:void 0,weeks:void 0,days:void 0,hours:void 0,minutes:void 0,seconds:void 0,milliseconds:void 0,microseconds:void 0,nanoseconds:void 0},e=!1;for(let r=0;r<vo.length;r++){let i=vo[r],o=n[i];o!==void 0&&(e=!0,t[i]=Jt(o))}if(!e)throw new TypeError("invalid duration-like");return t}function tt({years:n,months:t,weeks:e,days:r},i,o,a){return{years:n,months:a??t,weeks:o??e,days:i??r}}function be(n,t){return{isoDate:n,time:t}}function ve(n){return _n(n,"overflow",["constrain","reject"],"constrain")}function di(n){return _n(n,"disambiguation",["compatible","earlier","later","reject"],"compatible")}function en(n,t){return _n(n,"roundingMode",["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"],t)}function fo(n,t){return _n(n,"offset",["prefer","use","ignore","reject"],t)}function Li(n){return _n(n,"calendarName",["auto","always","never","critical"],"auto")}function Rr(n){let t=n.roundingIncrement;if(t===void 0)return 1;let e=ue(t);if(e<1||e>1e9)throw new RangeError(`roundingIncrement must be at least 1 and at most 1e9, not ${t}`);return e}function Ar(n,t,e){let r=e?t:t-1;if(n>r)throw new RangeError(`roundingIncrement must be at least 1 and less than ${r}, not ${n}`);if(t%n!=0)throw new RangeError(`Rounding increment must divide evenly into ${t}`)}function Ni(n){let t=n.fractionalSecondDigits;if(t===void 0)return"auto";if(typeof t!="number"){if(No(t)!=="auto")throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${t}`);return"auto"}let e=Math.floor(t);if(!Number.isFinite(e)||e<0||e>9)throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${t}`);return e}function Oi(n,t){switch(n){case"minute":return{precision:"minute",unit:"minute",increment:1};case"second":return{precision:0,unit:"second",increment:1};case"millisecond":return{precision:3,unit:"millisecond",increment:1};case"microsecond":return{precision:6,unit:"microsecond",increment:1};case"nanosecond":return{precision:9,unit:"nanosecond",increment:1}}switch(t){case"auto":return{precision:t,unit:"nanosecond",increment:1};case 0:return{precision:t,unit:"second",increment:1};case 1:case 2:case 3:return{precision:t,unit:"millisecond",increment:10**(3-t)};case 4:case 5:case 6:return{precision:t,unit:"microsecond",increment:10**(6-t)};case 7:case 8:case 9:return{precision:t,unit:"nanosecond",increment:10**(9-t)};default:throw new RangeError(`fractionalSecondDigits must be 'auto' or 0 through 9, not ${t}`)}}var Sn=Symbol("~required~");function Ct(n,t,e,r,i=[]){let o=[];for(let l=0;l<kr.length;l++){let h=kr[l],f=h[1],p=h[2];e!=="datetime"&&e!==p||o.push(f)}o=o.concat(i);let a=r;a===Sn?a=void 0:a!==void 0&&o.push(a);let s=[];s=s.concat(o);for(let l=0;l<o.length;l++){let h=o[l],f=ph[h];f!==void 0&&s.push(f)}let u=_n(n,t,s,a);if(u===void 0&&r===Sn)throw new RangeError(`${t} is required`);return u&&u in Fc?Fc[u]:u}function Aa(n){let t=n.relativeTo;if(t===void 0)return{};let e,r,i,o,a,s="option",u=!1;if(He(t)){if(fe(t))return{zonedRelativeTo:t};if(Fe(t))return{plainRelativeTo:t};if(xe(t))return{plainRelativeTo:vt(m(t,Re).isoDate,m(t,B))};i=Bi(t);let l=zt(i,t,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],[]);({isoDate:e,time:r}=Yi(i,l,"constrain")),{offset:a,timeZone:o}=l,a===void 0&&(s="wall")}else{let l,h,f,p,E;if({year:f,month:p,day:E,time:r,calendar:i,tzAnnotation:l,offset:a,z:h}=mn(Ue(t)),l)o=wt(l),h?s="exact":a||(s="wall"),u=!0;else if(h)throw new RangeError("Z designator not supported for PlainDate relativeTo; either remove the Z or add a bracketed time zone");i||(i="iso8601"),i=Et(i),e={year:f,month:p,day:E}}return o===void 0?{plainRelativeTo:vt(e,i)}:{zonedRelativeTo:et(wo(e,r,s,s==="option"?Lr(a):0,o,"compatible","reject",u),o,i)}}function yn(n){return m(n,lt)!==0?"year":m(n,ut)!==0?"month":m(n,St)!==0?"week":m(n,dt)!==0?"day":m(n,ht)!==0?"hour":m(n,mt)!==0?"minute":m(n,ft)!==0?"second":m(n,pt)!==0?"millisecond":m(n,gt)!==0?"microsecond":"nanosecond"}function Dn(n,t){return li.indexOf(n)>li.indexOf(t)?t:n}function an(n){return n==="year"||n==="month"||n==="week"}function vn(n){return an(n)||n==="day"?"date":"time"}function jn(n){return Je("%calendarImpl%")(n)}function Fi(n){return Je("%calendarImpl%")(m(n,B))}function bt(n,t,e="date"){let r=Object.create(null),i=jn(n).isoToDate(t,{year:!0,monthCode:!0,day:!0});return r.monthCode=i.monthCode,e!=="month-day"&&e!=="date"||(r.day=i.day),e!=="year-month"&&e!=="date"||(r.year=i.year),r}function zt(n,t,e,r,i){let o=jn(n).extraFields(e),a=e.concat(r,o),s=Object.create(null),u=!1;a.sort();for(let l=0;l<a.length;l++){let h=a[l],f=t[h];if(f!==void 0)u=!0,s[h]=(0,mh[h])(f);else if(i!=="partial"){if(i.includes(h))throw new TypeError(`required property '${h}' missing or undefined`);s[h]=fh[h]}}if(i==="partial"&&!u)throw new TypeError("no supported properties found");return s}function Va(n,t="complete"){let e=["hour","microsecond","millisecond","minute","nanosecond","second"],r=!1,i=Object.create(null);for(let o=0;o<e.length;o++){let a=e[o],s=n[a];s!==void 0?(i[a]=ue(s),r=!0):t==="complete"&&(i[a]=0)}if(!r)throw new TypeError("invalid time-like");return i}function ti(n,t){if(He(n)){if(Fe(n))return ve(te(t)),vt(m(n,ce),m(n,B));if(fe(n)){let u=Gt(m(n,Ee),m(n,se));return ve(te(t)),vt(u.isoDate,m(n,B))}if(xe(n))return ve(te(t)),vt(m(n,Re).isoDate,m(n,B));let s=Bi(n);return vt($n(s,zt(s,n,["year","month","monthCode","day"],[],[]),ve(te(t))),s)}let{year:e,month:r,day:i,calendar:o,z:a}=mn(Ue(n));if(a)throw new RangeError("Z designator not supported for PlainDate");return o||(o="iso8601"),o=Et(o),ve(te(t)),vt({year:e,month:r,day:i},o)}function Yi(n,t,e){return be($n(n,t,e),Fo(t.hour,t.minute,t.second,t.millisecond,t.microsecond,t.nanosecond,e))}function ni(n,t){let e,r,i;if(He(n)){if(xe(n))return ve(te(t)),qt(m(n,Re),m(n,B));if(fe(n)){let s=Gt(m(n,Ee),m(n,se));return ve(te(t)),qt(s,m(n,B))}if(Fe(n))return ve(te(t)),qt(be(m(n,ce),{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),m(n,B));i=Bi(n);let o=zt(i,n,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond"],[]),a=ve(te(t));({isoDate:e,time:r}=Yi(i,o,a))}else{let o,a,s,u;if({year:a,month:s,day:u,time:r,calendar:i,z:o}=mn(Ue(n)),o)throw new RangeError("Z designator not supported for PlainDateTime");r==="start-of-day"&&(r={deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),Cs(a,s,u,r.hour,r.minute,r.second,r.millisecond,r.microsecond,r.nanosecond),i||(i="iso8601"),i=Et(i),ve(te(t)),e={year:a,month:s,day:u}}return qt(be(e,r),i)}function Kt(n){let t=Je("%Temporal.Duration%");if(Oe(n))return new t(m(n,lt),m(n,ut),m(n,St),m(n,dt),m(n,ht),m(n,mt),m(n,ft),m(n,pt),m(n,gt),m(n,kt));if(!He(n))return function(i){let{years:o,months:a,weeks:s,days:u,hours:l,minutes:h,seconds:f,milliseconds:p,microseconds:E,nanoseconds:S}=function(k){let R=ah.exec(k);if(!R)throw new RangeError(`invalid duration: ${k}`);if(R.every((v,D)=>D<2||v===void 0))throw new RangeError(`invalid duration: ${k}`);let $=R[1]==="-"?-1:1,V=R[2]===void 0?0:ue(R[2])*$,q=R[3]===void 0?0:ue(R[3])*$,U=R[4]===void 0?0:ue(R[4])*$,Z=R[5]===void 0?0:ue(R[5])*$,re=R[6]===void 0?0:ue(R[6])*$,Te=R[7],Me=R[8],oe=R[9],N=R[10],H=R[11],F=0,ne=0,y=0;if(Te!==void 0){if(Me??oe??N??H)throw new RangeError("only the smallest unit can be fractional");y=3600*ue((Te+"000000000").slice(0,9))*$}else if(F=Me===void 0?0:ue(Me)*$,oe!==void 0){if(N??H)throw new RangeError("only the smallest unit can be fractional");y=60*ue((oe+"000000000").slice(0,9))*$}else ne=N===void 0?0:ue(N)*$,H!==void 0&&(y=ue((H+"000000000").slice(0,9))*$);let L=y%1e3,c=Math.trunc(y/1e3)%1e3,d=Math.trunc(y/1e6)%1e3;return ne+=Math.trunc(y/1e9)%60,F+=Math.trunc(y/6e10),Bo(V,q,U,Z,re,F,ne,d,c,L),{years:V,months:q,weeks:U,days:Z,hours:re,minutes:F,seconds:ne,milliseconds:d,microseconds:c,nanoseconds:L}}(i);return new(Je("%Temporal.Duration%"))(o,a,s,u,l,h,f,p,E,S)}(Ue(n));let e={years:0,months:0,weeks:0,days:0,hours:0,minutes:0,seconds:0,milliseconds:0,microseconds:0,nanoseconds:0},r=Ll(n);for(let i=0;i<vo.length;i++){let o=vo[i],a=r[o];a!==void 0&&(e[o]=a)}return new t(e.years,e.months,e.weeks,e.days,e.hours,e.minutes,e.seconds,e.milliseconds,e.microseconds,e.nanoseconds)}function ri(n){let t;if(He(n)){if(Ke(n)||fe(n))return Xt(m(n,se));t=za(n)}else t=n;let{year:e,month:r,day:i,time:o,offset:a,z:s}=function(k){let R=mn(k);if(!R.z&&!R.offset)throw new RangeError("Temporal.Instant requires a time zone offset");return R}(Ue(t)),{hour:u=0,minute:l=0,second:h=0,millisecond:f=0,microsecond:p=0,nanosecond:E=0}=o==="start-of-day"?{}:o,S=wi(e,r,i,u,l,h,f,p,E-(s?0:Lr(a)));return _r(S.isoDate),Xt(Ze(S))}function Hc(n,t){if(He(n)){if(Yt(n))return ve(te(t)),Dr(m(n,ce),m(n,B));let s;return Dt(n,B)?s=m(n,B):(s=n.calendar,s===void 0&&(s="iso8601"),s=$i(s)),Dr(bo(s,zt(s,n,["year","month","monthCode","day"],[],[]),ve(te(t))),s)}let{month:e,day:r,referenceISOYear:i,calendar:o}=Ms(Ue(n));if(o===void 0&&(o="iso8601"),o=Et(o),ve(te(t)),o==="iso8601")return Dr({year:1972,month:e,day:r},o);let a={year:i,month:e,day:r};return cr(a),a=bo(o,bt(o,a,"month-day"),"constrain"),Dr(a,o)}function Nn(n,t){let e;if(He(n)){if($e(n))return ve(te(t)),wn(m(n,Ye));if(xe(n))return ve(te(t)),wn(m(n,Re).time);if(fe(n)){let l=Gt(m(n,Ee),m(n,se));return ve(te(t)),wn(l.time)}let{hour:r,minute:i,second:o,millisecond:a,microsecond:s,nanosecond:u}=Va(n);e=Fo(r,i,o,a,s,u,ve(te(t)))}else e=xl(Ue(n)),ve(te(t));return wn(e)}function Nl(n){return n===void 0?{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}:m(Nn(n),Ye)}function ii(n,t){if(He(n)){if(Ge(n))return ve(te(t)),Er(m(n,ce),m(n,B));let s=Bi(n);return Er(gi(s,zt(s,n,["year","month","monthCode"],[],[]),ve(te(t))),s)}let{year:e,month:r,referenceISODay:i,calendar:o}=_s(Ue(n));o===void 0&&(o="iso8601"),o=Et(o),ve(te(t));let a={year:e,month:r,day:i};return Is(a),a=gi(o,bt(o,a,"year-month"),"constrain"),Er(a,o)}function wo(n,t,e,r,i,o,a,s){if(t==="start-of-day")return An(i,n);let u=be(n,t);if(e==="wall"||a==="ignore")return nt(i,u,o);if(e==="exact"||a==="use"){let f=wi(n.year,n.month,n.day,t.hour,t.minute,t.second,t.millisecond,t.microsecond,t.nanosecond-r);_r(f.isoDate);let p=Ze(f);return dn(p),p}_r(n);let l=Ze(u),h=yi(i,u);for(let f=0;f<h.length;f++){let p=h[f],E=T.default.toNumber(T.default.subtract(l,p)),S=On(E,6e10,"halfExpand");if(E===r||s&&S===r)return p}if(a==="reject"){let f=qa(r),p=vi(u,"iso8601","auto");throw new RangeError(`Offset ${f} is invalid for ${p} in ${i}`)}return Ul(h,i,u,o)}function oi(n,t){let e,r,i,o,a,s,u,l=!1,h="option";if(He(n)){if(fe(n)){let k=te(t);return di(k),fo(k,"reject"),ve(k),et(m(n,se),m(n,Ee),m(n,B))}a=Bi(n);let p=zt(a,n,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset","timeZone"],["timeZone"]);({offset:o,timeZone:i}=p),o===void 0&&(h="wall");let E=te(t);s=di(E),u=fo(E,"reject");let S=ve(E);({isoDate:e,time:r}=Yi(a,p,S))}else{let p,E,S,k,R;({year:S,month:k,day:R,time:r,tzAnnotation:p,offset:o,z:E,calendar:a}=function(V){let q=mn(V);if(!q.tzAnnotation)throw new RangeError("Temporal.ZonedDateTime requires a time zone ID in brackets");return q}(Ue(n))),i=wt(p),E?h="exact":o||(h="wall"),a||(a="iso8601"),a=Et(a),l=!0;let $=te(t);s=di($),u=fo($,"reject"),ve($),e={year:S,month:k,day:R}}let f=0;return h==="option"&&(f=Lr(o)),et(wo(e,r,h,f,i,s,u,l),i,a)}function Ol(n,t,e){cr(t),Tn(n),me(n,ce,t),me(n,B,e),me(n,ml,!0)}function vt(n,t){let e=Je("%Temporal.PlainDate%"),r=Object.create(e.prototype);return Ol(r,n,t),r}function Fl(n,t,e){nr(t),Tn(n),me(n,Re,t),me(n,B,e)}function qt(n,t){let e=Je("%Temporal.PlainDateTime%"),r=Object.create(e.prototype);return Fl(r,n,t),r}function Yl(n,t,e){cr(t),Tn(n),me(n,ce,t),me(n,B,e),me(n,pl,!0)}function Dr(n,t){let e=Je("%Temporal.PlainMonthDay%"),r=Object.create(e.prototype);return Yl(r,n,t),r}function Hl(n,t){Tn(n),me(n,Ye,t)}function wn(n){let t=Je("%Temporal.PlainTime%"),e=Object.create(t.prototype);return Hl(e,n),e}function $l(n,t,e){Is(t),Tn(n),me(n,ce,t),me(n,B,e),me(n,fl,!0)}function Er(n,t){let e=Je("%Temporal.PlainYearMonth%"),r=Object.create(e.prototype);return $l(r,n,t),r}function Bl(n,t){dn(t),Tn(n),me(n,se,t)}function Xt(n){let t=Je("%Temporal.Instant%"),e=Object.create(t.prototype);return Bl(e,n),e}function jl(n,t,e,r){dn(t),Tn(n),me(n,se,t),me(n,Ee,e),me(n,B,r)}function et(n,t,e="iso8601"){let r=Je("%Temporal.ZonedDateTime%"),i=Object.create(r.prototype);return jl(i,n,t,e),i}function $c(n){return Ua.filter(t=>n[t]!==void 0)}function er(n,t,e){let r=$c(e),i=jn(n).fieldKeysToIgnore(r),o=Object.create(null),a=$c(t);for(let s=0;s<Ua.length;s++){let u,l=Ua[s];a.includes(l)&&!i.includes(l)&&(u=t[l]),r.includes(l)&&(u=e[l]),u!==void 0&&(o[l]=u)}return o}function Bt(n,t,e,r){let i=jn(n).dateAdd(t,e,r);return cr(i),i}function Hi(n,t,e,r){return jn(n).dateUntil(t,e,r)}function $i(n){if(He(n)&&Dt(n,B))return m(n,B);let t=Ue(n);try{return Et(t)}catch{}let e;try{({calendar:e}=mn(t))}catch{try{({calendar:e}=xl(t))}catch{try{({calendar:e}=_s(t))}catch{({calendar:e}=Ms(t))}}}return e||(e="iso8601"),Et(e)}function Bi(n){if(Dt(n,B))return m(n,B);let{calendar:t}=n;return t===void 0?"iso8601":$i(t)}function un(n,t){return Et(n)===Et(t)}function $n(n,t,e){let r=jn(n);r.resolveFields(t,"date");let i=r.dateToISO(t,e);return cr(i),i}function gi(n,t,e){let r=jn(n);r.resolveFields(t,"year-month"),t.day=1;let i=r.dateToISO(t,e);return Is(i),i}function bo(n,t,e){let r=jn(n);r.resolveFields(t,"month-day");let i=r.monthDayToISOReferenceDate(t,e);return cr(i),i}function wt(n){if(He(n)&&fe(n))return m(n,Ee);let t=Ue(n);if(t==="UTC")return"UTC";let{tzName:e,offsetMinutes:r}=function(o){let{tzAnnotation:a,offset:s,z:u}=function(l){if(Pl.test(l))return{tzAnnotation:l,offset:void 0,z:!1};try{let{tzAnnotation:h,offset:f,z:p}=mn(l);if(p||h||f)return{tzAnnotation:h,offset:f,z:p}}catch{}Al(l)}(o);return a?Fn(a):u?Fn("UTC"):s?Fn(s):void 0}(t);if(r!==void 0)return Ss(r);let i=Do(e);if(!i)throw new RangeError(`Unrecognized time zone ${e}`);return i.identifier}function zl(n,t){if(n===t)return!0;let e=Fn(n).offsetMinutes,r=Fn(t).offsetMinutes;if(e===void 0&&r===void 0){let i=Do(t);if(!i)return!1;let o=Do(n);return!!o&&o.primaryIdentifier===i.primaryIdentifier}return e===r}function bn(n,t){let e=Fn(n).offsetMinutes;return e!==void 0?6e10*e:Wa(n,t)}function qa(n){let t=n<0?"-":"+",e=Math.abs(n),r=Math.floor(e/36e11),i=Math.floor(e/6e10)%60,o=Math.floor(e/1e9)%60,a=e%1e9;return`${t}${Yo(r,i,o,a,o===0&&a===0?"minute":"auto")}`}function Gt(n,t){let e=bn(n,t),{isoDate:{year:r,month:i,day:o},time:{hour:a,minute:s,second:u,millisecond:l,microsecond:h,nanosecond:f}}=Wl(t);return wi(r,i,o,a,s,u,l,h,f+e)}function nt(n,t,e){return Ul(yi(n,t),n,t,e)}function Ul(n,t,e,r){let i=n.length;if(i===1)return n[0];if(i)switch(r){case"compatible":case"earlier":return n[0];case"later":return n[i-1];case"reject":throw new RangeError("multiple instants found")}if(r==="reject")throw new RangeError("multiple instants found");let o=Ze(e),a=T.default.subtract(o,Yn);dn(a);let s=bn(t,a),u=T.default.add(o,Yn);dn(u);let l=bn(t,u)-s;switch(r){case"earlier":{let h=ke.fromComponents(0,0,0,0,0,-l),f=Cr(e.time,h);return yi(t,be(It(e.isoDate.year,e.isoDate.month,e.isoDate.day+f.deltaDays),f))[0]}case"compatible":case"later":{let h=ke.fromComponents(0,0,0,0,0,l),f=Cr(e.time,h),p=yi(t,be(It(e.isoDate.year,e.isoDate.month,e.isoDate.day+f.deltaDays),f));return p[p.length-1]}}}function yi(n,t){if(n==="UTC")return _r(t.isoDate),[Ze(t)];let e=Fn(n).offsetMinutes;if(e!==void 0){let r=wi(t.isoDate.year,t.isoDate.month,t.isoDate.day,t.time.hour,t.time.minute-e,t.time.second,t.time.millisecond,t.time.microsecond,t.time.nanosecond);_r(r.isoDate);let i=Ze(r);return dn(i),[i]}return _r(t.isoDate),function(r,i){let o=Ze(i),a=T.default.subtract(o,Yn);T.default.lessThan(a,fi)&&(a=o);let s=T.default.add(o,Yn);T.default.greaterThan(s,Sr)&&(s=o);let u=Wa(r,a),l=Wa(r,s);return(u===l?[u]:[u,l]).map(f=>{let p=T.default.subtract(o,T.default.BigInt(f)),E=function(S,k){let{epochMilliseconds:R,time:{millisecond:$,microsecond:V,nanosecond:q}}=Wl(k),{year:U,month:Z,day:re,hour:Te,minute:Me,second:oe}=Kl(S,R);return wi(U,Z,re,Te,Me,oe,$,V,q)}(r,p);if(Ir(i,E)===0)return dn(p),p}).filter(f=>f!==void 0)}(n,t)}function An(n,t){let e=be(t,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),r=yi(n,e);if(r.length)return r[0];let i=Ze(e),o=T.default.subtract(i,Yn);return dn(o),Ts(n,o)}function ji(n){let t;return t=n<0||n>9999?(n<0?"-":"+")+pi(Math.abs(n),6):pi(n,4),t}function jt(n){return pi(n,2)}function Vl(n,t){let e;if(t==="auto"){if(n===0)return"";e=pi(n,9).replace(/0+$/,"")}else{if(t===0)return"";e=pi(n,9).slice(0,t)}return`.${e}`}function Yo(n,t,e,r,i){let o=`${jt(n)}:${jt(t)}`;return i==="minute"||(o+=`:${jt(e)}`,o+=Vl(r,i)),o}function Bc(n,t,e){let r=t;r===void 0&&(r="UTC");let i=m(n,se),o=vi(Gt(r,i),"iso8601",e,"never"),a="Z";return t!==void 0&&(a=ql(bn(r,i))),`${o}${a}`}function mo(n,t){let e=m(n,lt),r=m(n,ut),i=m(n,St),o=m(n,dt),a=m(n,ht),s=m(n,mt),u=_o(n),l="";e!==0&&(l+=`${Math.abs(e)}Y`),r!==0&&(l+=`${Math.abs(r)}M`),i!==0&&(l+=`${Math.abs(i)}W`),o!==0&&(l+=`${Math.abs(o)}D`);let h="";a!==0&&(h+=`${Math.abs(a)}H`),s!==0&&(h+=`${Math.abs(s)}M`);let f=ke.fromComponents(0,0,m(n,ft),m(n,pt),m(n,gt),m(n,kt));f.isZero()&&!["second","millisecond","microsecond","nanosecond"].includes(yn(n))&&t==="auto"||(h+=`${Math.abs(f.sec)}${Vl(Math.abs(f.subsec),t)}S`);let p=`${u<0?"-":""}P${l}`;return h&&(p=`${p}T${h}`),p}function jc(n,t="auto"){let{year:e,month:r,day:i}=m(n,ce);return`${ji(e)}-${jt(r)}-${jt(i)}${Ai(m(n,B),t)}`}function zc({hour:n,minute:t,second:e,millisecond:r,microsecond:i,nanosecond:o},a){return Yo(n,t,e,1e6*r+1e3*i+o,a)}function vi(n,t,e,r="auto"){let{isoDate:{year:i,month:o,day:a},time:{hour:s,minute:u,second:l,millisecond:h,microsecond:f,nanosecond:p}}=n;return`${ji(i)}-${jt(o)}-${jt(a)}T${Yo(s,u,l,1e6*h+1e3*f+p,e)}${Ai(t,r)}`}function Uc(n,t="auto"){let{year:e,month:r,day:i}=m(n,ce),o=`${jt(r)}-${jt(i)}`,a=m(n,B);t!=="always"&&t!=="critical"&&a==="iso8601"||(o=`${ji(e)}-${o}`);let s=Ai(a,t);return s&&(o+=s),o}function Vc(n,t="auto"){let{year:e,month:r,day:i}=m(n,ce),o=`${ji(e)}-${jt(r)}`,a=m(n,B);t!=="always"&&t!=="critical"&&a==="iso8601"||(o+=`-${jt(i)}`);let s=Ai(a,t);return s&&(o+=s),o}function qc(n,t,e="auto",r="auto",i="auto",o=void 0){let a=m(n,se);if(o){let{unit:h,increment:f,roundingMode:p}=o;a=Ja(a,f,h,p)}let s=m(n,Ee),u=bn(s,a),l=vi(Gt(s,a),"iso8601",t,"never");return i!=="never"&&(l+=ql(u)),r!=="never"&&(l+=`[${r==="critical"?"!":""}${s}]`),l+=Ai(m(n,B),e),l}function Wc(n){return Rl.test(n)}function Lr(n){let t=wh.exec(n);if(!t)throw new RangeError(`invalid time zone offset: ${n}; must match \xB1HH:MM[:SS.SSSSSSSSS]`);return(t[1]==="-"?-1:1)*(1e9*(60*(60*+t[2]+ +(t[3]||0))+ +(t[4]||0))+ +((t[5]||0)+"000000000").slice(0,9))}var Zr,yh=Object.assign(Object.create(null),{"/":!0,"-":!0,_:!0});function Do(n){if(Zr===void 0){let o=Intl.supportedValuesOf?.("timeZone");if(o){Zr=new Map;for(let a=0;a<o.length;a++){let s=o[a];Zr.set(bi(s),s)}}else Zr=null}let t=bi(n),e=Zr?.get(t);if(e)return{identifier:e,primaryIdentifier:e};try{e=Il(n).resolvedOptions().timeZone}catch{return}if(t==="antarctica/south_pole"&&(e="Antarctica/McMurdo"),hh.has(n))throw new RangeError(`${n} is a legacy time zone identifier from ICU. Use ${e} instead`);let r=[...t].map((o,a)=>a===0||yh[t[a-1]]?o.toUpperCase():o).join("").split("/");if(r.length===1)return t==="gb-eire"?{identifier:"GB-Eire",primaryIdentifier:e}:{identifier:t.length<=3||/[-0-9]/.test(t)?t.toUpperCase():r[0],primaryIdentifier:e};if(r[0]==="Etc")return{identifier:`Etc/${["Zulu","Greenwich","Universal"].includes(r[1])?r[1]:r[1].toUpperCase()}`,primaryIdentifier:e};if(r[0]==="Us")return{identifier:`US/${r[1]}`,primaryIdentifier:e};let i=new Map([["Act","ACT"],["Lhi","LHI"],["Nsw","NSW"],["Dar_Es_Salaam","Dar_es_Salaam"],["Port_Of_Spain","Port_of_Spain"],["Port-Au-Prince","Port-au-Prince"],["Isle_Of_Man","Isle_of_Man"],["Comodrivadavia","ComodRivadavia"],["Knox_In","Knox_IN"],["Dumontdurville","DumontDUrville"],["Mcmurdo","McMurdo"],["Denoronha","DeNoronha"],["Easterisland","EasterIsland"],["Bajanorte","BajaNorte"],["Bajasur","BajaSur"]]);return r[1]=i.get(r[1])??r[1],r.length>2&&(r[2]=i.get(r[2])??r[2]),{identifier:r.join("/"),primaryIdentifier:e}}function Xn(n,t){let{year:e,month:r,day:i,hour:o,minute:a,second:s}=Kl(n,t),u=t%1e3;return u<0&&(u+=1e3),1e6*(ks({isoDate:{year:e,month:r,day:i},time:{hour:o,minute:a,second:s,millisecond:u}})-t)}function Wa(n,t){return Xn(n,Zt(t,"floor"))}function Ss(n){let t=n<0?"-":"+",e=Math.abs(n);return`${t}${Yo(Math.floor(e/60),e%60,0,0,"minute")}`}function ql(n){return Ss(On(n,sh,"halfExpand")/6e10)}function ks({isoDate:{year:n,month:t,day:e},time:{hour:r,minute:i,second:o,millisecond:a}}){let s=n%400,u=(n-s)/400,l=new Date;return l.setUTCHours(r,i,o,a),l.setUTCFullYear(s,t-1,e),l.getTime()+uh*u}function Ze(n){let t=ks(n),e=1e3*n.time.microsecond+n.time.nanosecond;return T.default.add(Qt(t),T.default.BigInt(e))}function Wl(n){let t=Zt(n,"trunc"),e=T.default.toNumber(T.default.remainder(n,Pi));e<0&&(e+=1e6,t-=1);let r=Math.floor(e/1e3)%1e3,i=e%1e3,o=new Date(t);return{epochMilliseconds:t,isoDate:{year:o.getUTCFullYear(),month:o.getUTCMonth()+1,day:o.getUTCDate()},time:{hour:o.getUTCHours(),minute:o.getUTCMinutes(),second:o.getUTCSeconds(),millisecond:o.getUTCMilliseconds(),microsecond:r,nanosecond:i}}}function Ts(n,t){if(n==="UTC")return null;let e=Zt(t,"floor");if(e<ci)return Ts(n,Qt(ci));let r=Date.now(),i=Math.max(e,r)+366*Hn*3,o=e,a=Xn(n,o),s=o,u=a;for(;a===u&&o<i;){if(s=o+2*Hn*7,s>Cl)return null;u=Xn(n,s),a===u&&(o=s)}return a===u?null:Qt(iu(l=>Xn(n,l),o,s,a,u))}function Ka(n,t){if(n==="UTC")return null;let e=Zt(t,"ceil"),r=Date.now(),i=r+366*Hn*3;if(e>i){let l=Ka(n,Qt(i));if(l===null||T.default.lessThan(l,Qt(r)))return l}if(n==="Africa/Casablanca"||n==="Africa/El_Aaiun"){let l=Date.UTC(2088,0,1);if(l<e)return Ka(n,Qt(l))}let o=e-1;if(o<ci)return null;let a=Xn(n,o),s=o,u=a;for(;a===u&&o>ci;){if(s=o-2*Hn*7,s<ci)return null;u=Xn(n,s),a===u&&(o=s)}return a===u?null:Qt(iu(l=>Xn(n,l),s,o,u,a))}function Kl(n,t){return function(e){let r=e.split(/[^\w]+/);if(r.length!==7)throw new RangeError(`expected 7 parts in "${e}`);let i=+r[0],o=+r[1],a=+r[2],s=r[3];if(s[0]==="b"||s[0]==="B")a=1-a;else if(s[0]!=="a"&&s[0]!=="A")throw new RangeError(`Unknown era ${s} in "${e}`);let u=r[4]==="24"?0:+r[4],l=+r[5],h=+r[6];if(!(Number.isFinite(a)&&Number.isFinite(i)&&Number.isFinite(o)&&Number.isFinite(u)&&Number.isFinite(l)&&Number.isFinite(h)))throw new RangeError(`Invalid number in "${e}`);return{year:a,month:i,day:o,hour:u,minute:l,second:h}}(Il(n).format(t))}function Eo(n){return n!==void 0&&!(n%4!=0||n%100==0&&n%400!=0)}function Qn(n,t){return{standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]}[Eo(n)?"leapyear":"standard"][t-1]}function _o(n){let t=[m(n,lt),m(n,ut),m(n,St),m(n,dt),m(n,ht),m(n,mt),m(n,ft),m(n,pt),m(n,gt),m(n,kt)];for(let e=0;e<t.length;e++){let r=t[e];if(r!==0)return r<0?-1:1}return 0}function Ho(n){let t=["years","months","weeks","days"];for(let e=0;e<t.length;e++){let r=n[t[e]];if(r!==0)return r<0?-1:1}return 0}function Gl(n){let t=Ho(n.date);return t!==0?t:n.time.sign()}function Jn(n,t){let e=n,r=t;if(!Number.isFinite(e)||!Number.isFinite(r))throw new RangeError("infinity is out of range");return r-=1,e+=Math.floor(r/12),r%=12,r<0&&(r+=12),r+=1,{year:e,month:r}}function It(n,t,e){let r=n,i=t,o=e;if(!Number.isFinite(o))throw new RangeError("infinity is out of range");({year:r,month:i}=Jn(r,i));let a=146097;if(Math.abs(o)>a){let l=Math.trunc(o/a);r+=400*l,o-=l*a}let s=0,u=i>2?r:r-1;for(;s=Eo(u)?366:365,o<-s;)r-=1,u-=1,o+=s;for(u+=1;s=Eo(u)?366:365,o>s;)r+=1,u+=1,o-=s;for(;o<1;)({year:r,month:i}=Jn(r,i-1)),o+=Qn(r,i);for(;o>Qn(r,i);)o-=Qn(r,i),{year:r,month:i}=Jn(r,i+1);return{year:r,month:i,day:o}}function wi(n,t,e,r,i,o,a,s,u){let l=Ln(r,i,o,a,s,u);return be(It(n,t,e+l.deltaDays),l)}function Ln(n,t,e,r,i,o){let a,s=n,u=t,l=e,h=r,f=i,p=o;({div:a,mod:p}=br(p,3)),f+=a,p<0&&(f-=1,p+=1e3),{div:a,mod:f}=br(f,3),h+=a,f<0&&(h-=1,f+=1e3),l+=Math.trunc(h/1e3),h%=1e3,h<0&&(l-=1,h+=1e3),u+=Math.trunc(l/60),l%=60,l<0&&(u-=1,l+=60),s+=Math.trunc(u/60),u%=60,u<0&&(s-=1,u+=60);let E=Math.trunc(s/24);return s%=24,s<0&&(E-=1,s+=24),E+=0,s+=0,u+=0,l+=0,h+=0,f+=0,p+=0,{deltaDays:E,hour:s,minute:u,second:l,millisecond:h,microsecond:f,nanosecond:p}}function Kc(n,t){let e=tt(n,0);if(Ho(e)===0)return n.days;let r=m(t,ce),i=Bt(m(t,B),r,e,"constrain"),o=rr(r.year,r.month-1,r.day),a=rr(i.year,i.month-1,i.day)-o;return n.days+a}function xt(n){return new(Je("%Temporal.Duration%"))(-m(n,lt),-m(n,ut),-m(n,St),-m(n,dt),-m(n,ht),-m(n,mt),-m(n,ft),-m(n,pt),-m(n,gt),-m(n,kt))}function yt(n,t,e){return Math.min(e,Math.max(t,n))}function Zl(n,t,e){let r=yt(t,1,12);return{year:n,month:r,day:yt(e,1,Qn(n,r))}}function qe(n,t,e){if(n<t||n>e)throw new RangeError(`value out of range: ${t} <= ${n} <= ${e}`)}function tr(n,t,e){qe(t,1,12),qe(e,1,Qn(n,t))}function cr(n){nr(be(n,{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}))}function $o(n,t,e,r,i,o){qe(n,0,23),qe(t,0,59),qe(e,0,59),qe(r,0,999),qe(i,0,999),qe(o,0,999)}function Cs(n,t,e,r,i,o,a,s,u){tr(n,t,e),$o(r,i,o,a,s,u)}function nr(n){let t=Ze(n);(T.default.lessThan(t,ch)||T.default.greaterThan(t,lh))&&dn(t)}function Ga(n){Ze(n)}function dn(n){if(T.default.lessThan(n,fi)||T.default.greaterThan(n,Sr))throw new RangeError("date/time value is outside of supported range")}function Is({year:n,month:t}){qe(n,Lc,Nc),n===Lc?qe(t,4,12):n===Nc&&qe(t,1,9)}function Bo(n,t,e,r,i,o,a,s,u,l){let h=0,f=[n,t,e,r,i,o,a,s,u,l];for(let $=0;$<f.length;$++){let V=f[$];if(V===1/0||V===-1/0)throw new RangeError("infinite values not allowed as duration fields");if(V!==0){let q=V<0?-1:1;if(h!==0&&q!==h)throw new RangeError("mixed-sign values not allowed as duration fields");h=q}}if(Math.abs(n)>=2**32||Math.abs(t)>=2**32||Math.abs(e)>=2**32)throw new RangeError("years, months, and weeks must be < 2\xB3\xB2");let p=br(s,3),E=br(u,6),S=br(l,9),k=br(1e6*p.mod+1e3*E.mod+S.mod,9).div,R=86400*r+3600*i+60*o+a+p.div+E.div+S.div+k;if(!Number.isSafeInteger(R))throw new RangeError("total of duration time units cannot exceed 9007199254740991.999999999 s")}function wr(n){return{date:{years:m(n,lt),months:m(n,ut),weeks:m(n,St),days:m(n,dt)},time:ke.fromComponents(m(n,ht),m(n,mt),m(n,ft),m(n,pt),m(n,gt),m(n,kt))}}function cn(n){let t=ke.fromComponents(m(n,ht),m(n,mt),m(n,ft),m(n,pt),m(n,gt),m(n,kt)).add24HourDays(m(n,dt));return{date:{years:m(n,lt),months:m(n,ut),weeks:m(n,St),days:0},time:t}}function Jl(n){let t=cn(n),e=Math.trunc(t.time.sec/86400);return Bo(t.date.years,t.date.months,t.date.weeks,e,0,0,0,0,0,0),{...t.date,days:e}}function Wt(n,t){let e=n.time.sign(),r=n.time.abs().subsec,i=0,o=0,a=n.time.abs().sec,s=0,u=0,l=0;switch(t){case"year":case"month":case"week":case"day":i=Math.trunc(r/1e3),r%=1e3,o=Math.trunc(i/1e3),i%=1e3,a+=Math.trunc(o/1e3),o%=1e3,s=Math.trunc(a/60),a%=60,u=Math.trunc(s/60),s%=60,l=Math.trunc(u/24),u%=24;break;case"hour":i=Math.trunc(r/1e3),r%=1e3,o=Math.trunc(i/1e3),i%=1e3,a+=Math.trunc(o/1e3),o%=1e3,s=Math.trunc(a/60),a%=60,u=Math.trunc(s/60),s%=60;break;case"minute":i=Math.trunc(r/1e3),r%=1e3,o=Math.trunc(i/1e3),i%=1e3,a+=Math.trunc(o/1e3),o%=1e3,s=Math.trunc(a/60),a%=60;break;case"second":i=Math.trunc(r/1e3),r%=1e3,o=Math.trunc(i/1e3),i%=1e3,a+=Math.trunc(o/1e3),o%=1e3;break;case"millisecond":i=Math.trunc(r/1e3),r%=1e3,o=Pa(a,3,Math.trunc(i/1e3)),i%=1e3,a=0;break;case"microsecond":i=Pa(a,6,Math.trunc(r/1e3)),r%=1e3,a=0;break;case"nanosecond":r=Pa(a,9,r),a=0}return new(Je("%Temporal.Duration%"))(n.date.years,n.date.months,n.date.weeks,n.date.days+e*l,e*u,e*s,e*a,e*o,e*i,e*r)}function En(n,t){return Ho(n),t.sign(),{date:n,time:t}}function rr(n,t,e){return ks({isoDate:{year:n,month:t+1,day:e},time:{hour:0,minute:0,second:0,millisecond:0}})/Hn}function _r({year:n,month:t,day:e}){if(Math.abs(rr(n,t-1,e))>1e8)throw new RangeError("date/time value is outside the supported range")}function xs(n,t){let e=t.hour-n.hour,r=t.minute-n.minute,i=t.second-n.second,o=t.millisecond-n.millisecond,a=t.microsecond-n.microsecond,s=t.nanosecond-n.nanosecond;return ke.fromComponents(e,r,i,o,a,s)}function Ps(n,t,e,r,i){let o=ke.fromEpochNsDiff(t,n);return o=Mo(o,e,r,i),En({years:0,months:0,weeks:0,days:0},o)}function Xl(n,t,e,r){Ga(n),Ga(t);let i=xs(n.time,t.time),o=i.sign(),a=hn(n.isoDate,t.isoDate),s=t.isoDate;a===o&&(s=It(s.year,s.month,s.day+o),i=i.add24HourDays(-o));let u=Dn("day",r),l=Hi(e,n.isoDate,s,u);return r!==u&&(i=i.add24HourDays(l.days),l.days=0),En(l,i)}function Ql(n,t,e,r,i){let o=T.default.subtract(t,n);if(T.default.equal(o,Ht))return{date:{years:0,months:0,weeks:0,days:0},time:ke.ZERO};let a=T.default.lessThan(o,Ht)?-1:1,s=Gt(e,n),u=Gt(e,t),l,h=0,f=a===1?2:1,p=xs(s.time,u.time);for(p.sign()===-a&&h++;h<=f;h++){l=be(It(u.isoDate.year,u.isoDate.month,u.isoDate.day-h*a),s.time);let S=nt(e,l,"compatible");if(p=ke.fromEpochNsDiff(t,S),p.sign()!==-a)break}let E=Dn("day",i);return En(Hi(r,s.isoDate,l.isoDate,E),p)}function eu(n,t,e,r,i,o,a,s,u){let l,h,f,p,E=t;switch(s){case"year":{let F=On(E.date.years,a,"trunc");l=F,h=F+a*n,f={years:l,months:0,weeks:0,days:0},p={...f,years:h};break}case"month":{let F=On(E.date.months,a,"trunc");l=F,h=F+a*n,f=tt(E.date,0,0,l),p=tt(E.date,0,0,h);break}case"week":{let F=tt(E.date,0,0),ne=Bt(o,r.isoDate,F,"constrain"),y=Hi(o,ne,It(ne.year,ne.month,ne.day+E.date.days),"week"),L=On(E.date.weeks+y.weeks,a,"trunc");l=L,h=L+a*n,f=tt(E.date,0,l),p=tt(E.date,0,h);break}case"day":{let F=On(E.date.days,a,"trunc");l=F,h=F+a*n,f=tt(E.date,l),p=tt(E.date,h);break}}let S=Bt(o,r.isoDate,f,"constrain"),k=Bt(o,r.isoDate,p,"constrain"),R,$,V=be(S,r.time),q=be(k,r.time);i?(R=nt(i,V,"compatible"),$=nt(i,q,"compatible")):(R=Ze(V),$=Ze(q));let U=ke.fromEpochNsDiff(e,R),Z=ke.fromEpochNsDiff($,R),re=Ro(u,n<0?"negative":"positive"),Te=U.add(U).abs().subtract(Z.abs()).sign(),Me=Math.abs(l)/a%2==0,oe=U.isZero()?Math.abs(l):U.cmp(Z)?Ao(Math.abs(l),Math.abs(h),Te,Me,re):Math.abs(h),N=new ke(T.default.add(T.default.multiply(Z.totalNs,T.default.BigInt(l)),T.default.multiply(U.totalNs,T.default.BigInt(a*n)))).fdiv(Z.totalNs),H=oe===Math.abs(h);return E={date:H?p:f,time:ke.ZERO},{nudgeResult:{duration:E,nudgedEpochNs:H?$:R,didExpandCalendarUnit:H},total:N}}function jo(n,t,e,r,i,o,a,s,u){let l=n,h=an(s)||r&&s==="day",f=Gl(l)<0?-1:1,p;return h?{nudgeResult:p}=eu(f,l,t,e,r,i,a,s,u):p=r?function(E,S,k,R,$,V,q,U){let Z=S,re=Bt($,k.isoDate,Z.date,"constrain"),Te=be(re,k.time),Me=be(It(re.year,re.month,re.day+E),k.time),oe=nt(R,Te,"compatible"),N=nt(R,Me,"compatible"),H=ke.fromEpochNsDiff(N,oe);if(H.sign()!==E)throw new RangeError("time zone returned inconsistent Instants");let F=T.default.BigInt(Tr[q]*V),ne=Z.time.round(F,U),y=ne.subtract(H),L=y.sign()!==-E,c,d;return L?(c=E,ne=y.round(F,U),d=ne.addToEpochNs(N)):(c=0,d=ne.addToEpochNs(oe)),{duration:En(tt(Z.date,Z.date.days+c),ne),nudgedEpochNs:d,didExpandCalendarUnit:L}}(f,l,e,r,i,a,s,u):function(E,S,k,R,$,V){let q=E,U=q.time.add24HourDays(q.date.days),Z=U.round(T.default.BigInt(R*Tr[$]),V),re=Z.subtract(U),{quotient:Te}=U.divmod(yo),{quotient:Me}=Z.divmod(yo),oe=Math.sign(Me-Te)===U.sign(),N=re.addToEpochNs(S),H=0,F=Z;return vn(k)==="date"&&(H=Me,F=Z.add(ke.fromComponents(24*-Me,0,0,0,0,0))),{duration:{date:tt(q.date,H),time:F},nudgedEpochNs:N,didExpandCalendarUnit:oe}}(l,t,o,a,s,u),l=p.duration,p.didExpandCalendarUnit&&s!=="week"&&(l=function(E,S,k,R,$,V,q,U){let Z=S;if(U===q)return Z;let re=li.indexOf(q);for(let Te=li.indexOf(U)-1;Te>=re;Te--){let Me=li[Te];if(Me==="week"&&q!=="week")continue;let oe;switch(Me){case"year":oe={years:Z.date.years+E,months:0,weeks:0,days:0};break;case"month":{let F=Z.date.months+E;oe=tt(Z.date,0,0,F);break}case"week":{let F=Z.date.weeks+E;oe=tt(Z.date,0,F);break}}let N=be(Bt(V,R.isoDate,oe,"constrain"),R.time),H;if(H=$?nt($,N,"compatible"):Ze(N),po(k,H)===-E)break;Z={date:oe,time:ke.ZERO}}return Z}(f,l,p.nudgedEpochNs,e,r,i,o,Dn(s,"day"))),l}function Gc(n,t,e,r,i,o){return an(o)||r&&o==="day"?eu(Gl(n)<0?-1:1,n,t,e,r,i,1,o,"trunc").total:hi(n.time.add24HourDays(n.date.days),o)}function tu(n,t,e,r,i,o,a){if(Ir(n,t)==0)return{date:{years:0,months:0,weeks:0,days:0},time:ke.ZERO};nr(n),nr(t);let s=Xl(n,t,e,r);return o==="nanosecond"&&i===1?s:jo(s,Ze(t),n,null,e,r,i,o,a)}function nu(n,t,e,r,i,o,a,s){if(vn(i)==="time")return Ps(n,t,o,a,s);let u=Ql(n,t,e,r,i);return a==="nanosecond"&&o===1?u:jo(u,t,Gt(e,n),e,r,i,o,a,s)}function Nr(n,t,e,r,i,o){let a=kr.reduce((E,S)=>{let k=S[0],R=S[1],$=S[2];return e!=="datetime"&&$!==e||r.includes(R)||E.push(R,k),E},[]),s=Ct(t,"largestUnit",e,"auto");if(r.includes(s))throw new RangeError(`largestUnit must be one of ${a.join(", ")}, not ${s}`);let u=Rr(t),l=en(t,"trunc");n==="since"&&(l=function(E){switch(E){case"ceil":return"floor";case"floor":return"ceil";case"halfCeil":return"halfFloor";case"halfFloor":return"halfCeil";default:return E}}(l));let h=Ct(t,"smallestUnit",e,i);if(r.includes(h))throw new RangeError(`smallestUnit must be one of ${a.join(", ")}, not ${h}`);let f=Dn(o,h);if(s==="auto"&&(s=f),Dn(s,h)!==s)throw new RangeError(`largestUnit ${s} cannot be smaller than smallestUnit ${h}`);let p={hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[h];return p!==void 0&&Ar(u,p,!1),{largestUnit:s,roundingIncrement:u,roundingMode:l,smallestUnit:h}}function Zc(n,t,e,r){let i=ri(e),o=Nr(n,te(r),"time",[],"nanosecond","second"),a=Wt(Ps(m(t,se),m(i,se),o.roundingIncrement,o.smallestUnit,o.roundingMode),o.largestUnit);return n==="since"&&(a=xt(a)),a}function Jc(n,t,e,r){let i=ti(e),o=m(t,B),a=m(i,B);if(!un(o,a))throw new RangeError(`cannot compute difference between dates of ${o} and ${a} calendars`);let s=Nr(n,te(r),"date",[],"day","day"),u=Je("%Temporal.Duration%"),l=m(t,ce),h=m(i,ce);if(hn(l,h)===0)return new u;let f={date:Hi(o,l,h,s.largestUnit),time:ke.ZERO};if(s.smallestUnit!=="day"||s.roundingIncrement!==1){let E=be(l,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});f=jo(f,Ze(be(h,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0})),E,null,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode)}let p=Wt(f,"day");return n==="since"&&(p=xt(p)),p}function Xc(n,t,e,r){let i=ni(e),o=m(t,B),a=m(i,B);if(!un(o,a))throw new RangeError(`cannot compute difference between dates of ${o} and ${a} calendars`);let s=Nr(n,te(r),"datetime",[],"nanosecond","day"),u=Je("%Temporal.Duration%"),l=m(t,Re),h=m(i,Re);if(Ir(l,h)===0)return new u;let f=Wt(tu(l,h,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode),s.largestUnit);return n==="since"&&(f=xt(f)),f}function Qc(n,t,e,r){let i=Nn(e),o=Nr(n,te(r),"time",[],"nanosecond","hour"),a=xs(m(t,Ye),m(i,Ye));a=Mo(a,o.roundingIncrement,o.smallestUnit,o.roundingMode);let s=Wt(En({years:0,months:0,weeks:0,days:0},a),o.largestUnit);return n==="since"&&(s=xt(s)),s}function el(n,t,e,r){let i=ii(e),o=m(t,B),a=m(i,B);if(!un(o,a))throw new RangeError(`cannot compute difference between months of ${o} and ${a} calendars`);let s=Nr(n,te(r),"date",["week","day"],"month","year"),u=Je("%Temporal.Duration%");if(hn(m(t,ce),m(i,ce))==0)return new u;let l=bt(o,m(t,ce),"year-month");l.day=1;let h=$n(o,l,"constrain"),f=bt(o,m(i,ce),"year-month");f.day=1;let p=$n(o,f,"constrain"),E={date:tt(Hi(o,h,p,s.largestUnit),0,0),time:ke.ZERO};if(s.smallestUnit!=="month"||s.roundingIncrement!==1){let k=be(h,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});E=jo(E,Ze(be(p,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0})),k,null,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode)}let S=Wt(E,"day");return n==="since"&&(S=xt(S)),S}function tl(n,t,e,r){let i=oi(e),o=m(t,B),a=m(i,B);if(!un(o,a))throw new RangeError(`cannot compute difference between dates of ${o} and ${a} calendars`);let s=Nr(n,te(r),"datetime",[],"nanosecond","hour"),u=m(t,se),l=m(i,se),h=Je("%Temporal.Duration%"),f;if(vn(s.largestUnit)!=="date")f=Wt(Ps(u,l,s.roundingIncrement,s.smallestUnit,s.roundingMode),s.largestUnit);else{let p=m(t,Ee);if(!zl(p,m(i,Ee)))throw new RangeError("When calculating difference between time zones, largestUnit must be 'hours' or smaller because day lengths can vary between time zones due to DST or time zone offset changes.");if(T.default.equal(u,l))return new h;f=Wt(nu(u,l,p,o,s.largestUnit,s.roundingIncrement,s.smallestUnit,s.roundingMode),"hour")}return n==="since"&&(f=xt(f)),f}function Cr({hour:n,minute:t,second:e,millisecond:r,microsecond:i,nanosecond:o},a){let s=e,u=o;return s+=a.sec,u+=a.subsec,Ln(n,t,s,r,i,u)}function Za(n,t){let e=t.addToEpochNs(n);return dn(e),e}function ai(n,t,e,r,i="constrain"){if(Ho(r.date)===0)return Za(n,r.time);let o=Gt(t,n);return Za(nt(t,be(Bt(e,o.isoDate,r.date,i),o.time),"compatible"),r.time)}function nl(n,t,e){let r=Kt(e);n==="subtract"&&(r=xt(r));let i=Dn(yn(t),yn(r));if(an(i))throw new RangeError("For years, months, or weeks arithmetic, use date arithmetic relative to a starting point");let o=cn(t),a=cn(r);return Wt(En({years:0,months:0,weeks:0,days:0},o.time.add(a.time)),i)}function rl(n,t,e){let r=Kt(e);n==="subtract"&&(r=xt(r));let i=yn(r);if(vn(i)==="date")throw new RangeError(`Duration field ${i} not supported by Temporal.Instant. Try Temporal.ZonedDateTime instead.`);let o=cn(r);return Xt(Za(m(t,se),o.time))}function il(n,t,e,r){let i=m(t,B),o=Kt(e);n==="subtract"&&(o=xt(o));let a=Jl(o),s=ve(te(r));return vt(Bt(i,m(t,ce),a,s),i)}function ol(n,t,e,r){let i=Kt(e);n==="subtract"&&(i=xt(i));let o=ve(te(r)),a=m(t,B),s=cn(i),u=m(t,Re),l=Cr(u.time,s.time),h=tt(s.date,l.deltaDays);return Bo(h.years,h.months,h.weeks,h.days,0,0,0,0,0,0),qt(be(Bt(a,u.isoDate,h,o),l),a)}function al(n,t,e){let r=Kt(e);n==="subtract"&&(r=xt(r));let i=cn(r),{hour:o,minute:a,second:s,millisecond:u,microsecond:l,nanosecond:h}=Cr(m(t,Ye),i.time);return wn(Fo(o,a,s,u,l,h,"reject"))}function sl(n,t,e,r){let i=Kt(e);n==="subtract"&&(i=xt(i));let o=ve(te(r)),a=_o(i),s=m(t,B),u=bt(s,m(t,ce),"year-month");u.day=1;let l=$n(s,u,"constrain");if(a<0){let f=Bt(s,l,{months:1},"constrain");l=It(f.year,f.month,f.day-1)}let h=Jl(i);return cr(l),Er(gi(s,bt(s,Bt(s,l,h,o),"year-month"),o),s)}function cl(n,t,e,r){let i=Kt(e);n==="subtract"&&(i=xt(i));let o=ve(te(r)),a=m(t,Ee),s=m(t,B),u=wr(i);return et(ai(m(t,se),a,s,u,o),a,s)}function On(n,t,e){let r=Math.trunc(n/t),i=n%t,o=n<0?"negative":"positive",a=Math.abs(r),s=a+1,u=Tt(Math.abs(2*i)-t),l=a%2==0,h=Ro(e,o),f=i===0?a:Ao(a,s,u,l,h);return t*(o==="positive"?f:-f)}function Ja(n,t,e,r){let i=Tr[e]*t;return function(o,a,s){let u=gn(o),l=gn(a),h=T.default.divide(u,l),f=T.default.remainder(u,l),p=Ro(s,"positive"),E,S;T.default.lessThan(u,Ht)?(E=T.default.subtract(h,mi),S=h):(E=h,S=T.default.add(h,mi));let k=po(Zn(T.default.multiply(f,Es)),l)*(T.default.lessThan(u,Ht)?-1:1)+0,R=T.default.equal(f,Ht)?h:Ao(E,S,k,hl(E),p);return T.default.multiply(R,l)}(n,T.default.BigInt(i),r)}function Xa(n,t,e,r){Ga(n);let{year:i,month:o,day:a}=n.isoDate,s=Qa(n.time,t,e,r);return be(It(i,o,a+s.deltaDays),s)}function Qa({hour:n,minute:t,second:e,millisecond:r,microsecond:i,nanosecond:o},a,s,u){let l;switch(s){case"day":case"hour":l=1e3*(1e3*(1e3*(60*(60*n+t)+e)+r)+i)+o;break;case"minute":l=1e3*(1e3*(1e3*(60*t+e)+r)+i)+o;break;case"second":l=1e3*(1e3*(1e3*e+r)+i)+o;break;case"millisecond":l=1e3*(1e3*r+i)+o;break;case"microsecond":l=1e3*i+o;break;case"nanosecond":l=o}let h=Tr[s],f=On(l,h*a,u)/h;switch(s){case"day":return{deltaDays:f,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0};case"hour":return Ln(f,0,0,0,0,0);case"minute":return Ln(n,f,0,0,0,0);case"second":return Ln(n,t,f,0,0,0);case"millisecond":return Ln(n,t,e,f,0,0);case"microsecond":return Ln(n,t,e,r,f,0);case"nanosecond":return Ln(n,t,e,r,i,f);default:throw new Error(`Invalid unit ${s}`)}}function Mo(n,t,e,r){let i=Tr[e];return n.round(T.default.BigInt(i*t),r)}function hi(n,t){let e=Tr[t];return n.fdiv(T.default.BigInt(e))}function hn(n,t){return n.year!==t.year?Tt(n.year-t.year):n.month!==t.month?Tt(n.month-t.month):n.day!==t.day?Tt(n.day-t.day):0}function es(n,t){return n.hour!==t.hour?Tt(n.hour-t.hour):n.minute!==t.minute?Tt(n.minute-t.minute):n.second!==t.second?Tt(n.second-t.second):n.millisecond!==t.millisecond?Tt(n.millisecond-t.millisecond):n.microsecond!==t.microsecond?Tt(n.microsecond-t.microsecond):n.nanosecond!==t.nanosecond?Tt(n.nanosecond-t.nanosecond):0}function Ir(n,t){let e=hn(n.isoDate,t.isoDate);return e!==0?e:es(n.time,t.time)}function ru(n){let t=So(n);return globalThis.BigInt!==void 0?globalThis.BigInt(t.toString(10)):t}function Zt(n,t){let e=gn(n),{quotient:r,remainder:i}=Qr(e,Pi),o=T.default.toNumber(r);return t==="floor"&&T.default.toNumber(i)<0&&(o-=1),t==="ceil"&&T.default.toNumber(i)>0&&(o+=1),o}function Qt(n){if(!Number.isInteger(n))throw new RangeError("epoch milliseconds must be an integer");return T.default.multiply(T.default.BigInt(n),Pi)}function So(n){let t=n;if(typeof n=="object"){let e=n[Symbol.toPrimitive];e&&typeof e=="function"&&(t=e.call(n,"number"))}if(typeof t=="number")throw new TypeError("cannot convert number to bigint");return typeof t=="bigint"?T.default.BigInt(t.toString(10)):T.default.BigInt(t)}var ts=(()=>{let n=T.default.BigInt(Date.now()%1e6);return()=>{let t=Date.now(),e=T.default.BigInt(t),r=T.default.add(Qt(t),n);return n=T.default.remainder(e,Pi),T.default.greaterThan(r,Sr)?Sr:T.default.lessThan(r,fi)?fi:r}})();function Jr(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}function Tt(n){return n<0?-1:n>0?1:n}function te(n){if(n===void 0)return Object.create(null);if(He(n)&&n!==null)return n;throw new TypeError("Options parameter must be an object, not "+(n===null?"null":typeof n))}function ir(n,t){let e=Object.create(null);return e[n]=t,e}function _n(n,t,e,r){let i=n[t];if(i!==void 0){if(i=No(i),!e.includes(i))throw new RangeError(`${t} must be one of ${e.join(", ")}, not ${i}`);return i}if(r===Sn)throw new RangeError(`${t} option is required`);return r}function Et(n){let t=bi(n);if(!dh.includes(bi(t)))throw new RangeError(`invalid calendar identifier ${t}`);switch(t){case"ethiopic-amete-alem":return"ethioaa";case"islamicc":return"islamic-civil"}return t}function bi(n){let t="";for(let e=0;e<n.length;e++){let r=n.charCodeAt(e);t+=r>=65&&r<=90?String.fromCharCode(r+32):String.fromCharCode(r)}return t}function zn(n){throw new TypeError(`Do not use built-in arithmetic operators with Temporal objects. When comparing, use ${n==="PlainMonthDay"?"Temporal.PlainDate.compare(obj1.toPlainDate(year), obj2.toPlainDate(year))":`Temporal.${n}.compare(obj1, obj2)`}, not obj1 > obj2. When coercing to strings, use \`\${obj}\` or String(obj), not '' + obj. When coercing to numbers, use properties or methods of the object, not \`+obj\`. When concatenating with strings, use \`\${str}\${obj}\` or str.concat(obj), not str + obj. In React, coerce to a string before rendering a Temporal object.`)}var vh=new RegExp(`^${kl.source}$`),wh=new RegExp(`^${/([+-])([01][0-9]|2[0-3])(?::?([0-5][0-9])(?::?([0-5][0-9])(?:[.,](\d{1,9}))?)?)?/.source}$`);function iu(n,t,e,r=n(t),i=n(e)){let o=t,a=e,s=r,u=i;for(;a-o>1;){let l=Math.trunc((o+a)/2),h=n(l);h===s?(o=l,s=h):h===u&&(a=l,u=h)}return a}function ou(n){return[...n]}function au(n,t){if(n!=="gregory"&&n!=="iso8601")return;let e=zi[n],r=t.year,{dayOfWeek:i,dayOfYear:o,daysInYear:a}=e.isoToDate(t,{dayOfWeek:!0,dayOfYear:!0,daysInYear:!0}),s=e.getFirstDayOfWeek(),u=e.getMinimalDaysInFirstWeek(),l=(i+7-s)%7,h=(i-o+7001-s)%7,f=Math.floor((o-1+h)/7);if(7-h>=u&&++f,f==0)f=function(p,E,S,k){let R=(k-p-S+1)%7;R<0&&(R+=7);let $=Math.floor((S+R-1)/7);return 7-R>=E&&++$,$}(s,u,o+e.isoToDate(e.dateAdd(t,{years:-1},"constrain"),{daysInYear:!0}).daysInYear,i),r--;else if(o>=a-5){let p=(l+a-o)%7;p<0&&(p+=7),6-p>=u&&o+7-l>a&&(f=1,r++)}return{week:f,year:r}}function ll(n,t,e,r,i){if(t!==i.year){if(n*(t-i.year)>0)return!0}else if(e!==i.month){if(n*(e-i.month)>0)return!0}else if(r!==i.day&&n*(r-i.day)>0)return!0;return!1}var zi={};function or(n){if(!n.startsWith("M"))throw new RangeError(`Invalid month code: ${n}. Month codes must start with M.`);let t=+n.slice(1);if(Number.isNaN(t))throw new RangeError(`Invalid month code: ${n}`);return t}function ln(n,t=!1){return`M${`${n}`.padStart(2,"0")}${t?"L":""}`}function Rs(n,t=void 0,e=12){let{month:r,monthCode:i}=n;if(i===void 0){if(r===void 0)throw new TypeError("Either month or monthCode are required");t==="reject"&&qe(r,1,e),t==="constrain"&&(r=yt(r,1,e)),i=ln(r)}else{let o=or(i);if(i!==ln(o))throw new RangeError(`Invalid month code: ${i}`);if(r!==void 0&&r!==o)throw new RangeError(`monthCode ${i} and month ${r} must match if both are present`);if(r=o,r<1||r>e)throw new RangeError(`Invalid monthCode: ${i}`)}return{...n,month:r,monthCode:i}}zi.iso8601={resolveFields(n,t){if((t==="date"||t==="year-month")&&n.year===void 0)throw new TypeError("year is required");if((t==="date"||t==="month-day")&&n.day===void 0)throw new TypeError("day is required");Object.assign(n,Rs(n))},dateToISO:(n,t)=>ui(n.year,n.month,n.day,t),monthDayToISOReferenceDate(n,t){let{month:e,day:r}=ui(n.year??1972,n.month,n.day,t);return{month:e,day:r,year:1972}},extraFields:()=>[],fieldKeysToIgnore(n){let t=new Set;for(let e=0;e<n.length;e++){let r=n[e];t.add(r),r==="month"?t.add("monthCode"):r==="monthCode"&&t.add("month")}return ou(t)},dateAdd(n,{years:t=0,months:e=0,weeks:r=0,days:i=0},o){let{year:a,month:s,day:u}=n;return a+=t,s+=e,{year:a,month:s}=Jn(a,s),{year:a,month:s,day:u}=ui(a,s,u,o),u+=i+7*r,It(a,s,u)},dateUntil(n,t,e){let r=-hn(n,t);if(r===0)return{years:0,months:0,weeks:0,days:0};let i,o=0,a=0;if(e==="year"||e==="month"){let h=t.year-n.year;for(h!==0&&(h-=r);!ll(r,n.year+h,n.month,n.day,t);)o=h,h+=r;let f=r;for(i=Jn(n.year+o,n.month+f);!ll(r,i.year,i.month,n.day,t);)a=f,f+=r,i=Jn(i.year,i.month+r);e==="month"&&(a+=12*o,o=0)}i=Jn(n.year+o,n.month+a);let s=Zl(i.year,i.month,n.day),u=0,l=rr(t.year,t.month-1,t.day)-rr(s.year,s.month-1,s.day);return e==="week"&&(u=Math.trunc(l/7),l%=7),{years:o,months:a,weeks:u,days:l}},isoToDate({year:n,month:t,day:e},r){let i={era:void 0,eraYear:void 0,year:n,month:t,day:e,daysInWeek:7,monthsInYear:12};if(r.monthCode&&(i.monthCode=ln(t)),r.dayOfWeek){let o=t+(t<3?10:-2),a=n-(t<3?1:0),s=Math.floor(a/100),u=a-100*s,l=(e+Math.floor(2.6*o-.2)+(u+Math.floor(u/4))+(Math.floor(s/4)-2*s))%7;i.dayOfWeek=l+(l<=0?7:0)}if(r.dayOfYear){let o=e;for(let a=t-1;a>0;a--)o+=Qn(n,a);i.dayOfYear=o}return r.weekOfYear&&(i.weekOfYear=au("iso8601",{year:n,month:t,day:e})),r.daysInMonth&&(i.daysInMonth=Qn(n,t)),(r.daysInYear||r.inLeapYear)&&(i.inLeapYear=Eo(n),i.daysInYear=i.inLeapYear?366:365),i},getFirstDayOfWeek:()=>1,getMinimalDaysInFirstWeek:()=>4};var Ft=class n{constructor(t){if(this.map=new Map,this.calls=0,this.hits=0,this.misses=0,t!==void 0){let e=0;for(let r of t.map.entries()){if(++e>n.MAX_CACHE_ENTRIES)break;this.map.set(...r)}}}get(t){let e=this.map.get(t);return e&&(this.hits++,this.report()),this.calls++,e}set(t,e){this.map.set(t,e),this.misses++,this.report()}report(){}setObject(t){if(n.objectMap.get(t))throw new RangeError("object already cached");n.objectMap.set(t,this),this.report()}static getCacheForObject(t){let e=n.objectMap.get(t);return e||(e=new n,n.objectMap.set(t,e)),e}};function su({isoYear:n,isoMonth:t,isoDay:e}){return`${ji(n)}-${jt(t)}-${jt(e)}T00:00Z`}function La(n,t){return{years:n.year-t.year,months:n.month-t.month,days:n.day-t.day}}Ft.objectMap=new WeakMap,Ft.MAX_CACHE_ENTRIES=1e3;var kn=class{constructor(){this.eras=[],this.hasEra=!1,this.erasBeginMidYear=!1}getFormatter(){return this.formatter===void 0&&(this.formatter=new Intl.DateTimeFormat(`en-US-u-ca-${this.id}`,{day:"numeric",month:"numeric",year:"numeric",era:"short",timeZone:"UTC"})),this.formatter}getCalendarParts(t){let e=this.getFormatter(),r=new Date(t);if(t==="-271821-04-19T00:00Z"){let i=e.resolvedOptions();e=new Intl.DateTimeFormat(i.locale,{...i,timeZone:"Etc/GMT+1"}),r=new Date("-271821-04-20T00:00Z")}try{return e.formatToParts(r)}catch{throw new RangeError(`Invalid ISO date: ${t}`)}}isoToCalendarDate(t,e){let{year:r,month:i,day:o}=t,a=JSON.stringify({func:"isoToCalendarDate",isoYear:r,isoMonth:i,isoDay:o,id:this.id}),s=e.get(a);if(s)return s;let u=su({isoYear:r,isoMonth:i,isoDay:o}),l=this.getCalendarParts(u),h={};for(let p=0;p<l.length;p++){let{type:E,value:S}=l[p];if(E!=="year"&&E!=="relatedYear"||(this.hasEra?h.eraYear=+S:h.year=+S),E==="month"){let k=/^([0-9]*)(.*?)$/.exec(S);if(!k||k.length!=3||!k[1]&&!k[2])throw new RangeError(`Unexpected month: ${S}`);if(h.month=k[1]?+k[1]:1,h.month<1)throw new RangeError(`Invalid month ${S} from ${u}[u-ca-${this.id}] (probably due to https://bugs.chromium.org/p/v8/issues/detail?id=10527)`);if(h.month>13)throw new RangeError(`Invalid month ${S} from ${u}[u-ca-${this.id}] (probably due to https://bugs.chromium.org/p/v8/issues/detail?id=10529)`);k[2]&&(h.monthExtra=k[2])}E==="day"&&(h.day=+S),this.hasEra&&E==="era"&&S!=null&&S!==""&&(h.era=S.split(" (")[0].normalize("NFD").replace(/[^-0-9 \p{L}]/gu,"").replace(/ /g,"-").toLowerCase())}if(this.hasEra&&h.eraYear===void 0)throw new RangeError(`Intl.DateTimeFormat.formatToParts lacks relatedYear in ${this.id} calendar. Try Node 14+ or modern browsers.`);if(this.hasEra){let p=this.eras.find(E=>h.era===E.genericName);p&&(h.era=p.code)}if(this.reviseIntlEra){let{era:p,eraYear:E}=this.reviseIntlEra(h,t);h.era=p,h.eraYear=E}this.checkIcuBugs&&this.checkIcuBugs(t);let f=this.adjustCalendarDate(h,e,"constrain",!0);if(f.year===void 0)throw new RangeError(`Missing year converting ${JSON.stringify(t)}`);if(f.month===void 0)throw new RangeError(`Missing month converting ${JSON.stringify(t)}`);if(f.day===void 0)throw new RangeError(`Missing day converting ${JSON.stringify(t)}`);return e.set(a,f),["constrain","reject"].forEach(p=>{let E=JSON.stringify({func:"calendarToIsoDate",year:f.year,month:f.month,day:f.day,overflow:p,id:this.id});e.set(E,t)}),f}validateCalendarDate(t){let{month:e,year:r,day:i,eraYear:o,monthCode:a,monthExtra:s}=t;if(s!==void 0)throw new RangeError("Unexpected `monthExtra` value");if(r===void 0&&o===void 0)throw new TypeError("year or eraYear is required");if(e===void 0&&a===void 0)throw new TypeError("month or monthCode is required");if(i===void 0)throw new RangeError("Missing day");if(a!==void 0){if(typeof a!="string")throw new RangeError("monthCode must be a string, not "+typeof a);if(!/^M([01]?\d)(L?)$/.test(a))throw new RangeError(`Invalid monthCode: ${a}`)}if(this.hasEra&&t.era===void 0!=(t.eraYear===void 0))throw new TypeError("properties era and eraYear must be provided together")}adjustCalendarDate(t,e=void 0,r="constrain",i=!1){if(this.calendarType==="lunisolar")throw new RangeError("Override required for lunisolar calendars");let o=t;this.validateCalendarDate(o);let a=this.monthsInYear(o,e),{month:s,monthCode:u}=o;return{month:s,monthCode:u}=Rs(o,r,a),{...o,month:s,monthCode:u}}regulateMonthDayNaive(t,e,r){let i=this.monthsInYear(t,r),{month:o,day:a}=t;return e==="reject"?(qe(o,1,i),qe(a,1,this.maximumMonthLength(t))):(o=yt(o,1,i),a=yt(a,1,this.maximumMonthLength({...t,month:o}))),{...t,month:o,day:a}}calendarToIsoDate(t,e="constrain",r){let i=t,o=this.adjustCalendarDate(t,r,e,!1);o=this.regulateMonthDayNaive(o,e,r);let{year:a,month:s,day:u}=o,l=JSON.stringify({func:"calendarToIsoDate",year:a,month:s,day:u,overflow:e,id:this.id}),h,f=r.get(l);if(f||i.year!==void 0&&i.month!==void 0&&i.day!==void 0&&(i.year!==o.year||i.month!==o.month||i.day!==o.day)&&(h=JSON.stringify({func:"calendarToIsoDate",year:i.year,month:i.month,day:i.day,overflow:e,id:this.id}),f=r.get(h),f))return f;let p=this.estimateIsoDate({year:a,month:s,day:u}),E=V=>{let q=this.addDaysIso(p,V);if(o.day>this.minimumMonthLength(o)){let U=this.isoToCalendarDate(q,r);for(;U.month!==s||U.year!==a;){if(e==="reject")throw new RangeError(`day ${u} does not exist in month ${s} of year ${a}`);q=this.addDaysIso(q,-1),U=this.isoToCalendarDate(q,r)}}return q},S=0,k=this.isoToCalendarDate(p,r),R=La(o,k);if(R.years!==0||R.months!==0||R.days!==0){let V=365*R.years+30*R.months+R.days;p=this.addDaysIso(p,V),k=this.isoToCalendarDate(p,r),R=La(o,k),R.years===0&&R.months===0?p=E(R.days):S=this.compareCalendarDates(o,k)}let $=8;for(;S;){p=this.addDaysIso(p,S*$);let V=k;k=this.isoToCalendarDate(p,r);let q=S;if(S=this.compareCalendarDates(o,k),S){if(R=La(o,k),R.years===0&&R.months===0)p=E(R.days),S=0;else if(q&&S!==q)if($>1)$/=2;else{if(e==="reject")throw new RangeError(`Can't find ISO date from calendar date: ${JSON.stringify({...i})}`);this.compareCalendarDates(k,V)>0&&(p=this.addDaysIso(p,-1)),S=0}}}if(r.set(l,p),h&&r.set(h,p),o.year===void 0||o.month===void 0||o.day===void 0||o.monthCode===void 0||this.hasEra&&(o.era===void 0||o.eraYear===void 0))throw new RangeError("Unexpected missing property");return p}compareCalendarDates(t,e){return t.year!==e.year?Tt(t.year-e.year):t.month!==e.month?Tt(t.month-e.month):t.day!==e.day?Tt(t.day-e.day):0}regulateDate(t,e="constrain",r){let i=this.calendarToIsoDate(t,e,r);return this.isoToCalendarDate(i,r)}addDaysIso(t,e){return It(t.year,t.month,t.day+e)}addDaysCalendar(t,e,r){let i=this.calendarToIsoDate(t,"constrain",r),o=this.addDaysIso(i,e);return this.isoToCalendarDate(o,r)}addMonthsCalendar(t,e,r,i){let o=t,{day:a}=o;for(let s=0,u=Math.abs(e);s<u;s++){let{month:l}=o,h=o,f=e<0?-Math.max(a,this.daysInPreviousMonth(o,i)):this.daysInMonth(o,i),p=this.calendarToIsoDate(o,"constrain",i),E=this.addDaysIso(p,f);if(o=this.isoToCalendarDate(E,i),e>0){let S=this.monthsInYear(h,i);for(;o.month-1!=l%S;)E=this.addDaysIso(E,-1),o=this.isoToCalendarDate(E,i)}o.day!==a&&(o=this.regulateDate({...o,day:a},"constrain",i))}if(r==="reject"&&o.day!==a)throw new RangeError(`Day ${a} does not exist in resulting calendar month`);return o}addCalendar(t,{years:e=0,months:r=0,weeks:i=0,days:o=0},a,s){let{year:u,day:l,monthCode:h}=t,f=this.adjustCalendarDate({year:u+e,monthCode:h,day:l},s),p=this.addMonthsCalendar(f,r,a,s),E=o+7*i;return this.addDaysCalendar(p,E,s)}untilCalendar(t,e,r,i){let o=0,a=0,s=0,u=0;switch(r){case"day":o=this.calendarDaysUntil(t,e,i);break;case"week":{let l=this.calendarDaysUntil(t,e,i);o=l%7,a=(l-o)/7;break}case"month":case"year":{let l=this.compareCalendarDates(e,t);if(!l)return{years:0,months:0,weeks:0,days:0};let h=e.year-t.year,f=e.day-t.day;if(r==="year"&&h){let S=0;e.monthCode>t.monthCode&&(S=1),e.monthCode<t.monthCode&&(S=-1),S||(S=Math.sign(f)),u=S*l<0?h-l:h}let p,E=u?this.addCalendar(t,{years:u},"constrain",i):t;do s+=l,p=E,E=this.addMonthsCalendar(p,l,"constrain",i),E.day!==t.day&&(E=this.regulateDate({...E,day:t.day},"constrain",i));while(this.compareCalendarDates(e,E)*l>=0);s-=l,o=this.calendarDaysUntil(p,e,i);break}}return{years:u,months:s,weeks:a,days:o}}daysInMonth(t,e){let{day:r}=t,i=this.maximumMonthLength(t),o=this.minimumMonthLength(t);if(o===i)return o;let a=r<=i-o?i:o,s=this.calendarToIsoDate(t,"constrain",e),u=this.addDaysIso(s,a),l=this.isoToCalendarDate(u,e),h=this.addDaysIso(u,-l.day);return this.isoToCalendarDate(h,e).day}daysInPreviousMonth(t,e){let{day:r,month:i,year:o}=t,a={year:i>1?o:o-1,month:i,day:1},s=i>1?i-1:this.monthsInYear(a,e);a={...a,month:s};let u=this.minimumMonthLength(a),l=this.maximumMonthLength(a);if(u===l)return l;let h=this.calendarToIsoDate(t,"constrain",e),f=this.addDaysIso(h,-r);return this.isoToCalendarDate(f,e).day}startOfCalendarYear(t){return{year:t.year,month:1,monthCode:"M01",day:1}}startOfCalendarMonth(t){return{year:t.year,month:t.month,day:1}}calendarDaysUntil(t,e,r){let i=this.calendarToIsoDate(t,"constrain",r),o=this.calendarToIsoDate(e,"constrain",r);return rr(o.year,o.month-1,o.day)-rr(i.year,i.month-1,i.day)}monthDaySearchStartYear(t,e){return 1972}monthDayFromFields(t,e,r){let i,o,a,s,u,{era:l,eraYear:h,year:f,month:p,monthCode:E,day:S}=t;if(p!==void 0&&f===void 0&&(!this.hasEra||l===void 0||h===void 0))throw new TypeError("when month is present, year (or era and eraYear) are required");(E===void 0||f!==void 0||this.hasEra&&h!==void 0)&&({monthCode:E,day:S}=this.isoToCalendarDate(this.calendarToIsoDate(t,e,r),r));let k={year:this.monthDaySearchStartYear(E,S),month:12,day:31},R=this.isoToCalendarDate(k,r),$=R.monthCode>E||R.monthCode===E&&R.day>=S?R.year:R.year-1;for(let V=0;V<20;V++){let q=this.adjustCalendarDate({day:S,monthCode:E,year:$-V},r),U=this.calendarToIsoDate(q,"constrain",r),Z=this.isoToCalendarDate(U,r);if({year:i,month:o,day:a}=U,Z.monthCode===E&&Z.day===S)return{month:o,day:a,year:i};if(e==="constrain"){let re=this.maxLengthOfMonthCodeInAnyYear(Z.monthCode);if(Z.monthCode===E&&Z.day===re&&S>re)return{month:o,day:a,year:i};(s===void 0||Z.monthCode===s.monthCode&&Z.day>s.day)&&(s=Z,u=U)}}if(e==="constrain"&&u!==void 0)return u;throw new RangeError(`No recent ${this.id} year with monthCode ${E} and day ${S}`)}getFirstDayOfWeek(){}getMinimalDaysInFirstWeek(){}},ns=class extends kn{constructor(){super(...arguments),this.id="hebrew",this.calendarType="lunisolar",this.months={Tishri:{leap:1,regular:1,monthCode:"M01",days:30},Heshvan:{leap:2,regular:2,monthCode:"M02",days:{min:29,max:30}},Kislev:{leap:3,regular:3,monthCode:"M03",days:{min:29,max:30}},Tevet:{leap:4,regular:4,monthCode:"M04",days:29},Shevat:{leap:5,regular:5,monthCode:"M05",days:30},Adar:{leap:void 0,regular:6,monthCode:"M06",days:29},"Adar I":{leap:6,regular:void 0,monthCode:"M05L",days:30},"Adar II":{leap:7,regular:void 0,monthCode:"M06",days:29},Nisan:{leap:8,regular:7,monthCode:"M07",days:30},Iyar:{leap:9,regular:8,monthCode:"M08",days:29},Sivan:{leap:10,regular:9,monthCode:"M09",days:30},Tamuz:{leap:11,regular:10,monthCode:"M10",days:29},Av:{leap:12,regular:11,monthCode:"M11",days:30},Elul:{leap:13,regular:12,monthCode:"M12",days:29}}}inLeapYear(t){let{year:e}=t;return(7*e+1)%19<7}monthsInYear(t){return this.inLeapYear(t)?13:12}minimumMonthLength(t){return this.minMaxMonthLength(t,"min")}maximumMonthLength(t){return this.minMaxMonthLength(t,"max")}minMaxMonthLength(t,e){let{month:r,year:i}=t,o=this.getMonthCode(i,r),a=Object.entries(this.months).find(u=>u[1].monthCode===o);if(a===void 0)throw new RangeError(`unmatched Hebrew month: ${r}`);let s=a[1].days;return typeof s=="number"?s:s[e]}maxLengthOfMonthCodeInAnyYear(t){return["M04","M06","M08","M10","M12"].includes(t)?29:30}estimateIsoDate(t){let{year:e}=t;return{year:e-3760,month:1,day:1}}getMonthCode(t,e){return this.inLeapYear({year:t})?e===6?ln(5,!0):ln(e<6?e:e-1):ln(e)}adjustCalendarDate(t,e,r="constrain",i=!1){let{year:o,month:a,monthCode:s,day:u,monthExtra:l}=t;if(o===void 0)throw new TypeError("Missing property: year");if(i){if(l){let h=this.months[l];if(!h)throw new RangeError(`Unrecognized month from formatToParts: ${l}`);a=this.inLeapYear({year:o})?h.leap:h.regular}return s=this.getMonthCode(o,a),{year:o,month:a,day:u,monthCode:s}}if(this.validateCalendarDate(t),a===void 0)if(s.endsWith("L")){if(s!=="M05L")throw new RangeError(`Hebrew leap month must have monthCode M05L, not ${s}`);if(a=6,!this.inLeapYear({year:o})){if(r==="reject")throw new RangeError(`Hebrew monthCode M05L is invalid in year ${o} which is not a leap year`);a=6,s="M06"}}else{a=or(s),this.inLeapYear({year:o})&&a>=6&&a++;let h=this.monthsInYear({year:o});if(a<1||a>h)throw new RangeError(`Invalid monthCode: ${s}`)}else if(r==="reject"?(qe(a,1,this.monthsInYear({year:o})),qe(u,1,this.maximumMonthLength({year:o,month:a}))):(a=yt(a,1,this.monthsInYear({year:o})),u=yt(u,1,this.maximumMonthLength({year:o,month:a}))),s===void 0)s=this.getMonthCode(o,a);else if(this.getMonthCode(o,a)!==s)throw new RangeError(`monthCode ${s} doesn't correspond to month ${a} in Hebrew year ${o}`);return{...t,day:u,month:a,monthCode:s,year:o}}},Bn=class extends kn{constructor(){super(...arguments),this.calendarType="lunar",this.DAYS_PER_ISLAMIC_YEAR=354+11/30,this.DAYS_PER_ISO_YEAR=365.2425}inLeapYear(t,e){let r={year:t.year,month:1,monthCode:"M01",day:1},i={year:t.year+1,month:1,monthCode:"M01",day:1};return this.calendarDaysUntil(r,i,e)===355}monthsInYear(){return 12}minimumMonthLength(){return 29}maximumMonthLength(){return 30}maxLengthOfMonthCodeInAnyYear(){return 30}estimateIsoDate(t){let{year:e}=this.adjustCalendarDate(t);return{year:Math.floor(e*this.DAYS_PER_ISLAMIC_YEAR/this.DAYS_PER_ISO_YEAR)+622,month:1,day:1}}},rs=class extends Bn{constructor(){super(...arguments),this.id="islamic"}},is=class extends Bn{constructor(){super(...arguments),this.id="islamic-umalqura"}},os=class extends Bn{constructor(){super(...arguments),this.id="islamic-tbla"}},as=class extends Bn{constructor(){super(...arguments),this.id="islamic-civil"}},ss=class extends Bn{constructor(){super(...arguments),this.id="islamic-rgsa"}},cs=class extends Bn{constructor(){super(...arguments),this.id="islamicc"}},ls=class extends kn{constructor(){super(...arguments),this.id="persian",this.calendarType="solar"}inLeapYear(t,e){return this.daysInMonth({year:t.year,month:12,day:1},e)===30}monthsInYear(){return 12}minimumMonthLength(t){let{month:e}=t;return e===12?29:e<=6?31:30}maximumMonthLength(t){let{month:e}=t;return e===12?30:e<=6?31:30}maxLengthOfMonthCodeInAnyYear(t){return or(t)<=6?31:30}estimateIsoDate(t){let{year:e}=this.adjustCalendarDate(t);return{year:e+621,month:1,day:1}}},us=class extends kn{constructor(){super(...arguments),this.id="indian",this.calendarType="solar",this.months={1:{length:30,month:3,day:22,leap:{length:31,month:3,day:21}},2:{length:31,month:4,day:21},3:{length:31,month:5,day:22},4:{length:31,month:6,day:22},5:{length:31,month:7,day:23},6:{length:31,month:8,day:23},7:{length:30,month:9,day:23},8:{length:30,month:10,day:23},9:{length:30,month:11,day:22},10:{length:30,month:12,day:22},11:{length:30,month:1,nextYear:!0,day:21},12:{length:30,month:2,nextYear:!0,day:20}},this.vulnerableToBceBug=new Date("0000-01-01T00:00Z").toLocaleDateString("en-US-u-ca-indian",{timeZone:"UTC"})!=="10/11/-79 Saka"}inLeapYear(t){return As(t.year+78)}monthsInYear(){return 12}minimumMonthLength(t){return this.getMonthInfo(t).length}maximumMonthLength(t){return this.getMonthInfo(t).length}maxLengthOfMonthCodeInAnyYear(t){let e=or(t),r=this.months[e];return r=r.leap??r,r.length}getMonthInfo(t){let{month:e}=t,r=this.months[e];if(r===void 0)throw new RangeError(`Invalid month: ${e}`);return this.inLeapYear(t)&&r.leap&&(r=r.leap),r}estimateIsoDate(t){let e=this.adjustCalendarDate(t),r=this.getMonthInfo(e);return It(e.year+78+(r.nextYear?1:0),r.month,r.day+e.day-1)}checkIcuBugs(t){if(this.vulnerableToBceBug&&t.year<1)throw new RangeError(`calendar '${this.id}' is broken for ISO dates before 0001-01-01 (see https://bugs.chromium.org/p/v8/issues/detail?id=10529)`)}};function As(n){return n%4==0&&(n%100!=0||n%400==0)}var ko=class extends kn{constructor(t,e){super(),this.calendarType="solar",this.id=t,this.isoEpoch=e}inLeapYear(t){let{year:e}=this.estimateIsoDate({month:1,day:1,year:t.year});return As(e)}monthsInYear(){return 12}minimumMonthLength(t){let{month:e}=t;return e===2?this.inLeapYear(t)?29:28:[4,6,9,11].indexOf(e)>=0?30:31}maximumMonthLength(t){return this.minimumMonthLength(t)}maxLengthOfMonthCodeInAnyYear(t){return[31,29,31,30,31,30,31,31,30,31,30,31][or(t)-1]}estimateIsoDate(t){let e=this.adjustCalendarDate(t);return ui(e.year+this.isoEpoch.year,e.month+this.isoEpoch.month,e.day+this.isoEpoch.day,"constrain")}},To=class extends kn{constructor(t,e){super(),this.hasEra=!0,this.calendarType="solar",this.id=t;let{eras:r,anchorEra:i}=function(o){let a,s=o;if(s.length===0)throw new RangeError("Invalid era data: eras are required");if(s.length===1&&s[0].reverseOf)throw new RangeError("Invalid era data: anchor era cannot count years backwards");if(s.length===1&&!s[0].code)throw new RangeError("Invalid era data: at least one named era is required");if(s.filter(l=>l.reverseOf!=null).length>1)throw new RangeError("Invalid era data: only one era can count years backwards");s.forEach(l=>{if(l.isAnchor||!l.anchorEpoch&&!l.reverseOf){if(a)throw new RangeError("Invalid era data: cannot have multiple anchor eras");a=l,l.anchorEpoch={year:l.hasYearZero?0:1}}else if(!l.code)throw new RangeError("If era name is blank, it must be the anchor era")}),s=s.filter(l=>l.code),s.forEach(l=>{let{reverseOf:h}=l;if(h){let f=s.find(p=>p.code===h);if(f===void 0)throw new RangeError(`Invalid era data: unmatched reverseOf era: ${h}`);l.reverseOf=f,l.anchorEpoch=f.anchorEpoch,l.isoEpoch=f.isoEpoch}l.anchorEpoch.month===void 0&&(l.anchorEpoch.month=1),l.anchorEpoch.day===void 0&&(l.anchorEpoch.day=1)}),s.sort((l,h)=>{if(l.reverseOf)return 1;if(h.reverseOf)return-1;if(!l.isoEpoch||!h.isoEpoch)throw new RangeError("Invalid era data: missing ISO epoch");return h.isoEpoch.year-l.isoEpoch.year});let u=s[s.length-1].reverseOf;if(u&&u!==s[s.length-2])throw new RangeError("Invalid era data: invalid reverse-sign era");return s.forEach((l,h)=>{l.genericName="era"+(s.length-1-h)}),{eras:s,anchorEra:a||s[0]}}(e);this.anchorEra=i,this.eras=r}inLeapYear(t){let{year:e}=this.estimateIsoDate({month:1,day:1,year:t.year});return As(e)}monthsInYear(){return 12}minimumMonthLength(t){let{month:e}=t;return e===2?this.inLeapYear(t)?29:28:[4,6,9,11].indexOf(e)>=0?30:31}maximumMonthLength(t){return this.minimumMonthLength(t)}maxLengthOfMonthCodeInAnyYear(t){return[31,29,31,30,31,30,31,31,30,31,30,31][or(t)-1]}completeEraYear(t){let e=(s,u,l)=>{let h=t[s];if(h!=null&&h!=u&&!(l||[]).includes(h)){let f=l?.[0];throw new RangeError(`Input ${s} ${h} doesn't match calculated value ${f?`${u} (also called ${f})`:u}`)}},r=s=>{let u,l={...t,year:s},h=this.eras.find((f,p)=>{if(p===this.eras.length-1){if(f.reverseOf){if(s>0)throw new RangeError(`Signed year ${s} is invalid for era ${f.code}`);return u=f.anchorEpoch.year-s,!0}return u=s-f.anchorEpoch.year+(f.hasYearZero?0:1),!0}return this.compareCalendarDates(l,f.anchorEpoch)>=0&&(u=s-f.anchorEpoch.year+(f.hasYearZero?0:1),!0)});if(!h)throw new RangeError(`Year ${s} was not matched by any era`);return{eraYear:u,era:h.code,eraNames:h.names}},{year:i,eraYear:o,era:a}=t;if(i!=null){let s=r(i);({eraYear:o,era:a}=s),e("era",a,s?.eraNames),e("eraYear",o)}else{if(o==null)throw new RangeError("Either year or eraYear and era are required");{if(a===void 0)throw new RangeError("era and eraYear must be provided together");let s=this.eras.find(({code:u,names:l=[]})=>u===a||l.includes(a));if(!s)throw new RangeError(`Era ${a} (ISO year ${o}) was not matched by any era`);i=s.reverseOf?s.anchorEpoch.year-o:o+s.anchorEpoch.year-(s.hasYearZero?0:1),e("year",i),{eraYear:o,era:a}=r(i)}}return{...t,year:i,eraYear:o,era:a}}adjustCalendarDate(t,e,r="constrain"){let i=t,{month:o,monthCode:a}=i;return o===void 0&&(i={...i,month:or(a)}),this.validateCalendarDate(i),i=this.completeEraYear(i),super.adjustCalendarDate(i,e,r)}estimateIsoDate(t){let e=this.adjustCalendarDate(t),{year:r,month:i,day:o}=e,{anchorEra:a}=this;return ui(r+a.isoEpoch.year-(a.hasYearZero?0:1),i,o,"constrain")}},Di=class extends To{constructor(t,e){super(t,e)}isoToCalendarDate(t){let{year:e,month:r,day:i}=t,o=ln(r),a=e-this.anchorEra.isoEpoch.year+1;return this.completeEraYear({year:a,month:r,monthCode:o,day:i})}},sn={inLeapYear(n){let{year:t}=n;return(t+1)%4==0},monthsInYear:()=>13,minimumMonthLength(n){let{month:t}=n;return t===13?this.inLeapYear(n)?6:5:30},maximumMonthLength(n){return this.minimumMonthLength(n)},maxLengthOfMonthCodeInAnyYear:n=>n==="M13"?6:30},ds=class extends ko{constructor(t,e){super(t,e),this.inLeapYear=sn.inLeapYear,this.monthsInYear=sn.monthsInYear,this.minimumMonthLength=sn.minimumMonthLength,this.maximumMonthLength=sn.maximumMonthLength,this.maxLengthOfMonthCodeInAnyYear=sn.maxLengthOfMonthCodeInAnyYear}},Co=class extends To{constructor(t,e){super(t,e),this.inLeapYear=sn.inLeapYear,this.monthsInYear=sn.monthsInYear,this.minimumMonthLength=sn.minimumMonthLength,this.maximumMonthLength=sn.maximumMonthLength,this.maxLengthOfMonthCodeInAnyYear=sn.maxLengthOfMonthCodeInAnyYear}},hs=class extends ds{constructor(){super("ethioaa",{year:-5492,month:7,day:17})}},ms=class extends Co{constructor(){super("coptic",[{code:"coptic",isoEpoch:{year:284,month:8,day:29}},{code:"coptic-inverse",reverseOf:"coptic"}])}},fs=class extends Co{constructor(){super("ethiopic",[{code:"ethioaa",names:["ethiopic-amete-alem","mundi"],isoEpoch:{year:-5492,month:7,day:17}},{code:"ethiopic",names:["incar"],isoEpoch:{year:8,month:8,day:27},anchorEpoch:{year:5501}}])}},ps=class extends Di{constructor(){super("roc",[{code:"roc",names:["minguo"],isoEpoch:{year:1912,month:1,day:1}},{code:"roc-inverse",names:["before-roc"],reverseOf:"roc"}])}},gs=class extends ko{constructor(){super("buddhist",{year:-543,month:1,day:1})}},ys=class extends Di{constructor(){super("gregory",[{code:"gregory",names:["ad","ce"],isoEpoch:{year:1,month:1,day:1}},{code:"gregory-inverse",names:["be","bce"],reverseOf:"gregory"}])}reviseIntlEra(t){let{era:e,eraYear:r}=t;return e==="b"&&(e="gregory-inverse"),e==="a"&&(e="gregory"),{era:e,eraYear:r}}getFirstDayOfWeek(){return 1}getMinimalDaysInFirstWeek(){return 1}},vs=class extends Di{constructor(){super("japanese",[{code:"reiwa",isoEpoch:{year:2019,month:5,day:1},anchorEpoch:{year:2019,month:5,day:1}},{code:"heisei",isoEpoch:{year:1989,month:1,day:8},anchorEpoch:{year:1989,month:1,day:8}},{code:"showa",isoEpoch:{year:1926,month:12,day:25},anchorEpoch:{year:1926,month:12,day:25}},{code:"taisho",isoEpoch:{year:1912,month:7,day:30},anchorEpoch:{year:1912,month:7,day:30}},{code:"meiji",isoEpoch:{year:1868,month:9,day:8},anchorEpoch:{year:1868,month:9,day:8}},{code:"japanese",names:["japanese","gregory","ad","ce"],isoEpoch:{year:1,month:1,day:1}},{code:"japanese-inverse",names:["japanese-inverse","gregory-inverse","bc","bce"],reverseOf:"japanese"}]),this.erasBeginMidYear=!0}reviseIntlEra(t,e){let{era:r,eraYear:i}=t,{year:o}=e;return this.eras.find(a=>a.code===r)?{era:r,eraYear:i}:o<1?{era:"japanese-inverse",eraYear:1-o}:{era:"japanese",eraYear:o}}},Io=class extends kn{constructor(){super(...arguments),this.calendarType="lunisolar"}inLeapYear(t,e){let r=this.getMonthList(t.year,e);return Object.entries(r).length===13}monthsInYear(t,e){return this.inLeapYear(t,e)?13:12}minimumMonthLength(){return 29}maximumMonthLength(){return 30}maxLengthOfMonthCodeInAnyYear(t){return["M01L","M09L","M10L","M11L","M12L"].includes(t)?29:30}monthDaySearchStartYear(t,e){let r={M01L:[1651,1651],M02L:[1947,1765],M03L:[1966,1955],M04L:[1963,1944],M05L:[1971,1952],M06L:[1960,1941],M07L:[1968,1938],M08L:[1957,1718],M09L:[1832,1832],M10L:[1870,1870],M11L:[1814,1814],M12L:[1890,1890]}[t]??[1972,1972];return e<30?r[0]:r[1]}getMonthList(t,e){if(t===void 0)throw new TypeError("Missing year");let r=JSON.stringify({func:"getMonthList",calendarYear:t,id:this.id}),i=e.get(r);if(i)return i;let o=this.getFormatter(),a=(R,$)=>{let V=su({isoYear:R,isoMonth:2,isoDay:1}),q=new Date(V);q.setUTCDate($+1);let U=o.formatToParts(q),Z=U.find(oe=>oe.type==="month").value,re=+U.find(oe=>oe.type==="day").value,Te=U.find(oe=>oe.type==="relatedYear"),Me;if(Te===void 0)throw new RangeError(`Intl.DateTimeFormat.formatToParts lacks relatedYear in ${this.id} calendar. Try Node 14+ or modern browsers.`);return Me=+Te.value,{calendarMonthString:Z,calendarDay:re,calendarYearToVerify:Me}},s=17,{calendarMonthString:u,calendarDay:l,calendarYearToVerify:h}=a(t,s);u!=="1"&&(s+=29,{calendarMonthString:u,calendarDay:l}=a(t,s)),s-=l-5;let f={},p,E,S=1,k=!1;do({calendarMonthString:u,calendarDay:l,calendarYearToVerify:h}=a(t,s)),p&&(f[E].daysInMonth=p+30-l),h!==t?k=!0:(f[u]={monthIndex:S++},s+=30),p=l,E=u;while(!k);return f[E].daysInMonth=p+30-l,e.set(r,f),f}estimateIsoDate(t){let{year:e,month:r}=t;return{year:e,month:r>=12?12:r+1,day:1}}adjustCalendarDate(t,e,r="constrain",i=!1){let{year:o,month:a,monthExtra:s,day:u,monthCode:l}=t;if(o===void 0)throw new TypeError("Missing property: year");if(i){if(s&&s!=="bis")throw new RangeError(`Unexpected leap month suffix: ${s}`);let h=ln(a,s!==void 0),f=`${a}${s||""}`,p=this.getMonthList(o,e)[f];if(p===void 0)throw new RangeError(`Unmatched month ${f} in Chinese year ${o}`);return a=p.monthIndex,{year:o,month:a,day:u,monthCode:h}}if(this.validateCalendarDate(t),a===void 0){let h=this.getMonthList(o,e),f=l.replace(/^M|L$/g,E=>E==="L"?"bis":"");f[0]==="0"&&(f=f.slice(1));let p=h[f];if(a=p&&p.monthIndex,a===void 0&&l.endsWith("L")&&l!="M13L"&&r==="constrain"){let E=+l.replace(/^M0?|L$/g,"");p=h[E],p&&(a=p.monthIndex,l=ln(E))}if(a===void 0)throw new RangeError(`Unmatched month ${l} in Chinese year ${o}`)}else if(l===void 0){let h=this.getMonthList(o,e),f=Object.entries(h),p=f.length;r==="reject"?(qe(a,1,p),qe(u,1,this.maximumMonthLength())):(a=yt(a,1,p),u=yt(u,1,this.maximumMonthLength()));let E=f.find(S=>S[1].monthIndex===a);if(E===void 0)throw new RangeError(`Invalid month ${a} in Chinese year ${o}`);l=ln(+E[0].replace("bis",""),E[0].indexOf("bis")!==-1)}else{let h=this.getMonthList(o,e),f=l.replace(/^M|L$/g,E=>E==="L"?"bis":"");f[0]==="0"&&(f=f.slice(1));let p=h[f];if(!p)throw new RangeError(`Unmatched monthCode ${l} in Chinese year ${o}`);if(a!==p.monthIndex)throw new RangeError(`monthCode ${l} doesn't correspond to month ${a} in Chinese year ${o}`)}return{...t,year:o,month:a,monthCode:l,day:u}}},ws=class extends Io{constructor(){super(...arguments),this.id="chinese"}},bs=class extends Io{constructor(){super(...arguments),this.id="dangi"}},Ds=class{constructor(t){this.helper=t}extraFields(t){return this.helper.hasEra&&t.includes("year")?["era","eraYear"]:[]}resolveFields(t){if(this.helper.calendarType!=="lunisolar"){let e=new Ft;Rs(t,void 0,this.helper.monthsInYear({year:t.year??1972},e))}}dateToISO(t,e){let r=new Ft,i=this.helper.calendarToIsoDate(t,e,r);return r.setObject(i),i}monthDayToISOReferenceDate(t,e){let r=new Ft,i=this.helper.monthDayFromFields(t,e,r);return r.setObject(i),i}fieldKeysToIgnore(t){let e=new Set;for(let r=0;r<t.length;r++){let i=t[r];switch(e.add(i),i){case"era":e.add("eraYear"),e.add("year");break;case"eraYear":e.add("era"),e.add("year");break;case"year":e.add("era"),e.add("eraYear");break;case"month":e.add("monthCode"),this.helper.erasBeginMidYear&&(e.add("era"),e.add("eraYear"));break;case"monthCode":e.add("month"),this.helper.erasBeginMidYear&&(e.add("era"),e.add("eraYear"));break;case"day":this.helper.erasBeginMidYear&&(e.add("era"),e.add("eraYear"))}}return ou(e)}dateAdd(t,{years:e,months:r,weeks:i,days:o},a){let s=Ft.getCacheForObject(t),u=this.helper.isoToCalendarDate(t,s),l=this.helper.addCalendar(u,{years:e,months:r,weeks:i,days:o},a,s),h=this.helper.calendarToIsoDate(l,"constrain",s);return Ft.getCacheForObject(h)||new Ft(s).setObject(h),h}dateUntil(t,e,r){let i=Ft.getCacheForObject(t),o=Ft.getCacheForObject(e),a=this.helper.isoToCalendarDate(t,i),s=this.helper.isoToCalendarDate(e,o);return this.helper.untilCalendar(a,s,r,i)}isoToDate(t,e){let r=Ft.getCacheForObject(t),i=this.helper.isoToCalendarDate(t,r);if(e.dayOfWeek&&(i.dayOfWeek=zi.iso8601.isoToDate(t,{dayOfWeek:!0}).dayOfWeek),e.dayOfYear){let o=this.helper.startOfCalendarYear(i),a=this.helper.calendarDaysUntil(o,i,r);i.dayOfYear=a+1}if(e.weekOfYear&&(i.weekOfYear=au(this.helper.id,t)),i.daysInWeek=7,e.daysInMonth&&(i.daysInMonth=this.helper.daysInMonth(i,r)),e.daysInYear){let o=this.helper.startOfCalendarYear(i),a=this.helper.addCalendar(o,{years:1},"constrain",r);i.daysInYear=this.helper.calendarDaysUntil(o,a,r)}return e.monthsInYear&&(i.monthsInYear=this.helper.monthsInYear(i,r)),e.inLeapYear&&(i.inLeapYear=this.helper.inLeapYear(i,r)),i}getFirstDayOfWeek(){return this.helper.getFirstDayOfWeek()}getMinimalDaysInFirstWeek(){return this.helper.getMinimalDaysInFirstWeek()}};for(let n of[ns,ls,fs,hs,ms,ws,bs,ps,us,gs,ys,vs,rs,is,os,as,ss,cs]){let t=new n;zi[t.id]=new Ds(t)}Ba("calendarImpl",function(n){return zi[n]});var Ei=Intl.DateTimeFormat;function pr(n,t){let e=m(n,t);return typeof e=="function"&&(e=new Ei(m(n,El),e(m(n,Fa))),function(r,i,o){let a=Po(r);if(a===void 0)throw new TypeError("Missing slots for the given container");if(a[i]===void 0)throw new TypeError(`tried to reset ${i} which was not set`);a[i]=o}(n,t,e)),e}function Xr(n){return Dt(n,sr)}var ar=class{constructor(t=void 0,e=void 0){(function(r,i,o){let a=o!==void 0,s;if(a){let f=["localeMatcher","calendar","numberingSystem","hour12","hourCycle","timeZone","weekday","era","year","month","day","dayPeriod","hour","minute","second","fractionalSecondDigits","timeZoneName","formatMatcher","dateStyle","timeStyle"];s=function(E){if(E==null)throw new TypeError(`Expected object not ${E}`);return Object(E)}(o);let p=Object.create(null);for(let E=0;E<f.length;E++){let S=f[E];Object.prototype.hasOwnProperty.call(s,S)&&(p[S]=s[S])}s=p}else s=Object.create(null);let u=new Ei(i,s),l=u.resolvedOptions();if(Tn(r),a){let f=Object.assign(Object.create(null),l);for(let p in f)Object.prototype.hasOwnProperty.call(s,p)||delete f[p];f.hour12=s.hour12,f.hourCycle=s.hourCycle,me(r,Fa,f)}else me(r,Fa,s);me(r,El,l.locale),me(r,sr,u),me(r,vr,l.timeZone),me(r,ei,l.calendar),me(r,gl,Ch),me(r,yl,kh),me(r,vl,Th),me(r,wl,Sh),me(r,bl,Ih),me(r,Dl,xh);let h=a?s.timeZone:void 0;if(h===void 0)me(r,Oa,l.timeZone);else{let f=No(h);if(f.startsWith("\u2212"))throw new RangeError("Unicode minus (U+2212) is not supported in time zone offsets");me(r,Oa,wt(f))}})(this,t,e)}get format(){x(this,Xr);let t=Dh.bind(this);return Object.defineProperties(t,{length:{value:1,enumerable:!1,writable:!1,configurable:!0},name:{value:"",enumerable:!1,writable:!1,configurable:!0}}),t}formatRange(t,e){return x(this,Xr),_h.call(this,t,e)}formatToParts(t,...e){return x(this,Xr),Eh.call(this,t,...e)}formatRangeToParts(t,e){return x(this,Xr),Mh.call(this,t,e)}resolvedOptions(){return x(this,Xr),bh.call(this)}};"formatToParts"in Ei.prototype||delete ar.prototype.formatToParts,"formatRangeToParts"in Ei.prototype||delete ar.prototype.formatRangeToParts;var $t=function(n=void 0,t=void 0){return new ar(n,t)};function bh(){let n=m(this,sr).resolvedOptions();return n.timeZone=m(this,Oa),n}function Dh(n,...t){let e,r,i=xr(n,this);return i.formatter?(e=i.formatter,r=[Zt(i.epochNs,"floor")]):(e=m(this,sr),r=[n,...t]),e.format(...r)}function Eh(n,...t){let e,r,i=xr(n,this);return i.formatter?(e=i.formatter,r=[Zt(i.epochNs,"floor")]):(e=m(this,sr),r=[n,...t]),e.formatToParts(...r)}function _h(n,t){if(n===void 0||t===void 0)throw new TypeError("Intl.DateTimeFormat.formatRange requires two values");let e=xo(n),r=xo(t),i,o=[e,r];if(Mn(e)!==Mn(r))throw new TypeError("Intl.DateTimeFormat.formatRange accepts two values of the same type");if(Mn(e)){if(!cu(e,r))throw new TypeError("Intl.DateTimeFormat.formatRange accepts two values of the same type");let{epochNs:a,formatter:s}=xr(e,this),{epochNs:u,formatter:l}=xr(r,this);s&&(i=s,o=[Zt(a,"floor"),Zt(u,"floor")])}return i||(i=m(this,sr)),i.formatRange(...o)}function Mh(n,t){if(n===void 0||t===void 0)throw new TypeError("Intl.DateTimeFormat.formatRange requires two values");let e=xo(n),r=xo(t),i,o=[e,r];if(Mn(e)!==Mn(r))throw new TypeError("Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type");if(Mn(e)){if(!cu(e,r))throw new TypeError("Intl.DateTimeFormat.formatRangeToParts accepts two values of the same type");let{epochNs:a,formatter:s}=xr(e,this),{epochNs:u,formatter:l}=xr(r,this);s&&(i=s,o=[Zt(a,"floor"),Zt(u,"floor")])}return i||(i=m(this,sr)),i.formatRangeToParts(...o)}function Ui(n={},t={}){let e=Object.assign({},n),r=["year","month","day","hour","minute","second","weekday","dayPeriod","timeZoneName","dateStyle","timeStyle"];for(let i=0;i<r.length;i++){let o=r[i];e[o]=o in t?t[o]:e[o],e[o]!==!1&&e[o]!==void 0||delete e[o]}return e}function Sh(n){let t=Ui(n,{year:!1,month:!1,day:!1,weekday:!1,timeZoneName:!1,dateStyle:!1});if(t.timeStyle!=="long"&&t.timeStyle!=="full"||(delete t.timeStyle,Object.assign(t,{hour:"numeric",minute:"2-digit",second:"2-digit"})),!Uo(t)){if(Vi(n))throw new TypeError(`cannot format Temporal.PlainTime with options [${Object.keys(n)}]`);Object.assign(t,{hour:"numeric",minute:"numeric",second:"numeric"})}return t}function kh(n){let t={short:{year:"2-digit",month:"numeric"},medium:{year:"numeric",month:"short"},long:{year:"numeric",month:"long"},full:{year:"numeric",month:"long"}},e=Ui(n,{day:!1,hour:!1,minute:!1,second:!1,weekday:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if("dateStyle"in e&&e.dateStyle){let r=e.dateStyle;delete e.dateStyle,Object.assign(e,t[r])}if(!("year"in e||"month"in e||"era"in e)){if(Vi(n))throw new TypeError(`cannot format PlainYearMonth with options [${Object.keys(n)}]`);Object.assign(e,{year:"numeric",month:"numeric"})}return e}function Th(n){let t={short:{month:"numeric",day:"numeric"},medium:{month:"short",day:"numeric"},long:{month:"long",day:"numeric"},full:{month:"long",day:"numeric"}},e=Ui(n,{year:!1,hour:!1,minute:!1,second:!1,weekday:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if("dateStyle"in e&&e.dateStyle){let r=e.dateStyle;delete e.dateStyle,Object.assign(e,t[r])}if(!("month"in e)&&!("day"in e)){if(Vi(n))throw new TypeError(`cannot format PlainMonthDay with options [${Object.keys(n)}]`);Object.assign(e,{month:"numeric",day:"numeric"})}return e}function Ch(n){let t=Ui(n,{hour:!1,minute:!1,second:!1,dayPeriod:!1,timeZoneName:!1,timeStyle:!1});if(!zo(t)){if(Vi(n))throw new TypeError(`cannot format PlainDate with options [${Object.keys(n)}]`);Object.assign(t,{year:"numeric",month:"numeric",day:"numeric"})}return t}function Ih(n){let t=Ui(n,{timeZoneName:!1});if((t.timeStyle==="long"||t.timeStyle==="full")&&(delete t.timeStyle,Object.assign(t,{hour:"numeric",minute:"2-digit",second:"2-digit"}),t.dateStyle)&&(Object.assign(t,{short:{year:"numeric",month:"numeric",day:"numeric"},medium:{year:"numeric",month:"short",day:"numeric"},long:{year:"numeric",month:"long",day:"numeric"},full:{year:"numeric",month:"long",day:"numeric",weekday:"long"}}[t.dateStyle]),delete t.dateStyle),!Uo(t)&&!zo(t)){if(Vi(n))throw new TypeError(`cannot format PlainDateTime with options [${Object.keys(n)}]`);Object.assign(t,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})}return t}function xh(n){let t=n;return Uo(t)||zo(t)||(t=Object.assign({},t,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})),t}function zo(n){return"year"in n||"month"in n||"day"in n||"weekday"in n||"dateStyle"in n||"era"in n}function Uo(n){return"hour"in n||"minute"in n||"second"in n||"timeStyle"in n||"dayPeriod"in n||"fractionalSecondDigits"in n}function Vi(n){return zo(n)||Uo(n)||"dateStyle"in n||"timeStyle"in n||"timeZoneName"in n}function Mn(n){return Fe(n)||$e(n)||xe(n)||fe(n)||Ge(n)||Yt(n)||Ke(n)}function xo(n){return Mn(n)?n:Lo(n)}function cu(n,t){return!(!Mn(n)||!Mn(t)||$e(n)&&!$e(t)||Fe(n)&&!Fe(t)||xe(n)&&!xe(t)||fe(n)&&!fe(t)||Ge(n)&&!Ge(t)||Yt(n)&&!Yt(t)||Ke(n)&&!Ke(t))}function xr(n,t){if($e(n)){let e={isoDate:{year:1970,month:1,day:1},time:m(n,Ye)};return{epochNs:nt(m(t,vr),e,"compatible"),formatter:pr(t,wl)}}if(Ge(n)){let e=m(n,B),r=m(t,ei);if(e!==r)throw new RangeError(`cannot format PlainYearMonth with calendar ${e} in locale with calendar ${r}`);let i=be(m(n,ce),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:nt(m(t,vr),i,"compatible"),formatter:pr(t,yl)}}if(Yt(n)){let e=m(n,B),r=m(t,ei);if(e!==r)throw new RangeError(`cannot format PlainMonthDay with calendar ${e} in locale with calendar ${r}`);let i=be(m(n,ce),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:nt(m(t,vr),i,"compatible"),formatter:pr(t,vl)}}if(Fe(n)){let e=m(n,B),r=m(t,ei);if(e!=="iso8601"&&e!==r)throw new RangeError(`cannot format PlainDate with calendar ${e} in locale with calendar ${r}`);let i=be(m(n,ce),{deltaDays:0,hour:12,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0});return{epochNs:nt(m(t,vr),i,"compatible"),formatter:pr(t,gl)}}if(xe(n)){let e=m(n,B),r=m(t,ei);if(e!=="iso8601"&&e!==r)throw new RangeError(`cannot format PlainDateTime with calendar ${e} in locale with calendar ${r}`);let i=m(n,Re);return{epochNs:nt(m(t,vr),i,"compatible"),formatter:pr(t,bl)}}if(fe(n))throw new TypeError("Temporal.ZonedDateTime not supported in DateTimeFormat methods. Use toLocaleString() instead.");return Ke(n)?{epochNs:m(n,se),formatter:pr(t,Dl)}:{}}function lu(n){let t=Object.create(null);return t.years=m(n,lt),t.months=m(n,ut),t.weeks=m(n,St),t.days=m(n,dt),t.hours=m(n,ht),t.minutes=m(n,mt),t.seconds=m(n,ft),t.milliseconds=m(n,pt),t.microseconds=m(n,gt),t.nanoseconds=m(n,kt),t}ar.prototype.constructor=$t,Object.defineProperty($t,"prototype",{value:ar.prototype,writable:!1,enumerable:!1,configurable:!1}),$t.supportedLocalesOf=Ei.supportedLocalesOf,Cn($t,"Intl.DateTimeFormat");var{format:Ph,formatToParts:Rh}=Intl.DurationFormat?.prototype??Object.create(null);function Ls(n){Intl.DurationFormat.prototype.resolvedOptions.call(this);let t=lu(Kt(n));return Ph.call(this,t)}Intl.DurationFormat?.prototype&&(Intl.DurationFormat.prototype.format=Ls,Intl.DurationFormat.prototype.formatToParts=function(n){Intl.DurationFormat.prototype.resolvedOptions.call(this);let t=lu(Kt(n));return Rh.call(this,t)});var Nm=Object.freeze({__proto__:null,DateTimeFormat:$t,ModifiedIntlDurationFormatPrototypeFormat:Ls}),_i=class{constructor(t){if(arguments.length<1)throw new TypeError("missing argument: epochNanoseconds is required");Bl(this,So(t))}get epochMilliseconds(){return x(this,Ke),Zt(m(this,se),"floor")}get epochNanoseconds(){return x(this,Ke),ru(T.default.BigInt(m(this,se)))}add(t){return x(this,Ke),rl("add",this,t)}subtract(t){return x(this,Ke),rl("subtract",this,t)}until(t,e=void 0){return x(this,Ke),Zc("until",this,t,e)}since(t,e=void 0){return x(this,Ke),Zc("since",this,t,e)}round(t){if(x(this,Ke),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?ir("smallestUnit",t):te(t),r=Rr(e),i=en(e,"halfExpand"),o=Ct(e,"smallestUnit","time",Sn);return Ar(r,{hour:24,minute:1440,second:86400,millisecond:864e5,microsecond:864e8,nanosecond:864e11}[o],!0),Xt(Ja(m(this,se),r,o,i))}equals(t){x(this,Ke);let e=ri(t),r=m(this,se),i=m(e,se);return T.default.equal(T.default.BigInt(r),T.default.BigInt(i))}toString(t=void 0){x(this,Ke);let e=te(t),r=Ni(e),i=en(e,"trunc"),o=Ct(e,"smallestUnit","time",void 0);if(o==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');let a=e.timeZone;a!==void 0&&(a=wt(a));let{precision:s,unit:u,increment:l}=Oi(o,r);return Bc(Xt(Ja(m(this,se),l,u,i)),a,s)}toJSON(){return x(this,Ke),Bc(this,void 0,"auto")}toLocaleString(t=void 0,e=void 0){return x(this,Ke),new $t(t,e).format(this)}valueOf(){zn("Instant")}toZonedDateTimeISO(t){x(this,Ke);let e=wt(t);return et(m(this,se),e,"iso8601")}static fromEpochMilliseconds(t){return Xt(Qt(Lo(t)))}static fromEpochNanoseconds(t){return Xt(So(t))}static from(t){return ri(t)}static compare(t,e){let r=ri(t),i=ri(e),o=m(r,se),a=m(i,se);return T.default.lessThan(o,a)?-1:T.default.greaterThan(o,a)?1:0}};Cn(_i,"Temporal.Instant");var Mi=class{constructor(t,e,r,i="iso8601"){let o=ue(t),a=ue(e),s=ue(r),u=Et(i===void 0?"iso8601":Ue(i));tr(o,a,s),Ol(this,{year:o,month:a,day:s},u)}get calendarId(){return x(this,Fe),m(this,B)}get era(){return at(this,"era")}get eraYear(){return at(this,"eraYear")}get year(){return at(this,"year")}get month(){return at(this,"month")}get monthCode(){return at(this,"monthCode")}get day(){return at(this,"day")}get dayOfWeek(){return at(this,"dayOfWeek")}get dayOfYear(){return at(this,"dayOfYear")}get weekOfYear(){return at(this,"weekOfYear")?.week}get yearOfWeek(){return at(this,"weekOfYear")?.year}get daysInWeek(){return at(this,"daysInWeek")}get daysInMonth(){return at(this,"daysInMonth")}get daysInYear(){return at(this,"daysInYear")}get monthsInYear(){return at(this,"monthsInYear")}get inLeapYear(){return at(this,"inLeapYear")}with(t,e=void 0){if(x(this,Fe),!He(t))throw new TypeError("invalid argument");Pr(t);let r=m(this,B),i=bt(r,m(this,ce));return i=er(r,i,zt(r,t,["year","month","monthCode","day"],[],"partial")),vt($n(r,i,ve(te(e))),r)}withCalendar(t){x(this,Fe);let e=$i(t);return vt(m(this,ce),e)}add(t,e=void 0){return x(this,Fe),il("add",this,t,e)}subtract(t,e=void 0){return x(this,Fe),il("subtract",this,t,e)}until(t,e=void 0){return x(this,Fe),Jc("until",this,t,e)}since(t,e=void 0){return x(this,Fe),Jc("since",this,t,e)}equals(t){x(this,Fe);let e=ti(t);return hn(m(this,ce),m(e,ce))===0&&un(m(this,B),m(e,B))}toString(t=void 0){return x(this,Fe),jc(this,Li(te(t)))}toJSON(){return x(this,Fe),jc(this)}toLocaleString(t=void 0,e=void 0){return x(this,Fe),new $t(t,e).format(this)}valueOf(){zn("PlainDate")}toPlainDateTime(t=void 0){x(this,Fe);let e=Nl(t);return qt(be(m(this,ce),e),m(this,B))}toZonedDateTime(t){let e,r;if(x(this,Fe),He(t)){let a=t.timeZone;a===void 0?e=wt(t):(e=wt(a),r=t.plainTime)}else e=wt(t);let i=m(this,ce),o;return r===void 0?o=An(e,i):(r=Nn(r),o=nt(e,be(i,m(r,Ye)),"compatible")),et(o,e,m(this,B))}toPlainYearMonth(){x(this,Fe);let t=m(this,B);return Er(gi(t,bt(t,m(this,ce)),"constrain"),t)}toPlainMonthDay(){x(this,Fe);let t=m(this,B);return Dr(bo(t,bt(t,m(this,ce)),"constrain"),t)}static from(t,e=void 0){return ti(t,e)}static compare(t,e){let r=ti(t),i=ti(e);return hn(m(r,ce),m(i,ce))}};function at(n,t){x(n,Fe);let e=m(n,ce);return Fi(n).isoToDate(e,{[t]:!0})[t]}Cn(Mi,"Temporal.PlainDate");var Si=class{constructor(t,e,r,i=0,o=0,a=0,s=0,u=0,l=0,h="iso8601"){let f=ue(t),p=ue(e),E=ue(r),S=i===void 0?0:ue(i),k=o===void 0?0:ue(o),R=a===void 0?0:ue(a),$=s===void 0?0:ue(s),V=u===void 0?0:ue(u),q=l===void 0?0:ue(l),U=Et(h===void 0?"iso8601":Ue(h));Cs(f,p,E,S,k,R,$,V,q),Fl(this,{isoDate:{year:f,month:p,day:E},time:{hour:S,minute:k,second:R,millisecond:$,microsecond:V,nanosecond:q}},U)}get calendarId(){return x(this,xe),m(this,B)}get year(){return st(this,"year")}get month(){return st(this,"month")}get monthCode(){return st(this,"monthCode")}get day(){return st(this,"day")}get hour(){return gr(this,"hour")}get minute(){return gr(this,"minute")}get second(){return gr(this,"second")}get millisecond(){return gr(this,"millisecond")}get microsecond(){return gr(this,"microsecond")}get nanosecond(){return gr(this,"nanosecond")}get era(){return st(this,"era")}get eraYear(){return st(this,"eraYear")}get dayOfWeek(){return st(this,"dayOfWeek")}get dayOfYear(){return st(this,"dayOfYear")}get weekOfYear(){return st(this,"weekOfYear")?.week}get yearOfWeek(){return st(this,"weekOfYear")?.year}get daysInWeek(){return st(this,"daysInWeek")}get daysInYear(){return st(this,"daysInYear")}get daysInMonth(){return st(this,"daysInMonth")}get monthsInYear(){return st(this,"monthsInYear")}get inLeapYear(){return st(this,"inLeapYear")}with(t,e=void 0){if(x(this,xe),!He(t))throw new TypeError("invalid argument");Pr(t);let r=m(this,B),i=m(this,Re),o={...bt(r,i.isoDate),...i.time};return o=er(r,o,zt(r,t,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond"],"partial")),qt(Yi(r,o,ve(te(e))),r)}withPlainTime(t=void 0){x(this,xe);let e=Nl(t);return qt(be(m(this,Re).isoDate,e),m(this,B))}withCalendar(t){x(this,xe);let e=$i(t);return qt(m(this,Re),e)}add(t,e=void 0){return x(this,xe),ol("add",this,t,e)}subtract(t,e=void 0){return x(this,xe),ol("subtract",this,t,e)}until(t,e=void 0){return x(this,xe),Xc("until",this,t,e)}since(t,e=void 0){return x(this,xe),Xc("since",this,t,e)}round(t){if(x(this,xe),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?ir("smallestUnit",t):te(t),r=Rr(e),i=en(e,"halfExpand"),o=Ct(e,"smallestUnit","time",Sn,["day"]),a={day:1,hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[o];Ar(r,a,a===1);let s=m(this,Re);return qt(r===1&&o==="nanosecond"?s:Xa(s,r,o,i),m(this,B))}equals(t){x(this,xe);let e=ni(t);return Ir(m(this,Re),m(e,Re))===0&&un(m(this,B),m(e,B))}toString(t=void 0){x(this,xe);let e=te(t),r=Li(e),i=Ni(e),o=en(e,"trunc"),a=Ct(e,"smallestUnit","time",void 0);if(a==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');let{precision:s,unit:u,increment:l}=Oi(a,i),h=Xa(m(this,Re),l,u,o);return nr(h),vi(h,m(this,B),s,r)}toJSON(){return x(this,xe),vi(m(this,Re),m(this,B),"auto")}toLocaleString(t=void 0,e=void 0){return x(this,xe),new $t(t,e).format(this)}valueOf(){zn("PlainDateTime")}toZonedDateTime(t,e=void 0){x(this,xe);let r=wt(t),i=di(te(e));return et(nt(r,m(this,Re),i),r,m(this,B))}toPlainDate(){return x(this,xe),vt(m(this,Re).isoDate,m(this,B))}toPlainTime(){return x(this,xe),wn(m(this,Re).time)}static from(t,e=void 0){return ni(t,e)}static compare(t,e){let r=ni(t),i=ni(e);return Ir(m(r,Re),m(i,Re))}};function st(n,t){x(n,xe);let e=m(n,Re).isoDate;return Fi(n).isoToDate(e,{[t]:!0})[t]}function gr(n,t){return x(n,xe),m(n,Re).time[t]}Cn(Si,"Temporal.PlainDateTime");var ki=class n{constructor(t=0,e=0,r=0,i=0,o=0,a=0,s=0,u=0,l=0,h=0){let f=t===void 0?0:Jt(t),p=e===void 0?0:Jt(e),E=r===void 0?0:Jt(r),S=i===void 0?0:Jt(i),k=o===void 0?0:Jt(o),R=a===void 0?0:Jt(a),$=s===void 0?0:Jt(s),V=u===void 0?0:Jt(u),q=l===void 0?0:Jt(l),U=h===void 0?0:Jt(h);Bo(f,p,E,S,k,R,$,V,q,U),Tn(this),me(this,lt,f),me(this,ut,p),me(this,St,E),me(this,dt,S),me(this,ht,k),me(this,mt,R),me(this,ft,$),me(this,pt,V),me(this,gt,q),me(this,kt,U)}get years(){return x(this,Oe),m(this,lt)}get months(){return x(this,Oe),m(this,ut)}get weeks(){return x(this,Oe),m(this,St)}get days(){return x(this,Oe),m(this,dt)}get hours(){return x(this,Oe),m(this,ht)}get minutes(){return x(this,Oe),m(this,mt)}get seconds(){return x(this,Oe),m(this,ft)}get milliseconds(){return x(this,Oe),m(this,pt)}get microseconds(){return x(this,Oe),m(this,gt)}get nanoseconds(){return x(this,Oe),m(this,kt)}get sign(){return x(this,Oe),_o(this)}get blank(){return x(this,Oe),_o(this)===0}with(t){x(this,Oe);let e=Ll(t),{years:r=m(this,lt),months:i=m(this,ut),weeks:o=m(this,St),days:a=m(this,dt),hours:s=m(this,ht),minutes:u=m(this,mt),seconds:l=m(this,ft),milliseconds:h=m(this,pt),microseconds:f=m(this,gt),nanoseconds:p=m(this,kt)}=e;return new n(r,i,o,a,s,u,l,h,f,p)}negated(){return x(this,Oe),xt(this)}abs(){return x(this,Oe),new n(Math.abs(m(this,lt)),Math.abs(m(this,ut)),Math.abs(m(this,St)),Math.abs(m(this,dt)),Math.abs(m(this,ht)),Math.abs(m(this,mt)),Math.abs(m(this,ft)),Math.abs(m(this,pt)),Math.abs(m(this,gt)),Math.abs(m(this,kt)))}add(t){return x(this,Oe),nl("add",this,t)}subtract(t){return x(this,Oe),nl("subtract",this,t)}round(t){if(x(this,Oe),t===void 0)throw new TypeError("options parameter is required");let e=yn(this),r=typeof t=="string"?ir("smallestUnit",t):te(t),i=Ct(r,"largestUnit","datetime",void 0,["auto"]),{plainRelativeTo:o,zonedRelativeTo:a}=Aa(r),s=Rr(r),u=en(r,"halfExpand"),l=Ct(r,"smallestUnit","datetime",void 0),h=!0;l||(h=!1,l="nanosecond");let f=Dn(e,l),p=!0;if(i||(p=!1,i=f),i==="auto"&&(i=f),!h&&!p)throw new RangeError("at least one of smallestUnit or largestUnit is required");if(Dn(i,l)!==i)throw new RangeError(`largestUnit ${i} cannot be smaller than smallestUnit ${l}`);let E={hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[l];if(E!==void 0&&Ar(s,E,!1),s>1&&vn(l)==="date"&&i!==l)throw new RangeError("For calendar units with roundingIncrement > 1, use largestUnit = smallestUnit");if(a){let k=wr(this),R=m(a,Ee),$=m(a,B),V=m(a,se);return k=nu(V,ai(V,R,$,k),R,$,i,s,l,u),vn(i)==="date"&&(i="hour"),Wt(k,i)}if(o){let k=cn(this),R=Cr({deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},k.time),$=m(o,ce),V=m(o,B),q=Bt(V,$,tt(k.date,R.deltaDays),"constrain");return k=tu(be($,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),be(q,R),V,i,s,l,u),Wt(k,i)}if(an(e))throw new RangeError(`a starting point is required for ${e}s balancing`);if(an(i))throw new RangeError(`a starting point is required for ${i}s balancing`);let S=cn(this);if(l==="day"){let{quotient:k,remainder:R}=S.time.divmod(yo),$=S.date.days+k+hi(R,"day");$=On($,s,u),S=En({years:0,months:0,weeks:0,days:$},ke.ZERO)}else S=En({years:0,months:0,weeks:0,days:0},Mo(S.time,s,l,u));return Wt(S,i)}total(t){if(x(this,Oe),t===void 0)throw new TypeError("options argument is required");let e=typeof t=="string"?ir("unit",t):te(t),{plainRelativeTo:r,zonedRelativeTo:i}=Aa(e),o=Ct(e,"unit","datetime",Sn);if(i){let s=wr(this),u=m(i,Ee),l=m(i,B),h=m(i,se);return function(f,p,E,S,k){return vn(k)==="time"?hi(ke.fromEpochNsDiff(p,f),k):Gc(Ql(f,p,E,S,k),p,Gt(E,f),E,S,k)}(h,ai(h,u,l,s),u,l,o)}if(r){let s=cn(this),u=Cr({deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0},s.time),l=m(r,ce),h=m(r,B),f=Bt(h,l,tt(s.date,u.deltaDays),"constrain");return function(p,E,S,k){if(Ir(p,E)==0)return 0;nr(p),nr(E);let R=Xl(p,E,S,k);return k==="nanosecond"?T.default.toNumber(R.time.totalNs):Gc(R,Ze(E),p,null,S,k)}(be(l,{deltaDays:0,hour:0,minute:0,second:0,millisecond:0,microsecond:0,nanosecond:0}),be(f,u),h,o)}let a=yn(this);if(an(a))throw new RangeError(`a starting point is required for ${a}s total`);if(an(o))throw new RangeError(`a starting point is required for ${o}s total`);return hi(cn(this).time,o)}toString(t=void 0){x(this,Oe);let e=te(t),r=Ni(e),i=en(e,"trunc"),o=Ct(e,"smallestUnit","time",void 0);if(o==="hour"||o==="minute")throw new RangeError('smallestUnit must be a time unit other than "hours" or "minutes"');let{precision:a,unit:s,increment:u}=Oi(o,r);if(s==="nanosecond"&&u===1)return mo(this,a);let l=yn(this),h=wr(this),f=Mo(h.time,u,s,i);return h=En(h.date,f),mo(Wt(h,Dn(l,"second")),a)}toJSON(){return x(this,Oe),mo(this,"auto")}toLocaleString(t=void 0,e=void 0){if(x(this,Oe),typeof Intl.DurationFormat=="function"){let r=new Intl.DurationFormat(t,e);return Ls.call(r,this)}return console.warn("Temporal.Duration.prototype.toLocaleString() requires Intl.DurationFormat."),mo(this,"auto")}valueOf(){zn("Duration")}static from(t){return Kt(t)}static compare(t,e,r=void 0){let i=Kt(t),o=Kt(e),a=te(r),{plainRelativeTo:s,zonedRelativeTo:u}=Aa(a);if(m(i,lt)===m(o,lt)&&m(i,ut)===m(o,ut)&&m(i,St)===m(o,St)&&m(i,dt)===m(o,dt)&&m(i,ht)===m(o,ht)&&m(i,mt)===m(o,mt)&&m(i,ft)===m(o,ft)&&m(i,pt)===m(o,pt)&&m(i,gt)===m(o,gt)&&m(i,kt)===m(o,kt))return 0;let l=yn(i),h=yn(o),f=wr(i),p=wr(o);if(u&&(vn(l)==="date"||vn(h)==="date")){let $=m(u,Ee),V=m(u,B),q=m(u,se),U=ai(q,$,V,f),Z=ai(q,$,V,p);return Tt(T.default.toNumber(T.default.subtract(U,Z)))}let E=f.date.days,S=p.date.days;if(an(l)||an(h)){if(!s)throw new RangeError("A starting point is required for years, months, or weeks comparison");E=Kc(f.date,s),S=Kc(p.date,s)}let k=f.time.add24HourDays(E),R=p.time.add24HourDays(S);return k.cmp(R)}};Cn(ki,"Temporal.Duration");var Ti=class{constructor(t,e,r="iso8601",i=1972){let o=ue(t),a=ue(e),s=Et(r===void 0?"iso8601":Ue(r)),u=ue(i);tr(u,o,a),Yl(this,{year:u,month:o,day:a},s)}get monthCode(){return ul(this,"monthCode")}get day(){return ul(this,"day")}get calendarId(){return x(this,Yt),m(this,B)}with(t,e=void 0){if(x(this,Yt),!He(t))throw new TypeError("invalid argument");Pr(t);let r=m(this,B),i=bt(r,m(this,ce),"month-day");return i=er(r,i,zt(r,t,["year","month","monthCode","day"],[],"partial")),Dr(bo(r,i,ve(te(e))),r)}equals(t){x(this,Yt);let e=Hc(t);return hn(m(this,ce),m(e,ce))===0&&un(m(this,B),m(e,B))}toString(t=void 0){return x(this,Yt),Uc(this,Li(te(t)))}toJSON(){return x(this,Yt),Uc(this)}toLocaleString(t=void 0,e=void 0){return x(this,Yt),new $t(t,e).format(this)}valueOf(){zn("PlainMonthDay")}toPlainDate(t){if(x(this,Yt),!He(t))throw new TypeError("argument should be an object");let e=m(this,B);return vt($n(e,er(e,bt(e,m(this,ce),"month-day"),zt(e,t,["year"],[],[])),"constrain"),e)}static from(t,e=void 0){return Hc(t,e)}};function ul(n,t){x(n,Yt);let e=m(n,ce);return Fi(n).isoToDate(e,{[t]:!0})[t]}function Na(n){return Gt(n,ts())}Cn(Ti,"Temporal.PlainMonthDay");var uu={instant:()=>Xt(ts()),plainDateTimeISO:(n=Jr())=>qt(Na(wt(n)),"iso8601"),plainDateISO:(n=Jr())=>vt(Na(wt(n)).isoDate,"iso8601"),plainTimeISO:(n=Jr())=>wn(Na(wt(n)).time),timeZoneId:()=>Jr(),zonedDateTimeISO:(n=Jr())=>{let t=wt(n);return et(ts(),t,"iso8601")},[Symbol.toStringTag]:"Temporal.Now"};Object.defineProperty(uu,Symbol.toStringTag,{value:"Temporal.Now",writable:!1,enumerable:!1,configurable:!0});var Ci=class n{constructor(t=0,e=0,r=0,i=0,o=0,a=0){let s=t===void 0?0:ue(t),u=e===void 0?0:ue(e),l=r===void 0?0:ue(r),h=i===void 0?0:ue(i),f=o===void 0?0:ue(o),p=a===void 0?0:ue(a);$o(s,u,l,h,f,p),Hl(this,{hour:s,minute:u,second:l,millisecond:h,microsecond:f,nanosecond:p})}get hour(){return x(this,$e),m(this,Ye).hour}get minute(){return x(this,$e),m(this,Ye).minute}get second(){return x(this,$e),m(this,Ye).second}get millisecond(){return x(this,$e),m(this,Ye).millisecond}get microsecond(){return x(this,$e),m(this,Ye).microsecond}get nanosecond(){return x(this,$e),m(this,Ye).nanosecond}with(t,e=void 0){if(x(this,$e),!He(t))throw new TypeError("invalid argument");Pr(t);let r=Va(t,"partial"),i=Va(this),{hour:o,minute:a,second:s,millisecond:u,microsecond:l,nanosecond:h}=Object.assign(i,r),f=ve(te(e));return{hour:o,minute:a,second:s,millisecond:u,microsecond:l,nanosecond:h}=Fo(o,a,s,u,l,h,f),new n(o,a,s,u,l,h)}add(t){return x(this,$e),al("add",this,t)}subtract(t){return x(this,$e),al("subtract",this,t)}until(t,e=void 0){return x(this,$e),Qc("until",this,t,e)}since(t,e=void 0){return x(this,$e),Qc("since",this,t,e)}round(t){if(x(this,$e),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?ir("smallestUnit",t):te(t),r=Rr(e),i=en(e,"halfExpand"),o=Ct(e,"smallestUnit","time",Sn);return Ar(r,{hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[o],!1),wn(Qa(m(this,Ye),r,o,i))}equals(t){x(this,$e);let e=Nn(t);return es(m(this,Ye),m(e,Ye))===0}toString(t=void 0){x(this,$e);let e=te(t),r=Ni(e),i=en(e,"trunc"),o=Ct(e,"smallestUnit","time",void 0);if(o==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');let{precision:a,unit:s,increment:u}=Oi(o,r);return zc(Qa(m(this,Ye),u,s,i),a)}toJSON(){return x(this,$e),zc(m(this,Ye),"auto")}toLocaleString(t=void 0,e=void 0){return x(this,$e),new $t(t,e).format(this)}valueOf(){zn("PlainTime")}static from(t,e=void 0){return Nn(t,e)}static compare(t,e){let r=Nn(t),i=Nn(e);return es(m(r,Ye),m(i,Ye))}};Cn(Ci,"Temporal.PlainTime");var Ii=class{constructor(t,e,r="iso8601",i=1){let o=ue(t),a=ue(e),s=Et(r===void 0?"iso8601":Ue(r)),u=ue(i);tr(o,a,u),$l(this,{year:o,month:a,day:u},s)}get year(){return pn(this,"year")}get month(){return pn(this,"month")}get monthCode(){return pn(this,"monthCode")}get calendarId(){return x(this,Ge),m(this,B)}get era(){return pn(this,"era")}get eraYear(){return pn(this,"eraYear")}get daysInMonth(){return pn(this,"daysInMonth")}get daysInYear(){return pn(this,"daysInYear")}get monthsInYear(){return pn(this,"monthsInYear")}get inLeapYear(){return pn(this,"inLeapYear")}with(t,e=void 0){if(x(this,Ge),!He(t))throw new TypeError("invalid argument");Pr(t);let r=m(this,B),i=bt(r,m(this,ce),"year-month");return i=er(r,i,zt(r,t,["year","month","monthCode"],[],"partial")),Er(gi(r,i,ve(te(e))),r)}add(t,e=void 0){return x(this,Ge),sl("add",this,t,e)}subtract(t,e=void 0){return x(this,Ge),sl("subtract",this,t,e)}until(t,e=void 0){return x(this,Ge),el("until",this,t,e)}since(t,e=void 0){return x(this,Ge),el("since",this,t,e)}equals(t){x(this,Ge);let e=ii(t);return hn(m(this,ce),m(e,ce))===0&&un(m(this,B),m(e,B))}toString(t=void 0){return x(this,Ge),Vc(this,Li(te(t)))}toJSON(){return x(this,Ge),Vc(this)}toLocaleString(t=void 0,e=void 0){return x(this,Ge),new $t(t,e).format(this)}valueOf(){zn("PlainYearMonth")}toPlainDate(t){if(x(this,Ge),!He(t))throw new TypeError("argument should be an object");let e=m(this,B);return vt($n(e,er(e,bt(e,m(this,ce),"year-month"),zt(e,t,["day"],[],[])),"constrain"),e)}static from(t,e=void 0){return ii(t,e)}static compare(t,e){let r=ii(t),i=ii(e);return hn(m(r,ce),m(i,ce))}};function pn(n,t){x(n,Ge);let e=m(n,ce);return Fi(n).isoToDate(e,{[t]:!0})[t]}Cn(Ii,"Temporal.PlainYearMonth");var Ah=$t.prototype.resolvedOptions,xi=class{constructor(t,e,r="iso8601"){if(arguments.length<1)throw new TypeError("missing argument: epochNanoseconds is required");let i=So(t),o=Ue(e),{tzName:a,offsetMinutes:s}=Fn(o);if(s===void 0){let u=Do(a);if(!u)throw new RangeError(`unknown time zone ${a}`);o=u.identifier}else o=Ss(s);jl(this,i,o,Et(r===void 0?"iso8601":Ue(r)))}get calendarId(){return x(this,fe),m(this,B)}get timeZoneId(){return x(this,fe),m(this,Ee)}get year(){return ct(this,"year")}get month(){return ct(this,"month")}get monthCode(){return ct(this,"monthCode")}get day(){return ct(this,"day")}get hour(){return yr(this,"hour")}get minute(){return yr(this,"minute")}get second(){return yr(this,"second")}get millisecond(){return yr(this,"millisecond")}get microsecond(){return yr(this,"microsecond")}get nanosecond(){return yr(this,"nanosecond")}get era(){return ct(this,"era")}get eraYear(){return ct(this,"eraYear")}get epochMilliseconds(){return x(this,fe),Zt(m(this,se),"floor")}get epochNanoseconds(){return x(this,fe),ru(m(this,se))}get dayOfWeek(){return ct(this,"dayOfWeek")}get dayOfYear(){return ct(this,"dayOfYear")}get weekOfYear(){return ct(this,"weekOfYear")?.week}get yearOfWeek(){return ct(this,"weekOfYear")?.year}get hoursInDay(){x(this,fe);let t=m(this,Ee),e=on(this).isoDate,r=It(e.year,e.month,e.day+1),i=An(t,e),o=An(t,r);return hi(ke.fromEpochNsDiff(o,i),"hour")}get daysInWeek(){return ct(this,"daysInWeek")}get daysInMonth(){return ct(this,"daysInMonth")}get daysInYear(){return ct(this,"daysInYear")}get monthsInYear(){return ct(this,"monthsInYear")}get inLeapYear(){return ct(this,"inLeapYear")}get offset(){return x(this,fe),qa(bn(m(this,Ee),m(this,se)))}get offsetNanoseconds(){return x(this,fe),bn(m(this,Ee),m(this,se))}with(t,e=void 0){if(x(this,fe),!He(t))throw new TypeError("invalid zoned-date-time-like");Pr(t);let r=m(this,B),i=m(this,Ee),o=bn(i,m(this,se)),a=on(this),s={...bt(r,a.isoDate),...a.time,offset:qa(o)};s=er(r,s,zt(r,t,["year","month","monthCode","day"],["hour","minute","second","millisecond","microsecond","nanosecond","offset"],"partial"));let u=te(e),l=di(u),h=fo(u,"prefer"),f=Yi(r,s,ve(u)),p=Lr(s.offset);return et(wo(f.isoDate,f.time,"option",p,i,l,h,!1),i,r)}withPlainTime(t=void 0){x(this,fe);let e=m(this,Ee),r=m(this,B),i=on(this).isoDate,o;return o=t===void 0?An(e,i):nt(e,be(i,m(Nn(t),Ye)),"compatible"),et(o,e,r)}withTimeZone(t){x(this,fe);let e=wt(t);return et(m(this,se),e,m(this,B))}withCalendar(t){x(this,fe);let e=$i(t);return et(m(this,se),m(this,Ee),e)}add(t,e=void 0){return x(this,fe),cl("add",this,t,e)}subtract(t,e=void 0){return x(this,fe),cl("subtract",this,t,e)}until(t,e=void 0){return x(this,fe),tl("until",this,t,e)}since(t,e=void 0){return x(this,fe),tl("since",this,t,e)}round(t){if(x(this,fe),t===void 0)throw new TypeError("options parameter is required");let e=typeof t=="string"?ir("smallestUnit",t):te(t),r=Rr(e),i=en(e,"halfExpand"),o=Ct(e,"smallestUnit","time",Sn,["day"]),a={day:1,hour:24,minute:60,second:60,millisecond:1e3,microsecond:1e3,nanosecond:1e3}[o];if(Ar(r,a,a===1),o==="nanosecond"&&r===1)return et(m(this,se),m(this,Ee),m(this,B));let s=m(this,Ee),u=m(this,se),l=on(this),h;if(o==="day"){let f=l.isoDate,p=It(f.year,f.month,f.day+1),E=An(s,f),S=An(s,p),k=T.default.subtract(S,E);h=ke.fromEpochNsDiff(u,E).round(k,i).addToEpochNs(E)}else{let f=Xa(l,r,o,i),p=bn(s,u);h=wo(f.isoDate,f.time,"option",p,s,"compatible","prefer",!1)}return et(h,s,m(this,B))}equals(t){x(this,fe);let e=oi(t),r=m(this,se),i=m(e,se);return!!T.default.equal(T.default.BigInt(r),T.default.BigInt(i))&&!!zl(m(this,Ee),m(e,Ee))&&un(m(this,B),m(e,B))}toString(t=void 0){x(this,fe);let e=te(t),r=Li(e),i=Ni(e),o=function(p){return _n(p,"offset",["auto","never"],"auto")}(e),a=en(e,"trunc"),s=Ct(e,"smallestUnit","time",void 0);if(s==="hour")throw new RangeError('smallestUnit must be a time unit other than "hour"');let u=function(p){return _n(p,"timeZoneName",["auto","never","critical"],"auto")}(e),{precision:l,unit:h,increment:f}=Oi(s,i);return qc(this,l,r,u,o,{unit:h,increment:f,roundingMode:a})}toLocaleString(t=void 0,e=void 0){x(this,fe);let r=te(e),i=Object.create(null);if(function(u,l,h,f){if(l==null)return;let p=Reflect.ownKeys(l);for(let E=0;E<p.length;E++){let S=p[E];if(!h.some(k=>Object.is(k,S))&&Object.prototype.propertyIsEnumerable.call(l,S)){let k=l[S];u[S]=k}}}(i,r,["timeZone"]),r.timeZone!==void 0)throw new TypeError("ZonedDateTime toLocaleString does not accept a timeZone option");if(i.year===void 0&&i.month===void 0&&i.day===void 0&&i.era===void 0&&i.weekday===void 0&&i.dateStyle===void 0&&i.hour===void 0&&i.minute===void 0&&i.second===void 0&&i.fractionalSecondDigits===void 0&&i.timeStyle===void 0&&i.dayPeriod===void 0&&i.timeZoneName===void 0&&(i.timeZoneName="short"),i.timeZone=m(this,Ee),Wc(i.timeZone))throw new RangeError("toLocaleString does not currently support offset time zones");let o=new $t(t,i),a=Ah.call(o).calendar,s=m(this,B);if(s!=="iso8601"&&a!=="iso8601"&&!un(a,s))throw new RangeError(`cannot format ZonedDateTime with calendar ${s} in locale with calendar ${a}`);return o.format(Xt(m(this,se)))}toJSON(){return x(this,fe),qc(this,"auto")}valueOf(){zn("ZonedDateTime")}startOfDay(){x(this,fe);let t=m(this,Ee);return et(An(t,on(this).isoDate),t,m(this,B))}getTimeZoneTransition(t){x(this,fe);let e=m(this,Ee);if(t===void 0)throw new TypeError("options parameter is required");let r=_n(typeof t=="string"?ir("direction",t):te(t),"direction",["next","previous"],Sn);if(r===void 0)throw new TypeError("direction option is required");if(Wc(e)||e==="UTC")return null;let i=m(this,se),o=r==="next"?Ts(e,i):Ka(e,i);return o===null?null:et(o,e,m(this,B))}toInstant(){return x(this,fe),Xt(m(this,se))}toPlainDate(){return x(this,fe),vt(on(this).isoDate,m(this,B))}toPlainTime(){return x(this,fe),wn(on(this).time)}toPlainDateTime(){return x(this,fe),qt(on(this),m(this,B))}static from(t,e=void 0){return oi(t,e)}static compare(t,e){let r=oi(t),i=oi(e),o=m(r,se),a=m(i,se);return T.default.lessThan(T.default.BigInt(o),T.default.BigInt(a))?-1:T.default.greaterThan(T.default.BigInt(o),T.default.BigInt(a))?1:0}};function on(n){return Gt(m(n,Ee),m(n,se))}function ct(n,t){x(n,fe);let e=on(n).isoDate;return Fi(n).isoToDate(e,{[t]:!0})[t]}function yr(n,t){return x(n,fe),on(n).time[t]}Cn(xi,"Temporal.ZonedDateTime");var Se=Object.freeze({__proto__:null,Duration:ki,Instant:_i,Now:uu,PlainDate:Mi,PlainDateTime:Si,PlainMonthDay:Ti,PlainTime:Ci,PlainYearMonth:Ii,ZonedDateTime:xi}),Om=class{toTemporalInstant(){return Xt(Qt(Date.prototype.valueOf.call(this)))}}.prototype.toTemporalInstant,Lh=[_i,Mi,Si,ki,Ti,Ci,Ii,xi];for(let n of Lh){let t=Object.getOwnPropertyDescriptor(n,"prototype");(t.configurable||t.enumerable||t.writable)&&(t.configurable=!1,t.enumerable=!1,t.writable=!1,Object.defineProperty(n,"prototype",t))}var Nh="https://yuna-backend.cbocher.workers.dev/mews",Oh="https://api.mews.com/api/distributor/v1",Fh="Yuna",Yh="mewscache",Hh=!1,$h=13,Bh=8,jh=Se.Duration.from({minutes:20}).milliseconds,zh=new Headers({Accept:"application/json, text/plain, */*","Content-Type":"application/json; charset=utf-8"}),ye={base_url:Nh,bookingEngine_url:Oh,bookingEngineClient:Fh,bypassCache:Hh,headers:zh,cache_key:Yh,ttl:jh,beCheckInUTC:$h,beCheckOutUTC:Bh};var Vo=(n,t,e)=>`${n}:${t}:${JSON.stringify(e)}`;var Or=class{constructor(){O(this,"dbName","MewsAPICache");O(this,"version",2);O(this,"db",null);O(this,"initPromise",null);O(this,"performanceMetrics",[]);this.initPromise=this.init()}async init(){return new Promise((t,e)=>{try{let r=indexedDB.open(this.dbName,this.version);r.onerror=()=>{console.error("Failed to initialize IndexedDB:",r.error),e(r.error)},r.onsuccess=()=>{this.db=r.result,t()},r.onupgradeneeded=i=>{let o=i.target.result,{oldVersion:a}=i;if(a>0)try{o.objectStoreNames.contains("api_cache")&&o.deleteObjectStore("api_cache"),o.objectStoreNames.contains("performance_metrics")&&o.deleteObjectStore("performance_metrics")}catch(l){console.warn("Error cleaning up old stores:",l)}let s=o.createObjectStore("api_cache",{keyPath:"cacheKey"});s.createIndex("by-timestamp","timestamp"),s.createIndex("by-enterprise","enterpriseId"),s.createIndex("by-size","size"),o.createObjectStore("performance_metrics",{keyPath:"timestamp"}).createIndex("by-operation","operation")},r.onblocked=()=>{console.warn("IndexedDB upgrade blocked by another tab")}}catch(r){console.error("Failed to initialize IndexedDB:",r),e(r)}})}async ensureDB(){if(!this.db&&(await this.initPromise,!this.db))throw new Error("Failed to initialize IndexedDB");return this.db}calculateDataSize(t){try{return new Blob([JSON.stringify(t)]).size}catch{return 0}}recordPerformanceMetric(t,e,r,i){let o=performance.now()-e,a={operation:t,duration:o,timestamp:Date.now(),cacheHit:r,dataSize:i};this.performanceMetrics.push(a),this.performanceMetrics.length>1e3&&(this.performanceMetrics=this.performanceMetrics.slice(-1e3)),this.storeMetricAsync(a).catch(console.error)}async storeMetricAsync(t){try{let e=await this.ensureDB();return new Promise(r=>{let a=e.transaction("performance_metrics","readwrite").objectStore("performance_metrics").add(t);a.onerror=()=>r(),a.onsuccess=()=>r()})}catch{}}async get(t,e){let r=performance.now();try{let i=await this.ensureDB();return new Promise(o=>{let u=i.transaction("api_cache","readonly").objectStore("api_cache").get(t);u.onerror=()=>{this.recordPerformanceMetric("cache-miss",r,!1),o(null)},u.onsuccess=()=>{let l=u.result;if(!l){this.recordPerformanceMetric("cache-miss",r,!1),o(null);return}let h=e!==void 0?e:ye.ttl,f=Se.Instant.fromEpochMilliseconds(l.timestamp);if(Se.Now.instant().since(f,{smallestUnit:"milliseconds"}).milliseconds>h){this.delete(t).catch(console.error),this.recordPerformanceMetric("cache-expired",r,!1),o(null);return}this.recordPerformanceMetric("cache-hit",r,!0,l.size),o(l.data)}})}catch(i){return console.error("Error getting cached data:",i),this.recordPerformanceMetric("cache-error",r,!1),null}}async set(t,e,r){let i=performance.now();try{let o=await this.ensureDB(),a=this.calculateDataSize(e),s={cacheKey:t,data:e,timestamp:Se.Now.instant().epochMilliseconds,enterpriseId:r,size:a};return new Promise((u,l)=>{let p=o.transaction("api_cache","readwrite").objectStore("api_cache").put(s);p.onerror=()=>{this.recordPerformanceMetric("cache-write-error",i,!1),l(p.error)},p.onsuccess=()=>{this.recordPerformanceMetric("cache-write",i,!1,a),u()}})}catch(o){if(console.error("Error setting cached data:",o),this.recordPerformanceMetric("cache-write-error",i,!1),o instanceof Error&&o.name==="QuotaExceededError"){await this.cleanupOldEntries();try{let a=await this.ensureDB(),s={cacheKey:t,data:e,timestamp:Se.Now.instant().epochMilliseconds,enterpriseId:r,size:this.calculateDataSize(e)};return new Promise((u,l)=>{let p=a.transaction("api_cache","readwrite").objectStore("api_cache").put(s);p.onerror=()=>l(p.error),p.onsuccess=()=>u()})}catch(a){console.error("Error setting cached data after cleanup:",a)}}}}async delete(t){try{let i=(await this.ensureDB()).transaction("api_cache","readwrite").objectStore("api_cache");await new Promise((o,a)=>{let s=i.delete(t);s.onsuccess=()=>o(),s.onerror=()=>a(s.error)})}catch(e){console.error("Error deleting cached data:",e)}}async clearExpired(){let t=performance.now(),e=0;try{let r=await this.ensureDB(),i=Se.Now.instant().epochMilliseconds-ye.ttl,o=r.transaction("api_cache","readwrite"),a=o.objectStore("api_cache"),s=a.index("by-timestamp"),u=await new Promise((h,f)=>{let p=s.getAll(IDBKeyRange.upperBound(i));p.onsuccess=()=>h(p.result),p.onerror=()=>f(p.error)}),l=50;for(let h=0;h<u.length;h+=l){let f=u.slice(h,h+l);await Promise.all(f.map(p=>new Promise((E,S)=>{let k=a.delete(p.cacheKey);k.onsuccess=()=>E(),k.onerror=()=>S(k.error)}))),e+=f.length,h+l<u.length&&await new Promise(p=>setTimeout(p,0))}await new Promise((h,f)=>{o.oncomplete=()=>h(),o.onerror=()=>f(o.error)}),this.recordPerformanceMetric("cache-cleanup",t,!1)}catch(r){console.error("Error clearing expired cache:",r)}return e}async cleanupOldEntries(t=1e3){try{let r=(await this.ensureDB()).transaction("api_cache","readwrite"),i=r.objectStore("api_cache"),o=i.index("by-timestamp"),a=await new Promise((s,u)=>{let l=o.getAll();l.onsuccess=()=>s(l.result),l.onerror=()=>u(l.error)});if(a.length>t){let s=a.slice(0,a.length-t);await Promise.all(s.map(u=>new Promise((l,h)=>{let f=i.delete(u.cacheKey);f.onsuccess=()=>l(),f.onerror=()=>h(f.error)})))}await new Promise((s,u)=>{r.oncomplete=()=>s(),r.onerror=()=>u(r.error)})}catch(e){console.error("Error cleaning up old entries:",e)}}async clearAll(){try{let r=(await this.ensureDB()).transaction("api_cache","readwrite").objectStore("api_cache");await new Promise((i,o)=>{let a=r.clear();a.onsuccess=()=>i(),a.onerror=()=>o(a.error)})}catch(t){console.error("Error clearing all cache:",t)}}async getCacheStats(){try{let r=(await this.ensureDB()).transaction("api_cache","readonly").objectStore("api_cache"),i=await new Promise((a,s)=>{let u=r.getAll();u.onsuccess=()=>a(u.result),u.onerror=()=>s(u.error)}),o={totalEntries:i.length,totalSize:i.reduce((a,s)=>a+(s.size||0),0),oldestEntry:i.length>0?Math.min(...i.map(a=>a.timestamp)):null,newestEntry:i.length>0?Math.max(...i.map(a=>a.timestamp)):null,entriesByEnterprise:{}};return i.forEach(a=>{let s=a.enterpriseId||"unknown";o.entriesByEnterprise[s]=(o.entriesByEnterprise[s]||0)+1}),o}catch(t){return console.error("Error getting cache stats:",t),{totalEntries:0,totalSize:0,oldestEntry:null,newestEntry:null,entriesByEnterprise:{}}}}getPerformanceMetrics(){return[...this.performanceMetrics]}getAveragePerformance(){let t=this.performanceMetrics,e=t.filter(o=>o.operation==="cache-hit"),r=t.filter(o=>o.operation==="cache-miss"),i=t.filter(o=>o.operation==="cache-write");return{averageCacheHitTime:e.length>0?e.reduce((o,a)=>o+a.duration,0)/e.length:0,averageCacheMissTime:r.length>0?r.reduce((o,a)=>o+a.duration,0)/r.length:0,averageWriteTime:i.length>0?i.reduce((o,a)=>o+a.duration,0)/i.length:0,cacheHitRate:e.length+r.length>0?e.length/(e.length+r.length):0,totalOperations:t.length}}async performMaintenance(){try{setTimeout(async()=>{await this.clearExpired(),(await this.getCacheStats()).totalEntries>2e3&&await this.cleanupOldEntries(1500)},0)}catch(t){console.error("Error during cache maintenance:",t)}}};var Ns=async(n,t,e=null,r=Se.Duration.from({minutes:10}).milliseconds)=>{let i=new Or,o=Vo(`booking-engine:${n}`,e||"null",t.body);if(!ye.bypassCache){let a=await i.get(o,r);if(a)return a}try{let a=await fetch(n,t);if(!a.ok)throw new Error(`Booking Engine API request failed: ${a.status} ${a.statusText}`);let s=await a.json();return i.set(o,s,e||"null").catch(u=>{console.error("Error setting booking engine cache:",u)}),s}catch(a){throw a instanceof Error?console.error(`BOOKING_ENGINE_FETCH_ERROR [${n}]`,a.message):console.error(a),a}};var du=(n,t)=>{let e=`${ye.bookingEngine_url}/services/getAvailability`,r={method:"POST",headers:ye.headers,body:JSON.stringify(t)};return Ns(e,r,n)},hu=(n,t)=>{let e=`${ye.bookingEngine_url}/services/getPricing`,r={method:"POST",headers:ye.headers,body:JSON.stringify(t)};return Ns(e,r,n)};var Os=class{constructor(){O(this,"listeners",new Map)}on(t,e){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(e)}off(t,e){this.listeners.get(t)?.delete(e)}emit(t,e){this.listeners.get(t)?.forEach(r=>r(e))}},qo=new Os;function _t(n,t){qo.emit(n,t)}function Pt(n,t){Array.isArray(n)?n.forEach(e=>qo.on(e,t)):qo.on(n,t)}var mu={"en-US":{loading:"Loading...",night:"Night",chooseOption:"Choose an option",apartment:"Apartment",total:"In total",missingEnterpriseId:"Missing enterprise-ID",missingCategoryId:"Missing category-ID",minimumNights:"nights minimum",maximumNights:"nights maximum",booked:"Already Booked",select:"Select",fatalErrorMessage:"Oops! An unexpected error occurred. Please try reloading or contact support.",pleaseWait:"Please wait...","chargingMode:Once":"Once","chargingMode:PerTimeUnit":"Nightly","chargingMode:PerPersonPerTimeUnit":"Nightly per person",adults:"Adults",children:"Children (0-18 years old)",couponValid:"Coupon is valid ;)",couponInvalid:"Coupon is invalid !",couponError:"Error validating coupon!",proceedToPayment:"Proceed to payment",completePayment:"Complete the payment"},"fr-FR":{loading:"Chargement...",night:"Nuit",chooseOption:"Choisir une option",apartment:"Appartement",total:"Au total",missingEnterpriseId:"ID d'entreprise manquant",missingCategoryId:"ID de cat\xE9gorie manquant",minimumNights:"nuits minimum",maximumNights:"nuits maximum",booked:"D\xE9j\xE0 r\xE9serv\xE9",select:"S\xE9lectionner",fatalErrorMessage:"Oups ! Une erreur inattendue s'est produite. Veuillez recharger la page ou contacter le support.",pleaseWait:"S'il vous pla\xEEt, attendez...","chargingMode:Once":"Une fois","chargingMode:PerTimeUnit":"Par nuit","chargingMode:PerPersonPerTimeUnit":"Par personne par nuit",adults:"Adultes",children:"Enfants (0-18 ans)",couponValid:"Le coupon est valide ;)",couponInvalid:"Le coupon est invalide !",couponError:"Erreur lors de la validation du coupon !",proceedToPayment:"Proc\xE9der au paiement",completePayment:"Finalisez le paiement"}},Le=n=>mu[Fr().bcp47][n]||mu["fr-FR"][n],Ut=n=>{let t=Fr().bcp47;return t in n?n[t]:(console.warn(`Translation [${t}] not found, falling back to default.`,n),n[t]||n["fr-FR"]||n["en-US"]||"")};var Fr=()=>{let{lang:n}=document.documentElement,t={iso639:"fr",bcp47:"fr-FR"};return n.includes("en")&&(t={iso639:"en",bcp47:"en-US"}),t},tn=Fr().bcp47,cf=Fr().iso639;function Fs(n){let t=Object.create(null);for(let e of n.split(","))t[e]=1;return e=>e in t}var Ys=Object.assign;var Uh=Object.prototype.hasOwnProperty,Wo=(n,t)=>Uh.call(n,t),lr=Array.isArray,qi=n=>fu(n)==="[object Map]";var Vh=n=>typeof n=="string",Yr=n=>typeof n=="symbol",Wi=n=>n!==null&&typeof n=="object";var qh=Object.prototype.toString,fu=n=>qh.call(n),pu=n=>fu(n).slice(8,-1);var Ko=n=>Vh(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n;var Go=n=>{let t=Object.create(null);return e=>t[e]||(t[e]=n(e))},Wh=/-(\w)/g,df=Go(n=>n.replace(Wh,(t,e)=>e?e.toUpperCase():"")),Kh=/\B([A-Z])/g,hf=Go(n=>n.replace(Kh,"-$1").toLowerCase()),Gh=Go(n=>n.charAt(0).toUpperCase()+n.slice(1)),mf=Go(n=>n?`on${Gh(n)}`:""),ur=(n,t)=>!Object.is(n,t);var Zh="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly";var ff=Fs(Zh+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var Hs;var Ae;var $s=new WeakSet,Xo=class{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Hs&&Hs.active&&Hs.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,$s.has(this)&&($s.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Jh(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,gu(this),wu(this);let t=Ae,e=nn;Ae=this,nn=!0;try{return this.fn()}finally{bu(this),Ae=t,nn=e,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ec(t);this.deps=this.depsTail=void 0,gu(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?$s.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){zs(this)&&this.run()}get dirty(){return zs(this)}},vu=0,Gi,Zi;function Jh(n,t=!1){if(n.flags|=8,t){n.next=Zi,Zi=n;return}n.next=Gi,Gi=n}function Xs(){vu++}function Qs(){if(--vu>0)return;if(Zi){let t=Zi;for(Zi=void 0;t;){let e=t.next;t.next=void 0,t.flags&=-9,t=e}}let n;for(;Gi;){let t=Gi;for(Gi=void 0;t;){let e=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){n||(n=r)}t=e}}if(n)throw n}function wu(n){for(let t=n.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function bu(n){let t,e=n.depsTail,r=e;for(;r;){let i=r.prevDep;r.version===-1?(r===e&&(e=i),ec(r),Qh(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=i}n.deps=t,n.depsTail=e}function zs(n){for(let t=n.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Xh(t.dep.computed)||t.dep.version!==t.version))return!0;return!!n._dirty}function Xh(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===Qo)||(n.globalVersion=Qo,!n.isSSR&&n.flags&128&&(!n.deps&&!n._dirty||!zs(n))))return;n.flags|=2;let t=n.dep,e=Ae,r=nn;Ae=n,nn=!0;try{wu(n);let i=n.fn(n._value);(t.version===0||ur(i,n._value))&&(n.flags|=128,n._value=i,t.version++)}catch(i){throw t.version++,i}finally{Ae=e,nn=r,bu(n),n.flags&=-3}}function ec(n,t=!1){let{dep:e,prevSub:r,nextSub:i}=n;if(r&&(r.nextSub=i,n.prevSub=void 0),i&&(i.prevSub=r,n.nextSub=void 0),e.subs===n&&(e.subs=r,!r&&e.computed)){e.computed.flags&=-5;for(let o=e.computed.deps;o;o=o.nextDep)ec(o,!0)}!t&&!--e.sc&&e.map&&e.map.delete(e.key)}function Qh(n){let{prevDep:t,nextDep:e}=n;t&&(t.nextDep=e,n.prevDep=void 0),e&&(e.prevDep=t,n.nextDep=void 0)}function Du(n,t){n.effect instanceof Xo&&(n=n.effect.fn);let e=new Xo(n);t&&Ys(e,t);try{e.run()}catch(i){throw e.stop(),i}let r=e.run.bind(e);return r.effect=e,r}var nn=!0,Eu=[];function em(){Eu.push(nn),nn=!1}function tm(){let n=Eu.pop();nn=n===void 0?!0:n}function gu(n){let{cleanup:t}=n;if(n.cleanup=void 0,t){let e=Ae;Ae=void 0;try{t()}finally{Ae=e}}}var Qo=0,Us=class{constructor(t,e){this.sub=t,this.dep=e,this.version=e.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},ea=class{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!Ae||!nn||Ae===this.computed)return;let e=this.activeLink;if(e===void 0||e.sub!==Ae)e=this.activeLink=new Us(Ae,this),Ae.deps?(e.prevDep=Ae.depsTail,Ae.depsTail.nextDep=e,Ae.depsTail=e):Ae.deps=Ae.depsTail=e,_u(e);else if(e.version===-1&&(e.version=this.version,e.nextDep)){let r=e.nextDep;r.prevDep=e.prevDep,e.prevDep&&(e.prevDep.nextDep=r),e.prevDep=Ae.depsTail,e.nextDep=void 0,Ae.depsTail.nextDep=e,Ae.depsTail=e,Ae.deps===e&&(Ae.deps=r)}return e}trigger(t){this.version++,Qo++,this.notify(t)}notify(t){Xs();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Qs()}}};function _u(n){if(n.dep.sc++,n.sub.flags&4){let t=n.dep.computed;if(t&&!n.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)_u(r)}let e=n.dep.subs;e!==n&&(n.prevSub=e,e&&(e.nextSub=n)),n.dep.subs=n}}var Vs=new WeakMap,dr=Symbol(""),qs=Symbol(""),Ji=Symbol("");function Rt(n,t,e){if(nn&&Ae){let r=Vs.get(n);r||Vs.set(n,r=new Map);let i=r.get(e);i||(r.set(e,i=new ea),i.map=r,i.key=e),i.track()}}function Un(n,t,e,r,i,o){let a=Vs.get(n);if(!a){Qo++;return}let s=u=>{u&&u.trigger()};if(Xs(),t==="clear")a.forEach(s);else{let u=lr(n),l=u&&Ko(e);if(u&&e==="length"){let h=Number(r);a.forEach((f,p)=>{(p==="length"||p===Ji||!Yr(p)&&p>=h)&&s(f)})}else switch((e!==void 0||a.has(void 0))&&s(a.get(e)),l&&s(a.get(Ji)),t){case"add":u?l&&s(a.get("length")):(s(a.get(dr)),qi(n)&&s(a.get(qs)));break;case"delete":u||(s(a.get(dr)),qi(n)&&s(a.get(qs)));break;case"set":qi(n)&&s(a.get(dr));break}}Qs()}function Hr(n){let t=Ie(n);return t===n?t:(Rt(t,"iterate",Ji),Vn(n)?t:t.map(Mt))}function tc(n){return Rt(n=Ie(n),"iterate",Ji),n}var nm={__proto__:null,[Symbol.iterator](){return Bs(this,Symbol.iterator,Mt)},concat(...n){return Hr(this).concat(...n.map(t=>lr(t)?Hr(t):t))},entries(){return Bs(this,"entries",n=>(n[1]=Mt(n[1]),n))},every(n,t){return In(this,"every",n,t,void 0,arguments)},filter(n,t){return In(this,"filter",n,t,e=>e.map(Mt),arguments)},find(n,t){return In(this,"find",n,t,Mt,arguments)},findIndex(n,t){return In(this,"findIndex",n,t,void 0,arguments)},findLast(n,t){return In(this,"findLast",n,t,Mt,arguments)},findLastIndex(n,t){return In(this,"findLastIndex",n,t,void 0,arguments)},forEach(n,t){return In(this,"forEach",n,t,void 0,arguments)},includes(...n){return js(this,"includes",n)},indexOf(...n){return js(this,"indexOf",n)},join(n){return Hr(this).join(n)},lastIndexOf(...n){return js(this,"lastIndexOf",n)},map(n,t){return In(this,"map",n,t,void 0,arguments)},pop(){return Ki(this,"pop")},push(...n){return Ki(this,"push",n)},reduce(n,...t){return yu(this,"reduce",n,t)},reduceRight(n,...t){return yu(this,"reduceRight",n,t)},shift(){return Ki(this,"shift")},some(n,t){return In(this,"some",n,t,void 0,arguments)},splice(...n){return Ki(this,"splice",n)},toReversed(){return Hr(this).toReversed()},toSorted(n){return Hr(this).toSorted(n)},toSpliced(...n){return Hr(this).toSpliced(...n)},unshift(...n){return Ki(this,"unshift",n)},values(){return Bs(this,"values",Mt)}};function Bs(n,t,e){let r=tc(n),i=r[t]();return r!==n&&!Vn(n)&&(i._next=i.next,i.next=()=>{let o=i._next();return o.value&&(o.value=e(o.value)),o}),i}var rm=Array.prototype;function In(n,t,e,r,i,o){let a=tc(n),s=a!==n&&!Vn(n),u=a[t];if(u!==rm[t]){let f=u.apply(n,o);return s?Mt(f):f}let l=e;a!==n&&(s?l=function(f,p){return e.call(this,Mt(f),p,n)}:e.length>2&&(l=function(f,p){return e.call(this,f,p,n)}));let h=u.call(a,l,r);return s&&i?i(h):h}function yu(n,t,e,r){let i=tc(n),o=e;return i!==n&&(Vn(n)?e.length>3&&(o=function(a,s,u){return e.call(this,a,s,u,n)}):o=function(a,s,u){return e.call(this,a,Mt(s),u,n)}),i[t](o,...r)}function js(n,t,e){let r=Ie(n);Rt(r,"iterate",Ji);let i=r[t](...e);return(i===-1||i===!1)&&gm(e[0])?(e[0]=Ie(e[0]),r[t](...e)):i}function Ki(n,t,e=[]){em(),Xs();let r=Ie(n)[t].apply(n,e);return Qs(),tm(),r}var im=Fs("__proto__,__v_isRef,__isVue"),Mu=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(Yr));function om(n){Yr(n)||(n=String(n));let t=Ie(this);return Rt(t,"has",n),t.hasOwnProperty(n)}var ta=class{constructor(t=!1,e=!1){this._isReadonly=t,this._isShallow=e}get(t,e,r){if(e==="__v_skip")return t.__v_skip;let i=this._isReadonly,o=this._isShallow;if(e==="__v_isReactive")return!i;if(e==="__v_isReadonly")return i;if(e==="__v_isShallow")return o;if(e==="__v_raw")return r===(i?o?mm:Tu:o?hm:ku).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;let a=lr(t);if(!i){let u;if(a&&(u=nm[e]))return u;if(e==="hasOwnProperty")return om}let s=Reflect.get(t,e,$r(t)?t:r);return(Yr(e)?Mu.has(e):im(e))||(i||Rt(t,"get",e),o)?s:$r(s)?a&&Ko(e)?s:s.value:Wi(s)?i?na(s):jr(s):s}},Ws=class extends ta{constructor(t=!1){super(!1,t)}set(t,e,r,i){let o=t[e];if(!this._isShallow){let u=Br(o);if(!Vn(r)&&!Br(r)&&(o=Ie(o),r=Ie(r)),!lr(t)&&$r(o)&&!$r(r))return u?!1:(o.value=r,!0)}let a=lr(t)&&Ko(e)?Number(e)<t.length:Wo(t,e),s=Reflect.set(t,e,r,$r(t)?t:i);return t===Ie(i)&&(a?ur(r,o)&&Un(t,"set",e,r,o):Un(t,"add",e,r)),s}deleteProperty(t,e){let r=Wo(t,e),i=t[e],o=Reflect.deleteProperty(t,e);return o&&r&&Un(t,"delete",e,void 0,i),o}has(t,e){let r=Reflect.has(t,e);return(!Yr(e)||!Mu.has(e))&&Rt(t,"has",e),r}ownKeys(t){return Rt(t,"iterate",lr(t)?"length":dr),Reflect.ownKeys(t)}},Ks=class extends ta{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}},am=new Ws,sm=new Ks;var Gs=n=>n,Zo=n=>Reflect.getPrototypeOf(n);function cm(n,t,e){return function(...r){let i=this.__v_raw,o=Ie(i),a=qi(o),s=n==="entries"||n===Symbol.iterator&&a,u=n==="keys"&&a,l=i[n](...r),h=e?Gs:t?Zs:Mt;return!t&&Rt(o,"iterate",u?qs:dr),{next(){let{value:f,done:p}=l.next();return p?{value:f,done:p}:{value:s?[h(f[0]),h(f[1])]:h(f),done:p}},[Symbol.iterator](){return this}}}}function Jo(n){return function(...t){return n==="delete"?!1:n==="clear"?void 0:this}}function lm(n,t){let e={get(i){let o=this.__v_raw,a=Ie(o),s=Ie(i);n||(ur(i,s)&&Rt(a,"get",i),Rt(a,"get",s));let{has:u}=Zo(a),l=t?Gs:n?Zs:Mt;if(u.call(a,i))return l(o.get(i));if(u.call(a,s))return l(o.get(s));o!==a&&o.get(i)},get size(){let i=this.__v_raw;return!n&&Rt(Ie(i),"iterate",dr),Reflect.get(i,"size",i)},has(i){let o=this.__v_raw,a=Ie(o),s=Ie(i);return n||(ur(i,s)&&Rt(a,"has",i),Rt(a,"has",s)),i===s?o.has(i):o.has(i)||o.has(s)},forEach(i,o){let a=this,s=a.__v_raw,u=Ie(s),l=t?Gs:n?Zs:Mt;return!n&&Rt(u,"iterate",dr),s.forEach((h,f)=>i.call(o,l(h),l(f),a))}};return Ys(e,n?{add:Jo("add"),set:Jo("set"),delete:Jo("delete"),clear:Jo("clear")}:{add(i){!t&&!Vn(i)&&!Br(i)&&(i=Ie(i));let o=Ie(this);return Zo(o).has.call(o,i)||(o.add(i),Un(o,"add",i,i)),this},set(i,o){!t&&!Vn(o)&&!Br(o)&&(o=Ie(o));let a=Ie(this),{has:s,get:u}=Zo(a),l=s.call(a,i);l||(i=Ie(i),l=s.call(a,i));let h=u.call(a,i);return a.set(i,o),l?ur(o,h)&&Un(a,"set",i,o,h):Un(a,"add",i,o),this},delete(i){let o=Ie(this),{has:a,get:s}=Zo(o),u=a.call(o,i);u||(i=Ie(i),u=a.call(o,i));let l=s?s.call(o,i):void 0,h=o.delete(i);return u&&Un(o,"delete",i,void 0,l),h},clear(){let i=Ie(this),o=i.size!==0,a=void 0,s=i.clear();return o&&Un(i,"clear",void 0,void 0,a),s}}),["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=cm(i,n,t)}),e}function Su(n,t){let e=lm(n,t);return(r,i,o)=>i==="__v_isReactive"?!n:i==="__v_isReadonly"?n:i==="__v_raw"?r:Reflect.get(Wo(e,i)&&i in r?e:r,i,o)}var um={get:Su(!1,!1)};var dm={get:Su(!0,!1)};var ku=new WeakMap,hm=new WeakMap,Tu=new WeakMap,mm=new WeakMap;function fm(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function pm(n){return n.__v_skip||!Object.isExtensible(n)?0:fm(pu(n))}function jr(n){return Br(n)?n:Cu(n,!1,am,um,ku)}function na(n){return Cu(n,!0,sm,dm,Tu)}function Cu(n,t,e,r,i){if(!Wi(n)||n.__v_raw&&!(t&&n.__v_isReactive))return n;let o=pm(n);if(o===0)return n;let a=i.get(n);if(a)return a;let s=new Proxy(n,o===2?r:e);return i.set(n,s),s}function Br(n){return!!(n&&n.__v_isReadonly)}function Vn(n){return!!(n&&n.__v_isShallow)}function gm(n){return n?!!n.__v_raw:!1}function Ie(n){let t=n&&n.__v_raw;return t?Ie(t):n}var Mt=n=>Wi(n)?jr(n):n,Zs=n=>Wi(n)?na(n):n;function $r(n){return n?n.__v_isRef===!0:!1}function Be(n){return ym(n,!1)}function ym(n,t){return $r(n)?n:new Js(n,t)}var Js=class{constructor(t,e){this.dep=new ea,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=e?t:Ie(t),this._value=e?t:Mt(t),this.__v_isShallow=e}get value(){return this.dep.track(),this._value}set value(t){let e=this._rawValue,r=this.__v_isShallow||Vn(t)||Br(t);t=r?t:Ie(t),ur(t,e)&&(this._rawValue=t,this._value=r?t:Mt(t),this.dep.trigger())}};var Ve=async(n,t,e=null,r=!1)=>{let i=new Or,o=Vo(n,e||"null",t.body);if(!ye.bypassCache){let a=await i.get(o);if(a)return a}try{let a=new URL(ye.base_url);r&&(a.pathname=a.pathname.replace("/mews","/_adapter")),a.pathname+=n,a.searchParams.set("enterprise",e||"null");let s=await fetch(a.toString(),t),u=await s.json();if(s.ok)return i.set(o,u,e||"null").catch(l=>{console.error("Error setting cache:",l)}),u;throw new Error("FETCH_ERROR",{cause:u})}catch(a){throw a instanceof Error?console.error(`${a.name} [${n}]`,a.cause):console.error(a),a}};var Iu=(n,t={})=>{let e={method:"POST",headers:ye.headers,body:JSON.stringify(t)};return Ve("/services/getAll",e,n)};function xu(n){return n.Services.map(t=>({id:t.Id,enterpriseId:t.EnterpriseId,isActive:t.IsActive,name:Ut(t.Names),startTime:t.StartTime,endTime:t.EndTime,type:t.Type,ordering:t.Ordering}))}var nc=Be({});async function Pu(n){if(nc.value[n])return nc.value[n];let t=await Iu(n),e=xu(t);return nc.value[n]=e,e}var Ru=(n,t)=>{let e={method:"POST",headers:ye.headers,body:JSON.stringify(t)};return Ve("/ageCategories/getAll",e,n)};function Au(n){if(!n||!n.AgeCategories||!Array.isArray(n.AgeCategories))throw new Error("Invalid age categories response format");return n.AgeCategories.map(t=>({id:t.Id,name:Ut(t.Names),shortName:t.ShortNames?Ut(t.ShortNames):null,classification:t.Classification,isActive:t.IsActive,maximalAge:t.MaximalAge,minimalAge:t.MinimalAge,serviceId:t.ServiceId}))}var rc=Be({});async function Lu(n){if(rc.value[n])return rc.value[n];let t=await Ru(n,{EnterpriseIds:[n]}),e=Au(t);return rc.value[n]=e,e}var Nu=(n,t)=>{let e={method:"POST",headers:ye.headers,body:JSON.stringify(t)};return Ve("/products/getAll",e,n)};function vm(n){if(!n||!n.Enterprise||!n.Enterprise.Id||!n.Enterprise.Name||!n.Enterprise.Address||!n.Enterprise.WebsiteUrl)throw new Error("Invalid configuration data");let t=n.Enterprise;return{id:t.Id,name:t.Name,chainName:t.ChainName,address:t.Address,phone:t.Phone,email:t.Email,timezone:t.TimeZoneIdentifier,url:t.WebsiteUrl,pricing:t.Pricing,coverImageId:t.CoverImageId,logoImageId:t.LogoImageId}}function Ou(n){return zr(n,vm)}function Fu(n){return{currency:n.Currency,datesUtc:n.DatesUtc.map(t=>t.split("T")[0]),timeUnitStartsUTC:n.TimeUnitStartsUtc,categoryPrices:n.CategoryPrices,relativeAdjustment:n.RelativeAdjustment,absoluteAdjustment:n.AbsoluteAdjustment}}function Yu(n){let t={};for(let e of n)e.pricing?.datesUtc.forEach((r,i)=>{t[r]=t[r]||[],t[r].push({rate:e.rate,categoryPrices:e.pricing?.categoryPrices.map(o=>({categoryId:o.CategoryId,amountPrice:o.AmountPrices[i],price:o.Prices[i]}))||[]})});return t}function Hu(n){if(!n||!n.Rates||!Array.isArray(n.Rates))throw new Error("Invalid rates response format");return n.Rates.filter(t=>t.IsActive&&t.IsEnabled&&t.IsPublic).map(t=>({id:t.Id,serviceId:t.ServiceId,baseRateId:t.BaseRateId,isBaseRate:t.IsBaseRate,isActive:t.IsActive,isEnabled:t.IsEnabled,isPublic:t.IsPublic,isDefault:t.IsDefault,type:t.Type,name:Ut(t.Names),shortName:t.ShortName,description:Ut(t.Description),hideFromGuest:t.Options.HidePriceFromGuest,group:n.RateGroups.find(e=>e.Id===t.GroupId)||null,pricing:t.Pricing}))}function zr(n,t){return n.map(t)}function ic(n){return{id:n.Id,serviceId:n.ServiceId,categoryId:n.CategoryId,isActive:n.IsActive,isDefault:n.IsDefault,name:Ut(n.Names),shortName:Ut(n.ShortNames),description:Ut(n.Descriptions),options:n.Options,promotions:n.Promotions,classifications:n.Classifications,pricing:n.Pricing,imageIds:n.ImageIds||[],ordering:n.Ordering,consumptionMoment:n.ConsumptionMoment,chargingMode:n.ChargingMode}}function $u(n){return{products:zr(n.Products,ic),customerProducts:zr(n.CustomerProducts,ic)}}var oc=Be({});async function Bu(n,t){if(oc.value[t])return oc.value[t];let e=await Nu(n,{ServiceIds:[t]}),r=$u(e);return oc.value[t]=r,r}var ju=(n,t={})=>{let e={method:"POST",headers:ye.headers,body:JSON.stringify(t)};return Ve("/rates/getAll",e,n)};var ac=Be({});async function zu(n,t){if(ac.value[t])return ac.value[t];let e=await ju(n,{ServiceIds:[t]}),r=Hu(e);return ac.value[t]=r,r}var Uu=(n,t)=>{let e={method:"POST",headers:ye.headers,body:JSON.stringify(t)};return Ve("/services/getAvailability",e,n)};function Vu(n){if(!n||!n.CategoryAvailabilities||!Array.isArray(n.CategoryAvailabilities)||!n.TimeUnitStartsUtc)throw new Error("Invalid service availabilities response format");return n.CategoryAvailabilities.map(t=>({categoryId:t.CategoryId,timeUnitStartsUTC:n.TimeUnitStartsUtc,availabilities:t.Availabilities||[],adjustments:t.Adjustments||[]}))}var J=class n{static getCurrentDate(){return Se.Now.plainDateISO()}static fromString(t){return Se.PlainDate.from(this.safeParsePlainDate(t))}static formatForDisplay(t,e={weekday:"short",month:"short",day:"numeric"}){return t.toLocaleString(tn,e)}static formatForAPI(t){return(typeof t=="string"?Se.PlainDate.from(t):Se.PlainDate.from(t)).toZonedDateTime({timeZone:"Europe/Paris",plainTime:Se.PlainTime.from("00:00")}).toInstant().toString()}static addDays(t,e){return t.add({days:e})}static daysBetween(t,e){return t.until(e).days}static isBefore(t,e){return Se.PlainDate.compare(t,e)>0}static isAfterOrEqual(t,e){return Se.PlainDate.compare(t,e)<0}static isSameDate(t,e){return Se.PlainDate.compare(t,e)===0}static getDateRange(t,e){let r=[],i=t;for(;this.isBefore(i,e);)r.push(i),i=this.addDays(i,1);return r}static fromJSDate(t){return Se.PlainDate.from({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()})}static toJSDate(t){return new Date(t.year,t.month-1,t.day)}static formatForCalendar(t,e="flatpickr"){if(e==="flatpickr")return t.toString();let r=String(t.day).padStart(2,"0"),i=String(t.month).padStart(2,"0");return`${r}/${i}/${t.year}`}static safeParsePlainDate(t){try{if(t.endsWith("Z")){let e=t.split("T")[0];return Se.PlainDate.from(e)}return Se.PlainDate.from(t)}catch(e){return console.error("Error parsing date string:",e),n.getCurrentDate()}}};var $p=localStorage.getItem("dev")==="true";var Bp=3*60*60*1e3;var qu="AIzaSyBXRY4Jk6cEaWaodqBa6Cdhieejw6l8c2Y",sc=n=>`<svg fill="none" viewBox="0 0 39 54" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="39" height="54"><g clip-path="url(#a)"><path d="M19.5 54c-3.288-5.01-6.676-10.098-9.998-15.089-5.629-8.454-12.375-16.188-8.21-26.975 6.346-16.433 31.605-15.72 36.813 1.032 3.279 10.541-3.101 17.728-8.572 25.946C26.199 43.92 22.754 48.944 19.5 54M18.159 7.484c-6.38.612-10.57 6.87-8.985 12.636 2.37 8.625 14.983 10.184 19.623 2.429 4.386-7.333-1.826-15.91-10.64-15.065z" fill="${n}"/></g><path fill="#fff" d="M34.225 18.783A14.725 14.87 0 0 1 19.5 33.653a14.725 14.87 0 0 1-14.725-14.87 14.725 14.87 0 0 1 29.45 0"/><path fill="url(#b)" d="M12.735 10.174h14.326v14.87H12.735z"/><defs><clipPath id="a"><path fill="#fff" d="M0 0h39v54H0z"/></clipPath><pattern height="1" id="b" patternContentUnits="objectBoundingBox" width="1"><use transform="matrix(.01408 0 0 .01357 0 .025)" xlink:href="#c"/></pattern><image height="70" id="c" preserveAspectRatio="none" width="71" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEcAAABGCAYAAACe7Im6AAAACXBIWXMAABYlAAAWJQFJUiTwAAAGgklEQVR4nO2cWYwURRiAv53lcLniFTFeQQtFAyqBrWhEEUqNhgchJopoPMCIIoqiQER8QLOgRg4V1MADGtFEjIICHkgsISDEVBBNICpaEdTAA9EoIIsIjA81s8wOc3RXV+9uWL4npqv+g5+6+q+/qclms5zgKFqKOcAFwMYOre1MG6QDcCMwPNPanrQltBR1wF6gFphZc2JaObQUY4FpwHnAPmVs93Y/rbQUfYGFwFUFj28DaNcjR0sxEZhT9HizMnYAuMWn3aGl6AksAoaVaL47/4d2FRwtRT3uL38v0L1El0+UsVvyP9pNcLQU44DXqnR7tPDHcR8cLUUNsAC4v0rX+crYnwsfHNfByQXmO+DSKl33A1OLHx63h0AtxXXAcqoHBmCyMnZf8cPjbivXUnQEXgEejCiyQxnbq1RDs5GjpTgpmWttgluIHhiAh8o1NI0cLcWVwArgb2AL8DmwVhm71d/PlkNLMQaYBHQBugGnRRDboIwdVK6xJpvNoqU4BdgFdC7RZxPQoIz9ML7L6aOl6ALMA8Z4iA9Qxm4u15ifVqsoHRiAgcAyLcV7WorTPRxIm0HAHR5yiysFBiCTm04ygrJbgc25/q2OlqJWS7EI6AV8EFP8EPBEtU4ZYHgMpecAG7UU/WI6E5TcxrERGI17o74zpopnlLG7q3XKAFfEd48JHjJB0FJ0Ar4m2mgvxV7gxSgdM8CZHgZ8HQvBV8BlCeSnKmP/jdIxQ/mFuBL9tRRRTp5B0VIsAeoTqPhVGftq1M4Z4IinoZGecl5oKRrIZegSEGu7zwD/eRoa31Inai3FcFx+NwnrlLFfxBHI4LY1H04GxnnKRkZLcTbwfgBV1VIWx5ABTk1gcEbO+TRZTvLUylvK2B/jCmWAHQmM1gFfpjW9tBTTgAEJ1TQCE30EM0DFI3QELgTWaSlqE+pphpZCAg0BVDUoY//0EcwAXoJF1AOfBdBTyMoAOnYoY2f6CmdwczoE12spxodQpKV4CTgjgKrJSYTzKYtluOlxEdAxgb7DQNeoJ9BSaCluwOWSkrJdGXt+EgX5lMUoZWw/kjtVS4XMWjW0FD0Is20D3JVUQQZAGXsg9zvErpNkEV0B9Ajgw3pl7PqkSppyyFqK7sCQpAqBLlqKm+IKaSleAAYHsA8wKoSSwgT7SNy0CMHzcTprKW4HpgSy/boy9vcQivILci2wHZfMCkUfZey2ap20FL2AXwLZPKSMTbKhNCM/cvoQNjAAcyP2+zSgzUkBdTUFJ+jpNscwLcXllTpoKRYAFweyt0sZ+3IgXcDR4HwPrA6pOMe75Rq0FEOAsQFtBTmAFtLsOlhLMR13W9gzoI1JytjZhQ+0FBlgD9A1kI2yV7pJaHYdrIydDvTGXZKFYpaW4tyiZ4sJFxiApwLqaqJsIYGW4jngyUB2Nilj63N6++Kum0OxSxl7VkB9TZQtQVHGTgVClWAMzFVWAcwPpDNP4teEclQsQcm9BK4CagLYagRG4FIRoc4iTSMyDSoWLyljVxNuR6kDlgAHA+kDvzvyyEQqXtJSbMOlNNoSHyljR6RpIGrZW8jzSChi3ybEJVJwlLFrgBnpuhKLN6IUAiQlcsGkMvZp4PEUfYnDwy1hJFY1qTJ2LjAUCJIS8GShMnZ/SxiKXWqbm2L9cdUOrcE7LWXIqw5ZGfuHMvZqYE1YdyLhnbyPS6IibWXsUOAbT/Ej+FV4dPO0F5sQFezXAOs85LLAPx5ywTJ91UgcHGXsfmXsYFy11RBckXTh/ftuSo+QWlzNcNz3t9883PQilfJ+LcUU3A3ASlyx9AOEGaU7lbFpV3U0kdaHIctxp+o+wH34TZ9iDtLCJ/VUgqOM/QF383kJLjBZXBWnbxXZQkAoYz8O42E0UvneSktxD+5TQXCVYx1w//I1uPv0qAn9tcBjythvA7sYibQ+RiusDs/b6ITL6Ryi9PeVxbypjB0d2rE4BA9Oroi6d5nmOtzIye8C5ZJojcAjgV2LTRprzs24IBRzGPgLN3L2UXn9mV3qy7mWJo3gXFvBVn7t6YybZqXYw7EfwrcKaQSn1KgBN4W64U64NbjR01iiX0fg7VytTquSxoJ8oEp7vgbocJn2Olz5bzU9qZNGcKIWYFYqlJqnjA2ZiPcijWm1M4COVg8MpBOcnxLKzwKWhnAkKWlMK9+i76W4LXxDSGeSkNZb+VjgWVxKohKNwFZgQuH/PtJW+B8ku7Vobv83DwAAAABJRU5ErkJggg=="/></defs></svg>`,cc={accent_color:"#C64509",info_window_max_width:200},ra="calendar-day-price",Wu="DD/MM/YYYY",Ku="Y-m-d",lc=!1,wm=365,uc=J.getCurrentDate(),Gu=J.addDays(uc,wm),xn=J.getCurrentDate(),qn=J.addDays(xn,3),bm=J.getCurrentDate(),jp=J.addDays(bm,30);function hr(n=!0,t=document.body){t.querySelectorAll('[data-fs-element="preloader"]').forEach(r=>{r.classList.toggle("hide",!n)})}function Zu(n=!0,t=document.body,e=Le("fatalErrorMessage")){t.querySelectorAll('[data-fs-element="preloader"]').forEach(i=>{let o=i.querySelector('[data-fs-element="spinner"]'),a=i.querySelector('[data-fs-element="message"]'),s=i.firstChild;o&&o.classList.toggle("hide",n),a&&(n?(s.style.width="90%",a.textContent=e):(s.removeAttribute("style"),a.textContent=Le("pleaseWait"))),i.classList.toggle("hide",!n)})}function Ju(n,t){document.addEventListener(n,t)}var dc=class{constructor(){O(this,"state",jr({appartmentsData:[],today:J.getCurrentDate(),lowestPricesByDate:{},isLoadingPrices:!1,isLoadingData:!1}))}setAppartmentsData(t){this.state.appartmentsData=t}setLowestPricesByDate(t){this.state.lowestPricesByDate=t}setLoadingPrices(t){this.state.isLoadingPrices=t}setLoadingData(t){this.state.isLoadingData=t}reset(){this.state.appartmentsData=[],this.state.lowestPricesByDate={},this.state.isLoadingPrices=!1,this.state.isLoadingData=!1}},Qp=new dc;var mr={get:n=>{try{let t=localStorage.getItem(n);return t?JSON.parse(t):null}catch(t){return console.error(`Error reading from localStorage for key ${n}:`,t),null}},set:(n,t)=>{try{localStorage.setItem(n,JSON.stringify(t)),mr.touch()}catch(e){console.error(`Error writing to localStorage for key ${n}:`,e)}},update:(n,t)=>{let e=mr.get(n),r=t(e);mr.set(n,r)},remove:n=>{localStorage.removeItem(n),mr.touch()},clear:()=>{localStorage.clear()},has:n=>localStorage.getItem(n)!==null,touch:()=>{localStorage.setItem("lastUpdater",Dm()||"root")}},Dm=()=>localStorage.getItem("lastUpdater");var Wn=mr.get("form_state"),Xu=Wn?{enterpriseId:Wn.enterpriseId||"",startDate:Wn.startDate||"",endDate:Wn.endDate||"",guests:Wn.guests||0,coupon:Wn.coupon||"",referrer:Wn.referrer||window.location.href,rooms:Wn.rooms||0}:{enterpriseId:"",startDate:xn.toString(),endDate:qn.toString(),guests:0,coupon:"",referrer:window.location.href,rooms:0},_e=jr(Xu),Em=na(Xu);Du(()=>{mr.set("form_state",_e)});var _m="data-fs-element";var Xe=(n,t=document)=>t.querySelector(`[${_m}="${n}"]`);var hc=Be({});async function Qu(n,t,e,r){if(hc.value[t])return hc.value[t];let i=await Uu(n,{ServiceId:t,FirstTimeUnitStartUtc:J.formatForAPI(e),LastTimeUnitStartUtc:J.formatForAPI(r)}),o=Vu(i);return hc.value[t]=o,o}var ed=(n,t)=>{let e={method:"POST",headers:ye.headers,body:JSON.stringify(t)};return Ve("/restrictions/getAll",e,n)};function td(n){if(!n||!n.Restrictions||!Array.isArray(n.Restrictions))throw new Error("Invalid service restrictions response format");return n.Restrictions}var mc=Be({});async function nd(n,t,e,r){if(mc.value[t])return mc.value[t];let i=await ed(n,{ServiceIds:[t],CollidingUtc:{StartUtc:J.formatForAPI(e),EndUtc:J.formatForAPI(r)},Origin:"User"}),o=td(i);return mc.value[t]=o,o}var rd=(n,t)=>{let e={method:"POST",headers:ye.headers,body:JSON.stringify(t)};return Ve("/rules/getAll",e,n)};function id(n){if(!n||!n.Rules||!Array.isArray(n.Rules))throw new Error("Invalid service rules response format");return n.Rules.map(t=>({id:t.Id,serviceId:t.ServiceId,conditions:t.Conditions,actions:n.RuleActions!=null?n.RuleActions.filter(e=>e.RuleId===t.Id):n.RuleActions}))}var fc=Be({});async function od(n,t){if(fc.value[t])return fc.value[t];let e=await rd(n,{ServiceIds:[t],Extent:{RuleActions:!0}}),r=id(e);return fc.value[t]=r,r}var ad=(n,t)=>{let e={method:"POST",headers:ye.headers,body:JSON.stringify(t)};return Ve("/rates/getPricing",e,n)};var pc=Be({});async function sd(n,t,e,r){if(pc.value[t])return pc.value[t];let i=await ad(n,{RateId:t,FirstTimeUnitStartUtc:J.formatForAPI(e),LastTimeUnitStartUtc:J.formatForAPI(r)}),o=Fu(i);return pc.value[t]=o,o}var ia=class{constructor(t,e){O(this,"enterprise");O(this,"rate",null);O(this,"pricing",null);this.enterprise=t,this.rate=e}getRate(){if(!this.rate)throw new Error("Rate is not initialized");return this.rate}async initPricing(t,e){if(!this.rate)throw new Error("Rate is not initialized");return this.pricing=await sd(this.enterprise.getEnterpriseId(),this.rate.id,t,e),this.pricing}getPricing(){if(!this.pricing)throw new Error("Rate pricing is not initialized");return this.pricing}};var oa=class{constructor(t,e){O(this,"enterprise");O(this,"service",null);O(this,"products",[]);O(this,"customerProducts",[]);O(this,"restrictions",[]);O(this,"availabilities",[]);O(this,"rules",[]);O(this,"ageCategories",[]);O(this,"rates",[]);this.enterprise=t,this.service=e}getService(){return this.service}async initAvailabilities(t,e){if(!this.service)throw new Error("Service is not initialized");return this.availabilities=await Qu(this.enterprise.getEnterpriseId(),this.service.id,t,e),this.availabilities}getAvailabilities(){if(this.availabilities.length===0)throw new Error("Service availabilities are not initialized");return this.availabilities}async initRestrictions(t,e){if(!this.service)throw new Error("Service is not initialized");return this.restrictions=await nd(this.enterprise.getEnterpriseId(),this.service.id,t,e),this.restrictions}getRestrictions(){if(this.restrictions.length===0)throw new Error("Service restrictions are not initialized");return this.restrictions}async initProducts(){if(!this.service)throw new Error("Service is not initialized");let t=await Bu(this.enterprise.getEnterpriseId(),this.service.id);return this.products=t.products,this.customerProducts=t.customerProducts,t}getProducts(){if(this.products.length===0)throw new Error("Service products are not initialized");return this.products}async initRates(){if(!this.service)throw new Error("Service is not initialized");let t=await zu(this.enterprise.getEnterpriseId(),this.service.id);if(this.rates=t.map(e=>new ia(this.enterprise,e)),this.rates.length===0)throw new Error("No rates found for the service");return this.rates}getRates(){if(this.rates.length===0)throw new Error("Service rates are not initialized");return this.rates?.map(t=>t.getRate())||[]}async initRules(){if(!this.service)throw new Error("Service is not initialized");return this.rules=await od(this.enterprise.getEnterpriseId(),this.service.id),this.rules}getRules(){if(this.rules.length===0)throw new Error("Service rules are not initialized");return this.rules}async initAgeCategories(){if(!this.service)throw new Error("Service is not initialized");return this.ageCategories=await Lu(this.enterprise.getEnterpriseId()),this.ageCategories}getAgeCategories(){if(this.ageCategories.length===0)throw new Error("Age categories are not initialized");return this.ageCategories}};var Ur=class{constructor(t){O(this,"enterpriseId");O(this,"services",[]);O(this,"reservableService",null);this.enterpriseId=t}async initServices(){this.services=await Pu(this.enterpriseId);let t=this.services.find(e=>e.type.toLowerCase()==="reservable");return t&&(this.reservableService=new oa(this,t)),this.services}getEnterpriseId(){return this.enterpriseId}getServices(){return this.services}getReservableService(){return this.reservableService?.getService()??null}};var Xi=class{constructor(t){this.fsListInstance=t;O(this,"cmsAparthotels",[]);O(this,"state",{startDate:_e.startDate?J.safeParsePlainDate(_e.startDate):xn,endDate:_e.endDate?J.safeParsePlainDate(_e.endDate):qn,apiDataCache:new Map});Pt("loading:start",e=>hr(!0,e)),Pt("loading:end",e=>hr(!1,e))}init(){_t("loading:start",this.fsListInstance.wrapperElement),this.fsListInstance.addHook("filter",async t=>{console.log("*** Filter hook triggered with items:",t),_t("loading:start",this.fsListInstance.wrapperElement),await new Promise(r=>setTimeout(r,100)),await this.updateListItems(t,{startDate:this.state.startDate.toString(),endDate:this.state.endDate.toString(),guests:_e.guests||1,rooms:_e.rooms||1});let e=t.filter(r=>Number(r.fields["price-sort"]?.value||9999999)<9999999);return console.log("===> Filtered items:",e),_t("loading:end",this.fsListInstance.wrapperElement),e}),Pt("date:changed",t=>{console.log("Date changed:",t),this.state.startDate=J.safeParsePlainDate(t.startDate),this.state.endDate=J.safeParsePlainDate(t.endDate),_e.startDate=t.startDate,_e.endDate=t.endDate,this.fsListInstance.triggerHook("filter")})}groupItemsByEnterprise(t){let e={};return t.forEach(r=>{if(!r.fields["enterprise-id"]||!r.fields["resource-category-id"])return;let i=r.fields["enterprise-id"].value,o=r.fields["resource-category-id"].value;e[i]||(e[i]=[]),e[i].includes(o)||e[i].push(o)}),console.log("#=> Grouped by enterprise:",e),e}createCacheKey(t,e,r,i){return`${t}_${e}_${r}_${i.sort().join(",")}`}async fetchApiData(t,e,r){let o=Date.now(),a=[],s=[];for(let[l,h]of Object.entries(r)){let f=this.createCacheKey(t,e,l,h),p=this.state.apiDataCache.get(f);if(p&&o-p.timestamp<3e5){console.log(`Using cached data for ${l} with ${h.length} categories`),a.push(p);continue}let E=(async()=>{try{let S=new Ur(l);await S.initServices();let{reservableService:k}=S,R=k?.getService()?.id;if(!R)return console.warn(`No serviceId found for enterprise ${l}`),null;await k?.initAgeCategories();let $=k?.getAgeCategories()||[],V=await Promise.all([du(l,{EnterpriseId:l,CategoryIds:h,StartUtc:J.formatForAPI(t),EndUtc:J.formatForAPI(e),ServiceId:R,Client:ye.bookingEngineClient,LanguageCode:"fr-FR"}),hu(l,{Client:ye.bookingEngineClient,EnterpriseId:l,StartUtc:J.formatForAPI(t),EndUtc:J.formatForAPI(e),ServiceId:R,CategoryIds:h,CurrencyCode:"EUR"})]),q=V[0],U=V[1],Z={enterpriseId:l,ageCategories:$,availabilities:q,servicePricing:U,timestamp:o};return this.state.apiDataCache.set(f,Z),Z}catch(S){return console.error(`Error fetching data for enterprise ${l}:`,S),null}})();s.push(E)}let u=await Promise.all(s);return[...a,...u.filter(Boolean)]}async updateListItems(t,{startDate:e,endDate:r,guests:i,rooms:o}){let a=this.groupItemsByEnterprise(t),s=await this.fetchApiData(e,r,a);return console.log("#=> API Data:",s),(await Promise.all(t.map(async l=>{let h=!1,f=!0;if(this.screenItem(l,!0),!l.fields["enterprise-id"]){console.warn(`Item missing enterprise-id field: [${l.fields.title?.value||""}]\u21FE[${l.fields.name?.value||""}]`,l),l.element.style.opacity="0.5",this.screenItem(l,!1,Le("missingEnterpriseId"));return}if(!l.fields["resource-category-id"]){console.warn(`Item missing resource-category-id field: [${l.fields.title?.value||""}]\u21FE[${l.fields.name?.value||""}]`,l),l.element.style.opacity="0.5",this.screenItem(l,!1,Le("missingCategoryId"));return}let p=l.fields["enterprise-id"].value,E=l.fields["resource-category-id"].value,S=s.find(Z=>Z&&Z.enterpriseId===p);if(!S){console.warn(`No data found for enterpriseId: ${p} in item: [${l.fields.title.value}]\u21FE[${l.fields.name.value}]`),l.element.style.opacity="0.5",this.screenItem(l,!1,Le("booked"));return}let k=S.availabilities.ApplicableRestrictions||[],R={title:l.fields.title.value,name:l.fields.name.value,exactRateId:"",baseRateId:"",rateGroupId:"",categoryId:E,categoryType:"notVilla",guests:i,startDate:J.fromString(e),endDate:J.fromString(r)},$=this.checkReservationAgainstRestrictions(R,k);return console.log("Restriction Verdict:",$),f=S.availabilities.CategoryAvailabilities.find(Z=>Z.CategoryId===R.categoryId)?.Availabilities?.slice(0,-1).every(Z=>Z>0)||!1,h=$.block,h?this.screenItem(l,!1,$.message||Le("booked")):this.screenItem(l,!0),this.updateItemPrice(l,S.servicePricing,E,{startDate:e,endDate:r,guests:i,isLimited:h,isReservable:f,restrictions:k,restrictionMessage:$.message,restrictionBlock:$.block}),l.collectFields(),l;return f?l:null}))).filter(l=>l!==null)}checkReservationAgainstRestrictions(t,e){console.log("Restrictions:",e);let r=e.filter(s=>this.matchesCondition(t,s.Conditions));if(console.log("Applicable Restrictions:",r),r.length===0)return{block:!1,message:null};let i=r.some(s=>{let{Exceptions:u}=s;return u.MaxAdvance==null&&u.MinAdvance==null&&u.MaxLength==null&&u.MinLength==null&&u.MaxPrice==null&&u.MinPrice==null&&u.MaxReservationCount==null&&u.MinReservationCount==null});if(console.log("Has full restriction:",i),i)return{block:!0,message:Le("booked")};let o=this.getExtremesFromExceptions(r);console.log("Restriction Extremes:",o);let a=this.violatesException(t,o);return console.log("Violation:",a),a?{block:!0,message:a}:{block:!1,message:null}}matchesCondition(t,e){return(e.ExactRateId===null||t.exactRateId===e.ExactRateId)&&(e.BaseRateId===null||t.baseRateId===e.BaseRateId)&&(e.RateGroupId===null||t.rateGroupId===e.RateGroupId)&&(e.ResourceCategoryId===null||t.categoryId===e.ResourceCategoryId)&&(e.ResourceCategoryType===null||t.categoryType===e.ResourceCategoryType)&&e.Days.includes(t.startDate.toLocaleString("en-US",{weekday:"long"}))&&!0}getDurationInDays(t){if(!t)return null;try{return Se.Duration.from(t).total({unit:"days"})}catch{return null}}getExtremesFromExceptions(t){let e=null,r=null,i=null,o=null,a=!1;for(let s of t){let u=this.getDurationInDays(s.Exceptions.MinAdvance),l=this.getDurationInDays(s.Exceptions.MaxAdvance),h=this.getDurationInDays(s.Exceptions.MinLength),f=this.getDurationInDays(s.Exceptions.MaxLength);u!==null&&(e=Math.max(e??u,u)),l!==null&&(r=Math.min(r??l,l)),h!==null&&(i=Math.max(i??h,h)),f!==null&&(o=Math.min(o??f,f)),!u&&!l&&!h&&!f&&(a=!0)}return{MinAdvance:e,MaxAdvance:r,MinLength:i,MaxLength:o,Restrict:a}}violatesException(t,e){let{startDate:r}=t,{endDate:i}=t,o=i.since(r,{largestUnit:"day"}).days,a=J.getCurrentDate(),s=r.since(a,{largestUnit:"day"}).days;return e.MinLength&&o<e.MinLength?`${e.MinLength} ${Le("minimumNights")}`:e.MaxLength&&o>e.MaxLength?`${e.MaxLength} ${Le("maximumNights")}`:e.MinAdvance&&s<e.MinAdvance?Le("booked"):e.MaxAdvance&&s>e.MaxAdvance?Le("booked"):!e.MinLength&&!e.MaxLength&&!e.MinAdvance&&!e.MaxAdvance?Le("booked"):null}updateItemPrice(t,e,r,{startDate:i,endDate:o,guests:a,isLimited:s,isReservable:u,restrictions:l,restrictionMessage:h,restrictionBlock:f}){console.groupCollapsed(`[${t.fields.title.value}] \u21FE [${t.fields.name.value}] PRICE UPDATE`),console.log(`Is Limited: ${s}`),console.log(`Is Reservable: ${u}`),console.log(`Restriction Block: ${f}`),console.log(`Restriction Message: ${h||"None"}`);let p=Xe("price",t.element),E=t.element.querySelector('[fs-list-field="price-sort"]'),S=Xe("total-price",t.element),k=J.fromString(i).until(J.fromString(o)).total({unit:"days"});s&&u&&E&&(E.textContent="999999"),!u&&E&&(E.textContent="9999999");let R=e?.CategoryPrices?.find(U=>U.CategoryId===r);if(console.log("Category Price:",R),console.log("Restrictions:",l),!R||s&&u){if(p){p.textContent="-";let U=p.parentElement;U&&(U.style.opacity="0")}if(S){S.textContent=`- ${Le("total").toLowerCase()} (${k} ${Le("night")}s)`;let U=S.parentElement;U&&(U.style.opacity="0")}E&&u&&(E.textContent="999999"),R||(console.warn(`No price found for categoryId: ${r}`),s||this.screenItem(t,!1,Le("booked"))),console.groupEnd();return}if(!u){if(p){p.textContent="-";let U=p.parentElement;U&&(U.style.opacity="0")}if(S){S.textContent=`- ${Le("total").toLowerCase()} (${k} ${Le("night")}s)`;let U=S.parentElement;U&&(U.style.opacity="0")}console.warn(`No availability found for categoryId: ${r}`),this.screenItem(t,!1,Le("booked")),console.groupEnd();return}let $=R.OccupancyPrices[0]?.RateGroupPrices.reduce((U,Z)=>Z.MinPrice.AverageAmountPerTimeUnit.GrossValue<U.MinPrice.AverageAmountPerTimeUnit.GrossValue?Z:U);if(console.log("Lowest Price:",$),!$){p&&(p.textContent="-"),E&&u&&(E.textContent="999999"),console.groupEnd();return}let V=$.MinPrice.AverageAmountPerTimeUnit.GrossValue,q=V.toLocaleString(tn,{style:"currency",currency:"EUR",maximumFractionDigits:2});if(p){p.textContent=q;let U=p.parentElement;U&&(U.style.opacity="1")}if(E&&(E.textContent=V.toString()),S){let Z=(V*k).toLocaleString(tn,{style:"currency",currency:"EUR",maximumFractionDigits:2});S.textContent=`${Z} ${Le("total").toLowerCase()} (${k} ${Le("night")}s)`;let re=S.parentElement;re&&(re.style.opacity="1")}console.groupEnd()}screenItem(t,e,r=Le("select")||""){let i=Xe("submit",t.element);i&&(e?(t.element.style.opacity="1",i.classList.remove("room-results_cta-disabled"),i.textContent=r):i.classList.contains("room-results_cta-disabled")||(i.classList.add("room-results_cta-disabled"),i.textContent=r))}};var Qi=()=>{};function eo(n,t,e,r){return n?(n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)):Qi}var aa=n=>n instanceof HTMLInputElement;var gc=(n,t)=>(Array.isArray(t)||(t=[t]),t.map(r=>n.dispatchEvent(new Event(r,{bubbles:!0}))).every(r=>r));var to=n=>{let{value:t}=n;if(n.type==="checkbox"&&(t=n.checked.toString()),n.type==="radio"){let e=n.closest("form")?.querySelector(`input[name="${n.name}"]:checked`);t=aa(e)?e.value:""}return t.toString()};var no=(n,t)=>{let{type:e}=n,r=e==="radio";if(r||e==="checkbox"){if(!aa(n)||typeof t!="boolean"||t===n.checked||r&&t===!1)return;n.checked=t}else{if(n.value===t)return;n.value=t.toString()}gc(n,["click","input","change"])};function cd(n,t){return{rate:n,pricing:t}}function yc(n){return n.isActive&&n.isEnabled&&n.isPublic&&!n.hideFromGuest}function ld(n,t){let e=t.filter(o=>Mm(n,o.Conditions));return!!(e.some(o=>{let{Exceptions:a}=o;return a.MaxAdvance==null&&a.MinAdvance==null&&a.MaxLength==null&&a.MinLength==null&&a.MaxPrice==null&&a.MinPrice==null&&a.MaxReservationCount==null&&a.MinReservationCount==null})||e.some(o=>Sm(n,o.Exceptions)))}function Mm(n,t){return(t.ExactRateId===null||n.rate.id===t.ExactRateId)&&(t.BaseRateId===null||n.rate.baseRateId===t.BaseRateId)&&(t.ExactRateId===null||n.rate.baseRateId===t.ExactRateId)&&(t.RateGroupId===null||n.rate.group?.Id===t.RateGroupId)&&t.ResourceCategoryId===null&&t.ResourceCategoryType===null&&n.pricing?.datesUtc.every(e=>{let r=J.fromString(e);return t.Days.includes(r.toLocaleString("en-US",{weekday:"long"}))})&&!0}function sa(n){if(!n)return null;try{return Se.Duration.from(n).total({unit:"days"})}catch{return null}}function Sm(n,t){let e=J.fromString(n.pricing?.datesUtc[0]),r=J.fromString(n.pricing?.datesUtc.at(-1));if(!e||!r)return console.warn("Missing date information, cannot check restrictions"),!0;let i=r.since(e,{largestUnit:"day"}).days,o=J.getCurrentDate(),a=e.since(o,{largestUnit:"day"}).days,s=sa(t.MinAdvance),u=sa(t.MaxAdvance),l=sa(t.MinLength),h=sa(t.MaxLength);return!!(l&&i<l||h&&i>h||s&&a<s||u&&a>u||!t.MinLength&&!t.MaxLength&&!t.MinAdvance&&!t.MaxAdvance)}var ud=(n,t)=>{let e=n.find(s=>s.rate.isBaseRate),r=n.filter(s=>!ld(s,t)&&yc(s.rate)),i=Object.groupBy(r,s=>s.rate.group?.Name||"unknown"),o=Yu(r),a=km(o);return{baseRate:e,allowedRates:r,groupedRates:i,datedPrices:o,lowestDatedPrices:a}};function km(n){let t={};for(let[e,r]of Object.entries(n)){let i=1/0,o=r.filter(a=>yc(a.rate));for(let a of o)for(let s of a.categoryPrices)s.price<i&&(i=s.price);i!==1/0&&(t[e]=i)}return t}var vc=async n=>{let t=await Promise.all(n.map(async r=>{let i=new Ur(r);await i.initServices();let o=i.reservableService;if(!o){console.error("No reservable service found for the enterprise.");return}await o.initRates();let a=[],s=await Promise.all(o.rates.map(async l=>{let h=await l.initPricing(J.formatForAPI(uc.toString()),J.formatForAPI(Gu.toString()));return cd(l.getRate(),h)}));return ud(s,a).lowestDatedPrices})),e={};for(let r of t)if(r)for(let[i,o]of Object.entries(r))(!e[i]||o<e[i])&&(e[i]=o);return e};var We=class We extends Date{constructor(e=null,r="YYYY-MM-DD",i="en-US"){super(We.parseDateTime(e,r,i));O(this,"lang");this.lang=i}static parseDateTime(e,r="YYYY-MM-DD",i="en-US"){if(!e)return new Date(new Date().setHours(0,0,0,0));if(e instanceof We)return e.toJSDate();if(e instanceof Date)return e;if(/^-?\d{10,}$/.test(String(e)))return new Date(Number(e));if(typeof e=="string"){let o=[],a=null;for(;(a=We.regex.exec(r))!=null;)a[1]!=="\\"&&o.push(a);if(o.length){let s={year:null,month:null,shortMonth:null,longMonth:null,day:null,hour:0,minute:0,second:0,ampm:null,value:""};o[0].index>0&&(s.value+=".*?");for(let[l,h]of Object.entries(o)){let f=Number(l),{group:p,pattern:E}=We.formatPatterns(h[0],i);s[p]=f+1,s.value+=E,s.value+=".*?"}let u=new RegExp(`^${s.value}$`);if(u.test(e)){let l=u.exec(e),h=Number(l[s.year]),f=null;s.month?f=Number(l[s.month])-1:s.shortMonth?f=We.shortMonths(i).indexOf(l[s.shortMonth]):s.longMonth&&(f=We.longMonths(i).indexOf(l[s.longMonth]));let p=Number(l[s.day])||1,E=Number(l[s.hour]),S=Number.isNaN(E)?0:E,k=Number(l[s.minute]),R=Number.isNaN(k)?0:k,$=Number(l[s.second]),V=Number.isNaN($)?0:$,q=l[s.ampm];return q&&q==="PM"&&(S+=12,S===24&&(S=0)),new Date(h,f,p,S,R,V,0)}}}return new Date(new Date().setHours(0,0,0,0))}static shortMonths(e){return We.MONTH_JS.map(r=>new Date(2019,r).toLocaleString(e,{month:"short"}))}static longMonths(e){return We.MONTH_JS.map(r=>new Date(2019,r).toLocaleString(e,{month:"long"}))}static formatPatterns(e,r){switch(e){case"YY":case"YYYY":return{group:"year",pattern:`(\\d{${e.length}})`};case"M":return{group:"month",pattern:"(\\d{1,2})"};case"MM":return{group:"month",pattern:"(\\d{2})"};case"MMM":return{group:"shortMonth",pattern:`(${We.shortMonths(r).join("|")})`};case"MMMM":return{group:"longMonth",pattern:`(${We.longMonths(r).join("|")})`};case"D":return{group:"day",pattern:"(\\d{1,2})"};case"DD":return{group:"day",pattern:"(\\d{2})"};case"h":case"H":return{group:"hour",pattern:"(\\d{1,2})"};case"hh":case"HH":return{group:"hour",pattern:"(\\d{2})"};case"m":return{group:"minute",pattern:"(\\d{1,2})"};case"mm":return{group:"minute",pattern:"(\\d{2})"};case"s":return{group:"second",pattern:"(\\d{1,2})"};case"ss":return{group:"second",pattern:"(\\d{2})"};case"a":case"A":return{group:"ampm",pattern:"(AM|PM|am|pm)"}}}getWeek(e){let r=new Date(this.midnight_ts(this)),i=(this.getDay()+(7-e))%7;r.setDate(r.getDate()-i);let o=r.getTime();return r.setMonth(0,1),r.getDay()!==e&&r.setMonth(0,1+(4-r.getDay()+7)%7),1+Math.ceil((o-r.getTime())/6048e5)}clone(){return new We(this)}toJSDate(){return new Date(this)}inArray(e,r="[]"){return e.some(i=>i instanceof Array?this.isBetween(i[0],i[1],r):this.isSame(i,"day"))}isBetween(e,r,i="()"){switch(i){default:case"()":return this.midnight_ts(this)>this.midnight_ts(e)&&this.midnight_ts(this)<this.midnight_ts(r);case"[)":return this.midnight_ts(this)>=this.midnight_ts(e)&&this.midnight_ts(this)<this.midnight_ts(r);case"(]":return this.midnight_ts(this)>this.midnight_ts(e)&&this.midnight_ts(this)<=this.midnight_ts(r);case"[]":return this.midnight_ts()>=this.midnight_ts(e)&&this.midnight_ts()<=this.midnight_ts(r)}}isBefore(e,r="days"){switch(r){case"day":case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()>new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(e.getFullYear(),e.getMonth(),1).getTime()>new Date(this.getFullYear(),this.getMonth(),1).getTime();case"year":case"years":return e.getFullYear()>this.getFullYear()}throw new Error("isBefore: Invalid unit!")}isSameOrBefore(e,r="days"){switch(r){case"day":case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()>=new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(e.getFullYear(),e.getMonth(),1).getTime()>=new Date(this.getFullYear(),this.getMonth(),1).getTime()}throw new Error("isSameOrBefore: Invalid unit!")}isAfter(e,r="days"){switch(r){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>new Date(e.getFullYear(),e.getMonth(),1).getTime();case"year":case"years":return this.getFullYear()>e.getFullYear()}throw new Error("isAfter: Invalid unit!")}isSameOrAfter(e,r="days"){switch(r){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>=new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>=new Date(e.getFullYear(),e.getMonth(),1).getTime()}throw new Error("isSameOrAfter: Invalid unit!")}isSame(e,r="days"){switch(r){case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()===new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()===new Date(e.getFullYear(),e.getMonth(),1).getTime()}throw new Error("isSame: Invalid unit!")}add(e,r="days"){switch(r){case"day":case"days":this.setDate(this.getDate()+e);break;case"month":case"months":this.setMonth(this.getMonth()+e)}return this}subtract(e,r="days"){switch(r){case"day":case"days":this.setDate(this.getDate()-e);break;case"month":case"months":this.setMonth(this.getMonth()-e)}return this}diff(e,r="days"){switch(r){default:case"day":case"days":return Math.round((this.midnight_ts()-this.midnight_ts(e))/864e5);case"month":case"months":let i=12*(e.getFullYear()-this.getFullYear());return i-=e.getMonth(),i+=this.getMonth(),i}}format(e,r="en-US"){let i="",o=[],a=null;for(;(a=We.regex.exec(e))!=null;)a[1]!=="\\"&&o.push(a);if(o.length){o[0].index>0&&(i+=e.substring(0,o[0].index));for(let[s,u]of Object.entries(o)){let l=Number(s);i+=this.formatTokens(u[0],r),o[l+1]&&(i+=e.substring(u.index+u[0].length,o[l+1].index)),l===o.length-1&&(i+=e.substring(u.index+u[0].length))}}return i.replace(/\\/g,"")}midnight_ts(e){return e?new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0).getTime():new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0,0).getTime()}formatTokens(e,r){switch(e){case"YY":return String(this.getFullYear()).slice(-2);case"YYYY":return String(this.getFullYear());case"M":return String(this.getMonth()+1);case"MM":return`0${this.getMonth()+1}`.slice(-2);case"MMM":return We.shortMonths(r)[this.getMonth()];case"MMMM":return We.longMonths(r)[this.getMonth()];case"D":return String(this.getDate());case"DD":return`0${this.getDate()}`.slice(-2);case"H":return String(this.getHours());case"HH":return`0${this.getHours()}`.slice(-2);case"h":return String(this.getHours()%12||12);case"hh":return`0${this.getHours()%12||12}`.slice(-2);case"m":return String(this.getMinutes());case"mm":return`0${this.getMinutes()}`.slice(-2);case"s":return String(this.getSeconds());case"ss":return`0${this.getSeconds()}`.slice(-2);case"a":return this.getHours()<12||this.getHours()===24?"am":"pm";case"A":return this.getHours()<12||this.getHours()===24?"AM":"PM";default:return""}}};O(We,"regex",/(\\)?(Y{2,4}|M{1,4}|D{1,2}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|A|a)/g),O(We,"MONTH_JS",[0,1,2,3,4,5,6,7,8,9,10,11]);var de=We,wc=class{constructor(t){O(this,"picker");this.picker=t}render(t,e){t||(t=new de),t.setDate(1),t.setHours(0,0,0,0),typeof this[`get${e}View`]=="function"&&this[`get${e}View`](t)}getContainerView(t){this.picker.ui.container.innerHTML="",this.picker.options.header&&this.picker.trigger("render",{date:t.clone(),view:"Header"}),this.picker.trigger("render",{date:t.clone(),view:"Main"}),this.picker.options.autoApply||this.picker.trigger("render",{date:t.clone(),view:"Footer"})}getHeaderView(t){let e=document.createElement("header");this.picker.options.header instanceof HTMLElement&&e.appendChild(this.picker.options.header),typeof this.picker.options.header=="string"&&(e.innerHTML=this.picker.options.header),this.picker.ui.container.appendChild(e),this.picker.trigger("view",{target:e,date:t.clone(),view:"Header"})}getMainView(t){let e=document.createElement("main");this.picker.ui.container.appendChild(e);let r=document.createElement("div");r.className=`calendars grid-${this.picker.options.grid}`;for(let i=0;i<this.picker.options.calendars;i++){let o=document.createElement("div");o.className="calendar",r.appendChild(o);let a=this.getCalendarHeaderView(t.clone());o.appendChild(a),this.picker.trigger("view",{date:t.clone(),view:"CalendarHeader",index:i,target:a});let s=this.getCalendarDayNamesView();o.appendChild(s),this.picker.trigger("view",{date:t.clone(),view:"CalendarDayNames",index:i,target:s});let u=this.getCalendarDaysView(t.clone());o.appendChild(u),this.picker.trigger("view",{date:t.clone(),view:"CalendarDays",index:i,target:u});let l=this.getCalendarFooterView(this.picker.options.lang,t.clone());o.appendChild(l),this.picker.trigger("view",{date:t.clone(),view:"CalendarFooter",index:i,target:l}),this.picker.trigger("view",{date:t.clone(),view:"CalendarItem",index:i,target:o}),t.add(1,"month")}e.appendChild(r),this.picker.trigger("view",{date:t.clone(),view:"Calendars",target:r}),this.picker.trigger("view",{date:t.clone(),view:"Main",target:e})}getFooterView(t){let e=document.createElement("footer"),r=document.createElement("div");r.className="footer-buttons";let i=document.createElement("button");i.className="cancel-button unit",i.innerHTML=this.picker.options.locale.cancel,r.appendChild(i);let o=document.createElement("button");o.className="apply-button unit",o.innerHTML=this.picker.options.locale.apply,o.disabled=!0,r.appendChild(o),e.appendChild(r),this.picker.ui.container.appendChild(e),this.picker.trigger("view",{date:t,target:e,view:"Footer"})}getCalendarHeaderView(t){let e=document.createElement("div");e.className="header";let r=document.createElement("div");r.className="month-name",r.innerHTML=`<span>${t.toLocaleString(this.picker.options.lang,{month:"long"})}</span> ${t.format("YYYY")}`,e.appendChild(r);let i=document.createElement("button");i.className="previous-button unit",i.innerHTML=this.picker.options.locale.previousMonth,e.appendChild(i);let o=document.createElement("button");return o.className="next-button unit",o.innerHTML=this.picker.options.locale.nextMonth,e.appendChild(o),e}getCalendarDayNamesView(){let t=document.createElement("div");t.className="daynames-row";for(let e=1;e<=7;e++){let r=3+this.picker.options.firstDay+e,i=document.createElement("div");i.className="dayname",i.innerHTML=new Date(1970,0,r,12,0,0,0).toLocaleString(this.picker.options.lang,{weekday:"short"}),i.title=new Date(1970,0,r,12,0,0,0).toLocaleString(this.picker.options.lang,{weekday:"long"}),t.appendChild(i),this.picker.trigger("view",{dayIdx:r,view:"CalendarDayName",target:i})}return t}getCalendarDaysView(t){let e=document.createElement("div");e.className="days-grid";let r=this.calcOffsetDays(t,this.picker.options.firstDay),i=32-new Date(t.getFullYear(),t.getMonth(),32).getDate();for(let o=0;o<r;o++){let a=document.createElement("div");a.className="offset",e.appendChild(a)}for(let o=1;o<=i;o++){t.setDate(o);let a=this.getCalendarDayView(t);e.appendChild(a),this.picker.trigger("view",{date:t,view:"CalendarDay",target:a})}return e}getCalendarDayView(t){let e=this.picker.options.date?new de(this.picker.options.date):null,r=new de,i=document.createElement("div");return i.className="day unit",i.innerHTML=t.format("D"),i.dataset.time=String(t.getTime()),t.isSame(r,"day")&&i.classList.add("today"),[0,6].includes(t.getDay())&&i.classList.add("weekend"),this.picker.datePicked.length?this.picker.datePicked[0].isSame(t,"day")&&i.classList.add("selected"):e&&t.isSame(e,"day")&&i.classList.add("selected"),this.picker.trigger("view",{date:t,view:"CalendarDay",target:i}),i}getCalendarFooterView(t,e){let r=document.createElement("div");return r.className="footer",r}calcOffsetDays(t,e){let r=t.getDay()-e;return r<0&&(r+=7),r}},bc=class{constructor(t){O(this,"picker");O(this,"instances",{});this.picker=t}initialize(){let t=[];this.picker.options.plugins.forEach(e=>{typeof e=="function"?t.push(new e):typeof e=="string"&&typeof easepick<"u"&&Object.prototype.hasOwnProperty.call(easepick,e)?t.push(new easepick[e]):console.warn(`easepick: ${e} not found.`)}),t.sort((e,r)=>e.priority>r.priority?-1:e.priority<r.priority||e.dependencies.length>r.dependencies.length?1:e.dependencies.length<r.dependencies.length?-1:0),t.forEach(e=>{e.attach(this.picker),this.instances[e.getName()]=e})}getInstance(t){return this.instances[t]}addInstance(t){if(Object.prototype.hasOwnProperty.call(this.instances,t))console.warn(`easepick: ${t} already added.`);else{if(typeof easepick<"u"&&Object.prototype.hasOwnProperty.call(easepick,t)){let e=new easepick[t];return e.attach(this.picker),this.instances[e.getName()]=e,e}if(this.getPluginFn(t)!=="undefined"){let e=new(this.getPluginFn(t));return e.attach(this.picker),this.instances[e.getName()]=e,e}console.warn(`easepick: ${t} not found.`)}return null}removeInstance(t){return t in this.instances&&this.instances[t].detach(),delete this.instances[t]}reloadInstance(t){return this.removeInstance(t),this.addInstance(t)}getPluginFn(t){return[...this.picker.options.plugins].filter(e=>typeof e=="function"&&new e().getName()===t).shift()}},ca=class{constructor(t){O(this,"Calendar",new wc(this));O(this,"PluginManager",new bc(this));O(this,"calendars",[]);O(this,"datePicked",[]);O(this,"cssLoaded",0);O(this,"binds",{hidePicker:this.hidePicker.bind(this),show:this.show.bind(this)});O(this,"options",{doc:document,css:[],element:null,firstDay:1,grid:1,calendars:1,lang:"en-US",date:null,format:"YYYY-MM-DD",readonly:!0,autoApply:!0,header:!1,inline:!1,scrollToDate:!0,locale:{nextMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M2.748 16L0 13.333 5.333 8 0 2.667 2.748 0l7.919 8z" fill-rule="nonzero"/></svg>',previousMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.919 0l2.748 2.667L5.333 8l5.334 5.333L7.919 16 0 8z" fill-rule="nonzero"/></svg>',cancel:"Cancel",apply:"Apply"},documentClick:this.binds.hidePicker,plugins:[]});O(this,"ui",{container:null,shadowRoot:null,wrapper:null});O(this,"version","1.2.1");let e={...this.options.locale,...t.locale};this.options={...this.options,...t},this.options.locale=e,this.handleOptions(),this.ui.wrapper=document.createElement("span"),this.ui.wrapper.style.display="none",this.ui.wrapper.style.position="absolute",this.ui.wrapper.style.pointerEvents="none",this.ui.wrapper.className="easepick-wrapper",this.ui.wrapper.attachShadow({mode:"open"}),this.ui.shadowRoot=this.ui.wrapper.shadowRoot,this.ui.container=document.createElement("div"),this.ui.container.className="container",this.options.zIndex&&(this.ui.container.style.zIndex=String(this.options.zIndex)),this.options.inline&&(this.ui.wrapper.style.position="relative",this.ui.container.classList.add("inline")),this.ui.shadowRoot.appendChild(this.ui.container),this.options.element.after(this.ui.wrapper),this.handleCSS(),this.options.element.addEventListener("click",this.binds.show),this.on("view",this.onView.bind(this)),this.on("render",this.onRender.bind(this)),this.PluginManager.initialize(),this.parseValues(),typeof this.options.setup=="function"&&this.options.setup(this),this.on("click",this.onClick.bind(this));let r=this.options.scrollToDate?this.getDate():null;this.renderAll(r)}on(t,e,r={}){this.ui.container.addEventListener(t,e,r)}off(t,e,r={}){this.ui.container.removeEventListener(t,e,r)}trigger(t,e={}){return this.ui.container.dispatchEvent(new CustomEvent(t,{detail:e}))}destroy(){this.options.element.removeEventListener("click",this.binds.show),typeof this.options.documentClick=="function"&&document.removeEventListener("click",this.options.documentClick,!0),Object.keys(this.PluginManager.instances).forEach(t=>{this.PluginManager.removeInstance(t)}),this.ui.wrapper.remove()}onRender(t){let{view:e,date:r}=t.detail;this.Calendar.render(r,e)}onView(t){let{view:e,target:r}=t.detail;e==="Footer"&&this.datePicked.length&&(r.querySelector(".apply-button").disabled=!1)}onClickHeaderButton(t){this.isCalendarHeaderButton(t)&&(t.classList.contains("next-button")?this.calendars[0].add(1,"month"):this.calendars[0].subtract(1,"month"),this.renderAll(this.calendars[0]))}onClickCalendarDay(t){if(this.isCalendarDay(t)){let e=new de(t.dataset.time);this.options.autoApply?(this.setDate(e),this.trigger("select",{date:this.getDate()}),this.hide()):(this.datePicked[0]=e,this.trigger("preselect",{date:this.getDate()}),this.renderAll())}}onClickApplyButton(t){if(this.isApplyButton(t)){if(this.datePicked[0]instanceof Date){let e=this.datePicked[0].clone();this.setDate(e)}this.hide(),this.trigger("select",{date:this.getDate()})}}onClickCancelButton(t){this.isCancelButton(t)&&this.hide()}onClick(t){let e=t.target;if(e instanceof HTMLElement){let r=e.closest(".unit");if(!(r instanceof HTMLElement))return;this.onClickHeaderButton(r),this.onClickCalendarDay(r),this.onClickApplyButton(r),this.onClickCancelButton(r)}}isShown(){return this.ui.container.classList.contains("inline")||this.ui.container.classList.contains("show")}show(t){if(this.isShown())return;let e=t&&"target"in t?t.target:this.options.element,{top:r,left:i}=this.adjustPosition(e);this.ui.container.style.top=`${r}px`,this.ui.container.style.left=`${i}px`,this.ui.container.classList.add("show"),this.trigger("show",{target:e})}hide(){this.ui.container.classList.remove("show"),this.datePicked.length=0,this.renderAll(),this.trigger("hide")}setDate(t){let e=new de(t,this.options.format);this.options.date=e.clone(),this.updateValues(),this.calendars.length&&this.renderAll()}getDate(){return this.options.date instanceof de?this.options.date.clone():null}parseValues(){this.options.date?this.setDate(this.options.date):this.options.element instanceof HTMLInputElement&&this.options.element.value.length&&this.setDate(this.options.element.value),this.options.date instanceof Date||(this.options.date=null)}updateValues(){let t=this.getDate(),e=t instanceof Date?t.format(this.options.format,this.options.lang):"",r=this.options.element;r instanceof HTMLInputElement?r.value=e:r instanceof HTMLElement&&(r.innerText=e)}hidePicker(t){let e=t.target,r=null;e.shadowRoot&&(e=t.composedPath()[0],r=e.getRootNode().host),this.isShown()&&r!==this.ui.wrapper&&e!==this.options.element&&this.hide()}renderAll(t){this.trigger("render",{view:"Container",date:(t||this.calendars[0]).clone()})}isCalendarHeaderButton(t){return["previous-button","next-button"].some(e=>t.classList.contains(e))}isCalendarDay(t){return t.classList.contains("day")}isApplyButton(t){return t.classList.contains("apply-button")}isCancelButton(t){return t.classList.contains("cancel-button")}gotoDate(t){let e=new de(t,this.options.format);e.setDate(1),this.calendars[0]=e.clone(),this.renderAll()}clear(){this.options.date=null,this.datePicked.length=0,this.updateValues(),this.renderAll(),this.trigger("clear")}handleOptions(){this.options.element instanceof HTMLElement||(this.options.element=this.options.doc.querySelector(this.options.element)),typeof this.options.documentClick=="function"&&document.addEventListener("click",this.options.documentClick,!0),this.options.element instanceof HTMLInputElement&&(this.options.element.readOnly=this.options.readonly),this.options.date?this.calendars[0]=new de(this.options.date,this.options.format):this.calendars[0]=new de}handleCSS(){if(Array.isArray(this.options.css))this.options.css.forEach(t=>{let e=document.createElement("link");e.href=t,e.rel="stylesheet";let r=()=>{this.cssLoaded++,this.cssLoaded===this.options.css.length&&(this.ui.wrapper.style.display="")};e.addEventListener("load",r),e.addEventListener("error",r),this.ui.shadowRoot.append(e)});else if(typeof this.options.css=="string"){let t=document.createElement("style"),e=document.createTextNode(this.options.css);t.appendChild(e),this.ui.shadowRoot.append(t),this.ui.wrapper.style.display=""}else typeof this.options.css=="function"&&(this.options.css.call(this,this),this.ui.wrapper.style.display="")}adjustPosition(t){let e=t.getBoundingClientRect(),r=this.ui.wrapper.getBoundingClientRect();this.ui.container.classList.add("calc");let i=this.ui.container.getBoundingClientRect();this.ui.container.classList.remove("calc");let o=e.bottom-r.bottom,a=e.left-r.left;return typeof window<"u"&&(window.innerHeight<o+i.height&&o-i.height>=0&&(o=e.top-r.top-i.height),window.innerWidth<a+i.width&&e.right-i.width>=0&&(a=e.right-r.right-i.width)),{left:a,top:o}}},ha=Object.freeze({__proto__:null,Core:ca,create:ca}),ro=class{constructor(){O(this,"picker");O(this,"options");O(this,"priority",0);O(this,"dependencies",[])}attach(t){let e=this.getName(),r={...this.options};this.options={...this.options,...t.options[e]||{}};for(let o of Object.keys(r))if(r[o]!==null&&typeof r[o]=="object"&&Object.keys(r[o]).length&&e in t.options&&o in t.options[e]){let a={...t.options[e][o]};a!==null&&typeof a=="object"&&Object.keys(a).length&&Object.keys(a).every(s=>Object.keys(r[o]).includes(s))&&(this.options[o]={...r[o],...a})}if(this.picker=t,this.dependenciesNotFound()){let o=this.dependencies.filter(a=>!this.pluginsAsStringArray().includes(a));return void console.warn(`${this.getName()}: required dependencies (${o.join(", ")}).`)}let i=this.camelCaseToKebab(this.getName());this.picker.ui.container.classList.add(i),this.onAttach()}detach(){let t=this.camelCaseToKebab(this.getName());this.picker.ui.container.classList.remove(t),typeof this.onDetach=="function"&&this.onDetach()}dependenciesNotFound(){return this.dependencies.length&&!this.dependencies.every(t=>this.pluginsAsStringArray().includes(t))}pluginsAsStringArray(){return this.picker.options.plugins.map(t=>typeof t=="function"?new t().getName():t)}camelCaseToKebab(t){return t.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}},la=class extends ro{constructor(){super(...arguments);O(this,"priority",1);O(this,"binds",{onView:this.onView.bind(this)});O(this,"options",{minDate:null,maxDate:null,minDays:null,maxDays:null,selectForward:null,selectBackward:null,presets:!0,inseparable:!1,filter:null})}getName(){return"LockPlugin"}onAttach(){if(this.options.minDate&&(this.options.minDate=new de(this.options.minDate,this.picker.options.format,this.picker.options.lang)),this.options.maxDate&&(this.options.maxDate=new de(this.options.maxDate,this.picker.options.format,this.picker.options.lang),this.options.maxDate instanceof de&&this.picker.options.calendars>1&&this.picker.calendars[0].isSame(this.options.maxDate,"month"))){let e=this.picker.calendars[0].clone().subtract(1,"month");this.picker.gotoDate(e)}if((this.options.minDays||this.options.maxDays||this.options.selectForward||this.options.selectBackward)&&!this.picker.options.plugins.includes("RangePlugin")){let e=["minDays","maxDays","selectForward","selectBackward"];console.warn(`${this.getName()}: options ${e.join(", ")} required RangePlugin.`)}this.picker.on("view",this.binds.onView)}onDetach(){this.picker.off("view",this.binds.onView)}onView(e){let{view:r,target:i,date:o}=e.detail;if(r==="CalendarHeader"&&(this.options.minDate instanceof de&&o.isSameOrBefore(this.options.minDate,"month")&&i.classList.add("no-previous-month"),this.options.maxDate instanceof de&&o.isSameOrAfter(this.options.maxDate,"month")&&i.classList.add("no-next-month")),r==="CalendarDay"){let a=this.picker.datePicked.length?this.picker.datePicked[0]:null;if(this.testFilter(o))return void i.classList.add("locked");if(this.options.inseparable){if(this.options.minDays){let s=o.clone().subtract(this.options.minDays-1,"day"),u=o.clone().add(this.options.minDays-1,"day"),l=!1,h=!1;for(;s.isBefore(o,"day");){if(this.testFilter(s)){l=!0;break}s.add(1,"day")}for(;u.isAfter(o,"day");){if(this.testFilter(u)){h=!0;break}u.subtract(1,"day")}l&&h&&i.classList.add("not-available")}this.rangeIsNotAvailable(o,a)&&i.classList.add("not-available")}this.dateIsNotAvailable(o,a)&&i.classList.add("not-available")}if(this.options.presets&&r==="PresetPluginButton"){let a=new de(Number(i.dataset.start)),s=new de(Number(i.dataset.end)),u=s.diff(a,"day"),l=this.options.minDays&&u<this.options.minDays,h=this.options.maxDays&&u>this.options.maxDays;(l||h||this.lockMinDate(a)||this.lockMaxDate(a)||this.lockMinDate(s)||this.lockMaxDate(s)||this.rangeIsNotAvailable(a,s))&&i.setAttribute("disabled","disabled")}}dateIsNotAvailable(e,r){return this.lockMinDate(e)||this.lockMaxDate(e)||this.lockMinDays(e,r)||this.lockMaxDays(e,r)||this.lockSelectForward(e)||this.lockSelectBackward(e)}rangeIsNotAvailable(e,r){if(!e||!r)return!1;let i=(e.isSameOrBefore(r,"day")?e:r).clone(),o=(r.isSameOrAfter(e,"day")?r:e).clone();for(;i.isSameOrBefore(o,"day");){if(this.testFilter(i))return!0;i.add(1,"day")}return!1}lockMinDate(e){return this.options.minDate instanceof de&&e.isBefore(this.options.minDate,"day")}lockMaxDate(e){return this.options.maxDate instanceof de&&e.isAfter(this.options.maxDate,"day")}lockMinDays(e,r){if(this.options.minDays&&r){let i=r.clone().subtract(this.options.minDays-1,"day"),o=r.clone().add(this.options.minDays-1,"day");return e.isBetween(i,o)}return!1}lockMaxDays(e,r){if(this.options.maxDays&&r){let i=r.clone().subtract(this.options.maxDays,"day"),o=r.clone().add(this.options.maxDays,"day");return!e.isBetween(i,o)}return!1}lockSelectForward(e){if(this.picker.datePicked.length===1&&this.options.selectForward){let r=this.picker.datePicked[0].clone();return e.isBefore(r,"day")}return!1}lockSelectBackward(e){if(this.picker.datePicked.length===1&&this.options.selectBackward){let r=this.picker.datePicked[0].clone();return e.isAfter(r,"day")}return!1}testFilter(e){return typeof this.options.filter=="function"&&this.options.filter(e,this.picker.datePicked)}};var ua=class extends ro{constructor(){super(...arguments);O(this,"tooltipElement");O(this,"triggerElement");O(this,"binds",{setStartDate:this.setStartDate.bind(this),setEndDate:this.setEndDate.bind(this),setDateRange:this.setDateRange.bind(this),getStartDate:this.getStartDate.bind(this),getEndDate:this.getEndDate.bind(this),onView:this.onView.bind(this),onShow:this.onShow.bind(this),onMouseEnter:this.onMouseEnter.bind(this),onMouseLeave:this.onMouseLeave.bind(this),onClickCalendarDay:this.onClickCalendarDay.bind(this),onClickApplyButton:this.onClickApplyButton.bind(this),parseValues:this.parseValues.bind(this),updateValues:this.updateValues.bind(this),clear:this.clear.bind(this)});O(this,"options",{elementEnd:null,startDate:null,endDate:null,repick:!1,strict:!0,delimiter:" - ",tooltip:!0,tooltipNumber:e=>e,locale:{zero:"",one:"day",two:"",few:"",many:"",other:"days"},documentClick:this.hidePicker.bind(this)})}getName(){return"RangePlugin"}onAttach(){this.binds._setStartDate=this.picker.setStartDate,this.binds._setEndDate=this.picker.setEndDate,this.binds._setDateRange=this.picker.setDateRange,this.binds._getStartDate=this.picker.getStartDate,this.binds._getEndDate=this.picker.getEndDate,this.binds._parseValues=this.picker.parseValues,this.binds._updateValues=this.picker.updateValues,this.binds._clear=this.picker.clear,this.binds._onClickCalendarDay=this.picker.onClickCalendarDay,this.binds._onClickApplyButton=this.picker.onClickApplyButton,Object.defineProperties(this.picker,{setStartDate:{configurable:!0,value:this.binds.setStartDate},setEndDate:{configurable:!0,value:this.binds.setEndDate},setDateRange:{configurable:!0,value:this.binds.setDateRange},getStartDate:{configurable:!0,value:this.binds.getStartDate},getEndDate:{configurable:!0,value:this.binds.getEndDate},parseValues:{configurable:!0,value:this.binds.parseValues},updateValues:{configurable:!0,value:this.binds.updateValues},clear:{configurable:!0,value:this.binds.clear},onClickCalendarDay:{configurable:!0,value:this.binds.onClickCalendarDay},onClickApplyButton:{configurable:!0,value:this.binds.onClickApplyButton}}),this.options.elementEnd&&(this.options.elementEnd instanceof HTMLElement||(this.options.elementEnd=this.picker.options.doc.querySelector(this.options.elementEnd)),this.options.elementEnd instanceof HTMLInputElement&&(this.options.elementEnd.readOnly=this.picker.options.readonly),typeof this.picker.options.documentClick=="function"&&(document.removeEventListener("click",this.picker.options.documentClick,!0),typeof this.options.documentClick=="function"&&document.addEventListener("click",this.options.documentClick,!0)),this.options.elementEnd.addEventListener("click",this.picker.show.bind(this.picker))),this.options.repick=this.options.repick&&this.options.elementEnd instanceof HTMLElement,this.picker.options.date=null,this.picker.on("view",this.binds.onView),this.picker.on("show",this.binds.onShow),this.picker.on("mouseenter",this.binds.onMouseEnter,!0),this.picker.on("mouseleave",this.binds.onMouseLeave,!0),this.checkIntlPluralLocales()}onDetach(){Object.defineProperties(this.picker,{setStartDate:{configurable:!0,value:this.binds._setStartDate},setEndDate:{configurable:!0,value:this.binds._setEndDate},setDateRange:{configurable:!0,value:this.binds._setDateRange},getStartDate:{configurable:!0,value:this.binds._getStartDate},getEndDate:{configurable:!0,value:this.binds._getEndDate},parseValues:{configurable:!0,value:this.binds._parseValues},updateValues:{configurable:!0,value:this.binds._updateValues},clear:{configurable:!0,value:this.binds._clear},onClickCalendarDay:{configurable:!0,value:this.binds._onClickCalendarDay},onClickApplyButton:{configurable:!0,value:this.binds._onClickApplyButton}}),this.picker.off("view",this.binds.onView),this.picker.off("show",this.binds.onShow),this.picker.off("mouseenter",this.binds.onMouseEnter,!0),this.picker.off("mouseleave",this.binds.onMouseLeave,!0)}parseValues(){if(this.options.startDate||this.options.endDate)this.options.strict?this.options.startDate&&this.options.endDate?this.setDateRange(this.options.startDate,this.options.endDate):(this.options.startDate=null,this.options.endDate=null):(this.options.startDate&&this.setStartDate(this.options.startDate),this.options.endDate&&this.setEndDate(this.options.endDate));else if(this.options.elementEnd)this.options.strict?this.picker.options.element instanceof HTMLInputElement&&this.picker.options.element.value.length&&this.options.elementEnd instanceof HTMLInputElement&&this.options.elementEnd.value.length&&this.setDateRange(this.picker.options.element.value,this.options.elementEnd.value):(this.picker.options.element instanceof HTMLInputElement&&this.picker.options.element.value.length&&this.setStartDate(this.picker.options.element.value),this.options.elementEnd instanceof HTMLInputElement&&this.options.elementEnd.value.length&&this.setEndDate(this.options.elementEnd.value));else if(this.picker.options.element instanceof HTMLInputElement&&this.picker.options.element.value.length){let[e,r]=this.picker.options.element.value.split(this.options.delimiter);this.options.strict?e&&r&&this.setDateRange(e,r):(e&&this.setStartDate(e),r&&this.setEndDate(r))}}updateValues(){let e=this.picker.options.element,r=this.options.elementEnd,i=this.picker.getStartDate(),o=this.picker.getEndDate(),a=i instanceof Date?i.format(this.picker.options.format,this.picker.options.lang):"",s=o instanceof Date?o.format(this.picker.options.format,this.picker.options.lang):"";if(r)e instanceof HTMLInputElement?e.value=a:e instanceof HTMLElement&&(e.innerText=a),r instanceof HTMLInputElement?r.value=s:r instanceof HTMLElement&&(r.innerText=s);else{let u=`${a}${a||s?this.options.delimiter:""}${s}`;e instanceof HTMLInputElement?e.value=u:e instanceof HTMLElement&&(e.innerText=u)}}clear(){this.options.startDate=null,this.options.endDate=null,this.picker.datePicked.length=0,this.updateValues(),this.picker.renderAll(),this.picker.trigger("clear")}onShow(e){let{target:r}=e.detail;this.triggerElement=r,this.picker.options.scrollToDate&&this.getStartDate()instanceof Date&&this.picker.gotoDate(this.getStartDate()),this.initializeRepick()}onView(e){let{view:r,target:i}=e.detail;if(r==="Main"&&(this.tooltipElement=document.createElement("span"),this.tooltipElement.className="range-plugin-tooltip",i.appendChild(this.tooltipElement)),r==="CalendarDay"){let o=new de(i.dataset.time),a=this.picker.datePicked,s=a.length?this.picker.datePicked[0]:this.getStartDate(),u=a.length?this.picker.datePicked[1]:this.getEndDate();s&&s.isSame(o,"day")&&i.classList.add("start"),s&&u&&(u.isSame(o,"day")&&i.classList.add("end"),o.isBetween(s,u)&&i.classList.add("in-range"))}if(r==="Footer"){let o=this.picker.datePicked.length===1&&!this.options.strict||this.picker.datePicked.length===2;i.querySelector(".apply-button").disabled=!o}}hidePicker(e){let r=e.target,i=null;r.shadowRoot&&(r=e.composedPath()[0],i=r.getRootNode().host),this.picker.isShown()&&i!==this.picker.ui.wrapper&&r!==this.picker.options.element&&r!==this.options.elementEnd&&this.picker.hide()}setStartDate(e){let r=new de(e,this.picker.options.format);this.options.startDate=r?r.clone():null,this.updateValues(),this.picker.renderAll()}setEndDate(e){let r=new de(e,this.picker.options.format);this.options.endDate=r?r.clone():null,this.updateValues(),this.picker.renderAll()}setDateRange(e,r){let i=new de(e,this.picker.options.format),o=new de(r,this.picker.options.format);this.options.startDate=i?i.clone():null,this.options.endDate=o?o.clone():null,this.updateValues(),this.picker.renderAll()}getStartDate(){return this.options.startDate instanceof Date?this.options.startDate.clone():null}getEndDate(){return this.options.endDate instanceof Date?this.options.endDate.clone():null}onMouseEnter(e){let r=e.target;if(r instanceof HTMLElement){this.isContainer(r)&&this.initializeRepick();let i=r.closest(".unit");if(!(i instanceof HTMLElement))return;if(this.picker.isCalendarDay(i)){if(this.picker.datePicked.length!==1)return;let o=this.picker.datePicked[0].clone(),a=new de(i.dataset.time),s=!1;if(o.isAfter(a,"day")){let u=o.clone();o=a.clone(),a=u.clone(),s=!0}if([...this.picker.ui.container.querySelectorAll(".day")].forEach(u=>{let l=new de(u.dataset.time),h=this.picker.Calendar.getCalendarDayView(l);l.isBetween(o,a)&&h.classList.add("in-range"),l.isSame(this.picker.datePicked[0],"day")&&(h.classList.add("start"),h.classList.toggle("flipped",s)),u===i&&(h.classList.add("end"),h.classList.toggle("flipped",s)),u.className=h.className}),this.options.tooltip){let u=this.options.tooltipNumber(a.diff(o,"day")+1);if(u>0){let l=new Intl.PluralRules(this.picker.options.lang).select(u),h=`${u} ${this.options.locale[l]}`;this.showTooltip(i,h)}else this.hideTooltip()}}}}onMouseLeave(e){if(this.isContainer(e.target)&&this.options.repick){let r=this.getStartDate(),i=this.getEndDate();r&&i&&(this.picker.datePicked.length=0,this.picker.renderAll())}}onClickCalendarDay(e){if(this.picker.isCalendarDay(e)){this.picker.datePicked.length===2&&(this.picker.datePicked.length=0);let r=new de(e.dataset.time);if(this.picker.datePicked[this.picker.datePicked.length]=r,this.picker.datePicked.length===2&&this.picker.datePicked[0].isAfter(this.picker.datePicked[1])){let i=this.picker.datePicked[1].clone();this.picker.datePicked[1]=this.picker.datePicked[0].clone(),this.picker.datePicked[0]=i.clone()}this.picker.datePicked.length!==1&&this.picker.options.autoApply||this.picker.trigger("preselect",{start:this.picker.datePicked[0]instanceof Date?this.picker.datePicked[0].clone():null,end:this.picker.datePicked[1]instanceof Date?this.picker.datePicked[1].clone():null}),this.picker.datePicked.length===1&&(!this.options.strict&&this.picker.options.autoApply&&(this.picker.options.element===this.triggerElement&&this.setStartDate(this.picker.datePicked[0]),this.options.elementEnd===this.triggerElement&&this.setEndDate(this.picker.datePicked[0]),this.picker.trigger("select",{start:this.picker.getStartDate(),end:this.picker.getEndDate()})),this.picker.renderAll()),this.picker.datePicked.length===2&&(this.picker.options.autoApply?(this.setDateRange(this.picker.datePicked[0],this.picker.datePicked[1]),this.picker.trigger("select",{start:this.picker.getStartDate(),end:this.picker.getEndDate()}),this.picker.hide()):(this.hideTooltip(),this.picker.renderAll()))}}onClickApplyButton(e){this.picker.isApplyButton(e)&&(this.picker.datePicked.length!==1||this.options.strict||(this.picker.options.element===this.triggerElement&&(this.options.endDate=null,this.setStartDate(this.picker.datePicked[0])),this.options.elementEnd===this.triggerElement&&(this.options.startDate=null,this.setEndDate(this.picker.datePicked[0]))),this.picker.datePicked.length===2&&this.setDateRange(this.picker.datePicked[0],this.picker.datePicked[1]),this.picker.trigger("select",{start:this.picker.getStartDate(),end:this.picker.getEndDate()}),this.picker.hide())}showTooltip(e,r){this.tooltipElement.style.visibility="visible",this.tooltipElement.innerHTML=r;let i=this.picker.ui.container.getBoundingClientRect(),o=this.tooltipElement.getBoundingClientRect(),a=e.getBoundingClientRect(),s=a.top,u=a.left;s-=i.top,u-=i.left,s-=o.height,u-=o.width/2,u+=a.width/2,this.tooltipElement.style.top=`${s}px`,this.tooltipElement.style.left=`${u}px`}hideTooltip(){this.tooltipElement.style.visibility="hidden"}checkIntlPluralLocales(){if(!this.options.tooltip)return;let e=[...new Set([new Intl.PluralRules(this.picker.options.lang).select(0),new Intl.PluralRules(this.picker.options.lang).select(1),new Intl.PluralRules(this.picker.options.lang).select(2),new Intl.PluralRules(this.picker.options.lang).select(6),new Intl.PluralRules(this.picker.options.lang).select(18)])],r=Object.keys(this.options.locale);e.every(i=>r.includes(i))||console.warn(`${this.getName()}: provide locales (${e.join(", ")}) for correct tooltip text.`)}initializeRepick(){if(!this.options.repick)return;let e=this.getStartDate(),r=this.getEndDate();r&&this.triggerElement===this.picker.options.element&&(this.picker.datePicked[0]=r),e&&this.triggerElement===this.options.elementEnd&&(this.picker.datePicked[0]=e)}isContainer(e){return e===this.picker.ui.container}};var da=class extends ro{constructor(){super(...arguments);O(this,"rangePlugin");O(this,"lockPlugin");O(this,"priority",10);O(this,"binds",{onView:this.onView.bind(this),onColorScheme:this.onColorScheme.bind(this)});O(this,"options",{dropdown:{months:!1,years:!1,minYear:1950,maxYear:null},darkMode:!0,locale:{resetButton:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/></svg>'}});O(this,"matchMedia")}getName(){return"AmpPlugin"}onAttach(){this.options.darkMode&&window&&"matchMedia"in window&&(this.matchMedia=window.matchMedia("(prefers-color-scheme: dark)"),this.matchMedia.matches&&(this.picker.ui.container.dataset.theme="dark"),this.matchMedia.addEventListener("change",this.binds.onColorScheme)),this.options.weekNumbers&&this.picker.ui.container.classList.add("week-numbers"),this.picker.on("view",this.binds.onView)}onDetach(){this.options.darkMode&&window&&"matchMedia"in window&&this.matchMedia.removeEventListener("change",this.binds.onColorScheme),this.picker.ui.container.removeAttribute("data-theme"),this.picker.ui.container.classList.remove("week-numbers"),this.picker.off("view",this.binds.onView)}onView(e){this.lockPlugin=this.picker.PluginManager.getInstance("LockPlugin"),this.rangePlugin=this.picker.PluginManager.getInstance("RangePlugin"),this.handleDropdown(e),this.handleResetButton(e),this.handleWeekNumbers(e)}onColorScheme(e){let r=e.matches?"dark":"light";this.picker.ui.container.dataset.theme=r}handleDropdown(e){let{view:r,target:i,date:o,index:a}=e.detail;if(r==="CalendarHeader"){let s=i.querySelector(".month-name");if(this.options.dropdown.months){s.childNodes[0].remove();let u=document.createElement("select");u.className="month-name--select month-name--dropdown";for(let l=0;l<12;l+=1){let h=document.createElement("option"),f=new de(new Date(o.getFullYear(),l,2,0,0,0)),p=new de(new Date(o.getFullYear(),l,1,0,0,0));h.value=String(l),h.text=f.toLocaleString(this.picker.options.lang,{month:"long"}),this.lockPlugin&&(h.disabled=this.lockPlugin.options.minDate&&p.isBefore(new de(this.lockPlugin.options.minDate),"month")||this.lockPlugin.options.maxDate&&p.isAfter(new de(this.lockPlugin.options.maxDate),"month")),h.selected=p.getMonth()===o.getMonth(),u.appendChild(h)}u.addEventListener("change",l=>{let h=l.target;this.picker.calendars[0].setDate(1),this.picker.calendars[0].setMonth(Number(h.value)),this.picker.renderAll()}),s.prepend(u)}if(this.options.dropdown.years){s.childNodes[1].remove();let u=document.createElement("select");u.className="month-name--select";let l=this.options.dropdown.minYear,h=this.options.dropdown.maxYear?this.options.dropdown.maxYear:new Date().getFullYear();if(o.getFullYear()>h){let f=document.createElement("option");f.value=String(o.getFullYear()),f.text=String(o.getFullYear()),f.selected=!0,f.disabled=!0,u.appendChild(f)}for(let f=h;f>=l;f-=1){let p=document.createElement("option"),E=new de(new Date(f,0,1,0,0,0));p.value=String(f),p.text=String(f),this.lockPlugin&&(p.disabled=this.lockPlugin.options.minDate&&E.isBefore(new de(this.lockPlugin.options.minDate),"year")||this.lockPlugin.options.maxDate&&E.isAfter(new de(this.lockPlugin.options.maxDate),"year")),p.selected=o.getFullYear()===f,u.appendChild(p)}if(o.getFullYear()<l){let f=document.createElement("option");f.value=String(o.getFullYear()),f.text=String(o.getFullYear()),f.selected=!0,f.disabled=!0,u.appendChild(f)}if(this.options.dropdown.years==="asc"){let f=Array.prototype.slice.call(u.childNodes).reverse();u.innerHTML="",f.forEach(p=>{p.innerHTML=p.value,u.appendChild(p)})}u.addEventListener("change",f=>{let p=f.target;this.picker.calendars[0].setFullYear(Number(p.value)),this.picker.renderAll()}),s.appendChild(u)}}}handleResetButton(e){let{view:r,target:i}=e.detail;if(r==="CalendarHeader"&&this.options.resetButton){let o=document.createElement("button");o.className="reset-button unit",o.innerHTML=this.options.locale.resetButton,o.addEventListener("click",a=>{a.preventDefault();let s=!0;typeof this.options.resetButton=="function"&&(s=this.options.resetButton.call(this)),s&&this.picker.clear()}),i.appendChild(o)}}handleWeekNumbers(e){if(this.options.weekNumbers){let{view:r,target:i}=e.detail;if(r==="CalendarDayNames"){let o=document.createElement("div");o.className="wnum-header",o.innerHTML="Wk",i.prepend(o)}r==="CalendarDays"&&[...i.children].forEach((o,a)=>{if(a===0||a%7==0){let s;if(o.classList.contains("day"))s=new de(o.dataset.time);else{let h=i.querySelector(".day");s=new de(h.dataset.time)}let u=s.getWeek(this.picker.options.firstDay);u===53&&s.getMonth()===0&&(u="53/1");let l=document.createElement("div");l.className="wnum-item",l.innerHTML=String(u),i.insertBefore(l,o)}})}}};var ma=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Kn={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var t=new Date(n.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var e=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};var fa={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var t=n%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},pa=fa;var rt=function(n,t){return t===void 0&&(t=2),("000"+n).slice(t*-1)},At=function(n){return n===!0?1:0};function Dc(n,t){var e;return function(){var r=this,i=arguments;clearTimeout(e),e=setTimeout(function(){return n.apply(r,i)},t)}}var ga=function(n){return n instanceof Array?n:[n]};function it(n,t,e){if(e===!0)return n.classList.add(t);n.classList.remove(t)}function De(n,t,e){var r=window.document.createElement(n);return t=t||"",e=e||"",r.className=t,e!==void 0&&(r.textContent=e),r}function io(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Ec(n,t){if(t(n))return n;if(n.parentNode)return Ec(n.parentNode,t)}function oo(n,t){var e=De("div","numInputWrapper"),r=De("input","numInput "+n),i=De("span","arrowUp"),o=De("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),t!==void 0)for(var a in t)r.setAttribute(a,t[a]);return e.appendChild(r),e.appendChild(i),e.appendChild(o),e}function Lt(n){try{if(typeof n.composedPath=="function"){var t=n.composedPath();return t[0]}return n.target}catch{return n.target}}var _c=function(){},ao=function(n,t,e){return e.months[t?"shorthand":"longhand"][n]},dd={D:_c,F:function(n,t,e){n.setMonth(e.months.longhand.indexOf(t))},G:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},H:function(n,t){n.setHours(parseFloat(t))},J:function(n,t){n.setDate(parseFloat(t))},K:function(n,t,e){n.setHours(n.getHours()%12+12*At(new RegExp(e.amPM[1],"i").test(t)))},M:function(n,t,e){n.setMonth(e.months.shorthand.indexOf(t))},S:function(n,t){n.setSeconds(parseFloat(t))},U:function(n,t){return new Date(parseFloat(t)*1e3)},W:function(n,t,e){var r=parseInt(t),i=new Date(n.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+e.firstDayOfWeek),i},Y:function(n,t){n.setFullYear(parseFloat(t))},Z:function(n,t){return new Date(t)},d:function(n,t){n.setDate(parseFloat(t))},h:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},i:function(n,t){n.setMinutes(parseFloat(t))},j:function(n,t){n.setDate(parseFloat(t))},l:_c,m:function(n,t){n.setMonth(parseFloat(t)-1)},n:function(n,t){n.setMonth(parseFloat(t)-1)},s:function(n,t){n.setSeconds(parseFloat(t))},u:function(n,t){return new Date(parseFloat(t))},w:_c,y:function(n,t){n.setFullYear(2e3+parseFloat(t))}},Pn={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},Vr={Z:function(n){return n.toISOString()},D:function(n,t,e){return t.weekdays.shorthand[Vr.w(n,t,e)]},F:function(n,t,e){return ao(Vr.n(n,t,e)-1,!1,t)},G:function(n,t,e){return rt(Vr.h(n,t,e))},H:function(n){return rt(n.getHours())},J:function(n,t){return t.ordinal!==void 0?n.getDate()+t.ordinal(n.getDate()):n.getDate()},K:function(n,t){return t.amPM[At(n.getHours()>11)]},M:function(n,t){return ao(n.getMonth(),!0,t)},S:function(n){return rt(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,t,e){return e.getWeek(n)},Y:function(n){return rt(n.getFullYear(),4)},d:function(n){return rt(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return rt(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,t){return t.weekdays.longhand[n.getDay()]},m:function(n){return rt(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}};var Mc=function(n){var t=n.config,e=t===void 0?Kn:t,r=n.l10n,i=r===void 0?fa:r,o=n.isMobile,a=o===void 0?!1:o;return function(s,u,l){var h=l||i;return e.formatDate!==void 0&&!a?e.formatDate(s,u,h):u.split("").map(function(f,p,E){return Vr[f]&&E[p-1]!=="\\"?Vr[f](s,h,e):f!=="\\"?f:""}).join("")}},ya=function(n){var t=n.config,e=t===void 0?Kn:t,r=n.l10n,i=r===void 0?fa:r;return function(o,a,s,u){if(!(o!==0&&!o)){var l=u||i,h,f=o;if(o instanceof Date)h=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)h=new Date(o);else if(typeof o=="string"){var p=a||(e||Kn).dateFormat,E=String(o).trim();if(E==="today")h=new Date,s=!0;else if(e&&e.parseDate)h=e.parseDate(o,p);else if(/Z$/.test(E)||/GMT$/.test(E))h=new Date(o);else{for(var S=void 0,k=[],R=0,$=0,V="";R<p.length;R++){var q=p[R],U=q==="\\",Z=p[R-1]==="\\"||U;if(Pn[q]&&!Z){V+=Pn[q];var re=new RegExp(V).exec(o);re&&(S=!0)&&k[q!=="Y"?"push":"unshift"]({fn:dd[q],val:re[++$]})}else U||(V+=".")}h=!e||!e.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),k.forEach(function(Te){var Me=Te.fn,oe=Te.val;return h=Me(h,oe,l)||h}),h=S?h:void 0}}if(!(h instanceof Date&&!isNaN(h.getTime()))){e.errorHandler(new Error("Invalid date provided: "+f));return}return s===!0&&h.setHours(0,0,0,0),h}}};function Nt(n,t,e){return e===void 0&&(e=!0),e!==!1?new Date(n.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):n.getTime()-t.getTime()}var hd=function(n,t,e){return n>Math.min(t,e)&&n<Math.max(t,e)},va=function(n,t,e){return n*3600+t*60+e},md=function(n){var t=Math.floor(n/3600),e=(n-t*3600)/60;return[t,e,n-t*3600-e*60]},fd={DAY:864e5};function wa(n){var t=n.defaultHour,e=n.defaultMinute,r=n.defaultSeconds;if(n.minDate!==void 0){var i=n.minDate.getHours(),o=n.minDate.getMinutes(),a=n.minDate.getSeconds();t<i&&(t=i),t===i&&e<o&&(e=o),t===i&&e===o&&r<a&&(r=n.minDate.getSeconds())}if(n.maxDate!==void 0){var s=n.maxDate.getHours(),u=n.maxDate.getMinutes();t=Math.min(t,s),t===s&&(e=Math.min(u,e)),t===s&&e===u&&(r=n.maxDate.getSeconds())}return{hours:t,minutes:e,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var r=function(s){s&&Object.keys(s).forEach(function(u){return n[u]=s[u]})},i=0,o=t;i<o.length;i++){var a=o[i];r(a)}return n});var ot=function(){return ot=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},ot.apply(this,arguments)},pd=function(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;for(var r=Array(n),i=0,t=0;t<e;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r},Tm=300;function Cm(n,t){var e={config:ot(ot({},Kn),ze.defaultConfig),l10n:pa};e.parseDate=ya({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=k,e._setHoursFromDate=p,e._positionCalendar=Rn,e.changeMonth=_,e.changeYear=ee,e.clear=I,e.close=C,e.onMouseOver=pe,e._createElement=De,e.createDay=re,e.destroy=Y,e.isEnabled=W,e.jumpToDate=V,e.updateValue=fn,e.open=Pe,e.redraw=lo,e.set=Ed,e.setDate=_d,e.toggle=Td;function r(){e.utils={getDaysInMonth:function(g,w){return g===void 0&&(g=e.currentMonth),w===void 0&&(w=e.currentYear),g===1&&(w%4===0&&w%100!==0||w%400===0)?29:e.l10n.daysInMonth[g]}}}function i(){e.element=e.input=n,e.isOpen=!1,Qe(),Gn(),Sd(),Md(),r(),e.isMobile||Z(),$(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&p(e.config.noCalendar?e.latestSelectedDateObj:void 0),fn(!1)),s();var g=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&g&&Rn(),Ne("onReady")}function o(){var g;return((g=e.calendarContainer)===null||g===void 0?void 0:g.getRootNode()).activeElement||document.activeElement}function a(g){return g.bind(e)}function s(){var g=e.config;g.weekNumbers===!1&&g.showMonths===1||g.noCalendar!==!0&&window.requestAnimationFrame(function(){if(e.calendarContainer!==void 0&&(e.calendarContainer.style.visibility="hidden",e.calendarContainer.style.display="block"),e.daysContainer!==void 0){var w=(e.days.offsetWidth+1)*g.showMonths;e.daysContainer.style.width=w+"px",e.calendarContainer.style.width=w+(e.weekWrapper!==void 0?e.weekWrapper.offsetWidth:0)+"px",e.calendarContainer.style.removeProperty("visibility"),e.calendarContainer.style.removeProperty("display")}})}function u(g){if(e.selectedDates.length===0){var w=e.config.minDate===void 0||Nt(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),M=wa(e.config);w.setHours(M.hours,M.minutes,M.seconds,w.getMilliseconds()),e.selectedDates=[w],e.latestSelectedDateObj=w}g!==void 0&&g.type!=="blur"&&xd(g);var P=e._input.value;f(),fn(),e._input.value!==P&&e._debouncedChange()}function l(g,w){return g%12+12*At(w===e.l10n.amPM[1])}function h(g){switch(g%24){case 0:case 12:return 12;default:return g%12}}function f(){if(!(e.hourElement===void 0||e.minuteElement===void 0)){var g=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,w=(parseInt(e.minuteElement.value,10)||0)%60,M=e.secondElement!==void 0?(parseInt(e.secondElement.value,10)||0)%60:0;e.amPM!==void 0&&(g=l(g,e.amPM.textContent));var P=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&Nt(e.latestSelectedDateObj,e.config.minDate,!0)===0,z=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&Nt(e.latestSelectedDateObj,e.config.maxDate,!0)===0;if(e.config.maxTime!==void 0&&e.config.minTime!==void 0&&e.config.minTime>e.config.maxTime){var G=va(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),he=va(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),Q=va(g,w,M);if(Q>he&&Q<G){var ge=md(G);g=ge[0],w=ge[1],M=ge[2]}}else{if(z){var X=e.config.maxTime!==void 0?e.config.maxTime:e.config.maxDate;g=Math.min(g,X.getHours()),g===X.getHours()&&(w=Math.min(w,X.getMinutes())),w===X.getMinutes()&&(M=Math.min(M,X.getSeconds()))}if(P){var ae=e.config.minTime!==void 0?e.config.minTime:e.config.minDate;g=Math.max(g,ae.getHours()),g===ae.getHours()&&w<ae.getMinutes()&&(w=ae.getMinutes()),w===ae.getMinutes()&&(M=Math.max(M,ae.getSeconds()))}}E(g,w,M)}}function p(g){var w=g||e.latestSelectedDateObj;w&&w instanceof Date&&E(w.getHours(),w.getMinutes(),w.getSeconds())}function E(g,w,M){e.latestSelectedDateObj!==void 0&&e.latestSelectedDateObj.setHours(g%24,w,M||0,0),!(!e.hourElement||!e.minuteElement||e.isMobile)&&(e.hourElement.value=rt(e.config.time_24hr?g:(12+g)%12+12*At(g%12===0)),e.minuteElement.value=rt(w),e.amPM!==void 0&&(e.amPM.textContent=e.l10n.amPM[At(g>=12)]),e.secondElement!==void 0&&(e.secondElement.value=rt(M)))}function S(g){var w=Lt(g),M=parseInt(w.value)+(g.delta||0);(M/1e3>1||g.key==="Enter"&&!/[^\d]/.test(M.toString()))&&ee(M)}function k(g,w,M,P){if(w instanceof Array)return w.forEach(function(z){return k(g,z,M,P)});if(g instanceof Array)return g.forEach(function(z){return k(z,w,M,P)});g.addEventListener(w,M,P),e._handlers.push({remove:function(){return g.removeEventListener(w,M,P)}})}function R(){Ne("onChange")}function $(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(M){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+M+"]"),function(P){return k(P,"click",e[M])})}),e.isMobile){kd();return}var g=Dc(we,50);if(e._debouncedChange=Dc(R,Tm),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&k(e.daysContainer,"mouseover",function(M){e.config.mode==="range"&&pe(Lt(M))}),k(e._input,"keydown",le),e.calendarContainer!==void 0&&k(e.calendarContainer,"keydown",le),!e.config.inline&&!e.config.static&&k(window,"resize",g),window.ontouchstart!==void 0?k(window.document,"touchstart",K):k(window.document,"mousedown",K),k(window.document,"focus",K,{capture:!0}),e.config.clickOpens===!0&&(k(e._input,"focus",e.open),k(e._input,"click",e.open)),e.daysContainer!==void 0&&(k(e.monthNav,"click",Id),k(e.monthNav,["keyup","increment"],S),k(e.daysContainer,"click",kc)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var w=function(M){return Lt(M).select()};k(e.timeContainer,["increment"],u),k(e.timeContainer,"blur",u,{capture:!0}),k(e.timeContainer,"click",q),k([e.hourElement,e.minuteElement],["focus","click"],w),e.secondElement!==void 0&&k(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&k(e.amPM,"click",function(M){u(M)})}e.config.allowInput&&k(e._input,"blur",ie)}function V(g,w){var M=g!==void 0?e.parseDate(g):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate<e.now?e.config.maxDate:e.now),P=e.currentYear,z=e.currentMonth;try{M!==void 0&&(e.currentYear=M.getFullYear(),e.currentMonth=M.getMonth())}catch(G){G.message="Invalid date supplied: "+M,e.config.errorHandler(G)}w&&e.currentYear!==P&&(Ne("onYearChange"),ne()),w&&(e.currentYear!==P||e.currentMonth!==z)&&Ne("onMonthChange"),e.redraw()}function q(g){var w=Lt(g);~w.className.indexOf("arrow")&&U(g,w.classList.contains("arrowUp")?1:-1)}function U(g,w,M){var P=g&&Lt(g),z=M||P&&P.parentNode&&P.parentNode.firstChild,G=Ma("increment");G.delta=w,z&&z.dispatchEvent(G)}function Z(){var g=window.document.createDocumentFragment();if(e.calendarContainer=De("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(g.appendChild(c()),e.innerContainer=De("div","flatpickr-innerContainer"),e.config.weekNumbers){var w=b(),M=w.weekWrapper,P=w.weekNumbers;e.innerContainer.appendChild(M),e.weekNumbers=P,e.weekWrapper=M}e.rContainer=De("div","flatpickr-rContainer"),e.rContainer.appendChild(v()),e.daysContainer||(e.daysContainer=De("div","flatpickr-days"),e.daysContainer.tabIndex=-1),F(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),g.appendChild(e.innerContainer)}e.config.enableTime&&g.appendChild(d()),it(e.calendarContainer,"rangeMode",e.config.mode==="range"),it(e.calendarContainer,"animate",e.config.animate===!0),it(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(g);var z=e.config.appendTo!==void 0&&e.config.appendTo.nodeType!==void 0;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!z&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):e.config.appendTo!==void 0&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var G=De("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(G,e.element),G.appendChild(e.element),e.altInput&&G.appendChild(e.altInput),G.appendChild(e.calendarContainer)}!e.config.static&&!e.config.inline&&(e.config.appendTo!==void 0?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}function re(g,w,M,P){var z=W(w,!0),G=De("span",g,w.getDate().toString());return G.dateObj=w,G.$i=P,G.setAttribute("aria-label",e.formatDate(w,e.config.ariaDateFormat)),g.indexOf("hidden")===-1&&Nt(w,e.now)===0&&(e.todayDateElem=G,G.classList.add("today"),G.setAttribute("aria-current","date")),z?(G.tabIndex=-1,Sa(w)&&(G.classList.add("selected"),e.selectedDateElem=G,e.config.mode==="range"&&(it(G,"startRange",e.selectedDates[0]&&Nt(w,e.selectedDates[0],!0)===0),it(G,"endRange",e.selectedDates[1]&&Nt(w,e.selectedDates[1],!0)===0),g==="nextMonthDay"&&G.classList.add("inRange")))):G.classList.add("flatpickr-disabled"),e.config.mode==="range"&&Cd(w)&&!Sa(w)&&G.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&g!=="prevMonthDay"&&P%7===6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(w)+"</span>"),Ne("onDayCreate",G),G}function Te(g){g.focus(),e.config.mode==="range"&&pe(g)}function Me(g){for(var w=g>0?0:e.config.showMonths-1,M=g>0?e.config.showMonths:-1,P=w;P!=M;P+=g)for(var z=e.daysContainer.children[P],G=g>0?0:z.children.length-1,he=g>0?z.children.length:-1,Q=G;Q!=he;Q+=g){var ge=z.children[Q];if(ge.className.indexOf("hidden")===-1&&W(ge.dateObj))return ge}}function oe(g,w){for(var M=g.className.indexOf("Month")===-1?g.dateObj.getMonth():e.currentMonth,P=w>0?e.config.showMonths:-1,z=w>0?1:-1,G=M-e.currentMonth;G!=P;G+=z)for(var he=e.daysContainer.children[G],Q=M-e.currentMonth===G?g.$i+w:w<0?he.children.length-1:0,ge=he.children.length,X=Q;X>=0&&X<ge&&X!=(w>0?ge:-1);X+=z){var ae=he.children[X];if(ae.className.indexOf("hidden")===-1&&W(ae.dateObj)&&Math.abs(g.$i-X)>=Math.abs(w))return Te(ae)}e.changeMonth(z),N(Me(z),0)}function N(g,w){var M=o(),P=j(M||document.body),z=g!==void 0?g:P?M:e.selectedDateElem!==void 0&&j(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&j(e.todayDateElem)?e.todayDateElem:Me(w>0?1:-1);z===void 0?e._input.focus():P?oe(z,w):Te(z)}function H(g,w){for(var M=(new Date(g,w,1).getDay()-e.l10n.firstDayOfWeek+7)%7,P=e.utils.getDaysInMonth((w-1+12)%12,g),z=e.utils.getDaysInMonth(w,g),G=window.document.createDocumentFragment(),he=e.config.showMonths>1,Q=he?"prevMonthDay hidden":"prevMonthDay",ge=he?"nextMonthDay hidden":"nextMonthDay",X=P+1-M,ae=0;X<=P;X++,ae++)G.appendChild(re("flatpickr-day "+Q,new Date(g,w-1,X),X,ae));for(X=1;X<=z;X++,ae++)G.appendChild(re("flatpickr-day",new Date(g,w,X),X,ae));for(var Ce=z+1;Ce<=42-M&&(e.config.showMonths===1||ae%7!==0);Ce++,ae++)G.appendChild(re("flatpickr-day "+ge,new Date(g,w+1,Ce%z),Ce,ae));var rn=De("div","dayContainer");return rn.appendChild(G),rn}function F(){if(e.daysContainer!==void 0){io(e.daysContainer),e.weekNumbers&&io(e.weekNumbers);for(var g=document.createDocumentFragment(),w=0;w<e.config.showMonths;w++){var M=new Date(e.currentYear,e.currentMonth,1);M.setMonth(e.currentMonth+w),g.appendChild(H(M.getFullYear(),M.getMonth()))}e.daysContainer.appendChild(g),e.days=e.daysContainer.firstChild,e.config.mode==="range"&&e.selectedDates.length===1&&pe()}}function ne(){if(!(e.config.showMonths>1||e.config.monthSelectorType!=="dropdown")){var g=function(P){return e.config.minDate!==void 0&&e.currentYear===e.config.minDate.getFullYear()&&P<e.config.minDate.getMonth()?!1:!(e.config.maxDate!==void 0&&e.currentYear===e.config.maxDate.getFullYear()&&P>e.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var w=0;w<12;w++)if(g(w)){var M=De("option","flatpickr-monthDropdown-month");M.value=new Date(e.currentYear,w).getMonth().toString(),M.textContent=ao(w,e.config.shorthandCurrentMonth,e.l10n),M.tabIndex=-1,e.currentMonth===w&&(M.selected=!0),e.monthsDropdownContainer.appendChild(M)}}}function y(){var g=De("div","flatpickr-month"),w=window.document.createDocumentFragment(),M;e.config.showMonths>1||e.config.monthSelectorType==="static"?M=De("span","cur-month"):(e.monthsDropdownContainer=De("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),k(e.monthsDropdownContainer,"change",function(he){var Q=Lt(he),ge=parseInt(Q.value,10);e.changeMonth(ge-e.currentMonth),Ne("onMonthChange")}),ne(),M=e.monthsDropdownContainer);var P=oo("cur-year",{tabindex:"-1"}),z=P.getElementsByTagName("input")[0];z.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&z.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&(z.setAttribute("max",e.config.maxDate.getFullYear().toString()),z.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var G=De("div","flatpickr-current-month");return G.appendChild(M),G.appendChild(P),w.appendChild(G),g.appendChild(w),{container:g,yearElement:z,monthElement:M}}function L(){io(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var g=e.config.showMonths;g--;){var w=y();e.yearElements.push(w.yearElement),e.monthElements.push(w.monthElement),e.monthNav.appendChild(w.container)}e.monthNav.appendChild(e.nextMonthNav)}function c(){return e.monthNav=De("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=De("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=De("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,L(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(g){e.__hidePrevMonthArrow!==g&&(it(e.prevMonthNav,"flatpickr-disabled",g),e.__hidePrevMonthArrow=g)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(g){e.__hideNextMonthArrow!==g&&(it(e.nextMonthNav,"flatpickr-disabled",g),e.__hideNextMonthArrow=g)}}),e.currentYearElement=e.yearElements[0],ho(),e.monthNav}function d(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var g=wa(e.config);e.timeContainer=De("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var w=De("span","flatpickr-time-separator",":"),M=oo("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=M.getElementsByTagName("input")[0];var P=oo("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=P.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=rt(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?g.hours:h(g.hours)),e.minuteElement.value=rt(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():g.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(M),e.timeContainer.appendChild(w),e.timeContainer.appendChild(P),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var z=oo("flatpickr-second");e.secondElement=z.getElementsByTagName("input")[0],e.secondElement.value=rt(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():g.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(De("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(z)}return e.config.time_24hr||(e.amPM=De("span","flatpickr-am-pm",e.l10n.amPM[At((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}function v(){e.weekdayContainer?io(e.weekdayContainer):e.weekdayContainer=De("div","flatpickr-weekdays");for(var g=e.config.showMonths;g--;){var w=De("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(w)}return D(),e.weekdayContainer}function D(){if(e.weekdayContainer){var g=e.l10n.firstDayOfWeek,w=pd(e.l10n.weekdays.shorthand);g>0&&g<w.length&&(w=pd(w.splice(g,w.length),w.splice(0,g)));for(var M=e.config.showMonths;M--;)e.weekdayContainer.children[M].innerHTML=`
4
+ <span class='flatpickr-weekday'>
5
+ `+w.join("</span><span class='flatpickr-weekday'>")+`
6
+ </span>
7
+ `}}function b(){e.calendarContainer.classList.add("hasWeeks");var g=De("div","flatpickr-weekwrapper");g.appendChild(De("span","flatpickr-weekday",e.l10n.weekAbbreviation));var w=De("div","flatpickr-weeks");return g.appendChild(w),{weekWrapper:g,weekNumbers:w}}function _(g,w){w===void 0&&(w=!0);var M=w?g:g-e.currentMonth;M<0&&e._hidePrevMonthArrow===!0||M>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=M,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,Ne("onYearChange"),ne()),F(),Ne("onMonthChange"),ho())}function I(g,w){if(g===void 0&&(g=!0),w===void 0&&(w=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,w===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var M=wa(e.config),P=M.hours,z=M.minutes,G=M.seconds;E(P,z,G)}e.redraw(),g&&Ne("onChange")}function C(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),Ne("onClose")}function Y(){e.config!==void 0&&Ne("onDestroy");for(var g=e._handlers.length;g--;)e._handlers[g].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var w=e.calendarContainer.parentNode;if(w.lastChild&&w.removeChild(w.lastChild),w.parentNode){for(;w.firstChild;)w.parentNode.insertBefore(w.firstChild,w);w.parentNode.removeChild(w)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(M){try{delete e[M]}catch{}})}function A(g){return e.calendarContainer.contains(g)}function K(g){if(e.isOpen&&!e.config.inline){var w=Lt(g),M=A(w),P=w===e.input||w===e.altInput||e.element.contains(w)||g.path&&g.path.indexOf&&(~g.path.indexOf(e.input)||~g.path.indexOf(e.altInput)),z=!P&&!M&&!A(g.relatedTarget),G=!e.config.ignoredFocusElements.some(function(he){return he.contains(w)});z&&G&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&u(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function ee(g){if(!(!g||e.config.minDate&&g<e.config.minDate.getFullYear()||e.config.maxDate&&g>e.config.maxDate.getFullYear())){var w=g,M=e.currentYear!==w;e.currentYear=w||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),M&&(e.redraw(),Ne("onYearChange"),ne())}}function W(g,w){var M;w===void 0&&(w=!0);var P=e.parseDate(g,void 0,w);if(e.config.minDate&&P&&Nt(P,e.config.minDate,w!==void 0?w:!e.minDateHasTime)<0||e.config.maxDate&&P&&Nt(P,e.config.maxDate,w!==void 0?w:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(P===void 0)return!1;for(var z=!!e.config.enable,G=(M=e.config.enable)!==null&&M!==void 0?M:e.config.disable,he=0,Q=void 0;he<G.length;he++){if(Q=G[he],typeof Q=="function"&&Q(P))return z;if(Q instanceof Date&&P!==void 0&&Q.getTime()===P.getTime())return z;if(typeof Q=="string"){var ge=e.parseDate(Q,void 0,!0);return ge&&ge.getTime()===P.getTime()?z:!z}else if(typeof Q=="object"&&P!==void 0&&Q.from&&Q.to&&P.getTime()>=Q.from.getTime()&&P.getTime()<=Q.to.getTime())return z}return!z}function j(g){return e.daysContainer!==void 0?g.className.indexOf("hidden")===-1&&g.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(g):!1}function ie(g){var w=g.target===e._input,M=e._input.value.trimEnd()!==ka();w&&M&&!(g.relatedTarget&&A(g.relatedTarget))&&e.setDate(e._input.value,!0,g.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function le(g){var w=Lt(g),M=e.config.wrap?n.contains(w):w===e._input,P=e.config.allowInput,z=e.isOpen&&(!P||!M),G=e.config.inline&&M&&!P;if(g.keyCode===13&&M){if(P)return e.setDate(e._input.value,!0,w===e.altInput?e.config.altFormat:e.config.dateFormat),e.close(),w.blur();e.open()}else if(A(w)||z||G){var he=!!e.timeContainer&&e.timeContainer.contains(w);switch(g.keyCode){case 13:he?(g.preventDefault(),u(),_a()):kc(g);break;case 27:g.preventDefault(),_a();break;case 8:case 46:M&&!e.config.allowInput&&(g.preventDefault(),e.clear());break;case 37:case 39:if(!he&&!M){g.preventDefault();var Q=o();if(e.daysContainer!==void 0&&(P===!1||Q&&j(Q))){var ge=g.keyCode===39?1:-1;g.ctrlKey?(g.stopPropagation(),_(ge),N(Me(1),0)):N(void 0,ge)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:g.preventDefault();var X=g.keyCode===40?1:-1;e.daysContainer&&w.$i!==void 0||w===e.input||w===e.altInput?g.ctrlKey?(g.stopPropagation(),ee(e.currentYear-X),N(Me(1),0)):he||N(void 0,X*7):w===e.currentYearElement?ee(e.currentYear-X):e.config.enableTime&&(!he&&e.hourElement&&e.hourElement.focus(),u(g),e._debouncedChange());break;case 9:if(he){var ae=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(Ot){return Ot}),Ce=ae.indexOf(w);if(Ce!==-1){var rn=ae[Ce+(g.shiftKey?-1:1)];g.preventDefault(),(rn||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(w)&&g.shiftKey&&(g.preventDefault(),e._input.focus());break;default:break}}if(e.amPM!==void 0&&w===e.amPM)switch(g.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],f(),fn();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],f(),fn();break}(M||A(w))&&Ne("onKeyDown",g)}function pe(g,w){if(w===void 0&&(w="flatpickr-day"),!(e.selectedDates.length!==1||g&&(!g.classList.contains(w)||g.classList.contains("flatpickr-disabled")))){for(var M=g?g.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),P=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),z=Math.min(M,e.selectedDates[0].getTime()),G=Math.max(M,e.selectedDates[0].getTime()),he=!1,Q=0,ge=0,X=z;X<G;X+=fd.DAY)W(new Date(X),!0)||(he=he||X>z&&X<G,X<P&&(!Q||X>Q)?Q=X:X>P&&(!ge||X<ge)&&(ge=X));var ae=Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+"+e.config.showMonths+") > ."+w));ae.forEach(function(Ce){var rn=Ce.dateObj,Ot=rn.getTime(),Gr=Q>0&&Ot<Q||ge>0&&Ot>ge;if(Gr){Ce.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(fr){Ce.classList.remove(fr)});return}else if(he&&!Gr)return;["startRange","inRange","endRange","notAllowed"].forEach(function(fr){Ce.classList.remove(fr)}),g!==void 0&&(g.classList.add(M<=e.selectedDates[0].getTime()?"startRange":"endRange"),P<M&&Ot===P?Ce.classList.add("startRange"):P>M&&Ot===P&&Ce.classList.add("endRange"),Ot>=Q&&(ge===0||Ot<=ge)&&hd(Ot,P,M)&&Ce.classList.add("inRange"))})}}function we(){e.isOpen&&!e.config.static&&!e.config.inline&&Rn()}function Pe(g,w){if(w===void 0&&(w=e._positionElement),e.isMobile===!0){if(g){g.preventDefault();var M=Lt(g);M&&M.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),Ne("onOpen");return}else if(e._input.disabled||e.config.inline)return;var P=e.isOpen;e.isOpen=!0,P||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),Ne("onOpen"),Rn(w)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(g===void 0||!e.timeContainer.contains(g.relatedTarget))&&setTimeout(function(){return e.hourElement.select()},50)}function je(g){return function(w){var M=e.config["_"+g+"Date"]=e.parseDate(w,e.config.dateFormat),P=e.config["_"+(g==="min"?"max":"min")+"Date"];M!==void 0&&(e[g==="min"?"minDateHasTime":"maxDateHasTime"]=M.getHours()>0||M.getMinutes()>0||M.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function(z){return W(z)}),!e.selectedDates.length&&g==="min"&&p(M),fn()),e.daysContainer&&(lo(),M!==void 0?e.currentYearElement[g]=M.getFullYear().toString():e.currentYearElement.removeAttribute(g),e.currentYearElement.disabled=!!P&&M!==void 0&&P.getFullYear()===M.getFullYear())}}function Qe(){var g=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],w=ot(ot({},JSON.parse(JSON.stringify(n.dataset||{}))),t),M={};e.config.parseDate=w.parseDate,e.config.formatDate=w.formatDate,Object.defineProperty(e.config,"enable",{get:function(){return e.config._enable},set:function(ae){e.config._enable=Cc(ae)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(ae){e.config._disable=Cc(ae)}});var P=w.mode==="time";if(!w.dateFormat&&(w.enableTime||P)){var z=ze.defaultConfig.dateFormat||Kn.dateFormat;M.dateFormat=w.noCalendar||P?"H:i"+(w.enableSeconds?":S":""):z+" H:i"+(w.enableSeconds?":S":"")}if(w.altInput&&(w.enableTime||P)&&!w.altFormat){var G=ze.defaultConfig.altFormat||Kn.altFormat;M.altFormat=w.noCalendar||P?"h:i"+(w.enableSeconds?":S K":" K"):G+(" h:i"+(w.enableSeconds?":S":"")+" K")}Object.defineProperty(e.config,"minDate",{get:function(){return e.config._minDate},set:je("min")}),Object.defineProperty(e.config,"maxDate",{get:function(){return e.config._maxDate},set:je("max")});var he=function(ae){return function(Ce){e.config[ae==="min"?"_minTime":"_maxTime"]=e.parseDate(Ce,"H:i:S")}};Object.defineProperty(e.config,"minTime",{get:function(){return e.config._minTime},set:he("min")}),Object.defineProperty(e.config,"maxTime",{get:function(){return e.config._maxTime},set:he("max")}),w.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,M,w);for(var Q=0;Q<g.length;Q++)e.config[g[Q]]=e.config[g[Q]]===!0||e.config[g[Q]]==="true";ma.filter(function(ae){return e.config[ae]!==void 0}).forEach(function(ae){e.config[ae]=ga(e.config[ae]||[]).map(a)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var Q=0;Q<e.config.plugins.length;Q++){var ge=e.config.plugins[Q](e)||{};for(var X in ge)ma.indexOf(X)>-1?e.config[X]=ga(ge[X]).map(a).concat(e.config[X]):typeof w[X]>"u"&&(e.config[X]=ge[X])}w.altInputClass||(e.config.altInputClass=Vt().className+" "+e.config.altInputClass),Ne("onParseConfig")}function Vt(){return e.config.wrap?n.querySelector("[data-input]"):n}function Gn(){typeof e.config.locale!="object"&&typeof ze.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=ot(ot({},ze.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?ze.l10ns[e.config.locale]:void 0),Pn.D="("+e.l10n.weekdays.shorthand.join("|")+")",Pn.l="("+e.l10n.weekdays.longhand.join("|")+")",Pn.M="("+e.l10n.months.shorthand.join("|")+")",Pn.F="("+e.l10n.months.longhand.join("|")+")",Pn.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")";var g=ot(ot({},t),JSON.parse(JSON.stringify(n.dataset||{})));g.time_24hr===void 0&&ze.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=Mc(e),e.parseDate=ya({config:e.config,l10n:e.l10n})}function Rn(g){if(typeof e.config.position=="function")return void e.config.position(e,g);if(e.calendarContainer!==void 0){Ne("onPreCalendarPosition");var w=g||e._positionElement,M=Array.prototype.reduce.call(e.calendarContainer.children,function(Yd,Hd){return Yd+Hd.offsetHeight},0),P=e.calendarContainer.offsetWidth,z=e.config.position.split(" "),G=z[0],he=z.length>1?z[1]:null,Q=w.getBoundingClientRect(),ge=window.innerHeight-Q.bottom,X=G==="above"||G!=="below"&&ge<M&&Q.top>M,ae=window.pageYOffset+Q.top+(X?-M-2:w.offsetHeight+2);if(it(e.calendarContainer,"arrowTop",!X),it(e.calendarContainer,"arrowBottom",X),!e.config.inline){var Ce=window.pageXOffset+Q.left,rn=!1,Ot=!1;he==="center"?(Ce-=(P-Q.width)/2,rn=!0):he==="right"&&(Ce-=P-Q.width,Ot=!0),it(e.calendarContainer,"arrowLeft",!rn&&!Ot),it(e.calendarContainer,"arrowCenter",rn),it(e.calendarContainer,"arrowRight",Ot);var Gr=window.document.body.offsetWidth-(window.pageXOffset+Q.right),fr=Ce+P>window.document.body.offsetWidth,Pd=Gr+P>window.document.body.offsetWidth;if(it(e.calendarContainer,"rightMost",fr),!e.config.static)if(e.calendarContainer.style.top=ae+"px",!fr)e.calendarContainer.style.left=Ce+"px",e.calendarContainer.style.right="auto";else if(!Pd)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=Gr+"px";else{var Ta=Kr();if(Ta===void 0)return;var Rd=window.document.body.offsetWidth,Ad=Math.max(0,Rd/2-P/2),Ld=".flatpickr-calendar.centerMost:before",Nd=".flatpickr-calendar.centerMost:after",Od=Ta.cssRules.length,Fd="{left:"+Q.left+"px;right:auto;}";it(e.calendarContainer,"rightMost",!1),it(e.calendarContainer,"centerMost",!0),Ta.insertRule(Ld+","+Nd+Fd,Od),e.calendarContainer.style.left=Ad+"px",e.calendarContainer.style.right="auto"}}}}function Kr(){for(var g=null,w=0;w<document.styleSheets.length;w++){var M=document.styleSheets[w];if(M.cssRules){try{M.cssRules}catch{continue}g=M;break}}return g??co()}function co(){var g=document.createElement("style");return document.head.appendChild(g),g.sheet}function lo(){e.config.noCalendar||e.isMobile||(ne(),ho(),F())}function _a(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function kc(g){g.preventDefault(),g.stopPropagation();var w=function(ae){return ae.classList&&ae.classList.contains("flatpickr-day")&&!ae.classList.contains("flatpickr-disabled")&&!ae.classList.contains("notAllowed")},M=Ec(Lt(g),w);if(M!==void 0){var P=M,z=e.latestSelectedDateObj=new Date(P.dateObj.getTime()),G=(z.getMonth()<e.currentMonth||z.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=P,e.config.mode==="single")e.selectedDates=[z];else if(e.config.mode==="multiple"){var he=Sa(z);he?e.selectedDates.splice(parseInt(he),1):e.selectedDates.push(z)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=z,e.selectedDates.push(z),Nt(z,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(ae,Ce){return ae.getTime()-Ce.getTime()}));if(f(),G){var Q=e.currentYear!==z.getFullYear();e.currentYear=z.getFullYear(),e.currentMonth=z.getMonth(),Q&&(Ne("onYearChange"),ne()),Ne("onMonthChange")}if(ho(),F(),fn(),!G&&e.config.mode!=="range"&&e.config.showMonths===1?Te(P):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){var ge=e.config.mode==="single"&&!e.config.enableTime,X=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(ge||X)&&_a()}R()}}var uo={locale:[Gn,D],showMonths:[L,s,v],minDate:[V],maxDate:[V],positionElement:[Ic],clickOpens:[function(){e.config.clickOpens===!0?(k(e._input,"focus",e.open),k(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function Ed(g,w){if(g!==null&&typeof g=="object"){Object.assign(e.config,g);for(var M in g)uo[M]!==void 0&&uo[M].forEach(function(P){return P()})}else e.config[g]=w,uo[g]!==void 0?uo[g].forEach(function(P){return P()}):ma.indexOf(g)>-1&&(e.config[g]=ga(w));e.redraw(),fn(!0)}function Tc(g,w){var M=[];if(g instanceof Array)M=g.map(function(P){return e.parseDate(P,w)});else if(g instanceof Date||typeof g=="number")M=[e.parseDate(g,w)];else if(typeof g=="string")switch(e.config.mode){case"single":case"time":M=[e.parseDate(g,w)];break;case"multiple":M=g.split(e.config.conjunction).map(function(P){return e.parseDate(P,w)});break;case"range":M=g.split(e.l10n.rangeSeparator).map(function(P){return e.parseDate(P,w)});break;default:break}else e.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(g)));e.selectedDates=e.config.allowInvalidPreload?M:M.filter(function(P){return P instanceof Date&&W(P,!1)}),e.config.mode==="range"&&e.selectedDates.sort(function(P,z){return P.getTime()-z.getTime()})}function _d(g,w,M){if(w===void 0&&(w=!1),M===void 0&&(M=e.config.dateFormat),g!==0&&!g||g instanceof Array&&g.length===0)return e.clear(w);Tc(g,M),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),V(void 0,w),p(),e.selectedDates.length===0&&e.clear(!1),fn(w),w&&Ne("onChange")}function Cc(g){return g.slice().map(function(w){return typeof w=="string"||typeof w=="number"||w instanceof Date?e.parseDate(w,void 0,!0):w&&typeof w=="object"&&w.from&&w.to?{from:e.parseDate(w.from,void 0),to:e.parseDate(w.to,void 0)}:w}).filter(function(w){return w})}function Md(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var g=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);g&&Tc(g,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function Sd(){if(e.input=Vt(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=De(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),Ic()}function Ic(){e._positionElement=e.config.positionElement||e._input}function kd(){var g=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=De("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=g,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=g==="datetime-local"?"Y-m-d\\TH:i:S":g==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch{}k(e.mobileInput,"change",function(w){e.setDate(Lt(w).value,!1,e.mobileFormatStr),Ne("onChange"),Ne("onClose")})}function Td(g){if(e.isOpen===!0)return e.close();e.open(g)}function Ne(g,w){if(e.config!==void 0){var M=e.config[g];if(M!==void 0&&M.length>0)for(var P=0;M[P]&&P<M.length;P++)M[P](e.selectedDates,e.input.value,e,w);g==="onChange"&&(e.input.dispatchEvent(Ma("change")),e.input.dispatchEvent(Ma("input")))}}function Ma(g){var w=document.createEvent("Event");return w.initEvent(g,!0,!0),w}function Sa(g){for(var w=0;w<e.selectedDates.length;w++){var M=e.selectedDates[w];if(M instanceof Date&&Nt(M,g)===0)return""+w}return!1}function Cd(g){return e.config.mode!=="range"||e.selectedDates.length<2?!1:Nt(g,e.selectedDates[0])>=0&&Nt(g,e.selectedDates[1])<=0}function ho(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(g,w){var M=new Date(e.currentYear,e.currentMonth,1);M.setMonth(e.currentMonth+w),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[w].textContent=ao(M.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=M.getMonth().toString(),g.value=M.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function ka(g){var w=g||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(M){return e.formatDate(M,w)}).filter(function(M,P,z){return e.config.mode!=="range"||e.config.enableTime||z.indexOf(M)===P}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function fn(g){g===void 0&&(g=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=ka(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=ka(e.config.altFormat)),g!==!1&&Ne("onValueUpdate")}function Id(g){var w=Lt(g),M=e.prevMonthNav.contains(w),P=e.nextMonthNav.contains(w);M||P?_(M?-1:1):e.yearElements.indexOf(w)>=0?w.select():w.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):w.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function xd(g){g.preventDefault();var w=g.type==="keydown",M=Lt(g),P=M;e.amPM!==void 0&&M===e.amPM&&(e.amPM.textContent=e.l10n.amPM[At(e.amPM.textContent===e.l10n.amPM[0])]);var z=parseFloat(P.getAttribute("min")),G=parseFloat(P.getAttribute("max")),he=parseFloat(P.getAttribute("step")),Q=parseInt(P.value,10),ge=g.delta||(w?g.which===38?1:-1:0),X=Q+he*ge;if(typeof P.value<"u"&&P.value.length===2){var ae=P===e.hourElement,Ce=P===e.minuteElement;X<z?(X=G+X+At(!ae)+(At(ae)&&At(!e.amPM)),Ce&&U(void 0,-1,e.hourElement)):X>G&&(X=P===e.hourElement?X-G-At(!e.amPM):z,Ce&&U(void 0,1,e.hourElement)),e.amPM&&ae&&(he===1?X+Q===23:Math.abs(X-Q)>he)&&(e.amPM.textContent=e.l10n.amPM[At(e.amPM.textContent===e.l10n.amPM[0])]),P.value=rt(X)}}return i(),e}function qr(n,t){for(var e=Array.prototype.slice.call(n).filter(function(a){return a instanceof HTMLElement}),r=[],i=0;i<e.length;i++){var o=e[i];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=Cm(o,t||{}),r.push(o._flatpickr)}catch(a){console.error(a)}}return r.length===1?r[0]:r}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return qr(this,n)},HTMLElement.prototype.flatpickr=function(n){return qr([this],n)});var ze=function(n,t){return typeof n=="string"?qr(window.document.querySelectorAll(n),t):n instanceof Node?qr([n],t):qr(n,t)};ze.defaultConfig={};ze.l10ns={en:ot({},pa),default:ot({},pa)};ze.localize=function(n){ze.l10ns.default=ot(ot({},ze.l10ns.default),n)};ze.setDefaults=function(n){ze.defaultConfig=ot(ot({},ze.defaultConfig),n)};ze.parseDate=ya({});ze.formatDate=Mc({});ze.compareDates=Nt;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(n){return qr(this,n)});Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))};typeof window<"u"&&(window.flatpickr=ze);var gd=ze;var so=class{constructor(t,e){this.dateInputEl=t;O(this,"minDate");O(this,"maxDate");O(this,"defaultReservationDays");O(this,"hasPrices",!1);O(this,"prices",{});O(this,"availability",{});O(this,"disabledDates",[]);O(this,"selectedStartDate");O(this,"selectedEndDate");O(this,"config");O(this,"instance");O(this,"destroyInstance");O(this,"currentDate");O(this,"handleResize",()=>{let t=this.isMobileDevice();(t&&this.config.grid!==1||!t&&this.config.grid!==2)&&(this.config.grid=t?1:2,this.config.calendars=t?1:2,this.destroyInstance&&this.destroyInstance(),this.initialize())});this.isMobileDevice()&&(e.grid=1,e.calendars=1),this.dateInputEl=t,this.defaultReservationDays=e.defaultReservationDays??3,this.config={type:e.type,showPrices:e.showPrices??!1,defaultReservationDays:this.defaultReservationDays,grid:e.grid??2,calendars:e.calendars??2,darkMode:e.darkMode??!0,tooltip:e.tooltip??!0,repick:e.repick??!1,minDays:e.minDays??1,defaultStartDate:e.defaultStartDate??J.getCurrentDate(),defaultEndDate:e.defaultEndDate??J.getCurrentDate()},this.currentDate=J.getCurrentDate(),this.selectedStartDate=this.config.defaultStartDate,this.selectedEndDate=this.config.defaultEndDate}isMobileDevice(){return window.innerWidth<=768}initialize(){switch(window.addEventListener("resize",this.handleResize),this.config.type){case"easepick":this.initEasepickCalendar();break;case"flatpickr":this.initFlatpickrCalendar();break;default:throw new Error(`Unsupported calendar type: ${this.config.type}`)}}setMinimumDate(t){this.minDate=t}setMaximumDate(t){this.maxDate=t}setStartDate(t){let e=J.toJSDate(t),r=J.toJSDate(this.selectedEndDate);this.selectedStartDate=t,this.instance instanceof ha.Core?this.instance.setStartDate(new de(t.toString())):this.config.type==="flatpickr"&&this.instance.setDate([e,r],!0)}setEndDate(t){let e=J.toJSDate(this.selectedStartDate),r=J.toJSDate(t);this.selectedEndDate=t,this.instance instanceof ha.Core?this.instance.setEndDate(new de(t.toString())):this.config.type==="flatpickr"&&this.instance.setDate([e,r],!0)}setDateRange(t,e){if(this.config.type==="flatpickr"){this.selectedStartDate=t,this.selectedEndDate=e;let r=J.toJSDate(t),i=J.toJSDate(e);this.instance.setDate([r,i],!0);return}this.setStartDate(t),this.setEndDate(e)}getSelectedDates(){return{startDate:this.selectedStartDate,endDate:this.selectedEndDate}}includePrices(t=!0){this.hasPrices=t}setPrices(t){this.prices=t}setAvailability(t){this.availability=t,this.disabledDates=Object.keys(t).filter(e=>!t[e])}initEasepickCalendar(){let t={element:this.dateInputEl,css:["https://cdn.jsdelivr.net/npm/@easepick/bundle@1.2.1/dist/index.css"],zIndex:10,format:Wu,grid:this.config.grid,calendars:this.config.calendars,header:"",lang:document.documentElement.lang,RangePlugin:{tooltip:this.config.tooltip,repick:this.config.repick,startDate:new de(this.config.defaultStartDate.toString()),endDate:new de(this.config.defaultEndDate.toString()),tooltipNumber:r=>r-1,locale:{one:"nuit",other:"nuits"}},LockPlugin:{minDate:new de(this.minDate.toString()),minDays:this.config.minDays,selectForward:!0},AmpPlugin:{darkMode:this.config.darkMode},plugins:[da,ua,la],setup:r=>{r.on("view",i=>{let{view:o,date:a,target:s}=i.detail,u=a?a.format("YYYY-MM-DD"):null;if(o==="CalendarDay"&&u&&this.prices[u]){let l=this.prices[u],h=s.querySelector(`.${ra}`)||document.createElement("span");h.className=ra,h.textContent=`${l.toLocaleString(tn,{style:"currency",currency:"EUR",maximumFractionDigits:0})}`,h.style.color="#c64509",h.style.fontWeight="bold",h.style.fontSize="10px",s.append(h)}}),r.on("select",i=>{let{start:o,end:a}=i.detail;this.selectedStartDate=J.fromString(o.format("YYYY-MM-DD")),this.selectedEndDate=J.fromString(a.format("YYYY-MM-DD"));let s={startDate:o.format("YYYY-MM-DD").toString(),endDate:a.format("YYYY-MM-DD").toString()};_t("date:changed",s)})}},e=new ha.create(t);this.instance=e,this.destroyInstance=()=>e.destroy()}initFlatpickrCalendar(){let t=document.createElement("link");t.rel="stylesheet",t.href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.css",document.head.appendChild(t);let e={mode:"range",showMonths:this.config.calendars,minDate:this.minDate.toString(),defaultDate:[this.config.defaultStartDate.toString(),this.config.defaultEndDate.toString()],shorthandCurrentMonth:!0,monthSelectorType:"static",inline:!1,dateFormat:Ku,lang:document.documentElement.lang,zIndex:10,disable:this.disabledDates,onChange:i=>{if(i.length===2){this.selectedStartDate=J.fromJSDate(i[0]),this.selectedEndDate=J.fromJSDate(i[1]);let o={startDate:this.selectedStartDate.toString(),endDate:this.selectedEndDate.toString()};_t("date:changed",o);let a=Xe("label",this.dateInputEl);if(a){let s=this.formatDate(i[0]),u=this.formatDate(i[1]);a.textContent=`${s} - ${u}`}}else Qi()},onDayCreate:async(i,o,a,s)=>{let u=s.dateObj,l=J.fromJSDate(u),h=J.formatForAPI(l);if(this.prices[h]){let f=this.prices[h],p=document.createElement("span");p.style.marginTop="2px",p.style.color="#c64509",p.style.fontSize="10px",p.style.fontWeight="bold",p.className=ra,p.textContent=`${f.toLocaleString(tn,{style:"currency",currency:"EUR",maximumFractionDigits:0})}`,s.style.display="flex",s.style.flexDirection="column",s.style.alignItems="center",s.style.justifyContent="center",s.style.lineHeight="1.1",s.appendChild(p)}}},r=gd(this.dateInputEl,e);this.instance=r,this.destroyInstance=()=>r.destroy()}destroy(){window.removeEventListener("resize",this.handleResize),this.destroyInstance&&this.destroyInstance()}formatDate(t){let e=J.fromJSDate(t),r=e.year,i=String(e.month).padStart(2,"0"),o=String(e.day).padStart(2,"0");return tn==="en-US"?`${r}/${i}/${o}`:tn==="fr-FR"||tn==="de-DE"?`${o}/${i}/${r}`:`${r}/${i}/${o}`}};var vd=async(n=[])=>{let t={method:"POST",headers:ye.headers,body:JSON.stringify(n)};return(await Ve("/configuration/get",t,null,!0)).filter(r=>"error"in r?(console.error("Error fetching configuration:",r),!1):!0)};var cv=Be({}),Sc=Be([]);async function wd(){if(Sc.value.length>0)return Sc.value;let n=await vd(),t=Ou(n);return Sc.value=t,t}var wv=Be({});var ba=class{constructor(t,e=lc){this.fsListInstance=t;this.includePrices=e;O(this,"element");O(this,"apartmentInputEl");O(this,"dateInputEl");O(this,"guestsInputEl");O(this,"chambresInputEl");O(this,"calendarInstance");O(this,"uniqueEnterprises",[]);O(this,"state",{startDate:_e.startDate?J.safeParsePlainDate(_e.startDate):xn,endDate:_e.endDate?J.safeParsePlainDate(_e.endDate):qn});O(this,"populateApartmentsInput",()=>{if(!this.apartmentInputEl||!this.fsListInstance)return;let t=document.createDocumentFragment(),e=this.apartmentInputEl.querySelector("option");e&&t.appendChild(e),this.uniqueEnterprises.forEach(r=>{let i=document.createElement("option");i.value=r.id,i.textContent=r.title,t.appendChild(i)}),this.apartmentInputEl.replaceChildren(t),eo(this.apartmentInputEl,"input",async r=>{let i=r.target,o=to(i);_t("apartment:changed",o)}),_e.enterpriseId&&no(this.apartmentInputEl,_e.enterpriseId||"")});O(this,"populateCalendarInput",async t=>{if(!this.dateInputEl)return;this.dateInputEl.style.cursor="pointer";let e=new so(this.dateInputEl,{type:"flatpickr",showPrices:!0,defaultReservationDays:3,grid:2,calendars:2,darkMode:!1,tooltip:!0,repick:!1,minDays:1});if(e.setMinimumDate(xn),e.setMaximumDate(qn),e.includePrices(this.includePrices),this.includePrices){let r=await vc(this.uniqueEnterprises.map(i=>i.id).filter(i=>i!==t||t==null));e.setPrices(r)}return e.initialize(),e});if(this.element=Xe("booking-component"),!this.element)throw new Error("Filters component not found");this.apartmentInputEl=Xe("location-input",this.element),this.dateInputEl=Xe("date-input",this.element),this.guestsInputEl=Xe("guests-input",this.element),this.chambresInputEl=Xe("rooms-input",this.element),this.uniqueEnterprises=[];let r=new Set;this.fsListInstance.items.value.forEach(i=>{r.has(i.fields["enterprise-id"].value)||(r.add(i.fields["enterprise-id"].value),this.uniqueEnterprises.push({id:i.fields["enterprise-id"].value,title:i.fields.title.value}))}),Pt("loading:start",i=>hr(!0,i)),Pt("loading:end",i=>hr(!1,i)),Pt("apartment:changed",async i=>{i.length===0?_e.enterpriseId=null:_e.enterpriseId=i,this.calendarInstance&&_e.enterpriseId&&await this.updateCalendarForSelectedApartment(_e.enterpriseId)}),Pt("date:changed",async i=>{_e.startDate=i.startDate,_e.endDate=i.endDate}),Pt("guests:changed",async i=>{_e.guests=parseInt(i)}),Pt("n_rooms:changed",async i=>{_e.rooms=parseInt(i)}),Pt("coupon:changed",async i=>{_e.coupon=i}),Pt(["apartment:changed","date:changed","guests:changed","coupon:changed"],async()=>{})}async init(){_t("loading:start",this.element);try{return this.apartmentInputEl&&this.populateApartmentsInput(),this.guestsInputEl&&this.populateGuestsInput(),this.chambresInputEl&&this.populateChambresInput(),this.dateInputEl&&(this.calendarInstance=await this.populateCalendarInput(),this.state.startDate&&this.state.endDate&&this.calendarInstance?.setDateRange(this.state.startDate,this.state.endDate)),this}catch(t){throw t instanceof Error?console.error("Error initializing BookingComponent",t.name):console.error("Error initializing BookingComponent",t),t}}populateGuestsInput(){if(!this.guestsInputEl){console.warn("guests dropdown not found. skipping...");return}let t=document.createDocumentFragment(),e=this.guestsInputEl.querySelector("option");e&&t.appendChild(e);let r=new Set;this.fsListInstance.items.value.forEach(o=>{r.add(o.fields.guests.value)});let i=Math.max(...Array.from(r).map(Number));for(let o=1;o<=i;o++){let a=document.createElement("option");a.value=o.toString(),a.textContent=o.toString(),t.appendChild(a)}this.guestsInputEl.replaceChildren(t),eo(this.guestsInputEl,"input",async o=>{let a=o.target,s=to(a);_t("guests:changed",s)}),_e.guests&&no(this.guestsInputEl,_e.guests.toString())}populateChambresInput(){if(!this.chambresInputEl){console.warn("rooms dropdown not found. skipping...");return}let t=document.createDocumentFragment(),e=this.chambresInputEl.querySelector("option");e&&t.appendChild(e);let r=new Set;this.fsListInstance.items.value.forEach(o=>{r.add(o.fields.rooms.value)});let i=Math.max(...Array.from(r).map(Number));for(let o=1;o<=i;o++){let a=document.createElement("option");a.value=o.toString(),a.textContent=o.toString(),t.appendChild(a)}this.chambresInputEl.replaceChildren(t),eo(this.chambresInputEl,"input",async o=>{let a=o.target,s=to(a);_t("n_rooms:changed",s)}),_e.rooms&&no(this.chambresInputEl,_e.rooms.toString())}async updateCalendarForSelectedApartment(t){if(this.dateInputEl)try{this.calendarInstance&&(this.calendarInstance.destroy?.(),this.calendarInstance=void 0),this.calendarInstance=await this.populateCalendarInput(t)}catch(e){console.error("Error updating calendar for selected apartment:",e)}}};function Im(n,t,e,r){function i(o){return o instanceof e?o:new e(function(a){a(o)})}return new(e||(e=Promise))(function(o,a){function s(h){try{l(r.next(h))}catch(f){a(f)}}function u(h){try{l(r.throw(h))}catch(f){a(f)}}function l(h){h.done?o(h.value):i(h.value).then(s,u)}l((r=r.apply(n,t||[])).next())})}function xm(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Pm=function n(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var r,i,o;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(i=r;i--!==0;)if(!n(t[i],e[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(e).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(e,o[i]))return!1;for(i=r;i--!==0;){var a=o[i];if(!n(t[a],e[a]))return!1}return!0}return t!==t&&e!==e},Rm=xm(Pm),bd="__googleMapsScriptId",Wr;(function(n){n[n.INITIALIZED=0]="INITIALIZED",n[n.LOADING=1]="LOADING",n[n.SUCCESS=2]="SUCCESS",n[n.FAILURE=3]="FAILURE"})(Wr||(Wr={}));var Da=class n{constructor({apiKey:t,authReferrerPolicy:e,channel:r,client:i,id:o=bd,language:a,libraries:s=[],mapIds:u,nonce:l,region:h,retries:f=3,url:p="https://maps.googleapis.com/maps/api/js",version:E}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=t,this.authReferrerPolicy=e,this.channel=r,this.client=i,this.id=o||bd,this.language=a,this.libraries=s,this.mapIds=u,this.nonce=l,this.region=h,this.retries=f,this.url=p,this.version=E,n.instance){if(!Rm(this.options,n.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(n.instance.options)}`);return n.instance}n.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?Wr.FAILURE:this.done?Wr.SUCCESS:this.loading?Wr.LOADING:Wr.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let t=this.url;return t+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(t+=`&key=${this.apiKey}`),this.channel&&(t+=`&channel=${this.channel}`),this.client&&(t+=`&client=${this.client}`),this.libraries.length>0&&(t+=`&libraries=${this.libraries.join(",")}`),this.language&&(t+=`&language=${this.language}`),this.region&&(t+=`&region=${this.region}`),this.version&&(t+=`&v=${this.version}`),this.mapIds&&(t+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(t+=`&auth_referrer_policy=${this.authReferrerPolicy}`),t}deleteScript(){let t=document.getElementById(this.id);t&&t.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((t,e)=>{this.loadCallback(r=>{r?e(r.error):t(window.google)})})}importLibrary(t){return this.execute(),google.maps.importLibrary(t)}loadCallback(t){this.callbacks.push(t),this.execute()}setScript(){var t,e;if(document.getElementById(this.id)){this.callback();return}let r={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(r).forEach(o=>!r[o]&&delete r[o]),!((e=(t=window?.google)===null||t===void 0?void 0:t.maps)===null||e===void 0)&&e.importLibrary||(o=>{let a,s,u,l="The Google Maps JavaScript API",h="google",f="importLibrary",p="__ib__",E=document,S=window;S=S[h]||(S[h]={});let k=S.maps||(S.maps={}),R=new Set,$=new URLSearchParams,V=()=>a||(a=new Promise((q,U)=>Im(this,void 0,void 0,function*(){var Z;yield s=E.createElement("script"),s.id=this.id,$.set("libraries",[...R]+"");for(u in o)$.set(u.replace(/[A-Z]/g,re=>"_"+re[0].toLowerCase()),o[u]);$.set("callback",h+".maps."+p),s.src=this.url+"?"+$,k[p]=q,s.onerror=()=>a=U(Error(l+" could not load.")),s.nonce=this.nonce||((Z=E.querySelector("script[nonce]"))===null||Z===void 0?void 0:Z.nonce)||"",E.head.append(s)})));k[f]?console.warn(l+" only loads once. Ignoring:",o):k[f]=(q,...U)=>R.add(q)&&V().then(()=>k[f](q,...U))})(r);let i=this.libraries.map(o=>this.importLibrary(o));i.length||i.push(this.importLibrary("core")),Promise.all(i).then(()=>this.callback(),o=>{let a=new ErrorEvent("error",{error:o});this.loadErrorCallback(a)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(t){if(this.errors.push(t),this.errors.length<=this.retries){let e=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${e} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},e)}else this.onerrorEvent=t,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(t=>{t(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading=!0,this.setScript()}}};var Ea=class{constructor(t){O(this,"map",null);O(this,"markers",[]);O(this,"element");O(this,"wrapperElement");O(this,"landmarks",[]);O(this,"medianLandmark",{lat:0,lng:0});O(this,"loader");O(this,"initPromise");O(this,"markerMap",new Map);O(this,"infoWindows",new Map);O(this,"currentlyOpenInfoWindows",new Set);O(this,"geocoder",null);O(this,"colors",{marker:"#C64509",marker_dark:"#8B3604",label:"#616161",road:"#e4e1db",water:"#d8d3cb",water_label:"#9e9e9e"});if(this.landmarks=t,this.element=Xe("map-canvas"),this.wrapperElement=Xe("map-wrapper"),!this.element||!this.wrapperElement)throw new Error("Map canvas not found");this.element.innerHTML="",this.loader=new Da({apiKey:qu,version:"weekly",libraries:["places","marker","geocoding"]}),this.initPromise=this.init(),this.initPromise.then(()=>{this.fillMissingCoordinates()})}async init(){try{if(await this.loader.load(),!this.element)return;this.geocoder=new google.maps.Geocoder,this.map=new google.maps.Map(this.element,{center:{lat:this.medianLandmark.lat,lng:this.medianLandmark.lng},zoom:13,gestureHandling:"greedy",styles:[{elementType:"geometry",stylers:[{color:"#f7f6f4"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f5f5"}]},{featureType:"administrative.land_parcel",stylers:[{visibility:"off"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"administrative.neighborhood",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"poi",elementType:"labels.text",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"poi.attraction",stylers:[{visibility:"simplified"}]},{featureType:"poi.attraction",elementType:"labels",stylers:[{visibility:"on"}]},{featureType:"poi.attraction",elementType:"labels.icon",stylers:[{color:"#9d907c"},{visibility:"on"}]},{featureType:"poi.park",stylers:[{visibility:"off"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#ebe9e5"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"road",stylers:[{color:"#e4e1db"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#e4e1db"}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.arterial",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{color:"#757575"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#d8d3cb"}]},{featureType:"road.highway",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#616161"}]},{featureType:"road.local",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#e5e5e5"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#eeeeee"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#d8d3cb"}]},{featureType:"water",elementType:"labels.text",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#9e9e9e"}]}],disableDefaultUI:!0,zoomControl:!0,mapTypeControl:!1,streetViewControl:!1,rotateControl:!1,fullscreenControl:!1}),this.landmarks.length>0&&this.addLandmarks()}catch(t){throw console.error("Error loading Google Maps:",t),t}}async addLandmarks(){if(await this.initPromise,!this.map){console.error("Map not initialized");return}for(let t of this.landmarks){let e={url:"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(sc(this.colors.marker)),scaledSize:new google.maps.Size(48,48),anchor:new google.maps.Point(24,48)};if(t.lat&&t.lng){let r=new google.maps.Marker({map:this.map,position:{lat:t.lat,lng:t.lng},title:t.name,icon:e});this.setupMarkerInfoWindow(r,t),this.markers.push(r),this.markerMap.set(t.enterpriseId,r)}else if(t.address)try{let r=await this.geocodeAddress(t.address);if(r){t.lat=r.lat,t.lng=r.lng;let i=new google.maps.Marker({map:this.map,position:r,title:t.name,icon:e});this.setupMarkerInfoWindow(i,t),this.markers.push(i),this.markerMap.set(t.enterpriseId,i)}else console.error(`Geocoding failed for address: ${t.address}`)}catch(r){console.error(`Error geocoding address: ${t.address}`,r)}else console.error(`No valid position data for landmark: ${t.name}`)}this.setupMarkerHoverListeners()}getLandmarks(){return this.landmarks}setLandmarks(t){this.landmarks=t}setupMarkerHoverListeners(){this.landmarks.forEach(t=>{Ju("landmark-hover",e=>{let{enterpriseId:r,isHovering:i}=e.detail;if(r===t.enterpriseId){let o=this.markerMap.get(t.enterpriseId);if(o){this.updateMarkerColor(o,i);let a=this.infoWindows.get(t.name);a&&(i?(a.open({map:this.map,anchor:o}),this.currentlyOpenInfoWindows.add(t.name)):(a.close(),this.currentlyOpenInfoWindows.delete(t.name)))}}})})}updateMarkerColor(t,e){let r=e?this.colors.marker_dark:this.colors.marker,i={url:"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(sc(r)),scaledSize:new google.maps.Size(48,48),anchor:new google.maps.Point(24,48)};t.setIcon(i)}geocodeAddress(t){return new Promise(e=>{if(!this.geocoder){console.error("Geocoder not initialized"),e(null);return}this.geocoder.geocode({address:t},(r,i)=>{if(i==="OK"&&r&&r[0]){let{geometry:{location:o}}=r[0];e({lat:o.lat(),lng:o.lng()})}else console.error(`Geocoding failed with status: ${i}`),e(null)})})}setupMarkerInfoWindow(t,e){let r=document.createElement("div");r.innerHTML=`
8
+ <div id="${e.enterpriseId}">
9
+ <b>${e.name}</b><br>
10
+ ${e.city}<br>
11
+ <b style="color: ${cc.accent_color};">${e.availableCount} apartment disponibles</b>
12
+ </div>
13
+ `;let i=new google.maps.InfoWindow({content:`<div style="text-align: center;"><a href="${e.websiteUrl}" target="_blank">Voir le site</a></div>`+r.outerHTML,maxWidth:cc.info_window_max_width});this.infoWindows.set(e.name,i),t.addListener("click",()=>{this.closeAllInfoWindows(),i.open({map:this.map,anchor:t}),this.currentlyOpenInfoWindows.add(e.name),i.addListener("closeclick",()=>{this.currentlyOpenInfoWindows.delete(e.name)})})}closeAllInfoWindows(){this.currentlyOpenInfoWindows.forEach(t=>{let e=this.infoWindows.get(t);e&&e.close()}),this.currentlyOpenInfoWindows.clear()}async fillMissingCoordinates(){if(await this.initPromise,!this.map||!this.geocoder){console.error("Map or geocoder not initialized");return}for(let t=0;t<this.landmarks.length;t++){let e=this.landmarks[t];if(!(e.lat&&e.lng))if(e.address)try{let r=await this.geocodeAddress(e.address);r?this.landmarks[t]={...e,lat:r.lat,lng:r.lng}:console.error(`Geocoding failed for address: ${e.address}`)}catch(r){console.error(`Error geocoding address: ${e.address}`,r)}else console.error(`No address available for landmark: ${e.name}`)}if(this.landmarks.length>0){let t=this.landmarks.reduce((e,r)=>({lat:e.lat+r.lat,lng:e.lng+r.lng}),{lat:0,lng:0});this.medianLandmark={lat:t.lat/this.landmarks.length,lng:t.lng/this.landmarks.length},this.map.setCenter(this.medianLandmark)}}clearMarkers(){this.markers.forEach(t=>{t.setMap(null)}),this.markers=[],this.markerMap.clear(),this.closeAllInfoWindows(),this.infoWindows.clear()}setView(t,e,r){this.map&&(this.map.setCenter({lat:t,lng:e}),this.map.setZoom(r))}invalidateSize(){this.map&&google.maps.event.trigger(this.map,"resize")}async resetView(t=1e3){if(!this.map||this.landmarks.length===0){console.warn("Cannot reset view: map not initialized or no landmarks");return}let e=this.landmarks.reduce((u,l)=>({lat:u.lat+l.lat,lng:u.lng+l.lng}),{lat:0,lng:0}),r={lat:e.lat/this.landmarks.length,lng:e.lng/this.landmarks.length},i=Se.Now.instant(),o=this.map.getCenter(),a=this.map.getZoom()||0,s=()=>{let u=Se.Now.instant().epochMilliseconds-i.epochMilliseconds,l=Math.min(u/t,1),h=l<.5?4*l*l*l:1-Math.pow(-2*l+2,3)/2;if(o){let f=o.lat()+(r.lat-o.lat())*h,p=o.lng()+(r.lng-o.lng())*h;this.map?.setCenter({lat:f,lng:p})}l<1?requestAnimationFrame(s):(this.map?.setCenter(r),this.map?.setZoom(a))};requestAnimationFrame(s),google.maps.event.trigger(this.map,"resize")}calculateZoomForBounds(t){if(!this.map)return 0;let e=t.getNorthEast(),r=t.getSouthWest(),i=e.lat(),o=e.lng(),a=r.lat(),s=r.lng(),u=Math.abs(i-a),l=Math.abs(o-s),h=this.map.getDiv(),f=h.clientWidth,p=h.clientHeight,E=Math.log2(360/u)-Math.log2(p/256),S=Math.log2(360/l)-Math.log2(f/256);return Math.min(E,S)}toggleAllInfoWindows(t){this.map&&(t?(this.closeAllInfoWindows(),this.landmarks.forEach(e=>{let r=this.markerMap.get(e.name),i=this.infoWindows.get(e.name);r&&i&&(i.open({map:this.map,anchor:r}),this.currentlyOpenInfoWindows.add(e.name))})):this.closeAllInfoWindows())}};async function Dd(n){let e=(await wd()).filter(i=>(i.address.Longitude&&i.address.Latitude||i.address.Line1)&&n.items.value.some(o=>i.id===o.fields["enterprise-id"].value)).map(i=>({enterpriseId:i.id,name:i.name,lat:i.address.Latitude,lng:i.address.Longitude,city:i.address.City,websiteUrl:i.url,address:i.address.Line1||"",availableCount:n.items.value.filter(o=>i.id===o.fields["enterprise-id"].value).length})),r=new Ea(e);return e.length>0&&r.addLandmarks(),r}function Am(n){let t=n.find(a=>a.instance==="apparthotels"),e=n.find(a=>a.instance==="related");if(!t)throw new Error("Main List instance not found");if(new ba(t).init().then(a=>{_t("loading:end",a?.element)}).catch(a=>{throw Zu(!0,void 0),console.error("Error initializing filters component:",a),a}),new Xi(t).init(),Dd(t),!e)throw new Error("Related List instance not found");new Xi(e).init()}window.FinsweetAttributes=window.FinsweetAttributes||[];window.FinsweetAttributes.push(["list",async n=>{Am(n)}]);})();
14
+ /*! Bundled license information:
15
+
16
+ @vue/shared/dist/shared.esm-bundler.js:
17
+ (**
18
+ * @vue/shared v3.5.14
19
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
20
+ * @license MIT
21
+ **)
22
+ (*! #__NO_SIDE_EFFECTS__ *)
23
+
24
+ @vue/reactivity/dist/reactivity.esm-bundler.js:
25
+ (**
26
+ * @vue/reactivity v3.5.14
27
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
28
+ * @license MIT
29
+ **)
30
+ */