{"version":3,"file":"pinia-650454eb.js","sources":["../../../Client/virtual:svg-icons-register","../../../Client/node_modules/@vue/shared/dist/shared.esm-bundler.js","../../../Client/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js","../../../Client/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js","../../../Client/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js","../../../Client/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js","../../../Client/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js","../../../Client/node_modules/vue/dist/vue.esm-bundler.js","../../../Client/src/modules/core/error-messages.ts","../../../Client/node_modules/axios/lib/helpers/bind.js","../../../Client/node_modules/axios/lib/utils.js","../../../Client/node_modules/axios/lib/core/AxiosError.js","../../../Client/node_modules/axios/lib/helpers/null.js","../../../Client/node_modules/axios/lib/helpers/toFormData.js","../../../Client/node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../../../Client/node_modules/axios/lib/helpers/buildURL.js","../../../Client/node_modules/axios/lib/core/InterceptorManager.js","../../../Client/node_modules/axios/lib/defaults/transitional.js","../../../Client/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../../../Client/node_modules/axios/lib/platform/browser/classes/FormData.js","../../../Client/node_modules/axios/lib/platform/browser/index.js","../../../Client/node_modules/axios/lib/helpers/toURLEncodedForm.js","../../../Client/node_modules/axios/lib/helpers/formDataToJSON.js","../../../Client/node_modules/axios/lib/defaults/index.js","../../../Client/node_modules/axios/lib/helpers/parseHeaders.js","../../../Client/node_modules/axios/lib/core/AxiosHeaders.js","../../../Client/node_modules/axios/lib/core/transformData.js","../../../Client/node_modules/axios/lib/cancel/isCancel.js","../../../Client/node_modules/axios/lib/cancel/CanceledError.js","../../../Client/node_modules/axios/lib/core/settle.js","../../../Client/node_modules/axios/lib/helpers/cookies.js","../../../Client/node_modules/axios/lib/helpers/isAbsoluteURL.js","../../../Client/node_modules/axios/lib/helpers/combineURLs.js","../../../Client/node_modules/axios/lib/core/buildFullPath.js","../../../Client/node_modules/axios/lib/helpers/isURLSameOrigin.js","../../../Client/node_modules/axios/lib/helpers/parseProtocol.js","../../../Client/node_modules/axios/lib/helpers/speedometer.js","../../../Client/node_modules/axios/lib/adapters/xhr.js","../../../Client/node_modules/axios/lib/adapters/adapters.js","../../../Client/node_modules/axios/lib/core/dispatchRequest.js","../../../Client/node_modules/axios/lib/core/mergeConfig.js","../../../Client/node_modules/axios/lib/env/data.js","../../../Client/node_modules/axios/lib/helpers/validator.js","../../../Client/node_modules/axios/lib/core/Axios.js","../../../Client/node_modules/axios/lib/cancel/CancelToken.js","../../../Client/node_modules/axios/lib/helpers/spread.js","../../../Client/node_modules/axios/lib/helpers/isAxiosError.js","../../../Client/node_modules/axios/lib/helpers/HttpStatusCode.js","../../../Client/node_modules/axios/lib/axios.js","../../../Client/src/modules/core/utilities/api.ts","../../../Client/node_modules/dayjs/dayjs.min.js","../../../Client/node_modules/dayjs/plugin/localeData.js","../../../Client/node_modules/dayjs/plugin/utc.js","../../../Client/node_modules/dayjs/plugin/localizedFormat.js","../../../Client/src/modules/core/utilities/datetime.ts","../../../Client/src/modules/core/utilities/dom.ts","../../../Client/src/modules/core/app.constants.ts","../../../Client/src/modules/core/utilities/string-formatting.ts","../../../Client/src/modules/core/components/icon.vue","../../../Client/node_modules/bootstrap/js/dist/util/index.js","../../../Client/node_modules/bootstrap/js/dist/dom/event-handler.js","../../../Client/node_modules/bootstrap/js/dist/dom/selector-engine.js","../../../Client/node_modules/bootstrap/js/dist/dom/data.js","../../../Client/node_modules/bootstrap/js/dist/dom/manipulator.js","../../../Client/node_modules/bootstrap/js/dist/util/config.js","../../../Client/node_modules/bootstrap/js/dist/base-component.js","../../../Client/node_modules/bootstrap/js/dist/collapse.js","../../../Client/node_modules/bootstrap/js/dist/util/scrollbar.js","../../../Client/node_modules/bootstrap/js/dist/util/backdrop.js","../../../Client/node_modules/bootstrap/js/dist/util/focustrap.js","../../../Client/node_modules/bootstrap/js/dist/util/component-functions.js","../../../Client/node_modules/bootstrap/js/dist/modal.js","../../../Client/node_modules/bootstrap/js/dist/offcanvas.js","../../../Client/src/modules/core/composables/use-notifications.ts","../../../Client/src/modules/core/composables/use-error-handling.ts","../../../Client/node_modules/bootstrap/js/dist/tab.js","../../../Client/node_modules/nouislider/dist/nouislider.js","../../../Client/node_modules/property-expr/index.js","../../../Client/node_modules/tiny-case/index.js","../../../Client/node_modules/toposort/index.js","../../../Client/node_modules/yup/index.esm.js","../../../Client/node_modules/intl-tel-input/build/js/intlTelInput.js","../../../Client/node_modules/ssr-window/ssr-window.esm.js","../../../Client/node_modules/swiper/shared/utils.js","../../../Client/node_modules/swiper/shared/get-support.js","../../../Client/node_modules/swiper/shared/get-device.js","../../../Client/node_modules/swiper/shared/get-browser.js","../../../Client/node_modules/swiper/core/modules/resize/resize.js","../../../Client/node_modules/swiper/core/modules/observer/observer.js","../../../Client/node_modules/swiper/core/events-emitter.js","../../../Client/node_modules/swiper/core/update/updateSize.js","../../../Client/node_modules/swiper/core/update/updateSlides.js","../../../Client/node_modules/swiper/core/update/updateAutoHeight.js","../../../Client/node_modules/swiper/core/update/updateSlidesOffset.js","../../../Client/node_modules/swiper/core/update/updateSlidesProgress.js","../../../Client/node_modules/swiper/core/update/updateProgress.js","../../../Client/node_modules/swiper/core/update/updateSlidesClasses.js","../../../Client/node_modules/swiper/core/update/updateActiveIndex.js","../../../Client/node_modules/swiper/core/update/updateClickedSlide.js","../../../Client/node_modules/swiper/core/update/index.js","../../../Client/node_modules/swiper/core/translate/getTranslate.js","../../../Client/node_modules/swiper/core/translate/setTranslate.js","../../../Client/node_modules/swiper/core/translate/minTranslate.js","../../../Client/node_modules/swiper/core/translate/maxTranslate.js","../../../Client/node_modules/swiper/core/translate/translateTo.js","../../../Client/node_modules/swiper/core/translate/index.js","../../../Client/node_modules/swiper/core/transition/setTransition.js","../../../Client/node_modules/swiper/core/transition/transitionEmit.js","../../../Client/node_modules/swiper/core/transition/transitionStart.js","../../../Client/node_modules/swiper/core/transition/transitionEnd.js","../../../Client/node_modules/swiper/core/transition/index.js","../../../Client/node_modules/swiper/core/slide/slideTo.js","../../../Client/node_modules/swiper/core/slide/slideToLoop.js","../../../Client/node_modules/swiper/core/slide/slideNext.js","../../../Client/node_modules/swiper/core/slide/slidePrev.js","../../../Client/node_modules/swiper/core/slide/slideReset.js","../../../Client/node_modules/swiper/core/slide/slideToClosest.js","../../../Client/node_modules/swiper/core/slide/slideToClickedSlide.js","../../../Client/node_modules/swiper/core/slide/index.js","../../../Client/node_modules/swiper/core/loop/loopCreate.js","../../../Client/node_modules/swiper/core/loop/loopFix.js","../../../Client/node_modules/swiper/core/loop/loopDestroy.js","../../../Client/node_modules/swiper/core/loop/index.js","../../../Client/node_modules/swiper/core/grab-cursor/setGrabCursor.js","../../../Client/node_modules/swiper/core/grab-cursor/unsetGrabCursor.js","../../../Client/node_modules/swiper/core/grab-cursor/index.js","../../../Client/node_modules/swiper/core/events/onTouchStart.js","../../../Client/node_modules/swiper/core/events/onTouchMove.js","../../../Client/node_modules/swiper/core/events/onTouchEnd.js","../../../Client/node_modules/swiper/core/events/onResize.js","../../../Client/node_modules/swiper/core/events/onClick.js","../../../Client/node_modules/swiper/core/events/onScroll.js","../../../Client/node_modules/swiper/shared/process-lazy-preloader.js","../../../Client/node_modules/swiper/core/events/onLoad.js","../../../Client/node_modules/swiper/core/events/index.js","../../../Client/node_modules/swiper/core/breakpoints/setBreakpoint.js","../../../Client/node_modules/swiper/core/breakpoints/getBreakpoint.js","../../../Client/node_modules/swiper/core/breakpoints/index.js","../../../Client/node_modules/swiper/core/classes/addClasses.js","../../../Client/node_modules/swiper/core/classes/removeClasses.js","../../../Client/node_modules/swiper/core/classes/index.js","../../../Client/node_modules/swiper/core/check-overflow/index.js","../../../Client/node_modules/swiper/core/defaults.js","../../../Client/node_modules/swiper/core/moduleExtendParams.js","../../../Client/node_modules/swiper/core/core.js","../../../Client/node_modules/splitting/dist/splitting.js","../../../Client/node_modules/bootstrap/js/dist/toast.js","../../../Client/node_modules/@fancyapps/ui/dist/fancybox.esm.js","../../../Client/node_modules/vue-demi/lib/index.mjs","../../../Client/node_modules/pinia/dist/pinia.mjs"],"sourcesContent":["\n if (typeof window !== 'undefined') {\n function loadSvg() {\n var body = document.body;\n var svgDom = document.getElementById('__svg__icons__dom__');\n if(!svgDom) {\n svgDom = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n svgDom.style.position = 'absolute';\n svgDom.style.width = '0';\n svgDom.style.height = '0';\n svgDom.id = '__svg__icons__dom__';\n svgDom.setAttribute('xmlns','http://www.w3.org/2000/svg');\n svgDom.setAttribute('xmlns:link','http://www.w3.org/1999/xlink');\n }\n svgDom.innerHTML = \"\";\n body.insertBefore(svgDom, body.lastChild);\n }\n if(document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', loadSvg);\n } else {\n loadSvg()\n }\n }\n \nexport default {}","function makeMap(str, expectsLowerCase) {\n const map = /* @__PURE__ */ Object.create(null);\n const list = str.split(\",\");\n for (let i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst onRE = /^on[^a-z]/;\nconst isOn = (key) => onRE.test(key);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n const i = arr.indexOf(el);\n if (i > -1) {\n arr.splice(i, 1);\n }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n // the leading comma is intentional so empty string \"\" is also included\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n};\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction((str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = cacheStringFunction((str) => {\n const s = str ? `on${capitalize(str)}` : ``;\n return s;\n});\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, arg) => {\n for (let i = 0; i < fns.length; i++) {\n fns[i](arg);\n }\n};\nconst def = (obj, key, value) => {\n Object.defineProperty(obj, key, {\n configurable: true,\n enumerable: false,\n value\n });\n};\nconst looseToNumber = (val) => {\n const n = parseFloat(val);\n return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n const n = isString(val) ? Number(val) : NaN;\n return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\n\nconst PatchFlagNames = {\n [1]: `TEXT`,\n [2]: `CLASS`,\n [4]: `STYLE`,\n [8]: `PROPS`,\n [16]: `FULL_PROPS`,\n [32]: `HYDRATE_EVENTS`,\n [64]: `STABLE_FRAGMENT`,\n [128]: `KEYED_FRAGMENT`,\n [256]: `UNKEYED_FRAGMENT`,\n [512]: `NEED_PATCH`,\n [1024]: `DYNAMIC_SLOTS`,\n [2048]: `DEV_ROOT_FRAGMENT`,\n [-1]: `HOISTED`,\n [-2]: `BAIL`\n};\n\nconst slotFlagsText = {\n [1]: \"STABLE\",\n [2]: \"DYNAMIC\",\n [3]: \"FORWARDED\"\n};\n\nconst GLOBALS_ALLOWED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console\";\nconst isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);\nconst isGloballyWhitelisted = isGloballyAllowed;\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n let lines = source.split(/(\\r?\\n)/);\n const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n lines = lines.filter((_, idx) => idx % 2 === 0);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);\n if (count >= start) {\n for (let j = i - range; j <= i + range || end > count; j++) {\n if (j < 0 || j >= lines.length)\n continue;\n const line = j + 1;\n res.push(\n `${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`\n );\n const lineLength = lines[j].length;\n const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;\n if (j === i) {\n const pad = start - (count - (lineLength + newLineSeqLength));\n const length = Math.max(\n 1,\n end > count ? lineLength - pad : end - start\n );\n res.push(` | ` + \" \".repeat(pad) + \"^\".repeat(length));\n } else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + \"^\".repeat(length));\n }\n count += lineLength + newLineSeqLength;\n }\n }\n break;\n }\n }\n return res.join(\"\\n\");\n}\n\nfunction normalizeStyle(value) {\n if (isArray(value)) {\n const res = {};\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n if (normalized) {\n for (const key in normalized) {\n res[key] = normalized[key];\n }\n }\n }\n return res;\n } else if (isString(value) || isObject(value)) {\n return value;\n }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\\/\\*[^]*?\\*\\//g;\nfunction parseStringStyle(cssText) {\n const ret = {};\n cssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\n if (item) {\n const tmp = item.split(propertyDelimiterRE);\n tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return ret;\n}\nfunction stringifyStyle(styles) {\n let ret = \"\";\n if (!styles || isString(styles)) {\n return ret;\n }\n for (const key in styles) {\n const value = styles[key];\n const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n if (isString(value) || typeof value === \"number\") {\n ret += `${normalizedKey}:${value};`;\n }\n }\n return ret;\n}\nfunction normalizeClass(value) {\n let res = \"\";\n if (isString(value)) {\n res = value;\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const normalized = normalizeClass(value[i]);\n if (normalized) {\n res += normalized + \" \";\n }\n }\n } else if (isObject(value)) {\n for (const name in value) {\n if (value[name]) {\n res += name + \" \";\n }\n }\n }\n return res.trim();\n}\nfunction normalizeProps(props) {\n if (!props)\n return null;\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (style) {\n props.style = normalizeStyle(style);\n }\n return props;\n}\n\nconst HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\nconst SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\nconst VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\nconst isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\nconst isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\nconst isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\n\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nconst isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\nconst isBooleanAttr = /* @__PURE__ */ makeMap(\n specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\n);\nfunction includeBooleanAttr(value) {\n return !!value || value === \"\";\n}\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\nconst attrValidationCache = {};\nfunction isSSRSafeAttrName(name) {\n if (attrValidationCache.hasOwnProperty(name)) {\n return attrValidationCache[name];\n }\n const isUnsafe = unsafeAttrCharRE.test(name);\n if (isUnsafe) {\n console.error(`unsafe attribute name: ${name}`);\n }\n return attrValidationCache[name] = !isUnsafe;\n}\nconst propsToAttrMap = {\n acceptCharset: \"accept-charset\",\n className: \"class\",\n htmlFor: \"for\",\n httpEquiv: \"http-equiv\"\n};\nconst isKnownHtmlAttr = /* @__PURE__ */ makeMap(\n `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`\n);\nconst isKnownSvgAttr = /* @__PURE__ */ makeMap(\n `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`\n);\n\nconst escapeRE = /[\"'&<>]/;\nfunction escapeHtml(string) {\n const str = \"\" + string;\n const match = escapeRE.exec(str);\n if (!match) {\n return str;\n }\n let html = \"\";\n let escaped;\n let index;\n let lastIndex = 0;\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n escaped = \""\";\n break;\n case 38:\n escaped = \"&\";\n break;\n case 39:\n escaped = \"'\";\n break;\n case 60:\n escaped = \"<\";\n break;\n case 62:\n escaped = \">\";\n break;\n default:\n continue;\n }\n if (lastIndex !== index) {\n html += str.slice(lastIndex, index);\n }\n lastIndex = index + 1;\n html += escaped;\n }\n return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n}\nconst commentStripRE = /^-?>||--!>| looseEqual(item, val));\n}\n\nconst toDisplayString = (val) => {\n return isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);\n};\nconst replacer = (_key, val) => {\n if (val && val.__v_isRef) {\n return replacer(_key, val.value);\n } else if (isMap(val)) {\n return {\n [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {\n entries[`${key} =>`] = val2;\n return entries;\n }, {})\n };\n } else if (isSet(val)) {\n return {\n [`Set(${val.size})`]: [...val.values()]\n };\n } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\n return String(val);\n }\n return val;\n};\n\nexport { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };\n","import { extend, isArray, isSymbol, isMap, isIntegerKey, hasOwn, hasChanged, isObject, makeMap, capitalize, toRawType, def, isFunction, NOOP } from '@vue/shared';\n\nfunction warn(msg, ...args) {\n console.warn(`[Vue warn] ${msg}`, ...args);\n}\n\nlet activeEffectScope;\nclass EffectScope {\n constructor(detached = false) {\n this.detached = detached;\n /**\n * @internal\n */\n this._active = true;\n /**\n * @internal\n */\n this.effects = [];\n /**\n * @internal\n */\n this.cleanups = [];\n this.parent = activeEffectScope;\n if (!detached && activeEffectScope) {\n this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(\n this\n ) - 1;\n }\n }\n get active() {\n return this._active;\n }\n run(fn) {\n if (this._active) {\n const currentEffectScope = activeEffectScope;\n try {\n activeEffectScope = this;\n return fn();\n } finally {\n activeEffectScope = currentEffectScope;\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(`cannot run an inactive effect scope.`);\n }\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n on() {\n activeEffectScope = this;\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n off() {\n activeEffectScope = this.parent;\n }\n stop(fromParent) {\n if (this._active) {\n let i, l;\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].stop();\n }\n for (i = 0, l = this.cleanups.length; i < l; i++) {\n this.cleanups[i]();\n }\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].stop(true);\n }\n }\n if (!this.detached && this.parent && !fromParent) {\n const last = this.parent.scopes.pop();\n if (last && last !== this) {\n this.parent.scopes[this.index] = last;\n last.index = this.index;\n }\n }\n this.parent = void 0;\n this._active = false;\n }\n }\n}\nfunction effectScope(detached) {\n return new EffectScope(detached);\n}\nfunction recordEffectScope(effect, scope = activeEffectScope) {\n if (scope && scope.active) {\n scope.effects.push(effect);\n }\n}\nfunction getCurrentScope() {\n return activeEffectScope;\n}\nfunction onScopeDispose(fn) {\n if (activeEffectScope) {\n activeEffectScope.cleanups.push(fn);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `onScopeDispose() is called when there is no active effect scope to be associated with.`\n );\n }\n}\n\nconst createDep = (effects) => {\n const dep = new Set(effects);\n dep.w = 0;\n dep.n = 0;\n return dep;\n};\nconst wasTracked = (dep) => (dep.w & trackOpBit) > 0;\nconst newTracked = (dep) => (dep.n & trackOpBit) > 0;\nconst initDepMarkers = ({ deps }) => {\n if (deps.length) {\n for (let i = 0; i < deps.length; i++) {\n deps[i].w |= trackOpBit;\n }\n }\n};\nconst finalizeDepMarkers = (effect) => {\n const { deps } = effect;\n if (deps.length) {\n let ptr = 0;\n for (let i = 0; i < deps.length; i++) {\n const dep = deps[i];\n if (wasTracked(dep) && !newTracked(dep)) {\n dep.delete(effect);\n } else {\n deps[ptr++] = dep;\n }\n dep.w &= ~trackOpBit;\n dep.n &= ~trackOpBit;\n }\n deps.length = ptr;\n }\n};\n\nconst targetMap = /* @__PURE__ */ new WeakMap();\nlet effectTrackDepth = 0;\nlet trackOpBit = 1;\nconst maxMarkerBits = 30;\nlet activeEffect;\nconst ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"iterate\" : \"\");\nconst MAP_KEY_ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== \"production\") ? \"Map key iterate\" : \"\");\nclass ReactiveEffect {\n constructor(fn, scheduler = null, scope) {\n this.fn = fn;\n this.scheduler = scheduler;\n this.active = true;\n this.deps = [];\n this.parent = void 0;\n recordEffectScope(this, scope);\n }\n run() {\n if (!this.active) {\n return this.fn();\n }\n let parent = activeEffect;\n let lastShouldTrack = shouldTrack;\n while (parent) {\n if (parent === this) {\n return;\n }\n parent = parent.parent;\n }\n try {\n this.parent = activeEffect;\n activeEffect = this;\n shouldTrack = true;\n trackOpBit = 1 << ++effectTrackDepth;\n if (effectTrackDepth <= maxMarkerBits) {\n initDepMarkers(this);\n } else {\n cleanupEffect(this);\n }\n return this.fn();\n } finally {\n if (effectTrackDepth <= maxMarkerBits) {\n finalizeDepMarkers(this);\n }\n trackOpBit = 1 << --effectTrackDepth;\n activeEffect = this.parent;\n shouldTrack = lastShouldTrack;\n this.parent = void 0;\n if (this.deferStop) {\n this.stop();\n }\n }\n }\n stop() {\n if (activeEffect === this) {\n this.deferStop = true;\n } else if (this.active) {\n cleanupEffect(this);\n if (this.onStop) {\n this.onStop();\n }\n this.active = false;\n }\n }\n}\nfunction cleanupEffect(effect2) {\n const { deps } = effect2;\n if (deps.length) {\n for (let i = 0; i < deps.length; i++) {\n deps[i].delete(effect2);\n }\n deps.length = 0;\n }\n}\nfunction effect(fn, options) {\n if (fn.effect instanceof ReactiveEffect) {\n fn = fn.effect.fn;\n }\n const _effect = new ReactiveEffect(fn);\n if (options) {\n extend(_effect, options);\n if (options.scope)\n recordEffectScope(_effect, options.scope);\n }\n if (!options || !options.lazy) {\n _effect.run();\n }\n const runner = _effect.run.bind(_effect);\n runner.effect = _effect;\n return runner;\n}\nfunction stop(runner) {\n runner.effect.stop();\n}\nlet shouldTrack = true;\nconst trackStack = [];\nfunction pauseTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = false;\n}\nfunction enableTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = true;\n}\nfunction resetTracking() {\n const last = trackStack.pop();\n shouldTrack = last === void 0 ? true : last;\n}\nfunction track(target, type, key) {\n if (shouldTrack && activeEffect) {\n let depsMap = targetMap.get(target);\n if (!depsMap) {\n targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n }\n let dep = depsMap.get(key);\n if (!dep) {\n depsMap.set(key, dep = createDep());\n }\n const eventInfo = !!(process.env.NODE_ENV !== \"production\") ? { effect: activeEffect, target, type, key } : void 0;\n trackEffects(dep, eventInfo);\n }\n}\nfunction trackEffects(dep, debuggerEventExtraInfo) {\n let shouldTrack2 = false;\n if (effectTrackDepth <= maxMarkerBits) {\n if (!newTracked(dep)) {\n dep.n |= trackOpBit;\n shouldTrack2 = !wasTracked(dep);\n }\n } else {\n shouldTrack2 = !dep.has(activeEffect);\n }\n if (shouldTrack2) {\n dep.add(activeEffect);\n activeEffect.deps.push(dep);\n if (!!(process.env.NODE_ENV !== \"production\") && activeEffect.onTrack) {\n activeEffect.onTrack(\n extend(\n {\n effect: activeEffect\n },\n debuggerEventExtraInfo\n )\n );\n }\n }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n const depsMap = targetMap.get(target);\n if (!depsMap) {\n return;\n }\n let deps = [];\n if (type === \"clear\") {\n deps = [...depsMap.values()];\n } else if (key === \"length\" && isArray(target)) {\n const newLength = Number(newValue);\n depsMap.forEach((dep, key2) => {\n if (key2 === \"length\" || !isSymbol(key2) && key2 >= newLength) {\n deps.push(dep);\n }\n });\n } else {\n if (key !== void 0) {\n deps.push(depsMap.get(key));\n }\n switch (type) {\n case \"add\":\n if (!isArray(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n } else if (isIntegerKey(key)) {\n deps.push(depsMap.get(\"length\"));\n }\n break;\n case \"delete\":\n if (!isArray(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n }\n break;\n case \"set\":\n if (isMap(target)) {\n deps.push(depsMap.get(ITERATE_KEY));\n }\n break;\n }\n }\n const eventInfo = !!(process.env.NODE_ENV !== \"production\") ? { target, type, key, newValue, oldValue, oldTarget } : void 0;\n if (deps.length === 1) {\n if (deps[0]) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n triggerEffects(deps[0], eventInfo);\n } else {\n triggerEffects(deps[0]);\n }\n }\n } else {\n const effects = [];\n for (const dep of deps) {\n if (dep) {\n effects.push(...dep);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n triggerEffects(createDep(effects), eventInfo);\n } else {\n triggerEffects(createDep(effects));\n }\n }\n}\nfunction triggerEffects(dep, debuggerEventExtraInfo) {\n const effects = isArray(dep) ? dep : [...dep];\n for (const effect2 of effects) {\n if (effect2.computed) {\n triggerEffect(effect2, debuggerEventExtraInfo);\n }\n }\n for (const effect2 of effects) {\n if (!effect2.computed) {\n triggerEffect(effect2, debuggerEventExtraInfo);\n }\n }\n}\nfunction triggerEffect(effect2, debuggerEventExtraInfo) {\n if (effect2 !== activeEffect || effect2.allowRecurse) {\n if (!!(process.env.NODE_ENV !== \"production\") && effect2.onTrigger) {\n effect2.onTrigger(extend({ effect: effect2 }, debuggerEventExtraInfo));\n }\n if (effect2.scheduler) {\n effect2.scheduler();\n } else {\n effect2.run();\n }\n }\n}\nfunction getDepFromReactive(object, key) {\n var _a;\n return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);\n}\n\nconst isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nconst builtInSymbols = new Set(\n /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol)\n);\nconst arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();\nfunction createArrayInstrumentations() {\n const instrumentations = {};\n [\"includes\", \"indexOf\", \"lastIndexOf\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n const arr = toRaw(this);\n for (let i = 0, l = this.length; i < l; i++) {\n track(arr, \"get\", i + \"\");\n }\n const res = arr[key](...args);\n if (res === -1 || res === false) {\n return arr[key](...args.map(toRaw));\n } else {\n return res;\n }\n };\n });\n [\"push\", \"pop\", \"shift\", \"unshift\", \"splice\"].forEach((key) => {\n instrumentations[key] = function(...args) {\n pauseTracking();\n const res = toRaw(this)[key].apply(this, args);\n resetTracking();\n return res;\n };\n });\n return instrumentations;\n}\nfunction hasOwnProperty(key) {\n const obj = toRaw(this);\n track(obj, \"has\", key);\n return obj.hasOwnProperty(key);\n}\nclass BaseReactiveHandler {\n constructor(_isReadonly = false, _shallow = false) {\n this._isReadonly = _isReadonly;\n this._shallow = _shallow;\n }\n get(target, key, receiver) {\n const isReadonly2 = this._isReadonly, shallow = this._shallow;\n if (key === \"__v_isReactive\") {\n return !isReadonly2;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly2;\n } else if (key === \"__v_isShallow\") {\n return shallow;\n } else if (key === \"__v_raw\" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {\n return target;\n }\n const targetIsArray = isArray(target);\n if (!isReadonly2) {\n if (targetIsArray && hasOwn(arrayInstrumentations, key)) {\n return Reflect.get(arrayInstrumentations, key, receiver);\n }\n if (key === \"hasOwnProperty\") {\n return hasOwnProperty;\n }\n }\n const res = Reflect.get(target, key, receiver);\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n return res;\n }\n if (!isReadonly2) {\n track(target, \"get\", key);\n }\n if (shallow) {\n return res;\n }\n if (isRef(res)) {\n return targetIsArray && isIntegerKey(key) ? res : res.value;\n }\n if (isObject(res)) {\n return isReadonly2 ? readonly(res) : reactive(res);\n }\n return res;\n }\n}\nclass MutableReactiveHandler extends BaseReactiveHandler {\n constructor(shallow = false) {\n super(false, shallow);\n }\n set(target, key, value, receiver) {\n let oldValue = target[key];\n if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {\n return false;\n }\n if (!this._shallow) {\n if (!isShallow(value) && !isReadonly(value)) {\n oldValue = toRaw(oldValue);\n value = toRaw(value);\n }\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n }\n }\n const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);\n const result = Reflect.set(target, key, value, receiver);\n if (target === toRaw(receiver)) {\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n }\n return result;\n }\n deleteProperty(target, key) {\n const hadKey = hasOwn(target, key);\n const oldValue = target[key];\n const result = Reflect.deleteProperty(target, key);\n if (result && hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n }\n has(target, key) {\n const result = Reflect.has(target, key);\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\n track(target, \"has\", key);\n }\n return result;\n }\n ownKeys(target) {\n track(\n target,\n \"iterate\",\n isArray(target) ? \"length\" : ITERATE_KEY\n );\n return Reflect.ownKeys(target);\n }\n}\nclass ReadonlyReactiveHandler extends BaseReactiveHandler {\n constructor(shallow = false) {\n super(true, shallow);\n }\n set(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Set operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n deleteProperty(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Delete operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n}\nconst mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();\nconst readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();\nconst shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(\n true\n);\nconst shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);\n\nconst toShallow = (value) => value;\nconst getProto = (v) => Reflect.getPrototypeOf(v);\nfunction get(target, key, isReadonly = false, isShallow = false) {\n target = target[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!isReadonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"get\", key);\n }\n track(rawTarget, \"get\", rawKey);\n }\n const { has: has2 } = getProto(rawTarget);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n if (has2.call(rawTarget, key)) {\n return wrap(target.get(key));\n } else if (has2.call(rawTarget, rawKey)) {\n return wrap(target.get(rawKey));\n } else if (target !== rawTarget) {\n target.get(key);\n }\n}\nfunction has(key, isReadonly = false) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!isReadonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"has\", key);\n }\n track(rawTarget, \"has\", rawKey);\n }\n return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n}\nfunction size(target, isReadonly = false) {\n target = target[\"__v_raw\"];\n !isReadonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n return Reflect.get(target, \"size\", target);\n}\nfunction add(value) {\n value = toRaw(value);\n const target = toRaw(this);\n const proto = getProto(target);\n const hadKey = proto.has.call(target, value);\n if (!hadKey) {\n target.add(value);\n trigger(target, \"add\", value, value);\n }\n return this;\n}\nfunction set(key, value) {\n value = toRaw(value);\n const target = toRaw(this);\n const { has: has2, get: get2 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get2.call(target, key);\n target.set(key, value);\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n return this;\n}\nfunction deleteEntry(key) {\n const target = toRaw(this);\n const { has: has2, get: get2 } = getProto(target);\n let hadKey = has2.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has2.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has2, key);\n }\n const oldValue = get2 ? get2.call(target, key) : void 0;\n const result = target.delete(key);\n if (hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n}\nfunction clear() {\n const target = toRaw(this);\n const hadItems = target.size !== 0;\n const oldTarget = !!(process.env.NODE_ENV !== \"production\") ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n const result = target.clear();\n if (hadItems) {\n trigger(target, \"clear\", void 0, void 0, oldTarget);\n }\n return result;\n}\nfunction createForEach(isReadonly, isShallow) {\n return function forEach(callback, thisArg) {\n const observed = this;\n const target = observed[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n return target.forEach((value, key) => {\n return callback.call(thisArg, wrap(value), wrap(key), observed);\n });\n };\n}\nfunction createIterableMethod(method, isReadonly, isShallow) {\n return function(...args) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const targetIsMap = isMap(rawTarget);\n const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n const isKeyOnly = method === \"keys\" && targetIsMap;\n const innerIterator = target[method](...args);\n const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;\n !isReadonly && track(\n rawTarget,\n \"iterate\",\n isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY\n );\n return {\n // iterator protocol\n next() {\n const { value, done } = innerIterator.next();\n return done ? { value, done } : {\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n done\n };\n },\n // iterable protocol\n [Symbol.iterator]() {\n return this;\n }\n };\n };\n}\nfunction createReadonlyMethod(type) {\n return function(...args) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n console.warn(\n `${capitalize(type)} operation ${key}failed: target is readonly.`,\n toRaw(this)\n );\n }\n return type === \"delete\" ? false : this;\n };\n}\nfunction createInstrumentations() {\n const mutableInstrumentations2 = {\n get(key) {\n return get(this, key);\n },\n get size() {\n return size(this);\n },\n has,\n add,\n set,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, false)\n };\n const shallowInstrumentations2 = {\n get(key) {\n return get(this, key, false, true);\n },\n get size() {\n return size(this);\n },\n has,\n add,\n set,\n delete: deleteEntry,\n clear,\n forEach: createForEach(false, true)\n };\n const readonlyInstrumentations2 = {\n get(key) {\n return get(this, key, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, false)\n };\n const shallowReadonlyInstrumentations2 = {\n get(key) {\n return get(this, key, true, true);\n },\n get size() {\n return size(this, true);\n },\n has(key) {\n return has.call(this, key, true);\n },\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\"),\n forEach: createForEach(true, true)\n };\n const iteratorMethods = [\"keys\", \"values\", \"entries\", Symbol.iterator];\n iteratorMethods.forEach((method) => {\n mutableInstrumentations2[method] = createIterableMethod(\n method,\n false,\n false\n );\n readonlyInstrumentations2[method] = createIterableMethod(\n method,\n true,\n false\n );\n shallowInstrumentations2[method] = createIterableMethod(\n method,\n false,\n true\n );\n shallowReadonlyInstrumentations2[method] = createIterableMethod(\n method,\n true,\n true\n );\n });\n return [\n mutableInstrumentations2,\n readonlyInstrumentations2,\n shallowInstrumentations2,\n shallowReadonlyInstrumentations2\n ];\n}\nconst [\n mutableInstrumentations,\n readonlyInstrumentations,\n shallowInstrumentations,\n shallowReadonlyInstrumentations\n] = /* @__PURE__ */ createInstrumentations();\nfunction createInstrumentationGetter(isReadonly, shallow) {\n const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;\n return (target, key, receiver) => {\n if (key === \"__v_isReactive\") {\n return !isReadonly;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly;\n } else if (key === \"__v_raw\") {\n return target;\n }\n return Reflect.get(\n hasOwn(instrumentations, key) && key in target ? instrumentations : target,\n key,\n receiver\n );\n };\n}\nconst mutableCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, false)\n};\nconst shallowCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, true)\n};\nconst readonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, false)\n};\nconst shallowReadonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, true)\n};\nfunction checkIdentityKeys(target, has2, key) {\n const rawKey = toRaw(key);\n if (rawKey !== key && has2.call(target, rawKey)) {\n const type = toRawType(target);\n console.warn(\n `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`\n );\n }\n}\n\nconst reactiveMap = /* @__PURE__ */ new WeakMap();\nconst shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nconst readonlyMap = /* @__PURE__ */ new WeakMap();\nconst shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction targetTypeMap(rawType) {\n switch (rawType) {\n case \"Object\":\n case \"Array\":\n return 1 /* COMMON */;\n case \"Map\":\n case \"Set\":\n case \"WeakMap\":\n case \"WeakSet\":\n return 2 /* COLLECTION */;\n default:\n return 0 /* INVALID */;\n }\n}\nfunction getTargetType(value) {\n return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));\n}\nfunction reactive(target) {\n if (isReadonly(target)) {\n return target;\n }\n return createReactiveObject(\n target,\n false,\n mutableHandlers,\n mutableCollectionHandlers,\n reactiveMap\n );\n}\nfunction shallowReactive(target) {\n return createReactiveObject(\n target,\n false,\n shallowReactiveHandlers,\n shallowCollectionHandlers,\n shallowReactiveMap\n );\n}\nfunction readonly(target) {\n return createReactiveObject(\n target,\n true,\n readonlyHandlers,\n readonlyCollectionHandlers,\n readonlyMap\n );\n}\nfunction shallowReadonly(target) {\n return createReactiveObject(\n target,\n true,\n shallowReadonlyHandlers,\n shallowReadonlyCollectionHandlers,\n shallowReadonlyMap\n );\n}\nfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n if (!isObject(target)) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n console.warn(`value cannot be made reactive: ${String(target)}`);\n }\n return target;\n }\n if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\n return target;\n }\n const existingProxy = proxyMap.get(target);\n if (existingProxy) {\n return existingProxy;\n }\n const targetType = getTargetType(target);\n if (targetType === 0 /* INVALID */) {\n return target;\n }\n const proxy = new Proxy(\n target,\n targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers\n );\n proxyMap.set(target, proxy);\n return proxy;\n}\nfunction isReactive(value) {\n if (isReadonly(value)) {\n return isReactive(value[\"__v_raw\"]);\n }\n return !!(value && value[\"__v_isReactive\"]);\n}\nfunction isReadonly(value) {\n return !!(value && value[\"__v_isReadonly\"]);\n}\nfunction isShallow(value) {\n return !!(value && value[\"__v_isShallow\"]);\n}\nfunction isProxy(value) {\n return isReactive(value) || isReadonly(value);\n}\nfunction toRaw(observed) {\n const raw = observed && observed[\"__v_raw\"];\n return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n def(value, \"__v_skip\", true);\n return value;\n}\nconst toReactive = (value) => isObject(value) ? reactive(value) : value;\nconst toReadonly = (value) => isObject(value) ? readonly(value) : value;\n\nfunction trackRefValue(ref2) {\n if (shouldTrack && activeEffect) {\n ref2 = toRaw(ref2);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n trackEffects(ref2.dep || (ref2.dep = createDep()), {\n target: ref2,\n type: \"get\",\n key: \"value\"\n });\n } else {\n trackEffects(ref2.dep || (ref2.dep = createDep()));\n }\n }\n}\nfunction triggerRefValue(ref2, newVal) {\n ref2 = toRaw(ref2);\n const dep = ref2.dep;\n if (dep) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n triggerEffects(dep, {\n target: ref2,\n type: \"set\",\n key: \"value\",\n newValue: newVal\n });\n } else {\n triggerEffects(dep);\n }\n }\n}\nfunction isRef(r) {\n return !!(r && r.__v_isRef === true);\n}\nfunction ref(value) {\n return createRef(value, false);\n}\nfunction shallowRef(value) {\n return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n if (isRef(rawValue)) {\n return rawValue;\n }\n return new RefImpl(rawValue, shallow);\n}\nclass RefImpl {\n constructor(value, __v_isShallow) {\n this.__v_isShallow = __v_isShallow;\n this.dep = void 0;\n this.__v_isRef = true;\n this._rawValue = __v_isShallow ? value : toRaw(value);\n this._value = __v_isShallow ? value : toReactive(value);\n }\n get value() {\n trackRefValue(this);\n return this._value;\n }\n set value(newVal) {\n const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);\n newVal = useDirectValue ? newVal : toRaw(newVal);\n if (hasChanged(newVal, this._rawValue)) {\n this._rawValue = newVal;\n this._value = useDirectValue ? newVal : toReactive(newVal);\n triggerRefValue(this, newVal);\n }\n }\n}\nfunction triggerRef(ref2) {\n triggerRefValue(ref2, !!(process.env.NODE_ENV !== \"production\") ? ref2.value : void 0);\n}\nfunction unref(ref2) {\n return isRef(ref2) ? ref2.value : ref2;\n}\nfunction toValue(source) {\n return isFunction(source) ? source() : unref(source);\n}\nconst shallowUnwrapHandlers = {\n get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),\n set: (target, key, value, receiver) => {\n const oldValue = target[key];\n if (isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n } else {\n return Reflect.set(target, key, value, receiver);\n }\n }\n};\nfunction proxyRefs(objectWithRefs) {\n return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n}\nclass CustomRefImpl {\n constructor(factory) {\n this.dep = void 0;\n this.__v_isRef = true;\n const { get, set } = factory(\n () => trackRefValue(this),\n () => triggerRefValue(this)\n );\n this._get = get;\n this._set = set;\n }\n get value() {\n return this._get();\n }\n set value(newVal) {\n this._set(newVal);\n }\n}\nfunction customRef(factory) {\n return new CustomRefImpl(factory);\n}\nfunction toRefs(object) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isProxy(object)) {\n console.warn(`toRefs() expects a reactive object but received a plain one.`);\n }\n const ret = isArray(object) ? new Array(object.length) : {};\n for (const key in object) {\n ret[key] = propertyToRef(object, key);\n }\n return ret;\n}\nclass ObjectRefImpl {\n constructor(_object, _key, _defaultValue) {\n this._object = _object;\n this._key = _key;\n this._defaultValue = _defaultValue;\n this.__v_isRef = true;\n }\n get value() {\n const val = this._object[this._key];\n return val === void 0 ? this._defaultValue : val;\n }\n set value(newVal) {\n this._object[this._key] = newVal;\n }\n get dep() {\n return getDepFromReactive(toRaw(this._object), this._key);\n }\n}\nclass GetterRefImpl {\n constructor(_getter) {\n this._getter = _getter;\n this.__v_isRef = true;\n this.__v_isReadonly = true;\n }\n get value() {\n return this._getter();\n }\n}\nfunction toRef(source, key, defaultValue) {\n if (isRef(source)) {\n return source;\n } else if (isFunction(source)) {\n return new GetterRefImpl(source);\n } else if (isObject(source) && arguments.length > 1) {\n return propertyToRef(source, key, defaultValue);\n } else {\n return ref(source);\n }\n}\nfunction propertyToRef(source, key, defaultValue) {\n const val = source[key];\n return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);\n}\n\nclass ComputedRefImpl {\n constructor(getter, _setter, isReadonly, isSSR) {\n this._setter = _setter;\n this.dep = void 0;\n this.__v_isRef = true;\n this[\"__v_isReadonly\"] = false;\n this._dirty = true;\n this.effect = new ReactiveEffect(getter, () => {\n if (!this._dirty) {\n this._dirty = true;\n triggerRefValue(this);\n }\n });\n this.effect.computed = this;\n this.effect.active = this._cacheable = !isSSR;\n this[\"__v_isReadonly\"] = isReadonly;\n }\n get value() {\n const self = toRaw(this);\n trackRefValue(self);\n if (self._dirty || !self._cacheable) {\n self._dirty = false;\n self._value = self.effect.run();\n }\n return self._value;\n }\n set value(newValue) {\n this._setter(newValue);\n }\n}\nfunction computed(getterOrOptions, debugOptions, isSSR = false) {\n let getter;\n let setter;\n const onlyGetter = isFunction(getterOrOptions);\n if (onlyGetter) {\n getter = getterOrOptions;\n setter = !!(process.env.NODE_ENV !== \"production\") ? () => {\n console.warn(\"Write operation failed: computed value is readonly\");\n } : NOOP;\n } else {\n getter = getterOrOptions.get;\n setter = getterOrOptions.set;\n }\n const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);\n if (!!(process.env.NODE_ENV !== \"production\") && debugOptions && !isSSR) {\n cRef.effect.onTrack = debugOptions.onTrack;\n cRef.effect.onTrigger = debugOptions.onTrigger;\n }\n return cRef;\n}\n\nconst tick = /* @__PURE__ */ Promise.resolve();\nconst queue = [];\nlet queued = false;\nconst scheduler = (fn) => {\n queue.push(fn);\n if (!queued) {\n queued = true;\n tick.then(flush);\n }\n};\nconst flush = () => {\n for (let i = 0; i < queue.length; i++) {\n queue[i]();\n }\n queue.length = 0;\n queued = false;\n};\nclass DeferredComputedRefImpl {\n constructor(getter) {\n this.dep = void 0;\n this._dirty = true;\n this.__v_isRef = true;\n this[\"__v_isReadonly\"] = true;\n let compareTarget;\n let hasCompareTarget = false;\n let scheduled = false;\n this.effect = new ReactiveEffect(getter, (computedTrigger) => {\n if (this.dep) {\n if (computedTrigger) {\n compareTarget = this._value;\n hasCompareTarget = true;\n } else if (!scheduled) {\n const valueToCompare = hasCompareTarget ? compareTarget : this._value;\n scheduled = true;\n hasCompareTarget = false;\n scheduler(() => {\n if (this.effect.active && this._get() !== valueToCompare) {\n triggerRefValue(this);\n }\n scheduled = false;\n });\n }\n for (const e of this.dep) {\n if (e.computed instanceof DeferredComputedRefImpl) {\n e.scheduler(\n true\n /* computedTrigger */\n );\n }\n }\n }\n this._dirty = true;\n });\n this.effect.computed = this;\n }\n _get() {\n if (this._dirty) {\n this._dirty = false;\n return this._value = this.effect.run();\n }\n return this._value;\n }\n get value() {\n trackRefValue(this);\n return toRaw(this)._get();\n }\n}\nfunction deferredComputed(getter) {\n return new DeferredComputedRefImpl(getter);\n}\n\nexport { EffectScope, ITERATE_KEY, ReactiveEffect, computed, customRef, deferredComputed, effect, effectScope, enableTracking, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, pauseTracking, proxyRefs, reactive, readonly, ref, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, track, trigger, triggerRef, unref };\n","import { pauseTracking, resetTracking, isRef, toRaw, getCurrentScope, isShallow as isShallow$1, isReactive, ReactiveEffect, ref, shallowReadonly, track, reactive, shallowReactive, trigger, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity';\nexport { EffectScope, ReactiveEffect, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';\nimport { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, capitalize, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, isGloballyAllowed, NO, def, isReservedProp, EMPTY_ARR, toRawType, makeMap, normalizeClass, normalizeStyle } from '@vue/shared';\nexport { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';\n\nconst stack = [];\nfunction pushWarningContext(vnode) {\n stack.push(vnode);\n}\nfunction popWarningContext() {\n stack.pop();\n}\nfunction warn(msg, ...args) {\n if (!!!(process.env.NODE_ENV !== \"production\"))\n return;\n pauseTracking();\n const instance = stack.length ? stack[stack.length - 1].component : null;\n const appWarnHandler = instance && instance.appContext.config.warnHandler;\n const trace = getComponentTrace();\n if (appWarnHandler) {\n callWithErrorHandling(\n appWarnHandler,\n instance,\n 11,\n [\n msg + args.join(\"\"),\n instance && instance.proxy,\n trace.map(\n ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`\n ).join(\"\\n\"),\n trace\n ]\n );\n } else {\n const warnArgs = [`[Vue warn]: ${msg}`, ...args];\n if (trace.length && // avoid spamming console during tests\n true) {\n warnArgs.push(`\n`, ...formatTrace(trace));\n }\n console.warn(...warnArgs);\n }\n resetTracking();\n}\nfunction getComponentTrace() {\n let currentVNode = stack[stack.length - 1];\n if (!currentVNode) {\n return [];\n }\n const normalizedStack = [];\n while (currentVNode) {\n const last = normalizedStack[0];\n if (last && last.vnode === currentVNode) {\n last.recurseCount++;\n } else {\n normalizedStack.push({\n vnode: currentVNode,\n recurseCount: 0\n });\n }\n const parentInstance = currentVNode.component && currentVNode.component.parent;\n currentVNode = parentInstance && parentInstance.vnode;\n }\n return normalizedStack;\n}\nfunction formatTrace(trace) {\n const logs = [];\n trace.forEach((entry, i) => {\n logs.push(...i === 0 ? [] : [`\n`], ...formatTraceEntry(entry));\n });\n return logs;\n}\nfunction formatTraceEntry({ vnode, recurseCount }) {\n const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;\n const isRoot = vnode.component ? vnode.component.parent == null : false;\n const open = ` at <${formatComponentName(\n vnode.component,\n vnode.type,\n isRoot\n )}`;\n const close = `>` + postfix;\n return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];\n}\nfunction formatProps(props) {\n const res = [];\n const keys = Object.keys(props);\n keys.slice(0, 3).forEach((key) => {\n res.push(...formatProp(key, props[key]));\n });\n if (keys.length > 3) {\n res.push(` ...`);\n }\n return res;\n}\nfunction formatProp(key, value, raw) {\n if (isString(value)) {\n value = JSON.stringify(value);\n return raw ? value : [`${key}=${value}`];\n } else if (typeof value === \"number\" || typeof value === \"boolean\" || value == null) {\n return raw ? value : [`${key}=${value}`];\n } else if (isRef(value)) {\n value = formatProp(key, toRaw(value.value), true);\n return raw ? value : [`${key}=Ref<`, value, `>`];\n } else if (isFunction(value)) {\n return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];\n } else {\n value = toRaw(value);\n return raw ? value : [`${key}=`, value];\n }\n}\nfunction assertNumber(val, type) {\n if (!!!(process.env.NODE_ENV !== \"production\"))\n return;\n if (val === void 0) {\n return;\n } else if (typeof val !== \"number\") {\n warn(`${type} is not a valid number - got ${JSON.stringify(val)}.`);\n } else if (isNaN(val)) {\n warn(`${type} is NaN - the duration expression might be incorrect.`);\n }\n}\n\nconst ErrorTypeStrings = {\n [\"sp\"]: \"serverPrefetch hook\",\n [\"bc\"]: \"beforeCreate hook\",\n [\"c\"]: \"created hook\",\n [\"bm\"]: \"beforeMount hook\",\n [\"m\"]: \"mounted hook\",\n [\"bu\"]: \"beforeUpdate hook\",\n [\"u\"]: \"updated\",\n [\"bum\"]: \"beforeUnmount hook\",\n [\"um\"]: \"unmounted hook\",\n [\"a\"]: \"activated hook\",\n [\"da\"]: \"deactivated hook\",\n [\"ec\"]: \"errorCaptured hook\",\n [\"rtc\"]: \"renderTracked hook\",\n [\"rtg\"]: \"renderTriggered hook\",\n [0]: \"setup function\",\n [1]: \"render function\",\n [2]: \"watcher getter\",\n [3]: \"watcher callback\",\n [4]: \"watcher cleanup function\",\n [5]: \"native event handler\",\n [6]: \"component event handler\",\n [7]: \"vnode hook\",\n [8]: \"directive hook\",\n [9]: \"transition hook\",\n [10]: \"app errorHandler\",\n [11]: \"app warnHandler\",\n [12]: \"ref function\",\n [13]: \"async component loader\",\n [14]: \"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core\"\n};\nfunction callWithErrorHandling(fn, instance, type, args) {\n let res;\n try {\n res = args ? fn(...args) : fn();\n } catch (err) {\n handleError(err, instance, type);\n }\n return res;\n}\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\n if (isFunction(fn)) {\n const res = callWithErrorHandling(fn, instance, type, args);\n if (res && isPromise(res)) {\n res.catch((err) => {\n handleError(err, instance, type);\n });\n }\n return res;\n }\n const values = [];\n for (let i = 0; i < fn.length; i++) {\n values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\n }\n return values;\n}\nfunction handleError(err, instance, type, throwInDev = true) {\n const contextVNode = instance ? instance.vnode : null;\n if (instance) {\n let cur = instance.parent;\n const exposedInstance = instance.proxy;\n const errorInfo = !!(process.env.NODE_ENV !== \"production\") ? ErrorTypeStrings[type] : type;\n while (cur) {\n const errorCapturedHooks = cur.ec;\n if (errorCapturedHooks) {\n for (let i = 0; i < errorCapturedHooks.length; i++) {\n if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\n return;\n }\n }\n }\n cur = cur.parent;\n }\n const appErrorHandler = instance.appContext.config.errorHandler;\n if (appErrorHandler) {\n callWithErrorHandling(\n appErrorHandler,\n null,\n 10,\n [err, exposedInstance, errorInfo]\n );\n return;\n }\n }\n logError(err, type, contextVNode, throwInDev);\n}\nfunction logError(err, type, contextVNode, throwInDev = true) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const info = ErrorTypeStrings[type];\n if (contextVNode) {\n pushWarningContext(contextVNode);\n }\n warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);\n if (contextVNode) {\n popWarningContext();\n }\n if (throwInDev) {\n throw err;\n } else {\n console.error(err);\n }\n } else {\n console.error(err);\n }\n}\n\nlet isFlushing = false;\nlet isFlushPending = false;\nconst queue = [];\nlet flushIndex = 0;\nconst pendingPostFlushCbs = [];\nlet activePostFlushCbs = null;\nlet postFlushIndex = 0;\nconst resolvedPromise = /* @__PURE__ */ Promise.resolve();\nlet currentFlushPromise = null;\nconst RECURSION_LIMIT = 100;\nfunction nextTick(fn) {\n const p = currentFlushPromise || resolvedPromise;\n return fn ? p.then(this ? fn.bind(this) : fn) : p;\n}\nfunction findInsertionIndex(id) {\n let start = flushIndex + 1;\n let end = queue.length;\n while (start < end) {\n const middle = start + end >>> 1;\n const middleJob = queue[middle];\n const middleJobId = getId(middleJob);\n if (middleJobId < id || middleJobId === id && middleJob.pre) {\n start = middle + 1;\n } else {\n end = middle;\n }\n }\n return start;\n}\nfunction queueJob(job) {\n if (!queue.length || !queue.includes(\n job,\n isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex\n )) {\n if (job.id == null) {\n queue.push(job);\n } else {\n queue.splice(findInsertionIndex(job.id), 0, job);\n }\n queueFlush();\n }\n}\nfunction queueFlush() {\n if (!isFlushing && !isFlushPending) {\n isFlushPending = true;\n currentFlushPromise = resolvedPromise.then(flushJobs);\n }\n}\nfunction invalidateJob(job) {\n const i = queue.indexOf(job);\n if (i > flushIndex) {\n queue.splice(i, 1);\n }\n}\nfunction queuePostFlushCb(cb) {\n if (!isArray(cb)) {\n if (!activePostFlushCbs || !activePostFlushCbs.includes(\n cb,\n cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex\n )) {\n pendingPostFlushCbs.push(cb);\n }\n } else {\n pendingPostFlushCbs.push(...cb);\n }\n queueFlush();\n}\nfunction flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n for (; i < queue.length; i++) {\n const cb = queue[i];\n if (cb && cb.pre) {\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\n continue;\n }\n queue.splice(i, 1);\n i--;\n cb();\n }\n }\n}\nfunction flushPostFlushCbs(seen) {\n if (pendingPostFlushCbs.length) {\n const deduped = [...new Set(pendingPostFlushCbs)];\n pendingPostFlushCbs.length = 0;\n if (activePostFlushCbs) {\n activePostFlushCbs.push(...deduped);\n return;\n }\n activePostFlushCbs = deduped;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n activePostFlushCbs.sort((a, b) => getId(a) - getId(b));\n for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {\n continue;\n }\n activePostFlushCbs[postFlushIndex]();\n }\n activePostFlushCbs = null;\n postFlushIndex = 0;\n }\n}\nconst getId = (job) => job.id == null ? Infinity : job.id;\nconst comparator = (a, b) => {\n const diff = getId(a) - getId(b);\n if (diff === 0) {\n if (a.pre && !b.pre)\n return -1;\n if (b.pre && !a.pre)\n return 1;\n }\n return diff;\n};\nfunction flushJobs(seen) {\n isFlushPending = false;\n isFlushing = true;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n queue.sort(comparator);\n const check = !!(process.env.NODE_ENV !== \"production\") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;\n try {\n for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\n const job = queue[flushIndex];\n if (job && job.active !== false) {\n if (!!(process.env.NODE_ENV !== \"production\") && check(job)) {\n continue;\n }\n callWithErrorHandling(job, null, 14);\n }\n }\n } finally {\n flushIndex = 0;\n queue.length = 0;\n flushPostFlushCbs(seen);\n isFlushing = false;\n currentFlushPromise = null;\n if (queue.length || pendingPostFlushCbs.length) {\n flushJobs(seen);\n }\n }\n}\nfunction checkRecursiveUpdates(seen, fn) {\n if (!seen.has(fn)) {\n seen.set(fn, 1);\n } else {\n const count = seen.get(fn);\n if (count > RECURSION_LIMIT) {\n const instance = fn.ownerInstance;\n const componentName = instance && getComponentName(instance.type);\n warn(\n `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`\n );\n return true;\n } else {\n seen.set(fn, count + 1);\n }\n }\n}\n\nlet isHmrUpdating = false;\nconst hmrDirtyComponents = /* @__PURE__ */ new Set();\nif (!!(process.env.NODE_ENV !== \"production\")) {\n getGlobalThis().__VUE_HMR_RUNTIME__ = {\n createRecord: tryWrap(createRecord),\n rerender: tryWrap(rerender),\n reload: tryWrap(reload)\n };\n}\nconst map = /* @__PURE__ */ new Map();\nfunction registerHMR(instance) {\n const id = instance.type.__hmrId;\n let record = map.get(id);\n if (!record) {\n createRecord(id, instance.type);\n record = map.get(id);\n }\n record.instances.add(instance);\n}\nfunction unregisterHMR(instance) {\n map.get(instance.type.__hmrId).instances.delete(instance);\n}\nfunction createRecord(id, initialDef) {\n if (map.has(id)) {\n return false;\n }\n map.set(id, {\n initialDef: normalizeClassComponent(initialDef),\n instances: /* @__PURE__ */ new Set()\n });\n return true;\n}\nfunction normalizeClassComponent(component) {\n return isClassComponent(component) ? component.__vccOpts : component;\n}\nfunction rerender(id, newRender) {\n const record = map.get(id);\n if (!record) {\n return;\n }\n record.initialDef.render = newRender;\n [...record.instances].forEach((instance) => {\n if (newRender) {\n instance.render = newRender;\n normalizeClassComponent(instance.type).render = newRender;\n }\n instance.renderCache = [];\n isHmrUpdating = true;\n instance.update();\n isHmrUpdating = false;\n });\n}\nfunction reload(id, newComp) {\n const record = map.get(id);\n if (!record)\n return;\n newComp = normalizeClassComponent(newComp);\n updateComponentDef(record.initialDef, newComp);\n const instances = [...record.instances];\n for (const instance of instances) {\n const oldComp = normalizeClassComponent(instance.type);\n if (!hmrDirtyComponents.has(oldComp)) {\n if (oldComp !== record.initialDef) {\n updateComponentDef(oldComp, newComp);\n }\n hmrDirtyComponents.add(oldComp);\n }\n instance.appContext.propsCache.delete(instance.type);\n instance.appContext.emitsCache.delete(instance.type);\n instance.appContext.optionsCache.delete(instance.type);\n if (instance.ceReload) {\n hmrDirtyComponents.add(oldComp);\n instance.ceReload(newComp.styles);\n hmrDirtyComponents.delete(oldComp);\n } else if (instance.parent) {\n queueJob(instance.parent.update);\n } else if (instance.appContext.reload) {\n instance.appContext.reload();\n } else if (typeof window !== \"undefined\") {\n window.location.reload();\n } else {\n console.warn(\n \"[HMR] Root or manually mounted instance modified. Full reload required.\"\n );\n }\n }\n queuePostFlushCb(() => {\n for (const instance of instances) {\n hmrDirtyComponents.delete(\n normalizeClassComponent(instance.type)\n );\n }\n });\n}\nfunction updateComponentDef(oldComp, newComp) {\n extend(oldComp, newComp);\n for (const key in oldComp) {\n if (key !== \"__file\" && !(key in newComp)) {\n delete oldComp[key];\n }\n }\n}\nfunction tryWrap(fn) {\n return (id, arg) => {\n try {\n return fn(id, arg);\n } catch (e) {\n console.error(e);\n console.warn(\n `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`\n );\n }\n };\n}\n\nlet devtools;\nlet buffer = [];\nlet devtoolsNotInstalled = false;\nfunction emit$1(event, ...args) {\n if (devtools) {\n devtools.emit(event, ...args);\n } else if (!devtoolsNotInstalled) {\n buffer.push({ event, args });\n }\n}\nfunction setDevtoolsHook(hook, target) {\n var _a, _b;\n devtools = hook;\n if (devtools) {\n devtools.enabled = true;\n buffer.forEach(({ event, args }) => devtools.emit(event, ...args));\n buffer = [];\n } else if (\n // handle late devtools injection - only do this if we are in an actual\n // browser environment to avoid the timer handle stalling test runner exit\n // (#4815)\n typeof window !== \"undefined\" && // some envs mock window but not fully\n window.HTMLElement && // also exclude jsdom\n !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes(\"jsdom\"))\n ) {\n const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];\n replay.push((newHook) => {\n setDevtoolsHook(newHook, target);\n });\n setTimeout(() => {\n if (!devtools) {\n target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;\n devtoolsNotInstalled = true;\n buffer = [];\n }\n }, 3e3);\n } else {\n devtoolsNotInstalled = true;\n buffer = [];\n }\n}\nfunction devtoolsInitApp(app, version) {\n emit$1(\"app:init\" /* APP_INIT */, app, version, {\n Fragment,\n Text,\n Comment,\n Static\n });\n}\nfunction devtoolsUnmountApp(app) {\n emit$1(\"app:unmount\" /* APP_UNMOUNT */, app);\n}\nconst devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:added\" /* COMPONENT_ADDED */\n);\nconst devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(\"component:updated\" /* COMPONENT_UPDATED */);\nconst _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:removed\" /* COMPONENT_REMOVED */\n);\nconst devtoolsComponentRemoved = (component) => {\n if (devtools && typeof devtools.cleanupBuffer === \"function\" && // remove the component if it wasn't buffered\n !devtools.cleanupBuffer(component)) {\n _devtoolsComponentRemoved(component);\n }\n};\nfunction createDevtoolsComponentHook(hook) {\n return (component) => {\n emit$1(\n hook,\n component.appContext.app,\n component.uid,\n component.parent ? component.parent.uid : void 0,\n component\n );\n };\n}\nconst devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(\n \"perf:start\" /* PERFORMANCE_START */\n);\nconst devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(\n \"perf:end\" /* PERFORMANCE_END */\n);\nfunction createDevtoolsPerformanceHook(hook) {\n return (component, type, time) => {\n emit$1(hook, component.appContext.app, component.uid, component, type, time);\n };\n}\nfunction devtoolsComponentEmit(component, event, params) {\n emit$1(\n \"component:emit\" /* COMPONENT_EMIT */,\n component.appContext.app,\n component,\n event,\n params\n );\n}\n\nfunction emit(instance, event, ...rawArgs) {\n if (instance.isUnmounted)\n return;\n const props = instance.vnode.props || EMPTY_OBJ;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const {\n emitsOptions,\n propsOptions: [propsOptions]\n } = instance;\n if (emitsOptions) {\n if (!(event in emitsOptions) && true) {\n if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {\n warn(\n `Component emitted event \"${event}\" but it is neither declared in the emits option nor as an \"${toHandlerKey(event)}\" prop.`\n );\n }\n } else {\n const validator = emitsOptions[event];\n if (isFunction(validator)) {\n const isValid = validator(...rawArgs);\n if (!isValid) {\n warn(\n `Invalid event arguments: event validation failed for event \"${event}\".`\n );\n }\n }\n }\n }\n }\n let args = rawArgs;\n const isModelListener = event.startsWith(\"update:\");\n const modelArg = isModelListener && event.slice(7);\n if (modelArg && modelArg in props) {\n const modifiersKey = `${modelArg === \"modelValue\" ? \"model\" : modelArg}Modifiers`;\n const { number, trim } = props[modifiersKey] || EMPTY_OBJ;\n if (trim) {\n args = rawArgs.map((a) => isString(a) ? a.trim() : a);\n }\n if (number) {\n args = rawArgs.map(looseToNumber);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentEmit(instance, event, args);\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const lowerCaseEvent = event.toLowerCase();\n if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {\n warn(\n `Event \"${lowerCaseEvent}\" is emitted in component ${formatComponentName(\n instance,\n instance.type\n )} but the handler is registered for \"${event}\". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use \"${hyphenate(event)}\" instead of \"${event}\".`\n );\n }\n }\n let handlerName;\n let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)\n props[handlerName = toHandlerKey(camelize(event))];\n if (!handler && isModelListener) {\n handler = props[handlerName = toHandlerKey(hyphenate(event))];\n }\n if (handler) {\n callWithAsyncErrorHandling(\n handler,\n instance,\n 6,\n args\n );\n }\n const onceHandler = props[handlerName + `Once`];\n if (onceHandler) {\n if (!instance.emitted) {\n instance.emitted = {};\n } else if (instance.emitted[handlerName]) {\n return;\n }\n instance.emitted[handlerName] = true;\n callWithAsyncErrorHandling(\n onceHandler,\n instance,\n 6,\n args\n );\n }\n}\nfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\n const cache = appContext.emitsCache;\n const cached = cache.get(comp);\n if (cached !== void 0) {\n return cached;\n }\n const raw = comp.emits;\n let normalized = {};\n let hasExtends = false;\n if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\n const extendEmits = (raw2) => {\n const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);\n if (normalizedFromExtend) {\n hasExtends = true;\n extend(normalized, normalizedFromExtend);\n }\n };\n if (!asMixin && appContext.mixins.length) {\n appContext.mixins.forEach(extendEmits);\n }\n if (comp.extends) {\n extendEmits(comp.extends);\n }\n if (comp.mixins) {\n comp.mixins.forEach(extendEmits);\n }\n }\n if (!raw && !hasExtends) {\n if (isObject(comp)) {\n cache.set(comp, null);\n }\n return null;\n }\n if (isArray(raw)) {\n raw.forEach((key) => normalized[key] = null);\n } else {\n extend(normalized, raw);\n }\n if (isObject(comp)) {\n cache.set(comp, normalized);\n }\n return normalized;\n}\nfunction isEmitListener(options, key) {\n if (!options || !isOn(key)) {\n return false;\n }\n key = key.slice(2).replace(/Once$/, \"\");\n return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);\n}\n\nlet currentRenderingInstance = null;\nlet currentScopeId = null;\nfunction setCurrentRenderingInstance(instance) {\n const prev = currentRenderingInstance;\n currentRenderingInstance = instance;\n currentScopeId = instance && instance.type.__scopeId || null;\n return prev;\n}\nfunction pushScopeId(id) {\n currentScopeId = id;\n}\nfunction popScopeId() {\n currentScopeId = null;\n}\nconst withScopeId = (_id) => withCtx;\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {\n if (!ctx)\n return fn;\n if (fn._n) {\n return fn;\n }\n const renderFnWithContext = (...args) => {\n if (renderFnWithContext._d) {\n setBlockTracking(-1);\n }\n const prevInstance = setCurrentRenderingInstance(ctx);\n let res;\n try {\n res = fn(...args);\n } finally {\n setCurrentRenderingInstance(prevInstance);\n if (renderFnWithContext._d) {\n setBlockTracking(1);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentUpdated(ctx);\n }\n return res;\n };\n renderFnWithContext._n = true;\n renderFnWithContext._c = true;\n renderFnWithContext._d = true;\n return renderFnWithContext;\n}\n\nlet accessedAttrs = false;\nfunction markAttrsAccessed() {\n accessedAttrs = true;\n}\nfunction renderComponentRoot(instance) {\n const {\n type: Component,\n vnode,\n proxy,\n withProxy,\n props,\n propsOptions: [propsOptions],\n slots,\n attrs,\n emit,\n render,\n renderCache,\n data,\n setupState,\n ctx,\n inheritAttrs\n } = instance;\n let result;\n let fallthroughAttrs;\n const prev = setCurrentRenderingInstance(instance);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n accessedAttrs = false;\n }\n try {\n if (vnode.shapeFlag & 4) {\n const proxyToUse = withProxy || proxy;\n result = normalizeVNode(\n render.call(\n proxyToUse,\n proxyToUse,\n renderCache,\n props,\n setupState,\n data,\n ctx\n )\n );\n fallthroughAttrs = attrs;\n } else {\n const render2 = Component;\n if (!!(process.env.NODE_ENV !== \"production\") && attrs === props) {\n markAttrsAccessed();\n }\n result = normalizeVNode(\n render2.length > 1 ? render2(\n props,\n !!(process.env.NODE_ENV !== \"production\") ? {\n get attrs() {\n markAttrsAccessed();\n return attrs;\n },\n slots,\n emit\n } : { attrs, slots, emit }\n ) : render2(\n props,\n null\n /* we know it doesn't need it */\n )\n );\n fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);\n }\n } catch (err) {\n blockStack.length = 0;\n handleError(err, instance, 1);\n result = createVNode(Comment);\n }\n let root = result;\n let setRoot = void 0;\n if (!!(process.env.NODE_ENV !== \"production\") && result.patchFlag > 0 && result.patchFlag & 2048) {\n [root, setRoot] = getChildRoot(result);\n }\n if (fallthroughAttrs && inheritAttrs !== false) {\n const keys = Object.keys(fallthroughAttrs);\n const { shapeFlag } = root;\n if (keys.length) {\n if (shapeFlag & (1 | 6)) {\n if (propsOptions && keys.some(isModelListener)) {\n fallthroughAttrs = filterModelListeners(\n fallthroughAttrs,\n propsOptions\n );\n }\n root = cloneVNode(root, fallthroughAttrs);\n } else if (!!(process.env.NODE_ENV !== \"production\") && !accessedAttrs && root.type !== Comment) {\n const allAttrs = Object.keys(attrs);\n const eventAttrs = [];\n const extraAttrs = [];\n for (let i = 0, l = allAttrs.length; i < l; i++) {\n const key = allAttrs[i];\n if (isOn(key)) {\n if (!isModelListener(key)) {\n eventAttrs.push(key[2].toLowerCase() + key.slice(3));\n }\n } else {\n extraAttrs.push(key);\n }\n }\n if (extraAttrs.length) {\n warn(\n `Extraneous non-props attributes (${extraAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`\n );\n }\n if (eventAttrs.length) {\n warn(\n `Extraneous non-emits event listeners (${eventAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the \"emits\" option.`\n );\n }\n }\n }\n }\n if (vnode.dirs) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n warn(\n `Runtime directive used on component with non-element root node. The directives will not function as intended.`\n );\n }\n root = cloneVNode(root);\n root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;\n }\n if (vnode.transition) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n warn(\n `Component inside renders non-element root node that cannot be animated.`\n );\n }\n root.transition = vnode.transition;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && setRoot) {\n setRoot(root);\n } else {\n result = root;\n }\n setCurrentRenderingInstance(prev);\n return result;\n}\nconst getChildRoot = (vnode) => {\n const rawChildren = vnode.children;\n const dynamicChildren = vnode.dynamicChildren;\n const childRoot = filterSingleRoot(rawChildren);\n if (!childRoot) {\n return [vnode, void 0];\n }\n const index = rawChildren.indexOf(childRoot);\n const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;\n const setRoot = (updatedRoot) => {\n rawChildren[index] = updatedRoot;\n if (dynamicChildren) {\n if (dynamicIndex > -1) {\n dynamicChildren[dynamicIndex] = updatedRoot;\n } else if (updatedRoot.patchFlag > 0) {\n vnode.dynamicChildren = [...dynamicChildren, updatedRoot];\n }\n }\n };\n return [normalizeVNode(childRoot), setRoot];\n};\nfunction filterSingleRoot(children) {\n let singleRoot;\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (isVNode(child)) {\n if (child.type !== Comment || child.children === \"v-if\") {\n if (singleRoot) {\n return;\n } else {\n singleRoot = child;\n }\n }\n } else {\n return;\n }\n }\n return singleRoot;\n}\nconst getFunctionalFallthrough = (attrs) => {\n let res;\n for (const key in attrs) {\n if (key === \"class\" || key === \"style\" || isOn(key)) {\n (res || (res = {}))[key] = attrs[key];\n }\n }\n return res;\n};\nconst filterModelListeners = (attrs, props) => {\n const res = {};\n for (const key in attrs) {\n if (!isModelListener(key) || !(key.slice(9) in props)) {\n res[key] = attrs[key];\n }\n }\n return res;\n};\nconst isElementRoot = (vnode) => {\n return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;\n};\nfunction shouldUpdateComponent(prevVNode, nextVNode, optimized) {\n const { props: prevProps, children: prevChildren, component } = prevVNode;\n const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;\n const emits = component.emitsOptions;\n if (!!(process.env.NODE_ENV !== \"production\") && (prevChildren || nextChildren) && isHmrUpdating) {\n return true;\n }\n if (nextVNode.dirs || nextVNode.transition) {\n return true;\n }\n if (optimized && patchFlag >= 0) {\n if (patchFlag & 1024) {\n return true;\n }\n if (patchFlag & 16) {\n if (!prevProps) {\n return !!nextProps;\n }\n return hasPropsChanged(prevProps, nextProps, emits);\n } else if (patchFlag & 8) {\n const dynamicProps = nextVNode.dynamicProps;\n for (let i = 0; i < dynamicProps.length; i++) {\n const key = dynamicProps[i];\n if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {\n return true;\n }\n }\n }\n } else {\n if (prevChildren || nextChildren) {\n if (!nextChildren || !nextChildren.$stable) {\n return true;\n }\n }\n if (prevProps === nextProps) {\n return false;\n }\n if (!prevProps) {\n return !!nextProps;\n }\n if (!nextProps) {\n return true;\n }\n return hasPropsChanged(prevProps, nextProps, emits);\n }\n return false;\n}\nfunction hasPropsChanged(prevProps, nextProps, emitsOptions) {\n const nextKeys = Object.keys(nextProps);\n if (nextKeys.length !== Object.keys(prevProps).length) {\n return true;\n }\n for (let i = 0; i < nextKeys.length; i++) {\n const key = nextKeys[i];\n if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {\n return true;\n }\n }\n return false;\n}\nfunction updateHOCHostEl({ vnode, parent }, el) {\n while (parent && parent.subTree === vnode) {\n (vnode = parent.vnode).el = el;\n parent = parent.parent;\n }\n}\n\nconst COMPONENTS = \"components\";\nconst DIRECTIVES = \"directives\";\nfunction resolveComponent(name, maybeSelfReference) {\n return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;\n}\nconst NULL_DYNAMIC_COMPONENT = Symbol.for(\"v-ndc\");\nfunction resolveDynamicComponent(component) {\n if (isString(component)) {\n return resolveAsset(COMPONENTS, component, false) || component;\n } else {\n return component || NULL_DYNAMIC_COMPONENT;\n }\n}\nfunction resolveDirective(name) {\n return resolveAsset(DIRECTIVES, name);\n}\nfunction resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {\n const instance = currentRenderingInstance || currentInstance;\n if (instance) {\n const Component = instance.type;\n if (type === COMPONENTS) {\n const selfName = getComponentName(\n Component,\n false\n /* do not include inferred name to avoid breaking existing code */\n );\n if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {\n return Component;\n }\n }\n const res = (\n // local registration\n // check instance[type] first which is resolved for options API\n resolve(instance[type] || Component[type], name) || // global registration\n resolve(instance.appContext[type], name)\n );\n if (!res && maybeSelfReference) {\n return Component;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && warnMissing && !res) {\n const extra = type === COMPONENTS ? `\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;\n warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);\n }\n return res;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`\n );\n }\n}\nfunction resolve(registry, name) {\n return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);\n}\n\nconst isSuspense = (type) => type.__isSuspense;\nconst SuspenseImpl = {\n name: \"Suspense\",\n // In order to make Suspense tree-shakable, we need to avoid importing it\n // directly in the renderer. The renderer checks for the __isSuspense flag\n // on a vnode's type and calls the `process` method, passing in renderer\n // internals.\n __isSuspense: true,\n process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {\n if (n1 == null) {\n mountSuspense(\n n2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n isSVG,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n } else {\n patchSuspense(\n n1,\n n2,\n container,\n anchor,\n parentComponent,\n isSVG,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n }\n },\n hydrate: hydrateSuspense,\n create: createSuspenseBoundary,\n normalize: normalizeSuspenseChildren\n};\nconst Suspense = SuspenseImpl ;\nfunction triggerEvent(vnode, name) {\n const eventListener = vnode.props && vnode.props[name];\n if (isFunction(eventListener)) {\n eventListener();\n }\n}\nfunction mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {\n const {\n p: patch,\n o: { createElement }\n } = rendererInternals;\n const hiddenContainer = createElement(\"div\");\n const suspense = vnode.suspense = createSuspenseBoundary(\n vnode,\n parentSuspense,\n parentComponent,\n container,\n hiddenContainer,\n anchor,\n isSVG,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n patch(\n null,\n suspense.pendingBranch = vnode.ssContent,\n hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds\n );\n if (suspense.deps > 0) {\n triggerEvent(vnode, \"onPending\");\n triggerEvent(vnode, \"onFallback\");\n patch(\n null,\n vnode.ssFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n isSVG,\n slotScopeIds\n );\n setActiveBranch(suspense, vnode.ssFallback);\n } else {\n suspense.resolve(false, true);\n }\n}\nfunction patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {\n const suspense = n2.suspense = n1.suspense;\n suspense.vnode = n2;\n n2.el = n1.el;\n const newBranch = n2.ssContent;\n const newFallback = n2.ssFallback;\n const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;\n if (pendingBranch) {\n suspense.pendingBranch = newBranch;\n if (isSameVNodeType(newBranch, pendingBranch)) {\n patch(\n pendingBranch,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else if (isInFallback) {\n patch(\n activeBranch,\n newFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n isSVG,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newFallback);\n }\n } else {\n suspense.pendingId++;\n if (isHydrating) {\n suspense.isHydrating = false;\n suspense.activeBranch = pendingBranch;\n } else {\n unmount(pendingBranch, parentComponent, suspense);\n }\n suspense.deps = 0;\n suspense.effects.length = 0;\n suspense.hiddenContainer = createElement(\"div\");\n if (isInFallback) {\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else {\n patch(\n activeBranch,\n newFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n isSVG,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newFallback);\n }\n } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n patch(\n activeBranch,\n newBranch,\n container,\n anchor,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n suspense.resolve(true);\n } else {\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n }\n }\n }\n } else {\n if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n patch(\n activeBranch,\n newBranch,\n container,\n anchor,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newBranch);\n } else {\n triggerEvent(n2, \"onPending\");\n suspense.pendingBranch = newBranch;\n suspense.pendingId++;\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n isSVG,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else {\n const { timeout, pendingId } = suspense;\n if (timeout > 0) {\n setTimeout(() => {\n if (suspense.pendingId === pendingId) {\n suspense.fallback(newFallback);\n }\n }, timeout);\n } else if (timeout === 0) {\n suspense.fallback(newFallback);\n }\n }\n }\n }\n}\nlet hasWarned = false;\nfunction createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {\n if (!!(process.env.NODE_ENV !== \"production\") && true && !hasWarned) {\n hasWarned = true;\n console[console.info ? \"info\" : \"log\"](\n ` is an experimental feature and its API will likely change.`\n );\n }\n const {\n p: patch,\n m: move,\n um: unmount,\n n: next,\n o: { parentNode, remove }\n } = rendererInternals;\n let parentSuspenseId;\n const isSuspensible = isVNodeSuspensible(vnode);\n if (isSuspensible) {\n if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {\n parentSuspenseId = parentSuspense.pendingId;\n parentSuspense.deps++;\n }\n }\n const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n assertNumber(timeout, `Suspense timeout`);\n }\n const suspense = {\n vnode,\n parent: parentSuspense,\n parentComponent,\n isSVG,\n container,\n hiddenContainer,\n anchor,\n deps: 0,\n pendingId: 0,\n timeout: typeof timeout === \"number\" ? timeout : -1,\n activeBranch: null,\n pendingBranch: null,\n isInFallback: true,\n isHydrating,\n isUnmounted: false,\n effects: [],\n resolve(resume = false, sync = false) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n if (!resume && !suspense.pendingBranch) {\n throw new Error(\n `suspense.resolve() is called without a pending branch.`\n );\n }\n if (suspense.isUnmounted) {\n throw new Error(\n `suspense.resolve() is called on an already unmounted suspense boundary.`\n );\n }\n }\n const {\n vnode: vnode2,\n activeBranch,\n pendingBranch,\n pendingId,\n effects,\n parentComponent: parentComponent2,\n container: container2\n } = suspense;\n let delayEnter = false;\n if (suspense.isHydrating) {\n suspense.isHydrating = false;\n } else if (!resume) {\n delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === \"out-in\";\n if (delayEnter) {\n activeBranch.transition.afterLeave = () => {\n if (pendingId === suspense.pendingId) {\n move(pendingBranch, container2, anchor2, 0);\n queuePostFlushCb(effects);\n }\n };\n }\n let { anchor: anchor2 } = suspense;\n if (activeBranch) {\n anchor2 = next(activeBranch);\n unmount(activeBranch, parentComponent2, suspense, true);\n }\n if (!delayEnter) {\n move(pendingBranch, container2, anchor2, 0);\n }\n }\n setActiveBranch(suspense, pendingBranch);\n suspense.pendingBranch = null;\n suspense.isInFallback = false;\n let parent = suspense.parent;\n let hasUnresolvedAncestor = false;\n while (parent) {\n if (parent.pendingBranch) {\n parent.effects.push(...effects);\n hasUnresolvedAncestor = true;\n break;\n }\n parent = parent.parent;\n }\n if (!hasUnresolvedAncestor && !delayEnter) {\n queuePostFlushCb(effects);\n }\n suspense.effects = [];\n if (isSuspensible) {\n if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {\n parentSuspense.deps--;\n if (parentSuspense.deps === 0 && !sync) {\n parentSuspense.resolve();\n }\n }\n }\n triggerEvent(vnode2, \"onResolve\");\n },\n fallback(fallbackVNode) {\n if (!suspense.pendingBranch) {\n return;\n }\n const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;\n triggerEvent(vnode2, \"onFallback\");\n const anchor2 = next(activeBranch);\n const mountFallback = () => {\n if (!suspense.isInFallback) {\n return;\n }\n patch(\n null,\n fallbackVNode,\n container2,\n anchor2,\n parentComponent2,\n null,\n // fallback tree will not have suspense context\n isSVG2,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, fallbackVNode);\n };\n const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === \"out-in\";\n if (delayEnter) {\n activeBranch.transition.afterLeave = mountFallback;\n }\n suspense.isInFallback = true;\n unmount(\n activeBranch,\n parentComponent2,\n null,\n // no suspense so unmount hooks fire now\n true\n // shouldRemove\n );\n if (!delayEnter) {\n mountFallback();\n }\n },\n move(container2, anchor2, type) {\n suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);\n suspense.container = container2;\n },\n next() {\n return suspense.activeBranch && next(suspense.activeBranch);\n },\n registerDep(instance, setupRenderEffect) {\n const isInPendingSuspense = !!suspense.pendingBranch;\n if (isInPendingSuspense) {\n suspense.deps++;\n }\n const hydratedEl = instance.vnode.el;\n instance.asyncDep.catch((err) => {\n handleError(err, instance, 0);\n }).then((asyncSetupResult) => {\n if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {\n return;\n }\n instance.asyncResolved = true;\n const { vnode: vnode2 } = instance;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n pushWarningContext(vnode2);\n }\n handleSetupResult(instance, asyncSetupResult, false);\n if (hydratedEl) {\n vnode2.el = hydratedEl;\n }\n const placeholder = !hydratedEl && instance.subTree.el;\n setupRenderEffect(\n instance,\n vnode2,\n // component may have been moved before resolve.\n // if this is not a hydration, instance.subTree will be the comment\n // placeholder.\n parentNode(hydratedEl || instance.subTree.el),\n // anchor will not be used if this is hydration, so only need to\n // consider the comment placeholder case.\n hydratedEl ? null : next(instance.subTree),\n suspense,\n isSVG,\n optimized\n );\n if (placeholder) {\n remove(placeholder);\n }\n updateHOCHostEl(instance, vnode2.el);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n popWarningContext();\n }\n if (isInPendingSuspense && --suspense.deps === 0) {\n suspense.resolve();\n }\n });\n },\n unmount(parentSuspense2, doRemove) {\n suspense.isUnmounted = true;\n if (suspense.activeBranch) {\n unmount(\n suspense.activeBranch,\n parentComponent,\n parentSuspense2,\n doRemove\n );\n }\n if (suspense.pendingBranch) {\n unmount(\n suspense.pendingBranch,\n parentComponent,\n parentSuspense2,\n doRemove\n );\n }\n }\n };\n return suspense;\n}\nfunction hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) {\n const suspense = vnode.suspense = createSuspenseBoundary(\n vnode,\n parentSuspense,\n parentComponent,\n node.parentNode,\n document.createElement(\"div\"),\n null,\n isSVG,\n slotScopeIds,\n optimized,\n rendererInternals,\n true\n /* hydrating */\n );\n const result = hydrateNode(\n node,\n suspense.pendingBranch = vnode.ssContent,\n parentComponent,\n suspense,\n slotScopeIds,\n optimized\n );\n if (suspense.deps === 0) {\n suspense.resolve(false, true);\n }\n return result;\n}\nfunction normalizeSuspenseChildren(vnode) {\n const { shapeFlag, children } = vnode;\n const isSlotChildren = shapeFlag & 32;\n vnode.ssContent = normalizeSuspenseSlot(\n isSlotChildren ? children.default : children\n );\n vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);\n}\nfunction normalizeSuspenseSlot(s) {\n let block;\n if (isFunction(s)) {\n const trackBlock = isBlockTreeEnabled && s._c;\n if (trackBlock) {\n s._d = false;\n openBlock();\n }\n s = s();\n if (trackBlock) {\n s._d = true;\n block = currentBlock;\n closeBlock();\n }\n }\n if (isArray(s)) {\n const singleChild = filterSingleRoot(s);\n if (!!(process.env.NODE_ENV !== \"production\") && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {\n warn(` slots expect a single root node.`);\n }\n s = singleChild;\n }\n s = normalizeVNode(s);\n if (block && !s.dynamicChildren) {\n s.dynamicChildren = block.filter((c) => c !== s);\n }\n return s;\n}\nfunction queueEffectWithSuspense(fn, suspense) {\n if (suspense && suspense.pendingBranch) {\n if (isArray(fn)) {\n suspense.effects.push(...fn);\n } else {\n suspense.effects.push(fn);\n }\n } else {\n queuePostFlushCb(fn);\n }\n}\nfunction setActiveBranch(suspense, branch) {\n suspense.activeBranch = branch;\n const { vnode, parentComponent } = suspense;\n const el = vnode.el = branch.el;\n if (parentComponent && parentComponent.subTree === vnode) {\n parentComponent.vnode.el = el;\n updateHOCHostEl(parentComponent, el);\n }\n}\nfunction isVNodeSuspensible(vnode) {\n var _a;\n return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;\n}\n\nfunction watchEffect(effect, options) {\n return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"post\" }) : { flush: \"post\" }\n );\n}\nfunction watchSyncEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"sync\" }) : { flush: \"sync\" }\n );\n}\nconst INITIAL_WATCHER_VALUE = {};\nfunction watch(source, cb, options) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isFunction(cb)) {\n warn(\n `\\`watch(fn, options?)\\` signature has been moved to a separate API. Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only supports \\`watch(source, cb, options?) signature.`\n );\n }\n return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {\n var _a;\n if (!!(process.env.NODE_ENV !== \"production\") && !cb) {\n if (immediate !== void 0) {\n warn(\n `watch() \"immediate\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n if (deep !== void 0) {\n warn(\n `watch() \"deep\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n }\n const warnInvalidSource = (s) => {\n warn(\n `Invalid watch source: `,\n s,\n `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`\n );\n };\n const instance = getCurrentScope() === ((_a = currentInstance) == null ? void 0 : _a.scope) ? currentInstance : null;\n let getter;\n let forceTrigger = false;\n let isMultiSource = false;\n if (isRef(source)) {\n getter = () => source.value;\n forceTrigger = isShallow$1(source);\n } else if (isReactive(source)) {\n getter = () => source;\n deep = true;\n } else if (isArray(source)) {\n isMultiSource = true;\n forceTrigger = source.some((s) => isReactive(s) || isShallow$1(s));\n getter = () => source.map((s) => {\n if (isRef(s)) {\n return s.value;\n } else if (isReactive(s)) {\n return traverse(s);\n } else if (isFunction(s)) {\n return callWithErrorHandling(s, instance, 2);\n } else {\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(s);\n }\n });\n } else if (isFunction(source)) {\n if (cb) {\n getter = () => callWithErrorHandling(source, instance, 2);\n } else {\n getter = () => {\n if (instance && instance.isUnmounted) {\n return;\n }\n if (cleanup) {\n cleanup();\n }\n return callWithAsyncErrorHandling(\n source,\n instance,\n 3,\n [onCleanup]\n );\n };\n }\n } else {\n getter = NOOP;\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(source);\n }\n if (cb && deep) {\n const baseGetter = getter;\n getter = () => traverse(baseGetter());\n }\n let cleanup;\n let onCleanup = (fn) => {\n cleanup = effect.onStop = () => {\n callWithErrorHandling(fn, instance, 4);\n };\n };\n let ssrCleanup;\n if (isInSSRComponentSetup) {\n onCleanup = NOOP;\n if (!cb) {\n getter();\n } else if (immediate) {\n callWithAsyncErrorHandling(cb, instance, 3, [\n getter(),\n isMultiSource ? [] : void 0,\n onCleanup\n ]);\n }\n if (flush === \"sync\") {\n const ctx = useSSRContext();\n ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);\n } else {\n return NOOP;\n }\n }\n let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n const job = () => {\n if (!effect.active) {\n return;\n }\n if (cb) {\n const newValue = effect.run();\n if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {\n if (cleanup) {\n cleanup();\n }\n callWithAsyncErrorHandling(cb, instance, 3, [\n newValue,\n // pass undefined as the old value when it's changed for the first time\n oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\n onCleanup\n ]);\n oldValue = newValue;\n }\n } else {\n effect.run();\n }\n };\n job.allowRecurse = !!cb;\n let scheduler;\n if (flush === \"sync\") {\n scheduler = job;\n } else if (flush === \"post\") {\n scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);\n } else {\n job.pre = true;\n if (instance)\n job.id = instance.uid;\n scheduler = () => queueJob(job);\n }\n const effect = new ReactiveEffect(getter, scheduler);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n effect.onTrack = onTrack;\n effect.onTrigger = onTrigger;\n }\n if (cb) {\n if (immediate) {\n job();\n } else {\n oldValue = effect.run();\n }\n } else if (flush === \"post\") {\n queuePostRenderEffect(\n effect.run.bind(effect),\n instance && instance.suspense\n );\n } else {\n effect.run();\n }\n const unwatch = () => {\n effect.stop();\n if (instance && instance.scope) {\n remove(instance.scope.effects, effect);\n }\n };\n if (ssrCleanup)\n ssrCleanup.push(unwatch);\n return unwatch;\n}\nfunction instanceWatch(source, value, options) {\n const publicThis = this.proxy;\n const getter = isString(source) ? source.includes(\".\") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);\n let cb;\n if (isFunction(value)) {\n cb = value;\n } else {\n cb = value.handler;\n options = value;\n }\n const cur = currentInstance;\n setCurrentInstance(this);\n const res = doWatch(getter, cb.bind(publicThis), options);\n if (cur) {\n setCurrentInstance(cur);\n } else {\n unsetCurrentInstance();\n }\n return res;\n}\nfunction createPathGetter(ctx, path) {\n const segments = path.split(\".\");\n return () => {\n let cur = ctx;\n for (let i = 0; i < segments.length && cur; i++) {\n cur = cur[segments[i]];\n }\n return cur;\n };\n}\nfunction traverse(value, seen) {\n if (!isObject(value) || value[\"__v_skip\"]) {\n return value;\n }\n seen = seen || /* @__PURE__ */ new Set();\n if (seen.has(value)) {\n return value;\n }\n seen.add(value);\n if (isRef(value)) {\n traverse(value.value, seen);\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n traverse(value[i], seen);\n }\n } else if (isSet(value) || isMap(value)) {\n value.forEach((v) => {\n traverse(v, seen);\n });\n } else if (isPlainObject(value)) {\n for (const key in value) {\n traverse(value[key], seen);\n }\n }\n return value;\n}\n\nfunction validateDirectiveName(name) {\n if (isBuiltInDirective(name)) {\n warn(\"Do not use built-in directive ids as custom directive id: \" + name);\n }\n}\nfunction withDirectives(vnode, directives) {\n const internalInstance = currentRenderingInstance;\n if (internalInstance === null) {\n !!(process.env.NODE_ENV !== \"production\") && warn(`withDirectives can only be used inside render functions.`);\n return vnode;\n }\n const instance = getExposeProxy(internalInstance) || internalInstance.proxy;\n const bindings = vnode.dirs || (vnode.dirs = []);\n for (let i = 0; i < directives.length; i++) {\n let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\n if (dir) {\n if (isFunction(dir)) {\n dir = {\n mounted: dir,\n updated: dir\n };\n }\n if (dir.deep) {\n traverse(value);\n }\n bindings.push({\n dir,\n instance,\n value,\n oldValue: void 0,\n arg,\n modifiers\n });\n }\n }\n return vnode;\n}\nfunction invokeDirectiveHook(vnode, prevVNode, instance, name) {\n const bindings = vnode.dirs;\n const oldBindings = prevVNode && prevVNode.dirs;\n for (let i = 0; i < bindings.length; i++) {\n const binding = bindings[i];\n if (oldBindings) {\n binding.oldValue = oldBindings[i].value;\n }\n let hook = binding.dir[name];\n if (hook) {\n pauseTracking();\n callWithAsyncErrorHandling(hook, instance, 8, [\n vnode.el,\n binding,\n vnode,\n prevVNode\n ]);\n resetTracking();\n }\n }\n}\n\nconst leaveCbKey = Symbol(\"_leaveCb\");\nconst enterCbKey = Symbol(\"_enterCb\");\nfunction useTransitionState() {\n const state = {\n isMounted: false,\n isLeaving: false,\n isUnmounting: false,\n leavingVNodes: /* @__PURE__ */ new Map()\n };\n onMounted(() => {\n state.isMounted = true;\n });\n onBeforeUnmount(() => {\n state.isUnmounting = true;\n });\n return state;\n}\nconst TransitionHookValidator = [Function, Array];\nconst BaseTransitionPropsValidators = {\n mode: String,\n appear: Boolean,\n persisted: Boolean,\n // enter\n onBeforeEnter: TransitionHookValidator,\n onEnter: TransitionHookValidator,\n onAfterEnter: TransitionHookValidator,\n onEnterCancelled: TransitionHookValidator,\n // leave\n onBeforeLeave: TransitionHookValidator,\n onLeave: TransitionHookValidator,\n onAfterLeave: TransitionHookValidator,\n onLeaveCancelled: TransitionHookValidator,\n // appear\n onBeforeAppear: TransitionHookValidator,\n onAppear: TransitionHookValidator,\n onAfterAppear: TransitionHookValidator,\n onAppearCancelled: TransitionHookValidator\n};\nconst BaseTransitionImpl = {\n name: `BaseTransition`,\n props: BaseTransitionPropsValidators,\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const state = useTransitionState();\n let prevTransitionKey;\n return () => {\n const children = slots.default && getTransitionRawChildren(slots.default(), true);\n if (!children || !children.length) {\n return;\n }\n let child = children[0];\n if (children.length > 1) {\n let hasFound = false;\n for (const c of children) {\n if (c.type !== Comment) {\n if (!!(process.env.NODE_ENV !== \"production\") && hasFound) {\n warn(\n \" can only be used on a single element or component. Use for lists.\"\n );\n break;\n }\n child = c;\n hasFound = true;\n if (!!!(process.env.NODE_ENV !== \"production\"))\n break;\n }\n }\n }\n const rawProps = toRaw(props);\n const { mode } = rawProps;\n if (!!(process.env.NODE_ENV !== \"production\") && mode && mode !== \"in-out\" && mode !== \"out-in\" && mode !== \"default\") {\n warn(`invalid mode: ${mode}`);\n }\n if (state.isLeaving) {\n return emptyPlaceholder(child);\n }\n const innerChild = getKeepAliveChild(child);\n if (!innerChild) {\n return emptyPlaceholder(child);\n }\n const enterHooks = resolveTransitionHooks(\n innerChild,\n rawProps,\n state,\n instance\n );\n setTransitionHooks(innerChild, enterHooks);\n const oldChild = instance.subTree;\n const oldInnerChild = oldChild && getKeepAliveChild(oldChild);\n let transitionKeyChanged = false;\n const { getTransitionKey } = innerChild.type;\n if (getTransitionKey) {\n const key = getTransitionKey();\n if (prevTransitionKey === void 0) {\n prevTransitionKey = key;\n } else if (key !== prevTransitionKey) {\n prevTransitionKey = key;\n transitionKeyChanged = true;\n }\n }\n if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {\n const leavingHooks = resolveTransitionHooks(\n oldInnerChild,\n rawProps,\n state,\n instance\n );\n setTransitionHooks(oldInnerChild, leavingHooks);\n if (mode === \"out-in\") {\n state.isLeaving = true;\n leavingHooks.afterLeave = () => {\n state.isLeaving = false;\n if (instance.update.active !== false) {\n instance.update();\n }\n };\n return emptyPlaceholder(child);\n } else if (mode === \"in-out\" && innerChild.type !== Comment) {\n leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {\n const leavingVNodesCache = getLeavingNodesForType(\n state,\n oldInnerChild\n );\n leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;\n el[leaveCbKey] = () => {\n earlyRemove();\n el[leaveCbKey] = void 0;\n delete enterHooks.delayedLeave;\n };\n enterHooks.delayedLeave = delayedLeave;\n };\n }\n }\n return child;\n };\n }\n};\nconst BaseTransition = BaseTransitionImpl;\nfunction getLeavingNodesForType(state, vnode) {\n const { leavingVNodes } = state;\n let leavingVNodesCache = leavingVNodes.get(vnode.type);\n if (!leavingVNodesCache) {\n leavingVNodesCache = /* @__PURE__ */ Object.create(null);\n leavingVNodes.set(vnode.type, leavingVNodesCache);\n }\n return leavingVNodesCache;\n}\nfunction resolveTransitionHooks(vnode, props, state, instance) {\n const {\n appear,\n mode,\n persisted = false,\n onBeforeEnter,\n onEnter,\n onAfterEnter,\n onEnterCancelled,\n onBeforeLeave,\n onLeave,\n onAfterLeave,\n onLeaveCancelled,\n onBeforeAppear,\n onAppear,\n onAfterAppear,\n onAppearCancelled\n } = props;\n const key = String(vnode.key);\n const leavingVNodesCache = getLeavingNodesForType(state, vnode);\n const callHook = (hook, args) => {\n hook && callWithAsyncErrorHandling(\n hook,\n instance,\n 9,\n args\n );\n };\n const callAsyncHook = (hook, args) => {\n const done = args[1];\n callHook(hook, args);\n if (isArray(hook)) {\n if (hook.every((hook2) => hook2.length <= 1))\n done();\n } else if (hook.length <= 1) {\n done();\n }\n };\n const hooks = {\n mode,\n persisted,\n beforeEnter(el) {\n let hook = onBeforeEnter;\n if (!state.isMounted) {\n if (appear) {\n hook = onBeforeAppear || onBeforeEnter;\n } else {\n return;\n }\n }\n if (el[leaveCbKey]) {\n el[leaveCbKey](\n true\n /* cancelled */\n );\n }\n const leavingVNode = leavingVNodesCache[key];\n if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {\n leavingVNode.el[leaveCbKey]();\n }\n callHook(hook, [el]);\n },\n enter(el) {\n let hook = onEnter;\n let afterHook = onAfterEnter;\n let cancelHook = onEnterCancelled;\n if (!state.isMounted) {\n if (appear) {\n hook = onAppear || onEnter;\n afterHook = onAfterAppear || onAfterEnter;\n cancelHook = onAppearCancelled || onEnterCancelled;\n } else {\n return;\n }\n }\n let called = false;\n const done = el[enterCbKey] = (cancelled) => {\n if (called)\n return;\n called = true;\n if (cancelled) {\n callHook(cancelHook, [el]);\n } else {\n callHook(afterHook, [el]);\n }\n if (hooks.delayedLeave) {\n hooks.delayedLeave();\n }\n el[enterCbKey] = void 0;\n };\n if (hook) {\n callAsyncHook(hook, [el, done]);\n } else {\n done();\n }\n },\n leave(el, remove) {\n const key2 = String(vnode.key);\n if (el[enterCbKey]) {\n el[enterCbKey](\n true\n /* cancelled */\n );\n }\n if (state.isUnmounting) {\n return remove();\n }\n callHook(onBeforeLeave, [el]);\n let called = false;\n const done = el[leaveCbKey] = (cancelled) => {\n if (called)\n return;\n called = true;\n remove();\n if (cancelled) {\n callHook(onLeaveCancelled, [el]);\n } else {\n callHook(onAfterLeave, [el]);\n }\n el[leaveCbKey] = void 0;\n if (leavingVNodesCache[key2] === vnode) {\n delete leavingVNodesCache[key2];\n }\n };\n leavingVNodesCache[key2] = vnode;\n if (onLeave) {\n callAsyncHook(onLeave, [el, done]);\n } else {\n done();\n }\n },\n clone(vnode2) {\n return resolveTransitionHooks(vnode2, props, state, instance);\n }\n };\n return hooks;\n}\nfunction emptyPlaceholder(vnode) {\n if (isKeepAlive(vnode)) {\n vnode = cloneVNode(vnode);\n vnode.children = null;\n return vnode;\n }\n}\nfunction getKeepAliveChild(vnode) {\n return isKeepAlive(vnode) ? vnode.children ? vnode.children[0] : void 0 : vnode;\n}\nfunction setTransitionHooks(vnode, hooks) {\n if (vnode.shapeFlag & 6 && vnode.component) {\n setTransitionHooks(vnode.component.subTree, hooks);\n } else if (vnode.shapeFlag & 128) {\n vnode.ssContent.transition = hooks.clone(vnode.ssContent);\n vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);\n } else {\n vnode.transition = hooks;\n }\n}\nfunction getTransitionRawChildren(children, keepComment = false, parentKey) {\n let ret = [];\n let keyedFragmentCount = 0;\n for (let i = 0; i < children.length; i++) {\n let child = children[i];\n const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);\n if (child.type === Fragment) {\n if (child.patchFlag & 128)\n keyedFragmentCount++;\n ret = ret.concat(\n getTransitionRawChildren(child.children, keepComment, key)\n );\n } else if (keepComment || child.type !== Comment) {\n ret.push(key != null ? cloneVNode(child, { key }) : child);\n }\n }\n if (keyedFragmentCount > 1) {\n for (let i = 0; i < ret.length; i++) {\n ret[i].patchFlag = -2;\n }\n }\n return ret;\n}\n\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineComponent(options, extraOptions) {\n return isFunction(options) ? (\n // #8326: extend call and options.name access are considered side-effects\n // by Rollup, so we have to wrap it in a pure-annotated IIFE.\n /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()\n ) : options;\n}\n\nconst isAsyncWrapper = (i) => !!i.type.__asyncLoader;\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineAsyncComponent(source) {\n if (isFunction(source)) {\n source = { loader: source };\n }\n const {\n loader,\n loadingComponent,\n errorComponent,\n delay = 200,\n timeout,\n // undefined = never times out\n suspensible = true,\n onError: userOnError\n } = source;\n let pendingRequest = null;\n let resolvedComp;\n let retries = 0;\n const retry = () => {\n retries++;\n pendingRequest = null;\n return load();\n };\n const load = () => {\n let thisRequest;\n return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {\n err = err instanceof Error ? err : new Error(String(err));\n if (userOnError) {\n return new Promise((resolve, reject) => {\n const userRetry = () => resolve(retry());\n const userFail = () => reject(err);\n userOnError(err, userRetry, userFail, retries + 1);\n });\n } else {\n throw err;\n }\n }).then((comp) => {\n if (thisRequest !== pendingRequest && pendingRequest) {\n return pendingRequest;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && !comp) {\n warn(\n `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`\n );\n }\n if (comp && (comp.__esModule || comp[Symbol.toStringTag] === \"Module\")) {\n comp = comp.default;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && comp && !isObject(comp) && !isFunction(comp)) {\n throw new Error(`Invalid async component load result: ${comp}`);\n }\n resolvedComp = comp;\n return comp;\n }));\n };\n return defineComponent({\n name: \"AsyncComponentWrapper\",\n __asyncLoader: load,\n get __asyncResolved() {\n return resolvedComp;\n },\n setup() {\n const instance = currentInstance;\n if (resolvedComp) {\n return () => createInnerComp(resolvedComp, instance);\n }\n const onError = (err) => {\n pendingRequest = null;\n handleError(\n err,\n instance,\n 13,\n !errorComponent\n /* do not throw in dev if user provided error component */\n );\n };\n if (suspensible && instance.suspense || isInSSRComponentSetup) {\n return load().then((comp) => {\n return () => createInnerComp(comp, instance);\n }).catch((err) => {\n onError(err);\n return () => errorComponent ? createVNode(errorComponent, {\n error: err\n }) : null;\n });\n }\n const loaded = ref(false);\n const error = ref();\n const delayed = ref(!!delay);\n if (delay) {\n setTimeout(() => {\n delayed.value = false;\n }, delay);\n }\n if (timeout != null) {\n setTimeout(() => {\n if (!loaded.value && !error.value) {\n const err = new Error(\n `Async component timed out after ${timeout}ms.`\n );\n onError(err);\n error.value = err;\n }\n }, timeout);\n }\n load().then(() => {\n loaded.value = true;\n if (instance.parent && isKeepAlive(instance.parent.vnode)) {\n queueJob(instance.parent.update);\n }\n }).catch((err) => {\n onError(err);\n error.value = err;\n });\n return () => {\n if (loaded.value && resolvedComp) {\n return createInnerComp(resolvedComp, instance);\n } else if (error.value && errorComponent) {\n return createVNode(errorComponent, {\n error: error.value\n });\n } else if (loadingComponent && !delayed.value) {\n return createVNode(loadingComponent);\n }\n };\n }\n });\n}\nfunction createInnerComp(comp, parent) {\n const { ref: ref2, props, children, ce } = parent.vnode;\n const vnode = createVNode(comp, props, children);\n vnode.ref = ref2;\n vnode.ce = ce;\n delete parent.vnode.ce;\n return vnode;\n}\n\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\nconst KeepAliveImpl = {\n name: `KeepAlive`,\n // Marker for special handling inside the renderer. We are not using a ===\n // check directly on KeepAlive in the renderer, because importing it directly\n // would prevent it from being tree-shaken.\n __isKeepAlive: true,\n props: {\n include: [String, RegExp, Array],\n exclude: [String, RegExp, Array],\n max: [String, Number]\n },\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const sharedContext = instance.ctx;\n if (!sharedContext.renderer) {\n return () => {\n const children = slots.default && slots.default();\n return children && children.length === 1 ? children[0] : children;\n };\n }\n const cache = /* @__PURE__ */ new Map();\n const keys = /* @__PURE__ */ new Set();\n let current = null;\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n instance.__v_cache = cache;\n }\n const parentSuspense = instance.suspense;\n const {\n renderer: {\n p: patch,\n m: move,\n um: _unmount,\n o: { createElement }\n }\n } = sharedContext;\n const storageContainer = createElement(\"div\");\n sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {\n const instance2 = vnode.component;\n move(vnode, container, anchor, 0, parentSuspense);\n patch(\n instance2.vnode,\n vnode,\n container,\n anchor,\n instance2,\n parentSuspense,\n isSVG,\n vnode.slotScopeIds,\n optimized\n );\n queuePostRenderEffect(() => {\n instance2.isDeactivated = false;\n if (instance2.a) {\n invokeArrayFns(instance2.a);\n }\n const vnodeHook = vnode.props && vnode.props.onVnodeMounted;\n if (vnodeHook) {\n invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n }\n }, parentSuspense);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance2);\n }\n };\n sharedContext.deactivate = (vnode) => {\n const instance2 = vnode.component;\n move(vnode, storageContainer, null, 1, parentSuspense);\n queuePostRenderEffect(() => {\n if (instance2.da) {\n invokeArrayFns(instance2.da);\n }\n const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;\n if (vnodeHook) {\n invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n }\n instance2.isDeactivated = true;\n }, parentSuspense);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance2);\n }\n };\n function unmount(vnode) {\n resetShapeFlag(vnode);\n _unmount(vnode, instance, parentSuspense, true);\n }\n function pruneCache(filter) {\n cache.forEach((vnode, key) => {\n const name = getComponentName(vnode.type);\n if (name && (!filter || !filter(name))) {\n pruneCacheEntry(key);\n }\n });\n }\n function pruneCacheEntry(key) {\n const cached = cache.get(key);\n if (!current || !isSameVNodeType(cached, current)) {\n unmount(cached);\n } else if (current) {\n resetShapeFlag(current);\n }\n cache.delete(key);\n keys.delete(key);\n }\n watch(\n () => [props.include, props.exclude],\n ([include, exclude]) => {\n include && pruneCache((name) => matches(include, name));\n exclude && pruneCache((name) => !matches(exclude, name));\n },\n // prune post-render after `current` has been updated\n { flush: \"post\", deep: true }\n );\n let pendingCacheKey = null;\n const cacheSubtree = () => {\n if (pendingCacheKey != null) {\n cache.set(pendingCacheKey, getInnerChild(instance.subTree));\n }\n };\n onMounted(cacheSubtree);\n onUpdated(cacheSubtree);\n onBeforeUnmount(() => {\n cache.forEach((cached) => {\n const { subTree, suspense } = instance;\n const vnode = getInnerChild(subTree);\n if (cached.type === vnode.type && cached.key === vnode.key) {\n resetShapeFlag(vnode);\n const da = vnode.component.da;\n da && queuePostRenderEffect(da, suspense);\n return;\n }\n unmount(cached);\n });\n });\n return () => {\n pendingCacheKey = null;\n if (!slots.default) {\n return null;\n }\n const children = slots.default();\n const rawVNode = children[0];\n if (children.length > 1) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(`KeepAlive should contain exactly one component child.`);\n }\n current = null;\n return children;\n } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {\n current = null;\n return rawVNode;\n }\n let vnode = getInnerChild(rawVNode);\n const comp = vnode.type;\n const name = getComponentName(\n isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp\n );\n const { include, exclude, max } = props;\n if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {\n current = vnode;\n return rawVNode;\n }\n const key = vnode.key == null ? comp : vnode.key;\n const cachedVNode = cache.get(key);\n if (vnode.el) {\n vnode = cloneVNode(vnode);\n if (rawVNode.shapeFlag & 128) {\n rawVNode.ssContent = vnode;\n }\n }\n pendingCacheKey = key;\n if (cachedVNode) {\n vnode.el = cachedVNode.el;\n vnode.component = cachedVNode.component;\n if (vnode.transition) {\n setTransitionHooks(vnode, vnode.transition);\n }\n vnode.shapeFlag |= 512;\n keys.delete(key);\n keys.add(key);\n } else {\n keys.add(key);\n if (max && keys.size > parseInt(max, 10)) {\n pruneCacheEntry(keys.values().next().value);\n }\n }\n vnode.shapeFlag |= 256;\n current = vnode;\n return isSuspense(rawVNode.type) ? rawVNode : vnode;\n };\n }\n};\nconst KeepAlive = KeepAliveImpl;\nfunction matches(pattern, name) {\n if (isArray(pattern)) {\n return pattern.some((p) => matches(p, name));\n } else if (isString(pattern)) {\n return pattern.split(\",\").includes(name);\n } else if (isRegExp(pattern)) {\n return pattern.test(name);\n }\n return false;\n}\nfunction onActivated(hook, target) {\n registerKeepAliveHook(hook, \"a\", target);\n}\nfunction onDeactivated(hook, target) {\n registerKeepAliveHook(hook, \"da\", target);\n}\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\n const wrappedHook = hook.__wdc || (hook.__wdc = () => {\n let current = target;\n while (current) {\n if (current.isDeactivated) {\n return;\n }\n current = current.parent;\n }\n return hook();\n });\n injectHook(type, wrappedHook, target);\n if (target) {\n let current = target.parent;\n while (current && current.parent) {\n if (isKeepAlive(current.parent.vnode)) {\n injectToKeepAliveRoot(wrappedHook, type, target, current);\n }\n current = current.parent;\n }\n }\n}\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\n const injected = injectHook(\n type,\n hook,\n keepAliveRoot,\n true\n /* prepend */\n );\n onUnmounted(() => {\n remove(keepAliveRoot[type], injected);\n }, target);\n}\nfunction resetShapeFlag(vnode) {\n vnode.shapeFlag &= ~256;\n vnode.shapeFlag &= ~512;\n}\nfunction getInnerChild(vnode) {\n return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;\n}\n\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\n if (target) {\n const hooks = target[type] || (target[type] = []);\n const wrappedHook = hook.__weh || (hook.__weh = (...args) => {\n if (target.isUnmounted) {\n return;\n }\n pauseTracking();\n setCurrentInstance(target);\n const res = callWithAsyncErrorHandling(hook, target, type, args);\n unsetCurrentInstance();\n resetTracking();\n return res;\n });\n if (prepend) {\n hooks.unshift(wrappedHook);\n } else {\n hooks.push(wrappedHook);\n }\n return wrappedHook;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, \"\"));\n warn(\n `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` )\n );\n }\n}\nconst createHook = (lifecycle) => (hook, target = currentInstance) => (\n // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)\n (!isInSSRComponentSetup || lifecycle === \"sp\") && injectHook(lifecycle, (...args) => hook(...args), target)\n);\nconst onBeforeMount = createHook(\"bm\");\nconst onMounted = createHook(\"m\");\nconst onBeforeUpdate = createHook(\"bu\");\nconst onUpdated = createHook(\"u\");\nconst onBeforeUnmount = createHook(\"bum\");\nconst onUnmounted = createHook(\"um\");\nconst onServerPrefetch = createHook(\"sp\");\nconst onRenderTriggered = createHook(\n \"rtg\"\n);\nconst onRenderTracked = createHook(\n \"rtc\"\n);\nfunction onErrorCaptured(hook, target = currentInstance) {\n injectHook(\"ec\", hook, target);\n}\n\nfunction renderList(source, renderItem, cache, index) {\n let ret;\n const cached = cache && cache[index];\n if (isArray(source) || isString(source)) {\n ret = new Array(source.length);\n for (let i = 0, l = source.length; i < l; i++) {\n ret[i] = renderItem(source[i], i, void 0, cached && cached[i]);\n }\n } else if (typeof source === \"number\") {\n if (!!(process.env.NODE_ENV !== \"production\") && !Number.isInteger(source)) {\n warn(`The v-for range expect an integer value but got ${source}.`);\n }\n ret = new Array(source);\n for (let i = 0; i < source; i++) {\n ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);\n }\n } else if (isObject(source)) {\n if (source[Symbol.iterator]) {\n ret = Array.from(\n source,\n (item, i) => renderItem(item, i, void 0, cached && cached[i])\n );\n } else {\n const keys = Object.keys(source);\n ret = new Array(keys.length);\n for (let i = 0, l = keys.length; i < l; i++) {\n const key = keys[i];\n ret[i] = renderItem(source[key], key, i, cached && cached[i]);\n }\n }\n } else {\n ret = [];\n }\n if (cache) {\n cache[index] = ret;\n }\n return ret;\n}\n\nfunction createSlots(slots, dynamicSlots) {\n for (let i = 0; i < dynamicSlots.length; i++) {\n const slot = dynamicSlots[i];\n if (isArray(slot)) {\n for (let j = 0; j < slot.length; j++) {\n slots[slot[j].name] = slot[j].fn;\n }\n } else if (slot) {\n slots[slot.name] = slot.key ? (...args) => {\n const res = slot.fn(...args);\n if (res)\n res.key = slot.key;\n return res;\n } : slot.fn;\n }\n }\n return slots;\n}\n\nfunction renderSlot(slots, name, props = {}, fallback, noSlotted) {\n if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {\n if (name !== \"default\")\n props.name = name;\n return createVNode(\"slot\", props, fallback && fallback());\n }\n let slot = slots[name];\n if (!!(process.env.NODE_ENV !== \"production\") && slot && slot.length > 1) {\n warn(\n `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`\n );\n slot = () => [];\n }\n if (slot && slot._c) {\n slot._d = false;\n }\n openBlock();\n const validSlotContent = slot && ensureValidVNode(slot(props));\n const rendered = createBlock(\n Fragment,\n {\n key: props.key || // slot content array of a dynamic conditional slot may have a branch\n // key attached in the `createSlots` helper, respect that\n validSlotContent && validSlotContent.key || `_${name}`\n },\n validSlotContent || (fallback ? fallback() : []),\n validSlotContent && slots._ === 1 ? 64 : -2\n );\n if (!noSlotted && rendered.scopeId) {\n rendered.slotScopeIds = [rendered.scopeId + \"-s\"];\n }\n if (slot && slot._c) {\n slot._d = true;\n }\n return rendered;\n}\nfunction ensureValidVNode(vnodes) {\n return vnodes.some((child) => {\n if (!isVNode(child))\n return true;\n if (child.type === Comment)\n return false;\n if (child.type === Fragment && !ensureValidVNode(child.children))\n return false;\n return true;\n }) ? vnodes : null;\n}\n\nfunction toHandlers(obj, preserveCaseIfNecessary) {\n const ret = {};\n if (!!(process.env.NODE_ENV !== \"production\") && !isObject(obj)) {\n warn(`v-on with no argument expects an object value.`);\n return ret;\n }\n for (const key in obj) {\n ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];\n }\n return ret;\n}\n\nconst getPublicInstance = (i) => {\n if (!i)\n return null;\n if (isStatefulComponent(i))\n return getExposeProxy(i) || i.proxy;\n return getPublicInstance(i.parent);\n};\nconst publicPropertiesMap = (\n // Move PURE marker to new line to workaround compiler discarding it\n // due to type annotation\n /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {\n $: (i) => i,\n $el: (i) => i.vnode.el,\n $data: (i) => i.data,\n $props: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.props) : i.props,\n $attrs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.attrs) : i.attrs,\n $slots: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.slots) : i.slots,\n $refs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.refs) : i.refs,\n $parent: (i) => getPublicInstance(i.parent),\n $root: (i) => getPublicInstance(i.root),\n $emit: (i) => i.emit,\n $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,\n $forceUpdate: (i) => i.f || (i.f = () => queueJob(i.update)),\n $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),\n $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP\n })\n);\nconst isReservedPrefix = (key) => key === \"_\" || key === \"$\";\nconst hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);\nconst PublicInstanceProxyHandlers = {\n get({ _: instance }, key) {\n const { ctx, setupState, data, props, accessCache, type, appContext } = instance;\n if (!!(process.env.NODE_ENV !== \"production\") && key === \"__isVue\") {\n return true;\n }\n let normalizedProps;\n if (key[0] !== \"$\") {\n const n = accessCache[key];\n if (n !== void 0) {\n switch (n) {\n case 1 /* SETUP */:\n return setupState[key];\n case 2 /* DATA */:\n return data[key];\n case 4 /* CONTEXT */:\n return ctx[key];\n case 3 /* PROPS */:\n return props[key];\n }\n } else if (hasSetupBinding(setupState, key)) {\n accessCache[key] = 1 /* SETUP */;\n return setupState[key];\n } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\n accessCache[key] = 2 /* DATA */;\n return data[key];\n } else if (\n // only cache other properties when instance has declared (thus stable)\n // props\n (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)\n ) {\n accessCache[key] = 3 /* PROPS */;\n return props[key];\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {\n accessCache[key] = 0 /* OTHER */;\n }\n }\n const publicGetter = publicPropertiesMap[key];\n let cssModule, globalProperties;\n if (publicGetter) {\n if (key === \"$attrs\") {\n track(instance, \"get\", key);\n !!(process.env.NODE_ENV !== \"production\") && markAttrsAccessed();\n } else if (!!(process.env.NODE_ENV !== \"production\") && key === \"$slots\") {\n track(instance, \"get\", key);\n }\n return publicGetter(instance);\n } else if (\n // css module (injected by vue-loader)\n (cssModule = type.__cssModules) && (cssModule = cssModule[key])\n ) {\n return cssModule;\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (\n // global properties\n globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)\n ) {\n {\n return globalProperties[key];\n }\n } else if (!!(process.env.NODE_ENV !== \"production\") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading\n // to infinite warning loop\n key.indexOf(\"__v\") !== 0)) {\n if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {\n warn(\n `Property ${JSON.stringify(\n key\n )} must be accessed via $data because it starts with a reserved character (\"$\" or \"_\") and is not proxied on the render context.`\n );\n } else if (instance === currentRenderingInstance) {\n warn(\n `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`\n );\n }\n }\n },\n set({ _: instance }, key, value) {\n const { data, setupState, ctx } = instance;\n if (hasSetupBinding(setupState, key)) {\n setupState[key] = value;\n return true;\n } else if (!!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup && hasOwn(setupState, key)) {\n warn(`Cannot mutate \r\n","/*!\n * Bootstrap index.js v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Index = {}));\n})(this, (function (exports) { 'use strict';\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n const MAX_UID = 1000000;\n const MILLISECONDS_MULTIPLIER = 1000;\n const TRANSITION_END = 'transitionend'; // Shout-out Angus Croll (https://goo.gl/pxwQGp)\n\n const toType = object => {\n if (object === null || object === undefined) {\n return `${object}`;\n }\n\n return Object.prototype.toString.call(object).match(/\\s([a-z]+)/i)[1].toLowerCase();\n };\n /**\n * Public Util API\n */\n\n\n const getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID);\n } while (document.getElementById(prefix));\n\n return prefix;\n };\n\n const getSelector = element => {\n let selector = element.getAttribute('data-bs-target');\n\n if (!selector || selector === '#') {\n let hrefAttribute = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n\n if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {\n return null;\n } // Just in case some CMS puts out a full URL with the anchor appended\n\n\n if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {\n hrefAttribute = `#${hrefAttribute.split('#')[1]}`;\n }\n\n selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;\n }\n\n return selector;\n };\n\n const getSelectorFromElement = element => {\n const selector = getSelector(element);\n\n if (selector) {\n return document.querySelector(selector) ? selector : null;\n }\n\n return null;\n };\n\n const getElementFromSelector = element => {\n const selector = getSelector(element);\n return selector ? document.querySelector(selector) : null;\n };\n\n const getTransitionDurationFromElement = element => {\n if (!element) {\n return 0;\n } // Get transition-duration of the element\n\n\n let {\n transitionDuration,\n transitionDelay\n } = window.getComputedStyle(element);\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found\n\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n } // If multiple durations are defined, take the first\n\n\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;\n };\n\n const triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END));\n };\n\n const isElement = object => {\n if (!object || typeof object !== 'object') {\n return false;\n }\n\n if (typeof object.jquery !== 'undefined') {\n object = object[0];\n }\n\n return typeof object.nodeType !== 'undefined';\n };\n\n const getElement = object => {\n // it's a jQuery object or a node element\n if (isElement(object)) {\n return object.jquery ? object[0] : object;\n }\n\n if (typeof object === 'string' && object.length > 0) {\n return document.querySelector(object);\n }\n\n return null;\n };\n\n const isVisible = element => {\n if (!isElement(element) || element.getClientRects().length === 0) {\n return false;\n }\n\n const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible'; // Handle `details` element as its content may falsie appear visible when it is closed\n\n const closedDetails = element.closest('details:not([open])');\n\n if (!closedDetails) {\n return elementIsVisible;\n }\n\n if (closedDetails !== element) {\n const summary = element.closest('summary');\n\n if (summary && summary.parentNode !== closedDetails) {\n return false;\n }\n\n if (summary === null) {\n return false;\n }\n }\n\n return elementIsVisible;\n };\n\n const isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true;\n }\n\n if (element.classList.contains('disabled')) {\n return true;\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled;\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';\n };\n\n const findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null;\n } // Can find the shadow root otherwise it'll return the document\n\n\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode();\n return root instanceof ShadowRoot ? root : null;\n }\n\n if (element instanceof ShadowRoot) {\n return element;\n } // when we don't find a shadow root\n\n\n if (!element.parentNode) {\n return null;\n }\n\n return findShadowRoot(element.parentNode);\n };\n\n const noop = () => {};\n /**\n * Trick to restart an element's animation\n *\n * @param {HTMLElement} element\n * @return void\n *\n * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation\n */\n\n\n const reflow = element => {\n element.offsetHeight; // eslint-disable-line no-unused-expressions\n };\n\n const getjQuery = () => {\n if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return window.jQuery;\n }\n\n return null;\n };\n\n const DOMContentLoadedCallbacks = [];\n\n const onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n // add listener on the first call when the document is in loading state\n if (!DOMContentLoadedCallbacks.length) {\n document.addEventListener('DOMContentLoaded', () => {\n for (const callback of DOMContentLoadedCallbacks) {\n callback();\n }\n });\n }\n\n DOMContentLoadedCallbacks.push(callback);\n } else {\n callback();\n }\n };\n\n const isRTL = () => document.documentElement.dir === 'rtl';\n\n const defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery();\n /* istanbul ignore if */\n\n if ($) {\n const name = plugin.NAME;\n const JQUERY_NO_CONFLICT = $.fn[name];\n $.fn[name] = plugin.jQueryInterface;\n $.fn[name].Constructor = plugin;\n\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT;\n return plugin.jQueryInterface;\n };\n }\n });\n };\n\n const execute = callback => {\n if (typeof callback === 'function') {\n callback();\n }\n };\n\n const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {\n if (!waitForTransition) {\n execute(callback);\n return;\n }\n\n const durationPadding = 5;\n const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;\n let called = false;\n\n const handler = ({\n target\n }) => {\n if (target !== transitionElement) {\n return;\n }\n\n called = true;\n transitionElement.removeEventListener(TRANSITION_END, handler);\n execute(callback);\n };\n\n transitionElement.addEventListener(TRANSITION_END, handler);\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(transitionElement);\n }\n }, emulatedDuration);\n };\n /**\n * Return the previous/next element of a list.\n *\n * @param {array} list The list of elements\n * @param activeElement The active element\n * @param shouldGetNext Choose to get next or previous element\n * @param isCycleAllowed\n * @return {Element|elem} The proper element\n */\n\n\n const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {\n const listLength = list.length;\n let index = list.indexOf(activeElement); // if the element does not exist in the list return an element\n // depending on the direction and if cycle is allowed\n\n if (index === -1) {\n return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0];\n }\n\n index += shouldGetNext ? 1 : -1;\n\n if (isCycleAllowed) {\n index = (index + listLength) % listLength;\n }\n\n return list[Math.max(0, Math.min(index, listLength - 1))];\n };\n\n exports.defineJQueryPlugin = defineJQueryPlugin;\n exports.execute = execute;\n exports.executeAfterTransition = executeAfterTransition;\n exports.findShadowRoot = findShadowRoot;\n exports.getElement = getElement;\n exports.getElementFromSelector = getElementFromSelector;\n exports.getNextActiveElement = getNextActiveElement;\n exports.getSelectorFromElement = getSelectorFromElement;\n exports.getTransitionDurationFromElement = getTransitionDurationFromElement;\n exports.getUID = getUID;\n exports.getjQuery = getjQuery;\n exports.isDisabled = isDisabled;\n exports.isElement = isElement;\n exports.isRTL = isRTL;\n exports.isVisible = isVisible;\n exports.noop = noop;\n exports.onDOMContentLoaded = onDOMContentLoaded;\n exports.reflow = reflow;\n exports.toType = toType;\n exports.triggerTransitionEnd = triggerTransitionEnd;\n\n Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });\n\n}));\n//# sourceMappingURL=index.js.map\n","/*!\n * Bootstrap event-handler.js v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../util/index')) :\n typeof define === 'function' && define.amd ? define(['../util/index'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EventHandler = factory(global.Index));\n})(this, (function (index) { 'use strict';\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const namespaceRegex = /[^.]*(?=\\..*)\\.|.*/;\n const stripNameRegex = /\\..*/;\n const stripUidRegex = /::\\d+$/;\n const eventRegistry = {}; // Events storage\n\n let uidEvent = 1;\n const customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n };\n const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);\n /**\n * Private methods\n */\n\n function makeEventUid(element, uid) {\n return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;\n }\n\n function getElementEvents(element) {\n const uid = makeEventUid(element);\n element.uidEvent = uid;\n eventRegistry[uid] = eventRegistry[uid] || {};\n return eventRegistry[uid];\n }\n\n function bootstrapHandler(element, fn) {\n return function handler(event) {\n hydrateObj(event, {\n delegateTarget: element\n });\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(element, [event]);\n };\n }\n\n function bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector);\n\n for (let {\n target\n } = event; target && target !== this; target = target.parentNode) {\n for (const domElement of domElements) {\n if (domElement !== target) {\n continue;\n }\n\n hydrateObj(event, {\n delegateTarget: target\n });\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, selector, fn);\n }\n\n return fn.apply(target, [event]);\n }\n }\n };\n }\n\n function findHandler(events, callable, delegationSelector = null) {\n return Object.values(events).find(event => event.callable === callable && event.delegationSelector === delegationSelector);\n }\n\n function normalizeParameters(originalTypeEvent, handler, delegationFunction) {\n const isDelegated = typeof handler === 'string'; // todo: tooltip passes `false` instead of selector, so we need to check\n\n const callable = isDelegated ? delegationFunction : handler || delegationFunction;\n let typeEvent = getTypeEvent(originalTypeEvent);\n\n if (!nativeEvents.has(typeEvent)) {\n typeEvent = originalTypeEvent;\n }\n\n return [isDelegated, callable, typeEvent];\n }\n\n function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position\n // this prevents the handler from being dispatched the same way as mouseover or mouseout does\n\n if (originalTypeEvent in customEvents) {\n const wrapFunction = fn => {\n return function (event) {\n if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {\n return fn.call(this, event);\n }\n };\n };\n\n callable = wrapFunction(callable);\n }\n\n const events = getElementEvents(element);\n const handlers = events[typeEvent] || (events[typeEvent] = {});\n const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null);\n\n if (previousFunction) {\n previousFunction.oneOff = previousFunction.oneOff && oneOff;\n return;\n }\n\n const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''));\n const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable);\n fn.delegationSelector = isDelegated ? handler : null;\n fn.callable = callable;\n fn.oneOff = oneOff;\n fn.uidEvent = uid;\n handlers[uid] = fn;\n element.addEventListener(typeEvent, fn, isDelegated);\n }\n\n function removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector);\n\n if (!fn) {\n return;\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));\n delete events[typeEvent][fn.uidEvent];\n }\n\n function removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {};\n\n for (const handlerKey of Object.keys(storeElementEvent)) {\n if (handlerKey.includes(namespace)) {\n const event = storeElementEvent[handlerKey];\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);\n }\n }\n }\n\n function getTypeEvent(event) {\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n event = event.replace(stripNameRegex, '');\n return customEvents[event] || event;\n }\n\n const EventHandler = {\n on(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, false);\n },\n\n one(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, true);\n },\n\n off(element, originalTypeEvent, handler, delegationFunction) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);\n const inNamespace = typeEvent !== originalTypeEvent;\n const events = getElementEvents(element);\n const storeElementEvent = events[typeEvent] || {};\n const isNamespace = originalTypeEvent.startsWith('.');\n\n if (typeof callable !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!Object.keys(storeElementEvent).length) {\n return;\n }\n\n removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null);\n return;\n }\n\n if (isNamespace) {\n for (const elementEvent of Object.keys(events)) {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));\n }\n }\n\n for (const keyHandlers of Object.keys(storeElementEvent)) {\n const handlerKey = keyHandlers.replace(stripUidRegex, '');\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n const event = storeElementEvent[keyHandlers];\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);\n }\n }\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null;\n }\n\n const $ = index.getjQuery();\n const typeEvent = getTypeEvent(event);\n const inNamespace = event !== typeEvent;\n let jQueryEvent = null;\n let bubbles = true;\n let nativeDispatch = true;\n let defaultPrevented = false;\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args);\n $(element).trigger(jQueryEvent);\n bubbles = !jQueryEvent.isPropagationStopped();\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();\n defaultPrevented = jQueryEvent.isDefaultPrevented();\n }\n\n let evt = new Event(event, {\n bubbles,\n cancelable: true\n });\n evt = hydrateObj(evt, args);\n\n if (defaultPrevented) {\n evt.preventDefault();\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt);\n }\n\n if (evt.defaultPrevented && jQueryEvent) {\n jQueryEvent.preventDefault();\n }\n\n return evt;\n }\n\n };\n\n function hydrateObj(obj, meta) {\n for (const [key, value] of Object.entries(meta || {})) {\n try {\n obj[key] = value;\n } catch (_unused) {\n Object.defineProperty(obj, key, {\n configurable: true,\n\n get() {\n return value;\n }\n\n });\n }\n }\n\n return obj;\n }\n\n return EventHandler;\n\n}));\n//# sourceMappingURL=event-handler.js.map\n","/*!\n * Bootstrap selector-engine.js v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../util/index')) :\n typeof define === 'function' && define.amd ? define(['../util/index'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.SelectorEngine = factory(global.Index));\n})(this, (function (index) { 'use strict';\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector));\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector);\n },\n\n children(element, selector) {\n return [].concat(...element.children).filter(child => child.matches(selector));\n },\n\n parents(element, selector) {\n const parents = [];\n let ancestor = element.parentNode.closest(selector);\n\n while (ancestor) {\n parents.push(ancestor);\n ancestor = ancestor.parentNode.closest(selector);\n }\n\n return parents;\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling;\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous];\n }\n\n previous = previous.previousElementSibling;\n }\n\n return [];\n },\n\n // TODO: this is now unused; remove later along with prev()\n next(element, selector) {\n let next = element.nextElementSibling;\n\n while (next) {\n if (next.matches(selector)) {\n return [next];\n }\n\n next = next.nextElementSibling;\n }\n\n return [];\n },\n\n focusableChildren(element) {\n const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable=\"true\"]'].map(selector => `${selector}:not([tabindex^=\"-\"])`).join(',');\n return this.find(focusables, element).filter(el => !index.isDisabled(el) && index.isVisible(el));\n }\n\n };\n\n return SelectorEngine;\n\n}));\n//# sourceMappingURL=selector-engine.js.map\n","/*!\n * Bootstrap data.js v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Data = factory());\n})(this, (function () { 'use strict';\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n /**\n * Constants\n */\n const elementMap = new Map();\n const data = {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map());\n }\n\n const instanceMap = elementMap.get(element); // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);\n return;\n }\n\n instanceMap.set(key, instance);\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null;\n }\n\n return null;\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return;\n }\n\n const instanceMap = elementMap.get(element);\n instanceMap.delete(key); // free up element references if there are no instances left for an element\n\n if (instanceMap.size === 0) {\n elementMap.delete(element);\n }\n }\n\n };\n\n return data;\n\n}));\n//# sourceMappingURL=data.js.map\n","/*!\n * Bootstrap manipulator.js v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Manipulator = factory());\n})(this, (function () { 'use strict';\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n function normalizeData(value) {\n if (value === 'true') {\n return true;\n }\n\n if (value === 'false') {\n return false;\n }\n\n if (value === Number(value).toString()) {\n return Number(value);\n }\n\n if (value === '' || value === 'null') {\n return null;\n }\n\n if (typeof value !== 'string') {\n return value;\n }\n\n try {\n return JSON.parse(decodeURIComponent(value));\n } catch (_unused) {\n return value;\n }\n }\n\n function normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);\n }\n\n const Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {};\n }\n\n const attributes = {};\n const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'));\n\n for (const key of bsKeys) {\n let pureKey = key.replace(/^bs/, '');\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);\n attributes[pureKey] = normalizeData(element.dataset[key]);\n }\n\n return attributes;\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));\n }\n\n };\n\n return Manipulator;\n\n}));\n//# sourceMappingURL=manipulator.js.map\n","/*!\n * Bootstrap config.js v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./index'), require('../dom/manipulator')) :\n typeof define === 'function' && define.amd ? define(['./index', '../dom/manipulator'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Config = factory(global.Index, global.Manipulator));\n})(this, (function (index, Manipulator) { 'use strict';\n\n const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };\n\n const Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/config.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Class definition\n */\n\n class Config {\n // Getters\n static get Default() {\n return {};\n }\n\n static get DefaultType() {\n return {};\n }\n\n static get NAME() {\n throw new Error('You have to implement the static method \"NAME\", for each component!');\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config);\n config = this._configAfterMerge(config);\n\n this._typeCheckConfig(config);\n\n return config;\n }\n\n _configAfterMerge(config) {\n return config;\n }\n\n _mergeConfigObj(config, element) {\n const jsonConfig = index.isElement(element) ? Manipulator__default.default.getDataAttribute(element, 'config') : {}; // try to parse\n\n return { ...this.constructor.Default,\n ...(typeof jsonConfig === 'object' ? jsonConfig : {}),\n ...(index.isElement(element) ? Manipulator__default.default.getDataAttributes(element) : {}),\n ...(typeof config === 'object' ? config : {})\n };\n }\n\n _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {\n for (const property of Object.keys(configTypes)) {\n const expectedTypes = configTypes[property];\n const value = config[property];\n const valueType = index.isElement(value) ? 'element' : index.toType(value);\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`);\n }\n }\n }\n\n }\n\n return Config;\n\n}));\n//# sourceMappingURL=config.js.map\n","/*!\n * Bootstrap base-component.js v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data'), require('./util/index'), require('./dom/event-handler'), require('./util/config')) :\n typeof define === 'function' && define.amd ? define(['./dom/data', './util/index', './dom/event-handler', './util/config'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BaseComponent = factory(global.Data, global.Index, global.EventHandler, global.Config));\n})(this, (function (Data, index, EventHandler, Config) { 'use strict';\n\n const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };\n\n const Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);\n const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);\n const Config__default = /*#__PURE__*/_interopDefaultLegacy(Config);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const VERSION = '5.2.3';\n /**\n * Class definition\n */\n\n class BaseComponent extends Config__default.default {\n constructor(element, config) {\n super();\n element = index.getElement(element);\n\n if (!element) {\n return;\n }\n\n this._element = element;\n this._config = this._getConfig(config);\n Data__default.default.set(this._element, this.constructor.DATA_KEY, this);\n } // Public\n\n\n dispose() {\n Data__default.default.remove(this._element, this.constructor.DATA_KEY);\n EventHandler__default.default.off(this._element, this.constructor.EVENT_KEY);\n\n for (const propertyName of Object.getOwnPropertyNames(this)) {\n this[propertyName] = null;\n }\n }\n\n _queueCallback(callback, element, isAnimated = true) {\n index.executeAfterTransition(callback, element, isAnimated);\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config, this._element);\n config = this._configAfterMerge(config);\n\n this._typeCheckConfig(config);\n\n return config;\n } // Static\n\n\n static getInstance(element) {\n return Data__default.default.get(index.getElement(element), this.DATA_KEY);\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);\n }\n\n static get VERSION() {\n return VERSION;\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`;\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`;\n }\n\n static eventName(name) {\n return `${name}${this.EVENT_KEY}`;\n }\n\n }\n\n return BaseComponent;\n\n}));\n//# sourceMappingURL=base-component.js.map\n","/*!\n * Bootstrap collapse.js v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./dom/selector-engine'), require('./base-component')) :\n typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './dom/selector-engine', './base-component'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.Index, global.EventHandler, global.SelectorEngine, global.BaseComponent));\n})(this, (function (index, EventHandler, SelectorEngine, BaseComponent) { 'use strict';\n\n const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };\n\n const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);\n const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);\n const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME = 'collapse';\n const DATA_KEY = 'bs.collapse';\n const EVENT_KEY = `.${DATA_KEY}`;\n const DATA_API_KEY = '.data-api';\n const EVENT_SHOW = `show${EVENT_KEY}`;\n const EVENT_SHOWN = `shown${EVENT_KEY}`;\n const EVENT_HIDE = `hide${EVENT_KEY}`;\n const EVENT_HIDDEN = `hidden${EVENT_KEY}`;\n const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;\n const CLASS_NAME_SHOW = 'show';\n const CLASS_NAME_COLLAPSE = 'collapse';\n const CLASS_NAME_COLLAPSING = 'collapsing';\n const CLASS_NAME_COLLAPSED = 'collapsed';\n const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;\n const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';\n const WIDTH = 'width';\n const HEIGHT = 'height';\n const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';\n const SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"collapse\"]';\n const Default = {\n parent: null,\n toggle: true\n };\n const DefaultType = {\n parent: '(null|element)',\n toggle: 'boolean'\n };\n /**\n * Class definition\n */\n\n class Collapse extends BaseComponent__default.default {\n constructor(element, config) {\n super(element, config);\n this._isTransitioning = false;\n this._triggerArray = [];\n const toggleList = SelectorEngine__default.default.find(SELECTOR_DATA_TOGGLE);\n\n for (const elem of toggleList) {\n const selector = index.getSelectorFromElement(elem);\n const filterElement = SelectorEngine__default.default.find(selector).filter(foundElement => foundElement === this._element);\n\n if (selector !== null && filterElement.length) {\n this._triggerArray.push(elem);\n }\n }\n\n this._initializeChildren();\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());\n }\n\n if (this._config.toggle) {\n this.toggle();\n }\n } // Getters\n\n\n static get Default() {\n return Default;\n }\n\n static get DefaultType() {\n return DefaultType;\n }\n\n static get NAME() {\n return NAME;\n } // Public\n\n\n toggle() {\n if (this._isShown()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n if (this._isTransitioning || this._isShown()) {\n return;\n }\n\n let activeChildren = []; // find active children\n\n if (this._config.parent) {\n activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter(element => element !== this._element).map(element => Collapse.getOrCreateInstance(element, {\n toggle: false\n }));\n }\n\n if (activeChildren.length && activeChildren[0]._isTransitioning) {\n return;\n }\n\n const startEvent = EventHandler__default.default.trigger(this._element, EVENT_SHOW);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n for (const activeInstance of activeChildren) {\n activeInstance.hide();\n }\n\n const dimension = this._getDimension();\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.style[dimension] = 0;\n\n this._addAriaAndCollapsedClass(this._triggerArray, true);\n\n this._isTransitioning = true;\n\n const complete = () => {\n this._isTransitioning = false;\n\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);\n\n this._element.style[dimension] = '';\n EventHandler__default.default.trigger(this._element, EVENT_SHOWN);\n };\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);\n const scrollSize = `scroll${capitalizedDimension}`;\n\n this._queueCallback(complete, this._element, true);\n\n this._element.style[dimension] = `${this._element[scrollSize]}px`;\n }\n\n hide() {\n if (this._isTransitioning || !this._isShown()) {\n return;\n }\n\n const startEvent = EventHandler__default.default.trigger(this._element, EVENT_HIDE);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n const dimension = this._getDimension();\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;\n index.reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);\n\n for (const trigger of this._triggerArray) {\n const element = index.getElementFromSelector(trigger);\n\n if (element && !this._isShown(element)) {\n this._addAriaAndCollapsedClass([trigger], false);\n }\n }\n\n this._isTransitioning = true;\n\n const complete = () => {\n this._isTransitioning = false;\n\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n this._element.classList.add(CLASS_NAME_COLLAPSE);\n\n EventHandler__default.default.trigger(this._element, EVENT_HIDDEN);\n };\n\n this._element.style[dimension] = '';\n\n this._queueCallback(complete, this._element, true);\n }\n\n _isShown(element = this._element) {\n return element.classList.contains(CLASS_NAME_SHOW);\n } // Private\n\n\n _configAfterMerge(config) {\n config.toggle = Boolean(config.toggle); // Coerce string values\n\n config.parent = index.getElement(config.parent);\n return config;\n }\n\n _getDimension() {\n return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;\n }\n\n _initializeChildren() {\n if (!this._config.parent) {\n return;\n }\n\n const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE);\n\n for (const element of children) {\n const selected = index.getElementFromSelector(element);\n\n if (selected) {\n this._addAriaAndCollapsedClass([element], this._isShown(selected));\n }\n }\n }\n\n _getFirstLevelChildren(selector) {\n const children = SelectorEngine__default.default.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); // remove children if greater depth\n\n return SelectorEngine__default.default.find(selector, this._config.parent).filter(element => !children.includes(element));\n }\n\n _addAriaAndCollapsedClass(triggerArray, isOpen) {\n if (!triggerArray.length) {\n return;\n }\n\n for (const element of triggerArray) {\n element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen);\n element.setAttribute('aria-expanded', isOpen);\n }\n } // Static\n\n\n static jQueryInterface(config) {\n const _config = {};\n\n if (typeof config === 'string' && /show|hide/.test(config)) {\n _config.toggle = false;\n }\n\n return this.each(function () {\n const data = Collapse.getOrCreateInstance(this, _config);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n // preventDefault only for elements (which change the URL) not inside the collapsible element\n if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {\n event.preventDefault();\n }\n\n const selector = index.getSelectorFromElement(this);\n const selectorElements = SelectorEngine__default.default.find(selector);\n\n for (const element of selectorElements) {\n Collapse.getOrCreateInstance(element, {\n toggle: false\n }).toggle();\n }\n });\n /**\n * jQuery\n */\n\n index.defineJQueryPlugin(Collapse);\n\n return Collapse;\n\n}));\n//# sourceMappingURL=collapse.js.map\n","/*!\n * Bootstrap scrollbar.js v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../dom/selector-engine'), require('../dom/manipulator'), require('./index')) :\n typeof define === 'function' && define.amd ? define(['../dom/selector-engine', '../dom/manipulator', './index'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Scrollbar = factory(global.SelectorEngine, global.Manipulator, global.Index));\n})(this, (function (SelectorEngine, Manipulator, index) { 'use strict';\n\n const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };\n\n const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);\n const Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/scrollBar.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';\n const SELECTOR_STICKY_CONTENT = '.sticky-top';\n const PROPERTY_PADDING = 'padding-right';\n const PROPERTY_MARGIN = 'margin-right';\n /**\n * Class definition\n */\n\n class ScrollBarHelper {\n constructor() {\n this._element = document.body;\n } // Public\n\n\n getWidth() {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = document.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n }\n\n hide() {\n const width = this.getWidth();\n\n this._disableOverFlow(); // give padding to element to balance the hidden scrollbar width\n\n\n this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth\n\n\n this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);\n\n this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);\n }\n\n reset() {\n this._resetElementAttributes(this._element, 'overflow');\n\n this._resetElementAttributes(this._element, PROPERTY_PADDING);\n\n this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);\n\n this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);\n }\n\n isOverflowing() {\n return this.getWidth() > 0;\n } // Private\n\n\n _disableOverFlow() {\n this._saveInitialAttribute(this._element, 'overflow');\n\n this._element.style.overflow = 'hidden';\n }\n\n _setElementAttributes(selector, styleProperty, callback) {\n const scrollbarWidth = this.getWidth();\n\n const manipulationCallBack = element => {\n if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {\n return;\n }\n\n this._saveInitialAttribute(element, styleProperty);\n\n const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);\n element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);\n };\n\n this._applyManipulationCallback(selector, manipulationCallBack);\n }\n\n _saveInitialAttribute(element, styleProperty) {\n const actualValue = element.style.getPropertyValue(styleProperty);\n\n if (actualValue) {\n Manipulator__default.default.setDataAttribute(element, styleProperty, actualValue);\n }\n }\n\n _resetElementAttributes(selector, styleProperty) {\n const manipulationCallBack = element => {\n const value = Manipulator__default.default.getDataAttribute(element, styleProperty); // We only want to remove the property if the value is `null`; the value can also be zero\n\n if (value === null) {\n element.style.removeProperty(styleProperty);\n return;\n }\n\n Manipulator__default.default.removeDataAttribute(element, styleProperty);\n element.style.setProperty(styleProperty, value);\n };\n\n this._applyManipulationCallback(selector, manipulationCallBack);\n }\n\n _applyManipulationCallback(selector, callBack) {\n if (index.isElement(selector)) {\n callBack(selector);\n return;\n }\n\n for (const sel of SelectorEngine__default.default.find(selector, this._element)) {\n callBack(sel);\n }\n }\n\n }\n\n return ScrollBarHelper;\n\n}));\n//# sourceMappingURL=scrollbar.js.map\n","/*!\n * Bootstrap backdrop.js v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../dom/event-handler'), require('./index'), require('./config')) :\n typeof define === 'function' && define.amd ? define(['../dom/event-handler', './index', './config'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Backdrop = factory(global.EventHandler, global.Index, global.Config));\n})(this, (function (EventHandler, index, Config) { 'use strict';\n\n const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };\n\n const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);\n const Config__default = /*#__PURE__*/_interopDefaultLegacy(Config);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/backdrop.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME = 'backdrop';\n const CLASS_NAME_FADE = 'fade';\n const CLASS_NAME_SHOW = 'show';\n const EVENT_MOUSEDOWN = `mousedown.bs.${NAME}`;\n const Default = {\n className: 'modal-backdrop',\n clickCallback: null,\n isAnimated: false,\n isVisible: true,\n // if false, we use the backdrop helper without adding any element to the dom\n rootElement: 'body' // give the choice to place backdrop under different elements\n\n };\n const DefaultType = {\n className: 'string',\n clickCallback: '(function|null)',\n isAnimated: 'boolean',\n isVisible: 'boolean',\n rootElement: '(element|string)'\n };\n /**\n * Class definition\n */\n\n class Backdrop extends Config__default.default {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n this._isAppended = false;\n this._element = null;\n } // Getters\n\n\n static get Default() {\n return Default;\n }\n\n static get DefaultType() {\n return DefaultType;\n }\n\n static get NAME() {\n return NAME;\n } // Public\n\n\n show(callback) {\n if (!this._config.isVisible) {\n index.execute(callback);\n return;\n }\n\n this._append();\n\n const element = this._getElement();\n\n if (this._config.isAnimated) {\n index.reflow(element);\n }\n\n element.classList.add(CLASS_NAME_SHOW);\n\n this._emulateAnimation(() => {\n index.execute(callback);\n });\n }\n\n hide(callback) {\n if (!this._config.isVisible) {\n index.execute(callback);\n return;\n }\n\n this._getElement().classList.remove(CLASS_NAME_SHOW);\n\n this._emulateAnimation(() => {\n this.dispose();\n index.execute(callback);\n });\n }\n\n dispose() {\n if (!this._isAppended) {\n return;\n }\n\n EventHandler__default.default.off(this._element, EVENT_MOUSEDOWN);\n\n this._element.remove();\n\n this._isAppended = false;\n } // Private\n\n\n _getElement() {\n if (!this._element) {\n const backdrop = document.createElement('div');\n backdrop.className = this._config.className;\n\n if (this._config.isAnimated) {\n backdrop.classList.add(CLASS_NAME_FADE);\n }\n\n this._element = backdrop;\n }\n\n return this._element;\n }\n\n _configAfterMerge(config) {\n // use getElement() with the default \"body\" to get a fresh Element on each instantiation\n config.rootElement = index.getElement(config.rootElement);\n return config;\n }\n\n _append() {\n if (this._isAppended) {\n return;\n }\n\n const element = this._getElement();\n\n this._config.rootElement.append(element);\n\n EventHandler__default.default.on(element, EVENT_MOUSEDOWN, () => {\n index.execute(this._config.clickCallback);\n });\n this._isAppended = true;\n }\n\n _emulateAnimation(callback) {\n index.executeAfterTransition(callback, this._getElement(), this._config.isAnimated);\n }\n\n }\n\n return Backdrop;\n\n}));\n//# sourceMappingURL=backdrop.js.map\n","/*!\n * Bootstrap focustrap.js v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../dom/event-handler'), require('../dom/selector-engine'), require('./config')) :\n typeof define === 'function' && define.amd ? define(['../dom/event-handler', '../dom/selector-engine', './config'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Focustrap = factory(global.EventHandler, global.SelectorEngine, global.Config));\n})(this, (function (EventHandler, SelectorEngine, Config) { 'use strict';\n\n const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };\n\n const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);\n const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);\n const Config__default = /*#__PURE__*/_interopDefaultLegacy(Config);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/focustrap.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME = 'focustrap';\n const DATA_KEY = 'bs.focustrap';\n const EVENT_KEY = `.${DATA_KEY}`;\n const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;\n const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY}`;\n const TAB_KEY = 'Tab';\n const TAB_NAV_FORWARD = 'forward';\n const TAB_NAV_BACKWARD = 'backward';\n const Default = {\n autofocus: true,\n trapElement: null // The element to trap focus inside of\n\n };\n const DefaultType = {\n autofocus: 'boolean',\n trapElement: 'element'\n };\n /**\n * Class definition\n */\n\n class FocusTrap extends Config__default.default {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n this._isActive = false;\n this._lastTabNavDirection = null;\n } // Getters\n\n\n static get Default() {\n return Default;\n }\n\n static get DefaultType() {\n return DefaultType;\n }\n\n static get NAME() {\n return NAME;\n } // Public\n\n\n activate() {\n if (this._isActive) {\n return;\n }\n\n if (this._config.autofocus) {\n this._config.trapElement.focus();\n }\n\n EventHandler__default.default.off(document, EVENT_KEY); // guard against infinite focus loop\n\n EventHandler__default.default.on(document, EVENT_FOCUSIN, event => this._handleFocusin(event));\n EventHandler__default.default.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));\n this._isActive = true;\n }\n\n deactivate() {\n if (!this._isActive) {\n return;\n }\n\n this._isActive = false;\n EventHandler__default.default.off(document, EVENT_KEY);\n } // Private\n\n\n _handleFocusin(event) {\n const {\n trapElement\n } = this._config;\n\n if (event.target === document || event.target === trapElement || trapElement.contains(event.target)) {\n return;\n }\n\n const elements = SelectorEngine__default.default.focusableChildren(trapElement);\n\n if (elements.length === 0) {\n trapElement.focus();\n } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {\n elements[elements.length - 1].focus();\n } else {\n elements[0].focus();\n }\n }\n\n _handleKeydown(event) {\n if (event.key !== TAB_KEY) {\n return;\n }\n\n this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;\n }\n\n }\n\n return FocusTrap;\n\n}));\n//# sourceMappingURL=focustrap.js.map\n","/*!\n * Bootstrap component-functions.js v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('../dom/event-handler'), require('./index')) :\n typeof define === 'function' && define.amd ? define(['exports', '../dom/event-handler', './index'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ComponentFunctions = {}, global.EventHandler, global.Index));\n})(this, (function (exports, EventHandler, index) { 'use strict';\n\n const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };\n\n const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/component-functions.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n const enableDismissTrigger = (component, method = 'hide') => {\n const clickEvent = `click.dismiss${component.EVENT_KEY}`;\n const name = component.NAME;\n EventHandler__default.default.on(document, clickEvent, `[data-bs-dismiss=\"${name}\"]`, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (index.isDisabled(this)) {\n return;\n }\n\n const target = index.getElementFromSelector(this) || this.closest(`.${name}`);\n const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method\n\n instance[method]();\n });\n };\n\n exports.enableDismissTrigger = enableDismissTrigger;\n\n Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });\n\n}));\n//# sourceMappingURL=component-functions.js.map\n","/*!\n * Bootstrap modal.js v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./dom/selector-engine'), require('./util/scrollbar'), require('./base-component'), require('./util/backdrop'), require('./util/focustrap'), require('./util/component-functions')) :\n typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './dom/selector-engine', './util/scrollbar', './base-component', './util/backdrop', './util/focustrap', './util/component-functions'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.Index, global.EventHandler, global.SelectorEngine, global.Scrollbar, global.BaseComponent, global.Backdrop, global.Focustrap, global.ComponentFunctions));\n})(this, (function (index, EventHandler, SelectorEngine, ScrollBarHelper, BaseComponent, Backdrop, FocusTrap, componentFunctions) { 'use strict';\n\n const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };\n\n const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);\n const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);\n const ScrollBarHelper__default = /*#__PURE__*/_interopDefaultLegacy(ScrollBarHelper);\n const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);\n const Backdrop__default = /*#__PURE__*/_interopDefaultLegacy(Backdrop);\n const FocusTrap__default = /*#__PURE__*/_interopDefaultLegacy(FocusTrap);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME = 'modal';\n const DATA_KEY = 'bs.modal';\n const EVENT_KEY = `.${DATA_KEY}`;\n const DATA_API_KEY = '.data-api';\n const ESCAPE_KEY = 'Escape';\n const EVENT_HIDE = `hide${EVENT_KEY}`;\n const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`;\n const EVENT_HIDDEN = `hidden${EVENT_KEY}`;\n const EVENT_SHOW = `show${EVENT_KEY}`;\n const EVENT_SHOWN = `shown${EVENT_KEY}`;\n const EVENT_RESIZE = `resize${EVENT_KEY}`;\n const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;\n const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`;\n const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`;\n const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;\n const CLASS_NAME_OPEN = 'modal-open';\n const CLASS_NAME_FADE = 'fade';\n const CLASS_NAME_SHOW = 'show';\n const CLASS_NAME_STATIC = 'modal-static';\n const OPEN_SELECTOR = '.modal.show';\n const SELECTOR_DIALOG = '.modal-dialog';\n const SELECTOR_MODAL_BODY = '.modal-body';\n const SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"modal\"]';\n const Default = {\n backdrop: true,\n focus: true,\n keyboard: true\n };\n const DefaultType = {\n backdrop: '(boolean|string)',\n focus: 'boolean',\n keyboard: 'boolean'\n };\n /**\n * Class definition\n */\n\n class Modal extends BaseComponent__default.default {\n constructor(element, config) {\n super(element, config);\n this._dialog = SelectorEngine__default.default.findOne(SELECTOR_DIALOG, this._element);\n this._backdrop = this._initializeBackDrop();\n this._focustrap = this._initializeFocusTrap();\n this._isShown = false;\n this._isTransitioning = false;\n this._scrollBar = new ScrollBarHelper__default.default();\n\n this._addEventListeners();\n } // Getters\n\n\n static get Default() {\n return Default;\n }\n\n static get DefaultType() {\n return DefaultType;\n }\n\n static get NAME() {\n return NAME;\n } // Public\n\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n\n show(relatedTarget) {\n if (this._isShown || this._isTransitioning) {\n return;\n }\n\n const showEvent = EventHandler__default.default.trigger(this._element, EVENT_SHOW, {\n relatedTarget\n });\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n this._isTransitioning = true;\n\n this._scrollBar.hide();\n\n document.body.classList.add(CLASS_NAME_OPEN);\n\n this._adjustDialog();\n\n this._backdrop.show(() => this._showElement(relatedTarget));\n }\n\n hide() {\n if (!this._isShown || this._isTransitioning) {\n return;\n }\n\n const hideEvent = EventHandler__default.default.trigger(this._element, EVENT_HIDE);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = false;\n this._isTransitioning = true;\n\n this._focustrap.deactivate();\n\n this._element.classList.remove(CLASS_NAME_SHOW);\n\n this._queueCallback(() => this._hideModal(), this._element, this._isAnimated());\n }\n\n dispose() {\n for (const htmlElement of [window, this._dialog]) {\n EventHandler__default.default.off(htmlElement, EVENT_KEY);\n }\n\n this._backdrop.dispose();\n\n this._focustrap.deactivate();\n\n super.dispose();\n }\n\n handleUpdate() {\n this._adjustDialog();\n } // Private\n\n\n _initializeBackDrop() {\n return new Backdrop__default.default({\n isVisible: Boolean(this._config.backdrop),\n // 'static' option will be translated to true, and booleans will keep their value,\n isAnimated: this._isAnimated()\n });\n }\n\n _initializeFocusTrap() {\n return new FocusTrap__default.default({\n trapElement: this._element\n });\n }\n\n _showElement(relatedTarget) {\n // try to append dynamic modal\n if (!document.body.contains(this._element)) {\n document.body.append(this._element);\n }\n\n this._element.style.display = 'block';\n\n this._element.removeAttribute('aria-hidden');\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.scrollTop = 0;\n const modalBody = SelectorEngine__default.default.findOne(SELECTOR_MODAL_BODY, this._dialog);\n\n if (modalBody) {\n modalBody.scrollTop = 0;\n }\n\n index.reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_SHOW);\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._focustrap.activate();\n }\n\n this._isTransitioning = false;\n EventHandler__default.default.trigger(this._element, EVENT_SHOWN, {\n relatedTarget\n });\n };\n\n this._queueCallback(transitionComplete, this._dialog, this._isAnimated());\n }\n\n _addEventListeners() {\n EventHandler__default.default.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (event.key !== ESCAPE_KEY) {\n return;\n }\n\n if (this._config.keyboard) {\n event.preventDefault();\n this.hide();\n return;\n }\n\n this._triggerBackdropTransition();\n });\n EventHandler__default.default.on(window, EVENT_RESIZE, () => {\n if (this._isShown && !this._isTransitioning) {\n this._adjustDialog();\n }\n });\n EventHandler__default.default.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {\n // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks\n EventHandler__default.default.one(this._element, EVENT_CLICK_DISMISS, event2 => {\n if (this._element !== event.target || this._element !== event2.target) {\n return;\n }\n\n if (this._config.backdrop === 'static') {\n this._triggerBackdropTransition();\n\n return;\n }\n\n if (this._config.backdrop) {\n this.hide();\n }\n });\n });\n }\n\n _hideModal() {\n this._element.style.display = 'none';\n\n this._element.setAttribute('aria-hidden', true);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n this._isTransitioning = false;\n\n this._backdrop.hide(() => {\n document.body.classList.remove(CLASS_NAME_OPEN);\n\n this._resetAdjustments();\n\n this._scrollBar.reset();\n\n EventHandler__default.default.trigger(this._element, EVENT_HIDDEN);\n });\n }\n\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_FADE);\n }\n\n _triggerBackdropTransition() {\n const hideEvent = EventHandler__default.default.trigger(this._element, EVENT_HIDE_PREVENTED);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n const initialOverflowY = this._element.style.overflowY; // return if the following background transition hasn't yet completed\n\n if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) {\n return;\n }\n\n if (!isModalOverflowing) {\n this._element.style.overflowY = 'hidden';\n }\n\n this._element.classList.add(CLASS_NAME_STATIC);\n\n this._queueCallback(() => {\n this._element.classList.remove(CLASS_NAME_STATIC);\n\n this._queueCallback(() => {\n this._element.style.overflowY = initialOverflowY;\n }, this._dialog);\n }, this._dialog);\n\n this._element.focus();\n }\n /**\n * The following methods are used to handle overflowing modals\n */\n\n\n _adjustDialog() {\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n\n const scrollbarWidth = this._scrollBar.getWidth();\n\n const isBodyOverflowing = scrollbarWidth > 0;\n\n if (isBodyOverflowing && !isModalOverflowing) {\n const property = index.isRTL() ? 'paddingLeft' : 'paddingRight';\n this._element.style[property] = `${scrollbarWidth}px`;\n }\n\n if (!isBodyOverflowing && isModalOverflowing) {\n const property = index.isRTL() ? 'paddingRight' : 'paddingLeft';\n this._element.style[property] = `${scrollbarWidth}px`;\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = '';\n this._element.style.paddingRight = '';\n } // Static\n\n\n static jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n const data = Modal.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](relatedTarget);\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n const target = index.getElementFromSelector(this);\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n EventHandler__default.default.one(target, EVENT_SHOW, showEvent => {\n if (showEvent.defaultPrevented) {\n // only register focus restorer if modal will actually get shown\n return;\n }\n\n EventHandler__default.default.one(target, EVENT_HIDDEN, () => {\n if (index.isVisible(this)) {\n this.focus();\n }\n });\n }); // avoid conflict when clicking modal toggler while another one is open\n\n const alreadyOpen = SelectorEngine__default.default.findOne(OPEN_SELECTOR);\n\n if (alreadyOpen) {\n Modal.getInstance(alreadyOpen).hide();\n }\n\n const data = Modal.getOrCreateInstance(target);\n data.toggle(this);\n });\n componentFunctions.enableDismissTrigger(Modal);\n /**\n * jQuery\n */\n\n index.defineJQueryPlugin(Modal);\n\n return Modal;\n\n}));\n//# sourceMappingURL=modal.js.map\n","/*!\n * Bootstrap offcanvas.js v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./util/scrollbar'), require('./dom/event-handler'), require('./base-component'), require('./dom/selector-engine'), require('./util/backdrop'), require('./util/focustrap'), require('./util/component-functions')) :\n typeof define === 'function' && define.amd ? define(['./util/index', './util/scrollbar', './dom/event-handler', './base-component', './dom/selector-engine', './util/backdrop', './util/focustrap', './util/component-functions'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Offcanvas = factory(global.Index, global.Scrollbar, global.EventHandler, global.BaseComponent, global.SelectorEngine, global.Backdrop, global.Focustrap, global.ComponentFunctions));\n})(this, (function (index, ScrollBarHelper, EventHandler, BaseComponent, SelectorEngine, Backdrop, FocusTrap, componentFunctions) { 'use strict';\n\n const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };\n\n const ScrollBarHelper__default = /*#__PURE__*/_interopDefaultLegacy(ScrollBarHelper);\n const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);\n const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);\n const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);\n const Backdrop__default = /*#__PURE__*/_interopDefaultLegacy(Backdrop);\n const FocusTrap__default = /*#__PURE__*/_interopDefaultLegacy(FocusTrap);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): offcanvas.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME = 'offcanvas';\n const DATA_KEY = 'bs.offcanvas';\n const EVENT_KEY = `.${DATA_KEY}`;\n const DATA_API_KEY = '.data-api';\n const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`;\n const ESCAPE_KEY = 'Escape';\n const CLASS_NAME_SHOW = 'show';\n const CLASS_NAME_SHOWING = 'showing';\n const CLASS_NAME_HIDING = 'hiding';\n const CLASS_NAME_BACKDROP = 'offcanvas-backdrop';\n const OPEN_SELECTOR = '.offcanvas.show';\n const EVENT_SHOW = `show${EVENT_KEY}`;\n const EVENT_SHOWN = `shown${EVENT_KEY}`;\n const EVENT_HIDE = `hide${EVENT_KEY}`;\n const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`;\n const EVENT_HIDDEN = `hidden${EVENT_KEY}`;\n const EVENT_RESIZE = `resize${EVENT_KEY}`;\n const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;\n const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`;\n const SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"offcanvas\"]';\n const Default = {\n backdrop: true,\n keyboard: true,\n scroll: false\n };\n const DefaultType = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n scroll: 'boolean'\n };\n /**\n * Class definition\n */\n\n class Offcanvas extends BaseComponent__default.default {\n constructor(element, config) {\n super(element, config);\n this._isShown = false;\n this._backdrop = this._initializeBackDrop();\n this._focustrap = this._initializeFocusTrap();\n\n this._addEventListeners();\n } // Getters\n\n\n static get Default() {\n return Default;\n }\n\n static get DefaultType() {\n return DefaultType;\n }\n\n static get NAME() {\n return NAME;\n } // Public\n\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n\n show(relatedTarget) {\n if (this._isShown) {\n return;\n }\n\n const showEvent = EventHandler__default.default.trigger(this._element, EVENT_SHOW, {\n relatedTarget\n });\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n\n this._backdrop.show();\n\n if (!this._config.scroll) {\n new ScrollBarHelper__default.default().hide();\n }\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.classList.add(CLASS_NAME_SHOWING);\n\n const completeCallBack = () => {\n if (!this._config.scroll || this._config.backdrop) {\n this._focustrap.activate();\n }\n\n this._element.classList.add(CLASS_NAME_SHOW);\n\n this._element.classList.remove(CLASS_NAME_SHOWING);\n\n EventHandler__default.default.trigger(this._element, EVENT_SHOWN, {\n relatedTarget\n });\n };\n\n this._queueCallback(completeCallBack, this._element, true);\n }\n\n hide() {\n if (!this._isShown) {\n return;\n }\n\n const hideEvent = EventHandler__default.default.trigger(this._element, EVENT_HIDE);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._focustrap.deactivate();\n\n this._element.blur();\n\n this._isShown = false;\n\n this._element.classList.add(CLASS_NAME_HIDING);\n\n this._backdrop.hide();\n\n const completeCallback = () => {\n this._element.classList.remove(CLASS_NAME_SHOW, CLASS_NAME_HIDING);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n if (!this._config.scroll) {\n new ScrollBarHelper__default.default().reset();\n }\n\n EventHandler__default.default.trigger(this._element, EVENT_HIDDEN);\n };\n\n this._queueCallback(completeCallback, this._element, true);\n }\n\n dispose() {\n this._backdrop.dispose();\n\n this._focustrap.deactivate();\n\n super.dispose();\n } // Private\n\n\n _initializeBackDrop() {\n const clickCallback = () => {\n if (this._config.backdrop === 'static') {\n EventHandler__default.default.trigger(this._element, EVENT_HIDE_PREVENTED);\n return;\n }\n\n this.hide();\n }; // 'static' option will be translated to true, and booleans will keep their value\n\n\n const isVisible = Boolean(this._config.backdrop);\n return new Backdrop__default.default({\n className: CLASS_NAME_BACKDROP,\n isVisible,\n isAnimated: true,\n rootElement: this._element.parentNode,\n clickCallback: isVisible ? clickCallback : null\n });\n }\n\n _initializeFocusTrap() {\n return new FocusTrap__default.default({\n trapElement: this._element\n });\n }\n\n _addEventListeners() {\n EventHandler__default.default.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (event.key !== ESCAPE_KEY) {\n return;\n }\n\n if (!this._config.keyboard) {\n EventHandler__default.default.trigger(this._element, EVENT_HIDE_PREVENTED);\n return;\n }\n\n this.hide();\n });\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Offcanvas.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n const target = index.getElementFromSelector(this);\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (index.isDisabled(this)) {\n return;\n }\n\n EventHandler__default.default.one(target, EVENT_HIDDEN, () => {\n // focus on trigger when it is closed\n if (index.isVisible(this)) {\n this.focus();\n }\n }); // avoid conflict when clicking a toggler of an offcanvas, while another is open\n\n const alreadyOpen = SelectorEngine__default.default.findOne(OPEN_SELECTOR);\n\n if (alreadyOpen && alreadyOpen !== target) {\n Offcanvas.getInstance(alreadyOpen).hide();\n }\n\n const data = Offcanvas.getOrCreateInstance(target);\n data.toggle(this);\n });\n EventHandler__default.default.on(window, EVENT_LOAD_DATA_API, () => {\n for (const selector of SelectorEngine__default.default.find(OPEN_SELECTOR)) {\n Offcanvas.getOrCreateInstance(selector).show();\n }\n });\n EventHandler__default.default.on(window, EVENT_RESIZE, () => {\n for (const element of SelectorEngine__default.default.find('[aria-modal][class*=show][class*=offcanvas-]')) {\n if (getComputedStyle(element).position !== 'fixed') {\n Offcanvas.getOrCreateInstance(element).hide();\n }\n }\n });\n componentFunctions.enableDismissTrigger(Offcanvas);\n /**\n * jQuery\n */\n\n index.defineJQueryPlugin(Offcanvas);\n\n return Offcanvas;\n\n}));\n//# sourceMappingURL=offcanvas.js.map\n","import { Toast } from '@/modules/core/types';\r\nimport { ref } from 'vue';\r\n\r\nconst toasts = ref>([]);\r\n\r\nexport const useNotifications = () => {\r\n\r\n const showToast = (toast: Toast) => {\r\n toasts.value.push(toast)\r\n }\r\n\r\n const handleToastHidden = (toast: Toast) => {\r\n const index = toasts.value.indexOf(toast);\r\n if (index !== -1) {\r\n toasts.value.splice(index, 1);\r\n }\r\n }\r\n\r\n return {\r\n toasts,\r\n showToast,\r\n handleToastHidden\r\n }\r\n}","import { ref } from 'vue';\r\nimport { useNotifications } from './use-notifications';\r\nimport { getErrorMessage as getErrorMessageUtil } from '@/modules/core/utilities';\r\nimport axios from 'axios';\r\nimport errorMessages from '../error-messages';\r\n\r\nconst isActionInProgress = ref(false);\r\nconst { showToast } = useNotifications();\r\n\r\nexport async function useErrorHandling (\r\n promise: Promise | ((...args: any[]) => Promise),\r\n getErrorMessage = getErrorMessageUtil\r\n) {\r\n try {\r\n isActionInProgress.value = true;\r\n if (typeof promise === 'function') return await promise();\r\n return await promise;\r\n } catch (error: any) {\r\n let errorMessage = getErrorMessage(error);\r\n const suppressToast = axios.isAxiosError(error) && error.config?.suppressAuthCheckRedirect;\r\n if (!suppressToast && errorMessage !== 'Email not registered') {\r\n showToast({ message: errorMessage, type: 'danger' })\r\n }\r\n else {\r\n showToast({\r\n message: errorMessages.EMAIL_NOT_REGISTERED,\r\n type: 'danger',\r\n })\r\n }\r\n throw error;\r\n } finally {\r\n isActionInProgress.value = false;\r\n }\r\n}","/*!\n * Bootstrap tab.js v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./dom/selector-engine'), require('./base-component')) :\n typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './dom/selector-engine', './base-component'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.Index, global.EventHandler, global.SelectorEngine, global.BaseComponent));\n})(this, (function (index, EventHandler, SelectorEngine, BaseComponent) { 'use strict';\n\n const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };\n\n const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);\n const SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);\n const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);\n\n /**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n /**\n * Constants\n */\n\n const NAME = 'tab';\n const DATA_KEY = 'bs.tab';\n const EVENT_KEY = `.${DATA_KEY}`;\n const EVENT_HIDE = `hide${EVENT_KEY}`;\n const EVENT_HIDDEN = `hidden${EVENT_KEY}`;\n const EVENT_SHOW = `show${EVENT_KEY}`;\n const EVENT_SHOWN = `shown${EVENT_KEY}`;\n const EVENT_CLICK_DATA_API = `click${EVENT_KEY}`;\n const EVENT_KEYDOWN = `keydown${EVENT_KEY}`;\n const EVENT_LOAD_DATA_API = `load${EVENT_KEY}`;\n const ARROW_LEFT_KEY = 'ArrowLeft';\n const ARROW_RIGHT_KEY = 'ArrowRight';\n const ARROW_UP_KEY = 'ArrowUp';\n const ARROW_DOWN_KEY = 'ArrowDown';\n const CLASS_NAME_ACTIVE = 'active';\n const CLASS_NAME_FADE = 'fade';\n const CLASS_NAME_SHOW = 'show';\n const CLASS_DROPDOWN = 'dropdown';\n const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';\n const SELECTOR_DROPDOWN_MENU = '.dropdown-menu';\n const NOT_SELECTOR_DROPDOWN_TOGGLE = ':not(.dropdown-toggle)';\n const SELECTOR_TAB_PANEL = '.list-group, .nav, [role=\"tablist\"]';\n const SELECTOR_OUTER = '.nav-item, .list-group-item';\n const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role=\"tab\"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`;\n const SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"tab\"], [data-bs-toggle=\"pill\"], [data-bs-toggle=\"list\"]'; // todo:v6: could be only `tab`\n\n const SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`;\n const SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-bs-toggle=\"tab\"], .${CLASS_NAME_ACTIVE}[data-bs-toggle=\"pill\"], .${CLASS_NAME_ACTIVE}[data-bs-toggle=\"list\"]`;\n /**\n * Class definition\n */\n\n class Tab extends BaseComponent__default.default {\n constructor(element) {\n super(element);\n this._parent = this._element.closest(SELECTOR_TAB_PANEL);\n\n if (!this._parent) {\n return; // todo: should Throw exception on v6\n // throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)\n } // Set up initial aria attributes\n\n\n this._setInitialAttributes(this._parent, this._getChildren());\n\n EventHandler__default.default.on(this._element, EVENT_KEYDOWN, event => this._keydown(event));\n } // Getters\n\n\n static get NAME() {\n return NAME;\n } // Public\n\n\n show() {\n // Shows this elem and deactivate the active sibling if exists\n const innerElem = this._element;\n\n if (this._elemIsActive(innerElem)) {\n return;\n } // Search for active tab on same parent to deactivate it\n\n\n const active = this._getActiveElem();\n\n const hideEvent = active ? EventHandler__default.default.trigger(active, EVENT_HIDE, {\n relatedTarget: innerElem\n }) : null;\n const showEvent = EventHandler__default.default.trigger(innerElem, EVENT_SHOW, {\n relatedTarget: active\n });\n\n if (showEvent.defaultPrevented || hideEvent && hideEvent.defaultPrevented) {\n return;\n }\n\n this._deactivate(active, innerElem);\n\n this._activate(innerElem, active);\n } // Private\n\n\n _activate(element, relatedElem) {\n if (!element) {\n return;\n }\n\n element.classList.add(CLASS_NAME_ACTIVE);\n\n this._activate(index.getElementFromSelector(element)); // Search and activate/show the proper section\n\n\n const complete = () => {\n if (element.getAttribute('role') !== 'tab') {\n element.classList.add(CLASS_NAME_SHOW);\n return;\n }\n\n element.removeAttribute('tabindex');\n element.setAttribute('aria-selected', true);\n\n this._toggleDropDown(element, true);\n\n EventHandler__default.default.trigger(element, EVENT_SHOWN, {\n relatedTarget: relatedElem\n });\n };\n\n this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE));\n }\n\n _deactivate(element, relatedElem) {\n if (!element) {\n return;\n }\n\n element.classList.remove(CLASS_NAME_ACTIVE);\n element.blur();\n\n this._deactivate(index.getElementFromSelector(element)); // Search and deactivate the shown section too\n\n\n const complete = () => {\n if (element.getAttribute('role') !== 'tab') {\n element.classList.remove(CLASS_NAME_SHOW);\n return;\n }\n\n element.setAttribute('aria-selected', false);\n element.setAttribute('tabindex', '-1');\n\n this._toggleDropDown(element, false);\n\n EventHandler__default.default.trigger(element, EVENT_HIDDEN, {\n relatedTarget: relatedElem\n });\n };\n\n this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE));\n }\n\n _keydown(event) {\n if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key)) {\n return;\n }\n\n event.stopPropagation(); // stopPropagation/preventDefault both added to support up/down keys without scrolling the page\n\n event.preventDefault();\n const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key);\n const nextActiveElement = index.getNextActiveElement(this._getChildren().filter(element => !index.isDisabled(element)), event.target, isNext, true);\n\n if (nextActiveElement) {\n nextActiveElement.focus({\n preventScroll: true\n });\n Tab.getOrCreateInstance(nextActiveElement).show();\n }\n }\n\n _getChildren() {\n // collection of inner elements\n return SelectorEngine__default.default.find(SELECTOR_INNER_ELEM, this._parent);\n }\n\n _getActiveElem() {\n return this._getChildren().find(child => this._elemIsActive(child)) || null;\n }\n\n _setInitialAttributes(parent, children) {\n this._setAttributeIfNotExists(parent, 'role', 'tablist');\n\n for (const child of children) {\n this._setInitialAttributesOnChild(child);\n }\n }\n\n _setInitialAttributesOnChild(child) {\n child = this._getInnerElement(child);\n\n const isActive = this._elemIsActive(child);\n\n const outerElem = this._getOuterElement(child);\n\n child.setAttribute('aria-selected', isActive);\n\n if (outerElem !== child) {\n this._setAttributeIfNotExists(outerElem, 'role', 'presentation');\n }\n\n if (!isActive) {\n child.setAttribute('tabindex', '-1');\n }\n\n this._setAttributeIfNotExists(child, 'role', 'tab'); // set attributes to the related panel too\n\n\n this._setInitialAttributesOnTargetPanel(child);\n }\n\n _setInitialAttributesOnTargetPanel(child) {\n const target = index.getElementFromSelector(child);\n\n if (!target) {\n return;\n }\n\n this._setAttributeIfNotExists(target, 'role', 'tabpanel');\n\n if (child.id) {\n this._setAttributeIfNotExists(target, 'aria-labelledby', `#${child.id}`);\n }\n }\n\n _toggleDropDown(element, open) {\n const outerElem = this._getOuterElement(element);\n\n if (!outerElem.classList.contains(CLASS_DROPDOWN)) {\n return;\n }\n\n const toggle = (selector, className) => {\n const element = SelectorEngine__default.default.findOne(selector, outerElem);\n\n if (element) {\n element.classList.toggle(className, open);\n }\n };\n\n toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE);\n toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW);\n outerElem.setAttribute('aria-expanded', open);\n }\n\n _setAttributeIfNotExists(element, attribute, value) {\n if (!element.hasAttribute(attribute)) {\n element.setAttribute(attribute, value);\n }\n }\n\n _elemIsActive(elem) {\n return elem.classList.contains(CLASS_NAME_ACTIVE);\n } // Try to get the inner element (usually the .nav-link)\n\n\n _getInnerElement(elem) {\n return elem.matches(SELECTOR_INNER_ELEM) ? elem : SelectorEngine__default.default.findOne(SELECTOR_INNER_ELEM, elem);\n } // Try to get the outer element (usually the .nav-item)\n\n\n _getOuterElement(elem) {\n return elem.closest(SELECTOR_OUTER) || elem;\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Tab.getOrCreateInstance(this);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n }\n /**\n * Data API implementation\n */\n\n\n EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (index.isDisabled(this)) {\n return;\n }\n\n Tab.getOrCreateInstance(this).show();\n });\n /**\n * Initialize on focus\n */\n\n EventHandler__default.default.on(window, EVENT_LOAD_DATA_API, () => {\n for (const element of SelectorEngine__default.default.find(SELECTOR_DATA_TOGGLE_ACTIVE)) {\n Tab.getOrCreateInstance(element);\n }\n });\n /**\n * jQuery\n */\n\n index.defineJQueryPlugin(Tab);\n\n return Tab;\n\n}));\n//# sourceMappingURL=tab.js.map\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.noUiSlider = {}));\n})(this, (function (exports) { 'use strict';\n\n exports.PipsMode = void 0;\n (function (PipsMode) {\n PipsMode[\"Range\"] = \"range\";\n PipsMode[\"Steps\"] = \"steps\";\n PipsMode[\"Positions\"] = \"positions\";\n PipsMode[\"Count\"] = \"count\";\n PipsMode[\"Values\"] = \"values\";\n })(exports.PipsMode || (exports.PipsMode = {}));\n exports.PipsType = void 0;\n (function (PipsType) {\n PipsType[PipsType[\"None\"] = -1] = \"None\";\n PipsType[PipsType[\"NoValue\"] = 0] = \"NoValue\";\n PipsType[PipsType[\"LargeValue\"] = 1] = \"LargeValue\";\n PipsType[PipsType[\"SmallValue\"] = 2] = \"SmallValue\";\n })(exports.PipsType || (exports.PipsType = {}));\n //region Helper Methods\n function isValidFormatter(entry) {\n return isValidPartialFormatter(entry) && typeof entry.from === \"function\";\n }\n function isValidPartialFormatter(entry) {\n // partial formatters only need a to function and not a from function\n return typeof entry === \"object\" && typeof entry.to === \"function\";\n }\n function removeElement(el) {\n el.parentElement.removeChild(el);\n }\n function isSet(value) {\n return value !== null && value !== undefined;\n }\n // Bindable version\n function preventDefault(e) {\n e.preventDefault();\n }\n // Removes duplicates from an array.\n function unique(array) {\n return array.filter(function (a) {\n return !this[a] ? (this[a] = true) : false;\n }, {});\n }\n // Round a value to the closest 'to'.\n function closest(value, to) {\n return Math.round(value / to) * to;\n }\n // Current position of an element relative to the document.\n function offset(elem, orientation) {\n var rect = elem.getBoundingClientRect();\n var doc = elem.ownerDocument;\n var docElem = doc.documentElement;\n var pageOffset = getPageOffset(doc);\n // getBoundingClientRect contains left scroll in Chrome on Android.\n // I haven't found a feature detection that proves this. Worst case\n // scenario on mis-match: the 'tap' feature on horizontal sliders breaks.\n if (/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)) {\n pageOffset.x = 0;\n }\n return orientation ? rect.top + pageOffset.y - docElem.clientTop : rect.left + pageOffset.x - docElem.clientLeft;\n }\n // Checks whether a value is numerical.\n function isNumeric(a) {\n return typeof a === \"number\" && !isNaN(a) && isFinite(a);\n }\n // Sets a class and removes it after [duration] ms.\n function addClassFor(element, className, duration) {\n if (duration > 0) {\n addClass(element, className);\n setTimeout(function () {\n removeClass(element, className);\n }, duration);\n }\n }\n // Limits a value to 0 - 100\n function limit(a) {\n return Math.max(Math.min(a, 100), 0);\n }\n // Wraps a variable as an array, if it isn't one yet.\n // Note that an input array is returned by reference!\n function asArray(a) {\n return Array.isArray(a) ? a : [a];\n }\n // Counts decimals\n function countDecimals(numStr) {\n numStr = String(numStr);\n var pieces = numStr.split(\".\");\n return pieces.length > 1 ? pieces[1].length : 0;\n }\n // http://youmightnotneedjquery.com/#add_class\n function addClass(el, className) {\n if (el.classList && !/\\s/.test(className)) {\n el.classList.add(className);\n }\n else {\n el.className += \" \" + className;\n }\n }\n // http://youmightnotneedjquery.com/#remove_class\n function removeClass(el, className) {\n if (el.classList && !/\\s/.test(className)) {\n el.classList.remove(className);\n }\n else {\n el.className = el.className.replace(new RegExp(\"(^|\\\\b)\" + className.split(\" \").join(\"|\") + \"(\\\\b|$)\", \"gi\"), \" \");\n }\n }\n // https://plainjs.com/javascript/attributes/adding-removing-and-testing-for-classes-9/\n function hasClass(el, className) {\n return el.classList ? el.classList.contains(className) : new RegExp(\"\\\\b\" + className + \"\\\\b\").test(el.className);\n }\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY#Notes\n function getPageOffset(doc) {\n var supportPageOffset = window.pageXOffset !== undefined;\n var isCSS1Compat = (doc.compatMode || \"\") === \"CSS1Compat\";\n var x = supportPageOffset\n ? window.pageXOffset\n : isCSS1Compat\n ? doc.documentElement.scrollLeft\n : doc.body.scrollLeft;\n var y = supportPageOffset\n ? window.pageYOffset\n : isCSS1Compat\n ? doc.documentElement.scrollTop\n : doc.body.scrollTop;\n return {\n x: x,\n y: y,\n };\n }\n // we provide a function to compute constants instead\n // of accessing window.* as soon as the module needs it\n // so that we do not compute anything if not needed\n function getActions() {\n // Determine the events to bind. IE11 implements pointerEvents without\n // a prefix, which breaks compatibility with the IE10 implementation.\n return window.navigator.pointerEnabled\n ? {\n start: \"pointerdown\",\n move: \"pointermove\",\n end: \"pointerup\",\n }\n : window.navigator.msPointerEnabled\n ? {\n start: \"MSPointerDown\",\n move: \"MSPointerMove\",\n end: \"MSPointerUp\",\n }\n : {\n start: \"mousedown touchstart\",\n move: \"mousemove touchmove\",\n end: \"mouseup touchend\",\n };\n }\n // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n // Issue #785\n function getSupportsPassive() {\n var supportsPassive = false;\n /* eslint-disable */\n try {\n var opts = Object.defineProperty({}, \"passive\", {\n get: function () {\n supportsPassive = true;\n },\n });\n // @ts-ignore\n window.addEventListener(\"test\", null, opts);\n }\n catch (e) { }\n /* eslint-enable */\n return supportsPassive;\n }\n function getSupportsTouchActionNone() {\n return window.CSS && CSS.supports && CSS.supports(\"touch-action\", \"none\");\n }\n //endregion\n //region Range Calculation\n // Determine the size of a sub-range in relation to a full range.\n function subRangeRatio(pa, pb) {\n return 100 / (pb - pa);\n }\n // (percentage) How many percent is this value of this range?\n function fromPercentage(range, value, startRange) {\n return (value * 100) / (range[startRange + 1] - range[startRange]);\n }\n // (percentage) Where is this value on this range?\n function toPercentage(range, value) {\n return fromPercentage(range, range[0] < 0 ? value + Math.abs(range[0]) : value - range[0], 0);\n }\n // (value) How much is this percentage on this range?\n function isPercentage(range, value) {\n return (value * (range[1] - range[0])) / 100 + range[0];\n }\n function getJ(value, arr) {\n var j = 1;\n while (value >= arr[j]) {\n j += 1;\n }\n return j;\n }\n // (percentage) Input a value, find where, on a scale of 0-100, it applies.\n function toStepping(xVal, xPct, value) {\n if (value >= xVal.slice(-1)[0]) {\n return 100;\n }\n var j = getJ(value, xVal);\n var va = xVal[j - 1];\n var vb = xVal[j];\n var pa = xPct[j - 1];\n var pb = xPct[j];\n return pa + toPercentage([va, vb], value) / subRangeRatio(pa, pb);\n }\n // (value) Input a percentage, find where it is on the specified range.\n function fromStepping(xVal, xPct, value) {\n // There is no range group that fits 100\n if (value >= 100) {\n return xVal.slice(-1)[0];\n }\n var j = getJ(value, xPct);\n var va = xVal[j - 1];\n var vb = xVal[j];\n var pa = xPct[j - 1];\n var pb = xPct[j];\n return isPercentage([va, vb], (value - pa) * subRangeRatio(pa, pb));\n }\n // (percentage) Get the step that applies at a certain value.\n function getStep(xPct, xSteps, snap, value) {\n if (value === 100) {\n return value;\n }\n var j = getJ(value, xPct);\n var a = xPct[j - 1];\n var b = xPct[j];\n // If 'snap' is set, steps are used as fixed points on the slider.\n if (snap) {\n // Find the closest position, a or b.\n if (value - a > (b - a) / 2) {\n return b;\n }\n return a;\n }\n if (!xSteps[j - 1]) {\n return value;\n }\n return xPct[j - 1] + closest(value - xPct[j - 1], xSteps[j - 1]);\n }\n //endregion\n //region Spectrum\n var Spectrum = /** @class */ (function () {\n function Spectrum(entry, snap, singleStep) {\n this.xPct = [];\n this.xVal = [];\n this.xSteps = [];\n this.xNumSteps = [];\n this.xHighestCompleteStep = [];\n this.xSteps = [singleStep || false];\n this.xNumSteps = [false];\n this.snap = snap;\n var index;\n var ordered = [];\n // Map the object keys to an array.\n Object.keys(entry).forEach(function (index) {\n ordered.push([asArray(entry[index]), index]);\n });\n // Sort all entries by value (numeric sort).\n ordered.sort(function (a, b) {\n return a[0][0] - b[0][0];\n });\n // Convert all entries to subranges.\n for (index = 0; index < ordered.length; index++) {\n this.handleEntryPoint(ordered[index][1], ordered[index][0]);\n }\n // Store the actual step values.\n // xSteps is sorted in the same order as xPct and xVal.\n this.xNumSteps = this.xSteps.slice(0);\n // Convert all numeric steps to the percentage of the subrange they represent.\n for (index = 0; index < this.xNumSteps.length; index++) {\n this.handleStepPoint(index, this.xNumSteps[index]);\n }\n }\n Spectrum.prototype.getDistance = function (value) {\n var distances = [];\n for (var index = 0; index < this.xNumSteps.length - 1; index++) {\n distances[index] = fromPercentage(this.xVal, value, index);\n }\n return distances;\n };\n // Calculate the percentual distance over the whole scale of ranges.\n // direction: 0 = backwards / 1 = forwards\n Spectrum.prototype.getAbsoluteDistance = function (value, distances, direction) {\n var xPct_index = 0;\n // Calculate range where to start calculation\n if (value < this.xPct[this.xPct.length - 1]) {\n while (value > this.xPct[xPct_index + 1]) {\n xPct_index++;\n }\n }\n else if (value === this.xPct[this.xPct.length - 1]) {\n xPct_index = this.xPct.length - 2;\n }\n // If looking backwards and the value is exactly at a range separator then look one range further\n if (!direction && value === this.xPct[xPct_index + 1]) {\n xPct_index++;\n }\n if (distances === null) {\n distances = [];\n }\n var start_factor;\n var rest_factor = 1;\n var rest_rel_distance = distances[xPct_index];\n var range_pct = 0;\n var rel_range_distance = 0;\n var abs_distance_counter = 0;\n var range_counter = 0;\n // Calculate what part of the start range the value is\n if (direction) {\n start_factor = (value - this.xPct[xPct_index]) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);\n }\n else {\n start_factor = (this.xPct[xPct_index + 1] - value) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);\n }\n // Do until the complete distance across ranges is calculated\n while (rest_rel_distance > 0) {\n // Calculate the percentage of total range\n range_pct = this.xPct[xPct_index + 1 + range_counter] - this.xPct[xPct_index + range_counter];\n // Detect if the margin, padding or limit is larger then the current range and calculate\n if (distances[xPct_index + range_counter] * rest_factor + 100 - start_factor * 100 > 100) {\n // If larger then take the percentual distance of the whole range\n rel_range_distance = range_pct * start_factor;\n // Rest factor of relative percentual distance still to be calculated\n rest_factor = (rest_rel_distance - 100 * start_factor) / distances[xPct_index + range_counter];\n // Set start factor to 1 as for next range it does not apply.\n start_factor = 1;\n }\n else {\n // If smaller or equal then take the percentual distance of the calculate percentual part of that range\n rel_range_distance = ((distances[xPct_index + range_counter] * range_pct) / 100) * rest_factor;\n // No rest left as the rest fits in current range\n rest_factor = 0;\n }\n if (direction) {\n abs_distance_counter = abs_distance_counter - rel_range_distance;\n // Limit range to first range when distance becomes outside of minimum range\n if (this.xPct.length + range_counter >= 1) {\n range_counter--;\n }\n }\n else {\n abs_distance_counter = abs_distance_counter + rel_range_distance;\n // Limit range to last range when distance becomes outside of maximum range\n if (this.xPct.length - range_counter >= 1) {\n range_counter++;\n }\n }\n // Rest of relative percentual distance still to be calculated\n rest_rel_distance = distances[xPct_index + range_counter] * rest_factor;\n }\n return value + abs_distance_counter;\n };\n Spectrum.prototype.toStepping = function (value) {\n value = toStepping(this.xVal, this.xPct, value);\n return value;\n };\n Spectrum.prototype.fromStepping = function (value) {\n return fromStepping(this.xVal, this.xPct, value);\n };\n Spectrum.prototype.getStep = function (value) {\n value = getStep(this.xPct, this.xSteps, this.snap, value);\n return value;\n };\n Spectrum.prototype.getDefaultStep = function (value, isDown, size) {\n var j = getJ(value, this.xPct);\n // When at the top or stepping down, look at the previous sub-range\n if (value === 100 || (isDown && value === this.xPct[j - 1])) {\n j = Math.max(j - 1, 1);\n }\n return (this.xVal[j] - this.xVal[j - 1]) / size;\n };\n Spectrum.prototype.getNearbySteps = function (value) {\n var j = getJ(value, this.xPct);\n return {\n stepBefore: {\n startValue: this.xVal[j - 2],\n step: this.xNumSteps[j - 2],\n highestStep: this.xHighestCompleteStep[j - 2],\n },\n thisStep: {\n startValue: this.xVal[j - 1],\n step: this.xNumSteps[j - 1],\n highestStep: this.xHighestCompleteStep[j - 1],\n },\n stepAfter: {\n startValue: this.xVal[j],\n step: this.xNumSteps[j],\n highestStep: this.xHighestCompleteStep[j],\n },\n };\n };\n Spectrum.prototype.countStepDecimals = function () {\n var stepDecimals = this.xNumSteps.map(countDecimals);\n return Math.max.apply(null, stepDecimals);\n };\n Spectrum.prototype.hasNoSize = function () {\n return this.xVal[0] === this.xVal[this.xVal.length - 1];\n };\n // Outside testing\n Spectrum.prototype.convert = function (value) {\n return this.getStep(this.toStepping(value));\n };\n Spectrum.prototype.handleEntryPoint = function (index, value) {\n var percentage;\n // Covert min/max syntax to 0 and 100.\n if (index === \"min\") {\n percentage = 0;\n }\n else if (index === \"max\") {\n percentage = 100;\n }\n else {\n percentage = parseFloat(index);\n }\n // Check for correct input.\n if (!isNumeric(percentage) || !isNumeric(value[0])) {\n throw new Error(\"noUiSlider: 'range' value isn't numeric.\");\n }\n // Store values.\n this.xPct.push(percentage);\n this.xVal.push(value[0]);\n var value1 = Number(value[1]);\n // NaN will evaluate to false too, but to keep\n // logging clear, set step explicitly. Make sure\n // not to override the 'step' setting with false.\n if (!percentage) {\n if (!isNaN(value1)) {\n this.xSteps[0] = value1;\n }\n }\n else {\n this.xSteps.push(isNaN(value1) ? false : value1);\n }\n this.xHighestCompleteStep.push(0);\n };\n Spectrum.prototype.handleStepPoint = function (i, n) {\n // Ignore 'false' stepping.\n if (!n) {\n return;\n }\n // Step over zero-length ranges (#948);\n if (this.xVal[i] === this.xVal[i + 1]) {\n this.xSteps[i] = this.xHighestCompleteStep[i] = this.xVal[i];\n return;\n }\n // Factor to range ratio\n this.xSteps[i] =\n fromPercentage([this.xVal[i], this.xVal[i + 1]], n, 0) / subRangeRatio(this.xPct[i], this.xPct[i + 1]);\n var totalSteps = (this.xVal[i + 1] - this.xVal[i]) / this.xNumSteps[i];\n var highestStep = Math.ceil(Number(totalSteps.toFixed(3)) - 1);\n var step = this.xVal[i] + this.xNumSteps[i] * highestStep;\n this.xHighestCompleteStep[i] = step;\n };\n return Spectrum;\n }());\n //endregion\n //region Options\n /*\tEvery input option is tested and parsed. This will prevent\n endless validation in internal methods. These tests are\n structured with an item for every option available. An\n option can be marked as required by setting the 'r' flag.\n The testing function is provided with three arguments:\n - The provided value for the option;\n - A reference to the options object;\n - The name for the option;\n\n The testing function returns false when an error is detected,\n or true when everything is OK. It can also modify the option\n object, to make sure all values can be correctly looped elsewhere. */\n //region Defaults\n var defaultFormatter = {\n to: function (value) {\n return value === undefined ? \"\" : value.toFixed(2);\n },\n from: Number,\n };\n var cssClasses = {\n target: \"target\",\n base: \"base\",\n origin: \"origin\",\n handle: \"handle\",\n handleLower: \"handle-lower\",\n handleUpper: \"handle-upper\",\n touchArea: \"touch-area\",\n horizontal: \"horizontal\",\n vertical: \"vertical\",\n background: \"background\",\n connect: \"connect\",\n connects: \"connects\",\n ltr: \"ltr\",\n rtl: \"rtl\",\n textDirectionLtr: \"txt-dir-ltr\",\n textDirectionRtl: \"txt-dir-rtl\",\n draggable: \"draggable\",\n drag: \"state-drag\",\n tap: \"state-tap\",\n active: \"active\",\n tooltip: \"tooltip\",\n pips: \"pips\",\n pipsHorizontal: \"pips-horizontal\",\n pipsVertical: \"pips-vertical\",\n marker: \"marker\",\n markerHorizontal: \"marker-horizontal\",\n markerVertical: \"marker-vertical\",\n markerNormal: \"marker-normal\",\n markerLarge: \"marker-large\",\n markerSub: \"marker-sub\",\n value: \"value\",\n valueHorizontal: \"value-horizontal\",\n valueVertical: \"value-vertical\",\n valueNormal: \"value-normal\",\n valueLarge: \"value-large\",\n valueSub: \"value-sub\",\n };\n // Namespaces of internal event listeners\n var INTERNAL_EVENT_NS = {\n tooltips: \".__tooltips\",\n aria: \".__aria\",\n };\n //endregion\n function testStep(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'step' is not numeric.\");\n }\n // The step option can still be used to set stepping\n // for linear sliders. Overwritten if set in 'range'.\n parsed.singleStep = entry;\n }\n function testKeyboardPageMultiplier(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'keyboardPageMultiplier' is not numeric.\");\n }\n parsed.keyboardPageMultiplier = entry;\n }\n function testKeyboardMultiplier(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'keyboardMultiplier' is not numeric.\");\n }\n parsed.keyboardMultiplier = entry;\n }\n function testKeyboardDefaultStep(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'keyboardDefaultStep' is not numeric.\");\n }\n parsed.keyboardDefaultStep = entry;\n }\n function testRange(parsed, entry) {\n // Filter incorrect input.\n if (typeof entry !== \"object\" || Array.isArray(entry)) {\n throw new Error(\"noUiSlider: 'range' is not an object.\");\n }\n // Catch missing start or end.\n if (entry.min === undefined || entry.max === undefined) {\n throw new Error(\"noUiSlider: Missing 'min' or 'max' in 'range'.\");\n }\n parsed.spectrum = new Spectrum(entry, parsed.snap || false, parsed.singleStep);\n }\n function testStart(parsed, entry) {\n entry = asArray(entry);\n // Validate input. Values aren't tested, as the public .val method\n // will always provide a valid location.\n if (!Array.isArray(entry) || !entry.length) {\n throw new Error(\"noUiSlider: 'start' option is incorrect.\");\n }\n // Store the number of handles.\n parsed.handles = entry.length;\n // When the slider is initialized, the .val method will\n // be called with the start options.\n parsed.start = entry;\n }\n function testSnap(parsed, entry) {\n if (typeof entry !== \"boolean\") {\n throw new Error(\"noUiSlider: 'snap' option must be a boolean.\");\n }\n // Enforce 100% stepping within subranges.\n parsed.snap = entry;\n }\n function testAnimate(parsed, entry) {\n if (typeof entry !== \"boolean\") {\n throw new Error(\"noUiSlider: 'animate' option must be a boolean.\");\n }\n // Enforce 100% stepping within subranges.\n parsed.animate = entry;\n }\n function testAnimationDuration(parsed, entry) {\n if (typeof entry !== \"number\") {\n throw new Error(\"noUiSlider: 'animationDuration' option must be a number.\");\n }\n parsed.animationDuration = entry;\n }\n function testConnect(parsed, entry) {\n var connect = [false];\n var i;\n // Map legacy options\n if (entry === \"lower\") {\n entry = [true, false];\n }\n else if (entry === \"upper\") {\n entry = [false, true];\n }\n // Handle boolean options\n if (entry === true || entry === false) {\n for (i = 1; i < parsed.handles; i++) {\n connect.push(entry);\n }\n connect.push(false);\n }\n // Reject invalid input\n else if (!Array.isArray(entry) || !entry.length || entry.length !== parsed.handles + 1) {\n throw new Error(\"noUiSlider: 'connect' option doesn't match handle count.\");\n }\n else {\n connect = entry;\n }\n parsed.connect = connect;\n }\n function testOrientation(parsed, entry) {\n // Set orientation to an a numerical value for easy\n // array selection.\n switch (entry) {\n case \"horizontal\":\n parsed.ort = 0;\n break;\n case \"vertical\":\n parsed.ort = 1;\n break;\n default:\n throw new Error(\"noUiSlider: 'orientation' option is invalid.\");\n }\n }\n function testMargin(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'margin' option must be numeric.\");\n }\n // Issue #582\n if (entry === 0) {\n return;\n }\n parsed.margin = parsed.spectrum.getDistance(entry);\n }\n function testLimit(parsed, entry) {\n if (!isNumeric(entry)) {\n throw new Error(\"noUiSlider: 'limit' option must be numeric.\");\n }\n parsed.limit = parsed.spectrum.getDistance(entry);\n if (!parsed.limit || parsed.handles < 2) {\n throw new Error(\"noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.\");\n }\n }\n function testPadding(parsed, entry) {\n var index;\n if (!isNumeric(entry) && !Array.isArray(entry)) {\n throw new Error(\"noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.\");\n }\n if (Array.isArray(entry) && !(entry.length === 2 || isNumeric(entry[0]) || isNumeric(entry[1]))) {\n throw new Error(\"noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.\");\n }\n if (entry === 0) {\n return;\n }\n if (!Array.isArray(entry)) {\n entry = [entry, entry];\n }\n // 'getDistance' returns false for invalid values.\n parsed.padding = [parsed.spectrum.getDistance(entry[0]), parsed.spectrum.getDistance(entry[1])];\n for (index = 0; index < parsed.spectrum.xNumSteps.length - 1; index++) {\n // last \"range\" can't contain step size as it is purely an endpoint.\n if (parsed.padding[0][index] < 0 || parsed.padding[1][index] < 0) {\n throw new Error(\"noUiSlider: 'padding' option must be a positive number(s).\");\n }\n }\n var totalPadding = entry[0] + entry[1];\n var firstValue = parsed.spectrum.xVal[0];\n var lastValue = parsed.spectrum.xVal[parsed.spectrum.xVal.length - 1];\n if (totalPadding / (lastValue - firstValue) > 1) {\n throw new Error(\"noUiSlider: 'padding' option must not exceed 100% of the range.\");\n }\n }\n function testDirection(parsed, entry) {\n // Set direction as a numerical value for easy parsing.\n // Invert connection for RTL sliders, so that the proper\n // handles get the connect/background classes.\n switch (entry) {\n case \"ltr\":\n parsed.dir = 0;\n break;\n case \"rtl\":\n parsed.dir = 1;\n break;\n default:\n throw new Error(\"noUiSlider: 'direction' option was not recognized.\");\n }\n }\n function testBehaviour(parsed, entry) {\n // Make sure the input is a string.\n if (typeof entry !== \"string\") {\n throw new Error(\"noUiSlider: 'behaviour' must be a string containing options.\");\n }\n // Check if the string contains any keywords.\n // None are required.\n var tap = entry.indexOf(\"tap\") >= 0;\n var drag = entry.indexOf(\"drag\") >= 0;\n var fixed = entry.indexOf(\"fixed\") >= 0;\n var snap = entry.indexOf(\"snap\") >= 0;\n var hover = entry.indexOf(\"hover\") >= 0;\n var unconstrained = entry.indexOf(\"unconstrained\") >= 0;\n var dragAll = entry.indexOf(\"drag-all\") >= 0;\n var smoothSteps = entry.indexOf(\"smooth-steps\") >= 0;\n if (fixed) {\n if (parsed.handles !== 2) {\n throw new Error(\"noUiSlider: 'fixed' behaviour must be used with 2 handles\");\n }\n // Use margin to enforce fixed state\n testMargin(parsed, parsed.start[1] - parsed.start[0]);\n }\n if (unconstrained && (parsed.margin || parsed.limit)) {\n throw new Error(\"noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit\");\n }\n parsed.events = {\n tap: tap || snap,\n drag: drag,\n dragAll: dragAll,\n smoothSteps: smoothSteps,\n fixed: fixed,\n snap: snap,\n hover: hover,\n unconstrained: unconstrained,\n };\n }\n function testTooltips(parsed, entry) {\n if (entry === false) {\n return;\n }\n if (entry === true || isValidPartialFormatter(entry)) {\n parsed.tooltips = [];\n for (var i = 0; i < parsed.handles; i++) {\n parsed.tooltips.push(entry);\n }\n }\n else {\n entry = asArray(entry);\n if (entry.length !== parsed.handles) {\n throw new Error(\"noUiSlider: must pass a formatter for all handles.\");\n }\n entry.forEach(function (formatter) {\n if (typeof formatter !== \"boolean\" && !isValidPartialFormatter(formatter)) {\n throw new Error(\"noUiSlider: 'tooltips' must be passed a formatter or 'false'.\");\n }\n });\n parsed.tooltips = entry;\n }\n }\n function testHandleAttributes(parsed, entry) {\n if (entry.length !== parsed.handles) {\n throw new Error(\"noUiSlider: must pass a attributes for all handles.\");\n }\n parsed.handleAttributes = entry;\n }\n function testAriaFormat(parsed, entry) {\n if (!isValidPartialFormatter(entry)) {\n throw new Error(\"noUiSlider: 'ariaFormat' requires 'to' method.\");\n }\n parsed.ariaFormat = entry;\n }\n function testFormat(parsed, entry) {\n if (!isValidFormatter(entry)) {\n throw new Error(\"noUiSlider: 'format' requires 'to' and 'from' methods.\");\n }\n parsed.format = entry;\n }\n function testKeyboardSupport(parsed, entry) {\n if (typeof entry !== \"boolean\") {\n throw new Error(\"noUiSlider: 'keyboardSupport' option must be a boolean.\");\n }\n parsed.keyboardSupport = entry;\n }\n function testDocumentElement(parsed, entry) {\n // This is an advanced option. Passed values are used without validation.\n parsed.documentElement = entry;\n }\n function testCssPrefix(parsed, entry) {\n if (typeof entry !== \"string\" && entry !== false) {\n throw new Error(\"noUiSlider: 'cssPrefix' must be a string or `false`.\");\n }\n parsed.cssPrefix = entry;\n }\n function testCssClasses(parsed, entry) {\n if (typeof entry !== \"object\") {\n throw new Error(\"noUiSlider: 'cssClasses' must be an object.\");\n }\n if (typeof parsed.cssPrefix === \"string\") {\n parsed.cssClasses = {};\n Object.keys(entry).forEach(function (key) {\n parsed.cssClasses[key] = parsed.cssPrefix + entry[key];\n });\n }\n else {\n parsed.cssClasses = entry;\n }\n }\n // Test all developer settings and parse to assumption-safe values.\n function testOptions(options) {\n // To prove a fix for #537, freeze options here.\n // If the object is modified, an error will be thrown.\n // Object.freeze(options);\n var parsed = {\n margin: null,\n limit: null,\n padding: null,\n animate: true,\n animationDuration: 300,\n ariaFormat: defaultFormatter,\n format: defaultFormatter,\n };\n // Tests are executed in the order they are presented here.\n var tests = {\n step: { r: false, t: testStep },\n keyboardPageMultiplier: { r: false, t: testKeyboardPageMultiplier },\n keyboardMultiplier: { r: false, t: testKeyboardMultiplier },\n keyboardDefaultStep: { r: false, t: testKeyboardDefaultStep },\n start: { r: true, t: testStart },\n connect: { r: true, t: testConnect },\n direction: { r: true, t: testDirection },\n snap: { r: false, t: testSnap },\n animate: { r: false, t: testAnimate },\n animationDuration: { r: false, t: testAnimationDuration },\n range: { r: true, t: testRange },\n orientation: { r: false, t: testOrientation },\n margin: { r: false, t: testMargin },\n limit: { r: false, t: testLimit },\n padding: { r: false, t: testPadding },\n behaviour: { r: true, t: testBehaviour },\n ariaFormat: { r: false, t: testAriaFormat },\n format: { r: false, t: testFormat },\n tooltips: { r: false, t: testTooltips },\n keyboardSupport: { r: true, t: testKeyboardSupport },\n documentElement: { r: false, t: testDocumentElement },\n cssPrefix: { r: true, t: testCssPrefix },\n cssClasses: { r: true, t: testCssClasses },\n handleAttributes: { r: false, t: testHandleAttributes },\n };\n var defaults = {\n connect: false,\n direction: \"ltr\",\n behaviour: \"tap\",\n orientation: \"horizontal\",\n keyboardSupport: true,\n cssPrefix: \"noUi-\",\n cssClasses: cssClasses,\n keyboardPageMultiplier: 5,\n keyboardMultiplier: 1,\n keyboardDefaultStep: 10,\n };\n // AriaFormat defaults to regular format, if any.\n if (options.format && !options.ariaFormat) {\n options.ariaFormat = options.format;\n }\n // Run all options through a testing mechanism to ensure correct\n // input. It should be noted that options might get modified to\n // be handled properly. E.g. wrapping integers in arrays.\n Object.keys(tests).forEach(function (name) {\n // If the option isn't set, but it is required, throw an error.\n if (!isSet(options[name]) && defaults[name] === undefined) {\n if (tests[name].r) {\n throw new Error(\"noUiSlider: '\" + name + \"' is required.\");\n }\n return;\n }\n tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);\n });\n // Forward pips options\n parsed.pips = options.pips;\n // All recent browsers accept unprefixed transform.\n // We need -ms- for IE9 and -webkit- for older Android;\n // Assume use of -webkit- if unprefixed and -ms- are not supported.\n // https://caniuse.com/#feat=transforms2d\n var d = document.createElement(\"div\");\n var msPrefix = d.style.msTransform !== undefined;\n var noPrefix = d.style.transform !== undefined;\n parsed.transformRule = noPrefix ? \"transform\" : msPrefix ? \"msTransform\" : \"webkitTransform\";\n // Pips don't move, so we can place them using left/top.\n var styles = [\n [\"left\", \"top\"],\n [\"right\", \"bottom\"],\n ];\n parsed.style = styles[parsed.dir][parsed.ort];\n return parsed;\n }\n //endregion\n function scope(target, options, originalOptions) {\n var actions = getActions();\n var supportsTouchActionNone = getSupportsTouchActionNone();\n var supportsPassive = supportsTouchActionNone && getSupportsPassive();\n // All variables local to 'scope' are prefixed with 'scope_'\n // Slider DOM Nodes\n var scope_Target = target;\n var scope_Base;\n var scope_Handles;\n var scope_Connects;\n var scope_Pips;\n var scope_Tooltips;\n // Slider state values\n var scope_Spectrum = options.spectrum;\n var scope_Values = [];\n var scope_Locations = [];\n var scope_HandleNumbers = [];\n var scope_ActiveHandlesCount = 0;\n var scope_Events = {};\n // Document Nodes\n var scope_Document = target.ownerDocument;\n var scope_DocumentElement = options.documentElement || scope_Document.documentElement;\n var scope_Body = scope_Document.body;\n // For horizontal sliders in standard ltr documents,\n // make .noUi-origin overflow to the left so the document doesn't scroll.\n var scope_DirOffset = scope_Document.dir === \"rtl\" || options.ort === 1 ? 0 : 100;\n // Creates a node, adds it to target, returns the new node.\n function addNodeTo(addTarget, className) {\n var div = scope_Document.createElement(\"div\");\n if (className) {\n addClass(div, className);\n }\n addTarget.appendChild(div);\n return div;\n }\n // Append a origin to the base\n function addOrigin(base, handleNumber) {\n var origin = addNodeTo(base, options.cssClasses.origin);\n var handle = addNodeTo(origin, options.cssClasses.handle);\n addNodeTo(handle, options.cssClasses.touchArea);\n handle.setAttribute(\"data-handle\", String(handleNumber));\n if (options.keyboardSupport) {\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex\n // 0 = focusable and reachable\n handle.setAttribute(\"tabindex\", \"0\");\n handle.addEventListener(\"keydown\", function (event) {\n return eventKeydown(event, handleNumber);\n });\n }\n if (options.handleAttributes !== undefined) {\n var attributes_1 = options.handleAttributes[handleNumber];\n Object.keys(attributes_1).forEach(function (attribute) {\n handle.setAttribute(attribute, attributes_1[attribute]);\n });\n }\n handle.setAttribute(\"role\", \"slider\");\n handle.setAttribute(\"aria-orientation\", options.ort ? \"vertical\" : \"horizontal\");\n if (handleNumber === 0) {\n addClass(handle, options.cssClasses.handleLower);\n }\n else if (handleNumber === options.handles - 1) {\n addClass(handle, options.cssClasses.handleUpper);\n }\n origin.handle = handle;\n return origin;\n }\n // Insert nodes for connect elements\n function addConnect(base, add) {\n if (!add) {\n return false;\n }\n return addNodeTo(base, options.cssClasses.connect);\n }\n // Add handles to the slider base.\n function addElements(connectOptions, base) {\n var connectBase = addNodeTo(base, options.cssClasses.connects);\n scope_Handles = [];\n scope_Connects = [];\n scope_Connects.push(addConnect(connectBase, connectOptions[0]));\n // [::::O====O====O====]\n // connectOptions = [0, 1, 1, 1]\n for (var i = 0; i < options.handles; i++) {\n // Keep a list of all added handles.\n scope_Handles.push(addOrigin(base, i));\n scope_HandleNumbers[i] = i;\n scope_Connects.push(addConnect(connectBase, connectOptions[i + 1]));\n }\n }\n // Initialize a single slider.\n function addSlider(addTarget) {\n // Apply classes and data to the target.\n addClass(addTarget, options.cssClasses.target);\n if (options.dir === 0) {\n addClass(addTarget, options.cssClasses.ltr);\n }\n else {\n addClass(addTarget, options.cssClasses.rtl);\n }\n if (options.ort === 0) {\n addClass(addTarget, options.cssClasses.horizontal);\n }\n else {\n addClass(addTarget, options.cssClasses.vertical);\n }\n var textDirection = getComputedStyle(addTarget).direction;\n if (textDirection === \"rtl\") {\n addClass(addTarget, options.cssClasses.textDirectionRtl);\n }\n else {\n addClass(addTarget, options.cssClasses.textDirectionLtr);\n }\n return addNodeTo(addTarget, options.cssClasses.base);\n }\n function addTooltip(handle, handleNumber) {\n if (!options.tooltips || !options.tooltips[handleNumber]) {\n return false;\n }\n return addNodeTo(handle.firstChild, options.cssClasses.tooltip);\n }\n function isSliderDisabled() {\n return scope_Target.hasAttribute(\"disabled\");\n }\n // Disable the slider dragging if any handle is disabled\n function isHandleDisabled(handleNumber) {\n var handleOrigin = scope_Handles[handleNumber];\n return handleOrigin.hasAttribute(\"disabled\");\n }\n function disable(handleNumber) {\n if (handleNumber !== null && handleNumber !== undefined) {\n scope_Handles[handleNumber].setAttribute(\"disabled\", \"\");\n scope_Handles[handleNumber].handle.removeAttribute(\"tabindex\");\n }\n else {\n scope_Target.setAttribute(\"disabled\", \"\");\n scope_Handles.forEach(function (handle) {\n handle.handle.removeAttribute(\"tabindex\");\n });\n }\n }\n function enable(handleNumber) {\n if (handleNumber !== null && handleNumber !== undefined) {\n scope_Handles[handleNumber].removeAttribute(\"disabled\");\n scope_Handles[handleNumber].handle.setAttribute(\"tabindex\", \"0\");\n }\n else {\n scope_Target.removeAttribute(\"disabled\");\n scope_Handles.forEach(function (handle) {\n handle.removeAttribute(\"disabled\");\n handle.handle.setAttribute(\"tabindex\", \"0\");\n });\n }\n }\n function removeTooltips() {\n if (scope_Tooltips) {\n removeEvent(\"update\" + INTERNAL_EVENT_NS.tooltips);\n scope_Tooltips.forEach(function (tooltip) {\n if (tooltip) {\n removeElement(tooltip);\n }\n });\n scope_Tooltips = null;\n }\n }\n // The tooltips option is a shorthand for using the 'update' event.\n function tooltips() {\n removeTooltips();\n // Tooltips are added with options.tooltips in original order.\n scope_Tooltips = scope_Handles.map(addTooltip);\n bindEvent(\"update\" + INTERNAL_EVENT_NS.tooltips, function (values, handleNumber, unencoded) {\n if (!scope_Tooltips || !options.tooltips) {\n return;\n }\n if (scope_Tooltips[handleNumber] === false) {\n return;\n }\n var formattedValue = values[handleNumber];\n if (options.tooltips[handleNumber] !== true) {\n formattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n }\n scope_Tooltips[handleNumber].innerHTML = formattedValue;\n });\n }\n function aria() {\n removeEvent(\"update\" + INTERNAL_EVENT_NS.aria);\n bindEvent(\"update\" + INTERNAL_EVENT_NS.aria, function (values, handleNumber, unencoded, tap, positions) {\n // Update Aria Values for all handles, as a change in one changes min and max values for the next.\n scope_HandleNumbers.forEach(function (index) {\n var handle = scope_Handles[index];\n var min = checkHandlePosition(scope_Locations, index, 0, true, true, true);\n var max = checkHandlePosition(scope_Locations, index, 100, true, true, true);\n var now = positions[index];\n // Formatted value for display\n var text = String(options.ariaFormat.to(unencoded[index]));\n // Map to slider range values\n min = scope_Spectrum.fromStepping(min).toFixed(1);\n max = scope_Spectrum.fromStepping(max).toFixed(1);\n now = scope_Spectrum.fromStepping(now).toFixed(1);\n handle.children[0].setAttribute(\"aria-valuemin\", min);\n handle.children[0].setAttribute(\"aria-valuemax\", max);\n handle.children[0].setAttribute(\"aria-valuenow\", now);\n handle.children[0].setAttribute(\"aria-valuetext\", text);\n });\n });\n }\n function getGroup(pips) {\n // Use the range.\n if (pips.mode === exports.PipsMode.Range || pips.mode === exports.PipsMode.Steps) {\n return scope_Spectrum.xVal;\n }\n if (pips.mode === exports.PipsMode.Count) {\n if (pips.values < 2) {\n throw new Error(\"noUiSlider: 'values' (>= 2) required for mode 'count'.\");\n }\n // Divide 0 - 100 in 'count' parts.\n var interval = pips.values - 1;\n var spread = 100 / interval;\n var values = [];\n // List these parts and have them handled as 'positions'.\n while (interval--) {\n values[interval] = interval * spread;\n }\n values.push(100);\n return mapToRange(values, pips.stepped);\n }\n if (pips.mode === exports.PipsMode.Positions) {\n // Map all percentages to on-range values.\n return mapToRange(pips.values, pips.stepped);\n }\n if (pips.mode === exports.PipsMode.Values) {\n // If the value must be stepped, it needs to be converted to a percentage first.\n if (pips.stepped) {\n return pips.values.map(function (value) {\n // Convert to percentage, apply step, return to value.\n return scope_Spectrum.fromStepping(scope_Spectrum.getStep(scope_Spectrum.toStepping(value)));\n });\n }\n // Otherwise, we can simply use the values.\n return pips.values;\n }\n return []; // pips.mode = never\n }\n function mapToRange(values, stepped) {\n return values.map(function (value) {\n return scope_Spectrum.fromStepping(stepped ? scope_Spectrum.getStep(value) : value);\n });\n }\n function generateSpread(pips) {\n function safeIncrement(value, increment) {\n // Avoid floating point variance by dropping the smallest decimal places.\n return Number((value + increment).toFixed(7));\n }\n var group = getGroup(pips);\n var indexes = {};\n var firstInRange = scope_Spectrum.xVal[0];\n var lastInRange = scope_Spectrum.xVal[scope_Spectrum.xVal.length - 1];\n var ignoreFirst = false;\n var ignoreLast = false;\n var prevPct = 0;\n // Create a copy of the group, sort it and filter away all duplicates.\n group = unique(group.slice().sort(function (a, b) {\n return a - b;\n }));\n // Make sure the range starts with the first element.\n if (group[0] !== firstInRange) {\n group.unshift(firstInRange);\n ignoreFirst = true;\n }\n // Likewise for the last one.\n if (group[group.length - 1] !== lastInRange) {\n group.push(lastInRange);\n ignoreLast = true;\n }\n group.forEach(function (current, index) {\n // Get the current step and the lower + upper positions.\n var step;\n var i;\n var q;\n var low = current;\n var high = group[index + 1];\n var newPct;\n var pctDifference;\n var pctPos;\n var type;\n var steps;\n var realSteps;\n var stepSize;\n var isSteps = pips.mode === exports.PipsMode.Steps;\n // When using 'steps' mode, use the provided steps.\n // Otherwise, we'll step on to the next subrange.\n if (isSteps) {\n step = scope_Spectrum.xNumSteps[index];\n }\n // Default to a 'full' step.\n if (!step) {\n step = high - low;\n }\n // If high is undefined we are at the last subrange. Make sure it iterates once (#1088)\n if (high === undefined) {\n high = low;\n }\n // Make sure step isn't 0, which would cause an infinite loop (#654)\n step = Math.max(step, 0.0000001);\n // Find all steps in the subrange.\n for (i = low; i <= high; i = safeIncrement(i, step)) {\n // Get the percentage value for the current step,\n // calculate the size for the subrange.\n newPct = scope_Spectrum.toStepping(i);\n pctDifference = newPct - prevPct;\n steps = pctDifference / (pips.density || 1);\n realSteps = Math.round(steps);\n // This ratio represents the amount of percentage-space a point indicates.\n // For a density 1 the points/percentage = 1. For density 2, that percentage needs to be re-divided.\n // Round the percentage offset to an even number, then divide by two\n // to spread the offset on both sides of the range.\n stepSize = pctDifference / realSteps;\n // Divide all points evenly, adding the correct number to this subrange.\n // Run up to <= so that 100% gets a point, event if ignoreLast is set.\n for (q = 1; q <= realSteps; q += 1) {\n // The ratio between the rounded value and the actual size might be ~1% off.\n // Correct the percentage offset by the number of points\n // per subrange. density = 1 will result in 100 points on the\n // full range, 2 for 50, 4 for 25, etc.\n pctPos = prevPct + q * stepSize;\n indexes[pctPos.toFixed(5)] = [scope_Spectrum.fromStepping(pctPos), 0];\n }\n // Determine the point type.\n type = group.indexOf(i) > -1 ? exports.PipsType.LargeValue : isSteps ? exports.PipsType.SmallValue : exports.PipsType.NoValue;\n // Enforce the 'ignoreFirst' option by overwriting the type for 0.\n if (!index && ignoreFirst && i !== high) {\n type = 0;\n }\n if (!(i === high && ignoreLast)) {\n // Mark the 'type' of this point. 0 = plain, 1 = real value, 2 = step value.\n indexes[newPct.toFixed(5)] = [i, type];\n }\n // Update the percentage count.\n prevPct = newPct;\n }\n });\n return indexes;\n }\n function addMarking(spread, filterFunc, formatter) {\n var _a, _b;\n var element = scope_Document.createElement(\"div\");\n var valueSizeClasses = (_a = {},\n _a[exports.PipsType.None] = \"\",\n _a[exports.PipsType.NoValue] = options.cssClasses.valueNormal,\n _a[exports.PipsType.LargeValue] = options.cssClasses.valueLarge,\n _a[exports.PipsType.SmallValue] = options.cssClasses.valueSub,\n _a);\n var markerSizeClasses = (_b = {},\n _b[exports.PipsType.None] = \"\",\n _b[exports.PipsType.NoValue] = options.cssClasses.markerNormal,\n _b[exports.PipsType.LargeValue] = options.cssClasses.markerLarge,\n _b[exports.PipsType.SmallValue] = options.cssClasses.markerSub,\n _b);\n var valueOrientationClasses = [options.cssClasses.valueHorizontal, options.cssClasses.valueVertical];\n var markerOrientationClasses = [options.cssClasses.markerHorizontal, options.cssClasses.markerVertical];\n addClass(element, options.cssClasses.pips);\n addClass(element, options.ort === 0 ? options.cssClasses.pipsHorizontal : options.cssClasses.pipsVertical);\n function getClasses(type, source) {\n var a = source === options.cssClasses.value;\n var orientationClasses = a ? valueOrientationClasses : markerOrientationClasses;\n var sizeClasses = a ? valueSizeClasses : markerSizeClasses;\n return source + \" \" + orientationClasses[options.ort] + \" \" + sizeClasses[type];\n }\n function addSpread(offset, value, type) {\n // Apply the filter function, if it is set.\n type = filterFunc ? filterFunc(value, type) : type;\n if (type === exports.PipsType.None) {\n return;\n }\n // Add a marker for every point\n var node = addNodeTo(element, false);\n node.className = getClasses(type, options.cssClasses.marker);\n node.style[options.style] = offset + \"%\";\n // Values are only appended for points marked '1' or '2'.\n if (type > exports.PipsType.NoValue) {\n node = addNodeTo(element, false);\n node.className = getClasses(type, options.cssClasses.value);\n node.setAttribute(\"data-value\", String(value));\n node.style[options.style] = offset + \"%\";\n node.innerHTML = String(formatter.to(value));\n }\n }\n // Append all points.\n Object.keys(spread).forEach(function (offset) {\n addSpread(offset, spread[offset][0], spread[offset][1]);\n });\n return element;\n }\n function removePips() {\n if (scope_Pips) {\n removeElement(scope_Pips);\n scope_Pips = null;\n }\n }\n function pips(pips) {\n // Fix #669\n removePips();\n var spread = generateSpread(pips);\n var filter = pips.filter;\n var format = pips.format || {\n to: function (value) {\n return String(Math.round(value));\n },\n };\n scope_Pips = scope_Target.appendChild(addMarking(spread, filter, format));\n return scope_Pips;\n }\n // Shorthand for base dimensions.\n function baseSize() {\n var rect = scope_Base.getBoundingClientRect();\n var alt = (\"offset\" + [\"Width\", \"Height\"][options.ort]);\n return options.ort === 0 ? rect.width || scope_Base[alt] : rect.height || scope_Base[alt];\n }\n // Handler for attaching events trough a proxy.\n function attachEvent(events, element, callback, data) {\n // This function can be used to 'filter' events to the slider.\n // element is a node, not a nodeList\n var method = function (event) {\n var e = fixEvent(event, data.pageOffset, data.target || element);\n // fixEvent returns false if this event has a different target\n // when handling (multi-) touch events;\n if (!e) {\n return false;\n }\n // doNotReject is passed by all end events to make sure released touches\n // are not rejected, leaving the slider \"stuck\" to the cursor;\n if (isSliderDisabled() && !data.doNotReject) {\n return false;\n }\n // Stop if an active 'tap' transition is taking place.\n if (hasClass(scope_Target, options.cssClasses.tap) && !data.doNotReject) {\n return false;\n }\n // Ignore right or middle clicks on start #454\n if (events === actions.start && e.buttons !== undefined && e.buttons > 1) {\n return false;\n }\n // Ignore right or middle clicks on start #454\n if (data.hover && e.buttons) {\n return false;\n }\n // 'supportsPassive' is only true if a browser also supports touch-action: none in CSS.\n // iOS safari does not, so it doesn't get to benefit from passive scrolling. iOS does support\n // touch-action: manipulation, but that allows panning, which breaks\n // sliders after zooming/on non-responsive pages.\n // See: https://bugs.webkit.org/show_bug.cgi?id=133112\n if (!supportsPassive) {\n e.preventDefault();\n }\n e.calcPoint = e.points[options.ort];\n // Call the event handler with the event [ and additional data ].\n callback(e, data);\n return;\n };\n var methods = [];\n // Bind a closure on the target for every event type.\n events.split(\" \").forEach(function (eventName) {\n element.addEventListener(eventName, method, supportsPassive ? { passive: true } : false);\n methods.push([eventName, method]);\n });\n return methods;\n }\n // Provide a clean event with standardized offset values.\n function fixEvent(e, pageOffset, eventTarget) {\n // Filter the event to register the type, which can be\n // touch, mouse or pointer. Offset changes need to be\n // made on an event specific basis.\n var touch = e.type.indexOf(\"touch\") === 0;\n var mouse = e.type.indexOf(\"mouse\") === 0;\n var pointer = e.type.indexOf(\"pointer\") === 0;\n var x = 0;\n var y = 0;\n // IE10 implemented pointer events with a prefix;\n if (e.type.indexOf(\"MSPointer\") === 0) {\n pointer = true;\n }\n // Erroneous events seem to be passed in occasionally on iOS/iPadOS after user finishes interacting with\n // the slider. They appear to be of type MouseEvent, yet they don't have usual properties set. Ignore\n // events that have no touches or buttons associated with them. (#1057, #1079, #1095)\n if (e.type === \"mousedown\" && !e.buttons && !e.touches) {\n return false;\n }\n // The only thing one handle should be concerned about is the touches that originated on top of it.\n if (touch) {\n // Returns true if a touch originated on the target.\n var isTouchOnTarget = function (checkTouch) {\n var target = checkTouch.target;\n return (target === eventTarget ||\n eventTarget.contains(target) ||\n (e.composed && e.composedPath().shift() === eventTarget));\n };\n // In the case of touchstart events, we need to make sure there is still no more than one\n // touch on the target so we look amongst all touches.\n if (e.type === \"touchstart\") {\n var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n // Do not support more than one touch per handle.\n if (targetTouches.length > 1) {\n return false;\n }\n x = targetTouches[0].pageX;\n y = targetTouches[0].pageY;\n }\n else {\n // In the other cases, find on changedTouches is enough.\n var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n // Cancel if the target touch has not moved.\n if (!targetTouch) {\n return false;\n }\n x = targetTouch.pageX;\n y = targetTouch.pageY;\n }\n }\n pageOffset = pageOffset || getPageOffset(scope_Document);\n if (mouse || pointer) {\n x = e.clientX + pageOffset.x;\n y = e.clientY + pageOffset.y;\n }\n e.pageOffset = pageOffset;\n e.points = [x, y];\n e.cursor = mouse || pointer; // Fix #435\n return e;\n }\n // Translate a coordinate in the document to a percentage on the slider\n function calcPointToPercentage(calcPoint) {\n var location = calcPoint - offset(scope_Base, options.ort);\n var proposal = (location * 100) / baseSize();\n // Clamp proposal between 0% and 100%\n // Out-of-bound coordinates may occur when .noUi-base pseudo-elements\n // are used (e.g. contained handles feature)\n proposal = limit(proposal);\n return options.dir ? 100 - proposal : proposal;\n }\n // Find handle closest to a certain percentage on the slider\n function getClosestHandle(clickedPosition) {\n var smallestDifference = 100;\n var handleNumber = false;\n scope_Handles.forEach(function (handle, index) {\n // Disabled handles are ignored\n if (isHandleDisabled(index)) {\n return;\n }\n var handlePosition = scope_Locations[index];\n var differenceWithThisHandle = Math.abs(handlePosition - clickedPosition);\n // Initial state\n var clickAtEdge = differenceWithThisHandle === 100 && smallestDifference === 100;\n // Difference with this handle is smaller than the previously checked handle\n var isCloser = differenceWithThisHandle < smallestDifference;\n var isCloserAfter = differenceWithThisHandle <= smallestDifference && clickedPosition > handlePosition;\n if (isCloser || isCloserAfter || clickAtEdge) {\n handleNumber = index;\n smallestDifference = differenceWithThisHandle;\n }\n });\n return handleNumber;\n }\n // Fire 'end' when a mouse or pen leaves the document.\n function documentLeave(event, data) {\n if (event.type === \"mouseout\" &&\n event.target.nodeName === \"HTML\" &&\n event.relatedTarget === null) {\n eventEnd(event, data);\n }\n }\n // Handle movement on document for handle and range drag.\n function eventMove(event, data) {\n // Fix #498\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n // IE9 has .buttons and .which zero on mousemove.\n // Firefox breaks the spec MDN defines.\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n return eventEnd(event, data);\n }\n // Check if we are moving up or down\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n // Convert the movement into a percentage of the slider width/height\n var proposal = (movement * 100) / data.baseSize;\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers, data.connect);\n }\n // Unbind move events on document, call callbacks.\n function eventEnd(event, data) {\n // The handle is no longer active, so remove the class.\n if (data.handle) {\n removeClass(data.handle, options.cssClasses.active);\n scope_ActiveHandlesCount -= 1;\n }\n // Unbind the move and end events, which are added on 'start'.\n data.listeners.forEach(function (c) {\n scope_DocumentElement.removeEventListener(c[0], c[1]);\n });\n if (scope_ActiveHandlesCount === 0) {\n // Remove dragging class.\n removeClass(scope_Target, options.cssClasses.drag);\n setZindex();\n // Remove cursor styles and text-selection events bound to the body.\n if (event.cursor) {\n scope_Body.style.cursor = \"\";\n scope_Body.removeEventListener(\"selectstart\", preventDefault);\n }\n }\n if (options.events.smoothSteps) {\n data.handleNumbers.forEach(function (handleNumber) {\n setHandle(handleNumber, scope_Locations[handleNumber], true, true, false, false);\n });\n data.handleNumbers.forEach(function (handleNumber) {\n fireEvent(\"update\", handleNumber);\n });\n }\n data.handleNumbers.forEach(function (handleNumber) {\n fireEvent(\"change\", handleNumber);\n fireEvent(\"set\", handleNumber);\n fireEvent(\"end\", handleNumber);\n });\n }\n // Bind move events on document.\n function eventStart(event, data) {\n // Ignore event if any handle is disabled\n if (data.handleNumbers.some(isHandleDisabled)) {\n return;\n }\n var handle;\n if (data.handleNumbers.length === 1) {\n var handleOrigin = scope_Handles[data.handleNumbers[0]];\n handle = handleOrigin.children[0];\n scope_ActiveHandlesCount += 1;\n // Mark the handle as 'active' so it can be styled.\n addClass(handle, options.cssClasses.active);\n }\n // A drag should never propagate up to the 'tap' event.\n event.stopPropagation();\n // Record the event listeners.\n var listeners = [];\n // Attach the move and end events.\n var moveEvent = attachEvent(actions.move, scope_DocumentElement, eventMove, {\n // The event target has changed so we need to propagate the original one so that we keep\n // relying on it to extract target touches.\n target: event.target,\n handle: handle,\n connect: data.connect,\n listeners: listeners,\n startCalcPoint: event.calcPoint,\n baseSize: baseSize(),\n pageOffset: event.pageOffset,\n handleNumbers: data.handleNumbers,\n buttonsProperty: event.buttons,\n locations: scope_Locations.slice(),\n });\n var endEvent = attachEvent(actions.end, scope_DocumentElement, eventEnd, {\n target: event.target,\n handle: handle,\n listeners: listeners,\n doNotReject: true,\n handleNumbers: data.handleNumbers,\n });\n var outEvent = attachEvent(\"mouseout\", scope_DocumentElement, documentLeave, {\n target: event.target,\n handle: handle,\n listeners: listeners,\n doNotReject: true,\n handleNumbers: data.handleNumbers,\n });\n // We want to make sure we pushed the listeners in the listener list rather than creating\n // a new one as it has already been passed to the event handlers.\n listeners.push.apply(listeners, moveEvent.concat(endEvent, outEvent));\n // Text selection isn't an issue on touch devices,\n // so adding cursor styles can be skipped.\n if (event.cursor) {\n // Prevent the 'I' cursor and extend the range-drag cursor.\n scope_Body.style.cursor = getComputedStyle(event.target).cursor;\n // Mark the target with a dragging state.\n if (scope_Handles.length > 1) {\n addClass(scope_Target, options.cssClasses.drag);\n }\n // Prevent text selection when dragging the handles.\n // In noUiSlider <= 9.2.0, this was handled by calling preventDefault on mouse/touch start/move,\n // which is scroll blocking. The selectstart event is supported by FireFox starting from version 52,\n // meaning the only holdout is iOS Safari. This doesn't matter: text selection isn't triggered there.\n // The 'cursor' flag is false.\n // See: http://caniuse.com/#search=selectstart\n scope_Body.addEventListener(\"selectstart\", preventDefault, false);\n }\n data.handleNumbers.forEach(function (handleNumber) {\n fireEvent(\"start\", handleNumber);\n });\n }\n // Move closest handle to tapped location.\n function eventTap(event) {\n // The tap event shouldn't propagate up\n event.stopPropagation();\n var proposal = calcPointToPercentage(event.calcPoint);\n var handleNumber = getClosestHandle(proposal);\n // Tackle the case that all handles are 'disabled'.\n if (handleNumber === false) {\n return;\n }\n // Flag the slider as it is now in a transitional state.\n // Transition takes a configurable amount of ms (default 300). Re-enable the slider after that.\n if (!options.events.snap) {\n addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);\n }\n setHandle(handleNumber, proposal, true, true);\n setZindex();\n fireEvent(\"slide\", handleNumber, true);\n fireEvent(\"update\", handleNumber, true);\n if (!options.events.snap) {\n fireEvent(\"change\", handleNumber, true);\n fireEvent(\"set\", handleNumber, true);\n }\n else {\n eventStart(event, { handleNumbers: [handleNumber] });\n }\n }\n // Fires a 'hover' event for a hovered mouse/pen position.\n function eventHover(event) {\n var proposal = calcPointToPercentage(event.calcPoint);\n var to = scope_Spectrum.getStep(proposal);\n var value = scope_Spectrum.fromStepping(to);\n Object.keys(scope_Events).forEach(function (targetEvent) {\n if (\"hover\" === targetEvent.split(\".\")[0]) {\n scope_Events[targetEvent].forEach(function (callback) {\n callback.call(scope_Self, value);\n });\n }\n });\n }\n // Handles keydown on focused handles\n // Don't move the document when pressing arrow keys on focused handles\n function eventKeydown(event, handleNumber) {\n if (isSliderDisabled() || isHandleDisabled(handleNumber)) {\n return false;\n }\n var horizontalKeys = [\"Left\", \"Right\"];\n var verticalKeys = [\"Down\", \"Up\"];\n var largeStepKeys = [\"PageDown\", \"PageUp\"];\n var edgeKeys = [\"Home\", \"End\"];\n if (options.dir && !options.ort) {\n // On an right-to-left slider, the left and right keys act inverted\n horizontalKeys.reverse();\n }\n else if (options.ort && !options.dir) {\n // On a top-to-bottom slider, the up and down keys act inverted\n verticalKeys.reverse();\n largeStepKeys.reverse();\n }\n // Strip \"Arrow\" for IE compatibility. https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key\n var key = event.key.replace(\"Arrow\", \"\");\n var isLargeDown = key === largeStepKeys[0];\n var isLargeUp = key === largeStepKeys[1];\n var isDown = key === verticalKeys[0] || key === horizontalKeys[0] || isLargeDown;\n var isUp = key === verticalKeys[1] || key === horizontalKeys[1] || isLargeUp;\n var isMin = key === edgeKeys[0];\n var isMax = key === edgeKeys[1];\n if (!isDown && !isUp && !isMin && !isMax) {\n return true;\n }\n event.preventDefault();\n var to;\n if (isUp || isDown) {\n var direction = isDown ? 0 : 1;\n var steps = getNextStepsForHandle(handleNumber);\n var step = steps[direction];\n // At the edge of a slider, do nothing\n if (step === null) {\n return false;\n }\n // No step set, use the default of 10% of the sub-range\n if (step === false) {\n step = scope_Spectrum.getDefaultStep(scope_Locations[handleNumber], isDown, options.keyboardDefaultStep);\n }\n if (isLargeUp || isLargeDown) {\n step *= options.keyboardPageMultiplier;\n }\n else {\n step *= options.keyboardMultiplier;\n }\n // Step over zero-length ranges (#948);\n step = Math.max(step, 0.0000001);\n // Decrement for down steps\n step = (isDown ? -1 : 1) * step;\n to = scope_Values[handleNumber] + step;\n }\n else if (isMax) {\n // End key\n to = options.spectrum.xVal[options.spectrum.xVal.length - 1];\n }\n else {\n // Home key\n to = options.spectrum.xVal[0];\n }\n setHandle(handleNumber, scope_Spectrum.toStepping(to), true, true);\n fireEvent(\"slide\", handleNumber);\n fireEvent(\"update\", handleNumber);\n fireEvent(\"change\", handleNumber);\n fireEvent(\"set\", handleNumber);\n return false;\n }\n // Attach events to several slider parts.\n function bindSliderEvents(behaviour) {\n // Attach the standard drag event to the handles.\n if (!behaviour.fixed) {\n scope_Handles.forEach(function (handle, index) {\n // These events are only bound to the visual handle\n // element, not the 'real' origin element.\n attachEvent(actions.start, handle.children[0], eventStart, {\n handleNumbers: [index],\n });\n });\n }\n // Attach the tap event to the slider base.\n if (behaviour.tap) {\n attachEvent(actions.start, scope_Base, eventTap, {});\n }\n // Fire hover events\n if (behaviour.hover) {\n attachEvent(actions.move, scope_Base, eventHover, {\n hover: true,\n });\n }\n // Make the range draggable.\n if (behaviour.drag) {\n scope_Connects.forEach(function (connect, index) {\n if (connect === false || index === 0 || index === scope_Connects.length - 1) {\n return;\n }\n var handleBefore = scope_Handles[index - 1];\n var handleAfter = scope_Handles[index];\n var eventHolders = [connect];\n var handlesToDrag = [handleBefore, handleAfter];\n var handleNumbersToDrag = [index - 1, index];\n addClass(connect, options.cssClasses.draggable);\n // When the range is fixed, the entire range can\n // be dragged by the handles. The handle in the first\n // origin will propagate the start event upward,\n // but it needs to be bound manually on the other.\n if (behaviour.fixed) {\n eventHolders.push(handleBefore.children[0]);\n eventHolders.push(handleAfter.children[0]);\n }\n if (behaviour.dragAll) {\n handlesToDrag = scope_Handles;\n handleNumbersToDrag = scope_HandleNumbers;\n }\n eventHolders.forEach(function (eventHolder) {\n attachEvent(actions.start, eventHolder, eventStart, {\n handles: handlesToDrag,\n handleNumbers: handleNumbersToDrag,\n connect: connect,\n });\n });\n });\n }\n }\n // Attach an event to this slider, possibly including a namespace\n function bindEvent(namespacedEvent, callback) {\n scope_Events[namespacedEvent] = scope_Events[namespacedEvent] || [];\n scope_Events[namespacedEvent].push(callback);\n // If the event bound is 'update,' fire it immediately for all handles.\n if (namespacedEvent.split(\".\")[0] === \"update\") {\n scope_Handles.forEach(function (a, index) {\n fireEvent(\"update\", index);\n });\n }\n }\n function isInternalNamespace(namespace) {\n return namespace === INTERNAL_EVENT_NS.aria || namespace === INTERNAL_EVENT_NS.tooltips;\n }\n // Undo attachment of event\n function removeEvent(namespacedEvent) {\n var event = namespacedEvent && namespacedEvent.split(\".\")[0];\n var namespace = event ? namespacedEvent.substring(event.length) : namespacedEvent;\n Object.keys(scope_Events).forEach(function (bind) {\n var tEvent = bind.split(\".\")[0];\n var tNamespace = bind.substring(tEvent.length);\n if ((!event || event === tEvent) && (!namespace || namespace === tNamespace)) {\n // only delete protected internal event if intentional\n if (!isInternalNamespace(tNamespace) || namespace === tNamespace) {\n delete scope_Events[bind];\n }\n }\n });\n }\n // External event handling\n function fireEvent(eventName, handleNumber, tap) {\n Object.keys(scope_Events).forEach(function (targetEvent) {\n var eventType = targetEvent.split(\".\")[0];\n if (eventName === eventType) {\n scope_Events[targetEvent].forEach(function (callback) {\n callback.call(\n // Use the slider public API as the scope ('this')\n scope_Self, \n // Return values as array, so arg_1[arg_2] is always valid.\n scope_Values.map(options.format.to), \n // Handle index, 0 or 1\n handleNumber, \n // Un-formatted slider values\n scope_Values.slice(), \n // Event is fired by tap, true or false\n tap || false, \n // Left offset of the handle, in relation to the slider\n scope_Locations.slice(), \n // add the slider public API to an accessible parameter when this is unavailable\n scope_Self);\n });\n }\n });\n }\n // Split out the handle positioning logic so the Move event can use it, too\n function checkHandlePosition(reference, handleNumber, to, lookBackward, lookForward, getValue, smoothSteps) {\n var distance;\n // For sliders with multiple handles, limit movement to the other handle.\n // Apply the margin option by adding it to the handle positions.\n if (scope_Handles.length > 1 && !options.events.unconstrained) {\n if (lookBackward && handleNumber > 0) {\n distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.margin, false);\n to = Math.max(to, distance);\n }\n if (lookForward && handleNumber < scope_Handles.length - 1) {\n distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.margin, true);\n to = Math.min(to, distance);\n }\n }\n // The limit option has the opposite effect, limiting handles to a\n // maximum distance from another. Limit must be > 0, as otherwise\n // handles would be unmovable.\n if (scope_Handles.length > 1 && options.limit) {\n if (lookBackward && handleNumber > 0) {\n distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.limit, false);\n to = Math.min(to, distance);\n }\n if (lookForward && handleNumber < scope_Handles.length - 1) {\n distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.limit, true);\n to = Math.max(to, distance);\n }\n }\n // The padding option keeps the handles a certain distance from the\n // edges of the slider. Padding must be > 0.\n if (options.padding) {\n if (handleNumber === 0) {\n distance = scope_Spectrum.getAbsoluteDistance(0, options.padding[0], false);\n to = Math.max(to, distance);\n }\n if (handleNumber === scope_Handles.length - 1) {\n distance = scope_Spectrum.getAbsoluteDistance(100, options.padding[1], true);\n to = Math.min(to, distance);\n }\n }\n if (!smoothSteps) {\n to = scope_Spectrum.getStep(to);\n }\n // Limit percentage to the 0 - 100 range\n to = limit(to);\n // Return false if handle can't move\n if (to === reference[handleNumber] && !getValue) {\n return false;\n }\n return to;\n }\n // Uses slider orientation to create CSS rules. a = base value;\n function inRuleOrder(v, a) {\n var o = options.ort;\n return (o ? a : v) + \", \" + (o ? v : a);\n }\n // Moves handle(s) by a percentage\n // (bool, % to move, [% where handle started, ...], [index in scope_Handles, ...])\n function moveHandles(upward, proposal, locations, handleNumbers, connect) {\n var proposals = locations.slice();\n // Store first handle now, so we still have it in case handleNumbers is reversed\n var firstHandle = handleNumbers[0];\n var smoothSteps = options.events.smoothSteps;\n var b = [!upward, upward];\n var f = [upward, !upward];\n // Copy handleNumbers so we don't change the dataset\n handleNumbers = handleNumbers.slice();\n // Check to see which handle is 'leading'.\n // If that one can't move the second can't either.\n if (upward) {\n handleNumbers.reverse();\n }\n // Step 1: get the maximum percentage that any of the handles can move\n if (handleNumbers.length > 1) {\n handleNumbers.forEach(function (handleNumber, o) {\n var to = checkHandlePosition(proposals, handleNumber, proposals[handleNumber] + proposal, b[o], f[o], false, smoothSteps);\n // Stop if one of the handles can't move.\n if (to === false) {\n proposal = 0;\n }\n else {\n proposal = to - proposals[handleNumber];\n proposals[handleNumber] = to;\n }\n });\n }\n // If using one handle, check backward AND forward\n else {\n b = f = [true];\n }\n var state = false;\n // Step 2: Try to set the handles with the found percentage\n handleNumbers.forEach(function (handleNumber, o) {\n state =\n setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o], false, smoothSteps) || state;\n });\n // Step 3: If a handle moved, fire events\n if (state) {\n handleNumbers.forEach(function (handleNumber) {\n fireEvent(\"update\", handleNumber);\n fireEvent(\"slide\", handleNumber);\n });\n // If target is a connect, then fire drag event\n if (connect != undefined) {\n fireEvent(\"drag\", firstHandle);\n }\n }\n }\n // Takes a base value and an offset. This offset is used for the connect bar size.\n // In the initial design for this feature, the origin element was 1% wide.\n // Unfortunately, a rounding bug in Chrome makes it impossible to implement this feature\n // in this manner: https://bugs.chromium.org/p/chromium/issues/detail?id=798223\n function transformDirection(a, b) {\n return options.dir ? 100 - a - b : a;\n }\n // Updates scope_Locations and scope_Values, updates visual state\n function updateHandlePosition(handleNumber, to) {\n // Update locations.\n scope_Locations[handleNumber] = to;\n // Convert the value to the slider stepping/range.\n scope_Values[handleNumber] = scope_Spectrum.fromStepping(to);\n var translation = transformDirection(to, 0) - scope_DirOffset;\n var translateRule = \"translate(\" + inRuleOrder(translation + \"%\", \"0\") + \")\";\n scope_Handles[handleNumber].style[options.transformRule] = translateRule;\n updateConnect(handleNumber);\n updateConnect(handleNumber + 1);\n }\n // Handles before the slider middle are stacked later = higher,\n // Handles after the middle later is lower\n // [[7] [8] .......... | .......... [5] [4]\n function setZindex() {\n scope_HandleNumbers.forEach(function (handleNumber) {\n var dir = scope_Locations[handleNumber] > 50 ? -1 : 1;\n var zIndex = 3 + (scope_Handles.length + dir * handleNumber);\n scope_Handles[handleNumber].style.zIndex = String(zIndex);\n });\n }\n // Test suggested values and apply margin, step.\n // if exactInput is true, don't run checkHandlePosition, then the handle can be placed in between steps (#436)\n function setHandle(handleNumber, to, lookBackward, lookForward, exactInput, smoothSteps) {\n if (!exactInput) {\n to = checkHandlePosition(scope_Locations, handleNumber, to, lookBackward, lookForward, false, smoothSteps);\n }\n if (to === false) {\n return false;\n }\n updateHandlePosition(handleNumber, to);\n return true;\n }\n // Updates style attribute for connect nodes\n function updateConnect(index) {\n // Skip connects set to false\n if (!scope_Connects[index]) {\n return;\n }\n var l = 0;\n var h = 100;\n if (index !== 0) {\n l = scope_Locations[index - 1];\n }\n if (index !== scope_Connects.length - 1) {\n h = scope_Locations[index];\n }\n // We use two rules:\n // 'translate' to change the left/top offset;\n // 'scale' to change the width of the element;\n // As the element has a width of 100%, a translation of 100% is equal to 100% of the parent (.noUi-base)\n var connectWidth = h - l;\n var translateRule = \"translate(\" + inRuleOrder(transformDirection(l, connectWidth) + \"%\", \"0\") + \")\";\n var scaleRule = \"scale(\" + inRuleOrder(connectWidth / 100, \"1\") + \")\";\n scope_Connects[index].style[options.transformRule] =\n translateRule + \" \" + scaleRule;\n }\n // Parses value passed to .set method. Returns current value if not parse-able.\n function resolveToValue(to, handleNumber) {\n // Setting with null indicates an 'ignore'.\n // Inputting 'false' is invalid.\n if (to === null || to === false || to === undefined) {\n return scope_Locations[handleNumber];\n }\n // If a formatted number was passed, attempt to decode it.\n if (typeof to === \"number\") {\n to = String(to);\n }\n to = options.format.from(to);\n if (to !== false) {\n to = scope_Spectrum.toStepping(to);\n }\n // If parsing the number failed, use the current value.\n if (to === false || isNaN(to)) {\n return scope_Locations[handleNumber];\n }\n return to;\n }\n // Set the slider value.\n function valueSet(input, fireSetEvent, exactInput) {\n var values = asArray(input);\n var isInit = scope_Locations[0] === undefined;\n // Event fires by default\n fireSetEvent = fireSetEvent === undefined ? true : fireSetEvent;\n // Animation is optional.\n // Make sure the initial values were set before using animated placement.\n if (options.animate && !isInit) {\n addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);\n }\n // First pass, without lookAhead but with lookBackward. Values are set from left to right.\n scope_HandleNumbers.forEach(function (handleNumber) {\n setHandle(handleNumber, resolveToValue(values[handleNumber], handleNumber), true, false, exactInput);\n });\n var i = scope_HandleNumbers.length === 1 ? 0 : 1;\n // Spread handles evenly across the slider if the range has no size (min=max)\n if (isInit && scope_Spectrum.hasNoSize()) {\n exactInput = true;\n scope_Locations[0] = 0;\n if (scope_HandleNumbers.length > 1) {\n var space_1 = 100 / (scope_HandleNumbers.length - 1);\n scope_HandleNumbers.forEach(function (handleNumber) {\n scope_Locations[handleNumber] = handleNumber * space_1;\n });\n }\n }\n // Secondary passes. Now that all base values are set, apply constraints.\n // Iterate all handles to ensure constraints are applied for the entire slider (Issue #1009)\n for (; i < scope_HandleNumbers.length; ++i) {\n scope_HandleNumbers.forEach(function (handleNumber) {\n setHandle(handleNumber, scope_Locations[handleNumber], true, true, exactInput);\n });\n }\n setZindex();\n scope_HandleNumbers.forEach(function (handleNumber) {\n fireEvent(\"update\", handleNumber);\n // Fire the event only for handles that received a new value, as per #579\n if (values[handleNumber] !== null && fireSetEvent) {\n fireEvent(\"set\", handleNumber);\n }\n });\n }\n // Reset slider to initial values\n function valueReset(fireSetEvent) {\n valueSet(options.start, fireSetEvent);\n }\n // Set value for a single handle\n function valueSetHandle(handleNumber, value, fireSetEvent, exactInput) {\n // Ensure numeric input\n handleNumber = Number(handleNumber);\n if (!(handleNumber >= 0 && handleNumber < scope_HandleNumbers.length)) {\n throw new Error(\"noUiSlider: invalid handle number, got: \" + handleNumber);\n }\n // Look both backward and forward, since we don't want this handle to \"push\" other handles (#960);\n // The exactInput argument can be used to ignore slider stepping (#436)\n setHandle(handleNumber, resolveToValue(value, handleNumber), true, true, exactInput);\n fireEvent(\"update\", handleNumber);\n if (fireSetEvent) {\n fireEvent(\"set\", handleNumber);\n }\n }\n // Get the slider value.\n function valueGet(unencoded) {\n if (unencoded === void 0) { unencoded = false; }\n if (unencoded) {\n // return a copy of the raw values\n return scope_Values.length === 1 ? scope_Values[0] : scope_Values.slice(0);\n }\n var values = scope_Values.map(options.format.to);\n // If only one handle is used, return a single value.\n if (values.length === 1) {\n return values[0];\n }\n return values;\n }\n // Removes classes from the root and empties it.\n function destroy() {\n // remove protected internal listeners\n removeEvent(INTERNAL_EVENT_NS.aria);\n removeEvent(INTERNAL_EVENT_NS.tooltips);\n Object.keys(options.cssClasses).forEach(function (key) {\n removeClass(scope_Target, options.cssClasses[key]);\n });\n while (scope_Target.firstChild) {\n scope_Target.removeChild(scope_Target.firstChild);\n }\n delete scope_Target.noUiSlider;\n }\n function getNextStepsForHandle(handleNumber) {\n var location = scope_Locations[handleNumber];\n var nearbySteps = scope_Spectrum.getNearbySteps(location);\n var value = scope_Values[handleNumber];\n var increment = nearbySteps.thisStep.step;\n var decrement = null;\n // If snapped, directly use defined step value\n if (options.snap) {\n return [\n value - nearbySteps.stepBefore.startValue || null,\n nearbySteps.stepAfter.startValue - value || null,\n ];\n }\n // If the next value in this step moves into the next step,\n // the increment is the start of the next step - the current value\n if (increment !== false) {\n if (value + increment > nearbySteps.stepAfter.startValue) {\n increment = nearbySteps.stepAfter.startValue - value;\n }\n }\n // If the value is beyond the starting point\n if (value > nearbySteps.thisStep.startValue) {\n decrement = nearbySteps.thisStep.step;\n }\n else if (nearbySteps.stepBefore.step === false) {\n decrement = false;\n }\n // If a handle is at the start of a step, it always steps back into the previous step first\n else {\n decrement = value - nearbySteps.stepBefore.highestStep;\n }\n // Now, if at the slider edges, there is no in/decrement\n if (location === 100) {\n increment = null;\n }\n else if (location === 0) {\n decrement = null;\n }\n // As per #391, the comparison for the decrement step can have some rounding issues.\n var stepDecimals = scope_Spectrum.countStepDecimals();\n // Round per #391\n if (increment !== null && increment !== false) {\n increment = Number(increment.toFixed(stepDecimals));\n }\n if (decrement !== null && decrement !== false) {\n decrement = Number(decrement.toFixed(stepDecimals));\n }\n return [decrement, increment];\n }\n // Get the current step size for the slider.\n function getNextSteps() {\n return scope_HandleNumbers.map(getNextStepsForHandle);\n }\n // Updatable: margin, limit, padding, step, range, animate, snap\n function updateOptions(optionsToUpdate, fireSetEvent) {\n // Spectrum is created using the range, snap, direction and step options.\n // 'snap' and 'step' can be updated.\n // If 'snap' and 'step' are not passed, they should remain unchanged.\n var v = valueGet();\n var updateAble = [\n \"margin\",\n \"limit\",\n \"padding\",\n \"range\",\n \"animate\",\n \"snap\",\n \"step\",\n \"format\",\n \"pips\",\n \"tooltips\",\n ];\n // Only change options that we're actually passed to update.\n updateAble.forEach(function (name) {\n // Check for undefined. null removes the value.\n if (optionsToUpdate[name] !== undefined) {\n originalOptions[name] = optionsToUpdate[name];\n }\n });\n var newOptions = testOptions(originalOptions);\n // Load new options into the slider state\n updateAble.forEach(function (name) {\n if (optionsToUpdate[name] !== undefined) {\n options[name] = newOptions[name];\n }\n });\n scope_Spectrum = newOptions.spectrum;\n // Limit, margin and padding depend on the spectrum but are stored outside of it. (#677)\n options.margin = newOptions.margin;\n options.limit = newOptions.limit;\n options.padding = newOptions.padding;\n // Update pips, removes existing.\n if (options.pips) {\n pips(options.pips);\n }\n else {\n removePips();\n }\n // Update tooltips, removes existing.\n if (options.tooltips) {\n tooltips();\n }\n else {\n removeTooltips();\n }\n // Invalidate the current positioning so valueSet forces an update.\n scope_Locations = [];\n valueSet(isSet(optionsToUpdate.start) ? optionsToUpdate.start : v, fireSetEvent);\n }\n // Initialization steps\n function setupSlider() {\n // Create the base element, initialize HTML and set classes.\n // Add handles and connect elements.\n scope_Base = addSlider(scope_Target);\n addElements(options.connect, scope_Base);\n // Attach user events.\n bindSliderEvents(options.events);\n // Use the public value method to set the start values.\n valueSet(options.start);\n if (options.pips) {\n pips(options.pips);\n }\n if (options.tooltips) {\n tooltips();\n }\n aria();\n }\n setupSlider();\n var scope_Self = {\n destroy: destroy,\n steps: getNextSteps,\n on: bindEvent,\n off: removeEvent,\n get: valueGet,\n set: valueSet,\n setHandle: valueSetHandle,\n reset: valueReset,\n disable: disable,\n enable: enable,\n // Exposed for unit testing, don't use this in your application.\n __moveHandles: function (upward, proposal, handleNumbers) {\n moveHandles(upward, proposal, scope_Locations, handleNumbers);\n },\n options: originalOptions,\n updateOptions: updateOptions,\n target: scope_Target,\n removePips: removePips,\n removeTooltips: removeTooltips,\n getPositions: function () {\n return scope_Locations.slice();\n },\n getTooltips: function () {\n return scope_Tooltips;\n },\n getOrigins: function () {\n return scope_Handles;\n },\n pips: pips, // Issue #594\n };\n return scope_Self;\n }\n // Run the standard initializer\n function initialize(target, originalOptions) {\n if (!target || !target.nodeName) {\n throw new Error(\"noUiSlider: create requires a single element, got: \" + target);\n }\n // Throw an error if the slider was already initialized.\n if (target.noUiSlider) {\n throw new Error(\"noUiSlider: Slider was already initialized.\");\n }\n // Test the options and create the slider environment;\n var options = testOptions(originalOptions);\n var api = scope(target, options, originalOptions);\n target.noUiSlider = api;\n return api;\n }\n var nouislider = {\n // Exposed for unit testing, don't use this in your application.\n __spectrum: Spectrum,\n // A reference to the default classes, allows global changes.\n // Use the cssClasses option for changes to one slider.\n cssClasses: cssClasses,\n create: initialize,\n };\n\n exports.create = initialize;\n exports.cssClasses = cssClasses;\n exports[\"default\"] = nouislider;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n","/**\n * Based on Kendo UI Core expression code \n */\n'use strict'\n\nfunction Cache(maxSize) {\n this._maxSize = maxSize\n this.clear()\n}\nCache.prototype.clear = function () {\n this._size = 0\n this._values = Object.create(null)\n}\nCache.prototype.get = function (key) {\n return this._values[key]\n}\nCache.prototype.set = function (key, value) {\n this._size >= this._maxSize && this.clear()\n if (!(key in this._values)) this._size++\n\n return (this._values[key] = value)\n}\n\nvar SPLIT_REGEX = /[^.^\\]^[]+|(?=\\[\\]|\\.\\.)/g,\n DIGIT_REGEX = /^\\d+$/,\n LEAD_DIGIT_REGEX = /^\\d/,\n SPEC_CHAR_REGEX = /[~`!#$%\\^&*+=\\-\\[\\]\\\\';,/{}|\\\\\":<>\\?]/g,\n CLEAN_QUOTES_REGEX = /^\\s*(['\"]?)(.*?)(\\1)\\s*$/,\n MAX_CACHE_SIZE = 512\n\nvar pathCache = new Cache(MAX_CACHE_SIZE),\n setCache = new Cache(MAX_CACHE_SIZE),\n getCache = new Cache(MAX_CACHE_SIZE)\n\nvar config\n\nmodule.exports = {\n Cache: Cache,\n\n split: split,\n\n normalizePath: normalizePath,\n\n setter: function (path) {\n var parts = normalizePath(path)\n\n return (\n setCache.get(path) ||\n setCache.set(path, function setter(obj, value) {\n var index = 0\n var len = parts.length\n var data = obj\n\n while (index < len - 1) {\n var part = parts[index]\n if (\n part === '__proto__' ||\n part === 'constructor' ||\n part === 'prototype'\n ) {\n return obj\n }\n\n data = data[parts[index++]]\n }\n data[parts[index]] = value\n })\n )\n },\n\n getter: function (path, safe) {\n var parts = normalizePath(path)\n return (\n getCache.get(path) ||\n getCache.set(path, function getter(data) {\n var index = 0,\n len = parts.length\n while (index < len) {\n if (data != null || !safe) data = data[parts[index++]]\n else return\n }\n return data\n })\n )\n },\n\n join: function (segments) {\n return segments.reduce(function (path, part) {\n return (\n path +\n (isQuoted(part) || DIGIT_REGEX.test(part)\n ? '[' + part + ']'\n : (path ? '.' : '') + part)\n )\n }, '')\n },\n\n forEach: function (path, cb, thisArg) {\n forEach(Array.isArray(path) ? path : split(path), cb, thisArg)\n },\n}\n\nfunction normalizePath(path) {\n return (\n pathCache.get(path) ||\n pathCache.set(\n path,\n split(path).map(function (part) {\n return part.replace(CLEAN_QUOTES_REGEX, '$2')\n })\n )\n )\n}\n\nfunction split(path) {\n return path.match(SPLIT_REGEX) || ['']\n}\n\nfunction forEach(parts, iter, thisArg) {\n var len = parts.length,\n part,\n idx,\n isArray,\n isBracket\n\n for (idx = 0; idx < len; idx++) {\n part = parts[idx]\n\n if (part) {\n if (shouldBeQuoted(part)) {\n part = '\"' + part + '\"'\n }\n\n isBracket = isQuoted(part)\n isArray = !isBracket && /^\\d+$/.test(part)\n\n iter.call(thisArg, part, isBracket, isArray, idx, parts)\n }\n }\n}\n\nfunction isQuoted(str) {\n return (\n typeof str === 'string' && str && [\"'\", '\"'].indexOf(str.charAt(0)) !== -1\n )\n}\n\nfunction hasLeadingNumber(part) {\n return part.match(LEAD_DIGIT_REGEX) && !part.match(DIGIT_REGEX)\n}\n\nfunction hasSpecialChars(part) {\n return SPEC_CHAR_REGEX.test(part)\n}\n\nfunction shouldBeQuoted(part) {\n return !isQuoted(part) && (hasLeadingNumber(part) || hasSpecialChars(part))\n}\n","const reWords = /[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+|(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*/g\n\nconst words = (str) => str.match(reWords) || []\n\nconst upperFirst = (str) => str[0].toUpperCase() + str.slice(1)\n\nconst join = (str, d) => words(str).join(d).toLowerCase()\n\nconst camelCase = (str) =>\n words(str).reduce(\n (acc, next) =>\n `${acc}${\n !acc\n ? next.toLowerCase()\n : next[0].toUpperCase() + next.slice(1).toLowerCase()\n }`,\n '',\n )\n\nconst pascalCase = (str) => upperFirst(camelCase(str))\n\nconst snakeCase = (str) => join(str, '_')\n\nconst kebabCase = (str) => join(str, '-')\n\nconst sentenceCase = (str) => upperFirst(join(str, ' '))\n\nconst titleCase = (str) => words(str).map(upperFirst).join(' ')\n\nmodule.exports = {\n words,\n upperFirst,\n camelCase,\n pascalCase,\n snakeCase,\n kebabCase,\n sentenceCase,\n titleCase,\n}\n","\n/**\n * Topological sorting function\n *\n * @param {Array} edges\n * @returns {Array}\n */\n\nmodule.exports = function(edges) {\n return toposort(uniqueNodes(edges), edges)\n}\n\nmodule.exports.array = toposort\n\nfunction toposort(nodes, edges) {\n var cursor = nodes.length\n , sorted = new Array(cursor)\n , visited = {}\n , i = cursor\n // Better data structures make algorithm much faster.\n , outgoingEdges = makeOutgoingEdges(edges)\n , nodesHash = makeNodesHash(nodes)\n\n // check for unknown nodes\n edges.forEach(function(edge) {\n if (!nodesHash.has(edge[0]) || !nodesHash.has(edge[1])) {\n throw new Error('Unknown node. There is an unknown node in the supplied edges.')\n }\n })\n\n while (i--) {\n if (!visited[i]) visit(nodes[i], i, new Set())\n }\n\n return sorted\n\n function visit(node, i, predecessors) {\n if(predecessors.has(node)) {\n var nodeRep\n try {\n nodeRep = \", node was:\" + JSON.stringify(node)\n } catch(e) {\n nodeRep = \"\"\n }\n throw new Error('Cyclic dependency' + nodeRep)\n }\n\n if (!nodesHash.has(node)) {\n throw new Error('Found unknown node. Make sure to provided all involved nodes. Unknown node: '+JSON.stringify(node))\n }\n\n if (visited[i]) return;\n visited[i] = true\n\n var outgoing = outgoingEdges.get(node) || new Set()\n outgoing = Array.from(outgoing)\n\n if (i = outgoing.length) {\n predecessors.add(node)\n do {\n var child = outgoing[--i]\n visit(child, nodesHash.get(child), predecessors)\n } while (i)\n predecessors.delete(node)\n }\n\n sorted[--cursor] = node\n }\n}\n\nfunction uniqueNodes(arr){\n var res = new Set()\n for (var i = 0, len = arr.length; i < len; i++) {\n var edge = arr[i]\n res.add(edge[0])\n res.add(edge[1])\n }\n return Array.from(res)\n}\n\nfunction makeOutgoingEdges(arr){\n var edges = new Map()\n for (var i = 0, len = arr.length; i < len; i++) {\n var edge = arr[i]\n if (!edges.has(edge[0])) edges.set(edge[0], new Set())\n if (!edges.has(edge[1])) edges.set(edge[1], new Set())\n edges.get(edge[0]).add(edge[1])\n }\n return edges\n}\n\nfunction makeNodesHash(arr){\n var res = new Map()\n for (var i = 0, len = arr.length; i < len; i++) {\n res.set(arr[i], i)\n }\n return res\n}\n","import { getter, forEach, split, normalizePath, join } from 'property-expr';\nimport { camelCase, snakeCase } from 'tiny-case';\nimport toposort from 'toposort';\n\nconst toString = Object.prototype.toString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\nconst symbolToString = typeof Symbol !== 'undefined' ? Symbol.prototype.toString : () => '';\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\nfunction printNumber(val) {\n if (val != +val) return 'NaN';\n const isNegativeZero = val === 0 && 1 / val < 0;\n return isNegativeZero ? '-0' : '' + val;\n}\nfunction printSimpleValue(val, quoteStrings = false) {\n if (val == null || val === true || val === false) return '' + val;\n const typeOf = typeof val;\n if (typeOf === 'number') return printNumber(val);\n if (typeOf === 'string') return quoteStrings ? `\"${val}\"` : val;\n if (typeOf === 'function') return '[Function ' + (val.name || 'anonymous') + ']';\n if (typeOf === 'symbol') return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n const tag = toString.call(val).slice(8, -1);\n if (tag === 'Date') return isNaN(val.getTime()) ? '' + val : val.toISOString(val);\n if (tag === 'Error' || val instanceof Error) return '[' + errorToString.call(val) + ']';\n if (tag === 'RegExp') return regExpToString.call(val);\n return null;\n}\nfunction printValue(value, quoteStrings) {\n let result = printSimpleValue(value, quoteStrings);\n if (result !== null) return result;\n return JSON.stringify(value, function (key, value) {\n let result = printSimpleValue(this[key], quoteStrings);\n if (result !== null) return result;\n return value;\n }, 2);\n}\n\nfunction toArray(value) {\n return value == null ? [] : [].concat(value);\n}\n\nlet strReg = /\\$\\{\\s*(\\w+)\\s*\\}/g;\nclass ValidationError extends Error {\n static formatError(message, params) {\n const path = params.label || params.path || 'this';\n if (path !== params.path) params = Object.assign({}, params, {\n path\n });\n if (typeof message === 'string') return message.replace(strReg, (_, key) => printValue(params[key]));\n if (typeof message === 'function') return message(params);\n return message;\n }\n static isError(err) {\n return err && err.name === 'ValidationError';\n }\n constructor(errorOrErrors, value, field, type) {\n super();\n this.value = void 0;\n this.path = void 0;\n this.type = void 0;\n this.errors = void 0;\n this.params = void 0;\n this.inner = void 0;\n this.name = 'ValidationError';\n this.value = value;\n this.path = field;\n this.type = type;\n this.errors = [];\n this.inner = [];\n toArray(errorOrErrors).forEach(err => {\n if (ValidationError.isError(err)) {\n this.errors.push(...err.errors);\n this.inner = this.inner.concat(err.inner.length ? err.inner : err);\n } else {\n this.errors.push(err);\n }\n });\n this.message = this.errors.length > 1 ? `${this.errors.length} errors occurred` : this.errors[0];\n if (Error.captureStackTrace) Error.captureStackTrace(this, ValidationError);\n }\n}\n\nlet mixed = {\n default: '${path} is invalid',\n required: '${path} is a required field',\n defined: '${path} must be defined',\n notNull: '${path} cannot be null',\n oneOf: '${path} must be one of the following values: ${values}',\n notOneOf: '${path} must not be one of the following values: ${values}',\n notType: ({\n path,\n type,\n value,\n originalValue\n }) => {\n const castMsg = originalValue != null && originalValue !== value ? ` (cast from the value \\`${printValue(originalValue, true)}\\`).` : '.';\n return type !== 'mixed' ? `${path} must be a \\`${type}\\` type, ` + `but the final value was: \\`${printValue(value, true)}\\`` + castMsg : `${path} must match the configured type. ` + `The validated value was: \\`${printValue(value, true)}\\`` + castMsg;\n }\n};\nlet string = {\n length: '${path} must be exactly ${length} characters',\n min: '${path} must be at least ${min} characters',\n max: '${path} must be at most ${max} characters',\n matches: '${path} must match the following: \"${regex}\"',\n email: '${path} must be a valid email',\n url: '${path} must be a valid URL',\n uuid: '${path} must be a valid UUID',\n trim: '${path} must be a trimmed string',\n lowercase: '${path} must be a lowercase string',\n uppercase: '${path} must be a upper case string'\n};\nlet number = {\n min: '${path} must be greater than or equal to ${min}',\n max: '${path} must be less than or equal to ${max}',\n lessThan: '${path} must be less than ${less}',\n moreThan: '${path} must be greater than ${more}',\n positive: '${path} must be a positive number',\n negative: '${path} must be a negative number',\n integer: '${path} must be an integer'\n};\nlet date = {\n min: '${path} field must be later than ${min}',\n max: '${path} field must be at earlier than ${max}'\n};\nlet boolean = {\n isValue: '${path} field must be ${value}'\n};\nlet object = {\n noUnknown: '${path} field has unspecified keys: ${unknown}'\n};\nlet array = {\n min: '${path} field must have at least ${min} items',\n max: '${path} field must have less than or equal to ${max} items',\n length: '${path} must have ${length} items'\n};\nlet tuple = {\n notType: params => {\n const {\n path,\n value,\n spec\n } = params;\n const typeLen = spec.types.length;\n if (Array.isArray(value)) {\n if (value.length < typeLen) return `${path} tuple value has too few items, expected a length of ${typeLen} but got ${value.length} for value: \\`${printValue(value, true)}\\``;\n if (value.length > typeLen) return `${path} tuple value has too many items, expected a length of ${typeLen} but got ${value.length} for value: \\`${printValue(value, true)}\\``;\n }\n return ValidationError.formatError(mixed.notType, params);\n }\n};\nvar locale = Object.assign(Object.create(null), {\n mixed,\n string,\n number,\n date,\n object,\n array,\n boolean\n});\n\nconst isSchema = obj => obj && obj.__isYupSchema__;\n\nclass Condition {\n static fromOptions(refs, config) {\n if (!config.then && !config.otherwise) throw new TypeError('either `then:` or `otherwise:` is required for `when()` conditions');\n let {\n is,\n then,\n otherwise\n } = config;\n let check = typeof is === 'function' ? is : (...values) => values.every(value => value === is);\n return new Condition(refs, (values, schema) => {\n var _branch;\n let branch = check(...values) ? then : otherwise;\n return (_branch = branch == null ? void 0 : branch(schema)) != null ? _branch : schema;\n });\n }\n constructor(refs, builder) {\n this.fn = void 0;\n this.refs = refs;\n this.refs = refs;\n this.fn = builder;\n }\n resolve(base, options) {\n let values = this.refs.map(ref =>\n // TODO: ? operator here?\n ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context));\n let schema = this.fn(values, base, options);\n if (schema === undefined ||\n // @ts-ignore this can be base\n schema === base) {\n return base;\n }\n if (!isSchema(schema)) throw new TypeError('conditions must return a schema object');\n return schema.resolve(options);\n }\n}\n\nconst prefixes = {\n context: '$',\n value: '.'\n};\nfunction create$9(key, options) {\n return new Reference(key, options);\n}\nclass Reference {\n constructor(key, options = {}) {\n this.key = void 0;\n this.isContext = void 0;\n this.isValue = void 0;\n this.isSibling = void 0;\n this.path = void 0;\n this.getter = void 0;\n this.map = void 0;\n if (typeof key !== 'string') throw new TypeError('ref must be a string, got: ' + key);\n this.key = key.trim();\n if (key === '') throw new TypeError('ref must be a non-empty string');\n this.isContext = this.key[0] === prefixes.context;\n this.isValue = this.key[0] === prefixes.value;\n this.isSibling = !this.isContext && !this.isValue;\n let prefix = this.isContext ? prefixes.context : this.isValue ? prefixes.value : '';\n this.path = this.key.slice(prefix.length);\n this.getter = this.path && getter(this.path, true);\n this.map = options.map;\n }\n getValue(value, parent, context) {\n let result = this.isContext ? context : this.isValue ? value : parent;\n if (this.getter) result = this.getter(result || {});\n if (this.map) result = this.map(result);\n return result;\n }\n\n /**\n *\n * @param {*} value\n * @param {Object} options\n * @param {Object=} options.context\n * @param {Object=} options.parent\n */\n cast(value, options) {\n return this.getValue(value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context);\n }\n resolve() {\n return this;\n }\n describe() {\n return {\n type: 'ref',\n key: this.key\n };\n }\n toString() {\n return `Ref(${this.key})`;\n }\n static isRef(value) {\n return value && value.__isYupRef;\n }\n}\n\n// @ts-ignore\nReference.prototype.__isYupRef = true;\n\nconst isAbsent = value => value == null;\n\nfunction createValidation(config) {\n function validate({\n value,\n path = '',\n options,\n originalValue,\n schema\n }, panic, next) {\n const {\n name,\n test,\n params,\n message,\n skipAbsent\n } = config;\n let {\n parent,\n context,\n abortEarly = schema.spec.abortEarly\n } = options;\n function resolve(item) {\n return Reference.isRef(item) ? item.getValue(value, parent, context) : item;\n }\n function createError(overrides = {}) {\n const nextParams = Object.assign({\n value,\n originalValue,\n label: schema.spec.label,\n path: overrides.path || path,\n spec: schema.spec\n }, params, overrides.params);\n for (const key of Object.keys(nextParams)) nextParams[key] = resolve(nextParams[key]);\n const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name);\n error.params = nextParams;\n return error;\n }\n const invalid = abortEarly ? panic : next;\n let ctx = {\n path,\n parent,\n type: name,\n from: options.from,\n createError,\n resolve,\n options,\n originalValue,\n schema\n };\n const handleResult = validOrError => {\n if (ValidationError.isError(validOrError)) invalid(validOrError);else if (!validOrError) invalid(createError());else next(null);\n };\n const handleError = err => {\n if (ValidationError.isError(err)) invalid(err);else panic(err);\n };\n const shouldSkip = skipAbsent && isAbsent(value);\n if (!options.sync) {\n try {\n Promise.resolve(!shouldSkip ? test.call(ctx, value, ctx) : true).then(handleResult, handleError);\n } catch (err) {\n handleError(err);\n }\n return;\n }\n let result;\n try {\n var _result;\n result = !shouldSkip ? test.call(ctx, value, ctx) : true;\n if (typeof ((_result = result) == null ? void 0 : _result.then) === 'function') {\n throw new Error(`Validation test of type: \"${ctx.type}\" returned a Promise during a synchronous validate. ` + `This test will finish after the validate call has returned`);\n }\n } catch (err) {\n handleError(err);\n return;\n }\n handleResult(result);\n }\n validate.OPTIONS = config;\n return validate;\n}\n\nfunction getIn(schema, path, value, context = value) {\n let parent, lastPart, lastPartDebug;\n\n // root path: ''\n if (!path) return {\n parent,\n parentPath: path,\n schema\n };\n forEach(path, (_part, isBracket, isArray) => {\n let part = isBracket ? _part.slice(1, _part.length - 1) : _part;\n schema = schema.resolve({\n context,\n parent,\n value\n });\n let isTuple = schema.type === 'tuple';\n let idx = isArray ? parseInt(part, 10) : 0;\n if (schema.innerType || isTuple) {\n if (isTuple && !isArray) throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part \"${lastPartDebug}\" must contain an index to the tuple element, e.g. \"${lastPartDebug}[0]\"`);\n if (value && idx >= value.length) {\n throw new Error(`Yup.reach cannot resolve an array item at index: ${_part}, in the path: ${path}. ` + `because there is no value at that index. `);\n }\n parent = value;\n value = value && value[idx];\n schema = isTuple ? schema.spec.types[idx] : schema.innerType;\n }\n\n // sometimes the array index part of a path doesn't exist: \"nested.arr.child\"\n // in these cases the current part is the next schema and should be processed\n // in this iteration. For cases where the index signature is included this\n // check will fail and we'll handle the `child` part on the next iteration like normal\n if (!isArray) {\n if (!schema.fields || !schema.fields[part]) throw new Error(`The schema does not contain the path: ${path}. ` + `(failed at: ${lastPartDebug} which is a type: \"${schema.type}\")`);\n parent = value;\n value = value && value[part];\n schema = schema.fields[part];\n }\n lastPart = part;\n lastPartDebug = isBracket ? '[' + _part + ']' : '.' + _part;\n });\n return {\n schema,\n parent,\n parentPath: lastPart\n };\n}\nfunction reach(obj, path, value, context) {\n return getIn(obj, path, value, context).schema;\n}\n\nclass ReferenceSet extends Set {\n describe() {\n const description = [];\n for (const item of this.values()) {\n description.push(Reference.isRef(item) ? item.describe() : item);\n }\n return description;\n }\n resolveAll(resolve) {\n let result = [];\n for (const item of this.values()) {\n result.push(resolve(item));\n }\n return result;\n }\n clone() {\n return new ReferenceSet(this.values());\n }\n merge(newItems, removeItems) {\n const next = this.clone();\n newItems.forEach(value => next.add(value));\n removeItems.forEach(value => next.delete(value));\n return next;\n }\n}\n\n// tweaked from https://github.com/Kelin2025/nanoclone/blob/0abeb7635bda9b68ef2277093f76dbe3bf3948e1/src/index.js\nfunction clone(src, seen = new Map()) {\n if (isSchema(src) || !src || typeof src !== 'object') return src;\n if (seen.has(src)) return seen.get(src);\n let copy;\n if (src instanceof Date) {\n // Date\n copy = new Date(src.getTime());\n seen.set(src, copy);\n } else if (src instanceof RegExp) {\n // RegExp\n copy = new RegExp(src);\n seen.set(src, copy);\n } else if (Array.isArray(src)) {\n // Array\n copy = new Array(src.length);\n seen.set(src, copy);\n for (let i = 0; i < src.length; i++) copy[i] = clone(src[i], seen);\n } else if (src instanceof Map) {\n // Map\n copy = new Map();\n seen.set(src, copy);\n for (const [k, v] of src.entries()) copy.set(k, clone(v, seen));\n } else if (src instanceof Set) {\n // Set\n copy = new Set();\n seen.set(src, copy);\n for (const v of src) copy.add(clone(v, seen));\n } else if (src instanceof Object) {\n // Object\n copy = {};\n seen.set(src, copy);\n for (const [k, v] of Object.entries(src)) copy[k] = clone(v, seen);\n } else {\n throw Error(`Unable to clone ${src}`);\n }\n return copy;\n}\n\nclass Schema {\n constructor(options) {\n this.type = void 0;\n this.deps = [];\n this.tests = void 0;\n this.transforms = void 0;\n this.conditions = [];\n this._mutate = void 0;\n this.internalTests = {};\n this._whitelist = new ReferenceSet();\n this._blacklist = new ReferenceSet();\n this.exclusiveTests = Object.create(null);\n this._typeCheck = void 0;\n this.spec = void 0;\n this.tests = [];\n this.transforms = [];\n this.withMutation(() => {\n this.typeError(mixed.notType);\n });\n this.type = options.type;\n this._typeCheck = options.check;\n this.spec = Object.assign({\n strip: false,\n strict: false,\n abortEarly: true,\n recursive: true,\n nullable: false,\n optional: true,\n coerce: true\n }, options == null ? void 0 : options.spec);\n this.withMutation(s => {\n s.nonNullable();\n });\n }\n\n // TODO: remove\n get _type() {\n return this.type;\n }\n clone(spec) {\n if (this._mutate) {\n if (spec) Object.assign(this.spec, spec);\n return this;\n }\n\n // if the nested value is a schema we can skip cloning, since\n // they are already immutable\n const next = Object.create(Object.getPrototypeOf(this));\n\n // @ts-expect-error this is readonly\n next.type = this.type;\n next._typeCheck = this._typeCheck;\n next._whitelist = this._whitelist.clone();\n next._blacklist = this._blacklist.clone();\n next.internalTests = Object.assign({}, this.internalTests);\n next.exclusiveTests = Object.assign({}, this.exclusiveTests);\n\n // @ts-expect-error this is readonly\n next.deps = [...this.deps];\n next.conditions = [...this.conditions];\n next.tests = [...this.tests];\n next.transforms = [...this.transforms];\n next.spec = clone(Object.assign({}, this.spec, spec));\n return next;\n }\n label(label) {\n let next = this.clone();\n next.spec.label = label;\n return next;\n }\n meta(...args) {\n if (args.length === 0) return this.spec.meta;\n let next = this.clone();\n next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);\n return next;\n }\n withMutation(fn) {\n let before = this._mutate;\n this._mutate = true;\n let result = fn(this);\n this._mutate = before;\n return result;\n }\n concat(schema) {\n if (!schema || schema === this) return this;\n if (schema.type !== this.type && this.type !== 'mixed') throw new TypeError(`You cannot \\`concat()\\` schema's of different types: ${this.type} and ${schema.type}`);\n let base = this;\n let combined = schema.clone();\n const mergedSpec = Object.assign({}, base.spec, combined.spec);\n combined.spec = mergedSpec;\n combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);\n\n // manually merge the blacklist/whitelist (the other `schema` takes\n // precedence in case of conflicts)\n combined._whitelist = base._whitelist.merge(schema._whitelist, schema._blacklist);\n combined._blacklist = base._blacklist.merge(schema._blacklist, schema._whitelist);\n\n // start with the current tests\n combined.tests = base.tests;\n combined.exclusiveTests = base.exclusiveTests;\n\n // manually add the new tests to ensure\n // the deduping logic is consistent\n combined.withMutation(next => {\n schema.tests.forEach(fn => {\n next.test(fn.OPTIONS);\n });\n });\n combined.transforms = [...base.transforms, ...combined.transforms];\n return combined;\n }\n isType(v) {\n if (v == null) {\n if (this.spec.nullable && v === null) return true;\n if (this.spec.optional && v === undefined) return true;\n return false;\n }\n return this._typeCheck(v);\n }\n resolve(options) {\n let schema = this;\n if (schema.conditions.length) {\n let conditions = schema.conditions;\n schema = schema.clone();\n schema.conditions = [];\n schema = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema);\n schema = schema.resolve(options);\n }\n return schema;\n }\n resolveOptions(options) {\n var _options$strict, _options$abortEarly, _options$recursive;\n return Object.assign({}, options, {\n from: options.from || [],\n strict: (_options$strict = options.strict) != null ? _options$strict : this.spec.strict,\n abortEarly: (_options$abortEarly = options.abortEarly) != null ? _options$abortEarly : this.spec.abortEarly,\n recursive: (_options$recursive = options.recursive) != null ? _options$recursive : this.spec.recursive\n });\n }\n\n /**\n * Run the configured transform pipeline over an input value.\n */\n\n cast(value, options = {}) {\n let resolvedSchema = this.resolve(Object.assign({\n value\n }, options));\n let allowOptionality = options.assert === 'ignore-optionality';\n let result = resolvedSchema._cast(value, options);\n if (options.assert !== false && !resolvedSchema.isType(result)) {\n if (allowOptionality && isAbsent(result)) {\n return result;\n }\n let formattedValue = printValue(value);\n let formattedResult = printValue(result);\n throw new TypeError(`The value of ${options.path || 'field'} could not be cast to a value ` + `that satisfies the schema type: \"${resolvedSchema.type}\". \\n\\n` + `attempted value: ${formattedValue} \\n` + (formattedResult !== formattedValue ? `result of cast: ${formattedResult}` : ''));\n }\n return result;\n }\n _cast(rawValue, _options) {\n let value = rawValue === undefined ? rawValue : this.transforms.reduce((prevValue, fn) => fn.call(this, prevValue, rawValue, this), rawValue);\n if (value === undefined) {\n value = this.getDefault();\n }\n return value;\n }\n _validate(_value, options = {}, panic, next) {\n let {\n path,\n originalValue = _value,\n strict = this.spec.strict\n } = options;\n let value = _value;\n if (!strict) {\n value = this._cast(value, Object.assign({\n assert: false\n }, options));\n }\n let initialTests = [];\n for (let test of Object.values(this.internalTests)) {\n if (test) initialTests.push(test);\n }\n this.runTests({\n path,\n value,\n originalValue,\n options,\n tests: initialTests\n }, panic, initialErrors => {\n // even if we aren't ending early we can't proceed further if the types aren't correct\n if (initialErrors.length) {\n return next(initialErrors, value);\n }\n this.runTests({\n path,\n value,\n originalValue,\n options,\n tests: this.tests\n }, panic, next);\n });\n }\n\n /**\n * Executes a set of validations, either schema, produced Tests or a nested\n * schema validate result.\n */\n runTests(runOptions, panic, next) {\n let fired = false;\n let {\n tests,\n value,\n originalValue,\n path,\n options\n } = runOptions;\n let panicOnce = arg => {\n if (fired) return;\n fired = true;\n panic(arg, value);\n };\n let nextOnce = arg => {\n if (fired) return;\n fired = true;\n next(arg, value);\n };\n let count = tests.length;\n let nestedErrors = [];\n if (!count) return nextOnce([]);\n let args = {\n value,\n originalValue,\n path,\n options,\n schema: this\n };\n for (let i = 0; i < tests.length; i++) {\n const test = tests[i];\n test(args, panicOnce, function finishTestRun(err) {\n if (err) {\n nestedErrors = nestedErrors.concat(err);\n }\n if (--count <= 0) {\n nextOnce(nestedErrors);\n }\n });\n }\n }\n asNestedTest({\n key,\n index,\n parent,\n parentPath,\n originalParent,\n options\n }) {\n const k = key != null ? key : index;\n if (k == null) {\n throw TypeError('Must include `key` or `index` for nested validations');\n }\n const isIndex = typeof k === 'number';\n let value = parent[k];\n const testOptions = Object.assign({}, options, {\n // Nested validations fields are always strict:\n // 1. parent isn't strict so the casting will also have cast inner values\n // 2. parent is strict in which case the nested values weren't cast either\n strict: true,\n parent,\n value,\n originalValue: originalParent[k],\n // FIXME: tests depend on `index` being passed around deeply,\n // we should not let the options.key/index bleed through\n key: undefined,\n // index: undefined,\n [isIndex ? 'index' : 'key']: k,\n path: isIndex || k.includes('.') ? `${parentPath || ''}[${value ? k : `\"${k}\"`}]` : (parentPath ? `${parentPath}.` : '') + key\n });\n return (_, panic, next) => this.resolve(testOptions)._validate(value, testOptions, panic, next);\n }\n validate(value, options) {\n let schema = this.resolve(Object.assign({}, options, {\n value\n }));\n return new Promise((resolve, reject) => schema._validate(value, options, (error, parsed) => {\n if (ValidationError.isError(error)) error.value = parsed;\n reject(error);\n }, (errors, validated) => {\n if (errors.length) reject(new ValidationError(errors, validated));else resolve(validated);\n }));\n }\n validateSync(value, options) {\n let schema = this.resolve(Object.assign({}, options, {\n value\n }));\n let result;\n schema._validate(value, Object.assign({}, options, {\n sync: true\n }), (error, parsed) => {\n if (ValidationError.isError(error)) error.value = parsed;\n throw error;\n }, (errors, validated) => {\n if (errors.length) throw new ValidationError(errors, value);\n result = validated;\n });\n return result;\n }\n isValid(value, options) {\n return this.validate(value, options).then(() => true, err => {\n if (ValidationError.isError(err)) return false;\n throw err;\n });\n }\n isValidSync(value, options) {\n try {\n this.validateSync(value, options);\n return true;\n } catch (err) {\n if (ValidationError.isError(err)) return false;\n throw err;\n }\n }\n _getDefault() {\n let defaultValue = this.spec.default;\n if (defaultValue == null) {\n return defaultValue;\n }\n return typeof defaultValue === 'function' ? defaultValue.call(this) : clone(defaultValue);\n }\n getDefault(options\n // If schema is defaulted we know it's at least not undefined\n ) {\n let schema = this.resolve(options || {});\n return schema._getDefault();\n }\n default(def) {\n if (arguments.length === 0) {\n return this._getDefault();\n }\n let next = this.clone({\n default: def\n });\n return next;\n }\n strict(isStrict = true) {\n return this.clone({\n strict: isStrict\n });\n }\n nullability(nullable, message) {\n const next = this.clone({\n nullable\n });\n next.internalTests.nullable = createValidation({\n message,\n name: 'nullable',\n test(value) {\n return value === null ? this.schema.spec.nullable : true;\n }\n });\n return next;\n }\n optionality(optional, message) {\n const next = this.clone({\n optional\n });\n next.internalTests.optionality = createValidation({\n message,\n name: 'optionality',\n test(value) {\n return value === undefined ? this.schema.spec.optional : true;\n }\n });\n return next;\n }\n optional() {\n return this.optionality(true);\n }\n defined(message = mixed.defined) {\n return this.optionality(false, message);\n }\n nullable() {\n return this.nullability(true);\n }\n nonNullable(message = mixed.notNull) {\n return this.nullability(false, message);\n }\n required(message = mixed.required) {\n return this.clone().withMutation(next => next.nonNullable(message).defined(message));\n }\n notRequired() {\n return this.clone().withMutation(next => next.nullable().optional());\n }\n transform(fn) {\n let next = this.clone();\n next.transforms.push(fn);\n return next;\n }\n\n /**\n * Adds a test function to the schema's queue of tests.\n * tests can be exclusive or non-exclusive.\n *\n * - exclusive tests, will replace any existing tests of the same name.\n * - non-exclusive: can be stacked\n *\n * If a non-exclusive test is added to a schema with an exclusive test of the same name\n * the exclusive test is removed and further tests of the same name will be stacked.\n *\n * If an exclusive test is added to a schema with non-exclusive tests of the same name\n * the previous tests are removed and further tests of the same name will replace each other.\n */\n\n test(...args) {\n let opts;\n if (args.length === 1) {\n if (typeof args[0] === 'function') {\n opts = {\n test: args[0]\n };\n } else {\n opts = args[0];\n }\n } else if (args.length === 2) {\n opts = {\n name: args[0],\n test: args[1]\n };\n } else {\n opts = {\n name: args[0],\n message: args[1],\n test: args[2]\n };\n }\n if (opts.message === undefined) opts.message = mixed.default;\n if (typeof opts.test !== 'function') throw new TypeError('`test` is a required parameters');\n let next = this.clone();\n let validate = createValidation(opts);\n let isExclusive = opts.exclusive || opts.name && next.exclusiveTests[opts.name] === true;\n if (opts.exclusive) {\n if (!opts.name) throw new TypeError('Exclusive tests must provide a unique `name` identifying the test');\n }\n if (opts.name) next.exclusiveTests[opts.name] = !!opts.exclusive;\n next.tests = next.tests.filter(fn => {\n if (fn.OPTIONS.name === opts.name) {\n if (isExclusive) return false;\n if (fn.OPTIONS.test === validate.OPTIONS.test) return false;\n }\n return true;\n });\n next.tests.push(validate);\n return next;\n }\n when(keys, options) {\n if (!Array.isArray(keys) && typeof keys !== 'string') {\n options = keys;\n keys = '.';\n }\n let next = this.clone();\n let deps = toArray(keys).map(key => new Reference(key));\n deps.forEach(dep => {\n // @ts-ignore readonly array\n if (dep.isSibling) next.deps.push(dep.key);\n });\n next.conditions.push(typeof options === 'function' ? new Condition(deps, options) : Condition.fromOptions(deps, options));\n return next;\n }\n typeError(message) {\n let next = this.clone();\n next.internalTests.typeError = createValidation({\n message,\n name: 'typeError',\n test(value) {\n if (!isAbsent(value) && !this.schema._typeCheck(value)) return this.createError({\n params: {\n type: this.schema.type\n }\n });\n return true;\n }\n });\n return next;\n }\n oneOf(enums, message = mixed.oneOf) {\n let next = this.clone();\n enums.forEach(val => {\n next._whitelist.add(val);\n next._blacklist.delete(val);\n });\n next.internalTests.whiteList = createValidation({\n message,\n name: 'oneOf',\n skipAbsent: true,\n test(value) {\n let valids = this.schema._whitelist;\n let resolved = valids.resolveAll(this.resolve);\n return resolved.includes(value) ? true : this.createError({\n params: {\n values: Array.from(valids).join(', '),\n resolved\n }\n });\n }\n });\n return next;\n }\n notOneOf(enums, message = mixed.notOneOf) {\n let next = this.clone();\n enums.forEach(val => {\n next._blacklist.add(val);\n next._whitelist.delete(val);\n });\n next.internalTests.blacklist = createValidation({\n message,\n name: 'notOneOf',\n test(value) {\n let invalids = this.schema._blacklist;\n let resolved = invalids.resolveAll(this.resolve);\n if (resolved.includes(value)) return this.createError({\n params: {\n values: Array.from(invalids).join(', '),\n resolved\n }\n });\n return true;\n }\n });\n return next;\n }\n strip(strip = true) {\n let next = this.clone();\n next.spec.strip = strip;\n return next;\n }\n\n /**\n * Return a serialized description of the schema including validations, flags, types etc.\n *\n * @param options Provide any needed context for resolving runtime schema alterations (lazy, when conditions, etc).\n */\n describe(options) {\n const next = (options ? this.resolve(options) : this).clone();\n const {\n label,\n meta,\n optional,\n nullable\n } = next.spec;\n const description = {\n meta,\n label,\n optional,\n nullable,\n default: next.getDefault(options),\n type: next.type,\n oneOf: next._whitelist.describe(),\n notOneOf: next._blacklist.describe(),\n tests: next.tests.map(fn => ({\n name: fn.OPTIONS.name,\n params: fn.OPTIONS.params\n })).filter((n, idx, list) => list.findIndex(c => c.name === n.name) === idx)\n };\n return description;\n }\n}\n// @ts-expect-error\nSchema.prototype.__isYupSchema__ = true;\nfor (const method of ['validate', 'validateSync']) Schema.prototype[`${method}At`] = function (path, value, options = {}) {\n const {\n parent,\n parentPath,\n schema\n } = getIn(this, path, value, options.context);\n return schema[method](parent && parent[parentPath], Object.assign({}, options, {\n parent,\n path\n }));\n};\nfor (const alias of ['equals', 'is']) Schema.prototype[alias] = Schema.prototype.oneOf;\nfor (const alias of ['not', 'nope']) Schema.prototype[alias] = Schema.prototype.notOneOf;\n\nconst returnsTrue = () => true;\nfunction create$8(spec) {\n return new MixedSchema(spec);\n}\nclass MixedSchema extends Schema {\n constructor(spec) {\n super(typeof spec === 'function' ? {\n type: 'mixed',\n check: spec\n } : Object.assign({\n type: 'mixed',\n check: returnsTrue\n }, spec));\n }\n}\ncreate$8.prototype = MixedSchema.prototype;\n\nfunction create$7() {\n return new BooleanSchema();\n}\nclass BooleanSchema extends Schema {\n constructor() {\n super({\n type: 'boolean',\n check(v) {\n if (v instanceof Boolean) v = v.valueOf();\n return typeof v === 'boolean';\n }\n });\n this.withMutation(() => {\n this.transform((value, _raw, ctx) => {\n if (ctx.spec.coerce && !ctx.isType(value)) {\n if (/^(true|1)$/i.test(String(value))) return true;\n if (/^(false|0)$/i.test(String(value))) return false;\n }\n return value;\n });\n });\n }\n isTrue(message = boolean.isValue) {\n return this.test({\n message,\n name: 'is-value',\n exclusive: true,\n params: {\n value: 'true'\n },\n test(value) {\n return isAbsent(value) || value === true;\n }\n });\n }\n isFalse(message = boolean.isValue) {\n return this.test({\n message,\n name: 'is-value',\n exclusive: true,\n params: {\n value: 'false'\n },\n test(value) {\n return isAbsent(value) || value === false;\n }\n });\n }\n default(def) {\n return super.default(def);\n }\n defined(msg) {\n return super.defined(msg);\n }\n optional() {\n return super.optional();\n }\n required(msg) {\n return super.required(msg);\n }\n notRequired() {\n return super.notRequired();\n }\n nullable() {\n return super.nullable();\n }\n nonNullable(msg) {\n return super.nonNullable(msg);\n }\n strip(v) {\n return super.strip(v);\n }\n}\ncreate$7.prototype = BooleanSchema.prototype;\n\n// Taken from HTML spec: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address\nlet rEmail =\n// eslint-disable-next-line\n/^[a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\nlet rUrl =\n// eslint-disable-next-line\n/^((https?|ftp):)?\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i;\n\n// eslint-disable-next-line\nlet rUUID = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nlet isTrimmed = value => isAbsent(value) || value === value.trim();\nlet objStringTag = {}.toString();\nfunction create$6() {\n return new StringSchema();\n}\nclass StringSchema extends Schema {\n constructor() {\n super({\n type: 'string',\n check(value) {\n if (value instanceof String) value = value.valueOf();\n return typeof value === 'string';\n }\n });\n this.withMutation(() => {\n this.transform((value, _raw, ctx) => {\n if (!ctx.spec.coerce || ctx.isType(value)) return value;\n\n // don't ever convert arrays\n if (Array.isArray(value)) return value;\n const strValue = value != null && value.toString ? value.toString() : value;\n\n // no one wants plain objects converted to [Object object]\n if (strValue === objStringTag) return value;\n return strValue;\n });\n });\n }\n required(message) {\n return super.required(message).withMutation(schema => schema.test({\n message: message || mixed.required,\n name: 'required',\n skipAbsent: true,\n test: value => !!value.length\n }));\n }\n notRequired() {\n return super.notRequired().withMutation(schema => {\n schema.tests = schema.tests.filter(t => t.OPTIONS.name !== 'required');\n return schema;\n });\n }\n length(length, message = string.length) {\n return this.test({\n message,\n name: 'length',\n exclusive: true,\n params: {\n length\n },\n skipAbsent: true,\n test(value) {\n return value.length === this.resolve(length);\n }\n });\n }\n min(min, message = string.min) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n skipAbsent: true,\n test(value) {\n return value.length >= this.resolve(min);\n }\n });\n }\n max(max, message = string.max) {\n return this.test({\n name: 'max',\n exclusive: true,\n message,\n params: {\n max\n },\n skipAbsent: true,\n test(value) {\n return value.length <= this.resolve(max);\n }\n });\n }\n matches(regex, options) {\n let excludeEmptyString = false;\n let message;\n let name;\n if (options) {\n if (typeof options === 'object') {\n ({\n excludeEmptyString = false,\n message,\n name\n } = options);\n } else {\n message = options;\n }\n }\n return this.test({\n name: name || 'matches',\n message: message || string.matches,\n params: {\n regex\n },\n skipAbsent: true,\n test: value => value === '' && excludeEmptyString || value.search(regex) !== -1\n });\n }\n email(message = string.email) {\n return this.matches(rEmail, {\n name: 'email',\n message,\n excludeEmptyString: true\n });\n }\n url(message = string.url) {\n return this.matches(rUrl, {\n name: 'url',\n message,\n excludeEmptyString: true\n });\n }\n uuid(message = string.uuid) {\n return this.matches(rUUID, {\n name: 'uuid',\n message,\n excludeEmptyString: false\n });\n }\n\n //-- transforms --\n ensure() {\n return this.default('').transform(val => val === null ? '' : val);\n }\n trim(message = string.trim) {\n return this.transform(val => val != null ? val.trim() : val).test({\n message,\n name: 'trim',\n test: isTrimmed\n });\n }\n lowercase(message = string.lowercase) {\n return this.transform(value => !isAbsent(value) ? value.toLowerCase() : value).test({\n message,\n name: 'string_case',\n exclusive: true,\n skipAbsent: true,\n test: value => isAbsent(value) || value === value.toLowerCase()\n });\n }\n uppercase(message = string.uppercase) {\n return this.transform(value => !isAbsent(value) ? value.toUpperCase() : value).test({\n message,\n name: 'string_case',\n exclusive: true,\n skipAbsent: true,\n test: value => isAbsent(value) || value === value.toUpperCase()\n });\n }\n}\ncreate$6.prototype = StringSchema.prototype;\n\n//\n// String Interfaces\n//\n\nlet isNaN$1 = value => value != +value;\nfunction create$5() {\n return new NumberSchema();\n}\nclass NumberSchema extends Schema {\n constructor() {\n super({\n type: 'number',\n check(value) {\n if (value instanceof Number) value = value.valueOf();\n return typeof value === 'number' && !isNaN$1(value);\n }\n });\n this.withMutation(() => {\n this.transform((value, _raw, ctx) => {\n if (!ctx.spec.coerce) return value;\n let parsed = value;\n if (typeof parsed === 'string') {\n parsed = parsed.replace(/\\s/g, '');\n if (parsed === '') return NaN;\n // don't use parseFloat to avoid positives on alpha-numeric strings\n parsed = +parsed;\n }\n if (ctx.isType(parsed)) return parsed;\n return parseFloat(parsed);\n });\n });\n }\n min(min, message = number.min) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n skipAbsent: true,\n test(value) {\n return value >= this.resolve(min);\n }\n });\n }\n max(max, message = number.max) {\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n skipAbsent: true,\n test(value) {\n return value <= this.resolve(max);\n }\n });\n }\n lessThan(less, message = number.lessThan) {\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n less\n },\n skipAbsent: true,\n test(value) {\n return value < this.resolve(less);\n }\n });\n }\n moreThan(more, message = number.moreThan) {\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n more\n },\n skipAbsent: true,\n test(value) {\n return value > this.resolve(more);\n }\n });\n }\n positive(msg = number.positive) {\n return this.moreThan(0, msg);\n }\n negative(msg = number.negative) {\n return this.lessThan(0, msg);\n }\n integer(message = number.integer) {\n return this.test({\n name: 'integer',\n message,\n skipAbsent: true,\n test: val => Number.isInteger(val)\n });\n }\n truncate() {\n return this.transform(value => !isAbsent(value) ? value | 0 : value);\n }\n round(method) {\n var _method;\n let avail = ['ceil', 'floor', 'round', 'trunc'];\n method = ((_method = method) == null ? void 0 : _method.toLowerCase()) || 'round';\n\n // this exists for symemtry with the new Math.trunc\n if (method === 'trunc') return this.truncate();\n if (avail.indexOf(method.toLowerCase()) === -1) throw new TypeError('Only valid options for round() are: ' + avail.join(', '));\n return this.transform(value => !isAbsent(value) ? Math[method](value) : value);\n }\n}\ncreate$5.prototype = NumberSchema.prototype;\n\n//\n// Number Interfaces\n//\n\n/* eslint-disable */\n/**\n *\n * Date.parse with progressive enhancement for ISO 8601 \n * NON-CONFORMANT EDITION.\n * © 2011 Colin Snover \n * Released under MIT license.\n */\n\n// 1 YYYY 2 MM 3 DD 4 HH 5 mm 6 ss 7 msec 8 Z 9 ± 10 tzHH 11 tzmm\nvar isoReg = /^(\\d{4}|[+\\-]\\d{6})(?:-?(\\d{2})(?:-?(\\d{2}))?)?(?:[ T]?(\\d{2}):?(\\d{2})(?::?(\\d{2})(?:[,\\.](\\d{1,}))?)?(?:(Z)|([+\\-])(\\d{2})(?::?(\\d{2}))?)?)?$/;\nfunction parseIsoDate(date) {\n var numericKeys = [1, 4, 5, 6, 7, 10, 11],\n minutesOffset = 0,\n timestamp,\n struct;\n if (struct = isoReg.exec(date)) {\n // avoid NaN timestamps caused by “undefined” values being passed to Date.UTC\n for (var i = 0, k; k = numericKeys[i]; ++i) struct[k] = +struct[k] || 0;\n\n // allow undefined days and months\n struct[2] = (+struct[2] || 1) - 1;\n struct[3] = +struct[3] || 1;\n\n // allow arbitrary sub-second precision beyond milliseconds\n struct[7] = struct[7] ? String(struct[7]).substr(0, 3) : 0;\n\n // timestamps without timezone identifiers should be considered local time\n if ((struct[8] === undefined || struct[8] === '') && (struct[9] === undefined || struct[9] === '')) timestamp = +new Date(struct[1], struct[2], struct[3], struct[4], struct[5], struct[6], struct[7]);else {\n if (struct[8] !== 'Z' && struct[9] !== undefined) {\n minutesOffset = struct[10] * 60 + struct[11];\n if (struct[9] === '+') minutesOffset = 0 - minutesOffset;\n }\n timestamp = Date.UTC(struct[1], struct[2], struct[3], struct[4], struct[5] + minutesOffset, struct[6], struct[7]);\n }\n } else timestamp = Date.parse ? Date.parse(date) : NaN;\n return timestamp;\n}\n\n// @ts-ignore\nlet invalidDate = new Date('');\nlet isDate = obj => Object.prototype.toString.call(obj) === '[object Date]';\nfunction create$4() {\n return new DateSchema();\n}\nclass DateSchema extends Schema {\n constructor() {\n super({\n type: 'date',\n check(v) {\n return isDate(v) && !isNaN(v.getTime());\n }\n });\n this.withMutation(() => {\n this.transform((value, _raw, ctx) => {\n if (!ctx.spec.coerce || ctx.isType(value)) return value;\n value = parseIsoDate(value);\n\n // 0 is a valid timestamp equivalent to 1970-01-01T00:00:00Z(unix epoch) or before.\n return !isNaN(value) ? new Date(value) : DateSchema.INVALID_DATE;\n });\n });\n }\n prepareParam(ref, name) {\n let param;\n if (!Reference.isRef(ref)) {\n let cast = this.cast(ref);\n if (!this._typeCheck(cast)) throw new TypeError(`\\`${name}\\` must be a Date or a value that can be \\`cast()\\` to a Date`);\n param = cast;\n } else {\n param = ref;\n }\n return param;\n }\n min(min, message = date.min) {\n let limit = this.prepareParam(min, 'min');\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n skipAbsent: true,\n test(value) {\n return value >= this.resolve(limit);\n }\n });\n }\n max(max, message = date.max) {\n let limit = this.prepareParam(max, 'max');\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n skipAbsent: true,\n test(value) {\n return value <= this.resolve(limit);\n }\n });\n }\n}\nDateSchema.INVALID_DATE = invalidDate;\ncreate$4.prototype = DateSchema.prototype;\ncreate$4.INVALID_DATE = invalidDate;\n\n// @ts-expect-error\nfunction sortFields(fields, excludedEdges = []) {\n let edges = [];\n let nodes = new Set();\n let excludes = new Set(excludedEdges.map(([a, b]) => `${a}-${b}`));\n function addNode(depPath, key) {\n let node = split(depPath)[0];\n nodes.add(node);\n if (!excludes.has(`${key}-${node}`)) edges.push([key, node]);\n }\n for (const key of Object.keys(fields)) {\n let value = fields[key];\n nodes.add(key);\n if (Reference.isRef(value) && value.isSibling) addNode(value.path, key);else if (isSchema(value) && 'deps' in value) value.deps.forEach(path => addNode(path, key));\n }\n return toposort.array(Array.from(nodes), edges).reverse();\n}\n\nfunction findIndex(arr, err) {\n let idx = Infinity;\n arr.some((key, ii) => {\n var _err$path;\n if ((_err$path = err.path) != null && _err$path.includes(key)) {\n idx = ii;\n return true;\n }\n });\n return idx;\n}\nfunction sortByKeyOrder(keys) {\n return (a, b) => {\n return findIndex(keys, a) - findIndex(keys, b);\n };\n}\n\nconst parseJson = (value, _, ctx) => {\n if (typeof value !== 'string') {\n return value;\n }\n let parsed = value;\n try {\n parsed = JSON.parse(value);\n } catch (err) {\n /* */\n }\n return ctx.isType(parsed) ? parsed : value;\n};\n\n// @ts-ignore\nfunction deepPartial(schema) {\n if ('fields' in schema) {\n const partial = {};\n for (const [key, fieldSchema] of Object.entries(schema.fields)) {\n partial[key] = deepPartial(fieldSchema);\n }\n return schema.setFields(partial);\n }\n if (schema.type === 'array') {\n const nextArray = schema.optional();\n if (nextArray.innerType) nextArray.innerType = deepPartial(nextArray.innerType);\n return nextArray;\n }\n if (schema.type === 'tuple') {\n return schema.optional().clone({\n types: schema.spec.types.map(deepPartial)\n });\n }\n if ('optional' in schema) {\n return schema.optional();\n }\n return schema;\n}\nconst deepHas = (obj, p) => {\n const path = [...normalizePath(p)];\n if (path.length === 1) return path[0] in obj;\n let last = path.pop();\n let parent = getter(join(path), true)(obj);\n return !!(parent && last in parent);\n};\nlet isObject = obj => Object.prototype.toString.call(obj) === '[object Object]';\nfunction unknown(ctx, value) {\n let known = Object.keys(ctx.fields);\n return Object.keys(value).filter(key => known.indexOf(key) === -1);\n}\nconst defaultSort = sortByKeyOrder([]);\nfunction create$3(spec) {\n return new ObjectSchema(spec);\n}\nclass ObjectSchema extends Schema {\n constructor(spec) {\n super({\n type: 'object',\n check(value) {\n return isObject(value) || typeof value === 'function';\n }\n });\n this.fields = Object.create(null);\n this._sortErrors = defaultSort;\n this._nodes = [];\n this._excludedEdges = [];\n this.withMutation(() => {\n if (spec) {\n this.shape(spec);\n }\n });\n }\n _cast(_value, options = {}) {\n var _options$stripUnknown;\n let value = super._cast(_value, options);\n\n //should ignore nulls here\n if (value === undefined) return this.getDefault();\n if (!this._typeCheck(value)) return value;\n let fields = this.fields;\n let strip = (_options$stripUnknown = options.stripUnknown) != null ? _options$stripUnknown : this.spec.noUnknown;\n let props = [].concat(this._nodes, Object.keys(value).filter(v => !this._nodes.includes(v)));\n let intermediateValue = {}; // is filled during the transform below\n let innerOptions = Object.assign({}, options, {\n parent: intermediateValue,\n __validating: options.__validating || false\n });\n let isChanged = false;\n for (const prop of props) {\n let field = fields[prop];\n let exists = (prop in value);\n if (field) {\n let fieldValue;\n let inputValue = value[prop];\n\n // safe to mutate since this is fired in sequence\n innerOptions.path = (options.path ? `${options.path}.` : '') + prop;\n field = field.resolve({\n value: inputValue,\n context: options.context,\n parent: intermediateValue\n });\n let fieldSpec = field instanceof Schema ? field.spec : undefined;\n let strict = fieldSpec == null ? void 0 : fieldSpec.strict;\n if (fieldSpec != null && fieldSpec.strip) {\n isChanged = isChanged || prop in value;\n continue;\n }\n fieldValue = !options.__validating || !strict ?\n // TODO: use _cast, this is double resolving\n field.cast(value[prop], innerOptions) : value[prop];\n if (fieldValue !== undefined) {\n intermediateValue[prop] = fieldValue;\n }\n } else if (exists && !strip) {\n intermediateValue[prop] = value[prop];\n }\n if (exists !== prop in intermediateValue || intermediateValue[prop] !== value[prop]) {\n isChanged = true;\n }\n }\n return isChanged ? intermediateValue : value;\n }\n _validate(_value, options = {}, panic, next) {\n let {\n from = [],\n originalValue = _value,\n recursive = this.spec.recursive\n } = options;\n options.from = [{\n schema: this,\n value: originalValue\n }, ...from];\n // this flag is needed for handling `strict` correctly in the context of\n // validation vs just casting. e.g strict() on a field is only used when validating\n options.__validating = true;\n options.originalValue = originalValue;\n super._validate(_value, options, panic, (objectErrors, value) => {\n if (!recursive || !isObject(value)) {\n next(objectErrors, value);\n return;\n }\n originalValue = originalValue || value;\n let tests = [];\n for (let key of this._nodes) {\n let field = this.fields[key];\n if (!field || Reference.isRef(field)) {\n continue;\n }\n tests.push(field.asNestedTest({\n options,\n key,\n parent: value,\n parentPath: options.path,\n originalParent: originalValue\n }));\n }\n this.runTests({\n tests,\n value,\n originalValue,\n options\n }, panic, fieldErrors => {\n next(fieldErrors.sort(this._sortErrors).concat(objectErrors), value);\n });\n });\n }\n clone(spec) {\n const next = super.clone(spec);\n next.fields = Object.assign({}, this.fields);\n next._nodes = this._nodes;\n next._excludedEdges = this._excludedEdges;\n next._sortErrors = this._sortErrors;\n return next;\n }\n concat(schema) {\n let next = super.concat(schema);\n let nextFields = next.fields;\n for (let [field, schemaOrRef] of Object.entries(this.fields)) {\n const target = nextFields[field];\n nextFields[field] = target === undefined ? schemaOrRef : target;\n }\n return next.withMutation(s => s.setFields(nextFields, this._excludedEdges));\n }\n _getDefault() {\n if ('default' in this.spec) {\n return super._getDefault();\n }\n\n // if there is no default set invent one\n if (!this._nodes.length) {\n return undefined;\n }\n let dft = {};\n this._nodes.forEach(key => {\n const field = this.fields[key];\n dft[key] = field && 'getDefault' in field ? field.getDefault() : undefined;\n });\n return dft;\n }\n setFields(shape, excludedEdges) {\n let next = this.clone();\n next.fields = shape;\n next._nodes = sortFields(shape, excludedEdges);\n next._sortErrors = sortByKeyOrder(Object.keys(shape));\n // XXX: this carries over edges which may not be what you want\n if (excludedEdges) next._excludedEdges = excludedEdges;\n return next;\n }\n shape(additions, excludes = []) {\n return this.clone().withMutation(next => {\n let edges = next._excludedEdges;\n if (excludes.length) {\n if (!Array.isArray(excludes[0])) excludes = [excludes];\n edges = [...next._excludedEdges, ...excludes];\n }\n\n // XXX: excludes here is wrong\n return next.setFields(Object.assign(next.fields, additions), edges);\n });\n }\n partial() {\n const partial = {};\n for (const [key, schema] of Object.entries(this.fields)) {\n partial[key] = 'optional' in schema && schema.optional instanceof Function ? schema.optional() : schema;\n }\n return this.setFields(partial);\n }\n deepPartial() {\n const next = deepPartial(this);\n return next;\n }\n pick(keys) {\n const picked = {};\n for (const key of keys) {\n if (this.fields[key]) picked[key] = this.fields[key];\n }\n return this.setFields(picked);\n }\n omit(keys) {\n const fields = Object.assign({}, this.fields);\n for (const key of keys) {\n delete fields[key];\n }\n return this.setFields(fields);\n }\n from(from, to, alias) {\n let fromGetter = getter(from, true);\n return this.transform(obj => {\n if (!obj) return obj;\n let newObj = obj;\n if (deepHas(obj, from)) {\n newObj = Object.assign({}, obj);\n if (!alias) delete newObj[from];\n newObj[to] = fromGetter(obj);\n }\n return newObj;\n });\n }\n\n /** Parse an input JSON string to an object */\n json() {\n return this.transform(parseJson);\n }\n noUnknown(noAllow = true, message = object.noUnknown) {\n if (typeof noAllow !== 'boolean') {\n message = noAllow;\n noAllow = true;\n }\n let next = this.test({\n name: 'noUnknown',\n exclusive: true,\n message: message,\n test(value) {\n if (value == null) return true;\n const unknownKeys = unknown(this.schema, value);\n return !noAllow || unknownKeys.length === 0 || this.createError({\n params: {\n unknown: unknownKeys.join(', ')\n }\n });\n }\n });\n next.spec.noUnknown = noAllow;\n return next;\n }\n unknown(allow = true, message = object.noUnknown) {\n return this.noUnknown(!allow, message);\n }\n transformKeys(fn) {\n return this.transform(obj => {\n if (!obj) return obj;\n const result = {};\n for (const key of Object.keys(obj)) result[fn(key)] = obj[key];\n return result;\n });\n }\n camelCase() {\n return this.transformKeys(camelCase);\n }\n snakeCase() {\n return this.transformKeys(snakeCase);\n }\n constantCase() {\n return this.transformKeys(key => snakeCase(key).toUpperCase());\n }\n describe(options) {\n let base = super.describe(options);\n base.fields = {};\n for (const [key, value] of Object.entries(this.fields)) {\n var _innerOptions;\n let innerOptions = options;\n if ((_innerOptions = innerOptions) != null && _innerOptions.value) {\n innerOptions = Object.assign({}, innerOptions, {\n parent: innerOptions.value,\n value: innerOptions.value[key]\n });\n }\n base.fields[key] = value.describe(innerOptions);\n }\n return base;\n }\n}\ncreate$3.prototype = ObjectSchema.prototype;\n\nfunction create$2(type) {\n return new ArraySchema(type);\n}\nclass ArraySchema extends Schema {\n constructor(type) {\n super({\n type: 'array',\n check(v) {\n return Array.isArray(v);\n }\n });\n\n // `undefined` specifically means uninitialized, as opposed to \"no subtype\"\n this.innerType = void 0;\n this.innerType = type;\n }\n _cast(_value, _opts) {\n const value = super._cast(_value, _opts);\n\n // should ignore nulls here\n if (!this._typeCheck(value) || !this.innerType) {\n return value;\n }\n let isChanged = false;\n const castArray = value.map((v, idx) => {\n const castElement = this.innerType.cast(v, Object.assign({}, _opts, {\n path: `${_opts.path || ''}[${idx}]`\n }));\n if (castElement !== v) {\n isChanged = true;\n }\n return castElement;\n });\n return isChanged ? castArray : value;\n }\n _validate(_value, options = {}, panic, next) {\n var _options$recursive;\n // let sync = options.sync;\n // let path = options.path;\n let innerType = this.innerType;\n // let endEarly = options.abortEarly ?? this.spec.abortEarly;\n let recursive = (_options$recursive = options.recursive) != null ? _options$recursive : this.spec.recursive;\n options.originalValue != null ? options.originalValue : _value;\n super._validate(_value, options, panic, (arrayErrors, value) => {\n var _options$originalValu2;\n if (!recursive || !innerType || !this._typeCheck(value)) {\n next(arrayErrors, value);\n return;\n }\n\n // #950 Ensure that sparse array empty slots are validated\n let tests = new Array(value.length);\n for (let index = 0; index < value.length; index++) {\n var _options$originalValu;\n tests[index] = innerType.asNestedTest({\n options,\n index,\n parent: value,\n parentPath: options.path,\n originalParent: (_options$originalValu = options.originalValue) != null ? _options$originalValu : _value\n });\n }\n this.runTests({\n value,\n tests,\n originalValue: (_options$originalValu2 = options.originalValue) != null ? _options$originalValu2 : _value,\n options\n }, panic, innerTypeErrors => next(innerTypeErrors.concat(arrayErrors), value));\n });\n }\n clone(spec) {\n const next = super.clone(spec);\n // @ts-expect-error readonly\n next.innerType = this.innerType;\n return next;\n }\n\n /** Parse an input JSON string to an object */\n json() {\n return this.transform(parseJson);\n }\n concat(schema) {\n let next = super.concat(schema);\n\n // @ts-expect-error readonly\n next.innerType = this.innerType;\n if (schema.innerType)\n // @ts-expect-error readonly\n next.innerType = next.innerType ?\n // @ts-expect-error Lazy doesn't have concat and will break\n next.innerType.concat(schema.innerType) : schema.innerType;\n return next;\n }\n of(schema) {\n // FIXME: this should return a new instance of array without the default to be\n let next = this.clone();\n if (!isSchema(schema)) throw new TypeError('`array.of()` sub-schema must be a valid yup schema not: ' + printValue(schema));\n\n // @ts-expect-error readonly\n next.innerType = schema;\n return next;\n }\n length(length, message = array.length) {\n return this.test({\n message,\n name: 'length',\n exclusive: true,\n params: {\n length\n },\n skipAbsent: true,\n test(value) {\n return value.length === this.resolve(length);\n }\n });\n }\n min(min, message) {\n message = message || array.min;\n return this.test({\n message,\n name: 'min',\n exclusive: true,\n params: {\n min\n },\n skipAbsent: true,\n // FIXME(ts): Array\n test(value) {\n return value.length >= this.resolve(min);\n }\n });\n }\n max(max, message) {\n message = message || array.max;\n return this.test({\n message,\n name: 'max',\n exclusive: true,\n params: {\n max\n },\n skipAbsent: true,\n test(value) {\n return value.length <= this.resolve(max);\n }\n });\n }\n ensure() {\n return this.default(() => []).transform((val, original) => {\n // We don't want to return `null` for nullable schema\n if (this._typeCheck(val)) return val;\n return original == null ? [] : [].concat(original);\n });\n }\n compact(rejector) {\n let reject = !rejector ? v => !!v : (v, i, a) => !rejector(v, i, a);\n return this.transform(values => values != null ? values.filter(reject) : values);\n }\n describe(options) {\n let base = super.describe();\n if (this.innerType) {\n var _innerOptions;\n let innerOptions = options;\n if ((_innerOptions = innerOptions) != null && _innerOptions.value) {\n innerOptions = Object.assign({}, innerOptions, {\n parent: innerOptions.value,\n value: innerOptions.value[0]\n });\n }\n base.innerType = this.innerType.describe(options);\n }\n return base;\n }\n}\ncreate$2.prototype = ArraySchema.prototype;\n\n// @ts-ignore\nfunction create$1(schemas) {\n return new TupleSchema(schemas);\n}\nclass TupleSchema extends Schema {\n constructor(schemas) {\n super({\n type: 'tuple',\n spec: {\n types: schemas\n },\n check(v) {\n const types = this.spec.types;\n return Array.isArray(v) && v.length === types.length;\n }\n });\n this.withMutation(() => {\n this.typeError(tuple.notType);\n });\n }\n _cast(inputValue, options) {\n const {\n types\n } = this.spec;\n const value = super._cast(inputValue, options);\n if (!this._typeCheck(value)) {\n return value;\n }\n let isChanged = false;\n const castArray = types.map((type, idx) => {\n const castElement = type.cast(value[idx], Object.assign({}, options, {\n path: `${options.path || ''}[${idx}]`\n }));\n if (castElement !== value[idx]) isChanged = true;\n return castElement;\n });\n return isChanged ? castArray : value;\n }\n _validate(_value, options = {}, panic, next) {\n let itemTypes = this.spec.types;\n super._validate(_value, options, panic, (tupleErrors, value) => {\n var _options$originalValu2;\n // intentionally not respecting recursive\n if (!this._typeCheck(value)) {\n next(tupleErrors, value);\n return;\n }\n let tests = [];\n for (let [index, itemSchema] of itemTypes.entries()) {\n var _options$originalValu;\n tests[index] = itemSchema.asNestedTest({\n options,\n index,\n parent: value,\n parentPath: options.path,\n originalParent: (_options$originalValu = options.originalValue) != null ? _options$originalValu : _value\n });\n }\n this.runTests({\n value,\n tests,\n originalValue: (_options$originalValu2 = options.originalValue) != null ? _options$originalValu2 : _value,\n options\n }, panic, innerTypeErrors => next(innerTypeErrors.concat(tupleErrors), value));\n });\n }\n}\ncreate$1.prototype = TupleSchema.prototype;\n\nfunction create(builder) {\n return new Lazy(builder);\n}\nclass Lazy {\n constructor(builder) {\n this.type = 'lazy';\n this.__isYupSchema__ = true;\n this.spec = void 0;\n this._resolve = (value, options = {}) => {\n let schema = this.builder(value, options);\n if (!isSchema(schema)) throw new TypeError('lazy() functions must return a valid schema');\n if (this.spec.optional) schema = schema.optional();\n return schema.resolve(options);\n };\n this.builder = builder;\n this.spec = {\n meta: undefined,\n optional: false\n };\n }\n clone(spec) {\n const next = new Lazy(this.builder);\n next.spec = Object.assign({}, this.spec, spec);\n return next;\n }\n optionality(optional) {\n const next = this.clone({\n optional\n });\n return next;\n }\n optional() {\n return this.optionality(true);\n }\n resolve(options) {\n return this._resolve(options.value, options);\n }\n cast(value, options) {\n return this._resolve(value, options).cast(value, options);\n }\n asNestedTest(config) {\n let {\n key,\n index,\n parent,\n options\n } = config;\n let value = parent[index != null ? index : key];\n return this._resolve(value, Object.assign({}, options, {\n value,\n parent\n })).asNestedTest(config);\n }\n validate(value, options) {\n return this._resolve(value, options).validate(value, options);\n }\n validateSync(value, options) {\n return this._resolve(value, options).validateSync(value, options);\n }\n validateAt(path, value, options) {\n return this._resolve(value, options).validateAt(path, value, options);\n }\n validateSyncAt(path, value, options) {\n return this._resolve(value, options).validateSyncAt(path, value, options);\n }\n isValid(value, options) {\n return this._resolve(value, options).isValid(value, options);\n }\n isValidSync(value, options) {\n return this._resolve(value, options).isValidSync(value, options);\n }\n describe(options) {\n return options ? this.resolve(options).describe(options) : {\n type: 'lazy',\n meta: this.spec.meta,\n label: undefined\n };\n }\n meta(...args) {\n if (args.length === 0) return this.spec.meta;\n let next = this.clone();\n next.spec.meta = Object.assign(next.spec.meta || {}, args[0]);\n return next;\n }\n}\n\nfunction setLocale(custom) {\n Object.keys(custom).forEach(type => {\n // @ts-ignore\n Object.keys(custom[type]).forEach(method => {\n // @ts-ignore\n locale[type][method] = custom[type][method];\n });\n });\n}\n\nfunction addMethod(schemaType, name, fn) {\n if (!schemaType || !isSchema(schemaType.prototype)) throw new TypeError('You must provide a yup schema constructor function');\n if (typeof name !== 'string') throw new TypeError('A Method name must be provided');\n if (typeof fn !== 'function') throw new TypeError('Method function must be provided');\n schemaType.prototype[name] = fn;\n}\n\nexport { ArraySchema, BooleanSchema, DateSchema, MixedSchema, NumberSchema, ObjectSchema, Schema, StringSchema, TupleSchema, ValidationError, addMethod, create$2 as array, create$7 as bool, create$7 as boolean, create$4 as date, getIn, isSchema, create as lazy, create$8 as mixed, create$5 as number, create$3 as object, reach, create$9 as ref, setLocale, create$6 as string, create$1 as tuple };\n","/*\n * International Telephone Input v17.0.19\n * https://github.com/jackocnr/intl-tel-input.git\n * Licensed under the MIT license\n */\n\n// wrap in UMD\n(function(factory) {\n if (typeof module === \"object\" && module.exports) module.exports = factory(); else window.intlTelInput = factory();\n})(function(undefined) {\n \"use strict\";\n return function() {\n // Array of country objects for the flag dropdown.\n // Here is the criteria for the plugin to support a given country/territory\n // - It has an iso2 code: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\n // - It has it's own country calling code (it is not a sub-region of another country): https://en.wikipedia.org/wiki/List_of_country_calling_codes\n // - It has a flag in the region-flags project: https://github.com/behdad/region-flags/tree/gh-pages/png\n // - It is supported by libphonenumber (it must be listed on this page): https://github.com/googlei18n/libphonenumber/blob/master/resources/ShortNumberMetadata.xml\n // Each country array has the following information:\n // [\n // Country name,\n // iso2 code,\n // International dial code,\n // Order (if >1 country with same dial code),\n // Area codes\n // ]\n var allCountries = [ [ \"Afghanistan (افغانستان)\", \"af\", \"93\" ], [ \"Albania (Shqipëri)\", \"al\", \"355\" ], [ \"Algeria (الجزائر)\", \"dz\", \"213\" ], [ \"American Samoa\", \"as\", \"1\", 5, [ \"684\" ] ], [ \"Andorra\", \"ad\", \"376\" ], [ \"Angola\", \"ao\", \"244\" ], [ \"Anguilla\", \"ai\", \"1\", 6, [ \"264\" ] ], [ \"Antigua and Barbuda\", \"ag\", \"1\", 7, [ \"268\" ] ], [ \"Argentina\", \"ar\", \"54\" ], [ \"Armenia (Հայաստան)\", \"am\", \"374\" ], [ \"Aruba\", \"aw\", \"297\" ], [ \"Ascension Island\", \"ac\", \"247\" ], [ \"Australia\", \"au\", \"61\", 0 ], [ \"Austria (Österreich)\", \"at\", \"43\" ], [ \"Azerbaijan (Azərbaycan)\", \"az\", \"994\" ], [ \"Bahamas\", \"bs\", \"1\", 8, [ \"242\" ] ], [ \"Bahrain (البحرين)\", \"bh\", \"973\" ], [ \"Bangladesh (বাংলাদেশ)\", \"bd\", \"880\" ], [ \"Barbados\", \"bb\", \"1\", 9, [ \"246\" ] ], [ \"Belarus (Беларусь)\", \"by\", \"375\" ], [ \"Belgium (België)\", \"be\", \"32\" ], [ \"Belize\", \"bz\", \"501\" ], [ \"Benin (Bénin)\", \"bj\", \"229\" ], [ \"Bermuda\", \"bm\", \"1\", 10, [ \"441\" ] ], [ \"Bhutan (འབྲུག)\", \"bt\", \"975\" ], [ \"Bolivia\", \"bo\", \"591\" ], [ \"Bosnia and Herzegovina (Босна и Херцеговина)\", \"ba\", \"387\" ], [ \"Botswana\", \"bw\", \"267\" ], [ \"Brazil (Brasil)\", \"br\", \"55\" ], [ \"British Indian Ocean Territory\", \"io\", \"246\" ], [ \"British Virgin Islands\", \"vg\", \"1\", 11, [ \"284\" ] ], [ \"Brunei\", \"bn\", \"673\" ], [ \"Bulgaria (България)\", \"bg\", \"359\" ], [ \"Burkina Faso\", \"bf\", \"226\" ], [ \"Burundi (Uburundi)\", \"bi\", \"257\" ], [ \"Cambodia (កម្ពុជា)\", \"kh\", \"855\" ], [ \"Cameroon (Cameroun)\", \"cm\", \"237\" ], [ \"Canada\", \"ca\", \"1\", 1, [ \"204\", \"226\", \"236\", \"249\", \"250\", \"289\", \"306\", \"343\", \"365\", \"387\", \"403\", \"416\", \"418\", \"431\", \"437\", \"438\", \"450\", \"506\", \"514\", \"519\", \"548\", \"579\", \"581\", \"587\", \"604\", \"613\", \"639\", \"647\", \"672\", \"705\", \"709\", \"742\", \"778\", \"780\", \"782\", \"807\", \"819\", \"825\", \"867\", \"873\", \"902\", \"905\" ] ], [ \"Cape Verde (Kabu Verdi)\", \"cv\", \"238\" ], [ \"Caribbean Netherlands\", \"bq\", \"599\", 1, [ \"3\", \"4\", \"7\" ] ], [ \"Cayman Islands\", \"ky\", \"1\", 12, [ \"345\" ] ], [ \"Central African Republic (République centrafricaine)\", \"cf\", \"236\" ], [ \"Chad (Tchad)\", \"td\", \"235\" ], [ \"Chile\", \"cl\", \"56\" ], [ \"China (中国)\", \"cn\", \"86\" ], [ \"Christmas Island\", \"cx\", \"61\", 2, [ \"89164\" ] ], [ \"Cocos (Keeling) Islands\", \"cc\", \"61\", 1, [ \"89162\" ] ], [ \"Colombia\", \"co\", \"57\" ], [ \"Comoros (جزر القمر)\", \"km\", \"269\" ], [ \"Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)\", \"cd\", \"243\" ], [ \"Congo (Republic) (Congo-Brazzaville)\", \"cg\", \"242\" ], [ \"Cook Islands\", \"ck\", \"682\" ], [ \"Costa Rica\", \"cr\", \"506\" ], [ \"Côte d’Ivoire\", \"ci\", \"225\" ], [ \"Croatia (Hrvatska)\", \"hr\", \"385\" ], [ \"Cuba\", \"cu\", \"53\" ], [ \"Curaçao\", \"cw\", \"599\", 0 ], [ \"Cyprus (Κύπρος)\", \"cy\", \"357\" ], [ \"Czech Republic (Česká republika)\", \"cz\", \"420\" ], [ \"Denmark (Danmark)\", \"dk\", \"45\" ], [ \"Djibouti\", \"dj\", \"253\" ], [ \"Dominica\", \"dm\", \"1\", 13, [ \"767\" ] ], [ \"Dominican Republic (República Dominicana)\", \"do\", \"1\", 2, [ \"809\", \"829\", \"849\" ] ], [ \"Ecuador\", \"ec\", \"593\" ], [ \"Egypt (مصر)\", \"eg\", \"20\" ], [ \"El Salvador\", \"sv\", \"503\" ], [ \"Equatorial Guinea (Guinea Ecuatorial)\", \"gq\", \"240\" ], [ \"Eritrea\", \"er\", \"291\" ], [ \"Estonia (Eesti)\", \"ee\", \"372\" ], [ \"Eswatini\", \"sz\", \"268\" ], [ \"Ethiopia\", \"et\", \"251\" ], [ \"Falkland Islands (Islas Malvinas)\", \"fk\", \"500\" ], [ \"Faroe Islands (Føroyar)\", \"fo\", \"298\" ], [ \"Fiji\", \"fj\", \"679\" ], [ \"Finland (Suomi)\", \"fi\", \"358\", 0 ], [ \"France\", \"fr\", \"33\" ], [ \"French Guiana (Guyane française)\", \"gf\", \"594\" ], [ \"French Polynesia (Polynésie française)\", \"pf\", \"689\" ], [ \"Gabon\", \"ga\", \"241\" ], [ \"Gambia\", \"gm\", \"220\" ], [ \"Georgia (საქართველო)\", \"ge\", \"995\" ], [ \"Germany (Deutschland)\", \"de\", \"49\" ], [ \"Ghana (Gaana)\", \"gh\", \"233\" ], [ \"Gibraltar\", \"gi\", \"350\" ], [ \"Greece (Ελλάδα)\", \"gr\", \"30\" ], [ \"Greenland (Kalaallit Nunaat)\", \"gl\", \"299\" ], [ \"Grenada\", \"gd\", \"1\", 14, [ \"473\" ] ], [ \"Guadeloupe\", \"gp\", \"590\", 0 ], [ \"Guam\", \"gu\", \"1\", 15, [ \"671\" ] ], [ \"Guatemala\", \"gt\", \"502\" ], [ \"Guernsey\", \"gg\", \"44\", 1, [ \"1481\", \"7781\", \"7839\", \"7911\" ] ], [ \"Guinea (Guinée)\", \"gn\", \"224\" ], [ \"Guinea-Bissau (Guiné Bissau)\", \"gw\", \"245\" ], [ \"Guyana\", \"gy\", \"592\" ], [ \"Haiti\", \"ht\", \"509\" ], [ \"Honduras\", \"hn\", \"504\" ], [ \"Hong Kong (香港)\", \"hk\", \"852\" ], [ \"Hungary (Magyarország)\", \"hu\", \"36\" ], [ \"Iceland (Ísland)\", \"is\", \"354\" ], [ \"India (भारत)\", \"in\", \"91\" ], [ \"Indonesia\", \"id\", \"62\" ], [ \"Iran (ایران)\", \"ir\", \"98\" ], [ \"Iraq (العراق)\", \"iq\", \"964\" ], [ \"Ireland\", \"ie\", \"353\" ], [ \"Isle of Man\", \"im\", \"44\", 2, [ \"1624\", \"74576\", \"7524\", \"7924\", \"7624\" ] ], [ \"Israel (ישראל)\", \"il\", \"972\" ], [ \"Italy (Italia)\", \"it\", \"39\", 0 ], [ \"Jamaica\", \"jm\", \"1\", 4, [ \"876\", \"658\" ] ], [ \"Japan (日本)\", \"jp\", \"81\" ], [ \"Jersey\", \"je\", \"44\", 3, [ \"1534\", \"7509\", \"7700\", \"7797\", \"7829\", \"7937\" ] ], [ \"Jordan (الأردن)\", \"jo\", \"962\" ], [ \"Kazakhstan (Казахстан)\", \"kz\", \"7\", 1, [ \"33\", \"7\" ] ], [ \"Kenya\", \"ke\", \"254\" ], [ \"Kiribati\", \"ki\", \"686\" ], [ \"Kosovo\", \"xk\", \"383\" ], [ \"Kuwait (الكويت)\", \"kw\", \"965\" ], [ \"Kyrgyzstan (Кыргызстан)\", \"kg\", \"996\" ], [ \"Laos (ລາວ)\", \"la\", \"856\" ], [ \"Latvia (Latvija)\", \"lv\", \"371\" ], [ \"Lebanon (لبنان)\", \"lb\", \"961\" ], [ \"Lesotho\", \"ls\", \"266\" ], [ \"Liberia\", \"lr\", \"231\" ], [ \"Libya (ليبيا)\", \"ly\", \"218\" ], [ \"Liechtenstein\", \"li\", \"423\" ], [ \"Lithuania (Lietuva)\", \"lt\", \"370\" ], [ \"Luxembourg\", \"lu\", \"352\" ], [ \"Macau (澳門)\", \"mo\", \"853\" ], [ \"North Macedonia (Македонија)\", \"mk\", \"389\" ], [ \"Madagascar (Madagasikara)\", \"mg\", \"261\" ], [ \"Malawi\", \"mw\", \"265\" ], [ \"Malaysia\", \"my\", \"60\" ], [ \"Maldives\", \"mv\", \"960\" ], [ \"Mali\", \"ml\", \"223\" ], [ \"Malta\", \"mt\", \"356\" ], [ \"Marshall Islands\", \"mh\", \"692\" ], [ \"Martinique\", \"mq\", \"596\" ], [ \"Mauritania (موريتانيا)\", \"mr\", \"222\" ], [ \"Mauritius (Moris)\", \"mu\", \"230\" ], [ \"Mayotte\", \"yt\", \"262\", 1, [ \"269\", \"639\" ] ], [ \"Mexico (México)\", \"mx\", \"52\" ], [ \"Micronesia\", \"fm\", \"691\" ], [ \"Moldova (Republica Moldova)\", \"md\", \"373\" ], [ \"Monaco\", \"mc\", \"377\" ], [ \"Mongolia (Монгол)\", \"mn\", \"976\" ], [ \"Montenegro (Crna Gora)\", \"me\", \"382\" ], [ \"Montserrat\", \"ms\", \"1\", 16, [ \"664\" ] ], [ \"Morocco (المغرب)\", \"ma\", \"212\", 0 ], [ \"Mozambique (Moçambique)\", \"mz\", \"258\" ], [ \"Myanmar (Burma) (မြန်မာ)\", \"mm\", \"95\" ], [ \"Namibia (Namibië)\", \"na\", \"264\" ], [ \"Nauru\", \"nr\", \"674\" ], [ \"Nepal (नेपाल)\", \"np\", \"977\" ], [ \"Netherlands (Nederland)\", \"nl\", \"31\" ], [ \"New Caledonia (Nouvelle-Calédonie)\", \"nc\", \"687\" ], [ \"New Zealand\", \"nz\", \"64\" ], [ \"Nicaragua\", \"ni\", \"505\" ], [ \"Niger (Nijar)\", \"ne\", \"227\" ], [ \"Nigeria\", \"ng\", \"234\" ], [ \"Niue\", \"nu\", \"683\" ], [ \"Norfolk Island\", \"nf\", \"672\" ], [ \"North Korea (조선 민주주의 인민 공화국)\", \"kp\", \"850\" ], [ \"Northern Mariana Islands\", \"mp\", \"1\", 17, [ \"670\" ] ], [ \"Norway (Norge)\", \"no\", \"47\", 0 ], [ \"Oman (عُمان)\", \"om\", \"968\" ], [ \"Pakistan (پاکستان)\", \"pk\", \"92\" ], [ \"Palau\", \"pw\", \"680\" ], [ \"Palestine (فلسطين)\", \"ps\", \"970\" ], [ \"Panama (Panamá)\", \"pa\", \"507\" ], [ \"Papua New Guinea\", \"pg\", \"675\" ], [ \"Paraguay\", \"py\", \"595\" ], [ \"Peru (Perú)\", \"pe\", \"51\" ], [ \"Philippines\", \"ph\", \"63\" ], [ \"Poland (Polska)\", \"pl\", \"48\" ], [ \"Portugal\", \"pt\", \"351\" ], [ \"Puerto Rico\", \"pr\", \"1\", 3, [ \"787\", \"939\" ] ], [ \"Qatar (قطر)\", \"qa\", \"974\" ], [ \"Réunion (La Réunion)\", \"re\", \"262\", 0 ], [ \"Romania (România)\", \"ro\", \"40\" ], [ \"Russia (Россия)\", \"ru\", \"7\", 0 ], [ \"Rwanda\", \"rw\", \"250\" ], [ \"Saint Barthélemy\", \"bl\", \"590\", 1 ], [ \"Saint Helena\", \"sh\", \"290\" ], [ \"Saint Kitts and Nevis\", \"kn\", \"1\", 18, [ \"869\" ] ], [ \"Saint Lucia\", \"lc\", \"1\", 19, [ \"758\" ] ], [ \"Saint Martin (Saint-Martin (partie française))\", \"mf\", \"590\", 2 ], [ \"Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)\", \"pm\", \"508\" ], [ \"Saint Vincent and the Grenadines\", \"vc\", \"1\", 20, [ \"784\" ] ], [ \"Samoa\", \"ws\", \"685\" ], [ \"San Marino\", \"sm\", \"378\" ], [ \"São Tomé and Príncipe (São Tomé e Príncipe)\", \"st\", \"239\" ], [ \"Saudi Arabia (المملكة العربية السعودية)\", \"sa\", \"966\" ], [ \"Senegal (Sénégal)\", \"sn\", \"221\" ], [ \"Serbia (Србија)\", \"rs\", \"381\" ], [ \"Seychelles\", \"sc\", \"248\" ], [ \"Sierra Leone\", \"sl\", \"232\" ], [ \"Singapore\", \"sg\", \"65\" ], [ \"Sint Maarten\", \"sx\", \"1\", 21, [ \"721\" ] ], [ \"Slovakia (Slovensko)\", \"sk\", \"421\" ], [ \"Slovenia (Slovenija)\", \"si\", \"386\" ], [ \"Solomon Islands\", \"sb\", \"677\" ], [ \"Somalia (Soomaaliya)\", \"so\", \"252\" ], [ \"South Africa\", \"za\", \"27\" ], [ \"South Korea (대한민국)\", \"kr\", \"82\" ], [ \"South Sudan (جنوب السودان)\", \"ss\", \"211\" ], [ \"Spain (España)\", \"es\", \"34\" ], [ \"Sri Lanka (ශ්රී ලංකාව)\", \"lk\", \"94\" ], [ \"Sudan (السودان)\", \"sd\", \"249\" ], [ \"Suriname\", \"sr\", \"597\" ], [ \"Svalbard and Jan Mayen\", \"sj\", \"47\", 1, [ \"79\" ] ], [ \"Sweden (Sverige)\", \"se\", \"46\" ], [ \"Switzerland (Schweiz)\", \"ch\", \"41\" ], [ \"Syria (سوريا)\", \"sy\", \"963\" ], [ \"Taiwan (台灣)\", \"tw\", \"886\" ], [ \"Tajikistan\", \"tj\", \"992\" ], [ \"Tanzania\", \"tz\", \"255\" ], [ \"Thailand (ไทย)\", \"th\", \"66\" ], [ \"Timor-Leste\", \"tl\", \"670\" ], [ \"Togo\", \"tg\", \"228\" ], [ \"Tokelau\", \"tk\", \"690\" ], [ \"Tonga\", \"to\", \"676\" ], [ \"Trinidad and Tobago\", \"tt\", \"1\", 22, [ \"868\" ] ], [ \"Tunisia (تونس)\", \"tn\", \"216\" ], [ \"Turkey (Türkiye)\", \"tr\", \"90\" ], [ \"Turkmenistan\", \"tm\", \"993\" ], [ \"Turks and Caicos Islands\", \"tc\", \"1\", 23, [ \"649\" ] ], [ \"Tuvalu\", \"tv\", \"688\" ], [ \"U.S. Virgin Islands\", \"vi\", \"1\", 24, [ \"340\" ] ], [ \"Uganda\", \"ug\", \"256\" ], [ \"Ukraine (Україна)\", \"ua\", \"380\" ], [ \"United Arab Emirates (الإمارات العربية المتحدة)\", \"ae\", \"971\" ], [ \"United Kingdom\", \"gb\", \"44\", 0 ], [ \"United States\", \"us\", \"1\", 0 ], [ \"Uruguay\", \"uy\", \"598\" ], [ \"Uzbekistan (Oʻzbekiston)\", \"uz\", \"998\" ], [ \"Vanuatu\", \"vu\", \"678\" ], [ \"Vatican City (Città del Vaticano)\", \"va\", \"39\", 1, [ \"06698\" ] ], [ \"Venezuela\", \"ve\", \"58\" ], [ \"Vietnam (Việt Nam)\", \"vn\", \"84\" ], [ \"Wallis and Futuna (Wallis-et-Futuna)\", \"wf\", \"681\" ], [ \"Western Sahara (الصحراء الغربية)\", \"eh\", \"212\", 1, [ \"5288\", \"5289\" ] ], [ \"Yemen (اليمن)\", \"ye\", \"967\" ], [ \"Zambia\", \"zm\", \"260\" ], [ \"Zimbabwe\", \"zw\", \"263\" ], [ \"Åland Islands\", \"ax\", \"358\", 1, [ \"18\" ] ] ];\n // loop over all of the countries above, restructuring the data to be objects with named keys\n for (var i = 0; i < allCountries.length; i++) {\n var c = allCountries[i];\n allCountries[i] = {\n name: c[0],\n iso2: c[1],\n dialCode: c[2],\n priority: c[3] || 0,\n areaCodes: c[4] || null\n };\n }\n \"use strict\";\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n var intlTelInputGlobals = {\n getInstance: function getInstance(input) {\n var id = input.getAttribute(\"data-intl-tel-input-id\");\n return window.intlTelInputGlobals.instances[id];\n },\n instances: {},\n // using a global like this allows us to mock it in the tests\n documentReady: function documentReady() {\n return document.readyState === \"complete\";\n }\n };\n if (typeof window === \"object\") window.intlTelInputGlobals = intlTelInputGlobals;\n // these vars persist through all instances of the plugin\n var id = 0;\n var defaults = {\n // whether or not to allow the dropdown\n allowDropdown: true,\n // if there is just a dial code in the input: remove it on blur\n autoHideDialCode: true,\n // add a placeholder in the input with an example number for the selected country\n autoPlaceholder: \"polite\",\n // modify the parentClass\n customContainer: \"\",\n // modify the auto placeholder\n customPlaceholder: null,\n // append menu to specified element\n dropdownContainer: null,\n // don't display these countries\n excludeCountries: [],\n // format the input value during initialisation and on setNumber\n formatOnDisplay: true,\n // geoIp lookup function\n geoIpLookup: null,\n // inject a hidden input with this name, and on submit, populate it with the result of getNumber\n hiddenInput: \"\",\n // initial country\n initialCountry: \"\",\n // localized country names e.g. { 'de': 'Deutschland' }\n localizedCountries: null,\n // don't insert international dial codes\n nationalMode: true,\n // display only these countries\n onlyCountries: [],\n // number type to use for placeholders\n placeholderNumberType: \"MOBILE\",\n // the countries at the top of the list. defaults to united states and united kingdom\n preferredCountries: [ \"us\", \"gb\" ],\n // display the country dial code next to the selected flag so it's not part of the typed number\n separateDialCode: false,\n // specify the path to the libphonenumber script to enable validation/formatting\n utilsScript: \"\"\n };\n // https://en.wikipedia.org/wiki/List_of_North_American_Numbering_Plan_area_codes#Non-geographic_area_codes\n var regionlessNanpNumbers = [ \"800\", \"822\", \"833\", \"844\", \"855\", \"866\", \"877\", \"880\", \"881\", \"882\", \"883\", \"884\", \"885\", \"886\", \"887\", \"888\", \"889\" ];\n // utility function to iterate over an object. can't use Object.entries or native forEach because\n // of IE11\n var forEachProp = function forEachProp(obj, callback) {\n var keys = Object.keys(obj);\n for (var i = 0; i < keys.length; i++) {\n callback(keys[i], obj[keys[i]]);\n }\n };\n // run a method on each instance of the plugin\n var forEachInstance = function forEachInstance(method) {\n forEachProp(window.intlTelInputGlobals.instances, function(key) {\n window.intlTelInputGlobals.instances[key][method]();\n });\n };\n // this is our plugin class that we will create an instance of\n // eslint-disable-next-line no-unused-vars\n var Iti = /*#__PURE__*/\n function() {\n function Iti(input, options) {\n var _this = this;\n _classCallCheck(this, Iti);\n this.id = id++;\n this.telInput = input;\n this.activeItem = null;\n this.highlightedItem = null;\n // process specified options / defaults\n // alternative to Object.assign, which isn't supported by IE11\n var customOptions = options || {};\n this.options = {};\n forEachProp(defaults, function(key, value) {\n _this.options[key] = customOptions.hasOwnProperty(key) ? customOptions[key] : value;\n });\n this.hadInitialPlaceholder = Boolean(input.getAttribute(\"placeholder\"));\n }\n _createClass(Iti, [ {\n key: \"_init\",\n value: function _init() {\n var _this2 = this;\n // if in nationalMode, disable options relating to dial codes\n if (this.options.nationalMode) this.options.autoHideDialCode = false;\n // if separateDialCode then doesn't make sense to A) insert dial code into input\n // (autoHideDialCode), and B) display national numbers (because we're displaying the country\n // dial code next to them)\n if (this.options.separateDialCode) {\n this.options.autoHideDialCode = this.options.nationalMode = false;\n }\n // we cannot just test screen size as some smartphones/website meta tags will report desktop\n // resolutions\n // Note: for some reason jasmine breaks if you put this in the main Plugin function with the\n // rest of these declarations\n // Note: to target Android Mobiles (and not Tablets), we must find 'Android' and 'Mobile'\n this.isMobile = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n if (this.isMobile) {\n // trigger the mobile dropdown css\n document.body.classList.add(\"iti-mobile\");\n // on mobile, we want a full screen dropdown, so we must append it to the body\n if (!this.options.dropdownContainer) this.options.dropdownContainer = document.body;\n }\n // these promises get resolved when their individual requests complete\n // this way the dev can do something like iti.promise.then(...) to know when all requests are\n // complete\n if (typeof Promise !== \"undefined\") {\n var autoCountryPromise = new Promise(function(resolve, reject) {\n _this2.resolveAutoCountryPromise = resolve;\n _this2.rejectAutoCountryPromise = reject;\n });\n var utilsScriptPromise = new Promise(function(resolve, reject) {\n _this2.resolveUtilsScriptPromise = resolve;\n _this2.rejectUtilsScriptPromise = reject;\n });\n this.promise = Promise.all([ autoCountryPromise, utilsScriptPromise ]);\n } else {\n // prevent errors when Promise doesn't exist\n this.resolveAutoCountryPromise = this.rejectAutoCountryPromise = function() {};\n this.resolveUtilsScriptPromise = this.rejectUtilsScriptPromise = function() {};\n }\n // in various situations there could be no country selected initially, but we need to be able\n // to assume this variable exists\n this.selectedCountryData = {};\n // process all the data: onlyCountries, excludeCountries, preferredCountries etc\n this._processCountryData();\n // generate the markup\n this._generateMarkup();\n // set the initial state of the input value and the selected flag\n this._setInitialState();\n // start all of the event listeners: autoHideDialCode, input keydown, selectedFlag click\n this._initListeners();\n // utils script, and auto country\n this._initRequests();\n }\n }, {\n key: \"_processCountryData\",\n value: function _processCountryData() {\n // process onlyCountries or excludeCountries array if present\n this._processAllCountries();\n // process the countryCodes map\n this._processCountryCodes();\n // process the preferredCountries\n this._processPreferredCountries();\n // translate countries according to localizedCountries option\n if (this.options.localizedCountries) this._translateCountriesByLocale();\n // sort countries by name\n if (this.options.onlyCountries.length || this.options.localizedCountries) {\n this.countries.sort(this._countryNameSort);\n }\n }\n }, {\n key: \"_addCountryCode\",\n value: function _addCountryCode(iso2, countryCode, priority) {\n if (countryCode.length > this.countryCodeMaxLen) {\n this.countryCodeMaxLen = countryCode.length;\n }\n if (!this.countryCodes.hasOwnProperty(countryCode)) {\n this.countryCodes[countryCode] = [];\n }\n // bail if we already have this country for this countryCode\n for (var i = 0; i < this.countryCodes[countryCode].length; i++) {\n if (this.countryCodes[countryCode][i] === iso2) return;\n }\n // check for undefined as 0 is falsy\n var index = priority !== undefined ? priority : this.countryCodes[countryCode].length;\n this.countryCodes[countryCode][index] = iso2;\n }\n }, {\n key: \"_processAllCountries\",\n value: function _processAllCountries() {\n if (this.options.onlyCountries.length) {\n var lowerCaseOnlyCountries = this.options.onlyCountries.map(function(country) {\n return country.toLowerCase();\n });\n this.countries = allCountries.filter(function(country) {\n return lowerCaseOnlyCountries.indexOf(country.iso2) > -1;\n });\n } else if (this.options.excludeCountries.length) {\n var lowerCaseExcludeCountries = this.options.excludeCountries.map(function(country) {\n return country.toLowerCase();\n });\n this.countries = allCountries.filter(function(country) {\n return lowerCaseExcludeCountries.indexOf(country.iso2) === -1;\n });\n } else {\n this.countries = allCountries;\n }\n }\n }, {\n key: \"_translateCountriesByLocale\",\n value: function _translateCountriesByLocale() {\n for (var i = 0; i < this.countries.length; i++) {\n var iso = this.countries[i].iso2.toLowerCase();\n if (this.options.localizedCountries.hasOwnProperty(iso)) {\n this.countries[i].name = this.options.localizedCountries[iso];\n }\n }\n }\n }, {\n key: \"_countryNameSort\",\n value: function _countryNameSort(a, b) {\n return a.name.localeCompare(b.name);\n }\n }, {\n key: \"_processCountryCodes\",\n value: function _processCountryCodes() {\n this.countryCodeMaxLen = 0;\n // here we store just dial codes\n this.dialCodes = {};\n // here we store \"country codes\" (both dial codes and their area codes)\n this.countryCodes = {};\n // first: add dial codes\n for (var i = 0; i < this.countries.length; i++) {\n var c = this.countries[i];\n if (!this.dialCodes[c.dialCode]) this.dialCodes[c.dialCode] = true;\n this._addCountryCode(c.iso2, c.dialCode, c.priority);\n }\n // next: add area codes\n // this is a second loop over countries, to make sure we have all of the \"root\" countries\n // already in the map, so that we can access them, as each time we add an area code substring\n // to the map, we also need to include the \"root\" country's code, as that also matches\n for (var _i = 0; _i < this.countries.length; _i++) {\n var _c = this.countries[_i];\n // area codes\n if (_c.areaCodes) {\n var rootCountryCode = this.countryCodes[_c.dialCode][0];\n // for each area code\n for (var j = 0; j < _c.areaCodes.length; j++) {\n var areaCode = _c.areaCodes[j];\n // for each digit in the area code to add all partial matches as well\n for (var k = 1; k < areaCode.length; k++) {\n var partialDialCode = _c.dialCode + areaCode.substr(0, k);\n // start with the root country, as that also matches this dial code\n this._addCountryCode(rootCountryCode, partialDialCode);\n this._addCountryCode(_c.iso2, partialDialCode);\n }\n // add the full area code\n this._addCountryCode(_c.iso2, _c.dialCode + areaCode);\n }\n }\n }\n }\n }, {\n key: \"_processPreferredCountries\",\n value: function _processPreferredCountries() {\n this.preferredCountries = [];\n for (var i = 0; i < this.options.preferredCountries.length; i++) {\n var countryCode = this.options.preferredCountries[i].toLowerCase();\n var countryData = this._getCountryData(countryCode, false, true);\n if (countryData) this.preferredCountries.push(countryData);\n }\n }\n }, {\n key: \"_createEl\",\n value: function _createEl(name, attrs, container) {\n var el = document.createElement(name);\n if (attrs) forEachProp(attrs, function(key, value) {\n return el.setAttribute(key, value);\n });\n if (container) container.appendChild(el);\n return el;\n }\n }, {\n key: \"_generateMarkup\",\n value: function _generateMarkup() {\n // if autocomplete does not exist on the element and its form, then\n // prevent autocomplete as there's no safe, cross-browser event we can react to, so it can\n // easily put the plugin in an inconsistent state e.g. the wrong flag selected for the\n // autocompleted number, which on submit could mean wrong number is saved (esp in nationalMode)\n if (!this.telInput.hasAttribute(\"autocomplete\") && !(this.telInput.form && this.telInput.form.hasAttribute(\"autocomplete\"))) {\n this.telInput.setAttribute(\"autocomplete\", \"off\");\n }\n // containers (mostly for positioning)\n var parentClass = \"iti\";\n if (this.options.allowDropdown) parentClass += \" iti--allow-dropdown\";\n if (this.options.separateDialCode) parentClass += \" iti--separate-dial-code\";\n if (this.options.customContainer) {\n parentClass += \" \";\n parentClass += this.options.customContainer;\n }\n var wrapper = this._createEl(\"div\", {\n \"class\": parentClass\n });\n this.telInput.parentNode.insertBefore(wrapper, this.telInput);\n this.flagsContainer = this._createEl(\"div\", {\n \"class\": \"iti__flag-container\"\n }, wrapper);\n wrapper.appendChild(this.telInput);\n // selected flag (displayed to left of input)\n this.selectedFlag = this._createEl(\"div\", {\n \"class\": \"iti__selected-flag\",\n role: \"combobox\",\n \"aria-controls\": \"iti-\".concat(this.id, \"__country-listbox\"),\n \"aria-owns\": \"iti-\".concat(this.id, \"__country-listbox\"),\n \"aria-expanded\": \"false\"\n }, this.flagsContainer);\n this.selectedFlagInner = this._createEl(\"div\", {\n \"class\": \"iti__flag\"\n }, this.selectedFlag);\n if (this.options.separateDialCode) {\n this.selectedDialCode = this._createEl(\"div\", {\n \"class\": \"iti__selected-dial-code\"\n }, this.selectedFlag);\n }\n if (this.options.allowDropdown) {\n // make element focusable and tab navigable\n this.selectedFlag.setAttribute(\"tabindex\", \"0\");\n this.dropdownArrow = this._createEl(\"div\", {\n \"class\": \"iti__arrow\"\n }, this.selectedFlag);\n // country dropdown: preferred countries, then divider, then all countries\n this.countryList = this._createEl(\"ul\", {\n \"class\": \"iti__country-list iti__hide\",\n id: \"iti-\".concat(this.id, \"__country-listbox\"),\n role: \"listbox\",\n \"aria-label\": \"List of countries\"\n });\n if (this.preferredCountries.length) {\n this._appendListItems(this.preferredCountries, \"iti__preferred\", true);\n this._createEl(\"li\", {\n \"class\": \"iti__divider\",\n role: \"separator\",\n \"aria-disabled\": \"true\"\n }, this.countryList);\n }\n this._appendListItems(this.countries, \"iti__standard\");\n // create dropdownContainer markup\n if (this.options.dropdownContainer) {\n this.dropdown = this._createEl(\"div\", {\n \"class\": \"iti iti--container\"\n });\n this.dropdown.appendChild(this.countryList);\n } else {\n this.flagsContainer.appendChild(this.countryList);\n }\n }\n if (this.options.hiddenInput) {\n var hiddenInputName = this.options.hiddenInput;\n var name = this.telInput.getAttribute(\"name\");\n if (name) {\n var i = name.lastIndexOf(\"[\");\n // if input name contains square brackets, then give the hidden input the same name,\n // replacing the contents of the last set of brackets with the given hiddenInput name\n if (i !== -1) hiddenInputName = \"\".concat(name.substr(0, i), \"[\").concat(hiddenInputName, \"]\");\n }\n this.hiddenInput = this._createEl(\"input\", {\n type: \"hidden\",\n name: hiddenInputName\n });\n wrapper.appendChild(this.hiddenInput);\n }\n }\n }, {\n key: \"_appendListItems\",\n value: function _appendListItems(countries, className, preferred) {\n // we create so many DOM elements, it is faster to build a temp string\n // and then add everything to the DOM in one go at the end\n var tmp = \"\";\n // for each country\n for (var i = 0; i < countries.length; i++) {\n var c = countries[i];\n var idSuffix = preferred ? \"-preferred\" : \"\";\n // open the list item\n tmp += \"\");\n // add the flag\n tmp += \"\");\n // and the country name and dial code\n tmp += \"\".concat(c.name, \"\");\n tmp += \"+\".concat(c.dialCode, \"\");\n // close the list item\n tmp += \"\";\n }\n this.countryList.insertAdjacentHTML(\"beforeend\", tmp);\n }\n }, {\n key: \"_setInitialState\",\n value: function _setInitialState() {\n // fix firefox bug: when first load page (with input with value set to number with intl dial\n // code) and initialising plugin removes the dial code from the input, then refresh page,\n // and we try to init plugin again but this time on number without dial code so get grey flag\n var attributeValue = this.telInput.getAttribute(\"value\");\n var inputValue = this.telInput.value;\n var useAttribute = attributeValue && attributeValue.charAt(0) === \"+\" && (!inputValue || inputValue.charAt(0) !== \"+\");\n var val = useAttribute ? attributeValue : inputValue;\n var dialCode = this._getDialCode(val);\n var isRegionlessNanp = this._isRegionlessNanp(val);\n var _this$options = this.options, initialCountry = _this$options.initialCountry, nationalMode = _this$options.nationalMode, autoHideDialCode = _this$options.autoHideDialCode, separateDialCode = _this$options.separateDialCode;\n // if we already have a dial code, and it's not a regionlessNanp, we can go ahead and set the\n // flag, else fall back to the default country\n if (dialCode && !isRegionlessNanp) {\n this._updateFlagFromNumber(val);\n } else if (initialCountry !== \"auto\") {\n // see if we should select a flag\n if (initialCountry) {\n this._setFlag(initialCountry.toLowerCase());\n } else {\n if (dialCode && isRegionlessNanp) {\n // has intl dial code, is regionless nanp, and no initialCountry, so default to US\n this._setFlag(\"us\");\n } else {\n // no dial code and no initialCountry, so default to first in list\n this.defaultCountry = this.preferredCountries.length ? this.preferredCountries[0].iso2 : this.countries[0].iso2;\n if (!val) {\n this._setFlag(this.defaultCountry);\n }\n }\n }\n // if empty and no nationalMode and no autoHideDialCode then insert the default dial code\n if (!val && !nationalMode && !autoHideDialCode && !separateDialCode) {\n this.telInput.value = \"+\".concat(this.selectedCountryData.dialCode);\n }\n }\n // NOTE: if initialCountry is set to auto, that will be handled separately\n // format - note this wont be run after _updateDialCode as that's only called if no val\n if (val) this._updateValFromNumber(val);\n }\n }, {\n key: \"_initListeners\",\n value: function _initListeners() {\n this._initKeyListeners();\n if (this.options.autoHideDialCode) this._initBlurListeners();\n if (this.options.allowDropdown) this._initDropdownListeners();\n if (this.hiddenInput) this._initHiddenInputListener();\n }\n }, {\n key: \"_initHiddenInputListener\",\n value: function _initHiddenInputListener() {\n var _this3 = this;\n this._handleHiddenInputSubmit = function() {\n _this3.hiddenInput.value = _this3.getNumber();\n };\n if (this.telInput.form) this.telInput.form.addEventListener(\"submit\", this._handleHiddenInputSubmit);\n }\n }, {\n key: \"_getClosestLabel\",\n value: function _getClosestLabel() {\n var el = this.telInput;\n while (el && el.tagName !== \"LABEL\") {\n el = el.parentNode;\n }\n return el;\n }\n }, {\n key: \"_initDropdownListeners\",\n value: function _initDropdownListeners() {\n var _this4 = this;\n // hack for input nested inside label (which is valid markup): clicking the selected-flag to\n // open the dropdown would then automatically trigger a 2nd click on the input which would\n // close it again\n this._handleLabelClick = function(e) {\n // if the dropdown is closed, then focus the input, else ignore the click\n if (_this4.countryList.classList.contains(\"iti__hide\")) _this4.telInput.focus(); else e.preventDefault();\n };\n var label = this._getClosestLabel();\n if (label) label.addEventListener(\"click\", this._handleLabelClick);\n // toggle country dropdown on click\n this._handleClickSelectedFlag = function() {\n // only intercept this event if we're opening the dropdown\n // else let it bubble up to the top (\"click-off-to-close\" listener)\n // we cannot just stopPropagation as it may be needed to close another instance\n if (_this4.countryList.classList.contains(\"iti__hide\") && !_this4.telInput.disabled && !_this4.telInput.readOnly) {\n _this4._showDropdown();\n }\n };\n this.selectedFlag.addEventListener(\"click\", this._handleClickSelectedFlag);\n // open dropdown list if currently focused\n this._handleFlagsContainerKeydown = function(e) {\n var isDropdownHidden = _this4.countryList.classList.contains(\"iti__hide\");\n if (isDropdownHidden && [ \"ArrowUp\", \"Up\", \"ArrowDown\", \"Down\", \" \", \"Enter\" ].indexOf(e.key) !== -1) {\n // prevent form from being submitted if \"ENTER\" was pressed\n e.preventDefault();\n // prevent event from being handled again by document\n e.stopPropagation();\n _this4._showDropdown();\n }\n // allow navigation from dropdown to input on TAB\n if (e.key === \"Tab\") _this4._closeDropdown();\n };\n this.flagsContainer.addEventListener(\"keydown\", this._handleFlagsContainerKeydown);\n }\n }, {\n key: \"_initRequests\",\n value: function _initRequests() {\n var _this5 = this;\n // if the user has specified the path to the utils script, fetch it on window.load, else resolve\n if (this.options.utilsScript && !window.intlTelInputUtils) {\n // if the plugin is being initialised after the window.load event has already been fired\n if (window.intlTelInputGlobals.documentReady()) {\n window.intlTelInputGlobals.loadUtils(this.options.utilsScript);\n } else {\n // wait until the load event so we don't block any other requests e.g. the flags image\n window.addEventListener(\"load\", function() {\n window.intlTelInputGlobals.loadUtils(_this5.options.utilsScript);\n });\n }\n } else this.resolveUtilsScriptPromise();\n if (this.options.initialCountry === \"auto\") this._loadAutoCountry(); else this.resolveAutoCountryPromise();\n }\n }, {\n key: \"_loadAutoCountry\",\n value: function _loadAutoCountry() {\n // 3 options:\n // 1) already loaded (we're done)\n // 2) not already started loading (start)\n // 3) already started loading (do nothing - just wait for loading callback to fire)\n if (window.intlTelInputGlobals.autoCountry) {\n this.handleAutoCountry();\n } else if (!window.intlTelInputGlobals.startedLoadingAutoCountry) {\n // don't do this twice!\n window.intlTelInputGlobals.startedLoadingAutoCountry = true;\n if (typeof this.options.geoIpLookup === \"function\") {\n this.options.geoIpLookup(function(countryCode) {\n window.intlTelInputGlobals.autoCountry = countryCode.toLowerCase();\n // tell all instances the auto country is ready\n // TODO: this should just be the current instances\n // UPDATE: use setTimeout in case their geoIpLookup function calls this callback straight\n // away (e.g. if they have already done the geo ip lookup somewhere else). Using\n // setTimeout means that the current thread of execution will finish before executing\n // this, which allows the plugin to finish initialising.\n setTimeout(function() {\n return forEachInstance(\"handleAutoCountry\");\n });\n }, function() {\n return forEachInstance(\"rejectAutoCountryPromise\");\n });\n }\n }\n }\n }, {\n key: \"_initKeyListeners\",\n value: function _initKeyListeners() {\n var _this6 = this;\n // update flag on keyup\n this._handleKeyupEvent = function() {\n if (_this6._updateFlagFromNumber(_this6.telInput.value)) {\n _this6._triggerCountryChange();\n }\n };\n this.telInput.addEventListener(\"keyup\", this._handleKeyupEvent);\n // update flag on cut/paste events (now supported in all major browsers)\n this._handleClipboardEvent = function() {\n // hack because \"paste\" event is fired before input is updated\n setTimeout(_this6._handleKeyupEvent);\n };\n this.telInput.addEventListener(\"cut\", this._handleClipboardEvent);\n this.telInput.addEventListener(\"paste\", this._handleClipboardEvent);\n }\n }, {\n key: \"_cap\",\n value: function _cap(number) {\n var max = this.telInput.getAttribute(\"maxlength\");\n return max && number.length > max ? number.substr(0, max) : number;\n }\n }, {\n key: \"_initBlurListeners\",\n value: function _initBlurListeners() {\n var _this7 = this;\n // on blur or form submit: if just a dial code then remove it\n this._handleSubmitOrBlurEvent = function() {\n _this7._removeEmptyDialCode();\n };\n if (this.telInput.form) this.telInput.form.addEventListener(\"submit\", this._handleSubmitOrBlurEvent);\n this.telInput.addEventListener(\"blur\", this._handleSubmitOrBlurEvent);\n }\n }, {\n key: \"_removeEmptyDialCode\",\n value: function _removeEmptyDialCode() {\n if (this.telInput.value.charAt(0) === \"+\") {\n var numeric = this._getNumeric(this.telInput.value);\n // if just a plus, or if just a dial code\n if (!numeric || this.selectedCountryData.dialCode === numeric) {\n this.telInput.value = \"\";\n }\n }\n }\n }, {\n key: \"_getNumeric\",\n value: function _getNumeric(s) {\n return s.replace(/\\D/g, \"\");\n }\n }, {\n key: \"_trigger\",\n value: function _trigger(name) {\n // have to use old school document.createEvent as IE11 doesn't support `new Event()` syntax\n var e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n // can bubble, and is cancellable\n this.telInput.dispatchEvent(e);\n }\n }, {\n key: \"_showDropdown\",\n value: function _showDropdown() {\n this.countryList.classList.remove(\"iti__hide\");\n this.selectedFlag.setAttribute(\"aria-expanded\", \"true\");\n this._setDropdownPosition();\n // update highlighting and scroll to active list item\n if (this.activeItem) {\n this._highlightListItem(this.activeItem, false);\n this._scrollTo(this.activeItem, true);\n }\n // bind all the dropdown-related listeners: mouseover, click, click-off, keydown\n this._bindDropdownListeners();\n // update the arrow\n this.dropdownArrow.classList.add(\"iti__arrow--up\");\n this._trigger(\"open:countrydropdown\");\n }\n }, {\n key: \"_toggleClass\",\n value: function _toggleClass(el, className, shouldHaveClass) {\n if (shouldHaveClass && !el.classList.contains(className)) el.classList.add(className); else if (!shouldHaveClass && el.classList.contains(className)) el.classList.remove(className);\n }\n }, {\n key: \"_setDropdownPosition\",\n value: function _setDropdownPosition() {\n var _this8 = this;\n if (this.options.dropdownContainer) {\n this.options.dropdownContainer.appendChild(this.dropdown);\n }\n if (!this.isMobile) {\n var pos = this.telInput.getBoundingClientRect();\n // windowTop from https://stackoverflow.com/a/14384091/217866\n var windowTop = window.pageYOffset || document.documentElement.scrollTop;\n var inputTop = pos.top + windowTop;\n var dropdownHeight = this.countryList.offsetHeight;\n // dropdownFitsBelow = (dropdownBottom < windowBottom)\n var dropdownFitsBelow = inputTop + this.telInput.offsetHeight + dropdownHeight < windowTop + window.innerHeight;\n var dropdownFitsAbove = inputTop - dropdownHeight > windowTop;\n // by default, the dropdown will be below the input. If we want to position it above the\n // input, we add the dropup class.\n this._toggleClass(this.countryList, \"iti__country-list--dropup\", !dropdownFitsBelow && dropdownFitsAbove);\n // if dropdownContainer is enabled, calculate postion\n if (this.options.dropdownContainer) {\n // by default the dropdown will be directly over the input because it's not in the flow.\n // If we want to position it below, we need to add some extra top value.\n var extraTop = !dropdownFitsBelow && dropdownFitsAbove ? 0 : this.telInput.offsetHeight;\n // calculate placement\n this.dropdown.style.top = \"\".concat(inputTop + extraTop, \"px\");\n this.dropdown.style.left = \"\".concat(pos.left + document.body.scrollLeft, \"px\");\n // close menu on window scroll\n this._handleWindowScroll = function() {\n return _this8._closeDropdown();\n };\n window.addEventListener(\"scroll\", this._handleWindowScroll);\n }\n }\n }\n }, {\n key: \"_getClosestListItem\",\n value: function _getClosestListItem(target) {\n var el = target;\n while (el && el !== this.countryList && !el.classList.contains(\"iti__country\")) {\n el = el.parentNode;\n }\n // if we reached the countryList element, then return null\n return el === this.countryList ? null : el;\n }\n }, {\n key: \"_bindDropdownListeners\",\n value: function _bindDropdownListeners() {\n var _this9 = this;\n // when mouse over a list item, just highlight that one\n // we add the class \"highlight\", so if they hit \"enter\" we know which one to select\n this._handleMouseoverCountryList = function(e) {\n // handle event delegation, as we're listening for this event on the countryList\n var listItem = _this9._getClosestListItem(e.target);\n if (listItem) _this9._highlightListItem(listItem, false);\n };\n this.countryList.addEventListener(\"mouseover\", this._handleMouseoverCountryList);\n // listen for country selection\n this._handleClickCountryList = function(e) {\n var listItem = _this9._getClosestListItem(e.target);\n if (listItem) _this9._selectListItem(listItem);\n };\n this.countryList.addEventListener(\"click\", this._handleClickCountryList);\n // click off to close\n // (except when this initial opening click is bubbling up)\n // we cannot just stopPropagation as it may be needed to close another instance\n var isOpening = true;\n this._handleClickOffToClose = function() {\n if (!isOpening) _this9._closeDropdown();\n isOpening = false;\n };\n document.documentElement.addEventListener(\"click\", this._handleClickOffToClose);\n // listen for up/down scrolling, enter to select, or letters to jump to country name.\n // use keydown as keypress doesn't fire for non-char keys and we want to catch if they\n // just hit down and hold it to scroll down (no keyup event).\n // listen on the document because that's where key events are triggered if no input has focus\n var query = \"\";\n var queryTimer = null;\n this._handleKeydownOnDropdown = function(e) {\n // prevent down key from scrolling the whole page,\n // and enter key from submitting a form etc\n e.preventDefault();\n // up and down to navigate\n if (e.key === \"ArrowUp\" || e.key === \"Up\" || e.key === \"ArrowDown\" || e.key === \"Down\") _this9._handleUpDownKey(e.key); else if (e.key === \"Enter\") _this9._handleEnterKey(); else if (e.key === \"Escape\") _this9._closeDropdown(); else if (/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(e.key)) {\n // jump to countries that start with the query string\n if (queryTimer) clearTimeout(queryTimer);\n query += e.key.toLowerCase();\n _this9._searchForCountry(query);\n // if the timer hits 1 second, reset the query\n queryTimer = setTimeout(function() {\n query = \"\";\n }, 1e3);\n }\n };\n document.addEventListener(\"keydown\", this._handleKeydownOnDropdown);\n }\n }, {\n key: \"_handleUpDownKey\",\n value: function _handleUpDownKey(key) {\n var next = key === \"ArrowUp\" || key === \"Up\" ? this.highlightedItem.previousElementSibling : this.highlightedItem.nextElementSibling;\n if (next) {\n // skip the divider\n if (next.classList.contains(\"iti__divider\")) {\n next = key === \"ArrowUp\" || key === \"Up\" ? next.previousElementSibling : next.nextElementSibling;\n }\n this._highlightListItem(next, true);\n }\n }\n }, {\n key: \"_handleEnterKey\",\n value: function _handleEnterKey() {\n if (this.highlightedItem) this._selectListItem(this.highlightedItem);\n }\n }, {\n key: \"_searchForCountry\",\n value: function _searchForCountry(query) {\n for (var i = 0; i < this.countries.length; i++) {\n if (this._startsWith(this.countries[i].name, query)) {\n var listItem = this.countryList.querySelector(\"#iti-\".concat(this.id, \"__item-\").concat(this.countries[i].iso2));\n // update highlighting and scroll\n this._highlightListItem(listItem, false);\n this._scrollTo(listItem, true);\n break;\n }\n }\n }\n }, {\n key: \"_startsWith\",\n value: function _startsWith(a, b) {\n return a.substr(0, b.length).toLowerCase() === b;\n }\n }, {\n key: \"_updateValFromNumber\",\n value: function _updateValFromNumber(originalNumber) {\n var number = originalNumber;\n if (this.options.formatOnDisplay && window.intlTelInputUtils && this.selectedCountryData) {\n var useNational = !this.options.separateDialCode && (this.options.nationalMode || number.charAt(0) !== \"+\");\n var _intlTelInputUtils$nu = intlTelInputUtils.numberFormat, NATIONAL = _intlTelInputUtils$nu.NATIONAL, INTERNATIONAL = _intlTelInputUtils$nu.INTERNATIONAL;\n var format = useNational ? NATIONAL : INTERNATIONAL;\n number = intlTelInputUtils.formatNumber(number, this.selectedCountryData.iso2, format);\n }\n number = this._beforeSetNumber(number);\n this.telInput.value = number;\n }\n }, {\n key: \"_updateFlagFromNumber\",\n value: function _updateFlagFromNumber(originalNumber) {\n // if we're in nationalMode and we already have US/Canada selected, make sure the number starts\n // with a +1 so _getDialCode will be able to extract the area code\n // update: if we dont yet have selectedCountryData, but we're here (trying to update the flag\n // from the number), that means we're initialising the plugin with a number that already has a\n // dial code, so fine to ignore this bit\n var number = originalNumber;\n var selectedDialCode = this.selectedCountryData.dialCode;\n var isNanp = selectedDialCode === \"1\";\n if (number && this.options.nationalMode && isNanp && number.charAt(0) !== \"+\") {\n if (number.charAt(0) !== \"1\") number = \"1\".concat(number);\n number = \"+\".concat(number);\n }\n // update flag if user types area code for another country\n if (this.options.separateDialCode && selectedDialCode && number.charAt(0) !== \"+\") {\n number = \"+\".concat(selectedDialCode).concat(number);\n }\n // try and extract valid dial code from input\n var dialCode = this._getDialCode(number, true);\n var numeric = this._getNumeric(number);\n var countryCode = null;\n if (dialCode) {\n var countryCodes = this.countryCodes[this._getNumeric(dialCode)];\n // check if the right country is already selected. this should be false if the number is\n // longer than the matched dial code because in this case we need to make sure that if\n // there are multiple country matches, that the first one is selected (note: we could\n // just check that here, but it requires the same loop that we already have later)\n var alreadySelected = countryCodes.indexOf(this.selectedCountryData.iso2) !== -1 && numeric.length <= dialCode.length - 1;\n var isRegionlessNanpNumber = selectedDialCode === \"1\" && this._isRegionlessNanp(numeric);\n // only update the flag if:\n // A) NOT (we currently have a NANP flag selected, and the number is a regionlessNanp)\n // AND\n // B) the right country is not already selected\n if (!isRegionlessNanpNumber && !alreadySelected) {\n // if using onlyCountries option, countryCodes[0] may be empty, so we must find the first\n // non-empty index\n for (var j = 0; j < countryCodes.length; j++) {\n if (countryCodes[j]) {\n countryCode = countryCodes[j];\n break;\n }\n }\n }\n } else if (number.charAt(0) === \"+\" && numeric.length) {\n // invalid dial code, so empty\n // Note: use getNumeric here because the number has not been formatted yet, so could contain\n // bad chars\n countryCode = \"\";\n } else if (!number || number === \"+\") {\n // empty, or just a plus, so default\n countryCode = this.defaultCountry;\n }\n if (countryCode !== null) {\n return this._setFlag(countryCode);\n }\n return false;\n }\n }, {\n key: \"_isRegionlessNanp\",\n value: function _isRegionlessNanp(number) {\n var numeric = this._getNumeric(number);\n if (numeric.charAt(0) === \"1\") {\n var areaCode = numeric.substr(1, 3);\n return regionlessNanpNumbers.indexOf(areaCode) !== -1;\n }\n return false;\n }\n }, {\n key: \"_highlightListItem\",\n value: function _highlightListItem(listItem, shouldFocus) {\n var prevItem = this.highlightedItem;\n if (prevItem) prevItem.classList.remove(\"iti__highlight\");\n this.highlightedItem = listItem;\n this.highlightedItem.classList.add(\"iti__highlight\");\n if (shouldFocus) this.highlightedItem.focus();\n }\n }, {\n key: \"_getCountryData\",\n value: function _getCountryData(countryCode, ignoreOnlyCountriesOption, allowFail) {\n var countryList = ignoreOnlyCountriesOption ? allCountries : this.countries;\n for (var i = 0; i < countryList.length; i++) {\n if (countryList[i].iso2 === countryCode) {\n return countryList[i];\n }\n }\n if (allowFail) {\n return null;\n }\n throw new Error(\"No country data for '\".concat(countryCode, \"'\"));\n }\n }, {\n key: \"_setFlag\",\n value: function _setFlag(countryCode) {\n var prevCountry = this.selectedCountryData.iso2 ? this.selectedCountryData : {};\n // do this first as it will throw an error and stop if countryCode is invalid\n this.selectedCountryData = countryCode ? this._getCountryData(countryCode, false, false) : {};\n // update the defaultCountry - we only need the iso2 from now on, so just store that\n if (this.selectedCountryData.iso2) {\n this.defaultCountry = this.selectedCountryData.iso2;\n }\n this.selectedFlagInner.setAttribute(\"class\", \"iti__flag iti__\".concat(countryCode));\n // update the selected country's title attribute\n var title = countryCode ? \"\".concat(this.selectedCountryData.name, \": +\").concat(this.selectedCountryData.dialCode) : \"Unknown\";\n this.selectedFlag.setAttribute(\"title\", title);\n if (this.options.separateDialCode) {\n var dialCode = this.selectedCountryData.dialCode ? \"+\".concat(this.selectedCountryData.dialCode) : \"\";\n this.selectedDialCode.innerHTML = dialCode;\n // offsetWidth is zero if input is in a hidden container during initialisation\n var selectedFlagWidth = this.selectedFlag.offsetWidth || this._getHiddenSelectedFlagWidth();\n // add 6px of padding after the grey selected-dial-code box, as this is what we use in the css\n this.telInput.style.paddingLeft = \"\".concat(selectedFlagWidth + 6, \"px\");\n }\n // and the input's placeholder\n this._updatePlaceholder();\n // update the active list item\n if (this.options.allowDropdown) {\n var prevItem = this.activeItem;\n if (prevItem) {\n prevItem.classList.remove(\"iti__active\");\n prevItem.setAttribute(\"aria-selected\", \"false\");\n }\n if (countryCode) {\n // check if there is a preferred item first, else fall back to standard\n var nextItem = this.countryList.querySelector(\"#iti-\".concat(this.id, \"__item-\").concat(countryCode, \"-preferred\")) || this.countryList.querySelector(\"#iti-\".concat(this.id, \"__item-\").concat(countryCode));\n nextItem.setAttribute(\"aria-selected\", \"true\");\n nextItem.classList.add(\"iti__active\");\n this.activeItem = nextItem;\n this.selectedFlag.setAttribute(\"aria-activedescendant\", nextItem.getAttribute(\"id\"));\n }\n }\n // return if the flag has changed or not\n return prevCountry.iso2 !== countryCode;\n }\n }, {\n key: \"_getHiddenSelectedFlagWidth\",\n value: function _getHiddenSelectedFlagWidth() {\n // to get the right styling to apply, all we need is a shallow clone of the container,\n // and then to inject a deep clone of the selectedFlag element\n var containerClone = this.telInput.parentNode.cloneNode();\n containerClone.style.visibility = \"hidden\";\n document.body.appendChild(containerClone);\n var flagsContainerClone = this.flagsContainer.cloneNode();\n containerClone.appendChild(flagsContainerClone);\n var selectedFlagClone = this.selectedFlag.cloneNode(true);\n flagsContainerClone.appendChild(selectedFlagClone);\n var width = selectedFlagClone.offsetWidth;\n containerClone.parentNode.removeChild(containerClone);\n return width;\n }\n }, {\n key: \"_updatePlaceholder\",\n value: function _updatePlaceholder() {\n var shouldSetPlaceholder = this.options.autoPlaceholder === \"aggressive\" || !this.hadInitialPlaceholder && this.options.autoPlaceholder === \"polite\";\n if (window.intlTelInputUtils && shouldSetPlaceholder) {\n var numberType = intlTelInputUtils.numberType[this.options.placeholderNumberType];\n var placeholder = this.selectedCountryData.iso2 ? intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2, this.options.nationalMode, numberType) : \"\";\n placeholder = this._beforeSetNumber(placeholder);\n if (typeof this.options.customPlaceholder === \"function\") {\n placeholder = this.options.customPlaceholder(placeholder, this.selectedCountryData);\n }\n this.telInput.setAttribute(\"placeholder\", placeholder);\n }\n }\n }, {\n key: \"_selectListItem\",\n value: function _selectListItem(listItem) {\n // update selected flag and active list item\n var flagChanged = this._setFlag(listItem.getAttribute(\"data-country-code\"));\n this._closeDropdown();\n this._updateDialCode(listItem.getAttribute(\"data-dial-code\"), true);\n // focus the input\n this.telInput.focus();\n // put cursor at end - this fix is required for FF and IE11 (with nationalMode=false i.e. auto\n // inserting dial code), who try to put the cursor at the beginning the first time\n var len = this.telInput.value.length;\n this.telInput.setSelectionRange(len, len);\n if (flagChanged) {\n this._triggerCountryChange();\n }\n }\n }, {\n key: \"_closeDropdown\",\n value: function _closeDropdown() {\n this.countryList.classList.add(\"iti__hide\");\n this.selectedFlag.setAttribute(\"aria-expanded\", \"false\");\n // update the arrow\n this.dropdownArrow.classList.remove(\"iti__arrow--up\");\n // unbind key events\n document.removeEventListener(\"keydown\", this._handleKeydownOnDropdown);\n document.documentElement.removeEventListener(\"click\", this._handleClickOffToClose);\n this.countryList.removeEventListener(\"mouseover\", this._handleMouseoverCountryList);\n this.countryList.removeEventListener(\"click\", this._handleClickCountryList);\n // remove menu from container\n if (this.options.dropdownContainer) {\n if (!this.isMobile) window.removeEventListener(\"scroll\", this._handleWindowScroll);\n if (this.dropdown.parentNode) this.dropdown.parentNode.removeChild(this.dropdown);\n }\n this._trigger(\"close:countrydropdown\");\n }\n }, {\n key: \"_scrollTo\",\n value: function _scrollTo(element, middle) {\n var container = this.countryList;\n // windowTop from https://stackoverflow.com/a/14384091/217866\n var windowTop = window.pageYOffset || document.documentElement.scrollTop;\n var containerHeight = container.offsetHeight;\n var containerTop = container.getBoundingClientRect().top + windowTop;\n var containerBottom = containerTop + containerHeight;\n var elementHeight = element.offsetHeight;\n var elementTop = element.getBoundingClientRect().top + windowTop;\n var elementBottom = elementTop + elementHeight;\n var newScrollTop = elementTop - containerTop + container.scrollTop;\n var middleOffset = containerHeight / 2 - elementHeight / 2;\n if (elementTop < containerTop) {\n // scroll up\n if (middle) newScrollTop -= middleOffset;\n container.scrollTop = newScrollTop;\n } else if (elementBottom > containerBottom) {\n // scroll down\n if (middle) newScrollTop += middleOffset;\n var heightDifference = containerHeight - elementHeight;\n container.scrollTop = newScrollTop - heightDifference;\n }\n }\n }, {\n key: \"_updateDialCode\",\n value: function _updateDialCode(newDialCodeBare, hasSelectedListItem) {\n var inputVal = this.telInput.value;\n // save having to pass this every time\n var newDialCode = \"+\".concat(newDialCodeBare);\n var newNumber;\n if (inputVal.charAt(0) === \"+\") {\n // there's a plus so we're dealing with a replacement (doesn't matter if nationalMode or not)\n var prevDialCode = this._getDialCode(inputVal);\n if (prevDialCode) {\n // current number contains a valid dial code, so replace it\n newNumber = inputVal.replace(prevDialCode, newDialCode);\n } else {\n // current number contains an invalid dial code, so ditch it\n // (no way to determine where the invalid dial code ends and the rest of the number begins)\n newNumber = newDialCode;\n }\n } else if (this.options.nationalMode || this.options.separateDialCode) {\n // don't do anything\n return;\n } else {\n // nationalMode is disabled\n if (inputVal) {\n // there is an existing value with no dial code: prefix the new dial code\n newNumber = newDialCode + inputVal;\n } else if (hasSelectedListItem || !this.options.autoHideDialCode) {\n // no existing value and either they've just selected a list item, or autoHideDialCode is\n // disabled: insert new dial code\n newNumber = newDialCode;\n } else {\n return;\n }\n }\n this.telInput.value = newNumber;\n }\n }, {\n key: \"_getDialCode\",\n value: function _getDialCode(number, includeAreaCode) {\n var dialCode = \"\";\n // only interested in international numbers (starting with a plus)\n if (number.charAt(0) === \"+\") {\n var numericChars = \"\";\n // iterate over chars\n for (var i = 0; i < number.length; i++) {\n var c = number.charAt(i);\n // if char is number (https://stackoverflow.com/a/8935649/217866)\n if (!isNaN(parseInt(c, 10))) {\n numericChars += c;\n // if current numericChars make a valid dial code\n if (includeAreaCode) {\n if (this.countryCodes[numericChars]) {\n // store the actual raw string (useful for matching later)\n dialCode = number.substr(0, i + 1);\n }\n } else {\n if (this.dialCodes[numericChars]) {\n dialCode = number.substr(0, i + 1);\n // if we're just looking for a dial code, we can break as soon as we find one\n break;\n }\n }\n // stop searching as soon as we can - in this case when we hit max len\n if (numericChars.length === this.countryCodeMaxLen) {\n break;\n }\n }\n }\n }\n return dialCode;\n }\n }, {\n key: \"_getFullNumber\",\n value: function _getFullNumber() {\n var val = this.telInput.value.trim();\n var dialCode = this.selectedCountryData.dialCode;\n var prefix;\n var numericVal = this._getNumeric(val);\n if (this.options.separateDialCode && val.charAt(0) !== \"+\" && dialCode && numericVal) {\n // when using separateDialCode, it is visible so is effectively part of the typed number\n prefix = \"+\".concat(dialCode);\n } else {\n prefix = \"\";\n }\n return prefix + val;\n }\n }, {\n key: \"_beforeSetNumber\",\n value: function _beforeSetNumber(originalNumber) {\n var number = originalNumber;\n if (this.options.separateDialCode) {\n var dialCode = this._getDialCode(number);\n // if there is a valid dial code\n if (dialCode) {\n // in case _getDialCode returned an area code as well\n dialCode = \"+\".concat(this.selectedCountryData.dialCode);\n // a lot of numbers will have a space separating the dial code and the main number, and\n // some NANP numbers will have a hyphen e.g. +1 684-733-1234 - in both cases we want to get\n // rid of it\n // NOTE: don't just trim all non-numerics as may want to preserve an open parenthesis etc\n var start = number[dialCode.length] === \" \" || number[dialCode.length] === \"-\" ? dialCode.length + 1 : dialCode.length;\n number = number.substr(start);\n }\n }\n return this._cap(number);\n }\n }, {\n key: \"_triggerCountryChange\",\n value: function _triggerCountryChange() {\n this._trigger(\"countrychange\");\n }\n }, {\n key: \"handleAutoCountry\",\n value: function handleAutoCountry() {\n if (this.options.initialCountry === \"auto\") {\n // we must set this even if there is an initial val in the input: in case the initial val is\n // invalid and they delete it - they should see their auto country\n this.defaultCountry = window.intlTelInputGlobals.autoCountry;\n // if there's no initial value in the input, then update the flag\n if (!this.telInput.value) {\n this.setCountry(this.defaultCountry);\n }\n this.resolveAutoCountryPromise();\n }\n }\n }, {\n key: \"handleUtils\",\n value: function handleUtils() {\n // if the request was successful\n if (window.intlTelInputUtils) {\n // if there's an initial value in the input, then format it\n if (this.telInput.value) {\n this._updateValFromNumber(this.telInput.value);\n }\n this._updatePlaceholder();\n }\n this.resolveUtilsScriptPromise();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var form = this.telInput.form;\n if (this.options.allowDropdown) {\n // make sure the dropdown is closed (and unbind listeners)\n this._closeDropdown();\n this.selectedFlag.removeEventListener(\"click\", this._handleClickSelectedFlag);\n this.flagsContainer.removeEventListener(\"keydown\", this._handleFlagsContainerKeydown);\n // label click hack\n var label = this._getClosestLabel();\n if (label) label.removeEventListener(\"click\", this._handleLabelClick);\n }\n // unbind hiddenInput listeners\n if (this.hiddenInput && form) form.removeEventListener(\"submit\", this._handleHiddenInputSubmit);\n // unbind autoHideDialCode listeners\n if (this.options.autoHideDialCode) {\n if (form) form.removeEventListener(\"submit\", this._handleSubmitOrBlurEvent);\n this.telInput.removeEventListener(\"blur\", this._handleSubmitOrBlurEvent);\n }\n // unbind key events, and cut/paste events\n this.telInput.removeEventListener(\"keyup\", this._handleKeyupEvent);\n this.telInput.removeEventListener(\"cut\", this._handleClipboardEvent);\n this.telInput.removeEventListener(\"paste\", this._handleClipboardEvent);\n // remove attribute of id instance: data-intl-tel-input-id\n this.telInput.removeAttribute(\"data-intl-tel-input-id\");\n // remove markup (but leave the original input)\n var wrapper = this.telInput.parentNode;\n wrapper.parentNode.insertBefore(this.telInput, wrapper);\n wrapper.parentNode.removeChild(wrapper);\n delete window.intlTelInputGlobals.instances[this.id];\n }\n }, {\n key: \"getExtension\",\n value: function getExtension() {\n if (window.intlTelInputUtils) {\n return intlTelInputUtils.getExtension(this._getFullNumber(), this.selectedCountryData.iso2);\n }\n return \"\";\n }\n }, {\n key: \"getNumber\",\n value: function getNumber(format) {\n if (window.intlTelInputUtils) {\n var iso2 = this.selectedCountryData.iso2;\n return intlTelInputUtils.formatNumber(this._getFullNumber(), iso2, format);\n }\n return \"\";\n }\n }, {\n key: \"getNumberType\",\n value: function getNumberType() {\n if (window.intlTelInputUtils) {\n return intlTelInputUtils.getNumberType(this._getFullNumber(), this.selectedCountryData.iso2);\n }\n return -99;\n }\n }, {\n key: \"getSelectedCountryData\",\n value: function getSelectedCountryData() {\n return this.selectedCountryData;\n }\n }, {\n key: \"getValidationError\",\n value: function getValidationError() {\n if (window.intlTelInputUtils) {\n var iso2 = this.selectedCountryData.iso2;\n return intlTelInputUtils.getValidationError(this._getFullNumber(), iso2);\n }\n return -99;\n }\n }, {\n key: \"isValidNumber\",\n value: function isValidNumber() {\n var val = this._getFullNumber().trim();\n var countryCode = this.options.nationalMode ? this.selectedCountryData.iso2 : \"\";\n return window.intlTelInputUtils ? intlTelInputUtils.isValidNumber(val, countryCode) : null;\n }\n }, {\n key: \"setCountry\",\n value: function setCountry(originalCountryCode) {\n var countryCode = originalCountryCode.toLowerCase();\n // check if already selected\n if (!this.selectedFlagInner.classList.contains(\"iti__\".concat(countryCode))) {\n this._setFlag(countryCode);\n this._updateDialCode(this.selectedCountryData.dialCode, false);\n this._triggerCountryChange();\n }\n }\n }, {\n key: \"setNumber\",\n value: function setNumber(number) {\n // we must update the flag first, which updates this.selectedCountryData, which is used for\n // formatting the number before displaying it\n var flagChanged = this._updateFlagFromNumber(number);\n this._updateValFromNumber(number);\n if (flagChanged) {\n this._triggerCountryChange();\n }\n }\n }, {\n key: \"setPlaceholderNumberType\",\n value: function setPlaceholderNumberType(type) {\n this.options.placeholderNumberType = type;\n this._updatePlaceholder();\n }\n } ]);\n return Iti;\n }();\n /********************\n * STATIC METHODS\n ********************/\n // get the country data object\n intlTelInputGlobals.getCountryData = function() {\n return allCountries;\n };\n // inject a