UNPKG

@bitrix24/b24jssdk

Version:
1 lines 320 kB
(function(R,I){typeof exports=="object"&&typeof module<"u"?I(exports):typeof define=="function"&&define.amd?define(["exports"],I):(R=typeof globalThis<"u"?globalThis:R||self,I(R.B24Js=R.B24Js||{}))})(this,function(R){"use strict";var I=(r=>(r.desktop="desktop",r.log="log",r.info="info",r.warn="warn",r.error="error",r.trace="trace",r))(I||{});const xe=new Map;xe.set("title",["%c#title#","color: #959ca4; font-style: italic; padding: 0 6px; border-top: 1px solid #ccc; border-left: 1px solid #ccc; border-bottom: 1px solid #ccc"]),xe.set("desktop",["%cDESKTOP","color: white; font-style: italic; background-color: #29619b; padding: 0 6px; border: 1px solid #29619b"]),xe.set("log",["%cLOG","color: #2a323b; font-style: italic; background-color: #ccc; padding: 0 6px; border: 1px solid #ccc"]),xe.set("info",["%cINFO","color: #fff; font-style: italic; background-color: #6b7f96; padding: 0 6px; border: 1px solid #6b7f96"]),xe.set("warn",["%cWARNING","color: #f0a74f; font-style: italic; padding: 0 6px; border: 1px solid #f0a74f"]),xe.set("error",["%cERROR","color: white; font-style: italic; background-color: #8a3232; padding: 0 6px; border: 1px solid #8a3232"]),xe.set("trace",["%cTRACE","color: #2a323b; font-style: italic; background-color: #ccc; padding: 0 6px; border: 1px solid #ccc"]);class ye{#e;#r={desktop:!0,log:!1,info:!1,warn:!1,error:!0,trace:!0};static build(e,t=!1){const n=new ye(e);return t&&(n.enable("log"),n.enable("info"),n.enable("warn")),n}constructor(e){this.#e=e}#t(e){const t=[],n=[];if(xe.has("title")){const s=xe.get("title");s[0]&&(t.push(s[0].replace("#title#",this.#e)),n.push(s[1]||""))}if(xe.has(e)){const s=xe.get(e);s[0]&&(t.push(s[0]),n.push(s[1]||""))}return[t.join(""),...n]}setConfig(e){for(const t in e)this.#r[t]=e[t]}enable(e){return typeof this.#r[e]>"u"?!1:(this.#r[e]=!0,!0)}disable(e){return typeof this.#r[e]>"u"?!1:(this.#r[e]=!1,!0)}isEnabled(e){return this.#r[e]}desktop(...e){this.isEnabled("desktop")&&console.log(...this.#t("desktop"),...e)}log(...e){this.isEnabled("log")&&console.log(...this.#t("log"),...e)}info(...e){this.isEnabled("info")&&console.info(...this.#t("info"),...e)}warn(...e){this.isEnabled("warn")&&console.warn(...this.#t("warn"),...e)}error(...e){this.isEnabled("error")&&console.error(...this.#t("error"),...e)}trace(...e){this.isEnabled("trace")&&console.trace(...this.#t("trace"),...e)}}var Zn=(r=>(r.undefined="undefined",r.any="any",r.integer="integer",r.boolean="boolean",r.double="double",r.date="date",r.datetime="datetime",r.string="string",r.text="text",r.file="file",r.array="array",r.object="object",r.user="user",r.location="location",r.crmCategory="crm_category",r.crmStatus="crm_status",r.crmCurrency="crm_currency",r))(Zn||{});const ta=Function.prototype.toString.call(Object);let ra=class{getTag(e){return Object.prototype.toString.call(e)}isString(e){return e===""?!0:e?typeof e=="string"||e instanceof String:!1}isStringFilled(e){return this.isString(e)&&e!==""}isFunction(e){return e===null?!1:typeof e=="function"||e instanceof Function}isObject(e){return!!e&&(typeof e=="object"||typeof e=="function")}isObjectLike(e){return!!e&&typeof e=="object"}isPlainObject(e){if(!this.isObjectLike(e)||this.getTag(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=t.hasOwnProperty("constructor")&&t.constructor;return typeof n=="function"&&Function.prototype.toString.call(n)===ta}isJsonRpcRequest(e){return typeof e=="object"&&e&&"jsonrpc"in e&&this.isStringFilled(e.jsonrpc)&&"method"in e&&this.isStringFilled(e.method)}isJsonRpcResponse(e){return typeof e=="object"&&e&&"jsonrpc"in e&&this.isStringFilled(e.jsonrpc)&&"id"in e&&("result"in e||"error"in e)}isBoolean(e){return e===!0||e===!1}isNumber(e){return!Number.isNaN(e)&&typeof e=="number"}isInteger(e){return this.isNumber(e)&&e%1===0}isFloat(e){return this.isNumber(e)&&!this.isInteger(e)}isNil(e){return e==null}isArray(e){return!this.isNil(e)&&Array.isArray(e)}isArrayFilled(e){return this.isArray(e)&&e.length>0}isArrayLike(e){return!this.isNil(e)&&!this.isFunction(e)&&e.length>-1&&e.length<=Number.MAX_SAFE_INTEGER}isDate(e){return this.isObjectLike(e)&&this.getTag(e)==="[object Date]"}isDomNode(e){return this.isObjectLike(e)&&!this.isPlainObject(e)&&"nodeType"in e}isElementNode(e){return this.isDomNode(e)&&e.nodeType===Node.ELEMENT_NODE}isTextNode(e){return this.isDomNode(e)&&e.nodeType===Node.TEXT_NODE}isMap(e){return this.isObjectLike(e)&&this.getTag(e)==="[object Map]"}isSet(e){return this.isObjectLike(e)&&this.getTag(e)==="[object Set]"}isWeakMap(e){return this.isObjectLike(e)&&this.getTag(e)==="[object WeakMap]"}isWeakSet(e){return this.isObjectLike(e)&&this.getTag(e)==="[object WeakSet]"}isPrototype(e){return(typeof(e&&e.constructor)=="function"&&e.constructor.prototype||Object.prototype)===e}isRegExp(e){return this.isObjectLike(e)&&this.getTag(e)==="[object RegExp]"}isNull(e){return e===null}isUndefined(e){return typeof e>"u"}isArrayBuffer(e){return this.isObjectLike(e)&&this.getTag(e)==="[object ArrayBuffer]"}isTypedArray(e){const t=/^\[object (?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)]$/;return this.isObjectLike(e)&&t.test(this.getTag(e))}isBlob(e){return this.isObjectLike(e)&&this.isNumber(e.size)&&this.isString(e.type)&&this.isFunction(e.slice)}isFile(e){return this.isBlob(e)&&this.isString(e.name)&&(this.isNumber(e.lastModified)||this.isObjectLike(e.lastModifiedDate))}isFormData(e){return e instanceof FormData}clone(e,t=!0){let n,s,i;if(e===null)return null;if(this.isDomNode(e))n=e.cloneNode(t);else if(typeof e=="object")if(this.isArray(e))for(n=[],s=0,i=e.length;s<i;s++)typeof e[s]=="object"&&t?n[s]=this.clone(e[s],t):n[s]=e[s];else{n={},e.constructor&&(this.isDate(e)?n=new Date(e):n=new e.constructor);for(s in e)e.hasOwnProperty(s)&&(typeof e[s]=="object"&&t?n[s]=this.clone(e[s],t):n[s]=e[s])}else n=e;return n}};const N=new ra;function na(r,e){const t={};for(const n of e)t[n]=r[n];return t}function Gn(r,e){const t={...r};for(const n of e)delete t[n];return t}function sa(r){return Array.isArray(r[0])}function ia(r,e){return Object.values(r).includes(e)?e:void 0}class ft extends Error{}class oa extends ft{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class aa extends ft{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class ca extends ft{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Et extends ft{}class Yn extends ft{constructor(e){super(`Invalid unit ${e}`)}}class be extends ft{}class nt extends ft{constructor(){super("Zone is an abstract class")}}const C="numeric",je="short",Ce="long",ir={year:C,month:C,day:C},Kn={year:C,month:je,day:C},la={year:C,month:je,day:C,weekday:je},Qn={year:C,month:Ce,day:C},Xn={year:C,month:Ce,day:C,weekday:Ce},es={hour:C,minute:C},ts={hour:C,minute:C,second:C},rs={hour:C,minute:C,second:C,timeZoneName:je},ns={hour:C,minute:C,second:C,timeZoneName:Ce},ss={hour:C,minute:C,hourCycle:"h23"},is={hour:C,minute:C,second:C,hourCycle:"h23"},os={hour:C,minute:C,second:C,hourCycle:"h23",timeZoneName:je},as={hour:C,minute:C,second:C,hourCycle:"h23",timeZoneName:Ce},cs={year:C,month:C,day:C,hour:C,minute:C},ls={year:C,month:C,day:C,hour:C,minute:C,second:C},us={year:C,month:je,day:C,hour:C,minute:C},hs={year:C,month:je,day:C,hour:C,minute:C,second:C},ua={year:C,month:je,day:C,weekday:je,hour:C,minute:C},fs={year:C,month:Ce,day:C,hour:C,minute:C,timeZoneName:je},ds={year:C,month:Ce,day:C,hour:C,minute:C,second:C,timeZoneName:je},ps={year:C,month:Ce,day:C,weekday:Ce,hour:C,minute:C,timeZoneName:Ce},ms={year:C,month:Ce,day:C,weekday:Ce,hour:C,minute:C,second:C,timeZoneName:Ce};class $t{get type(){throw new nt}get name(){throw new nt}get ianaName(){return this.name}get isUniversal(){throw new nt}offsetName(e,t){throw new nt}formatOffset(e,t){throw new nt}offset(e){throw new nt}equals(e){throw new nt}get isValid(){throw new nt}}let Br=null;class or extends $t{static get instance(){return Br===null&&(Br=new or),Br}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return $s(e,t,n)}formatOffset(e,t){return zt(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const Ur=new Map;function ha(r){let e=Ur.get(r);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Ur.set(r,e)),e}const fa={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function da(r,e){const t=r.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,i,o,a,c,u,l]=n;return[o,s,i,a,c,u,l]}function pa(r,e){const t=r.formatToParts(e),n=[];for(let s=0;s<t.length;s++){const{type:i,value:o}=t[s],a=fa[i];i==="era"?n[a]=o:W(a)||(n[a]=parseInt(o,10))}return n}const $r=new Map;class Ye extends $t{static create(e){let t=$r.get(e);return t===void 0&&$r.set(e,t=new Ye(e)),t}static resetCache(){$r.clear(),Ur.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=Ye.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return $s(e,t,n,this.name)}formatOffset(e,t){return zt(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=ha(this.name);let[s,i,o,a,c,u,l]=n.formatToParts?pa(n,t):da(n,t);a==="BC"&&(s=-Math.abs(s)+1);const h=hr({year:s,month:i,day:o,hour:c===24?0:c,minute:u,second:l,millisecond:0});let d=+t;const p=d%1e3;return d-=p>=0?p:1e3+p,(h-d)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let gs={};function ma(r,e={}){const t=JSON.stringify([r,e]);let n=gs[t];return n||(n=new Intl.ListFormat(r,e),gs[t]=n),n}const Wr=new Map;function qr(r,e={}){const t=JSON.stringify([r,e]);let n=Wr.get(t);return n===void 0&&(n=new Intl.DateTimeFormat(r,e),Wr.set(t,n)),n}const Vr=new Map;function ga(r,e={}){const t=JSON.stringify([r,e]);let n=Vr.get(t);return n===void 0&&(n=new Intl.NumberFormat(r,e),Vr.set(t,n)),n}const zr=new Map;function ya(r,e={}){const{base:t,...n}=e,s=JSON.stringify([r,n]);let i=zr.get(s);return i===void 0&&(i=new Intl.RelativeTimeFormat(r,e),zr.set(s,i)),i}let Wt=null;function ba(){return Wt||(Wt=new Intl.DateTimeFormat().resolvedOptions().locale,Wt)}const Hr=new Map;function ys(r){let e=Hr.get(r);return e===void 0&&(e=new Intl.DateTimeFormat(r).resolvedOptions(),Hr.set(r,e)),e}const Jr=new Map;function wa(r){let e=Jr.get(r);if(!e){const t=new Intl.Locale(r);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...bs,...e}),Jr.set(r,e)}return e}function Sa(r){const e=r.indexOf("-x-");e!==-1&&(r=r.substring(0,e));const t=r.indexOf("-u-");if(t===-1)return[r];{let n,s;try{n=qr(r).resolvedOptions(),s=r}catch{const c=r.substring(0,t);n=qr(c).resolvedOptions(),s=c}const{numberingSystem:i,calendar:o}=n;return[s,i,o]}}function _a(r,e,t){return(t||e)&&(r.includes("-u-")||(r+="-u"),t&&(r+=`-ca-${t}`),e&&(r+=`-nu-${e}`)),r}function ka(r){const e=[];for(let t=1;t<=12;t++){const n=B.utc(2009,t,1);e.push(r(n))}return e}function va(r){const e=[];for(let t=1;t<=7;t++){const n=B.utc(2016,11,13+t);e.push(r(n))}return e}function ar(r,e,t,n){const s=r.listingMode();return s==="error"?null:s==="en"?t(e):n(e)}function Ea(r){return r.numberingSystem&&r.numberingSystem!=="latn"?!1:r.numberingSystem==="latn"||!r.locale||r.locale.startsWith("en")||ys(r.locale).numberingSystem==="latn"}class Ta{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:s,floor:i,...o}=n;if(!t||Object.keys(o).length>0){const a={useGrouping:!1,...n};n.padTo>0&&(a.minimumIntegerDigits=n.padTo),this.inf=ga(e,a)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):rn(e,3);return le(t,this.padTo)}}}class Oa{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&Ye.create(a).valid?(s=a,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||s,this.dtf=qr(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){const n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:n}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Aa{constructor(e,t,n){this.opts={style:"long",...n},!t&&xs()&&(this.rtf=ya(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):Ga(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const bs={firstDay:1,minimalDays:4,weekend:[6,7]};class K{static fromOpts(e){return K.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,s,i=!1){const o=e||ne.defaultLocale,a=o||(i?"en-US":ba()),c=t||ne.defaultNumberingSystem,u=n||ne.defaultOutputCalendar,l=en(s)||ne.defaultWeekSettings;return new K(a,c,u,l,o)}static resetCache(){Wt=null,Wr.clear(),Vr.clear(),zr.clear(),Hr.clear(),Jr.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:s}={}){return K.create(e,t,n,s)}constructor(e,t,n,s,i){const[o,a,c]=Sa(e);this.locale=o,this.numberingSystem=t||a||null,this.outputCalendar=n||c||null,this.weekSettings=s,this.intl=_a(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Ea(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:K.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,en(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return ar(this,e,Vs,()=>{const n=t?{month:e,day:"numeric"}:{month:e},s=t?"format":"standalone";return this.monthsCache[s][e]||(this.monthsCache[s][e]=ka(i=>this.extract(i,n,"month"))),this.monthsCache[s][e]})}weekdays(e,t=!1){return ar(this,e,Js,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=t?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=va(i=>this.extract(i,n,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return ar(this,void 0,()=>Zs,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[B.utc(2016,11,13,9),B.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return ar(this,e,Gs,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[B.utc(-40,1,1),B.utc(2017,1,1)].map(n=>this.extract(n,t,"era"))),this.eraCache[e]})}extract(e,t,n){const s=this.dtFormatter(e,t),i=s.formatToParts(),o=i.find(a=>a.type.toLowerCase()===n);return o?o.value:null}numberFormatter(e={}){return new Ta(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Oa(e,this.intl,t)}relFormatter(e={}){return new Aa(this.intl,this.isEnglish(),e)}listFormatter(e={}){return ma(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||ys(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:js()?wa(this.locale):bs}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Zr=null;class Ee extends $t{static get utcInstance(){return Zr===null&&(Zr=new Ee(0)),Zr}static instance(e){return e===0?Ee.utcInstance:new Ee(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Ee(fr(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${zt(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${zt(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return zt(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Ia extends $t{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function st(r,e){if(W(r)||r===null)return e;if(r instanceof $t)return r;if(Da(r)){const t=r.toLowerCase();return t==="default"?e:t==="local"||t==="system"?or.instance:t==="utc"||t==="gmt"?Ee.utcInstance:Ee.parseSpecifier(t)||Ye.create(r)}else return it(r)?Ee.instance(r):typeof r=="object"&&"offset"in r&&typeof r.offset=="function"?r:new Ia(r)}const Gr={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},ws={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Ca=Gr.hanidec.replace(/[\[|\]]/g,"").split("");function Na(r){let e=parseInt(r,10);if(isNaN(e)){e="";for(let t=0;t<r.length;t++){const n=r.charCodeAt(t);if(r[t].search(Gr.hanidec)!==-1)e+=Ca.indexOf(r[t]);else for(const s in ws){const[i,o]=ws[s];n>=i&&n<=o&&(e+=n-i)}}return parseInt(e,10)}else return e}const Yr=new Map;function Ra(){Yr.clear()}function Be({numberingSystem:r},e=""){const t=r||"latn";let n=Yr.get(t);n===void 0&&(n=new Map,Yr.set(t,n));let s=n.get(e);return s===void 0&&(s=new RegExp(`${Gr[t]}${e}`),n.set(e,s)),s}let Ss=()=>Date.now(),_s="system",ks=null,vs=null,Es=null,Ts=60,Os,As=null;class ne{static get now(){return Ss}static set now(e){Ss=e}static set defaultZone(e){_s=e}static get defaultZone(){return st(_s,or.instance)}static get defaultLocale(){return ks}static set defaultLocale(e){ks=e}static get defaultNumberingSystem(){return vs}static set defaultNumberingSystem(e){vs=e}static get defaultOutputCalendar(){return Es}static set defaultOutputCalendar(e){Es=e}static get defaultWeekSettings(){return As}static set defaultWeekSettings(e){As=en(e)}static get twoDigitCutoffYear(){return Ts}static set twoDigitCutoffYear(e){Ts=e%100}static get throwOnInvalid(){return Os}static set throwOnInvalid(e){Os=e}static resetCaches(){K.resetCache(),Ye.resetCache(),B.resetCache(),Ra()}}class Ue{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Is=[0,31,59,90,120,151,181,212,243,273,304,334],Cs=[0,31,60,91,121,152,182,213,244,274,305,335];function Pe(r,e){return new Ue("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${r}, which is invalid`)}function Kr(r,e,t){const n=new Date(Date.UTC(r,e-1,t));r<100&&r>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const s=n.getUTCDay();return s===0?7:s}function Ns(r,e,t){return t+(qt(r)?Cs:Is)[e-1]}function Rs(r,e){const t=qt(r)?Cs:Is,n=t.findIndex(i=>i<e),s=e-t[n];return{month:n+1,day:s}}function Qr(r,e){return(r-e+7)%7+1}function cr(r,e=4,t=1){const{year:n,month:s,day:i}=r,o=Ns(n,s,i),a=Qr(Kr(n,s,i),t);let c=Math.floor((o-a+14-e)/7),u;return c<1?(u=n-1,c=Vt(u,e,t)):c>Vt(n,e,t)?(u=n+1,c=1):u=n,{weekYear:u,weekNumber:c,weekday:a,...pr(r)}}function Ls(r,e=4,t=1){const{weekYear:n,weekNumber:s,weekday:i}=r,o=Qr(Kr(n,1,e),t),a=Ot(n);let c=s*7+i-o-7+e,u;c<1?(u=n-1,c+=Ot(u)):c>a?(u=n+1,c-=Ot(n)):u=n;const{month:l,day:f}=Rs(u,c);return{year:u,month:l,day:f,...pr(r)}}function Xr(r){const{year:e,month:t,day:n}=r,s=Ns(e,t,n);return{year:e,ordinal:s,...pr(r)}}function Ps(r){const{year:e,ordinal:t}=r,{month:n,day:s}=Rs(e,t);return{year:e,month:n,day:s,...pr(r)}}function Ds(r,e){if(!W(r.localWeekday)||!W(r.localWeekNumber)||!W(r.localWeekYear)){if(!W(r.weekday)||!W(r.weekNumber)||!W(r.weekYear))throw new Et("Cannot mix locale-based week fields with ISO-based week fields");return W(r.localWeekday)||(r.weekday=r.localWeekday),W(r.localWeekNumber)||(r.weekNumber=r.localWeekNumber),W(r.localWeekYear)||(r.weekYear=r.localWeekYear),delete r.localWeekday,delete r.localWeekNumber,delete r.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function La(r,e=4,t=1){const n=lr(r.weekYear),s=De(r.weekNumber,1,Vt(r.weekYear,e,t)),i=De(r.weekday,1,7);return n?s?i?!1:Pe("weekday",r.weekday):Pe("week",r.weekNumber):Pe("weekYear",r.weekYear)}function Pa(r){const e=lr(r.year),t=De(r.ordinal,1,Ot(r.year));return e?t?!1:Pe("ordinal",r.ordinal):Pe("year",r.year)}function Ms(r){const e=lr(r.year),t=De(r.month,1,12),n=De(r.day,1,ur(r.year,r.month));return e?t?n?!1:Pe("day",r.day):Pe("month",r.month):Pe("year",r.year)}function Fs(r){const{hour:e,minute:t,second:n,millisecond:s}=r,i=De(e,0,23)||e===24&&t===0&&n===0&&s===0,o=De(t,0,59),a=De(n,0,59),c=De(s,0,999);return i?o?a?c?!1:Pe("millisecond",s):Pe("second",n):Pe("minute",t):Pe("hour",e)}function W(r){return typeof r>"u"}function it(r){return typeof r=="number"}function lr(r){return typeof r=="number"&&r%1===0}function Da(r){return typeof r=="string"}function Ma(r){return Object.prototype.toString.call(r)==="[object Date]"}function xs(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function js(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Fa(r){return Array.isArray(r)?r:[r]}function Bs(r,e,t){if(r.length!==0)return r.reduce((n,s)=>{const i=[e(s),s];return n&&t(n[0],i[0])===n[0]?n:i},null)[1]}function xa(r,e){return e.reduce((t,n)=>(t[n]=r[n],t),{})}function Tt(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function en(r){if(r==null)return null;if(typeof r!="object")throw new be("Week settings must be an object");if(!De(r.firstDay,1,7)||!De(r.minimalDays,1,7)||!Array.isArray(r.weekend)||r.weekend.some(e=>!De(e,1,7)))throw new be("Invalid week settings");return{firstDay:r.firstDay,minimalDays:r.minimalDays,weekend:Array.from(r.weekend)}}function De(r,e,t){return lr(r)&&r>=e&&r<=t}function ja(r,e){return r-e*Math.floor(r/e)}function le(r,e=2){const t=r<0;let n;return t?n="-"+(""+-r).padStart(e,"0"):n=(""+r).padStart(e,"0"),n}function ot(r){if(!(W(r)||r===null||r===""))return parseInt(r,10)}function dt(r){if(!(W(r)||r===null||r===""))return parseFloat(r)}function tn(r){if(!(W(r)||r===null||r==="")){const e=parseFloat("0."+r)*1e3;return Math.floor(e)}}function rn(r,e,t=!1){const n=10**e;return(t?Math.trunc:Math.round)(r*n)/n}function qt(r){return r%4===0&&(r%100!==0||r%400===0)}function Ot(r){return qt(r)?366:365}function ur(r,e){const t=ja(e-1,12)+1,n=r+(e-t)/12;return t===2?qt(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function hr(r){let e=Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second,r.millisecond);return r.year<100&&r.year>=0&&(e=new Date(e),e.setUTCFullYear(r.year,r.month-1,r.day)),+e}function Us(r,e,t){return-Qr(Kr(r,1,e),t)+e-1}function Vt(r,e=4,t=1){const n=Us(r,e,t),s=Us(r+1,e,t);return(Ot(r)-n+s)/7}function nn(r){return r>99?r:r>ne.twoDigitCutoffYear?1900+r:2e3+r}function $s(r,e,t,n=null){const s=new Date(r),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(i.timeZone=n);const o={timeZoneName:e,...i},a=new Intl.DateTimeFormat(t,o).formatToParts(s).find(c=>c.type.toLowerCase()==="timezonename");return a?a.value:null}function fr(r,e){let t=parseInt(r,10);Number.isNaN(t)&&(t=0);const n=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-n:n;return t*60+s}function Ws(r){const e=Number(r);if(typeof r=="boolean"||r===""||Number.isNaN(e))throw new be(`Invalid unit value ${r}`);return e}function dr(r,e){const t={};for(const n in r)if(Tt(r,n)){const s=r[n];if(s==null)continue;t[e(n)]=Ws(s)}return t}function zt(r,e){const t=Math.trunc(Math.abs(r/60)),n=Math.trunc(Math.abs(r%60)),s=r>=0?"+":"-";switch(e){case"short":return`${s}${le(t,2)}:${le(n,2)}`;case"narrow":return`${s}${t}${n>0?`:${n}`:""}`;case"techie":return`${s}${le(t,2)}${le(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function pr(r){return xa(r,["hour","minute","second","millisecond"])}const Ba=["January","February","March","April","May","June","July","August","September","October","November","December"],qs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ua=["J","F","M","A","M","J","J","A","S","O","N","D"];function Vs(r){switch(r){case"narrow":return[...Ua];case"short":return[...qs];case"long":return[...Ba];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const zs=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Hs=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],$a=["M","T","W","T","F","S","S"];function Js(r){switch(r){case"narrow":return[...$a];case"short":return[...Hs];case"long":return[...zs];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Zs=["AM","PM"],Wa=["Before Christ","Anno Domini"],qa=["BC","AD"],Va=["B","A"];function Gs(r){switch(r){case"narrow":return[...Va];case"short":return[...qa];case"long":return[...Wa];default:return null}}function za(r){return Zs[r.hour<12?0:1]}function Ha(r,e){return Js(e)[r.weekday-1]}function Ja(r,e){return Vs(e)[r.month-1]}function Za(r,e){return Gs(e)[r.year<0?0:1]}function Ga(r,e,t="always",n=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(r)===-1;if(t==="auto"&&i){const f=r==="days";switch(e){case 1:return f?"tomorrow":`next ${s[r][0]}`;case-1:return f?"yesterday":`last ${s[r][0]}`;case 0:return f?"today":`this ${s[r][0]}`}}const o=Object.is(e,-0)||e<0,a=Math.abs(e),c=a===1,u=s[r],l=n?c?u[1]:u[2]||u[1]:c?s[r][0]:r;return o?`${a} ${l} ago`:`in ${a} ${l}`}function Ys(r,e){let t="";for(const n of r)n.literal?t+=n.val:t+=e(n.val);return t}const Ya={D:ir,DD:Kn,DDD:Qn,DDDD:Xn,t:es,tt:ts,ttt:rs,tttt:ns,T:ss,TT:is,TTT:os,TTTT:as,f:cs,ff:us,fff:fs,ffff:ps,F:ls,FF:hs,FFF:ds,FFFF:ms};class we{static create(e,t={}){return new we(e,t)}static parseFormat(e){let t=null,n="",s=!1;const i=[];for(let o=0;o<e.length;o++){const a=e.charAt(o);a==="'"?(n.length>0&&i.push({literal:s||/^\s+$/.test(n),val:n}),t=null,n="",s=!s):s||a===t?n+=a:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=a,t=a)}return n.length>0&&i.push({literal:s||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return Ya[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return le(e,t);const n={...this.opts};return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,t){const n=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(d,p)=>this.loc.extract(e,d,p),o=d=>e.isOffsetFixed&&e.offset===0&&d.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,d.format):"",a=()=>n?za(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(d,p)=>n?Ja(e,d):i(p?{month:d}:{month:d,day:"numeric"},"month"),u=(d,p)=>n?Ha(e,d):i(p?{weekday:d}:{weekday:d,month:"long",day:"numeric"},"weekday"),l=d=>{const p=we.macroTokenToFormatOpts(d);return p?this.formatWithSystemDefault(e,p):d},f=d=>n?Za(e,d):i({era:d},"era"),h=d=>{switch(d){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return s?i({day:"numeric"},"day"):this.num(e.day);case"dd":return s?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return s?i({month:"numeric"},"month"):this.num(e.month);case"MM":return s?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return s?i({year:"numeric"},"year"):this.num(e.year);case"yy":return s?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(d)}};return Ys(we.parseFormat(t),h)}formatDurationFromString(e,t){const n=c=>{switch(c[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=c=>u=>{const l=n(u);return l?this.num(c.get(l),u.length):u},i=we.parseFormat(t),o=i.reduce((c,{literal:u,val:l})=>u?c:c.concat(l),[]),a=e.shiftTo(...o.map(n).filter(c=>c));return Ys(i,s(a))}}const Ks=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function At(...r){const e=r.reduce((t,n)=>t+n.source,"");return RegExp(`^${e}$`)}function It(...r){return e=>r.reduce(([t,n,s],i)=>{const[o,a,c]=i(e,s);return[{...t,...o},a||n,c]},[{},null,1]).slice(0,2)}function Ct(r,...e){if(r==null)return[null,null];for(const[t,n]of e){const s=t.exec(r);if(s)return n(s)}return[null,null]}function Qs(...r){return(e,t)=>{const n={};let s;for(s=0;s<r.length;s++)n[r[s]]=ot(e[t+s]);return[n,null,t+s]}}const Xs=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Ka=`(?:${Xs.source}?(?:\\[(${Ks.source})\\])?)?`,sn=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,ei=RegExp(`${sn.source}${Ka}`),on=RegExp(`(?:T${ei.source})?`),Qa=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Xa=/(\d{4})-?W(\d\d)(?:-?(\d))?/,ec=/(\d{4})-?(\d{3})/,tc=Qs("weekYear","weekNumber","weekDay"),rc=Qs("year","ordinal"),nc=/(\d{4})-(\d\d)-(\d\d)/,ti=RegExp(`${sn.source} ?(?:${Xs.source}|(${Ks.source}))?`),sc=RegExp(`(?: ${ti.source})?`);function Nt(r,e,t){const n=r[e];return W(n)?t:ot(n)}function ic(r,e){return[{year:Nt(r,e),month:Nt(r,e+1,1),day:Nt(r,e+2,1)},null,e+3]}function Rt(r,e){return[{hours:Nt(r,e,0),minutes:Nt(r,e+1,0),seconds:Nt(r,e+2,0),milliseconds:tn(r[e+3])},null,e+4]}function Ht(r,e){const t=!r[e]&&!r[e+1],n=fr(r[e+1],r[e+2]),s=t?null:Ee.instance(n);return[{},s,e+3]}function Jt(r,e){const t=r[e]?Ye.create(r[e]):null;return[{},t,e+1]}const oc=RegExp(`^T?${sn.source}$`),ac=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function cc(r){const[e,t,n,s,i,o,a,c,u]=r,l=e[0]==="-",f=c&&c[0]==="-",h=(d,p=!1)=>d!==void 0&&(p||d&&l)?-d:d;return[{years:h(dt(t)),months:h(dt(n)),weeks:h(dt(s)),days:h(dt(i)),hours:h(dt(o)),minutes:h(dt(a)),seconds:h(dt(c),c==="-0"),milliseconds:h(tn(u),f)}]}const lc={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function an(r,e,t,n,s,i,o){const a={year:e.length===2?nn(ot(e)):ot(e),month:qs.indexOf(t)+1,day:ot(n),hour:ot(s),minute:ot(i)};return o&&(a.second=ot(o)),r&&(a.weekday=r.length>3?zs.indexOf(r)+1:Hs.indexOf(r)+1),a}const uc=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function hc(r){const[,e,t,n,s,i,o,a,c,u,l,f]=r,h=an(e,s,n,t,i,o,a);let d;return c?d=lc[c]:u?d=0:d=fr(l,f),[h,new Ee(d)]}function fc(r){return r.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const dc=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,pc=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,mc=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function ri(r){const[,e,t,n,s,i,o,a]=r;return[an(e,s,n,t,i,o,a),Ee.utcInstance]}function gc(r){const[,e,t,n,s,i,o,a]=r;return[an(e,a,t,n,s,i,o),Ee.utcInstance]}const yc=At(Qa,on),bc=At(Xa,on),wc=At(ec,on),Sc=At(ei),ni=It(ic,Rt,Ht,Jt),_c=It(tc,Rt,Ht,Jt),kc=It(rc,Rt,Ht,Jt),vc=It(Rt,Ht,Jt);function Ec(r){return Ct(r,[yc,ni],[bc,_c],[wc,kc],[Sc,vc])}function Tc(r){return Ct(fc(r),[uc,hc])}function Oc(r){return Ct(r,[dc,ri],[pc,ri],[mc,gc])}function Ac(r){return Ct(r,[ac,cc])}const Ic=It(Rt);function Cc(r){return Ct(r,[oc,Ic])}const Nc=At(nc,sc),Rc=At(ti),Lc=It(Rt,Ht,Jt);function Pc(r){return Ct(r,[Nc,ni],[Rc,Lc])}const si="Invalid Duration",ii={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Dc={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...ii},Me=146097/400,Lt=146097/4800,Mc={years:{quarters:4,months:12,weeks:Me/7,days:Me,hours:Me*24,minutes:Me*24*60,seconds:Me*24*60*60,milliseconds:Me*24*60*60*1e3},quarters:{months:3,weeks:Me/28,days:Me/4,hours:Me*24/4,minutes:Me*24*60/4,seconds:Me*24*60*60/4,milliseconds:Me*24*60*60*1e3/4},months:{weeks:Lt/7,days:Lt,hours:Lt*24,minutes:Lt*24*60,seconds:Lt*24*60*60,milliseconds:Lt*24*60*60*1e3},...ii},pt=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Fc=pt.slice(0).reverse();function at(r,e,t=!1){const n={values:t?e.values:{...r.values,...e.values||{}},loc:r.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||r.conversionAccuracy,matrix:e.matrix||r.matrix};return new Z(n)}function oi(r,e){let t=e.milliseconds??0;for(const n of Fc.slice(1))e[n]&&(t+=e[n]*r[n].milliseconds);return t}function ai(r,e){const t=oi(r,e)<0?-1:1;pt.reduceRight((n,s)=>{if(W(e[s]))return n;if(n){const i=e[n]*t,o=r[s][n],a=Math.floor(i/o);e[s]+=a*t,e[n]-=a*o*t}return s},null),pt.reduce((n,s)=>{if(W(e[s]))return n;if(n){const i=e[n]%1;e[n]-=i,e[s]+=i*r[n][s]}return s},null)}function xc(r){const e={};for(const[t,n]of Object.entries(r))n!==0&&(e[t]=n);return e}class Z{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;let n=t?Mc:Dc;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||K.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return Z.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new be(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new Z({values:dr(e,Z.normalizeUnit),loc:K.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(it(e))return Z.fromMillis(e);if(Z.isDuration(e))return e;if(typeof e=="object")return Z.fromObject(e);throw new be(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=Ac(e);return n?Z.fromObject(n,t):Z.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=Cc(e);return n?Z.fromObject(n,t):Z.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new be("need to specify a reason the Duration is invalid");const n=e instanceof Ue?e:new Ue(e,t);if(ne.throwOnInvalid)throw new ca(n);return new Z({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new Yn(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?we.create(this.loc,n).formatDurationFromString(this,e):si}toHuman(e={}){if(!this.isValid)return si;const t=pt.map(n=>{const s=this.values[n];return W(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(s)}).filter(n=>n);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=rn(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},B.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?oi(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=Z.fromDurationLike(e),n={};for(const s of pt)(Tt(t.values,s)||Tt(this.values,s))&&(n[s]=t.get(s)+this.get(s));return at(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=Z.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=Ws(e(this.values[n],n));return at(this,{values:t},!0)}get(e){return this[Z.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...dr(e,Z.normalizeUnit)};return at(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:s}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:s,conversionAccuracy:n};return at(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return ai(this.matrix,e),at(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=xc(this.normalize().shiftToAll().toObject());return at(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>Z.normalizeUnit(o));const t={},n={},s=this.toObject();let i;for(const o of pt)if(e.indexOf(o)>=0){i=o;let a=0;for(const u in n)a+=this.matrix[u][o]*n[u],n[u]=0;it(s[o])&&(a+=s[o]);const c=Math.trunc(a);t[o]=c,n[o]=(a*1e3-c*1e3)/1e3}else it(s[o])&&(n[o]=s[o]);for(const o in n)n[o]!==0&&(t[i]+=o===i?n[o]:n[o]/this.matrix[i][o]);return ai(this.matrix,t),at(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return at(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(n,s){return n===void 0||n===0?s===void 0||s===0:n===s}for(const n of pt)if(!t(this.values[n],e.values[n]))return!1;return!0}}const Pt="Invalid Interval";function jc(r,e){return!r||!r.isValid?se.invalid("missing or invalid start"):!e||!e.isValid?se.invalid("missing or invalid end"):e<r?se.invalid("end before start",`The end of an interval must be after its start, but you had start=${r.toISO()} and end=${e.toISO()}`):null}class se{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new be("need to specify a reason the Interval is invalid");const n=e instanceof Ue?e:new Ue(e,t);if(ne.throwOnInvalid)throw new aa(n);return new se({invalid:n})}static fromDateTimes(e,t){const n=Yt(e),s=Yt(t),i=jc(n,s);return i??new se({start:n,end:s})}static after(e,t){const n=Z.fromDurationLike(t),s=Yt(e);return se.fromDateTimes(s,s.plus(n))}static before(e,t){const n=Z.fromDurationLike(t),s=Yt(e);return se.fromDateTimes(s.minus(n),s)}static fromISO(e,t){const[n,s]=(e||"").split("/",2);if(n&&s){let i,o;try{i=B.fromISO(n,t),o=i.isValid}catch{o=!1}let a,c;try{a=B.fromISO(s,t),c=a.isValid}catch{c=!1}if(o&&c)return se.fromDateTimes(i,a);if(o){const u=Z.fromISO(s,t);if(u.isValid)return se.after(i,u)}else if(c){const u=Z.fromISO(n,t);if(u.isValid)return se.before(a,u)}}return se.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let s;return t?.useLocaleWeeks?s=this.end.reconfigure({locale:n.locale}):s=this.end,s=s.startOf(e,t),Math.floor(s.diff(n,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?se.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Yt).filter(o=>this.contains(o)).sort((o,a)=>o.toMillis()-a.toMillis()),n=[];let{s}=this,i=0;for(;s<this.e;){const o=t[i]||this.e,a=+o>+this.e?this.e:o;n.push(se.fromDateTimes(s,a)),s=a,i+=1}return n}splitBy(e){const t=Z.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:n}=this,s=1,i;const o=[];for(;n<this.e;){const a=this.start.plus(t.mapUnits(c=>c*s));i=+a>+this.e?this.e:a,o.push(se.fromDateTimes(n,i)),n=i,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:se.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return se.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((s,i)=>s.s-i.s).reduce(([s,i],o)=>i?i.overlaps(o)||i.abutsStart(o)?[s,i.union(o)]:[s.concat([i]),o]:[s,o],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const s=[],i=e.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),o=Array.prototype.concat(...i),a=o.sort((c,u)=>c.time-u.time);for(const c of a)n+=c.type==="s"?1:-1,n===1?t=c.time:(t&&+t!=+c.time&&s.push(se.fromDateTimes(t,c.time)),t=null);return se.merge(s)}difference(...e){return se.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Pt}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=ir,t={}){return this.isValid?we.create(this.s.loc.clone(t),e).formatInterval(this):Pt}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Pt}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Pt}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Pt}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Pt}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Z.invalid(this.invalidReason)}mapEnd