playbook_ui 14.0.0.pre.alpha.testthemeexport3533 → 14.0.0.pre.alpha.updateviewcomponentgem3527

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- import{useState}from"react";var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x["default"]:x}function getAugmentedNamespace(n){if(n.__esModule)return n;var f=n.default;if(typeof f=="function"){var a=function a2(){if(this instanceof a2){return Reflect.construct(f,arguments,this.constructor)}return f.apply(this,arguments)};a.prototype=f.prototype}else a={};Object.defineProperty(a,"__esModule",{value:true});Object.keys(n).forEach((function(k){var d=Object.getOwnPropertyDescriptor(n,k);Object.defineProperty(a,k,d.get?d:{enumerable:true,get:function(){return n[k]}})}));return a}var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root=freeGlobal||freeSelf||Function("return this")();var Symbol$1=root.Symbol;var objectProto$i=Object.prototype;var hasOwnProperty$f=objectProto$i.hasOwnProperty;var nativeObjectToString$1=objectProto$i.toString;var symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0;function getRawTag(value){var isOwn=hasOwnProperty$f.call(value,symToStringTag$1),tag=value[symToStringTag$1];try{value[symToStringTag$1]=void 0;var unmasked=true}catch(e){}var result=nativeObjectToString$1.call(value);if(unmasked){if(isOwn){value[symToStringTag$1]=tag}else{delete value[symToStringTag$1]}}return result}var objectProto$h=Object.prototype;var nativeObjectToString=objectProto$h.toString;function objectToString(value){return nativeObjectToString.call(value)}var nullTag="[object Null]",undefinedTag="[object Undefined]";var symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag(value){if(value==null){return value===void 0?undefinedTag:nullTag}return symToStringTag&&symToStringTag in Object(value)?getRawTag(value):objectToString(value)}function isObjectLike(value){return value!=null&&typeof value=="object"}var symbolTag$3="[object Symbol]";function isSymbol(value){return typeof value=="symbol"||isObjectLike(value)&&baseGetTag(value)==symbolTag$3}function arrayMap(array,iteratee){var index=-1,length=array==null?0:array.length,result=Array(length);while(++index<length){result[index]=iteratee(array[index],index,array)}return result}var isArray=Array.isArray;var INFINITY$2=1/0;var symbolProto$2=Symbol$1?Symbol$1.prototype:void 0,symbolToString=symbolProto$2?symbolProto$2.toString:void 0;function baseToString(value){if(typeof value=="string"){return value}if(isArray(value)){return arrayMap(value,baseToString)+""}if(isSymbol(value)){return symbolToString?symbolToString.call(value):""}var result=value+"";return result=="0"&&1/value==-INFINITY$2?"-0":result}var reWhitespace=/\s/;function trimmedEndIndex(string){var index=string.length;while(index--&&reWhitespace.test(string.charAt(index))){}return index}var reTrimStart=/^\s+/;function baseTrim(string){return string?string.slice(0,trimmedEndIndex(string)+1).replace(reTrimStart,""):string}function isObject(value){var type=typeof value;return value!=null&&(type=="object"||type=="function")}var NAN=0/0;var reIsBadHex=/^[-+]0x[0-9a-f]+$/i;var reIsBinary=/^0b[01]+$/i;var reIsOctal=/^0o[0-7]+$/i;var freeParseInt=parseInt;function toNumber(value){if(typeof value=="number"){return value}if(isSymbol(value)){return NAN}if(isObject(value)){var other=typeof value.valueOf=="function"?value.valueOf():value;value=isObject(other)?other+"":other}if(typeof value!="string"){return value===0?value:+value}value=baseTrim(value);var isBinary=reIsBinary.test(value);return isBinary||reIsOctal.test(value)?freeParseInt(value.slice(2),isBinary?2:8):reIsBadHex.test(value)?NAN:+value}var INFINITY$1=1/0,MAX_INTEGER=17976931348623157e292;function toFinite(value){if(!value){return value===0?value:0}value=toNumber(value);if(value===INFINITY$1||value===-INFINITY$1){var sign=value<0?-1:1;return sign*MAX_INTEGER}return value===value?value:0}function toInteger(value){var result=toFinite(value),remainder=result%1;return result===result?remainder?result-remainder:result:0}function identity(value){return value}var asyncTag="[object AsyncFunction]",funcTag$2="[object Function]",genTag$1="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(value){if(!isObject(value)){return false}var tag=baseGetTag(value);return tag==funcTag$2||tag==genTag$1||tag==asyncTag||tag==proxyTag}var coreJsData=root["__core-js_shared__"];var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}();function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}var funcProto$2=Function.prototype;var funcToString$2=funcProto$2.toString;function toSource(func){if(func!=null){try{return funcToString$2.call(func)}catch(e){}try{return func+""}catch(e){}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g;var reIsHostCtor=/^\[object .+?Constructor\]$/;var funcProto$1=Function.prototype,objectProto$g=Object.prototype;var funcToString$1=funcProto$1.toString;var hasOwnProperty$e=objectProto$g.hasOwnProperty;var reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$e).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false}var pattern=isFunction(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function getValue(object,key){return object==null?void 0:object[key]}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:void 0}var WeakMap=getNative(root,"WeakMap");var metaMap=WeakMap&&new WeakMap;var baseSetData=!metaMap?identity:function(func,data){metaMap.set(func,data);return func};var objectCreate=Object.create;var baseCreate=function(){function object(){}return function(proto){if(!isObject(proto)){return{}}if(objectCreate){return objectCreate(proto)}object.prototype=proto;var result=new object;object.prototype=void 0;return result}}();function createCtor(Ctor){return function(){var args=arguments;switch(args.length){case 0:return new Ctor;case 1:return new Ctor(args[0]);case 2:return new Ctor(args[0],args[1]);case 3:return new Ctor(args[0],args[1],args[2]);case 4:return new Ctor(args[0],args[1],args[2],args[3]);case 5:return new Ctor(args[0],args[1],args[2],args[3],args[4]);case 6:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5]);case 7:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5],args[6])}var thisBinding=baseCreate(Ctor.prototype),result=Ctor.apply(thisBinding,args);return isObject(result)?result:thisBinding}}var WRAP_BIND_FLAG$6=1;function createBind(func,bitmask,thisArg){var isBind=bitmask&WRAP_BIND_FLAG$6,Ctor=createCtor(func);function wrapper(){var fn2=this&&this!==root&&this instanceof wrapper?Ctor:func;return fn2.apply(isBind?thisArg:this,arguments)}return wrapper}function apply(func,thisArg,args){switch(args.length){case 0:return func.call(thisArg);case 1:return func.call(thisArg,args[0]);case 2:return func.call(thisArg,args[0],args[1]);case 3:return func.call(thisArg,args[0],args[1],args[2])}return func.apply(thisArg,args)}var nativeMax$5=Math.max;function composeArgs(args,partials,holders,isCurried){var argsIndex=-1,argsLength=args.length,holdersLength=holders.length,leftIndex=-1,leftLength=partials.length,rangeLength=nativeMax$5(argsLength-holdersLength,0),result=Array(leftLength+rangeLength),isUncurried=!isCurried;while(++leftIndex<leftLength){result[leftIndex]=partials[leftIndex]}while(++argsIndex<holdersLength){if(isUncurried||argsIndex<argsLength){result[holders[argsIndex]]=args[argsIndex]}}while(rangeLength--){result[leftIndex++]=args[argsIndex++]}return result}var nativeMax$4=Math.max;function composeArgsRight(args,partials,holders,isCurried){var argsIndex=-1,argsLength=args.length,holdersIndex=-1,holdersLength=holders.length,rightIndex=-1,rightLength=partials.length,rangeLength=nativeMax$4(argsLength-holdersLength,0),result=Array(rangeLength+rightLength),isUncurried=!isCurried;while(++argsIndex<rangeLength){result[argsIndex]=args[argsIndex]}var offset2=argsIndex;while(++rightIndex<rightLength){result[offset2+rightIndex]=partials[rightIndex]}while(++holdersIndex<holdersLength){if(isUncurried||argsIndex<argsLength){result[offset2+holders[holdersIndex]]=args[argsIndex++]}}return result}function countHolders(array,placeholder){var length=array.length,result=0;while(length--){if(array[length]===placeholder){++result}}return result}function baseLodash(){}var MAX_ARRAY_LENGTH=4294967295;function LazyWrapper(value){this.__wrapped__=value;this.__actions__=[];this.__dir__=1;this.__filtered__=false;this.__iteratees__=[];this.__takeCount__=MAX_ARRAY_LENGTH;this.__views__=[]}LazyWrapper.prototype=baseCreate(baseLodash.prototype);LazyWrapper.prototype.constructor=LazyWrapper;function noop(){}var getData=!metaMap?noop:function(func){return metaMap.get(func)};var realNames={};var objectProto$f=Object.prototype;var hasOwnProperty$d=objectProto$f.hasOwnProperty;function getFuncName(func){var result=func.name+"",array=realNames[result],length=hasOwnProperty$d.call(realNames,result)?array.length:0;while(length--){var data=array[length],otherFunc=data.func;if(otherFunc==null||otherFunc==func){return data.name}}return result}function LodashWrapper(value,chainAll){this.__wrapped__=value;this.__actions__=[];this.__chain__=!!chainAll;this.__index__=0;this.__values__=void 0}LodashWrapper.prototype=baseCreate(baseLodash.prototype);LodashWrapper.prototype.constructor=LodashWrapper;function copyArray(source,array){var index=-1,length=source.length;array||(array=Array(length));while(++index<length){array[index]=source[index]}return array}function wrapperClone(wrapper){if(wrapper instanceof LazyWrapper){return wrapper.clone()}var result=new LodashWrapper(wrapper.__wrapped__,wrapper.__chain__);result.__actions__=copyArray(wrapper.__actions__);result.__index__=wrapper.__index__;result.__values__=wrapper.__values__;return result}var objectProto$e=Object.prototype;var hasOwnProperty$c=objectProto$e.hasOwnProperty;function lodash(value){if(isObjectLike(value)&&!isArray(value)&&!(value instanceof LazyWrapper)){if(value instanceof LodashWrapper){return value}if(hasOwnProperty$c.call(value,"__wrapped__")){return wrapperClone(value)}}return new LodashWrapper(value)}lodash.prototype=baseLodash.prototype;lodash.prototype.constructor=lodash;function isLaziable(func){var funcName=getFuncName(func),other=lodash[funcName];if(typeof other!="function"||!(funcName in LazyWrapper.prototype)){return false}if(func===other){return true}var data=getData(other);return!!data&&func===data[0]}var HOT_COUNT=800,HOT_SPAN=16;var nativeNow=Date.now;function shortOut(func){var count=0,lastCalled=0;return function(){var stamp=nativeNow(),remaining=HOT_SPAN-(stamp-lastCalled);lastCalled=stamp;if(remaining>0){if(++count>=HOT_COUNT){return arguments[0]}}else{count=0}return func.apply(void 0,arguments)}}var setData=shortOut(baseSetData);var reWrapDetails=/\{\n\/\* \[wrapped with (.+)\] \*/,reSplitDetails=/,? & /;function getWrapDetails(source){var match=source.match(reWrapDetails);return match?match[1].split(reSplitDetails):[]}var reWrapComment=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function insertWrapDetails(source,details){var length=details.length;if(!length){return source}var lastIndex=length-1;details[lastIndex]=(length>1?"& ":"")+details[lastIndex];details=details.join(length>2?", ":" ");return source.replace(reWrapComment,"{\n/* [wrapped with "+details+"] */\n")}function constant(value){return function(){return value}}var defineProperty=function(){try{var func=getNative(Object,"defineProperty");func({},"",{});return func}catch(e){}}();var baseSetToString=!defineProperty?identity:function(func,string){return defineProperty(func,"toString",{configurable:true,enumerable:false,value:constant(string),writable:true})};var setToString=shortOut(baseSetToString);function arrayEach(array,iteratee){var index=-1,length=array==null?0:array.length;while(++index<length){if(iteratee(array[index],index,array)===false){break}}return array}function baseFindIndex(array,predicate,fromIndex,fromRight){var length=array.length,index=fromIndex+-1;while(++index<length){if(predicate(array[index],index,array)){return index}}return-1}function baseIsNaN(value){return value!==value}function strictIndexOf(array,value,fromIndex){var index=fromIndex-1,length=array.length;while(++index<length){if(array[index]===value){return index}}return-1}function baseIndexOf(array,value,fromIndex){return value===value?strictIndexOf(array,value,fromIndex):baseFindIndex(array,baseIsNaN,fromIndex)}function arrayIncludes(array,value){var length=array==null?0:array.length;return!!length&&baseIndexOf(array,value,0)>-1}var WRAP_BIND_FLAG$5=1,WRAP_BIND_KEY_FLAG$4=2,WRAP_CURRY_FLAG$4=8,WRAP_CURRY_RIGHT_FLAG$2=16,WRAP_PARTIAL_FLAG$3=32,WRAP_PARTIAL_RIGHT_FLAG$2=64,WRAP_ARY_FLAG$2=128,WRAP_REARG_FLAG$1=256,WRAP_FLIP_FLAG$1=512;var wrapFlags=[["ary",WRAP_ARY_FLAG$2],["bind",WRAP_BIND_FLAG$5],["bindKey",WRAP_BIND_KEY_FLAG$4],["curry",WRAP_CURRY_FLAG$4],["curryRight",WRAP_CURRY_RIGHT_FLAG$2],["flip",WRAP_FLIP_FLAG$1],["partial",WRAP_PARTIAL_FLAG$3],["partialRight",WRAP_PARTIAL_RIGHT_FLAG$2],["rearg",WRAP_REARG_FLAG$1]];function updateWrapDetails(details,bitmask){arrayEach(wrapFlags,(function(pair){var value="_."+pair[0];if(bitmask&pair[1]&&!arrayIncludes(details,value)){details.push(value)}}));return details.sort()}function setWrapToString(wrapper,reference2,bitmask){var source=reference2+"";return setToString(wrapper,insertWrapDetails(source,updateWrapDetails(getWrapDetails(source),bitmask)))}var WRAP_BIND_FLAG$4=1,WRAP_BIND_KEY_FLAG$3=2,WRAP_CURRY_BOUND_FLAG$1=4,WRAP_CURRY_FLAG$3=8,WRAP_PARTIAL_FLAG$2=32,WRAP_PARTIAL_RIGHT_FLAG$1=64;function createRecurry(func,bitmask,wrapFunc,placeholder,thisArg,partials,holders,argPos,ary,arity){var isCurry=bitmask&WRAP_CURRY_FLAG$3,newHolders=isCurry?holders:void 0,newHoldersRight=isCurry?void 0:holders,newPartials=isCurry?partials:void 0,newPartialsRight=isCurry?void 0:partials;bitmask|=isCurry?WRAP_PARTIAL_FLAG$2:WRAP_PARTIAL_RIGHT_FLAG$1;bitmask&=~(isCurry?WRAP_PARTIAL_RIGHT_FLAG$1:WRAP_PARTIAL_FLAG$2);if(!(bitmask&WRAP_CURRY_BOUND_FLAG$1)){bitmask&=~(WRAP_BIND_FLAG$4|WRAP_BIND_KEY_FLAG$3)}var newData=[func,bitmask,thisArg,newPartials,newHolders,newPartialsRight,newHoldersRight,argPos,ary,arity];var result=wrapFunc.apply(void 0,newData);if(isLaziable(func)){setData(result,newData)}result.placeholder=placeholder;return setWrapToString(result,func,bitmask)}function getHolder(func){var object=func;return object.placeholder}var MAX_SAFE_INTEGER$1=9007199254740991;var reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(value,length){var type=typeof value;length=length==null?MAX_SAFE_INTEGER$1:length;return!!length&&(type=="number"||type!="symbol"&&reIsUint.test(value))&&(value>-1&&value%1==0&&value<length)}var nativeMin$2=Math.min;function reorder(array,indexes){var arrLength=array.length,length=nativeMin$2(indexes.length,arrLength),oldArray=copyArray(array);while(length--){var index=indexes[length];array[length]=isIndex(index,arrLength)?oldArray[index]:void 0}return array}var PLACEHOLDER$1="__lodash_placeholder__";function replaceHolders(array,placeholder){var index=-1,length=array.length,resIndex=0,result=[];while(++index<length){var value=array[index];if(value===placeholder||value===PLACEHOLDER$1){array[index]=PLACEHOLDER$1;result[resIndex++]=index}}return result}var WRAP_BIND_FLAG$3=1,WRAP_BIND_KEY_FLAG$2=2,WRAP_CURRY_FLAG$2=8,WRAP_CURRY_RIGHT_FLAG$1=16,WRAP_ARY_FLAG$1=128,WRAP_FLIP_FLAG=512;function createHybrid(func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity){var isAry=bitmask&WRAP_ARY_FLAG$1,isBind=bitmask&WRAP_BIND_FLAG$3,isBindKey=bitmask&WRAP_BIND_KEY_FLAG$2,isCurried=bitmask&(WRAP_CURRY_FLAG$2|WRAP_CURRY_RIGHT_FLAG$1),isFlip=bitmask&WRAP_FLIP_FLAG,Ctor=isBindKey?void 0:createCtor(func);function wrapper(){var length=arguments.length,args=Array(length),index=length;while(index--){args[index]=arguments[index]}if(isCurried){var placeholder=getHolder(wrapper),holdersCount=countHolders(args,placeholder)}if(partials){args=composeArgs(args,partials,holders,isCurried)}if(partialsRight){args=composeArgsRight(args,partialsRight,holdersRight,isCurried)}length-=holdersCount;if(isCurried&&length<arity){var newHolders=replaceHolders(args,placeholder);return createRecurry(func,bitmask,createHybrid,wrapper.placeholder,thisArg,args,newHolders,argPos,ary,arity-length)}var thisBinding=isBind?thisArg:this,fn2=isBindKey?thisBinding[func]:func;length=args.length;if(argPos){args=reorder(args,argPos)}else if(isFlip&&length>1){args.reverse()}if(isAry&&ary<length){args.length=ary}if(this&&this!==root&&this instanceof wrapper){fn2=Ctor||createCtor(fn2)}return fn2.apply(thisBinding,args)}return wrapper}function createCurry(func,bitmask,arity){var Ctor=createCtor(func);function wrapper(){var length=arguments.length,args=Array(length),index=length,placeholder=getHolder(wrapper);while(index--){args[index]=arguments[index]}var holders=length<3&&args[0]!==placeholder&&args[length-1]!==placeholder?[]:replaceHolders(args,placeholder);length-=holders.length;if(length<arity){return createRecurry(func,bitmask,createHybrid,wrapper.placeholder,void 0,args,holders,void 0,void 0,arity-length)}var fn2=this&&this!==root&&this instanceof wrapper?Ctor:func;return apply(fn2,this,args)}return wrapper}var WRAP_BIND_FLAG$2=1;function createPartial(func,bitmask,thisArg,partials){var isBind=bitmask&WRAP_BIND_FLAG$2,Ctor=createCtor(func);function wrapper(){var argsIndex=-1,argsLength=arguments.length,leftIndex=-1,leftLength=partials.length,args=Array(leftLength+argsLength),fn2=this&&this!==root&&this instanceof wrapper?Ctor:func;while(++leftIndex<leftLength){args[leftIndex]=partials[leftIndex]}while(argsLength--){args[leftIndex++]=arguments[++argsIndex]}return apply(fn2,isBind?thisArg:this,args)}return wrapper}var PLACEHOLDER="__lodash_placeholder__";var WRAP_BIND_FLAG$1=1,WRAP_BIND_KEY_FLAG$1=2,WRAP_CURRY_BOUND_FLAG=4,WRAP_CURRY_FLAG$1=8,WRAP_ARY_FLAG=128,WRAP_REARG_FLAG=256;var nativeMin$1=Math.min;function mergeData(data,source){var bitmask=data[1],srcBitmask=source[1],newBitmask=bitmask|srcBitmask,isCommon=newBitmask<(WRAP_BIND_FLAG$1|WRAP_BIND_KEY_FLAG$1|WRAP_ARY_FLAG);var isCombo=srcBitmask==WRAP_ARY_FLAG&&bitmask==WRAP_CURRY_FLAG$1||srcBitmask==WRAP_ARY_FLAG&&bitmask==WRAP_REARG_FLAG&&data[7].length<=source[8]||srcBitmask==(WRAP_ARY_FLAG|WRAP_REARG_FLAG)&&source[7].length<=source[8]&&bitmask==WRAP_CURRY_FLAG$1;if(!(isCommon||isCombo)){return data}if(srcBitmask&WRAP_BIND_FLAG$1){data[2]=source[2];newBitmask|=bitmask&WRAP_BIND_FLAG$1?0:WRAP_CURRY_BOUND_FLAG}var value=source[3];if(value){var partials=data[3];data[3]=partials?composeArgs(partials,value,source[4]):value;data[4]=partials?replaceHolders(data[3],PLACEHOLDER):source[4]}value=source[5];if(value){partials=data[5];data[5]=partials?composeArgsRight(partials,value,source[6]):value;data[6]=partials?replaceHolders(data[5],PLACEHOLDER):source[6]}value=source[7];if(value){data[7]=value}if(srcBitmask&WRAP_ARY_FLAG){data[8]=data[8]==null?source[8]:nativeMin$1(data[8],source[8])}if(data[9]==null){data[9]=source[9]}data[0]=source[0];data[1]=newBitmask;return data}var FUNC_ERROR_TEXT$3="Expected a function";var WRAP_BIND_FLAG=1,WRAP_BIND_KEY_FLAG=2,WRAP_CURRY_FLAG=8,WRAP_CURRY_RIGHT_FLAG=16,WRAP_PARTIAL_FLAG$1=32,WRAP_PARTIAL_RIGHT_FLAG=64;var nativeMax$3=Math.max;function createWrap(func,bitmask,thisArg,partials,holders,argPos,ary,arity){var isBindKey=bitmask&WRAP_BIND_KEY_FLAG;if(!isBindKey&&typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT$3)}var length=partials?partials.length:0;if(!length){bitmask&=~(WRAP_PARTIAL_FLAG$1|WRAP_PARTIAL_RIGHT_FLAG);partials=holders=void 0}ary=ary===void 0?ary:nativeMax$3(toInteger(ary),0);arity=arity===void 0?arity:toInteger(arity);length-=holders?holders.length:0;if(bitmask&WRAP_PARTIAL_RIGHT_FLAG){var partialsRight=partials,holdersRight=holders;partials=holders=void 0}var data=isBindKey?void 0:getData(func);var newData=[func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity];if(data){mergeData(newData,data)}func=newData[0];bitmask=newData[1];thisArg=newData[2];partials=newData[3];holders=newData[4];arity=newData[9]=newData[9]===void 0?isBindKey?0:func.length:nativeMax$3(newData[9]-length,0);if(!arity&&bitmask&(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG)){bitmask&=~(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG)}if(!bitmask||bitmask==WRAP_BIND_FLAG){var result=createBind(func,bitmask,thisArg)}else if(bitmask==WRAP_CURRY_FLAG||bitmask==WRAP_CURRY_RIGHT_FLAG){result=createCurry(func,bitmask,arity)}else if((bitmask==WRAP_PARTIAL_FLAG$1||bitmask==(WRAP_BIND_FLAG|WRAP_PARTIAL_FLAG$1))&&!holders.length){result=createPartial(func,bitmask,thisArg,partials)}else{result=createHybrid.apply(void 0,newData)}var setter=data?baseSetData:setData;return setWrapToString(setter(result,newData),func,bitmask)}function baseAssignValue(object,key,value){if(key=="__proto__"&&defineProperty){defineProperty(object,key,{configurable:true,enumerable:true,value:value,writable:true})}else{object[key]=value}}function eq(value,other){return value===other||value!==value&&other!==other}var objectProto$d=Object.prototype;var hasOwnProperty$b=objectProto$d.hasOwnProperty;function assignValue(object,key,value){var objValue=object[key];if(!(hasOwnProperty$b.call(object,key)&&eq(objValue,value))||value===void 0&&!(key in object)){baseAssignValue(object,key,value)}}function copyObject(source,props,object,customizer){var isNew=!object;object||(object={});var index=-1,length=props.length;while(++index<length){var key=props[index];var newValue=void 0;if(newValue===void 0){newValue=source[key]}if(isNew){baseAssignValue(object,key,newValue)}else{assignValue(object,key,newValue)}}return object}var nativeMax$2=Math.max;function overRest(func,start2,transform){start2=nativeMax$2(start2===void 0?func.length-1:start2,0);return function(){var args=arguments,index=-1,length=nativeMax$2(args.length-start2,0),array=Array(length);while(++index<length){array[index]=args[start2+index]}index=-1;var otherArgs=Array(start2+1);while(++index<start2){otherArgs[index]=args[index]}otherArgs[start2]=transform(array);return apply(func,this,otherArgs)}}function baseRest(func,start2){return setToString(overRest(func,start2,identity),func+"")}var MAX_SAFE_INTEGER=9007199254740991;function isLength(value){return typeof value=="number"&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value)}function isIterateeCall(value,index,object){if(!isObject(object)){return false}var type=typeof index;if(type=="number"?isArrayLike(object)&&isIndex(index,object.length):type=="string"&&index in object){return eq(object[index],value)}return false}function createAssigner(assigner){return baseRest((function(object,sources){var index=-1,length=sources.length,customizer=length>1?sources[length-1]:void 0,guard=length>2?sources[2]:void 0;customizer=assigner.length>3&&typeof customizer=="function"?(length--,customizer):void 0;if(guard&&isIterateeCall(sources[0],sources[1],guard)){customizer=length<3?void 0:customizer;length=1}object=Object(object);while(++index<length){var source=sources[index];if(source){assigner(object,source,index,customizer)}}return object}))}var objectProto$c=Object.prototype;function isPrototype(value){var Ctor=value&&value.constructor,proto=typeof Ctor=="function"&&Ctor.prototype||objectProto$c;return value===proto}function baseTimes(n,iteratee){var index=-1,result=Array(n);while(++index<n){result[index]=iteratee(index)}return result}var argsTag$3="[object Arguments]";function baseIsArguments(value){return isObjectLike(value)&&baseGetTag(value)==argsTag$3}var objectProto$b=Object.prototype;var hasOwnProperty$a=objectProto$b.hasOwnProperty;var propertyIsEnumerable$1=objectProto$b.propertyIsEnumerable;var isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(value){return isObjectLike(value)&&hasOwnProperty$a.call(value,"callee")&&!propertyIsEnumerable$1.call(value,"callee")};function stubFalse(){return false}var freeExports$2=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var freeModule$2=freeExports$2&&typeof module=="object"&&module&&!module.nodeType&&module;var moduleExports$2=freeModule$2&&freeModule$2.exports===freeExports$2;var Buffer$1=moduleExports$2?root.Buffer:void 0;var nativeIsBuffer=Buffer$1?Buffer$1.isBuffer:void 0;var isBuffer=nativeIsBuffer||stubFalse;var argsTag$2="[object Arguments]",arrayTag$2="[object Array]",boolTag$3="[object Boolean]",dateTag$3="[object Date]",errorTag$2="[object Error]",funcTag$1="[object Function]",mapTag$6="[object Map]",numberTag$3="[object Number]",objectTag$4="[object Object]",regexpTag$3="[object RegExp]",setTag$6="[object Set]",stringTag$4="[object String]",weakMapTag$2="[object WeakMap]";var arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]";var typedArrayTags={};typedArrayTags[float32Tag$2]=typedArrayTags[float64Tag$2]=typedArrayTags[int8Tag$2]=typedArrayTags[int16Tag$2]=typedArrayTags[int32Tag$2]=typedArrayTags[uint8Tag$2]=typedArrayTags[uint8ClampedTag$2]=typedArrayTags[uint16Tag$2]=typedArrayTags[uint32Tag$2]=true;typedArrayTags[argsTag$2]=typedArrayTags[arrayTag$2]=typedArrayTags[arrayBufferTag$3]=typedArrayTags[boolTag$3]=typedArrayTags[dataViewTag$4]=typedArrayTags[dateTag$3]=typedArrayTags[errorTag$2]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag$6]=typedArrayTags[numberTag$3]=typedArrayTags[objectTag$4]=typedArrayTags[regexpTag$3]=typedArrayTags[setTag$6]=typedArrayTags[stringTag$4]=typedArrayTags[weakMapTag$2]=false;function baseIsTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[baseGetTag(value)]}function baseUnary(func){return function(value){return func(value)}}var freeExports$1=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var freeModule$1=freeExports$1&&typeof module=="object"&&module&&!module.nodeType&&module;var moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1;var freeProcess=moduleExports$1&&freeGlobal.process;var nodeUtil=function(){try{var types=freeModule$1&&freeModule$1.require&&freeModule$1.require("util").types;if(types){return types}return freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch(e){}}();var nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray;var isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;var objectProto$a=Object.prototype;var hasOwnProperty$9=objectProto$a.hasOwnProperty;function arrayLikeKeys(value,inherited){var isArr=isArray(value),isArg=!isArr&&isArguments(value),isBuff=!isArr&&!isArg&&isBuffer(value),isType=!isArr&&!isArg&&!isBuff&&isTypedArray(value),skipIndexes=isArr||isArg||isBuff||isType,result=skipIndexes?baseTimes(value.length,String):[],length=result.length;for(var key in value){if((inherited||hasOwnProperty$9.call(value,key))&&!(skipIndexes&&(key=="length"||isBuff&&(key=="offset"||key=="parent")||isType&&(key=="buffer"||key=="byteLength"||key=="byteOffset")||isIndex(key,length)))){result.push(key)}}return result}function overArg(func,transform){return function(arg){return func(transform(arg))}}var nativeKeys=overArg(Object.keys,Object);var objectProto$9=Object.prototype;var hasOwnProperty$8=objectProto$9.hasOwnProperty;function baseKeys(object){if(!isPrototype(object)){return nativeKeys(object)}var result=[];for(var key in Object(object)){if(hasOwnProperty$8.call(object,key)&&key!="constructor"){result.push(key)}}return result}function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}function nativeKeysIn(object){var result=[];if(object!=null){for(var key in Object(object)){result.push(key)}}return result}var objectProto$8=Object.prototype;var hasOwnProperty$7=objectProto$8.hasOwnProperty;function baseKeysIn(object){if(!isObject(object)){return nativeKeysIn(object)}var isProto=isPrototype(object),result=[];for(var key in object){if(!(key=="constructor"&&(isProto||!hasOwnProperty$7.call(object,key)))){result.push(key)}}return result}function keysIn(object){return isArrayLike(object)?arrayLikeKeys(object,true):baseKeysIn(object)}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(value,object){if(isArray(value)){return false}var type=typeof value;if(type=="number"||type=="symbol"||type=="boolean"||value==null||isSymbol(value)){return true}return reIsPlainProp.test(value)||!reIsDeepProp.test(value)||object!=null&&value in Object(object)}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{};this.size=0}function hashDelete(key){var result=this.has(key)&&delete this.__data__[key];this.size-=result?1:0;return result}var HASH_UNDEFINED$2="__lodash_hash_undefined__";var objectProto$7=Object.prototype;var hasOwnProperty$6=objectProto$7.hasOwnProperty;function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED$2?void 0:result}return hasOwnProperty$6.call(data,key)?data[key]:void 0}var objectProto$6=Object.prototype;var hasOwnProperty$5=objectProto$6.hasOwnProperty;function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==void 0:hasOwnProperty$5.call(data,key)}var HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet(key,value){var data=this.__data__;this.size+=this.has(key)?0:1;data[key]=nativeCreate&&value===void 0?HASH_UNDEFINED$1:value;return this}function Hash(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}Hash.prototype.clear=hashClear;Hash.prototype["delete"]=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function listCacheClear(){this.__data__=[];this.size=0}function assocIndexOf(array,key){var length=array.length;while(length--){if(eq(array[length][0],key)){return length}}return-1}var arrayProto=Array.prototype;var splice=arrayProto.splice;function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){return false}var lastIndex=data.length-1;if(index==lastIndex){data.pop()}else{splice.call(data,index,1)}--this.size;return true}function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?void 0:data[index][1]}function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){++this.size;data.push([key,value])}else{data[index][1]=value}return this}function ListCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;var Map$1=getNative(root,"Map");function mapCacheClear(){this.size=0;this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function isKeyable(value){var type=typeof value;return type=="string"||type=="number"||type=="symbol"||type=="boolean"?value!=="__proto__":value===null}function getMapData(map2,key){var data=map2.__data__;return isKeyable(key)?data[typeof key=="string"?"string":"hash"]:data.map}function mapCacheDelete(key){var result=getMapData(this,key)["delete"](key);this.size-=result?1:0;return result}function mapCacheGet(key){return getMapData(this,key).get(key)}function mapCacheHas(key){return getMapData(this,key).has(key)}function mapCacheSet(key,value){var data=getMapData(this,key),size=data.size;data.set(key,value);this.size+=data.size==size?0:1;return this}function MapCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}MapCache.prototype.clear=mapCacheClear;MapCache.prototype["delete"]=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT$2="Expected a function";function memoize(func,resolver){if(typeof func!="function"||resolver!=null&&typeof resolver!="function"){throw new TypeError(FUNC_ERROR_TEXT$2)}var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key)){return cache.get(key)}var result=func.apply(this,args);memoized.cache=cache.set(key,result)||cache;return result};memoized.cache=new(memoize.Cache||MapCache);return memoized}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(func){var result=memoize(func,(function(key){if(cache.size===MAX_MEMOIZE_SIZE){cache.clear()}return key}));var cache=result.cache;return result}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var reEscapeChar=/\\(\\)?/g;var stringToPath=memoizeCapped((function(string){var result=[];if(string.charCodeAt(0)===46){result.push("")}string.replace(rePropName,(function(match,number,quote,subString){result.push(quote?subString.replace(reEscapeChar,"$1"):number||match)}));return result}));function toString(value){return value==null?"":baseToString(value)}function castPath(value,object){if(isArray(value)){return value}return isKey(value,object)?[value]:stringToPath(toString(value))}var INFINITY=1/0;function toKey(value){if(typeof value=="string"||isSymbol(value)){return value}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}function baseGet(object,path){path=castPath(path,object);var index=0,length=path.length;while(object!=null&&index<length){object=object[toKey(path[index++])]}return index&&index==length?object:void 0}function get(object,path,defaultValue){var result=object==null?void 0:baseGet(object,path);return result===void 0?defaultValue:result}function arrayPush(array,values){var index=-1,length=values.length,offset2=array.length;while(++index<length){array[offset2+index]=values[index]}return array}var spreadableSymbol=Symbol$1?Symbol$1.isConcatSpreadable:void 0;function isFlattenable(value){return isArray(value)||isArguments(value)||!!(spreadableSymbol&&value&&value[spreadableSymbol])}function baseFlatten(array,depth,predicate,isStrict,result){var index=-1,length=array.length;predicate||(predicate=isFlattenable);result||(result=[]);while(++index<length){var value=array[index];if(predicate(value)){{arrayPush(result,value)}}else{result[result.length]=value}}return result}function flatten(array){var length=array==null?0:array.length;return length?baseFlatten(array):[]}function flatRest(func){return setToString(overRest(func,void 0,flatten),func+"")}var getPrototype=overArg(Object.getPrototypeOf,Object);var objectTag$3="[object Object]";var funcProto=Function.prototype,objectProto$5=Object.prototype;var funcToString=funcProto.toString;var hasOwnProperty$4=objectProto$5.hasOwnProperty;var objectCtorString=funcToString.call(Object);function isPlainObject(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag$3){return false}var proto=getPrototype(value);if(proto===null){return true}var Ctor=hasOwnProperty$4.call(proto,"constructor")&&proto.constructor;return typeof Ctor=="function"&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString}function baseSlice(array,start2,end2){var index=-1,length=array.length;if(start2<0){start2=-start2>length?0:length+start2}end2=end2>length?length:end2;if(end2<0){end2+=length}length=start2>end2?0:end2-start2>>>0;start2>>>=0;var result=Array(length);while(++index<length){result[index]=array[index+start2]}return result}function stackClear(){this.__data__=new ListCache;this.size=0}function stackDelete(key){var data=this.__data__,result=data["delete"](key);this.size=data.size;return result}function stackGet(key){return this.__data__.get(key)}function stackHas(key){return this.__data__.has(key)}var LARGE_ARRAY_SIZE=200;function stackSet(key,value){var data=this.__data__;if(data instanceof ListCache){var pairs=data.__data__;if(!Map$1||pairs.length<LARGE_ARRAY_SIZE-1){pairs.push([key,value]);this.size=++data.size;return this}data=this.__data__=new MapCache(pairs)}data.set(key,value);this.size=data.size;return this}function Stack(entries){var data=this.__data__=new ListCache(entries);this.size=data.size}Stack.prototype.clear=stackClear;Stack.prototype["delete"]=stackDelete;Stack.prototype.get=stackGet;Stack.prototype.has=stackHas;Stack.prototype.set=stackSet;function baseAssign(object,source){return object&&copyObject(source,keys(source),object)}function baseAssignIn(object,source){return object&&copyObject(source,keysIn(source),object)}var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module;var moduleExports=freeModule&&freeModule.exports===freeExports;var Buffer=moduleExports?root.Buffer:void 0,allocUnsafe=Buffer?Buffer.allocUnsafe:void 0;function cloneBuffer(buffer,isDeep){if(isDeep){return buffer.slice()}var length=buffer.length,result=allocUnsafe?allocUnsafe(length):new buffer.constructor(length);buffer.copy(result);return result}function arrayFilter(array,predicate){var index=-1,length=array==null?0:array.length,resIndex=0,result=[];while(++index<length){var value=array[index];if(predicate(value,index,array)){result[resIndex++]=value}}return result}function stubArray(){return[]}var objectProto$4=Object.prototype;var propertyIsEnumerable=objectProto$4.propertyIsEnumerable;var nativeGetSymbols$1=Object.getOwnPropertySymbols;var getSymbols=!nativeGetSymbols$1?stubArray:function(object){if(object==null){return[]}object=Object(object);return arrayFilter(nativeGetSymbols$1(object),(function(symbol){return propertyIsEnumerable.call(object,symbol)}))};function copySymbols(source,object){return copyObject(source,getSymbols(source),object)}var nativeGetSymbols=Object.getOwnPropertySymbols;var getSymbolsIn=!nativeGetSymbols?stubArray:function(object){var result=[];while(object){arrayPush(result,getSymbols(object));object=getPrototype(object)}return result};function copySymbolsIn(source,object){return copyObject(source,getSymbolsIn(source),object)}function baseGetAllKeys(object,keysFunc,symbolsFunc){var result=keysFunc(object);return isArray(object)?result:arrayPush(result,symbolsFunc(object))}function getAllKeys(object){return baseGetAllKeys(object,keys,getSymbols)}function getAllKeysIn(object){return baseGetAllKeys(object,keysIn,getSymbolsIn)}var DataView=getNative(root,"DataView");var Promise$1=getNative(root,"Promise");var Set$1=getNative(root,"Set");var mapTag$5="[object Map]",objectTag$2="[object Object]",promiseTag="[object Promise]",setTag$5="[object Set]",weakMapTag$1="[object WeakMap]";var dataViewTag$3="[object DataView]";var dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$1),weakMapCtorString=toSource(WeakMap);var getTag=baseGetTag;if(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag$3||Map$1&&getTag(new Map$1)!=mapTag$5||Promise$1&&getTag(Promise$1.resolve())!=promiseTag||Set$1&&getTag(new Set$1)!=setTag$5||WeakMap&&getTag(new WeakMap)!=weakMapTag$1){getTag=function(value){var result=baseGetTag(value),Ctor=result==objectTag$2?value.constructor:void 0,ctorString=Ctor?toSource(Ctor):"";if(ctorString){switch(ctorString){case dataViewCtorString:return dataViewTag$3;case mapCtorString:return mapTag$5;case promiseCtorString:return promiseTag;case setCtorString:return setTag$5;case weakMapCtorString:return weakMapTag$1}}return result}}var objectProto$3=Object.prototype;var hasOwnProperty$3=objectProto$3.hasOwnProperty;function initCloneArray(array){var length=array.length,result=new array.constructor(length);if(length&&typeof array[0]=="string"&&hasOwnProperty$3.call(array,"index")){result.index=array.index;result.input=array.input}return result}var Uint8Array=root.Uint8Array;function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);new Uint8Array(result).set(new Uint8Array(arrayBuffer));return result}function cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength)}var reFlags=/\w*$/;function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));result.lastIndex=regexp.lastIndex;return result}var symbolProto$1=Symbol$1?Symbol$1.prototype:void 0,symbolValueOf$1=symbolProto$1?symbolProto$1.valueOf:void 0;function cloneSymbol(symbol){return symbolValueOf$1?Object(symbolValueOf$1.call(symbol)):{}}function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length)}var boolTag$2="[object Boolean]",dateTag$2="[object Date]",mapTag$4="[object Map]",numberTag$2="[object Number]",regexpTag$2="[object RegExp]",setTag$4="[object Set]",stringTag$3="[object String]",symbolTag$2="[object Symbol]";var arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$2="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]";function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag$2:return cloneArrayBuffer(object);case boolTag$2:case dateTag$2:return new Ctor(+object);case dataViewTag$2:return cloneDataView(object,isDeep);case float32Tag$1:case float64Tag$1:case int8Tag$1:case int16Tag$1:case int32Tag$1:case uint8Tag$1:case uint8ClampedTag$1:case uint16Tag$1:case uint32Tag$1:return cloneTypedArray(object,isDeep);case mapTag$4:return new Ctor;case numberTag$2:case stringTag$3:return new Ctor(object);case regexpTag$2:return cloneRegExp(object);case setTag$4:return new Ctor;case symbolTag$2:return cloneSymbol(object)}}function initCloneObject(object){return typeof object.constructor=="function"&&!isPrototype(object)?baseCreate(getPrototype(object)):{}}var mapTag$3="[object Map]";function baseIsMap(value){return isObjectLike(value)&&getTag(value)==mapTag$3}var nodeIsMap=nodeUtil&&nodeUtil.isMap;var isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap;var setTag$3="[object Set]";function baseIsSet(value){return isObjectLike(value)&&getTag(value)==setTag$3}var nodeIsSet=nodeUtil&&nodeUtil.isSet;var isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet;var CLONE_DEEP_FLAG$2=1,CLONE_FLAT_FLAG$1=2,CLONE_SYMBOLS_FLAG$2=4;var argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag$2="[object Map]",numberTag$1="[object Number]",objectTag$1="[object Object]",regexpTag$1="[object RegExp]",setTag$2="[object Set]",stringTag$2="[object String]",symbolTag$1="[object Symbol]",weakMapTag="[object WeakMap]";var arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var cloneableTags={};cloneableTags[argsTag$1]=cloneableTags[arrayTag$1]=cloneableTags[arrayBufferTag$1]=cloneableTags[dataViewTag$1]=cloneableTags[boolTag$1]=cloneableTags[dateTag$1]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag$2]=cloneableTags[numberTag$1]=cloneableTags[objectTag$1]=cloneableTags[regexpTag$1]=cloneableTags[setTag$2]=cloneableTags[stringTag$2]=cloneableTags[symbolTag$1]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=true;cloneableTags[errorTag$1]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=false;function baseClone(value,bitmask,customizer,key,object,stack){var result,isDeep=bitmask&CLONE_DEEP_FLAG$2,isFlat=bitmask&CLONE_FLAT_FLAG$1,isFull=bitmask&CLONE_SYMBOLS_FLAG$2;if(customizer){result=object?customizer(value,key,object,stack):customizer(value)}if(result!==void 0){return result}if(!isObject(value)){return value}var isArr=isArray(value);if(isArr){result=initCloneArray(value);if(!isDeep){return copyArray(value,result)}}else{var tag=getTag(value),isFunc=tag==funcTag||tag==genTag;if(isBuffer(value)){return cloneBuffer(value,isDeep)}if(tag==objectTag$1||tag==argsTag$1||isFunc&&!object){result=isFlat||isFunc?{}:initCloneObject(value);if(!isDeep){return isFlat?copySymbolsIn(value,baseAssignIn(result,value)):copySymbols(value,baseAssign(result,value))}}else{if(!cloneableTags[tag]){return object?value:{}}result=initCloneByTag(value,tag,isDeep)}}stack||(stack=new Stack);var stacked=stack.get(value);if(stacked){return stacked}stack.set(value,result);if(isSet(value)){value.forEach((function(subValue){result.add(baseClone(subValue,bitmask,customizer,subValue,value,stack))}))}else if(isMap(value)){value.forEach((function(subValue,key2){result.set(key2,baseClone(subValue,bitmask,customizer,key2,value,stack))}))}var keysFunc=isFull?isFlat?getAllKeysIn:getAllKeys:isFlat?keysIn:keys;var props=isArr?void 0:keysFunc(value);arrayEach(props||value,(function(subValue,key2){if(props){key2=subValue;subValue=value[key2]}assignValue(result,key2,baseClone(subValue,bitmask,customizer,key2,value,stack))}));return result}var CLONE_DEEP_FLAG$1=1,CLONE_SYMBOLS_FLAG$1=4;function cloneDeep(value){return baseClone(value,CLONE_DEEP_FLAG$1|CLONE_SYMBOLS_FLAG$1)}var HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd(value){this.__data__.set(value,HASH_UNDEFINED);return this}function setCacheHas(value){return this.__data__.has(value)}function SetCache(values){var index=-1,length=values==null?0:values.length;this.__data__=new MapCache;while(++index<length){this.add(values[index])}}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd;SetCache.prototype.has=setCacheHas;function arraySome(array,predicate){var index=-1,length=array==null?0:array.length;while(++index<length){if(predicate(array[index],index,array)){return true}}return false}function cacheHas(cache,key){return cache.has(key)}var COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays(array,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG$5,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength)){return false}var arrStacked=stack.get(array);var othStacked=stack.get(other);if(arrStacked&&othStacked){return arrStacked==other&&othStacked==array}var index=-1,result=true,seen=bitmask&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;stack.set(array,other);stack.set(other,array);while(++index<arrLength){var arrValue=array[index],othValue=other[index];if(customizer){var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack)}if(compared!==void 0){if(compared){continue}result=false;break}if(seen){if(!arraySome(other,(function(othValue2,othIndex){if(!cacheHas(seen,othIndex)&&(arrValue===othValue2||equalFunc(arrValue,othValue2,bitmask,customizer,stack))){return seen.push(othIndex)}}))){result=false;break}}else if(!(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack))){result=false;break}}stack["delete"](array);stack["delete"](other);return result}function mapToArray(map2){var index=-1,result=Array(map2.size);map2.forEach((function(value,key){result[++index]=[key,value]}));return result}function setToArray(set){var index=-1,result=Array(set.size);set.forEach((function(value){result[++index]=value}));return result}var COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2;var boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",mapTag$1="[object Map]",numberTag="[object Number]",regexpTag="[object RegExp]",setTag$1="[object Set]",stringTag$1="[object String]",symbolTag="[object Symbol]";var arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]";var symbolProto=Symbol$1?Symbol$1.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag(object,other,tag,bitmask,customizer,equalFunc,stack){switch(tag){case dataViewTag:if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset){return false}object=object.buffer;other=other.buffer;case arrayBufferTag:if(object.byteLength!=other.byteLength||!equalFunc(new Uint8Array(object),new Uint8Array(other))){return false}return true;case boolTag:case dateTag:case numberTag:return eq(+object,+other);case errorTag:return object.name==other.name&&object.message==other.message;case regexpTag:case stringTag$1:return object==other+"";case mapTag$1:var convert=mapToArray;case setTag$1:var isPartial=bitmask&COMPARE_PARTIAL_FLAG$4;convert||(convert=setToArray);if(object.size!=other.size&&!isPartial){return false}var stacked=stack.get(object);if(stacked){return stacked==other}bitmask|=COMPARE_UNORDERED_FLAG$2;stack.set(object,other);var result=equalArrays(convert(object),convert(other),bitmask,customizer,equalFunc,stack);stack["delete"](object);return result;case symbolTag:if(symbolValueOf){return symbolValueOf.call(object)==symbolValueOf.call(other)}}return false}var COMPARE_PARTIAL_FLAG$3=1;var objectProto$2=Object.prototype;var hasOwnProperty$2=objectProto$2.hasOwnProperty;function equalObjects(object,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG$3,objProps=getAllKeys(object),objLength=objProps.length,othProps=getAllKeys(other),othLength=othProps.length;if(objLength!=othLength&&!isPartial){return false}var index=objLength;while(index--){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty$2.call(other,key))){return false}}var objStacked=stack.get(object);var othStacked=stack.get(other);if(objStacked&&othStacked){return objStacked==other&&othStacked==object}var result=true;stack.set(object,other);stack.set(other,object);var skipCtor=isPartial;while(++index<objLength){key=objProps[index];var objValue=object[key],othValue=other[key];if(customizer){var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack)}if(!(compared===void 0?objValue===othValue||equalFunc(objValue,othValue,bitmask,customizer,stack):compared)){result=false;break}skipCtor||(skipCtor=key=="constructor")}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;if(objCtor!=othCtor&&("constructor"in object&&"constructor"in other)&&!(typeof objCtor=="function"&&objCtor instanceof objCtor&&typeof othCtor=="function"&&othCtor instanceof othCtor)){result=false}}stack["delete"](object);stack["delete"](other);return result}var COMPARE_PARTIAL_FLAG$2=1;var argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]";var objectProto$1=Object.prototype;var hasOwnProperty$1=objectProto$1.hasOwnProperty;function baseIsEqualDeep(object,other,bitmask,customizer,equalFunc,stack){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=objIsArr?arrayTag:getTag(object),othTag=othIsArr?arrayTag:getTag(other);objTag=objTag==argsTag?objectTag:objTag;othTag=othTag==argsTag?objectTag:othTag;var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&isBuffer(object)){if(!isBuffer(other)){return false}objIsArr=true;objIsObj=false}if(isSameTag&&!objIsObj){stack||(stack=new Stack);return objIsArr||isTypedArray(object)?equalArrays(object,other,bitmask,customizer,equalFunc,stack):equalByTag(object,other,objTag,bitmask,customizer,equalFunc,stack)}if(!(bitmask&COMPARE_PARTIAL_FLAG$2)){var objIsWrapped=objIsObj&&hasOwnProperty$1.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty$1.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;stack||(stack=new Stack);return equalFunc(objUnwrapped,othUnwrapped,bitmask,customizer,stack)}}if(!isSameTag){return false}stack||(stack=new Stack);return equalObjects(object,other,bitmask,customizer,equalFunc,stack)}function baseIsEqual(value,other,bitmask,customizer,stack){if(value===other){return true}if(value==null||other==null||!isObjectLike(value)&&!isObjectLike(other)){return value!==value&&other!==other}return baseIsEqualDeep(value,other,bitmask,customizer,baseIsEqual,stack)}var COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2;function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index;if(object==null){return!length}object=Object(object);while(index--){var data=matchData[index];if(data[2]?data[1]!==object[data[0]]:!(data[0]in object)){return false}}while(++index<length){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(data[2]){if(objValue===void 0&&!(key in object)){return false}}else{var stack=new Stack;var result;if(!(result===void 0?baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG$1|COMPARE_UNORDERED_FLAG$1,customizer,stack):result)){return false}}}return true}function isStrictComparable(value){return value===value&&!isObject(value)}function getMatchData(object){var result=keys(object),length=result.length;while(length--){var key=result[length],value=object[key];result[length]=[key,value,isStrictComparable(value)]}return result}function matchesStrictComparable(key,srcValue){return function(object){if(object==null){return false}return object[key]===srcValue&&(srcValue!==void 0||key in Object(object))}}function baseMatches(source){var matchData=getMatchData(source);if(matchData.length==1&&matchData[0][2]){return matchesStrictComparable(matchData[0][0],matchData[0][1])}return function(object){return object===source||baseIsMatch(object,source,matchData)}}function baseHasIn(object,key){return object!=null&&key in Object(object)}function hasPath(object,path,hasFunc){path=castPath(path,object);var index=-1,length=path.length,result=false;while(++index<length){var key=toKey(path[index]);if(!(result=object!=null&&hasFunc(object,key))){break}object=object[key]}if(result||++index!=length){return result}length=object==null?0:object.length;return!!length&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object))}function hasIn(object,path){return object!=null&&hasPath(object,path,baseHasIn)}var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty(path,srcValue){if(isKey(path)&&isStrictComparable(srcValue)){return matchesStrictComparable(toKey(path),srcValue)}return function(object){var objValue=get(object,path);return objValue===void 0&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}function baseProperty(key){return function(object){return object==null?void 0:object[key]}}function basePropertyDeep(path){return function(object){return baseGet(object,path)}}function property(path){return isKey(path)?baseProperty(toKey(path)):basePropertyDeep(path)}function baseIteratee(value){if(typeof value=="function"){return value}if(value==null){return identity}if(typeof value=="object"){return isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value)}return property(value)}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;while(length--){var key=props[++index];if(iteratee(iterable[key],key,iterable)===false){break}}return object}}var baseFor=createBaseFor();function baseForOwn(object,iteratee){return object&&baseFor(object,iteratee,keys)}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){if(collection==null){return collection}if(!isArrayLike(collection)){return eachFunc(collection,iteratee)}var length=collection.length,index=-1,iterable=Object(collection);while(++index<length){if(iteratee(iterable[index],index,iterable)===false){break}}return collection}}var baseEach=createBaseEach(baseForOwn);var now=function(){return root.Date.now()};var FUNC_ERROR_TEXT$1="Expected a function";var nativeMax$1=Math.max,nativeMin=Math.min;function debounce$2(func,wait,options){var lastArgs,lastThis,maxWait,result,timerId,lastCallTime,lastInvokeTime=0,leading=false,maxing=false,trailing=true;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT$1)}wait=toNumber(wait)||0;if(isObject(options)){leading=!!options.leading;maxing="maxWait"in options;maxWait=maxing?nativeMax$1(toNumber(options.maxWait)||0,wait):maxWait;trailing="trailing"in options?!!options.trailing:trailing}function invokeFunc(time){var args=lastArgs,thisArg=lastThis;lastArgs=lastThis=void 0;lastInvokeTime=time;result=func.apply(thisArg,args);return result}function leadingEdge(time){lastInvokeTime=time;timerId=setTimeout(timerExpired,wait);return leading?invokeFunc(time):result}function remainingWait(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime,timeWaiting=wait-timeSinceLastCall;return maxing?nativeMin(timeWaiting,maxWait-timeSinceLastInvoke):timeWaiting}function shouldInvoke(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime;return lastCallTime===void 0||timeSinceLastCall>=wait||timeSinceLastCall<0||maxing&&timeSinceLastInvoke>=maxWait}function timerExpired(){var time=now();if(shouldInvoke(time)){return trailingEdge(time)}timerId=setTimeout(timerExpired,remainingWait(time))}function trailingEdge(time){timerId=void 0;if(trailing&&lastArgs){return invokeFunc(time)}lastArgs=lastThis=void 0;return result}function cancel(){if(timerId!==void 0){clearTimeout(timerId)}lastInvokeTime=0;lastArgs=lastCallTime=lastThis=timerId=void 0}function flush(){return timerId===void 0?result:trailingEdge(now())}function debounced(){var time=now(),isInvoking=shouldInvoke(time);lastArgs=arguments;lastThis=this;lastCallTime=time;if(isInvoking){if(timerId===void 0){return leadingEdge(lastCallTime)}if(maxing){clearTimeout(timerId);timerId=setTimeout(timerExpired,wait);return invokeFunc(lastCallTime)}}if(timerId===void 0){timerId=setTimeout(timerExpired,wait)}return result}debounced.cancel=cancel;debounced.flush=flush;return debounced}function assignMergeValue(object,key,value){if(value!==void 0&&!eq(object[key],value)||value===void 0&&!(key in object)){baseAssignValue(object,key,value)}}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}function safeGet(object,key){if(key==="constructor"&&typeof object[key]==="function"){return}if(key=="__proto__"){return}return object[key]}function toPlainObject(value){return copyObject(value,keysIn(value))}function baseMergeDeep(object,source,key,srcIndex,mergeFunc,customizer,stack){var objValue=safeGet(object,key),srcValue=safeGet(source,key),stacked=stack.get(srcValue);if(stacked){assignMergeValue(object,key,stacked);return}var newValue=customizer?customizer(objValue,srcValue,key+"",object,source,stack):void 0;var isCommon=newValue===void 0;if(isCommon){var isArr=isArray(srcValue),isBuff=!isArr&&isBuffer(srcValue),isTyped=!isArr&&!isBuff&&isTypedArray(srcValue);newValue=srcValue;if(isArr||isBuff||isTyped){if(isArray(objValue)){newValue=objValue}else if(isArrayLikeObject(objValue)){newValue=copyArray(objValue)}else if(isBuff){isCommon=false;newValue=cloneBuffer(srcValue,true)}else if(isTyped){isCommon=false;newValue=cloneTypedArray(srcValue,true)}else{newValue=[]}}else if(isPlainObject(srcValue)||isArguments(srcValue)){newValue=objValue;if(isArguments(objValue)){newValue=toPlainObject(objValue)}else if(!isObject(objValue)||isFunction(objValue)){newValue=initCloneObject(srcValue)}}else{isCommon=false}}if(isCommon){stack.set(srcValue,newValue);mergeFunc(newValue,srcValue,srcIndex,customizer,stack);stack["delete"](srcValue)}assignMergeValue(object,key,newValue)}function baseMerge(object,source,srcIndex,customizer,stack){if(object===source){return}baseFor(source,(function(srcValue,key){stack||(stack=new Stack);if(isObject(srcValue)){baseMergeDeep(object,source,key,srcIndex,baseMerge,customizer,stack)}else{var newValue=customizer?customizer(safeGet(object,key),srcValue,key+"",object,source,stack):void 0;if(newValue===void 0){newValue=srcValue}assignMergeValue(object,key,newValue)}}),keysIn)}function last(array){var length=array==null?0:array.length;return length?array[length-1]:void 0}function baseFilter(collection,predicate){var result=[];baseEach(collection,(function(value,index,collection2){if(predicate(value,index,collection2)){result.push(value)}}));return result}function filter(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,baseIteratee(predicate))}function createFind(findIndexFunc){return function(collection,predicate,fromIndex){var iterable=Object(collection);if(!isArrayLike(collection)){var iteratee=baseIteratee(predicate);collection=keys(collection);predicate=function(key){return iteratee(iterable[key],key,iterable)}}var index=findIndexFunc(collection,predicate,fromIndex);return index>-1?iterable[iteratee?collection[index]:index]:void 0}}var nativeMax=Math.max;function findIndex(array,predicate,fromIndex){var length=array==null?0:array.length;if(!length){return-1}var index=fromIndex==null?0:toInteger(fromIndex);if(index<0){index=nativeMax(length+index,0)}return baseFindIndex(array,baseIteratee(predicate),index)}var find=createFind(findIndex);function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];baseEach(collection,(function(value,key,collection2){result[++index]=iteratee(value,key,collection2)}));return result}function map(collection,iteratee){var func=isArray(collection)?arrayMap:baseMap;return func(collection,baseIteratee(iteratee))}var stringTag="[object String]";function isString(value){return typeof value=="string"||!isArray(value)&&isObjectLike(value)&&baseGetTag(value)==stringTag}function parent(object,path){return path.length<2?object:baseGet(object,baseSlice(path,0,-1))}var mapTag="[object Map]",setTag="[object Set]";var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function isEmpty(value){if(value==null){return true}if(isArrayLike(value)&&(isArray(value)||typeof value=="string"||typeof value.splice=="function"||isBuffer(value)||isTypedArray(value)||isArguments(value))){return!value.length}var tag=getTag(value);if(tag==mapTag||tag==setTag){return!value.size}if(isPrototype(value)){return!baseKeys(value).length}for(var key in value){if(hasOwnProperty.call(value,key)){return false}}return true}var merge=createAssigner((function(object,source,srcIndex){baseMerge(object,source,srcIndex)}));var FUNC_ERROR_TEXT="Expected a function";function negate(predicate){if(typeof predicate!="function"){throw new TypeError(FUNC_ERROR_TEXT)}return function(){var args=arguments;switch(args.length){case 0:return!predicate.call(this);case 1:return!predicate.call(this,args[0]);case 2:return!predicate.call(this,args[0],args[1]);case 3:return!predicate.call(this,args[0],args[1],args[2])}return!predicate.apply(this,args)}}function baseUnset(object,path){path=castPath(path,object);object=parent(object,path);return object==null||delete object[toKey(last(path))]}function customOmitClone(value){return isPlainObject(value)?void 0:value}var CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4;var omit=flatRest((function(object,paths){var result={};if(object==null){return result}var isDeep=false;paths=arrayMap(paths,(function(path){path=castPath(path,object);isDeep||(isDeep=path.length>1);return path}));copyObject(object,getAllKeysIn(object),result);if(isDeep){result=baseClone(result,CLONE_DEEP_FLAG|CLONE_FLAT_FLAG|CLONE_SYMBOLS_FLAG,customOmitClone)}var length=paths.length;while(length--){baseUnset(result,paths[length])}return result}));function baseSet(object,path,value,customizer){if(!isObject(object)){return object}path=castPath(path,object);var index=-1,length=path.length,lastIndex=length-1,nested=object;while(nested!=null&&++index<length){var key=toKey(path[index]),newValue=value;if(key==="__proto__"||key==="constructor"||key==="prototype"){return object}if(index!=lastIndex){var objValue=nested[key];newValue=void 0;if(newValue===void 0){newValue=isObject(objValue)?objValue:isIndex(path[index+1])?[]:{}}}assignValue(nested,key,newValue);nested=nested[key]}return object}function basePickBy(object,paths,predicate){var index=-1,length=paths.length,result={};while(++index<length){var path=paths[index],value=baseGet(object,path);if(predicate(value,path)){baseSet(result,castPath(path,object),value)}}return result}function pickBy(object,predicate){if(object==null){return{}}var props=arrayMap(getAllKeysIn(object),(function(prop){return[prop]}));predicate=baseIteratee(predicate);return basePickBy(object,props,(function(value,path){return predicate(value,path[0])}))}function omitBy(object,predicate){return pickBy(object,negate(baseIteratee(predicate)))}var WRAP_PARTIAL_FLAG=32;var partial=baseRest((function(func,partials){var holders=replaceHolders(partials,getHolder(partial));return createWrap(func,WRAP_PARTIAL_FLAG,void 0,partials,holders)}));partial.placeholder={};var idCounter=0;function uniqueId(prefix){var id=++idCounter;return toString(prefix)+id}class ElementObserver{constructor(matchDelegate,target=document){this.matchDelegate=matchDelegate;this.target=target}get mutationObserver(){return this._mutationObserver=this._mutationObserver||new MutationObserver((mutationList=>this.processMutationList(mutationList)))}start(){this.mutationObserver.observe(this.target,{attributes:true,childList:true,subtree:true});this.catchup()}stop(){this.mutationObserverdisconnect()}catchup(){this.handleAdditions(this.matchDelegate.matches(this.target))}processMutationList(mutationList){for(const mutation of mutationList){if(mutation.type=="attributes"){this.processAttributeChange(mutation.target)}else if(mutation.type=="childList"){this.processRemovedNodes(Array.from(mutation.removedNodes));this.processAddedNodes(Array.from(mutation.addedNodes))}}}processAttributeChange(node){if(node.nodeType!==Node.ELEMENT_NODE)return;const matches=this.matchDelegate.matches(node);if(matches.length===0)return this.matchDelegate.removeMatch(node);this.handleAdditions(matches)}processRemovedNodes(nodes){for(const node of nodes){if(node.nodeType!==Node.ELEMENT_NODE)continue;this.handleRemovals(this.matchDelegate.matches(node))}}processAddedNodes(nodes){for(const node of nodes){if(node.nodeType!==Node.ELEMENT_NODE)continue;this.handleAdditions(this.matchDelegate.matches(node))}}handleRemovals(elements){for(const element of elements)this.matchDelegate.removeMatch(element)}handleAdditions(elements){for(const element of elements)this.matchDelegate.addMatch(element)}}class PbEnhancedElement{constructor(element){this.element=element}static get elements(){return this._elements=this._elements||new Map}static get observer(){return this._observer=this._observer||new ElementObserver(this)}static get selector(){console.warn("Define a static property for selector or redefine the matches function in a subclass.",this);return null}static matches(node){if(!this.selector)return[];const matches=[];if(node.nodeType===Node.ELEMENT_NODE&&node.matches(this.selector))matches.push(node);matches.push(...node.querySelectorAll(this.selector));return matches}static addMatch(element){if(element._pbEnhanced||this.elements.has(element))return;const enhansedElement=new this(element);enhansedElement.connect();this.elements.set(element,enhansedElement);element._pbEnhanced=enhansedElement}static removeMatch(element){if(!this.elements.has(element))return;const enhansedElement=this.elements.get(element);enhansedElement.disconnect();this.elements.delete(element)}static start(){this.observer.start()}static stop(){this.mutationObserver.stop()}connect(){console.warn("Redefine the connect function in a subclass.",this)}disconnect(){}}class PbTable extends PbEnhancedElement{static get selector(){return".table-responsive-collapse"}connect(){const tables=document.querySelectorAll(".table-responsive-collapse");[].forEach.call(tables,(table=>{const headers=[];[].forEach.call(table.querySelectorAll("th"),(header=>{const colSpan=header.colSpan;for(let i=0;i<colSpan;i++){headers.push(header.textContent.replace(/\r?\n|\r/,""))}}));[].forEach.call(table.querySelectorAll("tbody tr"),(row=>{[].forEach.call(row.cells,((cell,headerIndex)=>{cell.setAttribute("data-title",headers[headerIndex])}))}))}))}}const windows="#003DB2";const siding="#6000AC";const doors="#B85C00";const solar="#007E8F";const roofing="#760B24";const gutters="#008540";const insulation="#96006C";const product_1_background="#003DB2";const product_1_highlight="#0057FF";const product_2_background="#6000AC";const product_2_highlight="#8200E9";const product_3_background="#B85C00";const product_3_highlight="#CE7500";const product_4_background="#007E8F";const product_4_highlight="#00B9D2";const product_5_background="#760B24";const product_5_highlight="#B8032E";const product_6_background="#008540";const product_6_highlight="#00A851";const product_7_background="#96006C";const product_7_highlight="#CD0094";const product_8_background="#144075";const product_8_highlight="#1A569E";const product_9_background="#fcc419";const product_9_highlight="#ffd43b";const product_10_background="#20c997";const product_10_highlight="#38d9a9";const success="#1CA05C";const success_secondary="#24cb75";const success_sm="#157F48";const success_subtle="rgba(28, 160, 92, 0.1)";const warning="#F9BB00";const warning_secondary="#ffcb2d";const warning_subtle="rgba(249, 187, 0, 0.1)";const error="#DA0014";const error_secondary="#ff0e24";const error_subtle="rgba(218, 0, 20, 0.1)";const info="#00C4D7";const info_secondary="#0be9ff";const info_subtle="rgba(0, 196, 215, 0.1)";const neutral="#C1CDD6";const neutral_secondary="#e0e6ea";const neutral_subtle="rgba(193, 205, 214, 0.1)";const primary="#0056CF";const primary_secondary="#036cff";const data_1="#0056CF";const data_2="#F9BB00";const data_3="#9E64E9";const data_4="#1CA05C";const data_5="#FD804C";const data_6="#144075";const data_7="#00C4D7";const data_8="#DA0014";const shadow="rgba(60, 106, 172, 0.2)";const shadow_dark="#0a0527";const royal="#0056CF";const purple="#9E64E9";const teal="#00C4D7";const red="#DA0014";const yellow="#F9BB00";const green="#1CA05C";const orange="#FD804C";const white="#FFFFFF";const silver="#F3F7FB";const slate="#C1CDD6";const charcoal="#242B42";const black="#000000";const secondary="#F9BB00";const tertiary="#9E64E9";const bg_light="#F3F7FB";const bg_dark="#0a0527";const bg_dark_card="#231E3D";const card_light="#FFFFFF";const card_dark="#231e3d";const active_light="#f7fbff";const active_dark="#0082ff";const primary_action="#0056CF";const primary_action_dark="#0082ff";const hover_light="#e0eaf5";const hover_dark="rgba(255, 255, 255, 0.2)";const border_light="#E4E8F0";const border_dark="#3b3752";const text_lt_default="#242B42";const text_lt_light="#687887";const text_lt_lighter="#C1CDD6";const text_dk_default="#FFFFFF";const text_dk_light="rgba(255, 255, 255, 0.6)";const text_dk_lighter="rgba(255, 255, 255, 0.4)";const category_1="#0056CF";const category_2="#0CD2E5";const category_3="#F9BB00";const category_4="#14D595";const category_5="#A057FF";const category_6="#FF7034";const category_7="#97DA22";const category_8="#EA599F";const category_9="#0091FF";const category_10="#5027E4";const category_11="#DA0014";const category_12="#109922";const category_13="#058F9D";const category_14="#A33E6F";const category_15="#B2171C";const category_16="#0A5C49";const category_17="#325B91";const category_18="#BE4714";const category_19="#000080";const category_20="#5C0E0A";const category_21="#040830";const gradient_start="#1C75F2";const gradient_end="#0056CF";const colors={windows:windows,siding:siding,doors:doors,solar:solar,roofing:roofing,gutters:gutters,insulation:insulation,product_1_background:product_1_background,product_1_highlight:product_1_highlight,product_2_background:product_2_background,product_2_highlight:product_2_highlight,product_3_background:product_3_background,product_3_highlight:product_3_highlight,product_4_background:product_4_background,product_4_highlight:product_4_highlight,product_5_background:product_5_background,product_5_highlight:product_5_highlight,product_6_background:product_6_background,product_6_highlight:product_6_highlight,product_7_background:product_7_background,product_7_highlight:product_7_highlight,product_8_background:product_8_background,product_8_highlight:product_8_highlight,product_9_background:product_9_background,product_9_highlight:product_9_highlight,product_10_background:product_10_background,product_10_highlight:product_10_highlight,success:success,success_secondary:success_secondary,success_sm:success_sm,success_subtle:success_subtle,warning:warning,warning_secondary:warning_secondary,warning_subtle:warning_subtle,error:error,error_secondary:error_secondary,error_subtle:error_subtle,info:info,info_secondary:info_secondary,info_subtle:info_subtle,neutral:neutral,neutral_secondary:neutral_secondary,neutral_subtle:neutral_subtle,primary:primary,primary_secondary:primary_secondary,data_1:data_1,data_2:data_2,data_3:data_3,data_4:data_4,data_5:data_5,data_6:data_6,data_7:data_7,data_8:data_8,shadow:shadow,shadow_dark:shadow_dark,royal:royal,purple:purple,teal:teal,red:red,yellow:yellow,green:green,orange:orange,default:"#93a8b8",white:white,silver:silver,slate:slate,charcoal:charcoal,black:black,secondary:secondary,tertiary:tertiary,bg_light:bg_light,bg_dark:bg_dark,bg_dark_card:bg_dark_card,card_light:card_light,card_dark:card_dark,active_light:active_light,active_dark:active_dark,primary_action:primary_action,primary_action_dark:primary_action_dark,hover_light:hover_light,hover_dark:hover_dark,border_light:border_light,border_dark:border_dark,text_lt_default:text_lt_default,text_lt_light:text_lt_light,text_lt_lighter:text_lt_lighter,text_dk_default:text_dk_default,text_dk_light:text_dk_light,text_dk_lighter:text_dk_lighter,category_1:category_1,category_2:category_2,category_3:category_3,category_4:category_4,category_5:category_5,category_6:category_6,category_7:category_7,category_8:category_8,category_9:category_9,category_10:category_10,category_11:category_11,category_12:category_12,category_13:category_13,category_14:category_14,category_15:category_15,category_16:category_16,category_17:category_17,category_18:category_18,category_19:category_19,category_20:category_20,category_21:category_21,gradient_start:gradient_start,gradient_end:gradient_end};const font_family_base='"Power Centra", "Helvetica Neue", Helvetica, Arial, sans_serif';const text_jumbo="36px";const text_largest="32px";const text_larger="27px";const text_large="20px";const text_base="15.5px";const text_default="15.5px";const text_normal="15.5px";const text_medium="15.5px";const text_small="14px";const text_smaller="12px";const text_smallest="11px";const heading_1="44px";const heading_2="32px";const heading_3="27px";const heading_4="15.5px";const lighter="300";const light="300";const bold="700";const regular="400";const typography={font_family_base:font_family_base,text_jumbo:text_jumbo,text_largest:text_largest,text_larger:text_larger,text_large:text_large,text_base:text_base,text_default:text_default,text_normal:text_normal,text_medium:text_medium,text_small:text_small,text_smaller:text_smaller,text_smallest:text_smallest,heading_1:heading_1,heading_2:heading_2,heading_3:heading_3,heading_4:heading_4,lighter:lighter,light:light,bold:bold,regular:regular};const highchartsTheme={lang:{thousandsSep:","},colors:[colors.data_1,colors.data_2,colors.data_3,colors.data_4,colors.data_5,colors.data_6,colors.data_7],chart:{borderWidth:0,borderRadius:0,plotBackgroundColor:void 0,plotShadow:false,plotBorderWidth:0},title:{style:{color:colors.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.bold,fontSize:typography.heading_3}},subtitle:{style:{fontFamily:typography.font_family_base,color:colors.text_lt_light,fontWeight:typography.regular,fontSize:typography.text_base}},xAxis:{gridLineWidth:0,lineColor:colors.border_light,tickColor:colors.border_light,labels:{style:{fontFamily:typography.font_family_base,color:colors.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}},title:{style:{color:colors.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.regular,fontSize:typography.heading_4}}},yAxis:{alternateGridColor:void 0,minorTickInterval:null,gridLineColor:colors.border_light,minorGridLineColor:colors.border_light,lineWidth:0,tickWidth:0,labels:{style:{fontFamily:typography.font_family_base,color:colors.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}},title:{style:{fontFamily:typography.font_family_base,color:colors.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}}},legend:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemStyle:{fontFamily:typography.font_family_base,color:colors.text_lt_light,fontWeight:typography.regular,fontSize:typography.text_smaller},itemHoverStyle:{color:colors.text_lt_default},itemHiddenStyle:{color:colors.text_lt_lighter}},tooltip:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,colors.bg_dark],[1,colors.bg_dark]]},shadow:false,borderWidth:0,borderRadius:10,style:{fontFamily:typography.font_family_base,color:colors.text_dk_default,fontWeight:typography.regular,fontSize:typography.text_smaller}},pane:{background:{borderColor:colors.border_light}},plotOptions:{series:{threshold:null},pie:{colors:[colors.data_1,colors.data_2,colors.data_3,colors.data_4,colors.data_5,colors.data_6,colors.data_7],dataLabels:{style:{fontFamily:typography.font_family_base,fontSize:typography.text_smaller,color:colors.text_lt_light,fontWeight:typography.regular,textOutline:"2px $white"}}},line:{dataLabels:{color:"#CCC"},marker:{lineColor:"#333"}},treemap:{layoutAlgorithm:"squarified",allowTraversingTree:false,animationLimit:1e3,colors:[colors.data_1,colors.data_2,colors.data_3,colors.data_4,colors.data_5,colors.data_6,colors.data_7,colors.data_8],dataLabels:{enabled:true,style:{fontFamily:typography.font_family_base,fontWeight:typography.bold,fontSize:typography.heading_4}},levels:[{level:1,dataLabels:{enabled:false}}],traverseUpButton:{position:{y:-50}}}},credits:{enabled:false}};const highchartsDarkTheme={lang:{thousandsSep:","},colors:[colors.data_1,colors.data_2,colors.data_3,colors.data_4,colors.data_5,colors.data_6,colors.data_7],chart:{borderWidth:0,borderRadius:0,plotBackgroundColor:void 0,plotShadow:false,plotBorderWidth:0},title:{style:{color:colors.text_dk_default,fontFamily:typography.font_family_base,fontWeight:typography.bold,fontSize:typography.heading_3}},subtitle:{style:{fontFamily:typography.font_family_base,color:colors.text_dk_light,fontWeight:typography.regular,fontSize:typography.text_base}},xAxis:{gridLineWidth:0,lineColor:colors.border_dark,tickColor:colors.border_dark,labels:{style:{fontFamily:typography.font_family_base,color:colors.text_dk_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}},title:{style:{color:colors.text_dk_default,fontFamily:typography.font_family_base,fontWeight:typography.regular,fontSize:typography.heading_4}}},yAxis:{alternateGridColor:void 0,minorTickInterval:null,gridLineColor:colors.border_dark,minorGridLineColor:colors.border_dark,lineWidth:0,tickWidth:0,labels:{style:{fontFamily:typography.font_family_base,color:colors.text_dk_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}},title:{style:{fontFamily:typography.font_family_base,color:colors.text_dk_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}}},legend:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemStyle:{fontFamily:typography.font_family_base,color:colors.text_dk_light,fontWeight:typography.regular,fontSize:typography.text_smaller},itemHoverStyle:{color:colors.text_dk_default},itemHiddenStyle:{color:colors.text_dk_lighter}},tooltip:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,colors.card_light],[1,colors.card_light]]},shadow:false,borderWidth:0,borderRadius:10,style:{fontFamily:typography.font_family_base,color:colors.text_lt_default,fontWeight:typography.regular,fontSize:typography.text_smaller}},pane:{background:{borderColor:colors.border_dark}},plotOptions:{series:{borderColor:colors.bg_dark_card,borderWidth:2,threshold:null},pie:{colors:[colors.data_1,colors.data_2,colors.data_3,colors.data_4,colors.data_5,colors.data_6,colors.data_7],dataLabels:{style:{fontFamily:typography.font_family_base,fontSize:typography.text_smaller,color:colors.text_dk_light,fontWeight:typography.regular}}},line:{dataLabels:{color:colors.text_dk_light},marker:{lineColor:colors.border_dark}},treemap:{layoutAlgorithm:"squarified",allowTraversingTree:false,animationLimit:1e3,colors:[colors.data_1,colors.data_2,colors.data_3,colors.data_4,colors.data_5,colors.data_6,colors.data_7,colors.data_8],dataLabels:{enabled:true,style:{fontFamily:typography.font_family_base,fontWeight:typography.bold,fontSize:typography.heading_4}},levels:[{level:1,dataLabels:{enabled:false}}],traverseUpButton:{position:{y:-50}}}},credits:{enabled:false}};const useCollapsible=(initial=true)=>{const[collapsed,setCollapsed]=useState(initial);const toggle=()=>setCollapsed((prev=>!prev));return[collapsed,toggle,setCollapsed]};const ABBR_DAYS=["SU","M","T","W","TH","F","S"];const days=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];const months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];const formatDate=newDate=>{const isTimelessStringDate=typeof newDate==="string"&&!newDate.includes("T");if(isTimelessStringDate){const unhyphenatedDate=new Date(newDate.replace(/-/g,"/"));return unhyphenatedDate}return new Date(newDate)};const toMinute=(newDate,timeZone)=>{const date=formatDate(newDate);if(timeZone){return date.toLocaleTimeString("en-US",{timeZone:timeZone,hour:"2-digit",minute:"2-digit"}).slice(3,5)}else{return date.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}).slice(3,5)}};const toHour=(newDate,timeZone)=>{const date=formatDate(newDate);if(timeZone){return date.toLocaleTimeString("en-US",{timeZone:timeZone,hour:"numeric"}).split(" ")[0]}else{return date.toLocaleTimeString("en-US",{hour:"numeric"}).split(" ")[0]}};const toDay=(newDate,timeZone)=>{if(timeZone){const date=new Date(formatDate(newDate).toLocaleString("en-US",{timeZone:timeZone}));return date.getDate()}else{const date=formatDate(newDate);return date.getDate()}};const toDayAbbr=newDate=>{const date=formatDate(newDate);return ABBR_DAYS[date.getDay()]};const toWeekday=newDate=>{const date=formatDate(newDate);return days[date.getDay()]};const toMonth=(newDate,timeZone)=>{if(timeZone){const date=new Date(formatDate(newDate).toLocaleString("en-US",{timeZone:timeZone}));return months[date.getMonth()]}else{const date=formatDate(newDate);return months[date.getMonth()]}};const toMonthNum=newDate=>{const date=formatDate(newDate);return date.getMonth()+1};const toYear=(newDate,timeZone)=>{if(timeZone){const date=new Date(formatDate(newDate).toLocaleString("en-US",{timeZone:timeZone}));return date.getFullYear()}else{const date=formatDate(newDate);return date.getFullYear()}};const toTime=(newDate,timeZone)=>{const date=formatDate(newDate);if(timeZone){return date.toLocaleTimeString("en-US",{timeZone:timeZone,timeStyle:"short"}).split(" ")[0]}else{return date.toLocaleTimeString("en-US",{timeStyle:"short"}).split(" ")[0]}};const toMeridiem=(newDate,timeZone)=>{const date=formatDate(newDate);if(timeZone){return date.toLocaleString("en-US",{timeZone:timeZone,hour12:true}).slice(-2).charAt(0).toLocaleLowerCase()}else{return date.toLocaleString("en-US",{hour12:true}).slice(-2).charAt(0).toLocaleLowerCase()}};const toTimeZone=(newDate,timeZone)=>{const date=formatDate(newDate);if(timeZone){return date.toLocaleString("en-US",{timeZone:timeZone,timeZoneName:"short"}).split(" ")[3]}else{return date.toLocaleString("en-US",{timeZoneName:"short"}).split(" ")[3]}};const toTimeWithMeridiem=(newDate,timeZone)=>{const date=formatDate(newDate);return`${toTime(date,timeZone)}${toMeridiem(date,timeZone)}`};const toIso=newDate=>{const date=formatDate(newDate);return date.toISOString()};const fromNow=newDate=>{const today=new Date;const formattedDate=formatDate(newDate);const startDate=formattedDate.getTime();const endDate=today.getTime();const elapsedTime=endDate-startDate;const differenceInYears=today.getFullYear()-formattedDate.getFullYear();const differenceInMonths=()=>{let months2=differenceInYears*12;months2-=formattedDate.getMonth();months2+=today.getMonth();return months2};const FORTY_FIVE_SECONDS=45e3;const NINETY_SECONDS=9e4;const FORTY_FIVE_MINUTES=267e4;const NINETY_MINUTES=54e5;const TWENTY_TWO_HOURS=774e5;const THIRTY_SIX_HOURS=1296e5;const TWENTY_SIX_DAYS=22032e5;const FORTY_FIVE_DAYS=3888e6;const TEN_AND_A_HALF_MONTHS=2756e7;const MILLISECONDS_IN_A_MINUTE=6e4;const MILLISECONDS_IN_A_HOUR=36e5;const MILLISECONDS_IN_A_DAY=864e5;let elapsedTimeString=differenceInYears===1?`${differenceInYears} year ago`:`${differenceInYears} years ago`;const intervals=[{min:0,max:FORTY_FIVE_SECONDS,value:"a few seconds ago"},{min:FORTY_FIVE_SECONDS,max:NINETY_SECONDS,value:"a minute ago"},{min:NINETY_SECONDS,max:FORTY_FIVE_MINUTES,value:`${Math.round(elapsedTime/MILLISECONDS_IN_A_MINUTE)} minutes ago`},{min:FORTY_FIVE_MINUTES,max:NINETY_MINUTES,value:"an hour ago"},{min:NINETY_MINUTES,max:TWENTY_TWO_HOURS,value:`${Math.round(elapsedTime/MILLISECONDS_IN_A_HOUR)} hours ago`},{min:TWENTY_TWO_HOURS,max:THIRTY_SIX_HOURS,value:"a day ago"},{min:THIRTY_SIX_HOURS,max:TWENTY_SIX_DAYS,value:`${Math.round(elapsedTime/MILLISECONDS_IN_A_DAY)} days ago`},{min:TWENTY_SIX_DAYS,max:FORTY_FIVE_DAYS,value:"a month ago"},{min:FORTY_FIVE_DAYS,max:TEN_AND_A_HALF_MONTHS,value:`${differenceInMonths()} months ago`}];for(const interval of intervals){const{min:min2,max:max2,value:value}=interval;if(elapsedTime>=min2&&elapsedTime<max2){elapsedTimeString=value;break}}return elapsedTimeString};const toCustomFormat=(newDate,format="month_day")=>{const date=formatDate(newDate);if(format=="month_day"){return`${toMonthNum(date)}/${toDay(date)}`}else{return`${date.toLocaleString("en-US",{month:"short"})} ${toDay(date)}`}};const getYesterdayDate=newDate=>{const today=formatDate(newDate);const yesterday=new Date;yesterday.setDate(today.getDate()-1);return yesterday};const getFirstDayOfWeek=newDate=>{const today=formatDate(newDate);const dayOfWeek=today.getDay();const firstDayOfWeek=new Date(today.setHours(0,0,0));const isSunday=dayOfWeek===0;const daysToSubtract=isSunday?6:dayOfWeek-1;firstDayOfWeek.setDate(today.getDate()-daysToSubtract);return firstDayOfWeek};const getLastDayOfWeek=newDate=>{const today=formatDate(newDate);const dayOfWeek=today.getDay();const lastDayOfWeek=new Date(today.setHours(23,59,59,0));const isSunday=dayOfWeek===0;const daysToAdd=isSunday?0:7-dayOfWeek;lastDayOfWeek.setDate(today.getDate()+daysToAdd);return lastDayOfWeek};const getPreviousWeekStartDate=newDate=>{const firstDayOfWeek=getFirstDayOfWeek(newDate);const firstDayOfPreviousWeek=new Date(firstDayOfWeek.getFullYear(),firstDayOfWeek.getMonth(),firstDayOfWeek.getDate()-7);return firstDayOfPreviousWeek};const getPreviousWeekEndDate=newDate=>{const lastDayOfWeek=getLastDayOfWeek(newDate);const lastDayOfPreviousWeek=new Date(lastDayOfWeek.getFullYear(),lastDayOfWeek.getMonth(),lastDayOfWeek.getDate()-7,lastDayOfWeek.getHours(),lastDayOfWeek.getMinutes(),lastDayOfWeek.getSeconds());return lastDayOfPreviousWeek};const getMonthStartDate=newDate=>{const date=formatDate(newDate);const firstDayOfMonth=new Date(date.getFullYear(),date.getMonth(),1);return firstDayOfMonth};const getMonthEndDate=newDate=>{const date=formatDate(newDate);const lastDayOfMonth=new Date(date.getFullYear(),date.getMonth()+1,0,23,59,59);return lastDayOfMonth};const getPreviousMonthStartDate=newDate=>{const firstDayOfMonth=getMonthStartDate(newDate);const firstDayOfPreviousMonth=new Date(firstDayOfMonth.getFullYear(),firstDayOfMonth.getMonth()-1,firstDayOfMonth.getDate());return firstDayOfPreviousMonth};const getPreviousMonthEndDate=newDate=>{const lastDayOfMonth=getMonthEndDate(newDate);const lastDayOfPreviousMonth=new Date(lastDayOfMonth.getFullYear(),lastDayOfMonth.getMonth()-1,lastDayOfMonth.getDate(),lastDayOfMonth.getHours(),lastDayOfMonth.getMinutes(),lastDayOfMonth.getSeconds());return lastDayOfPreviousMonth};const getQuarterStartDate=newDate=>{const date=formatDate(newDate);const quarter=Math.floor(date.getMonth()/3);const startOfQuarter=new Date(date.getFullYear(),quarter*3,1);return startOfQuarter};const getQuarterEndDate=newDate=>{const date=formatDate(newDate);const quarter=Math.floor(date.getMonth()/3);const startOfNextQuarter=new Date(date.getFullYear(),(quarter+1)*3,1);const endOfQuarter=new Date(startOfNextQuarter.getTime()-1);return endOfQuarter};const getPreviousQuarterStartDate=newDate=>{const startOfQuarter=getQuarterStartDate(newDate);const firstDayOfPreviousQuarter=new Date(startOfQuarter.getFullYear(),startOfQuarter.getMonth()-3,startOfQuarter.getDate());return firstDayOfPreviousQuarter};const getPreviousQuarterEndDate=newDate=>{const endOfQuarter=getQuarterEndDate(newDate);const lastDayOfPreviousQuarter=new Date(endOfQuarter.getFullYear(),endOfQuarter.getMonth()-3,endOfQuarter.getDate(),endOfQuarter.getHours(),endOfQuarter.getMinutes(),endOfQuarter.getSeconds());return lastDayOfPreviousQuarter};const getYearStartDate=newDate=>{const date=formatDate(newDate);const startOfYear=new Date(date.getFullYear(),0,1);return startOfYear};const getYearEndDate=newDate=>{const date=formatDate(newDate);const endOfYear=new Date(date.getFullYear(),11,31,23,59,59);return endOfYear};const getPreviousYearStartDate=newDate=>{const startOfYear=getYearStartDate(newDate);const firstDayOfPreviousYear=new Date(startOfYear.getFullYear()-1,startOfYear.getMonth(),startOfYear.getDate());return firstDayOfPreviousYear};const getPreviousYearEndDate=newDate=>{const endOfYear=getYearEndDate(newDate);const lastDayOfPreviousYear=new Date(endOfYear.getFullYear()-1,endOfYear.getMonth(),endOfYear.getDate(),endOfYear.getHours(),endOfYear.getMinutes(),endOfYear.getSeconds());return lastDayOfPreviousYear};const DateTime={toMinute:toMinute,toHour:toHour,toDay:toDay,toDayAbbr:toDayAbbr,toWeekday:toWeekday,toMonth:toMonth,toMonthNum:toMonthNum,toYear:toYear,toTime:toTime,toMeridiem:toMeridiem,toTimeZone:toTimeZone,toTimeWithMeridiem:toTimeWithMeridiem,toIso:toIso,fromNow:fromNow,toCustomFormat:toCustomFormat,getYesterdayDate:getYesterdayDate,getFirstDayOfWeek:getFirstDayOfWeek,getLastDayOfWeek:getLastDayOfWeek,getPreviousWeekStartDate:getPreviousWeekStartDate,getPreviousWeekEndDate:getPreviousWeekEndDate,getMonthStartDate:getMonthStartDate,getMonthEndDate:getMonthEndDate,getPreviousMonthStartDate:getPreviousMonthStartDate,getPreviousMonthEndDate:getPreviousMonthEndDate,getQuarterStartDate:getQuarterStartDate,getQuarterEndDate:getQuarterEndDate,getPreviousQuarterStartDate:getPreviousQuarterStartDate,getPreviousQuarterEndDate:getPreviousQuarterEndDate,getYearStartDate:getYearStartDate,getYearEndDate:getYearEndDate,getPreviousYearStartDate:getPreviousYearStartDate,getPreviousYearEndDate:getPreviousYearEndDate};var HOOKS=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"];var defaults={_disable:[],allowInput:false,allowInvalidPreload:false,altFormat:"F j, Y",altInput:false,altInputClass:"form-control input",animate:typeof window==="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:true,clickOpens:true,closeOnSelect:true,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:false,enableSeconds:false,enableTime:false,errorHandler:function(err){return typeof console!=="undefined"&&console.warn(err)},getWeek:function(givenDate){var date=new Date(givenDate.getTime());date.setHours(0,0,0,0);date.setDate(date.getDate()+3-(date.getDay()+6)%7);var week1=new Date(date.getFullYear(),0,4);return 1+Math.round(((date.getTime()-week1.getTime())/864e5-3+(week1.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:false,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:false,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:false,showMonths:1,static:false,time_24hr:false,weekNumbers:false,wrap:false};var english={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(nth){var s=nth%100;if(s>3&&s<21)return"th";switch(s%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:false};var pad=function(number,length){if(length===void 0){length=2}return("000"+number).slice(length*-1)};var int=function(bool){return bool===true?1:0};function debounce$1(fn2,wait){var t;return function(){var _this=this;var args=arguments;clearTimeout(t);t=setTimeout((function(){return fn2.apply(_this,args)}),wait)}}var arrayify=function(obj){return obj instanceof Array?obj:[obj]};function toggleClass(elem,className,bool){if(bool===true)return elem.classList.add(className);elem.classList.remove(className)}function createElement(tag,className,content){var e=window.document.createElement(tag);className=className||"";content=content||"";e.className=className;if(content!==void 0)e.textContent=content;return e}function clearNode(node){while(node.firstChild)node.removeChild(node.firstChild)}function findParent(node,condition){if(condition(node))return node;else if(node.parentNode)return findParent(node.parentNode,condition);return void 0}function createNumberInput(inputClassName,opts){var wrapper=createElement("div","numInputWrapper"),numInput=createElement("input","numInput "+inputClassName),arrowUp=createElement("span","arrowUp"),arrowDown=createElement("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1){numInput.type="number"}else{numInput.type="text";numInput.pattern="\\d*"}if(opts!==void 0)for(var key in opts)numInput.setAttribute(key,opts[key]);wrapper.appendChild(numInput);wrapper.appendChild(arrowUp);wrapper.appendChild(arrowDown);return wrapper}function getEventTarget(event){try{if(typeof event.composedPath==="function"){var path=event.composedPath();return path[0]}return event.target}catch(error2){return event.target}}var doNothing=function(){return void 0};var monthToStr=function(monthNumber,shorthand,locale){return locale.months[shorthand?"shorthand":"longhand"][monthNumber]};var revFormat={D:doNothing,F:function(dateObj,monthName,locale){dateObj.setMonth(locale.months.longhand.indexOf(monthName))},G:function(dateObj,hour){dateObj.setHours((dateObj.getHours()>=12?12:0)+parseFloat(hour))},H:function(dateObj,hour){dateObj.setHours(parseFloat(hour))},J:function(dateObj,day){dateObj.setDate(parseFloat(day))},K:function(dateObj,amPM,locale){dateObj.setHours(dateObj.getHours()%12+12*int(new RegExp(locale.amPM[1],"i").test(amPM)))},M:function(dateObj,shortMonth,locale){dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth))},S:function(dateObj,seconds){dateObj.setSeconds(parseFloat(seconds))},U:function(_,unixSeconds){return new Date(parseFloat(unixSeconds)*1e3)},W:function(dateObj,weekNum,locale){var weekNumber=parseInt(weekNum);var date=new Date(dateObj.getFullYear(),0,2+(weekNumber-1)*7,0,0,0,0);date.setDate(date.getDate()-date.getDay()+locale.firstDayOfWeek);return date},Y:function(dateObj,year){dateObj.setFullYear(parseFloat(year))},Z:function(_,ISODate){return new Date(ISODate)},d:function(dateObj,day){dateObj.setDate(parseFloat(day))},h:function(dateObj,hour){dateObj.setHours((dateObj.getHours()>=12?12:0)+parseFloat(hour))},i:function(dateObj,minutes){dateObj.setMinutes(parseFloat(minutes))},j:function(dateObj,day){dateObj.setDate(parseFloat(day))},l:doNothing,m:function(dateObj,month){dateObj.setMonth(parseFloat(month)-1)},n:function(dateObj,month){dateObj.setMonth(parseFloat(month)-1)},s:function(dateObj,seconds){dateObj.setSeconds(parseFloat(seconds))},u:function(_,unixMillSeconds){return new Date(parseFloat(unixMillSeconds))},w:doNothing,y:function(dateObj,year){dateObj.setFullYear(2e3+parseFloat(year))}};var tokenRegex={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})"};var formats={Z:function(date){return date.toISOString()},D:function(date,locale,options){return locale.weekdays.shorthand[formats.w(date,locale,options)]},F:function(date,locale,options){return monthToStr(formats.n(date,locale,options)-1,false,locale)},G:function(date,locale,options){return pad(formats.h(date,locale,options))},H:function(date){return pad(date.getHours())},J:function(date,locale){return locale.ordinal!==void 0?date.getDate()+locale.ordinal(date.getDate()):date.getDate()},K:function(date,locale){return locale.amPM[int(date.getHours()>11)]},M:function(date,locale){return monthToStr(date.getMonth(),true,locale)},S:function(date){return pad(date.getSeconds())},U:function(date){return date.getTime()/1e3},W:function(date,_,options){return options.getWeek(date)},Y:function(date){return pad(date.getFullYear(),4)},d:function(date){return pad(date.getDate())},h:function(date){return date.getHours()%12?date.getHours()%12:12},i:function(date){return pad(date.getMinutes())},j:function(date){return date.getDate()},l:function(date,locale){return locale.weekdays.longhand[date.getDay()]},m:function(date){return pad(date.getMonth()+1)},n:function(date){return date.getMonth()+1},s:function(date){return date.getSeconds()},u:function(date){return date.getTime()},w:function(date){return date.getDay()},y:function(date){return String(date.getFullYear()).substring(2)}};var createDateFormatter=function(_a){var _b=_a.config,config=_b===void 0?defaults:_b,_c=_a.l10n,l10n=_c===void 0?english:_c,_d=_a.isMobile,isMobile=_d===void 0?false:_d;return function(dateObj,frmt,overrideLocale){var locale=overrideLocale||l10n;if(config.formatDate!==void 0&&!isMobile){return config.formatDate(dateObj,frmt,locale)}return frmt.split("").map((function(c,i,arr){return formats[c]&&arr[i-1]!=="\\"?formats[c](dateObj,locale,config):c!=="\\"?c:""})).join("")}};var createDateParser=function(_a){var _b=_a.config,config=_b===void 0?defaults:_b,_c=_a.l10n,l10n=_c===void 0?english:_c;return function(date,givenFormat,timeless,customLocale){if(date!==0&&!date)return void 0;var locale=customLocale||l10n;var parsedDate;var dateOrig=date;if(date instanceof Date)parsedDate=new Date(date.getTime());else if(typeof date!=="string"&&date.toFixed!==void 0)parsedDate=new Date(date);else if(typeof date==="string"){var format=givenFormat||(config||defaults).dateFormat;var datestr=String(date).trim();if(datestr==="today"){parsedDate=new Date;timeless=true}else if(config&&config.parseDate){parsedDate=config.parseDate(date,format)}else if(/Z$/.test(datestr)||/GMT$/.test(datestr)){parsedDate=new Date(date)}else{var matched=void 0,ops=[];for(var i=0,matchIndex=0,regexStr="";i<format.length;i++){var token=format[i];var isBackSlash=token==="\\";var escaped=format[i-1]==="\\"||isBackSlash;if(tokenRegex[token]&&!escaped){regexStr+=tokenRegex[token];var match=new RegExp(regexStr).exec(date);if(match&&(matched=true)){ops[token!=="Y"?"push":"unshift"]({fn:revFormat[token],val:match[++matchIndex]})}}else if(!isBackSlash)regexStr+="."}parsedDate=!config||!config.noCalendar?new Date((new Date).getFullYear(),0,1,0,0,0,0):new Date((new Date).setHours(0,0,0,0));ops.forEach((function(_a2){var fn2=_a2.fn,val=_a2.val;return parsedDate=fn2(parsedDate,val,locale)||parsedDate}));parsedDate=matched?parsedDate:void 0}}if(!(parsedDate instanceof Date&&!isNaN(parsedDate.getTime()))){config.errorHandler(new Error("Invalid date provided: "+dateOrig));return void 0}if(timeless===true)parsedDate.setHours(0,0,0,0);return parsedDate}};function compareDates(date1,date2,timeless){if(timeless===void 0){timeless=true}if(timeless!==false){return new Date(date1.getTime()).setHours(0,0,0,0)-new Date(date2.getTime()).setHours(0,0,0,0)}return date1.getTime()-date2.getTime()}var isBetween=function(ts,ts1,ts2){return ts>Math.min(ts1,ts2)&&ts<Math.max(ts1,ts2)};var calculateSecondsSinceMidnight=function(hours,minutes,seconds){return hours*3600+minutes*60+seconds};var parseSeconds=function(secondsSinceMidnight){var hours=Math.floor(secondsSinceMidnight/3600),minutes=(secondsSinceMidnight-hours*3600)/60;return[hours,minutes,secondsSinceMidnight-hours*3600-minutes*60]};var duration={DAY:864e5};function getDefaultHours(config){var hours=config.defaultHour;var minutes=config.defaultMinute;var seconds=config.defaultSeconds;if(config.minDate!==void 0){var minHour=config.minDate.getHours();var minMinutes=config.minDate.getMinutes();var minSeconds=config.minDate.getSeconds();if(hours<minHour){hours=minHour}if(hours===minHour&&minutes<minMinutes){minutes=minMinutes}if(hours===minHour&&minutes===minMinutes&&seconds<minSeconds)seconds=config.minDate.getSeconds()}if(config.maxDate!==void 0){var maxHr=config.maxDate.getHours();var maxMinutes=config.maxDate.getMinutes();hours=Math.min(hours,maxHr);if(hours===maxHr)minutes=Math.min(maxMinutes,minutes);if(hours===maxHr&&minutes===maxMinutes)seconds=config.maxDate.getSeconds()}return{hours:hours,minutes:minutes,seconds:seconds}}if(typeof Object.assign!=="function"){Object.assign=function(target){var args=[];for(var _i=1;_i<arguments.length;_i++){args[_i-1]=arguments[_i]}if(!target){throw TypeError("Cannot convert undefined or null to object")}var _loop_1=function(source2){if(source2){Object.keys(source2).forEach((function(key){return target[key]=source2[key]}))}};for(var _a=0,args_1=args;_a<args_1.length;_a++){var source=args_1[_a];_loop_1(source)}return target}}var __assign=function(){__assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p]}return t};return __assign.apply(this,arguments)};var __spreadArrays=function(){for(var s=0,i=0,il=arguments.length;i<il;i++)s+=arguments[i].length;for(var r=Array(s),k=0,i=0;i<il;i++)for(var a=arguments[i],j=0,jl=a.length;j<jl;j++,k++)r[k]=a[j];return r};var DEBOUNCED_CHANGE_MS=300;function FlatpickrInstance(element,instanceConfig){var self2={config:__assign(__assign({},defaults),flatpickr.defaultConfig),l10n:english};self2.parseDate=createDateParser({config:self2.config,l10n:self2.l10n});self2._handlers=[];self2.pluginElements=[];self2.loadedPlugins=[];self2._bind=bind;self2._setHoursFromDate=setHoursFromDate;self2._positionCalendar=positionCalendar;self2.changeMonth=changeMonth;self2.changeYear=changeYear;self2.clear=clear;self2.close=close;self2.onMouseOver=onMouseOver;self2._createElement=createElement;self2.createDay=createDay;self2.destroy=destroy;self2.isEnabled=isEnabled;self2.jumpToDate=jumpToDate;self2.updateValue=updateValue;self2.open=open;self2.redraw=redraw;self2.set=set;self2.setDate=setDate;self2.toggle=toggle;function setupHelperFunctions(){self2.utils={getDaysInMonth:function(month,yr){if(month===void 0){month=self2.currentMonth}if(yr===void 0){yr=self2.currentYear}if(month===1&&(yr%4===0&&yr%100!==0||yr%400===0))return 29;return self2.l10n.daysInMonth[month]}}}function init(){self2.element=self2.input=element;self2.isOpen=false;parseConfig();setupLocale();setupInputs();setupDates();setupHelperFunctions();if(!self2.isMobile)build();bindEvents();if(self2.selectedDates.length||self2.config.noCalendar){if(self2.config.enableTime){setHoursFromDate(self2.config.noCalendar?self2.latestSelectedDateObj:void 0)}updateValue(false)}setCalendarWidth();var isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);if(!self2.isMobile&&isSafari){positionCalendar()}triggerEvent("onReady")}function getClosestActiveElement(){var _a;return((_a=self2.calendarContainer)===null||_a===void 0?void 0:_a.getRootNode()).activeElement||document.activeElement}function bindToInstance(fn2){return fn2.bind(self2)}function setCalendarWidth(){var config=self2.config;if(config.weekNumbers===false&&config.showMonths===1){return}else if(config.noCalendar!==true){window.requestAnimationFrame((function(){if(self2.calendarContainer!==void 0){self2.calendarContainer.style.visibility="hidden";self2.calendarContainer.style.display="block"}if(self2.daysContainer!==void 0){var daysWidth=(self2.days.offsetWidth+1)*config.showMonths;self2.daysContainer.style.width=daysWidth+"px";self2.calendarContainer.style.width=daysWidth+(self2.weekWrapper!==void 0?self2.weekWrapper.offsetWidth:0)+"px";self2.calendarContainer.style.removeProperty("visibility");self2.calendarContainer.style.removeProperty("display")}}))}}function updateTime(e){if(self2.selectedDates.length===0){var defaultDate=self2.config.minDate===void 0||compareDates(new Date,self2.config.minDate)>=0?new Date:new Date(self2.config.minDate.getTime());var defaults2=getDefaultHours(self2.config);defaultDate.setHours(defaults2.hours,defaults2.minutes,defaults2.seconds,defaultDate.getMilliseconds());self2.selectedDates=[defaultDate];self2.latestSelectedDateObj=defaultDate}if(e!==void 0&&e.type!=="blur"){timeWrapper(e)}var prevValue=self2._input.value;setHoursFromInputs();updateValue();if(self2._input.value!==prevValue){self2._debouncedChange()}}function ampm2military(hour,amPM){return hour%12+12*int(amPM===self2.l10n.amPM[1])}function military2ampm(hour){switch(hour%24){case 0:case 12:return 12;default:return hour%12}}function setHoursFromInputs(){if(self2.hourElement===void 0||self2.minuteElement===void 0)return;var hours=(parseInt(self2.hourElement.value.slice(-2),10)||0)%24,minutes=(parseInt(self2.minuteElement.value,10)||0)%60,seconds=self2.secondElement!==void 0?(parseInt(self2.secondElement.value,10)||0)%60:0;if(self2.amPM!==void 0){hours=ampm2military(hours,self2.amPM.textContent)}var limitMinHours=self2.config.minTime!==void 0||self2.config.minDate&&self2.minDateHasTime&&self2.latestSelectedDateObj&&compareDates(self2.latestSelectedDateObj,self2.config.minDate,true)===0;var limitMaxHours=self2.config.maxTime!==void 0||self2.config.maxDate&&self2.maxDateHasTime&&self2.latestSelectedDateObj&&compareDates(self2.latestSelectedDateObj,self2.config.maxDate,true)===0;if(self2.config.maxTime!==void 0&&self2.config.minTime!==void 0&&self2.config.minTime>self2.config.maxTime){var minBound=calculateSecondsSinceMidnight(self2.config.minTime.getHours(),self2.config.minTime.getMinutes(),self2.config.minTime.getSeconds());var maxBound=calculateSecondsSinceMidnight(self2.config.maxTime.getHours(),self2.config.maxTime.getMinutes(),self2.config.maxTime.getSeconds());var currentTime=calculateSecondsSinceMidnight(hours,minutes,seconds);if(currentTime>maxBound&&currentTime<minBound){var result=parseSeconds(minBound);hours=result[0];minutes=result[1];seconds=result[2]}}else{if(limitMaxHours){var maxTime=self2.config.maxTime!==void 0?self2.config.maxTime:self2.config.maxDate;hours=Math.min(hours,maxTime.getHours());if(hours===maxTime.getHours())minutes=Math.min(minutes,maxTime.getMinutes());if(minutes===maxTime.getMinutes())seconds=Math.min(seconds,maxTime.getSeconds())}if(limitMinHours){var minTime=self2.config.minTime!==void 0?self2.config.minTime:self2.config.minDate;hours=Math.max(hours,minTime.getHours());if(hours===minTime.getHours()&&minutes<minTime.getMinutes())minutes=minTime.getMinutes();if(minutes===minTime.getMinutes())seconds=Math.max(seconds,minTime.getSeconds())}}setHours(hours,minutes,seconds)}function setHoursFromDate(dateObj){var date=dateObj||self2.latestSelectedDateObj;if(date&&date instanceof Date){setHours(date.getHours(),date.getMinutes(),date.getSeconds())}}function setHours(hours,minutes,seconds){if(self2.latestSelectedDateObj!==void 0){self2.latestSelectedDateObj.setHours(hours%24,minutes,seconds||0,0)}if(!self2.hourElement||!self2.minuteElement||self2.isMobile)return;self2.hourElement.value=pad(!self2.config.time_24hr?(12+hours)%12+12*int(hours%12===0):hours);self2.minuteElement.value=pad(minutes);if(self2.amPM!==void 0)self2.amPM.textContent=self2.l10n.amPM[int(hours>=12)];if(self2.secondElement!==void 0)self2.secondElement.value=pad(seconds)}function onYearInput(event){var eventTarget=getEventTarget(event);var year=parseInt(eventTarget.value)+(event.delta||0);if(year/1e3>1||event.key==="Enter"&&!/[^\d]/.test(year.toString())){changeYear(year)}}function bind(element2,event,handler,options){if(event instanceof Array)return event.forEach((function(ev){return bind(element2,ev,handler,options)}));if(element2 instanceof Array)return element2.forEach((function(el){return bind(el,event,handler,options)}));element2.addEventListener(event,handler,options);self2._handlers.push({remove:function(){return element2.removeEventListener(event,handler,options)}})}function triggerChange(){triggerEvent("onChange")}function bindEvents(){if(self2.config.wrap){["open","close","toggle","clear"].forEach((function(evt){Array.prototype.forEach.call(self2.element.querySelectorAll("[data-"+evt+"]"),(function(el){return bind(el,"click",self2[evt])}))}))}if(self2.isMobile){setupMobile();return}var debouncedResize=debounce$1(onResize,50);self2._debouncedChange=debounce$1(triggerChange,DEBOUNCED_CHANGE_MS);if(self2.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent))bind(self2.daysContainer,"mouseover",(function(e){if(self2.config.mode==="range")onMouseOver(getEventTarget(e))}));bind(self2._input,"keydown",onKeyDown);if(self2.calendarContainer!==void 0){bind(self2.calendarContainer,"keydown",onKeyDown)}if(!self2.config.inline&&!self2.config.static)bind(window,"resize",debouncedResize);if(window.ontouchstart!==void 0)bind(window.document,"touchstart",documentClick);else bind(window.document,"mousedown",documentClick);bind(window.document,"focus",documentClick,{capture:true});if(self2.config.clickOpens===true){bind(self2._input,"focus",self2.open);bind(self2._input,"click",self2.open)}if(self2.daysContainer!==void 0){bind(self2.monthNav,"click",onMonthNavClick);bind(self2.monthNav,["keyup","increment"],onYearInput);bind(self2.daysContainer,"click",selectDate)}if(self2.timeContainer!==void 0&&self2.minuteElement!==void 0&&self2.hourElement!==void 0){var selText=function(e){return getEventTarget(e).select()};bind(self2.timeContainer,["increment"],updateTime);bind(self2.timeContainer,"blur",updateTime,{capture:true});bind(self2.timeContainer,"click",timeIncrement);bind([self2.hourElement,self2.minuteElement],["focus","click"],selText);if(self2.secondElement!==void 0)bind(self2.secondElement,"focus",(function(){return self2.secondElement&&self2.secondElement.select()}));if(self2.amPM!==void 0){bind(self2.amPM,"click",(function(e){updateTime(e)}))}}if(self2.config.allowInput){bind(self2._input,"blur",onBlur)}}function jumpToDate(jumpDate,triggerChange2){var jumpTo=jumpDate!==void 0?self2.parseDate(jumpDate):self2.latestSelectedDateObj||(self2.config.minDate&&self2.config.minDate>self2.now?self2.config.minDate:self2.config.maxDate&&self2.config.maxDate<self2.now?self2.config.maxDate:self2.now);var oldYear=self2.currentYear;var oldMonth=self2.currentMonth;try{if(jumpTo!==void 0){self2.currentYear=jumpTo.getFullYear();self2.currentMonth=jumpTo.getMonth()}}catch(e){e.message="Invalid date supplied: "+jumpTo;self2.config.errorHandler(e)}if(triggerChange2&&self2.currentYear!==oldYear){triggerEvent("onYearChange");buildMonthSwitch()}if(triggerChange2&&(self2.currentYear!==oldYear||self2.currentMonth!==oldMonth)){triggerEvent("onMonthChange")}self2.redraw()}function timeIncrement(e){var eventTarget=getEventTarget(e);if(~eventTarget.className.indexOf("arrow"))incrementNumInput(e,eventTarget.classList.contains("arrowUp")?1:-1)}function incrementNumInput(e,delta,inputElem){var target=e&&getEventTarget(e);var input=inputElem||target&&target.parentNode&&target.parentNode.firstChild;var event=createEvent("increment");event.delta=delta;input&&input.dispatchEvent(event)}function build(){var fragment=window.document.createDocumentFragment();self2.calendarContainer=createElement("div","flatpickr-calendar");self2.calendarContainer.tabIndex=-1;if(!self2.config.noCalendar){fragment.appendChild(buildMonthNav());self2.innerContainer=createElement("div","flatpickr-innerContainer");if(self2.config.weekNumbers){var _a=buildWeeks(),weekWrapper=_a.weekWrapper,weekNumbers=_a.weekNumbers;self2.innerContainer.appendChild(weekWrapper);self2.weekNumbers=weekNumbers;self2.weekWrapper=weekWrapper}self2.rContainer=createElement("div","flatpickr-rContainer");self2.rContainer.appendChild(buildWeekdays());if(!self2.daysContainer){self2.daysContainer=createElement("div","flatpickr-days");self2.daysContainer.tabIndex=-1}buildDays();self2.rContainer.appendChild(self2.daysContainer);self2.innerContainer.appendChild(self2.rContainer);fragment.appendChild(self2.innerContainer)}if(self2.config.enableTime){fragment.appendChild(buildTime())}toggleClass(self2.calendarContainer,"rangeMode",self2.config.mode==="range");toggleClass(self2.calendarContainer,"animate",self2.config.animate===true);toggleClass(self2.calendarContainer,"multiMonth",self2.config.showMonths>1);self2.calendarContainer.appendChild(fragment);var customAppend=self2.config.appendTo!==void 0&&self2.config.appendTo.nodeType!==void 0;if(self2.config.inline||self2.config.static){self2.calendarContainer.classList.add(self2.config.inline?"inline":"static");if(self2.config.inline){if(!customAppend&&self2.element.parentNode)self2.element.parentNode.insertBefore(self2.calendarContainer,self2._input.nextSibling);else if(self2.config.appendTo!==void 0)self2.config.appendTo.appendChild(self2.calendarContainer)}if(self2.config.static){var wrapper=createElement("div","flatpickr-wrapper");if(self2.element.parentNode)self2.element.parentNode.insertBefore(wrapper,self2.element);wrapper.appendChild(self2.element);if(self2.altInput)wrapper.appendChild(self2.altInput);wrapper.appendChild(self2.calendarContainer)}}if(!self2.config.static&&!self2.config.inline)(self2.config.appendTo!==void 0?self2.config.appendTo:window.document.body).appendChild(self2.calendarContainer)}function createDay(className,date,_dayNumber,i){var dateIsEnabled=isEnabled(date,true),dayElement=createElement("span",className,date.getDate().toString());dayElement.dateObj=date;dayElement.$i=i;dayElement.setAttribute("aria-label",self2.formatDate(date,self2.config.ariaDateFormat));if(className.indexOf("hidden")===-1&&compareDates(date,self2.now)===0){self2.todayDateElem=dayElement;dayElement.classList.add("today");dayElement.setAttribute("aria-current","date")}if(dateIsEnabled){dayElement.tabIndex=-1;if(isDateSelected(date)){dayElement.classList.add("selected");self2.selectedDateElem=dayElement;if(self2.config.mode==="range"){toggleClass(dayElement,"startRange",self2.selectedDates[0]&&compareDates(date,self2.selectedDates[0],true)===0);toggleClass(dayElement,"endRange",self2.selectedDates[1]&&compareDates(date,self2.selectedDates[1],true)===0);if(className==="nextMonthDay")dayElement.classList.add("inRange")}}}else{dayElement.classList.add("flatpickr-disabled")}if(self2.config.mode==="range"){if(isDateInRange(date)&&!isDateSelected(date))dayElement.classList.add("inRange")}if(self2.weekNumbers&&self2.config.showMonths===1&&className!=="prevMonthDay"&&i%7===6){self2.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+self2.config.getWeek(date)+"</span>")}triggerEvent("onDayCreate",dayElement);return dayElement}function focusOnDayElem(targetNode){targetNode.focus();if(self2.config.mode==="range")onMouseOver(targetNode)}function getFirstAvailableDay(delta){var startMonth=delta>0?0:self2.config.showMonths-1;var endMonth=delta>0?self2.config.showMonths:-1;for(var m=startMonth;m!=endMonth;m+=delta){var month=self2.daysContainer.children[m];var startIndex=delta>0?0:month.children.length-1;var endIndex=delta>0?month.children.length:-1;for(var i=startIndex;i!=endIndex;i+=delta){var c=month.children[i];if(c.className.indexOf("hidden")===-1&&isEnabled(c.dateObj))return c}}return void 0}function getNextAvailableDay(current,delta){var givenMonth=current.className.indexOf("Month")===-1?current.dateObj.getMonth():self2.currentMonth;var endMonth=delta>0?self2.config.showMonths:-1;var loopDelta=delta>0?1:-1;for(var m=givenMonth-self2.currentMonth;m!=endMonth;m+=loopDelta){var month=self2.daysContainer.children[m];var startIndex=givenMonth-self2.currentMonth===m?current.$i+delta:delta<0?month.children.length-1:0;var numMonthDays=month.children.length;for(var i=startIndex;i>=0&&i<numMonthDays&&i!=(delta>0?numMonthDays:-1);i+=loopDelta){var c=month.children[i];if(c.className.indexOf("hidden")===-1&&isEnabled(c.dateObj)&&Math.abs(current.$i-i)>=Math.abs(delta))return focusOnDayElem(c)}}self2.changeMonth(loopDelta);focusOnDay(getFirstAvailableDay(loopDelta),0);return void 0}function focusOnDay(current,offset2){var activeElement=getClosestActiveElement();var dayFocused=isInView(activeElement||document.body);var startElem=current!==void 0?current:dayFocused?activeElement:self2.selectedDateElem!==void 0&&isInView(self2.selectedDateElem)?self2.selectedDateElem:self2.todayDateElem!==void 0&&isInView(self2.todayDateElem)?self2.todayDateElem:getFirstAvailableDay(offset2>0?1:-1);if(startElem===void 0){self2._input.focus()}else if(!dayFocused){focusOnDayElem(startElem)}else{getNextAvailableDay(startElem,offset2)}}function buildMonthDays(year,month){var firstOfMonth=(new Date(year,month,1).getDay()-self2.l10n.firstDayOfWeek+7)%7;var prevMonthDays=self2.utils.getDaysInMonth((month-1+12)%12,year);var daysInMonth=self2.utils.getDaysInMonth(month,year),days2=window.document.createDocumentFragment(),isMultiMonth=self2.config.showMonths>1,prevMonthDayClass=isMultiMonth?"prevMonthDay hidden":"prevMonthDay",nextMonthDayClass=isMultiMonth?"nextMonthDay hidden":"nextMonthDay";var dayNumber=prevMonthDays+1-firstOfMonth,dayIndex=0;for(;dayNumber<=prevMonthDays;dayNumber++,dayIndex++){days2.appendChild(createDay("flatpickr-day "+prevMonthDayClass,new Date(year,month-1,dayNumber),dayNumber,dayIndex))}for(dayNumber=1;dayNumber<=daysInMonth;dayNumber++,dayIndex++){days2.appendChild(createDay("flatpickr-day",new Date(year,month,dayNumber),dayNumber,dayIndex))}for(var dayNum=daysInMonth+1;dayNum<=42-firstOfMonth&&(self2.config.showMonths===1||dayIndex%7!==0);dayNum++,dayIndex++){days2.appendChild(createDay("flatpickr-day "+nextMonthDayClass,new Date(year,month+1,dayNum%daysInMonth),dayNum,dayIndex))}var dayContainer=createElement("div","dayContainer");dayContainer.appendChild(days2);return dayContainer}function buildDays(){if(self2.daysContainer===void 0){return}clearNode(self2.daysContainer);if(self2.weekNumbers)clearNode(self2.weekNumbers);var frag=document.createDocumentFragment();for(var i=0;i<self2.config.showMonths;i++){var d=new Date(self2.currentYear,self2.currentMonth,1);d.setMonth(self2.currentMonth+i);frag.appendChild(buildMonthDays(d.getFullYear(),d.getMonth()))}self2.daysContainer.appendChild(frag);self2.days=self2.daysContainer.firstChild;if(self2.config.mode==="range"&&self2.selectedDates.length===1){onMouseOver()}}function buildMonthSwitch(){if(self2.config.showMonths>1||self2.config.monthSelectorType!=="dropdown")return;var shouldBuildMonth=function(month2){if(self2.config.minDate!==void 0&&self2.currentYear===self2.config.minDate.getFullYear()&&month2<self2.config.minDate.getMonth()){return false}return!(self2.config.maxDate!==void 0&&self2.currentYear===self2.config.maxDate.getFullYear()&&month2>self2.config.maxDate.getMonth())};self2.monthsDropdownContainer.tabIndex=-1;self2.monthsDropdownContainer.innerHTML="";for(var i=0;i<12;i++){if(!shouldBuildMonth(i))continue;var month=createElement("option","flatpickr-monthDropdown-month");month.value=new Date(self2.currentYear,i).getMonth().toString();month.textContent=monthToStr(i,self2.config.shorthandCurrentMonth,self2.l10n);month.tabIndex=-1;if(self2.currentMonth===i){month.selected=true}self2.monthsDropdownContainer.appendChild(month)}}function buildMonth(){var container=createElement("div","flatpickr-month");var monthNavFragment=window.document.createDocumentFragment();var monthElement;if(self2.config.showMonths>1||self2.config.monthSelectorType==="static"){monthElement=createElement("span","cur-month")}else{self2.monthsDropdownContainer=createElement("select","flatpickr-monthDropdown-months");self2.monthsDropdownContainer.setAttribute("aria-label",self2.l10n.monthAriaLabel);bind(self2.monthsDropdownContainer,"change",(function(e){var target=getEventTarget(e);var selectedMonth=parseInt(target.value,10);self2.changeMonth(selectedMonth-self2.currentMonth);triggerEvent("onMonthChange")}));buildMonthSwitch();monthElement=self2.monthsDropdownContainer}var yearInput=createNumberInput("cur-year",{tabindex:"-1"});var yearElement=yearInput.getElementsByTagName("input")[0];yearElement.setAttribute("aria-label",self2.l10n.yearAriaLabel);if(self2.config.minDate){yearElement.setAttribute("min",self2.config.minDate.getFullYear().toString())}if(self2.config.maxDate){yearElement.setAttribute("max",self2.config.maxDate.getFullYear().toString());yearElement.disabled=!!self2.config.minDate&&self2.config.minDate.getFullYear()===self2.config.maxDate.getFullYear()}var currentMonth=createElement("div","flatpickr-current-month");currentMonth.appendChild(monthElement);currentMonth.appendChild(yearInput);monthNavFragment.appendChild(currentMonth);container.appendChild(monthNavFragment);return{container:container,yearElement:yearElement,monthElement:monthElement}}function buildMonths(){clearNode(self2.monthNav);self2.monthNav.appendChild(self2.prevMonthNav);if(self2.config.showMonths){self2.yearElements=[];self2.monthElements=[]}for(var m=self2.config.showMonths;m--;){var month=buildMonth();self2.yearElements.push(month.yearElement);self2.monthElements.push(month.monthElement);self2.monthNav.appendChild(month.container)}self2.monthNav.appendChild(self2.nextMonthNav)}function buildMonthNav(){self2.monthNav=createElement("div","flatpickr-months");self2.yearElements=[];self2.monthElements=[];self2.prevMonthNav=createElement("span","flatpickr-prev-month");self2.prevMonthNav.innerHTML=self2.config.prevArrow;self2.nextMonthNav=createElement("span","flatpickr-next-month");self2.nextMonthNav.innerHTML=self2.config.nextArrow;buildMonths();Object.defineProperty(self2,"_hidePrevMonthArrow",{get:function(){return self2.__hidePrevMonthArrow},set:function(bool){if(self2.__hidePrevMonthArrow!==bool){toggleClass(self2.prevMonthNav,"flatpickr-disabled",bool);self2.__hidePrevMonthArrow=bool}}});Object.defineProperty(self2,"_hideNextMonthArrow",{get:function(){return self2.__hideNextMonthArrow},set:function(bool){if(self2.__hideNextMonthArrow!==bool){toggleClass(self2.nextMonthNav,"flatpickr-disabled",bool);self2.__hideNextMonthArrow=bool}}});self2.currentYearElement=self2.yearElements[0];updateNavigationCurrentMonth();return self2.monthNav}function buildTime(){self2.calendarContainer.classList.add("hasTime");if(self2.config.noCalendar)self2.calendarContainer.classList.add("noCalendar");var defaults2=getDefaultHours(self2.config);self2.timeContainer=createElement("div","flatpickr-time");self2.timeContainer.tabIndex=-1;var separator=createElement("span","flatpickr-time-separator",":");var hourInput=createNumberInput("flatpickr-hour",{"aria-label":self2.l10n.hourAriaLabel});self2.hourElement=hourInput.getElementsByTagName("input")[0];var minuteInput=createNumberInput("flatpickr-minute",{"aria-label":self2.l10n.minuteAriaLabel});self2.minuteElement=minuteInput.getElementsByTagName("input")[0];self2.hourElement.tabIndex=self2.minuteElement.tabIndex=-1;self2.hourElement.value=pad(self2.latestSelectedDateObj?self2.latestSelectedDateObj.getHours():self2.config.time_24hr?defaults2.hours:military2ampm(defaults2.hours));self2.minuteElement.value=pad(self2.latestSelectedDateObj?self2.latestSelectedDateObj.getMinutes():defaults2.minutes);self2.hourElement.setAttribute("step",self2.config.hourIncrement.toString());self2.minuteElement.setAttribute("step",self2.config.minuteIncrement.toString());self2.hourElement.setAttribute("min",self2.config.time_24hr?"0":"1");self2.hourElement.setAttribute("max",self2.config.time_24hr?"23":"12");self2.hourElement.setAttribute("maxlength","2");self2.minuteElement.setAttribute("min","0");self2.minuteElement.setAttribute("max","59");self2.minuteElement.setAttribute("maxlength","2");self2.timeContainer.appendChild(hourInput);self2.timeContainer.appendChild(separator);self2.timeContainer.appendChild(minuteInput);if(self2.config.time_24hr)self2.timeContainer.classList.add("time24hr");if(self2.config.enableSeconds){self2.timeContainer.classList.add("hasSeconds");var secondInput=createNumberInput("flatpickr-second");self2.secondElement=secondInput.getElementsByTagName("input")[0];self2.secondElement.value=pad(self2.latestSelectedDateObj?self2.latestSelectedDateObj.getSeconds():defaults2.seconds);self2.secondElement.setAttribute("step",self2.minuteElement.getAttribute("step"));self2.secondElement.setAttribute("min","0");self2.secondElement.setAttribute("max","59");self2.secondElement.setAttribute("maxlength","2");self2.timeContainer.appendChild(createElement("span","flatpickr-time-separator",":"));self2.timeContainer.appendChild(secondInput)}if(!self2.config.time_24hr){self2.amPM=createElement("span","flatpickr-am-pm",self2.l10n.amPM[int((self2.latestSelectedDateObj?self2.hourElement.value:self2.config.defaultHour)>11)]);self2.amPM.title=self2.l10n.toggleTitle;self2.amPM.tabIndex=-1;self2.timeContainer.appendChild(self2.amPM)}return self2.timeContainer}function buildWeekdays(){if(!self2.weekdayContainer)self2.weekdayContainer=createElement("div","flatpickr-weekdays");else clearNode(self2.weekdayContainer);for(var i=self2.config.showMonths;i--;){var container=createElement("div","flatpickr-weekdaycontainer");self2.weekdayContainer.appendChild(container)}updateWeekdays();return self2.weekdayContainer}function updateWeekdays(){if(!self2.weekdayContainer){return}var firstDayOfWeek=self2.l10n.firstDayOfWeek;var weekdays=__spreadArrays(self2.l10n.weekdays.shorthand);if(firstDayOfWeek>0&&firstDayOfWeek<weekdays.length){weekdays=__spreadArrays(weekdays.splice(firstDayOfWeek,weekdays.length),weekdays.splice(0,firstDayOfWeek))}for(var i=self2.config.showMonths;i--;){self2.weekdayContainer.children[i].innerHTML="\n <span class='flatpickr-weekday'>\n "+weekdays.join("</span><span class='flatpickr-weekday'>")+"\n </span>\n "}}function buildWeeks(){self2.calendarContainer.classList.add("hasWeeks");var weekWrapper=createElement("div","flatpickr-weekwrapper");weekWrapper.appendChild(createElement("span","flatpickr-weekday",self2.l10n.weekAbbreviation));var weekNumbers=createElement("div","flatpickr-weeks");weekWrapper.appendChild(weekNumbers);return{weekWrapper:weekWrapper,weekNumbers:weekNumbers}}function changeMonth(value,isOffset){if(isOffset===void 0){isOffset=true}var delta=isOffset?value:value-self2.currentMonth;if(delta<0&&self2._hidePrevMonthArrow===true||delta>0&&self2._hideNextMonthArrow===true)return;self2.currentMonth+=delta;if(self2.currentMonth<0||self2.currentMonth>11){self2.currentYear+=self2.currentMonth>11?1:-1;self2.currentMonth=(self2.currentMonth+12)%12;triggerEvent("onYearChange");buildMonthSwitch()}buildDays();triggerEvent("onMonthChange");updateNavigationCurrentMonth()}function clear(triggerChangeEvent,toInitial){if(triggerChangeEvent===void 0){triggerChangeEvent=true}if(toInitial===void 0){toInitial=true}self2.input.value="";if(self2.altInput!==void 0)self2.altInput.value="";if(self2.mobileInput!==void 0)self2.mobileInput.value="";self2.selectedDates=[];self2.latestSelectedDateObj=void 0;if(toInitial===true){self2.currentYear=self2._initialDate.getFullYear();self2.currentMonth=self2._initialDate.getMonth()}if(self2.config.enableTime===true){var _a=getDefaultHours(self2.config),hours=_a.hours,minutes=_a.minutes,seconds=_a.seconds;setHours(hours,minutes,seconds)}self2.redraw();if(triggerChangeEvent)triggerEvent("onChange")}function close(){self2.isOpen=false;if(!self2.isMobile){if(self2.calendarContainer!==void 0){self2.calendarContainer.classList.remove("open")}if(self2._input!==void 0){self2._input.classList.remove("active")}}triggerEvent("onClose")}function destroy(){if(self2.config!==void 0)triggerEvent("onDestroy");for(var i=self2._handlers.length;i--;){self2._handlers[i].remove()}self2._handlers=[];if(self2.mobileInput){if(self2.mobileInput.parentNode)self2.mobileInput.parentNode.removeChild(self2.mobileInput);self2.mobileInput=void 0}else if(self2.calendarContainer&&self2.calendarContainer.parentNode){if(self2.config.static&&self2.calendarContainer.parentNode){var wrapper=self2.calendarContainer.parentNode;wrapper.lastChild&&wrapper.removeChild(wrapper.lastChild);if(wrapper.parentNode){while(wrapper.firstChild)wrapper.parentNode.insertBefore(wrapper.firstChild,wrapper);wrapper.parentNode.removeChild(wrapper)}}else self2.calendarContainer.parentNode.removeChild(self2.calendarContainer)}if(self2.altInput){self2.input.type="text";if(self2.altInput.parentNode)self2.altInput.parentNode.removeChild(self2.altInput);delete self2.altInput}if(self2.input){self2.input.type=self2.input._type;self2.input.classList.remove("flatpickr-input");self2.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(k){try{delete self2[k]}catch(_){}}))}function isCalendarElem(elem){return self2.calendarContainer.contains(elem)}function documentClick(e){if(self2.isOpen&&!self2.config.inline){var eventTarget_1=getEventTarget(e);var isCalendarElement=isCalendarElem(eventTarget_1);var isInput=eventTarget_1===self2.input||eventTarget_1===self2.altInput||self2.element.contains(eventTarget_1)||e.path&&e.path.indexOf&&(~e.path.indexOf(self2.input)||~e.path.indexOf(self2.altInput));var lostFocus=!isInput&&!isCalendarElement&&!isCalendarElem(e.relatedTarget);var isIgnored=!self2.config.ignoredFocusElements.some((function(elem){return elem.contains(eventTarget_1)}));if(lostFocus&&isIgnored){if(self2.config.allowInput){self2.setDate(self2._input.value,false,self2.config.altInput?self2.config.altFormat:self2.config.dateFormat)}if(self2.timeContainer!==void 0&&self2.minuteElement!==void 0&&self2.hourElement!==void 0&&self2.input.value!==""&&self2.input.value!==void 0){updateTime()}self2.close();if(self2.config&&self2.config.mode==="range"&&self2.selectedDates.length===1)self2.clear(false)}}}function changeYear(newYear){if(!newYear||self2.config.minDate&&newYear<self2.config.minDate.getFullYear()||self2.config.maxDate&&newYear>self2.config.maxDate.getFullYear())return;var newYearNum=newYear,isNewYear=self2.currentYear!==newYearNum;self2.currentYear=newYearNum||self2.currentYear;if(self2.config.maxDate&&self2.currentYear===self2.config.maxDate.getFullYear()){self2.currentMonth=Math.min(self2.config.maxDate.getMonth(),self2.currentMonth)}else if(self2.config.minDate&&self2.currentYear===self2.config.minDate.getFullYear()){self2.currentMonth=Math.max(self2.config.minDate.getMonth(),self2.currentMonth)}if(isNewYear){self2.redraw();triggerEvent("onYearChange");buildMonthSwitch()}}function isEnabled(date,timeless){var _a;if(timeless===void 0){timeless=true}var dateToCheck=self2.parseDate(date,void 0,timeless);if(self2.config.minDate&&dateToCheck&&compareDates(dateToCheck,self2.config.minDate,timeless!==void 0?timeless:!self2.minDateHasTime)<0||self2.config.maxDate&&dateToCheck&&compareDates(dateToCheck,self2.config.maxDate,timeless!==void 0?timeless:!self2.maxDateHasTime)>0)return false;if(!self2.config.enable&&self2.config.disable.length===0)return true;if(dateToCheck===void 0)return false;var bool=!!self2.config.enable,array=(_a=self2.config.enable)!==null&&_a!==void 0?_a:self2.config.disable;for(var i=0,d=void 0;i<array.length;i++){d=array[i];if(typeof d==="function"&&d(dateToCheck))return bool;else if(d instanceof Date&&dateToCheck!==void 0&&d.getTime()===dateToCheck.getTime())return bool;else if(typeof d==="string"){var parsed=self2.parseDate(d,void 0,true);return parsed&&parsed.getTime()===dateToCheck.getTime()?bool:!bool}else if(typeof d==="object"&&dateToCheck!==void 0&&d.from&&d.to&&dateToCheck.getTime()>=d.from.getTime()&&dateToCheck.getTime()<=d.to.getTime())return bool}return!bool}function isInView(elem){if(self2.daysContainer!==void 0)return elem.className.indexOf("hidden")===-1&&elem.className.indexOf("flatpickr-disabled")===-1&&self2.daysContainer.contains(elem);return false}function onBlur(e){var isInput=e.target===self2._input;var valueChanged=self2._input.value.trimEnd()!==getDateStr();if(isInput&&valueChanged&&!(e.relatedTarget&&isCalendarElem(e.relatedTarget))){self2.setDate(self2._input.value,true,e.target===self2.altInput?self2.config.altFormat:self2.config.dateFormat)}}function onKeyDown(e){var eventTarget=getEventTarget(e);var isInput=self2.config.wrap?element.contains(eventTarget):eventTarget===self2._input;var allowInput=self2.config.allowInput;var allowKeydown=self2.isOpen&&(!allowInput||!isInput);var allowInlineKeydown=self2.config.inline&&isInput&&!allowInput;if(e.keyCode===13&&isInput){if(allowInput){self2.setDate(self2._input.value,true,eventTarget===self2.altInput?self2.config.altFormat:self2.config.dateFormat);self2.close();return eventTarget.blur()}else{self2.open()}}else if(isCalendarElem(eventTarget)||allowKeydown||allowInlineKeydown){var isTimeObj=!!self2.timeContainer&&self2.timeContainer.contains(eventTarget);switch(e.keyCode){case 13:if(isTimeObj){e.preventDefault();updateTime();focusAndClose()}else selectDate(e);break;case 27:e.preventDefault();focusAndClose();break;case 8:case 46:if(isInput&&!self2.config.allowInput){e.preventDefault();self2.clear()}break;case 37:case 39:if(!isTimeObj&&!isInput){e.preventDefault();var activeElement=getClosestActiveElement();if(self2.daysContainer!==void 0&&(allowInput===false||activeElement&&isInView(activeElement))){var delta_1=e.keyCode===39?1:-1;if(!e.ctrlKey)focusOnDay(void 0,delta_1);else{e.stopPropagation();changeMonth(delta_1);focusOnDay(getFirstAvailableDay(1),0)}}}else if(self2.hourElement)self2.hourElement.focus();break;case 38:case 40:e.preventDefault();var delta=e.keyCode===40?1:-1;if(self2.daysContainer&&eventTarget.$i!==void 0||eventTarget===self2.input||eventTarget===self2.altInput){if(e.ctrlKey){e.stopPropagation();changeYear(self2.currentYear-delta);focusOnDay(getFirstAvailableDay(1),0)}else if(!isTimeObj)focusOnDay(void 0,delta*7)}else if(eventTarget===self2.currentYearElement){changeYear(self2.currentYear-delta)}else if(self2.config.enableTime){if(!isTimeObj&&self2.hourElement)self2.hourElement.focus();updateTime(e);self2._debouncedChange()}break;case 9:if(isTimeObj){var elems=[self2.hourElement,self2.minuteElement,self2.secondElement,self2.amPM].concat(self2.pluginElements).filter((function(x){return x}));var i=elems.indexOf(eventTarget);if(i!==-1){var target=elems[i+(e.shiftKey?-1:1)];e.preventDefault();(target||self2._input).focus()}}else if(!self2.config.noCalendar&&self2.daysContainer&&self2.daysContainer.contains(eventTarget)&&e.shiftKey){e.preventDefault();self2._input.focus()}break}}if(self2.amPM!==void 0&&eventTarget===self2.amPM){switch(e.key){case self2.l10n.amPM[0].charAt(0):case self2.l10n.amPM[0].charAt(0).toLowerCase():self2.amPM.textContent=self2.l10n.amPM[0];setHoursFromInputs();updateValue();break;case self2.l10n.amPM[1].charAt(0):case self2.l10n.amPM[1].charAt(0).toLowerCase():self2.amPM.textContent=self2.l10n.amPM[1];setHoursFromInputs();updateValue();break}}if(isInput||isCalendarElem(eventTarget)){triggerEvent("onKeyDown",e)}}function onMouseOver(elem,cellClass){if(cellClass===void 0){cellClass="flatpickr-day"}if(self2.selectedDates.length!==1||elem&&(!elem.classList.contains(cellClass)||elem.classList.contains("flatpickr-disabled")))return;var hoverDate=elem?elem.dateObj.getTime():self2.days.firstElementChild.dateObj.getTime(),initialDate=self2.parseDate(self2.selectedDates[0],void 0,true).getTime(),rangeStartDate=Math.min(hoverDate,self2.selectedDates[0].getTime()),rangeEndDate=Math.max(hoverDate,self2.selectedDates[0].getTime());var containsDisabled=false;var minRange=0,maxRange=0;for(var t=rangeStartDate;t<rangeEndDate;t+=duration.DAY){if(!isEnabled(new Date(t),true)){containsDisabled=containsDisabled||t>rangeStartDate&&t<rangeEndDate;if(t<initialDate&&(!minRange||t>minRange))minRange=t;else if(t>initialDate&&(!maxRange||t<maxRange))maxRange=t}}var hoverableCells=Array.from(self2.rContainer.querySelectorAll("*:nth-child(-n+"+self2.config.showMonths+") > ."+cellClass));hoverableCells.forEach((function(dayElem){var date=dayElem.dateObj;var timestamp=date.getTime();var outOfRange=minRange>0&&timestamp<minRange||maxRange>0&&timestamp>maxRange;if(outOfRange){dayElem.classList.add("notAllowed");["inRange","startRange","endRange"].forEach((function(c){dayElem.classList.remove(c)}));return}else if(containsDisabled&&!outOfRange)return;["startRange","inRange","endRange","notAllowed"].forEach((function(c){dayElem.classList.remove(c)}));if(elem!==void 0){elem.classList.add(hoverDate<=self2.selectedDates[0].getTime()?"startRange":"endRange");if(initialDate<hoverDate&&timestamp===initialDate)dayElem.classList.add("startRange");else if(initialDate>hoverDate&&timestamp===initialDate)dayElem.classList.add("endRange");if(timestamp>=minRange&&(maxRange===0||timestamp<=maxRange)&&isBetween(timestamp,initialDate,hoverDate))dayElem.classList.add("inRange")}}))}function onResize(){if(self2.isOpen&&!self2.config.static&&!self2.config.inline)positionCalendar()}function open(e,positionElement){if(positionElement===void 0){positionElement=self2._positionElement}if(self2.isMobile===true){if(e){e.preventDefault();var eventTarget=getEventTarget(e);if(eventTarget){eventTarget.blur()}}if(self2.mobileInput!==void 0){self2.mobileInput.focus();self2.mobileInput.click()}triggerEvent("onOpen");return}else if(self2._input.disabled||self2.config.inline){return}var wasOpen=self2.isOpen;self2.isOpen=true;if(!wasOpen){self2.calendarContainer.classList.add("open");self2._input.classList.add("active");triggerEvent("onOpen");positionCalendar(positionElement)}if(self2.config.enableTime===true&&self2.config.noCalendar===true){if(self2.config.allowInput===false&&(e===void 0||!self2.timeContainer.contains(e.relatedTarget))){setTimeout((function(){return self2.hourElement.select()}),50)}}}function minMaxDateSetter(type){return function(date){var dateObj=self2.config["_"+type+"Date"]=self2.parseDate(date,self2.config.dateFormat);var inverseDateObj=self2.config["_"+(type==="min"?"max":"min")+"Date"];if(dateObj!==void 0){self2[type==="min"?"minDateHasTime":"maxDateHasTime"]=dateObj.getHours()>0||dateObj.getMinutes()>0||dateObj.getSeconds()>0}if(self2.selectedDates){self2.selectedDates=self2.selectedDates.filter((function(d){return isEnabled(d)}));if(!self2.selectedDates.length&&type==="min")setHoursFromDate(dateObj);updateValue()}if(self2.daysContainer){redraw();if(dateObj!==void 0)self2.currentYearElement[type]=dateObj.getFullYear().toString();else self2.currentYearElement.removeAttribute(type);self2.currentYearElement.disabled=!!inverseDateObj&&dateObj!==void 0&&inverseDateObj.getFullYear()===dateObj.getFullYear()}}}function parseConfig(){var boolOpts=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"];var userConfig=__assign(__assign({},JSON.parse(JSON.stringify(element.dataset||{}))),instanceConfig);var formats2={};self2.config.parseDate=userConfig.parseDate;self2.config.formatDate=userConfig.formatDate;Object.defineProperty(self2.config,"enable",{get:function(){return self2.config._enable},set:function(dates){self2.config._enable=parseDateRules(dates)}});Object.defineProperty(self2.config,"disable",{get:function(){return self2.config._disable},set:function(dates){self2.config._disable=parseDateRules(dates)}});var timeMode=userConfig.mode==="time";if(!userConfig.dateFormat&&(userConfig.enableTime||timeMode)){var defaultDateFormat=flatpickr.defaultConfig.dateFormat||defaults.dateFormat;formats2.dateFormat=userConfig.noCalendar||timeMode?"H:i"+(userConfig.enableSeconds?":S":""):defaultDateFormat+" H:i"+(userConfig.enableSeconds?":S":"")}if(userConfig.altInput&&(userConfig.enableTime||timeMode)&&!userConfig.altFormat){var defaultAltFormat=flatpickr.defaultConfig.altFormat||defaults.altFormat;formats2.altFormat=userConfig.noCalendar||timeMode?"h:i"+(userConfig.enableSeconds?":S K":" K"):defaultAltFormat+(" h:i"+(userConfig.enableSeconds?":S":"")+" K")}Object.defineProperty(self2.config,"minDate",{get:function(){return self2.config._minDate},set:minMaxDateSetter("min")});Object.defineProperty(self2.config,"maxDate",{get:function(){return self2.config._maxDate},set:minMaxDateSetter("max")});var minMaxTimeSetter=function(type){return function(val){self2.config[type==="min"?"_minTime":"_maxTime"]=self2.parseDate(val,"H:i:S")}};Object.defineProperty(self2.config,"minTime",{get:function(){return self2.config._minTime},set:minMaxTimeSetter("min")});Object.defineProperty(self2.config,"maxTime",{get:function(){return self2.config._maxTime},set:minMaxTimeSetter("max")});if(userConfig.mode==="time"){self2.config.noCalendar=true;self2.config.enableTime=true}Object.assign(self2.config,formats2,userConfig);for(var i=0;i<boolOpts.length;i++)self2.config[boolOpts[i]]=self2.config[boolOpts[i]]===true||self2.config[boolOpts[i]]==="true";HOOKS.filter((function(hook){return self2.config[hook]!==void 0})).forEach((function(hook){self2.config[hook]=arrayify(self2.config[hook]||[]).map(bindToInstance)}));self2.isMobile=!self2.config.disableMobile&&!self2.config.inline&&self2.config.mode==="single"&&!self2.config.disable.length&&!self2.config.enable&&!self2.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var i=0;i<self2.config.plugins.length;i++){var pluginConf=self2.config.plugins[i](self2)||{};for(var key in pluginConf){if(HOOKS.indexOf(key)>-1){self2.config[key]=arrayify(pluginConf[key]).map(bindToInstance).concat(self2.config[key])}else if(typeof userConfig[key]==="undefined")self2.config[key]=pluginConf[key]}}if(!userConfig.altInputClass){self2.config.altInputClass=getInputElem().className+" "+self2.config.altInputClass}triggerEvent("onParseConfig")}function getInputElem(){return self2.config.wrap?element.querySelector("[data-input]"):element}function setupLocale(){if(typeof self2.config.locale!=="object"&&typeof flatpickr.l10ns[self2.config.locale]==="undefined")self2.config.errorHandler(new Error("flatpickr: invalid locale "+self2.config.locale));self2.l10n=__assign(__assign({},flatpickr.l10ns.default),typeof self2.config.locale==="object"?self2.config.locale:self2.config.locale!=="default"?flatpickr.l10ns[self2.config.locale]:void 0);tokenRegex.D="("+self2.l10n.weekdays.shorthand.join("|")+")";tokenRegex.l="("+self2.l10n.weekdays.longhand.join("|")+")";tokenRegex.M="("+self2.l10n.months.shorthand.join("|")+")";tokenRegex.F="("+self2.l10n.months.longhand.join("|")+")";tokenRegex.K="("+self2.l10n.amPM[0]+"|"+self2.l10n.amPM[1]+"|"+self2.l10n.amPM[0].toLowerCase()+"|"+self2.l10n.amPM[1].toLowerCase()+")";var userConfig=__assign(__assign({},instanceConfig),JSON.parse(JSON.stringify(element.dataset||{})));if(userConfig.time_24hr===void 0&&flatpickr.defaultConfig.time_24hr===void 0){self2.config.time_24hr=self2.l10n.time_24hr}self2.formatDate=createDateFormatter(self2);self2.parseDate=createDateParser({config:self2.config,l10n:self2.l10n})}function positionCalendar(customPositionElement){if(typeof self2.config.position==="function"){return void self2.config.position(self2,customPositionElement)}if(self2.calendarContainer===void 0)return;triggerEvent("onPreCalendarPosition");var positionElement=customPositionElement||self2._positionElement;var calendarHeight=Array.prototype.reduce.call(self2.calendarContainer.children,(function(acc,child){return acc+child.offsetHeight}),0),calendarWidth=self2.calendarContainer.offsetWidth,configPos=self2.config.position.split(" "),configPosVertical=configPos[0],configPosHorizontal=configPos.length>1?configPos[1]:null,inputBounds=positionElement.getBoundingClientRect(),distanceFromBottom=window.innerHeight-inputBounds.bottom,showOnTop=configPosVertical==="above"||configPosVertical!=="below"&&distanceFromBottom<calendarHeight&&inputBounds.top>calendarHeight;var top2=window.pageYOffset+inputBounds.top+(!showOnTop?positionElement.offsetHeight+2:-calendarHeight-2);toggleClass(self2.calendarContainer,"arrowTop",!showOnTop);toggleClass(self2.calendarContainer,"arrowBottom",showOnTop);if(self2.config.inline)return;var left2=window.pageXOffset+inputBounds.left;var isCenter=false;var isRight=false;if(configPosHorizontal==="center"){left2-=(calendarWidth-inputBounds.width)/2;isCenter=true}else if(configPosHorizontal==="right"){left2-=calendarWidth-inputBounds.width;isRight=true}toggleClass(self2.calendarContainer,"arrowLeft",!isCenter&&!isRight);toggleClass(self2.calendarContainer,"arrowCenter",isCenter);toggleClass(self2.calendarContainer,"arrowRight",isRight);var right2=window.document.body.offsetWidth-(window.pageXOffset+inputBounds.right);var rightMost=left2+calendarWidth>window.document.body.offsetWidth;var centerMost=right2+calendarWidth>window.document.body.offsetWidth;toggleClass(self2.calendarContainer,"rightMost",rightMost);if(self2.config.static)return;self2.calendarContainer.style.top=top2+"px";if(!rightMost){self2.calendarContainer.style.left=left2+"px";self2.calendarContainer.style.right="auto"}else if(!centerMost){self2.calendarContainer.style.left="auto";self2.calendarContainer.style.right=right2+"px"}else{var doc=getDocumentStyleSheet();if(doc===void 0)return;var bodyWidth=window.document.body.offsetWidth;var centerLeft=Math.max(0,bodyWidth/2-calendarWidth/2);var centerBefore=".flatpickr-calendar.centerMost:before";var centerAfter=".flatpickr-calendar.centerMost:after";var centerIndex=doc.cssRules.length;var centerStyle="{left:"+inputBounds.left+"px;right:auto;}";toggleClass(self2.calendarContainer,"rightMost",false);toggleClass(self2.calendarContainer,"centerMost",true);doc.insertRule(centerBefore+","+centerAfter+centerStyle,centerIndex);self2.calendarContainer.style.left=centerLeft+"px";self2.calendarContainer.style.right="auto"}}function getDocumentStyleSheet(){var editableSheet=null;for(var i=0;i<document.styleSheets.length;i++){var sheet=document.styleSheets[i];if(!sheet.cssRules)continue;try{sheet.cssRules}catch(err){continue}editableSheet=sheet;break}return editableSheet!=null?editableSheet:createStyleSheet()}function createStyleSheet(){var style=document.createElement("style");document.head.appendChild(style);return style.sheet}function redraw(){if(self2.config.noCalendar||self2.isMobile)return;buildMonthSwitch();updateNavigationCurrentMonth();buildDays()}function focusAndClose(){self2._input.focus();if(window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0){setTimeout(self2.close,0)}else{self2.close()}}function selectDate(e){e.preventDefault();e.stopPropagation();var isSelectable=function(day){return day.classList&&day.classList.contains("flatpickr-day")&&!day.classList.contains("flatpickr-disabled")&&!day.classList.contains("notAllowed")};var t=findParent(getEventTarget(e),isSelectable);if(t===void 0)return;var target=t;var selectedDate=self2.latestSelectedDateObj=new Date(target.dateObj.getTime());var shouldChangeMonth=(selectedDate.getMonth()<self2.currentMonth||selectedDate.getMonth()>self2.currentMonth+self2.config.showMonths-1)&&self2.config.mode!=="range";self2.selectedDateElem=target;if(self2.config.mode==="single")self2.selectedDates=[selectedDate];else if(self2.config.mode==="multiple"){var selectedIndex=isDateSelected(selectedDate);if(selectedIndex)self2.selectedDates.splice(parseInt(selectedIndex),1);else self2.selectedDates.push(selectedDate)}else if(self2.config.mode==="range"){if(self2.selectedDates.length===2){self2.clear(false,false)}self2.latestSelectedDateObj=selectedDate;self2.selectedDates.push(selectedDate);if(compareDates(selectedDate,self2.selectedDates[0],true)!==0)self2.selectedDates.sort((function(a,b){return a.getTime()-b.getTime()}))}setHoursFromInputs();if(shouldChangeMonth){var isNewYear=self2.currentYear!==selectedDate.getFullYear();self2.currentYear=selectedDate.getFullYear();self2.currentMonth=selectedDate.getMonth();if(isNewYear){triggerEvent("onYearChange");buildMonthSwitch()}triggerEvent("onMonthChange")}updateNavigationCurrentMonth();buildDays();updateValue();if(!shouldChangeMonth&&self2.config.mode!=="range"&&self2.config.showMonths===1)focusOnDayElem(target);else if(self2.selectedDateElem!==void 0&&self2.hourElement===void 0){self2.selectedDateElem&&self2.selectedDateElem.focus()}if(self2.hourElement!==void 0)self2.hourElement!==void 0&&self2.hourElement.focus();if(self2.config.closeOnSelect){var single=self2.config.mode==="single"&&!self2.config.enableTime;var range=self2.config.mode==="range"&&self2.selectedDates.length===2&&!self2.config.enableTime;if(single||range){focusAndClose()}}triggerChange()}var CALLBACKS={locale:[setupLocale,updateWeekdays],showMonths:[buildMonths,setCalendarWidth,buildWeekdays],minDate:[jumpToDate],maxDate:[jumpToDate],positionElement:[updatePositionElement],clickOpens:[function(){if(self2.config.clickOpens===true){bind(self2._input,"focus",self2.open);bind(self2._input,"click",self2.open)}else{self2._input.removeEventListener("focus",self2.open);self2._input.removeEventListener("click",self2.open)}}]};function set(option,value){if(option!==null&&typeof option==="object"){Object.assign(self2.config,option);for(var key in option){if(CALLBACKS[key]!==void 0)CALLBACKS[key].forEach((function(x){return x()}))}}else{self2.config[option]=value;if(CALLBACKS[option]!==void 0)CALLBACKS[option].forEach((function(x){return x()}));else if(HOOKS.indexOf(option)>-1)self2.config[option]=arrayify(value)}self2.redraw();updateValue(true)}function setSelectedDate(inputDate,format){var dates=[];if(inputDate instanceof Array)dates=inputDate.map((function(d){return self2.parseDate(d,format)}));else if(inputDate instanceof Date||typeof inputDate==="number")dates=[self2.parseDate(inputDate,format)];else if(typeof inputDate==="string"){switch(self2.config.mode){case"single":case"time":dates=[self2.parseDate(inputDate,format)];break;case"multiple":dates=inputDate.split(self2.config.conjunction).map((function(date){return self2.parseDate(date,format)}));break;case"range":dates=inputDate.split(self2.l10n.rangeSeparator).map((function(date){return self2.parseDate(date,format)}));break}}else self2.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(inputDate)));self2.selectedDates=self2.config.allowInvalidPreload?dates:dates.filter((function(d){return d instanceof Date&&isEnabled(d,false)}));if(self2.config.mode==="range")self2.selectedDates.sort((function(a,b){return a.getTime()-b.getTime()}))}function setDate(date,triggerChange2,format){if(triggerChange2===void 0){triggerChange2=false}if(format===void 0){format=self2.config.dateFormat}if(date!==0&&!date||date instanceof Array&&date.length===0)return self2.clear(triggerChange2);setSelectedDate(date,format);self2.latestSelectedDateObj=self2.selectedDates[self2.selectedDates.length-1];self2.redraw();jumpToDate(void 0,triggerChange2);setHoursFromDate();if(self2.selectedDates.length===0){self2.clear(false)}updateValue(triggerChange2);if(triggerChange2)triggerEvent("onChange")}function parseDateRules(arr){return arr.slice().map((function(rule){if(typeof rule==="string"||typeof rule==="number"||rule instanceof Date){return self2.parseDate(rule,void 0,true)}else if(rule&&typeof rule==="object"&&rule.from&&rule.to)return{from:self2.parseDate(rule.from,void 0),to:self2.parseDate(rule.to,void 0)};return rule})).filter((function(x){return x}))}function setupDates(){self2.selectedDates=[];self2.now=self2.parseDate(self2.config.now)||new Date;var preloadedDate=self2.config.defaultDate||((self2.input.nodeName==="INPUT"||self2.input.nodeName==="TEXTAREA")&&self2.input.placeholder&&self2.input.value===self2.input.placeholder?null:self2.input.value);if(preloadedDate)setSelectedDate(preloadedDate,self2.config.dateFormat);self2._initialDate=self2.selectedDates.length>0?self2.selectedDates[0]:self2.config.minDate&&self2.config.minDate.getTime()>self2.now.getTime()?self2.config.minDate:self2.config.maxDate&&self2.config.maxDate.getTime()<self2.now.getTime()?self2.config.maxDate:self2.now;self2.currentYear=self2._initialDate.getFullYear();self2.currentMonth=self2._initialDate.getMonth();if(self2.selectedDates.length>0)self2.latestSelectedDateObj=self2.selectedDates[0];if(self2.config.minTime!==void 0)self2.config.minTime=self2.parseDate(self2.config.minTime,"H:i");if(self2.config.maxTime!==void 0)self2.config.maxTime=self2.parseDate(self2.config.maxTime,"H:i");self2.minDateHasTime=!!self2.config.minDate&&(self2.config.minDate.getHours()>0||self2.config.minDate.getMinutes()>0||self2.config.minDate.getSeconds()>0);self2.maxDateHasTime=!!self2.config.maxDate&&(self2.config.maxDate.getHours()>0||self2.config.maxDate.getMinutes()>0||self2.config.maxDate.getSeconds()>0)}function setupInputs(){self2.input=getInputElem();if(!self2.input){self2.config.errorHandler(new Error("Invalid input element specified"));return}self2.input._type=self2.input.type;self2.input.type="text";self2.input.classList.add("flatpickr-input");self2._input=self2.input;if(self2.config.altInput){self2.altInput=createElement(self2.input.nodeName,self2.config.altInputClass);self2._input=self2.altInput;self2.altInput.placeholder=self2.input.placeholder;self2.altInput.disabled=self2.input.disabled;self2.altInput.required=self2.input.required;self2.altInput.tabIndex=self2.input.tabIndex;self2.altInput.type="text";self2.input.setAttribute("type","hidden");if(!self2.config.static&&self2.input.parentNode)self2.input.parentNode.insertBefore(self2.altInput,self2.input.nextSibling)}if(!self2.config.allowInput)self2._input.setAttribute("readonly","readonly");updatePositionElement()}function updatePositionElement(){self2._positionElement=self2.config.positionElement||self2._input}function setupMobile(){var inputType=self2.config.enableTime?self2.config.noCalendar?"time":"datetime-local":"date";self2.mobileInput=createElement("input",self2.input.className+" flatpickr-mobile");self2.mobileInput.tabIndex=1;self2.mobileInput.type=inputType;self2.mobileInput.disabled=self2.input.disabled;self2.mobileInput.required=self2.input.required;self2.mobileInput.placeholder=self2.input.placeholder;self2.mobileFormatStr=inputType==="datetime-local"?"Y-m-d\\TH:i:S":inputType==="date"?"Y-m-d":"H:i:S";if(self2.selectedDates.length>0){self2.mobileInput.defaultValue=self2.mobileInput.value=self2.formatDate(self2.selectedDates[0],self2.mobileFormatStr)}if(self2.config.minDate)self2.mobileInput.min=self2.formatDate(self2.config.minDate,"Y-m-d");if(self2.config.maxDate)self2.mobileInput.max=self2.formatDate(self2.config.maxDate,"Y-m-d");if(self2.input.getAttribute("step"))self2.mobileInput.step=String(self2.input.getAttribute("step"));self2.input.type="hidden";if(self2.altInput!==void 0)self2.altInput.type="hidden";try{if(self2.input.parentNode)self2.input.parentNode.insertBefore(self2.mobileInput,self2.input.nextSibling)}catch(_a){}bind(self2.mobileInput,"change",(function(e){self2.setDate(getEventTarget(e).value,false,self2.mobileFormatStr);triggerEvent("onChange");triggerEvent("onClose")}))}function toggle(e){if(self2.isOpen===true)return self2.close();self2.open(e)}function triggerEvent(event,data){if(self2.config===void 0)return;var hooks=self2.config[event];if(hooks!==void 0&&hooks.length>0){for(var i=0;hooks[i]&&i<hooks.length;i++)hooks[i](self2.selectedDates,self2.input.value,self2,data)}if(event==="onChange"){self2.input.dispatchEvent(createEvent("change"));self2.input.dispatchEvent(createEvent("input"))}}function createEvent(name){var e=document.createEvent("Event");e.initEvent(name,true,true);return e}function isDateSelected(date){for(var i=0;i<self2.selectedDates.length;i++){var selectedDate=self2.selectedDates[i];if(selectedDate instanceof Date&&compareDates(selectedDate,date)===0)return""+i}return false}function isDateInRange(date){if(self2.config.mode!=="range"||self2.selectedDates.length<2)return false;return compareDates(date,self2.selectedDates[0])>=0&&compareDates(date,self2.selectedDates[1])<=0}function updateNavigationCurrentMonth(){if(self2.config.noCalendar||self2.isMobile||!self2.monthNav)return;self2.yearElements.forEach((function(yearElement,i){var d=new Date(self2.currentYear,self2.currentMonth,1);d.setMonth(self2.currentMonth+i);if(self2.config.showMonths>1||self2.config.monthSelectorType==="static"){self2.monthElements[i].textContent=monthToStr(d.getMonth(),self2.config.shorthandCurrentMonth,self2.l10n)+" "}else{self2.monthsDropdownContainer.value=d.getMonth().toString()}yearElement.value=d.getFullYear().toString()}));self2._hidePrevMonthArrow=self2.config.minDate!==void 0&&(self2.currentYear===self2.config.minDate.getFullYear()?self2.currentMonth<=self2.config.minDate.getMonth():self2.currentYear<self2.config.minDate.getFullYear());self2._hideNextMonthArrow=self2.config.maxDate!==void 0&&(self2.currentYear===self2.config.maxDate.getFullYear()?self2.currentMonth+1>self2.config.maxDate.getMonth():self2.currentYear>self2.config.maxDate.getFullYear())}function getDateStr(specificFormat){var format=specificFormat||(self2.config.altInput?self2.config.altFormat:self2.config.dateFormat);return self2.selectedDates.map((function(dObj){return self2.formatDate(dObj,format)})).filter((function(d,i,arr){return self2.config.mode!=="range"||self2.config.enableTime||arr.indexOf(d)===i})).join(self2.config.mode!=="range"?self2.config.conjunction:self2.l10n.rangeSeparator)}function updateValue(triggerChange2){if(triggerChange2===void 0){triggerChange2=true}if(self2.mobileInput!==void 0&&self2.mobileFormatStr){self2.mobileInput.value=self2.latestSelectedDateObj!==void 0?self2.formatDate(self2.latestSelectedDateObj,self2.mobileFormatStr):""}self2.input.value=getDateStr(self2.config.dateFormat);if(self2.altInput!==void 0){self2.altInput.value=getDateStr(self2.config.altFormat)}if(triggerChange2!==false)triggerEvent("onValueUpdate")}function onMonthNavClick(e){var eventTarget=getEventTarget(e);var isPrevMonth=self2.prevMonthNav.contains(eventTarget);var isNextMonth=self2.nextMonthNav.contains(eventTarget);if(isPrevMonth||isNextMonth){changeMonth(isPrevMonth?-1:1)}else if(self2.yearElements.indexOf(eventTarget)>=0){eventTarget.select()}else if(eventTarget.classList.contains("arrowUp")){self2.changeYear(self2.currentYear+1)}else if(eventTarget.classList.contains("arrowDown")){self2.changeYear(self2.currentYear-1)}}function timeWrapper(e){e.preventDefault();var isKeyDown=e.type==="keydown",eventTarget=getEventTarget(e),input=eventTarget;if(self2.amPM!==void 0&&eventTarget===self2.amPM){self2.amPM.textContent=self2.l10n.amPM[int(self2.amPM.textContent===self2.l10n.amPM[0])]}var min2=parseFloat(input.getAttribute("min")),max2=parseFloat(input.getAttribute("max")),step=parseFloat(input.getAttribute("step")),curValue=parseInt(input.value,10),delta=e.delta||(isKeyDown?e.which===38?1:-1:0);var newValue=curValue+step*delta;if(typeof input.value!=="undefined"&&input.value.length===2){var isHourElem=input===self2.hourElement,isMinuteElem=input===self2.minuteElement;if(newValue<min2){newValue=max2+newValue+int(!isHourElem)+(int(isHourElem)&&int(!self2.amPM));if(isMinuteElem)incrementNumInput(void 0,-1,self2.hourElement)}else if(newValue>max2){newValue=input===self2.hourElement?newValue-max2-int(!self2.amPM):min2;if(isMinuteElem)incrementNumInput(void 0,1,self2.hourElement)}if(self2.amPM&&isHourElem&&(step===1?newValue+curValue===23:Math.abs(newValue-curValue)>step)){self2.amPM.textContent=self2.l10n.amPM[int(self2.amPM.textContent===self2.l10n.amPM[0])]}input.value=pad(newValue)}}init();return self2}function _flatpickr(nodeList,config){var nodes=Array.prototype.slice.call(nodeList).filter((function(x){return x instanceof HTMLElement}));var instances=[];for(var i=0;i<nodes.length;i++){var node=nodes[i];try{if(node.getAttribute("data-fp-omit")!==null)continue;if(node._flatpickr!==void 0){node._flatpickr.destroy();node._flatpickr=void 0}node._flatpickr=FlatpickrInstance(node,config||{});instances.push(node._flatpickr)}catch(e){console.error(e)}}return instances.length===1?instances[0]:instances}if(typeof HTMLElement!=="undefined"&&typeof HTMLCollection!=="undefined"&&typeof NodeList!=="undefined"){HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(config){return _flatpickr(this,config)};HTMLElement.prototype.flatpickr=function(config){return _flatpickr([this],config)}}var flatpickr=function(selector,config){if(typeof selector==="string"){return _flatpickr(window.document.querySelectorAll(selector),config)}else if(selector instanceof Node){return _flatpickr([selector],config)}else{return _flatpickr(selector,config)}};flatpickr.defaultConfig={};flatpickr.l10ns={en:__assign({},english),default:__assign({},english)};flatpickr.localize=function(l10n){flatpickr.l10ns.default=__assign(__assign({},flatpickr.l10ns.default),l10n)};flatpickr.setDefaults=function(config){flatpickr.defaultConfig=__assign(__assign({},flatpickr.defaultConfig),config)};flatpickr.parseDate=createDateParser({});flatpickr.formatDate=createDateFormatter({});flatpickr.compareDates=compareDates;if(typeof jQuery!=="undefined"&&typeof jQuery.fn!=="undefined"){jQuery.fn.flatpickr=function(config){return _flatpickr(this,config)}}Date.prototype.fp_incr=function(days2){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof days2==="string"?parseInt(days2,10):days2))};if(typeof window!=="undefined"){window.flatpickr=flatpickr}var monthSelect={exports:{}};(function(module2,exports2){(function(global2,factory){module2.exports=factory()})(commonjsGlobal,(function(){
1
+ import{useState}from"react";var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x["default"]:x}function getAugmentedNamespace(n){if(n.__esModule)return n;var f=n.default;if(typeof f=="function"){var a=function a2(){if(this instanceof a2){return Reflect.construct(f,arguments,this.constructor)}return f.apply(this,arguments)};a.prototype=f.prototype}else a={};Object.defineProperty(a,"__esModule",{value:true});Object.keys(n).forEach((function(k){var d=Object.getOwnPropertyDescriptor(n,k);Object.defineProperty(a,k,d.get?d:{enumerable:true,get:function(){return n[k]}})}));return a}var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root=freeGlobal||freeSelf||Function("return this")();var Symbol$1=root.Symbol;var objectProto$i=Object.prototype;var hasOwnProperty$f=objectProto$i.hasOwnProperty;var nativeObjectToString$1=objectProto$i.toString;var symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0;function getRawTag(value){var isOwn=hasOwnProperty$f.call(value,symToStringTag$1),tag=value[symToStringTag$1];try{value[symToStringTag$1]=void 0;var unmasked=true}catch(e){}var result=nativeObjectToString$1.call(value);if(unmasked){if(isOwn){value[symToStringTag$1]=tag}else{delete value[symToStringTag$1]}}return result}var objectProto$h=Object.prototype;var nativeObjectToString=objectProto$h.toString;function objectToString(value){return nativeObjectToString.call(value)}var nullTag="[object Null]",undefinedTag="[object Undefined]";var symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag(value){if(value==null){return value===void 0?undefinedTag:nullTag}return symToStringTag&&symToStringTag in Object(value)?getRawTag(value):objectToString(value)}function isObjectLike(value){return value!=null&&typeof value=="object"}var symbolTag$3="[object Symbol]";function isSymbol(value){return typeof value=="symbol"||isObjectLike(value)&&baseGetTag(value)==symbolTag$3}function arrayMap(array,iteratee){var index=-1,length=array==null?0:array.length,result=Array(length);while(++index<length){result[index]=iteratee(array[index],index,array)}return result}var isArray=Array.isArray;var INFINITY$2=1/0;var symbolProto$2=Symbol$1?Symbol$1.prototype:void 0,symbolToString=symbolProto$2?symbolProto$2.toString:void 0;function baseToString(value){if(typeof value=="string"){return value}if(isArray(value)){return arrayMap(value,baseToString)+""}if(isSymbol(value)){return symbolToString?symbolToString.call(value):""}var result=value+"";return result=="0"&&1/value==-INFINITY$2?"-0":result}var reWhitespace=/\s/;function trimmedEndIndex(string){var index=string.length;while(index--&&reWhitespace.test(string.charAt(index))){}return index}var reTrimStart=/^\s+/;function baseTrim(string){return string?string.slice(0,trimmedEndIndex(string)+1).replace(reTrimStart,""):string}function isObject(value){var type=typeof value;return value!=null&&(type=="object"||type=="function")}var NAN=0/0;var reIsBadHex=/^[-+]0x[0-9a-f]+$/i;var reIsBinary=/^0b[01]+$/i;var reIsOctal=/^0o[0-7]+$/i;var freeParseInt=parseInt;function toNumber(value){if(typeof value=="number"){return value}if(isSymbol(value)){return NAN}if(isObject(value)){var other=typeof value.valueOf=="function"?value.valueOf():value;value=isObject(other)?other+"":other}if(typeof value!="string"){return value===0?value:+value}value=baseTrim(value);var isBinary=reIsBinary.test(value);return isBinary||reIsOctal.test(value)?freeParseInt(value.slice(2),isBinary?2:8):reIsBadHex.test(value)?NAN:+value}var INFINITY$1=1/0,MAX_INTEGER=17976931348623157e292;function toFinite(value){if(!value){return value===0?value:0}value=toNumber(value);if(value===INFINITY$1||value===-INFINITY$1){var sign=value<0?-1:1;return sign*MAX_INTEGER}return value===value?value:0}function toInteger(value){var result=toFinite(value),remainder=result%1;return result===result?remainder?result-remainder:result:0}function identity(value){return value}var asyncTag="[object AsyncFunction]",funcTag$2="[object Function]",genTag$1="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(value){if(!isObject(value)){return false}var tag=baseGetTag(value);return tag==funcTag$2||tag==genTag$1||tag==asyncTag||tag==proxyTag}var coreJsData=root["__core-js_shared__"];var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}();function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}var funcProto$2=Function.prototype;var funcToString$2=funcProto$2.toString;function toSource(func){if(func!=null){try{return funcToString$2.call(func)}catch(e){}try{return func+""}catch(e){}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g;var reIsHostCtor=/^\[object .+?Constructor\]$/;var funcProto$1=Function.prototype,objectProto$g=Object.prototype;var funcToString$1=funcProto$1.toString;var hasOwnProperty$e=objectProto$g.hasOwnProperty;var reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$e).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false}var pattern=isFunction(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function getValue(object,key){return object==null?void 0:object[key]}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:void 0}var WeakMap=getNative(root,"WeakMap");var metaMap=WeakMap&&new WeakMap;var baseSetData=!metaMap?identity:function(func,data){metaMap.set(func,data);return func};var objectCreate=Object.create;var baseCreate=function(){function object(){}return function(proto){if(!isObject(proto)){return{}}if(objectCreate){return objectCreate(proto)}object.prototype=proto;var result=new object;object.prototype=void 0;return result}}();function createCtor(Ctor){return function(){var args=arguments;switch(args.length){case 0:return new Ctor;case 1:return new Ctor(args[0]);case 2:return new Ctor(args[0],args[1]);case 3:return new Ctor(args[0],args[1],args[2]);case 4:return new Ctor(args[0],args[1],args[2],args[3]);case 5:return new Ctor(args[0],args[1],args[2],args[3],args[4]);case 6:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5]);case 7:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5],args[6])}var thisBinding=baseCreate(Ctor.prototype),result=Ctor.apply(thisBinding,args);return isObject(result)?result:thisBinding}}var WRAP_BIND_FLAG$6=1;function createBind(func,bitmask,thisArg){var isBind=bitmask&WRAP_BIND_FLAG$6,Ctor=createCtor(func);function wrapper(){var fn2=this&&this!==root&&this instanceof wrapper?Ctor:func;return fn2.apply(isBind?thisArg:this,arguments)}return wrapper}function apply(func,thisArg,args){switch(args.length){case 0:return func.call(thisArg);case 1:return func.call(thisArg,args[0]);case 2:return func.call(thisArg,args[0],args[1]);case 3:return func.call(thisArg,args[0],args[1],args[2])}return func.apply(thisArg,args)}var nativeMax$5=Math.max;function composeArgs(args,partials,holders,isCurried){var argsIndex=-1,argsLength=args.length,holdersLength=holders.length,leftIndex=-1,leftLength=partials.length,rangeLength=nativeMax$5(argsLength-holdersLength,0),result=Array(leftLength+rangeLength),isUncurried=!isCurried;while(++leftIndex<leftLength){result[leftIndex]=partials[leftIndex]}while(++argsIndex<holdersLength){if(isUncurried||argsIndex<argsLength){result[holders[argsIndex]]=args[argsIndex]}}while(rangeLength--){result[leftIndex++]=args[argsIndex++]}return result}var nativeMax$4=Math.max;function composeArgsRight(args,partials,holders,isCurried){var argsIndex=-1,argsLength=args.length,holdersIndex=-1,holdersLength=holders.length,rightIndex=-1,rightLength=partials.length,rangeLength=nativeMax$4(argsLength-holdersLength,0),result=Array(rangeLength+rightLength),isUncurried=!isCurried;while(++argsIndex<rangeLength){result[argsIndex]=args[argsIndex]}var offset2=argsIndex;while(++rightIndex<rightLength){result[offset2+rightIndex]=partials[rightIndex]}while(++holdersIndex<holdersLength){if(isUncurried||argsIndex<argsLength){result[offset2+holders[holdersIndex]]=args[argsIndex++]}}return result}function countHolders(array,placeholder){var length=array.length,result=0;while(length--){if(array[length]===placeholder){++result}}return result}function baseLodash(){}var MAX_ARRAY_LENGTH=4294967295;function LazyWrapper(value){this.__wrapped__=value;this.__actions__=[];this.__dir__=1;this.__filtered__=false;this.__iteratees__=[];this.__takeCount__=MAX_ARRAY_LENGTH;this.__views__=[]}LazyWrapper.prototype=baseCreate(baseLodash.prototype);LazyWrapper.prototype.constructor=LazyWrapper;function noop(){}var getData=!metaMap?noop:function(func){return metaMap.get(func)};var realNames={};var objectProto$f=Object.prototype;var hasOwnProperty$d=objectProto$f.hasOwnProperty;function getFuncName(func){var result=func.name+"",array=realNames[result],length=hasOwnProperty$d.call(realNames,result)?array.length:0;while(length--){var data=array[length],otherFunc=data.func;if(otherFunc==null||otherFunc==func){return data.name}}return result}function LodashWrapper(value,chainAll){this.__wrapped__=value;this.__actions__=[];this.__chain__=!!chainAll;this.__index__=0;this.__values__=void 0}LodashWrapper.prototype=baseCreate(baseLodash.prototype);LodashWrapper.prototype.constructor=LodashWrapper;function copyArray(source,array){var index=-1,length=source.length;array||(array=Array(length));while(++index<length){array[index]=source[index]}return array}function wrapperClone(wrapper){if(wrapper instanceof LazyWrapper){return wrapper.clone()}var result=new LodashWrapper(wrapper.__wrapped__,wrapper.__chain__);result.__actions__=copyArray(wrapper.__actions__);result.__index__=wrapper.__index__;result.__values__=wrapper.__values__;return result}var objectProto$e=Object.prototype;var hasOwnProperty$c=objectProto$e.hasOwnProperty;function lodash(value){if(isObjectLike(value)&&!isArray(value)&&!(value instanceof LazyWrapper)){if(value instanceof LodashWrapper){return value}if(hasOwnProperty$c.call(value,"__wrapped__")){return wrapperClone(value)}}return new LodashWrapper(value)}lodash.prototype=baseLodash.prototype;lodash.prototype.constructor=lodash;function isLaziable(func){var funcName=getFuncName(func),other=lodash[funcName];if(typeof other!="function"||!(funcName in LazyWrapper.prototype)){return false}if(func===other){return true}var data=getData(other);return!!data&&func===data[0]}var HOT_COUNT=800,HOT_SPAN=16;var nativeNow=Date.now;function shortOut(func){var count=0,lastCalled=0;return function(){var stamp=nativeNow(),remaining=HOT_SPAN-(stamp-lastCalled);lastCalled=stamp;if(remaining>0){if(++count>=HOT_COUNT){return arguments[0]}}else{count=0}return func.apply(void 0,arguments)}}var setData=shortOut(baseSetData);var reWrapDetails=/\{\n\/\* \[wrapped with (.+)\] \*/,reSplitDetails=/,? & /;function getWrapDetails(source){var match=source.match(reWrapDetails);return match?match[1].split(reSplitDetails):[]}var reWrapComment=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function insertWrapDetails(source,details){var length=details.length;if(!length){return source}var lastIndex=length-1;details[lastIndex]=(length>1?"& ":"")+details[lastIndex];details=details.join(length>2?", ":" ");return source.replace(reWrapComment,"{\n/* [wrapped with "+details+"] */\n")}function constant(value){return function(){return value}}var defineProperty=function(){try{var func=getNative(Object,"defineProperty");func({},"",{});return func}catch(e){}}();var baseSetToString=!defineProperty?identity:function(func,string){return defineProperty(func,"toString",{configurable:true,enumerable:false,value:constant(string),writable:true})};var setToString=shortOut(baseSetToString);function arrayEach(array,iteratee){var index=-1,length=array==null?0:array.length;while(++index<length){if(iteratee(array[index],index,array)===false){break}}return array}function baseFindIndex(array,predicate,fromIndex,fromRight){var length=array.length,index=fromIndex+-1;while(++index<length){if(predicate(array[index],index,array)){return index}}return-1}function baseIsNaN(value){return value!==value}function strictIndexOf(array,value,fromIndex){var index=fromIndex-1,length=array.length;while(++index<length){if(array[index]===value){return index}}return-1}function baseIndexOf(array,value,fromIndex){return value===value?strictIndexOf(array,value,fromIndex):baseFindIndex(array,baseIsNaN,fromIndex)}function arrayIncludes(array,value){var length=array==null?0:array.length;return!!length&&baseIndexOf(array,value,0)>-1}var WRAP_BIND_FLAG$5=1,WRAP_BIND_KEY_FLAG$4=2,WRAP_CURRY_FLAG$4=8,WRAP_CURRY_RIGHT_FLAG$2=16,WRAP_PARTIAL_FLAG$3=32,WRAP_PARTIAL_RIGHT_FLAG$2=64,WRAP_ARY_FLAG$2=128,WRAP_REARG_FLAG$1=256,WRAP_FLIP_FLAG$1=512;var wrapFlags=[["ary",WRAP_ARY_FLAG$2],["bind",WRAP_BIND_FLAG$5],["bindKey",WRAP_BIND_KEY_FLAG$4],["curry",WRAP_CURRY_FLAG$4],["curryRight",WRAP_CURRY_RIGHT_FLAG$2],["flip",WRAP_FLIP_FLAG$1],["partial",WRAP_PARTIAL_FLAG$3],["partialRight",WRAP_PARTIAL_RIGHT_FLAG$2],["rearg",WRAP_REARG_FLAG$1]];function updateWrapDetails(details,bitmask){arrayEach(wrapFlags,(function(pair){var value="_."+pair[0];if(bitmask&pair[1]&&!arrayIncludes(details,value)){details.push(value)}}));return details.sort()}function setWrapToString(wrapper,reference2,bitmask){var source=reference2+"";return setToString(wrapper,insertWrapDetails(source,updateWrapDetails(getWrapDetails(source),bitmask)))}var WRAP_BIND_FLAG$4=1,WRAP_BIND_KEY_FLAG$3=2,WRAP_CURRY_BOUND_FLAG$1=4,WRAP_CURRY_FLAG$3=8,WRAP_PARTIAL_FLAG$2=32,WRAP_PARTIAL_RIGHT_FLAG$1=64;function createRecurry(func,bitmask,wrapFunc,placeholder,thisArg,partials,holders,argPos,ary,arity){var isCurry=bitmask&WRAP_CURRY_FLAG$3,newHolders=isCurry?holders:void 0,newHoldersRight=isCurry?void 0:holders,newPartials=isCurry?partials:void 0,newPartialsRight=isCurry?void 0:partials;bitmask|=isCurry?WRAP_PARTIAL_FLAG$2:WRAP_PARTIAL_RIGHT_FLAG$1;bitmask&=~(isCurry?WRAP_PARTIAL_RIGHT_FLAG$1:WRAP_PARTIAL_FLAG$2);if(!(bitmask&WRAP_CURRY_BOUND_FLAG$1)){bitmask&=~(WRAP_BIND_FLAG$4|WRAP_BIND_KEY_FLAG$3)}var newData=[func,bitmask,thisArg,newPartials,newHolders,newPartialsRight,newHoldersRight,argPos,ary,arity];var result=wrapFunc.apply(void 0,newData);if(isLaziable(func)){setData(result,newData)}result.placeholder=placeholder;return setWrapToString(result,func,bitmask)}function getHolder(func){var object=func;return object.placeholder}var MAX_SAFE_INTEGER$1=9007199254740991;var reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(value,length){var type=typeof value;length=length==null?MAX_SAFE_INTEGER$1:length;return!!length&&(type=="number"||type!="symbol"&&reIsUint.test(value))&&(value>-1&&value%1==0&&value<length)}var nativeMin$2=Math.min;function reorder(array,indexes){var arrLength=array.length,length=nativeMin$2(indexes.length,arrLength),oldArray=copyArray(array);while(length--){var index=indexes[length];array[length]=isIndex(index,arrLength)?oldArray[index]:void 0}return array}var PLACEHOLDER$1="__lodash_placeholder__";function replaceHolders(array,placeholder){var index=-1,length=array.length,resIndex=0,result=[];while(++index<length){var value=array[index];if(value===placeholder||value===PLACEHOLDER$1){array[index]=PLACEHOLDER$1;result[resIndex++]=index}}return result}var WRAP_BIND_FLAG$3=1,WRAP_BIND_KEY_FLAG$2=2,WRAP_CURRY_FLAG$2=8,WRAP_CURRY_RIGHT_FLAG$1=16,WRAP_ARY_FLAG$1=128,WRAP_FLIP_FLAG=512;function createHybrid(func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity){var isAry=bitmask&WRAP_ARY_FLAG$1,isBind=bitmask&WRAP_BIND_FLAG$3,isBindKey=bitmask&WRAP_BIND_KEY_FLAG$2,isCurried=bitmask&(WRAP_CURRY_FLAG$2|WRAP_CURRY_RIGHT_FLAG$1),isFlip=bitmask&WRAP_FLIP_FLAG,Ctor=isBindKey?void 0:createCtor(func);function wrapper(){var length=arguments.length,args=Array(length),index=length;while(index--){args[index]=arguments[index]}if(isCurried){var placeholder=getHolder(wrapper),holdersCount=countHolders(args,placeholder)}if(partials){args=composeArgs(args,partials,holders,isCurried)}if(partialsRight){args=composeArgsRight(args,partialsRight,holdersRight,isCurried)}length-=holdersCount;if(isCurried&&length<arity){var newHolders=replaceHolders(args,placeholder);return createRecurry(func,bitmask,createHybrid,wrapper.placeholder,thisArg,args,newHolders,argPos,ary,arity-length)}var thisBinding=isBind?thisArg:this,fn2=isBindKey?thisBinding[func]:func;length=args.length;if(argPos){args=reorder(args,argPos)}else if(isFlip&&length>1){args.reverse()}if(isAry&&ary<length){args.length=ary}if(this&&this!==root&&this instanceof wrapper){fn2=Ctor||createCtor(fn2)}return fn2.apply(thisBinding,args)}return wrapper}function createCurry(func,bitmask,arity){var Ctor=createCtor(func);function wrapper(){var length=arguments.length,args=Array(length),index=length,placeholder=getHolder(wrapper);while(index--){args[index]=arguments[index]}var holders=length<3&&args[0]!==placeholder&&args[length-1]!==placeholder?[]:replaceHolders(args,placeholder);length-=holders.length;if(length<arity){return createRecurry(func,bitmask,createHybrid,wrapper.placeholder,void 0,args,holders,void 0,void 0,arity-length)}var fn2=this&&this!==root&&this instanceof wrapper?Ctor:func;return apply(fn2,this,args)}return wrapper}var WRAP_BIND_FLAG$2=1;function createPartial(func,bitmask,thisArg,partials){var isBind=bitmask&WRAP_BIND_FLAG$2,Ctor=createCtor(func);function wrapper(){var argsIndex=-1,argsLength=arguments.length,leftIndex=-1,leftLength=partials.length,args=Array(leftLength+argsLength),fn2=this&&this!==root&&this instanceof wrapper?Ctor:func;while(++leftIndex<leftLength){args[leftIndex]=partials[leftIndex]}while(argsLength--){args[leftIndex++]=arguments[++argsIndex]}return apply(fn2,isBind?thisArg:this,args)}return wrapper}var PLACEHOLDER="__lodash_placeholder__";var WRAP_BIND_FLAG$1=1,WRAP_BIND_KEY_FLAG$1=2,WRAP_CURRY_BOUND_FLAG=4,WRAP_CURRY_FLAG$1=8,WRAP_ARY_FLAG=128,WRAP_REARG_FLAG=256;var nativeMin$1=Math.min;function mergeData(data,source){var bitmask=data[1],srcBitmask=source[1],newBitmask=bitmask|srcBitmask,isCommon=newBitmask<(WRAP_BIND_FLAG$1|WRAP_BIND_KEY_FLAG$1|WRAP_ARY_FLAG);var isCombo=srcBitmask==WRAP_ARY_FLAG&&bitmask==WRAP_CURRY_FLAG$1||srcBitmask==WRAP_ARY_FLAG&&bitmask==WRAP_REARG_FLAG&&data[7].length<=source[8]||srcBitmask==(WRAP_ARY_FLAG|WRAP_REARG_FLAG)&&source[7].length<=source[8]&&bitmask==WRAP_CURRY_FLAG$1;if(!(isCommon||isCombo)){return data}if(srcBitmask&WRAP_BIND_FLAG$1){data[2]=source[2];newBitmask|=bitmask&WRAP_BIND_FLAG$1?0:WRAP_CURRY_BOUND_FLAG}var value=source[3];if(value){var partials=data[3];data[3]=partials?composeArgs(partials,value,source[4]):value;data[4]=partials?replaceHolders(data[3],PLACEHOLDER):source[4]}value=source[5];if(value){partials=data[5];data[5]=partials?composeArgsRight(partials,value,source[6]):value;data[6]=partials?replaceHolders(data[5],PLACEHOLDER):source[6]}value=source[7];if(value){data[7]=value}if(srcBitmask&WRAP_ARY_FLAG){data[8]=data[8]==null?source[8]:nativeMin$1(data[8],source[8])}if(data[9]==null){data[9]=source[9]}data[0]=source[0];data[1]=newBitmask;return data}var FUNC_ERROR_TEXT$3="Expected a function";var WRAP_BIND_FLAG=1,WRAP_BIND_KEY_FLAG=2,WRAP_CURRY_FLAG=8,WRAP_CURRY_RIGHT_FLAG=16,WRAP_PARTIAL_FLAG$1=32,WRAP_PARTIAL_RIGHT_FLAG=64;var nativeMax$3=Math.max;function createWrap(func,bitmask,thisArg,partials,holders,argPos,ary,arity){var isBindKey=bitmask&WRAP_BIND_KEY_FLAG;if(!isBindKey&&typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT$3)}var length=partials?partials.length:0;if(!length){bitmask&=~(WRAP_PARTIAL_FLAG$1|WRAP_PARTIAL_RIGHT_FLAG);partials=holders=void 0}ary=ary===void 0?ary:nativeMax$3(toInteger(ary),0);arity=arity===void 0?arity:toInteger(arity);length-=holders?holders.length:0;if(bitmask&WRAP_PARTIAL_RIGHT_FLAG){var partialsRight=partials,holdersRight=holders;partials=holders=void 0}var data=isBindKey?void 0:getData(func);var newData=[func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity];if(data){mergeData(newData,data)}func=newData[0];bitmask=newData[1];thisArg=newData[2];partials=newData[3];holders=newData[4];arity=newData[9]=newData[9]===void 0?isBindKey?0:func.length:nativeMax$3(newData[9]-length,0);if(!arity&&bitmask&(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG)){bitmask&=~(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG)}if(!bitmask||bitmask==WRAP_BIND_FLAG){var result=createBind(func,bitmask,thisArg)}else if(bitmask==WRAP_CURRY_FLAG||bitmask==WRAP_CURRY_RIGHT_FLAG){result=createCurry(func,bitmask,arity)}else if((bitmask==WRAP_PARTIAL_FLAG$1||bitmask==(WRAP_BIND_FLAG|WRAP_PARTIAL_FLAG$1))&&!holders.length){result=createPartial(func,bitmask,thisArg,partials)}else{result=createHybrid.apply(void 0,newData)}var setter=data?baseSetData:setData;return setWrapToString(setter(result,newData),func,bitmask)}function baseAssignValue(object,key,value){if(key=="__proto__"&&defineProperty){defineProperty(object,key,{configurable:true,enumerable:true,value:value,writable:true})}else{object[key]=value}}function eq(value,other){return value===other||value!==value&&other!==other}var objectProto$d=Object.prototype;var hasOwnProperty$b=objectProto$d.hasOwnProperty;function assignValue(object,key,value){var objValue=object[key];if(!(hasOwnProperty$b.call(object,key)&&eq(objValue,value))||value===void 0&&!(key in object)){baseAssignValue(object,key,value)}}function copyObject(source,props,object,customizer){var isNew=!object;object||(object={});var index=-1,length=props.length;while(++index<length){var key=props[index];var newValue=void 0;if(newValue===void 0){newValue=source[key]}if(isNew){baseAssignValue(object,key,newValue)}else{assignValue(object,key,newValue)}}return object}var nativeMax$2=Math.max;function overRest(func,start2,transform){start2=nativeMax$2(start2===void 0?func.length-1:start2,0);return function(){var args=arguments,index=-1,length=nativeMax$2(args.length-start2,0),array=Array(length);while(++index<length){array[index]=args[start2+index]}index=-1;var otherArgs=Array(start2+1);while(++index<start2){otherArgs[index]=args[index]}otherArgs[start2]=transform(array);return apply(func,this,otherArgs)}}function baseRest(func,start2){return setToString(overRest(func,start2,identity),func+"")}var MAX_SAFE_INTEGER=9007199254740991;function isLength(value){return typeof value=="number"&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value)}function isIterateeCall(value,index,object){if(!isObject(object)){return false}var type=typeof index;if(type=="number"?isArrayLike(object)&&isIndex(index,object.length):type=="string"&&index in object){return eq(object[index],value)}return false}function createAssigner(assigner){return baseRest((function(object,sources){var index=-1,length=sources.length,customizer=length>1?sources[length-1]:void 0,guard=length>2?sources[2]:void 0;customizer=assigner.length>3&&typeof customizer=="function"?(length--,customizer):void 0;if(guard&&isIterateeCall(sources[0],sources[1],guard)){customizer=length<3?void 0:customizer;length=1}object=Object(object);while(++index<length){var source=sources[index];if(source){assigner(object,source,index,customizer)}}return object}))}var objectProto$c=Object.prototype;function isPrototype(value){var Ctor=value&&value.constructor,proto=typeof Ctor=="function"&&Ctor.prototype||objectProto$c;return value===proto}function baseTimes(n,iteratee){var index=-1,result=Array(n);while(++index<n){result[index]=iteratee(index)}return result}var argsTag$3="[object Arguments]";function baseIsArguments(value){return isObjectLike(value)&&baseGetTag(value)==argsTag$3}var objectProto$b=Object.prototype;var hasOwnProperty$a=objectProto$b.hasOwnProperty;var propertyIsEnumerable$1=objectProto$b.propertyIsEnumerable;var isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(value){return isObjectLike(value)&&hasOwnProperty$a.call(value,"callee")&&!propertyIsEnumerable$1.call(value,"callee")};function stubFalse(){return false}var freeExports$2=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var freeModule$2=freeExports$2&&typeof module=="object"&&module&&!module.nodeType&&module;var moduleExports$2=freeModule$2&&freeModule$2.exports===freeExports$2;var Buffer$1=moduleExports$2?root.Buffer:void 0;var nativeIsBuffer=Buffer$1?Buffer$1.isBuffer:void 0;var isBuffer=nativeIsBuffer||stubFalse;var argsTag$2="[object Arguments]",arrayTag$2="[object Array]",boolTag$3="[object Boolean]",dateTag$3="[object Date]",errorTag$2="[object Error]",funcTag$1="[object Function]",mapTag$6="[object Map]",numberTag$3="[object Number]",objectTag$4="[object Object]",regexpTag$3="[object RegExp]",setTag$6="[object Set]",stringTag$4="[object String]",weakMapTag$2="[object WeakMap]";var arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]";var typedArrayTags={};typedArrayTags[float32Tag$2]=typedArrayTags[float64Tag$2]=typedArrayTags[int8Tag$2]=typedArrayTags[int16Tag$2]=typedArrayTags[int32Tag$2]=typedArrayTags[uint8Tag$2]=typedArrayTags[uint8ClampedTag$2]=typedArrayTags[uint16Tag$2]=typedArrayTags[uint32Tag$2]=true;typedArrayTags[argsTag$2]=typedArrayTags[arrayTag$2]=typedArrayTags[arrayBufferTag$3]=typedArrayTags[boolTag$3]=typedArrayTags[dataViewTag$4]=typedArrayTags[dateTag$3]=typedArrayTags[errorTag$2]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag$6]=typedArrayTags[numberTag$3]=typedArrayTags[objectTag$4]=typedArrayTags[regexpTag$3]=typedArrayTags[setTag$6]=typedArrayTags[stringTag$4]=typedArrayTags[weakMapTag$2]=false;function baseIsTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[baseGetTag(value)]}function baseUnary(func){return function(value){return func(value)}}var freeExports$1=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var freeModule$1=freeExports$1&&typeof module=="object"&&module&&!module.nodeType&&module;var moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1;var freeProcess=moduleExports$1&&freeGlobal.process;var nodeUtil=function(){try{var types=freeModule$1&&freeModule$1.require&&freeModule$1.require("util").types;if(types){return types}return freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch(e){}}();var nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray;var isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;var objectProto$a=Object.prototype;var hasOwnProperty$9=objectProto$a.hasOwnProperty;function arrayLikeKeys(value,inherited){var isArr=isArray(value),isArg=!isArr&&isArguments(value),isBuff=!isArr&&!isArg&&isBuffer(value),isType=!isArr&&!isArg&&!isBuff&&isTypedArray(value),skipIndexes=isArr||isArg||isBuff||isType,result=skipIndexes?baseTimes(value.length,String):[],length=result.length;for(var key in value){if((inherited||hasOwnProperty$9.call(value,key))&&!(skipIndexes&&(key=="length"||isBuff&&(key=="offset"||key=="parent")||isType&&(key=="buffer"||key=="byteLength"||key=="byteOffset")||isIndex(key,length)))){result.push(key)}}return result}function overArg(func,transform){return function(arg){return func(transform(arg))}}var nativeKeys=overArg(Object.keys,Object);var objectProto$9=Object.prototype;var hasOwnProperty$8=objectProto$9.hasOwnProperty;function baseKeys(object){if(!isPrototype(object)){return nativeKeys(object)}var result=[];for(var key in Object(object)){if(hasOwnProperty$8.call(object,key)&&key!="constructor"){result.push(key)}}return result}function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}function nativeKeysIn(object){var result=[];if(object!=null){for(var key in Object(object)){result.push(key)}}return result}var objectProto$8=Object.prototype;var hasOwnProperty$7=objectProto$8.hasOwnProperty;function baseKeysIn(object){if(!isObject(object)){return nativeKeysIn(object)}var isProto=isPrototype(object),result=[];for(var key in object){if(!(key=="constructor"&&(isProto||!hasOwnProperty$7.call(object,key)))){result.push(key)}}return result}function keysIn(object){return isArrayLike(object)?arrayLikeKeys(object,true):baseKeysIn(object)}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(value,object){if(isArray(value)){return false}var type=typeof value;if(type=="number"||type=="symbol"||type=="boolean"||value==null||isSymbol(value)){return true}return reIsPlainProp.test(value)||!reIsDeepProp.test(value)||object!=null&&value in Object(object)}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{};this.size=0}function hashDelete(key){var result=this.has(key)&&delete this.__data__[key];this.size-=result?1:0;return result}var HASH_UNDEFINED$2="__lodash_hash_undefined__";var objectProto$7=Object.prototype;var hasOwnProperty$6=objectProto$7.hasOwnProperty;function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED$2?void 0:result}return hasOwnProperty$6.call(data,key)?data[key]:void 0}var objectProto$6=Object.prototype;var hasOwnProperty$5=objectProto$6.hasOwnProperty;function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==void 0:hasOwnProperty$5.call(data,key)}var HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet(key,value){var data=this.__data__;this.size+=this.has(key)?0:1;data[key]=nativeCreate&&value===void 0?HASH_UNDEFINED$1:value;return this}function Hash(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}Hash.prototype.clear=hashClear;Hash.prototype["delete"]=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function listCacheClear(){this.__data__=[];this.size=0}function assocIndexOf(array,key){var length=array.length;while(length--){if(eq(array[length][0],key)){return length}}return-1}var arrayProto=Array.prototype;var splice=arrayProto.splice;function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){return false}var lastIndex=data.length-1;if(index==lastIndex){data.pop()}else{splice.call(data,index,1)}--this.size;return true}function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?void 0:data[index][1]}function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){++this.size;data.push([key,value])}else{data[index][1]=value}return this}function ListCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;var Map$1=getNative(root,"Map");function mapCacheClear(){this.size=0;this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function isKeyable(value){var type=typeof value;return type=="string"||type=="number"||type=="symbol"||type=="boolean"?value!=="__proto__":value===null}function getMapData(map2,key){var data=map2.__data__;return isKeyable(key)?data[typeof key=="string"?"string":"hash"]:data.map}function mapCacheDelete(key){var result=getMapData(this,key)["delete"](key);this.size-=result?1:0;return result}function mapCacheGet(key){return getMapData(this,key).get(key)}function mapCacheHas(key){return getMapData(this,key).has(key)}function mapCacheSet(key,value){var data=getMapData(this,key),size=data.size;data.set(key,value);this.size+=data.size==size?0:1;return this}function MapCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}MapCache.prototype.clear=mapCacheClear;MapCache.prototype["delete"]=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT$2="Expected a function";function memoize(func,resolver){if(typeof func!="function"||resolver!=null&&typeof resolver!="function"){throw new TypeError(FUNC_ERROR_TEXT$2)}var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key)){return cache.get(key)}var result=func.apply(this,args);memoized.cache=cache.set(key,result)||cache;return result};memoized.cache=new(memoize.Cache||MapCache);return memoized}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(func){var result=memoize(func,(function(key){if(cache.size===MAX_MEMOIZE_SIZE){cache.clear()}return key}));var cache=result.cache;return result}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var reEscapeChar=/\\(\\)?/g;var stringToPath=memoizeCapped((function(string){var result=[];if(string.charCodeAt(0)===46){result.push("")}string.replace(rePropName,(function(match,number,quote,subString){result.push(quote?subString.replace(reEscapeChar,"$1"):number||match)}));return result}));function toString(value){return value==null?"":baseToString(value)}function castPath(value,object){if(isArray(value)){return value}return isKey(value,object)?[value]:stringToPath(toString(value))}var INFINITY=1/0;function toKey(value){if(typeof value=="string"||isSymbol(value)){return value}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}function baseGet(object,path){path=castPath(path,object);var index=0,length=path.length;while(object!=null&&index<length){object=object[toKey(path[index++])]}return index&&index==length?object:void 0}function get(object,path,defaultValue){var result=object==null?void 0:baseGet(object,path);return result===void 0?defaultValue:result}function arrayPush(array,values){var index=-1,length=values.length,offset2=array.length;while(++index<length){array[offset2+index]=values[index]}return array}var spreadableSymbol=Symbol$1?Symbol$1.isConcatSpreadable:void 0;function isFlattenable(value){return isArray(value)||isArguments(value)||!!(spreadableSymbol&&value&&value[spreadableSymbol])}function baseFlatten(array,depth,predicate,isStrict,result){var index=-1,length=array.length;predicate||(predicate=isFlattenable);result||(result=[]);while(++index<length){var value=array[index];if(predicate(value)){{arrayPush(result,value)}}else{result[result.length]=value}}return result}function flatten(array){var length=array==null?0:array.length;return length?baseFlatten(array):[]}function flatRest(func){return setToString(overRest(func,void 0,flatten),func+"")}var getPrototype=overArg(Object.getPrototypeOf,Object);var objectTag$3="[object Object]";var funcProto=Function.prototype,objectProto$5=Object.prototype;var funcToString=funcProto.toString;var hasOwnProperty$4=objectProto$5.hasOwnProperty;var objectCtorString=funcToString.call(Object);function isPlainObject(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag$3){return false}var proto=getPrototype(value);if(proto===null){return true}var Ctor=hasOwnProperty$4.call(proto,"constructor")&&proto.constructor;return typeof Ctor=="function"&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString}function baseSlice(array,start2,end2){var index=-1,length=array.length;if(start2<0){start2=-start2>length?0:length+start2}end2=end2>length?length:end2;if(end2<0){end2+=length}length=start2>end2?0:end2-start2>>>0;start2>>>=0;var result=Array(length);while(++index<length){result[index]=array[index+start2]}return result}function stackClear(){this.__data__=new ListCache;this.size=0}function stackDelete(key){var data=this.__data__,result=data["delete"](key);this.size=data.size;return result}function stackGet(key){return this.__data__.get(key)}function stackHas(key){return this.__data__.has(key)}var LARGE_ARRAY_SIZE=200;function stackSet(key,value){var data=this.__data__;if(data instanceof ListCache){var pairs=data.__data__;if(!Map$1||pairs.length<LARGE_ARRAY_SIZE-1){pairs.push([key,value]);this.size=++data.size;return this}data=this.__data__=new MapCache(pairs)}data.set(key,value);this.size=data.size;return this}function Stack(entries){var data=this.__data__=new ListCache(entries);this.size=data.size}Stack.prototype.clear=stackClear;Stack.prototype["delete"]=stackDelete;Stack.prototype.get=stackGet;Stack.prototype.has=stackHas;Stack.prototype.set=stackSet;function baseAssign(object,source){return object&&copyObject(source,keys(source),object)}function baseAssignIn(object,source){return object&&copyObject(source,keysIn(source),object)}var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module;var moduleExports=freeModule&&freeModule.exports===freeExports;var Buffer=moduleExports?root.Buffer:void 0,allocUnsafe=Buffer?Buffer.allocUnsafe:void 0;function cloneBuffer(buffer,isDeep){if(isDeep){return buffer.slice()}var length=buffer.length,result=allocUnsafe?allocUnsafe(length):new buffer.constructor(length);buffer.copy(result);return result}function arrayFilter(array,predicate){var index=-1,length=array==null?0:array.length,resIndex=0,result=[];while(++index<length){var value=array[index];if(predicate(value,index,array)){result[resIndex++]=value}}return result}function stubArray(){return[]}var objectProto$4=Object.prototype;var propertyIsEnumerable=objectProto$4.propertyIsEnumerable;var nativeGetSymbols$1=Object.getOwnPropertySymbols;var getSymbols=!nativeGetSymbols$1?stubArray:function(object){if(object==null){return[]}object=Object(object);return arrayFilter(nativeGetSymbols$1(object),(function(symbol){return propertyIsEnumerable.call(object,symbol)}))};function copySymbols(source,object){return copyObject(source,getSymbols(source),object)}var nativeGetSymbols=Object.getOwnPropertySymbols;var getSymbolsIn=!nativeGetSymbols?stubArray:function(object){var result=[];while(object){arrayPush(result,getSymbols(object));object=getPrototype(object)}return result};function copySymbolsIn(source,object){return copyObject(source,getSymbolsIn(source),object)}function baseGetAllKeys(object,keysFunc,symbolsFunc){var result=keysFunc(object);return isArray(object)?result:arrayPush(result,symbolsFunc(object))}function getAllKeys(object){return baseGetAllKeys(object,keys,getSymbols)}function getAllKeysIn(object){return baseGetAllKeys(object,keysIn,getSymbolsIn)}var DataView=getNative(root,"DataView");var Promise$1=getNative(root,"Promise");var Set$1=getNative(root,"Set");var mapTag$5="[object Map]",objectTag$2="[object Object]",promiseTag="[object Promise]",setTag$5="[object Set]",weakMapTag$1="[object WeakMap]";var dataViewTag$3="[object DataView]";var dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$1),weakMapCtorString=toSource(WeakMap);var getTag=baseGetTag;if(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag$3||Map$1&&getTag(new Map$1)!=mapTag$5||Promise$1&&getTag(Promise$1.resolve())!=promiseTag||Set$1&&getTag(new Set$1)!=setTag$5||WeakMap&&getTag(new WeakMap)!=weakMapTag$1){getTag=function(value){var result=baseGetTag(value),Ctor=result==objectTag$2?value.constructor:void 0,ctorString=Ctor?toSource(Ctor):"";if(ctorString){switch(ctorString){case dataViewCtorString:return dataViewTag$3;case mapCtorString:return mapTag$5;case promiseCtorString:return promiseTag;case setCtorString:return setTag$5;case weakMapCtorString:return weakMapTag$1}}return result}}var objectProto$3=Object.prototype;var hasOwnProperty$3=objectProto$3.hasOwnProperty;function initCloneArray(array){var length=array.length,result=new array.constructor(length);if(length&&typeof array[0]=="string"&&hasOwnProperty$3.call(array,"index")){result.index=array.index;result.input=array.input}return result}var Uint8Array=root.Uint8Array;function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);new Uint8Array(result).set(new Uint8Array(arrayBuffer));return result}function cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength)}var reFlags=/\w*$/;function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));result.lastIndex=regexp.lastIndex;return result}var symbolProto$1=Symbol$1?Symbol$1.prototype:void 0,symbolValueOf$1=symbolProto$1?symbolProto$1.valueOf:void 0;function cloneSymbol(symbol){return symbolValueOf$1?Object(symbolValueOf$1.call(symbol)):{}}function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length)}var boolTag$2="[object Boolean]",dateTag$2="[object Date]",mapTag$4="[object Map]",numberTag$2="[object Number]",regexpTag$2="[object RegExp]",setTag$4="[object Set]",stringTag$3="[object String]",symbolTag$2="[object Symbol]";var arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$2="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]";function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag$2:return cloneArrayBuffer(object);case boolTag$2:case dateTag$2:return new Ctor(+object);case dataViewTag$2:return cloneDataView(object,isDeep);case float32Tag$1:case float64Tag$1:case int8Tag$1:case int16Tag$1:case int32Tag$1:case uint8Tag$1:case uint8ClampedTag$1:case uint16Tag$1:case uint32Tag$1:return cloneTypedArray(object,isDeep);case mapTag$4:return new Ctor;case numberTag$2:case stringTag$3:return new Ctor(object);case regexpTag$2:return cloneRegExp(object);case setTag$4:return new Ctor;case symbolTag$2:return cloneSymbol(object)}}function initCloneObject(object){return typeof object.constructor=="function"&&!isPrototype(object)?baseCreate(getPrototype(object)):{}}var mapTag$3="[object Map]";function baseIsMap(value){return isObjectLike(value)&&getTag(value)==mapTag$3}var nodeIsMap=nodeUtil&&nodeUtil.isMap;var isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap;var setTag$3="[object Set]";function baseIsSet(value){return isObjectLike(value)&&getTag(value)==setTag$3}var nodeIsSet=nodeUtil&&nodeUtil.isSet;var isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet;var CLONE_DEEP_FLAG$2=1,CLONE_FLAT_FLAG$1=2,CLONE_SYMBOLS_FLAG$2=4;var argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag$2="[object Map]",numberTag$1="[object Number]",objectTag$1="[object Object]",regexpTag$1="[object RegExp]",setTag$2="[object Set]",stringTag$2="[object String]",symbolTag$1="[object Symbol]",weakMapTag="[object WeakMap]";var arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var cloneableTags={};cloneableTags[argsTag$1]=cloneableTags[arrayTag$1]=cloneableTags[arrayBufferTag$1]=cloneableTags[dataViewTag$1]=cloneableTags[boolTag$1]=cloneableTags[dateTag$1]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag$2]=cloneableTags[numberTag$1]=cloneableTags[objectTag$1]=cloneableTags[regexpTag$1]=cloneableTags[setTag$2]=cloneableTags[stringTag$2]=cloneableTags[symbolTag$1]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=true;cloneableTags[errorTag$1]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=false;function baseClone(value,bitmask,customizer,key,object,stack){var result,isDeep=bitmask&CLONE_DEEP_FLAG$2,isFlat=bitmask&CLONE_FLAT_FLAG$1,isFull=bitmask&CLONE_SYMBOLS_FLAG$2;if(customizer){result=object?customizer(value,key,object,stack):customizer(value)}if(result!==void 0){return result}if(!isObject(value)){return value}var isArr=isArray(value);if(isArr){result=initCloneArray(value);if(!isDeep){return copyArray(value,result)}}else{var tag=getTag(value),isFunc=tag==funcTag||tag==genTag;if(isBuffer(value)){return cloneBuffer(value,isDeep)}if(tag==objectTag$1||tag==argsTag$1||isFunc&&!object){result=isFlat||isFunc?{}:initCloneObject(value);if(!isDeep){return isFlat?copySymbolsIn(value,baseAssignIn(result,value)):copySymbols(value,baseAssign(result,value))}}else{if(!cloneableTags[tag]){return object?value:{}}result=initCloneByTag(value,tag,isDeep)}}stack||(stack=new Stack);var stacked=stack.get(value);if(stacked){return stacked}stack.set(value,result);if(isSet(value)){value.forEach((function(subValue){result.add(baseClone(subValue,bitmask,customizer,subValue,value,stack))}))}else if(isMap(value)){value.forEach((function(subValue,key2){result.set(key2,baseClone(subValue,bitmask,customizer,key2,value,stack))}))}var keysFunc=isFull?isFlat?getAllKeysIn:getAllKeys:isFlat?keysIn:keys;var props=isArr?void 0:keysFunc(value);arrayEach(props||value,(function(subValue,key2){if(props){key2=subValue;subValue=value[key2]}assignValue(result,key2,baseClone(subValue,bitmask,customizer,key2,value,stack))}));return result}var CLONE_DEEP_FLAG$1=1,CLONE_SYMBOLS_FLAG$1=4;function cloneDeep(value){return baseClone(value,CLONE_DEEP_FLAG$1|CLONE_SYMBOLS_FLAG$1)}var HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd(value){this.__data__.set(value,HASH_UNDEFINED);return this}function setCacheHas(value){return this.__data__.has(value)}function SetCache(values){var index=-1,length=values==null?0:values.length;this.__data__=new MapCache;while(++index<length){this.add(values[index])}}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd;SetCache.prototype.has=setCacheHas;function arraySome(array,predicate){var index=-1,length=array==null?0:array.length;while(++index<length){if(predicate(array[index],index,array)){return true}}return false}function cacheHas(cache,key){return cache.has(key)}var COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays(array,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG$5,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength)){return false}var arrStacked=stack.get(array);var othStacked=stack.get(other);if(arrStacked&&othStacked){return arrStacked==other&&othStacked==array}var index=-1,result=true,seen=bitmask&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;stack.set(array,other);stack.set(other,array);while(++index<arrLength){var arrValue=array[index],othValue=other[index];if(customizer){var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack)}if(compared!==void 0){if(compared){continue}result=false;break}if(seen){if(!arraySome(other,(function(othValue2,othIndex){if(!cacheHas(seen,othIndex)&&(arrValue===othValue2||equalFunc(arrValue,othValue2,bitmask,customizer,stack))){return seen.push(othIndex)}}))){result=false;break}}else if(!(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack))){result=false;break}}stack["delete"](array);stack["delete"](other);return result}function mapToArray(map2){var index=-1,result=Array(map2.size);map2.forEach((function(value,key){result[++index]=[key,value]}));return result}function setToArray(set){var index=-1,result=Array(set.size);set.forEach((function(value){result[++index]=value}));return result}var COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2;var boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",mapTag$1="[object Map]",numberTag="[object Number]",regexpTag="[object RegExp]",setTag$1="[object Set]",stringTag$1="[object String]",symbolTag="[object Symbol]";var arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]";var symbolProto=Symbol$1?Symbol$1.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag(object,other,tag,bitmask,customizer,equalFunc,stack){switch(tag){case dataViewTag:if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset){return false}object=object.buffer;other=other.buffer;case arrayBufferTag:if(object.byteLength!=other.byteLength||!equalFunc(new Uint8Array(object),new Uint8Array(other))){return false}return true;case boolTag:case dateTag:case numberTag:return eq(+object,+other);case errorTag:return object.name==other.name&&object.message==other.message;case regexpTag:case stringTag$1:return object==other+"";case mapTag$1:var convert=mapToArray;case setTag$1:var isPartial=bitmask&COMPARE_PARTIAL_FLAG$4;convert||(convert=setToArray);if(object.size!=other.size&&!isPartial){return false}var stacked=stack.get(object);if(stacked){return stacked==other}bitmask|=COMPARE_UNORDERED_FLAG$2;stack.set(object,other);var result=equalArrays(convert(object),convert(other),bitmask,customizer,equalFunc,stack);stack["delete"](object);return result;case symbolTag:if(symbolValueOf){return symbolValueOf.call(object)==symbolValueOf.call(other)}}return false}var COMPARE_PARTIAL_FLAG$3=1;var objectProto$2=Object.prototype;var hasOwnProperty$2=objectProto$2.hasOwnProperty;function equalObjects(object,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG$3,objProps=getAllKeys(object),objLength=objProps.length,othProps=getAllKeys(other),othLength=othProps.length;if(objLength!=othLength&&!isPartial){return false}var index=objLength;while(index--){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty$2.call(other,key))){return false}}var objStacked=stack.get(object);var othStacked=stack.get(other);if(objStacked&&othStacked){return objStacked==other&&othStacked==object}var result=true;stack.set(object,other);stack.set(other,object);var skipCtor=isPartial;while(++index<objLength){key=objProps[index];var objValue=object[key],othValue=other[key];if(customizer){var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack)}if(!(compared===void 0?objValue===othValue||equalFunc(objValue,othValue,bitmask,customizer,stack):compared)){result=false;break}skipCtor||(skipCtor=key=="constructor")}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;if(objCtor!=othCtor&&("constructor"in object&&"constructor"in other)&&!(typeof objCtor=="function"&&objCtor instanceof objCtor&&typeof othCtor=="function"&&othCtor instanceof othCtor)){result=false}}stack["delete"](object);stack["delete"](other);return result}var COMPARE_PARTIAL_FLAG$2=1;var argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]";var objectProto$1=Object.prototype;var hasOwnProperty$1=objectProto$1.hasOwnProperty;function baseIsEqualDeep(object,other,bitmask,customizer,equalFunc,stack){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=objIsArr?arrayTag:getTag(object),othTag=othIsArr?arrayTag:getTag(other);objTag=objTag==argsTag?objectTag:objTag;othTag=othTag==argsTag?objectTag:othTag;var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&isBuffer(object)){if(!isBuffer(other)){return false}objIsArr=true;objIsObj=false}if(isSameTag&&!objIsObj){stack||(stack=new Stack);return objIsArr||isTypedArray(object)?equalArrays(object,other,bitmask,customizer,equalFunc,stack):equalByTag(object,other,objTag,bitmask,customizer,equalFunc,stack)}if(!(bitmask&COMPARE_PARTIAL_FLAG$2)){var objIsWrapped=objIsObj&&hasOwnProperty$1.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty$1.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;stack||(stack=new Stack);return equalFunc(objUnwrapped,othUnwrapped,bitmask,customizer,stack)}}if(!isSameTag){return false}stack||(stack=new Stack);return equalObjects(object,other,bitmask,customizer,equalFunc,stack)}function baseIsEqual(value,other,bitmask,customizer,stack){if(value===other){return true}if(value==null||other==null||!isObjectLike(value)&&!isObjectLike(other)){return value!==value&&other!==other}return baseIsEqualDeep(value,other,bitmask,customizer,baseIsEqual,stack)}var COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2;function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index;if(object==null){return!length}object=Object(object);while(index--){var data=matchData[index];if(data[2]?data[1]!==object[data[0]]:!(data[0]in object)){return false}}while(++index<length){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(data[2]){if(objValue===void 0&&!(key in object)){return false}}else{var stack=new Stack;var result;if(!(result===void 0?baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG$1|COMPARE_UNORDERED_FLAG$1,customizer,stack):result)){return false}}}return true}function isStrictComparable(value){return value===value&&!isObject(value)}function getMatchData(object){var result=keys(object),length=result.length;while(length--){var key=result[length],value=object[key];result[length]=[key,value,isStrictComparable(value)]}return result}function matchesStrictComparable(key,srcValue){return function(object){if(object==null){return false}return object[key]===srcValue&&(srcValue!==void 0||key in Object(object))}}function baseMatches(source){var matchData=getMatchData(source);if(matchData.length==1&&matchData[0][2]){return matchesStrictComparable(matchData[0][0],matchData[0][1])}return function(object){return object===source||baseIsMatch(object,source,matchData)}}function baseHasIn(object,key){return object!=null&&key in Object(object)}function hasPath(object,path,hasFunc){path=castPath(path,object);var index=-1,length=path.length,result=false;while(++index<length){var key=toKey(path[index]);if(!(result=object!=null&&hasFunc(object,key))){break}object=object[key]}if(result||++index!=length){return result}length=object==null?0:object.length;return!!length&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object))}function hasIn(object,path){return object!=null&&hasPath(object,path,baseHasIn)}var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty(path,srcValue){if(isKey(path)&&isStrictComparable(srcValue)){return matchesStrictComparable(toKey(path),srcValue)}return function(object){var objValue=get(object,path);return objValue===void 0&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}function baseProperty(key){return function(object){return object==null?void 0:object[key]}}function basePropertyDeep(path){return function(object){return baseGet(object,path)}}function property(path){return isKey(path)?baseProperty(toKey(path)):basePropertyDeep(path)}function baseIteratee(value){if(typeof value=="function"){return value}if(value==null){return identity}if(typeof value=="object"){return isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value)}return property(value)}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;while(length--){var key=props[++index];if(iteratee(iterable[key],key,iterable)===false){break}}return object}}var baseFor=createBaseFor();function baseForOwn(object,iteratee){return object&&baseFor(object,iteratee,keys)}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){if(collection==null){return collection}if(!isArrayLike(collection)){return eachFunc(collection,iteratee)}var length=collection.length,index=-1,iterable=Object(collection);while(++index<length){if(iteratee(iterable[index],index,iterable)===false){break}}return collection}}var baseEach=createBaseEach(baseForOwn);var now=function(){return root.Date.now()};var FUNC_ERROR_TEXT$1="Expected a function";var nativeMax$1=Math.max,nativeMin=Math.min;function debounce$2(func,wait,options){var lastArgs,lastThis,maxWait,result,timerId,lastCallTime,lastInvokeTime=0,leading=false,maxing=false,trailing=true;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT$1)}wait=toNumber(wait)||0;if(isObject(options)){leading=!!options.leading;maxing="maxWait"in options;maxWait=maxing?nativeMax$1(toNumber(options.maxWait)||0,wait):maxWait;trailing="trailing"in options?!!options.trailing:trailing}function invokeFunc(time){var args=lastArgs,thisArg=lastThis;lastArgs=lastThis=void 0;lastInvokeTime=time;result=func.apply(thisArg,args);return result}function leadingEdge(time){lastInvokeTime=time;timerId=setTimeout(timerExpired,wait);return leading?invokeFunc(time):result}function remainingWait(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime,timeWaiting=wait-timeSinceLastCall;return maxing?nativeMin(timeWaiting,maxWait-timeSinceLastInvoke):timeWaiting}function shouldInvoke(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime;return lastCallTime===void 0||timeSinceLastCall>=wait||timeSinceLastCall<0||maxing&&timeSinceLastInvoke>=maxWait}function timerExpired(){var time=now();if(shouldInvoke(time)){return trailingEdge(time)}timerId=setTimeout(timerExpired,remainingWait(time))}function trailingEdge(time){timerId=void 0;if(trailing&&lastArgs){return invokeFunc(time)}lastArgs=lastThis=void 0;return result}function cancel(){if(timerId!==void 0){clearTimeout(timerId)}lastInvokeTime=0;lastArgs=lastCallTime=lastThis=timerId=void 0}function flush(){return timerId===void 0?result:trailingEdge(now())}function debounced(){var time=now(),isInvoking=shouldInvoke(time);lastArgs=arguments;lastThis=this;lastCallTime=time;if(isInvoking){if(timerId===void 0){return leadingEdge(lastCallTime)}if(maxing){clearTimeout(timerId);timerId=setTimeout(timerExpired,wait);return invokeFunc(lastCallTime)}}if(timerId===void 0){timerId=setTimeout(timerExpired,wait)}return result}debounced.cancel=cancel;debounced.flush=flush;return debounced}function assignMergeValue(object,key,value){if(value!==void 0&&!eq(object[key],value)||value===void 0&&!(key in object)){baseAssignValue(object,key,value)}}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}function safeGet(object,key){if(key==="constructor"&&typeof object[key]==="function"){return}if(key=="__proto__"){return}return object[key]}function toPlainObject(value){return copyObject(value,keysIn(value))}function baseMergeDeep(object,source,key,srcIndex,mergeFunc,customizer,stack){var objValue=safeGet(object,key),srcValue=safeGet(source,key),stacked=stack.get(srcValue);if(stacked){assignMergeValue(object,key,stacked);return}var newValue=customizer?customizer(objValue,srcValue,key+"",object,source,stack):void 0;var isCommon=newValue===void 0;if(isCommon){var isArr=isArray(srcValue),isBuff=!isArr&&isBuffer(srcValue),isTyped=!isArr&&!isBuff&&isTypedArray(srcValue);newValue=srcValue;if(isArr||isBuff||isTyped){if(isArray(objValue)){newValue=objValue}else if(isArrayLikeObject(objValue)){newValue=copyArray(objValue)}else if(isBuff){isCommon=false;newValue=cloneBuffer(srcValue,true)}else if(isTyped){isCommon=false;newValue=cloneTypedArray(srcValue,true)}else{newValue=[]}}else if(isPlainObject(srcValue)||isArguments(srcValue)){newValue=objValue;if(isArguments(objValue)){newValue=toPlainObject(objValue)}else if(!isObject(objValue)||isFunction(objValue)){newValue=initCloneObject(srcValue)}}else{isCommon=false}}if(isCommon){stack.set(srcValue,newValue);mergeFunc(newValue,srcValue,srcIndex,customizer,stack);stack["delete"](srcValue)}assignMergeValue(object,key,newValue)}function baseMerge(object,source,srcIndex,customizer,stack){if(object===source){return}baseFor(source,(function(srcValue,key){stack||(stack=new Stack);if(isObject(srcValue)){baseMergeDeep(object,source,key,srcIndex,baseMerge,customizer,stack)}else{var newValue=customizer?customizer(safeGet(object,key),srcValue,key+"",object,source,stack):void 0;if(newValue===void 0){newValue=srcValue}assignMergeValue(object,key,newValue)}}),keysIn)}function last(array){var length=array==null?0:array.length;return length?array[length-1]:void 0}function baseFilter(collection,predicate){var result=[];baseEach(collection,(function(value,index,collection2){if(predicate(value,index,collection2)){result.push(value)}}));return result}function filter(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,baseIteratee(predicate))}function createFind(findIndexFunc){return function(collection,predicate,fromIndex){var iterable=Object(collection);if(!isArrayLike(collection)){var iteratee=baseIteratee(predicate);collection=keys(collection);predicate=function(key){return iteratee(iterable[key],key,iterable)}}var index=findIndexFunc(collection,predicate,fromIndex);return index>-1?iterable[iteratee?collection[index]:index]:void 0}}var nativeMax=Math.max;function findIndex(array,predicate,fromIndex){var length=array==null?0:array.length;if(!length){return-1}var index=fromIndex==null?0:toInteger(fromIndex);if(index<0){index=nativeMax(length+index,0)}return baseFindIndex(array,baseIteratee(predicate),index)}var find=createFind(findIndex);function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];baseEach(collection,(function(value,key,collection2){result[++index]=iteratee(value,key,collection2)}));return result}function map(collection,iteratee){var func=isArray(collection)?arrayMap:baseMap;return func(collection,baseIteratee(iteratee))}var stringTag="[object String]";function isString(value){return typeof value=="string"||!isArray(value)&&isObjectLike(value)&&baseGetTag(value)==stringTag}function parent(object,path){return path.length<2?object:baseGet(object,baseSlice(path,0,-1))}var mapTag="[object Map]",setTag="[object Set]";var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function isEmpty(value){if(value==null){return true}if(isArrayLike(value)&&(isArray(value)||typeof value=="string"||typeof value.splice=="function"||isBuffer(value)||isTypedArray(value)||isArguments(value))){return!value.length}var tag=getTag(value);if(tag==mapTag||tag==setTag){return!value.size}if(isPrototype(value)){return!baseKeys(value).length}for(var key in value){if(hasOwnProperty.call(value,key)){return false}}return true}var merge=createAssigner((function(object,source,srcIndex){baseMerge(object,source,srcIndex)}));var FUNC_ERROR_TEXT="Expected a function";function negate(predicate){if(typeof predicate!="function"){throw new TypeError(FUNC_ERROR_TEXT)}return function(){var args=arguments;switch(args.length){case 0:return!predicate.call(this);case 1:return!predicate.call(this,args[0]);case 2:return!predicate.call(this,args[0],args[1]);case 3:return!predicate.call(this,args[0],args[1],args[2])}return!predicate.apply(this,args)}}function baseUnset(object,path){path=castPath(path,object);object=parent(object,path);return object==null||delete object[toKey(last(path))]}function customOmitClone(value){return isPlainObject(value)?void 0:value}var CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4;var omit=flatRest((function(object,paths){var result={};if(object==null){return result}var isDeep=false;paths=arrayMap(paths,(function(path){path=castPath(path,object);isDeep||(isDeep=path.length>1);return path}));copyObject(object,getAllKeysIn(object),result);if(isDeep){result=baseClone(result,CLONE_DEEP_FLAG|CLONE_FLAT_FLAG|CLONE_SYMBOLS_FLAG,customOmitClone)}var length=paths.length;while(length--){baseUnset(result,paths[length])}return result}));function baseSet(object,path,value,customizer){if(!isObject(object)){return object}path=castPath(path,object);var index=-1,length=path.length,lastIndex=length-1,nested=object;while(nested!=null&&++index<length){var key=toKey(path[index]),newValue=value;if(key==="__proto__"||key==="constructor"||key==="prototype"){return object}if(index!=lastIndex){var objValue=nested[key];newValue=void 0;if(newValue===void 0){newValue=isObject(objValue)?objValue:isIndex(path[index+1])?[]:{}}}assignValue(nested,key,newValue);nested=nested[key]}return object}function basePickBy(object,paths,predicate){var index=-1,length=paths.length,result={};while(++index<length){var path=paths[index],value=baseGet(object,path);if(predicate(value,path)){baseSet(result,castPath(path,object),value)}}return result}function pickBy(object,predicate){if(object==null){return{}}var props=arrayMap(getAllKeysIn(object),(function(prop){return[prop]}));predicate=baseIteratee(predicate);return basePickBy(object,props,(function(value,path){return predicate(value,path[0])}))}function omitBy(object,predicate){return pickBy(object,negate(baseIteratee(predicate)))}var WRAP_PARTIAL_FLAG=32;var partial=baseRest((function(func,partials){var holders=replaceHolders(partials,getHolder(partial));return createWrap(func,WRAP_PARTIAL_FLAG,void 0,partials,holders)}));partial.placeholder={};var idCounter=0;function uniqueId(prefix){var id=++idCounter;return toString(prefix)+id}class ElementObserver{constructor(matchDelegate,target=document){this.matchDelegate=matchDelegate;this.target=target}get mutationObserver(){return this._mutationObserver=this._mutationObserver||new MutationObserver((mutationList=>this.processMutationList(mutationList)))}start(){this.mutationObserver.observe(this.target,{attributes:true,childList:true,subtree:true});this.catchup()}stop(){this.mutationObserverdisconnect()}catchup(){this.handleAdditions(this.matchDelegate.matches(this.target))}processMutationList(mutationList){for(const mutation of mutationList){if(mutation.type=="attributes"){this.processAttributeChange(mutation.target)}else if(mutation.type=="childList"){this.processRemovedNodes(Array.from(mutation.removedNodes));this.processAddedNodes(Array.from(mutation.addedNodes))}}}processAttributeChange(node){if(node.nodeType!==Node.ELEMENT_NODE)return;const matches=this.matchDelegate.matches(node);if(matches.length===0)return this.matchDelegate.removeMatch(node);this.handleAdditions(matches)}processRemovedNodes(nodes){for(const node of nodes){if(node.nodeType!==Node.ELEMENT_NODE)continue;this.handleRemovals(this.matchDelegate.matches(node))}}processAddedNodes(nodes){for(const node of nodes){if(node.nodeType!==Node.ELEMENT_NODE)continue;this.handleAdditions(this.matchDelegate.matches(node))}}handleRemovals(elements){for(const element of elements)this.matchDelegate.removeMatch(element)}handleAdditions(elements){for(const element of elements)this.matchDelegate.addMatch(element)}}class PbEnhancedElement{constructor(element){this.element=element}static get elements(){return this._elements=this._elements||new Map}static get observer(){return this._observer=this._observer||new ElementObserver(this)}static get selector(){console.warn("Define a static property for selector or redefine the matches function in a subclass.",this);return null}static matches(node){if(!this.selector)return[];const matches=[];if(node.nodeType===Node.ELEMENT_NODE&&node.matches(this.selector))matches.push(node);matches.push(...node.querySelectorAll(this.selector));return matches}static addMatch(element){if(element._pbEnhanced||this.elements.has(element))return;const enhansedElement=new this(element);enhansedElement.connect();this.elements.set(element,enhansedElement);element._pbEnhanced=enhansedElement}static removeMatch(element){if(!this.elements.has(element))return;const enhansedElement=this.elements.get(element);enhansedElement.disconnect();this.elements.delete(element)}static start(){this.observer.start()}static stop(){this.mutationObserver.stop()}connect(){console.warn("Redefine the connect function in a subclass.",this)}disconnect(){}}class PbTable extends PbEnhancedElement{static get selector(){return".table-responsive-collapse"}connect(){const tables=document.querySelectorAll(".table-responsive-collapse");[].forEach.call(tables,(table=>{const headers=[];[].forEach.call(table.querySelectorAll("th"),(header=>{const colSpan=header.colSpan;for(let i=0;i<colSpan;i++){headers.push(header.textContent.replace(/\r?\n|\r/,""))}}));[].forEach.call(table.querySelectorAll("tbody tr"),(row=>{[].forEach.call(row.cells,((cell,headerIndex)=>{cell.setAttribute("data-title",headers[headerIndex])}))}))}))}}const windows="#003DB2";const siding="#6000AC";const doors="#B85C00";const solar="#007E8F";const roofing="#760B24";const gutters="#008540";const insulation="#96006C";const product_1_background="#003DB2";const product_1_highlight="#0057FF";const product_2_background="#6000AC";const product_2_highlight="#8200E9";const product_3_background="#B85C00";const product_3_highlight="#CE7500";const product_4_background="#007E8F";const product_4_highlight="#00B9D2";const product_5_background="#760B24";const product_5_highlight="#B8032E";const product_6_background="#008540";const product_6_highlight="#00A851";const product_7_background="#96006C";const product_7_highlight="#CD0094";const product_8_background="#144075";const product_8_highlight="#1A569E";const product_9_background="#fcc419";const product_9_highlight="#ffd43b";const product_10_background="#20c997";const product_10_highlight="#38d9a9";const success="#1CA05C";const success_secondary="#24cb75";const success_sm="#157F48";const success_subtle="rgba(28, 160, 92, 0.1)";const warning="#F9BB00";const warning_secondary="#ffcb2d";const warning_subtle="rgba(249, 187, 0, 0.1)";const error="#DA0014";const error_secondary="#ff0e24";const error_subtle="rgba(218, 0, 20, 0.1)";const info="#00C4D7";const info_secondary="#0be9ff";const info_subtle="rgba(0, 196, 215, 0.1)";const neutral="#C1CDD6";const neutral_secondary="#e0e6ea";const neutral_subtle="rgba(193, 205, 214, 0.1)";const primary="#0056CF";const primary_secondary="#036cff";const data_1="#0056CF";const data_2="#F9BB00";const data_3="#9E64E9";const data_4="#1CA05C";const data_5="#FD804C";const data_6="#144075";const data_7="#00C4D7";const data_8="#DA0014";const shadow="rgba(60, 106, 172, 0.2)";const shadow_dark="#0a0527";const royal="#0056CF";const purple="#9E64E9";const teal="#00C4D7";const red="#DA0014";const yellow="#F9BB00";const green="#1CA05C";const orange="#FD804C";const white="#FFFFFF";const silver="#F3F7FB";const slate="#C1CDD6";const charcoal="#242B42";const black="#000000";const secondary="#F9BB00";const tertiary="#9E64E9";const bg_light="#F3F7FB";const bg_dark="#0a0527";const bg_dark_card="#231E3D";const card_light="#FFFFFF";const card_dark="#231e3d";const active_light="#f7fbff";const active_dark="#0082ff";const primary_action="#0056CF";const primary_action_dark="#0082ff";const hover_light="#e0eaf5";const hover_dark="rgba(255, 255, 255, 0.2)";const border_light="#E4E8F0";const border_dark="#3b3752";const text_lt_default="#242B42";const text_lt_light="#687887";const text_lt_lighter="#C1CDD6";const text_dk_default="#FFFFFF";const text_dk_light="rgba(255, 255, 255, 0.6)";const text_dk_lighter="rgba(255, 255, 255, 0.4)";const category_1="#0056CF";const category_2="#0CD2E5";const category_3="#F9BB00";const category_4="#14D595";const category_5="#A057FF";const category_6="#FF7034";const category_7="#97DA22";const category_8="#EA599F";const category_9="#0091FF";const category_10="#5027E4";const category_11="#DA0014";const category_12="#109922";const category_13="#058F9D";const category_14="#A33E6F";const category_15="#B2171C";const category_16="#0A5C49";const category_17="#325B91";const category_18="#BE4714";const category_19="#000080";const category_20="#5C0E0A";const category_21="#040830";const gradient_start="#1C75F2";const gradient_end="#0056CF";const colors={windows:windows,siding:siding,doors:doors,solar:solar,roofing:roofing,gutters:gutters,insulation:insulation,product_1_background:product_1_background,product_1_highlight:product_1_highlight,product_2_background:product_2_background,product_2_highlight:product_2_highlight,product_3_background:product_3_background,product_3_highlight:product_3_highlight,product_4_background:product_4_background,product_4_highlight:product_4_highlight,product_5_background:product_5_background,product_5_highlight:product_5_highlight,product_6_background:product_6_background,product_6_highlight:product_6_highlight,product_7_background:product_7_background,product_7_highlight:product_7_highlight,product_8_background:product_8_background,product_8_highlight:product_8_highlight,product_9_background:product_9_background,product_9_highlight:product_9_highlight,product_10_background:product_10_background,product_10_highlight:product_10_highlight,success:success,success_secondary:success_secondary,success_sm:success_sm,success_subtle:success_subtle,warning:warning,warning_secondary:warning_secondary,warning_subtle:warning_subtle,error:error,error_secondary:error_secondary,error_subtle:error_subtle,info:info,info_secondary:info_secondary,info_subtle:info_subtle,neutral:neutral,neutral_secondary:neutral_secondary,neutral_subtle:neutral_subtle,primary:primary,primary_secondary:primary_secondary,data_1:data_1,data_2:data_2,data_3:data_3,data_4:data_4,data_5:data_5,data_6:data_6,data_7:data_7,data_8:data_8,shadow:shadow,shadow_dark:shadow_dark,royal:royal,purple:purple,teal:teal,red:red,yellow:yellow,green:green,orange:orange,default:"#93a8b8",white:white,silver:silver,slate:slate,charcoal:charcoal,black:black,secondary:secondary,tertiary:tertiary,bg_light:bg_light,bg_dark:bg_dark,bg_dark_card:bg_dark_card,card_light:card_light,card_dark:card_dark,active_light:active_light,active_dark:active_dark,primary_action:primary_action,primary_action_dark:primary_action_dark,hover_light:hover_light,hover_dark:hover_dark,border_light:border_light,border_dark:border_dark,text_lt_default:text_lt_default,text_lt_light:text_lt_light,text_lt_lighter:text_lt_lighter,text_dk_default:text_dk_default,text_dk_light:text_dk_light,text_dk_lighter:text_dk_lighter,category_1:category_1,category_2:category_2,category_3:category_3,category_4:category_4,category_5:category_5,category_6:category_6,category_7:category_7,category_8:category_8,category_9:category_9,category_10:category_10,category_11:category_11,category_12:category_12,category_13:category_13,category_14:category_14,category_15:category_15,category_16:category_16,category_17:category_17,category_18:category_18,category_19:category_19,category_20:category_20,category_21:category_21,gradient_start:gradient_start,gradient_end:gradient_end};const font_family_base='"Power Centra", "Helvetica Neue", Helvetica, Arial, sans_serif';const text_jumbo="36px";const text_largest="32px";const text_larger="27px";const text_large="20px";const text_base="15.5px";const text_default="15.5px";const text_normal="15.5px";const text_medium="15.5px";const text_small="14px";const text_smaller="12px";const text_smallest="11px";const heading_1="44px";const heading_2="32px";const heading_3="27px";const heading_4="15.5px";const lighter="300";const light="300";const bold="700";const regular="400";const typography={font_family_base:font_family_base,text_jumbo:text_jumbo,text_largest:text_largest,text_larger:text_larger,text_large:text_large,text_base:text_base,text_default:text_default,text_normal:text_normal,text_medium:text_medium,text_small:text_small,text_smaller:text_smaller,text_smallest:text_smallest,heading_1:heading_1,heading_2:heading_2,heading_3:heading_3,heading_4:heading_4,lighter:lighter,light:light,bold:bold,regular:regular};const useCollapsible=(initial=true)=>{const[collapsed,setCollapsed]=useState(initial);const toggle=()=>setCollapsed((prev=>!prev));return[collapsed,toggle,setCollapsed]};const ABBR_DAYS=["SU","M","T","W","TH","F","S"];const days=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];const months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];const formatDate=newDate=>{const isTimelessStringDate=typeof newDate==="string"&&!newDate.includes("T");if(isTimelessStringDate){const unhyphenatedDate=new Date(newDate.replace(/-/g,"/"));return unhyphenatedDate}return new Date(newDate)};const toMinute=(newDate,timeZone)=>{const date=formatDate(newDate);if(timeZone){return date.toLocaleTimeString("en-US",{timeZone:timeZone,hour:"2-digit",minute:"2-digit"}).slice(3,5)}else{return date.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}).slice(3,5)}};const toHour=(newDate,timeZone)=>{const date=formatDate(newDate);if(timeZone){return date.toLocaleTimeString("en-US",{timeZone:timeZone,hour:"numeric"}).split(" ")[0]}else{return date.toLocaleTimeString("en-US",{hour:"numeric"}).split(" ")[0]}};const toDay=(newDate,timeZone)=>{if(timeZone){const date=new Date(formatDate(newDate).toLocaleString("en-US",{timeZone:timeZone}));return date.getDate()}else{const date=formatDate(newDate);return date.getDate()}};const toDayAbbr=newDate=>{const date=formatDate(newDate);return ABBR_DAYS[date.getDay()]};const toWeekday=newDate=>{const date=formatDate(newDate);return days[date.getDay()]};const toMonth=(newDate,timeZone)=>{if(timeZone){const date=new Date(formatDate(newDate).toLocaleString("en-US",{timeZone:timeZone}));return months[date.getMonth()]}else{const date=formatDate(newDate);return months[date.getMonth()]}};const toMonthNum=newDate=>{const date=formatDate(newDate);return date.getMonth()+1};const toYear=(newDate,timeZone)=>{if(timeZone){const date=new Date(formatDate(newDate).toLocaleString("en-US",{timeZone:timeZone}));return date.getFullYear()}else{const date=formatDate(newDate);return date.getFullYear()}};const toTime=(newDate,timeZone)=>{const date=formatDate(newDate);if(timeZone){return date.toLocaleTimeString("en-US",{timeZone:timeZone,timeStyle:"short"}).split(" ")[0]}else{return date.toLocaleTimeString("en-US",{timeStyle:"short"}).split(" ")[0]}};const toMeridiem=(newDate,timeZone)=>{const date=formatDate(newDate);if(timeZone){return date.toLocaleString("en-US",{timeZone:timeZone,hour12:true}).slice(-2).charAt(0).toLocaleLowerCase()}else{return date.toLocaleString("en-US",{hour12:true}).slice(-2).charAt(0).toLocaleLowerCase()}};const toTimeZone=(newDate,timeZone)=>{const date=formatDate(newDate);if(timeZone){return date.toLocaleString("en-US",{timeZone:timeZone,timeZoneName:"short"}).split(" ")[3]}else{return date.toLocaleString("en-US",{timeZoneName:"short"}).split(" ")[3]}};const toTimeWithMeridiem=(newDate,timeZone)=>{const date=formatDate(newDate);return`${toTime(date,timeZone)}${toMeridiem(date,timeZone)}`};const toIso=newDate=>{const date=formatDate(newDate);return date.toISOString()};const fromNow=newDate=>{const today=new Date;const formattedDate=formatDate(newDate);const startDate=formattedDate.getTime();const endDate=today.getTime();const elapsedTime=endDate-startDate;const differenceInYears=today.getFullYear()-formattedDate.getFullYear();const differenceInMonths=()=>{let months2=differenceInYears*12;months2-=formattedDate.getMonth();months2+=today.getMonth();return months2};const FORTY_FIVE_SECONDS=45e3;const NINETY_SECONDS=9e4;const FORTY_FIVE_MINUTES=267e4;const NINETY_MINUTES=54e5;const TWENTY_TWO_HOURS=774e5;const THIRTY_SIX_HOURS=1296e5;const TWENTY_SIX_DAYS=22032e5;const FORTY_FIVE_DAYS=3888e6;const TEN_AND_A_HALF_MONTHS=2756e7;const MILLISECONDS_IN_A_MINUTE=6e4;const MILLISECONDS_IN_A_HOUR=36e5;const MILLISECONDS_IN_A_DAY=864e5;let elapsedTimeString=differenceInYears===1?`${differenceInYears} year ago`:`${differenceInYears} years ago`;const intervals=[{min:0,max:FORTY_FIVE_SECONDS,value:"a few seconds ago"},{min:FORTY_FIVE_SECONDS,max:NINETY_SECONDS,value:"a minute ago"},{min:NINETY_SECONDS,max:FORTY_FIVE_MINUTES,value:`${Math.round(elapsedTime/MILLISECONDS_IN_A_MINUTE)} minutes ago`},{min:FORTY_FIVE_MINUTES,max:NINETY_MINUTES,value:"an hour ago"},{min:NINETY_MINUTES,max:TWENTY_TWO_HOURS,value:`${Math.round(elapsedTime/MILLISECONDS_IN_A_HOUR)} hours ago`},{min:TWENTY_TWO_HOURS,max:THIRTY_SIX_HOURS,value:"a day ago"},{min:THIRTY_SIX_HOURS,max:TWENTY_SIX_DAYS,value:`${Math.round(elapsedTime/MILLISECONDS_IN_A_DAY)} days ago`},{min:TWENTY_SIX_DAYS,max:FORTY_FIVE_DAYS,value:"a month ago"},{min:FORTY_FIVE_DAYS,max:TEN_AND_A_HALF_MONTHS,value:`${differenceInMonths()} months ago`}];for(const interval of intervals){const{min:min2,max:max2,value:value}=interval;if(elapsedTime>=min2&&elapsedTime<max2){elapsedTimeString=value;break}}return elapsedTimeString};const toCustomFormat=(newDate,format="month_day")=>{const date=formatDate(newDate);if(format=="month_day"){return`${toMonthNum(date)}/${toDay(date)}`}else{return`${date.toLocaleString("en-US",{month:"short"})} ${toDay(date)}`}};const getYesterdayDate=newDate=>{const today=formatDate(newDate);const yesterday=new Date;yesterday.setDate(today.getDate()-1);return yesterday};const getFirstDayOfWeek=newDate=>{const today=formatDate(newDate);const dayOfWeek=today.getDay();const firstDayOfWeek=new Date(today.setHours(0,0,0));const isSunday=dayOfWeek===0;const daysToSubtract=isSunday?6:dayOfWeek-1;firstDayOfWeek.setDate(today.getDate()-daysToSubtract);return firstDayOfWeek};const getLastDayOfWeek=newDate=>{const today=formatDate(newDate);const dayOfWeek=today.getDay();const lastDayOfWeek=new Date(today.setHours(23,59,59,0));const isSunday=dayOfWeek===0;const daysToAdd=isSunday?0:7-dayOfWeek;lastDayOfWeek.setDate(today.getDate()+daysToAdd);return lastDayOfWeek};const getPreviousWeekStartDate=newDate=>{const firstDayOfWeek=getFirstDayOfWeek(newDate);const firstDayOfPreviousWeek=new Date(firstDayOfWeek.getFullYear(),firstDayOfWeek.getMonth(),firstDayOfWeek.getDate()-7);return firstDayOfPreviousWeek};const getPreviousWeekEndDate=newDate=>{const lastDayOfWeek=getLastDayOfWeek(newDate);const lastDayOfPreviousWeek=new Date(lastDayOfWeek.getFullYear(),lastDayOfWeek.getMonth(),lastDayOfWeek.getDate()-7,lastDayOfWeek.getHours(),lastDayOfWeek.getMinutes(),lastDayOfWeek.getSeconds());return lastDayOfPreviousWeek};const getMonthStartDate=newDate=>{const date=formatDate(newDate);const firstDayOfMonth=new Date(date.getFullYear(),date.getMonth(),1);return firstDayOfMonth};const getMonthEndDate=newDate=>{const date=formatDate(newDate);const lastDayOfMonth=new Date(date.getFullYear(),date.getMonth()+1,0,23,59,59);return lastDayOfMonth};const getPreviousMonthStartDate=newDate=>{const firstDayOfMonth=getMonthStartDate(newDate);const firstDayOfPreviousMonth=new Date(firstDayOfMonth.getFullYear(),firstDayOfMonth.getMonth()-1,firstDayOfMonth.getDate());return firstDayOfPreviousMonth};const getPreviousMonthEndDate=newDate=>{const lastDayOfMonth=getMonthEndDate(newDate);const lastDayOfPreviousMonth=new Date(lastDayOfMonth.getFullYear(),lastDayOfMonth.getMonth()-1,lastDayOfMonth.getDate(),lastDayOfMonth.getHours(),lastDayOfMonth.getMinutes(),lastDayOfMonth.getSeconds());return lastDayOfPreviousMonth};const getQuarterStartDate=newDate=>{const date=formatDate(newDate);const quarter=Math.floor(date.getMonth()/3);const startOfQuarter=new Date(date.getFullYear(),quarter*3,1);return startOfQuarter};const getQuarterEndDate=newDate=>{const date=formatDate(newDate);const quarter=Math.floor(date.getMonth()/3);const startOfNextQuarter=new Date(date.getFullYear(),(quarter+1)*3,1);const endOfQuarter=new Date(startOfNextQuarter.getTime()-1);return endOfQuarter};const getPreviousQuarterStartDate=newDate=>{const startOfQuarter=getQuarterStartDate(newDate);const firstDayOfPreviousQuarter=new Date(startOfQuarter.getFullYear(),startOfQuarter.getMonth()-3,startOfQuarter.getDate());return firstDayOfPreviousQuarter};const getPreviousQuarterEndDate=newDate=>{const endOfQuarter=getQuarterEndDate(newDate);const lastDayOfPreviousQuarter=new Date(endOfQuarter.getFullYear(),endOfQuarter.getMonth()-3,endOfQuarter.getDate(),endOfQuarter.getHours(),endOfQuarter.getMinutes(),endOfQuarter.getSeconds());return lastDayOfPreviousQuarter};const getYearStartDate=newDate=>{const date=formatDate(newDate);const startOfYear=new Date(date.getFullYear(),0,1);return startOfYear};const getYearEndDate=newDate=>{const date=formatDate(newDate);const endOfYear=new Date(date.getFullYear(),11,31,23,59,59);return endOfYear};const getPreviousYearStartDate=newDate=>{const startOfYear=getYearStartDate(newDate);const firstDayOfPreviousYear=new Date(startOfYear.getFullYear()-1,startOfYear.getMonth(),startOfYear.getDate());return firstDayOfPreviousYear};const getPreviousYearEndDate=newDate=>{const endOfYear=getYearEndDate(newDate);const lastDayOfPreviousYear=new Date(endOfYear.getFullYear()-1,endOfYear.getMonth(),endOfYear.getDate(),endOfYear.getHours(),endOfYear.getMinutes(),endOfYear.getSeconds());return lastDayOfPreviousYear};const DateTime={toMinute:toMinute,toHour:toHour,toDay:toDay,toDayAbbr:toDayAbbr,toWeekday:toWeekday,toMonth:toMonth,toMonthNum:toMonthNum,toYear:toYear,toTime:toTime,toMeridiem:toMeridiem,toTimeZone:toTimeZone,toTimeWithMeridiem:toTimeWithMeridiem,toIso:toIso,fromNow:fromNow,toCustomFormat:toCustomFormat,getYesterdayDate:getYesterdayDate,getFirstDayOfWeek:getFirstDayOfWeek,getLastDayOfWeek:getLastDayOfWeek,getPreviousWeekStartDate:getPreviousWeekStartDate,getPreviousWeekEndDate:getPreviousWeekEndDate,getMonthStartDate:getMonthStartDate,getMonthEndDate:getMonthEndDate,getPreviousMonthStartDate:getPreviousMonthStartDate,getPreviousMonthEndDate:getPreviousMonthEndDate,getQuarterStartDate:getQuarterStartDate,getQuarterEndDate:getQuarterEndDate,getPreviousQuarterStartDate:getPreviousQuarterStartDate,getPreviousQuarterEndDate:getPreviousQuarterEndDate,getYearStartDate:getYearStartDate,getYearEndDate:getYearEndDate,getPreviousYearStartDate:getPreviousYearStartDate,getPreviousYearEndDate:getPreviousYearEndDate};var HOOKS=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"];var defaults={_disable:[],allowInput:false,allowInvalidPreload:false,altFormat:"F j, Y",altInput:false,altInputClass:"form-control input",animate:typeof window==="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:true,clickOpens:true,closeOnSelect:true,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:false,enableSeconds:false,enableTime:false,errorHandler:function(err){return typeof console!=="undefined"&&console.warn(err)},getWeek:function(givenDate){var date=new Date(givenDate.getTime());date.setHours(0,0,0,0);date.setDate(date.getDate()+3-(date.getDay()+6)%7);var week1=new Date(date.getFullYear(),0,4);return 1+Math.round(((date.getTime()-week1.getTime())/864e5-3+(week1.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:false,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:false,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:false,showMonths:1,static:false,time_24hr:false,weekNumbers:false,wrap:false};var english={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(nth){var s=nth%100;if(s>3&&s<21)return"th";switch(s%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:false};var pad=function(number,length){if(length===void 0){length=2}return("000"+number).slice(length*-1)};var int=function(bool){return bool===true?1:0};function debounce$1(fn2,wait){var t;return function(){var _this=this;var args=arguments;clearTimeout(t);t=setTimeout((function(){return fn2.apply(_this,args)}),wait)}}var arrayify=function(obj){return obj instanceof Array?obj:[obj]};function toggleClass(elem,className,bool){if(bool===true)return elem.classList.add(className);elem.classList.remove(className)}function createElement(tag,className,content){var e=window.document.createElement(tag);className=className||"";content=content||"";e.className=className;if(content!==void 0)e.textContent=content;return e}function clearNode(node){while(node.firstChild)node.removeChild(node.firstChild)}function findParent(node,condition){if(condition(node))return node;else if(node.parentNode)return findParent(node.parentNode,condition);return void 0}function createNumberInput(inputClassName,opts){var wrapper=createElement("div","numInputWrapper"),numInput=createElement("input","numInput "+inputClassName),arrowUp=createElement("span","arrowUp"),arrowDown=createElement("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1){numInput.type="number"}else{numInput.type="text";numInput.pattern="\\d*"}if(opts!==void 0)for(var key in opts)numInput.setAttribute(key,opts[key]);wrapper.appendChild(numInput);wrapper.appendChild(arrowUp);wrapper.appendChild(arrowDown);return wrapper}function getEventTarget(event){try{if(typeof event.composedPath==="function"){var path=event.composedPath();return path[0]}return event.target}catch(error2){return event.target}}var doNothing=function(){return void 0};var monthToStr=function(monthNumber,shorthand,locale){return locale.months[shorthand?"shorthand":"longhand"][monthNumber]};var revFormat={D:doNothing,F:function(dateObj,monthName,locale){dateObj.setMonth(locale.months.longhand.indexOf(monthName))},G:function(dateObj,hour){dateObj.setHours((dateObj.getHours()>=12?12:0)+parseFloat(hour))},H:function(dateObj,hour){dateObj.setHours(parseFloat(hour))},J:function(dateObj,day){dateObj.setDate(parseFloat(day))},K:function(dateObj,amPM,locale){dateObj.setHours(dateObj.getHours()%12+12*int(new RegExp(locale.amPM[1],"i").test(amPM)))},M:function(dateObj,shortMonth,locale){dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth))},S:function(dateObj,seconds){dateObj.setSeconds(parseFloat(seconds))},U:function(_,unixSeconds){return new Date(parseFloat(unixSeconds)*1e3)},W:function(dateObj,weekNum,locale){var weekNumber=parseInt(weekNum);var date=new Date(dateObj.getFullYear(),0,2+(weekNumber-1)*7,0,0,0,0);date.setDate(date.getDate()-date.getDay()+locale.firstDayOfWeek);return date},Y:function(dateObj,year){dateObj.setFullYear(parseFloat(year))},Z:function(_,ISODate){return new Date(ISODate)},d:function(dateObj,day){dateObj.setDate(parseFloat(day))},h:function(dateObj,hour){dateObj.setHours((dateObj.getHours()>=12?12:0)+parseFloat(hour))},i:function(dateObj,minutes){dateObj.setMinutes(parseFloat(minutes))},j:function(dateObj,day){dateObj.setDate(parseFloat(day))},l:doNothing,m:function(dateObj,month){dateObj.setMonth(parseFloat(month)-1)},n:function(dateObj,month){dateObj.setMonth(parseFloat(month)-1)},s:function(dateObj,seconds){dateObj.setSeconds(parseFloat(seconds))},u:function(_,unixMillSeconds){return new Date(parseFloat(unixMillSeconds))},w:doNothing,y:function(dateObj,year){dateObj.setFullYear(2e3+parseFloat(year))}};var tokenRegex={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})"};var formats={Z:function(date){return date.toISOString()},D:function(date,locale,options){return locale.weekdays.shorthand[formats.w(date,locale,options)]},F:function(date,locale,options){return monthToStr(formats.n(date,locale,options)-1,false,locale)},G:function(date,locale,options){return pad(formats.h(date,locale,options))},H:function(date){return pad(date.getHours())},J:function(date,locale){return locale.ordinal!==void 0?date.getDate()+locale.ordinal(date.getDate()):date.getDate()},K:function(date,locale){return locale.amPM[int(date.getHours()>11)]},M:function(date,locale){return monthToStr(date.getMonth(),true,locale)},S:function(date){return pad(date.getSeconds())},U:function(date){return date.getTime()/1e3},W:function(date,_,options){return options.getWeek(date)},Y:function(date){return pad(date.getFullYear(),4)},d:function(date){return pad(date.getDate())},h:function(date){return date.getHours()%12?date.getHours()%12:12},i:function(date){return pad(date.getMinutes())},j:function(date){return date.getDate()},l:function(date,locale){return locale.weekdays.longhand[date.getDay()]},m:function(date){return pad(date.getMonth()+1)},n:function(date){return date.getMonth()+1},s:function(date){return date.getSeconds()},u:function(date){return date.getTime()},w:function(date){return date.getDay()},y:function(date){return String(date.getFullYear()).substring(2)}};var createDateFormatter=function(_a){var _b=_a.config,config=_b===void 0?defaults:_b,_c=_a.l10n,l10n=_c===void 0?english:_c,_d=_a.isMobile,isMobile=_d===void 0?false:_d;return function(dateObj,frmt,overrideLocale){var locale=overrideLocale||l10n;if(config.formatDate!==void 0&&!isMobile){return config.formatDate(dateObj,frmt,locale)}return frmt.split("").map((function(c,i,arr){return formats[c]&&arr[i-1]!=="\\"?formats[c](dateObj,locale,config):c!=="\\"?c:""})).join("")}};var createDateParser=function(_a){var _b=_a.config,config=_b===void 0?defaults:_b,_c=_a.l10n,l10n=_c===void 0?english:_c;return function(date,givenFormat,timeless,customLocale){if(date!==0&&!date)return void 0;var locale=customLocale||l10n;var parsedDate;var dateOrig=date;if(date instanceof Date)parsedDate=new Date(date.getTime());else if(typeof date!=="string"&&date.toFixed!==void 0)parsedDate=new Date(date);else if(typeof date==="string"){var format=givenFormat||(config||defaults).dateFormat;var datestr=String(date).trim();if(datestr==="today"){parsedDate=new Date;timeless=true}else if(config&&config.parseDate){parsedDate=config.parseDate(date,format)}else if(/Z$/.test(datestr)||/GMT$/.test(datestr)){parsedDate=new Date(date)}else{var matched=void 0,ops=[];for(var i=0,matchIndex=0,regexStr="";i<format.length;i++){var token=format[i];var isBackSlash=token==="\\";var escaped=format[i-1]==="\\"||isBackSlash;if(tokenRegex[token]&&!escaped){regexStr+=tokenRegex[token];var match=new RegExp(regexStr).exec(date);if(match&&(matched=true)){ops[token!=="Y"?"push":"unshift"]({fn:revFormat[token],val:match[++matchIndex]})}}else if(!isBackSlash)regexStr+="."}parsedDate=!config||!config.noCalendar?new Date((new Date).getFullYear(),0,1,0,0,0,0):new Date((new Date).setHours(0,0,0,0));ops.forEach((function(_a2){var fn2=_a2.fn,val=_a2.val;return parsedDate=fn2(parsedDate,val,locale)||parsedDate}));parsedDate=matched?parsedDate:void 0}}if(!(parsedDate instanceof Date&&!isNaN(parsedDate.getTime()))){config.errorHandler(new Error("Invalid date provided: "+dateOrig));return void 0}if(timeless===true)parsedDate.setHours(0,0,0,0);return parsedDate}};function compareDates(date1,date2,timeless){if(timeless===void 0){timeless=true}if(timeless!==false){return new Date(date1.getTime()).setHours(0,0,0,0)-new Date(date2.getTime()).setHours(0,0,0,0)}return date1.getTime()-date2.getTime()}var isBetween=function(ts,ts1,ts2){return ts>Math.min(ts1,ts2)&&ts<Math.max(ts1,ts2)};var calculateSecondsSinceMidnight=function(hours,minutes,seconds){return hours*3600+minutes*60+seconds};var parseSeconds=function(secondsSinceMidnight){var hours=Math.floor(secondsSinceMidnight/3600),minutes=(secondsSinceMidnight-hours*3600)/60;return[hours,minutes,secondsSinceMidnight-hours*3600-minutes*60]};var duration={DAY:864e5};function getDefaultHours(config){var hours=config.defaultHour;var minutes=config.defaultMinute;var seconds=config.defaultSeconds;if(config.minDate!==void 0){var minHour=config.minDate.getHours();var minMinutes=config.minDate.getMinutes();var minSeconds=config.minDate.getSeconds();if(hours<minHour){hours=minHour}if(hours===minHour&&minutes<minMinutes){minutes=minMinutes}if(hours===minHour&&minutes===minMinutes&&seconds<minSeconds)seconds=config.minDate.getSeconds()}if(config.maxDate!==void 0){var maxHr=config.maxDate.getHours();var maxMinutes=config.maxDate.getMinutes();hours=Math.min(hours,maxHr);if(hours===maxHr)minutes=Math.min(maxMinutes,minutes);if(hours===maxHr&&minutes===maxMinutes)seconds=config.maxDate.getSeconds()}return{hours:hours,minutes:minutes,seconds:seconds}}if(typeof Object.assign!=="function"){Object.assign=function(target){var args=[];for(var _i=1;_i<arguments.length;_i++){args[_i-1]=arguments[_i]}if(!target){throw TypeError("Cannot convert undefined or null to object")}var _loop_1=function(source2){if(source2){Object.keys(source2).forEach((function(key){return target[key]=source2[key]}))}};for(var _a=0,args_1=args;_a<args_1.length;_a++){var source=args_1[_a];_loop_1(source)}return target}}var __assign=function(){__assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p]}return t};return __assign.apply(this,arguments)};var __spreadArrays=function(){for(var s=0,i=0,il=arguments.length;i<il;i++)s+=arguments[i].length;for(var r=Array(s),k=0,i=0;i<il;i++)for(var a=arguments[i],j=0,jl=a.length;j<jl;j++,k++)r[k]=a[j];return r};var DEBOUNCED_CHANGE_MS=300;function FlatpickrInstance(element,instanceConfig){var self2={config:__assign(__assign({},defaults),flatpickr.defaultConfig),l10n:english};self2.parseDate=createDateParser({config:self2.config,l10n:self2.l10n});self2._handlers=[];self2.pluginElements=[];self2.loadedPlugins=[];self2._bind=bind;self2._setHoursFromDate=setHoursFromDate;self2._positionCalendar=positionCalendar;self2.changeMonth=changeMonth;self2.changeYear=changeYear;self2.clear=clear;self2.close=close;self2.onMouseOver=onMouseOver;self2._createElement=createElement;self2.createDay=createDay;self2.destroy=destroy;self2.isEnabled=isEnabled;self2.jumpToDate=jumpToDate;self2.updateValue=updateValue;self2.open=open;self2.redraw=redraw;self2.set=set;self2.setDate=setDate;self2.toggle=toggle;function setupHelperFunctions(){self2.utils={getDaysInMonth:function(month,yr){if(month===void 0){month=self2.currentMonth}if(yr===void 0){yr=self2.currentYear}if(month===1&&(yr%4===0&&yr%100!==0||yr%400===0))return 29;return self2.l10n.daysInMonth[month]}}}function init(){self2.element=self2.input=element;self2.isOpen=false;parseConfig();setupLocale();setupInputs();setupDates();setupHelperFunctions();if(!self2.isMobile)build();bindEvents();if(self2.selectedDates.length||self2.config.noCalendar){if(self2.config.enableTime){setHoursFromDate(self2.config.noCalendar?self2.latestSelectedDateObj:void 0)}updateValue(false)}setCalendarWidth();var isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);if(!self2.isMobile&&isSafari){positionCalendar()}triggerEvent("onReady")}function getClosestActiveElement(){var _a;return((_a=self2.calendarContainer)===null||_a===void 0?void 0:_a.getRootNode()).activeElement||document.activeElement}function bindToInstance(fn2){return fn2.bind(self2)}function setCalendarWidth(){var config=self2.config;if(config.weekNumbers===false&&config.showMonths===1){return}else if(config.noCalendar!==true){window.requestAnimationFrame((function(){if(self2.calendarContainer!==void 0){self2.calendarContainer.style.visibility="hidden";self2.calendarContainer.style.display="block"}if(self2.daysContainer!==void 0){var daysWidth=(self2.days.offsetWidth+1)*config.showMonths;self2.daysContainer.style.width=daysWidth+"px";self2.calendarContainer.style.width=daysWidth+(self2.weekWrapper!==void 0?self2.weekWrapper.offsetWidth:0)+"px";self2.calendarContainer.style.removeProperty("visibility");self2.calendarContainer.style.removeProperty("display")}}))}}function updateTime(e){if(self2.selectedDates.length===0){var defaultDate=self2.config.minDate===void 0||compareDates(new Date,self2.config.minDate)>=0?new Date:new Date(self2.config.minDate.getTime());var defaults2=getDefaultHours(self2.config);defaultDate.setHours(defaults2.hours,defaults2.minutes,defaults2.seconds,defaultDate.getMilliseconds());self2.selectedDates=[defaultDate];self2.latestSelectedDateObj=defaultDate}if(e!==void 0&&e.type!=="blur"){timeWrapper(e)}var prevValue=self2._input.value;setHoursFromInputs();updateValue();if(self2._input.value!==prevValue){self2._debouncedChange()}}function ampm2military(hour,amPM){return hour%12+12*int(amPM===self2.l10n.amPM[1])}function military2ampm(hour){switch(hour%24){case 0:case 12:return 12;default:return hour%12}}function setHoursFromInputs(){if(self2.hourElement===void 0||self2.minuteElement===void 0)return;var hours=(parseInt(self2.hourElement.value.slice(-2),10)||0)%24,minutes=(parseInt(self2.minuteElement.value,10)||0)%60,seconds=self2.secondElement!==void 0?(parseInt(self2.secondElement.value,10)||0)%60:0;if(self2.amPM!==void 0){hours=ampm2military(hours,self2.amPM.textContent)}var limitMinHours=self2.config.minTime!==void 0||self2.config.minDate&&self2.minDateHasTime&&self2.latestSelectedDateObj&&compareDates(self2.latestSelectedDateObj,self2.config.minDate,true)===0;var limitMaxHours=self2.config.maxTime!==void 0||self2.config.maxDate&&self2.maxDateHasTime&&self2.latestSelectedDateObj&&compareDates(self2.latestSelectedDateObj,self2.config.maxDate,true)===0;if(self2.config.maxTime!==void 0&&self2.config.minTime!==void 0&&self2.config.minTime>self2.config.maxTime){var minBound=calculateSecondsSinceMidnight(self2.config.minTime.getHours(),self2.config.minTime.getMinutes(),self2.config.minTime.getSeconds());var maxBound=calculateSecondsSinceMidnight(self2.config.maxTime.getHours(),self2.config.maxTime.getMinutes(),self2.config.maxTime.getSeconds());var currentTime=calculateSecondsSinceMidnight(hours,minutes,seconds);if(currentTime>maxBound&&currentTime<minBound){var result=parseSeconds(minBound);hours=result[0];minutes=result[1];seconds=result[2]}}else{if(limitMaxHours){var maxTime=self2.config.maxTime!==void 0?self2.config.maxTime:self2.config.maxDate;hours=Math.min(hours,maxTime.getHours());if(hours===maxTime.getHours())minutes=Math.min(minutes,maxTime.getMinutes());if(minutes===maxTime.getMinutes())seconds=Math.min(seconds,maxTime.getSeconds())}if(limitMinHours){var minTime=self2.config.minTime!==void 0?self2.config.minTime:self2.config.minDate;hours=Math.max(hours,minTime.getHours());if(hours===minTime.getHours()&&minutes<minTime.getMinutes())minutes=minTime.getMinutes();if(minutes===minTime.getMinutes())seconds=Math.max(seconds,minTime.getSeconds())}}setHours(hours,minutes,seconds)}function setHoursFromDate(dateObj){var date=dateObj||self2.latestSelectedDateObj;if(date&&date instanceof Date){setHours(date.getHours(),date.getMinutes(),date.getSeconds())}}function setHours(hours,minutes,seconds){if(self2.latestSelectedDateObj!==void 0){self2.latestSelectedDateObj.setHours(hours%24,minutes,seconds||0,0)}if(!self2.hourElement||!self2.minuteElement||self2.isMobile)return;self2.hourElement.value=pad(!self2.config.time_24hr?(12+hours)%12+12*int(hours%12===0):hours);self2.minuteElement.value=pad(minutes);if(self2.amPM!==void 0)self2.amPM.textContent=self2.l10n.amPM[int(hours>=12)];if(self2.secondElement!==void 0)self2.secondElement.value=pad(seconds)}function onYearInput(event){var eventTarget=getEventTarget(event);var year=parseInt(eventTarget.value)+(event.delta||0);if(year/1e3>1||event.key==="Enter"&&!/[^\d]/.test(year.toString())){changeYear(year)}}function bind(element2,event,handler,options){if(event instanceof Array)return event.forEach((function(ev){return bind(element2,ev,handler,options)}));if(element2 instanceof Array)return element2.forEach((function(el){return bind(el,event,handler,options)}));element2.addEventListener(event,handler,options);self2._handlers.push({remove:function(){return element2.removeEventListener(event,handler,options)}})}function triggerChange(){triggerEvent("onChange")}function bindEvents(){if(self2.config.wrap){["open","close","toggle","clear"].forEach((function(evt){Array.prototype.forEach.call(self2.element.querySelectorAll("[data-"+evt+"]"),(function(el){return bind(el,"click",self2[evt])}))}))}if(self2.isMobile){setupMobile();return}var debouncedResize=debounce$1(onResize,50);self2._debouncedChange=debounce$1(triggerChange,DEBOUNCED_CHANGE_MS);if(self2.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent))bind(self2.daysContainer,"mouseover",(function(e){if(self2.config.mode==="range")onMouseOver(getEventTarget(e))}));bind(self2._input,"keydown",onKeyDown);if(self2.calendarContainer!==void 0){bind(self2.calendarContainer,"keydown",onKeyDown)}if(!self2.config.inline&&!self2.config.static)bind(window,"resize",debouncedResize);if(window.ontouchstart!==void 0)bind(window.document,"touchstart",documentClick);else bind(window.document,"mousedown",documentClick);bind(window.document,"focus",documentClick,{capture:true});if(self2.config.clickOpens===true){bind(self2._input,"focus",self2.open);bind(self2._input,"click",self2.open)}if(self2.daysContainer!==void 0){bind(self2.monthNav,"click",onMonthNavClick);bind(self2.monthNav,["keyup","increment"],onYearInput);bind(self2.daysContainer,"click",selectDate)}if(self2.timeContainer!==void 0&&self2.minuteElement!==void 0&&self2.hourElement!==void 0){var selText=function(e){return getEventTarget(e).select()};bind(self2.timeContainer,["increment"],updateTime);bind(self2.timeContainer,"blur",updateTime,{capture:true});bind(self2.timeContainer,"click",timeIncrement);bind([self2.hourElement,self2.minuteElement],["focus","click"],selText);if(self2.secondElement!==void 0)bind(self2.secondElement,"focus",(function(){return self2.secondElement&&self2.secondElement.select()}));if(self2.amPM!==void 0){bind(self2.amPM,"click",(function(e){updateTime(e)}))}}if(self2.config.allowInput){bind(self2._input,"blur",onBlur)}}function jumpToDate(jumpDate,triggerChange2){var jumpTo=jumpDate!==void 0?self2.parseDate(jumpDate):self2.latestSelectedDateObj||(self2.config.minDate&&self2.config.minDate>self2.now?self2.config.minDate:self2.config.maxDate&&self2.config.maxDate<self2.now?self2.config.maxDate:self2.now);var oldYear=self2.currentYear;var oldMonth=self2.currentMonth;try{if(jumpTo!==void 0){self2.currentYear=jumpTo.getFullYear();self2.currentMonth=jumpTo.getMonth()}}catch(e){e.message="Invalid date supplied: "+jumpTo;self2.config.errorHandler(e)}if(triggerChange2&&self2.currentYear!==oldYear){triggerEvent("onYearChange");buildMonthSwitch()}if(triggerChange2&&(self2.currentYear!==oldYear||self2.currentMonth!==oldMonth)){triggerEvent("onMonthChange")}self2.redraw()}function timeIncrement(e){var eventTarget=getEventTarget(e);if(~eventTarget.className.indexOf("arrow"))incrementNumInput(e,eventTarget.classList.contains("arrowUp")?1:-1)}function incrementNumInput(e,delta,inputElem){var target=e&&getEventTarget(e);var input=inputElem||target&&target.parentNode&&target.parentNode.firstChild;var event=createEvent("increment");event.delta=delta;input&&input.dispatchEvent(event)}function build(){var fragment=window.document.createDocumentFragment();self2.calendarContainer=createElement("div","flatpickr-calendar");self2.calendarContainer.tabIndex=-1;if(!self2.config.noCalendar){fragment.appendChild(buildMonthNav());self2.innerContainer=createElement("div","flatpickr-innerContainer");if(self2.config.weekNumbers){var _a=buildWeeks(),weekWrapper=_a.weekWrapper,weekNumbers=_a.weekNumbers;self2.innerContainer.appendChild(weekWrapper);self2.weekNumbers=weekNumbers;self2.weekWrapper=weekWrapper}self2.rContainer=createElement("div","flatpickr-rContainer");self2.rContainer.appendChild(buildWeekdays());if(!self2.daysContainer){self2.daysContainer=createElement("div","flatpickr-days");self2.daysContainer.tabIndex=-1}buildDays();self2.rContainer.appendChild(self2.daysContainer);self2.innerContainer.appendChild(self2.rContainer);fragment.appendChild(self2.innerContainer)}if(self2.config.enableTime){fragment.appendChild(buildTime())}toggleClass(self2.calendarContainer,"rangeMode",self2.config.mode==="range");toggleClass(self2.calendarContainer,"animate",self2.config.animate===true);toggleClass(self2.calendarContainer,"multiMonth",self2.config.showMonths>1);self2.calendarContainer.appendChild(fragment);var customAppend=self2.config.appendTo!==void 0&&self2.config.appendTo.nodeType!==void 0;if(self2.config.inline||self2.config.static){self2.calendarContainer.classList.add(self2.config.inline?"inline":"static");if(self2.config.inline){if(!customAppend&&self2.element.parentNode)self2.element.parentNode.insertBefore(self2.calendarContainer,self2._input.nextSibling);else if(self2.config.appendTo!==void 0)self2.config.appendTo.appendChild(self2.calendarContainer)}if(self2.config.static){var wrapper=createElement("div","flatpickr-wrapper");if(self2.element.parentNode)self2.element.parentNode.insertBefore(wrapper,self2.element);wrapper.appendChild(self2.element);if(self2.altInput)wrapper.appendChild(self2.altInput);wrapper.appendChild(self2.calendarContainer)}}if(!self2.config.static&&!self2.config.inline)(self2.config.appendTo!==void 0?self2.config.appendTo:window.document.body).appendChild(self2.calendarContainer)}function createDay(className,date,_dayNumber,i){var dateIsEnabled=isEnabled(date,true),dayElement=createElement("span",className,date.getDate().toString());dayElement.dateObj=date;dayElement.$i=i;dayElement.setAttribute("aria-label",self2.formatDate(date,self2.config.ariaDateFormat));if(className.indexOf("hidden")===-1&&compareDates(date,self2.now)===0){self2.todayDateElem=dayElement;dayElement.classList.add("today");dayElement.setAttribute("aria-current","date")}if(dateIsEnabled){dayElement.tabIndex=-1;if(isDateSelected(date)){dayElement.classList.add("selected");self2.selectedDateElem=dayElement;if(self2.config.mode==="range"){toggleClass(dayElement,"startRange",self2.selectedDates[0]&&compareDates(date,self2.selectedDates[0],true)===0);toggleClass(dayElement,"endRange",self2.selectedDates[1]&&compareDates(date,self2.selectedDates[1],true)===0);if(className==="nextMonthDay")dayElement.classList.add("inRange")}}}else{dayElement.classList.add("flatpickr-disabled")}if(self2.config.mode==="range"){if(isDateInRange(date)&&!isDateSelected(date))dayElement.classList.add("inRange")}if(self2.weekNumbers&&self2.config.showMonths===1&&className!=="prevMonthDay"&&i%7===6){self2.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+self2.config.getWeek(date)+"</span>")}triggerEvent("onDayCreate",dayElement);return dayElement}function focusOnDayElem(targetNode){targetNode.focus();if(self2.config.mode==="range")onMouseOver(targetNode)}function getFirstAvailableDay(delta){var startMonth=delta>0?0:self2.config.showMonths-1;var endMonth=delta>0?self2.config.showMonths:-1;for(var m=startMonth;m!=endMonth;m+=delta){var month=self2.daysContainer.children[m];var startIndex=delta>0?0:month.children.length-1;var endIndex=delta>0?month.children.length:-1;for(var i=startIndex;i!=endIndex;i+=delta){var c=month.children[i];if(c.className.indexOf("hidden")===-1&&isEnabled(c.dateObj))return c}}return void 0}function getNextAvailableDay(current,delta){var givenMonth=current.className.indexOf("Month")===-1?current.dateObj.getMonth():self2.currentMonth;var endMonth=delta>0?self2.config.showMonths:-1;var loopDelta=delta>0?1:-1;for(var m=givenMonth-self2.currentMonth;m!=endMonth;m+=loopDelta){var month=self2.daysContainer.children[m];var startIndex=givenMonth-self2.currentMonth===m?current.$i+delta:delta<0?month.children.length-1:0;var numMonthDays=month.children.length;for(var i=startIndex;i>=0&&i<numMonthDays&&i!=(delta>0?numMonthDays:-1);i+=loopDelta){var c=month.children[i];if(c.className.indexOf("hidden")===-1&&isEnabled(c.dateObj)&&Math.abs(current.$i-i)>=Math.abs(delta))return focusOnDayElem(c)}}self2.changeMonth(loopDelta);focusOnDay(getFirstAvailableDay(loopDelta),0);return void 0}function focusOnDay(current,offset2){var activeElement=getClosestActiveElement();var dayFocused=isInView(activeElement||document.body);var startElem=current!==void 0?current:dayFocused?activeElement:self2.selectedDateElem!==void 0&&isInView(self2.selectedDateElem)?self2.selectedDateElem:self2.todayDateElem!==void 0&&isInView(self2.todayDateElem)?self2.todayDateElem:getFirstAvailableDay(offset2>0?1:-1);if(startElem===void 0){self2._input.focus()}else if(!dayFocused){focusOnDayElem(startElem)}else{getNextAvailableDay(startElem,offset2)}}function buildMonthDays(year,month){var firstOfMonth=(new Date(year,month,1).getDay()-self2.l10n.firstDayOfWeek+7)%7;var prevMonthDays=self2.utils.getDaysInMonth((month-1+12)%12,year);var daysInMonth=self2.utils.getDaysInMonth(month,year),days2=window.document.createDocumentFragment(),isMultiMonth=self2.config.showMonths>1,prevMonthDayClass=isMultiMonth?"prevMonthDay hidden":"prevMonthDay",nextMonthDayClass=isMultiMonth?"nextMonthDay hidden":"nextMonthDay";var dayNumber=prevMonthDays+1-firstOfMonth,dayIndex=0;for(;dayNumber<=prevMonthDays;dayNumber++,dayIndex++){days2.appendChild(createDay("flatpickr-day "+prevMonthDayClass,new Date(year,month-1,dayNumber),dayNumber,dayIndex))}for(dayNumber=1;dayNumber<=daysInMonth;dayNumber++,dayIndex++){days2.appendChild(createDay("flatpickr-day",new Date(year,month,dayNumber),dayNumber,dayIndex))}for(var dayNum=daysInMonth+1;dayNum<=42-firstOfMonth&&(self2.config.showMonths===1||dayIndex%7!==0);dayNum++,dayIndex++){days2.appendChild(createDay("flatpickr-day "+nextMonthDayClass,new Date(year,month+1,dayNum%daysInMonth),dayNum,dayIndex))}var dayContainer=createElement("div","dayContainer");dayContainer.appendChild(days2);return dayContainer}function buildDays(){if(self2.daysContainer===void 0){return}clearNode(self2.daysContainer);if(self2.weekNumbers)clearNode(self2.weekNumbers);var frag=document.createDocumentFragment();for(var i=0;i<self2.config.showMonths;i++){var d=new Date(self2.currentYear,self2.currentMonth,1);d.setMonth(self2.currentMonth+i);frag.appendChild(buildMonthDays(d.getFullYear(),d.getMonth()))}self2.daysContainer.appendChild(frag);self2.days=self2.daysContainer.firstChild;if(self2.config.mode==="range"&&self2.selectedDates.length===1){onMouseOver()}}function buildMonthSwitch(){if(self2.config.showMonths>1||self2.config.monthSelectorType!=="dropdown")return;var shouldBuildMonth=function(month2){if(self2.config.minDate!==void 0&&self2.currentYear===self2.config.minDate.getFullYear()&&month2<self2.config.minDate.getMonth()){return false}return!(self2.config.maxDate!==void 0&&self2.currentYear===self2.config.maxDate.getFullYear()&&month2>self2.config.maxDate.getMonth())};self2.monthsDropdownContainer.tabIndex=-1;self2.monthsDropdownContainer.innerHTML="";for(var i=0;i<12;i++){if(!shouldBuildMonth(i))continue;var month=createElement("option","flatpickr-monthDropdown-month");month.value=new Date(self2.currentYear,i).getMonth().toString();month.textContent=monthToStr(i,self2.config.shorthandCurrentMonth,self2.l10n);month.tabIndex=-1;if(self2.currentMonth===i){month.selected=true}self2.monthsDropdownContainer.appendChild(month)}}function buildMonth(){var container=createElement("div","flatpickr-month");var monthNavFragment=window.document.createDocumentFragment();var monthElement;if(self2.config.showMonths>1||self2.config.monthSelectorType==="static"){monthElement=createElement("span","cur-month")}else{self2.monthsDropdownContainer=createElement("select","flatpickr-monthDropdown-months");self2.monthsDropdownContainer.setAttribute("aria-label",self2.l10n.monthAriaLabel);bind(self2.monthsDropdownContainer,"change",(function(e){var target=getEventTarget(e);var selectedMonth=parseInt(target.value,10);self2.changeMonth(selectedMonth-self2.currentMonth);triggerEvent("onMonthChange")}));buildMonthSwitch();monthElement=self2.monthsDropdownContainer}var yearInput=createNumberInput("cur-year",{tabindex:"-1"});var yearElement=yearInput.getElementsByTagName("input")[0];yearElement.setAttribute("aria-label",self2.l10n.yearAriaLabel);if(self2.config.minDate){yearElement.setAttribute("min",self2.config.minDate.getFullYear().toString())}if(self2.config.maxDate){yearElement.setAttribute("max",self2.config.maxDate.getFullYear().toString());yearElement.disabled=!!self2.config.minDate&&self2.config.minDate.getFullYear()===self2.config.maxDate.getFullYear()}var currentMonth=createElement("div","flatpickr-current-month");currentMonth.appendChild(monthElement);currentMonth.appendChild(yearInput);monthNavFragment.appendChild(currentMonth);container.appendChild(monthNavFragment);return{container:container,yearElement:yearElement,monthElement:monthElement}}function buildMonths(){clearNode(self2.monthNav);self2.monthNav.appendChild(self2.prevMonthNav);if(self2.config.showMonths){self2.yearElements=[];self2.monthElements=[]}for(var m=self2.config.showMonths;m--;){var month=buildMonth();self2.yearElements.push(month.yearElement);self2.monthElements.push(month.monthElement);self2.monthNav.appendChild(month.container)}self2.monthNav.appendChild(self2.nextMonthNav)}function buildMonthNav(){self2.monthNav=createElement("div","flatpickr-months");self2.yearElements=[];self2.monthElements=[];self2.prevMonthNav=createElement("span","flatpickr-prev-month");self2.prevMonthNav.innerHTML=self2.config.prevArrow;self2.nextMonthNav=createElement("span","flatpickr-next-month");self2.nextMonthNav.innerHTML=self2.config.nextArrow;buildMonths();Object.defineProperty(self2,"_hidePrevMonthArrow",{get:function(){return self2.__hidePrevMonthArrow},set:function(bool){if(self2.__hidePrevMonthArrow!==bool){toggleClass(self2.prevMonthNav,"flatpickr-disabled",bool);self2.__hidePrevMonthArrow=bool}}});Object.defineProperty(self2,"_hideNextMonthArrow",{get:function(){return self2.__hideNextMonthArrow},set:function(bool){if(self2.__hideNextMonthArrow!==bool){toggleClass(self2.nextMonthNav,"flatpickr-disabled",bool);self2.__hideNextMonthArrow=bool}}});self2.currentYearElement=self2.yearElements[0];updateNavigationCurrentMonth();return self2.monthNav}function buildTime(){self2.calendarContainer.classList.add("hasTime");if(self2.config.noCalendar)self2.calendarContainer.classList.add("noCalendar");var defaults2=getDefaultHours(self2.config);self2.timeContainer=createElement("div","flatpickr-time");self2.timeContainer.tabIndex=-1;var separator=createElement("span","flatpickr-time-separator",":");var hourInput=createNumberInput("flatpickr-hour",{"aria-label":self2.l10n.hourAriaLabel});self2.hourElement=hourInput.getElementsByTagName("input")[0];var minuteInput=createNumberInput("flatpickr-minute",{"aria-label":self2.l10n.minuteAriaLabel});self2.minuteElement=minuteInput.getElementsByTagName("input")[0];self2.hourElement.tabIndex=self2.minuteElement.tabIndex=-1;self2.hourElement.value=pad(self2.latestSelectedDateObj?self2.latestSelectedDateObj.getHours():self2.config.time_24hr?defaults2.hours:military2ampm(defaults2.hours));self2.minuteElement.value=pad(self2.latestSelectedDateObj?self2.latestSelectedDateObj.getMinutes():defaults2.minutes);self2.hourElement.setAttribute("step",self2.config.hourIncrement.toString());self2.minuteElement.setAttribute("step",self2.config.minuteIncrement.toString());self2.hourElement.setAttribute("min",self2.config.time_24hr?"0":"1");self2.hourElement.setAttribute("max",self2.config.time_24hr?"23":"12");self2.hourElement.setAttribute("maxlength","2");self2.minuteElement.setAttribute("min","0");self2.minuteElement.setAttribute("max","59");self2.minuteElement.setAttribute("maxlength","2");self2.timeContainer.appendChild(hourInput);self2.timeContainer.appendChild(separator);self2.timeContainer.appendChild(minuteInput);if(self2.config.time_24hr)self2.timeContainer.classList.add("time24hr");if(self2.config.enableSeconds){self2.timeContainer.classList.add("hasSeconds");var secondInput=createNumberInput("flatpickr-second");self2.secondElement=secondInput.getElementsByTagName("input")[0];self2.secondElement.value=pad(self2.latestSelectedDateObj?self2.latestSelectedDateObj.getSeconds():defaults2.seconds);self2.secondElement.setAttribute("step",self2.minuteElement.getAttribute("step"));self2.secondElement.setAttribute("min","0");self2.secondElement.setAttribute("max","59");self2.secondElement.setAttribute("maxlength","2");self2.timeContainer.appendChild(createElement("span","flatpickr-time-separator",":"));self2.timeContainer.appendChild(secondInput)}if(!self2.config.time_24hr){self2.amPM=createElement("span","flatpickr-am-pm",self2.l10n.amPM[int((self2.latestSelectedDateObj?self2.hourElement.value:self2.config.defaultHour)>11)]);self2.amPM.title=self2.l10n.toggleTitle;self2.amPM.tabIndex=-1;self2.timeContainer.appendChild(self2.amPM)}return self2.timeContainer}function buildWeekdays(){if(!self2.weekdayContainer)self2.weekdayContainer=createElement("div","flatpickr-weekdays");else clearNode(self2.weekdayContainer);for(var i=self2.config.showMonths;i--;){var container=createElement("div","flatpickr-weekdaycontainer");self2.weekdayContainer.appendChild(container)}updateWeekdays();return self2.weekdayContainer}function updateWeekdays(){if(!self2.weekdayContainer){return}var firstDayOfWeek=self2.l10n.firstDayOfWeek;var weekdays=__spreadArrays(self2.l10n.weekdays.shorthand);if(firstDayOfWeek>0&&firstDayOfWeek<weekdays.length){weekdays=__spreadArrays(weekdays.splice(firstDayOfWeek,weekdays.length),weekdays.splice(0,firstDayOfWeek))}for(var i=self2.config.showMonths;i--;){self2.weekdayContainer.children[i].innerHTML="\n <span class='flatpickr-weekday'>\n "+weekdays.join("</span><span class='flatpickr-weekday'>")+"\n </span>\n "}}function buildWeeks(){self2.calendarContainer.classList.add("hasWeeks");var weekWrapper=createElement("div","flatpickr-weekwrapper");weekWrapper.appendChild(createElement("span","flatpickr-weekday",self2.l10n.weekAbbreviation));var weekNumbers=createElement("div","flatpickr-weeks");weekWrapper.appendChild(weekNumbers);return{weekWrapper:weekWrapper,weekNumbers:weekNumbers}}function changeMonth(value,isOffset){if(isOffset===void 0){isOffset=true}var delta=isOffset?value:value-self2.currentMonth;if(delta<0&&self2._hidePrevMonthArrow===true||delta>0&&self2._hideNextMonthArrow===true)return;self2.currentMonth+=delta;if(self2.currentMonth<0||self2.currentMonth>11){self2.currentYear+=self2.currentMonth>11?1:-1;self2.currentMonth=(self2.currentMonth+12)%12;triggerEvent("onYearChange");buildMonthSwitch()}buildDays();triggerEvent("onMonthChange");updateNavigationCurrentMonth()}function clear(triggerChangeEvent,toInitial){if(triggerChangeEvent===void 0){triggerChangeEvent=true}if(toInitial===void 0){toInitial=true}self2.input.value="";if(self2.altInput!==void 0)self2.altInput.value="";if(self2.mobileInput!==void 0)self2.mobileInput.value="";self2.selectedDates=[];self2.latestSelectedDateObj=void 0;if(toInitial===true){self2.currentYear=self2._initialDate.getFullYear();self2.currentMonth=self2._initialDate.getMonth()}if(self2.config.enableTime===true){var _a=getDefaultHours(self2.config),hours=_a.hours,minutes=_a.minutes,seconds=_a.seconds;setHours(hours,minutes,seconds)}self2.redraw();if(triggerChangeEvent)triggerEvent("onChange")}function close(){self2.isOpen=false;if(!self2.isMobile){if(self2.calendarContainer!==void 0){self2.calendarContainer.classList.remove("open")}if(self2._input!==void 0){self2._input.classList.remove("active")}}triggerEvent("onClose")}function destroy(){if(self2.config!==void 0)triggerEvent("onDestroy");for(var i=self2._handlers.length;i--;){self2._handlers[i].remove()}self2._handlers=[];if(self2.mobileInput){if(self2.mobileInput.parentNode)self2.mobileInput.parentNode.removeChild(self2.mobileInput);self2.mobileInput=void 0}else if(self2.calendarContainer&&self2.calendarContainer.parentNode){if(self2.config.static&&self2.calendarContainer.parentNode){var wrapper=self2.calendarContainer.parentNode;wrapper.lastChild&&wrapper.removeChild(wrapper.lastChild);if(wrapper.parentNode){while(wrapper.firstChild)wrapper.parentNode.insertBefore(wrapper.firstChild,wrapper);wrapper.parentNode.removeChild(wrapper)}}else self2.calendarContainer.parentNode.removeChild(self2.calendarContainer)}if(self2.altInput){self2.input.type="text";if(self2.altInput.parentNode)self2.altInput.parentNode.removeChild(self2.altInput);delete self2.altInput}if(self2.input){self2.input.type=self2.input._type;self2.input.classList.remove("flatpickr-input");self2.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(k){try{delete self2[k]}catch(_){}}))}function isCalendarElem(elem){return self2.calendarContainer.contains(elem)}function documentClick(e){if(self2.isOpen&&!self2.config.inline){var eventTarget_1=getEventTarget(e);var isCalendarElement=isCalendarElem(eventTarget_1);var isInput=eventTarget_1===self2.input||eventTarget_1===self2.altInput||self2.element.contains(eventTarget_1)||e.path&&e.path.indexOf&&(~e.path.indexOf(self2.input)||~e.path.indexOf(self2.altInput));var lostFocus=!isInput&&!isCalendarElement&&!isCalendarElem(e.relatedTarget);var isIgnored=!self2.config.ignoredFocusElements.some((function(elem){return elem.contains(eventTarget_1)}));if(lostFocus&&isIgnored){if(self2.config.allowInput){self2.setDate(self2._input.value,false,self2.config.altInput?self2.config.altFormat:self2.config.dateFormat)}if(self2.timeContainer!==void 0&&self2.minuteElement!==void 0&&self2.hourElement!==void 0&&self2.input.value!==""&&self2.input.value!==void 0){updateTime()}self2.close();if(self2.config&&self2.config.mode==="range"&&self2.selectedDates.length===1)self2.clear(false)}}}function changeYear(newYear){if(!newYear||self2.config.minDate&&newYear<self2.config.minDate.getFullYear()||self2.config.maxDate&&newYear>self2.config.maxDate.getFullYear())return;var newYearNum=newYear,isNewYear=self2.currentYear!==newYearNum;self2.currentYear=newYearNum||self2.currentYear;if(self2.config.maxDate&&self2.currentYear===self2.config.maxDate.getFullYear()){self2.currentMonth=Math.min(self2.config.maxDate.getMonth(),self2.currentMonth)}else if(self2.config.minDate&&self2.currentYear===self2.config.minDate.getFullYear()){self2.currentMonth=Math.max(self2.config.minDate.getMonth(),self2.currentMonth)}if(isNewYear){self2.redraw();triggerEvent("onYearChange");buildMonthSwitch()}}function isEnabled(date,timeless){var _a;if(timeless===void 0){timeless=true}var dateToCheck=self2.parseDate(date,void 0,timeless);if(self2.config.minDate&&dateToCheck&&compareDates(dateToCheck,self2.config.minDate,timeless!==void 0?timeless:!self2.minDateHasTime)<0||self2.config.maxDate&&dateToCheck&&compareDates(dateToCheck,self2.config.maxDate,timeless!==void 0?timeless:!self2.maxDateHasTime)>0)return false;if(!self2.config.enable&&self2.config.disable.length===0)return true;if(dateToCheck===void 0)return false;var bool=!!self2.config.enable,array=(_a=self2.config.enable)!==null&&_a!==void 0?_a:self2.config.disable;for(var i=0,d=void 0;i<array.length;i++){d=array[i];if(typeof d==="function"&&d(dateToCheck))return bool;else if(d instanceof Date&&dateToCheck!==void 0&&d.getTime()===dateToCheck.getTime())return bool;else if(typeof d==="string"){var parsed=self2.parseDate(d,void 0,true);return parsed&&parsed.getTime()===dateToCheck.getTime()?bool:!bool}else if(typeof d==="object"&&dateToCheck!==void 0&&d.from&&d.to&&dateToCheck.getTime()>=d.from.getTime()&&dateToCheck.getTime()<=d.to.getTime())return bool}return!bool}function isInView(elem){if(self2.daysContainer!==void 0)return elem.className.indexOf("hidden")===-1&&elem.className.indexOf("flatpickr-disabled")===-1&&self2.daysContainer.contains(elem);return false}function onBlur(e){var isInput=e.target===self2._input;var valueChanged=self2._input.value.trimEnd()!==getDateStr();if(isInput&&valueChanged&&!(e.relatedTarget&&isCalendarElem(e.relatedTarget))){self2.setDate(self2._input.value,true,e.target===self2.altInput?self2.config.altFormat:self2.config.dateFormat)}}function onKeyDown(e){var eventTarget=getEventTarget(e);var isInput=self2.config.wrap?element.contains(eventTarget):eventTarget===self2._input;var allowInput=self2.config.allowInput;var allowKeydown=self2.isOpen&&(!allowInput||!isInput);var allowInlineKeydown=self2.config.inline&&isInput&&!allowInput;if(e.keyCode===13&&isInput){if(allowInput){self2.setDate(self2._input.value,true,eventTarget===self2.altInput?self2.config.altFormat:self2.config.dateFormat);self2.close();return eventTarget.blur()}else{self2.open()}}else if(isCalendarElem(eventTarget)||allowKeydown||allowInlineKeydown){var isTimeObj=!!self2.timeContainer&&self2.timeContainer.contains(eventTarget);switch(e.keyCode){case 13:if(isTimeObj){e.preventDefault();updateTime();focusAndClose()}else selectDate(e);break;case 27:e.preventDefault();focusAndClose();break;case 8:case 46:if(isInput&&!self2.config.allowInput){e.preventDefault();self2.clear()}break;case 37:case 39:if(!isTimeObj&&!isInput){e.preventDefault();var activeElement=getClosestActiveElement();if(self2.daysContainer!==void 0&&(allowInput===false||activeElement&&isInView(activeElement))){var delta_1=e.keyCode===39?1:-1;if(!e.ctrlKey)focusOnDay(void 0,delta_1);else{e.stopPropagation();changeMonth(delta_1);focusOnDay(getFirstAvailableDay(1),0)}}}else if(self2.hourElement)self2.hourElement.focus();break;case 38:case 40:e.preventDefault();var delta=e.keyCode===40?1:-1;if(self2.daysContainer&&eventTarget.$i!==void 0||eventTarget===self2.input||eventTarget===self2.altInput){if(e.ctrlKey){e.stopPropagation();changeYear(self2.currentYear-delta);focusOnDay(getFirstAvailableDay(1),0)}else if(!isTimeObj)focusOnDay(void 0,delta*7)}else if(eventTarget===self2.currentYearElement){changeYear(self2.currentYear-delta)}else if(self2.config.enableTime){if(!isTimeObj&&self2.hourElement)self2.hourElement.focus();updateTime(e);self2._debouncedChange()}break;case 9:if(isTimeObj){var elems=[self2.hourElement,self2.minuteElement,self2.secondElement,self2.amPM].concat(self2.pluginElements).filter((function(x){return x}));var i=elems.indexOf(eventTarget);if(i!==-1){var target=elems[i+(e.shiftKey?-1:1)];e.preventDefault();(target||self2._input).focus()}}else if(!self2.config.noCalendar&&self2.daysContainer&&self2.daysContainer.contains(eventTarget)&&e.shiftKey){e.preventDefault();self2._input.focus()}break}}if(self2.amPM!==void 0&&eventTarget===self2.amPM){switch(e.key){case self2.l10n.amPM[0].charAt(0):case self2.l10n.amPM[0].charAt(0).toLowerCase():self2.amPM.textContent=self2.l10n.amPM[0];setHoursFromInputs();updateValue();break;case self2.l10n.amPM[1].charAt(0):case self2.l10n.amPM[1].charAt(0).toLowerCase():self2.amPM.textContent=self2.l10n.amPM[1];setHoursFromInputs();updateValue();break}}if(isInput||isCalendarElem(eventTarget)){triggerEvent("onKeyDown",e)}}function onMouseOver(elem,cellClass){if(cellClass===void 0){cellClass="flatpickr-day"}if(self2.selectedDates.length!==1||elem&&(!elem.classList.contains(cellClass)||elem.classList.contains("flatpickr-disabled")))return;var hoverDate=elem?elem.dateObj.getTime():self2.days.firstElementChild.dateObj.getTime(),initialDate=self2.parseDate(self2.selectedDates[0],void 0,true).getTime(),rangeStartDate=Math.min(hoverDate,self2.selectedDates[0].getTime()),rangeEndDate=Math.max(hoverDate,self2.selectedDates[0].getTime());var containsDisabled=false;var minRange=0,maxRange=0;for(var t=rangeStartDate;t<rangeEndDate;t+=duration.DAY){if(!isEnabled(new Date(t),true)){containsDisabled=containsDisabled||t>rangeStartDate&&t<rangeEndDate;if(t<initialDate&&(!minRange||t>minRange))minRange=t;else if(t>initialDate&&(!maxRange||t<maxRange))maxRange=t}}var hoverableCells=Array.from(self2.rContainer.querySelectorAll("*:nth-child(-n+"+self2.config.showMonths+") > ."+cellClass));hoverableCells.forEach((function(dayElem){var date=dayElem.dateObj;var timestamp=date.getTime();var outOfRange=minRange>0&&timestamp<minRange||maxRange>0&&timestamp>maxRange;if(outOfRange){dayElem.classList.add("notAllowed");["inRange","startRange","endRange"].forEach((function(c){dayElem.classList.remove(c)}));return}else if(containsDisabled&&!outOfRange)return;["startRange","inRange","endRange","notAllowed"].forEach((function(c){dayElem.classList.remove(c)}));if(elem!==void 0){elem.classList.add(hoverDate<=self2.selectedDates[0].getTime()?"startRange":"endRange");if(initialDate<hoverDate&&timestamp===initialDate)dayElem.classList.add("startRange");else if(initialDate>hoverDate&&timestamp===initialDate)dayElem.classList.add("endRange");if(timestamp>=minRange&&(maxRange===0||timestamp<=maxRange)&&isBetween(timestamp,initialDate,hoverDate))dayElem.classList.add("inRange")}}))}function onResize(){if(self2.isOpen&&!self2.config.static&&!self2.config.inline)positionCalendar()}function open(e,positionElement){if(positionElement===void 0){positionElement=self2._positionElement}if(self2.isMobile===true){if(e){e.preventDefault();var eventTarget=getEventTarget(e);if(eventTarget){eventTarget.blur()}}if(self2.mobileInput!==void 0){self2.mobileInput.focus();self2.mobileInput.click()}triggerEvent("onOpen");return}else if(self2._input.disabled||self2.config.inline){return}var wasOpen=self2.isOpen;self2.isOpen=true;if(!wasOpen){self2.calendarContainer.classList.add("open");self2._input.classList.add("active");triggerEvent("onOpen");positionCalendar(positionElement)}if(self2.config.enableTime===true&&self2.config.noCalendar===true){if(self2.config.allowInput===false&&(e===void 0||!self2.timeContainer.contains(e.relatedTarget))){setTimeout((function(){return self2.hourElement.select()}),50)}}}function minMaxDateSetter(type){return function(date){var dateObj=self2.config["_"+type+"Date"]=self2.parseDate(date,self2.config.dateFormat);var inverseDateObj=self2.config["_"+(type==="min"?"max":"min")+"Date"];if(dateObj!==void 0){self2[type==="min"?"minDateHasTime":"maxDateHasTime"]=dateObj.getHours()>0||dateObj.getMinutes()>0||dateObj.getSeconds()>0}if(self2.selectedDates){self2.selectedDates=self2.selectedDates.filter((function(d){return isEnabled(d)}));if(!self2.selectedDates.length&&type==="min")setHoursFromDate(dateObj);updateValue()}if(self2.daysContainer){redraw();if(dateObj!==void 0)self2.currentYearElement[type]=dateObj.getFullYear().toString();else self2.currentYearElement.removeAttribute(type);self2.currentYearElement.disabled=!!inverseDateObj&&dateObj!==void 0&&inverseDateObj.getFullYear()===dateObj.getFullYear()}}}function parseConfig(){var boolOpts=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"];var userConfig=__assign(__assign({},JSON.parse(JSON.stringify(element.dataset||{}))),instanceConfig);var formats2={};self2.config.parseDate=userConfig.parseDate;self2.config.formatDate=userConfig.formatDate;Object.defineProperty(self2.config,"enable",{get:function(){return self2.config._enable},set:function(dates){self2.config._enable=parseDateRules(dates)}});Object.defineProperty(self2.config,"disable",{get:function(){return self2.config._disable},set:function(dates){self2.config._disable=parseDateRules(dates)}});var timeMode=userConfig.mode==="time";if(!userConfig.dateFormat&&(userConfig.enableTime||timeMode)){var defaultDateFormat=flatpickr.defaultConfig.dateFormat||defaults.dateFormat;formats2.dateFormat=userConfig.noCalendar||timeMode?"H:i"+(userConfig.enableSeconds?":S":""):defaultDateFormat+" H:i"+(userConfig.enableSeconds?":S":"")}if(userConfig.altInput&&(userConfig.enableTime||timeMode)&&!userConfig.altFormat){var defaultAltFormat=flatpickr.defaultConfig.altFormat||defaults.altFormat;formats2.altFormat=userConfig.noCalendar||timeMode?"h:i"+(userConfig.enableSeconds?":S K":" K"):defaultAltFormat+(" h:i"+(userConfig.enableSeconds?":S":"")+" K")}Object.defineProperty(self2.config,"minDate",{get:function(){return self2.config._minDate},set:minMaxDateSetter("min")});Object.defineProperty(self2.config,"maxDate",{get:function(){return self2.config._maxDate},set:minMaxDateSetter("max")});var minMaxTimeSetter=function(type){return function(val){self2.config[type==="min"?"_minTime":"_maxTime"]=self2.parseDate(val,"H:i:S")}};Object.defineProperty(self2.config,"minTime",{get:function(){return self2.config._minTime},set:minMaxTimeSetter("min")});Object.defineProperty(self2.config,"maxTime",{get:function(){return self2.config._maxTime},set:minMaxTimeSetter("max")});if(userConfig.mode==="time"){self2.config.noCalendar=true;self2.config.enableTime=true}Object.assign(self2.config,formats2,userConfig);for(var i=0;i<boolOpts.length;i++)self2.config[boolOpts[i]]=self2.config[boolOpts[i]]===true||self2.config[boolOpts[i]]==="true";HOOKS.filter((function(hook){return self2.config[hook]!==void 0})).forEach((function(hook){self2.config[hook]=arrayify(self2.config[hook]||[]).map(bindToInstance)}));self2.isMobile=!self2.config.disableMobile&&!self2.config.inline&&self2.config.mode==="single"&&!self2.config.disable.length&&!self2.config.enable&&!self2.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var i=0;i<self2.config.plugins.length;i++){var pluginConf=self2.config.plugins[i](self2)||{};for(var key in pluginConf){if(HOOKS.indexOf(key)>-1){self2.config[key]=arrayify(pluginConf[key]).map(bindToInstance).concat(self2.config[key])}else if(typeof userConfig[key]==="undefined")self2.config[key]=pluginConf[key]}}if(!userConfig.altInputClass){self2.config.altInputClass=getInputElem().className+" "+self2.config.altInputClass}triggerEvent("onParseConfig")}function getInputElem(){return self2.config.wrap?element.querySelector("[data-input]"):element}function setupLocale(){if(typeof self2.config.locale!=="object"&&typeof flatpickr.l10ns[self2.config.locale]==="undefined")self2.config.errorHandler(new Error("flatpickr: invalid locale "+self2.config.locale));self2.l10n=__assign(__assign({},flatpickr.l10ns.default),typeof self2.config.locale==="object"?self2.config.locale:self2.config.locale!=="default"?flatpickr.l10ns[self2.config.locale]:void 0);tokenRegex.D="("+self2.l10n.weekdays.shorthand.join("|")+")";tokenRegex.l="("+self2.l10n.weekdays.longhand.join("|")+")";tokenRegex.M="("+self2.l10n.months.shorthand.join("|")+")";tokenRegex.F="("+self2.l10n.months.longhand.join("|")+")";tokenRegex.K="("+self2.l10n.amPM[0]+"|"+self2.l10n.amPM[1]+"|"+self2.l10n.amPM[0].toLowerCase()+"|"+self2.l10n.amPM[1].toLowerCase()+")";var userConfig=__assign(__assign({},instanceConfig),JSON.parse(JSON.stringify(element.dataset||{})));if(userConfig.time_24hr===void 0&&flatpickr.defaultConfig.time_24hr===void 0){self2.config.time_24hr=self2.l10n.time_24hr}self2.formatDate=createDateFormatter(self2);self2.parseDate=createDateParser({config:self2.config,l10n:self2.l10n})}function positionCalendar(customPositionElement){if(typeof self2.config.position==="function"){return void self2.config.position(self2,customPositionElement)}if(self2.calendarContainer===void 0)return;triggerEvent("onPreCalendarPosition");var positionElement=customPositionElement||self2._positionElement;var calendarHeight=Array.prototype.reduce.call(self2.calendarContainer.children,(function(acc,child){return acc+child.offsetHeight}),0),calendarWidth=self2.calendarContainer.offsetWidth,configPos=self2.config.position.split(" "),configPosVertical=configPos[0],configPosHorizontal=configPos.length>1?configPos[1]:null,inputBounds=positionElement.getBoundingClientRect(),distanceFromBottom=window.innerHeight-inputBounds.bottom,showOnTop=configPosVertical==="above"||configPosVertical!=="below"&&distanceFromBottom<calendarHeight&&inputBounds.top>calendarHeight;var top2=window.pageYOffset+inputBounds.top+(!showOnTop?positionElement.offsetHeight+2:-calendarHeight-2);toggleClass(self2.calendarContainer,"arrowTop",!showOnTop);toggleClass(self2.calendarContainer,"arrowBottom",showOnTop);if(self2.config.inline)return;var left2=window.pageXOffset+inputBounds.left;var isCenter=false;var isRight=false;if(configPosHorizontal==="center"){left2-=(calendarWidth-inputBounds.width)/2;isCenter=true}else if(configPosHorizontal==="right"){left2-=calendarWidth-inputBounds.width;isRight=true}toggleClass(self2.calendarContainer,"arrowLeft",!isCenter&&!isRight);toggleClass(self2.calendarContainer,"arrowCenter",isCenter);toggleClass(self2.calendarContainer,"arrowRight",isRight);var right2=window.document.body.offsetWidth-(window.pageXOffset+inputBounds.right);var rightMost=left2+calendarWidth>window.document.body.offsetWidth;var centerMost=right2+calendarWidth>window.document.body.offsetWidth;toggleClass(self2.calendarContainer,"rightMost",rightMost);if(self2.config.static)return;self2.calendarContainer.style.top=top2+"px";if(!rightMost){self2.calendarContainer.style.left=left2+"px";self2.calendarContainer.style.right="auto"}else if(!centerMost){self2.calendarContainer.style.left="auto";self2.calendarContainer.style.right=right2+"px"}else{var doc=getDocumentStyleSheet();if(doc===void 0)return;var bodyWidth=window.document.body.offsetWidth;var centerLeft=Math.max(0,bodyWidth/2-calendarWidth/2);var centerBefore=".flatpickr-calendar.centerMost:before";var centerAfter=".flatpickr-calendar.centerMost:after";var centerIndex=doc.cssRules.length;var centerStyle="{left:"+inputBounds.left+"px;right:auto;}";toggleClass(self2.calendarContainer,"rightMost",false);toggleClass(self2.calendarContainer,"centerMost",true);doc.insertRule(centerBefore+","+centerAfter+centerStyle,centerIndex);self2.calendarContainer.style.left=centerLeft+"px";self2.calendarContainer.style.right="auto"}}function getDocumentStyleSheet(){var editableSheet=null;for(var i=0;i<document.styleSheets.length;i++){var sheet=document.styleSheets[i];if(!sheet.cssRules)continue;try{sheet.cssRules}catch(err){continue}editableSheet=sheet;break}return editableSheet!=null?editableSheet:createStyleSheet()}function createStyleSheet(){var style=document.createElement("style");document.head.appendChild(style);return style.sheet}function redraw(){if(self2.config.noCalendar||self2.isMobile)return;buildMonthSwitch();updateNavigationCurrentMonth();buildDays()}function focusAndClose(){self2._input.focus();if(window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0){setTimeout(self2.close,0)}else{self2.close()}}function selectDate(e){e.preventDefault();e.stopPropagation();var isSelectable=function(day){return day.classList&&day.classList.contains("flatpickr-day")&&!day.classList.contains("flatpickr-disabled")&&!day.classList.contains("notAllowed")};var t=findParent(getEventTarget(e),isSelectable);if(t===void 0)return;var target=t;var selectedDate=self2.latestSelectedDateObj=new Date(target.dateObj.getTime());var shouldChangeMonth=(selectedDate.getMonth()<self2.currentMonth||selectedDate.getMonth()>self2.currentMonth+self2.config.showMonths-1)&&self2.config.mode!=="range";self2.selectedDateElem=target;if(self2.config.mode==="single")self2.selectedDates=[selectedDate];else if(self2.config.mode==="multiple"){var selectedIndex=isDateSelected(selectedDate);if(selectedIndex)self2.selectedDates.splice(parseInt(selectedIndex),1);else self2.selectedDates.push(selectedDate)}else if(self2.config.mode==="range"){if(self2.selectedDates.length===2){self2.clear(false,false)}self2.latestSelectedDateObj=selectedDate;self2.selectedDates.push(selectedDate);if(compareDates(selectedDate,self2.selectedDates[0],true)!==0)self2.selectedDates.sort((function(a,b){return a.getTime()-b.getTime()}))}setHoursFromInputs();if(shouldChangeMonth){var isNewYear=self2.currentYear!==selectedDate.getFullYear();self2.currentYear=selectedDate.getFullYear();self2.currentMonth=selectedDate.getMonth();if(isNewYear){triggerEvent("onYearChange");buildMonthSwitch()}triggerEvent("onMonthChange")}updateNavigationCurrentMonth();buildDays();updateValue();if(!shouldChangeMonth&&self2.config.mode!=="range"&&self2.config.showMonths===1)focusOnDayElem(target);else if(self2.selectedDateElem!==void 0&&self2.hourElement===void 0){self2.selectedDateElem&&self2.selectedDateElem.focus()}if(self2.hourElement!==void 0)self2.hourElement!==void 0&&self2.hourElement.focus();if(self2.config.closeOnSelect){var single=self2.config.mode==="single"&&!self2.config.enableTime;var range=self2.config.mode==="range"&&self2.selectedDates.length===2&&!self2.config.enableTime;if(single||range){focusAndClose()}}triggerChange()}var CALLBACKS={locale:[setupLocale,updateWeekdays],showMonths:[buildMonths,setCalendarWidth,buildWeekdays],minDate:[jumpToDate],maxDate:[jumpToDate],positionElement:[updatePositionElement],clickOpens:[function(){if(self2.config.clickOpens===true){bind(self2._input,"focus",self2.open);bind(self2._input,"click",self2.open)}else{self2._input.removeEventListener("focus",self2.open);self2._input.removeEventListener("click",self2.open)}}]};function set(option,value){if(option!==null&&typeof option==="object"){Object.assign(self2.config,option);for(var key in option){if(CALLBACKS[key]!==void 0)CALLBACKS[key].forEach((function(x){return x()}))}}else{self2.config[option]=value;if(CALLBACKS[option]!==void 0)CALLBACKS[option].forEach((function(x){return x()}));else if(HOOKS.indexOf(option)>-1)self2.config[option]=arrayify(value)}self2.redraw();updateValue(true)}function setSelectedDate(inputDate,format){var dates=[];if(inputDate instanceof Array)dates=inputDate.map((function(d){return self2.parseDate(d,format)}));else if(inputDate instanceof Date||typeof inputDate==="number")dates=[self2.parseDate(inputDate,format)];else if(typeof inputDate==="string"){switch(self2.config.mode){case"single":case"time":dates=[self2.parseDate(inputDate,format)];break;case"multiple":dates=inputDate.split(self2.config.conjunction).map((function(date){return self2.parseDate(date,format)}));break;case"range":dates=inputDate.split(self2.l10n.rangeSeparator).map((function(date){return self2.parseDate(date,format)}));break}}else self2.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(inputDate)));self2.selectedDates=self2.config.allowInvalidPreload?dates:dates.filter((function(d){return d instanceof Date&&isEnabled(d,false)}));if(self2.config.mode==="range")self2.selectedDates.sort((function(a,b){return a.getTime()-b.getTime()}))}function setDate(date,triggerChange2,format){if(triggerChange2===void 0){triggerChange2=false}if(format===void 0){format=self2.config.dateFormat}if(date!==0&&!date||date instanceof Array&&date.length===0)return self2.clear(triggerChange2);setSelectedDate(date,format);self2.latestSelectedDateObj=self2.selectedDates[self2.selectedDates.length-1];self2.redraw();jumpToDate(void 0,triggerChange2);setHoursFromDate();if(self2.selectedDates.length===0){self2.clear(false)}updateValue(triggerChange2);if(triggerChange2)triggerEvent("onChange")}function parseDateRules(arr){return arr.slice().map((function(rule){if(typeof rule==="string"||typeof rule==="number"||rule instanceof Date){return self2.parseDate(rule,void 0,true)}else if(rule&&typeof rule==="object"&&rule.from&&rule.to)return{from:self2.parseDate(rule.from,void 0),to:self2.parseDate(rule.to,void 0)};return rule})).filter((function(x){return x}))}function setupDates(){self2.selectedDates=[];self2.now=self2.parseDate(self2.config.now)||new Date;var preloadedDate=self2.config.defaultDate||((self2.input.nodeName==="INPUT"||self2.input.nodeName==="TEXTAREA")&&self2.input.placeholder&&self2.input.value===self2.input.placeholder?null:self2.input.value);if(preloadedDate)setSelectedDate(preloadedDate,self2.config.dateFormat);self2._initialDate=self2.selectedDates.length>0?self2.selectedDates[0]:self2.config.minDate&&self2.config.minDate.getTime()>self2.now.getTime()?self2.config.minDate:self2.config.maxDate&&self2.config.maxDate.getTime()<self2.now.getTime()?self2.config.maxDate:self2.now;self2.currentYear=self2._initialDate.getFullYear();self2.currentMonth=self2._initialDate.getMonth();if(self2.selectedDates.length>0)self2.latestSelectedDateObj=self2.selectedDates[0];if(self2.config.minTime!==void 0)self2.config.minTime=self2.parseDate(self2.config.minTime,"H:i");if(self2.config.maxTime!==void 0)self2.config.maxTime=self2.parseDate(self2.config.maxTime,"H:i");self2.minDateHasTime=!!self2.config.minDate&&(self2.config.minDate.getHours()>0||self2.config.minDate.getMinutes()>0||self2.config.minDate.getSeconds()>0);self2.maxDateHasTime=!!self2.config.maxDate&&(self2.config.maxDate.getHours()>0||self2.config.maxDate.getMinutes()>0||self2.config.maxDate.getSeconds()>0)}function setupInputs(){self2.input=getInputElem();if(!self2.input){self2.config.errorHandler(new Error("Invalid input element specified"));return}self2.input._type=self2.input.type;self2.input.type="text";self2.input.classList.add("flatpickr-input");self2._input=self2.input;if(self2.config.altInput){self2.altInput=createElement(self2.input.nodeName,self2.config.altInputClass);self2._input=self2.altInput;self2.altInput.placeholder=self2.input.placeholder;self2.altInput.disabled=self2.input.disabled;self2.altInput.required=self2.input.required;self2.altInput.tabIndex=self2.input.tabIndex;self2.altInput.type="text";self2.input.setAttribute("type","hidden");if(!self2.config.static&&self2.input.parentNode)self2.input.parentNode.insertBefore(self2.altInput,self2.input.nextSibling)}if(!self2.config.allowInput)self2._input.setAttribute("readonly","readonly");updatePositionElement()}function updatePositionElement(){self2._positionElement=self2.config.positionElement||self2._input}function setupMobile(){var inputType=self2.config.enableTime?self2.config.noCalendar?"time":"datetime-local":"date";self2.mobileInput=createElement("input",self2.input.className+" flatpickr-mobile");self2.mobileInput.tabIndex=1;self2.mobileInput.type=inputType;self2.mobileInput.disabled=self2.input.disabled;self2.mobileInput.required=self2.input.required;self2.mobileInput.placeholder=self2.input.placeholder;self2.mobileFormatStr=inputType==="datetime-local"?"Y-m-d\\TH:i:S":inputType==="date"?"Y-m-d":"H:i:S";if(self2.selectedDates.length>0){self2.mobileInput.defaultValue=self2.mobileInput.value=self2.formatDate(self2.selectedDates[0],self2.mobileFormatStr)}if(self2.config.minDate)self2.mobileInput.min=self2.formatDate(self2.config.minDate,"Y-m-d");if(self2.config.maxDate)self2.mobileInput.max=self2.formatDate(self2.config.maxDate,"Y-m-d");if(self2.input.getAttribute("step"))self2.mobileInput.step=String(self2.input.getAttribute("step"));self2.input.type="hidden";if(self2.altInput!==void 0)self2.altInput.type="hidden";try{if(self2.input.parentNode)self2.input.parentNode.insertBefore(self2.mobileInput,self2.input.nextSibling)}catch(_a){}bind(self2.mobileInput,"change",(function(e){self2.setDate(getEventTarget(e).value,false,self2.mobileFormatStr);triggerEvent("onChange");triggerEvent("onClose")}))}function toggle(e){if(self2.isOpen===true)return self2.close();self2.open(e)}function triggerEvent(event,data){if(self2.config===void 0)return;var hooks=self2.config[event];if(hooks!==void 0&&hooks.length>0){for(var i=0;hooks[i]&&i<hooks.length;i++)hooks[i](self2.selectedDates,self2.input.value,self2,data)}if(event==="onChange"){self2.input.dispatchEvent(createEvent("change"));self2.input.dispatchEvent(createEvent("input"))}}function createEvent(name){var e=document.createEvent("Event");e.initEvent(name,true,true);return e}function isDateSelected(date){for(var i=0;i<self2.selectedDates.length;i++){var selectedDate=self2.selectedDates[i];if(selectedDate instanceof Date&&compareDates(selectedDate,date)===0)return""+i}return false}function isDateInRange(date){if(self2.config.mode!=="range"||self2.selectedDates.length<2)return false;return compareDates(date,self2.selectedDates[0])>=0&&compareDates(date,self2.selectedDates[1])<=0}function updateNavigationCurrentMonth(){if(self2.config.noCalendar||self2.isMobile||!self2.monthNav)return;self2.yearElements.forEach((function(yearElement,i){var d=new Date(self2.currentYear,self2.currentMonth,1);d.setMonth(self2.currentMonth+i);if(self2.config.showMonths>1||self2.config.monthSelectorType==="static"){self2.monthElements[i].textContent=monthToStr(d.getMonth(),self2.config.shorthandCurrentMonth,self2.l10n)+" "}else{self2.monthsDropdownContainer.value=d.getMonth().toString()}yearElement.value=d.getFullYear().toString()}));self2._hidePrevMonthArrow=self2.config.minDate!==void 0&&(self2.currentYear===self2.config.minDate.getFullYear()?self2.currentMonth<=self2.config.minDate.getMonth():self2.currentYear<self2.config.minDate.getFullYear());self2._hideNextMonthArrow=self2.config.maxDate!==void 0&&(self2.currentYear===self2.config.maxDate.getFullYear()?self2.currentMonth+1>self2.config.maxDate.getMonth():self2.currentYear>self2.config.maxDate.getFullYear())}function getDateStr(specificFormat){var format=specificFormat||(self2.config.altInput?self2.config.altFormat:self2.config.dateFormat);return self2.selectedDates.map((function(dObj){return self2.formatDate(dObj,format)})).filter((function(d,i,arr){return self2.config.mode!=="range"||self2.config.enableTime||arr.indexOf(d)===i})).join(self2.config.mode!=="range"?self2.config.conjunction:self2.l10n.rangeSeparator)}function updateValue(triggerChange2){if(triggerChange2===void 0){triggerChange2=true}if(self2.mobileInput!==void 0&&self2.mobileFormatStr){self2.mobileInput.value=self2.latestSelectedDateObj!==void 0?self2.formatDate(self2.latestSelectedDateObj,self2.mobileFormatStr):""}self2.input.value=getDateStr(self2.config.dateFormat);if(self2.altInput!==void 0){self2.altInput.value=getDateStr(self2.config.altFormat)}if(triggerChange2!==false)triggerEvent("onValueUpdate")}function onMonthNavClick(e){var eventTarget=getEventTarget(e);var isPrevMonth=self2.prevMonthNav.contains(eventTarget);var isNextMonth=self2.nextMonthNav.contains(eventTarget);if(isPrevMonth||isNextMonth){changeMonth(isPrevMonth?-1:1)}else if(self2.yearElements.indexOf(eventTarget)>=0){eventTarget.select()}else if(eventTarget.classList.contains("arrowUp")){self2.changeYear(self2.currentYear+1)}else if(eventTarget.classList.contains("arrowDown")){self2.changeYear(self2.currentYear-1)}}function timeWrapper(e){e.preventDefault();var isKeyDown=e.type==="keydown",eventTarget=getEventTarget(e),input=eventTarget;if(self2.amPM!==void 0&&eventTarget===self2.amPM){self2.amPM.textContent=self2.l10n.amPM[int(self2.amPM.textContent===self2.l10n.amPM[0])]}var min2=parseFloat(input.getAttribute("min")),max2=parseFloat(input.getAttribute("max")),step=parseFloat(input.getAttribute("step")),curValue=parseInt(input.value,10),delta=e.delta||(isKeyDown?e.which===38?1:-1:0);var newValue=curValue+step*delta;if(typeof input.value!=="undefined"&&input.value.length===2){var isHourElem=input===self2.hourElement,isMinuteElem=input===self2.minuteElement;if(newValue<min2){newValue=max2+newValue+int(!isHourElem)+(int(isHourElem)&&int(!self2.amPM));if(isMinuteElem)incrementNumInput(void 0,-1,self2.hourElement)}else if(newValue>max2){newValue=input===self2.hourElement?newValue-max2-int(!self2.amPM):min2;if(isMinuteElem)incrementNumInput(void 0,1,self2.hourElement)}if(self2.amPM&&isHourElem&&(step===1?newValue+curValue===23:Math.abs(newValue-curValue)>step)){self2.amPM.textContent=self2.l10n.amPM[int(self2.amPM.textContent===self2.l10n.amPM[0])]}input.value=pad(newValue)}}init();return self2}function _flatpickr(nodeList,config){var nodes=Array.prototype.slice.call(nodeList).filter((function(x){return x instanceof HTMLElement}));var instances=[];for(var i=0;i<nodes.length;i++){var node=nodes[i];try{if(node.getAttribute("data-fp-omit")!==null)continue;if(node._flatpickr!==void 0){node._flatpickr.destroy();node._flatpickr=void 0}node._flatpickr=FlatpickrInstance(node,config||{});instances.push(node._flatpickr)}catch(e){console.error(e)}}return instances.length===1?instances[0]:instances}if(typeof HTMLElement!=="undefined"&&typeof HTMLCollection!=="undefined"&&typeof NodeList!=="undefined"){HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(config){return _flatpickr(this,config)};HTMLElement.prototype.flatpickr=function(config){return _flatpickr([this],config)}}var flatpickr=function(selector,config){if(typeof selector==="string"){return _flatpickr(window.document.querySelectorAll(selector),config)}else if(selector instanceof Node){return _flatpickr([selector],config)}else{return _flatpickr(selector,config)}};flatpickr.defaultConfig={};flatpickr.l10ns={en:__assign({},english),default:__assign({},english)};flatpickr.localize=function(l10n){flatpickr.l10ns.default=__assign(__assign({},flatpickr.l10ns.default),l10n)};flatpickr.setDefaults=function(config){flatpickr.defaultConfig=__assign(__assign({},flatpickr.defaultConfig),config)};flatpickr.parseDate=createDateParser({});flatpickr.formatDate=createDateFormatter({});flatpickr.compareDates=compareDates;if(typeof jQuery!=="undefined"&&typeof jQuery.fn!=="undefined"){jQuery.fn.flatpickr=function(config){return _flatpickr(this,config)}}Date.prototype.fp_incr=function(days2){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof days2==="string"?parseInt(days2,10):days2))};if(typeof window!=="undefined"){window.flatpickr=flatpickr}var monthSelect={exports:{}};(function(module2,exports2){(function(global2,factory){module2.exports=factory()})(commonjsGlobal,(function(){
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -13,4 +13,4 @@ import{useState}from"react";var commonjsGlobal=typeof globalThis!=="undefined"?g
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
15
  ***************************************************************************** */
16
- var __assign2=function(){__assign2=Object.assign||function __assign3(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p]}return t};return __assign2.apply(this,arguments)};var monthToStr2=function(monthNumber,shorthand,locale){return locale.months[shorthand?"shorthand":"longhand"][monthNumber]};function clearNode2(node){while(node.firstChild)node.removeChild(node.firstChild)}function getEventTarget2(event){try{if(typeof event.composedPath==="function"){var path=event.composedPath();return path[0]}return event.target}catch(error2){return event.target}}var defaultConfig={shorthand:false,dateFormat:"F Y",altFormat:"F Y",theme:"light"};function monthSelectPlugin2(pluginConfig){var config=__assign2(__assign2({},defaultConfig),pluginConfig);return function(fp){fp.config.dateFormat=config.dateFormat;fp.config.altFormat=config.altFormat;var self2={monthsContainer:null};function clearUnnecessaryDOMElements(){if(!fp.rContainer)return;clearNode2(fp.rContainer);for(var index=0;index<fp.monthElements.length;index++){var element=fp.monthElements[index];if(!element.parentNode)continue;element.parentNode.removeChild(element)}}function build(){if(!fp.rContainer)return;self2.monthsContainer=fp._createElement("div","flatpickr-monthSelect-months");self2.monthsContainer.tabIndex=-1;buildMonths();fp.rContainer.appendChild(self2.monthsContainer);fp.calendarContainer.classList.add("flatpickr-monthSelect-theme-"+config.theme)}function buildMonths(){if(!self2.monthsContainer)return;clearNode2(self2.monthsContainer);var frag=document.createDocumentFragment();for(var i=0;i<12;i++){var month=fp.createDay("flatpickr-monthSelect-month",new Date(fp.currentYear,i),0,i);if(month.dateObj.getMonth()===(new Date).getMonth()&&month.dateObj.getFullYear()===(new Date).getFullYear())month.classList.add("today");month.textContent=monthToStr2(i,config.shorthand,fp.l10n);month.addEventListener("click",selectMonth);frag.appendChild(month)}self2.monthsContainer.appendChild(frag);if(fp.config.minDate&&fp.currentYear===fp.config.minDate.getFullYear())fp.prevMonthNav.classList.add("flatpickr-disabled");else fp.prevMonthNav.classList.remove("flatpickr-disabled");if(fp.config.maxDate&&fp.currentYear===fp.config.maxDate.getFullYear())fp.nextMonthNav.classList.add("flatpickr-disabled");else fp.nextMonthNav.classList.remove("flatpickr-disabled")}function bindEvents(){fp._bind(fp.prevMonthNav,"click",(function(e){e.preventDefault();e.stopPropagation();fp.changeYear(fp.currentYear-1);selectYear();buildMonths()}));fp._bind(fp.nextMonthNav,"click",(function(e){e.preventDefault();e.stopPropagation();fp.changeYear(fp.currentYear+1);selectYear();buildMonths()}));fp._bind(self2.monthsContainer,"mouseover",(function(e){if(fp.config.mode==="range")fp.onMouseOver(getEventTarget2(e),"flatpickr-monthSelect-month")}))}function setCurrentlySelected(){if(!fp.rContainer)return;if(!fp.selectedDates.length)return;var currentlySelected=fp.rContainer.querySelectorAll(".flatpickr-monthSelect-month.selected");for(var index=0;index<currentlySelected.length;index++){currentlySelected[index].classList.remove("selected")}var targetMonth=fp.selectedDates[0].getMonth();var month=fp.rContainer.querySelector(".flatpickr-monthSelect-month:nth-child("+(targetMonth+1)+")");if(month){month.classList.add("selected")}}function selectYear(){var selectedDate=fp.selectedDates[0];if(selectedDate){selectedDate=new Date(selectedDate);selectedDate.setFullYear(fp.currentYear);if(fp.config.minDate&&selectedDate<fp.config.minDate){selectedDate=fp.config.minDate}if(fp.config.maxDate&&selectedDate>fp.config.maxDate){selectedDate=fp.config.maxDate}fp.currentYear=selectedDate.getFullYear()}fp.currentYearElement.value=String(fp.currentYear);if(fp.rContainer){var months2=fp.rContainer.querySelectorAll(".flatpickr-monthSelect-month");months2.forEach((function(month){month.dateObj.setFullYear(fp.currentYear);if(fp.config.minDate&&month.dateObj<fp.config.minDate||fp.config.maxDate&&month.dateObj>fp.config.maxDate){month.classList.add("flatpickr-disabled")}else{month.classList.remove("flatpickr-disabled")}}))}setCurrentlySelected()}function selectMonth(e){e.preventDefault();e.stopPropagation();var eventTarget=getEventTarget2(e);if(!(eventTarget instanceof Element))return;if(eventTarget.classList.contains("flatpickr-disabled"))return;if(eventTarget.classList.contains("notAllowed"))return;setMonth(eventTarget.dateObj);if(fp.config.closeOnSelect){var single=fp.config.mode==="single";var range=fp.config.mode==="range"&&fp.selectedDates.length===2;if(single||range)fp.close()}}function setMonth(date){var selectedDate=new Date(fp.currentYear,date.getMonth(),date.getDate());var selectedDates=[];switch(fp.config.mode){case"single":selectedDates=[selectedDate];break;case"multiple":selectedDates.push(selectedDate);break;case"range":if(fp.selectedDates.length===2){selectedDates=[selectedDate]}else{selectedDates=fp.selectedDates.concat([selectedDate]);selectedDates.sort((function(a,b){return a.getTime()-b.getTime()}))}break}fp.setDate(selectedDates,true);setCurrentlySelected()}var shifts={37:-1,39:1,40:3,38:-3};function onKeyDown(_,__,___,e){var shouldMove=shifts[e.keyCode]!==void 0;if(!shouldMove&&e.keyCode!==13){return}if(!fp.rContainer||!self2.monthsContainer)return;var currentlySelected=fp.rContainer.querySelector(".flatpickr-monthSelect-month.selected");var index=Array.prototype.indexOf.call(self2.monthsContainer.children,document.activeElement);if(index===-1){var target=currentlySelected||self2.monthsContainer.firstElementChild;target.focus();index=target.$i}if(shouldMove){self2.monthsContainer.children[(12+index+shifts[e.keyCode])%12].focus()}else if(e.keyCode===13&&self2.monthsContainer.contains(document.activeElement)){setMonth(document.activeElement.dateObj)}}function closeHook(){var _a;if(((_a=fp.config)===null||_a===void 0?void 0:_a.mode)==="range"&&fp.selectedDates.length===1)fp.clear(false);if(!fp.selectedDates.length)buildMonths()}function stubCurrentMonth(){config._stubbedCurrentMonth=fp._initialDate.getMonth();fp._initialDate.setMonth(config._stubbedCurrentMonth);fp.currentMonth=config._stubbedCurrentMonth}function unstubCurrentMonth(){if(!config._stubbedCurrentMonth)return;fp._initialDate.setMonth(config._stubbedCurrentMonth);fp.currentMonth=config._stubbedCurrentMonth;delete config._stubbedCurrentMonth}function destroyPluginInstance(){if(self2.monthsContainer!==null){var months2=self2.monthsContainer.querySelectorAll(".flatpickr-monthSelect-month");for(var index=0;index<months2.length;index++){months2[index].removeEventListener("click",selectMonth)}}}return{onParseConfig:function(){fp.config.enableTime=false},onValueUpdate:setCurrentlySelected,onKeyDown:onKeyDown,onReady:[stubCurrentMonth,clearUnnecessaryDOMElements,build,bindEvents,setCurrentlySelected,function(){fp.config.onClose.push(closeHook);fp.loadedPlugins.push("monthSelect")}],onDestroy:[unstubCurrentMonth,destroyPluginInstance,function(){fp.config.onClose=fp.config.onClose.filter((function(hook){return hook!==closeHook}))}]}}}return monthSelectPlugin2}))})(monthSelect);var monthSelectExports=monthSelect.exports;const monthSelectPlugin=getDefaultExportFromCjs(monthSelectExports);var weekSelect$1={exports:{}};(function(module2,exports2){(function(global2,factory){module2.exports=factory()})(commonjsGlobal,(function(){function getEventTarget2(event){try{if(typeof event.composedPath==="function"){var path=event.composedPath();return path[0]}return event.target}catch(error2){return event.target}}function weekSelectPlugin(){return function(fp){function onDayHover(event){var day=getEventTarget2(event);if(!day.classList.contains("flatpickr-day"))return;var days2=fp.days.childNodes;var dayIndex=day.$i;var dayIndSeven=dayIndex/7;var weekStartDay=days2[7*Math.floor(dayIndSeven)].dateObj;var weekEndDay=days2[7*Math.ceil(dayIndSeven+.01)-1].dateObj;for(var i=days2.length;i--;){var day_1=days2[i];var date=day_1.dateObj;if(date>weekEndDay||date<weekStartDay)day_1.classList.remove("inRange");else day_1.classList.add("inRange")}}function highlightWeek(){var selDate=fp.latestSelectedDateObj;if(selDate!==void 0&&selDate.getMonth()===fp.currentMonth&&selDate.getFullYear()===fp.currentYear){fp.weekStartDay=fp.days.childNodes[7*Math.floor(fp.selectedDateElem.$i/7)].dateObj;fp.weekEndDay=fp.days.childNodes[7*Math.ceil(fp.selectedDateElem.$i/7+.01)-1].dateObj}var days2=fp.days.childNodes;for(var i=days2.length;i--;){var date=days2[i].dateObj;if(date>=fp.weekStartDay&&date<=fp.weekEndDay)days2[i].classList.add("week","selected")}}function clearHover(){var days2=fp.days.childNodes;for(var i=days2.length;i--;)days2[i].classList.remove("inRange")}function onReady(){if(fp.daysContainer!==void 0)fp.daysContainer.addEventListener("mouseover",onDayHover)}function onDestroy(){if(fp.daysContainer!==void 0)fp.daysContainer.removeEventListener("mouseover",onDayHover)}return{onValueUpdate:highlightWeek,onMonthChange:highlightWeek,onYearChange:highlightWeek,onOpen:highlightWeek,onClose:clearHover,onParseConfig:function(){fp.config.mode="single";fp.config.enableTime=false;fp.config.dateFormat=fp.config.dateFormat?fp.config.dateFormat:"\\W\\e\\e\\k #W, Y";fp.config.altFormat=fp.config.altFormat?fp.config.altFormat:"\\W\\e\\e\\k #W, Y"},onReady:[onReady,highlightWeek,function(){fp.loadedPlugins.push("weekSelect")}],onDestroy:onDestroy}}}return weekSelectPlugin}))})(weekSelect$1);var weekSelectExports=weekSelect$1.exports;const weekSelect=getDefaultExportFromCjs(weekSelectExports);const getTimezoneText=inputDate=>{const tzAbbr=inputDate.toLocaleDateString("en-US",{day:"2-digit",timeZoneName:"short"}).slice(4);const tzText=inputDate.toLocaleDateString("en-US",{day:"2-digit",timeZoneName:"long"}).slice(4);return`${tzAbbr} (${tzText})`};function timeSelectPlugin(props){return function(fp){const generateMeridiemCard=text=>{const selectableCard=document.createElement("div");selectableCard.className="pb_selectable_card_kit_enabled";const cardInput=document.createElement("input"),cardInputId=`datePicker-${fp.element.id}-${text}`;cardInput.className="datePicker-AMPM";cardInput.id=cardInputId;cardInput.name="datepicker-ampm";cardInput.type="radio";cardInput.value=text;const cardLabel=document.createElement("label"),cardLabelBuffer=document.createElement("div");cardLabel.className=`label-${text.toLowerCase()}`;cardLabel.setAttribute("for",cardInputId);cardLabelBuffer.className="buffer";cardLabelBuffer.innerHTML=text;cardLabel.append(cardLabelBuffer);selectableCard.prepend(cardInput);selectableCard.append(cardLabel);return selectableCard};const generateMeridiemToggle=()=>{fp.amPM.style.display="none";const formGroupKit=document.createElement("div");formGroupKit.className="pb_form_group_kit";const amCard=generateMeridiemCard("AM");amCard.addEventListener("click",(()=>{fp.selectedDates[0].setHours(fp.selectedDates[0].getHours()%12+12*0);fp.setDate(fp.selectedDates[0],true)}));const pmCard=generateMeridiemCard("PM");pmCard.addEventListener("click",(()=>{fp.selectedDates[0].setHours(fp.selectedDates[0].getHours()%12+12*1);fp.setDate(fp.selectedDates[0],true)}));formGroupKit.prepend(amCard);formGroupKit.append(pmCard);const meridiemContainer=document.createElement("div");meridiemContainer.className="meridiem";meridiemContainer.append(formGroupKit);fp.timeContainer.append(meridiemContainer)};const getMeridiem=dateObj=>dateObj[0].getHours()<12?"AM":"PM";const updateMeridiemToggle=forceClick=>{if(!fp.selectedDates.length)return;const uncheckedClass="pb_selectable_card_kit_enabled",checkedClass="pb_selectable_card_kit_checked_enabled",pickerAM=document.getElementById(`datePicker-${fp.element.id}-AM`),pickerPM=document.getElementById(`datePicker-${fp.element.id}-PM`),meridiem=getMeridiem(fp.selectedDates);{pickerAM.checked=false;pickerPM.checked=false;pickerPM.checked=meridiem==="PM";pickerAM.checked=meridiem==="AM"}if(meridiem==="PM"){pickerPM.parentElement.className=checkedClass;pickerAM.parentElement.className=uncheckedClass}else if(meridiem==="AM"){pickerAM.parentElement.className=checkedClass;pickerPM.parentElement.className=uncheckedClass}};return{onValueUpdate(){updateMeridiemToggle()},onOpen(){updateMeridiemToggle()},onReady(){const id=fp.input.id;if(!id||!(fp===null||fp===void 0?void 0:fp.timeContainer))return;fp.timeContainer.classList.add("pb_time_selection");fp.minuteElement.step="1";if(props.caption){const captionContainer=document.createElement("div");captionContainer.className="pb_caption_kit_md";captionContainer.innerHTML=props===null||props===void 0?void 0:props.caption;fp.timeContainer.prepend(captionContainer)}generateMeridiemToggle();updateMeridiemToggle();if(props.showTimezone){const subcaptionContainer=document.createElement("div");subcaptionContainer.className="pb_caption_kit_xs";subcaptionContainer.innerHTML=getTimezoneText(fp._initialDate);fp.timeContainer.append(subcaptionContainer)}fp.loadedPlugins.push("timeSelectPlugin")}}}}let activeLabel="";const quickPickPlugin=(thisRangesEndToday,customQuickPickDates)=>function(fp){const today=new Date;const yesterday=DateTime.getYesterdayDate(new Date);const thisWeekStartDate=DateTime.getFirstDayOfWeek(new Date);const thisWeekEndDate=thisRangesEndToday?new Date:DateTime.getLastDayOfWeek(new Date);const lastWeekStartDate=DateTime.getPreviousWeekStartDate(new Date);const lastWeekEndDate=DateTime.getPreviousWeekEndDate(new Date);const thisMonthStartDate=DateTime.getMonthStartDate(new Date);const thisMonthEndDate=thisRangesEndToday?new Date:DateTime.getMonthEndDate(new Date);const lastMonthStartDate=DateTime.getPreviousMonthStartDate(new Date);const lastMonthEndDate=DateTime.getPreviousMonthEndDate(new Date);const thisQuarterStartDate=DateTime.getQuarterStartDate(new Date);const thisQuarterEndDate=thisRangesEndToday?new Date:DateTime.getQuarterEndDate(new Date);const lastQuarterStartDate=DateTime.getPreviousQuarterStartDate(new Date);const lastQuarterEndDate=DateTime.getPreviousQuarterEndDate(new Date);const thisYearStartDate=DateTime.getYearStartDate(new Date);const thisYearEndDate=thisRangesEndToday?new Date:DateTime.getYearEndDate(new Date);const lastYearStartDate=DateTime.getPreviousYearStartDate(new Date);const lastYearEndDate=DateTime.getPreviousYearEndDate(new Date);const calculateDateRange=(timePeriod,amount)=>{const endDate=new Date;const startDate=new Date;switch(timePeriod){case"days":startDate.setDate(endDate.getDate()-amount);break;case"weeks":startDate.setDate(endDate.getDate()-amount*7);break;case"months":startDate.setMonth(endDate.getMonth()-amount);break;case"quarters":startDate.setMonth(endDate.getMonth()-amount*3);break;case"years":startDate.setFullYear(endDate.getFullYear()-amount);break;default:throw new Error("Invalid time period")}return[startDate,endDate]};let ranges={Today:[today,today],Yesterday:[yesterday,yesterday],"This week":[thisWeekStartDate,thisWeekEndDate],"This month":[thisMonthStartDate,thisMonthEndDate],"This quarter":[thisQuarterStartDate,thisQuarterEndDate],"This year":[thisYearStartDate,thisYearEndDate],"Last week":[lastWeekStartDate,lastWeekEndDate],"Last month":[lastMonthStartDate,lastMonthEndDate],"Last quarter":[lastQuarterStartDate,lastQuarterEndDate],"Last year":[lastYearStartDate,lastYearEndDate]};if(customQuickPickDates&&Object.keys(customQuickPickDates).length!==0){if(customQuickPickDates.dates.length&&customQuickPickDates.override===false){customQuickPickDates.dates.forEach((item=>{if(Array.isArray(item.value)){ranges[item.label]=item.value.map((dateStr=>new Date(dateStr)))}else{ranges[item.label]=calculateDateRange(item.value.timePeriod,item.value.amount)}}))}else if(customQuickPickDates.dates.length&&customQuickPickDates.override!==false){ranges={};customQuickPickDates.dates.forEach((item=>{if(Array.isArray(item.value)){ranges[item.label]=item.value.map((dateStr=>new Date(dateStr)))}else{ranges[item.label]=calculateDateRange(item.value.timePeriod,item.value.amount)}}))}}const rangesNav=document.createElement("ul");const pluginData={ranges:ranges,rangesNav:rangesNav,rangesButtons:[]};const addRangeButton=label=>{const div2=document.createElement("div");div2.className="nav-item-link";div2.innerHTML=label;pluginData.rangesButtons[label]=div2;const item=document.createElement("li");item.className="nav-item";item.appendChild(pluginData.rangesButtons[label]);pluginData.rangesNav.appendChild(item);return pluginData.rangesButtons[label]};const selectActiveRangeButton=selectedDates=>{const current=pluginData.rangesNav.querySelector(".active");if(current){current.classList.remove("active")}if(selectedDates.length>0&&activeLabel){pluginData.rangesButtons[activeLabel].classList.add("active")}};const isLabelMatchingSelectedDates=selectedDates=>activeLabel&&selectedDates[0].toDateString()===pluginData.ranges[activeLabel][0].toDateString()&&selectedDates[1].toDateString()===pluginData.ranges[activeLabel][1].toDateString();return{onReady(selectedDates){for(const[label,range]of Object.entries(pluginData.ranges)){addRangeButton(label).addEventListener("click",(function(){const start2=new Date(range[0]);const end2=new Date(range[1]);if(!start2){fp.clear()}else{activeLabel=label;fp.setDate([start2,end2],true);fp.close()}}))}if(pluginData.rangesNav.children.length>0){fp.calendarContainer.prepend(pluginData.rangesNav);pluginData.rangesNav.classList.add("quick-pick-ul");fp.calendarContainer.classList.add("quick-pick-drop-down");selectActiveRangeButton(selectedDates)}},onValueUpdate(selectedDates){selectActiveRangeButton(selectedDates)},onClose(selectedDates){var _a;if(!isLabelMatchingSelectedDates(selectedDates)){(_a=pluginData.rangesButtons[activeLabel])===null||_a===void 0?void 0:_a.classList.remove("active");activeLabel=""}if(selectedDates.length===1){fp.setDate([selectedDates[0],selectedDates[0]],true)}if(selectedDates.length<2&&selectedDates.length>0){fp.input.placeholder=fp.formatDate(this.selectedDates[0],fp.config.dateFormat)}}}};const getPositionElement=element=>typeof element==="string"?document.querySelectorAll(element)[0]:element;const datePickerHelper=(config,scrollContainer)=>{const noop2=()=>{};const{allowInput:allowInput,closeOnSelect:closeOnSelect=true,customQuickPickDates:customQuickPickDates={override:true,dates:[]},defaultDate:defaultDate,disableDate:disableDate,disableRange:disableRange,disableWeekdays:disableWeekdays,enableTime:enableTime,format:format,maxDate:maxDate,minDate:minDate,mode:mode,onChange:onChange=noop2,onClose:onClose=noop2,pickerId:pickerId,plugins:plugins,position:position="auto",positionElement:positionElement,required:required,selectionType:selectionType,showTimezone:showTimezone,staticPosition:staticPosition=true,thisRangesEndToday:thisRangesEndToday=false,timeCaption:timeCaption="Select Time",timeFormat:timeFormat="at h:i K",yearRange:yearRange}=config;const defaultDateGetter=()=>{if(defaultDate===""){return null}else{return defaultDate}};const disabledWeekDays=()=>[date=>{const weekdayObj={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6};return date.getDay()===weekdayObj[disableWeekdays[0]]||date.getDay()===weekdayObj[disableWeekdays[1]]||date.getDay()===weekdayObj[disableWeekdays[2]]||date.getDay()===weekdayObj[disableWeekdays[3]]||date.getDay()===weekdayObj[disableWeekdays[4]]||date.getDay()===weekdayObj[disableWeekdays[5]]||date.getDay()===weekdayObj[disableWeekdays[6]]}];const disabledParser=()=>{const disabledArray=[];disableDate&&disableDate.length>0&&disabledArray.push(...disableDate);disableRange&&disableRange.length>0&&disabledArray.push(...disableRange);disableWeekdays&&disableWeekdays.length>0&&disabledArray.push(...disabledWeekDays());return disabledArray};const calendarResizer=()=>{const cal=document.querySelector(`#cal-${pickerId}.open`);const parentInput=cal.parentElement;if((cal===null||cal===void 0?void 0:cal.getBoundingClientRect().right)>window.innerWidth){parentInput.style.display="flex";parentInput.style.justifyContent="center"}if(cal.offsetWidth<=parentInput.offsetWidth){parentInput.style.display="";parentInput.style.justifyContent=""}};const setPlugins=(thisRangesEndToday2,customQuickPickDates2)=>{const pluginList=[];if(selectionType==="month"||plugins.length>0){pluginList.push(monthSelectPlugin({shorthand:true,dateFormat:"F Y",altFormat:"F Y"}))}else if(selectionType==="week"){pluginList.push(weekSelect())}else if(selectionType==="quickpick"){pluginList.push(quickPickPlugin(thisRangesEndToday2,customQuickPickDates2))}if(enableTime)pluginList.push(timeSelectPlugin({caption:timeCaption,showTimezone:showTimezone}));return pluginList};const getDateFormat=()=>enableTime?`${format} ${timeFormat}`:format;const initialPicker=document.querySelector(`#${pickerId}`)._flatpickr;const scrollEvent=()=>{initialPicker._positionCalendar()};function attachToScroll(scrollParent){var _a;(_a=document.querySelectorAll(scrollParent)[0])===null||_a===void 0?void 0:_a.addEventListener("scroll",scrollEvent,{passive:true})}function detachFromScroll(scrollParent=document.body){var _a;(_a=document.querySelectorAll(scrollParent)[0])===null||_a===void 0?void 0:_a.removeEventListener("scroll",scrollEvent)}const yearChangeHook=fp=>{var _a;const yearInput=document.querySelector(`#year-${fp.input.id}`);yearInput.value=(_a=fp.currentYear)===null||_a===void 0?void 0:_a.toString()};flatpickr(`#${pickerId}`,{allowInput:allowInput,closeOnSelect:closeOnSelect,disableMobile:true,dateFormat:getDateFormat(),defaultDate:defaultDateGetter(),disable:disabledParser(),enableTime:enableTime,locale:{rangeSeparator:" to "},maxDate:maxDate,minDate:minDate,mode:mode,nextArrow:'<i class="far fa-angle-right"></i>',onOpen:[()=>{calendarResizer();window.addEventListener("resize",calendarResizer);if(!staticPosition&&scrollContainer)attachToScroll(scrollContainer)}],onClose:[(selectedDates,dateStr)=>{window.removeEventListener("resize",calendarResizer);if(!staticPosition&&scrollContainer)detachFromScroll(scrollContainer);onClose(selectedDates,dateStr)}],onChange:[(selectedDates,dateStr,fp)=>{yearChangeHook(fp);onChange(dateStr,selectedDates)}],onYearChange:[(_selectedDates,_dateStr,fp)=>{yearChangeHook(fp)}],plugins:setPlugins(thisRangesEndToday,customQuickPickDates),position:position,positionElement:getPositionElement(positionElement),prevArrow:'<i class="far fa-angle-left"></i>',static:staticPosition});const picker=document.querySelector(`#${pickerId}`)._flatpickr;picker.innerContainer.parentElement.id=`cal-${pickerId}`;picker.yearElements[0].parentElement.innerHTML=`<select class="numInput cur-year" type="number" tabIndex="-1" aria-label="Year" id="year-${pickerId}"></select>`;let years="";for(let year=yearRange[1];year>=yearRange[0];year--){years+=`<option value="${year}">${year}</option>`}const dropdown=document.querySelector(`#year-${pickerId}`);dropdown.innerHTML=years;dropdown.value=picker.currentYear;dropdown.addEventListener("input",(e=>{picker.changeYear(Number(e.target.value))}));if(picker.input.form){picker.input.form.addEventListener("reset",(()=>{setTimeout((()=>{dropdown.value=picker.currentYear;picker.monthsDropdownContainer.value=picker.currentMonth;if(defaultDate){picker.setDate(defaultDate);yearChangeHook(picker)}}),0)}))}dropdown.insertAdjacentHTML("afterend",'<i class="far fa-angle-down year-dropdown-icon" id="test-id"></i>');if(picker.monthElements[0].parentElement){return picker.monthElements[0].insertAdjacentHTML("afterend",'<i class="far fa-angle-down month-dropdown-icon"></i>')}if(allowInput){picker.input.removeAttribute("readonly")}if(required){picker.input.removeAttribute("readonly");picker.input.addEventListener("keydown",(e=>e.preventDefault()));picker.input.style.caretColor="transparent";picker.input.style.cursor="pointer"}document.querySelector(`#${pickerId}`).parentElement.addEventListener("click",(e=>e.stopPropagation()))};const useDropdown=(initial=true)=>{const[isDropDownClosed,setIsDropDownClosed]=useState(initial);const toggleDropdown=()=>setIsDropDownClosed((prev=>!prev));return[isDropDownClosed,setIsDropDownClosed,toggleDropdown]};var top="top";var bottom="bottom";var right="right";var left="left";var auto="auto";var basePlacements=[top,bottom,right,left];var start="start";var end="end";var clippingParents="clippingParents";var viewport="viewport";var popper="popper";var reference="reference";var variationPlacements=basePlacements.reduce((function(acc,placement){return acc.concat([placement+"-"+start,placement+"-"+end])}),[]);var placements=[].concat(basePlacements,[auto]).reduce((function(acc,placement){return acc.concat([placement,placement+"-"+start,placement+"-"+end])}),[]);var beforeRead="beforeRead";var read="read";var afterRead="afterRead";var beforeMain="beforeMain";var main="main";var afterMain="afterMain";var beforeWrite="beforeWrite";var write="write";var afterWrite="afterWrite";var modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(element){return element?(element.nodeName||"").toLowerCase():null}function getWindow(node){if(node==null){return window}if(node.toString()!=="[object Window]"){var ownerDocument=node.ownerDocument;return ownerDocument?ownerDocument.defaultView||window:window}return node}function isElement(node){var OwnElement=getWindow(node).Element;return node instanceof OwnElement||node instanceof Element}function isHTMLElement(node){var OwnElement=getWindow(node).HTMLElement;return node instanceof OwnElement||node instanceof HTMLElement}function isShadowRoot(node){if(typeof ShadowRoot==="undefined"){return false}var OwnElement=getWindow(node).ShadowRoot;return node instanceof OwnElement||node instanceof ShadowRoot}function applyStyles(_ref){var state=_ref.state;Object.keys(state.elements).forEach((function(name){var style=state.styles[name]||{};var attributes=state.attributes[name]||{};var element=state.elements[name];if(!isHTMLElement(element)||!getNodeName(element)){return}Object.assign(element.style,style);Object.keys(attributes).forEach((function(name2){var value=attributes[name2];if(value===false){element.removeAttribute(name2)}else{element.setAttribute(name2,value===true?"":value)}}))}))}function effect$2(_ref2){var state=_ref2.state;var initialStyles={popper:{position:state.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(state.elements.popper.style,initialStyles.popper);state.styles=initialStyles;if(state.elements.arrow){Object.assign(state.elements.arrow.style,initialStyles.arrow)}return function(){Object.keys(state.elements).forEach((function(name){var element=state.elements[name];var attributes=state.attributes[name]||{};var styleProperties=Object.keys(state.styles.hasOwnProperty(name)?state.styles[name]:initialStyles[name]);var style=styleProperties.reduce((function(style2,property2){style2[property2]="";return style2}),{});if(!isHTMLElement(element)||!getNodeName(element)){return}Object.assign(element.style,style);Object.keys(attributes).forEach((function(attribute){element.removeAttribute(attribute)}))}))}}const applyStyles$1={name:"applyStyles",enabled:true,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(placement){return placement.split("-")[0]}var max=Math.max;var min=Math.min;var round=Math.round;function getUAString(){var uaData=navigator.userAgentData;if(uaData!=null&&uaData.brands){return uaData.brands.map((function(item){return item.brand+"/"+item.version})).join(" ")}return navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(element,includeScale,isFixedStrategy){if(includeScale===void 0){includeScale=false}if(isFixedStrategy===void 0){isFixedStrategy=false}var clientRect=element.getBoundingClientRect();var scaleX=1;var scaleY=1;if(includeScale&&isHTMLElement(element)){scaleX=element.offsetWidth>0?round(clientRect.width)/element.offsetWidth||1:1;scaleY=element.offsetHeight>0?round(clientRect.height)/element.offsetHeight||1:1}var _ref=isElement(element)?getWindow(element):window,visualViewport=_ref.visualViewport;var addVisualOffsets=!isLayoutViewport()&&isFixedStrategy;var x=(clientRect.left+(addVisualOffsets&&visualViewport?visualViewport.offsetLeft:0))/scaleX;var y=(clientRect.top+(addVisualOffsets&&visualViewport?visualViewport.offsetTop:0))/scaleY;var width=clientRect.width/scaleX;var height=clientRect.height/scaleY;return{width:width,height:height,top:y,right:x+width,bottom:y+height,left:x,x:x,y:y}}function getLayoutRect(element){var clientRect=getBoundingClientRect(element);var width=element.offsetWidth;var height=element.offsetHeight;if(Math.abs(clientRect.width-width)<=1){width=clientRect.width}if(Math.abs(clientRect.height-height)<=1){height=clientRect.height}return{x:element.offsetLeft,y:element.offsetTop,width:width,height:height}}function contains(parent2,child){var rootNode=child.getRootNode&&child.getRootNode();if(parent2.contains(child)){return true}else if(rootNode&&isShadowRoot(rootNode)){var next=child;do{if(next&&parent2.isSameNode(next)){return true}next=next.parentNode||next.host}while(next)}return false}function getComputedStyle(element){return getWindow(element).getComputedStyle(element)}function isTableElement(element){return["table","td","th"].indexOf(getNodeName(element))>=0}function getDocumentElement(element){return((isElement(element)?element.ownerDocument:element.document)||window.document).documentElement}function getParentNode(element){if(getNodeName(element)==="html"){return element}return element.assignedSlot||element.parentNode||(isShadowRoot(element)?element.host:null)||getDocumentElement(element)}function getTrueOffsetParent(element){if(!isHTMLElement(element)||getComputedStyle(element).position==="fixed"){return null}return element.offsetParent}function getContainingBlock(element){var isFirefox=/firefox/i.test(getUAString());var isIE=/Trident/i.test(getUAString());if(isIE&&isHTMLElement(element)){var elementCss=getComputedStyle(element);if(elementCss.position==="fixed"){return null}}var currentNode=getParentNode(element);if(isShadowRoot(currentNode)){currentNode=currentNode.host}while(isHTMLElement(currentNode)&&["html","body"].indexOf(getNodeName(currentNode))<0){var css=getComputedStyle(currentNode);if(css.transform!=="none"||css.perspective!=="none"||css.contain==="paint"||["transform","perspective"].indexOf(css.willChange)!==-1||isFirefox&&css.willChange==="filter"||isFirefox&&css.filter&&css.filter!=="none"){return currentNode}else{currentNode=currentNode.parentNode}}return null}function getOffsetParent(element){var window2=getWindow(element);var offsetParent=getTrueOffsetParent(element);while(offsetParent&&isTableElement(offsetParent)&&getComputedStyle(offsetParent).position==="static"){offsetParent=getTrueOffsetParent(offsetParent)}if(offsetParent&&(getNodeName(offsetParent)==="html"||getNodeName(offsetParent)==="body"&&getComputedStyle(offsetParent).position==="static")){return window2}return offsetParent||getContainingBlock(element)||window2}function getMainAxisFromPlacement(placement){return["top","bottom"].indexOf(placement)>=0?"x":"y"}function within(min$1,value,max$1){return max(min$1,min(value,max$1))}function withinMaxClamp(min2,value,max2){var v=within(min2,value,max2);return v>max2?max2:v}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(paddingObject){return Object.assign({},getFreshSideObject(),paddingObject)}function expandToHashMap(value,keys2){return keys2.reduce((function(hashMap,key){hashMap[key]=value;return hashMap}),{})}var toPaddingObject=function toPaddingObject2(padding,state){padding=typeof padding==="function"?padding(Object.assign({},state.rects,{placement:state.placement})):padding;return mergePaddingObject(typeof padding!=="number"?padding:expandToHashMap(padding,basePlacements))};function arrow(_ref){var _state$modifiersData$;var state=_ref.state,name=_ref.name,options=_ref.options;var arrowElement=state.elements.arrow;var popperOffsets2=state.modifiersData.popperOffsets;var basePlacement=getBasePlacement(state.placement);var axis=getMainAxisFromPlacement(basePlacement);var isVertical=[left,right].indexOf(basePlacement)>=0;var len=isVertical?"height":"width";if(!arrowElement||!popperOffsets2){return}var paddingObject=toPaddingObject(options.padding,state);var arrowRect=getLayoutRect(arrowElement);var minProp=axis==="y"?top:left;var maxProp=axis==="y"?bottom:right;var endDiff=state.rects.reference[len]+state.rects.reference[axis]-popperOffsets2[axis]-state.rects.popper[len];var startDiff=popperOffsets2[axis]-state.rects.reference[axis];var arrowOffsetParent=getOffsetParent(arrowElement);var clientSize=arrowOffsetParent?axis==="y"?arrowOffsetParent.clientHeight||0:arrowOffsetParent.clientWidth||0:0;var centerToReference=endDiff/2-startDiff/2;var min2=paddingObject[minProp];var max2=clientSize-arrowRect[len]-paddingObject[maxProp];var center=clientSize/2-arrowRect[len]/2+centerToReference;var offset2=within(min2,center,max2);var axisProp=axis;state.modifiersData[name]=(_state$modifiersData$={},_state$modifiersData$[axisProp]=offset2,_state$modifiersData$.centerOffset=offset2-center,_state$modifiersData$)}function effect$1(_ref2){var state=_ref2.state,options=_ref2.options;var _options$element=options.element,arrowElement=_options$element===void 0?"[data-popper-arrow]":_options$element;if(arrowElement==null){return}if(typeof arrowElement==="string"){arrowElement=state.elements.popper.querySelector(arrowElement);if(!arrowElement){return}}if(!contains(state.elements.popper,arrowElement)){return}state.elements.arrow=arrowElement}const arrow$1={name:"arrow",enabled:true,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(placement){return placement.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(_ref){var x=_ref.x,y=_ref.y;var win=window;var dpr=win.devicePixelRatio||1;return{x:round(x*dpr)/dpr||0,y:round(y*dpr)/dpr||0}}function mapToStyles(_ref2){var _Object$assign2;var popper2=_ref2.popper,popperRect=_ref2.popperRect,placement=_ref2.placement,variation=_ref2.variation,offsets=_ref2.offsets,position=_ref2.position,gpuAcceleration=_ref2.gpuAcceleration,adaptive=_ref2.adaptive,roundOffsets=_ref2.roundOffsets,isFixed=_ref2.isFixed;var _offsets$x=offsets.x,x=_offsets$x===void 0?0:_offsets$x,_offsets$y=offsets.y,y=_offsets$y===void 0?0:_offsets$y;var _ref3=typeof roundOffsets==="function"?roundOffsets({x:x,y:y}):{x:x,y:y};x=_ref3.x;y=_ref3.y;var hasX=offsets.hasOwnProperty("x");var hasY=offsets.hasOwnProperty("y");var sideX=left;var sideY=top;var win=window;if(adaptive){var offsetParent=getOffsetParent(popper2);var heightProp="clientHeight";var widthProp="clientWidth";if(offsetParent===getWindow(popper2)){offsetParent=getDocumentElement(popper2);if(getComputedStyle(offsetParent).position!=="static"&&position==="absolute"){heightProp="scrollHeight";widthProp="scrollWidth"}}offsetParent=offsetParent;if(placement===top||(placement===left||placement===right)&&variation===end){sideY=bottom;var offsetY=isFixed&&offsetParent===win&&win.visualViewport?win.visualViewport.height:offsetParent[heightProp];y-=offsetY-popperRect.height;y*=gpuAcceleration?1:-1}if(placement===left||(placement===top||placement===bottom)&&variation===end){sideX=right;var offsetX=isFixed&&offsetParent===win&&win.visualViewport?win.visualViewport.width:offsetParent[widthProp];x-=offsetX-popperRect.width;x*=gpuAcceleration?1:-1}}var commonStyles=Object.assign({position:position},adaptive&&unsetSides);var _ref4=roundOffsets===true?roundOffsetsByDPR({x:x,y:y}):{x:x,y:y};x=_ref4.x;y=_ref4.y;if(gpuAcceleration){var _Object$assign;return Object.assign({},commonStyles,(_Object$assign={},_Object$assign[sideY]=hasY?"0":"",_Object$assign[sideX]=hasX?"0":"",_Object$assign.transform=(win.devicePixelRatio||1)<=1?"translate("+x+"px, "+y+"px)":"translate3d("+x+"px, "+y+"px, 0)",_Object$assign))}return Object.assign({},commonStyles,(_Object$assign2={},_Object$assign2[sideY]=hasY?y+"px":"",_Object$assign2[sideX]=hasX?x+"px":"",_Object$assign2.transform="",_Object$assign2))}function computeStyles(_ref5){var state=_ref5.state,options=_ref5.options;var _options$gpuAccelerat=options.gpuAcceleration,gpuAcceleration=_options$gpuAccelerat===void 0?true:_options$gpuAccelerat,_options$adaptive=options.adaptive,adaptive=_options$adaptive===void 0?true:_options$adaptive,_options$roundOffsets=options.roundOffsets,roundOffsets=_options$roundOffsets===void 0?true:_options$roundOffsets;var commonStyles={placement:getBasePlacement(state.placement),variation:getVariation(state.placement),popper:state.elements.popper,popperRect:state.rects.popper,gpuAcceleration:gpuAcceleration,isFixed:state.options.strategy==="fixed"};if(state.modifiersData.popperOffsets!=null){state.styles.popper=Object.assign({},state.styles.popper,mapToStyles(Object.assign({},commonStyles,{offsets:state.modifiersData.popperOffsets,position:state.options.strategy,adaptive:adaptive,roundOffsets:roundOffsets})))}if(state.modifiersData.arrow!=null){state.styles.arrow=Object.assign({},state.styles.arrow,mapToStyles(Object.assign({},commonStyles,{offsets:state.modifiersData.arrow,position:"absolute",adaptive:false,roundOffsets:roundOffsets})))}state.attributes.popper=Object.assign({},state.attributes.popper,{"data-popper-placement":state.placement})}const computeStyles$1={name:"computeStyles",enabled:true,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:true};function effect(_ref){var state=_ref.state,instance=_ref.instance,options=_ref.options;var _options$scroll=options.scroll,scroll=_options$scroll===void 0?true:_options$scroll,_options$resize=options.resize,resize=_options$resize===void 0?true:_options$resize;var window2=getWindow(state.elements.popper);var scrollParents=[].concat(state.scrollParents.reference,state.scrollParents.popper);if(scroll){scrollParents.forEach((function(scrollParent){scrollParent.addEventListener("scroll",instance.update,passive)}))}if(resize){window2.addEventListener("resize",instance.update,passive)}return function(){if(scroll){scrollParents.forEach((function(scrollParent){scrollParent.removeEventListener("scroll",instance.update,passive)}))}if(resize){window2.removeEventListener("resize",instance.update,passive)}}}const eventListeners={name:"eventListeners",enabled:true,phase:"write",fn:function fn(){},effect:effect,data:{}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(placement){return placement.replace(/left|right|bottom|top/g,(function(matched){return hash$1[matched]}))}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(placement){return placement.replace(/start|end/g,(function(matched){return hash[matched]}))}function getWindowScroll(node){var win=getWindow(node);var scrollLeft=win.pageXOffset;var scrollTop=win.pageYOffset;return{scrollLeft:scrollLeft,scrollTop:scrollTop}}function getWindowScrollBarX(element){return getBoundingClientRect(getDocumentElement(element)).left+getWindowScroll(element).scrollLeft}function getViewportRect(element,strategy){var win=getWindow(element);var html=getDocumentElement(element);var visualViewport=win.visualViewport;var width=html.clientWidth;var height=html.clientHeight;var x=0;var y=0;if(visualViewport){width=visualViewport.width;height=visualViewport.height;var layoutViewport=isLayoutViewport();if(layoutViewport||!layoutViewport&&strategy==="fixed"){x=visualViewport.offsetLeft;y=visualViewport.offsetTop}}return{width:width,height:height,x:x+getWindowScrollBarX(element),y:y}}function getDocumentRect(element){var _element$ownerDocumen;var html=getDocumentElement(element);var winScroll=getWindowScroll(element);var body=(_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body;var width=max(html.scrollWidth,html.clientWidth,body?body.scrollWidth:0,body?body.clientWidth:0);var height=max(html.scrollHeight,html.clientHeight,body?body.scrollHeight:0,body?body.clientHeight:0);var x=-winScroll.scrollLeft+getWindowScrollBarX(element);var y=-winScroll.scrollTop;if(getComputedStyle(body||html).direction==="rtl"){x+=max(html.clientWidth,body?body.clientWidth:0)-width}return{width:width,height:height,x:x,y:y}}function isScrollParent(element){var _getComputedStyle=getComputedStyle(element),overflow=_getComputedStyle.overflow,overflowX=_getComputedStyle.overflowX,overflowY=_getComputedStyle.overflowY;return/auto|scroll|overlay|hidden/.test(overflow+overflowY+overflowX)}function getScrollParent(node){if(["html","body","#document"].indexOf(getNodeName(node))>=0){return node.ownerDocument.body}if(isHTMLElement(node)&&isScrollParent(node)){return node}return getScrollParent(getParentNode(node))}function listScrollParents(element,list){var _element$ownerDocumen;if(list===void 0){list=[]}var scrollParent=getScrollParent(element);var isBody=scrollParent===((_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body);var win=getWindow(scrollParent);var target=isBody?[win].concat(win.visualViewport||[],isScrollParent(scrollParent)?scrollParent:[]):scrollParent;var updatedList=list.concat(target);return isBody?updatedList:updatedList.concat(listScrollParents(getParentNode(target)))}function rectToClientRect(rect){return Object.assign({},rect,{left:rect.x,top:rect.y,right:rect.x+rect.width,bottom:rect.y+rect.height})}function getInnerBoundingClientRect(element,strategy){var rect=getBoundingClientRect(element,false,strategy==="fixed");rect.top=rect.top+element.clientTop;rect.left=rect.left+element.clientLeft;rect.bottom=rect.top+element.clientHeight;rect.right=rect.left+element.clientWidth;rect.width=element.clientWidth;rect.height=element.clientHeight;rect.x=rect.left;rect.y=rect.top;return rect}function getClientRectFromMixedType(element,clippingParent,strategy){return clippingParent===viewport?rectToClientRect(getViewportRect(element,strategy)):isElement(clippingParent)?getInnerBoundingClientRect(clippingParent,strategy):rectToClientRect(getDocumentRect(getDocumentElement(element)))}function getClippingParents(element){var clippingParents2=listScrollParents(getParentNode(element));var canEscapeClipping=["absolute","fixed"].indexOf(getComputedStyle(element).position)>=0;var clipperElement=canEscapeClipping&&isHTMLElement(element)?getOffsetParent(element):element;if(!isElement(clipperElement)){return[]}return clippingParents2.filter((function(clippingParent){return isElement(clippingParent)&&contains(clippingParent,clipperElement)&&getNodeName(clippingParent)!=="body"}))}function getClippingRect(element,boundary,rootBoundary,strategy){var mainClippingParents=boundary==="clippingParents"?getClippingParents(element):[].concat(boundary);var clippingParents2=[].concat(mainClippingParents,[rootBoundary]);var firstClippingParent=clippingParents2[0];var clippingRect=clippingParents2.reduce((function(accRect,clippingParent){var rect=getClientRectFromMixedType(element,clippingParent,strategy);accRect.top=max(rect.top,accRect.top);accRect.right=min(rect.right,accRect.right);accRect.bottom=min(rect.bottom,accRect.bottom);accRect.left=max(rect.left,accRect.left);return accRect}),getClientRectFromMixedType(element,firstClippingParent,strategy));clippingRect.width=clippingRect.right-clippingRect.left;clippingRect.height=clippingRect.bottom-clippingRect.top;clippingRect.x=clippingRect.left;clippingRect.y=clippingRect.top;return clippingRect}function computeOffsets(_ref){var reference2=_ref.reference,element=_ref.element,placement=_ref.placement;var basePlacement=placement?getBasePlacement(placement):null;var variation=placement?getVariation(placement):null;var commonX=reference2.x+reference2.width/2-element.width/2;var commonY=reference2.y+reference2.height/2-element.height/2;var offsets;switch(basePlacement){case top:offsets={x:commonX,y:reference2.y-element.height};break;case bottom:offsets={x:commonX,y:reference2.y+reference2.height};break;case right:offsets={x:reference2.x+reference2.width,y:commonY};break;case left:offsets={x:reference2.x-element.width,y:commonY};break;default:offsets={x:reference2.x,y:reference2.y}}var mainAxis=basePlacement?getMainAxisFromPlacement(basePlacement):null;if(mainAxis!=null){var len=mainAxis==="y"?"height":"width";switch(variation){case start:offsets[mainAxis]=offsets[mainAxis]-(reference2[len]/2-element[len]/2);break;case end:offsets[mainAxis]=offsets[mainAxis]+(reference2[len]/2-element[len]/2);break}}return offsets}function detectOverflow(state,options){if(options===void 0){options={}}var _options=options,_options$placement=_options.placement,placement=_options$placement===void 0?state.placement:_options$placement,_options$strategy=_options.strategy,strategy=_options$strategy===void 0?state.strategy:_options$strategy,_options$boundary=_options.boundary,boundary=_options$boundary===void 0?clippingParents:_options$boundary,_options$rootBoundary=_options.rootBoundary,rootBoundary=_options$rootBoundary===void 0?viewport:_options$rootBoundary,_options$elementConte=_options.elementContext,elementContext=_options$elementConte===void 0?popper:_options$elementConte,_options$altBoundary=_options.altBoundary,altBoundary=_options$altBoundary===void 0?false:_options$altBoundary,_options$padding=_options.padding,padding=_options$padding===void 0?0:_options$padding;var paddingObject=mergePaddingObject(typeof padding!=="number"?padding:expandToHashMap(padding,basePlacements));var altContext=elementContext===popper?reference:popper;var popperRect=state.rects.popper;var element=state.elements[altBoundary?altContext:elementContext];var clippingClientRect=getClippingRect(isElement(element)?element:element.contextElement||getDocumentElement(state.elements.popper),boundary,rootBoundary,strategy);var referenceClientRect=getBoundingClientRect(state.elements.reference);var popperOffsets2=computeOffsets({reference:referenceClientRect,element:popperRect,strategy:"absolute",placement:placement});var popperClientRect=rectToClientRect(Object.assign({},popperRect,popperOffsets2));var elementClientRect=elementContext===popper?popperClientRect:referenceClientRect;var overflowOffsets={top:clippingClientRect.top-elementClientRect.top+paddingObject.top,bottom:elementClientRect.bottom-clippingClientRect.bottom+paddingObject.bottom,left:clippingClientRect.left-elementClientRect.left+paddingObject.left,right:elementClientRect.right-clippingClientRect.right+paddingObject.right};var offsetData=state.modifiersData.offset;if(elementContext===popper&&offsetData){var offset2=offsetData[placement];Object.keys(overflowOffsets).forEach((function(key){var multiply=[right,bottom].indexOf(key)>=0?1:-1;var axis=[top,bottom].indexOf(key)>=0?"y":"x";overflowOffsets[key]+=offset2[axis]*multiply}))}return overflowOffsets}function computeAutoPlacement(state,options){if(options===void 0){options={}}var _options=options,placement=_options.placement,boundary=_options.boundary,rootBoundary=_options.rootBoundary,padding=_options.padding,flipVariations=_options.flipVariations,_options$allowedAutoP=_options.allowedAutoPlacements,allowedAutoPlacements=_options$allowedAutoP===void 0?placements:_options$allowedAutoP;var variation=getVariation(placement);var placements$1=variation?flipVariations?variationPlacements:variationPlacements.filter((function(placement2){return getVariation(placement2)===variation})):basePlacements;var allowedPlacements=placements$1.filter((function(placement2){return allowedAutoPlacements.indexOf(placement2)>=0}));if(allowedPlacements.length===0){allowedPlacements=placements$1}var overflows=allowedPlacements.reduce((function(acc,placement2){acc[placement2]=detectOverflow(state,{placement:placement2,boundary:boundary,rootBoundary:rootBoundary,padding:padding})[getBasePlacement(placement2)];return acc}),{});return Object.keys(overflows).sort((function(a,b){return overflows[a]-overflows[b]}))}function getExpandedFallbackPlacements(placement){if(getBasePlacement(placement)===auto){return[]}var oppositePlacement=getOppositePlacement(placement);return[getOppositeVariationPlacement(placement),oppositePlacement,getOppositeVariationPlacement(oppositePlacement)]}function flip(_ref){var state=_ref.state,options=_ref.options,name=_ref.name;if(state.modifiersData[name]._skip){return}var _options$mainAxis=options.mainAxis,checkMainAxis=_options$mainAxis===void 0?true:_options$mainAxis,_options$altAxis=options.altAxis,checkAltAxis=_options$altAxis===void 0?true:_options$altAxis,specifiedFallbackPlacements=options.fallbackPlacements,padding=options.padding,boundary=options.boundary,rootBoundary=options.rootBoundary,altBoundary=options.altBoundary,_options$flipVariatio=options.flipVariations,flipVariations=_options$flipVariatio===void 0?true:_options$flipVariatio,allowedAutoPlacements=options.allowedAutoPlacements;var preferredPlacement=state.options.placement;var basePlacement=getBasePlacement(preferredPlacement);var isBasePlacement=basePlacement===preferredPlacement;var fallbackPlacements=specifiedFallbackPlacements||(isBasePlacement||!flipVariations?[getOppositePlacement(preferredPlacement)]:getExpandedFallbackPlacements(preferredPlacement));var placements2=[preferredPlacement].concat(fallbackPlacements).reduce((function(acc,placement2){return acc.concat(getBasePlacement(placement2)===auto?computeAutoPlacement(state,{placement:placement2,boundary:boundary,rootBoundary:rootBoundary,padding:padding,flipVariations:flipVariations,allowedAutoPlacements:allowedAutoPlacements}):placement2)}),[]);var referenceRect=state.rects.reference;var popperRect=state.rects.popper;var checksMap=new Map;var makeFallbackChecks=true;var firstFittingPlacement=placements2[0];for(var i=0;i<placements2.length;i++){var placement=placements2[i];var _basePlacement=getBasePlacement(placement);var isStartVariation=getVariation(placement)===start;var isVertical=[top,bottom].indexOf(_basePlacement)>=0;var len=isVertical?"width":"height";var overflow=detectOverflow(state,{placement:placement,boundary:boundary,rootBoundary:rootBoundary,altBoundary:altBoundary,padding:padding});var mainVariationSide=isVertical?isStartVariation?right:left:isStartVariation?bottom:top;if(referenceRect[len]>popperRect[len]){mainVariationSide=getOppositePlacement(mainVariationSide)}var altVariationSide=getOppositePlacement(mainVariationSide);var checks=[];if(checkMainAxis){checks.push(overflow[_basePlacement]<=0)}if(checkAltAxis){checks.push(overflow[mainVariationSide]<=0,overflow[altVariationSide]<=0)}if(checks.every((function(check){return check}))){firstFittingPlacement=placement;makeFallbackChecks=false;break}checksMap.set(placement,checks)}if(makeFallbackChecks){var numberOfChecks=flipVariations?3:1;var _loop=function _loop2(_i2){var fittingPlacement=placements2.find((function(placement2){var checks2=checksMap.get(placement2);if(checks2){return checks2.slice(0,_i2).every((function(check){return check}))}}));if(fittingPlacement){firstFittingPlacement=fittingPlacement;return"break"}};for(var _i=numberOfChecks;_i>0;_i--){var _ret=_loop(_i);if(_ret==="break")break}}if(state.placement!==firstFittingPlacement){state.modifiersData[name]._skip=true;state.placement=firstFittingPlacement;state.reset=true}}const flip$1={name:"flip",enabled:true,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:false}};function getSideOffsets(overflow,rect,preventedOffsets){if(preventedOffsets===void 0){preventedOffsets={x:0,y:0}}return{top:overflow.top-rect.height-preventedOffsets.y,right:overflow.right-rect.width+preventedOffsets.x,bottom:overflow.bottom-rect.height+preventedOffsets.y,left:overflow.left-rect.width-preventedOffsets.x}}function isAnySideFullyClipped(overflow){return[top,right,bottom,left].some((function(side){return overflow[side]>=0}))}function hide(_ref){var state=_ref.state,name=_ref.name;var referenceRect=state.rects.reference;var popperRect=state.rects.popper;var preventedOffsets=state.modifiersData.preventOverflow;var referenceOverflow=detectOverflow(state,{elementContext:"reference"});var popperAltOverflow=detectOverflow(state,{altBoundary:true});var referenceClippingOffsets=getSideOffsets(referenceOverflow,referenceRect);var popperEscapeOffsets=getSideOffsets(popperAltOverflow,popperRect,preventedOffsets);var isReferenceHidden=isAnySideFullyClipped(referenceClippingOffsets);var hasPopperEscaped=isAnySideFullyClipped(popperEscapeOffsets);state.modifiersData[name]={referenceClippingOffsets:referenceClippingOffsets,popperEscapeOffsets:popperEscapeOffsets,isReferenceHidden:isReferenceHidden,hasPopperEscaped:hasPopperEscaped};state.attributes.popper=Object.assign({},state.attributes.popper,{"data-popper-reference-hidden":isReferenceHidden,"data-popper-escaped":hasPopperEscaped})}const hide$1={name:"hide",enabled:true,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(placement,rects,offset2){var basePlacement=getBasePlacement(placement);var invertDistance=[left,top].indexOf(basePlacement)>=0?-1:1;var _ref=typeof offset2==="function"?offset2(Object.assign({},rects,{placement:placement})):offset2,skidding=_ref[0],distance=_ref[1];skidding=skidding||0;distance=(distance||0)*invertDistance;return[left,right].indexOf(basePlacement)>=0?{x:distance,y:skidding}:{x:skidding,y:distance}}function offset(_ref2){var state=_ref2.state,options=_ref2.options,name=_ref2.name;var _options$offset=options.offset,offset2=_options$offset===void 0?[0,0]:_options$offset;var data=placements.reduce((function(acc,placement){acc[placement]=distanceAndSkiddingToXY(placement,state.rects,offset2);return acc}),{});var _data$state$placement=data[state.placement],x=_data$state$placement.x,y=_data$state$placement.y;if(state.modifiersData.popperOffsets!=null){state.modifiersData.popperOffsets.x+=x;state.modifiersData.popperOffsets.y+=y}state.modifiersData[name]=data}const offset$1={name:"offset",enabled:true,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(_ref){var state=_ref.state,name=_ref.name;state.modifiersData[name]=computeOffsets({reference:state.rects.reference,element:state.rects.popper,strategy:"absolute",placement:state.placement})}const popperOffsets$1={name:"popperOffsets",enabled:true,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(axis){return axis==="x"?"y":"x"}function preventOverflow(_ref){var state=_ref.state,options=_ref.options,name=_ref.name;var _options$mainAxis=options.mainAxis,checkMainAxis=_options$mainAxis===void 0?true:_options$mainAxis,_options$altAxis=options.altAxis,checkAltAxis=_options$altAxis===void 0?false:_options$altAxis,boundary=options.boundary,rootBoundary=options.rootBoundary,altBoundary=options.altBoundary,padding=options.padding,_options$tether=options.tether,tether=_options$tether===void 0?true:_options$tether,_options$tetherOffset=options.tetherOffset,tetherOffset=_options$tetherOffset===void 0?0:_options$tetherOffset;var overflow=detectOverflow(state,{boundary:boundary,rootBoundary:rootBoundary,padding:padding,altBoundary:altBoundary});var basePlacement=getBasePlacement(state.placement);var variation=getVariation(state.placement);var isBasePlacement=!variation;var mainAxis=getMainAxisFromPlacement(basePlacement);var altAxis=getAltAxis(mainAxis);var popperOffsets2=state.modifiersData.popperOffsets;var referenceRect=state.rects.reference;var popperRect=state.rects.popper;var tetherOffsetValue=typeof tetherOffset==="function"?tetherOffset(Object.assign({},state.rects,{placement:state.placement})):tetherOffset;var normalizedTetherOffsetValue=typeof tetherOffsetValue==="number"?{mainAxis:tetherOffsetValue,altAxis:tetherOffsetValue}:Object.assign({mainAxis:0,altAxis:0},tetherOffsetValue);var offsetModifierState=state.modifiersData.offset?state.modifiersData.offset[state.placement]:null;var data={x:0,y:0};if(!popperOffsets2){return}if(checkMainAxis){var _offsetModifierState$;var mainSide=mainAxis==="y"?top:left;var altSide=mainAxis==="y"?bottom:right;var len=mainAxis==="y"?"height":"width";var offset2=popperOffsets2[mainAxis];var min$1=offset2+overflow[mainSide];var max$1=offset2-overflow[altSide];var additive=tether?-popperRect[len]/2:0;var minLen=variation===start?referenceRect[len]:popperRect[len];var maxLen=variation===start?-popperRect[len]:-referenceRect[len];var arrowElement=state.elements.arrow;var arrowRect=tether&&arrowElement?getLayoutRect(arrowElement):{width:0,height:0};var arrowPaddingObject=state.modifiersData["arrow#persistent"]?state.modifiersData["arrow#persistent"].padding:getFreshSideObject();var arrowPaddingMin=arrowPaddingObject[mainSide];var arrowPaddingMax=arrowPaddingObject[altSide];var arrowLen=within(0,referenceRect[len],arrowRect[len]);var minOffset=isBasePlacement?referenceRect[len]/2-additive-arrowLen-arrowPaddingMin-normalizedTetherOffsetValue.mainAxis:minLen-arrowLen-arrowPaddingMin-normalizedTetherOffsetValue.mainAxis;var maxOffset=isBasePlacement?-referenceRect[len]/2+additive+arrowLen+arrowPaddingMax+normalizedTetherOffsetValue.mainAxis:maxLen+arrowLen+arrowPaddingMax+normalizedTetherOffsetValue.mainAxis;var arrowOffsetParent=state.elements.arrow&&getOffsetParent(state.elements.arrow);var clientOffset=arrowOffsetParent?mainAxis==="y"?arrowOffsetParent.clientTop||0:arrowOffsetParent.clientLeft||0:0;var offsetModifierValue=(_offsetModifierState$=offsetModifierState==null?void 0:offsetModifierState[mainAxis])!=null?_offsetModifierState$:0;var tetherMin=offset2+minOffset-offsetModifierValue-clientOffset;var tetherMax=offset2+maxOffset-offsetModifierValue;var preventedOffset=within(tether?min(min$1,tetherMin):min$1,offset2,tether?max(max$1,tetherMax):max$1);popperOffsets2[mainAxis]=preventedOffset;data[mainAxis]=preventedOffset-offset2}if(checkAltAxis){var _offsetModifierState$2;var _mainSide=mainAxis==="x"?top:left;var _altSide=mainAxis==="x"?bottom:right;var _offset=popperOffsets2[altAxis];var _len=altAxis==="y"?"height":"width";var _min=_offset+overflow[_mainSide];var _max=_offset-overflow[_altSide];var isOriginSide=[top,left].indexOf(basePlacement)!==-1;var _offsetModifierValue=(_offsetModifierState$2=offsetModifierState==null?void 0:offsetModifierState[altAxis])!=null?_offsetModifierState$2:0;var _tetherMin=isOriginSide?_min:_offset-referenceRect[_len]-popperRect[_len]-_offsetModifierValue+normalizedTetherOffsetValue.altAxis;var _tetherMax=isOriginSide?_offset+referenceRect[_len]+popperRect[_len]-_offsetModifierValue-normalizedTetherOffsetValue.altAxis:_max;var _preventedOffset=tether&&isOriginSide?withinMaxClamp(_tetherMin,_offset,_tetherMax):within(tether?_tetherMin:_min,_offset,tether?_tetherMax:_max);popperOffsets2[altAxis]=_preventedOffset;data[altAxis]=_preventedOffset-_offset}state.modifiersData[name]=data}const preventOverflow$1={name:"preventOverflow",enabled:true,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(element){return{scrollLeft:element.scrollLeft,scrollTop:element.scrollTop}}function getNodeScroll(node){if(node===getWindow(node)||!isHTMLElement(node)){return getWindowScroll(node)}else{return getHTMLElementScroll(node)}}function isElementScaled(element){var rect=element.getBoundingClientRect();var scaleX=round(rect.width)/element.offsetWidth||1;var scaleY=round(rect.height)/element.offsetHeight||1;return scaleX!==1||scaleY!==1}function getCompositeRect(elementOrVirtualElement,offsetParent,isFixed){if(isFixed===void 0){isFixed=false}var isOffsetParentAnElement=isHTMLElement(offsetParent);var offsetParentIsScaled=isHTMLElement(offsetParent)&&isElementScaled(offsetParent);var documentElement=getDocumentElement(offsetParent);var rect=getBoundingClientRect(elementOrVirtualElement,offsetParentIsScaled,isFixed);var scroll={scrollLeft:0,scrollTop:0};var offsets={x:0,y:0};if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed){if(getNodeName(offsetParent)!=="body"||isScrollParent(documentElement)){scroll=getNodeScroll(offsetParent)}if(isHTMLElement(offsetParent)){offsets=getBoundingClientRect(offsetParent,true);offsets.x+=offsetParent.clientLeft;offsets.y+=offsetParent.clientTop}else if(documentElement){offsets.x=getWindowScrollBarX(documentElement)}}return{x:rect.left+scroll.scrollLeft-offsets.x,y:rect.top+scroll.scrollTop-offsets.y,width:rect.width,height:rect.height}}function order(modifiers){var map2=new Map;var visited=new Set;var result=[];modifiers.forEach((function(modifier){map2.set(modifier.name,modifier)}));function sort(modifier){visited.add(modifier.name);var requires=[].concat(modifier.requires||[],modifier.requiresIfExists||[]);requires.forEach((function(dep){if(!visited.has(dep)){var depModifier=map2.get(dep);if(depModifier){sort(depModifier)}}}));result.push(modifier)}modifiers.forEach((function(modifier){if(!visited.has(modifier.name)){sort(modifier)}}));return result}function orderModifiers(modifiers){var orderedModifiers=order(modifiers);return modifierPhases.reduce((function(acc,phase){return acc.concat(orderedModifiers.filter((function(modifier){return modifier.phase===phase})))}),[])}function debounce(fn2){var pending;return function(){if(!pending){pending=new Promise((function(resolve){Promise.resolve().then((function(){pending=void 0;resolve(fn2())}))}))}return pending}}function mergeByName(modifiers){var merged=modifiers.reduce((function(merged2,current){var existing=merged2[current.name];merged2[current.name]=existing?Object.assign({},existing,current,{options:Object.assign({},existing.options,current.options),data:Object.assign({},existing.data,current.data)}):current;return merged2}),{});return Object.keys(merged).map((function(key){return merged[key]}))}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}return!args.some((function(element){return!(element&&typeof element.getBoundingClientRect==="function")}))}function popperGenerator(generatorOptions){if(generatorOptions===void 0){generatorOptions={}}var _generatorOptions=generatorOptions,_generatorOptions$def=_generatorOptions.defaultModifiers,defaultModifiers2=_generatorOptions$def===void 0?[]:_generatorOptions$def,_generatorOptions$def2=_generatorOptions.defaultOptions,defaultOptions=_generatorOptions$def2===void 0?DEFAULT_OPTIONS:_generatorOptions$def2;return function createPopper2(reference2,popper2,options){if(options===void 0){options=defaultOptions}var state={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,defaultOptions),modifiersData:{},elements:{reference:reference2,popper:popper2},attributes:{},styles:{}};var effectCleanupFns=[];var isDestroyed=false;var instance={state:state,setOptions:function setOptions(setOptionsAction){var options2=typeof setOptionsAction==="function"?setOptionsAction(state.options):setOptionsAction;cleanupModifierEffects();state.options=Object.assign({},defaultOptions,state.options,options2);state.scrollParents={reference:isElement(reference2)?listScrollParents(reference2):reference2.contextElement?listScrollParents(reference2.contextElement):[],popper:listScrollParents(popper2)};var orderedModifiers=orderModifiers(mergeByName([].concat(defaultModifiers2,state.options.modifiers)));state.orderedModifiers=orderedModifiers.filter((function(m){return m.enabled}));runModifierEffects();return instance.update()},forceUpdate:function forceUpdate(){if(isDestroyed){return}var _state$elements=state.elements,reference22=_state$elements.reference,popper22=_state$elements.popper;if(!areValidElements(reference22,popper22)){return}state.rects={reference:getCompositeRect(reference22,getOffsetParent(popper22),state.options.strategy==="fixed"),popper:getLayoutRect(popper22)};state.reset=false;state.placement=state.options.placement;state.orderedModifiers.forEach((function(modifier){return state.modifiersData[modifier.name]=Object.assign({},modifier.data)}));for(var index=0;index<state.orderedModifiers.length;index++){if(state.reset===true){state.reset=false;index=-1;continue}var _state$orderedModifie=state.orderedModifiers[index],fn2=_state$orderedModifie.fn,_state$orderedModifie2=_state$orderedModifie.options,_options=_state$orderedModifie2===void 0?{}:_state$orderedModifie2,name=_state$orderedModifie.name;if(typeof fn2==="function"){state=fn2({state:state,options:_options,name:name,instance:instance})||state}}},update:debounce((function(){return new Promise((function(resolve){instance.forceUpdate();resolve(state)}))})),destroy:function destroy(){cleanupModifierEffects();isDestroyed=true}};if(!areValidElements(reference2,popper2)){return instance}instance.setOptions(options).then((function(state2){if(!isDestroyed&&options.onFirstUpdate){options.onFirstUpdate(state2)}}));function runModifierEffects(){state.orderedModifiers.forEach((function(_ref3){var name=_ref3.name,_ref3$options=_ref3.options,options2=_ref3$options===void 0?{}:_ref3$options,effect2=_ref3.effect;if(typeof effect2==="function"){var cleanupFn=effect2({state:state,name:name,instance:instance,options:options2});var noopFn=function noopFn2(){};effectCleanupFns.push(cleanupFn||noopFn)}}))}function cleanupModifierEffects(){effectCleanupFns.forEach((function(fn2){return fn2()}));effectCleanupFns=[]}return instance}}var defaultModifiers$1=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1];var createPopper$1=popperGenerator({defaultModifiers:defaultModifiers$1});var defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$1,flip$1,preventOverflow$1,arrow$1,hide$1];var createPopper=popperGenerator({defaultModifiers:defaultModifiers});class PbTextarea extends PbEnhancedElement{static get selector(){return".resize_auto textarea"}onInput(){this.style.height="auto";this.style.height=this.scrollHeight+"px"}connect(){this.element.setAttribute("style","height:"+this.element.scrollHeight+"px;overflow-y:hidden;");this.element.addEventListener("input",this.onInput,false)}}const mapTheme={marker:colors.primary_action,maptiles:"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",flyToConfig:{zoom:13,bearing:0,curve:1.42,easing:function(t){return t},essential:true},zoomConfig:{duration:1e3},mapConfig:{style:"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",zoom:13,attributionControl:false}};const POPOVER_OFFSET_Y=[0,20];class PbPopover extends PbEnhancedElement{static get selector(){return"[data-pb-popover-kit]"}moveTooltip(){document.querySelector("body").appendChild(this.tooltip)}connect(){this.moveTooltip();this.popper=createPopper(this.triggerElement,this.tooltip,{placement:this.position,strategy:"fixed",modifiers:[{name:"offset",options:{offset:this.offset}}]});this.triggerElement.addEventListener("click",(event=>{event.preventDefault();event.stopPropagation();if(!this.tooltip.classList.contains("show")){this.checkCloseTooltip()}setTimeout((()=>{this.toggleTooltip();this.popper.update()}),0)}))}checkCloseTooltip(){document.querySelector("body").addEventListener("click",(({target:target})=>{const isTooltipElement=target.closest(`#${this.tooltipId}`)!==null;const isTriggerElement=target.closest(`#${this.triggerElementId}`)!==null;switch(this.closeOnClick){case"any":if(isTooltipElement||!isTooltipElement&&!isTriggerElement){this.hideTooltip()}break;case"outside":if(!isTooltipElement&&!isTriggerElement){this.hideTooltip()}break;case"inside":if(isTooltipElement){this.hideTooltip()}break}}),true)}hideTooltip(){this.tooltip.classList.remove("show");this.tooltip.classList.add("hide")}toggleTooltip(){this.tooltip.classList.toggle("show");this.tooltip.classList.toggle("hide")}get triggerElement(){return this._triggerElement=this._triggerElement||document.querySelector(`#${this.triggerElementId}`)}get tooltip(){return this._tooltip=this._tooltip||this.element.querySelector(`#${this.tooltipId}`)}get position(){return this.element.dataset.pbPopoverPosition}get triggerElementId(){return this.element.dataset.pbPopoverTriggerElementId}get tooltipId(){return this.element.dataset.pbPopoverTooltipId}get offset(){return this.element.dataset.pbPopoverOffset==="true"?POPOVER_OFFSET_Y:[0,0]}get closeOnClick(){return this.element.dataset.pbPopoverCloseOnClick}}const TOOLTIP_OFFSET=[0,20];const TOOLTIP_TIMEOUT=250;class PbTooltip extends PbEnhancedElement{static get selector(){return"[data-pb-tooltip-kit]"}connect(){this.triggerElements.forEach((trigger=>{trigger.addEventListener("mouseenter",(()=>{this.mouseenterTimeout=setTimeout((()=>{this.showTooltip(trigger);this.checkCloseTooltip(trigger)}),TOOLTIP_TIMEOUT);trigger.addEventListener("mouseleave",(()=>{clearTimeout(this.mouseenterTimeout);setTimeout((()=>{this.hideTooltip()}),0)}),{once:true})}))}));this.tooltip.addEventListener("mouseenter",(()=>{clearTimeout(this.mouseenterTimeout)}));this.tooltip.addEventListener("mouseleave",(()=>{this.hideTooltip()}))}checkCloseTooltip(trigger){document.querySelector("body").addEventListener("click",(({target:target})=>{const isTooltip=target.closest(`#${this.tooltipId}`)===this.tooltip;const isTrigger=target.closest(this.triggerElementSelector)===trigger;if(isTrigger||isTooltip){this.checkCloseTooltip(trigger)}else{this.hideTooltip()}}),{once:true})}showTooltip(trigger){if(this.shouldShowTooltip==="false")return;this.popper=createPopper$1(trigger,this.tooltip,{placement:this.position,strategy:"fixed",modifiers:[{name:"offset",options:{offset:TOOLTIP_OFFSET}},{name:"arrow",options:{element:document.querySelector(`#${this.tooltipId}-arrow`)}},offset$1,preventOverflow$1,flip$1]});this.tooltip.classList.add("show")}hideTooltip(){this.tooltip.classList.add("fade_out");setTimeout((()=>{if(!this.popper)return;this.popper.destroy();this.tooltip.classList.remove("show");this.tooltip.classList.remove("fade_out")}),TOOLTIP_TIMEOUT)}get triggerElements(){let triggerEl;if(this.triggerElementId){triggerEl=document.querySelector(`#${this.triggerElementId}`)}else{const selectorIsId=this.triggerElementSelector.indexOf("#")>-1;triggerEl=selectorIsId?document.querySelector(`${this.triggerElementSelector}`):document.querySelectorAll(`${this.triggerElementSelector}`)}if(!triggerEl){console.error("Tooltip Kit: an invalid or unavailable DOM reference was provided!");return[]}if(!triggerEl.length)triggerEl=[triggerEl];return this._triggerElements=this._triggerElements||triggerEl}get tooltip(){return this._tooltip=this._tooltip||this.element.querySelector(`#${this.tooltipId}`)}get position(){return this.element.dataset.pbTooltipPosition}get triggerElementId(){return this.element.dataset.pbTooltipTriggerElementId}get tooltipId(){return this.element.dataset.pbTooltipTooltipId}get triggerElementSelector(){return this.element.dataset.pbTooltipTriggerElementSelector}get shouldShowTooltip(){return this.element.dataset.pbTooltipShowTooltip}}class PbTypeahead extends PbEnhancedElement{static get selector(){return"[data-pb-typeahead-kit]"}connect(){this.element.addEventListener("keydown",(event=>this.handleKeydown(event)));this.searchInput.addEventListener("focus",(()=>this.debouncedSearch()));this.searchInput.addEventListener("input",(()=>this.debouncedSearch()));this.resultsElement.addEventListener("click",(event=>this.optionSelected(event)))}handleKeydown(event){if(event.key==="ArrowUp"){event.preventDefault();this.focusPreviousOption()}else if(event.key==="ArrowDown"){event.preventDefault();this.focusNextOption()}}search(){if(this.searchTerm.length<parseInt(this.searchTermMinimumLength))return this.clearResults();this.toggleResultsLoadingIndicator(true);this.showResults();const searchTerm=this.searchTerm;const searchContext=this.searchContext;const search={searchingFor:searchTerm,searchingContext:searchContext,setResults:results=>{this.resultsCacheUpdate(searchTerm,searchContext,results)}};this.element.dispatchEvent(new CustomEvent("pb-typeahead-kit-search",{bubbles:true,detail:search}))}resultsCacheUpdate(searchTerm,searchContext,results){const searchTermAndContext=this.cacheKeyFor(searchTerm,searchContext);if(this.resultsOptionCache.has(searchTermAndContext))this.resultsOptionCache.delete(searchTermAndContext);if(this.resultsOptionCache.size>32)this.resultsOptionCache.delete(this.resultsOptionCache.keys().next().value);this.resultsOptionCache.set(searchTermAndContext,results);this.showResults()}resultsCacheClear(){this.resultsOptionCache.clear()}get debouncedSearch(){return this._debouncedSearch=this._debouncedSearch||debounce$2(this.search,parseInt(this.searchDebounceTimeout)).bind(this)}showResults(){if(!this.resultsOptionCache.has(this.searchTermAndContext))return;this.toggleResultsLoadingIndicator(false);this.clearResults();for(const result of this.resultsOptionCache.get(this.searchTermAndContext)){this.resultsElement.appendChild(this.newResultOption(result.cloneNode(true)))}for(const result of this.resultsElement.querySelectorAll("[data-result-option-item]")){result.addEventListener("mousedown",(event=>this.optionSelected(event)))}}optionSelected(event){const resultOption=event.target.closest("[data-result-option-item]");if(!resultOption)return;this.resultsCacheClear();this.searchInputClear();this.clearResults();this.element.dispatchEvent(new CustomEvent("pb-typeahead-kit-result-option-selected",{bubbles:true,detail:{selected:resultOption,typeahead:this}}))}clearResults(){this.resultsElement.innerHTML=""}newResultOption(content){const resultOption=this.resultOptionTemplate.content.cloneNode(true);resultOption.querySelector('slot[name="content"]').replaceWith(content);return resultOption}focusPreviousOption(){const currentIndex=this.resultOptionItems.indexOf(this.currentSelectedResultOptionItem);const previousIndex=currentIndex-1;const previousOptionItem=this.resultOptionItems[previousIndex]||this.resultOptionItems[this.resultOptionItems.length-1];previousOptionItem.focus()}focusNextOption(){const currentIndex=this.resultOptionItems.indexOf(this.currentSelectedResultOptionItem);const nextIndex=currentIndex+1;const nextOptionItem=this.resultOptionItems[nextIndex]||this.resultOptionItems[0];nextOptionItem.focus()}get resultOptionItems(){return Array.from(this.resultsElement.querySelectorAll("[data-result-option-item]"))}get currentSelectedResultOptionItem(){return document.activeElement.closest("[data-result-option-item]")}get searchInput(){return this._searchInput=this._searchInput||this.element.querySelector('input[type="search"]')}get searchTerm(){return this.searchInput.value}get searchContext(){if(this._searchContext)return this._searchContext;const selector=this.element.dataset.searchContextValueSelector;if(selector)return(this.element.parentNode.querySelector(selector)||this.element.closest(selector)).value;return null}set searchContext(value){this._searchContext=value}get searchTermAndContext(){return this.cacheKeyFor(this.searchTerm,this.searchContext)}cacheKeyFor(searchTerm,searchContext){return[searchTerm,JSON.stringify(searchContext)].join()}searchInputClear(){this.searchInput.value=""}get searchTermMinimumLength(){return this.element.dataset.pbTypeaheadKitSearchTermMinimumLength}get searchDebounceTimeout(){return this.element.dataset.pbTypeaheadKitSearchDebounceTimeout}get resultsElement(){return this._resultsElement=this._resultsElement||this.element.querySelector("[data-pb-typeahead-kit-results]")}get resultOptionTemplate(){return this._resultOptionTemplate=this._resultOptionTemplate||this.element.querySelector("template[data-pb-typeahead-kit-result-option]")}get resultsOptionCache(){return this._resultsOptionCache=this._resultsOptionCache||new Map}get resultsLoadingIndicator(){return this._resultsLoadingIndicator=this._resultsLoadingIndicator||this.element.querySelector("[data-pb-typeahead-kit-loading-indicator]")}toggleResultsLoadingIndicator(visible){var visibilityProperty="0";if(visible)visibilityProperty="1";this.resultsLoadingIndicator.style.opacity=visibilityProperty}}const dialogHelper=()=>{const openTrigger=document.querySelectorAll("[data-open-dialog]");const closeTrigger=document.querySelectorAll("[data-close-dialog]");const dialogs=document.querySelectorAll(".pb_dialog_rails");openTrigger.forEach((open=>{open.addEventListener("click",(()=>{var openTriggerData=open.dataset.openDialog;var targetDialog=document.getElementById(openTriggerData);if(targetDialog.open)return;targetDialog.showModal()}))}));closeTrigger.forEach((close=>{close.addEventListener("click",(()=>{var closeTriggerData=close.dataset.closeDialog;document.getElementById(closeTriggerData).close()}))}));dialogs.forEach((dialogElement=>{dialogElement.addEventListener("mousedown",(event=>{const dialogParentDataset=dialogElement.parentElement.dataset;if(dialogParentDataset.overlayClick==="overlay_close")return;const dialogModal=event.target.getBoundingClientRect();const clickedOutsideDialogModal=event.clientX<dialogModal.left||event.clientX>dialogModal.right||event.clientY<dialogModal.top||event.clientY>dialogModal.bottom;if(clickedOutsideDialogModal){dialogElement.close();event.stopPropagation()}}))}))};export{createPopper as A,uniqueId as B,typography as C,DateTime as D,cloneDeep as E,isString as F,mapTheme as G,PbEnhancedElement as P,datePickerHelper as a,dialogHelper as b,PbPopover as c,debounce$2 as d,PbTooltip as e,PbTypeahead as f,PbTable as g,PbTextarea as h,isEmpty as i,find as j,colors as k,getDefaultExportFromCjs as l,map as m,noop as n,omitBy as o,partial as p,commonjsGlobal as q,filter as r,omit as s,get as t,useDropdown as u,highchartsTheme as v,merge as w,highchartsDarkTheme as x,useCollapsible as y,getAugmentedNamespace as z};
16
+ var __assign2=function(){__assign2=Object.assign||function __assign3(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p]}return t};return __assign2.apply(this,arguments)};var monthToStr2=function(monthNumber,shorthand,locale){return locale.months[shorthand?"shorthand":"longhand"][monthNumber]};function clearNode2(node){while(node.firstChild)node.removeChild(node.firstChild)}function getEventTarget2(event){try{if(typeof event.composedPath==="function"){var path=event.composedPath();return path[0]}return event.target}catch(error2){return event.target}}var defaultConfig={shorthand:false,dateFormat:"F Y",altFormat:"F Y",theme:"light"};function monthSelectPlugin2(pluginConfig){var config=__assign2(__assign2({},defaultConfig),pluginConfig);return function(fp){fp.config.dateFormat=config.dateFormat;fp.config.altFormat=config.altFormat;var self2={monthsContainer:null};function clearUnnecessaryDOMElements(){if(!fp.rContainer)return;clearNode2(fp.rContainer);for(var index=0;index<fp.monthElements.length;index++){var element=fp.monthElements[index];if(!element.parentNode)continue;element.parentNode.removeChild(element)}}function build(){if(!fp.rContainer)return;self2.monthsContainer=fp._createElement("div","flatpickr-monthSelect-months");self2.monthsContainer.tabIndex=-1;buildMonths();fp.rContainer.appendChild(self2.monthsContainer);fp.calendarContainer.classList.add("flatpickr-monthSelect-theme-"+config.theme)}function buildMonths(){if(!self2.monthsContainer)return;clearNode2(self2.monthsContainer);var frag=document.createDocumentFragment();for(var i=0;i<12;i++){var month=fp.createDay("flatpickr-monthSelect-month",new Date(fp.currentYear,i),0,i);if(month.dateObj.getMonth()===(new Date).getMonth()&&month.dateObj.getFullYear()===(new Date).getFullYear())month.classList.add("today");month.textContent=monthToStr2(i,config.shorthand,fp.l10n);month.addEventListener("click",selectMonth);frag.appendChild(month)}self2.monthsContainer.appendChild(frag);if(fp.config.minDate&&fp.currentYear===fp.config.minDate.getFullYear())fp.prevMonthNav.classList.add("flatpickr-disabled");else fp.prevMonthNav.classList.remove("flatpickr-disabled");if(fp.config.maxDate&&fp.currentYear===fp.config.maxDate.getFullYear())fp.nextMonthNav.classList.add("flatpickr-disabled");else fp.nextMonthNav.classList.remove("flatpickr-disabled")}function bindEvents(){fp._bind(fp.prevMonthNav,"click",(function(e){e.preventDefault();e.stopPropagation();fp.changeYear(fp.currentYear-1);selectYear();buildMonths()}));fp._bind(fp.nextMonthNav,"click",(function(e){e.preventDefault();e.stopPropagation();fp.changeYear(fp.currentYear+1);selectYear();buildMonths()}));fp._bind(self2.monthsContainer,"mouseover",(function(e){if(fp.config.mode==="range")fp.onMouseOver(getEventTarget2(e),"flatpickr-monthSelect-month")}))}function setCurrentlySelected(){if(!fp.rContainer)return;if(!fp.selectedDates.length)return;var currentlySelected=fp.rContainer.querySelectorAll(".flatpickr-monthSelect-month.selected");for(var index=0;index<currentlySelected.length;index++){currentlySelected[index].classList.remove("selected")}var targetMonth=fp.selectedDates[0].getMonth();var month=fp.rContainer.querySelector(".flatpickr-monthSelect-month:nth-child("+(targetMonth+1)+")");if(month){month.classList.add("selected")}}function selectYear(){var selectedDate=fp.selectedDates[0];if(selectedDate){selectedDate=new Date(selectedDate);selectedDate.setFullYear(fp.currentYear);if(fp.config.minDate&&selectedDate<fp.config.minDate){selectedDate=fp.config.minDate}if(fp.config.maxDate&&selectedDate>fp.config.maxDate){selectedDate=fp.config.maxDate}fp.currentYear=selectedDate.getFullYear()}fp.currentYearElement.value=String(fp.currentYear);if(fp.rContainer){var months2=fp.rContainer.querySelectorAll(".flatpickr-monthSelect-month");months2.forEach((function(month){month.dateObj.setFullYear(fp.currentYear);if(fp.config.minDate&&month.dateObj<fp.config.minDate||fp.config.maxDate&&month.dateObj>fp.config.maxDate){month.classList.add("flatpickr-disabled")}else{month.classList.remove("flatpickr-disabled")}}))}setCurrentlySelected()}function selectMonth(e){e.preventDefault();e.stopPropagation();var eventTarget=getEventTarget2(e);if(!(eventTarget instanceof Element))return;if(eventTarget.classList.contains("flatpickr-disabled"))return;if(eventTarget.classList.contains("notAllowed"))return;setMonth(eventTarget.dateObj);if(fp.config.closeOnSelect){var single=fp.config.mode==="single";var range=fp.config.mode==="range"&&fp.selectedDates.length===2;if(single||range)fp.close()}}function setMonth(date){var selectedDate=new Date(fp.currentYear,date.getMonth(),date.getDate());var selectedDates=[];switch(fp.config.mode){case"single":selectedDates=[selectedDate];break;case"multiple":selectedDates.push(selectedDate);break;case"range":if(fp.selectedDates.length===2){selectedDates=[selectedDate]}else{selectedDates=fp.selectedDates.concat([selectedDate]);selectedDates.sort((function(a,b){return a.getTime()-b.getTime()}))}break}fp.setDate(selectedDates,true);setCurrentlySelected()}var shifts={37:-1,39:1,40:3,38:-3};function onKeyDown(_,__,___,e){var shouldMove=shifts[e.keyCode]!==void 0;if(!shouldMove&&e.keyCode!==13){return}if(!fp.rContainer||!self2.monthsContainer)return;var currentlySelected=fp.rContainer.querySelector(".flatpickr-monthSelect-month.selected");var index=Array.prototype.indexOf.call(self2.monthsContainer.children,document.activeElement);if(index===-1){var target=currentlySelected||self2.monthsContainer.firstElementChild;target.focus();index=target.$i}if(shouldMove){self2.monthsContainer.children[(12+index+shifts[e.keyCode])%12].focus()}else if(e.keyCode===13&&self2.monthsContainer.contains(document.activeElement)){setMonth(document.activeElement.dateObj)}}function closeHook(){var _a;if(((_a=fp.config)===null||_a===void 0?void 0:_a.mode)==="range"&&fp.selectedDates.length===1)fp.clear(false);if(!fp.selectedDates.length)buildMonths()}function stubCurrentMonth(){config._stubbedCurrentMonth=fp._initialDate.getMonth();fp._initialDate.setMonth(config._stubbedCurrentMonth);fp.currentMonth=config._stubbedCurrentMonth}function unstubCurrentMonth(){if(!config._stubbedCurrentMonth)return;fp._initialDate.setMonth(config._stubbedCurrentMonth);fp.currentMonth=config._stubbedCurrentMonth;delete config._stubbedCurrentMonth}function destroyPluginInstance(){if(self2.monthsContainer!==null){var months2=self2.monthsContainer.querySelectorAll(".flatpickr-monthSelect-month");for(var index=0;index<months2.length;index++){months2[index].removeEventListener("click",selectMonth)}}}return{onParseConfig:function(){fp.config.enableTime=false},onValueUpdate:setCurrentlySelected,onKeyDown:onKeyDown,onReady:[stubCurrentMonth,clearUnnecessaryDOMElements,build,bindEvents,setCurrentlySelected,function(){fp.config.onClose.push(closeHook);fp.loadedPlugins.push("monthSelect")}],onDestroy:[unstubCurrentMonth,destroyPluginInstance,function(){fp.config.onClose=fp.config.onClose.filter((function(hook){return hook!==closeHook}))}]}}}return monthSelectPlugin2}))})(monthSelect);var monthSelectExports=monthSelect.exports;const monthSelectPlugin=getDefaultExportFromCjs(monthSelectExports);var weekSelect$1={exports:{}};(function(module2,exports2){(function(global2,factory){module2.exports=factory()})(commonjsGlobal,(function(){function getEventTarget2(event){try{if(typeof event.composedPath==="function"){var path=event.composedPath();return path[0]}return event.target}catch(error2){return event.target}}function weekSelectPlugin(){return function(fp){function onDayHover(event){var day=getEventTarget2(event);if(!day.classList.contains("flatpickr-day"))return;var days2=fp.days.childNodes;var dayIndex=day.$i;var dayIndSeven=dayIndex/7;var weekStartDay=days2[7*Math.floor(dayIndSeven)].dateObj;var weekEndDay=days2[7*Math.ceil(dayIndSeven+.01)-1].dateObj;for(var i=days2.length;i--;){var day_1=days2[i];var date=day_1.dateObj;if(date>weekEndDay||date<weekStartDay)day_1.classList.remove("inRange");else day_1.classList.add("inRange")}}function highlightWeek(){var selDate=fp.latestSelectedDateObj;if(selDate!==void 0&&selDate.getMonth()===fp.currentMonth&&selDate.getFullYear()===fp.currentYear){fp.weekStartDay=fp.days.childNodes[7*Math.floor(fp.selectedDateElem.$i/7)].dateObj;fp.weekEndDay=fp.days.childNodes[7*Math.ceil(fp.selectedDateElem.$i/7+.01)-1].dateObj}var days2=fp.days.childNodes;for(var i=days2.length;i--;){var date=days2[i].dateObj;if(date>=fp.weekStartDay&&date<=fp.weekEndDay)days2[i].classList.add("week","selected")}}function clearHover(){var days2=fp.days.childNodes;for(var i=days2.length;i--;)days2[i].classList.remove("inRange")}function onReady(){if(fp.daysContainer!==void 0)fp.daysContainer.addEventListener("mouseover",onDayHover)}function onDestroy(){if(fp.daysContainer!==void 0)fp.daysContainer.removeEventListener("mouseover",onDayHover)}return{onValueUpdate:highlightWeek,onMonthChange:highlightWeek,onYearChange:highlightWeek,onOpen:highlightWeek,onClose:clearHover,onParseConfig:function(){fp.config.mode="single";fp.config.enableTime=false;fp.config.dateFormat=fp.config.dateFormat?fp.config.dateFormat:"\\W\\e\\e\\k #W, Y";fp.config.altFormat=fp.config.altFormat?fp.config.altFormat:"\\W\\e\\e\\k #W, Y"},onReady:[onReady,highlightWeek,function(){fp.loadedPlugins.push("weekSelect")}],onDestroy:onDestroy}}}return weekSelectPlugin}))})(weekSelect$1);var weekSelectExports=weekSelect$1.exports;const weekSelect=getDefaultExportFromCjs(weekSelectExports);const getTimezoneText=inputDate=>{const tzAbbr=inputDate.toLocaleDateString("en-US",{day:"2-digit",timeZoneName:"short"}).slice(4);const tzText=inputDate.toLocaleDateString("en-US",{day:"2-digit",timeZoneName:"long"}).slice(4);return`${tzAbbr} (${tzText})`};function timeSelectPlugin(props){return function(fp){const generateMeridiemCard=text=>{const selectableCard=document.createElement("div");selectableCard.className="pb_selectable_card_kit_enabled";const cardInput=document.createElement("input"),cardInputId=`datePicker-${fp.element.id}-${text}`;cardInput.className="datePicker-AMPM";cardInput.id=cardInputId;cardInput.name="datepicker-ampm";cardInput.type="radio";cardInput.value=text;const cardLabel=document.createElement("label"),cardLabelBuffer=document.createElement("div");cardLabel.className=`label-${text.toLowerCase()}`;cardLabel.setAttribute("for",cardInputId);cardLabelBuffer.className="buffer";cardLabelBuffer.innerHTML=text;cardLabel.append(cardLabelBuffer);selectableCard.prepend(cardInput);selectableCard.append(cardLabel);return selectableCard};const generateMeridiemToggle=()=>{fp.amPM.style.display="none";const formGroupKit=document.createElement("div");formGroupKit.className="pb_form_group_kit";const amCard=generateMeridiemCard("AM");amCard.addEventListener("click",(()=>{fp.selectedDates[0].setHours(fp.selectedDates[0].getHours()%12+12*0);fp.setDate(fp.selectedDates[0],true)}));const pmCard=generateMeridiemCard("PM");pmCard.addEventListener("click",(()=>{fp.selectedDates[0].setHours(fp.selectedDates[0].getHours()%12+12*1);fp.setDate(fp.selectedDates[0],true)}));formGroupKit.prepend(amCard);formGroupKit.append(pmCard);const meridiemContainer=document.createElement("div");meridiemContainer.className="meridiem";meridiemContainer.append(formGroupKit);fp.timeContainer.append(meridiemContainer)};const getMeridiem=dateObj=>dateObj[0].getHours()<12?"AM":"PM";const updateMeridiemToggle=forceClick=>{if(!fp.selectedDates.length)return;const uncheckedClass="pb_selectable_card_kit_enabled",checkedClass="pb_selectable_card_kit_checked_enabled",pickerAM=document.getElementById(`datePicker-${fp.element.id}-AM`),pickerPM=document.getElementById(`datePicker-${fp.element.id}-PM`),meridiem=getMeridiem(fp.selectedDates);{pickerAM.checked=false;pickerPM.checked=false;pickerPM.checked=meridiem==="PM";pickerAM.checked=meridiem==="AM"}if(meridiem==="PM"){pickerPM.parentElement.className=checkedClass;pickerAM.parentElement.className=uncheckedClass}else if(meridiem==="AM"){pickerAM.parentElement.className=checkedClass;pickerPM.parentElement.className=uncheckedClass}};return{onValueUpdate(){updateMeridiemToggle()},onOpen(){updateMeridiemToggle()},onReady(){const id=fp.input.id;if(!id||!(fp===null||fp===void 0?void 0:fp.timeContainer))return;fp.timeContainer.classList.add("pb_time_selection");fp.minuteElement.step="1";if(props.caption){const captionContainer=document.createElement("div");captionContainer.className="pb_caption_kit_md";captionContainer.innerHTML=props===null||props===void 0?void 0:props.caption;fp.timeContainer.prepend(captionContainer)}generateMeridiemToggle();updateMeridiemToggle();if(props.showTimezone){const subcaptionContainer=document.createElement("div");subcaptionContainer.className="pb_caption_kit_xs";subcaptionContainer.innerHTML=getTimezoneText(fp._initialDate);fp.timeContainer.append(subcaptionContainer)}fp.loadedPlugins.push("timeSelectPlugin")}}}}let activeLabel="";const quickPickPlugin=(thisRangesEndToday,customQuickPickDates)=>function(fp){const today=new Date;const yesterday=DateTime.getYesterdayDate(new Date);const thisWeekStartDate=DateTime.getFirstDayOfWeek(new Date);const thisWeekEndDate=thisRangesEndToday?new Date:DateTime.getLastDayOfWeek(new Date);const lastWeekStartDate=DateTime.getPreviousWeekStartDate(new Date);const lastWeekEndDate=DateTime.getPreviousWeekEndDate(new Date);const thisMonthStartDate=DateTime.getMonthStartDate(new Date);const thisMonthEndDate=thisRangesEndToday?new Date:DateTime.getMonthEndDate(new Date);const lastMonthStartDate=DateTime.getPreviousMonthStartDate(new Date);const lastMonthEndDate=DateTime.getPreviousMonthEndDate(new Date);const thisQuarterStartDate=DateTime.getQuarterStartDate(new Date);const thisQuarterEndDate=thisRangesEndToday?new Date:DateTime.getQuarterEndDate(new Date);const lastQuarterStartDate=DateTime.getPreviousQuarterStartDate(new Date);const lastQuarterEndDate=DateTime.getPreviousQuarterEndDate(new Date);const thisYearStartDate=DateTime.getYearStartDate(new Date);const thisYearEndDate=thisRangesEndToday?new Date:DateTime.getYearEndDate(new Date);const lastYearStartDate=DateTime.getPreviousYearStartDate(new Date);const lastYearEndDate=DateTime.getPreviousYearEndDate(new Date);const calculateDateRange=(timePeriod,amount)=>{const endDate=new Date;const startDate=new Date;switch(timePeriod){case"days":startDate.setDate(endDate.getDate()-amount);break;case"weeks":startDate.setDate(endDate.getDate()-amount*7);break;case"months":startDate.setMonth(endDate.getMonth()-amount);break;case"quarters":startDate.setMonth(endDate.getMonth()-amount*3);break;case"years":startDate.setFullYear(endDate.getFullYear()-amount);break;default:throw new Error("Invalid time period")}return[startDate,endDate]};let ranges={Today:[today,today],Yesterday:[yesterday,yesterday],"This week":[thisWeekStartDate,thisWeekEndDate],"This month":[thisMonthStartDate,thisMonthEndDate],"This quarter":[thisQuarterStartDate,thisQuarterEndDate],"This year":[thisYearStartDate,thisYearEndDate],"Last week":[lastWeekStartDate,lastWeekEndDate],"Last month":[lastMonthStartDate,lastMonthEndDate],"Last quarter":[lastQuarterStartDate,lastQuarterEndDate],"Last year":[lastYearStartDate,lastYearEndDate]};if(customQuickPickDates&&Object.keys(customQuickPickDates).length!==0){if(customQuickPickDates.dates.length&&customQuickPickDates.override===false){customQuickPickDates.dates.forEach((item=>{if(Array.isArray(item.value)){ranges[item.label]=item.value.map((dateStr=>new Date(dateStr)))}else{ranges[item.label]=calculateDateRange(item.value.timePeriod,item.value.amount)}}))}else if(customQuickPickDates.dates.length&&customQuickPickDates.override!==false){ranges={};customQuickPickDates.dates.forEach((item=>{if(Array.isArray(item.value)){ranges[item.label]=item.value.map((dateStr=>new Date(dateStr)))}else{ranges[item.label]=calculateDateRange(item.value.timePeriod,item.value.amount)}}))}}const rangesNav=document.createElement("ul");const pluginData={ranges:ranges,rangesNav:rangesNav,rangesButtons:[]};const addRangeButton=label=>{const div2=document.createElement("div");div2.className="nav-item-link";div2.innerHTML=label;pluginData.rangesButtons[label]=div2;const item=document.createElement("li");item.className="nav-item";item.appendChild(pluginData.rangesButtons[label]);pluginData.rangesNav.appendChild(item);return pluginData.rangesButtons[label]};const selectActiveRangeButton=selectedDates=>{const current=pluginData.rangesNav.querySelector(".active");if(current){current.classList.remove("active")}if(selectedDates.length>0&&activeLabel){pluginData.rangesButtons[activeLabel].classList.add("active")}};const isLabelMatchingSelectedDates=selectedDates=>activeLabel&&selectedDates[0].toDateString()===pluginData.ranges[activeLabel][0].toDateString()&&selectedDates[1].toDateString()===pluginData.ranges[activeLabel][1].toDateString();return{onReady(selectedDates){for(const[label,range]of Object.entries(pluginData.ranges)){addRangeButton(label).addEventListener("click",(function(){const start2=new Date(range[0]);const end2=new Date(range[1]);if(!start2){fp.clear()}else{activeLabel=label;fp.setDate([start2,end2],true);fp.close()}}))}if(pluginData.rangesNav.children.length>0){fp.calendarContainer.prepend(pluginData.rangesNav);pluginData.rangesNav.classList.add("quick-pick-ul");fp.calendarContainer.classList.add("quick-pick-drop-down");selectActiveRangeButton(selectedDates)}},onValueUpdate(selectedDates){selectActiveRangeButton(selectedDates)},onClose(selectedDates){var _a;if(!isLabelMatchingSelectedDates(selectedDates)){(_a=pluginData.rangesButtons[activeLabel])===null||_a===void 0?void 0:_a.classList.remove("active");activeLabel=""}if(selectedDates.length===1){fp.setDate([selectedDates[0],selectedDates[0]],true)}if(selectedDates.length<2&&selectedDates.length>0){fp.input.placeholder=fp.formatDate(this.selectedDates[0],fp.config.dateFormat)}}}};const getPositionElement=element=>typeof element==="string"?document.querySelectorAll(element)[0]:element;const datePickerHelper=(config,scrollContainer)=>{const noop2=()=>{};const{allowInput:allowInput,closeOnSelect:closeOnSelect=true,customQuickPickDates:customQuickPickDates={override:true,dates:[]},defaultDate:defaultDate,disableDate:disableDate,disableRange:disableRange,disableWeekdays:disableWeekdays,enableTime:enableTime,format:format,maxDate:maxDate,minDate:minDate,mode:mode,onChange:onChange=noop2,onClose:onClose=noop2,pickerId:pickerId,plugins:plugins,position:position="auto",positionElement:positionElement,required:required,selectionType:selectionType,showTimezone:showTimezone,staticPosition:staticPosition=true,thisRangesEndToday:thisRangesEndToday=false,timeCaption:timeCaption="Select Time",timeFormat:timeFormat="at h:i K",yearRange:yearRange}=config;const defaultDateGetter=()=>{if(defaultDate===""){return null}else{return defaultDate}};const disabledWeekDays=()=>[date=>{const weekdayObj={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6};return date.getDay()===weekdayObj[disableWeekdays[0]]||date.getDay()===weekdayObj[disableWeekdays[1]]||date.getDay()===weekdayObj[disableWeekdays[2]]||date.getDay()===weekdayObj[disableWeekdays[3]]||date.getDay()===weekdayObj[disableWeekdays[4]]||date.getDay()===weekdayObj[disableWeekdays[5]]||date.getDay()===weekdayObj[disableWeekdays[6]]}];const disabledParser=()=>{const disabledArray=[];disableDate&&disableDate.length>0&&disabledArray.push(...disableDate);disableRange&&disableRange.length>0&&disabledArray.push(...disableRange);disableWeekdays&&disableWeekdays.length>0&&disabledArray.push(...disabledWeekDays());return disabledArray};const calendarResizer=()=>{const cal=document.querySelector(`#cal-${pickerId}.open`);const parentInput=cal.parentElement;if((cal===null||cal===void 0?void 0:cal.getBoundingClientRect().right)>window.innerWidth){parentInput.style.display="flex";parentInput.style.justifyContent="center"}if(cal.offsetWidth<=parentInput.offsetWidth){parentInput.style.display="";parentInput.style.justifyContent=""}};const setPlugins=(thisRangesEndToday2,customQuickPickDates2)=>{const pluginList=[];if(selectionType==="month"||plugins.length>0){pluginList.push(monthSelectPlugin({shorthand:true,dateFormat:"F Y",altFormat:"F Y"}))}else if(selectionType==="week"){pluginList.push(weekSelect())}else if(selectionType==="quickpick"){pluginList.push(quickPickPlugin(thisRangesEndToday2,customQuickPickDates2))}if(enableTime)pluginList.push(timeSelectPlugin({caption:timeCaption,showTimezone:showTimezone}));return pluginList};const getDateFormat=()=>enableTime?`${format} ${timeFormat}`:format;const initialPicker=document.querySelector(`#${pickerId}`)._flatpickr;const scrollEvent=()=>{initialPicker._positionCalendar()};function attachToScroll(scrollParent){var _a;(_a=document.querySelectorAll(scrollParent)[0])===null||_a===void 0?void 0:_a.addEventListener("scroll",scrollEvent,{passive:true})}function detachFromScroll(scrollParent=document.body){var _a;(_a=document.querySelectorAll(scrollParent)[0])===null||_a===void 0?void 0:_a.removeEventListener("scroll",scrollEvent)}const yearChangeHook=fp=>{var _a;const yearInput=document.querySelector(`#year-${fp.input.id}`);yearInput.value=(_a=fp.currentYear)===null||_a===void 0?void 0:_a.toString()};flatpickr(`#${pickerId}`,{allowInput:allowInput,closeOnSelect:closeOnSelect,disableMobile:true,dateFormat:getDateFormat(),defaultDate:defaultDateGetter(),disable:disabledParser(),enableTime:enableTime,locale:{rangeSeparator:" to "},maxDate:maxDate,minDate:minDate,mode:mode,nextArrow:'<i class="far fa-angle-right"></i>',onOpen:[()=>{calendarResizer();window.addEventListener("resize",calendarResizer);if(!staticPosition&&scrollContainer)attachToScroll(scrollContainer)}],onClose:[(selectedDates,dateStr)=>{window.removeEventListener("resize",calendarResizer);if(!staticPosition&&scrollContainer)detachFromScroll(scrollContainer);onClose(selectedDates,dateStr)}],onChange:[(selectedDates,dateStr,fp)=>{yearChangeHook(fp);onChange(dateStr,selectedDates)}],onYearChange:[(_selectedDates,_dateStr,fp)=>{yearChangeHook(fp)}],plugins:setPlugins(thisRangesEndToday,customQuickPickDates),position:position,positionElement:getPositionElement(positionElement),prevArrow:'<i class="far fa-angle-left"></i>',static:staticPosition});const picker=document.querySelector(`#${pickerId}`)._flatpickr;picker.innerContainer.parentElement.id=`cal-${pickerId}`;picker.yearElements[0].parentElement.innerHTML=`<select class="numInput cur-year" type="number" tabIndex="-1" aria-label="Year" id="year-${pickerId}"></select>`;let years="";for(let year=yearRange[1];year>=yearRange[0];year--){years+=`<option value="${year}">${year}</option>`}const dropdown=document.querySelector(`#year-${pickerId}`);dropdown.innerHTML=years;dropdown.value=picker.currentYear;dropdown.addEventListener("input",(e=>{picker.changeYear(Number(e.target.value))}));if(picker.input.form){picker.input.form.addEventListener("reset",(()=>{setTimeout((()=>{dropdown.value=picker.currentYear;picker.monthsDropdownContainer.value=picker.currentMonth;if(defaultDate){picker.setDate(defaultDate);yearChangeHook(picker)}}),0)}))}dropdown.insertAdjacentHTML("afterend",'<i class="far fa-angle-down year-dropdown-icon" id="test-id"></i>');if(picker.monthElements[0].parentElement){return picker.monthElements[0].insertAdjacentHTML("afterend",'<i class="far fa-angle-down month-dropdown-icon"></i>')}if(allowInput){picker.input.removeAttribute("readonly")}if(required){picker.input.removeAttribute("readonly");picker.input.addEventListener("keydown",(e=>e.preventDefault()));picker.input.style.caretColor="transparent";picker.input.style.cursor="pointer"}document.querySelector(`#${pickerId}`).parentElement.addEventListener("click",(e=>e.stopPropagation()))};const useDropdown=(initial=true)=>{const[isDropDownClosed,setIsDropDownClosed]=useState(initial);const toggleDropdown=()=>setIsDropDownClosed((prev=>!prev));return[isDropDownClosed,setIsDropDownClosed,toggleDropdown]};var top="top";var bottom="bottom";var right="right";var left="left";var auto="auto";var basePlacements=[top,bottom,right,left];var start="start";var end="end";var clippingParents="clippingParents";var viewport="viewport";var popper="popper";var reference="reference";var variationPlacements=basePlacements.reduce((function(acc,placement){return acc.concat([placement+"-"+start,placement+"-"+end])}),[]);var placements=[].concat(basePlacements,[auto]).reduce((function(acc,placement){return acc.concat([placement,placement+"-"+start,placement+"-"+end])}),[]);var beforeRead="beforeRead";var read="read";var afterRead="afterRead";var beforeMain="beforeMain";var main="main";var afterMain="afterMain";var beforeWrite="beforeWrite";var write="write";var afterWrite="afterWrite";var modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(element){return element?(element.nodeName||"").toLowerCase():null}function getWindow(node){if(node==null){return window}if(node.toString()!=="[object Window]"){var ownerDocument=node.ownerDocument;return ownerDocument?ownerDocument.defaultView||window:window}return node}function isElement(node){var OwnElement=getWindow(node).Element;return node instanceof OwnElement||node instanceof Element}function isHTMLElement(node){var OwnElement=getWindow(node).HTMLElement;return node instanceof OwnElement||node instanceof HTMLElement}function isShadowRoot(node){if(typeof ShadowRoot==="undefined"){return false}var OwnElement=getWindow(node).ShadowRoot;return node instanceof OwnElement||node instanceof ShadowRoot}function applyStyles(_ref){var state=_ref.state;Object.keys(state.elements).forEach((function(name){var style=state.styles[name]||{};var attributes=state.attributes[name]||{};var element=state.elements[name];if(!isHTMLElement(element)||!getNodeName(element)){return}Object.assign(element.style,style);Object.keys(attributes).forEach((function(name2){var value=attributes[name2];if(value===false){element.removeAttribute(name2)}else{element.setAttribute(name2,value===true?"":value)}}))}))}function effect$2(_ref2){var state=_ref2.state;var initialStyles={popper:{position:state.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(state.elements.popper.style,initialStyles.popper);state.styles=initialStyles;if(state.elements.arrow){Object.assign(state.elements.arrow.style,initialStyles.arrow)}return function(){Object.keys(state.elements).forEach((function(name){var element=state.elements[name];var attributes=state.attributes[name]||{};var styleProperties=Object.keys(state.styles.hasOwnProperty(name)?state.styles[name]:initialStyles[name]);var style=styleProperties.reduce((function(style2,property2){style2[property2]="";return style2}),{});if(!isHTMLElement(element)||!getNodeName(element)){return}Object.assign(element.style,style);Object.keys(attributes).forEach((function(attribute){element.removeAttribute(attribute)}))}))}}const applyStyles$1={name:"applyStyles",enabled:true,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(placement){return placement.split("-")[0]}var max=Math.max;var min=Math.min;var round=Math.round;function getUAString(){var uaData=navigator.userAgentData;if(uaData!=null&&uaData.brands){return uaData.brands.map((function(item){return item.brand+"/"+item.version})).join(" ")}return navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(element,includeScale,isFixedStrategy){if(includeScale===void 0){includeScale=false}if(isFixedStrategy===void 0){isFixedStrategy=false}var clientRect=element.getBoundingClientRect();var scaleX=1;var scaleY=1;if(includeScale&&isHTMLElement(element)){scaleX=element.offsetWidth>0?round(clientRect.width)/element.offsetWidth||1:1;scaleY=element.offsetHeight>0?round(clientRect.height)/element.offsetHeight||1:1}var _ref=isElement(element)?getWindow(element):window,visualViewport=_ref.visualViewport;var addVisualOffsets=!isLayoutViewport()&&isFixedStrategy;var x=(clientRect.left+(addVisualOffsets&&visualViewport?visualViewport.offsetLeft:0))/scaleX;var y=(clientRect.top+(addVisualOffsets&&visualViewport?visualViewport.offsetTop:0))/scaleY;var width=clientRect.width/scaleX;var height=clientRect.height/scaleY;return{width:width,height:height,top:y,right:x+width,bottom:y+height,left:x,x:x,y:y}}function getLayoutRect(element){var clientRect=getBoundingClientRect(element);var width=element.offsetWidth;var height=element.offsetHeight;if(Math.abs(clientRect.width-width)<=1){width=clientRect.width}if(Math.abs(clientRect.height-height)<=1){height=clientRect.height}return{x:element.offsetLeft,y:element.offsetTop,width:width,height:height}}function contains(parent2,child){var rootNode=child.getRootNode&&child.getRootNode();if(parent2.contains(child)){return true}else if(rootNode&&isShadowRoot(rootNode)){var next=child;do{if(next&&parent2.isSameNode(next)){return true}next=next.parentNode||next.host}while(next)}return false}function getComputedStyle(element){return getWindow(element).getComputedStyle(element)}function isTableElement(element){return["table","td","th"].indexOf(getNodeName(element))>=0}function getDocumentElement(element){return((isElement(element)?element.ownerDocument:element.document)||window.document).documentElement}function getParentNode(element){if(getNodeName(element)==="html"){return element}return element.assignedSlot||element.parentNode||(isShadowRoot(element)?element.host:null)||getDocumentElement(element)}function getTrueOffsetParent(element){if(!isHTMLElement(element)||getComputedStyle(element).position==="fixed"){return null}return element.offsetParent}function getContainingBlock(element){var isFirefox=/firefox/i.test(getUAString());var isIE=/Trident/i.test(getUAString());if(isIE&&isHTMLElement(element)){var elementCss=getComputedStyle(element);if(elementCss.position==="fixed"){return null}}var currentNode=getParentNode(element);if(isShadowRoot(currentNode)){currentNode=currentNode.host}while(isHTMLElement(currentNode)&&["html","body"].indexOf(getNodeName(currentNode))<0){var css=getComputedStyle(currentNode);if(css.transform!=="none"||css.perspective!=="none"||css.contain==="paint"||["transform","perspective"].indexOf(css.willChange)!==-1||isFirefox&&css.willChange==="filter"||isFirefox&&css.filter&&css.filter!=="none"){return currentNode}else{currentNode=currentNode.parentNode}}return null}function getOffsetParent(element){var window2=getWindow(element);var offsetParent=getTrueOffsetParent(element);while(offsetParent&&isTableElement(offsetParent)&&getComputedStyle(offsetParent).position==="static"){offsetParent=getTrueOffsetParent(offsetParent)}if(offsetParent&&(getNodeName(offsetParent)==="html"||getNodeName(offsetParent)==="body"&&getComputedStyle(offsetParent).position==="static")){return window2}return offsetParent||getContainingBlock(element)||window2}function getMainAxisFromPlacement(placement){return["top","bottom"].indexOf(placement)>=0?"x":"y"}function within(min$1,value,max$1){return max(min$1,min(value,max$1))}function withinMaxClamp(min2,value,max2){var v=within(min2,value,max2);return v>max2?max2:v}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(paddingObject){return Object.assign({},getFreshSideObject(),paddingObject)}function expandToHashMap(value,keys2){return keys2.reduce((function(hashMap,key){hashMap[key]=value;return hashMap}),{})}var toPaddingObject=function toPaddingObject2(padding,state){padding=typeof padding==="function"?padding(Object.assign({},state.rects,{placement:state.placement})):padding;return mergePaddingObject(typeof padding!=="number"?padding:expandToHashMap(padding,basePlacements))};function arrow(_ref){var _state$modifiersData$;var state=_ref.state,name=_ref.name,options=_ref.options;var arrowElement=state.elements.arrow;var popperOffsets2=state.modifiersData.popperOffsets;var basePlacement=getBasePlacement(state.placement);var axis=getMainAxisFromPlacement(basePlacement);var isVertical=[left,right].indexOf(basePlacement)>=0;var len=isVertical?"height":"width";if(!arrowElement||!popperOffsets2){return}var paddingObject=toPaddingObject(options.padding,state);var arrowRect=getLayoutRect(arrowElement);var minProp=axis==="y"?top:left;var maxProp=axis==="y"?bottom:right;var endDiff=state.rects.reference[len]+state.rects.reference[axis]-popperOffsets2[axis]-state.rects.popper[len];var startDiff=popperOffsets2[axis]-state.rects.reference[axis];var arrowOffsetParent=getOffsetParent(arrowElement);var clientSize=arrowOffsetParent?axis==="y"?arrowOffsetParent.clientHeight||0:arrowOffsetParent.clientWidth||0:0;var centerToReference=endDiff/2-startDiff/2;var min2=paddingObject[minProp];var max2=clientSize-arrowRect[len]-paddingObject[maxProp];var center=clientSize/2-arrowRect[len]/2+centerToReference;var offset2=within(min2,center,max2);var axisProp=axis;state.modifiersData[name]=(_state$modifiersData$={},_state$modifiersData$[axisProp]=offset2,_state$modifiersData$.centerOffset=offset2-center,_state$modifiersData$)}function effect$1(_ref2){var state=_ref2.state,options=_ref2.options;var _options$element=options.element,arrowElement=_options$element===void 0?"[data-popper-arrow]":_options$element;if(arrowElement==null){return}if(typeof arrowElement==="string"){arrowElement=state.elements.popper.querySelector(arrowElement);if(!arrowElement){return}}if(!contains(state.elements.popper,arrowElement)){return}state.elements.arrow=arrowElement}const arrow$1={name:"arrow",enabled:true,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(placement){return placement.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(_ref){var x=_ref.x,y=_ref.y;var win=window;var dpr=win.devicePixelRatio||1;return{x:round(x*dpr)/dpr||0,y:round(y*dpr)/dpr||0}}function mapToStyles(_ref2){var _Object$assign2;var popper2=_ref2.popper,popperRect=_ref2.popperRect,placement=_ref2.placement,variation=_ref2.variation,offsets=_ref2.offsets,position=_ref2.position,gpuAcceleration=_ref2.gpuAcceleration,adaptive=_ref2.adaptive,roundOffsets=_ref2.roundOffsets,isFixed=_ref2.isFixed;var _offsets$x=offsets.x,x=_offsets$x===void 0?0:_offsets$x,_offsets$y=offsets.y,y=_offsets$y===void 0?0:_offsets$y;var _ref3=typeof roundOffsets==="function"?roundOffsets({x:x,y:y}):{x:x,y:y};x=_ref3.x;y=_ref3.y;var hasX=offsets.hasOwnProperty("x");var hasY=offsets.hasOwnProperty("y");var sideX=left;var sideY=top;var win=window;if(adaptive){var offsetParent=getOffsetParent(popper2);var heightProp="clientHeight";var widthProp="clientWidth";if(offsetParent===getWindow(popper2)){offsetParent=getDocumentElement(popper2);if(getComputedStyle(offsetParent).position!=="static"&&position==="absolute"){heightProp="scrollHeight";widthProp="scrollWidth"}}offsetParent=offsetParent;if(placement===top||(placement===left||placement===right)&&variation===end){sideY=bottom;var offsetY=isFixed&&offsetParent===win&&win.visualViewport?win.visualViewport.height:offsetParent[heightProp];y-=offsetY-popperRect.height;y*=gpuAcceleration?1:-1}if(placement===left||(placement===top||placement===bottom)&&variation===end){sideX=right;var offsetX=isFixed&&offsetParent===win&&win.visualViewport?win.visualViewport.width:offsetParent[widthProp];x-=offsetX-popperRect.width;x*=gpuAcceleration?1:-1}}var commonStyles=Object.assign({position:position},adaptive&&unsetSides);var _ref4=roundOffsets===true?roundOffsetsByDPR({x:x,y:y}):{x:x,y:y};x=_ref4.x;y=_ref4.y;if(gpuAcceleration){var _Object$assign;return Object.assign({},commonStyles,(_Object$assign={},_Object$assign[sideY]=hasY?"0":"",_Object$assign[sideX]=hasX?"0":"",_Object$assign.transform=(win.devicePixelRatio||1)<=1?"translate("+x+"px, "+y+"px)":"translate3d("+x+"px, "+y+"px, 0)",_Object$assign))}return Object.assign({},commonStyles,(_Object$assign2={},_Object$assign2[sideY]=hasY?y+"px":"",_Object$assign2[sideX]=hasX?x+"px":"",_Object$assign2.transform="",_Object$assign2))}function computeStyles(_ref5){var state=_ref5.state,options=_ref5.options;var _options$gpuAccelerat=options.gpuAcceleration,gpuAcceleration=_options$gpuAccelerat===void 0?true:_options$gpuAccelerat,_options$adaptive=options.adaptive,adaptive=_options$adaptive===void 0?true:_options$adaptive,_options$roundOffsets=options.roundOffsets,roundOffsets=_options$roundOffsets===void 0?true:_options$roundOffsets;var commonStyles={placement:getBasePlacement(state.placement),variation:getVariation(state.placement),popper:state.elements.popper,popperRect:state.rects.popper,gpuAcceleration:gpuAcceleration,isFixed:state.options.strategy==="fixed"};if(state.modifiersData.popperOffsets!=null){state.styles.popper=Object.assign({},state.styles.popper,mapToStyles(Object.assign({},commonStyles,{offsets:state.modifiersData.popperOffsets,position:state.options.strategy,adaptive:adaptive,roundOffsets:roundOffsets})))}if(state.modifiersData.arrow!=null){state.styles.arrow=Object.assign({},state.styles.arrow,mapToStyles(Object.assign({},commonStyles,{offsets:state.modifiersData.arrow,position:"absolute",adaptive:false,roundOffsets:roundOffsets})))}state.attributes.popper=Object.assign({},state.attributes.popper,{"data-popper-placement":state.placement})}const computeStyles$1={name:"computeStyles",enabled:true,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:true};function effect(_ref){var state=_ref.state,instance=_ref.instance,options=_ref.options;var _options$scroll=options.scroll,scroll=_options$scroll===void 0?true:_options$scroll,_options$resize=options.resize,resize=_options$resize===void 0?true:_options$resize;var window2=getWindow(state.elements.popper);var scrollParents=[].concat(state.scrollParents.reference,state.scrollParents.popper);if(scroll){scrollParents.forEach((function(scrollParent){scrollParent.addEventListener("scroll",instance.update,passive)}))}if(resize){window2.addEventListener("resize",instance.update,passive)}return function(){if(scroll){scrollParents.forEach((function(scrollParent){scrollParent.removeEventListener("scroll",instance.update,passive)}))}if(resize){window2.removeEventListener("resize",instance.update,passive)}}}const eventListeners={name:"eventListeners",enabled:true,phase:"write",fn:function fn(){},effect:effect,data:{}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(placement){return placement.replace(/left|right|bottom|top/g,(function(matched){return hash$1[matched]}))}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(placement){return placement.replace(/start|end/g,(function(matched){return hash[matched]}))}function getWindowScroll(node){var win=getWindow(node);var scrollLeft=win.pageXOffset;var scrollTop=win.pageYOffset;return{scrollLeft:scrollLeft,scrollTop:scrollTop}}function getWindowScrollBarX(element){return getBoundingClientRect(getDocumentElement(element)).left+getWindowScroll(element).scrollLeft}function getViewportRect(element,strategy){var win=getWindow(element);var html=getDocumentElement(element);var visualViewport=win.visualViewport;var width=html.clientWidth;var height=html.clientHeight;var x=0;var y=0;if(visualViewport){width=visualViewport.width;height=visualViewport.height;var layoutViewport=isLayoutViewport();if(layoutViewport||!layoutViewport&&strategy==="fixed"){x=visualViewport.offsetLeft;y=visualViewport.offsetTop}}return{width:width,height:height,x:x+getWindowScrollBarX(element),y:y}}function getDocumentRect(element){var _element$ownerDocumen;var html=getDocumentElement(element);var winScroll=getWindowScroll(element);var body=(_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body;var width=max(html.scrollWidth,html.clientWidth,body?body.scrollWidth:0,body?body.clientWidth:0);var height=max(html.scrollHeight,html.clientHeight,body?body.scrollHeight:0,body?body.clientHeight:0);var x=-winScroll.scrollLeft+getWindowScrollBarX(element);var y=-winScroll.scrollTop;if(getComputedStyle(body||html).direction==="rtl"){x+=max(html.clientWidth,body?body.clientWidth:0)-width}return{width:width,height:height,x:x,y:y}}function isScrollParent(element){var _getComputedStyle=getComputedStyle(element),overflow=_getComputedStyle.overflow,overflowX=_getComputedStyle.overflowX,overflowY=_getComputedStyle.overflowY;return/auto|scroll|overlay|hidden/.test(overflow+overflowY+overflowX)}function getScrollParent(node){if(["html","body","#document"].indexOf(getNodeName(node))>=0){return node.ownerDocument.body}if(isHTMLElement(node)&&isScrollParent(node)){return node}return getScrollParent(getParentNode(node))}function listScrollParents(element,list){var _element$ownerDocumen;if(list===void 0){list=[]}var scrollParent=getScrollParent(element);var isBody=scrollParent===((_element$ownerDocumen=element.ownerDocument)==null?void 0:_element$ownerDocumen.body);var win=getWindow(scrollParent);var target=isBody?[win].concat(win.visualViewport||[],isScrollParent(scrollParent)?scrollParent:[]):scrollParent;var updatedList=list.concat(target);return isBody?updatedList:updatedList.concat(listScrollParents(getParentNode(target)))}function rectToClientRect(rect){return Object.assign({},rect,{left:rect.x,top:rect.y,right:rect.x+rect.width,bottom:rect.y+rect.height})}function getInnerBoundingClientRect(element,strategy){var rect=getBoundingClientRect(element,false,strategy==="fixed");rect.top=rect.top+element.clientTop;rect.left=rect.left+element.clientLeft;rect.bottom=rect.top+element.clientHeight;rect.right=rect.left+element.clientWidth;rect.width=element.clientWidth;rect.height=element.clientHeight;rect.x=rect.left;rect.y=rect.top;return rect}function getClientRectFromMixedType(element,clippingParent,strategy){return clippingParent===viewport?rectToClientRect(getViewportRect(element,strategy)):isElement(clippingParent)?getInnerBoundingClientRect(clippingParent,strategy):rectToClientRect(getDocumentRect(getDocumentElement(element)))}function getClippingParents(element){var clippingParents2=listScrollParents(getParentNode(element));var canEscapeClipping=["absolute","fixed"].indexOf(getComputedStyle(element).position)>=0;var clipperElement=canEscapeClipping&&isHTMLElement(element)?getOffsetParent(element):element;if(!isElement(clipperElement)){return[]}return clippingParents2.filter((function(clippingParent){return isElement(clippingParent)&&contains(clippingParent,clipperElement)&&getNodeName(clippingParent)!=="body"}))}function getClippingRect(element,boundary,rootBoundary,strategy){var mainClippingParents=boundary==="clippingParents"?getClippingParents(element):[].concat(boundary);var clippingParents2=[].concat(mainClippingParents,[rootBoundary]);var firstClippingParent=clippingParents2[0];var clippingRect=clippingParents2.reduce((function(accRect,clippingParent){var rect=getClientRectFromMixedType(element,clippingParent,strategy);accRect.top=max(rect.top,accRect.top);accRect.right=min(rect.right,accRect.right);accRect.bottom=min(rect.bottom,accRect.bottom);accRect.left=max(rect.left,accRect.left);return accRect}),getClientRectFromMixedType(element,firstClippingParent,strategy));clippingRect.width=clippingRect.right-clippingRect.left;clippingRect.height=clippingRect.bottom-clippingRect.top;clippingRect.x=clippingRect.left;clippingRect.y=clippingRect.top;return clippingRect}function computeOffsets(_ref){var reference2=_ref.reference,element=_ref.element,placement=_ref.placement;var basePlacement=placement?getBasePlacement(placement):null;var variation=placement?getVariation(placement):null;var commonX=reference2.x+reference2.width/2-element.width/2;var commonY=reference2.y+reference2.height/2-element.height/2;var offsets;switch(basePlacement){case top:offsets={x:commonX,y:reference2.y-element.height};break;case bottom:offsets={x:commonX,y:reference2.y+reference2.height};break;case right:offsets={x:reference2.x+reference2.width,y:commonY};break;case left:offsets={x:reference2.x-element.width,y:commonY};break;default:offsets={x:reference2.x,y:reference2.y}}var mainAxis=basePlacement?getMainAxisFromPlacement(basePlacement):null;if(mainAxis!=null){var len=mainAxis==="y"?"height":"width";switch(variation){case start:offsets[mainAxis]=offsets[mainAxis]-(reference2[len]/2-element[len]/2);break;case end:offsets[mainAxis]=offsets[mainAxis]+(reference2[len]/2-element[len]/2);break}}return offsets}function detectOverflow(state,options){if(options===void 0){options={}}var _options=options,_options$placement=_options.placement,placement=_options$placement===void 0?state.placement:_options$placement,_options$strategy=_options.strategy,strategy=_options$strategy===void 0?state.strategy:_options$strategy,_options$boundary=_options.boundary,boundary=_options$boundary===void 0?clippingParents:_options$boundary,_options$rootBoundary=_options.rootBoundary,rootBoundary=_options$rootBoundary===void 0?viewport:_options$rootBoundary,_options$elementConte=_options.elementContext,elementContext=_options$elementConte===void 0?popper:_options$elementConte,_options$altBoundary=_options.altBoundary,altBoundary=_options$altBoundary===void 0?false:_options$altBoundary,_options$padding=_options.padding,padding=_options$padding===void 0?0:_options$padding;var paddingObject=mergePaddingObject(typeof padding!=="number"?padding:expandToHashMap(padding,basePlacements));var altContext=elementContext===popper?reference:popper;var popperRect=state.rects.popper;var element=state.elements[altBoundary?altContext:elementContext];var clippingClientRect=getClippingRect(isElement(element)?element:element.contextElement||getDocumentElement(state.elements.popper),boundary,rootBoundary,strategy);var referenceClientRect=getBoundingClientRect(state.elements.reference);var popperOffsets2=computeOffsets({reference:referenceClientRect,element:popperRect,strategy:"absolute",placement:placement});var popperClientRect=rectToClientRect(Object.assign({},popperRect,popperOffsets2));var elementClientRect=elementContext===popper?popperClientRect:referenceClientRect;var overflowOffsets={top:clippingClientRect.top-elementClientRect.top+paddingObject.top,bottom:elementClientRect.bottom-clippingClientRect.bottom+paddingObject.bottom,left:clippingClientRect.left-elementClientRect.left+paddingObject.left,right:elementClientRect.right-clippingClientRect.right+paddingObject.right};var offsetData=state.modifiersData.offset;if(elementContext===popper&&offsetData){var offset2=offsetData[placement];Object.keys(overflowOffsets).forEach((function(key){var multiply=[right,bottom].indexOf(key)>=0?1:-1;var axis=[top,bottom].indexOf(key)>=0?"y":"x";overflowOffsets[key]+=offset2[axis]*multiply}))}return overflowOffsets}function computeAutoPlacement(state,options){if(options===void 0){options={}}var _options=options,placement=_options.placement,boundary=_options.boundary,rootBoundary=_options.rootBoundary,padding=_options.padding,flipVariations=_options.flipVariations,_options$allowedAutoP=_options.allowedAutoPlacements,allowedAutoPlacements=_options$allowedAutoP===void 0?placements:_options$allowedAutoP;var variation=getVariation(placement);var placements$1=variation?flipVariations?variationPlacements:variationPlacements.filter((function(placement2){return getVariation(placement2)===variation})):basePlacements;var allowedPlacements=placements$1.filter((function(placement2){return allowedAutoPlacements.indexOf(placement2)>=0}));if(allowedPlacements.length===0){allowedPlacements=placements$1}var overflows=allowedPlacements.reduce((function(acc,placement2){acc[placement2]=detectOverflow(state,{placement:placement2,boundary:boundary,rootBoundary:rootBoundary,padding:padding})[getBasePlacement(placement2)];return acc}),{});return Object.keys(overflows).sort((function(a,b){return overflows[a]-overflows[b]}))}function getExpandedFallbackPlacements(placement){if(getBasePlacement(placement)===auto){return[]}var oppositePlacement=getOppositePlacement(placement);return[getOppositeVariationPlacement(placement),oppositePlacement,getOppositeVariationPlacement(oppositePlacement)]}function flip(_ref){var state=_ref.state,options=_ref.options,name=_ref.name;if(state.modifiersData[name]._skip){return}var _options$mainAxis=options.mainAxis,checkMainAxis=_options$mainAxis===void 0?true:_options$mainAxis,_options$altAxis=options.altAxis,checkAltAxis=_options$altAxis===void 0?true:_options$altAxis,specifiedFallbackPlacements=options.fallbackPlacements,padding=options.padding,boundary=options.boundary,rootBoundary=options.rootBoundary,altBoundary=options.altBoundary,_options$flipVariatio=options.flipVariations,flipVariations=_options$flipVariatio===void 0?true:_options$flipVariatio,allowedAutoPlacements=options.allowedAutoPlacements;var preferredPlacement=state.options.placement;var basePlacement=getBasePlacement(preferredPlacement);var isBasePlacement=basePlacement===preferredPlacement;var fallbackPlacements=specifiedFallbackPlacements||(isBasePlacement||!flipVariations?[getOppositePlacement(preferredPlacement)]:getExpandedFallbackPlacements(preferredPlacement));var placements2=[preferredPlacement].concat(fallbackPlacements).reduce((function(acc,placement2){return acc.concat(getBasePlacement(placement2)===auto?computeAutoPlacement(state,{placement:placement2,boundary:boundary,rootBoundary:rootBoundary,padding:padding,flipVariations:flipVariations,allowedAutoPlacements:allowedAutoPlacements}):placement2)}),[]);var referenceRect=state.rects.reference;var popperRect=state.rects.popper;var checksMap=new Map;var makeFallbackChecks=true;var firstFittingPlacement=placements2[0];for(var i=0;i<placements2.length;i++){var placement=placements2[i];var _basePlacement=getBasePlacement(placement);var isStartVariation=getVariation(placement)===start;var isVertical=[top,bottom].indexOf(_basePlacement)>=0;var len=isVertical?"width":"height";var overflow=detectOverflow(state,{placement:placement,boundary:boundary,rootBoundary:rootBoundary,altBoundary:altBoundary,padding:padding});var mainVariationSide=isVertical?isStartVariation?right:left:isStartVariation?bottom:top;if(referenceRect[len]>popperRect[len]){mainVariationSide=getOppositePlacement(mainVariationSide)}var altVariationSide=getOppositePlacement(mainVariationSide);var checks=[];if(checkMainAxis){checks.push(overflow[_basePlacement]<=0)}if(checkAltAxis){checks.push(overflow[mainVariationSide]<=0,overflow[altVariationSide]<=0)}if(checks.every((function(check){return check}))){firstFittingPlacement=placement;makeFallbackChecks=false;break}checksMap.set(placement,checks)}if(makeFallbackChecks){var numberOfChecks=flipVariations?3:1;var _loop=function _loop2(_i2){var fittingPlacement=placements2.find((function(placement2){var checks2=checksMap.get(placement2);if(checks2){return checks2.slice(0,_i2).every((function(check){return check}))}}));if(fittingPlacement){firstFittingPlacement=fittingPlacement;return"break"}};for(var _i=numberOfChecks;_i>0;_i--){var _ret=_loop(_i);if(_ret==="break")break}}if(state.placement!==firstFittingPlacement){state.modifiersData[name]._skip=true;state.placement=firstFittingPlacement;state.reset=true}}const flip$1={name:"flip",enabled:true,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:false}};function getSideOffsets(overflow,rect,preventedOffsets){if(preventedOffsets===void 0){preventedOffsets={x:0,y:0}}return{top:overflow.top-rect.height-preventedOffsets.y,right:overflow.right-rect.width+preventedOffsets.x,bottom:overflow.bottom-rect.height+preventedOffsets.y,left:overflow.left-rect.width-preventedOffsets.x}}function isAnySideFullyClipped(overflow){return[top,right,bottom,left].some((function(side){return overflow[side]>=0}))}function hide(_ref){var state=_ref.state,name=_ref.name;var referenceRect=state.rects.reference;var popperRect=state.rects.popper;var preventedOffsets=state.modifiersData.preventOverflow;var referenceOverflow=detectOverflow(state,{elementContext:"reference"});var popperAltOverflow=detectOverflow(state,{altBoundary:true});var referenceClippingOffsets=getSideOffsets(referenceOverflow,referenceRect);var popperEscapeOffsets=getSideOffsets(popperAltOverflow,popperRect,preventedOffsets);var isReferenceHidden=isAnySideFullyClipped(referenceClippingOffsets);var hasPopperEscaped=isAnySideFullyClipped(popperEscapeOffsets);state.modifiersData[name]={referenceClippingOffsets:referenceClippingOffsets,popperEscapeOffsets:popperEscapeOffsets,isReferenceHidden:isReferenceHidden,hasPopperEscaped:hasPopperEscaped};state.attributes.popper=Object.assign({},state.attributes.popper,{"data-popper-reference-hidden":isReferenceHidden,"data-popper-escaped":hasPopperEscaped})}const hide$1={name:"hide",enabled:true,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(placement,rects,offset2){var basePlacement=getBasePlacement(placement);var invertDistance=[left,top].indexOf(basePlacement)>=0?-1:1;var _ref=typeof offset2==="function"?offset2(Object.assign({},rects,{placement:placement})):offset2,skidding=_ref[0],distance=_ref[1];skidding=skidding||0;distance=(distance||0)*invertDistance;return[left,right].indexOf(basePlacement)>=0?{x:distance,y:skidding}:{x:skidding,y:distance}}function offset(_ref2){var state=_ref2.state,options=_ref2.options,name=_ref2.name;var _options$offset=options.offset,offset2=_options$offset===void 0?[0,0]:_options$offset;var data=placements.reduce((function(acc,placement){acc[placement]=distanceAndSkiddingToXY(placement,state.rects,offset2);return acc}),{});var _data$state$placement=data[state.placement],x=_data$state$placement.x,y=_data$state$placement.y;if(state.modifiersData.popperOffsets!=null){state.modifiersData.popperOffsets.x+=x;state.modifiersData.popperOffsets.y+=y}state.modifiersData[name]=data}const offset$1={name:"offset",enabled:true,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(_ref){var state=_ref.state,name=_ref.name;state.modifiersData[name]=computeOffsets({reference:state.rects.reference,element:state.rects.popper,strategy:"absolute",placement:state.placement})}const popperOffsets$1={name:"popperOffsets",enabled:true,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(axis){return axis==="x"?"y":"x"}function preventOverflow(_ref){var state=_ref.state,options=_ref.options,name=_ref.name;var _options$mainAxis=options.mainAxis,checkMainAxis=_options$mainAxis===void 0?true:_options$mainAxis,_options$altAxis=options.altAxis,checkAltAxis=_options$altAxis===void 0?false:_options$altAxis,boundary=options.boundary,rootBoundary=options.rootBoundary,altBoundary=options.altBoundary,padding=options.padding,_options$tether=options.tether,tether=_options$tether===void 0?true:_options$tether,_options$tetherOffset=options.tetherOffset,tetherOffset=_options$tetherOffset===void 0?0:_options$tetherOffset;var overflow=detectOverflow(state,{boundary:boundary,rootBoundary:rootBoundary,padding:padding,altBoundary:altBoundary});var basePlacement=getBasePlacement(state.placement);var variation=getVariation(state.placement);var isBasePlacement=!variation;var mainAxis=getMainAxisFromPlacement(basePlacement);var altAxis=getAltAxis(mainAxis);var popperOffsets2=state.modifiersData.popperOffsets;var referenceRect=state.rects.reference;var popperRect=state.rects.popper;var tetherOffsetValue=typeof tetherOffset==="function"?tetherOffset(Object.assign({},state.rects,{placement:state.placement})):tetherOffset;var normalizedTetherOffsetValue=typeof tetherOffsetValue==="number"?{mainAxis:tetherOffsetValue,altAxis:tetherOffsetValue}:Object.assign({mainAxis:0,altAxis:0},tetherOffsetValue);var offsetModifierState=state.modifiersData.offset?state.modifiersData.offset[state.placement]:null;var data={x:0,y:0};if(!popperOffsets2){return}if(checkMainAxis){var _offsetModifierState$;var mainSide=mainAxis==="y"?top:left;var altSide=mainAxis==="y"?bottom:right;var len=mainAxis==="y"?"height":"width";var offset2=popperOffsets2[mainAxis];var min$1=offset2+overflow[mainSide];var max$1=offset2-overflow[altSide];var additive=tether?-popperRect[len]/2:0;var minLen=variation===start?referenceRect[len]:popperRect[len];var maxLen=variation===start?-popperRect[len]:-referenceRect[len];var arrowElement=state.elements.arrow;var arrowRect=tether&&arrowElement?getLayoutRect(arrowElement):{width:0,height:0};var arrowPaddingObject=state.modifiersData["arrow#persistent"]?state.modifiersData["arrow#persistent"].padding:getFreshSideObject();var arrowPaddingMin=arrowPaddingObject[mainSide];var arrowPaddingMax=arrowPaddingObject[altSide];var arrowLen=within(0,referenceRect[len],arrowRect[len]);var minOffset=isBasePlacement?referenceRect[len]/2-additive-arrowLen-arrowPaddingMin-normalizedTetherOffsetValue.mainAxis:minLen-arrowLen-arrowPaddingMin-normalizedTetherOffsetValue.mainAxis;var maxOffset=isBasePlacement?-referenceRect[len]/2+additive+arrowLen+arrowPaddingMax+normalizedTetherOffsetValue.mainAxis:maxLen+arrowLen+arrowPaddingMax+normalizedTetherOffsetValue.mainAxis;var arrowOffsetParent=state.elements.arrow&&getOffsetParent(state.elements.arrow);var clientOffset=arrowOffsetParent?mainAxis==="y"?arrowOffsetParent.clientTop||0:arrowOffsetParent.clientLeft||0:0;var offsetModifierValue=(_offsetModifierState$=offsetModifierState==null?void 0:offsetModifierState[mainAxis])!=null?_offsetModifierState$:0;var tetherMin=offset2+minOffset-offsetModifierValue-clientOffset;var tetherMax=offset2+maxOffset-offsetModifierValue;var preventedOffset=within(tether?min(min$1,tetherMin):min$1,offset2,tether?max(max$1,tetherMax):max$1);popperOffsets2[mainAxis]=preventedOffset;data[mainAxis]=preventedOffset-offset2}if(checkAltAxis){var _offsetModifierState$2;var _mainSide=mainAxis==="x"?top:left;var _altSide=mainAxis==="x"?bottom:right;var _offset=popperOffsets2[altAxis];var _len=altAxis==="y"?"height":"width";var _min=_offset+overflow[_mainSide];var _max=_offset-overflow[_altSide];var isOriginSide=[top,left].indexOf(basePlacement)!==-1;var _offsetModifierValue=(_offsetModifierState$2=offsetModifierState==null?void 0:offsetModifierState[altAxis])!=null?_offsetModifierState$2:0;var _tetherMin=isOriginSide?_min:_offset-referenceRect[_len]-popperRect[_len]-_offsetModifierValue+normalizedTetherOffsetValue.altAxis;var _tetherMax=isOriginSide?_offset+referenceRect[_len]+popperRect[_len]-_offsetModifierValue-normalizedTetherOffsetValue.altAxis:_max;var _preventedOffset=tether&&isOriginSide?withinMaxClamp(_tetherMin,_offset,_tetherMax):within(tether?_tetherMin:_min,_offset,tether?_tetherMax:_max);popperOffsets2[altAxis]=_preventedOffset;data[altAxis]=_preventedOffset-_offset}state.modifiersData[name]=data}const preventOverflow$1={name:"preventOverflow",enabled:true,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(element){return{scrollLeft:element.scrollLeft,scrollTop:element.scrollTop}}function getNodeScroll(node){if(node===getWindow(node)||!isHTMLElement(node)){return getWindowScroll(node)}else{return getHTMLElementScroll(node)}}function isElementScaled(element){var rect=element.getBoundingClientRect();var scaleX=round(rect.width)/element.offsetWidth||1;var scaleY=round(rect.height)/element.offsetHeight||1;return scaleX!==1||scaleY!==1}function getCompositeRect(elementOrVirtualElement,offsetParent,isFixed){if(isFixed===void 0){isFixed=false}var isOffsetParentAnElement=isHTMLElement(offsetParent);var offsetParentIsScaled=isHTMLElement(offsetParent)&&isElementScaled(offsetParent);var documentElement=getDocumentElement(offsetParent);var rect=getBoundingClientRect(elementOrVirtualElement,offsetParentIsScaled,isFixed);var scroll={scrollLeft:0,scrollTop:0};var offsets={x:0,y:0};if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed){if(getNodeName(offsetParent)!=="body"||isScrollParent(documentElement)){scroll=getNodeScroll(offsetParent)}if(isHTMLElement(offsetParent)){offsets=getBoundingClientRect(offsetParent,true);offsets.x+=offsetParent.clientLeft;offsets.y+=offsetParent.clientTop}else if(documentElement){offsets.x=getWindowScrollBarX(documentElement)}}return{x:rect.left+scroll.scrollLeft-offsets.x,y:rect.top+scroll.scrollTop-offsets.y,width:rect.width,height:rect.height}}function order(modifiers){var map2=new Map;var visited=new Set;var result=[];modifiers.forEach((function(modifier){map2.set(modifier.name,modifier)}));function sort(modifier){visited.add(modifier.name);var requires=[].concat(modifier.requires||[],modifier.requiresIfExists||[]);requires.forEach((function(dep){if(!visited.has(dep)){var depModifier=map2.get(dep);if(depModifier){sort(depModifier)}}}));result.push(modifier)}modifiers.forEach((function(modifier){if(!visited.has(modifier.name)){sort(modifier)}}));return result}function orderModifiers(modifiers){var orderedModifiers=order(modifiers);return modifierPhases.reduce((function(acc,phase){return acc.concat(orderedModifiers.filter((function(modifier){return modifier.phase===phase})))}),[])}function debounce(fn2){var pending;return function(){if(!pending){pending=new Promise((function(resolve){Promise.resolve().then((function(){pending=void 0;resolve(fn2())}))}))}return pending}}function mergeByName(modifiers){var merged=modifiers.reduce((function(merged2,current){var existing=merged2[current.name];merged2[current.name]=existing?Object.assign({},existing,current,{options:Object.assign({},existing.options,current.options),data:Object.assign({},existing.data,current.data)}):current;return merged2}),{});return Object.keys(merged).map((function(key){return merged[key]}))}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}return!args.some((function(element){return!(element&&typeof element.getBoundingClientRect==="function")}))}function popperGenerator(generatorOptions){if(generatorOptions===void 0){generatorOptions={}}var _generatorOptions=generatorOptions,_generatorOptions$def=_generatorOptions.defaultModifiers,defaultModifiers2=_generatorOptions$def===void 0?[]:_generatorOptions$def,_generatorOptions$def2=_generatorOptions.defaultOptions,defaultOptions=_generatorOptions$def2===void 0?DEFAULT_OPTIONS:_generatorOptions$def2;return function createPopper2(reference2,popper2,options){if(options===void 0){options=defaultOptions}var state={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,defaultOptions),modifiersData:{},elements:{reference:reference2,popper:popper2},attributes:{},styles:{}};var effectCleanupFns=[];var isDestroyed=false;var instance={state:state,setOptions:function setOptions(setOptionsAction){var options2=typeof setOptionsAction==="function"?setOptionsAction(state.options):setOptionsAction;cleanupModifierEffects();state.options=Object.assign({},defaultOptions,state.options,options2);state.scrollParents={reference:isElement(reference2)?listScrollParents(reference2):reference2.contextElement?listScrollParents(reference2.contextElement):[],popper:listScrollParents(popper2)};var orderedModifiers=orderModifiers(mergeByName([].concat(defaultModifiers2,state.options.modifiers)));state.orderedModifiers=orderedModifiers.filter((function(m){return m.enabled}));runModifierEffects();return instance.update()},forceUpdate:function forceUpdate(){if(isDestroyed){return}var _state$elements=state.elements,reference22=_state$elements.reference,popper22=_state$elements.popper;if(!areValidElements(reference22,popper22)){return}state.rects={reference:getCompositeRect(reference22,getOffsetParent(popper22),state.options.strategy==="fixed"),popper:getLayoutRect(popper22)};state.reset=false;state.placement=state.options.placement;state.orderedModifiers.forEach((function(modifier){return state.modifiersData[modifier.name]=Object.assign({},modifier.data)}));for(var index=0;index<state.orderedModifiers.length;index++){if(state.reset===true){state.reset=false;index=-1;continue}var _state$orderedModifie=state.orderedModifiers[index],fn2=_state$orderedModifie.fn,_state$orderedModifie2=_state$orderedModifie.options,_options=_state$orderedModifie2===void 0?{}:_state$orderedModifie2,name=_state$orderedModifie.name;if(typeof fn2==="function"){state=fn2({state:state,options:_options,name:name,instance:instance})||state}}},update:debounce((function(){return new Promise((function(resolve){instance.forceUpdate();resolve(state)}))})),destroy:function destroy(){cleanupModifierEffects();isDestroyed=true}};if(!areValidElements(reference2,popper2)){return instance}instance.setOptions(options).then((function(state2){if(!isDestroyed&&options.onFirstUpdate){options.onFirstUpdate(state2)}}));function runModifierEffects(){state.orderedModifiers.forEach((function(_ref3){var name=_ref3.name,_ref3$options=_ref3.options,options2=_ref3$options===void 0?{}:_ref3$options,effect2=_ref3.effect;if(typeof effect2==="function"){var cleanupFn=effect2({state:state,name:name,instance:instance,options:options2});var noopFn=function noopFn2(){};effectCleanupFns.push(cleanupFn||noopFn)}}))}function cleanupModifierEffects(){effectCleanupFns.forEach((function(fn2){return fn2()}));effectCleanupFns=[]}return instance}}var defaultModifiers$1=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1];var createPopper$1=popperGenerator({defaultModifiers:defaultModifiers$1});var defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$1,flip$1,preventOverflow$1,arrow$1,hide$1];var createPopper=popperGenerator({defaultModifiers:defaultModifiers});class PbTextarea extends PbEnhancedElement{static get selector(){return".resize_auto textarea"}onInput(){this.style.height="auto";this.style.height=this.scrollHeight+"px"}connect(){this.element.setAttribute("style","height:"+this.element.scrollHeight+"px;overflow-y:hidden;");this.element.addEventListener("input",this.onInput,false)}}const mapTheme={marker:colors.primary_action,maptiles:"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",flyToConfig:{zoom:13,bearing:0,curve:1.42,easing:function(t){return t},essential:true},zoomConfig:{duration:1e3},mapConfig:{style:"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",zoom:13,attributionControl:false}};const POPOVER_OFFSET_Y=[0,20];class PbPopover extends PbEnhancedElement{static get selector(){return"[data-pb-popover-kit]"}moveTooltip(){document.querySelector("body").appendChild(this.tooltip)}connect(){this.moveTooltip();this.popper=createPopper(this.triggerElement,this.tooltip,{placement:this.position,strategy:"fixed",modifiers:[{name:"offset",options:{offset:this.offset}}]});this.triggerElement.addEventListener("click",(event=>{event.preventDefault();event.stopPropagation();if(!this.tooltip.classList.contains("show")){this.checkCloseTooltip()}setTimeout((()=>{this.toggleTooltip();this.popper.update()}),0)}))}checkCloseTooltip(){document.querySelector("body").addEventListener("click",(({target:target})=>{const isTooltipElement=target.closest(`#${this.tooltipId}`)!==null;const isTriggerElement=target.closest(`#${this.triggerElementId}`)!==null;switch(this.closeOnClick){case"any":if(isTooltipElement||!isTooltipElement&&!isTriggerElement){this.hideTooltip()}break;case"outside":if(!isTooltipElement&&!isTriggerElement){this.hideTooltip()}break;case"inside":if(isTooltipElement){this.hideTooltip()}break}}),true)}hideTooltip(){this.tooltip.classList.remove("show");this.tooltip.classList.add("hide")}toggleTooltip(){this.tooltip.classList.toggle("show");this.tooltip.classList.toggle("hide")}get triggerElement(){return this._triggerElement=this._triggerElement||document.querySelector(`#${this.triggerElementId}`)}get tooltip(){return this._tooltip=this._tooltip||this.element.querySelector(`#${this.tooltipId}`)}get position(){return this.element.dataset.pbPopoverPosition}get triggerElementId(){return this.element.dataset.pbPopoverTriggerElementId}get tooltipId(){return this.element.dataset.pbPopoverTooltipId}get offset(){return this.element.dataset.pbPopoverOffset==="true"?POPOVER_OFFSET_Y:[0,0]}get closeOnClick(){return this.element.dataset.pbPopoverCloseOnClick}}const TOOLTIP_OFFSET=[0,20];const TOOLTIP_TIMEOUT=250;class PbTooltip extends PbEnhancedElement{static get selector(){return"[data-pb-tooltip-kit]"}connect(){this.triggerElements.forEach((trigger=>{trigger.addEventListener("mouseenter",(()=>{this.mouseenterTimeout=setTimeout((()=>{this.showTooltip(trigger);this.checkCloseTooltip(trigger)}),TOOLTIP_TIMEOUT);trigger.addEventListener("mouseleave",(()=>{clearTimeout(this.mouseenterTimeout);setTimeout((()=>{this.hideTooltip()}),0)}),{once:true})}))}));this.tooltip.addEventListener("mouseenter",(()=>{clearTimeout(this.mouseenterTimeout)}));this.tooltip.addEventListener("mouseleave",(()=>{this.hideTooltip()}))}checkCloseTooltip(trigger){document.querySelector("body").addEventListener("click",(({target:target})=>{const isTooltip=target.closest(`#${this.tooltipId}`)===this.tooltip;const isTrigger=target.closest(this.triggerElementSelector)===trigger;if(isTrigger||isTooltip){this.checkCloseTooltip(trigger)}else{this.hideTooltip()}}),{once:true})}showTooltip(trigger){if(this.shouldShowTooltip==="false")return;this.popper=createPopper$1(trigger,this.tooltip,{placement:this.position,strategy:"fixed",modifiers:[{name:"offset",options:{offset:TOOLTIP_OFFSET}},{name:"arrow",options:{element:document.querySelector(`#${this.tooltipId}-arrow`)}},offset$1,preventOverflow$1,flip$1]});this.tooltip.classList.add("show")}hideTooltip(){this.tooltip.classList.add("fade_out");setTimeout((()=>{if(!this.popper)return;this.popper.destroy();this.tooltip.classList.remove("show");this.tooltip.classList.remove("fade_out")}),TOOLTIP_TIMEOUT)}get triggerElements(){let triggerEl;if(this.triggerElementId){triggerEl=document.querySelector(`#${this.triggerElementId}`)}else{const selectorIsId=this.triggerElementSelector.indexOf("#")>-1;triggerEl=selectorIsId?document.querySelector(`${this.triggerElementSelector}`):document.querySelectorAll(`${this.triggerElementSelector}`)}if(!triggerEl){console.error("Tooltip Kit: an invalid or unavailable DOM reference was provided!");return[]}if(!triggerEl.length)triggerEl=[triggerEl];return this._triggerElements=this._triggerElements||triggerEl}get tooltip(){return this._tooltip=this._tooltip||this.element.querySelector(`#${this.tooltipId}`)}get position(){return this.element.dataset.pbTooltipPosition}get triggerElementId(){return this.element.dataset.pbTooltipTriggerElementId}get tooltipId(){return this.element.dataset.pbTooltipTooltipId}get triggerElementSelector(){return this.element.dataset.pbTooltipTriggerElementSelector}get shouldShowTooltip(){return this.element.dataset.pbTooltipShowTooltip}}class PbTypeahead extends PbEnhancedElement{static get selector(){return"[data-pb-typeahead-kit]"}connect(){this.element.addEventListener("keydown",(event=>this.handleKeydown(event)));this.searchInput.addEventListener("focus",(()=>this.debouncedSearch()));this.searchInput.addEventListener("input",(()=>this.debouncedSearch()));this.resultsElement.addEventListener("click",(event=>this.optionSelected(event)))}handleKeydown(event){if(event.key==="ArrowUp"){event.preventDefault();this.focusPreviousOption()}else if(event.key==="ArrowDown"){event.preventDefault();this.focusNextOption()}}search(){if(this.searchTerm.length<parseInt(this.searchTermMinimumLength))return this.clearResults();this.toggleResultsLoadingIndicator(true);this.showResults();const searchTerm=this.searchTerm;const searchContext=this.searchContext;const search={searchingFor:searchTerm,searchingContext:searchContext,setResults:results=>{this.resultsCacheUpdate(searchTerm,searchContext,results)}};this.element.dispatchEvent(new CustomEvent("pb-typeahead-kit-search",{bubbles:true,detail:search}))}resultsCacheUpdate(searchTerm,searchContext,results){const searchTermAndContext=this.cacheKeyFor(searchTerm,searchContext);if(this.resultsOptionCache.has(searchTermAndContext))this.resultsOptionCache.delete(searchTermAndContext);if(this.resultsOptionCache.size>32)this.resultsOptionCache.delete(this.resultsOptionCache.keys().next().value);this.resultsOptionCache.set(searchTermAndContext,results);this.showResults()}resultsCacheClear(){this.resultsOptionCache.clear()}get debouncedSearch(){return this._debouncedSearch=this._debouncedSearch||debounce$2(this.search,parseInt(this.searchDebounceTimeout)).bind(this)}showResults(){if(!this.resultsOptionCache.has(this.searchTermAndContext))return;this.toggleResultsLoadingIndicator(false);this.clearResults();for(const result of this.resultsOptionCache.get(this.searchTermAndContext)){this.resultsElement.appendChild(this.newResultOption(result.cloneNode(true)))}for(const result of this.resultsElement.querySelectorAll("[data-result-option-item]")){result.addEventListener("mousedown",(event=>this.optionSelected(event)))}}optionSelected(event){const resultOption=event.target.closest("[data-result-option-item]");if(!resultOption)return;this.resultsCacheClear();this.searchInputClear();this.clearResults();this.element.dispatchEvent(new CustomEvent("pb-typeahead-kit-result-option-selected",{bubbles:true,detail:{selected:resultOption,typeahead:this}}))}clearResults(){this.resultsElement.innerHTML=""}newResultOption(content){const resultOption=this.resultOptionTemplate.content.cloneNode(true);resultOption.querySelector('slot[name="content"]').replaceWith(content);return resultOption}focusPreviousOption(){const currentIndex=this.resultOptionItems.indexOf(this.currentSelectedResultOptionItem);const previousIndex=currentIndex-1;const previousOptionItem=this.resultOptionItems[previousIndex]||this.resultOptionItems[this.resultOptionItems.length-1];previousOptionItem.focus()}focusNextOption(){const currentIndex=this.resultOptionItems.indexOf(this.currentSelectedResultOptionItem);const nextIndex=currentIndex+1;const nextOptionItem=this.resultOptionItems[nextIndex]||this.resultOptionItems[0];nextOptionItem.focus()}get resultOptionItems(){return Array.from(this.resultsElement.querySelectorAll("[data-result-option-item]"))}get currentSelectedResultOptionItem(){return document.activeElement.closest("[data-result-option-item]")}get searchInput(){return this._searchInput=this._searchInput||this.element.querySelector('input[type="search"]')}get searchTerm(){return this.searchInput.value}get searchContext(){if(this._searchContext)return this._searchContext;const selector=this.element.dataset.searchContextValueSelector;if(selector)return(this.element.parentNode.querySelector(selector)||this.element.closest(selector)).value;return null}set searchContext(value){this._searchContext=value}get searchTermAndContext(){return this.cacheKeyFor(this.searchTerm,this.searchContext)}cacheKeyFor(searchTerm,searchContext){return[searchTerm,JSON.stringify(searchContext)].join()}searchInputClear(){this.searchInput.value=""}get searchTermMinimumLength(){return this.element.dataset.pbTypeaheadKitSearchTermMinimumLength}get searchDebounceTimeout(){return this.element.dataset.pbTypeaheadKitSearchDebounceTimeout}get resultsElement(){return this._resultsElement=this._resultsElement||this.element.querySelector("[data-pb-typeahead-kit-results]")}get resultOptionTemplate(){return this._resultOptionTemplate=this._resultOptionTemplate||this.element.querySelector("template[data-pb-typeahead-kit-result-option]")}get resultsOptionCache(){return this._resultsOptionCache=this._resultsOptionCache||new Map}get resultsLoadingIndicator(){return this._resultsLoadingIndicator=this._resultsLoadingIndicator||this.element.querySelector("[data-pb-typeahead-kit-loading-indicator]")}toggleResultsLoadingIndicator(visible){var visibilityProperty="0";if(visible)visibilityProperty="1";this.resultsLoadingIndicator.style.opacity=visibilityProperty}}const dialogHelper=()=>{const openTrigger=document.querySelectorAll("[data-open-dialog]");const closeTrigger=document.querySelectorAll("[data-close-dialog]");const dialogs=document.querySelectorAll(".pb_dialog_rails");openTrigger.forEach((open=>{open.addEventListener("click",(()=>{var openTriggerData=open.dataset.openDialog;var targetDialog=document.getElementById(openTriggerData);if(targetDialog.open)return;targetDialog.showModal()}))}));closeTrigger.forEach((close=>{close.addEventListener("click",(()=>{var closeTriggerData=close.dataset.closeDialog;document.getElementById(closeTriggerData).close()}))}));dialogs.forEach((dialogElement=>{dialogElement.addEventListener("mousedown",(event=>{const dialogParentDataset=dialogElement.parentElement.dataset;if(dialogParentDataset.overlayClick==="overlay_close")return;const dialogModal=event.target.getBoundingClientRect();const clickedOutsideDialogModal=event.clientX<dialogModal.left||event.clientX>dialogModal.right||event.clientY<dialogModal.top||event.clientY>dialogModal.bottom;if(clickedOutsideDialogModal){dialogElement.close();event.stopPropagation()}}))}))};export{uniqueId as A,cloneDeep as B,isString as C,DateTime as D,mapTheme as E,PbEnhancedElement as P,datePickerHelper as a,dialogHelper as b,PbPopover as c,debounce$2 as d,PbTooltip as e,PbTypeahead as f,PbTable as g,PbTextarea as h,isEmpty as i,find as j,colors as k,getDefaultExportFromCjs as l,map as m,noop as n,omitBy as o,partial as p,commonjsGlobal as q,filter as r,omit as s,get as t,useDropdown as u,typography as v,merge as w,useCollapsible as x,getAugmentedNamespace as y,createPopper as z};