r3ui-lib 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,51 @@
1
+ (function(Fe,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(Fe=typeof globalThis<"u"?globalThis:Fe||self,d(Fe.UiLibrary={},Fe.Vue))})(this,(function(Fe,d){"use strict";const Qn={__name:"Spinner",props:{isSmall:{type:Boolean,default:!1}},setup(s){return(e,t)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["spinner-border",{"spinner-border-sm":s.isSmall}]),role:"status"},null,2))}},Ys={__name:"Icon",props:{name:{type:String,required:!0}},setup(s){return(e,t)=>(d.openBlock(),d.createElementBlock("i",{class:d.normalizeClass(`bi bi-${s.name}`)},null,2))}},Ba={class:"d-inline-flex align-items-center justify-content-center"},Na={key:2},Ia={__name:"DefaultButton",props:{label:{type:String,default:""},icon:{type:String,default:""},iconPosition:{type:String,default:"left",validator(s){return["right","left"].includes(s)}},isLoading:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},isFullWidth:{type:Boolean,default:!1},customClasses:{type:Array,default:()=>[]},styles:{type:String,default:"primary",validator(s){return["primary","light","secondary","success","danger","warning","info"].includes(s)}}},emits:["submit"],setup(s,{emit:e}){const t=s,i=e,n=d.computed(()=>`btn-${t.styles}`);function r(){t.isLoading||t.isDisabled||i("submit")}return(a,o)=>(d.openBlock(),d.createElementBlock("button",{"data-test":"DefaultButton",class:d.normalizeClass(["btn",[s.isLoading||s.isDisabled?"disabled":"",s.isFullWidth?"w-100":"",s.styles?n.value:"",...s.customClasses]]),onClick:d.withModifiers(r,["prevent"])},[d.createElementVNode("div",Ba,[s.icon&&s.iconPosition==="left"?(d.openBlock(),d.createBlock(Ys,{key:0,name:s.icon,class:"me-2"},null,8,["name"])):d.createCommentVNode("",!0),s.isLoading?(d.openBlock(),d.createBlock(Qn,{key:1,isSmall:!0})):d.createCommentVNode("",!0),s.label?(d.openBlock(),d.createElementBlock("span",Na,d.toDisplayString(s.label),1)):d.createCommentVNode("",!0),s.icon&&s.iconPosition==="right"?(d.openBlock(),d.createBlock(Ys,{key:3,name:s.icon,class:"ms-2"},null,8,["name"])):d.createCommentVNode("",!0)])],2))}},Va=d.defineComponent({__name:"AddButton",props:{label:{default:""},text:{default:""},disabled:{type:Boolean,default:!1},iconClass:{default:"bi bi-plus-circle-fill pe-2"}},emits:["click"],setup(s,{emit:e}){const t=s,i=e,n=()=>{t.disabled||i("click")};return(r,a)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["d-flex add-button",{"opacity-75 disabled":r.disabled}]),style:{cursor:"pointer"},"data-test":"AddButton",onClick:n},[d.createElementVNode("i",{class:d.normalizeClass(r.iconClass)},null,2),d.createTextVNode(" "+d.toDisplayString(r.label||r.text||"Добавить"),1)],2))}}),it=(s,e)=>{const t=s.__vccOpts||s;for(const[i,n]of e)t[i]=n;return t},ja=it(Va,[["__scopeId","data-v-cf07042b"]]),Wa=it(d.defineComponent({__name:"PrintButton",props:{label:{default:""},text:{default:""},disabled:{type:Boolean,default:!1}},emits:["print"],setup(s,{emit:e}){const t=s,i=e,n=()=>{t.disabled||(window.print(),i("print"))};return(r,a)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["col-auto print-button",{"opacity-75 disabled":r.disabled}]),style:{cursor:"pointer"},"data-test":"PrintButton",onClick:n},[d.createTextVNode(d.toDisplayString(r.label||r.text||"Печать")+" ",1),a[0]||(a[0]=d.createElementVNode("i",{class:"ps-2 bi bi-printer-fill"},null,-1))],2))}}),[["__scopeId","data-v-52020521"]]),Ya=it(d.defineComponent({__name:"ExportButton",props:{label:{default:""},text:{default:""},disabled:{type:Boolean,default:!1},exportType:{default:"default"}},emits:["export"],setup(s,{emit:e}){const t=s,i=e,n=()=>{t.disabled||i("export",t.exportType)};return(r,a)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["col-auto export-button",{"opacity-75 disabled":r.disabled}]),style:{cursor:"pointer"},"data-test":"ExportButton",onClick:n},[d.createTextVNode(d.toDisplayString(r.label||r.text||"Экспорт")+" ",1),a[0]||(a[0]=d.createElementVNode("i",{class:"ps-2 bi bi-file-earmark-arrow-down-fill"},null,-1))],2))}}),[["__scopeId","data-v-20f08c06"]]);function Ga(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var rs={exports:{}};/*!
2
+ * dist/inputmask
3
+ * https://github.com/RobinHerbots/Inputmask
4
+ * Copyright (c) 2010 - 2024 Robin Herbots
5
+ * Licensed under the MIT license
6
+ * Version: 5.0.9
7
+ */var $a=rs.exports,er;function Ua(){return er||(er=1,(function(s,e){(function(t,i){s.exports=i()})(typeof self<"u"?self:$a,(function(){return(function(){var t={3976:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,o.default={_maxTestPos:500,placeholder:"_",optionalmarker:["[","]"],quantifiermarker:["{","}"],groupmarker:["(",")"],alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:function(){},onincomplete:function(){},oncleared:function(){},repeat:0,greedy:!1,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,insertModeVisual:!0,clearIncomplete:!1,alias:null,onKeyDown:function(){},onBeforeMask:null,onBeforePaste:function(l,u){return typeof u.onBeforeMask=="function"?u.onBeforeMask.call(this,l,u):l},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:function(){},skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",_radixDance:!1,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","url","password","search"],isComplete:null,preValidation:null,postValidation:null,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"text",importDataAttributes:!0,shiftPositions:!0,usePrototypeDefinitions:!0,validationEventTimeOut:3e3,substitutes:{}}},7392:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,o.default={9:{validator:"[0-90-9]",definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",definitionSymbol:"*"},"*":{validator:"[0-90-9A-Za-zА-яЁёÀ-ÿµ]"}}},253:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(l,u,h){if(h===void 0)return l.__data?l.__data[u]:null;l.__data=l.__data||{},l.__data[u]=h}},3776:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.Event=void 0,o.off=function(k,_){var p,w;return R(this[0])&&k&&(p=this[0].eventRegistry,w=this[0],k.split(" ").forEach((function(c){var y=v(c.split("."),2);(function(g,b){var f,E,S=[];if(g.length>0)if(_===void 0)for(f=0,E=p[g][b].length;f<E;f++)S.push({ev:g,namespace:b&&b.length>0?b:"global",handler:p[g][b][f]});else S.push({ev:g,namespace:b&&b.length>0?b:"global",handler:_});else if(b.length>0){for(var D in p)for(var A in p[D])if(A===b)if(_===void 0)for(f=0,E=p[D][A].length;f<E;f++)S.push({ev:D,namespace:A,handler:p[D][A][f]});else S.push({ev:D,namespace:A,handler:_})}return S})(y[0],y[1]).forEach((function(g){var b=g.ev,f=g.handler;(function(E,S,D){if(E in p==1)if(w.removeEventListener?w.removeEventListener(E,D,!1):w.detachEvent&&w.detachEvent("on".concat(E),D),S==="global")for(var A in p[E])p[E][A].splice(p[E][A].indexOf(D),1);else p[E][S].splice(p[E][S].indexOf(D),1)})(b,g.namespace,f)}))}))),this},o.on=function(k,_){if(R(this[0])){var p=this[0].eventRegistry,w=this[0];k.split(" ").forEach((function(c){var y=v(c.split("."),2),g=y[0],b=y[1];(function(f,E){w.addEventListener?w.addEventListener(f,_,!1):w.attachEvent&&w.attachEvent("on".concat(f),_),p[f]=p[f]||{},p[f][E]=p[f][E]||[],p[f][E].push(_)})(g,b===void 0?"global":b)}))}return this},o.trigger=function(k){var _=arguments;if(R(this[0]))for(var p=this[0].eventRegistry,w=this[0],c=typeof k=="string"?k.split(" "):[k.type],y=0;y<c.length;y++){var g=c[y].split("."),b=g[0],f=g[1]||"global";if(x!==void 0&&f==="global"){var E,S={bubbles:!0,cancelable:!0,composed:!0,detail:arguments[1]};if(x.createEvent){try{b==="input"?(S.inputType="insertText",E=new InputEvent(b,S)):E=new CustomEvent(b,S)}catch{(E=x.createEvent("CustomEvent")).initCustomEvent(b,S.bubbles,S.cancelable,S.detail)}k.type&&(0,h.default)(E,k),w.dispatchEvent(E)}else(E=x.createEventObject()).eventType=b,E.detail=arguments[1],k.type&&(0,h.default)(E,k),w.fireEvent("on"+E.eventType,E)}else if(p[b]!==void 0){arguments[0]=arguments[0].type?arguments[0]:m.default.Event(arguments[0]),arguments[0].detail=arguments.slice(1);var D=p[b];(f==="global"?Object.values(D).flat():D[f]).forEach((function(A){return A.apply(w,_)}))}}return this};var u=F(l(9380)),h=F(l(600)),m=F(l(4963));function v(k,_){return(function(p){if(Array.isArray(p))return p})(k)||(function(p,w){var c=p==null?null:typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(c!=null){var y,g,b,f,E=[],S=!0,D=!1;try{if(b=(c=c.call(p)).next,w!==0)for(;!(S=(y=b.call(c)).done)&&(E.push(y.value),E.length!==w);S=!0);}catch(A){D=!0,g=A}finally{try{if(!S&&c.return!=null&&(f=c.return(),Object(f)!==f))return}finally{if(D)throw g}}return E}})(k,_)||(function(p,w){if(p){if(typeof p=="string")return C(p,w);var c=Object.prototype.toString.call(p).slice(8,-1);if(c==="Object"&&p.constructor&&(c=p.constructor.name),c==="Map"||c==="Set")return Array.from(p);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return C(p,w)}})(k,_)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
8
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function C(k,_){(_==null||_>k.length)&&(_=k.length);for(var p=0,w=new Array(_);p<_;p++)w[p]=k[p];return w}function F(k){return k&&k.__esModule?k:{default:k}}var x=u.default.document;function R(k){return k instanceof Element}var M=o.Event=void 0;typeof u.default.CustomEvent=="function"?o.Event=M=u.default.CustomEvent:u.default.Event&&x&&x.createEvent?(o.Event=M=function(k,_){_=_||{bubbles:!1,cancelable:!1,composed:!0,detail:void 0};var p=x.createEvent("CustomEvent");return p.initCustomEvent(k,_.bubbles,_.cancelable,_.detail),p},M.prototype=u.default.Event.prototype):typeof Event<"u"&&(o.Event=M=Event)},600:function(a,o){function l(u){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},l(u)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=function u(){var h,m,v,C,F,x,R=arguments[0]||{},M=1,k=arguments.length,_=!1;for(typeof R=="boolean"&&(_=R,R=arguments[M]||{},M++),l(R)!=="object"&&typeof R!="function"&&(R={});M<k;M++)if((h=arguments[M])!=null)for(m in h)v=R[m],R!==(C=h[m])&&(_&&C&&(Object.prototype.toString.call(C)==="[object Object]"||(F=Array.isArray(C)))?(F?(F=!1,x=v&&Array.isArray(v)?v:[]):x=v&&Object.prototype.toString.call(v)==="[object Object]"?v:{},R[m]=u(_,x,C)):C!==void 0&&(R[m]=C));return R}},4963:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var u=C(l(9380)),h=C(l(253)),m=l(3776),v=C(l(600));function C(R){return R&&R.__esModule?R:{default:R}}var F=u.default.document;function x(R){return R instanceof x?R:this instanceof x?void(R!=null&&R!==u.default&&(this[0]=R.nodeName?R:R[0]!==void 0&&R[0].nodeName?R[0]:F.querySelector(R),this[0]!==void 0&&this[0]!==null&&(this[0].eventRegistry=this[0].eventRegistry||{}))):new x(R)}x.prototype={on:m.on,off:m.off,trigger:m.trigger},x.extend=v.default,x.data=h.default,x.Event=m.Event,o.default=x},9845:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.mobile=o.iphone=o.ie=void 0;var u,h=(u=l(9380))&&u.__esModule?u:{default:u},m=h.default.navigator&&h.default.navigator.userAgent||"";o.ie=m.indexOf("MSIE ")>0||m.indexOf("Trident/")>0,o.mobile=h.default.navigator&&h.default.navigator.userAgentData&&h.default.navigator.userAgentData.mobile||h.default.navigator&&h.default.navigator.maxTouchPoints||"ontouchstart"in h.default,o.iphone=/iphone/i.test(m)},7184:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(u){return u.replace(l,"\\$1")};var l=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim")},6030:function(a,o,l){function u(b){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},u(b)}Object.defineProperty(o,"__esModule",{value:!0}),o.EventHandlers=void 0;var h,m=l(9845),v=(h=l(9380))&&h.__esModule?h:{default:h},C=l(7760),F=l(2839),x=l(8711),R=l(7215),M=l(4713);function k(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */k=function(){return f};var b,f={},E=Object.prototype,S=E.hasOwnProperty,D=Object.defineProperty||function(se,G,Z){se[G]=Z.value},A=typeof Symbol=="function"?Symbol:{},N=A.iterator||"@@iterator",V=A.asyncIterator||"@@asyncIterator",B=A.toStringTag||"@@toStringTag";function j(se,G,Z){return Object.defineProperty(se,G,{value:Z,enumerable:!0,configurable:!0,writable:!0}),se[G]}try{j({},"")}catch{j=function(G,Z,re){return G[Z]=re}}function $(se,G,Z,re){var te=G&&G.prototype instanceof Q?G:Q,pe=Object.create(te.prototype),Me=new Le(re||[]);return D(pe,"_invoke",{value:me(se,Z,Me)}),pe}function T(se,G,Z){try{return{type:"normal",arg:se.call(G,Z)}}catch(re){return{type:"throw",arg:re}}}f.wrap=$;var P="suspendedStart",W="suspendedYield",z="executing",U="completed",K={};function Q(){}function ie(){}function Y(){}var H={};j(H,N,(function(){return this}));var ee=Object.getPrototypeOf,X=ee&&ee(ee(Ne([])));X&&X!==E&&S.call(X,N)&&(H=X);var q=Y.prototype=Q.prototype=Object.create(H);function oe(se){["next","throw","return"].forEach((function(G){j(se,G,(function(Z){return this._invoke(G,Z)}))}))}function ne(se,G){function Z(te,pe,Me,ve){var we=T(se[te],se,pe);if(we.type!=="throw"){var Pe=we.arg,ct=Pe.value;return ct&&u(ct)=="object"&&S.call(ct,"__await")?G.resolve(ct.__await).then((function(ze){Z("next",ze,Me,ve)}),(function(ze){Z("throw",ze,Me,ve)})):G.resolve(ct).then((function(ze){Pe.value=ze,Me(Pe)}),(function(ze){return Z("throw",ze,Me,ve)}))}ve(we.arg)}var re;D(this,"_invoke",{value:function(te,pe){function Me(){return new G((function(ve,we){Z(te,pe,ve,we)}))}return re=re?re.then(Me,Me):Me()}})}function me(se,G,Z){var re=P;return function(te,pe){if(re===z)throw new Error("Generator is already running");if(re===U){if(te==="throw")throw pe;return{value:b,done:!0}}for(Z.method=te,Z.arg=pe;;){var Me=Z.delegate;if(Me){var ve=be(Me,Z);if(ve){if(ve===K)continue;return ve}}if(Z.method==="next")Z.sent=Z._sent=Z.arg;else if(Z.method==="throw"){if(re===P)throw re=U,Z.arg;Z.dispatchException(Z.arg)}else Z.method==="return"&&Z.abrupt("return",Z.arg);re=z;var we=T(se,G,Z);if(we.type==="normal"){if(re=Z.done?U:W,we.arg===K)continue;return{value:we.arg,done:Z.done}}we.type==="throw"&&(re=U,Z.method="throw",Z.arg=we.arg)}}}function be(se,G){var Z=G.method,re=se.iterator[Z];if(re===b)return G.delegate=null,Z==="throw"&&se.iterator.return&&(G.method="return",G.arg=b,be(se,G),G.method==="throw")||Z!=="return"&&(G.method="throw",G.arg=new TypeError("The iterator does not provide a '"+Z+"' method")),K;var te=T(re,se.iterator,G.arg);if(te.type==="throw")return G.method="throw",G.arg=te.arg,G.delegate=null,K;var pe=te.arg;return pe?pe.done?(G[se.resultName]=pe.value,G.next=se.nextLoc,G.method!=="return"&&(G.method="next",G.arg=b),G.delegate=null,K):pe:(G.method="throw",G.arg=new TypeError("iterator result is not an object"),G.delegate=null,K)}function xe(se){var G={tryLoc:se[0]};1 in se&&(G.catchLoc=se[1]),2 in se&&(G.finallyLoc=se[2],G.afterLoc=se[3]),this.tryEntries.push(G)}function je(se){var G=se.completion||{};G.type="normal",delete G.arg,se.completion=G}function Le(se){this.tryEntries=[{tryLoc:"root"}],se.forEach(xe,this),this.reset(!0)}function Ne(se){if(se||se===""){var G=se[N];if(G)return G.call(se);if(typeof se.next=="function")return se;if(!isNaN(se.length)){var Z=-1,re=function te(){for(;++Z<se.length;)if(S.call(se,Z))return te.value=se[Z],te.done=!1,te;return te.value=b,te.done=!0,te};return re.next=re}}throw new TypeError(u(se)+" is not iterable")}return ie.prototype=Y,D(q,"constructor",{value:Y,configurable:!0}),D(Y,"constructor",{value:ie,configurable:!0}),ie.displayName=j(Y,B,"GeneratorFunction"),f.isGeneratorFunction=function(se){var G=typeof se=="function"&&se.constructor;return!!G&&(G===ie||(G.displayName||G.name)==="GeneratorFunction")},f.mark=function(se){return Object.setPrototypeOf?Object.setPrototypeOf(se,Y):(se.__proto__=Y,j(se,B,"GeneratorFunction")),se.prototype=Object.create(q),se},f.awrap=function(se){return{__await:se}},oe(ne.prototype),j(ne.prototype,V,(function(){return this})),f.AsyncIterator=ne,f.async=function(se,G,Z,re,te){te===void 0&&(te=Promise);var pe=new ne($(se,G,Z,re),te);return f.isGeneratorFunction(G)?pe:pe.next().then((function(Me){return Me.done?Me.value:pe.next()}))},oe(q),j(q,B,"Generator"),j(q,N,(function(){return this})),j(q,"toString",(function(){return"[object Generator]"})),f.keys=function(se){var G=Object(se),Z=[];for(var re in G)Z.push(re);return Z.reverse(),function te(){for(;Z.length;){var pe=Z.pop();if(pe in G)return te.value=pe,te.done=!1,te}return te.done=!0,te}},f.values=Ne,Le.prototype={constructor:Le,reset:function(se){if(this.prev=0,this.next=0,this.sent=this._sent=b,this.done=!1,this.delegate=null,this.method="next",this.arg=b,this.tryEntries.forEach(je),!se)for(var G in this)G.charAt(0)==="t"&&S.call(this,G)&&!isNaN(+G.slice(1))&&(this[G]=b)},stop:function(){this.done=!0;var se=this.tryEntries[0].completion;if(se.type==="throw")throw se.arg;return this.rval},dispatchException:function(se){if(this.done)throw se;var G=this;function Z(we,Pe){return pe.type="throw",pe.arg=se,G.next=we,Pe&&(G.method="next",G.arg=b),!!Pe}for(var re=this.tryEntries.length-1;re>=0;--re){var te=this.tryEntries[re],pe=te.completion;if(te.tryLoc==="root")return Z("end");if(te.tryLoc<=this.prev){var Me=S.call(te,"catchLoc"),ve=S.call(te,"finallyLoc");if(Me&&ve){if(this.prev<te.catchLoc)return Z(te.catchLoc,!0);if(this.prev<te.finallyLoc)return Z(te.finallyLoc)}else if(Me){if(this.prev<te.catchLoc)return Z(te.catchLoc,!0)}else{if(!ve)throw new Error("try statement without catch or finally");if(this.prev<te.finallyLoc)return Z(te.finallyLoc)}}}},abrupt:function(se,G){for(var Z=this.tryEntries.length-1;Z>=0;--Z){var re=this.tryEntries[Z];if(re.tryLoc<=this.prev&&S.call(re,"finallyLoc")&&this.prev<re.finallyLoc){var te=re;break}}te&&(se==="break"||se==="continue")&&te.tryLoc<=G&&G<=te.finallyLoc&&(te=null);var pe=te?te.completion:{};return pe.type=se,pe.arg=G,te?(this.method="next",this.next=te.finallyLoc,K):this.complete(pe)},complete:function(se,G){if(se.type==="throw")throw se.arg;return se.type==="break"||se.type==="continue"?this.next=se.arg:se.type==="return"?(this.rval=this.arg=se.arg,this.method="return",this.next="end"):se.type==="normal"&&G&&(this.next=G),K},finish:function(se){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.finallyLoc===se)return this.complete(Z.completion,Z.afterLoc),je(Z),K}},catch:function(se){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.tryLoc===se){var re=Z.completion;if(re.type==="throw"){var te=re.arg;je(Z)}return te}}throw new Error("illegal catch attempt")},delegateYield:function(se,G,Z){return this.delegate={iterator:Ne(se),resultName:G,nextLoc:Z},this.method==="next"&&(this.arg=b),K}},f}function _(b,f){var E=typeof Symbol<"u"&&b[Symbol.iterator]||b["@@iterator"];if(!E){if(Array.isArray(b)||(E=(function(B,j){if(B){if(typeof B=="string")return p(B,j);var $=Object.prototype.toString.call(B).slice(8,-1);if($==="Object"&&B.constructor&&($=B.constructor.name),$==="Map"||$==="Set")return Array.from(B);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return p(B,j)}})(b))||f){E&&(b=E);var S=0,D=function(){};return{s:D,n:function(){return S>=b.length?{done:!0}:{done:!1,value:b[S++]}},e:function(B){throw B},f:D}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
9
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var A,N=!0,V=!1;return{s:function(){E=E.call(b)},n:function(){var B=E.next();return N=B.done,B},e:function(B){V=!0,A=B},f:function(){try{N||E.return==null||E.return()}finally{if(V)throw A}}}}function p(b,f){(f==null||f>b.length)&&(f=b.length);for(var E=0,S=new Array(f);E<f;E++)S[E]=b[E];return S}function w(b,f,E,S,D,A,N){try{var V=b[A](N),B=V.value}catch(j){return void E(j)}V.done?f(B):Promise.resolve(B).then(S,D)}var c,y,g=o.EventHandlers={keyEvent:function(b,f,E,S,D){var A=this.inputmask,N=A.opts,V=A.dependencyLib,B=A.maskset,j=this,$=V(j),T=b.key,P=x.caret.call(A,j),W=N.onKeyDown.call(this,b,x.getBuffer.call(A),P,N);if(W!==void 0)return W;if(T===F.keys.Backspace||T===F.keys.Delete||m.iphone&&T===F.keys.BACKSPACE_SAFARI||b.ctrlKey&&T===F.keys.x&&!("oncut"in j))b.preventDefault(),R.handleRemove.call(A,j,T,P),(0,C.writeBuffer)(j,x.getBuffer.call(A,!0),B.p,b,j.inputmask._valueGet()!==x.getBuffer.call(A).join(""));else if(T===F.keys.End||T===F.keys.PageDown){b.preventDefault();var z=x.seekNext.call(A,x.getLastValidPosition.call(A));x.caret.call(A,j,b.shiftKey?P.begin:z,z,!0)}else T===F.keys.Home&&!b.shiftKey||T===F.keys.PageUp?(b.preventDefault(),x.caret.call(A,j,0,b.shiftKey?P.begin:0,!0)):N.undoOnEscape&&T===F.keys.Escape&&b.altKey!==!0?((0,C.checkVal)(j,!0,!1,A.undoValue.split("")),$.trigger("click")):T!==F.keys.Insert||b.shiftKey||b.ctrlKey||A.userOptions.insertMode!==void 0?N.tabThrough===!0&&T===F.keys.Tab?b.shiftKey===!0?(P.end=x.seekPrevious.call(A,P.end,!0),M.getTest.call(A,P.end-1).match.static===!0&&P.end--,P.begin=x.seekPrevious.call(A,P.end,!0),P.begin>=0&&P.end>0&&(b.preventDefault(),x.caret.call(A,j,P.begin,P.end))):(P.begin=x.seekNext.call(A,P.begin,!0),P.end=x.seekNext.call(A,P.begin,!0),P.end<B.maskLength&&P.end--,P.begin<=B.maskLength&&(b.preventDefault(),x.caret.call(A,j,P.begin,P.end))):b.shiftKey||(N.insertModeVisual&&N.insertMode===!1?T===F.keys.ArrowRight?setTimeout((function(){var U=x.caret.call(A,j);x.caret.call(A,j,U.begin)}),0):T===F.keys.ArrowLeft&&setTimeout((function(){var U=x.translatePosition.call(A,j.inputmask.caretPos.begin);x.translatePosition.call(A,j.inputmask.caretPos.end),A.isRTL?x.caret.call(A,j,U+(U===B.maskLength?0:1)):x.caret.call(A,j,U-(U===0?0:1))}),0):A.keyEventHook===void 0||A.keyEventHook(b)):R.isSelection.call(A,P)?N.insertMode=!N.insertMode:(N.insertMode=!N.insertMode,x.caret.call(A,j,P.begin,P.begin));return A.isComposing=T==F.keys.Process||T==F.keys.Unidentified,A.ignorable=T.length>1&&!(j.tagName.toLowerCase()==="textarea"&&T==F.keys.Enter),g.keypressEvent.call(this,b,f,E,S,D)},keypressEvent:function(b,f,E,S,D){var A=this.inputmask||this,N=A.opts,V=A.dependencyLib,B=A.maskset,j=A.el,$=V(j),T=b.key;if(f===!0||b.ctrlKey&&b.altKey&&!A.ignorable||!(b.ctrlKey||b.metaKey||A.ignorable)){if(T){var P,W=f?{begin:D,end:D}:x.caret.call(A,j);f||(T=N.substitutes[T]||T),B.writeOutBuffer=!0;var z=R.isValid.call(A,W,T,S,void 0,void 0,void 0,f);if(z!==!1&&(x.resetMaskSet.call(A,!0),P=z.caret!==void 0?z.caret:x.seekNext.call(A,z.pos.begin?z.pos.begin:z.pos),B.p=P),P=N.numericInput&&z.caret===void 0?x.seekPrevious.call(A,P):P,E!==!1&&(setTimeout((function(){N.onKeyValidation.call(j,T,z)}),0),B.writeOutBuffer&&z!==!1)){var U=x.getBuffer.call(A);(0,C.writeBuffer)(j,U,P,b,f!==!0)}if(b.preventDefault(),f)return z!==!1&&(z.forwardPosition=P),z}}else T===F.keys.Enter&&A.undoValue!==A._valueGet(!0)&&(A.undoValue=A._valueGet(!0),setTimeout((function(){$.trigger("change")}),0))},pasteEvent:(c=k().mark((function b(f){var E,S,D,A,N,V;return k().wrap((function(B){for(;;)switch(B.prev=B.next){case 0:E=function(j,$,T,P,W){var z=x.caret.call(j,$,void 0,void 0,!0),U=T.substr(0,z.begin),K=T.substr(z.end,T.length);if(U==(j.isRTL?x.getBufferTemplate.call(j).slice().reverse():x.getBufferTemplate.call(j)).slice(0,z.begin).join("")&&(U=""),K==(j.isRTL?x.getBufferTemplate.call(j).slice().reverse():x.getBufferTemplate.call(j)).slice(z.end).join("")&&(K=""),P=U+P+K,j.isRTL&&A.numericInput!==!0){P=P.split("");var Q,ie=_(x.getBufferTemplate.call(j));try{for(ie.s();!(Q=ie.n()).done;){var Y=Q.value;P[0]===Y&&P.shift()}}catch(ee){ie.e(ee)}finally{ie.f()}P=P.reverse().join("")}var H=P;if(typeof W=="function"){if((H=W.call(j,H,A))===!1)return!1;H||(H=T)}(0,C.checkVal)($,!0,!1,H.toString().split(""),f)},S=this,D=this.inputmask,A=D.opts,N=D._valueGet(!0),D.skipInputEvent=!0,f.clipboardData&&f.clipboardData.getData?V=f.clipboardData.getData("text/plain"):v.default.clipboardData&&v.default.clipboardData.getData&&(V=v.default.clipboardData.getData("Text")),E(D,S,N,V,A.onBeforePaste),f.preventDefault();case 7:case"end":return B.stop()}}),b,this)})),y=function(){var b=this,f=arguments;return new Promise((function(E,S){var D=c.apply(b,f);function A(V){w(D,E,S,A,N,"next",V)}function N(V){w(D,E,S,A,N,"throw",V)}A(void 0)}))},function(b){return y.apply(this,arguments)}),inputFallBackEvent:function(b){var f=this.inputmask,E=f.opts,S=f.dependencyLib,D,A=this,N=A.inputmask._valueGet(!0),V=(f.isRTL?x.getBuffer.call(f).slice().reverse():x.getBuffer.call(f)).join(""),B=x.caret.call(f,A,void 0,void 0,!0);if(V!==N){if(D=(function($,T,P){for(var W,z,U,K=$.substr(0,P.begin).split(""),Q=$.substr(P.begin).split(""),ie=T.substr(0,P.begin).split(""),Y=T.substr(P.begin).split(""),H=K.length>=ie.length?K.length:ie.length,ee=Q.length>=Y.length?Q.length:Y.length,X="",q=[],oe="~";K.length<H;)K.push(oe);for(;ie.length<H;)ie.push(oe);for(;Q.length<ee;)Q.unshift(oe);for(;Y.length<ee;)Y.unshift(oe);var ne=K.concat(Q),me=ie.concat(Y);for(z=0,W=ne.length;z<W;z++)switch(U=M.getPlaceholder.call(f,x.translatePosition.call(f,z)),X){case"insertText":me[z-1]===ne[z]&&P.begin==ne.length-1&&q.push(ne[z]),z=W;break;case"insertReplacementText":case"deleteContentBackward":ne[z]===oe?P.end++:z=W;break;default:ne[z]!==me[z]&&(ne[z+1]!==oe&&ne[z+1]!==U&&ne[z+1]!==void 0||(me[z]!==U||me[z+1]!==oe)&&me[z]!==oe?me[z+1]===oe&&me[z]===ne[z+1]?(X="insertText",q.push(ne[z]),P.begin--,P.end--):ne[z]!==U&&ne[z]!==oe&&(ne[z+1]===oe||me[z]!==ne[z]&&me[z+1]===ne[z+1])?(X="insertReplacementText",q.push(ne[z]),P.begin--):ne[z]===oe?(X="deleteContentBackward",(x.isMask.call(f,x.translatePosition.call(f,z),!0)||me[z]===E.radixPoint)&&P.end++):z=W:(X="insertText",q.push(ne[z]),P.begin--,P.end--))}return{action:X,data:q,caret:P}})(N,V,B),(A.inputmask.shadowRoot||A.ownerDocument).activeElement!==A&&A.focus(),(0,C.writeBuffer)(A,x.getBuffer.call(f)),x.caret.call(f,A,B.begin,B.end,!0),!m.mobile&&f.skipNextInsert&&b.inputType==="insertText"&&D.action==="insertText"&&f.isComposing)return!1;switch(b.inputType==="insertCompositionText"&&D.action==="insertText"&&f.isComposing?f.skipNextInsert=!0:f.skipNextInsert=!1,D.action){case"insertText":case"insertReplacementText":D.data.forEach((function($,T){var P=new S.Event("keypress");P.key=$,f.ignorable=!1,g.keypressEvent.call(A,P)})),setTimeout((function(){f.$el.trigger("keyup")}),0);break;case"deleteContentBackward":var j=new S.Event("keydown");j.key=F.keys.Backspace,g.keyEvent.call(A,j);break;default:(0,C.applyInputValue)(A,N),x.caret.call(f,A,B.begin,B.end,!0)}b.preventDefault()}},setValueEvent:function(b){var f=this.inputmask,E=f.dependencyLib,S=this,D=b&&b.detail?b.detail[0]:arguments[1];D===void 0&&(D=S.inputmask._valueGet(!0)),(0,C.applyInputValue)(S,D,new E.Event("input")),(b.detail&&b.detail[1]!==void 0||arguments[2]!==void 0)&&x.caret.call(f,S,b.detail?b.detail[1]:arguments[2])},focusEvent:function(b){var f=this.inputmask,E=f.opts,S=f&&f._valueGet();E.showMaskOnFocus&&S!==x.getBuffer.call(f).join("")&&(0,C.writeBuffer)(this,x.getBuffer.call(f),x.seekNext.call(f,x.getLastValidPosition.call(f))),E.positionCaretOnTab!==!0||f.mouseEnter!==!1||R.isComplete.call(f,x.getBuffer.call(f))&&x.getLastValidPosition.call(f)!==-1||g.clickEvent.apply(this,[b,!0]),f.undoValue=f&&f._valueGet(!0)},invalidEvent:function(b){this.inputmask.validationEvent=!0},mouseleaveEvent:function(){var b=this.inputmask,f=b.opts,E=this;b.mouseEnter=!1,f.clearMaskOnLostFocus&&(E.inputmask.shadowRoot||E.ownerDocument).activeElement!==E&&(0,C.HandleNativePlaceholder)(E,b.originalPlaceholder)},clickEvent:function(b,f){var E=this.inputmask;E.clicked++;var S=this;if((S.inputmask.shadowRoot||S.ownerDocument).activeElement===S){var D=x.determineNewCaretPosition.call(E,x.caret.call(E,S),f);D!==void 0&&x.caret.call(E,S,D)}},cutEvent:function(b){var f=this.inputmask,E=f.maskset,S=this,D=x.caret.call(f,S),A=f.isRTL?x.getBuffer.call(f).slice(D.end,D.begin):x.getBuffer.call(f).slice(D.begin,D.end),N=f.isRTL?A.reverse().join(""):A.join("");v.default.navigator&&v.default.navigator.clipboard?v.default.navigator.clipboard.writeText(N):v.default.clipboardData&&v.default.clipboardData.getData&&v.default.clipboardData.setData("Text",N),R.handleRemove.call(f,S,F.keys.Delete,D),(0,C.writeBuffer)(S,x.getBuffer.call(f),E.p,b,f.undoValue!==f._valueGet(!0))},blurEvent:function(b){var f=this.inputmask,E=f.opts,S=f.dependencyLib;f.clicked=0;var D=S(this),A=this;if(A.inputmask){(0,C.HandleNativePlaceholder)(A,f.originalPlaceholder);var N=A.inputmask._valueGet(),V=x.getBuffer.call(f).slice();N!==""&&(E.clearMaskOnLostFocus&&(x.getLastValidPosition.call(f)===-1&&N===x.getBufferTemplate.call(f).join("")?V=[]:C.clearOptionalTail.call(f,V)),R.isComplete.call(f,V)===!1&&(setTimeout((function(){D.trigger("incomplete")}),0),E.clearIncomplete&&(x.resetMaskSet.call(f,!1),V=E.clearMaskOnLostFocus?[]:x.getBufferTemplate.call(f).slice())),(0,C.writeBuffer)(A,V,void 0,b)),N=f._valueGet(!0),f.undoValue!==N&&(N!=""||f.undoValue!=x.getBufferTemplate.call(f).join("")||f.undoValue==x.getBufferTemplate.call(f).join("")&&f.maskset.validPositions.length>0)&&(f.undoValue=N,D.trigger("change"))}},mouseenterEvent:function(){var b=this.inputmask,f=b.opts.showMaskOnHover,E=this;if(b.mouseEnter=!0,(E.inputmask.shadowRoot||E.ownerDocument).activeElement!==E){var S=(b.isRTL?x.getBufferTemplate.call(b).slice().reverse():x.getBufferTemplate.call(b)).join("");f&&(0,C.HandleNativePlaceholder)(E,S)}},submitEvent:function(){var b=this.inputmask,f=b.opts;b.undoValue!==b._valueGet(!0)&&b.$el.trigger("change"),x.getLastValidPosition.call(b)===-1&&b._valueGet&&b._valueGet()===x.getBufferTemplate.call(b).join("")&&b._valueSet(""),f.clearIncomplete&&R.isComplete.call(b,x.getBuffer.call(b))===!1&&b._valueSet(""),f.removeMaskOnSubmit&&(b._valueSet(b.unmaskedvalue(),!0),setTimeout((function(){(0,C.writeBuffer)(b.el,x.getBuffer.call(b))}),0))},resetEvent:function(){var b=this.inputmask;b.refreshValue=!0,setTimeout((function(){(0,C.applyInputValue)(b.el,b._valueGet(!0))}),0)}}},9716:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.EventRuler=void 0;var u,h=l(7760),m=(u=l(2394))&&u.__esModule?u:{default:u},v=l(2839),C=l(8711);o.EventRuler={on:function(F,x,R){var M=F.inputmask.dependencyLib,k=function(_){_.originalEvent&&(_=_.originalEvent||_,arguments[0]=_);var p,w=this,c=w.inputmask,y=c?c.opts:void 0;if(c===void 0&&this.nodeName!=="FORM"){var g=M.data(w,"_inputmask_opts");M(w).off(),g&&new m.default(g).mask(w)}else{if(["submit","reset","setvalue"].includes(_.type)||this.nodeName==="FORM"||!(w.disabled||w.readOnly&&!(_.type==="keydown"&&_.ctrlKey&&_.key===v.keys.c||y.tabThrough===!1&&_.key===v.keys.Tab))){switch(_.type){case"input":if(c.skipInputEvent===!0)return c.skipInputEvent=!1,_.preventDefault();break;case"click":case"focus":return c.validationEvent?(c.validationEvent=!1,F.blur(),(0,h.HandleNativePlaceholder)(F,(c.isRTL?C.getBufferTemplate.call(c).slice().reverse():C.getBufferTemplate.call(c)).join("")),setTimeout((function(){F.focus()}),y.validationEventTimeOut),!1):(p=arguments,void setTimeout((function(){F.inputmask&&R.apply(w,p)}),0))}var b=R.apply(w,arguments);return b===!1&&(_.preventDefault(),_.stopPropagation()),b}_.preventDefault()}};["submit","reset"].includes(x)?(k=k.bind(F),F.form!==null&&M(F.form).on(x,k)):M(F).on(x,k),F.inputmask.events[x]=F.inputmask.events[x]||[],F.inputmask.events[x].push(k)},off:function(F,x){if(F.inputmask&&F.inputmask.events){var R=F.inputmask.dependencyLib,M=F.inputmask.events;for(var k in x&&((M=[])[x]=F.inputmask.events[x]),M){for(var _=M[k];_.length>0;){var p=_.pop();["submit","reset"].includes(k)?F.form!==null&&R(F.form).off(k,p):R(F).off(k,p)}delete F.inputmask.events[k]}}}}},219:function(a,o,l){var u=k(l(7184)),h=k(l(2394)),m=l(2839),v=l(8711),C=l(4713);function F(T,P){return(function(W){if(Array.isArray(W))return W})(T)||(function(W,z){var U=W==null?null:typeof Symbol<"u"&&W[Symbol.iterator]||W["@@iterator"];if(U!=null){var K,Q,ie,Y,H=[],ee=!0,X=!1;try{if(ie=(U=U.call(W)).next,z!==0)for(;!(ee=(K=ie.call(U)).done)&&(H.push(K.value),H.length!==z);ee=!0);}catch(q){X=!0,Q=q}finally{try{if(!ee&&U.return!=null&&(Y=U.return(),Object(Y)!==Y))return}finally{if(X)throw Q}}return H}})(T,P)||(function(W,z){if(W){if(typeof W=="string")return x(W,z);var U=Object.prototype.toString.call(W).slice(8,-1);if(U==="Object"&&W.constructor&&(U=W.constructor.name),U==="Map"||U==="Set")return Array.from(W);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return x(W,z)}})(T,P)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
10
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function x(T,P){(P==null||P>T.length)&&(P=T.length);for(var W=0,z=new Array(P);W<P;W++)z[W]=T[W];return z}function R(T){return R=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},R(T)}function M(T,P){for(var W=0;W<P.length;W++){var z=P[W];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(T,(U=z.key,K=void 0,K=(function(Q,ie){if(R(Q)!=="object"||Q===null)return Q;var Y=Q[Symbol.toPrimitive];if(Y!==void 0){var H=Y.call(Q,ie);if(R(H)!=="object")return H;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ie==="string"?String:Number)(Q)})(U,"string"),R(K)==="symbol"?K:String(K)),z)}var U,K}function k(T){return T&&T.__esModule?T:{default:T}}l(1313);var _=h.default.dependencyLib,p=(function(){function T(z,U,K,Q){(function(ie,Y){if(!(ie instanceof Y))throw new TypeError("Cannot call a class as a function")})(this,T),this.mask=z,this.format=U,this.opts=K,this.inputmask=Q,this._date=new Date(1,0,1),this.initDateObject(z,this.opts,this.inputmask)}var P,W;return P=T,(W=[{key:"date",get:function(){return this._date===void 0&&(this._date=new Date(1,0,1),this.initDateObject(void 0,this.opts,this.inputmask)),this._date}},{key:"initDateObject",value:function(z,U,K){var Q;for(D(U).lastIndex=0;Q=D(U).exec(this.format);){var ie=/\d+$/.exec(Q[0]),Y=ie?Q[0][0]+"x":Q[0],H=void 0;if(z!==void 0){if(ie){var ee=D(U).lastIndex,X=$.call(K,Q.index,U,K&&K.maskset);D(U).lastIndex=ee,H=z.slice(0,z.indexOf(X.nextMatch[0]))}else{for(var q=Q[0][0],oe=Q.index;K&&(U.placeholder[C.getTest.call(K,oe).match.placeholder]||C.getTest.call(K,oe).match.placeholder)===q;)oe++;var ne=oe-Q.index;H=z.slice(0,ne||g[Y]&&g[Y][4]||Y.length)}z=z.slice(H.length)}Object.prototype.hasOwnProperty.call(g,Y)&&this.setValue(this,H,Y,g[Y][2],g[Y][1])}}},{key:"setValue",value:function(z,U,K,Q,ie){if(U!==void 0)switch(Q){case"ampm":z[Q]=U,z["raw"+Q]=U.replace(/\s/g,"_");break;case"month":if(K==="mmm"||K==="mmmm"){z[Q]=V(K==="mmm"?c.monthNames.slice(0,12).findIndex((function(H){return U.toLowerCase()===H.toLowerCase()}))+1:c.monthNames.slice(12,24).findIndex((function(H){return U.toLowerCase()===H.toLowerCase()}))+1,2),z[Q]=z[Q]==="00"?"":z[Q].toString(),z["raw"+Q]=z[Q];break}default:z[Q]=U.replace(/[^0-9]/g,"0"),z["raw"+Q]=U.replace(/\s/g,"_")}if(ie!==void 0){var Y=z[Q];(Q==="day"&&parseInt(Y)===29||Q==="month"&&parseInt(Y)===2)&&(parseInt(z.day)!==29||parseInt(z.month)!==2||z.year!==""&&z.year!==void 0||z._date.setFullYear(2012,1,29)),Q==="day"&&(y=!0,parseInt(Y)===0&&(Y=1)),Q==="month"&&(y=!0),Q==="year"&&(y=!0,Y.length<g[K][4]&&(Y=V(Y,g[K][4],!0))),(Y!==""&&!isNaN(Y)||Q==="ampm")&&ie.call(z._date,Y)}}},{key:"reset",value:function(){this._date=new Date(1,0,1)}},{key:"reInit",value:function(){this._date=void 0,this.date}}])&&M(P.prototype,W),Object.defineProperty(P,"prototype",{writable:!1}),T})(),w=new Date().getFullYear(),c=h.default.prototype.i18n,y=!1,g={d:["[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",Date.prototype.getDate],dd:["0[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",function(){return V(Date.prototype.getDate.call(this),2)}],ddd:[""],dddd:[""],m:["[1-9]|1[012]",function(T){var P=T?parseInt(T):0;return P>0&&P--,Date.prototype.setMonth.call(this,P)},"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",function(T){var P=T?parseInt(T):0;return P>0&&P--,Date.prototype.setMonth.call(this,P)},"month",function(){return V(Date.prototype.getMonth.call(this)+1,2)}],mmm:[c.monthNames.slice(0,12).join("|"),function(T){var P=c.monthNames.slice(0,12).findIndex((function(W){return T.toLowerCase()===W.toLowerCase()}));return P!==-1&&Date.prototype.setMonth.call(this,P)},"month",function(){return c.monthNames.slice(0,12)[Date.prototype.getMonth.call(this)]}],mmmm:[c.monthNames.slice(12,24).join("|"),function(T){var P=c.monthNames.slice(12,24).findIndex((function(W){return T.toLowerCase()===W.toLowerCase()}));return P!==-1&&Date.prototype.setMonth.call(this,P)},"month",function(){return c.monthNames.slice(12,24)[Date.prototype.getMonth.call(this)]}],yy:["[0-9]{2}",function(T){var P=new Date().getFullYear().toString().slice(0,2);Date.prototype.setFullYear.call(this,"".concat(P).concat(T))},"year",function(){return V(Date.prototype.getFullYear.call(this),2)},2],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return V(Date.prototype.getFullYear.call(this),4)},4],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return V(Date.prototype.getHours.call(this),2)}],hx:[function(T){return"[0-9]{".concat(T,"}")},Date.prototype.setHours,"hours",function(T){return Date.prototype.getHours}],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["0[0-9]|1[0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return V(Date.prototype.getHours.call(this),2)}],Hx:[function(T){return"[0-9]{".concat(T,"}")},Date.prototype.setHours,"hours",function(T){return function(){return V(Date.prototype.getHours.call(this),T)}}],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setMinutes,"minutes",function(){return V(Date.prototype.getMinutes.call(this),2)}],s:["[1-5]?[0-9]",Date.prototype.setSeconds,"seconds",Date.prototype.getSeconds],ss:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setSeconds,"seconds",function(){return V(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return V(Date.prototype.getMilliseconds.call(this),3)},3],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return V(Date.prototype.getMilliseconds.call(this),2)},2],t:["[ap]",f,"ampm",E,1],tt:["[ap]m",f,"ampm",E,2],T:["[AP]",f,"ampm",E,1],TT:["[AP]M",f,"ampm",E,2],Z:[".*",void 0,"Z",function(){var T=this.toString().match(/\((.+)\)/)[1];return T.includes(" ")&&(T=(T=T.replace("-"," ").toUpperCase()).split(" ").map((function(P){return F(P,1)[0]})).join("")),T}],o:[""],S:[""]},b={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};function f(T){var P=this.getHours();T.toLowerCase().includes("p")?this.setHours(P+12):T.toLowerCase().includes("a")&&P>=12&&this.setHours(P-12)}function E(){var T=this.getHours();return(T=T||12)>=12?"PM":"AM"}function S(T){var P=/\d+$/.exec(T[0]);if(P&&P[0]!==void 0){var W=g[T[0][0]+"x"].slice("");return W[0]=W[0](P[0]),W[3]=W[3](P[0]),W}if(g[T[0]])return g[T[0]]}function D(T){if(!T.tokenizer){var P=[],W=[];for(var z in g)if(/\.*x$/.test(z)){var U=z[0]+"\\d+";W.indexOf(U)===-1&&W.push(U)}else P.indexOf(z[0])===-1&&P.push(z[0]);T.tokenizer="("+(W.length>0?W.join("|")+"|":"")+P.join("+|")+")+?|.",T.tokenizer=new RegExp(T.tokenizer,"g")}return T.tokenizer}function A(T,P,W){if(!y)return!0;if(T.rawday===void 0||!isFinite(T.rawday)&&new Date(T.date.getFullYear(),isFinite(T.rawmonth)?T.month:T.date.getMonth()+1,0).getDate()>=T.day||T.day=="29"&&(!isFinite(T.rawyear)||T.rawyear===void 0||T.rawyear==="")||new Date(T.date.getFullYear(),isFinite(T.rawmonth)?T.month:T.date.getMonth()+1,0).getDate()>=T.day)return P;if(T.day=="29"){var z=$.call(this,P.pos,W,this.maskset);if(z.targetMatch&&z.targetMatch[0]==="yyyy"&&P.pos-z.targetMatchIndex==2)return P.remove=P.pos+1,P}else if(T.date.getMonth()==2&&T.day=="30"&&P.c!==void 0)return T.day="03",T.date.setDate(3),T.date.setMonth(1),P.insert=[{pos:P.pos,c:"0"},{pos:P.pos+1,c:P.c}],P.caret=v.seekNext.call(this,P.pos+1),P;return!1}function N(T,P,W,z){var U,K,Q="",ie=0,Y={};for(D(W).lastIndex=0;U=D(W).exec(T);){if(P===void 0)if(K=S(U))Q+="("+K[0]+")",W.placeholder&&W.placeholder!==""?(Y[ie]=W.placeholder[U.index%W.placeholder.length],Y[W.placeholder[U.index%W.placeholder.length]]=U[0].charAt(0)):Y[ie]=U[0].charAt(0);else switch(U[0]){case"[":Q+="(";break;case"]":Q+=")?";break;default:Q+=(0,u.default)(U[0]),Y[ie]=U[0].charAt(0)}else(K=S(U))?z!==!0&&K[3]?Q+=K[3].call(P.date):K[2]?Q+=P["raw"+K[2]]:Q+=U[0]:Q+=U[0];ie++}return P===void 0&&(W.placeholder=Y),Q}function V(T,P,W){for(T=String(T),P=P||2;T.length<P;)T=W?T+"0":"0"+T;return T}function B(T,P,W){return typeof T=="string"?new p(T,P,W,this):T&&R(T)==="object"&&Object.prototype.hasOwnProperty.call(T,"date")?T:void 0}function j(T,P){return N(P.inputFormat,{date:T},P)}function $(T,P,W){var z,U,K=this,Q=W&&W.tests[T]?P.placeholder[W.tests[T][0].match.placeholder]||W.tests[T][0].match.placeholder:"",ie=0,Y=0;for(D(P).lastIndex=0;U=D(P).exec(P.inputFormat);){var H=/\d+$/.exec(U[0]);if(H)Y=parseInt(H[0]);else{for(var ee=U[0][0],X=ie;K&&(P.placeholder[C.getTest.call(K,X).match.placeholder]||C.getTest.call(K,X).match.placeholder)===ee;)X++;(Y=X-ie)===0&&(Y=U[0].length)}if(ie+=Y,U[0].indexOf(Q)!=-1||ie>=T+1){z=U,U=D(P).exec(P.inputFormat);break}}return{targetMatchIndex:ie-Y,nextMatch:U,targetMatch:z}}h.default.extendAliases({datetime:{mask:function(T){return T.numericInput=!1,g.S=c.ordinalSuffix.join("|"),T.inputFormat=b[T.inputFormat]||T.inputFormat,T.displayFormat=b[T.displayFormat]||T.displayFormat||T.inputFormat,T.outputFormat=b[T.outputFormat]||T.outputFormat||T.inputFormat,T.regex=N(T.inputFormat,void 0,T),T.min=B(T.min,T.inputFormat,T),T.max=B(T.max,T.inputFormat,T),null},placeholder:"",inputFormat:"isoDateTime",displayFormat:null,outputFormat:null,min:null,max:null,skipOptionalPartCharacter:"",preValidation:function(T,P,W,z,U,K,Q,ie){if(ie)return!0;if(isNaN(W)&&T[P]!==W){var Y=$.call(this,P,U,K);if(Y.nextMatch&&Y.nextMatch[0]===W&&Y.targetMatch[0].length>1){var H=S(Y.targetMatch)[0];if(new RegExp(H).test("0"+T[P-1]))return T[P]=T[P-1],T[P-1]="0",{fuzzy:!0,buffer:T,refreshFromBuffer:{start:P-1,end:P+1},pos:P+1}}}return!0},postValidation:function(T,P,W,z,U,K,Q,ie){var Y,H,ee=this;if(Q)return!0;if(z===!1&&(((Y=$.call(ee,P+1,U,K)).targetMatch&&Y.targetMatchIndex===P&&Y.targetMatch[0].length>1&&g[Y.targetMatch[0]]!==void 0||(Y=$.call(ee,P+2,U,K)).targetMatch&&Y.targetMatchIndex===P+1&&Y.targetMatch[0].length>1&&g[Y.targetMatch[0]]!==void 0)&&(H=S(Y.targetMatch)[0]),H!==void 0&&(K.validPositions[P+1]!==void 0&&new RegExp(H).test(W+"0")?(T[P]=W,T[P+1]="0",z={pos:P+2,caret:P}):new RegExp(H).test("0"+W)&&(T[P]="0",T[P+1]=W,z={pos:P+2})),z===!1))return z;if(z.fuzzy&&(T=z.buffer,P=z.pos),(Y=$.call(ee,P,U,K)).targetMatch&&Y.targetMatch[0]&&g[Y.targetMatch[0]]!==void 0){var X=S(Y.targetMatch);H=X[0];var q=T.slice(Y.targetMatchIndex,Y.targetMatchIndex+Y.targetMatch[0].length);if(new RegExp(H).test(q.join(""))===!1&&Y.targetMatch[0].length===2&&K.validPositions[Y.targetMatchIndex]&&K.validPositions[Y.targetMatchIndex+1]&&(K.validPositions[Y.targetMatchIndex+1].input="0"),X[2]=="year")for(var oe=C.getMaskTemplate.call(ee,!1,1,void 0,!0),ne=P+1;ne<T.length;ne++)T[ne]=oe[ne],K.validPositions.splice(P+1,1)}var me=z,be=B.call(ee,T.join(""),U.inputFormat,U);return me&&!isNaN(be.date.getTime())&&(U.prefillYear&&(me=(function(xe,je,Le){if(xe.year!==xe.rawyear){var Ne=w.toString(),se=xe.rawyear.replace(/[^0-9]/g,""),G=Ne.slice(0,se.length),Z=Ne.slice(se.length);if(se.length===2&&se===G){var re=new Date(w,xe.month-1,xe.day);xe.day==re.getDate()&&(!Le.max||Le.max.date.getTime()>=re.getTime())&&(xe.date.setFullYear(w),xe.year=Ne,je.insert=[{pos:je.pos+1,c:Z[0]},{pos:je.pos+2,c:Z[1]}])}}return je})(be,me,U)),me=(function(xe,je,Le,Ne,se){if(!je)return je;if(je&&Le.min&&!isNaN(Le.min.date.getTime())){var G;for(xe.reset(),D(Le).lastIndex=0;G=D(Le).exec(Le.inputFormat);){var Z;if((Z=S(G))&&Z[3]){for(var re=Z[1],te=xe[Z[2]],pe=Le.min[Z[2]],Me=Le.max?Le.max[Z[2]]:pe+1,ve=[],we=!1,Pe=0;Pe<pe.length;Pe++)Ne.validPositions[Pe+G.index]!==void 0||we?(ve[Pe]=te[Pe],we=we||te[Pe]>pe[Pe]):(Pe+G.index==0&&te[Pe]<pe[Pe]?(ve[Pe]=te[Pe],we=!0):ve[Pe]=pe[Pe],Z[2]==="year"&&te.length-1==Pe&&pe!=Me&&(ve=(parseInt(ve.join(""))+1).toString().split("")),Z[2]==="ampm"&&pe!=Me&&Le.min.date.getTime()>xe.date.getTime()&&(ve[Pe]=Me[Pe]));re.call(xe._date,ve.join(""))}}je=Le.min.date.getTime()<=xe.date.getTime(),xe.reInit()}return je&&Le.max&&(isNaN(Le.max.date.getTime())||(je=Le.max.date.getTime()>=xe.date.getTime())),je})(be,me=A.call(ee,be,me,U),U,K)),P!==void 0&&me&&z.pos!==P?{buffer:N(U.inputFormat,be,U).split(""),refreshFromBuffer:{start:P,end:z.pos},pos:z.caret||z.pos}:me},onKeyDown:function(T,P,W,z){T.ctrlKey&&T.key===m.keys.ArrowRight&&(this.inputmask._valueSet(j(new Date,z)),_(this).trigger("setvalue"))},onUnMask:function(T,P,W){return P&&N(W.outputFormat,B.call(this,T,W.inputFormat,W),W,!0)},casing:function(T,P,W,z){if(P.nativeDef.indexOf("[ap]")==0)return T.toLowerCase();if(P.nativeDef.indexOf("[AP]")==0)return T.toUpperCase();var U=C.getTest.call(this,[W-1]);return U.match.def.indexOf("[AP]")==0||W===0||U&&U.input===String.fromCharCode(m.keyCode.Space)||U&&U.match.def===String.fromCharCode(m.keyCode.Space)?T.toUpperCase():T.toLowerCase()},onBeforeMask:function(T,P){return Object.prototype.toString.call(T)==="[object Date]"&&(T=j(T,P)),T},insertMode:!1,insertModeVisual:!1,shiftPositions:!1,keepStatic:!1,inputmode:"numeric",prefillYear:!0}})},1313:function(a,o,l){var u,h=(u=l(2394))&&u.__esModule?u:{default:u};h.default.dependencyLib.extend(!0,h.default.prototype.i18n,{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]})},3851:function(a,o,l){var u,h=(u=l(2394))&&u.__esModule?u:{default:u},m=l(8711),v=l(4713);function C(M){return(function(k){if(Array.isArray(k))return F(k)})(M)||(function(k){if(typeof Symbol<"u"&&k[Symbol.iterator]!=null||k["@@iterator"]!=null)return Array.from(k)})(M)||(function(k,_){if(k){if(typeof k=="string")return F(k,_);var p=Object.prototype.toString.call(k).slice(8,-1);if(p==="Object"&&k.constructor&&(p=k.constructor.name),p==="Map"||p==="Set")return Array.from(k);if(p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p))return F(k,_)}})(M)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
11
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function F(M,k){(k==null||k>M.length)&&(k=M.length);for(var _=0,p=new Array(k);_<k;_++)p[_]=M[_];return p}h.default.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"#":{validator:"[0-9A-Fa-f]",casing:"upper"}});var x=/25[0-5]|2[0-4][0-9]|[01][0-9][0-9]/;function R(M,k,_,p,w){if(_-1>-1&&k.buffer[_-1]!=="."?(M=k.buffer[_-1]+M,M=_-2>-1&&k.buffer[_-2]!=="."?k.buffer[_-2]+M:"0"+M):M="00"+M,w.greedy&&parseInt(M)>255&&x.test("00"+M.charAt(2))){var c=[].concat(C(k.buffer.slice(0,_)),[".",M.charAt(2)]);if(c.join("").match(/\./g).length<4)return{refreshFromBuffer:!0,buffer:c,caret:_+2}}return x.test(M)}h.default.extendAliases({cssunit:{regex:"[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"},url:{regex:"(https?|ftp)://.*",autoUnmask:!1,keepStatic:!1,tabThrough:!0},ip:{mask:"i{1,3}.j{1,3}.k{1,3}.l{1,3}",definitions:{i:{validator:R},j:{validator:R},k:{validator:R},l:{validator:R}},onUnMask:function(M,k,_){return M},inputmode:"decimal",substitutes:{",":"."}},email:{mask:function(M){var k=M.separator,_=M.quantifier,p="*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",w=p;if(k)for(var c=0;c<_;c++)w+="[".concat(k).concat(p,"]");return w},greedy:!1,casing:"lower",separator:null,quantifier:5,skipOptionalPartCharacter:"",onBeforePaste:function(M,k){return(M=M.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ!#$%&'*+/=?^_`{|}~-]"},"-":{validator:"[0-9A-Za-z-]"}},onUnMask:function(M,k,_){return M},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",casing:"upper"}},clearIncomplete:!0,autoUnmask:!0},ssn:{mask:"999-99-9999",postValidation:function(M,k,_,p,w,c,y){var g=v.getMaskTemplate.call(this,!0,m.getLastValidPosition.call(this),!0,!0);return/^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(g.join(""))}}})},207:function(a,o,l){var u=C(l(7184)),h=C(l(2394)),m=l(2839),v=l(8711);function C(p){return p&&p.__esModule?p:{default:p}}var F=h.default.dependencyLib;function x(p,w){for(var c="",y=0;y<p.length;y++)h.default.prototype.definitions[p.charAt(y)]||w.definitions[p.charAt(y)]||w.optionalmarker[0]===p.charAt(y)||w.optionalmarker[1]===p.charAt(y)||w.quantifiermarker[0]===p.charAt(y)||w.quantifiermarker[1]===p.charAt(y)||w.groupmarker[0]===p.charAt(y)||w.groupmarker[1]===p.charAt(y)||w.alternatormarker===p.charAt(y)?c+="\\"+p.charAt(y):c+=p.charAt(y);return c}function R(p,w,c,y){if(p.length>0&&w>0&&(!c.digitsOptional||y)){var g=p.indexOf(c.radixPoint),b=!1;c.negationSymbol.back===p[p.length-1]&&(b=!0,p.length--),g===-1&&(p.push(c.radixPoint),g=p.length-1);for(var f=1;f<=w;f++)isFinite(p[g+f])||(p[g+f]="0")}return b&&p.push(c.negationSymbol.back),p}function M(p,w){var c=0;for(var y in p==="+"&&(c=v.seekNext.call(this,w.validPositions.length-1)),w.tests)if((y=parseInt(y))>=c){for(var g=0,b=w.tests[y].length;g<b;g++)if((w.validPositions[y]===void 0||p==="-")&&w.tests[y][g].match.def===p)return y+(w.validPositions[y]!==void 0&&p!=="-"?1:0)}return c}function k(p,w){for(var c=-1,y=0,g=w.validPositions.length;y<g;y++){var b=w.validPositions[y];if(b&&b.match.def===p){c=y;break}}return c}function _(p,w,c,y,g){var b=w.buffer?w.buffer.indexOf(g.radixPoint):-1,f=(b!==-1||y&&g.jitMasking)&&new RegExp(g.definitions[9].validator).test(p);return!y&&g._radixDance&&b!==-1&&f&&w.validPositions[b]==null?{insert:{pos:b===c?b+1:b,c:g.radixPoint},pos:c}:f}h.default.extendAliases({numeric:{mask:function(p){p.repeat=0,p.groupSeparator===p.radixPoint&&p.digits&&p.digits!=="0"&&(p.radixPoint==="."?p.groupSeparator=",":p.radixPoint===","?p.groupSeparator=".":p.groupSeparator=""),p.groupSeparator===" "&&(p.skipOptionalPartCharacter=void 0),p.placeholder.length>1&&(p.placeholder=p.placeholder.charAt(0)),p.positionCaretOnClick==="radixFocus"&&p.placeholder===""&&(p.positionCaretOnClick="lvp");var w="0",c=p.radixPoint;p.numericInput===!0&&p.__financeInput===void 0?(w="1",p.positionCaretOnClick=p.positionCaretOnClick==="radixFocus"?"lvp":p.positionCaretOnClick,p.digitsOptional=!1,isNaN(p.digits)&&(p.digits=2),p._radixDance=!1,c=p.radixPoint===","?"?":"!",p.radixPoint!==""&&p.definitions[c]===void 0&&(p.definitions[c]={},p.definitions[c].validator="["+p.radixPoint+"]",p.definitions[c].placeholder=p.radixPoint,p.definitions[c].static=!0,p.definitions[c].generated=!0)):(p.__financeInput=!1,p.numericInput=!0);var y,g="[+]";if(g+=x(p.prefix,p),p.groupSeparator!==""?(p.definitions[p.groupSeparator]===void 0&&(p.definitions[p.groupSeparator]={},p.definitions[p.groupSeparator].validator="["+p.groupSeparator+"]",p.definitions[p.groupSeparator].placeholder=p.groupSeparator,p.definitions[p.groupSeparator].static=!0,p.definitions[p.groupSeparator].generated=!0),g+=p._mask(p)):g+="9{+}",p.digits!==void 0&&p.digits!==0){var b=p.digits.toString().split(",");isFinite(b[0])&&b[1]&&isFinite(b[1])?g+=c+w+"{"+p.digits+"}":(isNaN(p.digits)||parseInt(p.digits)>0)&&(p.digitsOptional||p.jitMasking?(y=g+c+w+"{0,"+p.digits+"}",p.keepStatic=!0):g+=c+w+"{"+p.digits+"}")}else p.inputmode="numeric";return g+=x(p.suffix,p),g+="[-]",y&&(g=[y+x(p.suffix,p)+"[-]",g]),p.greedy=!1,(function(f){f.parseMinMaxOptions===void 0&&(f.min!==null&&(f.min=f.min.toString().replace(new RegExp((0,u.default)(f.groupSeparator),"g"),""),f.radixPoint===","&&(f.min=f.min.replace(f.radixPoint,".")),f.min=isFinite(f.min)?parseFloat(f.min):NaN,isNaN(f.min)&&(f.min=Number.MIN_VALUE)),f.max!==null&&(f.max=f.max.toString().replace(new RegExp((0,u.default)(f.groupSeparator),"g"),""),f.radixPoint===","&&(f.max=f.max.replace(f.radixPoint,".")),f.max=isFinite(f.max)?parseFloat(f.max):NaN,isNaN(f.max)&&(f.max=Number.MAX_VALUE)),f.parseMinMaxOptions="done")})(p),p.radixPoint!==""&&p.substituteRadixPoint&&(p.substitutes[p.radixPoint=="."?",":"."]=p.radixPoint),g},_mask:function(p){return"("+p.groupSeparator+"999){+|1}"},digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",_radixDance:!0,groupSeparator:"",allowMinus:!0,negationSymbol:{front:"-",back:""},prefix:"",suffix:"",min:null,max:null,SetMaxOnOverflow:!1,step:1,inputType:"text",unmaskAsNumber:!1,roundingFN:Math.round,inputmode:"decimal",shortcuts:{k:"1000",m:"1000000"},placeholder:"0",greedy:!1,rightAlign:!0,insertMode:!0,autoUnmask:!1,skipOptionalPartCharacter:"",usePrototypeDefinitions:!1,stripLeadingZeroes:!0,substituteRadixPoint:!0,definitions:{0:{validator:_},1:{validator:_,definitionSymbol:"9"},9:{validator:"[0-90-9٠-٩۰-۹]",definitionSymbol:"*"},"+":{validator:function(p,w,c,y,g){return g.allowMinus&&(p==="-"||p===g.negationSymbol.front)}},"-":{validator:function(p,w,c,y,g){return g.allowMinus&&p===g.negationSymbol.back}}},preValidation:function(p,w,c,y,g,b,f,E){var S=this;if(g.__financeInput!==!1&&c===g.radixPoint)return!1;var D=p.indexOf(g.radixPoint),A=w;if(w=(function($,T,P,W,z){return z._radixDance&&z.numericInput&&T!==z.negationSymbol.back&&$<=P&&(P>0||T==z.radixPoint)&&(W.validPositions[$-1]===void 0||W.validPositions[$-1].input!==z.negationSymbol.back)&&($-=1),$})(w,c,D,b,g),c==="-"||c===g.negationSymbol.front){if(g.allowMinus!==!0)return!1;var N=!1,V=k("+",b),B=k("-",b);return V!==-1&&(N=[V],B!==-1&&N.push(B)),N!==!1?{remove:N,caret:A-g.negationSymbol.back.length}:{insert:[{pos:M.call(S,"+",b),c:g.negationSymbol.front,fromIsValid:!0},{pos:M.call(S,"-",b),c:g.negationSymbol.back,fromIsValid:void 0}],caret:A+g.negationSymbol.back.length}}if(c===g.groupSeparator)return{caret:A};if(E)return!0;if(D!==-1&&g._radixDance===!0&&y===!1&&c===g.radixPoint&&g.digits!==void 0&&(isNaN(g.digits)||parseInt(g.digits)>0)&&D!==w){var j=M.call(S,g.radixPoint,b);return b.validPositions[j]&&(b.validPositions[j].generatedInput=b.validPositions[j].generated||!1),{caret:g._radixDance&&w===D-1?D+1:D}}if(g.__financeInput===!1){if(y){if(g.digitsOptional)return{rewritePosition:f.end};if(!g.digitsOptional){if(f.begin>D&&f.end<=D)return c===g.radixPoint?{insert:{pos:D+1,c:"0",fromIsValid:!0},rewritePosition:D}:{rewritePosition:D+1};if(f.begin<D)return{rewritePosition:f.begin-1}}}else if(!g.showMaskOnHover&&!g.showMaskOnFocus&&!g.digitsOptional&&g.digits>0&&this.__valueGet.call(this.el)==="")return{rewritePosition:D}}return{rewritePosition:w}},postValidation:function(p,w,c,y,g,b,f){if(y===!1)return y;if(f)return!0;if(g.min!==null||g.max!==null){var E=g.onUnMask(p.slice().reverse().join(""),void 0,F.extend({},g,{unmaskAsNumber:!0}));if(g.min!==null&&E<g.min&&(E.toString().length>g.min.toString().length||E<0))return!1;if(g.max!==null&&E>g.max)return!!g.SetMaxOnOverflow&&{refreshFromBuffer:!0,buffer:R(g.max.toString().replace(".",g.radixPoint).split(""),g.digits,g).reverse()}}return y},onUnMask:function(p,w,c){if(w===""&&c.nullable===!0)return w;var y=p.replace(c.prefix,"");return y=(y=y.replace(c.suffix,"")).replace(new RegExp((0,u.default)(c.groupSeparator),"g"),""),c.placeholder.charAt(0)!==""&&(y=y.replace(new RegExp(c.placeholder.charAt(0),"g"),"0")),c.unmaskAsNumber?(c.radixPoint!==""&&y.indexOf(c.radixPoint)!==-1&&(y=y.replace(u.default.call(this,c.radixPoint),".")),y=(y=y.replace(new RegExp("^"+(0,u.default)(c.negationSymbol.front)),"-")).replace(new RegExp((0,u.default)(c.negationSymbol.back)+"$"),""),Number(y)):y},isComplete:function(p,w){var c=(w.numericInput?p.slice().reverse():p).join("");return c=(c=(c=(c=(c=c.replace(new RegExp("^"+(0,u.default)(w.negationSymbol.front)),"-")).replace(new RegExp((0,u.default)(w.negationSymbol.back)+"$"),"")).replace(w.prefix,"")).replace(w.suffix,"")).replace(new RegExp((0,u.default)(w.groupSeparator)+"([0-9]{3})","g"),"$1"),w.radixPoint===","&&(c=c.replace((0,u.default)(w.radixPoint),".")),isFinite(c)},onBeforeMask:function(p,w){var c;p=(c=p)!==null&&c!==void 0?c:"";var y=w.radixPoint||",";isFinite(w.digits)&&(w.digits=parseInt(w.digits)),typeof p!="number"&&w.inputType!=="number"||y===""||(p=p.toString().replace(".",y));var g=p.charAt(0)==="-"||p.charAt(0)===w.negationSymbol.front,b=p.split(y),f=b[0].replace(/[^\-0-9]/g,""),E=b.length>1?b[1].replace(/[^0-9]/g,""):"",S=b.length>1;p=f+(E!==""?y+E:E);var D=0;if(y!==""&&(D=w.digitsOptional?w.digits<E.length?w.digits:E.length:w.digits,E!==""||!w.digitsOptional)){var A=Math.pow(10,D||1);p=p.replace((0,u.default)(y),"."),isNaN(parseFloat(p))||(p=(w.roundingFN(parseFloat(p)*A)/A).toFixed(D)),p=p.toString().replace(".",y)}if(w.digits===0&&p.indexOf(y)!==-1&&(p=p.substring(0,p.indexOf(y))),w.min!==null||w.max!==null){var N=p.toString().replace(y,".");w.min!==null&&N<w.min?p=w.min.toString().replace(".",y):w.max!==null&&N>w.max&&(p=w.max.toString().replace(".",y))}return g&&p.charAt(0)!=="-"&&(p="-"+p),R(p.toString().split(""),D,w,S).join("")},onBeforeWrite:function(p,w,c,y){function g(B,j){if(y.__financeInput!==!1||j){var $=B.indexOf(y.radixPoint);$!==-1&&B.splice($,1)}if(y.groupSeparator!=="")for(;($=B.indexOf(y.groupSeparator))!==-1;)B.splice($,1);return B}var b,f;if(y.stripLeadingZeroes&&(f=(function(B,j){var $=new RegExp("(^"+(j.negationSymbol.front!==""?(0,u.default)(j.negationSymbol.front)+"?":"")+(0,u.default)(j.prefix)+")(.*)("+(0,u.default)(j.suffix)+(j.negationSymbol.back!=""?(0,u.default)(j.negationSymbol.back)+"?":"")+"$)").exec(B.slice().reverse().join("")),T=$?$[2]:"",P=!1;return T&&(T=T.split(j.radixPoint.charAt(0))[0],P=new RegExp("^[0"+j.groupSeparator+"]*").exec(T)),!(!P||!(P[0].length>1||P[0].length>0&&P[0].length<T.length))&&P})(w,y)))for(var E=w.join("").lastIndexOf(f[0].split("").reverse().join(""))-(f[0]==f.input?0:1),S=f[0]==f.input?1:0,D=f[0].length-S;D>0;D--)this.maskset.validPositions.splice(E+D,1),delete w[E+D];if(p)switch(p.type){case"blur":case"checkval":if(y.min!==null){var A=y.onUnMask(w.slice().reverse().join(""),void 0,F.extend({},y,{unmaskAsNumber:!0}));if(y.min!==null&&A<y.min)return{refreshFromBuffer:!0,buffer:R(y.min.toString().replace(".",y.radixPoint).split(""),y.digits,y).reverse()}}if(w[w.length-1]===y.negationSymbol.front){var N=new RegExp("(^"+(y.negationSymbol.front!=""?(0,u.default)(y.negationSymbol.front)+"?":"")+(0,u.default)(y.prefix)+")(.*)("+(0,u.default)(y.suffix)+(y.negationSymbol.back!=""?(0,u.default)(y.negationSymbol.back)+"?":"")+"$)").exec(g(w.slice(),!0).reverse().join(""));(N?N[2]:"")==0&&(b={refreshFromBuffer:!0,buffer:[0]})}else y.radixPoint!==""&&w.indexOf(y.radixPoint)===y.suffix.length&&(b&&b.buffer?b.buffer.splice(0,1+y.suffix.length):(w.splice(0,1+y.suffix.length),b={refreshFromBuffer:!0,buffer:g(w)}));if(y.enforceDigitsOnBlur){var V=(b=b||{})&&b.buffer||w.slice().reverse();b.refreshFromBuffer=!0,b.buffer=R(V,y.digits,y,!0).reverse()}}return b},onKeyDown:function(p,w,c,y){var g,b=F(this);if(p.location!=3){var f,E=p.key;if((f=y.shortcuts&&y.shortcuts[E])&&f.length>1)return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())*parseInt(f)),b.trigger("setvalue"),!1}if(p.ctrlKey)switch(p.key){case m.keys.ArrowUp:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())+parseInt(y.step)),b.trigger("setvalue"),!1;case m.keys.ArrowDown:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())-parseInt(y.step)),b.trigger("setvalue"),!1}if(!p.shiftKey&&(p.key===m.keys.Delete||p.key===m.keys.Backspace||p.key===m.keys.BACKSPACE_SAFARI)&&c.begin!==w.length){if(w[p.key===m.keys.Delete?c.begin-1:c.end]===y.negationSymbol.front)return g=w.slice().reverse(),y.negationSymbol.front!==""&&g.shift(),y.negationSymbol.back!==""&&g.pop(),b.trigger("setvalue",[g.join(""),c.begin]),!1;if(y._radixDance===!0){var S,D=w.indexOf(y.radixPoint);if(y.digitsOptional){if(D===0)return(g=w.slice().reverse()).pop(),b.trigger("setvalue",[g.join(""),c.begin>=g.length?g.length:c.begin]),!1}else if(D!==-1&&(c.begin<D||c.end<D||p.key===m.keys.Delete&&(c.begin===D||c.begin-1===D)))return c.begin===c.end&&(p.key===m.keys.Backspace||p.key===m.keys.BACKSPACE_SAFARI?c.begin++:p.key===m.keys.Delete&&c.begin-1===D&&(S=F.extend({},c),c.begin--,c.end--)),(g=w.slice().reverse()).splice(g.length-c.begin,c.begin-c.end+1),g=R(g,y.digits,y).join(""),S&&(c=S),b.trigger("setvalue",[g,c.begin>=g.length?D+1:c.begin]),!1}}}},currency:{prefix:"",groupSeparator:",",alias:"numeric",digits:2,digitsOptional:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",inputmode:"numeric",digits:0},percentage:{alias:"numeric",min:0,max:100,suffix:" %",digits:0,allowMinus:!1},indianns:{alias:"numeric",_mask:function(p){return"("+p.groupSeparator+"99){*|1}("+p.groupSeparator+"999){1|1}"},groupSeparator:",",radixPoint:".",placeholder:"0",digits:2,digitsOptional:!1}})},9380:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var l=!(typeof window>"u"||!window.document||!window.document.createElement);o.default=l?window:{}},7760:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.HandleNativePlaceholder=function(_,p){var w=_?_.inputmask:this;if(u.ie){if(_.inputmask._valueGet()!==p&&(_.placeholder!==p||_.placeholder==="")){var c=v.getBuffer.call(w).slice(),y=_.inputmask._valueGet();if(y!==p){var g=v.getLastValidPosition.call(w);g===-1&&y===v.getBufferTemplate.call(w).join("")?c=[]:g!==-1&&R.call(w,c),k(_,c)}}}else _.placeholder!==p&&(_.placeholder=p,_.placeholder===""&&_.removeAttribute("placeholder"))},o.applyInputValue=x,o.checkVal=M,o.clearOptionalTail=R,o.unmaskedvalue=function(_){var p=_?_.inputmask:this,w=p.opts,c=p.maskset;if(_){if(_.inputmask===void 0)return _.value;_.inputmask&&_.inputmask.refreshValue&&x(_,_.inputmask._valueGet(!0))}for(var y=[],g=c.validPositions,b=0,f=g.length;b<f;b++)g[b]&&g[b].match&&(g[b].match.static!=1||Array.isArray(c.metadata)&&g[b].generatedInput!==!0)&&y.push(g[b].input);var E=y.length===0?"":(p.isRTL?y.reverse():y).join("");if(typeof w.onUnMask=="function"){var S=(p.isRTL?v.getBuffer.call(p).slice().reverse():v.getBuffer.call(p)).join("");E=w.onUnMask.call(p,S,E,w)}return E},o.writeBuffer=k;var u=l(9845),h=l(6030),m=l(2839),v=l(8711),C=l(7215),F=l(4713);function x(_,p,w){var c=_?_.inputmask:this,y=c.opts;_.inputmask.refreshValue=!1,typeof y.onBeforeMask=="function"&&(p=y.onBeforeMask.call(c,p,y)||p),M(_,!0,!1,p=(p||"").toString().split(""),w),c.undoValue=c._valueGet(!0),(y.clearMaskOnLostFocus||y.clearIncomplete)&&_.inputmask._valueGet()===v.getBufferTemplate.call(c).join("")&&v.getLastValidPosition.call(c)===-1&&_.inputmask._valueSet("")}function R(_){_.length=0;for(var p,w=F.getMaskTemplate.call(this,!0,0,!0,void 0,!0);(p=w.shift())!==void 0;)_.push(p);return _}function M(_,p,w,c,y){var g,b=_?_.inputmask:this,f=b.maskset,E=b.opts,S=b.dependencyLib,D=c.slice(),A="",N=-1,V=E.skipOptionalPartCharacter;E.skipOptionalPartCharacter="",v.resetMaskSet.call(b,!1),b.clicked=0,N=E.radixPoint?v.determineNewCaretPosition.call(b,{begin:0,end:0},!1,E.__financeInput===!1?"radixFocus":void 0).begin:0,f.p=N,b.caretPos={begin:N};var B=[],j=b.caretPos;if(D.forEach((function(U,K){if(U!==void 0){var Q=new S.Event("_checkval");Q.key=U,A+=U;var ie=v.getLastValidPosition.call(b,void 0,!0);(function(Y,H){for(var ee=F.getMaskTemplate.call(b,!0,0).slice(Y,v.seekNext.call(b,Y,!1,!1)).join("").replace(/'/g,""),X=ee.indexOf(H);X>0&&ee[X-1]===" ";)X--;var q=X===0&&!v.isMask.call(b,Y)&&(F.getTest.call(b,Y).match.nativeDef===H.charAt(0)||F.getTest.call(b,Y).match.static===!0&&F.getTest.call(b,Y).match.nativeDef==="'"+H.charAt(0)||F.getTest.call(b,Y).match.nativeDef===" "&&(F.getTest.call(b,Y+1).match.nativeDef===H.charAt(0)||F.getTest.call(b,Y+1).match.static===!0&&F.getTest.call(b,Y+1).match.nativeDef==="'"+H.charAt(0)));if(!q&&X>0&&!v.isMask.call(b,Y,!1,!0)){var oe=v.seekNext.call(b,Y);b.caretPos.begin<oe&&(b.caretPos={begin:oe})}return q})(N,A)?g=h.EventHandlers.keypressEvent.call(b,Q,!0,!1,w,ie+1):(g=h.EventHandlers.keypressEvent.call(b,Q,!0,!1,w,b.caretPos.begin))&&(N=b.caretPos.begin+1,A=""),g?(g.pos!==void 0&&f.validPositions[g.pos]&&f.validPositions[g.pos].match.static===!0&&f.validPositions[g.pos].alternation===void 0&&(B.push(g.pos),b.isRTL||(g.forwardPosition=g.pos+1)),k.call(b,void 0,v.getBuffer.call(b),g.forwardPosition,Q,!1),b.caretPos={begin:g.forwardPosition,end:g.forwardPosition},j=b.caretPos):f.validPositions[K]===void 0&&D[K]===F.getPlaceholder.call(b,K)&&v.isMask.call(b,K,!0)?b.caretPos.begin++:b.caretPos=j}})),B.length>0){var $,T,P=v.seekNext.call(b,-1,void 0,!1);if(!C.isComplete.call(b,v.getBuffer.call(b))&&B.length<=P||C.isComplete.call(b,v.getBuffer.call(b))&&B.length>0&&B.length!==P&&B[0]===0){for(var W=P;($=B.shift())!==void 0;)if($<W){var z=new S.Event("_checkval");if((T=f.validPositions[$]).generatedInput=!0,z.key=T.input,(g=h.EventHandlers.keypressEvent.call(b,z,!0,!1,w,W))&&g.pos!==void 0&&g.pos!==$&&f.validPositions[g.pos]&&f.validPositions[g.pos].match.static===!0)B.push(g.pos);else if(!g)break;W++}}}p&&k.call(b,_,v.getBuffer.call(b),g?g.forwardPosition:b.caretPos.begin,y||new S.Event("checkval"),y&&(y.type==="input"&&b.undoValue!==v.getBuffer.call(b).join("")||y.type==="paste")),E.skipOptionalPartCharacter=V}function k(_,p,w,c,y){var g=_?_.inputmask:this,b=g.opts,f=g.dependencyLib;if(c&&typeof b.onBeforeWrite=="function"){var E=b.onBeforeWrite.call(g,c,p,w,b);if(E){if(E.refreshFromBuffer){var S=E.refreshFromBuffer;C.refreshFromBuffer.call(g,S===!0?S:S.start,S.end,E.buffer||p),p=v.getBuffer.call(g,!0)}w!==void 0&&(w=E.caret!==void 0?E.caret:w)}}if(_!==void 0&&(_.inputmask._valueSet(p.join("")),w===void 0||c!==void 0&&c.type==="blur"||v.caret.call(g,_,w,void 0,void 0,c!==void 0&&c.type==="keydown"&&(c.key===m.keys.Delete||c.key===m.keys.Backspace)),_.inputmask.writeBufferHook===void 0||_.inputmask.writeBufferHook(w),y===!0)){var D=f(_),A=_.inputmask._valueGet();_.inputmask.skipInputEvent=!0,D.trigger("input"),setTimeout((function(){A===v.getBufferTemplate.call(g).join("")?D.trigger("cleared"):C.isComplete.call(g,p)===!0&&D.trigger("complete")}),0)}}},2394:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var u=w(l(3976)),h=w(l(7392)),m=w(l(4963)),v=l(9716),C=w(l(9380)),F=l(7760),x=l(157),R=l(2391),M=l(8711),k=l(7215),_=l(4713);function p(f){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(f)}function w(f){return f&&f.__esModule?f:{default:f}}var c=C.default.document,y="_inputmask_opts";function g(f,E,S){if(!(this instanceof g))return new g(f,E,S);this.dependencyLib=m.default,this.el=void 0,this.events={},this.maskset=void 0,S!==!0&&(Object.prototype.toString.call(f)==="[object Object]"?E=f:(E=E||{},f&&(E.alias=f)),this.opts=m.default.extend(!0,{},this.defaults,E),this.noMasksCache=E&&E.definitions!==void 0,this.userOptions=E||{},b(this.opts.alias,E,this.opts)),this.refreshValue=!1,this.undoValue=void 0,this.$el=void 0,this.skipInputEvent=!1,this.validationEvent=!1,this.ignorable=!1,this.maxLength,this.mouseEnter=!1,this.clicked=0,this.originalPlaceholder=void 0,this.isComposing=!1,this.hasAlternator=!1}function b(f,E,S){var D=g.prototype.aliases[f];return D?(D.alias&&b(D.alias,void 0,S),m.default.extend(!0,S,D),m.default.extend(!0,S,E),!0):(S.mask===null&&(S.mask=f),!1)}g.prototype={dataAttribute:"data-inputmask",defaults:u.default,definitions:h.default,aliases:{},masksCache:{},i18n:{},get isRTL(){return this.opts.isRTL||this.opts.numericInput},mask:function(f){var E=this;return typeof f=="string"&&(f=c.getElementById(f)||c.querySelectorAll(f)),(f=f.nodeName?[f]:Array.isArray(f)?f:[].slice.call(f)).forEach((function(S,D){var A=m.default.extend(!0,{},E.opts);if((function(V,B,j,$){function T(Q,ie){var Y=$===""?Q:$+"-"+Q;(ie=ie!==void 0?ie:V.getAttribute(Y))!==null&&(typeof ie=="string"&&(Q.indexOf("on")===0?ie=C.default[ie]:ie==="false"?ie=!1:ie==="true"&&(ie=!0)),j[Q]=ie)}if(B.importDataAttributes===!0){var P,W,z,U,K=V.getAttribute($);if(K&&K!==""&&(K=K.replace(/'/g,'"'),W=JSON.parse("{"+K+"}")),W){for(U in z=void 0,W)if(U.toLowerCase()==="alias"){z=W[U];break}}for(P in T("alias",z),j.alias&&b(j.alias,j,B),B){if(W){for(U in z=void 0,W)if(U.toLowerCase()===P.toLowerCase()){z=W[U];break}}T(P,z)}}return m.default.extend(!0,B,j),(V.dir==="rtl"||B.rightAlign)&&(V.style.textAlign="right"),(V.dir==="rtl"||B.numericInput)&&(V.dir="ltr",V.removeAttribute("dir"),B.isRTL=!0),Object.keys(j).length})(S,A,m.default.extend(!0,{},E.userOptions),E.dataAttribute)){var N=(0,R.generateMaskSet)(A,E.noMasksCache);N!==void 0&&(S.inputmask!==void 0&&(S.inputmask.opts.autoUnmask=!0,S.inputmask.remove()),S.inputmask=new g(void 0,void 0,!0),S.inputmask.opts=A,S.inputmask.noMasksCache=E.noMasksCache,S.inputmask.userOptions=m.default.extend(!0,{},E.userOptions),S.inputmask.el=S,S.inputmask.$el=(0,m.default)(S),S.inputmask.maskset=N,m.default.data(S,y,E.userOptions),x.mask.call(S.inputmask))}})),f&&f[0]&&f[0].inputmask||this},option:function(f,E){return typeof f=="string"?this.opts[f]:p(f)==="object"?(m.default.extend(this.userOptions,f),this.el&&E!==!0&&this.mask(this.el),this):void 0},unmaskedvalue:function(f){if(this.maskset=this.maskset||(0,R.generateMaskSet)(this.opts,this.noMasksCache),this.el===void 0||f!==void 0){var E=(typeof this.opts.onBeforeMask=="function"&&this.opts.onBeforeMask.call(this,f,this.opts)||f).split("");F.checkVal.call(this,void 0,!1,!1,E),typeof this.opts.onBeforeWrite=="function"&&this.opts.onBeforeWrite.call(this,void 0,M.getBuffer.call(this),0,this.opts)}return F.unmaskedvalue.call(this,this.el)},remove:function(){if(this.el){m.default.data(this.el,y,null);var f=this.opts.autoUnmask?(0,F.unmaskedvalue)(this.el):this._valueGet(this.opts.autoUnmask);f!==M.getBufferTemplate.call(this).join("")?this._valueSet(f,this.opts.autoUnmask):this._valueSet(""),v.EventRuler.off(this.el),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el),"value")&&this.__valueGet&&Object.defineProperty(this.el,"value",{get:this.__valueGet,set:this.__valueSet,configurable:!0}):c.__lookupGetter__&&this.el.__lookupGetter__("value")&&this.__valueGet&&(this.el.__defineGetter__("value",this.__valueGet),this.el.__defineSetter__("value",this.__valueSet)),this.el.inputmask=void 0}return this.el},getemptymask:function(){return this.maskset=this.maskset||(0,R.generateMaskSet)(this.opts,this.noMasksCache),(this.isRTL?M.getBufferTemplate.call(this).reverse():M.getBufferTemplate.call(this)).join("")},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||(0,R.generateMaskSet)(this.opts,this.noMasksCache),k.isComplete.call(this,M.getBuffer.call(this))},getmetadata:function(){if(this.maskset=this.maskset||(0,R.generateMaskSet)(this.opts,this.noMasksCache),Array.isArray(this.maskset.metadata)){var f=_.getMaskTemplate.call(this,!0,0,!1).join("");return this.maskset.metadata.forEach((function(E){return E.mask!==f||(f=E,!1)})),f}return this.maskset.metadata},isValid:function(f){if(this.maskset=this.maskset||(0,R.generateMaskSet)(this.opts,this.noMasksCache),f){var E=(typeof this.opts.onBeforeMask=="function"&&this.opts.onBeforeMask.call(this,f,this.opts)||f).split("");F.checkVal.call(this,void 0,!0,!1,E)}else f=this.isRTL?M.getBuffer.call(this).slice().reverse().join(""):M.getBuffer.call(this).join("");for(var S=M.getBuffer.call(this),D=M.determineLastRequiredPosition.call(this),A=S.length-1;A>D&&!M.isMask.call(this,A);A--);return S.splice(D,A+1-D),k.isComplete.call(this,S)&&f===(this.isRTL?M.getBuffer.call(this).slice().reverse().join(""):M.getBuffer.call(this).join(""))},format:function(f,E){this.maskset=this.maskset||(0,R.generateMaskSet)(this.opts,this.noMasksCache);var S=(typeof this.opts.onBeforeMask=="function"&&this.opts.onBeforeMask.call(this,f,this.opts)||f).split("");F.checkVal.call(this,void 0,!0,!1,S);var D=this.isRTL?M.getBuffer.call(this).slice().reverse().join(""):M.getBuffer.call(this).join("");return E?{value:D,metadata:this.getmetadata()}:D},setValue:function(f){this.el&&(0,m.default)(this.el).trigger("setvalue",[f])},analyseMask:R.analyseMask},g.extendDefaults=function(f){m.default.extend(!0,g.prototype.defaults,f)},g.extendDefinitions=function(f){m.default.extend(!0,g.prototype.definitions,f)},g.extendAliases=function(f){m.default.extend(!0,g.prototype.aliases,f)},g.format=function(f,E,S){return g(E).format(f,S)},g.unmask=function(f,E){return g(E).unmaskedvalue(f)},g.isValid=function(f,E){return g(E).isValid(f)},g.remove=function(f){typeof f=="string"&&(f=c.getElementById(f)||c.querySelectorAll(f)),(f=f.nodeName?[f]:f).forEach((function(E){E.inputmask&&E.inputmask.remove()}))},g.setValue=function(f,E){typeof f=="string"&&(f=c.getElementById(f)||c.querySelectorAll(f)),(f=f.nodeName?[f]:f).forEach((function(S){S.inputmask?S.inputmask.setValue(E):(0,m.default)(S).trigger("setvalue",[E])}))},g.dependencyLib=m.default,C.default.Inputmask=g,o.default=g},5296:function(a,o,l){function u(c){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},u(c)}var h=_(l(9380)),m=_(l(2394));function v(c,y){for(var g=0;g<y.length;g++){var b=y[g];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(c,(f=b.key,E=void 0,E=(function(S,D){if(u(S)!=="object"||S===null)return S;var A=S[Symbol.toPrimitive];if(A!==void 0){var N=A.call(S,D);if(u(N)!=="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)(S)})(f,"string"),u(E)==="symbol"?E:String(E)),b)}var f,E}function C(c){var y=R();return function(){var g,b=k(c);if(y){var f=k(this).constructor;g=Reflect.construct(b,arguments,f)}else g=b.apply(this,arguments);return(function(E,S){if(S&&(u(S)==="object"||typeof S=="function"))return S;if(S!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D})(E)})(this,g)}}function F(c){var y=typeof Map=="function"?new Map:void 0;return F=function(g){if(g===null||!(function(f){try{return Function.toString.call(f).indexOf("[native code]")!==-1}catch{return typeof f=="function"}})(g))return g;if(typeof g!="function")throw new TypeError("Super expression must either be null or a function");if(y!==void 0){if(y.has(g))return y.get(g);y.set(g,b)}function b(){return x(g,arguments,k(this).constructor)}return b.prototype=Object.create(g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),M(b,g)},F(c)}function x(c,y,g){return x=R()?Reflect.construct.bind():function(b,f,E){var S=[null];S.push.apply(S,f);var D=new(Function.bind.apply(b,S));return E&&M(D,E.prototype),D},x.apply(null,arguments)}function R(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function M(c,y){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,b){return g.__proto__=b,g},M(c,y)}function k(c){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y)},k(c)}function _(c){return c&&c.__esModule?c:{default:c}}var p=h.default.document;if(p&&p.head&&p.head.attachShadow&&h.default.customElements&&h.default.customElements.get("input-mask")===void 0){var w=(function(c){(function(E,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(S&&S.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),S&&M(E,S)})(f,c);var y,g,b=C(f);function f(){var E;(function(V,B){if(!(V instanceof B))throw new TypeError("Cannot call a class as a function")})(this,f);var S=(E=b.call(this)).getAttributeNames(),D=E.attachShadow({mode:"closed"});for(var A in E.input=p.createElement("input"),E.input.type="text",D.appendChild(E.input),S)Object.prototype.hasOwnProperty.call(S,A)&&E.input.setAttribute(S[A],E.getAttribute(S[A]));var N=new m.default;return N.dataAttribute="",N.mask(E.input),E.input.inputmask.shadowRoot=D,E}return y=f,(g=[{key:"attributeChangedCallback",value:function(E,S,D){this.input.setAttribute(E,D)}},{key:"value",get:function(){return this.input.value},set:function(E){this.input.value=E}}])&&v(y.prototype,g),Object.defineProperty(y,"prototype",{writable:!1}),f})(F(HTMLElement));h.default.customElements.define("input-mask",w)}},2839:function(a,o){function l(x){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},l(x)}function u(x,R){return(function(M){if(Array.isArray(M))return M})(x)||(function(M,k){var _=M==null?null:typeof Symbol<"u"&&M[Symbol.iterator]||M["@@iterator"];if(_!=null){var p,w,c,y,g=[],b=!0,f=!1;try{if(c=(_=_.call(M)).next,k!==0)for(;!(b=(p=c.call(_)).done)&&(g.push(p.value),g.length!==k);b=!0);}catch(E){f=!0,w=E}finally{try{if(!b&&_.return!=null&&(y=_.return(),Object(y)!==y))return}finally{if(f)throw w}}return g}})(x,R)||(function(M,k){if(M){if(typeof M=="string")return h(M,k);var _=Object.prototype.toString.call(M).slice(8,-1);if(_==="Object"&&M.constructor&&(_=M.constructor.name),_==="Map"||_==="Set")return Array.from(M);if(_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_))return h(M,k)}})(x,R)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
12
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function h(x,R){(R==null||R>x.length)&&(R=x.length);for(var M=0,k=new Array(R);M<R;M++)k[M]=x[M];return k}function m(x,R){var M=Object.keys(x);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(x);R&&(k=k.filter((function(_){return Object.getOwnPropertyDescriptor(x,_).enumerable}))),M.push.apply(M,k)}return M}function v(x,R,M){return(R=(function(k){var _=(function(p,w){if(l(p)!=="object"||p===null)return p;var c=p[Symbol.toPrimitive];if(c!==void 0){var y=c.call(p,w);if(l(y)!=="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(p)})(k,"string");return l(_)==="symbol"?_:String(_)})(R))in x?Object.defineProperty(x,R,{value:M,enumerable:!0,configurable:!0,writable:!0}):x[R]=M,x}Object.defineProperty(o,"__esModule",{value:!0}),o.keys=o.keyCode=void 0,o.toKey=function(x,R){return F[x]||(R?String.fromCharCode(x):String.fromCharCode(x).toLowerCase())},o.toKeyCode=function(x){return C[x]};var C=o.keyCode=(function(x){for(var R=1;R<arguments.length;R++){var M=arguments[R]!=null?arguments[R]:{};R%2?m(Object(M),!0).forEach((function(k){v(x,k,M[k])})):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(M)):m(Object(M)).forEach((function(k){Object.defineProperty(x,k,Object.getOwnPropertyDescriptor(M,k))}))}return x})({c:67,x:88,z:90,BACKSPACE_SAFARI:127,Enter:13,Meta_LEFT:91,Meta_RIGHT:92,Space:32},{Alt:18,AltGraph:18,ArrowDown:40,ArrowLeft:37,ArrowRight:39,ArrowUp:38,Backspace:8,CapsLock:20,Control:17,ContextMenu:93,Dead:221,Delete:46,End:35,Escape:27,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,Home:36,Insert:45,NumLock:144,PageDown:34,PageUp:33,Pause:19,PrintScreen:44,Process:229,Shift:16,ScrollLock:145,Tab:9,Unidentified:229}),F=Object.entries(C).reduce((function(x,R){var M=u(R,2),k=M[0],_=M[1];return x[_]=x[_]===void 0?k:x[_],x}),{});o.keys=Object.entries(C).reduce((function(x,R){var M=u(R,2),k=M[0];return M[1],x[k]=k==="Space"?" ":k,x}),{})},2391:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.analyseMask=function(R,M,k){var _,p,w,c,y,g,b=/(?:[?*+]|\{[0-9+*]+(?:,[0-9+*]*)?(?:\|[0-9+*]*)?\})|[^.?*+^${[]()|\\]+|./g,f=/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,E=!1,S=new v.default,D=[],A=[],N=!1;function V(X,q,oe){oe=oe!==void 0?oe:X.matches.length;var ne=X.matches[oe-1];if(M){if(q.indexOf("[")===0||E&&/\\d|\\s|\\w|\\p/i.test(q)||q==="."){var me=k.casing?"i":"";/\\p\{.*}/i.test(q)&&(me+="u"),X.matches.splice(oe++,0,{fn:new RegExp(q,me),static:!1,optionality:!1,newBlockMarker:ne===void 0?"master":ne.def!==q,casing:null,def:q,placeholder:C(k.placeholder)==="object"?k.placeholder[S.matches.length]:void 0,nativeDef:q})}else E&&(q=q[q.length-1]),q.split("").forEach((function(xe,je){ne=X.matches[oe-1],X.matches.splice(oe++,0,{fn:/[a-z]/i.test(k.staticDefinitionSymbol||xe)?new RegExp("["+(k.staticDefinitionSymbol||xe)+"]",k.casing?"i":""):null,static:!0,optionality:!1,newBlockMarker:ne===void 0?"master":ne.def!==xe&&ne.static!==!0,casing:null,def:k.staticDefinitionSymbol||xe,placeholder:k.staticDefinitionSymbol!==void 0?xe:C(k.placeholder)==="object"?k.placeholder[S.matches.length]:void 0,nativeDef:(E?"'":"")+xe})}));E=!1}else{var be=k.definitions&&k.definitions[q]||k.usePrototypeDefinitions&&m.default.prototype.definitions[q];be&&!E?X.matches.splice(oe++,0,{fn:be.validator?typeof be.validator=="string"?new RegExp(be.validator,k.casing?"i":""):new function(){this.test=be.validator}:/./,static:be.static||!1,optionality:be.optional||!1,defOptionality:be.optional||!1,newBlockMarker:ne===void 0||be.optional?"master":ne.def!==(be.definitionSymbol||q),casing:be.casing,def:be.definitionSymbol||q,placeholder:be.placeholder,nativeDef:q,generated:be.generated}):(X.matches.splice(oe++,0,{fn:/[a-z]/i.test(k.staticDefinitionSymbol||q)?new RegExp("["+(k.staticDefinitionSymbol||q)+"]",k.casing?"i":""):null,static:!0,optionality:!1,newBlockMarker:ne===void 0?"master":ne.def!==q&&ne.static!==!0,casing:null,def:k.staticDefinitionSymbol||q,placeholder:k.staticDefinitionSymbol!==void 0?q:void 0,nativeDef:(E?"'":"")+q}),E=!1)}}function B(){if(D.length>0){if(V(c=D[D.length-1],p),c.isAlternator){y=D.pop();for(var X=0;X<y.matches.length;X++)y.matches[X].isGroup&&(y.matches[X].isGroup=!1);D.length>0?(c=D[D.length-1]).matches.push(y):S.matches.push(y)}}else V(S,p)}function j(X){var q=new v.default(!0);return q.openGroup=!1,q.matches=X,q}function $(){if((w=D.pop()).openGroup=!1,w!==void 0)if(D.length>0){if((c=D[D.length-1]).matches.push(w),c.isAlternator){y=D.pop();for(var X=0;X<y.matches.length;X++)y.matches[X].isGroup=!1,y.matches[X].alternatorGroup=!1;D.length>0?(c=D[D.length-1]).matches.push(y):S.matches.push(y)}}else S.matches.push(w);else B()}function T(X){var q=X.pop();return q.isQuantifier&&(q=j([X.pop(),q])),q}for(M&&(k.optionalmarker[0]=void 0,k.optionalmarker[1]=void 0);_=M?f.exec(R):b.exec(R);){if(p=_[0],M){switch(p.charAt(0)){case"?":p="{0,1}";break;case"+":case"*":p="{"+p+"}";break;case"|":if(D.length===0){var P=j(S.matches);P.openGroup=!0,D.push(P),S.matches=[],N=!0}}switch(p){case"\\d":p="[0-9]";break;case"\\p":p+=f.exec(R)[0],p+=f.exec(R)[0]}}if(E)B();else switch(p.charAt(0)){case"$":case"^":M||B();break;case k.escapeChar:E=!0,M&&B();break;case k.optionalmarker[1]:case k.groupmarker[1]:$();break;case k.optionalmarker[0]:D.push(new v.default(!1,!0));break;case k.groupmarker[0]:D.push(new v.default(!0));break;case k.quantifiermarker[0]:var W=new v.default(!1,!1,!0),z=(p=p.replace(/[{}?]/g,"")).split("|"),U=z[0].split(","),K=isNaN(U[0])?U[0]:parseInt(U[0]),Q=U.length===1?K:isNaN(U[1])?U[1]:parseInt(U[1]),ie=isNaN(z[1])?z[1]:parseInt(z[1]);K!=="*"&&K!=="+"||(K=Q==="*"?0:1),W.quantifier={min:K,max:Q,jit:ie};var Y=D.length>0?D[D.length-1].matches:S.matches;(_=Y.pop()).isGroup||(_=j([_])),Y.push(_),Y.push(W);break;case k.alternatormarker:if(D.length>0){var H=(c=D[D.length-1]).matches[c.matches.length-1];g=c.openGroup&&(H.matches===void 0||H.isGroup===!1&&H.isAlternator===!1)?D.pop():T(c.matches)}else g=T(S.matches);if(g.isAlternator)D.push(g);else if(g.alternatorGroup?(y=D.pop(),g.alternatorGroup=!1):y=new v.default(!1,!1,!1,!0),y.matches.push(g),D.push(y),g.openGroup){g.openGroup=!1;var ee=new v.default(!0);ee.alternatorGroup=!0,D.push(ee)}break;default:B()}}for(N&&$();D.length>0;)w=D.pop(),S.matches.push(w);return S.matches.length>0&&((function X(q){q&&q.matches&&q.matches.forEach((function(oe,ne){var me=q.matches[ne+1];(me===void 0||me.matches===void 0||me.isQuantifier===!1)&&oe&&oe.isGroup&&(oe.isGroup=!1,M||(V(oe,k.groupmarker[0],0),oe.openGroup!==!0&&V(oe,k.groupmarker[1]))),X(oe)}))})(S),A.push(S)),(k.numericInput||k.isRTL)&&(function X(q){for(var oe in q.matches=q.matches.reverse(),q.matches)if(Object.prototype.hasOwnProperty.call(q.matches,oe)){var ne=parseInt(oe);if(q.matches[oe].isQuantifier&&q.matches[ne+1]&&q.matches[ne+1].isGroup){var me=q.matches[oe];q.matches.splice(oe,1),q.matches.splice(ne+1,0,me)}q.matches[oe].matches!==void 0?q.matches[oe]=X(q.matches[oe]):q.matches[oe]=((be=q.matches[oe])===k.optionalmarker[0]?be=k.optionalmarker[1]:be===k.optionalmarker[1]?be=k.optionalmarker[0]:be===k.groupmarker[0]?be=k.groupmarker[1]:be===k.groupmarker[1]&&(be=k.groupmarker[0]),be)}var be;return q})(A[0]),A},o.generateMaskSet=function(R,M){var k;function _(c,y){var g=y.repeat,b=y.groupmarker,f=y.quantifiermarker,E=y.keepStatic;if(g>0||g==="*"||g==="+"){var S=g==="*"?0:g==="+"?1:g;if(S!=g)c=b[0]+c+b[1]+f[0]+S+","+g+f[1];else for(var D=c,A=1;A<S;A++)c+=D}if(E===!0){var N=c.match(new RegExp("(.)\\[([^\\]]*)\\]","g"));N&&N.forEach((function(V,B){var j=(function(P,W){return(function(z){if(Array.isArray(z))return z})(P)||(function(z,U){var K=z==null?null:typeof Symbol<"u"&&z[Symbol.iterator]||z["@@iterator"];if(K!=null){var Q,ie,Y,H,ee=[],X=!0,q=!1;try{if(Y=(K=K.call(z)).next,U!==0)for(;!(X=(Q=Y.call(K)).done)&&(ee.push(Q.value),ee.length!==U);X=!0);}catch(oe){q=!0,ie=oe}finally{try{if(!X&&K.return!=null&&(H=K.return(),Object(H)!==H))return}finally{if(q)throw ie}}return ee}})(P,W)||(function(z,U){if(z){if(typeof z=="string")return F(z,U);var K=Object.prototype.toString.call(z).slice(8,-1);if(K==="Object"&&z.constructor&&(K=z.constructor.name),K==="Map"||K==="Set")return Array.from(z);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return F(z,U)}})(P,W)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
13
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(V.split("["),2),$=j[0],T=j[1];T=T.replace("]",""),c=c.replace(new RegExp("".concat((0,h.default)($),"\\[").concat((0,h.default)(T),"\\]")),$.charAt(0)===T.charAt(0)?"(".concat($,"|").concat($).concat(T,")"):"".concat($,"[").concat(T,"]"))}))}return c}function p(c,y,g){var b,f,E=!1;return c!==null&&c!==""||((E=g.regex!==null)?c=(c=g.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(E=!0,c=".*")),c.length===1&&g.greedy===!1&&g.repeat!==0&&(g.placeholder=""),c=_(c,g),f=E?"regex_"+g.regex:g.numericInput?c.split("").reverse().join(""):c,g.keepStatic!==null&&(f="ks_"+g.keepStatic+f),C(g.placeholder)==="object"&&(f="ph_"+JSON.stringify(g.placeholder)+f),m.default.prototype.masksCache[f]===void 0||M===!0?(b={mask:c,maskToken:m.default.prototype.analyseMask(c,E,g),validPositions:[],_buffer:void 0,buffer:void 0,tests:{},excludes:{},metadata:y,maskLength:void 0,jitOffset:{}},M!==!0&&(m.default.prototype.masksCache[f]=b,b=u.default.extend(!0,{},m.default.prototype.masksCache[f]))):b=u.default.extend(!0,{},m.default.prototype.masksCache[f]),b}if(typeof R.mask=="function"&&(R.mask=R.mask(R)),Array.isArray(R.mask)){if(R.mask.length>1){R.keepStatic===null&&(R.keepStatic=!0);var w=R.groupmarker[0];return(R.isRTL?R.mask.reverse():R.mask).forEach((function(c){w.length>1&&(w+=R.alternatormarker),c.mask!==void 0&&typeof c.mask!="function"?w+=c.mask:w+=c})),p(w+=R.groupmarker[1],R.mask,R)}R.mask=R.mask.pop()}return k=R.mask&&R.mask.mask!==void 0&&typeof R.mask.mask!="function"?p(R.mask.mask,R.mask,R):p(R.mask,R.mask,R),R.keepStatic===null&&(R.keepStatic=!1),k};var u=x(l(4963)),h=x(l(7184)),m=x(l(2394)),v=x(l(9695));function C(R){return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},C(R)}function F(R,M){(M==null||M>R.length)&&(M=R.length);for(var k=0,_=new Array(M);k<M;k++)_[k]=R[k];return _}function x(R){return R&&R.__esModule?R:{default:R}}},157:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.mask=function(){var x=this,R=this.opts,M=this.el,k=this.dependencyLib;m.EventRuler.off(M);var _=(function(c,y){var g=c.getAttribute("type"),b=c.tagName.toLowerCase()==="input"&&y.supportsInputType.includes(g)||c.isContentEditable||c.tagName.toLowerCase()==="textarea";if(!b)if(c.tagName.toLowerCase()==="input"){var f=document.createElement("input");f.setAttribute("type",g),b=f.type==="text",f=null}else b="partial";return b!==!1?(function(E){var S,D;function A(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():C.getLastValidPosition.call(x)!==-1||y.nullable!==!0?(this.inputmask.shadowRoot||this.ownerDocument).activeElement===this&&y.clearMaskOnLostFocus?(x.isRTL?v.clearOptionalTail.call(x,C.getBuffer.call(x).slice()).reverse():v.clearOptionalTail.call(x,C.getBuffer.call(x).slice())).join(""):S.call(this):"":S.call(this)}function N(B){D.call(this,B),this.inputmask&&(0,v.applyInputValue)(this,B)}if(!E.inputmask.__valueGet){if(y.noValuePatching!==!0){if(Object.getOwnPropertyDescriptor){var V=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(E),"value"):void 0;V&&V.get&&V.set?(S=V.get,D=V.set,Object.defineProperty(E,"value",{get:A,set:N,configurable:!0})):E.tagName.toLowerCase()!=="input"&&(S=function(){return this.textContent},D=function(B){this.textContent=B},Object.defineProperty(E,"value",{get:A,set:N,configurable:!0}))}else document.__lookupGetter__&&E.__lookupGetter__("value")&&(S=E.__lookupGetter__("value"),D=E.__lookupSetter__("value"),E.__defineGetter__("value",A),E.__defineSetter__("value",N));E.inputmask.__valueGet=S,E.inputmask.__valueSet=D}E.inputmask._valueGet=function(B){return x.isRTL&&B!==!0?S.call(this.el).split("").reverse().join(""):S.call(this.el)},E.inputmask._valueSet=function(B,j){D.call(this.el,B==null?"":j!==!0&&x.isRTL?B.split("").reverse().join(""):B)},S===void 0&&(S=function(){return this.value},D=function(B){this.value=B},(function(B){if(k.valHooks&&(k.valHooks[B]===void 0||k.valHooks[B].inputmaskpatch!==!0)){var j=k.valHooks[B]&&k.valHooks[B].get?k.valHooks[B].get:function(T){return T.value},$=k.valHooks[B]&&k.valHooks[B].set?k.valHooks[B].set:function(T,P){return T.value=P,T};k.valHooks[B]={get:function(T){if(T.inputmask){if(T.inputmask.opts.autoUnmask)return T.inputmask.unmaskedvalue();var P=j(T);return C.getLastValidPosition.call(x,void 0,void 0,T.inputmask.maskset.validPositions)!==-1||y.nullable!==!0?P:""}return j(T)},set:function(T,P){var W=$(T,P);return T.inputmask&&(0,v.applyInputValue)(T,P),W},inputmaskpatch:!0}}})(E.type),(function(B){m.EventRuler.on(B,"mouseenter",(function(){var j=this,$=j.inputmask._valueGet(!0);$!=(j.inputmask.isRTL?C.getBuffer.call(j.inputmask).slice().reverse():C.getBuffer.call(j.inputmask)).join("")&&(0,v.applyInputValue)(j,$)}))})(E))}})(c):c.inputmask=void 0,b})(M,R);if(_!==!1){x.originalPlaceholder=M.placeholder,x.maxLength=M!==void 0?M.maxLength:void 0,x.maxLength===-1&&(x.maxLength=void 0),"inputMode"in M&&M.getAttribute("inputmode")===null&&(M.inputMode=R.inputmode,M.setAttribute("inputmode",R.inputmode)),_===!0&&(R.showMaskOnFocus=R.showMaskOnFocus&&["cc-number","cc-exp"].indexOf(M.autocomplete)===-1,u.iphone&&(R.insertModeVisual=!1,M.setAttribute("autocorrect","off")),m.EventRuler.on(M,"submit",h.EventHandlers.submitEvent),m.EventRuler.on(M,"reset",h.EventHandlers.resetEvent),m.EventRuler.on(M,"blur",h.EventHandlers.blurEvent),m.EventRuler.on(M,"focus",h.EventHandlers.focusEvent),m.EventRuler.on(M,"invalid",h.EventHandlers.invalidEvent),m.EventRuler.on(M,"click",h.EventHandlers.clickEvent),m.EventRuler.on(M,"mouseleave",h.EventHandlers.mouseleaveEvent),m.EventRuler.on(M,"mouseenter",h.EventHandlers.mouseenterEvent),m.EventRuler.on(M,"paste",h.EventHandlers.pasteEvent),m.EventRuler.on(M,"cut",h.EventHandlers.cutEvent),m.EventRuler.on(M,"complete",R.oncomplete),m.EventRuler.on(M,"incomplete",R.onincomplete),m.EventRuler.on(M,"cleared",R.oncleared),R.inputEventOnly!==!0&&m.EventRuler.on(M,"keydown",h.EventHandlers.keyEvent),(u.mobile||R.inputEventOnly)&&M.removeAttribute("maxLength"),m.EventRuler.on(M,"input",h.EventHandlers.inputFallBackEvent)),m.EventRuler.on(M,"setvalue",h.EventHandlers.setValueEvent),x.applyMaskHook===void 0||x.applyMaskHook(),C.getBufferTemplate.call(x).join(""),x.undoValue=x._valueGet(!0);var p=(M.inputmask.shadowRoot||M.ownerDocument).activeElement;if(M.inputmask._valueGet(!0)!==""||R.clearMaskOnLostFocus===!1||p===M){(0,v.applyInputValue)(M,M.inputmask._valueGet(!0),R);var w=C.getBuffer.call(x).slice();F.isComplete.call(x,w)===!1&&R.clearIncomplete&&C.resetMaskSet.call(x,!1),R.clearMaskOnLostFocus&&p!==M&&(C.getLastValidPosition.call(x)===-1?w=[]:v.clearOptionalTail.call(x,w)),(R.clearMaskOnLostFocus===!1||R.showMaskOnFocus&&p===M||M.inputmask._valueGet(!0)!=="")&&(0,v.writeBuffer)(M,w),p===M&&C.caret.call(x,M,C.seekNext.call(x,C.getLastValidPosition.call(x)))}}};var u=l(9845),h=l(6030),m=l(9716),v=l(7760),C=l(8711),F=l(7215)},9695:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(l,u,h,m){this.matches=[],this.openGroup=l||!1,this.alternatorGroup=!1,this.isGroup=l||!1,this.isOptional=u||!1,this.isQuantifier=h||!1,this.isAlternator=m||!1,this.quantifier={min:1,max:1}}},3194:function(){Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(a,o){if(this==null)throw new TypeError('"this" is null or not defined');var l=Object(this),u=l.length>>>0;if(u===0)return!1;for(var h=0|o,m=Math.max(h>=0?h:u-Math.abs(h),0);m<u;){if(l[m]===a)return!0;m++}return!1}})},9302:function(){var a=Function.bind.call(Function.call,Array.prototype.reduce),o=Function.bind.call(Function.call,Object.prototype.propertyIsEnumerable),l=Function.bind.call(Function.call,Array.prototype.concat),u=Object.keys;Object.entries||(Object.entries=function(h){return a(u(h),(function(m,v){return l(m,typeof v=="string"&&o(h,v)?[[v,h[v]]]:[])}),[])})},7149:function(){function a(o){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},a(o)}typeof Object.getPrototypeOf!="function"&&(Object.getPrototypeOf=a("test".__proto__)==="object"?function(o){return o.__proto__}:function(o){return o.constructor.prototype})},4013:function(){String.prototype.includes||(String.prototype.includes=function(a,o){return typeof o!="number"&&(o=0),!(o+a.length>this.length)&&this.indexOf(a,o)!==-1})},8711:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.caret=function(k,_,p,w,c){var y,g=this,b=this.opts;if(_===void 0)return"selectionStart"in k&&"selectionEnd"in k?(_=k.selectionStart,p=k.selectionEnd):h.default.getSelection?(y=h.default.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==k&&y.commonAncestorContainer!==k||(_=y.startOffset,p=y.endOffset):document.selection&&document.selection.createRange&&(p=(_=0-(y=document.selection.createRange()).duplicate().moveStart("character",-k.inputmask._valueGet().length))+y.text.length),{begin:w?_:M.call(g,_),end:w?p:M.call(g,p)};if(Array.isArray(_)&&(p=g.isRTL?_[0]:_[1],_=g.isRTL?_[1]:_[0]),_.begin!==void 0&&(p=g.isRTL?_.begin:_.end,_=g.isRTL?_.end:_.begin),typeof _=="number"){_=w?_:M.call(g,_),p=typeof(p=w?p:M.call(g,p))=="number"?p:_;var f=parseInt(((k.ownerDocument.defaultView||h.default).getComputedStyle?(k.ownerDocument.defaultView||h.default).getComputedStyle(k,null):k.currentStyle).fontSize)*p;if(k.scrollLeft=f>k.scrollWidth?f:0,k.inputmask.caretPos={begin:_,end:p},b.insertModeVisual&&b.insertMode===!1&&_===p&&(c||p++),k===(k.inputmask.shadowRoot||k.ownerDocument).activeElement){if("setSelectionRange"in k)k.setSelectionRange(_,p);else if(h.default.getSelection){if(y=document.createRange(),k.firstChild===void 0||k.firstChild===null){var E=document.createTextNode("");k.appendChild(E)}y.setStart(k.firstChild,_<k.inputmask._valueGet().length?_:k.inputmask._valueGet().length),y.setEnd(k.firstChild,p<k.inputmask._valueGet().length?p:k.inputmask._valueGet().length),y.collapse(!0);var S=h.default.getSelection();S.removeAllRanges(),S.addRange(y)}else k.createTextRange&&((y=k.createTextRange()).collapse(!0),y.moveEnd("character",p),y.moveStart("character",_),y.select());k.inputmask.caretHook===void 0||k.inputmask.caretHook.call(g,{begin:_,end:p})}}},o.determineLastRequiredPosition=function(k){var _,p,w=this,c=w.maskset,y=w.dependencyLib,g=F.call(w),b={},f=c.validPositions[g],E=v.getMaskTemplate.call(w,!0,F.call(w),!0,!0),S=E.length,D=f!==void 0?f.locator.slice():void 0;for(_=g+1;_<E.length;_++)D=(p=v.getTestTemplate.call(w,_,D,_-1)).locator.slice(),b[_]=y.extend(!0,{},p);var A=f&&f.alternation!==void 0?f.locator[f.alternation]:void 0;for(_=S-1;_>g&&((p=b[_]).match.optionality||p.match.optionalQuantifier&&p.match.newBlockMarker||A&&(A!==b[_].locator[f.alternation]&&p.match.static!==!0||p.match.static===!0&&p.locator[f.alternation]&&m.checkAlternationMatch.call(w,p.locator[f.alternation].toString().split(","),A.toString().split(","))&&v.getTests.call(w,_)[0].def!==""))&&E[_]===v.getPlaceholder.call(w,_,p.match);_--)S--;return k?{l:S,def:b[S]?b[S].match:void 0}:S},o.determineNewCaretPosition=function(k,_,p){var w,c,y,g=this,b=g.maskset,f=g.opts;if(_&&(g.isRTL?k.end=k.begin:k.begin=k.end),k.begin===k.end){switch(p=p||f.positionCaretOnClick){case"none":break;case"select":k={begin:0,end:C.call(g).length};break;case"ignore":k.end=k.begin=R.call(g,F.call(g));break;case"radixFocus":if(g.clicked>1&&b.validPositions.length===0)break;if((function(V){if(f.radixPoint!==""&&f.digits!==0){var B=b.validPositions;if(B[V]===void 0||B[V].input===void 0){if(V<R.call(g,-1))return!0;var j=C.call(g).indexOf(f.radixPoint);if(j!==-1){for(var $=0,T=B.length;$<T;$++)if(B[$]&&j<$&&B[$].input!==v.getPlaceholder.call(g,$))return!1;return!0}}}return!1})(k.begin)){var E=C.call(g).join("").indexOf(f.radixPoint);k.end=k.begin=f.numericInput?R.call(g,E):E;break}default:if(w=k.begin,c=F.call(g,w,!0),w<=(y=R.call(g,c!==-1||x.call(g,0)?c:-1)))k.end=k.begin=x.call(g,w,!1,!0)?w:R.call(g,w);else{var S=b.validPositions[c],D=v.getTestTemplate.call(g,y,S?S.match.locator:void 0,S),A=v.getPlaceholder.call(g,y,D.match);if(A!==""&&C.call(g)[y]!==A&&D.match.optionalQuantifier!==!0&&D.match.newBlockMarker!==!0||!x.call(g,y,f.keepStatic,!0)&&D.match.def===A){var N=R.call(g,y);(w>=N||w===y)&&(y=N)}k.end=k.begin=y}}return k}},o.getBuffer=C,o.getBufferTemplate=function(){var k=this.maskset;return k._buffer===void 0&&(k._buffer=v.getMaskTemplate.call(this,!1,1),k.buffer===void 0&&(k.buffer=k._buffer.slice())),k._buffer},o.getLastValidPosition=F,o.isMask=x,o.resetMaskSet=function(k){var _=this.maskset;_.buffer=void 0,k!==!0&&(_.validPositions=[],_.p=0),k===!1&&(_.tests={},_.jitOffset={})},o.seekNext=R,o.seekPrevious=function(k,_){var p=this,w=k-1;if(k<=0)return 0;for(;w>0&&(_===!0&&(v.getTest.call(p,w).match.newBlockMarker!==!0||!x.call(p,w,void 0,!0))||_!==!0&&!x.call(p,w,void 0,!0));)w--;return w},o.translatePosition=M;var u,h=(u=l(9380))&&u.__esModule?u:{default:u},m=l(7215),v=l(4713);function C(k){var _=this,p=_.maskset;return p.buffer!==void 0&&k!==!0||(p.buffer=v.getMaskTemplate.call(_,!0,F.call(_),!0),p._buffer===void 0&&(p._buffer=p.buffer.slice())),p.buffer}function F(k,_,p){var w=this.maskset,c=-1,y=-1,g=p||w.validPositions;k===void 0&&(k=-1);for(var b=0,f=g.length;b<f;b++)g[b]&&(_||g[b].generatedInput!==!0)&&(b<=k&&(c=b),b>=k&&(y=b));return c===-1||c===k?y:y===-1||k-c<y-k?c:y}function x(k,_,p){var w=this,c=this.maskset,y=v.getTestTemplate.call(w,k).match;if(y.def===""&&(y=v.getTest.call(w,k).match),y.static!==!0)return y.fn;if(p===!0&&c.validPositions[k]!==void 0&&c.validPositions[k].generatedInput!==!0)return!0;if(_!==!0&&k>-1){if(p){var g=v.getTests.call(w,k);return g.length>1+(g[g.length-1].match.def===""?1:0)}var b=v.determineTestTemplate.call(w,k,v.getTests.call(w,k)),f=v.getPlaceholder.call(w,k,b.match);return b.match.def!==f}return!1}function R(k,_,p){var w=this;p===void 0&&(p=!0);for(var c=k+1;v.getTest.call(w,c).match.def!==""&&(_===!0&&(v.getTest.call(w,c).match.newBlockMarker!==!0||!x.call(w,c,void 0,!0))||_!==!0&&!x.call(w,c,void 0,p));)c++;return c}function M(k){var _=this.opts,p=this.el;return!this.isRTL||typeof k!="number"||_.greedy&&_.placeholder===""||!p||(k=this._valueGet().length-k)<0&&(k=0),k}},4713:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.determineTestTemplate=M,o.getDecisionTaker=F,o.getMaskTemplate=function(w,c,y,g,b){var f=this,E=this.opts,S=this.maskset,D=E.greedy;b&&E.greedy&&(E.greedy=!1,f.maskset.tests={}),c=c||0;var A,N,V,B,j=[],$=0;do{if(w===!0&&S.validPositions[$])N=(V=b&&S.validPositions[$].match.optionality&&S.validPositions[$+1]===void 0&&(S.validPositions[$].generatedInput===!0||S.validPositions[$].input==E.skipOptionalPartCharacter&&$>0)?M.call(f,$,p.call(f,$,A,$-1)):S.validPositions[$]).match,A=V.locator.slice(),j.push(y===!0?V.input:y===!1?N.nativeDef:x.call(f,$,N));else{N=(V=R.call(f,$,A,$-1)).match,A=V.locator.slice();var T=g!==!0&&(E.jitMasking!==!1?E.jitMasking:N.jit);(B=(B||S.validPositions[$-1])&&N.static&&N.def!==E.groupSeparator&&N.fn===null)||T===!1||T===void 0||typeof T=="number"&&isFinite(T)&&T>$?j.push(y===!1?N.nativeDef:x.call(f,j.length,N)):B=!1}$++}while(N.static!==!0||N.def!==""||c>$);return j[j.length-1]===""&&j.pop(),y===!1&&S.maskLength!==void 0||(S.maskLength=$-1),E.greedy=D,j},o.getPlaceholder=x,o.getTest=k,o.getTestTemplate=R,o.getTests=p,o.isSubsetOf=_;var u,h=(u=l(2394))&&u.__esModule?u:{default:u},m=l(8711);function v(w){return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},v(w)}function C(w,c){var y=(w.alternation!=null?w.mloc[F(w)]:w.locator).join("");if(y!=="")for(y=y.split(":")[0];y.length<c;)y+="0";return y}function F(w){var c=w.locator[w.alternation];return typeof c=="string"&&c.length>0&&(c=c.split(",")[0]),c!==void 0?c.toString():""}function x(w,c,y){var g=this,b=this.opts,f=this.maskset;if((c=c||k.call(g,w).match).placeholder!==void 0||y===!0){if(c.placeholder!==""&&c.static===!0&&c.generated!==!0){var E=m.getLastValidPosition.call(g,w),S=m.seekNext.call(g,E);return(y?w<=S:w<S)?b.staticDefinitionSymbol&&c.static?c.nativeDef:c.def:typeof c.placeholder=="function"?c.placeholder(b):c.placeholder}return typeof c.placeholder=="function"?c.placeholder(b):c.placeholder}if(c.static===!0){if(w>-1&&f.validPositions[w]===void 0){var D,A=p.call(g,w),N=[];if(typeof b.placeholder=="string"&&A.length>1+(A[A.length-1].match.def===""?1:0)){for(var V=0;V<A.length;V++)if(A[V].match.def!==""&&A[V].match.optionality!==!0&&A[V].match.optionalQuantifier!==!0&&(A[V].match.static===!0||D===void 0||A[V].match.fn.test(D.match.def,f,w,!0,b)!==!1)&&(N.push(A[V]),A[V].match.static===!0&&(D=A[V]),N.length>1&&/[0-9a-bA-Z]/.test(N[0].match.def)))return b.placeholder.charAt(w%b.placeholder.length)}}return c.def}return v(b.placeholder)==="object"?c.def:b.placeholder.charAt(w%b.placeholder.length)}function R(w,c,y){return this.maskset.validPositions[w]||M.call(this,w,p.call(this,w,c&&c.slice(),y))}function M(w,c){var y=this.opts,g=0,b=(function(B,j){var $=0,T=!1;return j.forEach((function(P){P.match.optionality&&($!==0&&$!==P.match.optionality&&(T=!0),($===0||$>P.match.optionality)&&($=P.match.optionality))})),$&&(B==0||j.length==1?$=0:T||($=0)),$})(w,c);w=w>0?w-1:0;var f,E,S,D=C(k.call(this,w));y.greedy&&c.length>1&&c[c.length-1].match.def===""&&(g=1);for(var A=0;A<c.length-g;A++){var N=c[A];f=C(N,D.length);var V=Math.abs(f-D);(N.unMatchedAlternationStopped!==!0||c.filter((function(B){return B.unMatchedAlternationStopped!==!0})).length<=1)&&(E===void 0||f!==""&&V<E||S&&!y.greedy&&S.match.optionality&&S.match.optionality-b>0&&S.match.newBlockMarker==="master"&&(!N.match.optionality||N.match.optionality-b<1||!N.match.newBlockMarker)||S&&!y.greedy&&S.match.optionalQuantifier&&!N.match.optionalQuantifier)&&(E=V,S=N)}return S}function k(w,c){var y=this.maskset;return y.validPositions[w]?y.validPositions[w]:(c||p.call(this,w))[0]}function _(w,c,y){function g(b){for(var f,E=[],S=-1,D=0,A=b.length;D<A;D++)if(b.charAt(D)==="-")for(f=b.charCodeAt(D+1);++S<f;)E.push(String.fromCharCode(S));else S=b.charCodeAt(D),E.push(b.charAt(D));return E.join("")}return w.match.def===c.match.nativeDef||!(!(y.regex||w.match.fn instanceof RegExp&&c.match.fn instanceof RegExp)||w.match.static===!0||c.match.static===!0)&&(c.match.fn.source==="."||g(c.match.fn.source.replace(/[[\]/]/g,"")).indexOf(g(w.match.fn.source.replace(/[[\]/]/g,"")))!==-1)}function p(w,c,y){var g,b,f=this,E=this.dependencyLib,S=this.maskset,D=this.opts,A=this.el,N=S.maskToken,V=c?y:0,B=c?c.slice():[0],j=[],$=!1,T=c?c.join(""):"",P=!1;function W(ie,Y,H,ee){function X(ne,me,be){function xe(G,Z){var re=Z.matches.indexOf(G)===0;return re||Z.matches.every((function(te,pe){return te.isQuantifier===!0?re=xe(G,Z.matches[pe-1]):Object.prototype.hasOwnProperty.call(te,"matches")&&(re=xe(G,te)),!re})),re}function je(G,Z,re){var te,pe;if((S.tests[G]||S.validPositions[G])&&(S.validPositions[G]?[S.validPositions[G]]:S.tests[G]).every((function(we,Pe){if(we.mloc[Z])return te=we,!1;var ct=re!==void 0?re:we.alternation,ze=we.locator[ct]!==void 0?we.locator[ct].toString().indexOf(Z):-1;return(pe===void 0||ze<pe)&&ze!==-1&&(te=we,pe=ze),!0})),te){var Me=te.locator[te.alternation],ve=te.mloc[Z]||te.mloc[Me]||te.locator;return ve[ve.length-1].toString().indexOf(":")!==-1&&ve.pop(),ve.slice((re!==void 0?re:te.alternation)+1)}return re!==void 0?je(G,Z):void 0}function Le(G,Z){return G.match.static===!0&&Z.match.static!==!0&&Z.match.fn.test(G.match.def,S,w,!1,D,!1)}function Ne(G,Z){var re=G.alternation,te=Z===void 0||re<=Z.alternation&&G.locator[re].toString().indexOf(Z.locator[re])===-1;if(!te&&re>Z.alternation){for(var pe=0;pe<re;pe++)if(G.locator[pe]!==Z.locator[pe]){re=pe,te=!0;break}}return!!te&&(function(Me){G.mloc=G.mloc||{};var ve=G.locator[Me];if(ve!==void 0){if(typeof ve=="string"&&(ve=ve.split(",")[0]),G.mloc[ve]===void 0&&(G.mloc[ve]=G.locator.slice(),G.mloc[ve].push(":".concat(G.alternation))),Z!==void 0){for(var we in Z.mloc)typeof we=="string"&&(we=parseInt(we.split(",")[0])),G.mloc[we+0]=Z.mloc[we];G.locator[Me]=Object.keys(G.mloc).join(",")}return G.alternation>Me&&(G.alternation=Me),!0}return G.alternation=void 0,!1})(re)}function se(G,Z){if(G.locator.length!==Z.locator.length)return!1;for(var re=G.alternation+1;re<G.locator.length;re++)if(G.locator[re]!==Z.locator[re])return!1;return!0}if(V>w+D._maxTestPos)throw new Error("Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. ".concat(S.mask));if(V===w&&ne.matches===void 0){if(j.push({match:ne,locator:me.reverse(),cd:T,mloc:{}}),!ne.optionality||be!==void 0||!(D.definitions&&D.definitions[ne.nativeDef]&&D.definitions[ne.nativeDef].optional||h.default.prototype.definitions[ne.nativeDef]&&h.default.prototype.definitions[ne.nativeDef].optional))return!0;$=!0,V=w}else if(ne.matches!==void 0){if(ne.isGroup&&be!==ne)return(function(){if(ne=X(ie.matches[ie.matches.indexOf(ne)+1],me,be))return!0})();if(ne.isOptional)return(function(){var G=ne,Z=j.length;if(ne=W(ne,Y,me,be),j.length>0){if(j.forEach((function(re,te){te>=Z&&(re.match.optionality=re.match.optionality?re.match.optionality+1:1)})),g=j[j.length-1].match,be!==void 0||!xe(g,G))return ne;$=!0,V=w}})();if(ne.isAlternator)return(function(){function G(O){for(var L,I=O.matches[0].matches?O.matches[0].matches.length:1,J=0;J<O.matches.length&&I===(L=O.matches[J].matches?O.matches[J].matches.length:1);J++);return I!==L}f.hasAlternator=!0;var Z,re=ne,te=[],pe=j.slice(),Me=me.length,ve=Y.length>0?Y.shift():-1;if(ve===-1||typeof ve=="string"){var we,Pe=V,ct=Y.slice(),ze=[];if(typeof ve=="string")ze=ve.split(",");else for(we=0;we<re.matches.length;we++)ze.push(we.toString());if(S.excludes[w]!==void 0){for(var Xn=ze.slice(),is=0,We=S.excludes[w].length;is<We;is++){var Ri=S.excludes[w][is].toString().split(":");me.length==Ri[1]&&ze.splice(ze.indexOf(Ri[0]),1)}ze.length===0&&(delete S.excludes[w],ze=Xn)}(D.keepStatic===!0||isFinite(parseInt(D.keepStatic))&&Pe>=D.keepStatic)&&(ze=ze.slice(0,1));for(var Jt=0;Jt<ze.length;Jt++){we=parseInt(ze[Jt]),j=[],Y=typeof ve=="string"&&je(V,we,Me)||ct.slice();var ai=re.matches[we];if(ai&&X(ai,[we].concat(me),be))ne=!0;else if(Jt===0&&(P=G(re)),ai&&ai.matches&&ai.matches.length>re.matches[0].matches.length)break;Z=j.slice(),V=Pe,j=[];for(var Xt=0;Xt<Z.length;Xt++){var $e=Z[Xt],ot=!1;$e.alternation=$e.alternation||Me,Ne($e);for(var ss=0;ss<te.length;ss++){var tt=te[ss];if(typeof ve!="string"||$e.alternation!==void 0&&ze.includes($e.locator[$e.alternation].toString())){if($e.match.nativeDef===tt.match.nativeDef){ot=!0,Ne(tt,$e);break}if(_($e,tt,D)){Ne($e,tt)&&(ot=!0,te.splice(te.indexOf(tt),0,$e));break}if(_(tt,$e,D)){Ne(tt,$e);break}if(Le($e,tt)){se($e,tt)||A.inputmask.userOptions.keepStatic!==void 0?Ne($e,tt)&&(ot=!0,te.splice(te.indexOf(tt),0,$e)):D.keepStatic=!0;break}if(Le(tt,$e)){Ne(tt,$e);break}}}ot||te.push($e)}}j=pe.concat(te),V=w,$=j.length>0&&P,ne=te.length>0&&!P,P&&$&&!ne&&j.forEach((function(O,L){O.unMatchedAlternationStopped=!0})),Y=ct.slice()}else ne=X(re.matches[ve]||ie.matches[ve],[ve].concat(me),be);if(ne)return!0})();if(ne.isQuantifier&&be!==ie.matches[ie.matches.indexOf(ne)-1])return(function(){for(var G=ne,Z=!1,re=Y.length>0?Y.shift():0;re<(isNaN(G.quantifier.max)?re+1:G.quantifier.max)&&V<=w;re++){var te=ie.matches[ie.matches.indexOf(G)-1];if(ne=X(te,[re].concat(me),te)){if(j.forEach((function(pe,Me){(g=z(te,pe.match)?pe.match:j[j.length-1].match).optionalQuantifier=re>=G.quantifier.min,g.jit=(re+1)*(te.matches.indexOf(g)+1)>G.quantifier.jit,g.optionalQuantifier&&xe(g,te)&&($=!0,V=w,D.greedy&&S.validPositions[w-1]==null&&re>G.quantifier.min&&["*","+"].indexOf(G.quantifier.max)!=-1&&(j.pop(),T=void 0),Z=!0,ne=!1),!Z&&g.jit&&(S.jitOffset[w]=te.matches.length-te.matches.indexOf(g))})),Z)break;return!0}}})();if(ne=W(ne,Y,me,be))return!0}else V++}for(var q=Y.length>0?Y.shift():0;q<ie.matches.length;q++)if(ie.matches[q].isQuantifier!==!0){var oe=X(ie.matches[q],[q].concat(H),ee);if(oe&&V===w)return oe;if(V>w)break}}function z(ie,Y){var H=ie.matches.indexOf(Y)!=-1;return H||ie.matches.forEach((function(ee,X){ee.matches===void 0||H||(H=z(ee,Y))})),H}if(w>-1){if(c===void 0){for(var U,K=w-1;(U=S.validPositions[K]||S.tests[K])===void 0&&K>-1;)K--;U!==void 0&&K>-1&&(B=(function(ie,Y){var H,ee=[];return Array.isArray(Y)||(Y=[Y]),Y.length>0&&(Y[0].alternation===void 0||D.keepStatic===!0?(ee=M.call(f,ie,Y.slice()).locator.slice()).length===0&&(ee=Y[0].locator.slice()):Y.forEach((function(X){X.def!==""&&(ee.length===0?(H=X.alternation,ee=X.locator.slice()):X.locator[H]&&ee[H].toString().indexOf(X.locator[H])===-1&&(ee[H]+=","+X.locator[H]))}))),ee})(K,U),T=B.join(""),V=K)}if(S.tests[w]&&S.tests[w][0].cd===T)return S.tests[w];for(var Q=B.shift();Q<N.length&&!(W(N[Q],B,[Q])&&V===w||V>w);Q++);}return(j.length===0||$)&&j.push({match:{fn:null,static:!0,optionality:!1,casing:null,def:"",placeholder:""},locator:P&&j.filter((function(ie){return ie.unMatchedAlternationStopped!==!0})).length===0?[0]:[],mloc:{},cd:T}),c!==void 0&&S.tests[w]?b=E.extend(!0,[],j):(S.tests[w]=E.extend(!0,[],j),b=S.tests[w]),j.forEach((function(ie){ie.match.optionality=ie.match.defOptionality||!1})),b}},7215:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.alternate=C,o.checkAlternationMatch=function(c,y,g){for(var b,f=this.opts.greedy?y:y.slice(0,1),E=!1,S=g!==void 0?g.split(","):[],D=0;D<S.length;D++)(b=c.indexOf(S[D]))!==-1&&c.splice(b,1);for(var A=0;A<c.length;A++)if(f.includes(c[A])){E=!0;break}return E},o.handleRemove=function(c,y,g,b,f){var E=this,S=this.maskset,D=this.opts;if((D.numericInput||E.isRTL)&&(y===h.keys.Backspace?y=h.keys.Delete:y===h.keys.Delete&&(y=h.keys.Backspace),E.isRTL)){var A=g.end;g.end=g.begin,g.begin=A}var N,V=m.getLastValidPosition.call(E,void 0,!0);g.end>=m.getBuffer.call(E).length&&V>=g.end&&(g.end=V+1),y===h.keys.Backspace?g.end-g.begin<1&&(g.begin=m.seekPrevious.call(E,g.begin)):y===h.keys.Delete&&g.begin===g.end&&(g.end=m.isMask.call(E,g.end,!0,!0)?g.end+1:m.seekNext.call(E,g.end)+1),(N=w.call(E,g))!==!1&&((b!==!0&&D.keepStatic!==!1||D.regex!==null&&v.getTest.call(E,g.begin).match.def.indexOf("|")!==-1)&&C.call(E,!0),b!==!0&&(S.p=y===h.keys.Delete?g.begin+N:g.begin,S.p=m.determineNewCaretPosition.call(E,{begin:S.p,end:S.p},!1,D.insertMode===!1&&y===h.keys.Backspace?"none":void 0).begin))},o.isComplete=x,o.isSelection=R,o.isValid=M,o.refreshFromBuffer=_,o.revalidateMask=w;var u=l(6030),h=l(2839),m=l(8711),v=l(4713);function C(c,y,g,b,f,E){var S=this,D=this.dependencyLib,A=this.opts,N=S.maskset;if(!S.hasAlternator)return!1;var V,B,j,$,T,P,W,z,U,K,Q,ie=D.extend(!0,[],N.validPositions),Y=D.extend(!0,{},N.tests),H=!1,ee=!1,X=f!==void 0?f:m.getLastValidPosition.call(S);if(E&&(K=E.begin,Q=E.end,E.begin>E.end&&(K=E.end,Q=E.begin)),X===-1&&f===void 0)V=0,B=($=v.getTest.call(S,V)).alternation;else for(;X>=0;X--)if((j=N.validPositions[X])&&j.alternation!==void 0){if(X<=(c||0)&&$&&$.locator[j.alternation]!==j.locator[j.alternation])break;V=X,B=N.validPositions[V].alternation,$=j}if(B!==void 0){W=parseInt(V),N.excludes[W]=N.excludes[W]||[],c!==!0&&N.excludes[W].push((0,v.getDecisionTaker)($)+":"+$.alternation);var q=[],oe=-1;for(T=W;W<m.getLastValidPosition.call(S,void 0,!0)+1;T++)oe===-1&&c<=T&&y!==void 0&&(q.push(y),oe=q.length-1),(P=N.validPositions[W])&&P.generatedInput!==!0&&(E===void 0||T<K||T>=Q)&&q.push(P.input),N.validPositions.splice(W,1);for(oe===-1&&y!==void 0&&(q.push(y),oe=q.length-1);N.excludes[W]!==void 0&&N.excludes[W].length<10;){for(N.tests={},m.resetMaskSet.call(S,!0),H=!0,T=0;T<q.length&&(z=H.caret||A.insertMode==0&&z!=null?m.seekNext.call(S,z):m.getLastValidPosition.call(S,void 0,!0)+1,U=q[T],H=M.call(S,z,U,!1,b,!0));T++)T===oe&&(ee=H),c==1&&H&&(ee={caretPos:T});if(H)break;if(m.resetMaskSet.call(S),$=v.getTest.call(S,W),N.validPositions=D.extend(!0,[],ie),N.tests=D.extend(!0,{},Y),!N.excludes[W]){ee=C.call(S,c,y,g,b,W-1,E);break}if($.alternation!=null){var ne=(0,v.getDecisionTaker)($);if(N.excludes[W].indexOf(ne+":"+$.alternation)!==-1){ee=C.call(S,c,y,g,b,W-1,E);break}for(N.excludes[W].push(ne+":"+$.alternation),T=W;T<m.getLastValidPosition.call(S,void 0,!0)+1;T++)N.validPositions.splice(W)}else delete N.excludes[W]}}return ee&&A.keepStatic===!1||delete N.excludes[W],ee}function F(c,y,g){var b=this.opts,f=this.maskset;switch(b.casing||y.casing){case"upper":c=c.toUpperCase();break;case"lower":c=c.toLowerCase();break;case"title":var E=f.validPositions[g-1];c=g===0||E&&E.input===String.fromCharCode(h.keyCode.Space)?c.toUpperCase():c.toLowerCase();break;default:if(typeof b.casing=="function"){var S=Array.prototype.slice.call(arguments);S.push(f.validPositions),c=b.casing.apply(this,S)}}return c}function x(c){var y=this,g=this.opts,b=this.maskset;if(typeof g.isComplete=="function")return g.isComplete(c,g);if(g.repeat!=="*"){var f=!1,E=m.determineLastRequiredPosition.call(y,!0),S=E.l;if(E.def===void 0||E.def.newBlockMarker||E.def.optionality||E.def.optionalQuantifier){f=!0;for(var D=0;D<=S;D++){var A=v.getTestTemplate.call(y,D).match;if(A.static!==!0&&b.validPositions[D]===void 0&&(A.optionality===!1||A.optionality===void 0||A.optionality&&A.newBlockMarker==0)&&(A.optionalQuantifier===!1||A.optionalQuantifier===void 0)||A.static===!0&&A.def!=""&&c[D]!==v.getPlaceholder.call(y,D,A)){f=!1;break}}}return f}}function R(c){var y=this.opts.insertMode?0:1;return this.isRTL?c.begin-c.end>y:c.end-c.begin>y}function M(c,y,g,b,f,E,S){var D=this,A=this.dependencyLib,N=this.opts,V=D.maskset;g=g===!0;var B=c;function j(H){if(H!==void 0){if(H.remove!==void 0&&(Array.isArray(H.remove)||(H.remove=[H.remove]),H.remove.sort((function(X,q){return D.isRTL?X.pos-q.pos:q.pos-X.pos})).forEach((function(X){w.call(D,{begin:X,end:X+1})})),H.remove=void 0),H.insert!==void 0&&(Array.isArray(H.insert)||(H.insert=[H.insert]),H.insert.sort((function(X,q){return D.isRTL?q.pos-X.pos:X.pos-q.pos})).forEach((function(X){X.c!==""&&M.call(D,X.pos,X.c,X.strict===void 0||X.strict,X.fromIsValid!==void 0?X.fromIsValid:b)})),H.insert=void 0),H.refreshFromBuffer&&H.buffer){var ee=H.refreshFromBuffer;_.call(D,ee===!0?ee:ee.start,ee.end,H.buffer),H.refreshFromBuffer=void 0}H.rewritePosition!==void 0&&(B=H.rewritePosition,H=!0)}return H}function $(H,ee,X){var q=!1;return v.getTests.call(D,H).every((function(oe,ne){var me=oe.match;if(m.getBuffer.call(D,!0),(q=(!me.jit||V.validPositions[m.seekPrevious.call(D,H)]!==void 0)&&(me.fn!=null?me.fn.test(ee,V,H,X,N,R.call(D,c)):(ee===me.def||ee===N.skipOptionalPartCharacter)&&me.def!==""&&{c:v.getPlaceholder.call(D,H,me,!0)||me.def,pos:H}))!==!1){var be=q.c!==void 0?q.c:ee,xe=H;return be=be===N.skipOptionalPartCharacter&&me.static===!0?v.getPlaceholder.call(D,H,me,!0)||me.def:be,(q=j(q))!==!0&&q.pos!==void 0&&q.pos!==H&&(xe=q.pos),q!==!0&&q.pos===void 0&&q.c===void 0||w.call(D,c,A.extend({},oe,{input:F.call(D,be,me,xe)}),b,xe)===!1&&(q=!1),!1}return!0})),q}c.begin!==void 0&&(B=D.isRTL?c.end:c.begin);var T=!0,P=A.extend(!0,[],V.validPositions);if(N.keepStatic===!1&&V.excludes[B]!==void 0&&f!==!0&&b!==!0)for(var W=B;W<(D.isRTL?c.begin:c.end);W++)V.excludes[W]!==void 0&&(V.excludes[W]=void 0,delete V.tests[W]);if(typeof N.preValidation=="function"&&b!==!0&&E!==!0&&(T=j(T=N.preValidation.call(D,m.getBuffer.call(D),B,y,R.call(D,c),N,V,c,g||f))),T===!0){if(T=$(B,y,g),(!g||b===!0)&&T===!1&&E!==!0){var z=V.validPositions[B];if(!z||z.match.static!==!0||z.match.def!==y&&y!==N.skipOptionalPartCharacter){if(N.insertMode||V.validPositions[m.seekNext.call(D,B)]===void 0||c.end>B){var U=!1;if(V.jitOffset[B]&&V.validPositions[m.seekNext.call(D,B)]===void 0&&(T=M.call(D,B+V.jitOffset[B],y,!0,!0))!==!1&&(f!==!0&&(T.caret=B),U=!0),c.end>B&&(V.validPositions[B]=void 0),!U&&!m.isMask.call(D,B,N.keepStatic&&B===0)){for(var K=B+1,Q=m.seekNext.call(D,B,!1,B!==0);K<=Q;K++)if((T=$(K,y,g))!==!1){T=p.call(D,B,T.pos!==void 0?T.pos:K)||T,B=K;break}}}}else T={caret:m.seekNext.call(D,B)}}D.hasAlternator&&f!==!0&&!g&&(f=!0,T===!1&&N.keepStatic&&(x.call(D,m.getBuffer.call(D))||B===0)?T=C.call(D,B,y,g,b,void 0,c):(R.call(D,c)&&V.tests[B]&&V.tests[B].length>1&&N.keepStatic||T==1&&N.numericInput!==!0&&V.tests[B]&&V.tests[B].length>1&&m.getLastValidPosition.call(D,void 0,!0)>B)&&(T=C.call(D,!0))),T===!0&&(T={pos:B})}if(typeof N.postValidation=="function"&&b!==!0&&E!==!0){var ie=N.postValidation.call(D,m.getBuffer.call(D,!0),c.begin!==void 0?D.isRTL?c.end:c.begin:c,y,T,N,V,g,S);ie!==void 0&&(T=ie===!0?T:ie)}T&&T.pos===void 0&&(T.pos=B),T===!1||E===!0?(m.resetMaskSet.call(D,!0),V.validPositions=A.extend(!0,[],P)):p.call(D,void 0,B,!0);var Y=j(T);return D.maxLength!==void 0&&m.getBuffer.call(D).length>D.maxLength&&!b&&(m.resetMaskSet.call(D,!0),V.validPositions=A.extend(!0,[],P),Y=!1),Y}function k(c,y,g){for(var b=this.maskset,f=!1,E=v.getTests.call(this,c),S=0;S<E.length;S++){if(E[S].match&&(E[S].match.nativeDef===y.match[g.shiftPositions?"def":"nativeDef"]&&(!g.shiftPositions||!y.match.static)||E[S].match.nativeDef===y.match.nativeDef||g.regex&&!E[S].match.static&&E[S].match.fn.test(y.input,b,c,!1,g))){f=!0;break}if(E[S].match&&E[S].match.def===y.match.nativeDef){f=void 0;break}}return f===!1&&b.jitOffset[c]!==void 0&&(f=k.call(this,c+b.jitOffset[c],y,g)),f}function _(c,y,g){var b,f,E=this,S=this.maskset,D=this.opts,A=this.dependencyLib,N=D.skipOptionalPartCharacter,V=E.isRTL?g.slice().reverse():g;if(D.skipOptionalPartCharacter="",c===!0)m.resetMaskSet.call(E,!1),c=0,y=g.length,f=m.determineNewCaretPosition.call(E,{begin:0,end:0},!1).begin;else{for(b=c;b<y;b++)S.validPositions.splice(c,0);f=c}var B=new A.Event("keypress");for(b=c;b<y;b++){B.key=V[b].toString(),E.ignorable=!1;var j=u.EventHandlers.keypressEvent.call(E,B,!0,!1,!1,f);j!==!1&&j!==void 0&&(f=j.forwardPosition)}D.skipOptionalPartCharacter=N}function p(c,y,g){var b=this,f=this.maskset,E=this.dependencyLib;if(c===void 0)for(c=y-1;c>0&&!f.validPositions[c];c--);for(var S=c;S<y;S++)if(f.validPositions[S]===void 0&&!m.isMask.call(b,S,!1)&&(S==0?v.getTest.call(b,S):f.validPositions[S-1])){var D=v.getTests.call(b,S).slice();D[D.length-1].match.def===""&&D.pop();var A,N=v.determineTestTemplate.call(b,S,D);if(N&&(N.match.jit!==!0||N.match.newBlockMarker==="master"&&(A=f.validPositions[S+1])&&A.match.optionalQuantifier===!0)&&((N=E.extend({},N,{input:v.getPlaceholder.call(b,S,N.match,!0)||N.match.def})).generatedInput=!0,w.call(b,S,N,!0),g!==!0)){var V=f.validPositions[y].input;return f.validPositions[y]=void 0,M.call(b,y,V,!0,!0)}}}function w(c,y,g,b){var f=this,E=this.maskset,S=this.opts,D=this.dependencyLib;function A(Y,H,ee){var X=H[Y];if(X!==void 0&&X.match.static===!0&&X.match.optionality!==!0&&(H[0]===void 0||H[0].alternation===void 0)){var q=ee.begin<=Y-1?H[Y-1]&&H[Y-1].match.static===!0&&H[Y-1]:H[Y-1],oe=ee.end>Y+1?H[Y+1]&&H[Y+1].match.static===!0&&H[Y+1]:H[Y+1];return q&&oe}return!1}var N=0,V=c.begin!==void 0?c.begin:c,B=c.end!==void 0?c.end:c,j=!0;if(c.begin>c.end&&(V=c.end,B=c.begin),b=b!==void 0?b:V,g===void 0&&(V!==B||S.insertMode&&E.validPositions[b]!==void 0||y===void 0||y.match.optionalQuantifier||y.match.optionality)){var $,T=D.extend(!0,[],E.validPositions),P=m.getLastValidPosition.call(f,void 0,!0);E.p=V;var W=R.call(f,c)?V:b;for($=P;$>=W;$--)E.validPositions.splice($,1),y===void 0&&delete E.tests[$+1];var z,U,K=b,Q=K;for(y&&(E.validPositions[b]=D.extend(!0,{},y),Q++,K++),T[B]==null&&E.jitOffset[B]&&(B+=E.jitOffset[B]+1),$=y?B:B-1;$<=P;$++){if((z=T[$])!==void 0&&z.generatedInput!==!0&&($>=B||$>=V&&A($,T,{begin:V,end:B}))){for(;v.getTest.call(f,Q).match.def!=="";){if((U=k.call(f,Q,z,S))!==!1||z.match.def==="+"){z.match.def==="+"&&m.getBuffer.call(f,!0);var ie=M.call(f,Q,z.input,z.match.def!=="+",!0);if(j=ie!==!1,K=(ie.pos||Q)+1,!j&&U)break}else j=!1;if(j){y===void 0&&z.match.static&&$===c.begin&&N++;break}if(!j&&m.getBuffer.call(f),Q>E.maskLength)break;Q++}v.getTest.call(f,Q).match.def==""&&(j=!1),Q=K}if(!j)break}if(!j)return E.validPositions=D.extend(!0,[],T),m.resetMaskSet.call(f,!0),!1}else y&&v.getTest.call(f,b).match.cd===y.match.cd&&(E.validPositions[b]=D.extend(!0,{},y));return m.resetMaskSet.call(f,!0),N}}},i={};function n(a){var o=i[a];if(o!==void 0)return o.exports;var l=i[a]={exports:{}};return t[a](l,l.exports,n),l.exports}var r={};return(function(){var a=r;Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,n(7149),n(3194),n(9302),n(4013),n(3851),n(219),n(207),n(5296);var o,l=(o=n(2394))&&o.__esModule?o:{default:o};a.default=l.default})(),r})()}))})(rs)),rs.exports}var Ka=Ua();const qa=Ga(Ka);//! moment.js
14
+ //! version : 2.30.1
15
+ //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
16
+ //! license : MIT
17
+ //! momentjs.com
18
+ var tr;function ue(){return tr.apply(null,arguments)}function Ja(s){tr=s}function Et(s){return s instanceof Array||Object.prototype.toString.call(s)==="[object Array]"}function Zt(s){return s!=null&&Object.prototype.toString.call(s)==="[object Object]"}function Te(s,e){return Object.prototype.hasOwnProperty.call(s,e)}function Gs(s){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(s).length===0;var e;for(e in s)if(Te(s,e))return!1;return!0}function st(s){return s===void 0}function At(s){return typeof s=="number"||Object.prototype.toString.call(s)==="[object Number]"}function Ti(s){return s instanceof Date||Object.prototype.toString.call(s)==="[object Date]"}function ir(s,e){var t=[],i,n=s.length;for(i=0;i<n;++i)t.push(e(s[i],i));return t}function Gt(s,e){for(var t in e)Te(e,t)&&(s[t]=e[t]);return Te(e,"toString")&&(s.toString=e.toString),Te(e,"valueOf")&&(s.valueOf=e.valueOf),s}function St(s,e,t,i){return Tr(s,e,t,i,!0).utc()}function Xa(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Ce(s){return s._pf==null&&(s._pf=Xa()),s._pf}var $s;Array.prototype.some?$s=Array.prototype.some:$s=function(s){var e=Object(this),t=e.length>>>0,i;for(i=0;i<t;i++)if(i in e&&s.call(this,e[i],i,e))return!0;return!1};function Us(s){var e=null,t=!1,i=s._d&&!isNaN(s._d.getTime());if(i&&(e=Ce(s),t=$s.call(e.parsedDateParts,function(n){return n!=null}),i=e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&t),s._strict&&(i=i&&e.charsLeftOver===0&&e.unusedTokens.length===0&&e.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(s))s._isValid=i;else return i;return s._isValid}function as(s){var e=St(NaN);return s!=null?Gt(Ce(e),s):Ce(e).userInvalidated=!0,e}var sr=ue.momentProperties=[],Ks=!1;function qs(s,e){var t,i,n,r=sr.length;if(st(e._isAMomentObject)||(s._isAMomentObject=e._isAMomentObject),st(e._i)||(s._i=e._i),st(e._f)||(s._f=e._f),st(e._l)||(s._l=e._l),st(e._strict)||(s._strict=e._strict),st(e._tzm)||(s._tzm=e._tzm),st(e._isUTC)||(s._isUTC=e._isUTC),st(e._offset)||(s._offset=e._offset),st(e._pf)||(s._pf=Ce(e)),st(e._locale)||(s._locale=e._locale),r>0)for(t=0;t<r;t++)i=sr[t],n=e[i],st(n)||(s[i]=n);return s}function _i(s){qs(this,s),this._d=new Date(s._d!=null?s._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Ks===!1&&(Ks=!0,ue.updateOffset(this),Ks=!1)}function kt(s){return s instanceof _i||s!=null&&s._isAMomentObject!=null}function nr(s){ue.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+s)}function pt(s,e){var t=!0;return Gt(function(){if(ue.deprecationHandler!=null&&ue.deprecationHandler(null,s),t){var i=[],n,r,a,o=arguments.length;for(r=0;r<o;r++){if(n="",typeof arguments[r]=="object"){n+=`
19
+ [`+r+"] ";for(a in arguments[0])Te(arguments[0],a)&&(n+=a+": "+arguments[0][a]+", ");n=n.slice(0,-2)}else n=arguments[r];i.push(n)}nr(s+`
20
+ Arguments: `+Array.prototype.slice.call(i).join("")+`
21
+ `+new Error().stack),t=!1}return e.apply(this,arguments)},e)}var rr={};function ar(s,e){ue.deprecationHandler!=null&&ue.deprecationHandler(s,e),rr[s]||(nr(e),rr[s]=!0)}ue.suppressDeprecationWarnings=!1,ue.deprecationHandler=null;function Rt(s){return typeof Function<"u"&&s instanceof Function||Object.prototype.toString.call(s)==="[object Function]"}function Za(s){var e,t;for(t in s)Te(s,t)&&(e=s[t],Rt(e)?this[t]=e:this["_"+t]=e);this._config=s,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Js(s,e){var t=Gt({},s),i;for(i in e)Te(e,i)&&(Zt(s[i])&&Zt(e[i])?(t[i]={},Gt(t[i],s[i]),Gt(t[i],e[i])):e[i]!=null?t[i]=e[i]:delete t[i]);for(i in s)Te(s,i)&&!Te(e,i)&&Zt(s[i])&&(t[i]=Gt({},t[i]));return t}function Xs(s){s!=null&&this.set(s)}var Zs;Object.keys?Zs=Object.keys:Zs=function(s){var e,t=[];for(e in s)Te(s,e)&&t.push(e);return t};var Qa={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function eo(s,e,t){var i=this._calendar[s]||this._calendar.sameElse;return Rt(i)?i.call(e,t):i}function Dt(s,e,t){var i=""+Math.abs(s),n=e-i.length,r=s>=0;return(r?t?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+i}var Qs=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,os=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,en={},oi={};function ge(s,e,t,i){var n=i;typeof i=="string"&&(n=function(){return this[i]()}),s&&(oi[s]=n),e&&(oi[e[0]]=function(){return Dt(n.apply(this,arguments),e[1],e[2])}),t&&(oi[t]=function(){return this.localeData().ordinal(n.apply(this,arguments),s)})}function to(s){return s.match(/\[[\s\S]/)?s.replace(/^\[|\]$/g,""):s.replace(/\\/g,"")}function io(s){var e=s.match(Qs),t,i;for(t=0,i=e.length;t<i;t++)oi[e[t]]?e[t]=oi[e[t]]:e[t]=to(e[t]);return function(n){var r="",a;for(a=0;a<i;a++)r+=Rt(e[a])?e[a].call(n,s):e[a];return r}}function ls(s,e){return s.isValid()?(e=or(e,s.localeData()),en[e]=en[e]||io(e),en[e](s)):s.localeData().invalidDate()}function or(s,e){var t=5;function i(n){return e.longDateFormat(n)||n}for(os.lastIndex=0;t>=0&&os.test(s);)s=s.replace(os,i),os.lastIndex=0,t-=1;return s}var so={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function no(s){var e=this._longDateFormat[s],t=this._longDateFormat[s.toUpperCase()];return e||!t?e:(this._longDateFormat[s]=t.match(Qs).map(function(i){return i==="MMMM"||i==="MM"||i==="DD"||i==="dddd"?i.slice(1):i}).join(""),this._longDateFormat[s])}var ro="Invalid date";function ao(){return this._invalidDate}var oo="%d",lo=/\d{1,2}/;function uo(s){return this._ordinal.replace("%d",s)}var ho={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function co(s,e,t,i){var n=this._relativeTime[t];return Rt(n)?n(s,e,t,i):n.replace(/%d/i,s)}function fo(s,e){var t=this._relativeTime[s>0?"future":"past"];return Rt(t)?t(e):t.replace(/%s/i,e)}var lr={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function mt(s){return typeof s=="string"?lr[s]||lr[s.toLowerCase()]:void 0}function tn(s){var e={},t,i;for(i in s)Te(s,i)&&(t=mt(i),t&&(e[t]=s[i]));return e}var po={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function mo(s){var e=[],t;for(t in s)Te(s,t)&&e.push({unit:t,priority:po[t]});return e.sort(function(i,n){return i.priority-n.priority}),e}var ur=/\d/,lt=/\d\d/,hr=/\d{3}/,sn=/\d{4}/,us=/[+-]?\d{6}/,Ie=/\d\d?/,dr=/\d\d\d\d?/,cr=/\d\d\d\d\d\d?/,hs=/\d{1,3}/,nn=/\d{1,4}/,ds=/[+-]?\d{1,6}/,li=/\d+/,cs=/[+-]?\d+/,go=/Z|[+-]\d\d:?\d\d/gi,fs=/Z|[+-]\d\d(?::?\d\d)?/gi,bo=/[+-]?\d+(\.\d{1,3})?/,Oi=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ui=/^[1-9]\d?/,rn=/^([1-9]\d|\d)/,ps;ps={};function de(s,e,t){ps[s]=Rt(e)?e:function(i,n){return i&&t?t:e}}function vo(s,e){return Te(ps,s)?ps[s](e._strict,e._locale):new RegExp(yo(s))}function yo(s){return Ht(s.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,i,n,r){return t||i||n||r}))}function Ht(s){return s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function gt(s){return s<0?Math.ceil(s)||0:Math.floor(s)}function Re(s){var e=+s,t=0;return e!==0&&isFinite(e)&&(t=gt(e)),t}var an={};function Ae(s,e){var t,i=e,n;for(typeof s=="string"&&(s=[s]),At(e)&&(i=function(r,a){a[e]=Re(r)}),n=s.length,t=0;t<n;t++)an[s[t]]=i}function Li(s,e){Ae(s,function(t,i,n,r){n._w=n._w||{},e(t,n._w,n,r)})}function wo(s,e,t){e!=null&&Te(an,s)&&an[s](e,t._a,t,s)}function ms(s){return s%4===0&&s%100!==0||s%400===0}var Xe=0,zt=1,Tt=2,qe=3,xt=4,Bt=5,Qt=6,Co=7,Eo=8;ge("Y",0,0,function(){var s=this.year();return s<=9999?Dt(s,4):"+"+s}),ge(0,["YY",2],0,function(){return this.year()%100}),ge(0,["YYYY",4],0,"year"),ge(0,["YYYYY",5],0,"year"),ge(0,["YYYYYY",6,!0],0,"year"),de("Y",cs),de("YY",Ie,lt),de("YYYY",nn,sn),de("YYYYY",ds,us),de("YYYYYY",ds,us),Ae(["YYYYY","YYYYYY"],Xe),Ae("YYYY",function(s,e){e[Xe]=s.length===2?ue.parseTwoDigitYear(s):Re(s)}),Ae("YY",function(s,e){e[Xe]=ue.parseTwoDigitYear(s)}),Ae("Y",function(s,e){e[Xe]=parseInt(s,10)});function Pi(s){return ms(s)?366:365}ue.parseTwoDigitYear=function(s){return Re(s)+(Re(s)>68?1900:2e3)};var fr=hi("FullYear",!0);function ko(){return ms(this.year())}function hi(s,e){return function(t){return t!=null?(pr(this,s,t),ue.updateOffset(this,e),this):Fi(this,s)}}function Fi(s,e){if(!s.isValid())return NaN;var t=s._d,i=s._isUTC;switch(e){case"Milliseconds":return i?t.getUTCMilliseconds():t.getMilliseconds();case"Seconds":return i?t.getUTCSeconds():t.getSeconds();case"Minutes":return i?t.getUTCMinutes():t.getMinutes();case"Hours":return i?t.getUTCHours():t.getHours();case"Date":return i?t.getUTCDate():t.getDate();case"Day":return i?t.getUTCDay():t.getDay();case"Month":return i?t.getUTCMonth():t.getMonth();case"FullYear":return i?t.getUTCFullYear():t.getFullYear();default:return NaN}}function pr(s,e,t){var i,n,r,a,o;if(!(!s.isValid()||isNaN(t))){switch(i=s._d,n=s._isUTC,e){case"Milliseconds":return void(n?i.setUTCMilliseconds(t):i.setMilliseconds(t));case"Seconds":return void(n?i.setUTCSeconds(t):i.setSeconds(t));case"Minutes":return void(n?i.setUTCMinutes(t):i.setMinutes(t));case"Hours":return void(n?i.setUTCHours(t):i.setHours(t));case"Date":return void(n?i.setUTCDate(t):i.setDate(t));case"FullYear":break;default:return}r=t,a=s.month(),o=s.date(),o=o===29&&a===1&&!ms(r)?28:o,n?i.setUTCFullYear(r,a,o):i.setFullYear(r,a,o)}}function xo(s){return s=mt(s),Rt(this[s])?this[s]():this}function Mo(s,e){if(typeof s=="object"){s=tn(s);var t=mo(s),i,n=t.length;for(i=0;i<n;i++)this[t[i].unit](s[t[i].unit])}else if(s=mt(s),Rt(this[s]))return this[s](e);return this}function So(s,e){return(s%e+e)%e}var Ue;Array.prototype.indexOf?Ue=Array.prototype.indexOf:Ue=function(s){var e;for(e=0;e<this.length;++e)if(this[e]===s)return e;return-1};function on(s,e){if(isNaN(s)||isNaN(e))return NaN;var t=So(e,12);return s+=(e-t)/12,t===1?ms(s)?29:28:31-t%7%2}ge("M",["MM",2],"Mo",function(){return this.month()+1}),ge("MMM",0,0,function(s){return this.localeData().monthsShort(this,s)}),ge("MMMM",0,0,function(s){return this.localeData().months(this,s)}),de("M",Ie,ui),de("MM",Ie,lt),de("MMM",function(s,e){return e.monthsShortRegex(s)}),de("MMMM",function(s,e){return e.monthsRegex(s)}),Ae(["M","MM"],function(s,e){e[zt]=Re(s)-1}),Ae(["MMM","MMMM"],function(s,e,t,i){var n=t._locale.monthsParse(s,i,t._strict);n!=null?e[zt]=n:Ce(t).invalidMonth=s});var Ro="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),mr="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),gr=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Do=Oi,To=Oi;function _o(s,e){return s?Et(this._months)?this._months[s.month()]:this._months[(this._months.isFormat||gr).test(e)?"format":"standalone"][s.month()]:Et(this._months)?this._months:this._months.standalone}function Oo(s,e){return s?Et(this._monthsShort)?this._monthsShort[s.month()]:this._monthsShort[gr.test(e)?"format":"standalone"][s.month()]:Et(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Lo(s,e,t){var i,n,r,a=s.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)r=St([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(r,"").toLocaleLowerCase();return t?e==="MMM"?(n=Ue.call(this._shortMonthsParse,a),n!==-1?n:null):(n=Ue.call(this._longMonthsParse,a),n!==-1?n:null):e==="MMM"?(n=Ue.call(this._shortMonthsParse,a),n!==-1?n:(n=Ue.call(this._longMonthsParse,a),n!==-1?n:null)):(n=Ue.call(this._longMonthsParse,a),n!==-1?n:(n=Ue.call(this._shortMonthsParse,a),n!==-1?n:null))}function Po(s,e,t){var i,n,r;if(this._monthsParseExact)return Lo.call(this,s,e,t);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(n=St([2e3,i]),t&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),!t&&!this._monthsParse[i]&&(r="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),t&&e==="MMMM"&&this._longMonthsParse[i].test(s))return i;if(t&&e==="MMM"&&this._shortMonthsParse[i].test(s))return i;if(!t&&this._monthsParse[i].test(s))return i}}function br(s,e){if(!s.isValid())return s;if(typeof e=="string"){if(/^\d+$/.test(e))e=Re(e);else if(e=s.localeData().monthsParse(e),!At(e))return s}var t=e,i=s.date();return i=i<29?i:Math.min(i,on(s.year(),t)),s._isUTC?s._d.setUTCMonth(t,i):s._d.setMonth(t,i),s}function vr(s){return s!=null?(br(this,s),ue.updateOffset(this,!0),this):Fi(this,"Month")}function Fo(){return on(this.year(),this.month())}function Ao(s){return this._monthsParseExact?(Te(this,"_monthsRegex")||yr.call(this),s?this._monthsShortStrictRegex:this._monthsShortRegex):(Te(this,"_monthsShortRegex")||(this._monthsShortRegex=Do),this._monthsShortStrictRegex&&s?this._monthsShortStrictRegex:this._monthsShortRegex)}function Ho(s){return this._monthsParseExact?(Te(this,"_monthsRegex")||yr.call(this),s?this._monthsStrictRegex:this._monthsRegex):(Te(this,"_monthsRegex")||(this._monthsRegex=To),this._monthsStrictRegex&&s?this._monthsStrictRegex:this._monthsRegex)}function yr(){function s(l,u){return u.length-l.length}var e=[],t=[],i=[],n,r,a,o;for(n=0;n<12;n++)r=St([2e3,n]),a=Ht(this.monthsShort(r,"")),o=Ht(this.months(r,"")),e.push(a),t.push(o),i.push(o),i.push(a);e.sort(s),t.sort(s),i.sort(s),this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function zo(s,e,t,i,n,r,a){var o;return s<100&&s>=0?(o=new Date(s+400,e,t,i,n,r,a),isFinite(o.getFullYear())&&o.setFullYear(s)):o=new Date(s,e,t,i,n,r,a),o}function Ai(s){var e,t;return s<100&&s>=0?(t=Array.prototype.slice.call(arguments),t[0]=s+400,e=new Date(Date.UTC.apply(null,t)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(s)):e=new Date(Date.UTC.apply(null,arguments)),e}function gs(s,e,t){var i=7+e-t,n=(7+Ai(s,0,i).getUTCDay()-e)%7;return-n+i-1}function wr(s,e,t,i,n){var r=(7+t-i)%7,a=gs(s,i,n),o=1+7*(e-1)+r+a,l,u;return o<=0?(l=s-1,u=Pi(l)+o):o>Pi(s)?(l=s+1,u=o-Pi(s)):(l=s,u=o),{year:l,dayOfYear:u}}function Hi(s,e,t){var i=gs(s.year(),e,t),n=Math.floor((s.dayOfYear()-i-1)/7)+1,r,a;return n<1?(a=s.year()-1,r=n+Nt(a,e,t)):n>Nt(s.year(),e,t)?(r=n-Nt(s.year(),e,t),a=s.year()+1):(a=s.year(),r=n),{week:r,year:a}}function Nt(s,e,t){var i=gs(s,e,t),n=gs(s+1,e,t);return(Pi(s)-i+n)/7}ge("w",["ww",2],"wo","week"),ge("W",["WW",2],"Wo","isoWeek"),de("w",Ie,ui),de("ww",Ie,lt),de("W",Ie,ui),de("WW",Ie,lt),Li(["w","ww","W","WW"],function(s,e,t,i){e[i.substr(0,1)]=Re(s)});function Bo(s){return Hi(s,this._week.dow,this._week.doy).week}var No={dow:0,doy:6};function Io(){return this._week.dow}function Vo(){return this._week.doy}function jo(s){var e=this.localeData().week(this);return s==null?e:this.add((s-e)*7,"d")}function Wo(s){var e=Hi(this,1,4).week;return s==null?e:this.add((s-e)*7,"d")}ge("d",0,"do","day"),ge("dd",0,0,function(s){return this.localeData().weekdaysMin(this,s)}),ge("ddd",0,0,function(s){return this.localeData().weekdaysShort(this,s)}),ge("dddd",0,0,function(s){return this.localeData().weekdays(this,s)}),ge("e",0,0,"weekday"),ge("E",0,0,"isoWeekday"),de("d",Ie),de("e",Ie),de("E",Ie),de("dd",function(s,e){return e.weekdaysMinRegex(s)}),de("ddd",function(s,e){return e.weekdaysShortRegex(s)}),de("dddd",function(s,e){return e.weekdaysRegex(s)}),Li(["dd","ddd","dddd"],function(s,e,t,i){var n=t._locale.weekdaysParse(s,i,t._strict);n!=null?e.d=n:Ce(t).invalidWeekday=s}),Li(["d","e","E"],function(s,e,t,i){e[i]=Re(s)});function Yo(s,e){return typeof s!="string"?s:isNaN(s)?(s=e.weekdaysParse(s),typeof s=="number"?s:null):parseInt(s,10)}function Go(s,e){return typeof s=="string"?e.weekdaysParse(s)%7||7:isNaN(s)?null:s}function ln(s,e){return s.slice(e,7).concat(s.slice(0,e))}var $o="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Cr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Uo="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ko=Oi,qo=Oi,Jo=Oi;function Xo(s,e){var t=Et(this._weekdays)?this._weekdays:this._weekdays[s&&s!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return s===!0?ln(t,this._week.dow):s?t[s.day()]:t}function Zo(s){return s===!0?ln(this._weekdaysShort,this._week.dow):s?this._weekdaysShort[s.day()]:this._weekdaysShort}function Qo(s){return s===!0?ln(this._weekdaysMin,this._week.dow):s?this._weekdaysMin[s.day()]:this._weekdaysMin}function el(s,e,t){var i,n,r,a=s.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=St([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return t?e==="dddd"?(n=Ue.call(this._weekdaysParse,a),n!==-1?n:null):e==="ddd"?(n=Ue.call(this._shortWeekdaysParse,a),n!==-1?n:null):(n=Ue.call(this._minWeekdaysParse,a),n!==-1?n:null):e==="dddd"?(n=Ue.call(this._weekdaysParse,a),n!==-1||(n=Ue.call(this._shortWeekdaysParse,a),n!==-1)?n:(n=Ue.call(this._minWeekdaysParse,a),n!==-1?n:null)):e==="ddd"?(n=Ue.call(this._shortWeekdaysParse,a),n!==-1||(n=Ue.call(this._weekdaysParse,a),n!==-1)?n:(n=Ue.call(this._minWeekdaysParse,a),n!==-1?n:null)):(n=Ue.call(this._minWeekdaysParse,a),n!==-1||(n=Ue.call(this._weekdaysParse,a),n!==-1)?n:(n=Ue.call(this._shortWeekdaysParse,a),n!==-1?n:null))}function tl(s,e,t){var i,n,r;if(this._weekdaysParseExact)return el.call(this,s,e,t);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(n=St([2e3,1]).day(i),t&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),t&&e==="dddd"&&this._fullWeekdaysParse[i].test(s))return i;if(t&&e==="ddd"&&this._shortWeekdaysParse[i].test(s))return i;if(t&&e==="dd"&&this._minWeekdaysParse[i].test(s))return i;if(!t&&this._weekdaysParse[i].test(s))return i}}function il(s){if(!this.isValid())return s!=null?this:NaN;var e=Fi(this,"Day");return s!=null?(s=Yo(s,this.localeData()),this.add(s-e,"d")):e}function sl(s){if(!this.isValid())return s!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return s==null?e:this.add(s-e,"d")}function nl(s){if(!this.isValid())return s!=null?this:NaN;if(s!=null){var e=Go(s,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function rl(s){return this._weekdaysParseExact?(Te(this,"_weekdaysRegex")||un.call(this),s?this._weekdaysStrictRegex:this._weekdaysRegex):(Te(this,"_weekdaysRegex")||(this._weekdaysRegex=Ko),this._weekdaysStrictRegex&&s?this._weekdaysStrictRegex:this._weekdaysRegex)}function al(s){return this._weekdaysParseExact?(Te(this,"_weekdaysRegex")||un.call(this),s?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qo),this._weekdaysShortStrictRegex&&s?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ol(s){return this._weekdaysParseExact?(Te(this,"_weekdaysRegex")||un.call(this),s?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Jo),this._weekdaysMinStrictRegex&&s?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function un(){function s(h,m){return m.length-h.length}var e=[],t=[],i=[],n=[],r,a,o,l,u;for(r=0;r<7;r++)a=St([2e3,1]).day(r),o=Ht(this.weekdaysMin(a,"")),l=Ht(this.weekdaysShort(a,"")),u=Ht(this.weekdays(a,"")),e.push(o),t.push(l),i.push(u),n.push(o),n.push(l),n.push(u);e.sort(s),t.sort(s),i.sort(s),n.sort(s),this._weekdaysRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function hn(){return this.hours()%12||12}function ll(){return this.hours()||24}ge("H",["HH",2],0,"hour"),ge("h",["hh",2],0,hn),ge("k",["kk",2],0,ll),ge("hmm",0,0,function(){return""+hn.apply(this)+Dt(this.minutes(),2)}),ge("hmmss",0,0,function(){return""+hn.apply(this)+Dt(this.minutes(),2)+Dt(this.seconds(),2)}),ge("Hmm",0,0,function(){return""+this.hours()+Dt(this.minutes(),2)}),ge("Hmmss",0,0,function(){return""+this.hours()+Dt(this.minutes(),2)+Dt(this.seconds(),2)});function Er(s,e){ge(s,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}Er("a",!0),Er("A",!1);function kr(s,e){return e._meridiemParse}de("a",kr),de("A",kr),de("H",Ie,rn),de("h",Ie,ui),de("k",Ie,ui),de("HH",Ie,lt),de("hh",Ie,lt),de("kk",Ie,lt),de("hmm",dr),de("hmmss",cr),de("Hmm",dr),de("Hmmss",cr),Ae(["H","HH"],qe),Ae(["k","kk"],function(s,e,t){var i=Re(s);e[qe]=i===24?0:i}),Ae(["a","A"],function(s,e,t){t._isPm=t._locale.isPM(s),t._meridiem=s}),Ae(["h","hh"],function(s,e,t){e[qe]=Re(s),Ce(t).bigHour=!0}),Ae("hmm",function(s,e,t){var i=s.length-2;e[qe]=Re(s.substr(0,i)),e[xt]=Re(s.substr(i)),Ce(t).bigHour=!0}),Ae("hmmss",function(s,e,t){var i=s.length-4,n=s.length-2;e[qe]=Re(s.substr(0,i)),e[xt]=Re(s.substr(i,2)),e[Bt]=Re(s.substr(n)),Ce(t).bigHour=!0}),Ae("Hmm",function(s,e,t){var i=s.length-2;e[qe]=Re(s.substr(0,i)),e[xt]=Re(s.substr(i))}),Ae("Hmmss",function(s,e,t){var i=s.length-4,n=s.length-2;e[qe]=Re(s.substr(0,i)),e[xt]=Re(s.substr(i,2)),e[Bt]=Re(s.substr(n))});function ul(s){return(s+"").toLowerCase().charAt(0)==="p"}var hl=/[ap]\.?m?\.?/i,dl=hi("Hours",!0);function cl(s,e,t){return s>11?t?"pm":"PM":t?"am":"AM"}var xr={calendar:Qa,longDateFormat:so,invalidDate:ro,ordinal:oo,dayOfMonthOrdinalParse:lo,relativeTime:ho,months:Ro,monthsShort:mr,week:No,weekdays:$o,weekdaysMin:Uo,weekdaysShort:Cr,meridiemParse:hl},Ye={},zi={},Bi;function fl(s,e){var t,i=Math.min(s.length,e.length);for(t=0;t<i;t+=1)if(s[t]!==e[t])return t;return i}function Mr(s){return s&&s.toLowerCase().replace("_","-")}function pl(s){for(var e=0,t,i,n,r;e<s.length;){for(r=Mr(s[e]).split("-"),t=r.length,i=Mr(s[e+1]),i=i?i.split("-"):null;t>0;){if(n=bs(r.slice(0,t).join("-")),n)return n;if(i&&i.length>=t&&fl(r,i)>=t-1)break;t--}e++}return Bi}function ml(s){return!!(s&&s.match("^[^/\\\\]*$"))}function bs(s){var e=null,t;if(Ye[s]===void 0&&typeof module<"u"&&module&&module.exports&&ml(s))try{e=Bi._abbr,t=require,t("./locale/"+s),$t(e)}catch{Ye[s]=null}return Ye[s]}function $t(s,e){var t;return s&&(st(e)?t=It(s):t=dn(s,e),t?Bi=t:typeof console<"u"&&console.warn&&console.warn("Locale "+s+" not found. Did you forget to load it?")),Bi._abbr}function dn(s,e){if(e!==null){var t,i=xr;if(e.abbr=s,Ye[s]!=null)ar("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Ye[s]._config;else if(e.parentLocale!=null)if(Ye[e.parentLocale]!=null)i=Ye[e.parentLocale]._config;else if(t=bs(e.parentLocale),t!=null)i=t._config;else return zi[e.parentLocale]||(zi[e.parentLocale]=[]),zi[e.parentLocale].push({name:s,config:e}),null;return Ye[s]=new Xs(Js(i,e)),zi[s]&&zi[s].forEach(function(n){dn(n.name,n.config)}),$t(s),Ye[s]}else return delete Ye[s],null}function gl(s,e){if(e!=null){var t,i,n=xr;Ye[s]!=null&&Ye[s].parentLocale!=null?Ye[s].set(Js(Ye[s]._config,e)):(i=bs(s),i!=null&&(n=i._config),e=Js(n,e),i==null&&(e.abbr=s),t=new Xs(e),t.parentLocale=Ye[s],Ye[s]=t),$t(s)}else Ye[s]!=null&&(Ye[s].parentLocale!=null?(Ye[s]=Ye[s].parentLocale,s===$t()&&$t(s)):Ye[s]!=null&&delete Ye[s]);return Ye[s]}function It(s){var e;if(s&&s._locale&&s._locale._abbr&&(s=s._locale._abbr),!s)return Bi;if(!Et(s)){if(e=bs(s),e)return e;s=[s]}return pl(s)}function bl(){return Zs(Ye)}function cn(s){var e,t=s._a;return t&&Ce(s).overflow===-2&&(e=t[zt]<0||t[zt]>11?zt:t[Tt]<1||t[Tt]>on(t[Xe],t[zt])?Tt:t[qe]<0||t[qe]>24||t[qe]===24&&(t[xt]!==0||t[Bt]!==0||t[Qt]!==0)?qe:t[xt]<0||t[xt]>59?xt:t[Bt]<0||t[Bt]>59?Bt:t[Qt]<0||t[Qt]>999?Qt:-1,Ce(s)._overflowDayOfYear&&(e<Xe||e>Tt)&&(e=Tt),Ce(s)._overflowWeeks&&e===-1&&(e=Co),Ce(s)._overflowWeekday&&e===-1&&(e=Eo),Ce(s).overflow=e),s}var vl=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yl=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wl=/Z|[+-]\d\d(?::?\d\d)?/,vs=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],fn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Cl=/^\/?Date\((-?\d+)/i,El=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,kl={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Sr(s){var e,t,i=s._i,n=vl.exec(i)||yl.exec(i),r,a,o,l,u=vs.length,h=fn.length;if(n){for(Ce(s).iso=!0,e=0,t=u;e<t;e++)if(vs[e][1].exec(n[1])){a=vs[e][0],r=vs[e][2]!==!1;break}if(a==null){s._isValid=!1;return}if(n[3]){for(e=0,t=h;e<t;e++)if(fn[e][1].exec(n[3])){o=(n[2]||" ")+fn[e][0];break}if(o==null){s._isValid=!1;return}}if(!r&&o!=null){s._isValid=!1;return}if(n[4])if(wl.exec(n[4]))l="Z";else{s._isValid=!1;return}s._f=a+(o||"")+(l||""),mn(s)}else s._isValid=!1}function xl(s,e,t,i,n,r){var a=[Ml(s),mr.indexOf(e),parseInt(t,10),parseInt(i,10),parseInt(n,10)];return r&&a.push(parseInt(r,10)),a}function Ml(s){var e=parseInt(s,10);return e<=49?2e3+e:e<=999?1900+e:e}function Sl(s){return s.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Rl(s,e,t){if(s){var i=Cr.indexOf(s),n=new Date(e[0],e[1],e[2]).getDay();if(i!==n)return Ce(t).weekdayMismatch=!0,t._isValid=!1,!1}return!0}function Dl(s,e,t){if(s)return kl[s];if(e)return 0;var i=parseInt(t,10),n=i%100,r=(i-n)/100;return r*60+n}function Rr(s){var e=El.exec(Sl(s._i)),t;if(e){if(t=xl(e[4],e[3],e[2],e[5],e[6],e[7]),!Rl(e[1],t,s))return;s._a=t,s._tzm=Dl(e[8],e[9],e[10]),s._d=Ai.apply(null,s._a),s._d.setUTCMinutes(s._d.getUTCMinutes()-s._tzm),Ce(s).rfc2822=!0}else s._isValid=!1}function Tl(s){var e=Cl.exec(s._i);if(e!==null){s._d=new Date(+e[1]);return}if(Sr(s),s._isValid===!1)delete s._isValid;else return;if(Rr(s),s._isValid===!1)delete s._isValid;else return;s._strict?s._isValid=!1:ue.createFromInputFallback(s)}ue.createFromInputFallback=pt("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(s){s._d=new Date(s._i+(s._useUTC?" UTC":""))});function di(s,e,t){return s??e??t}function _l(s){var e=new Date(ue.now());return s._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function pn(s){var e,t,i=[],n,r,a;if(!s._d){for(n=_l(s),s._w&&s._a[Tt]==null&&s._a[zt]==null&&Ol(s),s._dayOfYear!=null&&(a=di(s._a[Xe],n[Xe]),(s._dayOfYear>Pi(a)||s._dayOfYear===0)&&(Ce(s)._overflowDayOfYear=!0),t=Ai(a,0,s._dayOfYear),s._a[zt]=t.getUTCMonth(),s._a[Tt]=t.getUTCDate()),e=0;e<3&&s._a[e]==null;++e)s._a[e]=i[e]=n[e];for(;e<7;e++)s._a[e]=i[e]=s._a[e]==null?e===2?1:0:s._a[e];s._a[qe]===24&&s._a[xt]===0&&s._a[Bt]===0&&s._a[Qt]===0&&(s._nextDay=!0,s._a[qe]=0),s._d=(s._useUTC?Ai:zo).apply(null,i),r=s._useUTC?s._d.getUTCDay():s._d.getDay(),s._tzm!=null&&s._d.setUTCMinutes(s._d.getUTCMinutes()-s._tzm),s._nextDay&&(s._a[qe]=24),s._w&&typeof s._w.d<"u"&&s._w.d!==r&&(Ce(s).weekdayMismatch=!0)}}function Ol(s){var e,t,i,n,r,a,o,l,u;e=s._w,e.GG!=null||e.W!=null||e.E!=null?(r=1,a=4,t=di(e.GG,s._a[Xe],Hi(Ve(),1,4).year),i=di(e.W,1),n=di(e.E,1),(n<1||n>7)&&(l=!0)):(r=s._locale._week.dow,a=s._locale._week.doy,u=Hi(Ve(),r,a),t=di(e.gg,s._a[Xe],u.year),i=di(e.w,u.week),e.d!=null?(n=e.d,(n<0||n>6)&&(l=!0)):e.e!=null?(n=e.e+r,(e.e<0||e.e>6)&&(l=!0)):n=r),i<1||i>Nt(t,r,a)?Ce(s)._overflowWeeks=!0:l!=null?Ce(s)._overflowWeekday=!0:(o=wr(t,i,n,r,a),s._a[Xe]=o.year,s._dayOfYear=o.dayOfYear)}ue.ISO_8601=function(){},ue.RFC_2822=function(){};function mn(s){if(s._f===ue.ISO_8601){Sr(s);return}if(s._f===ue.RFC_2822){Rr(s);return}s._a=[],Ce(s).empty=!0;var e=""+s._i,t,i,n,r,a,o=e.length,l=0,u,h;for(n=or(s._f,s._locale).match(Qs)||[],h=n.length,t=0;t<h;t++)r=n[t],i=(e.match(vo(r,s))||[])[0],i&&(a=e.substr(0,e.indexOf(i)),a.length>0&&Ce(s).unusedInput.push(a),e=e.slice(e.indexOf(i)+i.length),l+=i.length),oi[r]?(i?Ce(s).empty=!1:Ce(s).unusedTokens.push(r),wo(r,i,s)):s._strict&&!i&&Ce(s).unusedTokens.push(r);Ce(s).charsLeftOver=o-l,e.length>0&&Ce(s).unusedInput.push(e),s._a[qe]<=12&&Ce(s).bigHour===!0&&s._a[qe]>0&&(Ce(s).bigHour=void 0),Ce(s).parsedDateParts=s._a.slice(0),Ce(s).meridiem=s._meridiem,s._a[qe]=Ll(s._locale,s._a[qe],s._meridiem),u=Ce(s).era,u!==null&&(s._a[Xe]=s._locale.erasConvertYear(u,s._a[Xe])),pn(s),cn(s)}function Ll(s,e,t){var i;return t==null?e:s.meridiemHour!=null?s.meridiemHour(e,t):(s.isPM!=null&&(i=s.isPM(t),i&&e<12&&(e+=12),!i&&e===12&&(e=0)),e)}function Pl(s){var e,t,i,n,r,a,o=!1,l=s._f.length;if(l===0){Ce(s).invalidFormat=!0,s._d=new Date(NaN);return}for(n=0;n<l;n++)r=0,a=!1,e=qs({},s),s._useUTC!=null&&(e._useUTC=s._useUTC),e._f=s._f[n],mn(e),Us(e)&&(a=!0),r+=Ce(e).charsLeftOver,r+=Ce(e).unusedTokens.length*10,Ce(e).score=r,o?r<i&&(i=r,t=e):(i==null||r<i||a)&&(i=r,t=e,a&&(o=!0));Gt(s,t||e)}function Fl(s){if(!s._d){var e=tn(s._i),t=e.day===void 0?e.date:e.day;s._a=ir([e.year,e.month,t,e.hour,e.minute,e.second,e.millisecond],function(i){return i&&parseInt(i,10)}),pn(s)}}function Al(s){var e=new _i(cn(Dr(s)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Dr(s){var e=s._i,t=s._f;return s._locale=s._locale||It(s._l),e===null||t===void 0&&e===""?as({nullInput:!0}):(typeof e=="string"&&(s._i=e=s._locale.preparse(e)),kt(e)?new _i(cn(e)):(Ti(e)?s._d=e:Et(t)?Pl(s):t?mn(s):Hl(s),Us(s)||(s._d=null),s))}function Hl(s){var e=s._i;st(e)?s._d=new Date(ue.now()):Ti(e)?s._d=new Date(e.valueOf()):typeof e=="string"?Tl(s):Et(e)?(s._a=ir(e.slice(0),function(t){return parseInt(t,10)}),pn(s)):Zt(e)?Fl(s):At(e)?s._d=new Date(e):ue.createFromInputFallback(s)}function Tr(s,e,t,i,n){var r={};return(e===!0||e===!1)&&(i=e,e=void 0),(t===!0||t===!1)&&(i=t,t=void 0),(Zt(s)&&Gs(s)||Et(s)&&s.length===0)&&(s=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=n,r._l=t,r._i=s,r._f=e,r._strict=i,Al(r)}function Ve(s,e,t,i){return Tr(s,e,t,i,!1)}var zl=pt("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var s=Ve.apply(null,arguments);return this.isValid()&&s.isValid()?s<this?this:s:as()}),Bl=pt("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var s=Ve.apply(null,arguments);return this.isValid()&&s.isValid()?s>this?this:s:as()});function _r(s,e){var t,i;if(e.length===1&&Et(e[0])&&(e=e[0]),!e.length)return Ve();for(t=e[0],i=1;i<e.length;++i)(!e[i].isValid()||e[i][s](t))&&(t=e[i]);return t}function Nl(){var s=[].slice.call(arguments,0);return _r("isBefore",s)}function Il(){var s=[].slice.call(arguments,0);return _r("isAfter",s)}var Vl=function(){return Date.now?Date.now():+new Date},Ni=["year","quarter","month","week","day","hour","minute","second","millisecond"];function jl(s){var e,t=!1,i,n=Ni.length;for(e in s)if(Te(s,e)&&!(Ue.call(Ni,e)!==-1&&(s[e]==null||!isNaN(s[e]))))return!1;for(i=0;i<n;++i)if(s[Ni[i]]){if(t)return!1;parseFloat(s[Ni[i]])!==Re(s[Ni[i]])&&(t=!0)}return!0}function Wl(){return this._isValid}function Yl(){return Mt(NaN)}function ys(s){var e=tn(s),t=e.year||0,i=e.quarter||0,n=e.month||0,r=e.week||e.isoWeek||0,a=e.day||0,o=e.hour||0,l=e.minute||0,u=e.second||0,h=e.millisecond||0;this._isValid=jl(e),this._milliseconds=+h+u*1e3+l*6e4+o*1e3*60*60,this._days=+a+r*7,this._months=+n+i*3+t*12,this._data={},this._locale=It(),this._bubble()}function ws(s){return s instanceof ys}function gn(s){return s<0?Math.round(-1*s)*-1:Math.round(s)}function Gl(s,e,t){var i=Math.min(s.length,e.length),n=Math.abs(s.length-e.length),r=0,a;for(a=0;a<i;a++)Re(s[a])!==Re(e[a])&&r++;return r+n}function Or(s,e){ge(s,0,0,function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+Dt(~~(t/60),2)+e+Dt(~~t%60,2)})}Or("Z",":"),Or("ZZ",""),de("Z",fs),de("ZZ",fs),Ae(["Z","ZZ"],function(s,e,t){t._useUTC=!0,t._tzm=bn(fs,s)});var $l=/([\+\-]|\d\d)/gi;function bn(s,e){var t=(e||"").match(s),i,n,r;return t===null?null:(i=t[t.length-1]||[],n=(i+"").match($l)||["-",0,0],r=+(n[1]*60)+Re(n[2]),r===0?0:n[0]==="+"?r:-r)}function vn(s,e){var t,i;return e._isUTC?(t=e.clone(),i=(kt(s)||Ti(s)?s.valueOf():Ve(s).valueOf())-t.valueOf(),t._d.setTime(t._d.valueOf()+i),ue.updateOffset(t,!1),t):Ve(s).local()}function yn(s){return-Math.round(s._d.getTimezoneOffset())}ue.updateOffset=function(){};function Ul(s,e,t){var i=this._offset||0,n;if(!this.isValid())return s!=null?this:NaN;if(s!=null){if(typeof s=="string"){if(s=bn(fs,s),s===null)return this}else Math.abs(s)<16&&!t&&(s=s*60);return!this._isUTC&&e&&(n=yn(this)),this._offset=s,this._isUTC=!0,n!=null&&this.add(n,"m"),i!==s&&(!e||this._changeInProgress?Ar(this,Mt(s-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ue.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?i:yn(this)}function Kl(s,e){return s!=null?(typeof s!="string"&&(s=-s),this.utcOffset(s,e),this):-this.utcOffset()}function ql(s){return this.utcOffset(0,s)}function Jl(s){return this._isUTC&&(this.utcOffset(0,s),this._isUTC=!1,s&&this.subtract(yn(this),"m")),this}function Xl(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var s=bn(go,this._i);s!=null?this.utcOffset(s):this.utcOffset(0,!0)}return this}function Zl(s){return this.isValid()?(s=s?Ve(s).utcOffset():0,(this.utcOffset()-s)%60===0):!1}function Ql(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function eu(){if(!st(this._isDSTShifted))return this._isDSTShifted;var s={},e;return qs(s,this),s=Dr(s),s._a?(e=s._isUTC?St(s._a):Ve(s._a),this._isDSTShifted=this.isValid()&&Gl(s._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function tu(){return this.isValid()?!this._isUTC:!1}function iu(){return this.isValid()?this._isUTC:!1}function Lr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var su=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,nu=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Mt(s,e){var t=s,i=null,n,r,a;return ws(s)?t={ms:s._milliseconds,d:s._days,M:s._months}:At(s)||!isNaN(+s)?(t={},e?t[e]=+s:t.milliseconds=+s):(i=su.exec(s))?(n=i[1]==="-"?-1:1,t={y:0,d:Re(i[Tt])*n,h:Re(i[qe])*n,m:Re(i[xt])*n,s:Re(i[Bt])*n,ms:Re(gn(i[Qt]*1e3))*n}):(i=nu.exec(s))?(n=i[1]==="-"?-1:1,t={y:ei(i[2],n),M:ei(i[3],n),w:ei(i[4],n),d:ei(i[5],n),h:ei(i[6],n),m:ei(i[7],n),s:ei(i[8],n)}):t==null?t={}:typeof t=="object"&&("from"in t||"to"in t)&&(a=ru(Ve(t.from),Ve(t.to)),t={},t.ms=a.milliseconds,t.M=a.months),r=new ys(t),ws(s)&&Te(s,"_locale")&&(r._locale=s._locale),ws(s)&&Te(s,"_isValid")&&(r._isValid=s._isValid),r}Mt.fn=ys.prototype,Mt.invalid=Yl;function ei(s,e){var t=s&&parseFloat(s.replace(",","."));return(isNaN(t)?0:t)*e}function Pr(s,e){var t={};return t.months=e.month()-s.month()+(e.year()-s.year())*12,s.clone().add(t.months,"M").isAfter(e)&&--t.months,t.milliseconds=+e-+s.clone().add(t.months,"M"),t}function ru(s,e){var t;return s.isValid()&&e.isValid()?(e=vn(e,s),s.isBefore(e)?t=Pr(s,e):(t=Pr(e,s),t.milliseconds=-t.milliseconds,t.months=-t.months),t):{milliseconds:0,months:0}}function Fr(s,e){return function(t,i){var n,r;return i!==null&&!isNaN(+i)&&(ar(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=t,t=i,i=r),n=Mt(t,i),Ar(this,n,s),this}}function Ar(s,e,t,i){var n=e._milliseconds,r=gn(e._days),a=gn(e._months);s.isValid()&&(i=i??!0,a&&br(s,Fi(s,"Month")+a*t),r&&pr(s,"Date",Fi(s,"Date")+r*t),n&&s._d.setTime(s._d.valueOf()+n*t),i&&ue.updateOffset(s,r||a))}var au=Fr(1,"add"),ou=Fr(-1,"subtract");function Hr(s){return typeof s=="string"||s instanceof String}function lu(s){return kt(s)||Ti(s)||Hr(s)||At(s)||hu(s)||uu(s)||s===null||s===void 0}function uu(s){var e=Zt(s)&&!Gs(s),t=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],n,r,a=i.length;for(n=0;n<a;n+=1)r=i[n],t=t||Te(s,r);return e&&t}function hu(s){var e=Et(s),t=!1;return e&&(t=s.filter(function(i){return!At(i)&&Hr(s)}).length===0),e&&t}function du(s){var e=Zt(s)&&!Gs(s),t=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],n,r;for(n=0;n<i.length;n+=1)r=i[n],t=t||Te(s,r);return e&&t}function cu(s,e){var t=s.diff(e,"days",!0);return t<-6?"sameElse":t<-1?"lastWeek":t<0?"lastDay":t<1?"sameDay":t<2?"nextDay":t<7?"nextWeek":"sameElse"}function fu(s,e){arguments.length===1&&(arguments[0]?lu(arguments[0])?(s=arguments[0],e=void 0):du(arguments[0])&&(e=arguments[0],s=void 0):(s=void 0,e=void 0));var t=s||Ve(),i=vn(t,this).startOf("day"),n=ue.calendarFormat(this,i)||"sameElse",r=e&&(Rt(e[n])?e[n].call(this,t):e[n]);return this.format(r||this.localeData().calendar(n,this,Ve(t)))}function pu(){return new _i(this)}function mu(s,e){var t=kt(s)?s:Ve(s);return this.isValid()&&t.isValid()?(e=mt(e)||"millisecond",e==="millisecond"?this.valueOf()>t.valueOf():t.valueOf()<this.clone().startOf(e).valueOf()):!1}function gu(s,e){var t=kt(s)?s:Ve(s);return this.isValid()&&t.isValid()?(e=mt(e)||"millisecond",e==="millisecond"?this.valueOf()<t.valueOf():this.clone().endOf(e).valueOf()<t.valueOf()):!1}function bu(s,e,t,i){var n=kt(s)?s:Ve(s),r=kt(e)?e:Ve(e);return this.isValid()&&n.isValid()&&r.isValid()?(i=i||"()",(i[0]==="("?this.isAfter(n,t):!this.isBefore(n,t))&&(i[1]===")"?this.isBefore(r,t):!this.isAfter(r,t))):!1}function vu(s,e){var t=kt(s)?s:Ve(s),i;return this.isValid()&&t.isValid()?(e=mt(e)||"millisecond",e==="millisecond"?this.valueOf()===t.valueOf():(i=t.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf())):!1}function yu(s,e){return this.isSame(s,e)||this.isAfter(s,e)}function wu(s,e){return this.isSame(s,e)||this.isBefore(s,e)}function Cu(s,e,t){var i,n,r;if(!this.isValid())return NaN;if(i=vn(s,this),!i.isValid())return NaN;switch(n=(i.utcOffset()-this.utcOffset())*6e4,e=mt(e),e){case"year":r=Cs(this,i)/12;break;case"month":r=Cs(this,i);break;case"quarter":r=Cs(this,i)/3;break;case"second":r=(this-i)/1e3;break;case"minute":r=(this-i)/6e4;break;case"hour":r=(this-i)/36e5;break;case"day":r=(this-i-n)/864e5;break;case"week":r=(this-i-n)/6048e5;break;default:r=this-i}return t?r:gt(r)}function Cs(s,e){if(s.date()<e.date())return-Cs(e,s);var t=(e.year()-s.year())*12+(e.month()-s.month()),i=s.clone().add(t,"months"),n,r;return e-i<0?(n=s.clone().add(t-1,"months"),r=(e-i)/(i-n)):(n=s.clone().add(t+1,"months"),r=(e-i)/(n-i)),-(t+r)||0}ue.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",ue.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Eu(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ku(s){if(!this.isValid())return null;var e=s!==!0,t=e?this.clone().utc():this;return t.year()<0||t.year()>9999?ls(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Rt(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ls(t,"Z")):ls(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function xu(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var s="moment",e="",t,i,n,r;return this.isLocal()||(s=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),t="["+s+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=e+'[")]',this.format(t+i+n+r)}function Mu(s){s||(s=this.isUtc()?ue.defaultFormatUtc:ue.defaultFormat);var e=ls(this,s);return this.localeData().postformat(e)}function Su(s,e){return this.isValid()&&(kt(s)&&s.isValid()||Ve(s).isValid())?Mt({to:this,from:s}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function Ru(s){return this.from(Ve(),s)}function Du(s,e){return this.isValid()&&(kt(s)&&s.isValid()||Ve(s).isValid())?Mt({from:this,to:s}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function Tu(s){return this.to(Ve(),s)}function zr(s){var e;return s===void 0?this._locale._abbr:(e=It(s),e!=null&&(this._locale=e),this)}var Br=pt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(s){return s===void 0?this.localeData():this.locale(s)});function Nr(){return this._locale}var Es=1e3,ci=60*Es,ks=60*ci,Ir=(365*400+97)*24*ks;function fi(s,e){return(s%e+e)%e}function Vr(s,e,t){return s<100&&s>=0?new Date(s+400,e,t)-Ir:new Date(s,e,t).valueOf()}function jr(s,e,t){return s<100&&s>=0?Date.UTC(s+400,e,t)-Ir:Date.UTC(s,e,t)}function _u(s){var e,t;if(s=mt(s),s===void 0||s==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?jr:Vr,s){case"year":e=t(this.year(),0,1);break;case"quarter":e=t(this.year(),this.month()-this.month()%3,1);break;case"month":e=t(this.year(),this.month(),1);break;case"week":e=t(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=t(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=fi(e+(this._isUTC?0:this.utcOffset()*ci),ks);break;case"minute":e=this._d.valueOf(),e-=fi(e,ci);break;case"second":e=this._d.valueOf(),e-=fi(e,Es);break}return this._d.setTime(e),ue.updateOffset(this,!0),this}function Ou(s){var e,t;if(s=mt(s),s===void 0||s==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?jr:Vr,s){case"year":e=t(this.year()+1,0,1)-1;break;case"quarter":e=t(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=t(this.year(),this.month()+1,1)-1;break;case"week":e=t(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=t(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=ks-fi(e+(this._isUTC?0:this.utcOffset()*ci),ks)-1;break;case"minute":e=this._d.valueOf(),e+=ci-fi(e,ci)-1;break;case"second":e=this._d.valueOf(),e+=Es-fi(e,Es)-1;break}return this._d.setTime(e),ue.updateOffset(this,!0),this}function Lu(){return this._d.valueOf()-(this._offset||0)*6e4}function Pu(){return Math.floor(this.valueOf()/1e3)}function Fu(){return new Date(this.valueOf())}function Au(){var s=this;return[s.year(),s.month(),s.date(),s.hour(),s.minute(),s.second(),s.millisecond()]}function Hu(){var s=this;return{years:s.year(),months:s.month(),date:s.date(),hours:s.hours(),minutes:s.minutes(),seconds:s.seconds(),milliseconds:s.milliseconds()}}function zu(){return this.isValid()?this.toISOString():null}function Bu(){return Us(this)}function Nu(){return Gt({},Ce(this))}function Iu(){return Ce(this).overflow}function Vu(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}ge("N",0,0,"eraAbbr"),ge("NN",0,0,"eraAbbr"),ge("NNN",0,0,"eraAbbr"),ge("NNNN",0,0,"eraName"),ge("NNNNN",0,0,"eraNarrow"),ge("y",["y",1],"yo","eraYear"),ge("y",["yy",2],0,"eraYear"),ge("y",["yyy",3],0,"eraYear"),ge("y",["yyyy",4],0,"eraYear"),de("N",wn),de("NN",wn),de("NNN",wn),de("NNNN",Zu),de("NNNNN",Qu),Ae(["N","NN","NNN","NNNN","NNNNN"],function(s,e,t,i){var n=t._locale.erasParse(s,i,t._strict);n?Ce(t).era=n:Ce(t).invalidEra=s}),de("y",li),de("yy",li),de("yyy",li),de("yyyy",li),de("yo",eh),Ae(["y","yy","yyy","yyyy"],Xe),Ae(["yo"],function(s,e,t,i){var n;t._locale._eraYearOrdinalRegex&&(n=s.match(t._locale._eraYearOrdinalRegex)),t._locale.eraYearOrdinalParse?e[Xe]=t._locale.eraYearOrdinalParse(s,n):e[Xe]=parseInt(s,10)});function ju(s,e){var t,i,n,r=this._eras||It("en")._eras;for(t=0,i=r.length;t<i;++t){switch(typeof r[t].since){case"string":n=ue(r[t].since).startOf("day"),r[t].since=n.valueOf();break}switch(typeof r[t].until){case"undefined":r[t].until=1/0;break;case"string":n=ue(r[t].until).startOf("day").valueOf(),r[t].until=n.valueOf();break}}return r}function Wu(s,e,t){var i,n,r=this.eras(),a,o,l;for(s=s.toUpperCase(),i=0,n=r.length;i<n;++i)if(a=r[i].name.toUpperCase(),o=r[i].abbr.toUpperCase(),l=r[i].narrow.toUpperCase(),t)switch(e){case"N":case"NN":case"NNN":if(o===s)return r[i];break;case"NNNN":if(a===s)return r[i];break;case"NNNNN":if(l===s)return r[i];break}else if([a,o,l].indexOf(s)>=0)return r[i]}function Yu(s,e){var t=s.since<=s.until?1:-1;return e===void 0?ue(s.since).year():ue(s.since).year()+(e-s.offset)*t}function Gu(){var s,e,t,i=this.localeData().eras();for(s=0,e=i.length;s<e;++s)if(t=this.clone().startOf("day").valueOf(),i[s].since<=t&&t<=i[s].until||i[s].until<=t&&t<=i[s].since)return i[s].name;return""}function $u(){var s,e,t,i=this.localeData().eras();for(s=0,e=i.length;s<e;++s)if(t=this.clone().startOf("day").valueOf(),i[s].since<=t&&t<=i[s].until||i[s].until<=t&&t<=i[s].since)return i[s].narrow;return""}function Uu(){var s,e,t,i=this.localeData().eras();for(s=0,e=i.length;s<e;++s)if(t=this.clone().startOf("day").valueOf(),i[s].since<=t&&t<=i[s].until||i[s].until<=t&&t<=i[s].since)return i[s].abbr;return""}function Ku(){var s,e,t,i,n=this.localeData().eras();for(s=0,e=n.length;s<e;++s)if(t=n[s].since<=n[s].until?1:-1,i=this.clone().startOf("day").valueOf(),n[s].since<=i&&i<=n[s].until||n[s].until<=i&&i<=n[s].since)return(this.year()-ue(n[s].since).year())*t+n[s].offset;return this.year()}function qu(s){return Te(this,"_erasNameRegex")||Cn.call(this),s?this._erasNameRegex:this._erasRegex}function Ju(s){return Te(this,"_erasAbbrRegex")||Cn.call(this),s?this._erasAbbrRegex:this._erasRegex}function Xu(s){return Te(this,"_erasNarrowRegex")||Cn.call(this),s?this._erasNarrowRegex:this._erasRegex}function wn(s,e){return e.erasAbbrRegex(s)}function Zu(s,e){return e.erasNameRegex(s)}function Qu(s,e){return e.erasNarrowRegex(s)}function eh(s,e){return e._eraYearOrdinalRegex||li}function Cn(){var s=[],e=[],t=[],i=[],n,r,a,o,l,u=this.eras();for(n=0,r=u.length;n<r;++n)a=Ht(u[n].name),o=Ht(u[n].abbr),l=Ht(u[n].narrow),e.push(a),s.push(o),t.push(l),i.push(a),i.push(o),i.push(l);this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+t.join("|")+")","i")}ge(0,["gg",2],0,function(){return this.weekYear()%100}),ge(0,["GG",2],0,function(){return this.isoWeekYear()%100});function xs(s,e){ge(0,[s,s.length],0,e)}xs("gggg","weekYear"),xs("ggggg","weekYear"),xs("GGGG","isoWeekYear"),xs("GGGGG","isoWeekYear"),de("G",cs),de("g",cs),de("GG",Ie,lt),de("gg",Ie,lt),de("GGGG",nn,sn),de("gggg",nn,sn),de("GGGGG",ds,us),de("ggggg",ds,us),Li(["gggg","ggggg","GGGG","GGGGG"],function(s,e,t,i){e[i.substr(0,2)]=Re(s)}),Li(["gg","GG"],function(s,e,t,i){e[i]=ue.parseTwoDigitYear(s)});function th(s){return Wr.call(this,s,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function ih(s){return Wr.call(this,s,this.isoWeek(),this.isoWeekday(),1,4)}function sh(){return Nt(this.year(),1,4)}function nh(){return Nt(this.isoWeekYear(),1,4)}function rh(){var s=this.localeData()._week;return Nt(this.year(),s.dow,s.doy)}function ah(){var s=this.localeData()._week;return Nt(this.weekYear(),s.dow,s.doy)}function Wr(s,e,t,i,n){var r;return s==null?Hi(this,i,n).year:(r=Nt(s,i,n),e>r&&(e=r),oh.call(this,s,e,t,i,n))}function oh(s,e,t,i,n){var r=wr(s,e,t,i,n),a=Ai(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}ge("Q",0,"Qo","quarter"),de("Q",ur),Ae("Q",function(s,e){e[zt]=(Re(s)-1)*3});function lh(s){return s==null?Math.ceil((this.month()+1)/3):this.month((s-1)*3+this.month()%3)}ge("D",["DD",2],"Do","date"),de("D",Ie,ui),de("DD",Ie,lt),de("Do",function(s,e){return s?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),Ae(["D","DD"],Tt),Ae("Do",function(s,e){e[Tt]=Re(s.match(Ie)[0])});var Yr=hi("Date",!0);ge("DDD",["DDDD",3],"DDDo","dayOfYear"),de("DDD",hs),de("DDDD",hr),Ae(["DDD","DDDD"],function(s,e,t){t._dayOfYear=Re(s)});function uh(s){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return s==null?e:this.add(s-e,"d")}ge("m",["mm",2],0,"minute"),de("m",Ie,rn),de("mm",Ie,lt),Ae(["m","mm"],xt);var hh=hi("Minutes",!1);ge("s",["ss",2],0,"second"),de("s",Ie,rn),de("ss",Ie,lt),Ae(["s","ss"],Bt);var dh=hi("Seconds",!1);ge("S",0,0,function(){return~~(this.millisecond()/100)}),ge(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),ge(0,["SSS",3],0,"millisecond"),ge(0,["SSSS",4],0,function(){return this.millisecond()*10}),ge(0,["SSSSS",5],0,function(){return this.millisecond()*100}),ge(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),ge(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),ge(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),ge(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),de("S",hs,ur),de("SS",hs,lt),de("SSS",hs,hr);var Ut,Gr;for(Ut="SSSS";Ut.length<=9;Ut+="S")de(Ut,li);function ch(s,e){e[Qt]=Re(("0."+s)*1e3)}for(Ut="S";Ut.length<=9;Ut+="S")Ae(Ut,ch);Gr=hi("Milliseconds",!1),ge("z",0,0,"zoneAbbr"),ge("zz",0,0,"zoneName");function fh(){return this._isUTC?"UTC":""}function ph(){return this._isUTC?"Coordinated Universal Time":""}var ae=_i.prototype;ae.add=au,ae.calendar=fu,ae.clone=pu,ae.diff=Cu,ae.endOf=Ou,ae.format=Mu,ae.from=Su,ae.fromNow=Ru,ae.to=Du,ae.toNow=Tu,ae.get=xo,ae.invalidAt=Iu,ae.isAfter=mu,ae.isBefore=gu,ae.isBetween=bu,ae.isSame=vu,ae.isSameOrAfter=yu,ae.isSameOrBefore=wu,ae.isValid=Bu,ae.lang=Br,ae.locale=zr,ae.localeData=Nr,ae.max=Bl,ae.min=zl,ae.parsingFlags=Nu,ae.set=Mo,ae.startOf=_u,ae.subtract=ou,ae.toArray=Au,ae.toObject=Hu,ae.toDate=Fu,ae.toISOString=ku,ae.inspect=xu,typeof Symbol<"u"&&Symbol.for!=null&&(ae[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ae.toJSON=zu,ae.toString=Eu,ae.unix=Pu,ae.valueOf=Lu,ae.creationData=Vu,ae.eraName=Gu,ae.eraNarrow=$u,ae.eraAbbr=Uu,ae.eraYear=Ku,ae.year=fr,ae.isLeapYear=ko,ae.weekYear=th,ae.isoWeekYear=ih,ae.quarter=ae.quarters=lh,ae.month=vr,ae.daysInMonth=Fo,ae.week=ae.weeks=jo,ae.isoWeek=ae.isoWeeks=Wo,ae.weeksInYear=rh,ae.weeksInWeekYear=ah,ae.isoWeeksInYear=sh,ae.isoWeeksInISOWeekYear=nh,ae.date=Yr,ae.day=ae.days=il,ae.weekday=sl,ae.isoWeekday=nl,ae.dayOfYear=uh,ae.hour=ae.hours=dl,ae.minute=ae.minutes=hh,ae.second=ae.seconds=dh,ae.millisecond=ae.milliseconds=Gr,ae.utcOffset=Ul,ae.utc=ql,ae.local=Jl,ae.parseZone=Xl,ae.hasAlignedHourOffset=Zl,ae.isDST=Ql,ae.isLocal=tu,ae.isUtcOffset=iu,ae.isUtc=Lr,ae.isUTC=Lr,ae.zoneAbbr=fh,ae.zoneName=ph,ae.dates=pt("dates accessor is deprecated. Use date instead.",Yr),ae.months=pt("months accessor is deprecated. Use month instead",vr),ae.years=pt("years accessor is deprecated. Use year instead",fr),ae.zone=pt("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Kl),ae.isDSTShifted=pt("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",eu);function mh(s){return Ve(s*1e3)}function gh(){return Ve.apply(null,arguments).parseZone()}function $r(s){return s}var _e=Xs.prototype;_e.calendar=eo,_e.longDateFormat=no,_e.invalidDate=ao,_e.ordinal=uo,_e.preparse=$r,_e.postformat=$r,_e.relativeTime=co,_e.pastFuture=fo,_e.set=Za,_e.eras=ju,_e.erasParse=Wu,_e.erasConvertYear=Yu,_e.erasAbbrRegex=Ju,_e.erasNameRegex=qu,_e.erasNarrowRegex=Xu,_e.months=_o,_e.monthsShort=Oo,_e.monthsParse=Po,_e.monthsRegex=Ho,_e.monthsShortRegex=Ao,_e.week=Bo,_e.firstDayOfYear=Vo,_e.firstDayOfWeek=Io,_e.weekdays=Xo,_e.weekdaysMin=Qo,_e.weekdaysShort=Zo,_e.weekdaysParse=tl,_e.weekdaysRegex=rl,_e.weekdaysShortRegex=al,_e.weekdaysMinRegex=ol,_e.isPM=ul,_e.meridiem=cl;function Ms(s,e,t,i){var n=It(),r=St().set(i,e);return n[t](r,s)}function Ur(s,e,t){if(At(s)&&(e=s,s=void 0),s=s||"",e!=null)return Ms(s,e,t,"month");var i,n=[];for(i=0;i<12;i++)n[i]=Ms(s,i,t,"month");return n}function En(s,e,t,i){typeof s=="boolean"?(At(e)&&(t=e,e=void 0),e=e||""):(e=s,t=e,s=!1,At(e)&&(t=e,e=void 0),e=e||"");var n=It(),r=s?n._week.dow:0,a,o=[];if(t!=null)return Ms(e,(t+r)%7,i,"day");for(a=0;a<7;a++)o[a]=Ms(e,(a+r)%7,i,"day");return o}function bh(s,e){return Ur(s,e,"months")}function vh(s,e){return Ur(s,e,"monthsShort")}function yh(s,e,t){return En(s,e,t,"weekdays")}function wh(s,e,t){return En(s,e,t,"weekdaysShort")}function Ch(s,e,t){return En(s,e,t,"weekdaysMin")}$t("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(s){var e=s%10,t=Re(s%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return s+t}}),ue.lang=pt("moment.lang is deprecated. Use moment.locale instead.",$t),ue.langData=pt("moment.langData is deprecated. Use moment.localeData instead.",It);var Vt=Math.abs;function Eh(){var s=this._data;return this._milliseconds=Vt(this._milliseconds),this._days=Vt(this._days),this._months=Vt(this._months),s.milliseconds=Vt(s.milliseconds),s.seconds=Vt(s.seconds),s.minutes=Vt(s.minutes),s.hours=Vt(s.hours),s.months=Vt(s.months),s.years=Vt(s.years),this}function Kr(s,e,t,i){var n=Mt(e,t);return s._milliseconds+=i*n._milliseconds,s._days+=i*n._days,s._months+=i*n._months,s._bubble()}function kh(s,e){return Kr(this,s,e,1)}function xh(s,e){return Kr(this,s,e,-1)}function qr(s){return s<0?Math.floor(s):Math.ceil(s)}function Mh(){var s=this._milliseconds,e=this._days,t=this._months,i=this._data,n,r,a,o,l;return s>=0&&e>=0&&t>=0||s<=0&&e<=0&&t<=0||(s+=qr(kn(t)+e)*864e5,e=0,t=0),i.milliseconds=s%1e3,n=gt(s/1e3),i.seconds=n%60,r=gt(n/60),i.minutes=r%60,a=gt(r/60),i.hours=a%24,e+=gt(a/24),l=gt(Jr(e)),t+=l,e-=qr(kn(l)),o=gt(t/12),t%=12,i.days=e,i.months=t,i.years=o,this}function Jr(s){return s*4800/146097}function kn(s){return s*146097/4800}function Sh(s){if(!this.isValid())return NaN;var e,t,i=this._milliseconds;if(s=mt(s),s==="month"||s==="quarter"||s==="year")switch(e=this._days+i/864e5,t=this._months+Jr(e),s){case"month":return t;case"quarter":return t/3;case"year":return t/12}else switch(e=this._days+Math.round(kn(this._months)),s){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return e*24+i/36e5;case"minute":return e*1440+i/6e4;case"second":return e*86400+i/1e3;case"millisecond":return Math.floor(e*864e5)+i;default:throw new Error("Unknown unit "+s)}}function jt(s){return function(){return this.as(s)}}var Xr=jt("ms"),Rh=jt("s"),Dh=jt("m"),Th=jt("h"),_h=jt("d"),Oh=jt("w"),Lh=jt("M"),Ph=jt("Q"),Fh=jt("y"),Ah=Xr;function Hh(){return Mt(this)}function zh(s){return s=mt(s),this.isValid()?this[s+"s"]():NaN}function ti(s){return function(){return this.isValid()?this._data[s]:NaN}}var Bh=ti("milliseconds"),Nh=ti("seconds"),Ih=ti("minutes"),Vh=ti("hours"),jh=ti("days"),Wh=ti("months"),Yh=ti("years");function Gh(){return gt(this.days()/7)}var Wt=Math.round,pi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function $h(s,e,t,i,n){return n.relativeTime(e||1,!!t,s,i)}function Uh(s,e,t,i){var n=Mt(s).abs(),r=Wt(n.as("s")),a=Wt(n.as("m")),o=Wt(n.as("h")),l=Wt(n.as("d")),u=Wt(n.as("M")),h=Wt(n.as("w")),m=Wt(n.as("y")),v=r<=t.ss&&["s",r]||r<t.s&&["ss",r]||a<=1&&["m"]||a<t.m&&["mm",a]||o<=1&&["h"]||o<t.h&&["hh",o]||l<=1&&["d"]||l<t.d&&["dd",l];return t.w!=null&&(v=v||h<=1&&["w"]||h<t.w&&["ww",h]),v=v||u<=1&&["M"]||u<t.M&&["MM",u]||m<=1&&["y"]||["yy",m],v[2]=e,v[3]=+s>0,v[4]=i,$h.apply(null,v)}function Kh(s){return s===void 0?Wt:typeof s=="function"?(Wt=s,!0):!1}function qh(s,e){return pi[s]===void 0?!1:e===void 0?pi[s]:(pi[s]=e,s==="s"&&(pi.ss=e-1),!0)}function Jh(s,e){if(!this.isValid())return this.localeData().invalidDate();var t=!1,i=pi,n,r;return typeof s=="object"&&(e=s,s=!1),typeof s=="boolean"&&(t=s),typeof e=="object"&&(i=Object.assign({},pi,e),e.s!=null&&e.ss==null&&(i.ss=e.s-1)),n=this.localeData(),r=Uh(this,!t,i,n),t&&(r=n.pastFuture(+this,r)),n.postformat(r)}var xn=Math.abs;function mi(s){return(s>0)-(s<0)||+s}function Ss(){if(!this.isValid())return this.localeData().invalidDate();var s=xn(this._milliseconds)/1e3,e=xn(this._days),t=xn(this._months),i,n,r,a,o=this.asSeconds(),l,u,h,m;return o?(i=gt(s/60),n=gt(i/60),s%=60,i%=60,r=gt(t/12),t%=12,a=s?s.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",u=mi(this._months)!==mi(o)?"-":"",h=mi(this._days)!==mi(o)?"-":"",m=mi(this._milliseconds)!==mi(o)?"-":"",l+"P"+(r?u+r+"Y":"")+(t?u+t+"M":"")+(e?h+e+"D":"")+(n||i||s?"T":"")+(n?m+n+"H":"")+(i?m+i+"M":"")+(s?m+a+"S":"")):"P0D"}var De=ys.prototype;De.isValid=Wl,De.abs=Eh,De.add=kh,De.subtract=xh,De.as=Sh,De.asMilliseconds=Xr,De.asSeconds=Rh,De.asMinutes=Dh,De.asHours=Th,De.asDays=_h,De.asWeeks=Oh,De.asMonths=Lh,De.asQuarters=Ph,De.asYears=Fh,De.valueOf=Ah,De._bubble=Mh,De.clone=Hh,De.get=zh,De.milliseconds=Bh,De.seconds=Nh,De.minutes=Ih,De.hours=Vh,De.days=jh,De.weeks=Gh,De.months=Wh,De.years=Yh,De.humanize=Jh,De.toISOString=Ss,De.toString=Ss,De.toJSON=Ss,De.locale=zr,De.localeData=Nr,De.toIsoString=pt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ss),De.lang=Br,ge("X",0,0,"unix"),ge("x",0,0,"valueOf"),de("x",cs),de("X",bo),Ae("X",function(s,e,t){t._d=new Date(parseFloat(s)*1e3)}),Ae("x",function(s,e,t){t._d=new Date(Re(s))});//! moment.js
22
+ ue.version="2.30.1",Ja(Ve),ue.fn=ae,ue.min=Nl,ue.max=Il,ue.now=Vl,ue.utc=St,ue.unix=mh,ue.months=bh,ue.isDate=Ti,ue.locale=$t,ue.invalid=as,ue.duration=Mt,ue.isMoment=kt,ue.weekdays=yh,ue.parseZone=gh,ue.localeData=It,ue.isDuration=ws,ue.monthsShort=vh,ue.weekdaysMin=Ch,ue.defineLocale=dn,ue.updateLocale=gl,ue.locales=bl,ue.weekdaysShort=wh,ue.normalizeUnits=mt,ue.relativeTimeRounding=Kh,ue.relativeTimeThreshold=qh,ue.calendarFormat=cu,ue.prototype=ae,ue.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Xh(s,e){let t;return function(...i){t&&clearTimeout(t),t=setTimeout(()=>{s(...i)},e)}}function Zh(s){return s===void 0?s:JSON.parse(JSON.stringify(s))}function Qh(s,e){return JSON.stringify(s)===JSON.stringify(e)}function ed(s,e,t,i=!1){if(i)return d.render(null,s),!0;const n=d.h(e,t);return d.render(n,s),!0}function td(){const s=Date.now(),e=Math.floor(Math.random()*9999);return s+e}const id={class:"lh-1","data-test":"FormError"},Ii={__name:"FormError",props:{errors:{type:Array,default:()=>[]}},setup(s){return(e,t)=>(d.openBlock(),d.createElementBlock("div",id,[s.errors?.length?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:0},d.renderList(s.errors,(i,n)=>(d.openBlock(),d.createElementBlock("div",{class:"text-danger small",key:n},d.toDisplayString(i),1))),128)):d.createCommentVNode("",!0)]))}},sd={class:"position-relative"},nd=["value","placeholder","disabled"],rd=it({__name:"CustomInput",props:{modelValue:{type:[String,Number],default:""},titleClass:{type:String,default:""},title:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},inputClass:{type:[String,Object],default:""},error:{type:[String,Array],default:""},maskOptions:{type:Object,default:()=>({})},maxNumber:{type:Number,default:null}},emits:["change","blur","update:modelValue"],setup(s,{emit:e}){const t=s,i=e,n=d.ref(null),r=u=>{let h=u.target.value;t.maxNumber!==null&&Number(h)>=t.maxNumber&&(h=t.maxNumber.toString(),u.target.value=h),i("update:modelValue",h)},a=()=>{i("update:modelValue",""),i("change","")},o=()=>{Object.keys(t.maskOptions).length!==0&&n.value&&qa(t.maskOptions).mask(n.value)};d.onMounted(()=>{o()}),d.watch(()=>t.maskOptions,(u,h)=>{Qh(u,h)||o()},{deep:!0});const l=d.computed(()=>Array.isArray(t.error)?t.error.filter(Boolean):typeof t.error=="string"&&t.error?[t.error]:[]);return(u,h)=>(d.openBlock(),d.createElementBlock("div",null,[s.title?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["mb-1 fw-bold",[s.titleClass]])},d.toDisplayString(s.title),3)):d.createCommentVNode("",!0),d.createElementVNode("div",sd,[d.createElementVNode("input",{ref_key:"inputEl",ref:n,type:"text",class:d.normalizeClass(["form-control outline-none",{[s.inputClass]:s.inputClass,"is-invalid":l.value.length>0}]),value:s.modelValue,placeholder:s.placeholder,disabled:s.disabled,onBlur:h[0]||(h[0]=m=>i("blur")),onInput:r},null,42,nd),s.modelValue&&!s.disabled?(d.openBlock(),d.createElementBlock("i",{key:0,class:"bi bi-x-lg remove-button position-absolute",onClick:a})):d.createCommentVNode("",!0)]),d.createVNode(Ii,{errors:l.value},null,8,["errors"])]))}},[["__scopeId","data-v-294d9aac"]]),ad={class:"position-relative"},od=["type","value"],ld=it({__name:"PasswordInput",props:{modelValue:{type:String,default:""},error:{type:[String,Array],default:""},initialVisibility:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(s){const e=s,t=d.ref(e.initialVisibility);d.watch(()=>e.initialVisibility,n=>{t.value=n});const i=d.computed(()=>Array.isArray(e.error)?e.error.filter(Boolean):typeof e.error=="string"&&e.error?[e.error]:[]);return(n,r)=>(d.openBlock(),d.createElementBlock("div",null,[d.createElementVNode("div",ad,[d.createElementVNode("input",{class:d.normalizeClass(["form-control password-input outline-none",{"is-invalid":i.value.length>0}]),type:t.value?"text":"password",value:s.modelValue,autocomplete:"new-password",onInput:r[0]||(r[0]=a=>n.$emit("update:modelValue",a.target.value))},null,42,od),d.createElementVNode("div",{class:"toggle-pass",onClick:r[1]||(r[1]=a=>t.value=!t.value)},[d.createElementVNode("i",{class:d.normalizeClass(["bi",[t.value?"bi-eye-slash-fill":"bi-eye-fill"]]),style:{"font-size":"20px"}},null,2)])]),d.createVNode(Ii,{errors:i.value},null,8,["errors"])]))}},[["__scopeId","data-v-7b5f1918"]]),ud={class:"form-check d-flex align-items-center"},hd=["id","name","checked"],dd=["for"],cd={__name:"Checkbox",props:{modelValue:{type:Boolean,default:!1},name:{type:String,required:!0},label:{type:String,default:""},id:{type:String,default:()=>`checkbox-${Math.random().toString(36).slice(2,9)}`},size:{type:String,default:"sm",validator:s=>["sm","md","lg"].includes(s)},clickableLabel:{type:Boolean,default:!0},indeterminate:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(s,{emit:e}){const t=s,i=e,n=d.ref(null),r=d.computed(()=>t.size==="sm"?"5px":t.size==="md"?"10px":t.size==="lg"?"15px":"5px"),a=o=>{i("update:modelValue",o.target.checked)};return d.watch(()=>t.indeterminate,o=>{n.value&&(n.value.indeterminate=o)}),d.onMounted(()=>{n.value&&(n.value.indeterminate=t.indeterminate)}),(o,l)=>(d.openBlock(),d.createElementBlock("div",ud,[d.createElementVNode("input",{ref_key:"inputRef",ref:n,class:"form-check-input mr-2 mt-0",type:"checkbox",id:s.id,name:s.name,style:d.normalizeStyle({padding:r.value}),checked:s.modelValue,onChange:a},null,44,hd),s.label?(d.openBlock(),d.createElementBlock("label",{key:0,class:d.normalizeClass(["form-check-label lh-n",{"cursor-pointer":s.clickableLabel}]),for:s.clickableLabel?s.id:void 0},d.toDisplayString(s.label),11,dd)):d.createCommentVNode("",!0)]))}};var Mn=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],gi={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(s){return typeof console<"u"&&console.warn(s)},getWeek:function(s){var e=new Date(s.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},Vi={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(s){var e=s%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},nt=function(s,e){return e===void 0&&(e=2),("000"+s).slice(e*-1)},bt=function(s){return s===!0?1:0};function Zr(s,e){var t;return function(){var i=this,n=arguments;clearTimeout(t),t=setTimeout(function(){return s.apply(i,n)},e)}}var Sn=function(s){return s instanceof Array?s:[s]};function et(s,e,t){if(t===!0)return s.classList.add(e);s.classList.remove(e)}function Oe(s,e,t){var i=window.document.createElement(s);return e=e||"",t=t||"",i.className=e,t!==void 0&&(i.textContent=t),i}function Rs(s){for(;s.firstChild;)s.removeChild(s.firstChild)}function Qr(s,e){if(e(s))return s;if(s.parentNode)return Qr(s.parentNode,e)}function Ds(s,e){var t=Oe("div","numInputWrapper"),i=Oe("input","numInput "+s),n=Oe("span","arrowUp"),r=Oe("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var a in e)i.setAttribute(a,e[a]);return t.appendChild(i),t.appendChild(n),t.appendChild(r),t}function ut(s){try{if(typeof s.composedPath=="function"){var e=s.composedPath();return e[0]}return s.target}catch{return s.target}}var Rn=function(){},Ts=function(s,e,t){return t.months[e?"shorthand":"longhand"][s]},fd={D:Rn,F:function(s,e,t){s.setMonth(t.months.longhand.indexOf(e))},G:function(s,e){s.setHours((s.getHours()>=12?12:0)+parseFloat(e))},H:function(s,e){s.setHours(parseFloat(e))},J:function(s,e){s.setDate(parseFloat(e))},K:function(s,e,t){s.setHours(s.getHours()%12+12*bt(new RegExp(t.amPM[1],"i").test(e)))},M:function(s,e,t){s.setMonth(t.months.shorthand.indexOf(e))},S:function(s,e){s.setSeconds(parseFloat(e))},U:function(s,e){return new Date(parseFloat(e)*1e3)},W:function(s,e,t){var i=parseInt(e),n=new Date(s.getFullYear(),0,2+(i-1)*7,0,0,0,0);return n.setDate(n.getDate()-n.getDay()+t.firstDayOfWeek),n},Y:function(s,e){s.setFullYear(parseFloat(e))},Z:function(s,e){return new Date(e)},d:function(s,e){s.setDate(parseFloat(e))},h:function(s,e){s.setHours((s.getHours()>=12?12:0)+parseFloat(e))},i:function(s,e){s.setMinutes(parseFloat(e))},j:function(s,e){s.setDate(parseFloat(e))},l:Rn,m:function(s,e){s.setMonth(parseFloat(e)-1)},n:function(s,e){s.setMonth(parseFloat(e)-1)},s:function(s,e){s.setSeconds(parseFloat(e))},u:function(s,e){return new Date(parseFloat(e))},w:Rn,y:function(s,e){s.setFullYear(2e3+parseFloat(e))}},ii={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},ji={Z:function(s){return s.toISOString()},D:function(s,e,t){return e.weekdays.shorthand[ji.w(s,e,t)]},F:function(s,e,t){return Ts(ji.n(s,e,t)-1,!1,e)},G:function(s,e,t){return nt(ji.h(s,e,t))},H:function(s){return nt(s.getHours())},J:function(s,e){return e.ordinal!==void 0?s.getDate()+e.ordinal(s.getDate()):s.getDate()},K:function(s,e){return e.amPM[bt(s.getHours()>11)]},M:function(s,e){return Ts(s.getMonth(),!0,e)},S:function(s){return nt(s.getSeconds())},U:function(s){return s.getTime()/1e3},W:function(s,e,t){return t.getWeek(s)},Y:function(s){return nt(s.getFullYear(),4)},d:function(s){return nt(s.getDate())},h:function(s){return s.getHours()%12?s.getHours()%12:12},i:function(s){return nt(s.getMinutes())},j:function(s){return s.getDate()},l:function(s,e){return e.weekdays.longhand[s.getDay()]},m:function(s){return nt(s.getMonth()+1)},n:function(s){return s.getMonth()+1},s:function(s){return s.getSeconds()},u:function(s){return s.getTime()},w:function(s){return s.getDay()},y:function(s){return String(s.getFullYear()).substring(2)}},ea=function(s){var e=s.config,t=e===void 0?gi:e,i=s.l10n,n=i===void 0?Vi:i,r=s.isMobile,a=r===void 0?!1:r;return function(o,l,u){var h=u||n;return t.formatDate!==void 0&&!a?t.formatDate(o,l,h):l.split("").map(function(m,v,C){return ji[m]&&C[v-1]!=="\\"?ji[m](o,h,t):m!=="\\"?m:""}).join("")}},Dn=function(s){var e=s.config,t=e===void 0?gi:e,i=s.l10n,n=i===void 0?Vi:i;return function(r,a,o,l){if(!(r!==0&&!r)){var u=l||n,h,m=r;if(r instanceof Date)h=new Date(r.getTime());else if(typeof r!="string"&&r.toFixed!==void 0)h=new Date(r);else if(typeof r=="string"){var v=a||(t||gi).dateFormat,C=String(r).trim();if(C==="today")h=new Date,o=!0;else if(t&&t.parseDate)h=t.parseDate(r,v);else if(/Z$/.test(C)||/GMT$/.test(C))h=new Date(r);else{for(var F=void 0,x=[],R=0,M=0,k="";R<v.length;R++){var _=v[R],p=_==="\\",w=v[R-1]==="\\"||p;if(ii[_]&&!w){k+=ii[_];var c=new RegExp(k).exec(r);c&&(F=!0)&&x[_!=="Y"?"push":"unshift"]({fn:fd[_],val:c[++M]})}else p||(k+=".")}h=!t||!t.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),x.forEach(function(y){var g=y.fn,b=y.val;return h=g(h,b,u)||h}),h=F?h:void 0}}if(!(h instanceof Date&&!isNaN(h.getTime()))){t.errorHandler(new Error("Invalid date provided: "+m));return}return o===!0&&h.setHours(0,0,0,0),h}}};function ht(s,e,t){return t===void 0&&(t=!0),t!==!1?new Date(s.getTime()).setHours(0,0,0,0)-new Date(e.getTime()).setHours(0,0,0,0):s.getTime()-e.getTime()}var pd=function(s,e,t){return s>Math.min(e,t)&&s<Math.max(e,t)},Tn=function(s,e,t){return s*3600+e*60+t},md=function(s){var e=Math.floor(s/3600),t=(s-e*3600)/60;return[e,t,s-e*3600-t*60]},gd={DAY:864e5};function _n(s){var e=s.defaultHour,t=s.defaultMinute,i=s.defaultSeconds;if(s.minDate!==void 0){var n=s.minDate.getHours(),r=s.minDate.getMinutes(),a=s.minDate.getSeconds();e<n&&(e=n),e===n&&t<r&&(t=r),e===n&&t===r&&i<a&&(i=s.minDate.getSeconds())}if(s.maxDate!==void 0){var o=s.maxDate.getHours(),l=s.maxDate.getMinutes();e=Math.min(e,o),e===o&&(t=Math.min(l,t)),e===o&&t===l&&(i=s.maxDate.getSeconds())}return{hours:e,minutes:t,seconds:i}}typeof Object.assign!="function"&&(Object.assign=function(s){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(!s)throw TypeError("Cannot convert undefined or null to object");for(var i=function(o){o&&Object.keys(o).forEach(function(l){return s[l]=o[l]})},n=0,r=e;n<r.length;n++){var a=r[n];i(a)}return s});var Ze=function(){return Ze=Object.assign||function(s){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(s[n]=e[n])}return s},Ze.apply(this,arguments)},ta=function(){for(var s=0,e=0,t=arguments.length;e<t;e++)s+=arguments[e].length;for(var i=Array(s),n=0,e=0;e<t;e++)for(var r=arguments[e],a=0,o=r.length;a<o;a++,n++)i[n]=r[a];return i},bd=300;function vd(s,e){var t={config:Ze(Ze({},gi),Ke.defaultConfig),l10n:Vi};t.parseDate=Dn({config:t.config,l10n:t.l10n}),t._handlers=[],t.pluginElements=[],t.loadedPlugins=[],t._bind=x,t._setHoursFromDate=v,t._positionCalendar=Le,t.changeMonth=P,t.changeYear=ie,t.clear=W,t.close=z,t.onMouseOver=q,t._createElement=Oe,t.createDay=c,t.destroy=U,t.isEnabled=Y,t.jumpToDate=k,t.updateValue=ot,t.open=ne,t.redraw=G,t.set=pe,t.setDate=ve,t.toggle=is;function i(){t.utils={getDaysInMonth:function(O,L){return O===void 0&&(O=t.currentMonth),L===void 0&&(L=t.currentYear),O===1&&(L%4===0&&L%100!==0||L%400===0)?29:t.l10n.daysInMonth[O]}}}function n(){t.element=t.input=s,t.isOpen=!1,be(),je(),ct(),Pe(),i(),t.isMobile||w(),M(),(t.selectedDates.length||t.config.noCalendar)&&(t.config.enableTime&&v(t.config.noCalendar?t.latestSelectedDateObj:void 0),ot(!1)),o();var O=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!t.isMobile&&O&&Le(),We("onReady")}function r(){var O;return((O=t.calendarContainer)===null||O===void 0?void 0:O.getRootNode()).activeElement||document.activeElement}function a(O){return O.bind(t)}function o(){var O=t.config;O.weekNumbers===!1&&O.showMonths===1||O.noCalendar!==!0&&window.requestAnimationFrame(function(){if(t.calendarContainer!==void 0&&(t.calendarContainer.style.visibility="hidden",t.calendarContainer.style.display="block"),t.daysContainer!==void 0){var L=(t.days.offsetWidth+1)*O.showMonths;t.daysContainer.style.width=L+"px",t.calendarContainer.style.width=L+(t.weekWrapper!==void 0?t.weekWrapper.offsetWidth:0)+"px",t.calendarContainer.style.removeProperty("visibility"),t.calendarContainer.style.removeProperty("display")}})}function l(O){if(t.selectedDates.length===0){var L=t.config.minDate===void 0||ht(new Date,t.config.minDate)>=0?new Date:new Date(t.config.minDate.getTime()),I=_n(t.config);L.setHours(I.hours,I.minutes,I.seconds,L.getMilliseconds()),t.selectedDates=[L],t.latestSelectedDateObj=L}O!==void 0&&O.type!=="blur"&&tt(O);var J=t._input.value;m(),ot(),t._input.value!==J&&t._debouncedChange()}function u(O,L){return O%12+12*bt(L===t.l10n.amPM[1])}function h(O){switch(O%24){case 0:case 12:return 12;default:return O%12}}function m(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var O=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,L=(parseInt(t.minuteElement.value,10)||0)%60,I=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(O=u(O,t.amPM.textContent));var J=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&ht(t.latestSelectedDateObj,t.config.minDate,!0)===0,le=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&ht(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var he=Tn(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Ee=Tn(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),fe=Tn(O,L,I);if(fe>Ee&&fe<he){var Se=md(he);O=Se[0],L=Se[1],I=Se[2]}}else{if(le){var ce=t.config.maxTime!==void 0?t.config.maxTime:t.config.maxDate;O=Math.min(O,ce.getHours()),O===ce.getHours()&&(L=Math.min(L,ce.getMinutes())),L===ce.getMinutes()&&(I=Math.min(I,ce.getSeconds()))}if(J){var ye=t.config.minTime!==void 0?t.config.minTime:t.config.minDate;O=Math.max(O,ye.getHours()),O===ye.getHours()&&L<ye.getMinutes()&&(L=ye.getMinutes()),L===ye.getMinutes()&&(I=Math.max(I,ye.getSeconds()))}}C(O,L,I)}}function v(O){var L=O||t.latestSelectedDateObj;L&&L instanceof Date&&C(L.getHours(),L.getMinutes(),L.getSeconds())}function C(O,L,I){t.latestSelectedDateObj!==void 0&&t.latestSelectedDateObj.setHours(O%24,L,I||0,0),!(!t.hourElement||!t.minuteElement||t.isMobile)&&(t.hourElement.value=nt(t.config.time_24hr?O:(12+O)%12+12*bt(O%12===0)),t.minuteElement.value=nt(L),t.amPM!==void 0&&(t.amPM.textContent=t.l10n.amPM[bt(O>=12)]),t.secondElement!==void 0&&(t.secondElement.value=nt(I)))}function F(O){var L=ut(O),I=parseInt(L.value)+(O.delta||0);(I/1e3>1||O.key==="Enter"&&!/[^\d]/.test(I.toString()))&&ie(I)}function x(O,L,I,J){if(L instanceof Array)return L.forEach(function(le){return x(O,le,I,J)});if(O instanceof Array)return O.forEach(function(le){return x(le,L,I,J)});O.addEventListener(L,I,J),t._handlers.push({remove:function(){return O.removeEventListener(L,I,J)}})}function R(){We("onChange")}function M(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(I){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+I+"]"),function(J){return x(J,"click",t[I])})}),t.isMobile){Xn();return}var O=Zr(oe,50);if(t._debouncedChange=Zr(R,bd),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&x(t.daysContainer,"mouseover",function(I){t.config.mode==="range"&&q(ut(I))}),x(t._input,"keydown",X),t.calendarContainer!==void 0&&x(t.calendarContainer,"keydown",X),!t.config.inline&&!t.config.static&&x(window,"resize",O),window.ontouchstart!==void 0?x(window.document,"touchstart",Q):x(window.document,"mousedown",Q),x(window.document,"focus",Q,{capture:!0}),t.config.clickOpens===!0&&(x(t._input,"focus",t.open),x(t._input,"click",t.open)),t.daysContainer!==void 0&&(x(t.monthNav,"click",ss),x(t.monthNav,["keyup","increment"],F),x(t.daysContainer,"click",re)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var L=function(I){return ut(I).select()};x(t.timeContainer,["increment"],l),x(t.timeContainer,"blur",l,{capture:!0}),x(t.timeContainer,"click",_),x([t.hourElement,t.minuteElement],["focus","click"],L),t.secondElement!==void 0&&x(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&x(t.amPM,"click",function(I){l(I)})}t.config.allowInput&&x(t._input,"blur",ee)}function k(O,L){var I=O!==void 0?t.parseDate(O):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate<t.now?t.config.maxDate:t.now),J=t.currentYear,le=t.currentMonth;try{I!==void 0&&(t.currentYear=I.getFullYear(),t.currentMonth=I.getMonth())}catch(he){he.message="Invalid date supplied: "+I,t.config.errorHandler(he)}L&&t.currentYear!==J&&(We("onYearChange"),D()),L&&(t.currentYear!==J||t.currentMonth!==le)&&We("onMonthChange"),t.redraw()}function _(O){var L=ut(O);~L.className.indexOf("arrow")&&p(O,L.classList.contains("arrowUp")?1:-1)}function p(O,L,I){var J=O&&ut(O),le=I||J&&J.parentNode&&J.parentNode.firstChild,he=Ri("increment");he.delta=L,le&&le.dispatchEvent(he)}function w(){var O=window.document.createDocumentFragment();if(t.calendarContainer=Oe("div","flatpickr-calendar"),t.calendarContainer.tabIndex=-1,!t.config.noCalendar){if(O.appendChild(V()),t.innerContainer=Oe("div","flatpickr-innerContainer"),t.config.weekNumbers){var L=T(),I=L.weekWrapper,J=L.weekNumbers;t.innerContainer.appendChild(I),t.weekNumbers=J,t.weekWrapper=I}t.rContainer=Oe("div","flatpickr-rContainer"),t.rContainer.appendChild(j()),t.daysContainer||(t.daysContainer=Oe("div","flatpickr-days"),t.daysContainer.tabIndex=-1),S(),t.rContainer.appendChild(t.daysContainer),t.innerContainer.appendChild(t.rContainer),O.appendChild(t.innerContainer)}t.config.enableTime&&O.appendChild(B()),et(t.calendarContainer,"rangeMode",t.config.mode==="range"),et(t.calendarContainer,"animate",t.config.animate===!0),et(t.calendarContainer,"multiMonth",t.config.showMonths>1),t.calendarContainer.appendChild(O);var le=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!le&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var he=Oe("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(he,t.element),he.appendChild(t.element),t.altInput&&he.appendChild(t.altInput),he.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function c(O,L,I,J){var le=Y(L,!0),he=Oe("span",O,L.getDate().toString());return he.dateObj=L,he.$i=J,he.setAttribute("aria-label",t.formatDate(L,t.config.ariaDateFormat)),O.indexOf("hidden")===-1&&ht(L,t.now)===0&&(t.todayDateElem=he,he.classList.add("today"),he.setAttribute("aria-current","date")),le?(he.tabIndex=-1,Jt(L)&&(he.classList.add("selected"),t.selectedDateElem=he,t.config.mode==="range"&&(et(he,"startRange",t.selectedDates[0]&&ht(L,t.selectedDates[0],!0)===0),et(he,"endRange",t.selectedDates[1]&&ht(L,t.selectedDates[1],!0)===0),O==="nextMonthDay"&&he.classList.add("inRange")))):he.classList.add("flatpickr-disabled"),t.config.mode==="range"&&ai(L)&&!Jt(L)&&he.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&O!=="prevMonthDay"&&J%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+t.config.getWeek(L)+"</span>"),We("onDayCreate",he),he}function y(O){O.focus(),t.config.mode==="range"&&q(O)}function g(O){for(var L=O>0?0:t.config.showMonths-1,I=O>0?t.config.showMonths:-1,J=L;J!=I;J+=O)for(var le=t.daysContainer.children[J],he=O>0?0:le.children.length-1,Ee=O>0?le.children.length:-1,fe=he;fe!=Ee;fe+=O){var Se=le.children[fe];if(Se.className.indexOf("hidden")===-1&&Y(Se.dateObj))return Se}}function b(O,L){for(var I=O.className.indexOf("Month")===-1?O.dateObj.getMonth():t.currentMonth,J=L>0?t.config.showMonths:-1,le=L>0?1:-1,he=I-t.currentMonth;he!=J;he+=le)for(var Ee=t.daysContainer.children[he],fe=I-t.currentMonth===he?O.$i+L:L<0?Ee.children.length-1:0,Se=Ee.children.length,ce=fe;ce>=0&&ce<Se&&ce!=(L>0?Se:-1);ce+=le){var ye=Ee.children[ce];if(ye.className.indexOf("hidden")===-1&&Y(ye.dateObj)&&Math.abs(O.$i-ce)>=Math.abs(L))return y(ye)}t.changeMonth(le),f(g(le),0)}function f(O,L){var I=r(),J=H(I||document.body),le=O!==void 0?O:J?I:t.selectedDateElem!==void 0&&H(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&H(t.todayDateElem)?t.todayDateElem:g(L>0?1:-1);le===void 0?t._input.focus():J?b(le,L):y(le)}function E(O,L){for(var I=(new Date(O,L,1).getDay()-t.l10n.firstDayOfWeek+7)%7,J=t.utils.getDaysInMonth((L-1+12)%12,O),le=t.utils.getDaysInMonth(L,O),he=window.document.createDocumentFragment(),Ee=t.config.showMonths>1,fe=Ee?"prevMonthDay hidden":"prevMonthDay",Se=Ee?"nextMonthDay hidden":"nextMonthDay",ce=J+1-I,ye=0;ce<=J;ce++,ye++)he.appendChild(c("flatpickr-day "+fe,new Date(O,L-1,ce),ce,ye));for(ce=1;ce<=le;ce++,ye++)he.appendChild(c("flatpickr-day",new Date(O,L,ce),ce,ye));for(var Be=le+1;Be<=42-I&&(t.config.showMonths===1||ye%7!==0);Be++,ye++)he.appendChild(c("flatpickr-day "+Se,new Date(O,L+1,Be%le),Be,ye));var Ft=Oe("div","dayContainer");return Ft.appendChild(he),Ft}function S(){if(t.daysContainer!==void 0){Rs(t.daysContainer),t.weekNumbers&&Rs(t.weekNumbers);for(var O=document.createDocumentFragment(),L=0;L<t.config.showMonths;L++){var I=new Date(t.currentYear,t.currentMonth,1);I.setMonth(t.currentMonth+L),O.appendChild(E(I.getFullYear(),I.getMonth()))}t.daysContainer.appendChild(O),t.days=t.daysContainer.firstChild,t.config.mode==="range"&&t.selectedDates.length===1&&q()}}function D(){if(!(t.config.showMonths>1||t.config.monthSelectorType!=="dropdown")){var O=function(J){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&J<t.config.minDate.getMonth()?!1:!(t.config.maxDate!==void 0&&t.currentYear===t.config.maxDate.getFullYear()&&J>t.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var L=0;L<12;L++)if(O(L)){var I=Oe("option","flatpickr-monthDropdown-month");I.value=new Date(t.currentYear,L).getMonth().toString(),I.textContent=Ts(L,t.config.shorthandCurrentMonth,t.l10n),I.tabIndex=-1,t.currentMonth===L&&(I.selected=!0),t.monthsDropdownContainer.appendChild(I)}}}function A(){var O=Oe("div","flatpickr-month"),L=window.document.createDocumentFragment(),I;t.config.showMonths>1||t.config.monthSelectorType==="static"?I=Oe("span","cur-month"):(t.monthsDropdownContainer=Oe("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),x(t.monthsDropdownContainer,"change",function(Ee){var fe=ut(Ee),Se=parseInt(fe.value,10);t.changeMonth(Se-t.currentMonth),We("onMonthChange")}),D(),I=t.monthsDropdownContainer);var J=Ds("cur-year",{tabindex:"-1"}),le=J.getElementsByTagName("input")[0];le.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&le.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(le.setAttribute("max",t.config.maxDate.getFullYear().toString()),le.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var he=Oe("div","flatpickr-current-month");return he.appendChild(I),he.appendChild(J),L.appendChild(he),O.appendChild(L),{container:O,yearElement:le,monthElement:I}}function N(){Rs(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var O=t.config.showMonths;O--;){var L=A();t.yearElements.push(L.yearElement),t.monthElements.push(L.monthElement),t.monthNav.appendChild(L.container)}t.monthNav.appendChild(t.nextMonthNav)}function V(){return t.monthNav=Oe("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=Oe("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=Oe("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,N(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(O){t.__hidePrevMonthArrow!==O&&(et(t.prevMonthNav,"flatpickr-disabled",O),t.__hidePrevMonthArrow=O)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(O){t.__hideNextMonthArrow!==O&&(et(t.nextMonthNav,"flatpickr-disabled",O),t.__hideNextMonthArrow=O)}}),t.currentYearElement=t.yearElements[0],Xt(),t.monthNav}function B(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var O=_n(t.config);t.timeContainer=Oe("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var L=Oe("span","flatpickr-time-separator",":"),I=Ds("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=I.getElementsByTagName("input")[0];var J=Ds("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=J.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=nt(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?O.hours:h(O.hours)),t.minuteElement.value=nt(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():O.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(I),t.timeContainer.appendChild(L),t.timeContainer.appendChild(J),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var le=Ds("flatpickr-second");t.secondElement=le.getElementsByTagName("input")[0],t.secondElement.value=nt(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():O.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(Oe("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(le)}return t.config.time_24hr||(t.amPM=Oe("span","flatpickr-am-pm",t.l10n.amPM[bt((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function j(){t.weekdayContainer?Rs(t.weekdayContainer):t.weekdayContainer=Oe("div","flatpickr-weekdays");for(var O=t.config.showMonths;O--;){var L=Oe("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(L)}return $(),t.weekdayContainer}function $(){if(t.weekdayContainer){var O=t.l10n.firstDayOfWeek,L=ta(t.l10n.weekdays.shorthand);O>0&&O<L.length&&(L=ta(L.splice(O,L.length),L.splice(0,O)));for(var I=t.config.showMonths;I--;)t.weekdayContainer.children[I].innerHTML=`
23
+ <span class='flatpickr-weekday'>
24
+ `+L.join("</span><span class='flatpickr-weekday'>")+`
25
+ </span>
26
+ `}}function T(){t.calendarContainer.classList.add("hasWeeks");var O=Oe("div","flatpickr-weekwrapper");O.appendChild(Oe("span","flatpickr-weekday",t.l10n.weekAbbreviation));var L=Oe("div","flatpickr-weeks");return O.appendChild(L),{weekWrapper:O,weekNumbers:L}}function P(O,L){L===void 0&&(L=!0);var I=L?O:O-t.currentMonth;I<0&&t._hidePrevMonthArrow===!0||I>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=I,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,We("onYearChange"),D()),S(),We("onMonthChange"),Xt())}function W(O,L){if(O===void 0&&(O=!0),L===void 0&&(L=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,L===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var I=_n(t.config),J=I.hours,le=I.minutes,he=I.seconds;C(J,le,he)}t.redraw(),O&&We("onChange")}function z(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),We("onClose")}function U(){t.config!==void 0&&We("onDestroy");for(var O=t._handlers.length;O--;)t._handlers[O].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var L=t.calendarContainer.parentNode;if(L.lastChild&&L.removeChild(L.lastChild),L.parentNode){for(;L.firstChild;)L.parentNode.insertBefore(L.firstChild,L);L.parentNode.removeChild(L)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(I){try{delete t[I]}catch{}})}function K(O){return t.calendarContainer.contains(O)}function Q(O){if(t.isOpen&&!t.config.inline){var L=ut(O),I=K(L),J=L===t.input||L===t.altInput||t.element.contains(L)||O.path&&O.path.indexOf&&(~O.path.indexOf(t.input)||~O.path.indexOf(t.altInput)),le=!J&&!I&&!K(O.relatedTarget),he=!t.config.ignoredFocusElements.some(function(Ee){return Ee.contains(L)});le&&he&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&l(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function ie(O){if(!(!O||t.config.minDate&&O<t.config.minDate.getFullYear()||t.config.maxDate&&O>t.config.maxDate.getFullYear())){var L=O,I=t.currentYear!==L;t.currentYear=L||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),I&&(t.redraw(),We("onYearChange"),D())}}function Y(O,L){var I;L===void 0&&(L=!0);var J=t.parseDate(O,void 0,L);if(t.config.minDate&&J&&ht(J,t.config.minDate,L!==void 0?L:!t.minDateHasTime)<0||t.config.maxDate&&J&&ht(J,t.config.maxDate,L!==void 0?L:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(J===void 0)return!1;for(var le=!!t.config.enable,he=(I=t.config.enable)!==null&&I!==void 0?I:t.config.disable,Ee=0,fe=void 0;Ee<he.length;Ee++){if(fe=he[Ee],typeof fe=="function"&&fe(J))return le;if(fe instanceof Date&&J!==void 0&&fe.getTime()===J.getTime())return le;if(typeof fe=="string"){var Se=t.parseDate(fe,void 0,!0);return Se&&Se.getTime()===J.getTime()?le:!le}else if(typeof fe=="object"&&J!==void 0&&fe.from&&fe.to&&J.getTime()>=fe.from.getTime()&&J.getTime()<=fe.to.getTime())return le}return!le}function H(O){return t.daysContainer!==void 0?O.className.indexOf("hidden")===-1&&O.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(O):!1}function ee(O){var L=O.target===t._input,I=t._input.value.trimEnd()!==$e();L&&I&&!(O.relatedTarget&&K(O.relatedTarget))&&t.setDate(t._input.value,!0,O.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function X(O){var L=ut(O),I=t.config.wrap?s.contains(L):L===t._input,J=t.config.allowInput,le=t.isOpen&&(!J||!I),he=t.config.inline&&I&&!J;if(O.keyCode===13&&I){if(J)return t.setDate(t._input.value,!0,L===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),L.blur();t.open()}else if(K(L)||le||he){var Ee=!!t.timeContainer&&t.timeContainer.contains(L);switch(O.keyCode){case 13:Ee?(O.preventDefault(),l(),Z()):re(O);break;case 27:O.preventDefault(),Z();break;case 8:case 46:I&&!t.config.allowInput&&(O.preventDefault(),t.clear());break;case 37:case 39:if(!Ee&&!I){O.preventDefault();var fe=r();if(t.daysContainer!==void 0&&(J===!1||fe&&H(fe))){var Se=O.keyCode===39?1:-1;O.ctrlKey?(O.stopPropagation(),P(Se),f(g(1),0)):f(void 0,Se)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:O.preventDefault();var ce=O.keyCode===40?1:-1;t.daysContainer&&L.$i!==void 0||L===t.input||L===t.altInput?O.ctrlKey?(O.stopPropagation(),ie(t.currentYear-ce),f(g(1),0)):Ee||f(void 0,ce*7):L===t.currentYearElement?ie(t.currentYear-ce):t.config.enableTime&&(!Ee&&t.hourElement&&t.hourElement.focus(),l(O),t._debouncedChange());break;case 9:if(Ee){var ye=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(ft){return ft}),Be=ye.indexOf(L);if(Be!==-1){var Ft=ye[Be+(O.shiftKey?-1:1)];O.preventDefault(),(Ft||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(L)&&O.shiftKey&&(O.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&L===t.amPM)switch(O.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],m(),ot();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],m(),ot();break}(I||K(L))&&We("onKeyDown",O)}function q(O,L){if(L===void 0&&(L="flatpickr-day"),!(t.selectedDates.length!==1||O&&(!O.classList.contains(L)||O.classList.contains("flatpickr-disabled")))){for(var I=O?O.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),J=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),le=Math.min(I,t.selectedDates[0].getTime()),he=Math.max(I,t.selectedDates[0].getTime()),Ee=!1,fe=0,Se=0,ce=le;ce<he;ce+=gd.DAY)Y(new Date(ce),!0)||(Ee=Ee||ce>le&&ce<he,ce<J&&(!fe||ce>fe)?fe=ce:ce>J&&(!Se||ce<Se)&&(Se=ce));var ye=Array.from(t.rContainer.querySelectorAll("*:nth-child(-n+"+t.config.showMonths+") > ."+L));ye.forEach(function(Be){var Ft=Be.dateObj,ft=Ft.getTime(),ns=fe>0&&ft<fe||Se>0&&ft>Se;if(ns){Be.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Di){Be.classList.remove(Di)});return}else if(Ee&&!ns)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Di){Be.classList.remove(Di)}),O!==void 0&&(O.classList.add(I<=t.selectedDates[0].getTime()?"startRange":"endRange"),J<I&&ft===J?Be.classList.add("startRange"):J>I&&ft===J&&Be.classList.add("endRange"),ft>=fe&&(Se===0||ft<=Se)&&pd(ft,J,I)&&Be.classList.add("inRange"))})}}function oe(){t.isOpen&&!t.config.static&&!t.config.inline&&Le()}function ne(O,L){if(L===void 0&&(L=t._positionElement),t.isMobile===!0){if(O){O.preventDefault();var I=ut(O);I&&I.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),We("onOpen");return}else if(t._input.disabled||t.config.inline)return;var J=t.isOpen;t.isOpen=!0,J||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),We("onOpen"),Le(L)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(O===void 0||!t.timeContainer.contains(O.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function me(O){return function(L){var I=t.config["_"+O+"Date"]=t.parseDate(L,t.config.dateFormat),J=t.config["_"+(O==="min"?"max":"min")+"Date"];I!==void 0&&(t[O==="min"?"minDateHasTime":"maxDateHasTime"]=I.getHours()>0||I.getMinutes()>0||I.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(le){return Y(le)}),!t.selectedDates.length&&O==="min"&&v(I),ot()),t.daysContainer&&(G(),I!==void 0?t.currentYearElement[O]=I.getFullYear().toString():t.currentYearElement.removeAttribute(O),t.currentYearElement.disabled=!!J&&I!==void 0&&J.getFullYear()===I.getFullYear())}}function be(){var O=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],L=Ze(Ze({},JSON.parse(JSON.stringify(s.dataset||{}))),e),I={};t.config.parseDate=L.parseDate,t.config.formatDate=L.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(ye){t.config._enable=we(ye)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(ye){t.config._disable=we(ye)}});var J=L.mode==="time";if(!L.dateFormat&&(L.enableTime||J)){var le=Ke.defaultConfig.dateFormat||gi.dateFormat;I.dateFormat=L.noCalendar||J?"H:i"+(L.enableSeconds?":S":""):le+" H:i"+(L.enableSeconds?":S":"")}if(L.altInput&&(L.enableTime||J)&&!L.altFormat){var he=Ke.defaultConfig.altFormat||gi.altFormat;I.altFormat=L.noCalendar||J?"h:i"+(L.enableSeconds?":S K":" K"):he+(" h:i"+(L.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:me("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:me("max")});var Ee=function(ye){return function(Be){t.config[ye==="min"?"_minTime":"_maxTime"]=t.parseDate(Be,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Ee("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Ee("max")}),L.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,I,L);for(var fe=0;fe<O.length;fe++)t.config[O[fe]]=t.config[O[fe]]===!0||t.config[O[fe]]==="true";Mn.filter(function(ye){return t.config[ye]!==void 0}).forEach(function(ye){t.config[ye]=Sn(t.config[ye]||[]).map(a)}),t.isMobile=!t.config.disableMobile&&!t.config.inline&&t.config.mode==="single"&&!t.config.disable.length&&!t.config.enable&&!t.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var fe=0;fe<t.config.plugins.length;fe++){var Se=t.config.plugins[fe](t)||{};for(var ce in Se)Mn.indexOf(ce)>-1?t.config[ce]=Sn(Se[ce]).map(a).concat(t.config[ce]):typeof L[ce]>"u"&&(t.config[ce]=Se[ce])}L.altInputClass||(t.config.altInputClass=xe().className+" "+t.config.altInputClass),We("onParseConfig")}function xe(){return t.config.wrap?s.querySelector("[data-input]"):s}function je(){typeof t.config.locale!="object"&&typeof Ke.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=Ze(Ze({},Ke.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Ke.l10ns[t.config.locale]:void 0),ii.D="("+t.l10n.weekdays.shorthand.join("|")+")",ii.l="("+t.l10n.weekdays.longhand.join("|")+")",ii.M="("+t.l10n.months.shorthand.join("|")+")",ii.F="("+t.l10n.months.longhand.join("|")+")",ii.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var O=Ze(Ze({},e),JSON.parse(JSON.stringify(s.dataset||{})));O.time_24hr===void 0&&Ke.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=ea(t),t.parseDate=Dn({config:t.config,l10n:t.l10n})}function Le(O){if(typeof t.config.position=="function")return void t.config.position(t,O);if(t.calendarContainer!==void 0){We("onPreCalendarPosition");var L=O||t._positionElement,I=Array.prototype.reduce.call(t.calendarContainer.children,(function(Xb,Zb){return Xb+Zb.offsetHeight}),0),J=t.calendarContainer.offsetWidth,le=t.config.position.split(" "),he=le[0],Ee=le.length>1?le[1]:null,fe=L.getBoundingClientRect(),Se=window.innerHeight-fe.bottom,ce=he==="above"||he!=="below"&&Se<I&&fe.top>I,ye=window.pageYOffset+fe.top+(ce?-I-2:L.offsetHeight+2);if(et(t.calendarContainer,"arrowTop",!ce),et(t.calendarContainer,"arrowBottom",ce),!t.config.inline){var Be=window.pageXOffset+fe.left,Ft=!1,ft=!1;Ee==="center"?(Be-=(J-fe.width)/2,Ft=!0):Ee==="right"&&(Be-=J-fe.width,ft=!0),et(t.calendarContainer,"arrowLeft",!Ft&&!ft),et(t.calendarContainer,"arrowCenter",Ft),et(t.calendarContainer,"arrowRight",ft);var ns=window.document.body.offsetWidth-(window.pageXOffset+fe.right),Di=Be+J>window.document.body.offsetWidth,Yb=ns+J>window.document.body.offsetWidth;if(et(t.calendarContainer,"rightMost",Di),!t.config.static)if(t.calendarContainer.style.top=ye+"px",!Di)t.calendarContainer.style.left=Be+"px",t.calendarContainer.style.right="auto";else if(!Yb)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=ns+"px";else{var Zn=Ne();if(Zn===void 0)return;var Gb=window.document.body.offsetWidth,$b=Math.max(0,Gb/2-J/2),Ub=".flatpickr-calendar.centerMost:before",Kb=".flatpickr-calendar.centerMost:after",qb=Zn.cssRules.length,Jb="{left:"+fe.left+"px;right:auto;}";et(t.calendarContainer,"rightMost",!1),et(t.calendarContainer,"centerMost",!0),Zn.insertRule(Ub+","+Kb+Jb,qb),t.calendarContainer.style.left=$b+"px",t.calendarContainer.style.right="auto"}}}}function Ne(){for(var O=null,L=0;L<document.styleSheets.length;L++){var I=document.styleSheets[L];if(I.cssRules){try{I.cssRules}catch{continue}O=I;break}}return O??se()}function se(){var O=document.createElement("style");return document.head.appendChild(O),O.sheet}function G(){t.config.noCalendar||t.isMobile||(D(),Xt(),S())}function Z(){t._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(t.close,0):t.close()}function re(O){O.preventDefault(),O.stopPropagation();var L=function(ye){return ye.classList&&ye.classList.contains("flatpickr-day")&&!ye.classList.contains("flatpickr-disabled")&&!ye.classList.contains("notAllowed")},I=Qr(ut(O),L);if(I!==void 0){var J=I,le=t.latestSelectedDateObj=new Date(J.dateObj.getTime()),he=(le.getMonth()<t.currentMonth||le.getMonth()>t.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=J,t.config.mode==="single")t.selectedDates=[le];else if(t.config.mode==="multiple"){var Ee=Jt(le);Ee?t.selectedDates.splice(parseInt(Ee),1):t.selectedDates.push(le)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=le,t.selectedDates.push(le),ht(le,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(ye,Be){return ye.getTime()-Be.getTime()}));if(m(),he){var fe=t.currentYear!==le.getFullYear();t.currentYear=le.getFullYear(),t.currentMonth=le.getMonth(),fe&&(We("onYearChange"),D()),We("onMonthChange")}if(Xt(),S(),ot(),!he&&t.config.mode!=="range"&&t.config.showMonths===1?y(J):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Se=t.config.mode==="single"&&!t.config.enableTime,ce=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Se||ce)&&Z()}R()}}var te={locale:[je,$],showMonths:[N,o,j],minDate:[k],maxDate:[k],positionElement:[ze],clickOpens:[function(){t.config.clickOpens===!0?(x(t._input,"focus",t.open),x(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function pe(O,L){if(O!==null&&typeof O=="object"){Object.assign(t.config,O);for(var I in O)te[I]!==void 0&&te[I].forEach(function(J){return J()})}else t.config[O]=L,te[O]!==void 0?te[O].forEach(function(J){return J()}):Mn.indexOf(O)>-1&&(t.config[O]=Sn(L));t.redraw(),ot(!0)}function Me(O,L){var I=[];if(O instanceof Array)I=O.map(function(J){return t.parseDate(J,L)});else if(O instanceof Date||typeof O=="number")I=[t.parseDate(O,L)];else if(typeof O=="string")switch(t.config.mode){case"single":case"time":I=[t.parseDate(O,L)];break;case"multiple":I=O.split(t.config.conjunction).map(function(J){return t.parseDate(J,L)});break;case"range":I=O.split(t.l10n.rangeSeparator).map(function(J){return t.parseDate(J,L)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(O)));t.selectedDates=t.config.allowInvalidPreload?I:I.filter(function(J){return J instanceof Date&&Y(J,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(J,le){return J.getTime()-le.getTime()})}function ve(O,L,I){if(L===void 0&&(L=!1),I===void 0&&(I=t.config.dateFormat),O!==0&&!O||O instanceof Array&&O.length===0)return t.clear(L);Me(O,I),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),k(void 0,L),v(),t.selectedDates.length===0&&t.clear(!1),ot(L),L&&We("onChange")}function we(O){return O.slice().map(function(L){return typeof L=="string"||typeof L=="number"||L instanceof Date?t.parseDate(L,void 0,!0):L&&typeof L=="object"&&L.from&&L.to?{from:t.parseDate(L.from,void 0),to:t.parseDate(L.to,void 0)}:L}).filter(function(L){return L})}function Pe(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var O=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);O&&Me(O,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()<t.now.getTime()?t.config.maxDate:t.now,t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth(),t.selectedDates.length>0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function ct(){if(t.input=xe(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=Oe(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),ze()}function ze(){t._positionElement=t.config.positionElement||t._input}function Xn(){var O=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=Oe("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=O,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=O==="datetime-local"?"Y-m-d\\TH:i:S":O==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}x(t.mobileInput,"change",function(L){t.setDate(ut(L).value,!1,t.mobileFormatStr),We("onChange"),We("onClose")})}function is(O){if(t.isOpen===!0)return t.close();t.open(O)}function We(O,L){if(t.config!==void 0){var I=t.config[O];if(I!==void 0&&I.length>0)for(var J=0;I[J]&&J<I.length;J++)I[J](t.selectedDates,t.input.value,t,L);O==="onChange"&&(t.input.dispatchEvent(Ri("change")),t.input.dispatchEvent(Ri("input")))}}function Ri(O){var L=document.createEvent("Event");return L.initEvent(O,!0,!0),L}function Jt(O){for(var L=0;L<t.selectedDates.length;L++){var I=t.selectedDates[L];if(I instanceof Date&&ht(I,O)===0)return""+L}return!1}function ai(O){return t.config.mode!=="range"||t.selectedDates.length<2?!1:ht(O,t.selectedDates[0])>=0&&ht(O,t.selectedDates[1])<=0}function Xt(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(O,L){var I=new Date(t.currentYear,t.currentMonth,1);I.setMonth(t.currentMonth+L),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[L].textContent=Ts(I.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=I.getMonth().toString(),O.value=I.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYear<t.config.minDate.getFullYear()),t._hideNextMonthArrow=t.config.maxDate!==void 0&&(t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth+1>t.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function $e(O){var L=O||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(I){return t.formatDate(I,L)}).filter(function(I,J,le){return t.config.mode!=="range"||t.config.enableTime||le.indexOf(I)===J}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function ot(O){O===void 0&&(O=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=$e(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=$e(t.config.altFormat)),O!==!1&&We("onValueUpdate")}function ss(O){var L=ut(O),I=t.prevMonthNav.contains(L),J=t.nextMonthNav.contains(L);I||J?P(I?-1:1):t.yearElements.indexOf(L)>=0?L.select():L.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):L.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function tt(O){O.preventDefault();var L=O.type==="keydown",I=ut(O),J=I;t.amPM!==void 0&&I===t.amPM&&(t.amPM.textContent=t.l10n.amPM[bt(t.amPM.textContent===t.l10n.amPM[0])]);var le=parseFloat(J.getAttribute("min")),he=parseFloat(J.getAttribute("max")),Ee=parseFloat(J.getAttribute("step")),fe=parseInt(J.value,10),Se=O.delta||(L?O.which===38?1:-1:0),ce=fe+Ee*Se;if(typeof J.value<"u"&&J.value.length===2){var ye=J===t.hourElement,Be=J===t.minuteElement;ce<le?(ce=he+ce+bt(!ye)+(bt(ye)&&bt(!t.amPM)),Be&&p(void 0,-1,t.hourElement)):ce>he&&(ce=J===t.hourElement?ce-he-bt(!t.amPM):le,Be&&p(void 0,1,t.hourElement)),t.amPM&&ye&&(Ee===1?ce+fe===23:Math.abs(ce-fe)>Ee)&&(t.amPM.textContent=t.l10n.amPM[bt(t.amPM.textContent===t.l10n.amPM[0])]),J.value=nt(ce)}}return n(),t}function bi(s,e){for(var t=Array.prototype.slice.call(s).filter(function(a){return a instanceof HTMLElement}),i=[],n=0;n<t.length;n++){var r=t[n];try{if(r.getAttribute("data-fp-omit")!==null)continue;r._flatpickr!==void 0&&(r._flatpickr.destroy(),r._flatpickr=void 0),r._flatpickr=vd(r,e||{}),i.push(r._flatpickr)}catch(a){console.error(a)}}return i.length===1?i[0]:i}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(s){return bi(this,s)},HTMLElement.prototype.flatpickr=function(s){return bi([this],s)});var Ke=function(s,e){return typeof s=="string"?bi(window.document.querySelectorAll(s),e):s instanceof Node?bi([s],e):bi(s,e)};Ke.defaultConfig={},Ke.l10ns={en:Ze({},Vi),default:Ze({},Vi)},Ke.localize=function(s){Ke.l10ns.default=Ze(Ze({},Ke.l10ns.default),s)},Ke.setDefaults=function(s){Ke.defaultConfig=Ze(Ze({},Ke.defaultConfig),s)},Ke.parseDate=Dn({}),Ke.formatDate=ea({}),Ke.compareDates=ht,typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(s){return bi(this,s)}),Date.prototype.fp_incr=function(s){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof s=="string"?parseInt(s,10):s))},typeof window<"u"&&(window.flatpickr=Ke);var Wi={exports:{}},yd=Wi.exports,ia;function wd(){return ia||(ia=1,(function(s,e){(function(t,i){i(e)})(yd,(function(t){var i=typeof window<"u"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},n={weekdays:{shorthand:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],longhand:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"]},months:{shorthand:["Янв","Фев","Март","Апр","Май","Июнь","Июль","Авг","Сен","Окт","Ноя","Дек"],longhand:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Нед.",scrollTitle:"Прокрутите для увеличения",toggleTitle:"Нажмите для переключения",amPM:["ДП","ПП"],yearAriaLabel:"Год",time_24hr:!0};i.l10ns.ru=n;var r=i.l10ns;t.Russian=n,t.default=r,Object.defineProperty(t,"__esModule",{value:!0})}))})(Wi,Wi.exports)),Wi.exports}var Cd=wd();const Ed=["value","id","name","disabled","required","placeholder"],kd=["title"],xd=["title"],Md=it(d.defineComponent({__name:"Flatpickr",props:{modelValue:{default:""},id:{default:"flatpickr-input"},error:{default:""},name:{default:"flatpickr"},placeholder:{default:"Выберите дату"},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},config:{default:()=>({})},format:{default:"DD.MM.YYYY"},locale:{default:"ru"},resetTitle:{default:"Очистить"},calendarTitle:{default:"Выбрать дату"},allowInput:{type:Boolean,default:!0},enableTime:{type:Boolean,default:!1},time_24hr:{type:Boolean,default:!0},dateFormat:{default:"d.m.Y"},minDate:{default:void 0},maxDate:{default:void 0},defaultDate:{default:void 0},mode:{default:"single"}},emits:["update:modelValue","change","open","close","ready"],setup(s,{emit:e}){const t=s,i=e,n=d.ref(),r=d.ref(null),a=d.ref(!1),o=d.ref(""),l=d.computed(()=>Array.isArray(t.error)?t.error?.filter(Boolean)||[]:typeof t.error=="string"&&t.error?[t.error]:[]),u=R=>{if(!R)return"";const M=new Date(R);if(isNaN(M.getTime()))return"";const k=String(M.getDate()).padStart(2,"0"),_=String(M.getMonth()+1).padStart(2,"0"),p=M.getFullYear();return t.format==="DD.MM.YYYY"?`${k}.${_}.${p}`:t.format==="MM/DD/YYYY"?`${_}/${k}/${p}`:t.format==="YYYY-MM-DD"?`${p}-${_}-${k}`:`${k}.${_}.${p}`},h=R=>{if(!R)return"";if(/^\d{4}-\d{2}-\d{2}/.test(R))return R;if(t.format==="DD.MM.YYYY"){const M=R.split(".");if(M.length===3){const[k,_,p]=M;return`${p}-${_.padStart(2,"0")}-${k.padStart(2,"0")}`}}if(t.format==="MM/DD/YYYY"){const M=R.split("/");if(M.length===3){const[k,_,p]=M;return`${p}-${k.padStart(2,"0")}-${_.padStart(2,"0")}`}}return t.format==="YYYY-MM-DD",R},m=()=>{if(!n.value)return;const R={locale:t.locale==="ru"?Cd.Russian:void 0,allowInput:t.allowInput,enableTime:t.enableTime,time_24hr:t.time_24hr,dateFormat:t.dateFormat,mode:t.mode,wrap:!0,onClose:(M,k,_)=>{const p=M.length>0;if(!(t.modelValue!==k))return!1;if(!p)return v({instance:_}),!1;d.nextTick(()=>{if(t.mode==="multiple"){const c=M.map(y=>u(y));i("update:modelValue",c)}else if(t.mode==="range"){const c=M.map(y=>u(y));i("update:modelValue",c)}else i("update:modelValue",k);i("change",M.map(c=>c.toISOString()),k,_)})},onOpen:M=>{i("open",M)},onReady:M=>{i("ready",M)},...t.config};t.minDate&&t.minDate&&(R.minDate=t.minDate),t.maxDate&&(R.maxDate=t.maxDate),t.defaultDate&&(R.defaultDate=t.defaultDate),r.value=Ke(n.value,R),v({instance:r.value})},v=({instance:R})=>{R?._input&&(t.modelValue?d.nextTick(()=>{Array.isArray(t.modelValue)?R._input.value=t.modelValue.map(M=>u(M)).join(", "):R._input.value=u(t.modelValue),a.value=!0}):d.nextTick(()=>{R._input.value="",a.value=!1}))},C=()=>{t.disabled||!r.value||(r.value.clear(),r.value._input.value="",i("update:modelValue",""),a.value=!1)},F=R=>{const M=R.target;o.value=M.value},x=()=>{if(o.value){const R=h(o.value);R&&i("update:modelValue",R)}};return d.watch(()=>t.modelValue,R=>{if(!R){a.value=!1,r.value?._input&&(r.value._input.value=""),o.value="";return}Array.isArray(R)?o.value=R.map(M=>u(M)).join(", "):o.value=u(R),a.value=!0},{deep:!0}),d.watch(()=>t.disabled,R=>{r.value?._input&&(r.value._input.disabled=R)}),d.onMounted(()=>{m()}),d.onBeforeUnmount(()=>{r.value&&r.value.destroy()}),(R,M)=>(d.openBlock(),d.createElementBlock("div",{style:{position:"relative"},ref_key:"input",ref:n},[d.createElementVNode("div",{class:d.normalizeClass({"not-valid":l.value.length})},[d.createElementVNode("input",{type:"text",class:"form-control flatpickr",value:o.value,id:R.id,name:R.name,disabled:R.disabled,required:R.required,placeholder:R.placeholder,"data-input":"",onInput:F,onBlur:x},null,40,Ed)],2),a.value&&!R.disabled?(d.openBlock(),d.createElementBlock("a",{key:0,class:"remove-button text-dark",onClick:C,style:{position:"absolute",right:"40px",top:"8px","font-size":"16px",cursor:"pointer"},"data-toggle":"",title:R.resetTitle},[...M[0]||(M[0]=[d.createElementVNode("i",{class:"bi bi-x-lg"},null,-1)])],8,kd)):d.createCommentVNode("",!0),d.createElementVNode("a",{class:"remove-button text-dark",style:{position:"absolute",right:"10px",top:"4px","font-size":"20px",cursor:"pointer"},"data-toggle":"",title:R.calendarTitle},[...M[1]||(M[1]=[d.createElementVNode("i",{class:"bi bi-calendar3"},null,-1)])],8,xd),d.createVNode(Ii,{errors:l.value},null,8,["errors"])],512))}}),[["__scopeId","data-v-fb3fef0b"]]),Sd={key:0,class:"modal-wrapper"},Rd={class:"modal-header pb-4 border-bottom-0"},Dd={key:0,class:"modal-title"},Td={key:0,class:"modal-body pt-0"},_d={key:1,class:"modal-footer row justify-content-start pt-3"},sa=d.defineComponent({__name:"DefaultModal",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},scrollable:{type:Boolean,default:!1},centered:{type:Boolean,default:!0},size:{type:String,default:""},style:{type:String,default:""}},emits:["update:modelValue"],setup(s,{emit:e}){const t=s,i=e,n=d.useSlots(),r=()=>{i("update:modelValue",!1)},a=o=>{o.key==="Escape"&&r()};return d.watch(()=>t.modelValue,o=>{o?(document.body.style.overflow="hidden",window.addEventListener("keydown",a)):(document.body.style.overflow="",window.removeEventListener("keydown",a))},{immediate:!0}),d.onUnmounted(()=>{document.body.style.overflow="",window.removeEventListener("keydown",a)}),(o,l)=>(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[s.modelValue?(d.openBlock(),d.createElementBlock("div",Sd,[d.createElementVNode("div",{class:"overlay",onClick:r}),d.createElementVNode("div",{class:d.normalizeClass(["modal-dialog",{"modal-dialog-scrollable":s.scrollable,"modal-dialog-centered":s.centered,"modal-sm":s.size==="sm","modal-lg":s.size==="lg","modal-xl":s.size==="xl"}])},[d.createElementVNode("div",{class:"modal-content p-3",style:d.normalizeStyle(s.style)},[d.createElementVNode("div",Rd,[s.title?(d.openBlock(),d.createElementBlock("h4",Dd,d.toDisplayString(s.title),1)):d.createCommentVNode("",!0),d.createElementVNode("button",{type:"button",class:"btn-close",onClick:r})]),d.unref(n)["modal-body"]||d.unref(n).body?(d.openBlock(),d.createElementBlock("div",Td,[d.renderSlot(o.$slots,"modal-body"),d.renderSlot(o.$slots,"body")])):d.createCommentVNode("",!0),d.unref(n)["modal-footer"]||d.unref(n).footer?(d.openBlock(),d.createElementBlock("div",_d,[d.renderSlot(o.$slots,"modal-footer"),d.renderSlot(o.$slots,"footer")])):d.createCommentVNode("",!0)],4)],2)])):d.createCommentVNode("",!0)]))}}),Od="/img/success.png",Ld="/img/warning.png",Pd="/img/error.png",Fd="/img/confirmation.png",Ad={class:"row mb-3"},Hd={class:"col-auto"},zd={style:{width:"90px",height:"90px"}},Bd=["src","alt"],Nd={key:1,class:"w-100",src:Od,alt:"Успех"},Id={key:2,class:"w-100",src:Ld,alt:"Предупреждение"},Vd={key:3,class:"w-100",src:Pd,alt:"Ошибка"},jd={key:4,class:"w-100",src:Fd,alt:"Подтверждение"},Wd={class:"col"},Yd={class:"confirmation-content"},Gd={key:0,class:"mb-3"},$d={key:1,class:"text-muted"},Ud={key:0,class:"d-flex gap-2"},Kd=["disabled"],qd=["disabled"],Jd={key:0,class:"spinner-border spinner-border-sm me-2",role:"status"},Xd=it(d.defineComponent({__name:"ConfirmationModal",props:{title:{default:"Подтверждение"},message:{default:""},description:{default:""},modalVisibility:{type:Boolean,default:!1},size:{default:""},confirmText:{default:"Да"},cancelText:{default:"Нет"},imageSrc:{default:""},imageAlt:{default:""},loading:{type:Boolean,default:!1},mode:{default:"confirmation"},showButtons:{type:Boolean,default:!0}},emits:["update:modalVisibility","confirm","cancel"],setup(s,{emit:e}){const t=s,i=e,n=u=>{i("update:modalVisibility",u)},r=()=>{switch(t.mode){case"success":return"btn btn-success";case"warning":return"btn btn-warning";case"error":return"btn btn-danger";default:return"btn btn-primary"}},a=()=>{switch(t.mode){case"success":return"Отлично";case"warning":return"Понятно";case"error":return"Понятно";default:return t.confirmText}},o=()=>{t.loading||i("confirm")},l=()=>{t.loading||(i("cancel"),i("update:modalVisibility",!1))};return(u,h)=>(d.openBlock(),d.createBlock(sa,{"model-value":u.modalVisibility,"onUpdate:modelValue":n,size:u.size,title:u.title},{"modal-body":d.withCtx(()=>[d.createElementVNode("div",Ad,[d.createElementVNode("div",Hd,[d.createElementVNode("div",zd,[u.imageSrc?(d.openBlock(),d.createElementBlock("img",{key:0,class:"w-100",src:u.imageSrc,alt:u.imageAlt||"Изображение"},null,8,Bd)):u.mode==="success"?(d.openBlock(),d.createElementBlock("img",Nd)):u.mode==="warning"?(d.openBlock(),d.createElementBlock("img",Id)):u.mode==="error"?(d.openBlock(),d.createElementBlock("img",Vd)):(d.openBlock(),d.createElementBlock("img",jd))])]),d.createElementVNode("div",Wd,[d.createElementVNode("div",Yd,[u.message?(d.openBlock(),d.createElementBlock("h5",Gd,d.toDisplayString(u.message),1)):d.createCommentVNode("",!0),u.description?(d.openBlock(),d.createElementBlock("p",$d,d.toDisplayString(u.description),1)):d.createCommentVNode("",!0)])])]),d.renderSlot(u.$slots,"modal-body",{},void 0,!0)]),"modal-footer":d.withCtx(()=>[d.renderSlot(u.$slots,"modal-footer",{},()=>[u.showButtons?(d.openBlock(),d.createElementBlock("div",Ud,[u.mode==="confirmation"?(d.openBlock(),d.createElementBlock("button",{key:0,class:"btn btn-light",onClick:l,disabled:u.loading},d.toDisplayString(u.cancelText),9,Kd)):d.createCommentVNode("",!0),d.createElementVNode("button",{class:d.normalizeClass(r()),onClick:o,disabled:u.loading},[u.loading?(d.openBlock(),d.createElementBlock("span",Jd)):d.createCommentVNode("",!0),d.createTextVNode(" "+d.toDisplayString(a()),1)],10,qd)])):d.createCommentVNode("",!0)],!0)]),_:3},8,["model-value","size","title"]))}}),[["__scopeId","data-v-c2efa4c0"]]),Zd={class:"custom-dropdown"},Qd={style:{"border-bottom":"2px solid #000"}},ec={class:"dropdown-list-wrapper"},tc={key:0,class:"custom-dropdown-menu"},ic=["onClick"],sc=it({__name:"DefaultDropDown",props:{links:{type:Array,required:!0},title:{type:String,default:"Actions"},type:{type:String,default:"actions",validator:function(s){return["actions","profile"].includes(s)}}},setup(s){const e=s,t=d.ref(!1),i=o=>{o&&(o.preventDefault(),o.stopPropagation()),t.value=!t.value},n=o=>{o(),i()},r=o=>{o&&(o.preventDefault(),o.stopPropagation()),setTimeout(()=>{t.value=!1},100)},a=d.computed(()=>e.type==="profile");return(o,l)=>(d.openBlock(),d.createElementBlock("div",Zd,[a.value?(d.openBlock(),d.createElementBlock("a",{key:0,href:"#",class:"cursor-pointer nav-link dropdown-toggle d-flex align-items-center border rounded p-2",onClick:i,onBlur:r},[l[0]||(l[0]=d.createElementVNode("div",{class:"circl"},null,-1)),d.createTextVNode(" "+d.toDisplayString(s.title),1)],32)):(d.openBlock(),d.createElementBlock("a",{key:1,href:"#",class:"link-dark",type:"button",onClick:i,onBlur:r},[d.createElementVNode("span",Qd,d.toDisplayString(s.title),1),l[1]||(l[1]=d.createElementVNode("i",{class:"bi bi-chevron-up dropdown-edit",style:{"font-size":"12px","padding-left":"5px"}},null,-1))],32)),d.createElementVNode("div",ec,[t.value?(d.openBlock(),d.createElementBlock("ul",tc,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.links,(u,h)=>(d.openBlock(),d.createElementBlock("li",{key:h},[u.hidden?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["dropdown-item",{disabled:u?.disabled}]),style:{cursor:"pointer"},onClick:m=>n(u?.action)},d.toDisplayString(u?.title),11,ic))]))),128))])):d.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-efc16eec"]]),nc={class:"card-body"},rc={class:"card-text"},ac=it({__name:"Card",props:{title:{type:String,default:""},bodyClass:{type:String,default:"bg-gray-light"}},setup(s){return(e,t)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["card",s.bodyClass])},[d.createElementVNode("div",nc,[d.renderSlot(e.$slots,"bodyHeader",{},void 0,!0),d.createElementVNode("p",rc,[d.renderSlot(e.$slots,"default",{},void 0,!0)])])],2))}},[["__scopeId","data-v-5fa81802"]]),oc={class:"row mb-4 mx-0","data-test":"PageTitle"},lc={class:"col-12"},uc={class:"row align-items-center"},hc={class:"col-auto"},dc={class:"col d-flex justify-content-end"},cc=it(d.defineComponent({__name:"PageTitle",props:{title:{},subtitle:{default:""},titleClass:{default:""},subtitleClass:{default:""},titleStyle:{default:""},subtitleStyle:{default:""}},setup(s){return(e,t)=>(d.openBlock(),d.createElementBlock("div",oc,[d.createElementVNode("div",lc,[d.createElementVNode("div",uc,[d.createElementVNode("div",hc,[d.createElementVNode("h2",{class:d.normalizeClass(["mb-0",e.titleClass]),style:d.normalizeStyle(e.titleStyle)},d.toDisplayString(e.title),7),e.subtitle?(d.openBlock(),d.createElementBlock("p",{key:0,class:d.normalizeClass(["text-muted mb-0 mt-1",e.subtitleClass]),style:d.normalizeStyle(e.subtitleStyle)},d.toDisplayString(e.subtitle),7)):d.createCommentVNode("",!0)]),d.createElementVNode("div",dc,[d.renderSlot(e.$slots,"default",{},void 0,!0)])])])]))}}),[["__scopeId","data-v-fd1eb9a3"]]),fc={key:0,class:"card-header"},pc={class:"card-title mb-0"},mc={class:"card-body"},gc={class:"row"},bc={class:"row align-items-center"},vc={class:"col-auto label pe-0"},yc={class:"col-auto"},wc={key:0,class:"mt-3"},Cc=it(d.defineComponent({__name:"CardInfo",props:{title:{default:""},fields:{default:()=>[]},cardClass:{default:""},variant:{default:"default"},size:{default:"md"},bordered:{type:Boolean,default:!0},shadow:{type:Boolean,default:!1}},setup(s){const e=s,t=d.computed(()=>{const i=["card-info"];return e.variant!=="default"&&i.push(`card-info--${e.variant}`),e.size!=="md"&&i.push(`card-info--${e.size}`),e.bordered&&i.push("card-info--bordered"),e.shadow&&i.push("card-info--shadow"),e.cardClass&&i.push(e.cardClass),i.join(" ")});return(i,n)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["card",t.value])},[i.title?(d.openBlock(),d.createElementBlock("div",fc,[d.createElementVNode("h5",pc,d.toDisplayString(i.title),1)])):d.createCommentVNode("",!0),d.createElementVNode("div",mc,[d.createElementVNode("div",gc,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.fields,(r,a)=>(d.openBlock(),d.createElementBlock("div",{class:"col-12 mb-2",key:a},[d.createElementVNode("div",bc,[d.createElementVNode("div",vc,d.toDisplayString(r.label)+": ",1),d.createElementVNode("div",yc,[d.createElementVNode("span",{class:d.normalizeClass(["value",r.valueClass]),style:d.normalizeStyle(r.valueStyle)},d.toDisplayString(r.value),7)])])]))),128))]),i.$slots.default?(d.openBlock(),d.createElementBlock("div",wc,[d.renderSlot(i.$slots,"default",{},void 0,!0)])):d.createCommentVNode("",!0)])],2))}}),[["__scopeId","data-v-56359964"]]),Ec={key:0,class:"row w-100 parent"},kc={class:"col-12 wrapper w-100"},xc=["innerHTML"],na={__name:"Toast",props:{message:{type:String,default:""},isError:{type:Boolean,default:!1}},setup(s){const e=s,t=d.ref(e.message);d.watch(()=>e.message,n=>{t.value=n});const i=()=>{t.value=""};return(n,r)=>t.value&&t.value.length>0?(d.openBlock(),d.createElementBlock("div",Ec,[d.createElementVNode("div",kc,[d.createElementVNode("div",{class:d.normalizeClass(["alert align-items-center message",[e.isError?"alert-danger":"alert-success"]]),innerHTML:t.value},null,10,xc),d.createElementVNode("i",{class:"bi bi-x-lg",onClick:i})])])):d.createCommentVNode("",!0)}},Mc={class:"row","data-test":"ErrorMessageComponent"},Sc={class:"col-12"},Rc={key:0,class:"bi bi-exclamation-triangle pe-2","aria-hidden":"true"},Dc=["innerHTML"],Tc=it(d.defineComponent({__name:"ErrorMessageComponent",props:{message:{default:""},warningIcon:{type:Boolean,default:!1},type:{default:"danger"},asHtml:{type:Boolean,default:!1}},setup(s){const e=s;d.computed(()=>(Array.isArray(e.message)||e.message)&&e.message.length>0);const t=d.computed(()=>Array.isArray(e.message)?e.message.join(", "):e.message||"");return(i,n)=>(d.openBlock(),d.createElementBlock("div",Mc,[d.createElementVNode("div",Sc,[d.createElementVNode("div",{class:d.normalizeClass([`alert alert-${i.type}`,{"d-flex align-items-center":i.warningIcon}])},[i.warningIcon?(d.openBlock(),d.createElementBlock("i",Rc)):d.createCommentVNode("",!0),i.asHtml?(d.openBlock(),d.createElementBlock("div",{key:1,innerHTML:t.value},null,8,Dc)):(d.openBlock(),d.createElementBlock(d.Fragment,{key:2},[d.createTextVNode(d.toDisplayString(t.value),1)],64))],2)])]))}}),[["__scopeId","data-v-c739823d"]]),_c={class:"col-12 divider divider__wrapper","data-test":"Divider"},Oc={__name:"Divider",props:{height:{type:[Number,String],default:4},className:{type:String,default:"mb-4"},colorHEX:{type:String,default:"#EFEFEF"}},setup(s){const e=s;return(t,i)=>(d.openBlock(),d.createElementBlock("div",_c,[d.createElementVNode("div",{class:d.normalizeClass(e.className),style:d.normalizeStyle(`height: ${e.height}px ; background-color:${e.colorHEX};`)},null,6)]))}};class Je{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(e){return this.table.modules.layout.layout(e)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,t){return typeof t<"u"&&(this.table.options[e]=t),this.table.options[e]}deprecationCheck(e,t,i){return this.table.deprecationAdvisor.check(e,t,i)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class He{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}static retrieveNestedData(e,t,i){var n=e?t.split(e):[t],r=n.length,a;for(let o=0;o<r&&(i=i[n[o]],a=i,!!i);o++);return a}static deepClone(e,t,i=[]){var n={}.__proto__,r=[].__proto__;t||(t=Object.assign(Array.isArray(e)?[]:{},e));for(var a in e){let o=e[a],l,u;o!=null&&typeof o=="object"&&(o.__proto__===n||o.__proto__===r)&&(l=i.findIndex(h=>h.subject===o),l>-1?t[a]=i[l].copy:(u=Object.assign(Array.isArray(o)?[]:{},o),i.unshift({subject:o,copy:u}),t[a]=this.deepClone(o,u,i)))}return t}}let Lc=class za extends Je{constructor(e,t,i){super(e),this.element=t,this.container=this._lookupContainer(),this.parent=i,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return typeof e=="string"?(e=document.querySelector(e),e||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)")):e===!0&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,t=this.table.element){return e===t?!0:t.parentNode?this._checkContainerIsParent(e,t.parentNode):!1}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var t=!(e instanceof MouseEvent),i=t?e.touches[0].pageX:e.pageX,n=t?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let r=He.elOffset(this.container);i-=r.left,n-=r.top}return{x:i,y:n}}elementPositionCoords(e,t="right"){var i=He.elOffset(e),n,r,a;switch(this.container!==document.body&&(n=He.elOffset(this.container),i.left-=n.left,i.top-=n.top),t){case"right":r=i.left+e.offsetWidth,a=i.top-1;break;case"bottom":r=i.left,a=i.top+e.offsetHeight;break;case"left":r=i.left,a=i.top-1;break;case"top":r=i.left,a=i.top;break;case"center":r=i.left+e.offsetWidth/2,a=i.top+e.offsetHeight/2;break}return{x:r,y:a,offset:i}}show(e,t){var i,n,r,a,o;return this.destroyed||this.table.destroyed?this:(e instanceof HTMLElement?(r=e,o=this.elementPositionCoords(e,t),a=o.offset,i=o.x,n=o.y):typeof e=="number"?(a={top:0,left:0},i=e,n=t):(o=this.containerEventCoords(e),i=o.x,n=o.y,this.reversedX=!1),this.element.style.top=n+"px",this.element.style.left=i+"px",this.container.appendChild(this.element),typeof this.renderedCallback=="function"&&this.renderedCallback(),this._fitToScreen(i,n,r,a,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",l=>{l.stopPropagation()}),this)}_fitToScreen(e,t,i,n,r){var a=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;(e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",i?this.element.style.right=this.container.offsetWidth-n.left+"px":this.element.style.right=this.container.offsetWidth-e+"px",this.reversedX=!0);let o=Math.max(this.container.offsetHeight,a?this.container.scrollHeight:0);if(t+this.element.offsetHeight>o)if(i)switch(r){case"bottom":this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";break;default:this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px"}else this.element.style.height=o+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout(()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)},100),this.blurCallback=e),this}_escapeCheck(e){e.keyCode==27&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new za(this.table,e,this),this.childPopup}};class ke extends Je{constructor(e,t){super(e),this._handler=null}initialize(){}registerTableOption(e,t){this.table.optionsList.register(e,t)}registerColumnOption(e,t){this.table.columnManager.optionsList.register(e,t)}registerTableFunction(e,t){typeof this.table[e]>"u"?this.table[e]=(...i)=>(this.table.initGuard(e),t(...i)):console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,t,i){return this.table.componentFunctionBinder.bind(e,t,i)}registerDataHandler(e,t){this.table.rowManager.registerDataPipelineHandler(e,t),this._handler=e}registerDisplayHandler(e,t){this.table.rowManager.registerDisplayPipelineHandler(e,t),this._handler=e}displayRows(e){var t=this.table.rowManager.displayRows.length-1,i;if(this._handler&&(i=this.table.rowManager.displayPipeline.findIndex(n=>n.handler===this._handler),i>-1&&(t=i)),e&&(t=t+e),this._handler)return t>-1?this.table.rowManager.getDisplayRows(t):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new Lc(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}var Pc={rownum:function(s,e,t,i,n,r){return r.getPosition()}};class _s extends ke{static moduleName="accessor";static accessors=Pc;constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(n=>{var r="accessor"+(n.charAt(0).toUpperCase()+n.slice(1)),a;e.definition[r]&&(a=this.lookupAccessor(e.definition[r]),a&&(t=!0,i[r]={accessor:a,params:e.definition[r+"Params"]||{}}))}),t&&(e.modules.accessor=i)}lookupAccessor(e){var t=!1;switch(typeof e){case"string":_s.accessors[e]?t=_s.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),n=e.getComponent(),r=He.deepClone(e.data||{});return this.table.columnManager.traverse(function(a){var o,l,u,h;a.modules.accessor&&(l=a.modules.accessor[i]||a.modules.accessor.accessor||!1,l&&(o=a.getFieldValue(r),o!="undefined"&&(h=a.getComponent(),u=typeof l.params=="function"?l.params(o,r,t,h,n):l.params,a.setFieldValue(r,l.accessor(o,r,t,u,h,n)))))}),r}}var Fc={method:"GET"};function On(s,e){var t=[];if(e=e||"",Array.isArray(s))s.forEach((n,r)=>{t=t.concat(On(n,e?e+"["+r+"]":r))});else if(typeof s=="object")for(var i in s)t=t.concat(On(s[i],e?e+"["+i+"]":i));else t.push({key:e,value:s});return t}function Ac(s){var e=On(s),t=[];return e.forEach(function(i){t.push(encodeURIComponent(i.key)+"="+encodeURIComponent(i.value))}),t.join("&")}function ra(s,e,t){return s&&t&&Object.keys(t).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",s+=(s.includes("?")?"&":"?")+Ac(t)),s}function Hc(s,e,t){var i;return new Promise((n,r)=>{if(s=this.urlGenerator.call(this.table,s,e,t),e.method.toUpperCase()!="GET")if(i=typeof this.table.options.ajaxContentType=="object"?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType],i){for(var a in i.headers)e.headers||(e.headers={}),typeof e.headers[a]>"u"&&(e.headers[a]=i.headers[a]);e.body=i.body.call(this,s,e,t)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);s?(typeof e.headers>"u"&&(e.headers={}),typeof e.headers.Accept>"u"&&(e.headers.Accept="application/json"),typeof e.headers["X-Requested-With"]>"u"&&(e.headers["X-Requested-With"]="XMLHttpRequest"),typeof e.mode>"u"&&(e.mode="cors"),e.mode=="cors"?(typeof e.headers.Origin>"u"&&(e.headers.Origin=window.location.origin),typeof e.credentials>"u"&&(e.credentials="same-origin")):typeof e.credentials>"u"&&(e.credentials="include"),fetch(s,e).then(o=>{o.ok?o.json().then(l=>{n(l)}).catch(l=>{r(l),console.warn("Ajax Load Error - Invalid JSON returned",l)}):(console.error("Ajax Load Error - Connection Error: "+o.status,o.statusText),r(o))}).catch(o=>{console.error("Ajax Load Error - Connection Error: ",o),r(o)})):(console.warn("Ajax Load Error - No URL Set"),n([]))})}function Ln(s,e){var t=[];if(e=e||"",Array.isArray(s))s.forEach((n,r)=>{t=t.concat(Ln(n,e?e+"["+r+"]":r))});else if(typeof s=="object")for(var i in s)t=t.concat(Ln(s[i],e?e+"["+i+"]":i));else t.push({key:e,value:s});return t}var zc={json:{headers:{"Content-Type":"application/json"},body:function(s,e,t){return JSON.stringify(t)}},form:{headers:{},body:function(s,e,t){var i=Ln(t),n=new FormData;return i.forEach(function(r){n.append(r.key,r.value)}),n}}};class vi extends ke{static moduleName="ajax";static defaultConfig=Fc;static defaultURLGenerator=ra;static defaultLoaderPromise=Hc;static contentTypeFormatters=zc;constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",function(){}),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=vi.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||vi.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||vi.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,t,i,n){var r=this.table.options.ajaxParams;return r&&(typeof r=="function"&&(r=r.call(this.table)),n=Object.assign(Object.assign({},r),n)),n}requestDataCheck(e,t,i,n){return!!(!e&&this.url||typeof e=="string")}requestData(e,t,i,n,r){var a;return!r&&this.requestDataCheck(e)?(e&&this.setUrl(e),a=this.generateConfig(i),this.sendRequest(this.url,t,a)):r}setDefaultConfig(e={}){this.config=Object.assign({},vi.defaultConfig),typeof e=="string"?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var t=Object.assign({},this.config);return typeof e=="string"?t.method=e:Object.assign(t,e),t}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,t,i){return this.table.options.ajaxRequesting.call(this.table,e,t)!==!1?this.loaderPromise(e,i,t).then(n=>(this.table.options.ajaxResponse&&(n=this.table.options.ajaxResponse.call(this.table,e,t,n)),n)):Promise.reject()}}var Bc={replace:function(s){return this.table.setData(s)},update:function(s){return this.table.updateOrAddData(s)},insert:function(s){return this.table.addData(s)}},Nc={table:function(s){var e=[],t=!0,i=this.table.columnManager.columns,n=[],r=[];return s=s.split(`
27
+ `),s.forEach(function(a){e.push(a.split(" "))}),e.length&&!(e.length===1&&e[0].length<2)?(e[0].forEach(function(a){var o=i.find(function(l){return a&&l.definition.title&&a.trim()&&l.definition.title.trim()===a.trim()});o?n.push(o):t=!1}),t||(t=!0,n=[],e[0].forEach(function(a){var o=i.find(function(l){return a&&l.field&&a.trim()&&l.field.trim()===a.trim()});o?n.push(o):t=!1}),t||(n=this.table.columnManager.columnsByIndex)),t&&e.shift(),e.forEach(function(a){var o={};a.forEach(function(l,u){n[u]&&(o[n[u].field]=l)}),r.push(o)}),r):!1}},Ic={copyToClipboard:["ctrl + 67","meta + 67"]},Vc={copyToClipboard:function(s){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},jc={keybindings:{bindings:Ic,actions:Vc}};class Os extends ke{static moduleName="clipboard";static moduleExtensions=jc;static pasteActions=Bc;static pasteParsers=Nc;constructor(e){super(e),this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0,this.registerTableOption("clipboard",!1),this.registerTableOption("clipboardCopyStyled",!0),this.registerTableOption("clipboardCopyConfig",!1),this.registerTableOption("clipboardCopyFormatter",!1),this.registerTableOption("clipboardCopyRowRange","active"),this.registerTableOption("clipboardPasteParser","table"),this.registerTableOption("clipboardPasteAction","insert"),this.registerColumnOption("clipboard"),this.registerColumnOption("titleClipboard")}initialize(){this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,(this.mode===!0||this.mode==="copy")&&this.table.element.addEventListener("copy",e=>{var t,i,n;this.blocked||(e.preventDefault(),this.customSelection?(t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t))):(n=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),i=this.table.modules.export.generateHTMLTable(n),t=i?this.generatePlainContent(n):"",this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t),i=this.table.options.clipboardCopyFormatter("html",i))),window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",t):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",t),i&&e.clipboardData.setData("text/html",i)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",t),i&&e.originalEvent.clipboardData.setData("text/html",i)),this.dispatchExternal("clipboardCopied",t,i),this.reset())}),(this.mode===!0||this.mode==="paste")&&this.table.element.addEventListener("paste",e=>{this.paste(e)}),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction),this.registerTableFunction("copyToClipboard",this.copy.bind(this))}reset(){this.blocked=!0,this.customSelection=!1}generatePlainContent(e){var t=[];return e.forEach(i=>{var n=[];i.columns.forEach(r=>{var a="";if(r)if(i.type==="group"&&(r.value=r.component.getKey()),r.value===null)a="";else switch(typeof r.value){case"object":a=JSON.stringify(r.value);break;case"undefined":a="";break;default:a=r.value}n.push(a)}),t.push(n.join(" "))}),t.join(`
28
+ `)}copy(e,t){var i,n;this.blocked=!1,this.customSelection=!1,(this.mode===!0||this.mode==="copy")&&(this.rowRange=e||this.table.options.clipboardCopyRowRange,typeof window.getSelection<"u"&&typeof document.createRange<"u"?(e=document.createRange(),e.selectNodeContents(this.table.element),i=window.getSelection(),i.toString()&&t&&(this.customSelection=i.toString()),i.removeAllRanges(),i.addRange(e)):typeof document.selection<"u"&&typeof document.body.createTextRange<"u"&&(n=document.body.createTextRange(),n.moveToElementText(this.table.element),n.select()),document.execCommand("copy"),i&&i.removeAllRanges())}setPasteAction(e){switch(typeof e){case"string":this.pasteAction=Os.pasteActions[e],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",e);break;case"function":this.pasteAction=e;break}}setPasteParser(e){switch(typeof e){case"string":this.pasteParser=Os.pasteParsers[e],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",e);break;case"function":this.pasteParser=e;break}}paste(e){var t,i,n;this.checkPasteOrigin(e)&&(t=this.getPasteData(e),i=this.pasteParser.call(this,t),i?(e.preventDefault(),this.table.modExists("mutator")&&(i=this.mutateData(i)),n=this.pasteAction.call(this,i),this.dispatchExternal("clipboardPasted",t,i,n)):this.dispatchExternal("clipboardPasteError",t))}mutateData(e){var t=[];return Array.isArray(e)?e.forEach(i=>{t.push(this.table.modules.mutator.transformRow(i,"clipboard"))}):t=e,t}checkPasteOrigin(e){var t=!0,i=this.confirm("clipboard-paste",[e]);return(i||!["DIV","SPAN"].includes(e.target.tagName))&&(t=!1),t}getPasteData(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t}}class Wc{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getTable(){return this._row.table}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}_getSelf(){return this._row}}class aa{constructor(e){return this._cell=e,new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._cell.table.componentFunctionBinder.handle("cell",t._cell,i)}})}getValue(){return this._cell.getValue()}getOldValue(){return this._cell.getOldValue()}getInitialValue(){return this._cell.initialValue}getElement(){return this._cell.getElement()}getRow(){return this._cell.row.getComponent()}getData(e){return this._cell.row.getData(e)}getType(){return"cell"}getField(){return this._cell.column.getField()}getColumn(){return this._cell.column.getComponent()}setValue(e,t){typeof t>"u"&&(t=!0),this._cell.setValue(e,t)}restoreOldValue(){this._cell.setValueActual(this._cell.getOldValue())}restoreInitialValue(){this._cell.setValueActual(this._cell.initialValue)}checkHeight(){this._cell.checkHeight()}getTable(){return this._cell.table}_getSelf(){return this._cell}}class Yi extends Je{constructor(e,t){super(e.table),this.table=e.table,this.column=e,this.row=t,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()}build(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}generateElement(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.column.isRowHeader&&this.element.classList.add("tabulator-row-header")}_configureCell(){var e=this.element,t=this.column.getField(),i={top:"flex-start",bottom:"flex-end",middle:"center"},n={left:"flex-start",right:"flex-end",center:"center"};if(e.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(e.style.display="inline-flex",e.style.alignItems=i[this.column.vertAlign]||"",this.column.hozAlign&&(e.style.justifyContent=n[this.column.hozAlign]||"")),t&&e.setAttribute("tabulator-field",t),this.column.definition.cssClass){var r=this.column.definition.cssClass.split(" ");r.forEach(a=>{e.classList.add(a)})}this.dispatch("cell-init",this),this.column.visible||this.hide()}_generateContents(){var e;switch(e=this.chain("cell-format",this,null,()=>this.element.innerHTML=this.value),typeof e){case"object":if(e instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(e)}else this.element.innerHTML="",e!=null&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",e);break;case"undefined":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t,i){var n=this.setValueProcessData(e,t,i);n&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}setValueProcessData(e,t,i){var n=!1;return(this.value!==e||i)&&(n=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),n&&this.dispatch("cell-value-changed",this),n}setValueActual(e){this.oldValue=this.value,this.value=e,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,e),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}layoutElement(){this._generateContents(),this.dispatch("cell-layout",this)}setWidth(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}clearWidth(){this.width="",this.element.style.width=""}getWidth(){return this.width||this.element.offsetWidth}setMinWidth(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}setMaxWidth(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}checkHeight(){this.row.reinitializeHeight()}clearHeight(){this.element.style.height="",this.height=null,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,this.row.heightStyled)}getHeight(){return this.height||this.element.offsetHeight}show(){this.element.style.display=this.column.vertAlign?"inline-flex":""}hide(){this.element.style.display="none"}delete(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}getIndex(){return this.row.getCellIndex(this)}getComponent(){return this.component||(this.component=new aa(this)),this.component}}class oa{constructor(e){return this._column=e,this.type="ColumnComponent",new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._column.table.componentFunctionBinder.handle("column",t._column,i)}})}getElement(){return this._column.getElement()}getDefinition(){return this._column.getDefinition()}getField(){return this._column.getField()}getTitleDownload(){return this._column.getTitleDownload()}getCells(){var e=[];return this._column.cells.forEach(function(t){e.push(t.getComponent())}),e}isVisible(){return this._column.visible}show(){this._column.isGroup?this._column.columns.forEach(function(e){e.show()}):this._column.show()}hide(){this._column.isGroup?this._column.columns.forEach(function(e){e.hide()}):this._column.hide()}toggle(){this._column.visible?this.hide():this.show()}delete(){return this._column.delete()}getSubColumns(){var e=[];return this._column.columns.length&&this._column.columns.forEach(function(t){e.push(t.getComponent())}),e}getParentColumn(){return this._column.getParentComponent()}_getSelf(){return this._column}scrollTo(e,t){return this._column.table.columnManager.scrollToColumn(this._column,e,t)}getTable(){return this._column.table}move(e,t){var i=this._column.table.columnManager.findColumn(e);i?this._column.table.columnManager.moveColumn(this._column,i,t):console.warn("Move Error - No matching column found:",i)}getNextColumn(){var e=this._column.nextColumn();return e?e.getComponent():!1}getPrevColumn(){var e=this._column.prevColumn();return e?e.getComponent():!1}updateDefinition(e){return this._column.updateDefinition(e)}getWidth(){return this._column.getWidth()}setWidth(e){var t;return e===!0?t=this._column.reinitializeWidth(!0):t=this._column.setWidth(e),this._column.table.columnManager.rerenderColumns(!0),t}}var la={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};class _t extends Je{static defaultOptionList=la;constructor(e,t,i){super(t.table),this.definition=e,this.parent=t,this.type="column",this.columns=[],this.cells=[],this.isGroup=!1,this.isRowHeader=i,this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleDownload=null,this.titleFormatterRendered=!1,this.mapDefinitions(),this.setField(this.definition.field),this.modules={},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.maxInitialWidth=null,this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this.definition.columns?(this.isGroup=!0,this.definition.columns.forEach((n,r)=>{var a=new _t(n,this);this.attachColumn(a)}),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize()}createElement(){var e=document.createElement("div");switch(e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),this.isRowHeader&&e.classList.add("tabulator-row-header"),this.table.options.columnHeaderVertAlign){case"middle":e.style.justifyContent="center";break;case"bottom":e.style.justifyContent="flex-end";break}return e}createGroupElement(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e}mapDefinitions(){var e=this.table.options.columnDefaults;if(e)for(let t in e)typeof this.definition[t]>"u"&&(this.definition[t]=e[t]);this.definition=this.table.columnManager.optionsList.generate(_t.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach(e=>{_t.defaultOptionList.indexOf(e)===-1&&console.warn("Invalid column definition option in '"+(this.field||this.definition.title)+"' column:",e)})}setField(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}registerColumnPosition(e){this.parent.registerColumnPosition(e)}registerColumnField(e){this.parent.registerColumnField(e)}reRegisterPosition(){this.isGroup?this.columns.forEach(function(e){e.reRegisterPosition()}):this.registerColumnPosition(this)}_initialize(){for(var e=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),e.headerVertical==="flip"&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var e=this.definition;if(this.dispatch("column-layout",this),typeof e.visible<"u"&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass){var t=e.cssClass.split(" ");t.forEach(i=>{this.element.classList.add(i)})}e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(parseInt(e.minWidth)),e.maxInitialWidth&&(this.maxInitialWidth=parseInt(e.maxInitialWidth)),e.maxWidth&&this.setMaxWidth(parseInt(e.maxWidth)),this.reinitializeWidth(),this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){var e=document.createElement("div");return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e}_buildColumnHeaderTitle(){var e=this.definition,t=document.createElement("div");if(t.classList.add("tabulator-col-title"),e.headerWordWrap&&t.classList.add("tabulator-col-title-wrap"),e.editableTitle){var i=document.createElement("input");i.classList.add("tabulator-title-editor"),i.addEventListener("click",n=>{n.stopPropagation(),i.focus()}),i.addEventListener("mousedown",n=>{n.stopPropagation()}),i.addEventListener("change",()=>{e.title=i.value,this.dispatchExternal("columnTitleChanged",this.getComponent())}),t.appendChild(i),e.field?this.langBind("columns|"+e.field,n=>{i.value=n||e.title||"&nbsp;"}):i.value=e.title||"&nbsp;"}else e.field?this.langBind("columns|"+e.field,n=>{this._formatColumnHeaderTitle(t,n||e.title||"&nbsp;")}):this._formatColumnHeaderTitle(t,e.title||"&nbsp;");return t}_formatColumnHeaderTitle(e,t){var i=this.chain("column-format",[this,t,e],null,()=>t);switch(typeof i){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":e.innerHTML="";break;default:e.innerHTML=i}}_buildGroupHeader(){if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){var e=this.definition.cssClass.split(" ");e.forEach(t=>{this.element.classList.add(t)})}this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}_getFlatData(e){return e[this.field]}_getNestedData(e){var t=e,i=this.fieldStructure,n=i.length,r;for(let a=0;a<n&&(t=t[i[a]],r=t,!!t);a++);return r}_setFlatData(e,t){this.field&&(e[this.field]=t)}_setNestedData(e,t){var i=e,n=this.fieldStructure,r=n.length;for(let a=0;a<r;a++)if(a==r-1)i[n[a]]=t;else{if(!i[n[a]])if(typeof t<"u")i[n[a]]={};else break;i=i[n[a]]}}attachColumn(e){this.groupElement?(this.columns.push(e),this.groupElement.appendChild(e.getElement()),e.columnRendered()):console.warn("Column Warning - Column being attached to another column instead of column group")}verticalAlign(e,t){var i=this.parent.isGroup?this.parent.getGroupElement().clientHeight:t||this.parent.getHeadersElement().clientHeight;this.element.style.height=i+"px",this.dispatch("column-height",this,this.element.style.height),this.isGroup&&(this.groupElement.style.minHeight=i-this.contentElement.offsetHeight+"px"),this.columns.forEach(function(n){n.verticalAlign(e)})}clearVerticalAlign(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach(function(e){e.clearVerticalAlign()}),this.dispatch("column-height",this,"")}getElement(){return this.element}getGroupElement(){return this.groupElement}getField(){return this.field}getTitleDownload(){return this.titleDownload}getFirstColumn(){return this.isGroup?this.columns.length?this.columns[0].getFirstColumn():!1:this}getLastColumn(){return this.isGroup?this.columns.length?this.columns[this.columns.length-1].getLastColumn():!1:this}getColumns(e){var t=[];return e?this.columns.forEach(i=>{t.push(i),t=t.concat(i.getColumns(!0))}):t=this.columns,t}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(e){var t=[];return this.isGroup&&e&&(this.columns.forEach(function(i){t.push(i.getDefinition(!0))}),this.definition.columns=t),this.definition}checkColumnVisibility(){var e=!1;this.columns.forEach(function(t){t.visible&&(e=!0)}),e?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.show()}),!this.isGroup&&this.width===null&&this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.hide()}),this.dispatch("column-hide",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}),this.contentElement.style.maxWidth=e-1+"px",this.table.initialized&&(this.element.style.width=e+"px"),this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(e){var t=this.columns.indexOf(e);t>-1&&this.columns.splice(t,1),this.columns.length||this.delete()}setWidth(e){this.widthFixed=!0,this.setWidthActual(e)}setWidthActual(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(t){t.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this),this.subscribedExternal("columnWidth")&&this.dispatchExternal("columnWidth",this.getComponent())}checkCellHeights(){var e=[];this.cells.forEach(function(t){t.row.heightInitialized&&(t.row.getElement().offsetParent!==null?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)}),e.forEach(function(t){t.calcHeight()}),e.forEach(function(t){t.setCellHeight()})}getWidth(){var e=0;return this.isGroup?this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}):e=this.width,e}getLeftOffset(){var e=this.element.offsetLeft;return this.parent.isGroup&&(e+=this.parent.getLeftOffset()),e}getHeight(){return Math.ceil(this.element.getBoundingClientRect().height)}setMinWidth(e){this.maxWidth&&e>this.maxWidth&&(e=this.maxWidth,console.warn("the minWidth ("+e+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(t){t.setMinWidth()})}setMaxWidth(e){this.minWidth&&e<this.minWidth&&(e=this.minWidth,console.warn("the maxWidth ("+e+"px) for column '"+this.field+"' cannot be smaller that its minWidth ("+this.minWidthStyled+")")),this.maxWidth=e,this.maxWidthStyled=e?e+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach(function(t){t.setMaxWidth()})}delete(){return new Promise((e,t)=>{this.isGroup&&this.columns.forEach(function(n){n.delete()}),this.dispatch("column-delete",this);var i=this.cells.length;for(let n=0;n<i;n++)this.cells[0].delete();this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.contentElement=!1,this.titleElement=!1,this.groupElement=!1,this.parent.isGroup&&this.parent.removeChild(this),this.table.columnManager.deregisterColumn(this),this.table.columnManager.rerenderColumns(!0),this.dispatch("column-deleted",this),e()})}columnRendered(){this.titleFormatterRendered&&this.titleFormatterRendered(),this.dispatch("column-rendered",this)}generateCell(e){var t=new Yi(this,e);return this.cells.push(t),t}nextColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._nextVisibleColumn(e+1):!1}_nextVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)}prevColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._prevVisibleColumn(e-1):!1}_prevVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)}reinitializeWidth(e){this.widthFixed=!1,typeof this.definition.width<"u"&&!e&&this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(e),this.dispatch("column-width-fit-after",this)}fitToData(e){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach(n=>{n.clearWidth()}));var t=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach(n=>{var r=n.getWidth();r>t&&(t=r)}),t)){var i=t+1;e?this.setWidth(i):(this.maxInitialWidth&&!e&&(i=Math.min(i,this.maxInitialWidth)),this.setWidthActual(i))}}}updateDefinition(e){var t;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(t=Object.assign({},this.getDefinition()),t=Object.assign(t,e),this.table.columnManager.addColumn(t,!1,this).then(i=>(t.field==this.field&&(this.field=!1),this.delete().then(()=>i.getComponent()))))}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}getComponent(){return this.component||(this.component=new oa(this)),this.component}getPosition(){return this.table.columnManager.getVisibleColumnsByIndex().indexOf(this)+1}getParentComponent(){return this.parent instanceof _t?this.parent.getComponent():!1}}class Ls{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}getIndex(){return this._row.getData("data")[this._row.table.options.index]}getPosition(){return this._row.getPosition()}watchPosition(e){return this._row.watchPosition(e)}delete(){return this._row.delete()}scrollTo(e,t){return this._row.table.rowManager.scrollToRow(this._row,e,t)}move(e,t){this._row.moveToRow(e,t)}update(e){return this._row.updateData(e)}normalizeHeight(){this._row.normalizeHeight(!0)}_getSelf(){return this._row}reformat(){return this._row.reinitialize()}getTable(){return this._row.table}getNextRow(){var e=this._row.nextRow();return e&&e.getComponent()}getPrevRow(){var e=this._row.prevRow();return e&&e.getComponent()}}class Qe extends Je{constructor(e,t,i="row"){super(t.table),this.parent=t,this.data={},this.type=i,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.position=0,this.positionWatchers=[],this.component=null,this.created=!1,this.setData(e)}create(){this.created||(this.created=!0,this.generateElement())}createElement(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e}getElement(){return this.create(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}generateElement(){this.createElement(),this.dispatch("row-init",this)}generateCells(){this.cells=this.table.columnManager.generateCells(this)}initialize(e,t){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this,t),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this,t)}rendered(){this.cells.forEach(e=>{e.cellRendered()})}reinitializeHeight(){this.heightInitialized=!1,this.element&&this.element.offsetParent!==null&&this.normalizeHeight(!0)}deinitialize(){this.initialized=!1}deinitializeHeight(){this.heightInitialized=!1}reinitialize(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&this.element.offsetParent!==null&&this.initialize(!0),this.dispatch("row-relayout",this)}calcHeight(e){var t=0,i=0;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(i=this.calcMinHeight(),t=this.calcMaxHeight(),e?this.height=Math.max(t,i):this.height=this.manualHeight?this.height:Math.max(t,i)),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}calcMinHeight(){return this.table.options.resizableRows?this.element.clientHeight:0}calcMaxHeight(){var e=0;return this.cells.forEach(function(t){var i=t.getHeight();i>e&&(e=i)}),e}setCellHeight(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0}clearCellHeight(){this.cells.forEach(function(e){e.clearHeight()})}normalizeHeight(e){e&&!this.table.options.rowHeight&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}setHeight(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight,this.subscribedExternal("rowHeight")&&this.dispatchExternal("rowHeight",this.getComponent()))}getHeight(){return this.outerHeight}getWidth(){return this.element.offsetWidth}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}setData(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}updateData(e){var t=this.element&&He.elVisible(this.element),i={},n;return new Promise((r,a)=>{typeof e=="string"&&(e=JSON.parse(e)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(i=Object.assign(i,this.data),i=Object.assign(i,e)),n=this.chain("row-data-changing",[this,i,e],null,e);for(let o in n)this.data[o]=n[o];this.dispatch("row-data-save-after",this);for(let o in e)this.table.columnManager.getColumnsByFieldRoot(o).forEach(u=>{let h=this.getCell(u.getField());if(h){let m=u.getFieldValue(n);h.getValue()!==m&&(h.setValueProcessData(m),t&&h.cellRendered())}});t?(this.normalizeHeight(!0),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent())):(this.initialized=!1,this.height=0,this.heightStyled=""),this.dispatch("row-data-changed",this,t,e),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),r()})}getData(e){return e?this.chain("row-data-retrieve",[this,e],null,this.data):this.data}getCell(e){var t=!1;return e=this.table.columnManager.findColumn(e),!this.initialized&&this.cells.length===0&&this.generateCells(),t=this.cells.find(function(i){return i.column===e}),t}getCellIndex(e){return this.cells.findIndex(function(t){return t===e})}findCell(e){return this.cells.find(t=>t.element===e)}getCells(){return!this.initialized&&this.cells.length===0&&this.generateCells(),this.cells}nextRow(){var e=this.table.rowManager.nextDisplayRow(this,!0);return e||!1}prevRow(){var e=this.table.rowManager.prevDisplayRow(this,!0);return e||!1}moveToRow(e,t){var i=this.table.rowManager.findRow(e);i?(this.table.rowManager.moveRowActual(this,i,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)}delete(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}deleteActual(e){this.detachModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;t<e;t++)this.cells[0].delete()}wipe(){if(this.detachModules(),this.deleteCells(),this.element){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.parentNode&&this.element.parentNode.removeChild(this.element)}this.element=!1,this.modules={}}isDisplayed(){return this.table.rowManager.getDisplayRows().includes(this)}getPosition(){return this.isDisplayed()?this.position:!1}setPosition(e){e!=this.position&&(this.position=e,this.positionWatchers.forEach(t=>{t(this.position)}))}watchPosition(e){this.positionWatchers.push(e),e(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new Ls(this)),this.component}}var Yc={avg:function(s,e,t){var i=0,n=typeof t.precision<"u"?t.precision:2;return s.length&&(i=s.reduce(function(r,a){return Number(r)+Number(a)}),i=i/s.length,i=n!==!1?i.toFixed(n):i),parseFloat(i).toString()},max:function(s,e,t){var i=null,n=typeof t.precision<"u"?t.precision:!1;return s.forEach(function(r){r=Number(r),(r>i||i===null)&&(i=r)}),i!==null?n!==!1?i.toFixed(n):i:""},min:function(s,e,t){var i=null,n=typeof t.precision<"u"?t.precision:!1;return s.forEach(function(r){r=Number(r),(r<i||i===null)&&(i=r)}),i!==null?n!==!1?i.toFixed(n):i:""},sum:function(s,e,t){var i=0,n=typeof t.precision<"u"?t.precision:!1;return s.length&&s.forEach(function(r){r=Number(r),i+=isNaN(r)?0:Number(r)}),n!==!1?i.toFixed(n):i},concat:function(s,e,t){var i=0;return s.length&&(i=s.reduce(function(n,r){return String(n)+String(r)})),i},count:function(s,e,t){var i=0;return s.length&&s.forEach(function(n){n&&i++}),i},unique:function(s,e,t){var i=s.filter((n,r)=>(s||n===0)&&s.indexOf(n)===r);return i.length}};class yi extends ke{static moduleName="columnCalcs";static calculations=Yc;constructor(e){super(e),this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.blocked=!1,this.recalcAfterBlock=!1,this.registerTableOption("columnCalcs",!0),this.registerColumnOption("topCalc"),this.registerColumnOption("topCalcParams"),this.registerColumnOption("topCalcFormatter"),this.registerColumnOption("topCalcFormatterParams"),this.registerColumnOption("bottomCalc"),this.registerColumnOption("bottomCalcParams"),this.registerColumnOption("bottomCalcFormatter"),this.registerColumnOption("bottomCalcFormatterParams")}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-calcs-holder"),e}initialize(){this.genColumn=new _t({field:"value"},this),this.subscribe("cell-value-changed",this.cellValueChanged.bind(this)),this.subscribe("column-init",this.initializeColumnCheck.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("column-moved",this.recalcActiveRows.bind(this)),this.subscribe("column-add",this.recalcActiveRows.bind(this)),this.subscribe("data-refreshed",this.recalcActiveRowsRefresh.bind(this)),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this)),this.subscribe("redraw-blocked",this.blockRedraw.bind(this)),this.subscribe("redraw-restored",this.restoreRedraw.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this)),this.registerTableFunction("getCalcResults",this.getResults.bind(this)),this.registerTableFunction("recalc",this.userRecalc.bind(this)),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}tableRedraw(e){this.recalc(this.table.rowManager.activeRows),e&&this.redraw()}blockRedraw(){this.blocked=!0,this.recalcAfterBlock=!1}restoreRedraw(){this.blocked=!1,this.recalcAfterBlock&&(this.recalcAfterBlock=!1,this.recalcActiveRowsRefresh())}userRecalc(){this.recalc(this.table.rowManager.activeRows)}blockCheck(){return this.blocked&&(this.recalcAfterBlock=!0),this.blocked}visibleRows(e,t){return this.topRow&&t.unshift(this.topRow),this.botRow&&t.push(this.botRow),t}rowsUpdated(e){this.table.options.groupBy?this.recalcRowGroup(e):this.recalcActiveRows()}recalcActiveRowsRefresh(){this.table.options.groupBy&&this.table.options.dataTreeStartExpanded&&this.table.options.dataTree?this.recalcAll():this.recalcActiveRows()}recalcActiveRows(){this.recalc(this.table.rowManager.activeRows)}cellValueChanged(e){(e.column.definition.topCalc||e.column.definition.bottomCalc)&&(this.table.options.groupBy?((this.table.options.columnCalcs=="table"||this.table.options.columnCalcs=="both")&&this.recalcActiveRows(),this.table.options.columnCalcs!="table"&&this.recalcRowGroup(e.row)):this.recalcActiveRows())}initializeColumnCheck(e){(e.definition.topCalc||e.definition.bottomCalc)&&this.initializeColumn(e)}initializeColumn(e){var t=e.definition,i={topCalcParams:t.topCalcParams||{},botCalcParams:t.bottomCalcParams||{}};if(t.topCalc){switch(typeof t.topCalc){case"string":yi.calculations[t.topCalc]?i.topCalc=yi.calculations[t.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.topCalc);break;case"function":i.topCalc=t.topCalc;break}i.topCalc&&(e.modules.columnCalcs=i,this.topCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeTopRow())}if(t.bottomCalc){switch(typeof t.bottomCalc){case"string":yi.calculations[t.bottomCalc]?i.botCalc=yi.calculations[t.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.bottomCalc);break;case"function":i.botCalc=t.bottomCalc;break}i.botCalc&&(e.modules.columnCalcs=i,this.botCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeBottomRow())}}registerColumnField(){}removeCalcs(){var e=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),e=!0),this.botInitialized&&(this.botInitialized=!1,this.footerRemove(this.botElement),e=!0),e&&this.table.rowManager.adjustTableSize()}reinitializeCalcs(){this.topCalcs.length&&this.initializeTopRow(),this.botCalcs.length&&this.initializeBottomRow()}initializeTopRow(){var e=document.createDocumentFragment();this.topInitialized||(e.appendChild(document.createElement("br")),e.appendChild(this.topElement),this.table.columnManager.getContentsElement().insertBefore(e,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)}initializeBottomRow(){this.botInitialized||(this.footerPrepend(this.botElement),this.botInitialized=!0)}scrollHorizontal(e){this.botInitialized&&this.botRow&&(this.botElement.scrollLeft=e)}recalc(e){var t,i;if(!this.blockCheck()&&(this.topInitialized||this.botInitialized)){if(t=this.rowsToData(e),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),i=this.generateRow("top",t),this.topRow=i;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(i.getElement()),i.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),i=this.generateRow("bottom",t),this.botRow=i;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(i.getElement()),i.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}}recalcRowGroup(e){this.recalcGroup(this.table.modules.groupRows.getRowGroup(e))}recalcAll(){if((this.topCalcs.length||this.botCalcs.length)&&(this.table.options.columnCalcs!=="group"&&this.recalcActiveRows(),this.table.options.groupBy&&this.table.options.columnCalcs!=="table")){var e=this.table.modules.groupRows.getChildGroups();e.forEach(t=>{this.recalcGroup(t)})}}recalcGroup(e){var t,i;this.blockCheck()||e&&e.calcs&&(e.calcs.bottom&&(t=this.rowsToData(e.rows),i=this.generateRowData("bottom",t),e.calcs.bottom.updateData(i),e.calcs.bottom.reinitialize()),e.calcs.top&&(t=this.rowsToData(e.rows),i=this.generateRowData("top",t),e.calcs.top.updateData(i),e.calcs.top.reinitialize()))}generateTopRow(e){return this.generateRow("top",this.rowsToData(e))}generateBottomRow(e){return this.generateRow("bottom",this.rowsToData(e))}rowsToData(e){var t=[],i=this.table.options.dataTree&&this.table.options.dataTreeChildColumnCalcs,n=this.table.modules.dataTree;return e.forEach(r=>{t.push(r.getData()),i&&r.modules.dataTree?.open&&this.rowsToData(n.getFilteredTreeChildren(r)).forEach(a=>{t.push(r)})}),t}generateRow(e,t){var i=this.generateRowData(e,t),n;return this.table.modExists("mutator")&&this.table.modules.mutator.disable(),n=new Qe(i,this,"calc"),this.table.modExists("mutator")&&this.table.modules.mutator.enable(),n.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+e),n.component=!1,n.getComponent=()=>(n.component||(n.component=new Wc(n)),n.component),n.generateCells=()=>{var r=[];this.table.columnManager.columnsByIndex.forEach(a=>{this.genColumn.setField(a.getField()),this.genColumn.hozAlign=a.hozAlign,a.definition[e+"CalcFormatter"]&&this.table.modExists("format")?this.genColumn.modules.format={formatter:this.table.modules.format.lookupFormatter(a.definition[e+"CalcFormatter"]),params:a.definition[e+"CalcFormatterParams"]||{}}:this.genColumn.modules.format={formatter:this.table.modules.format.lookupFormatter("plaintext"),params:{}},this.genColumn.definition.cssClass=a.definition.cssClass;var o=new Yi(this.genColumn,n);o.getElement(),o.column=a,o.setWidth(),a.cells.push(o),r.push(o),a.visible||o.hide()}),n.cells=r},n}generateRowData(e,t){var i={},n=e=="top"?this.topCalcs:this.botCalcs,r=e=="top"?"topCalc":"botCalc",a,o;return n.forEach(function(l){var u=[];l.modules.columnCalcs&&l.modules.columnCalcs[r]&&(t.forEach(function(h){u.push(l.getFieldValue(h))}),o=r+"Params",a=typeof l.modules.columnCalcs[o]=="function"?l.modules.columnCalcs[o](u,t):l.modules.columnCalcs[o],l.setFieldValue(i,l.modules.columnCalcs[r](u,t,a)))}),i}hasTopCalcs(){return!!this.topCalcs.length}hasBottomCalcs(){return!!this.botCalcs.length}redraw(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)}getResults(){var e={},t;return this.table.options.groupBy&&this.table.modExists("groupRows")?(t=this.table.modules.groupRows.getGroups(!0),t.forEach(i=>{e[i.getKey()]=this.getGroupResults(i)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e}getGroupResults(e){var t=e._getSelf(),i=e.getSubGroups(),n={},r={};return i.forEach(a=>{n[a.getKey()]=this.getGroupResults(a)}),r={top:t.calcs.top?t.calcs.top.getData():{},bottom:t.calcs.bottom?t.calcs.bottom.getData():{},groups:n},r}adjustForScrollbar(e){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=e+"px":this.botElement.style.paddingRight=e+"px")}}class Gc extends ke{static moduleName="dataTree";constructor(e){super(e),this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.registerTableOption("dataTree",!1),this.registerTableOption("dataTreeFilter",!0),this.registerTableOption("dataTreeSort",!0),this.registerTableOption("dataTreeElementColumn",!1),this.registerTableOption("dataTreeBranchElement",!0),this.registerTableOption("dataTreeChildIndent",9),this.registerTableOption("dataTreeChildField","_children"),this.registerTableOption("dataTreeCollapseElement",!1),this.registerTableOption("dataTreeExpandElement",!1),this.registerTableOption("dataTreeStartExpanded",!1),this.registerTableOption("dataTreeChildColumnCalcs",!1),this.registerTableOption("dataTreeSelectPropagate",!1),this.registerComponentFunction("row","treeCollapse",this.collapseRow.bind(this)),this.registerComponentFunction("row","treeExpand",this.expandRow.bind(this)),this.registerComponentFunction("row","treeToggle",this.toggleRow.bind(this)),this.registerComponentFunction("row","getTreeParent",this.getTreeParent.bind(this)),this.registerComponentFunction("row","getTreeChildren",this.getRowChildren.bind(this)),this.registerComponentFunction("row","addTreeChild",this.addTreeChildRow.bind(this)),this.registerComponentFunction("row","isTreeExpanded",this.isRowExpanded.bind(this))}initialize(){if(this.table.options.dataTree){var e=null,t=this.table.options;switch(this.field=t.dataTreeChildField,this.indent=t.dataTreeChildIndent,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),t.dataTreeBranchElement?t.dataTreeBranchElement===!0?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):typeof t.dataTreeBranchElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=t.dataTreeBranchElement:(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch-empty")),t.dataTreeCollapseElement?typeof t.dataTreeCollapseElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=t.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),t.dataTreeExpandElement?typeof t.dataTreeExpandElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=t.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),typeof t.dataTreeStartExpanded){case"boolean":this.startOpen=function(i,n){return t.dataTreeStartExpanded};break;case"function":this.startOpen=t.dataTreeStartExpanded;break;default:this.startOpen=function(i,n){return t.dataTreeStartExpanded[n]};break}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleting",this.rowDeleting.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){var t;e&&(t=this.table.rowManager.getRows(),t.forEach(i=>{this.reinitializeRowChildren(i)}))}initializeElementField(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||(e?e.field:!1)}getRowChildren(e){return this.getTreeChildren(e,!0)}columnMoving(){var e=[];return this.table.rowManager.rows.forEach(t=>{e=e.concat(this.getTreeChildren(t,!1,!0))}),e}rowDataChanged(e,t,i){this.redrawNeeded(i)&&(this.initializeRow(e),t&&(this.layoutRow(e),this.refreshData(!0)))}cellValueChanged(e){var t=e.column.getField();t===this.elementField&&this.layoutRow(e.row)}initializeRow(e){var t=e.getData()[this.field],i=Array.isArray(t),n=i||!i&&typeof t=="object"&&t!==null;!n&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!n&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:n?e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0):!1,controlEl:e.modules.dataTree&&n?e.modules.dataTree.controlEl:!1,branchEl:e.modules.dataTree&&n?e.modules.dataTree.branchEl:!1,parent:e.modules.dataTree?e.modules.dataTree.parent:!1,children:n}}reinitializeRowChildren(e){var t=this.getTreeChildren(e,!1,!0);t.forEach(function(i){i.reinitialize(!0)})}layoutRow(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],i=t.getElement(),n=e.modules.dataTree;n.branchEl&&(n.branchEl.parentNode&&n.branchEl.parentNode.removeChild(n.branchEl),n.branchEl=!1),n.controlEl&&(n.controlEl.parentNode&&n.controlEl.parentNode.removeChild(n.controlEl),n.controlEl=!1),this.generateControlElement(e,i),e.getElement().classList.add("tabulator-tree-level-"+n.index),n.index&&(this.branchEl?(n.branchEl=this.branchEl.cloneNode(!0),i.insertBefore(n.branchEl,i.firstChild),this.table.rtl?n.branchEl.style.marginRight=(n.branchEl.offsetWidth+n.branchEl.style.marginLeft)*(n.index-1)+n.index*this.indent+"px":n.branchEl.style.marginLeft=(n.branchEl.offsetWidth+n.branchEl.style.marginRight)*(n.index-1)+n.index*this.indent+"px"):this.table.rtl?i.style.paddingRight=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-right"))+n.index*this.indent+"px":i.style.paddingLeft=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-left"))+n.index*this.indent+"px")}generateControlElement(e,t){var i=e.modules.dataTree,n=i.controlEl;t=t||e.getCells()[0].getElement(),i.children!==!1&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",r=>{r.stopPropagation(),this.collapseRow(e)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",r=>{r.stopPropagation(),this.expandRow(e)})),i.controlEl.addEventListener("mousedown",r=>{r.stopPropagation()}),n&&n.parentNode===t?n.parentNode.replaceChild(i.controlEl,n):t.insertBefore(i.controlEl,t.firstChild))}getRows(e){var t=[];return e.forEach((i,n)=>{var r,a;t.push(i),i instanceof Qe&&(i.create(),r=i.modules.dataTree,!r.index&&r.children!==!1&&(a=this.getChildren(i,!1,!0),a.forEach(o=>{o.create(),t.push(o)})))}),t}getChildren(e,t,i){var n=e.modules.dataTree,r=[],a=[];return n.children!==!1&&(n.open||t)&&(Array.isArray(n.children)||(n.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?r=this.table.modules.filter.filter(n.children):r=n.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(r,i),r.forEach(o=>{a.push(o);var l=this.getChildren(o,!1,!0);l.forEach(u=>{a.push(u)})})),a}generateChildren(e){var t=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(n=>{var r=new Qe(n||{},this.table.rowManager);r.create(),r.modules.dataTree.index=e.modules.dataTree.index+1,r.modules.dataTree.parent=e,r.modules.dataTree.children&&(r.modules.dataTree.open=this.startOpen(r.getComponent(),r.modules.dataTree.index)),t.push(r)}),t}expandRow(e,t){var i=e.modules.dataTree;i.children!==!1&&(i.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}collapseRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}toggleRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open?this.collapseRow(e):this.expandRow(e))}isRowExpanded(e){return e.modules.dataTree.open}getTreeParent(e){return e.modules.dataTree.parent?e.modules.dataTree.parent.getComponent():!1}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}getFilteredTreeChildren(e){var t=e.modules.dataTree,i=[],n;return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?n=this.table.modules.filter.filter(t.children):n=t.children,n.forEach(r=>{r instanceof Qe&&i.push(r)})),i}rowDeleting(e){var t=e.modules.dataTree;t&&t.children&&Array.isArray(t.children)&&t.children.forEach(i=>{i instanceof Qe&&i.wipe()})}rowDelete(e){var t=e.modules.dataTree.parent,i;t&&(i=this.findChildIndex(e,t),i!==!1&&t.data[this.field].splice(i,1),t.data[this.field].length||delete t.data[this.field],this.initializeRow(t),this.layoutRow(t)),this.refreshData(!0)}addTreeChildRow(e,t,i,n){var r=!1;typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),typeof n<"u"&&(r=this.findChildIndex(n,e),r!==!1&&e.data[this.field].splice(i?r:r+1,0,t)),r===!1&&(i?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}findChildIndex(e,t){var i=!1;return typeof e=="object"?e instanceof Qe?i=e.data:e instanceof Ls?i=e._getSelf().data:typeof HTMLElement<"u"&&e instanceof HTMLElement?t.modules.dataTree&&(i=t.modules.dataTree.children.find(n=>n instanceof Qe?n.element===e:!1),i&&(i=i.data)):e===null&&(i=!1):typeof e>"u"?i=!1:i=t.data[this.field].find(n=>n.data[this.table.options.index]==e),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),i==-1&&(i=!1)),i}getTreeChildren(e,t,i){var n=e.modules.dataTree,r=[];return n&&n.children&&(Array.isArray(n.children)||(n.children=this.generateChildren(e)),n.children.forEach(a=>{a instanceof Qe&&(r.push(t?a.getComponent():a),i&&this.getTreeChildren(a,t,i).forEach(o=>{r.push(o)}))})),r}getChildField(){return this.field}redrawNeeded(e){return(this.field?typeof e[this.field]<"u":!1)||(this.elementField?typeof e[this.elementField]<"u":!1)}}function $c(s,e={},t){var i=e.delimiter?e.delimiter:",",n=[],r=[];s.forEach(a=>{var o=[];switch(a.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":a.columns.forEach((l,u)=>{l&&l.depth===1&&(r[u]=typeof l.value>"u"||l.value===null?"":'"'+String(l.value).split('"').join('""')+'"')});break;case"row":a.columns.forEach(l=>{if(l){switch(typeof l.value){case"object":l.value=l.value!==null?JSON.stringify(l.value):"";break;case"undefined":l.value="";break}o.push('"'+String(l.value).split('"').join('""')+'"')}}),n.push(o.join(i));break}}),r.length&&n.unshift(r.join(i)),n=n.join(`
29
+ `),e.bom&&(n="\uFEFF"+n),t(n,"text/csv")}function Uc(s,e,t){var i=[];s.forEach(n=>{var r={};switch(n.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":n.columns.forEach(a=>{a&&(r[a.component.getTitleDownload()||a.component.getField()]=a.value)}),i.push(r);break}}),i=JSON.stringify(i,null," "),t(i,"application/json")}function Kc(s,e={},t){var i=[],n=[],r={},a=e.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},o=e.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},l=e.jsPDF||{},u=e.title?e.title:"",h,m;l.orientation||(l.orientation=e.orientation||"landscape"),l.unit||(l.unit="pt"),s.forEach(C=>{switch(C.type){case"header":i.push(v(C));break;case"group":n.push(v(C,a));break;case"calc":n.push(v(C,o));break;case"row":n.push(v(C));break}});function v(C,F){var x=[];return C.columns.forEach(R=>{var M;if(R){switch(typeof R.value){case"object":R.value=R.value!==null?JSON.stringify(R.value):"";break;case"undefined":R.value="";break}M={content:R.value,colSpan:R.width,rowSpan:R.height},F&&(M.styles=F),x.push(M)}}),x}h=this.dependencyRegistry.lookup("jspdf","jsPDF"),m=new h(l),e.autoTable&&(typeof e.autoTable=="function"?r=e.autoTable(m)||{}:r=e.autoTable),u&&(r.didDrawPage=function(C){m.text(u,40,30)}),r.head=i,r.body=n,m.autoTable(r),e.documentProcessing&&e.documentProcessing(m),t(m.output("arraybuffer"),"application/pdf")}function qc(s,e,t){var i=this,n=e.sheetName||"Sheet1",r=this.dependencyRegistry.lookup("XLSX"),a=r.utils.book_new(),o=new Je(this),l="compress"in e?e.compress:!0,u=e.writeOptions||{bookType:"xlsx",bookSST:!0,compression:l},h;u.type="binary",a.SheetNames=[],a.Sheets={};function m(){var F=[],x=[],R={},M={s:{c:0,r:0},e:{c:s[0]?s[0].columns.reduce((k,_)=>k+(_&&_.width?_.width:1),0):0,r:s.length}};return s.forEach((k,_)=>{var p=[];k.columns.forEach(function(w,c){w?(p.push(!(w.value instanceof Date)&&typeof w.value=="object"?JSON.stringify(w.value):w.value),(w.width>1||w.height>-1)&&(w.height>1||w.width>1)&&x.push({s:{r:_,c},e:{r:_+w.height-1,c:c+w.width-1}})):p.push("")}),F.push(p)}),r.utils.sheet_add_aoa(R,F),R["!ref"]=r.utils.encode_range(M),x.length&&(R["!merges"]=x),R}if(e.sheetOnly){t(m());return}if(e.sheets)for(var v in e.sheets)e.sheets[v]===!0?(a.SheetNames.push(v),a.Sheets[v]=m()):(a.SheetNames.push(v),o.commsSend(e.sheets[v],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:i.active,intercept:function(F){a.Sheets[v]=F}}));else a.SheetNames.push(n),a.Sheets[n]=m();e.documentProcessing&&(a=e.documentProcessing(a));function C(F){for(var x=new ArrayBuffer(F.length),R=new Uint8Array(x),M=0;M!=F.length;++M)R[M]=F.charCodeAt(M)&255;return x}h=r.write(a,u),t(C(h),"application/octet-stream")}function Jc(s,e,t){this.modExists("export",!0)&&t(this.modules.export.generateHTMLTable(s),"text/html")}function Xc(s,e,t){const i=[];s.forEach(n=>{const r={};switch(n.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":n.columns.forEach(a=>{a&&(r[a.component.getTitleDownload()||a.component.getField()]=a.value)}),i.push(JSON.stringify(r));break}}),t(i.join(`
30
+ `),"application/x-ndjson")}var Zc={csv:$c,json:Uc,jsonLines:Xc,pdf:Kc,xlsx:qc,html:Jc};class Ps extends ke{static moduleName="download";static downloaders=Zc;constructor(e){super(e),this.registerTableOption("downloadEncoder",function(t,i){return new Blob([t],{type:i})}),this.registerTableOption("downloadConfig",{}),this.registerTableOption("downloadRowRange","active"),this.registerColumnOption("download"),this.registerColumnOption("titleDownload")}initialize(){this.deprecatedOptionsCheck(),this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}deprecatedOptionsCheck(){}downloadToTab(e,t,i,n){this.download(e,t,i,n,!0)}download(e,t,i,n,r){var a=!1;function o(u,h){r?r===!0?this.triggerDownload(u,h,e,t,!0):r(u):this.triggerDownload(u,h,e,t)}if(typeof e=="function"?a=e:Ps.downloaders[e]?a=Ps.downloaders[e]:console.warn("Download Error - No such download type found: ",e),a){var l=this.generateExportList(n);a.call(this.table,l,i||{},o.bind(this))}}generateExportList(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),i=this.table.options.groupHeaderDownload;return i&&!Array.isArray(i)&&(i=[i]),t.forEach(n=>{var r;n.type==="group"&&(r=n.columns[0],i&&i[n.indent]&&(r.value=i[n.indent](r.value,n.component._group.getRowCount(),n.component._group.getData(),n.component)))}),t}triggerDownload(e,t,i,n,r){var a=document.createElement("a"),o=this.table.options.downloadEncoder(e,t);o&&(r?window.open(window.URL.createObjectURL(o)):(n=n||"Tabulator."+(typeof i=="function"?"txt":i),navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(o,n):(a.setAttribute("href",window.URL.createObjectURL(o)),a.setAttribute("download",n),a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a))),this.dispatchExternal("downloadComplete"))}commsReceived(e,t,i){switch(t){case"intercept":this.download(i.type,"",i.options,i.active,i.intercept);break}}}function Fs(s,e){var t=e.mask,i=typeof e.maskLetterChar<"u"?e.maskLetterChar:"A",n=typeof e.maskNumberChar<"u"?e.maskNumberChar:"9",r=typeof e.maskWildcardChar<"u"?e.maskWildcardChar:"*";function a(o){var l=t[o];typeof l<"u"&&l!==r&&l!==i&&l!==n&&(s.value=s.value+""+l,a(o+1))}s.addEventListener("keydown",o=>{var l=s.value.length,u=o.key;if(o.keyCode>46&&!o.ctrlKey&&!o.metaKey){if(l>=t.length)return o.preventDefault(),o.stopPropagation(),!1;switch(t[l]){case i:if(u.toUpperCase()==u.toLowerCase())return o.preventDefault(),o.stopPropagation(),!1;break;case n:if(isNaN(u))return o.preventDefault(),o.stopPropagation(),!1;break;case r:break;default:if(u!==t[l])return o.preventDefault(),o.stopPropagation(),!1}}}),s.addEventListener("keyup",o=>{o.keyCode>46&&e.maskAutoFill&&a(s.value.length)}),s.placeholder||(s.placeholder=t),e.maskAutoFill&&a(s.value.length)}function Qc(s,e,t,i,n){var r=s.getValue(),a=document.createElement("input");if(a.setAttribute("type",n.search?"search":"text"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let l in n.elementAttributes)l.charAt(0)=="+"?(l=l.slice(1),a.setAttribute(l,a.getAttribute(l)+n.elementAttributes["+"+l])):a.setAttribute(l,n.elementAttributes[l]);a.value=typeof r<"u"?r:"",e(function(){s.getType()==="cell"&&(a.focus({preventScroll:!0}),a.style.height="100%",n.selectContents&&a.select())});function o(l){(r===null||typeof r>"u")&&a.value!==""||a.value!==r?t(a.value)&&(r=a.value):i()}return a.addEventListener("change",o),a.addEventListener("blur",o),a.addEventListener("keydown",function(l){switch(l.keyCode){case 13:o();break;case 27:i();break;case 35:case 36:l.stopPropagation();break}}),n.mask&&Fs(a,n),a}function ef(s,e,t,i,n){var r=s.getValue(),a=n.verticalNavigation||"hybrid",o=String(r!==null&&typeof r<"u"?r:""),l=document.createElement("textarea"),u=0;if(l.style.display="block",l.style.padding="2px",l.style.height="100%",l.style.width="100%",l.style.boxSizing="border-box",l.style.whiteSpace="pre-wrap",l.style.resize="none",n.elementAttributes&&typeof n.elementAttributes=="object")for(let m in n.elementAttributes)m.charAt(0)=="+"?(m=m.slice(1),l.setAttribute(m,l.getAttribute(m)+n.elementAttributes["+"+m])):l.setAttribute(m,n.elementAttributes[m]);l.value=o,e(function(){s.getType()==="cell"&&(l.focus({preventScroll:!0}),l.style.height="100%",l.scrollHeight,l.style.height=l.scrollHeight+"px",s.getRow().normalizeHeight(),n.selectContents&&l.select())});function h(m){(r===null||typeof r>"u")&&l.value!==""||l.value!==r?(t(l.value)&&(r=l.value),setTimeout(function(){s.getRow().normalizeHeight()},300)):i()}return l.addEventListener("change",h),l.addEventListener("blur",h),l.addEventListener("keyup",function(){l.style.height="";var m=l.scrollHeight;l.style.height=m+"px",m!=u&&(u=m,s.getRow().normalizeHeight())}),l.addEventListener("keydown",function(m){switch(m.keyCode){case 13:m.shiftKey&&n.shiftEnterSubmit&&h();break;case 27:i();break;case 38:(a=="editor"||a=="hybrid"&&l.selectionStart)&&(m.stopImmediatePropagation(),m.stopPropagation());break;case 40:(a=="editor"||a=="hybrid"&&l.selectionStart!==l.value.length)&&(m.stopImmediatePropagation(),m.stopPropagation());break;case 35:case 36:m.stopPropagation();break}}),n.mask&&Fs(l,n),l}function tf(s,e,t,i,n){var r=s.getValue(),a=n.verticalNavigation||"editor",o=document.createElement("input");if(o.setAttribute("type","number"),typeof n.max<"u"&&o.setAttribute("max",n.max),typeof n.min<"u"&&o.setAttribute("min",n.min),typeof n.step<"u"&&o.setAttribute("step",n.step),o.style.padding="4px",o.style.width="100%",o.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let h in n.elementAttributes)h.charAt(0)=="+"?(h=h.slice(1),o.setAttribute(h,o.getAttribute(h)+n.elementAttributes["+"+h])):o.setAttribute(h,n.elementAttributes[h]);o.value=r;var l=function(h){u()};e(function(){s.getType()==="cell"&&(o.removeEventListener("blur",l),o.focus({preventScroll:!0}),o.style.height="100%",o.addEventListener("blur",l),n.selectContents&&o.select())});function u(){var h=o.value;!isNaN(h)&&h!==""&&(h=Number(h)),h!==r?t(h)&&(r=h):i()}return o.addEventListener("keydown",function(h){switch(h.keyCode){case 13:u();break;case 27:i();break;case 38:case 40:a=="editor"&&(h.stopImmediatePropagation(),h.stopPropagation());break;case 35:case 36:h.stopPropagation();break}}),n.mask&&Fs(o,n),o}function sf(s,e,t,i,n){var r=s.getValue(),a=document.createElement("input");if(a.setAttribute("type","range"),typeof n.max<"u"&&a.setAttribute("max",n.max),typeof n.min<"u"&&a.setAttribute("min",n.min),typeof n.step<"u"&&a.setAttribute("step",n.step),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let l in n.elementAttributes)l.charAt(0)=="+"?(l=l.slice(1),a.setAttribute(l,a.getAttribute(l)+n.elementAttributes["+"+l])):a.setAttribute(l,n.elementAttributes[l]);a.value=r,e(function(){s.getType()==="cell"&&(a.focus({preventScroll:!0}),a.style.height="100%")});function o(){var l=a.value;!isNaN(l)&&l!==""&&(l=Number(l)),l!=r?t(l)&&(r=l):i()}return a.addEventListener("blur",function(l){o()}),a.addEventListener("keydown",function(l){switch(l.keyCode){case 13:o();break;case 27:i();break}}),a}function nf(s,e,t,i,n){var r=n.format,a=n.verticalNavigation||"editor",o=r?window.DateTime||luxon.DateTime:null,l=s.getValue(),u=document.createElement("input");function h(v){var C;return o.isDateTime(v)?C=v:r==="iso"?C=o.fromISO(String(v)):C=o.fromFormat(String(v),r),C.toFormat("yyyy-MM-dd")}if(u.type="date",u.style.padding="4px",u.style.width="100%",u.style.boxSizing="border-box",n.max&&u.setAttribute("max",r?h(n.max):n.max),n.min&&u.setAttribute("min",r?h(n.min):n.min),n.elementAttributes&&typeof n.elementAttributes=="object")for(let v in n.elementAttributes)v.charAt(0)=="+"?(v=v.slice(1),u.setAttribute(v,u.getAttribute(v)+n.elementAttributes["+"+v])):u.setAttribute(v,n.elementAttributes[v]);l=typeof l<"u"?l:"",r&&(o?l=h(l):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),u.value=l,e(function(){s.getType()==="cell"&&(u.focus({preventScroll:!0}),u.style.height="100%",n.selectContents&&u.select())});function m(){var v=u.value,C;if((l===null||typeof l>"u")&&v!==""||v!==l){if(v&&r)switch(C=o.fromFormat(String(v),"yyyy-MM-dd"),r){case!0:v=C;break;case"iso":v=C.toISO();break;default:v=C.toFormat(r)}t(v)&&(l=u.value)}else i()}return u.addEventListener("blur",function(v){(v.relatedTarget||v.rangeParent||v.explicitOriginalTarget!==u)&&m()}),u.addEventListener("keydown",function(v){switch(v.keyCode){case 13:m();break;case 27:i();break;case 35:case 36:v.stopPropagation();break;case 38:case 40:a=="editor"&&(v.stopImmediatePropagation(),v.stopPropagation());break}}),u}function rf(s,e,t,i,n){var r=n.format,a=n.verticalNavigation||"editor",o=r?window.DateTime||luxon.DateTime:null,l,u=s.getValue(),h=document.createElement("input");if(h.type="time",h.style.padding="4px",h.style.width="100%",h.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let v in n.elementAttributes)v.charAt(0)=="+"?(v=v.slice(1),h.setAttribute(v,h.getAttribute(v)+n.elementAttributes["+"+v])):h.setAttribute(v,n.elementAttributes[v]);u=typeof u<"u"?u:"",r&&(o?(o.isDateTime(u)?l=u:r==="iso"?l=o.fromISO(String(u)):l=o.fromFormat(String(u),r),u=l.toFormat("HH:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),h.value=u,e(function(){s.getType()=="cell"&&(h.focus({preventScroll:!0}),h.style.height="100%",n.selectContents&&h.select())});function m(){var v=h.value,C;if((u===null||typeof u>"u")&&v!==""||v!==u){if(v&&r)switch(C=o.fromFormat(String(v),"hh:mm"),r){case!0:v=C;break;case"iso":v=C.toISO();break;default:v=C.toFormat(r)}t(v)&&(u=h.value)}else i()}return h.addEventListener("blur",function(v){(v.relatedTarget||v.rangeParent||v.explicitOriginalTarget!==h)&&m()}),h.addEventListener("keydown",function(v){switch(v.keyCode){case 13:m();break;case 27:i();break;case 35:case 36:v.stopPropagation();break;case 38:case 40:a=="editor"&&(v.stopImmediatePropagation(),v.stopPropagation());break}}),h}function af(s,e,t,i,n){var r=n.format,a=n.verticalNavigation||"editor",o=r?this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"):null,l,u=s.getValue(),h=document.createElement("input");if(h.type="datetime-local",h.style.padding="4px",h.style.width="100%",h.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let v in n.elementAttributes)v.charAt(0)=="+"?(v=v.slice(1),h.setAttribute(v,h.getAttribute(v)+n.elementAttributes["+"+v])):h.setAttribute(v,n.elementAttributes[v]);u=typeof u<"u"?u:"",r&&(o?(o.isDateTime(u)?l=u:r==="iso"?l=o.fromISO(String(u)):l=o.fromFormat(String(u),r),u=l.toFormat("yyyy-MM-dd")+"T"+l.toFormat("HH:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),h.value=u,e(function(){s.getType()==="cell"&&(h.focus({preventScroll:!0}),h.style.height="100%",n.selectContents&&h.select())});function m(){var v=h.value,C;if((u===null||typeof u>"u")&&v!==""||v!==u){if(v&&r)switch(C=o.fromISO(String(v)),r){case!0:v=C;break;case"iso":v=C.toISO();break;default:v=C.toFormat(r)}t(v)&&(u=h.value)}else i()}return h.addEventListener("blur",function(v){(v.relatedTarget||v.rangeParent||v.explicitOriginalTarget!==h)&&m()}),h.addEventListener("keydown",function(v){switch(v.keyCode){case 13:m();break;case 27:i();break;case 35:case 36:v.stopPropagation();break;case 38:case 40:a=="editor"&&(v.stopImmediatePropagation(),v.stopPropagation());break}}),h}let of=class{constructor(e,t,i,n,r,a){this.edit=e,this.table=e.table,this.cell=t,this.params=this._initializeParams(a),this.data=[],this.displayItems=[],this.currentItems=[],this.focusedItem=null,this.input=this._createInputElement(),this.listEl=this._createListElement(),this.initialValues=null,this.isFilter=t.getType()==="header",this.filterTimeout=null,this.filtered=!1,this.typing=!1,this.values=[],this.popup=null,this.listIteration=0,this.lastAction="",this.filterTerm="",this.blurable=!0,this.actions={success:n,cancel:r},this._deprecatedOptionsCheck(),this._initializeValue(),i(this._onRendered.bind(this))}_deprecatedOptionsCheck(){}_initializeValue(){var e=this.cell.getValue();typeof e>"u"&&typeof this.params.defaultValue<"u"&&(e=this.params.defaultValue),this.initialValues=this.params.multiselect?e:[e],this.isFilter&&(this.input.value=this.initialValues?this.initialValues.join(","):"",this.headerFilterInitialListGen())}_onRendered(){var e=this.cell.getElement();function t(i){i.stopPropagation()}this.isFilter||(this.input.style.height="100%",this.input.focus({preventScroll:!0})),e.addEventListener("click",t),setTimeout(()=>{e.removeEventListener("click",t)},1e3),this.input.addEventListener("mousedown",this._preventPopupBlur.bind(this))}_createListElement(){var e=document.createElement("div");return e.classList.add("tabulator-edit-list"),e.addEventListener("mousedown",this._preventBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e}_setListWidth(){var e=this.isFilter?this.input:this.cell.getElement();this.listEl.style.minWidth=e.offsetWidth+"px",this.params.maxWidth&&(this.params.maxWidth===!0?this.listEl.style.maxWidth=e.offsetWidth+"px":typeof this.params.maxWidth=="number"?this.listEl.style.maxWidth=this.params.maxWidth+"px":this.listEl.style.maxWidth=this.params.maxWidth)}_createInputElement(){var e=this.params.elementAttributes,t=document.createElement("input");if(t.setAttribute("type",this.params.clearable?"search":"text"),t.style.padding="4px",t.style.width="100%",t.style.boxSizing="border-box",this.params.autocomplete||(t.style.cursor="default",t.style.caretColor="transparent"),e&&typeof e=="object")for(let i in e)i.charAt(0)=="+"?(i=i.slice(1),t.setAttribute(i,t.getAttribute(i)+e["+"+i])):t.setAttribute(i,e[i]);return this.params.mask&&Fs(t,this.params),this._bindInputEvents(t),t}_initializeParams(e){var t=["values","valuesURL","valuesLookup"],i;return e=Object.assign({},e),e.verticalNavigation=e.verticalNavigation||"editor",e.placeholderLoading=typeof e.placeholderLoading>"u"?"Searching ...":e.placeholderLoading,e.placeholderEmpty=typeof e.placeholderEmpty>"u"?"No Results Found":e.placeholderEmpty,e.filterDelay=typeof e.filterDelay>"u"?300:e.filterDelay,e.emptyValue=Object.keys(e).includes("emptyValue")?e.emptyValue:"",i=Object.keys(e).filter(n=>t.includes(n)).length,i?i>1&&console.warn("list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor"):console.warn("list editor config error - either the values, valuesURL, or valuesLookup option must be set"),e.autocomplete?e.multiselect&&(e.multiselect=!1,console.warn("list editor config error - multiselect option is not available when autocomplete is enabled")):(e.freetext&&(e.freetext=!1,console.warn("list editor config error - freetext option is only available when autocomplete is enabled")),e.filterFunc&&(e.filterFunc=!1,console.warn("list editor config error - filterFunc option is only available when autocomplete is enabled")),e.filterRemote&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option is only available when autocomplete is enabled")),e.mask&&(e.mask=!1,console.warn("list editor config error - mask option is only available when autocomplete is enabled")),e.allowEmpty&&(e.allowEmpty=!1,console.warn("list editor config error - allowEmpty option is only available when autocomplete is enabled")),e.listOnEmpty&&(e.listOnEmpty=!1,console.warn("list editor config error - listOnEmpty option is only available when autocomplete is enabled"))),e.filterRemote&&!(typeof e.valuesLookup=="function"||e.valuesURL)&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option should only be used when values list is populated from a remote source")),e}_bindInputEvents(e){e.addEventListener("focus",this._inputFocus.bind(this)),e.addEventListener("click",this._inputClick.bind(this)),e.addEventListener("blur",this._inputBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e.addEventListener("search",this._inputSearch.bind(this)),this.params.autocomplete&&e.addEventListener("keyup",this._inputKeyUp.bind(this))}_inputFocus(e){this.rebuildOptionsList()}_filter(){this.params.filterRemote?(clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout(()=>{this.rebuildOptionsList()},this.params.filterDelay)):this._filterList()}_inputClick(e){e.stopPropagation()}_inputBlur(e){this.blurable&&(this.popup?this.popup.hide():this._resolveValue(!0))}_inputSearch(){this._clearChoices()}_inputKeyDown(e){switch(e.keyCode){case 38:this._keyUp(e);break;case 40:this._keyDown(e);break;case 37:case 39:this._keySide(e);break;case 13:this._keyEnter();break;case 27:this._keyEsc();break;case 36:case 35:this._keyHomeEnd(e);break;case 9:this._keyTab(e);break;default:this._keySelectLetter(e)}}_inputKeyUp(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:this._keyAutoCompLetter(e)}}_preventPopupBlur(){this.popup&&this.popup.blockHide(),setTimeout(()=>{this.popup&&this.popup.restoreHide()},10)}_preventBlur(){this.blurable=!1,setTimeout(()=>{this.blurable=!0},10)}_keyTab(e){this.params.autocomplete&&this.lastAction==="typing"?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem,!0)}_keyUp(e){var t=this.displayItems.indexOf(this.focusedItem);(this.params.verticalNavigation=="editor"||this.params.verticalNavigation=="hybrid"&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&this._focusItem(this.displayItems[t-1]))}_keyDown(e){var t=this.displayItems.indexOf(this.focusedItem);(this.params.verticalNavigation=="editor"||this.params.verticalNavigation=="hybrid"&&t<this.displayItems.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<this.displayItems.length-1&&(t==-1?this._focusItem(this.displayItems[0]):this._focusItem(this.displayItems[t+1])))}_keySide(e){this.params.autocomplete||(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())}_keyEnter(e){this.params.autocomplete&&this.lastAction==="typing"?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem)}_keyEsc(e){this._cancel()}_keyHomeEnd(e){this.params.autocomplete&&e.stopImmediatePropagation()}_keySelectLetter(e){this.params.autocomplete||(e.preventDefault(),e.keyCode>=38&&e.keyCode<=90&&this._scrollToValue(e.keyCode))}_keyAutoCompLetter(e){this._filter(),this.lastAction="typing",this.typing=!0}_scrollToValue(e){clearTimeout(this.filterTimeout);var t=String.fromCharCode(e).toLowerCase();this.filterTerm+=t.toLowerCase();var i=this.displayItems.find(n=>typeof n.label<"u"&&n.label.toLowerCase().startsWith(this.filterTerm));i&&this._focusItem(i),this.filterTimeout=setTimeout(()=>{this.filterTerm=""},800)}_focusItem(e){this.lastAction="focus",this.focusedItem&&this.focusedItem.element&&this.focusedItem.element.classList.remove("focused"),this.focusedItem=e,e&&e.element&&(e.element.classList.add("focused"),e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"}))}headerFilterInitialListGen(){this._generateOptions(!0)}rebuildOptionsList(){this._generateOptions().then(this._sortOptions.bind(this)).then(this._buildList.bind(this)).then(this._showList.bind(this)).catch(e=>{Number.isInteger(e)||console.error("List generation error",e)})}_filterList(){this._buildList(this._filterOptions()),this._showList()}_generateOptions(e){var t=[],i=++this.listIteration;return this.filtered=!1,this.params.values?t=this.params.values:this.params.valuesURL?t=this._ajaxRequest(this.params.valuesURL,this.input.value):typeof this.params.valuesLookup=="function"?t=this.params.valuesLookup(this.cell,this.input.value):this.params.valuesLookup&&(t=this._uniqueColumnValues(this.params.valuesLookupField)),t instanceof Promise?(e||this._addPlaceholder(this.params.placeholderLoading),t.then().then(n=>this.listIteration===i?this._parseList(n):Promise.reject(i))):Promise.resolve(this._parseList(t))}_addPlaceholder(e){var t=document.createElement("div");typeof e=="function"&&(e=e(this.cell.getComponent(),this.listEl)),e&&(this._clearList(),e instanceof HTMLElement?t=e:(t.classList.add("tabulator-edit-list-placeholder"),t.innerHTML=e),this.listEl.appendChild(t),this._showList())}_ajaxRequest(e,t){var i=this.params.filterRemote?{term:t}:{};return e=ra(e,{},i),fetch(e).then(n=>n.ok?n.json().catch(r=>(console.warn("List Ajax Load Error - Invalid JSON returned",r),Promise.reject(r))):(console.error("List Ajax Load Error - Connection Error: "+n.status,n.statusText),Promise.reject(n))).catch(n=>(console.error("List Ajax Load Error - Connection Error: ",n),Promise.reject(n)))}_uniqueColumnValues(e){var t={},i=this.table.getData(this.params.valuesLookup),n;return e?n=this.table.columnManager.getColumnByField(e):n=this.cell.getColumn()._getSelf(),n?i.forEach(r=>{var a=n.getFieldValue(r);this._emptyValueCheck(a)||(this.params.multiselect&&Array.isArray(a)?a.forEach(o=>{this._emptyValueCheck(o)||(t[o]=!0)}):t[a]=!0)}):(console.warn("unable to find matching column to create select lookup list:",e),t=[]),Object.keys(t)}_emptyValueCheck(e){return e===null||typeof e>"u"||e===""}_parseList(e){var t=[];return Array.isArray(e)||(e=Object.entries(e).map(([i,n])=>({label:n,value:i}))),e.forEach(i=>{typeof i!="object"&&(i={label:i,value:i}),this._parseListItem(i,t,0)}),!this.currentItems.length&&this.params.freetext&&(this.input.value=this.initialValues,this.typing=!0,this.lastAction="typing"),this.data=t,t}_parseListItem(e,t,i){var n={};e.options?n=this._parseListGroup(e,i+1):(n={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,selected:!1,visible:!0,level:i,original:e},this.initialValues&&this.initialValues.indexOf(e.value)>-1&&this._chooseItem(n,!0)),t.push(n)}_parseListGroup(e,t){var i={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,visible:!0,level:t,options:[],original:e};return e.options.forEach(n=>{this._parseListItem(n,i.options,t)}),i}_sortOptions(e){var t;return this.params.sort&&(t=typeof this.params.sort=="function"?this.params.sort:this._defaultSortFunction.bind(this),this._sortGroup(t,e)),e}_sortGroup(e,t){t.sort((i,n)=>e(i.label,n.label,i.value,n.value,i.original,n.original)),t.forEach(i=>{i.group&&this._sortGroup(e,i.options)})}_defaultSortFunction(e,t){var i,n,r,a,o=0,l,u=/(\d+)|(\D+)/g,h=/\d/,m=0;if(this.params.sort==="desc"&&([e,t]=[t,e]),!e&&e!==0)m=!t&&t!==0?0:-1;else if(!t&&t!==0)m=1;else{if(isFinite(e)&&isFinite(t))return e-t;if(i=String(e).toLowerCase(),n=String(t).toLowerCase(),i===n)return 0;if(!(h.test(i)&&h.test(n)))return i>n?1:-1;for(i=i.match(u),n=n.match(u),l=i.length>n.length?n.length:i.length;o<l;)if(r=i[o],a=n[o++],r!==a)return isFinite(r)&&isFinite(a)?(r.charAt(0)==="0"&&(r="."+r),a.charAt(0)==="0"&&(a="."+a),r-a):r>a?1:-1;return i.length>n.length}return m}_filterOptions(){var e=this.params.filterFunc||this._defaultFilterFunc,t=this.input.value;return t?(this.filtered=!0,this.data.forEach(i=>{this._filterItem(e,t,i)})):this.filtered=!1,this.data}_filterItem(e,t,i){var n=!1;return i.group?(i.options.forEach(r=>{this._filterItem(e,t,r)&&(n=!0)}),i.visible=n):i.visible=e(t,i.label,i.value,i.original),i.visible}_defaultFilterFunc(e,t,i,n){return e=String(e).toLowerCase(),t!==null&&typeof t<"u"&&(String(t).toLowerCase().indexOf(e)>-1||String(i).toLowerCase().indexOf(e)>-1)}_clearList(){for(;this.listEl.firstChild;)this.listEl.removeChild(this.listEl.firstChild);this.displayItems=[]}_buildList(e){this._clearList(),e.forEach(t=>{this._buildItem(t)}),this.displayItems.length||this._addPlaceholder(this.params.placeholderEmpty)}_buildItem(e){var t=e.element,i;if(!this.filtered||e.visible){if(!t){if(t=document.createElement("div"),t.tabIndex=0,i=this.params.itemFormatter?this.params.itemFormatter(e.label,e.value,e.original,t):e.label,i instanceof HTMLElement?t.appendChild(i):t.innerHTML=i,e.group?t.classList.add("tabulator-edit-list-group"):t.classList.add("tabulator-edit-list-item"),t.classList.add("tabulator-edit-list-group-level-"+e.level),e.elementAttributes&&typeof e.elementAttributes=="object")for(let n in e.elementAttributes)n.charAt(0)=="+"?(n=n.slice(1),t.setAttribute(n,this.input.getAttribute(n)+e.elementAttributes["+"+n])):t.setAttribute(n,e.elementAttributes[n]);e.group?t.addEventListener("click",this._groupClick.bind(this,e)):t.addEventListener("click",this._itemClick.bind(this,e)),t.addEventListener("mousedown",this._preventBlur.bind(this)),e.element=t}this._styleItem(e),this.listEl.appendChild(t),e.group?e.options.forEach(n=>{this._buildItem(n)}):this.displayItems.push(e)}}_showList(){var e=this.popup&&this.popup.isVisible();if(this.input.parentNode){if(this.params.autocomplete&&this.input.value===""&&!this.params.listOnEmpty){this.popup&&this.popup.hide(!0);return}this._setListWidth(),this.popup||(this.popup=this.edit.popup(this.listEl)),this.popup.show(this.cell.getElement(),"bottom"),e||setTimeout(()=>{this.popup.hideOnBlur(this._resolveValue.bind(this,!0))},10)}}_styleItem(e){e&&e.element&&(e.selected?e.element.classList.add("active"):e.element.classList.remove("active"))}_itemClick(e,t){t.stopPropagation(),this._chooseItem(e)}_groupClick(e,t){t.stopPropagation()}_cancel(){this.popup.hide(!0),this.actions.cancel()}_clearChoices(){this.typing=!0,this.currentItems.forEach(e=>{e.selected=!1,this._styleItem(e)}),this.currentItems=[],this.focusedItem=null}_chooseItem(e,t){var i;this.typing=!1,this.params.multiselect?(i=this.currentItems.indexOf(e),i>-1?(this.currentItems.splice(i,1),e.selected=!1):(this.currentItems.push(e),e.selected=!0),this.input.value=this.currentItems.map(n=>n.label).join(","),this._styleItem(e)):(this.currentItems=[e],e.selected=!0,this.input.value=e.label,this._styleItem(e),t||this._resolveValue()),this._focusItem(e)}_resolveValue(e){var t,i;if(this.popup&&this.popup.hide(!0),this.params.multiselect)t=this.currentItems.map(n=>n.value);else if(e&&this.params.autocomplete&&this.typing)if(this.params.freetext||this.params.allowEmpty&&this.input.value==="")t=this.input.value;else{this.actions.cancel();return}else this.currentItems[0]?t=this.currentItems[0].value:(i=Array.isArray(this.initialValues)?this.initialValues[0]:this.initialValues,i===null||typeof i>"u"||i===""?t=i:t=this.params.emptyValue);t===""&&(t=this.params.emptyValue),this.actions.success(t),this.isFilter&&(this.initialValues=t&&!Array.isArray(t)?[t]:t,this.currentItems=[])}};function lf(s,e,t,i,n){var r=new of(this,s,e,t,i,n);return r.input}function uf(s,e,t,i,n){var r=this,a=s.getElement(),o=s.getValue(),l=a.getElementsByTagName("svg").length||5,u=a.getElementsByTagName("svg")[0]?a.getElementsByTagName("svg")[0].getAttribute("width"):14,h=[],m=document.createElement("div"),v=document.createElementNS("http://www.w3.org/2000/svg","svg");function C(M){h.forEach(function(k,_){_<M?(r.table.browser=="ie"?k.setAttribute("class","tabulator-star-active"):k.classList.replace("tabulator-star-inactive","tabulator-star-active"),k.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'):(r.table.browser=="ie"?k.setAttribute("class","tabulator-star-inactive"):k.classList.replace("tabulator-star-active","tabulator-star-inactive"),k.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>')})}function F(M){var k=document.createElement("span"),_=v.cloneNode(!0);h.push(_),k.addEventListener("mouseenter",function(p){p.stopPropagation(),p.stopImmediatePropagation(),C(M)}),k.addEventListener("mousemove",function(p){p.stopPropagation(),p.stopImmediatePropagation()}),k.addEventListener("click",function(p){p.stopPropagation(),p.stopImmediatePropagation(),t(M),a.blur()}),k.appendChild(_),m.appendChild(k)}function x(M){o=M,C(M)}if(a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",m.style.verticalAlign="middle",m.style.display="inline-block",m.style.padding="4px",v.setAttribute("width",u),v.setAttribute("height",u),v.setAttribute("viewBox","0 0 512 512"),v.setAttribute("xml:space","preserve"),v.style.padding="0 1px",n.elementAttributes&&typeof n.elementAttributes=="object")for(let M in n.elementAttributes)M.charAt(0)=="+"?(M=M.slice(1),m.setAttribute(M,m.getAttribute(M)+n.elementAttributes["+"+M])):m.setAttribute(M,n.elementAttributes[M]);for(var R=1;R<=l;R++)F(R);return o=Math.min(parseInt(o),l),C(o),m.addEventListener("mousemove",function(M){C(0)}),m.addEventListener("click",function(M){t(0)}),a.addEventListener("blur",function(M){i()}),a.addEventListener("keydown",function(M){switch(M.keyCode){case 39:x(o+1);break;case 37:x(o-1);break;case 13:t(o);break;case 27:i();break}}),m}function hf(s,e,t,i,n){var r=s.getElement(),a=typeof n.max>"u"?r.getElementsByTagName("div")[0]&&r.getElementsByTagName("div")[0].getAttribute("max")||100:n.max,o=typeof n.min>"u"?r.getElementsByTagName("div")[0]&&r.getElementsByTagName("div")[0].getAttribute("min")||0:n.min,l=(a-o)/100,u=s.getValue()||0,h=document.createElement("div"),m=document.createElement("div"),v,C;function F(){var x=window.getComputedStyle(r,null),R=l*Math.round(m.offsetWidth/((r.clientWidth-parseInt(x.getPropertyValue("padding-left"))-parseInt(x.getPropertyValue("padding-right")))/100))+o;t(R),r.setAttribute("aria-valuenow",R),r.setAttribute("aria-label",u)}if(h.style.position="absolute",h.style.right="0",h.style.top="0",h.style.bottom="0",h.style.width="5px",h.classList.add("tabulator-progress-handle"),m.style.display="inline-block",m.style.position="relative",m.style.height="100%",m.style.backgroundColor="#488CE9",m.style.maxWidth="100%",m.style.minWidth="0%",n.elementAttributes&&typeof n.elementAttributes=="object")for(let x in n.elementAttributes)x.charAt(0)=="+"?(x=x.slice(1),m.setAttribute(x,m.getAttribute(x)+n.elementAttributes["+"+x])):m.setAttribute(x,n.elementAttributes[x]);return r.style.padding="4px 4px",u=Math.min(parseFloat(u),a),u=Math.max(parseFloat(u),o),u=Math.round((u-o)/l),m.style.width=u+"%",r.setAttribute("aria-valuemin",o),r.setAttribute("aria-valuemax",a),m.appendChild(h),h.addEventListener("mousedown",function(x){v=x.screenX,C=m.offsetWidth}),h.addEventListener("mouseover",function(){h.style.cursor="ew-resize"}),r.addEventListener("mousemove",function(x){v&&(m.style.width=C+x.screenX-v+"px")}),r.addEventListener("mouseup",function(x){v&&(x.stopPropagation(),x.stopImmediatePropagation(),v=!1,C=!1,F())}),r.addEventListener("keydown",function(x){switch(x.keyCode){case 39:x.preventDefault(),m.style.width=m.clientWidth+r.clientWidth/100+"px";break;case 37:x.preventDefault(),m.style.width=m.clientWidth-r.clientWidth/100+"px";break;case 9:case 13:F();break;case 27:i();break}}),r.addEventListener("blur",function(){i()}),m}function df(s,e,t,i,n){var r=s.getValue(),a=document.createElement("input"),o=n.tristate,l=typeof n.indeterminateValue>"u"?null:n.indeterminateValue,u=!1,h=Object.keys(n).includes("trueValue"),m=Object.keys(n).includes("falseValue");if(a.setAttribute("type","checkbox"),a.style.marginTop="5px",a.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let C in n.elementAttributes)C.charAt(0)=="+"?(C=C.slice(1),a.setAttribute(C,a.getAttribute(C)+n.elementAttributes["+"+C])):a.setAttribute(C,n.elementAttributes[C]);a.value=r,o&&(typeof r>"u"||r===l||r==="")&&(u=!0,a.indeterminate=!0),this.table.browser!="firefox"&&this.table.browser!="safari"&&e(function(){s.getType()==="cell"&&a.focus({preventScroll:!0})}),a.checked=h?r===n.trueValue:r===!0||r==="true"||r==="True"||r===1;function v(C){var F=a.checked;return h&&F?F=n.trueValue:m&&!F&&(F=n.falseValue),o?C?u?l:F:a.checked&&!u?(a.checked=!1,a.indeterminate=!0,u=!0,l):(u=!1,F):F}return a.addEventListener("change",function(C){t(v())}),a.addEventListener("blur",function(C){t(v(!0))}),a.addEventListener("keydown",function(C){C.keyCode==13&&t(v()),C.keyCode==27&&i()}),a}function cf(s,e,t,i,n){var r=s._getSelf().column,a,o,l;function u(h){var m=h.getValue(),v="input";switch(typeof m){case"number":v="number";break;case"boolean":v="tickCross";break;case"string":m.includes(`
31
+ `)&&(v="textarea");break}return v}return a=n.editorLookup?n.editorLookup(s):u(s),n.paramsLookup&&(l=typeof n.paramsLookup=="function"?n.paramsLookup(a,s):n.paramsLookup[a]),o=this.table.modules.edit.lookupEditor(a,r),o.call(this,s,e,t,i,l||{})}var ff={input:Qc,textarea:ef,number:tf,range:sf,date:nf,time:rf,datetime:af,list:lf,star:uf,progress:hf,tickCross:df,adaptable:cf};class Pn extends ke{static moduleName="edit";static editors=ff;constructor(e){super(e),this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[],this.convertEmptyValues=!1,this.editors=Pn.editors,this.registerTableOption("editTriggerEvent","focus"),this.registerTableOption("editorEmptyValue"),this.registerTableOption("editorEmptyValueFunc",this.emptyValueCheck.bind(this)),this.registerColumnOption("editable"),this.registerColumnOption("editor"),this.registerColumnOption("editorParams"),this.registerColumnOption("editorEmptyValue"),this.registerColumnOption("editorEmptyValueFunc"),this.registerColumnOption("cellEditing"),this.registerColumnOption("cellEdited"),this.registerColumnOption("cellEditCancelled"),this.registerTableFunction("getEditedCells",this.getEditedCells.bind(this)),this.registerTableFunction("clearCellEdited",this.clearCellEdited.bind(this)),this.registerTableFunction("navigatePrev",this.navigatePrev.bind(this)),this.registerTableFunction("navigateNext",this.navigateNext.bind(this)),this.registerTableFunction("navigateLeft",this.navigateLeft.bind(this)),this.registerTableFunction("navigateRight",this.navigateRight.bind(this)),this.registerTableFunction("navigateUp",this.navigateUp.bind(this)),this.registerTableFunction("navigateDown",this.navigateDown.bind(this)),this.registerComponentFunction("cell","isEdited",this.cellIsEdited.bind(this)),this.registerComponentFunction("cell","clearEdited",this.clearEdited.bind(this)),this.registerComponentFunction("cell","edit",this.editCell.bind(this)),this.registerComponentFunction("cell","cancelEdit",this.cellCancelEdit.bind(this)),this.registerComponentFunction("cell","navigatePrev",this.navigatePrev.bind(this)),this.registerComponentFunction("cell","navigateNext",this.navigateNext.bind(this)),this.registerComponentFunction("cell","navigateLeft",this.navigateLeft.bind(this)),this.registerComponentFunction("cell","navigateRight",this.navigateRight.bind(this)),this.registerComponentFunction("cell","navigateUp",this.navigateUp.bind(this)),this.registerComponentFunction("cell","navigateDown",this.navigateDown.bind(this))}initialize(){this.subscribe("cell-init",this.bindEditor.bind(this)),this.subscribe("cell-delete",this.clearEdited.bind(this)),this.subscribe("cell-value-changed",this.updateCellClass.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("column-delete",this.columnDeleteCheck.bind(this)),this.subscribe("row-deleting",this.rowDeleteCheck.bind(this)),this.subscribe("row-layout",this.rowEditableCheck.bind(this)),this.subscribe("data-refreshing",this.cancelEdit.bind(this)),this.subscribe("clipboard-paste",this.pasteBlocker.bind(this)),this.subscribe("keybinding-nav-prev",this.navigatePrev.bind(this,void 0)),this.subscribe("keybinding-nav-next",this.keybindingNavigateNext.bind(this)),this.subscribe("keybinding-nav-up",this.navigateUp.bind(this,void 0)),this.subscribe("keybinding-nav-down",this.navigateDown.bind(this,void 0)),Object.keys(this.table.options).includes("editorEmptyValue")&&(this.convertEmptyValues=!0)}pasteBlocker(e){if(this.currentCell)return!0}keybindingNavigateNext(e){var t=this.currentCell,i=this.options("tabEndNewRow");t&&(this.navigateNext(t,e)||i&&(t.getElement().firstChild.blur(),this.invalidEdit||(i===!0?i=this.table.addRow({}):typeof i=="function"?i=this.table.addRow(i(t.row.getComponent())):i=this.table.addRow(Object.assign({},i)),i.then(()=>{setTimeout(()=>{t.getComponent().navigateNext()})}))))}cellIsEdited(e){return!!e.modules.edit&&e.modules.edit.edited}cellCancelEdit(e){e===this.currentCell?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}updateCellClass(e){this.allowEdit(e)?e.getElement().classList.add("tabulator-editable"):e.getElement().classList.remove("tabulator-editable")}clearCellEdited(e){e||(e=this.table.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach(t=>{this.table.modules.edit.clearEdited(t._getSelf())})}navigatePrev(e=this.currentCell,t){var i,n;if(e){if(t&&t.preventDefault(),i=this.navigateLeft(),i)return!0;if(n=this.table.rowManager.prevDisplayRow(e.row,!0),n&&(i=this.findPrevEditableCell(n,n.cells.length),i))return i.getComponent().edit(),!0}return!1}navigateNext(e=this.currentCell,t){var i,n;if(e){if(t&&t.preventDefault(),i=this.navigateRight(),i)return!0;if(n=this.table.rowManager.nextDisplayRow(e.row,!0),n&&(i=this.findNextEditableCell(n,-1),i))return i.getComponent().edit(),!0}return!1}navigateLeft(e=this.currentCell,t){var i,n;return e&&(t&&t.preventDefault(),i=e.getIndex(),n=this.findPrevEditableCell(e.row,i),n)?(n.getComponent().edit(),!0):!1}navigateRight(e=this.currentCell,t){var i,n;return e&&(t&&t.preventDefault(),i=e.getIndex(),n=this.findNextEditableCell(e.row,i),n)?(n.getComponent().edit(),!0):!1}navigateUp(e=this.currentCell,t){var i,n;return e&&(t&&t.preventDefault(),i=e.getIndex(),n=this.table.rowManager.prevDisplayRow(e.row,!0),n)?(n.cells[i].getComponent().edit(),!0):!1}navigateDown(e=this.currentCell,t){var i,n;return e&&(t&&t.preventDefault(),i=e.getIndex(),n=this.table.rowManager.nextDisplayRow(e.row,!0),n)?(n.cells[i].getComponent().edit(),!0):!1}findNextEditableCell(e,t){var i=!1;if(t<e.cells.length-1)for(var n=t+1;n<e.cells.length;n++){let r=e.cells[n];if(r.column.modules.edit&&He.elVisible(r.getElement())&&this.allowEdit(r)){i=r;break}}return i}findPrevEditableCell(e,t){var i=!1;if(t>0)for(var n=t-1;n>=0;n--){let r=e.cells[n];if(r.column.modules.edit&&He.elVisible(r.getElement())&&this.allowEdit(r)){i=r;break}}return i}initializeColumnCheck(e){typeof e.definition.editor<"u"&&this.initializeColumn(e)}columnDeleteCheck(e){this.currentCell&&this.currentCell.column===e&&this.cancelEdit()}rowDeleteCheck(e){this.currentCell&&this.currentCell.row===e&&this.cancelEdit()}rowEditableCheck(e){e.getCells().forEach(t=>{t.column.modules.edit&&typeof t.column.modules.edit.check=="function"&&this.updateCellClass(t)})}initializeColumn(e){var t=Object.keys(e.definition).includes("editorEmptyValue"),i={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{},convertEmptyValues:t,editorEmptyValue:e.definition.editorEmptyValue,editorEmptyValueFunc:e.definition.editorEmptyValueFunc};i.editor=this.lookupEditor(e.definition.editor,e),i.editor&&(e.modules.edit=i)}lookupEditor(e,t){var i;switch(typeof e){case"string":this.editors[e]?i=this.editors[e]:console.warn("Editor Error - No such editor found: ",e);break;case"function":i=e;break;case"boolean":e===!0&&(typeof t.definition.formatter!="function"?this.editors[t.definition.formatter]?i=this.editors[t.definition.formatter]:i=this.editors.input:console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",t.definition.formatter));break}return i}getCurrentCell(){return this.currentCell?this.currentCell.getComponent():!1}clearEditor(e){var t=this.currentCell,i;if(this.invalidEdit=!1,t){for(this.currentCell=!1,i=t.getElement(),this.dispatch("edit-editor-clear",t,e),i.classList.remove("tabulator-editing");i.firstChild;)i.removeChild(i.firstChild);t.row.getElement().classList.remove("tabulator-editing"),t.table.element.classList.remove("tabulator-editing")}}cancelEdit(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),(e.column.definition.editor=="textarea"||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.definition.cellEditCancelled&&e.column.definition.cellEditCancelled.call(this.table,t),this.dispatch("edit-cancelled",e),this.dispatchExternal("cellEditCancelled",t)}}bindEditor(e){if(e.column.modules.edit){var t=this,i=e.getElement(!0);this.updateCellClass(e),i.setAttribute("tabindex",0),i.addEventListener("mousedown",function(n){n.button===2?n.preventDefault():t.mouseClick=!0}),this.options("editTriggerEvent")==="dblclick"&&i.addEventListener("dblclick",function(n){i.classList.contains("tabulator-editing")||(i.focus({preventScroll:!0}),t.edit(e,n,!1))}),(this.options("editTriggerEvent")==="focus"||this.options("editTriggerEvent")==="click")&&i.addEventListener("click",function(n){i.classList.contains("tabulator-editing")||(i.focus({preventScroll:!0}),t.edit(e,n,!1))}),this.options("editTriggerEvent")==="focus"&&i.addEventListener("focus",function(n){t.recursionBlock||t.edit(e,n,!1)})}}focusCellNoEvent(e,t){this.recursionBlock=!0,t&&this.table.browser==="ie"||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1}editCell(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)}focusScrollAdjust(e){if(this.table.rowManager.getRenderMode()=="virtual"){var t=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,n=e.row.getElement();n.offsetTop<t?this.table.rowManager.element.scrollTop-=t-n.offsetTop:n.offsetTop+n.offsetHeight>i&&(this.table.rowManager.element.scrollTop+=n.offsetTop+n.offsetHeight-i);var r=this.table.rowManager.element.scrollLeft,a=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,o=e.getElement();this.table.modExists("frozenColumns")&&(r+=parseInt(this.table.modules.frozenColumns.leftMargin||0),a-=parseInt(this.table.modules.frozenColumns.rightMargin||0)),this.table.options.renderHorizontal==="virtual"&&(r-=parseInt(this.table.columnManager.renderer.vDomPadLeft),a-=parseInt(this.table.columnManager.renderer.vDomPadLeft)),o.offsetLeft<r?this.table.rowManager.element.scrollLeft-=r-o.offsetLeft:o.offsetLeft+o.offsetWidth>a&&(this.table.rowManager.element.scrollLeft+=o.offsetLeft+o.offsetWidth-a)}}allowEdit(e){var t=!!e.column.modules.edit;if(e.column.modules.edit)switch(typeof e.column.modules.edit.check){case"function":e.row.initialized&&(t=e.column.modules.edit.check(e.getComponent()));break;case"string":t=!!e.row.data[e.column.modules.edit.check];break;case"boolean":t=e.column.modules.edit.check;break}return t}edit(e,t,i){var n=this,r=!0,a=function(){},o=e.getElement(),l=!1,u,h,m;if(this.currentCell){!this.invalidEdit&&this.currentCell!==e&&this.cancelEdit();return}function v(M){if(n.currentCell===e&&!l){var k=n.chain("edit-success",[e,M],!0,!0);return k===!0||n.table.options.validationMode==="highlight"?(l=!0,n.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,n.editedCells.indexOf(e)==-1&&n.editedCells.push(e),M=n.transformEmptyValues(M,e),e.setValue(M,!0),k===!0):(l=!0,n.invalidEdit=!0,n.focusCellNoEvent(e,!0),a(),setTimeout(()=>{l=!1},10),!1)}}function C(){n.currentCell===e&&!l&&n.cancelEdit()}function F(M){a=M}if(e.column.modules.edit.blocked)return this.mouseClick=!1,this.blur(o),!1;if(t&&t.stopPropagation(),r=this.allowEdit(e),r||i){if(n.cancelEdit(),n.currentCell=e,this.focusScrollAdjust(e),h=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.definition.cellClick&&e.column.definition.cellClick.call(this.table,t,h)),e.column.definition.cellEditing&&e.column.definition.cellEditing.call(this.table,h),this.dispatch("cell-editing",e),this.dispatchExternal("cellEditing",h),m=typeof e.column.modules.edit.params=="function"?e.column.modules.edit.params(h):e.column.modules.edit.params,u=e.column.modules.edit.editor.call(n,h,F,v,C,m),this.currentCell&&u!==!1)if(u instanceof Node){for(o.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-editing"),e.table.element.classList.add("tabulator-editing");o.firstChild;)o.removeChild(o.firstChild);o.appendChild(u),a();for(var x=o.children,R=0;R<x.length;R++)x[R].addEventListener("click",function(M){M.stopPropagation()})}else return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",u),this.blur(o),!1;else return this.blur(o),!1;return!0}else return this.mouseClick=!1,this.blur(o),!1}emptyValueCheck(e){return e===""||e===null||typeof e>"u"}transformEmptyValues(e,t){var i=t.column.modules.edit,n=i.convertEmptyValues||this.convertEmptyValues,r;return n&&(r=i.editorEmptyValueFunc||this.options("editorEmptyValueFunc"),r&&r(e)&&(e=i.convertEmptyValues?i.editorEmptyValue:this.options("editorEmptyValue"))),e}blur(e){this.confirm("edit-blur",[e])||e.blur()}getEditedCells(){var e=[];return this.editedCells.forEach(t=>{e.push(t.getComponent())}),e}clearEdited(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,this.dispatch("edit-edited-clear",e)),t=this.editedCells.indexOf(e),t>-1&&this.editedCells.splice(t,1)}}class ua{constructor(e,t,i,n){this.type=e,this.columns=t,this.component=i||!1,this.indent=n||0}}class Fn{constructor(e,t,i,n,r){this.value=e,this.component=t||!1,this.width=i,this.height=n,this.depth=r}}var pf={},mf={visible:function(){return this.rowManager.getVisibleRows(!1,!0)},all:function(){return this.rowManager.rows},selected:function(){return this.modules.selectRow.selectedRows},active:function(){return this.options.pagination?this.rowManager.getDisplayRows(this.rowManager.displayRows.length-2):this.rowManager.getDisplayRows()}};class Gi extends ke{static moduleName="export";static columnLookups=pf;static rowLookups=mf;constructor(e){super(e),this.config={},this.cloneTableStyle=!0,this.colVisProp="",this.colVisPropAttach="",this.registerTableOption("htmlOutputConfig",!1),this.registerColumnOption("htmlOutput"),this.registerColumnOption("titleHtmlOutput")}initialize(){this.registerTableFunction("getHtml",this.getHtml.bind(this))}generateExportList(e,t,i,n){var r,a,o,l;return this.cloneTableStyle=t,this.config=e||{},this.colVisProp=n,this.colVisPropAttach=this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1),l=Gi.columnLookups[i],l&&(o=l.call(this.table),o=o.filter(u=>this.columnVisCheck(u))),r=this.config.columnHeaders!==!1?this.headersToExportRows(this.generateColumnGroupHeaders(o)):[],o&&(o=o.map(u=>u.getComponent())),a=this.bodyToExportRows(this.rowLookup(i),o),r.concat(a)}generateTable(e,t,i,n){var r=this.generateExportList(e,t,i,n);return this.generateTableElement(r)}rowLookup(e){var t=[],i;return typeof e=="function"?e.call(this.table).forEach(n=>{n=this.table.rowManager.findRow(n),n&&t.push(n)}):(i=Gi.rowLookups[e]||Gi.rowLookups.active,t=i.call(this.table)),Object.assign([],t)}generateColumnGroupHeaders(e){var t=[];return e||(e=this.config.columnGroups!==!1?this.table.columnManager.columns:this.table.columnManager.columnsByIndex),e.forEach(i=>{var n=this.processColumnGroup(i);n&&t.push(n)}),t}processColumnGroup(e){var t=e.columns,i=0,n=e.definition["title"+this.colVisPropAttach]||e.definition.title,r={title:n,column:e,depth:1};if(t.length){if(r.subGroups=[],r.width=0,t.forEach(a=>{var o=this.processColumnGroup(a);o&&(r.width+=o.width,r.subGroups.push(o),o.depth>i&&(i=o.depth))}),r.depth+=i,!r.width)return!1}else if(this.columnVisCheck(e))r.width=1;else return!1;return r}columnVisCheck(e){var t=e.definition[this.colVisProp];return this.config.rowHeaders===!1&&e.isRowHeader?!1:(typeof t=="function"&&(t=t.call(this.table,e.getComponent())),t===!1||t===!0?t:e.visible&&e.field)}headersToExportRows(e){var t=[],i=0,n=[];function r(a,o){var l=i-o;if(typeof t[o]>"u"&&(t[o]=[]),a.height=a.subGroups?1:l-a.depth+1,t[o].push(a),a.height>1)for(let u=1;u<a.height;u++)typeof t[o+u]>"u"&&(t[o+u]=[]),t[o+u].push(!1);if(a.width>1)for(let u=1;u<a.width;u++)t[o].push(!1);a.subGroups&&a.subGroups.forEach(function(u){r(u,o+1)})}return e.forEach(function(a){a.depth>i&&(i=a.depth)}),e.forEach(function(a){r(a,0)}),t.forEach(a=>{var o=[];a.forEach(l=>{if(l){let u=typeof l.title>"u"?"":l.title;o.push(new Fn(u,l.column.getComponent(),l.width,l.height,l.depth))}else o.push(null)}),n.push(new ua("header",o))}),n}bodyToExportRows(e,t=[]){var i=[];return t.length===0&&this.table.columnManager.columnsByIndex.forEach(n=>{this.columnVisCheck(n)&&t.push(n.getComponent())}),this.config.columnCalcs!==!1&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),e=e.filter(n=>{switch(n.type){case"group":return this.config.rowGroups!==!1;case"calc":return this.config.columnCalcs!==!1;case"row":return!(this.table.options.dataTree&&this.config.dataTree===!1&&n.modules.dataTree.parent)}return!0}),e.forEach((n,r)=>{var a=n.getData(this.colVisProp),o=[],l=0;switch(n.type){case"group":l=n.level,o.push(new Fn(n.key,n.getComponent(),t.length,1));break;case"calc":case"row":t.forEach(u=>{o.push(new Fn(u._column.getFieldValue(a),u,1,1))}),this.table.options.dataTree&&this.config.dataTree!==!1&&(l=n.modules.dataTree.index);break}i.push(new ua(n.type,o,n.getComponent(),l))}),i}generateTableElement(e){var t=document.createElement("table"),i=document.createElement("thead"),n=document.createElement("tbody"),r=this.lookupTableStyles(),a=this.table.options["rowFormatter"+this.colVisPropAttach],o={};return o.rowFormatter=a!==null?a:this.table.options.rowFormatter,this.table.options.dataTree&&this.config.dataTree!==!1&&this.table.modExists("columnCalcs")&&(o.treeElementField=this.table.modules.dataTree.elementField),o.groupHeader=this.table.options["groupHeader"+this.colVisPropAttach],o.groupHeader&&!Array.isArray(o.groupHeader)&&(o.groupHeader=[o.groupHeader]),t.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach((l,u)=>{let h;switch(l.type){case"header":i.appendChild(this.generateHeaderElement(l,o,r));break;case"group":n.appendChild(this.generateGroupElement(l,o,r));break;case"calc":n.appendChild(this.generateCalcElement(l,o,r));break;case"row":h=this.generateRowElement(l,o,r),this.mapElementStyles(u%2&&r.evenRow?r.evenRow:r.oddRow,h,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n.appendChild(h);break}}),i.innerHTML&&t.appendChild(i),t.appendChild(n),this.mapElementStyles(this.table.element,t,["border-top","border-left","border-right","border-bottom"]),t}lookupTableStyles(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.styleRowHeader=e.firstRow.getElementsByClassName("tabulator-row-header")[0],e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e}generateHeaderElement(e,t,i){var n=document.createElement("tr");return e.columns.forEach(r=>{if(r){var a=document.createElement("th"),o=r.component._column.definition.cssClass?r.component._column.definition.cssClass.split(" "):[];a.colSpan=r.width,a.rowSpan=r.height,a.innerHTML=r.value,this.cloneTableStyle&&(a.style.boxSizing="border-box"),o.forEach(function(l){a.classList.add(l)}),this.mapElementStyles(r.component.getElement(),a,["text-align","border-left","border-right","background-color","color","font-weight","font-family","font-size"]),this.mapElementStyles(r.component._column.contentElement,a,["padding-top","padding-left","padding-right","padding-bottom"]),r.component._column.visible?this.mapElementStyles(r.component.getElement(),a,["width"]):r.component._column.definition.width&&(a.style.width=r.component._column.definition.width+"px"),r.component._column.parent&&r.component._column.parent.isGroup?this.mapElementStyles(r.component._column.parent.groupElement,a,["border-top"]):this.mapElementStyles(r.component.getElement(),a,["border-top"]),r.component._column.isGroup?this.mapElementStyles(r.component.getElement(),a,["border-bottom"]):this.mapElementStyles(this.table.columnManager.getElement(),a,["border-bottom"]),n.appendChild(a)}}),n}generateGroupElement(e,t,i){var n=document.createElement("tr"),r=document.createElement("td"),a=e.columns[0];return n.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?a.value=t.groupHeader[e.indent](a.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):t.groupHeader!==!1&&(a.value=e.component._group.generator(a.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)),r.colSpan=a.width,r.innerHTML=a.value,n.classList.add("tabulator-print-table-group"),n.classList.add("tabulator-group-level-"+e.indent),a.component.isVisible()&&n.classList.add("tabulator-group-visible"),this.mapElementStyles(i.firstGroup,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(i.firstGroup,r,["padding-top","padding-left","padding-right","padding-bottom"]),n.appendChild(r),n}generateCalcElement(e,t,i){var n=this.generateRowElement(e,t,i);return n.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(i.calcRow,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n}generateRowElement(e,t,i){var n=document.createElement("tr");if(n.classList.add("tabulator-print-table-row"),e.columns.forEach((r,a)=>{if(r){var o=document.createElement("td"),l=r.component._column,u=this.table,h=u.columnManager.findColumnIndex(l),m=r.value,v,C,F={modules:{},getValue:function(){return m},getField:function(){return l.definition.field},getElement:function(){return o},getType:function(){return"cell"},getColumn:function(){return l.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getTable:function(){return u},getComponent:function(){return F},column:l},x=l.definition.cssClass?l.definition.cssClass.split(" "):[];if(x.forEach(function(R){o.classList.add(R)}),this.table.modExists("format")&&this.config.formatCells!==!1)m=this.table.modules.format.formatExportValue(F,this.colVisProp);else switch(typeof m){case"object":m=m!==null?JSON.stringify(m):"";break;case"undefined":m="";break}m instanceof Node?o.appendChild(m):o.innerHTML=m,C=["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","text-align"],l.isRowHeader?(v=i.styleRowHeader,C.push("background-color")):v=i.styleCells&&i.styleCells[h]?i.styleCells[h]:i.firstCell,v&&(this.mapElementStyles(v,o,C),l.definition.align&&(o.style.textAlign=l.definition.align)),this.table.options.dataTree&&this.config.dataTree!==!1&&(t.treeElementField&&t.treeElementField==l.field||!t.treeElementField&&a==0)&&(e.component._row.modules.dataTree.controlEl&&o.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),o.firstChild),e.component._row.modules.dataTree.branchEl&&o.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),o.firstChild)),n.appendChild(o),F.modules.format&&F.modules.format.renderedCallback&&F.modules.format.renderedCallback()}}),t.rowFormatter&&e.type==="row"&&this.config.formatCells!==!1){let r=Object.assign(e.component);r.getElement=function(){return n},t.rowFormatter(e.component)}return n}generateHTMLTable(e){var t=document.createElement("div");return t.appendChild(this.generateTableElement(e)),t.innerHTML}getHtml(e,t,i,n){var r=this.generateExportList(i||this.table.options.htmlOutputConfig,t,e,n||"htmlOutput");return this.generateHTMLTable(r)}mapElementStyles(e,t,i){if(this.cloneTableStyle&&e&&t){var n={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var r=window.getComputedStyle(e);i.forEach(function(a){t.style[n[a]]||(t.style[n[a]]=r.getPropertyValue(a))})}}}}var gf={"=":function(s,e,t,i){return e==s},"<":function(s,e,t,i){return e<s},"<=":function(s,e,t,i){return e<=s},">":function(s,e,t,i){return e>s},">=":function(s,e,t,i){return e>=s},"!=":function(s,e,t,i){return e!=s},regex:function(s,e,t,i){return typeof s=="string"&&(s=new RegExp(s)),s.test(e)},like:function(s,e,t,i){return s===null||typeof s>"u"?e===s:typeof e<"u"&&e!==null?String(e).toLowerCase().indexOf(s.toLowerCase())>-1:!1},keywords:function(s,e,t,i){var n=s.toLowerCase().split(typeof i.separator>"u"?" ":i.separator),r=String(e===null||typeof e>"u"?"":e).toLowerCase(),a=[];return n.forEach(o=>{r.includes(o)&&a.push(!0)}),i.matchAll?a.length===n.length:!!a.length},starts:function(s,e,t,i){return s===null||typeof s>"u"?e===s:typeof e<"u"&&e!==null?String(e).toLowerCase().startsWith(s.toLowerCase()):!1},ends:function(s,e,t,i){return s===null||typeof s>"u"?e===s:typeof e<"u"&&e!==null?String(e).toLowerCase().endsWith(s.toLowerCase()):!1},in:function(s,e,t,i){return Array.isArray(s)?s.length?s.indexOf(e)>-1:!0:(console.warn("Filter Error - filter value is not an array:",s),!1)}};class si extends ke{static moduleName="filter";static filters=gf;constructor(e){super(e),this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1,this.tableInitialized=!1,this.registerTableOption("filterMode","local"),this.registerTableOption("initialFilter",!1),this.registerTableOption("initialHeaderFilter",!1),this.registerTableOption("headerFilterLiveFilterDelay",300),this.registerTableOption("placeholderHeaderFilter",!1),this.registerColumnOption("headerFilter"),this.registerColumnOption("headerFilterPlaceholder"),this.registerColumnOption("headerFilterParams"),this.registerColumnOption("headerFilterEmptyCheck"),this.registerColumnOption("headerFilterFunc"),this.registerColumnOption("headerFilterFuncParams"),this.registerColumnOption("headerFilterLiveFilter"),this.registerTableFunction("searchRows",this.searchRows.bind(this)),this.registerTableFunction("searchData",this.searchData.bind(this)),this.registerTableFunction("setFilter",this.userSetFilter.bind(this)),this.registerTableFunction("refreshFilter",this.userRefreshFilter.bind(this)),this.registerTableFunction("addFilter",this.userAddFilter.bind(this)),this.registerTableFunction("getFilters",this.getFilters.bind(this)),this.registerTableFunction("setHeaderFilterFocus",this.userSetHeaderFilterFocus.bind(this)),this.registerTableFunction("getHeaderFilterValue",this.userGetHeaderFilterValue.bind(this)),this.registerTableFunction("setHeaderFilterValue",this.userSetHeaderFilterValue.bind(this)),this.registerTableFunction("getHeaderFilters",this.getHeaderFilters.bind(this)),this.registerTableFunction("removeFilter",this.userRemoveFilter.bind(this)),this.registerTableFunction("clearFilter",this.userClearFilter.bind(this)),this.registerTableFunction("clearHeaderFilter",this.userClearHeaderFilter.bind(this)),this.registerComponentFunction("column","headerFilterFocus",this.setHeaderFilterFocus.bind(this)),this.registerComponentFunction("column","reloadHeaderFilter",this.reloadHeaderFilter.bind(this)),this.registerComponentFunction("column","getHeaderFilterValue",this.getHeaderFilterValue.bind(this)),this.registerComponentFunction("column","setHeaderFilterValue",this.setHeaderFilterValue.bind(this))}initialize(){this.subscribe("column-init",this.initializeColumnHeaderFilter.bind(this)),this.subscribe("column-width-fit-before",this.hideHeaderFilterElements.bind(this)),this.subscribe("column-width-fit-after",this.showHeaderFilterElements.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.subscribe("placeholder",this.generatePlaceholder.bind(this)),this.table.options.filterMode==="remote"&&this.subscribe("data-params",this.remoteFilterParams.bind(this)),this.registerDataHandler(this.filter.bind(this),10)}tableBuilt(){this.table.options.initialFilter&&this.setFilter(this.table.options.initialFilter),this.table.options.initialHeaderFilter&&this.table.options.initialHeaderFilter.forEach(e=>{var t=this.table.columnManager.findColumn(e.field);if(t)this.setHeaderFilterValue(t,e.value);else return console.warn("Column Filter Error - No matching column found:",e.field),!1}),this.tableInitialized=!0}remoteFilterParams(e,t,i,n){return n.filter=this.getFilters(!0,!0),n}generatePlaceholder(e){if(this.table.options.placeholderHeaderFilter&&Object.keys(this.headerFilters).length)return this.table.options.placeholderHeaderFilter}userSetFilter(e,t,i,n){this.setFilter(e,t,i,n),this.refreshFilter()}userRefreshFilter(){this.refreshFilter()}userAddFilter(e,t,i,n){this.addFilter(e,t,i,n),this.refreshFilter()}userSetHeaderFilterFocus(e){var t=this.table.columnManager.findColumn(e);if(t)this.setHeaderFilterFocus(t);else return console.warn("Column Filter Focus Error - No matching column found:",e),!1}userGetHeaderFilterValue(e){var t=this.table.columnManager.findColumn(e);if(t)return this.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}userSetHeaderFilterValue(e,t){var i=this.table.columnManager.findColumn(e);if(i)this.setHeaderFilterValue(i,t);else return console.warn("Column Filter Error - No matching column found:",e),!1}userRemoveFilter(e,t,i){this.removeFilter(e,t,i),this.refreshFilter()}userClearFilter(e){this.clearFilter(e),this.refreshFilter()}userClearHeaderFilter(){this.clearHeaderFilter(),this.refreshFilter()}searchRows(e,t,i){return this.search("rows",e,t,i)}searchData(e,t,i){return this.search("data",e,t,i)}initializeColumnHeaderFilter(e){var t=e.definition;t.headerFilter&&this.initializeColumn(e)}initializeColumn(e,t){var i=this,n=e.getField();function r(a){var o=e.modules.filter.tagType=="input"&&e.modules.filter.attrType=="text"||e.modules.filter.tagType=="textarea"?"partial":"match",l="",u="",h;if(typeof e.modules.filter.prevSuccess>"u"||e.modules.filter.prevSuccess!==a){if(e.modules.filter.prevSuccess=a,e.modules.filter.emptyFunc(a))delete i.headerFilters[n];else{switch(e.modules.filter.value=a,typeof e.definition.headerFilterFunc){case"string":si.filters[e.definition.headerFilterFunc]?(l=e.definition.headerFilterFunc,h=function(m){var v=e.definition.headerFilterFuncParams||{},C=e.getFieldValue(m);return v=typeof v=="function"?v(a,C,m):v,si.filters[e.definition.headerFilterFunc](a,C,m,v)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":h=function(m){var v=e.definition.headerFilterFuncParams||{},C=e.getFieldValue(m);return v=typeof v=="function"?v(a,C,m):v,e.definition.headerFilterFunc(a,C,m,v)},l=h;break}if(!h)switch(o){case"partial":h=function(m){var v=e.getFieldValue(m);return typeof v<"u"&&v!==null?String(v).toLowerCase().indexOf(String(a).toLowerCase())>-1:!1},l="like";break;default:h=function(m){return e.getFieldValue(m)==a},l="="}i.headerFilters[n]={value:a,func:h,type:l}}e.modules.filter.value=a,u=JSON.stringify(i.headerFilters),i.prevHeaderFilterChangeCheck!==u&&(i.prevHeaderFilterChangeCheck=u,i.trackChanges(),i.refreshFilter())}return!0}e.modules.filter={success:r,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)}generateHeaderFilterElement(e,t,i){var n=this,r=e.modules.filter.success,a=e.getField(),o,l,u,h,m,v,C,F;e.modules.filter.value=t;function x(){}function R(M){F=M}if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),a){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(M){return!M&&M!==0},o=document.createElement("div"),o.classList.add("tabulator-header-filter"),typeof e.definition.headerFilter){case"string":n.table.modules.edit.editors[e.definition.headerFilter]?(l=n.table.modules.edit.editors[e.definition.headerFilter],(e.definition.headerFilter==="tick"||e.definition.headerFilter==="tickCross")&&!e.definition.headerFilterEmptyCheck&&(e.modules.filter.emptyFunc=function(M){return M!==!0&&M!==!1})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":l=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?l=e.modules.edit.editor:e.definition.formatter&&n.table.modules.edit.editors[e.definition.formatter]?(l=n.table.modules.edit.editors[e.definition.formatter],(e.definition.formatter==="tick"||e.definition.formatter==="tickCross")&&!e.definition.headerFilterEmptyCheck&&(e.modules.filter.emptyFunc=function(M){return M!==!0&&M!==!1})):l=n.table.modules.edit.editors.input;break}if(l){if(h={getValue:function(){return typeof t<"u"?t:""},getField:function(){return e.definition.field},getElement:function(){return o},getColumn:function(){return e.getComponent()},getTable:()=>this.table,getType:()=>"header",getRow:function(){return{normalizeHeight:function(){}}}},C=e.definition.headerFilterParams||{},C=typeof C=="function"?C.call(n.table,h):C,u=l.call(this.table.modules.edit,h,R,r,x,C),!u){console.warn("Filter Error - Cannot add filter to "+a+" column, editor returned a value of false");return}if(!(u instanceof Node)){console.warn("Filter Error - Cannot add filter to "+a+" column, editor should return an instance of Node, the editor returned:",u);return}n.langBind("headerFilters|columns|"+e.definition.field,function(M){u.setAttribute("placeholder",typeof M<"u"&&M?M:e.definition.headerFilterPlaceholder||n.langText("headerFilters|default"))}),u.addEventListener("click",function(M){M.stopPropagation(),u.focus()}),u.addEventListener("focus",M=>{var k=this.table.columnManager.contentsElement.scrollLeft,_=this.table.rowManager.element.scrollLeft;k!==_&&(this.table.rowManager.scrollHorizontal(k),this.table.columnManager.scrollHorizontal(k))}),m=!1,v=function(M){m&&clearTimeout(m),m=setTimeout(function(){r(u.value)},n.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=u,e.modules.filter.attrType=u.hasAttribute("type")?u.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=u.tagName.toLowerCase(),e.definition.headerFilterLiveFilter!==!1&&(e.definition.headerFilter==="autocomplete"||e.definition.headerFilter==="tickCross"||(e.definition.editor==="autocomplete"||e.definition.editor==="tickCross")&&e.definition.headerFilter===!0||(u.addEventListener("keyup",v),u.addEventListener("search",v),e.modules.filter.attrType=="number"&&u.addEventListener("change",function(M){r(u.value)}),e.modules.filter.attrType=="text"&&this.table.browser!=="ie"&&u.setAttribute("type","search")),(e.modules.filter.tagType=="input"||e.modules.filter.tagType=="select"||e.modules.filter.tagType=="textarea")&&u.addEventListener("mousedown",function(M){M.stopPropagation()})),o.appendChild(u),e.contentElement.appendChild(o),i||n.headerFilterColumns.push(e),F&&F()}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)}hideHeaderFilterElements(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})}showHeaderFilterElements(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})}setHeaderFilterFocus(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())}getHeaderFilterValue(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())}setHeaderFilterValue(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}reloadHeaderFilter(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}refreshFilter(){this.tableInitialized&&(this.table.options.filterMode==="remote"?this.reloadData(null,!1,!1):this.refreshData(!0))}trackChanges(){this.changed=!0,this.dispatch("filter-changed")}hasChanged(){var e=this.changed;return this.changed=!1,e}setFilter(e,t,i,n){this.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:i,params:n}]),this.addFilter(e)}addFilter(e,t,i,n){var r=!1;Array.isArray(e)||(e=[{field:e,type:t,value:i,params:n}]),e.forEach(a=>{a=this.findFilter(a),a&&(this.filterList.push(a),r=!0)}),r&&this.trackChanges()}findFilter(e){var t;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return typeof e.field=="function"?i=function(n){return e.field(n,e.type||{})}:si.filters[e.type]?(t=this.table.columnManager.getColumnByField(e.field),t?i=function(n){return si.filters[e.type](e.value,t.getFieldValue(n),n,e.params||{})}:i=function(n){return si.filters[e.type](e.value,n[e.field],n,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,e.func?e:!1}findSubFilters(e){var t=[];return e.forEach(i=>{i=this.findFilter(i),i&&t.push(i)}),t.length?t:!1}getFilters(e,t){var i=[];return e&&(i=this.getHeaderFilters()),t&&i.forEach(function(n){typeof n.type=="function"&&(n.type="function")}),i=i.concat(this.filtersToArray(this.filterList,t)),i}filtersToArray(e,t){var i=[];return e.forEach(n=>{var r;Array.isArray(n)?i.push(this.filtersToArray(n,t)):(r={field:n.field,type:n.type,value:n.value},t&&typeof r.type=="function"&&(r.type="function"),i.push(r))}),i}getHeaderFilters(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e}removeFilter(e,t,i){Array.isArray(e)||(e=[{field:e,type:t,value:i}]),e.forEach(n=>{var r=-1;typeof n.field=="object"?r=this.filterList.findIndex(a=>n===a):r=this.filterList.findIndex(a=>n.field===a.field&&n.type===a.type&&n.value===a.value),r>-1?this.filterList.splice(r,1):console.warn("Filter Error - No matching filter type found, ignoring: ",n.type)}),this.trackChanges()}clearFilter(e){this.filterList=[],e&&this.clearHeaderFilter(),this.trackChanges()}clearHeaderFilter(){this.headerFilters={},this.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(e=>{typeof e.modules.filter.value<"u"&&delete e.modules.filter.value,e.modules.filter.prevSuccess=void 0,this.reloadHeaderFilter(e)}),this.trackChanges()}search(e,t,i,n){var r=[],a=[];return Array.isArray(t)||(t=[{field:t,type:i,value:n}]),t.forEach(o=>{o=this.findFilter(o),o&&a.push(o)}),this.table.rowManager.rows.forEach(o=>{var l=!0;a.forEach(u=>{this.filterRecurse(u,o.getData())||(l=!1)}),l&&r.push(e==="data"?o.getData("data"):o.getComponent())}),r}filter(e,t){var i=[],n=[];return this.subscribedExternal("dataFiltering")&&this.dispatchExternal("dataFiltering",this.getFilters(!0)),this.table.options.filterMode!=="remote"&&(this.filterList.length||Object.keys(this.headerFilters).length)?e.forEach(r=>{this.filterRow(r)&&i.push(r)}):i=e.slice(0),this.subscribedExternal("dataFiltered")&&(i.forEach(r=>{n.push(r.getComponent())}),this.dispatchExternal("dataFiltered",this.getFilters(!0),n)),i}filterRow(e,t){var i=!0,n=e.getData();this.filterList.forEach(a=>{this.filterRecurse(a,n)||(i=!1)});for(var r in this.headerFilters)this.headerFilters[r].func(n)||(i=!1);return i}filterRecurse(e,t){var i=!1;return Array.isArray(e)?e.forEach(n=>{this.filterRecurse(n,t)&&(i=!0)}):i=e.func(t),i}}function bf(s,e,t){return this.emptyToSpace(this.sanitizeHTML(s.getValue()))}function vf(s,e,t){return s.getValue()}function yf(s,e,t){return s.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(s.getValue()))}function wf(s,e,t){var i=parseFloat(s.getValue()),n="",r,a,o,l,u,h=e.decimal||".",m=e.thousand||",",v=e.negativeSign||"-",C=e.symbol||"",F=!!e.symbolAfter,x=typeof e.precision<"u"?e.precision:2;if(isNaN(i))return this.emptyToSpace(this.sanitizeHTML(s.getValue()));if(i<0&&(i=Math.abs(i),n=v),r=x!==!1?i.toFixed(x):i,r=String(r).split("."),a=r[0],o=r.length>1?h+r[1]:"",e.thousand!==!1)for(l=/(\d+)(\d{3})/;l.test(a);)a=a.replace(l,"$1"+m+"$2");return u=a+o,n===!0?(u="("+u+")",F?u+C:C+u):F?n+u+C:n+C+u}function Cf(s,e,t){var i=s.getValue(),n=e.urlPrefix||"",r=e.download,a=i,o=document.createElement("a"),l;function u(h,m){var v=h.shift(),C=m[v];return h.length&&typeof C=="object"?u(h,C):C}if(e.labelField&&(l=s.getData(),a=u(e.labelField.split(this.table.options.nestedFieldSeparator),l)),e.label)switch(typeof e.label){case"string":a=e.label;break;case"function":a=e.label(s);break}if(a){if(e.urlField&&(l=s.getData(),i=He.retrieveNestedData(this.table.options.nestedFieldSeparator,e.urlField,l)),e.url)switch(typeof e.url){case"string":i=e.url;break;case"function":i=e.url(s);break}return o.setAttribute("href",n+i),e.target&&o.setAttribute("target",e.target),e.download&&(typeof r=="function"?r=r(s):r=r===!0?"":r,o.setAttribute("download",r)),o.innerHTML=this.emptyToSpace(this.sanitizeHTML(a)),o}else return"&nbsp;"}function Ef(s,e,t){var i=document.createElement("img"),n=s.getValue();switch(e.urlPrefix&&(n=e.urlPrefix+s.getValue()),e.urlSuffix&&(n=n+e.urlSuffix),i.setAttribute("src",n),typeof e.height){case"number":i.style.height=e.height+"px";break;case"string":i.style.height=e.height;break}switch(typeof e.width){case"number":i.style.width=e.width+"px";break;case"string":i.style.width=e.width;break}return i.addEventListener("load",function(){s.getRow().normalizeHeight()}),i}function kf(s,e,t){var i=s.getValue(),n=s.getElement(),r=e.allowEmpty,a=e.allowTruthy,o=Object.keys(e).includes("trueValue"),l=typeof e.tickElement<"u"?e.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',u=typeof e.crossElement<"u"?e.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';return o&&i===e.trueValue||!o&&(a&&i||i===!0||i==="true"||i==="True"||i===1||i==="1")?(n.setAttribute("aria-checked",!0),l||""):r&&(i==="null"||i===""||i===null||typeof i>"u")?(n.setAttribute("aria-checked","mixed"),""):(n.setAttribute("aria-checked",!1),u||"")}function xf(s,e,t){var i=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),n=e.inputFormat||"yyyy-MM-dd HH:mm:ss",r=e.outputFormat||"dd/MM/yyyy HH:mm:ss",a=typeof e.invalidPlaceholder<"u"?e.invalidPlaceholder:"",o=s.getValue();if(typeof i<"u"){var l;return i.isDateTime(o)?l=o:n==="iso"?l=i.fromISO(String(o)):l=i.fromFormat(String(o),n),l.isValid?(e.timezone&&(l=l.setZone(e.timezone)),l.toFormat(r)):a===!0||!o?o:typeof a=="function"?a(o):a}else console.error("Format Error - 'datetime' formatter is dependant on luxon.js")}function Mf(s,e,t){var i=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),n=e.inputFormat||"yyyy-MM-dd HH:mm:ss",r=typeof e.invalidPlaceholder<"u"?e.invalidPlaceholder:"",a=typeof e.suffix<"u"?e.suffix:!1,o=typeof e.unit<"u"?e.unit:"days",l=typeof e.humanize<"u"?e.humanize:!1,u=typeof e.date<"u"?e.date:i.now(),h=s.getValue();if(typeof i<"u"){var m;return i.isDateTime(h)?m=h:n==="iso"?m=i.fromISO(String(h)):m=i.fromFormat(String(h),n),m.isValid?l?m.diff(u,o).toHuman()+(a?" "+a:""):parseInt(m.diff(u,o)[o])+(a?" "+a:""):r===!0?h:typeof r=="function"?r(h):r}else console.error("Format Error - 'datetimediff' formatter is dependant on luxon.js")}function Sf(s,e,t){var i=s.getValue();return typeof e[i]>"u"?(console.warn("Missing display value for "+i),i):e[i]}function Rf(s,e,t){var i=s.getValue(),n=s.getElement(),r=e&&e.stars?e.stars:5,a=document.createElement("span"),o=document.createElementNS("http://www.w3.org/2000/svg","svg"),l='<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',u='<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>';a.style.verticalAlign="middle",o.setAttribute("width","14"),o.setAttribute("height","14"),o.setAttribute("viewBox","0 0 512 512"),o.setAttribute("xml:space","preserve"),o.style.padding="0 1px",i=i&&!isNaN(i)?parseInt(i):0,i=Math.max(0,Math.min(i,r));for(var h=1;h<=r;h++){var m=o.cloneNode(!0);m.innerHTML=h<=i?l:u,a.appendChild(m)}return n.style.whiteSpace="nowrap",n.style.overflow="hidden",n.style.textOverflow="ellipsis",n.setAttribute("aria-label",i),a}function Df(s,e,t){var i=this.sanitizeHTML(s.getValue())||0,n=document.createElement("span"),r=e&&e.max?e.max:100,a=e&&e.min?e.min:0,o=e&&typeof e.color<"u"?e.color:["red","orange","green"],l="#666666",u,h;if(!(isNaN(i)||typeof s.getValue()>"u")){switch(n.classList.add("tabulator-traffic-light"),h=parseFloat(i)<=r?parseFloat(i):r,h=parseFloat(h)>=a?parseFloat(h):a,u=(r-a)/100,h=Math.round((h-a)/u),typeof o){case"string":l=o;break;case"function":l=o(i);break;case"object":if(Array.isArray(o)){var m=100/o.length,v=Math.floor(h/m);v=Math.min(v,o.length-1),v=Math.max(v,0),l=o[v];break}}return n.style.backgroundColor=l,n}}function Tf(s,e={},t){var i=this.sanitizeHTML(s.getValue())||0,n=s.getElement(),r=e.max?e.max:100,a=e.min?e.min:0,o=e.legendAlign?e.legendAlign:"center",l,u,h,m,v;switch(u=parseFloat(i)<=r?parseFloat(i):r,u=parseFloat(u)>=a?parseFloat(u):a,l=(r-a)/100,u=Math.round((u-a)/l),typeof e.color){case"string":h=e.color;break;case"function":h=e.color(i);break;case"object":if(Array.isArray(e.color)){let R=100/e.color.length,M=Math.floor(u/R);M=Math.min(M,e.color.length-1),M=Math.max(M,0),h=e.color[M];break}default:h="#2DC214"}switch(typeof e.legend){case"string":m=e.legend;break;case"function":m=e.legend(i);break;case"boolean":m=i;break;default:m=!1}switch(typeof e.legendColor){case"string":v=e.legendColor;break;case"function":v=e.legendColor(i);break;case"object":if(Array.isArray(e.legendColor)){let R=100/e.legendColor.length,M=Math.floor(u/R);M=Math.min(M,e.legendColor.length-1),M=Math.max(M,0),v=e.legendColor[M]}break;default:v="#000"}n.style.minWidth="30px",n.style.position="relative",n.setAttribute("aria-label",u);var C=document.createElement("div");C.style.display="inline-block",C.style.width=u+"%",C.style.backgroundColor=h,C.style.height="100%",C.setAttribute("data-max",r),C.setAttribute("data-min",a);var F=document.createElement("div");if(F.style.position="relative",F.style.width="100%",F.style.height="100%",m){var x=document.createElement("div");x.style.position="absolute",x.style.top=0,x.style.left=0,x.style.textAlign=o,x.style.width="100%",x.style.color=v,x.innerHTML=m}return t(function(){if(!(s instanceof aa)){var R=document.createElement("div");R.style.position="absolute",R.style.top="4px",R.style.bottom="4px",R.style.left="4px",R.style.right="4px",n.appendChild(R),n=R}n.appendChild(F),F.appendChild(C),m&&F.appendChild(x)}),""}function _f(s,e,t){return s.getElement().style.backgroundColor=this.sanitizeHTML(s.getValue()),""}function Of(s,e,t){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'}function Lf(s,e,t){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'}function Pf(s,e,t){var i=s.getValue(),n=e.size||15,r=n+"px",a,o,l=e.hasOwnProperty("onValue")?e.onValue:!0,u=e.hasOwnProperty("offValue")?e.offValue:!1,h=e.onTruthy?i:i===l;return a=document.createElement("div"),a.classList.add("tabulator-toggle"),h?(a.classList.add("tabulator-toggle-on"),a.style.flexDirection="row-reverse",e.onColor&&(a.style.background=e.onColor)):e.offColor&&(a.style.background=e.offColor),a.style.width=2.5*n+"px",a.style.borderRadius=r,e.clickable&&a.addEventListener("click",m=>{s.setValue(h?u:l)}),o=document.createElement("div"),o.classList.add("tabulator-toggle-switch"),o.style.height=r,o.style.width=r,o.style.borderRadius=r,a.appendChild(o),a}function Ff(s,e,t){var i=document.createElement("span"),n=s.getRow(),r=s.getTable();return n.watchPosition(a=>{e.relativeToPage&&(a+=r.modules.page.getPageSize()*(r.modules.page.getPage()-1)),i.innerText=a}),i}function Af(s,e,t){return s.getElement().classList.add("tabulator-row-handle"),"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"}function Hf(s,e,t){var i,n,r;function a(o){var l=o.getValue(),u="plaintext";switch(typeof l){case"boolean":u="tickCross";break;case"string":l.includes(`
32
+ `)&&(u="textarea");break}return u}return i=e.formatterLookup?e.formatterLookup(s):a(s),e.paramsLookup&&(r=typeof e.paramsLookup=="function"?e.paramsLookup(i,s):e.paramsLookup[i]),n=this.table.modules.format.lookupFormatter(i),n.call(this,s,r||{},t)}function zf(s,e,t){var i=e.delimiter||",",n=s.getValue(),r=this.table,a;return e.valueMap&&(typeof e.valueMap=="string"?a=function(o){return o.map(l=>He.retrieveNestedData(r.options.nestedFieldSeparator,e.valueMap,l))}:a=e.valueMap),Array.isArray(n)?(a&&(n=a(n)),n.join(i)):n}function Bf(s,e,t){var i=e.indent||" ",n=typeof e.multiline>"u"?!0:e.multiline,r=e.replacer||null,a=s.getValue();return n&&(s.getElement().style.whiteSpace="pre-wrap"),JSON.stringify(a,r,i)}var Nf={plaintext:bf,html:vf,textarea:yf,money:wf,link:Cf,image:Ef,tickCross:kf,datetime:xf,datetimediff:Mf,lookup:Sf,star:Rf,traffic:Df,progress:Tf,color:_f,buttonTick:Of,buttonCross:Lf,toggle:Pf,rownum:Ff,handle:Af,adaptable:Hf,array:zf,json:Bf};class wi extends ke{static moduleName="format";static formatters=Nf;constructor(e){super(e),this.registerColumnOption("formatter"),this.registerColumnOption("formatterParams"),this.registerColumnOption("formatterPrint"),this.registerColumnOption("formatterPrintParams"),this.registerColumnOption("formatterClipboard"),this.registerColumnOption("formatterClipboardParams"),this.registerColumnOption("formatterHtmlOutput"),this.registerColumnOption("formatterHtmlOutputParams"),this.registerColumnOption("titleFormatter"),this.registerColumnOption("titleFormatterParams")}initialize(){this.subscribe("cell-format",this.formatValue.bind(this)),this.subscribe("cell-rendered",this.cellRendered.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-format",this.formatHeader.bind(this))}initializeColumn(e){e.modules.format=this.lookupTypeFormatter(e,""),typeof e.definition.formatterPrint<"u"&&(e.modules.format.print=this.lookupTypeFormatter(e,"Print")),typeof e.definition.formatterClipboard<"u"&&(e.modules.format.clipboard=this.lookupTypeFormatter(e,"Clipboard")),typeof e.definition.formatterHtmlOutput<"u"&&(e.modules.format.htmlOutput=this.lookupTypeFormatter(e,"HtmlOutput"))}lookupTypeFormatter(e,t){var i={params:e.definition["formatter"+t+"Params"]||{}},n=e.definition["formatter"+t];return i.formatter=this.lookupFormatter(n),i}lookupFormatter(e){var t;switch(typeof e){case"string":wi.formatters[e]?t=wi.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),t=wi.formatters.plaintext);break;case"function":t=e;break;default:t=wi.formatters.plaintext;break}return t}cellRendered(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)}formatHeader(e,t,i){var n,r,a,o;return e.definition.titleFormatter?(n=this.lookupFormatter(e.definition.titleFormatter),a=l=>{e.titleFormatterRendered=l},o={getValue:function(){return t},getElement:function(){return i},getType:function(){return"header"},getColumn:function(){return e.getComponent()},getTable:()=>this.table},r=e.definition.titleFormatterParams||{},r=typeof r=="function"?r():r,n.call(this,o,r,a)):t}formatValue(e){var t=e.getComponent(),i=typeof e.column.modules.format.params=="function"?e.column.modules.format.params(t):e.column.modules.format.params;function n(r){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=r,e.modules.format.rendered=!1}return e.column.modules.format.formatter.call(this,t,i,n)}formatExportValue(e,t){var i=e.column.modules.format[t],n;if(i){let r=function(a){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=a,e.modules.format.rendered=!1};return n=typeof i.params=="function"?i.params(e.getComponent()):i.params,i.formatter.call(this,e.getComponent(),n,r)}else return this.formatValue(e)}sanitizeHTML(e){if(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return String(e).replace(/[&<>"'`=/]/g,function(i){return t[i]})}else return e}emptyToSpace(e){return e===null||typeof e>"u"||e===""?"&nbsp;":e}}class If extends ke{static moduleName="frozenColumns";constructor(e){super(e),this.leftColumns=[],this.rightColumns=[],this.initializationMode="left",this.active=!1,this.blocked=!0,this.registerColumnOption("frozen")}reset(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1}initialize(){this.subscribe("cell-layout",this.layoutCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-width",this.layout.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("table-layout",this.layout.bind(this)),this.subscribe("columns-loading",this.reset.bind(this)),this.subscribe("column-add",this.reinitializeColumns.bind(this)),this.subscribe("column-deleted",this.reinitializeColumns.bind(this)),this.subscribe("column-hide",this.reinitializeColumns.bind(this)),this.subscribe("column-show",this.reinitializeColumns.bind(this)),this.subscribe("columns-loaded",this.reinitializeColumns.bind(this)),this.subscribe("table-redraw",this.layout.bind(this)),this.subscribe("layout-refreshing",this.blockLayout.bind(this)),this.subscribe("layout-refreshed",this.unblockLayout.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this))}blockLayout(){this.blocked=!0}unblockLayout(){this.blocked=!1}layoutCell(e){this.layoutElement(e.element,e.column)}reinitializeColumns(){this.reset(),this.table.columnManager.columnsByIndex.forEach(e=>{this.initializeColumn(e)}),this.layout()}initializeColumn(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,this.initializationMode=="left"?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")}frozenCheck(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen}layoutCalcRows(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow),this.table.modExists("groupRows")&&this.layoutGroupCalcs(this.table.modules.groupRows.getGroups()))}layoutGroupCalcs(e){e.forEach(t=>{t.calcs.top&&this.layoutRow(t.calcs.top),t.calcs.bottom&&this.layoutRow(t.calcs.bottom),t.groupList&&t.groupList.length&&this.layoutGroupCalcs(t.groupList)})}layoutColumnPosition(e){var t=[],i=0,n=0;this.leftColumns.forEach((r,a)=>{if(r.modules.frozen.marginValue=i,r.modules.frozen.margin=r.modules.frozen.marginValue+"px",r.visible&&(i+=r.getWidth()),a==this.leftColumns.length-1?r.modules.frozen.edge=!0:r.modules.frozen.edge=!1,r.parent.isGroup){var o=this.getColGroupParentElement(r);t.includes(o)||(this.layoutElement(o,r),t.push(o)),o.classList.toggle("tabulator-frozen-left",r.modules.frozen.edge&&r.modules.frozen.position==="left"),o.classList.toggle("tabulator-frozen-right",r.modules.frozen.edge&&r.modules.frozen.position==="right")}else this.layoutElement(r.getElement(),r);e&&r.cells.forEach(l=>{this.layoutElement(l.getElement(!0),r)})}),this.rightColumns.forEach((r,a)=>{r.modules.frozen.marginValue=n,r.modules.frozen.margin=r.modules.frozen.marginValue+"px",r.visible&&(n+=r.getWidth()),a==this.rightColumns.length-1?r.modules.frozen.edge=!0:r.modules.frozen.edge=!1,r.parent.isGroup?this.layoutElement(this.getColGroupParentElement(r),r):this.layoutElement(r.getElement(),r),e&&r.cells.forEach(o=>{this.layoutElement(o.getElement(!0),r)})})}getColGroupParentElement(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()}layout(){this.active&&!this.blocked&&(this.layoutColumnPosition(),this.reinitializeRows(),this.layoutCalcRows())}reinitializeRows(){var e=this.table.rowManager.getVisibleRows(!0),t=this.table.rowManager.getRows().filter(i=>!e.includes(i));t.forEach(i=>{i.deinitialize()}),e.forEach(i=>{i.type==="row"&&this.layoutRow(i)})}layoutRow(e){this.table.options.layout==="fitDataFill"&&this.rightColumns.length&&(this.table.rowManager.getTableElement().style.minWidth="calc(100% - "+this.rightMargin+")"),this.leftColumns.forEach(t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)}),this.rightColumns.forEach(t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)})}layoutElement(e,t){var i;t.modules.frozen&&e&&(e.style.position="sticky",this.table.rtl?i=t.modules.frozen.position==="left"?"right":"left":i=t.modules.frozen.position,e.style[i]=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),e.classList.toggle("tabulator-frozen-left",t.modules.frozen.edge&&t.modules.frozen.position==="left"),e.classList.toggle("tabulator-frozen-right",t.modules.frozen.edge&&t.modules.frozen.position==="right"))}adjustForScrollbar(e){this.rightColumns.length&&(this.table.columnManager.getContentsElement().style.width="calc(100% - "+e+"px)")}getFrozenColumns(){return this.leftColumns.concat(this.rightColumns)}_calcSpace(e,t){var i=0;for(let n=0;n<t;n++)e[n].visible&&(i+=e[n].getWidth());return i}}class Vf extends ke{static moduleName="frozenRows";constructor(e){super(e),this.topElement=document.createElement("div"),this.rows=[],this.registerComponentFunction("row","freeze",this.freezeRow.bind(this)),this.registerComponentFunction("row","unfreeze",this.unfreezeRow.bind(this)),this.registerComponentFunction("row","isFrozen",this.isRowFrozen.bind(this)),this.registerTableOption("frozenRowsField","id"),this.registerTableOption("frozenRows",!1)}initialize(){var e=document.createDocumentFragment();this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),e.appendChild(document.createElement("br")),e.appendChild(this.topElement),this.table.columnManager.getContentsElement().insertBefore(e,this.table.columnManager.headersElement.nextSibling),this.subscribe("row-deleting",this.detachRow.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),10),this.table.options.frozenRows&&(this.subscribe("data-processed",this.initializeRows.bind(this)),this.subscribe("row-added",this.initializeRow.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this))),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}initializeRows(){this.table.rowManager.getRows().forEach(e=>{this.initializeRow(e)})}initializeRow(e){var t=this.table.options.frozenRows,i=typeof t;i==="number"?e.getPosition()&&e.getPosition()+this.rows.length<=t&&this.freezeRow(e):i==="function"?t.call(this.table,e.getComponent())&&this.freezeRow(e):Array.isArray(t)&&t.includes(e.data[this.options("frozenRowsField")])&&this.freezeRow(e)}isRowFrozen(e){var t=this.rows.indexOf(e);return t>-1}isFrozen(){return!!this.rows.length}visibleRows(e,t){return this.rows.forEach(i=>{t.push(i)}),t}getRows(e){var t=e.slice(0);return this.rows.forEach(function(i){var n=t.indexOf(i);n>-1&&t.splice(n,1)}),t}freezeRow(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.rows.push(e),this.refreshData(!1,"display"),this.table.rowManager.adjustTableSize(),this.styleRows())}unfreezeRow(e){e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.refreshData(!1,"display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")}detachRow(e){var t=this.rows.indexOf(e);if(t>-1){var i=e.getElement();i.parentNode&&i.parentNode.removeChild(i),this.rows.splice(t,1)}}styleRows(e){this.rows.forEach((t,i)=>{this.table.rowManager.styleRow(t,i)})}}class jf{constructor(e){return this._group=e,this.type="GroupComponent",new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._group.groupManager.table.componentFunctionBinder.handle("group",t._group,i)}})}getKey(){return this._group.key}getField(){return this._group.field}getElement(){return this._group.element}getRows(){return this._group.getRows(!0)}getSubGroups(){return this._group.getSubGroups(!0)}getParentGroup(){return this._group.parent?this._group.parent.getComponent():!1}isVisible(){return this._group.visible}show(){this._group.show()}hide(){this._group.hide()}toggle(){this._group.toggleVisibility()}scrollTo(e,t){return this._group.groupManager.table.rowManager.scrollToRow(this._group,e,t)}_getSelf(){return this._group}getTable(){return this._group.groupManager.table}}class Ci{constructor(e,t,i,n,r,a,o){this.groupManager=e,this.parent=t,this.key=n,this.level=i,this.field=r,this.hasSubGroups=i<e.groupIDLookups.length-1,this.addRow=this.hasSubGroups?this._addRowToGroup:this._addRow,this.type="group",this.old=o,this.rows=[],this.groups=[],this.groupList=[],this.generator=a,this.element=!1,this.elementContents=!1,this.height=0,this.outerHeight=0,this.initialized=!1,this.calcs={},this.initialized=!1,this.modules={},this.arrowElement=!1,this.visible=o?o.visible:typeof e.startOpen[i]<"u"?e.startOpen[i]:e.startOpen[0],this.component=null,this.createElements(),this.addBindings(),this.createValueGroups()}wipe(e){e||(this.groupList.length?this.groupList.forEach(function(t){t.wipe()}):this.rows.forEach(t=>{t.modules&&delete t.modules.group})),this.element=!1,this.arrowElement=!1,this.elementContents=!1}createElements(){var e=document.createElement("div");e.classList.add("tabulator-arrow"),this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-group-toggle"),this.arrowElement.appendChild(e),this.groupManager.table.options.movableRows!==!1&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)}createValueGroups(){var e=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]&&this.groupManager.allowedValues[e].forEach(t=>{this._createGroup(t,e)})}addBindings(){var e;this.groupManager.table.options.groupToggleElement&&(e=this.groupManager.table.options.groupToggleElement=="arrow"?this.arrowElement:this.element,e.addEventListener("click",t=>{this.groupManager.table.options.groupToggleElement==="arrow"&&(t.stopPropagation(),t.stopImmediatePropagation()),setTimeout(()=>{this.toggleVisibility()})}))}_createGroup(e,t){var i=t+"_"+e,n=new Ci(this.groupManager,this,t,e,this.groupManager.groupIDLookups[t].field,this.groupManager.headerGenerator[t]||this.groupManager.headerGenerator[0],this.old?this.old.groups[i]:!1);this.groups[i]=n,this.groupList.push(n)}_addRowToGroup(e){var t=this.level+1;if(this.hasSubGroups){var i=this.groupManager.groupIDLookups[t].func(e.getData()),n=t+"_"+i;this.groupManager.allowedValues&&this.groupManager.allowedValues[t]?this.groups[n]&&this.groups[n].addRow(e):(this.groups[n]||this._createGroup(i,t),this.groups[n].addRow(e))}}_addRow(e){this.rows.push(e),e.modules.group=this}insertRow(e,t,i){var n=this.conformRowData({});e.updateData(n);var r=this.rows.indexOf(t);r>-1?i?this.rows.splice(r+1,0,e):this.rows.splice(r,0,e):i?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)}scrollHeader(e){this.arrowElement&&(this.arrowElement.style.marginLeft=e,this.groupList.forEach(function(t){t.scrollHeader(e)}))}getRowIndex(e){}conformRowData(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e}removeRow(e){var t=this.rows.indexOf(e),i=e.getElement();t>-1&&this.rows.splice(t,1),!this.groupManager.table.options.groupValues&&!this.rows.length?(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0)):(i.parentNode&&i.parentNode.removeChild(i),this.groupManager.blockRedraw||(this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)))}removeGroup(e){var t=e.level+"_"+e.key,i;this.groups[t]&&(delete this.groups[t],i=this.groupList.indexOf(e),i>-1&&this.groupList.splice(i,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))}getHeadersAndRows(){var e=[];return e.push(this),this._visSet(),this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.visible?this.groupList.length?this.groupList.forEach(function(t){e=e.concat(t.getHeadersAndRows())}):(this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):!this.groupList.length&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))),e}getData(e,t){var i=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach(n=>{i.push(n.getData(t||"data"))}),i}getRowCount(){var e=0;return this.groupList.length?this.groupList.forEach(t=>{e+=t.getRowCount()}):e=this.rows.length,e}toggleVisibility(){this.visible?this.hide():this.show()}hide(){this.visible=!1,this.groupManager.table.rowManager.getRenderMode()=="basic"&&!this.groupManager.table.options.pagination?(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(e=>{var t=e.getHeadersAndRows();t.forEach(i=>{i.detachElement()})}):this.rows.forEach(e=>{var t=e.getElement();t.parentNode.removeChild(t)}),this.groupManager.updateGroupRows(!0)):this.groupManager.updateGroupRows(!0),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}show(){if(this.visible=!0,this.groupManager.table.rowManager.getRenderMode()=="basic"&&!this.groupManager.table.options.pagination){this.element.classList.add("tabulator-group-visible");var e=this.generateElement();this.groupList.length?this.groupList.forEach(t=>{var i=t.getHeadersAndRows();i.forEach(n=>{var r=n.getElement();e.parentNode.insertBefore(r,e.nextSibling),n.initialize(),e=r})}):this.rows.forEach(t=>{var i=t.getElement();e.parentNode.insertBefore(i,e.nextSibling),t.initialize(),e=i}),this.groupManager.updateGroupRows(!0)}else this.groupManager.updateGroupRows(!0);this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!0)}_visSet(){var e=[];typeof this.visible=="function"&&(this.rows.forEach(function(t){e.push(t.getData())}),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))}getRowGroup(e){var t=!1;return this.groupList.length?this.groupList.forEach(function(i){var n=i.getRowGroup(e);n&&(t=n)}):this.rows.find(function(i){return i===e})&&(t=this),t}getSubGroups(e){var t=[];return this.groupList.forEach(function(i){t.push(e?i.getComponent():i)}),t}getRows(e,t){var i=[];return t&&this.groupList.length?this.groupList.forEach(n=>{i=i.concat(n.getRows(e,t))}):this.rows.forEach(function(n){i.push(e?n.getComponent():n)}),i}generateGroupHeaderContents(){var e=[],t=this.getRows(!1,!0);for(t.forEach(function(i){e.push(i.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);typeof this.elementContents=="string"?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)}getPath(e=[]){return e.unshift(this.key),this.parent&&this.parent.getPath(e),e}getElement(){return this.elementContents?this.element:this.generateElement()}generateElement(){this.addBindings=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;e<this.element.childNodes.length;++e)this.element.childNodes[e].parentNode.removeChild(this.element.childNodes[e]);return this.generateGroupHeaderContents(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}normalizeHeight(){this.setHeight(this.element.clientHeight)}initialize(e){(!this.initialized||e)&&(this.normalizeHeight(),this.initialized=!0)}reinitialize(){this.initialized=!1,this.height=0,He.elVisible(this.element)&&this.initialize(!0)}setHeight(e){this.height!=e&&(this.height=e,this.outerHeight=this.element.offsetHeight)}getHeight(){return this.outerHeight}getGroup(){return this}reinitializeHeight(){}calcHeight(){}setCellHeight(){}clearCellHeight(){}deinitializeHeight(){}rendered(){}getComponent(){return this.component||(this.component=new jf(this)),this.component}}class Wf extends ke{static moduleName="groupRows";constructor(e){super(e),this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayHandler=this.getRows.bind(this),this.blockRedraw=!1,this.registerTableOption("groupBy",!1),this.registerTableOption("groupStartOpen",!0),this.registerTableOption("groupValues",!1),this.registerTableOption("groupUpdateOnCellEdit",!1),this.registerTableOption("groupHeader",!1),this.registerTableOption("groupHeaderPrint",null),this.registerTableOption("groupHeaderClipboard",null),this.registerTableOption("groupHeaderHtmlOutput",null),this.registerTableOption("groupHeaderDownload",null),this.registerTableOption("groupToggleElement","arrow"),this.registerTableOption("groupClosedShowCalcs",!1),this.registerTableFunction("setGroupBy",this.setGroupBy.bind(this)),this.registerTableFunction("setGroupValues",this.setGroupValues.bind(this)),this.registerTableFunction("setGroupStartOpen",this.setGroupStartOpen.bind(this)),this.registerTableFunction("setGroupHeader",this.setGroupHeader.bind(this)),this.registerTableFunction("getGroups",this.userGetGroups.bind(this)),this.registerTableFunction("getGroupedData",this.userGetGroupedData.bind(this)),this.registerComponentFunction("row","getGroup",this.rowGetGroup.bind(this))}initialize(){this.subscribe("table-destroy",this._blockRedrawing.bind(this)),this.subscribe("rows-wipe",this._blockRedrawing.bind(this)),this.subscribe("rows-wiped",this._restore_redrawing.bind(this)),this.table.options.groupBy&&(this.table.options.groupUpdateOnCellEdit&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("row-data-changed",this.reassignRowToGroup.bind(this),0)),this.subscribe("table-built",this.configureGroupSetup.bind(this)),this.subscribe("row-deleting",this.rowDeleting.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHeaders.bind(this)),this.subscribe("rows-wipe",this.wipe.bind(this)),this.subscribe("rows-added",this.rowsUpdated.bind(this)),this.subscribe("row-moving",this.rowMoving.bind(this)),this.subscribe("row-adding-index",this.rowAddingIndex.bind(this)),this.subscribe("rows-sample",this.rowSample.bind(this)),this.subscribe("render-virtual-fill",this.virtualRenderFill.bind(this)),this.registerDisplayHandler(this.displayHandler,20),this.initialized=!0)}_blockRedrawing(){this.blockRedraw=!0}_restore_redrawing(){this.blockRedraw=!1}configureGroupSetup(){if(this.table.options.groupBy){var e=this.table.options.groupBy,t=this.table.options.groupStartOpen,i=this.table.options.groupHeader;if(this.allowedValues=this.table.options.groupValues,Array.isArray(e)&&Array.isArray(i)&&e.length>i.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),this.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],this.langBind("groups|item",(r,a)=>{this.headerGenerator[0]=(o,l,u)=>(typeof o>"u"?"":o)+"<span>("+l+" "+(l===1?r:a.groups.items)+")</span>"}),this.groupIDLookups=[],e)this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="table"&&this.table.options.columnCalcs!="both"&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="group"){var n=this.table.columnManager.getRealColumns();n.forEach(r=>{r.definition.topCalc&&this.table.modules.columnCalcs.initializeTopRow(),r.definition.bottomCalc&&this.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(e)||(e=[e]),e.forEach((r,a)=>{var o,l;typeof r=="function"?o=r:(l=this.table.columnManager.getColumnByField(r),l?o=function(u){return l.getFieldValue(u)}:o=function(u){return u[r]}),this.groupIDLookups.push({field:typeof r=="function"?!1:r,func:o,values:this.allowedValues?this.allowedValues[a]:!1})}),t&&(Array.isArray(t)||(t=[t]),t.forEach(r=>{}),this.startOpen=t),i&&(this.headerGenerator=Array.isArray(i)?i:[i])}else this.groupList=[],this.groups={}}rowSample(e,t){if(this.table.options.groupBy){var i=this.getGroups(!1)[0];t.push(i.getRows(!1)[0])}return t}virtualRenderFill(){var e=this.table.rowManager.tableElement,t=this.table.rowManager.getVisibleRows();if(this.table.options.groupBy)t=t.filter(i=>i.type!=="group"),e.style.minWidth=t.length?"":this.table.columnManager.getWidth()+"px";else return t}rowAddingIndex(e,t,i){if(this.table.options.groupBy){this.assignRowToGroup(e);var n=e.modules.group.rows;return n.length>1&&(!t||t&&n.indexOf(t)==-1?i?n[0]!==e&&(t=n[0],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):n[n.length-1]!==e&&(t=n[n.length-1],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)),t}}trackChanges(){this.dispatch("group-changed")}setGroupBy(e){this.table.options.groupBy=e,this.initialized||this.initialize(),this.configureGroupSetup(),!e&&this.table.modExists("columnCalcs")&&this.table.options.columnCalcs===!0&&this.table.modules.columnCalcs.reinitializeCalcs(),this.refreshData(),this.trackChanges()}setGroupValues(e){this.table.options.groupValues=e,this.configureGroupSetup(),this.refreshData(),this.trackChanges()}setGroupStartOpen(e){this.table.options.groupStartOpen=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}setGroupHeader(e){this.table.options.groupHeader=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}userGetGroups(e){return this.getGroups(!0)}userGetGroupedData(){return this.table.options.groupBy?this.getGroupedData():this.getData()}rowGetGroup(e){return e.modules.group?e.modules.group.getComponent():!1}rowMoving(e,t,i){if(this.table.options.groupBy){!i&&t instanceof Ci&&(t=this.table.rowManager.prevDisplayRow(e)||t);var n=t instanceof Ci?t:t.modules.group,r=e instanceof Ci?e:e.modules.group;n===r?this.table.rowManager.moveRowInArray(n.rows,e,t,i):(r&&r.removeRow(e),n.insertRow(e,t,i))}}rowDeleting(e){this.table.options.groupBy&&e.modules.group&&e.modules.group.removeRow(e)}rowsUpdated(e){this.table.options.groupBy&&this.updateGroupRows(!0)}cellUpdated(e){this.table.options.groupBy&&this.reassignRowToGroup(e.row)}getRows(e){return this.table.options.groupBy&&this.groupIDLookups.length?(this.dispatchExternal("dataGrouping"),this.generateGroups(e),this.subscribedExternal("dataGrouped")&&this.dispatchExternal("dataGrouped",this.getGroups(!0)),this.updateGroupRows()):e.slice(0)}getGroups(e){var t=[];return this.groupList.forEach(function(i){t.push(e?i.getComponent():i)}),t}getChildGroups(e){var t=[];return e||(e=this),e.groupList.forEach(i=>{i.groupList.length?t=t.concat(this.getChildGroups(i)):t.push(i)}),t}wipe(){this.table.options.groupBy&&(this.groupList.forEach(function(e){e.wipe()}),this.groupList=[],this.groups={})}pullGroupListData(e){var t=[];return e.forEach(i=>{var n={};n.level=0,n.rowCount=0,n.headerContent="";var r=[];i.hasSubGroups?(r=this.pullGroupListData(i.groupList),n.level=i.level,n.rowCount=r.length-i.groupList.length,n.headerContent=i.generator(i.key,n.rowCount,i.rows,i),t.push(n),t=t.concat(r)):(n.level=i.level,n.headerContent=i.generator(i.key,i.rows.length,i.rows,i),n.rowCount=i.getRows().length,t.push(n),i.getRows().forEach(a=>{t.push(a.getData("data"))}))}),t}getGroupedData(){return this.pullGroupListData(this.groupList)}getRowGroup(e){var t=!1;return this.options("dataTree")&&(e=this.table.modules.dataTree.getTreeParentRoot(e)),this.groupList.forEach(i=>{var n=i.getRowGroup(e);n&&(t=n)}),t}countGroups(){return this.groupList.length}generateGroups(e){var t=this.groups;this.groups={},this.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(i=>{this.createGroup(i,0,t)}),e.forEach(i=>{this.assignRowToExistingGroup(i,t)})):e.forEach(i=>{this.assignRowToGroup(i,t)}),Object.values(t).forEach(i=>{i.wipe(!0)})}createGroup(e,t,i){var n=t+"_"+e,r;i=i||[],r=new Ci(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],i[n]),this.groups[n]=r,this.groupList.push(r)}assignRowToExistingGroup(e,t){var i=this.groupIDLookups[0].func(e.getData()),n="0_"+i;this.groups[n]&&this.groups[n].addRow(e)}assignRowToGroup(e,t){var i=this.groupIDLookups[0].func(e.getData()),n=!this.groups["0_"+i];return n&&this.createGroup(i,0,t),this.groups["0_"+i].addRow(e),!n}reassignRowToGroup(e){if(e.type==="row"){var t=e.modules.group,i=t.getPath(),n=this.getExpectedPath(e),r;r=i.length==n.length&&i.every((a,o)=>a===n[o]),r||(t.removeRow(e),this.assignRowToGroup(e,this.groups),this.refreshData(!0))}}getExpectedPath(e){var t=[],i=e.getData();return this.groupIDLookups.forEach(n=>{t.push(n.func(i))}),t}updateGroupRows(e){var t=[];return this.blockRedraw||(this.groupList.forEach(i=>{t=t.concat(i.getHeadersAndRows())}),e&&this.refreshData(!0)),t}scrollHeaders(e){this.table.options.groupBy&&(this.table.options.renderHorizontal==="virtual"&&(e-=this.table.columnManager.renderer.vDomPadLeft),e=e+"px",this.groupList.forEach(t=>{t.scrollHeader(e)}))}removeGroup(e){var t=e.level+"_"+e.key,i;this.groups[t]&&(delete this.groups[t],i=this.groupList.indexOf(e),i>-1&&this.groupList.splice(i,1))}checkBasicModeGroupHeaderWidth(){var e=this.table.rowManager.tableElement,t=!0;this.table.rowManager.getDisplayRows().forEach((i,n)=>{this.table.rowManager.styleRow(i,n),e.appendChild(i.getElement()),i.initialize(!0),i.type!=="group"&&(t=!1)}),t?e.style.minWidth=this.table.columnManager.getWidth()+"px":e.style.minWidth=""}}var Yf={cellEdit:function(s){s.component.setValueProcessData(s.data.oldValue),s.component.cellRendered()},rowAdd:function(s){s.component.deleteActual(),this.table.rowManager.checkPlaceholder()},rowDelete:function(s){var e=this.table.rowManager.addRowActual(s.data.data,s.data.pos,s.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(s.component,e),this.table.rowManager.checkPlaceholder()},rowMove:function(s){var e=s.data.posFrom-s.data.posTo>0;this.table.rowManager.moveRowActual(s.component,this.table.rowManager.getRowFromPosition(s.data.posFrom),e),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}},Gf={cellEdit:function(s){s.component.setValueProcessData(s.data.newValue),s.component.cellRendered()},rowAdd:function(s){var e=this.table.rowManager.addRowActual(s.data.data,s.data.pos,s.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(s.component,e),this.table.rowManager.checkPlaceholder()},rowDelete:function(s){s.component.deleteActual(),this.table.rowManager.checkPlaceholder()},rowMove:function(s){this.table.rowManager.moveRowActual(s.component,this.table.rowManager.getRowFromPosition(s.data.posTo),s.data.after),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}},$f={undo:["ctrl + 90","meta + 90"],redo:["ctrl + 89","meta + 89"]},Uf={undo:function(s){var e=!1;this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell,e||(s.preventDefault(),this.table.modules.history.undo()))},redo:function(s){var e=!1;this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell,e||(s.preventDefault(),this.table.modules.history.redo()))}},Kf={keybindings:{bindings:$f,actions:Uf}};class As extends ke{static moduleName="history";static moduleExtensions=Kf;static undoers=Yf;static redoers=Gf;constructor(e){super(e),this.history=[],this.index=-1,this.registerTableOption("history",!1)}initialize(){this.table.options.history&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("cell-delete",this.clearComponentHistory.bind(this)),this.subscribe("row-delete",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clear.bind(this)),this.subscribe("row-added",this.rowAdded.bind(this)),this.subscribe("row-move",this.rowMoved.bind(this))),this.registerTableFunction("undo",this.undo.bind(this)),this.registerTableFunction("redo",this.redo.bind(this)),this.registerTableFunction("getHistoryUndoSize",this.getHistoryUndoSize.bind(this)),this.registerTableFunction("getHistoryRedoSize",this.getHistoryRedoSize.bind(this)),this.registerTableFunction("clearHistory",this.clear.bind(this))}rowMoved(e,t,i){this.action("rowMove",e,{posFrom:e.getPosition(),posTo:t.getPosition(),to:t,after:i})}rowAdded(e,t,i,n){this.action("rowAdd",e,{data:t,pos:i,index:n})}rowDeleted(e){var t,i;this.table.options.groupBy?(i=e.getComponent().getGroup()._getSelf().rows,t=i.indexOf(e),t&&(t=i[t-1])):(t=e.table.rowManager.getRowIndex(e),t&&(t=e.table.rowManager.rows[t-1])),this.action("rowDelete",e,{data:e.getData(),pos:!t,index:t})}cellUpdated(e){this.action("cellEdit",e,{oldValue:e.oldValue,newValue:e.value})}clear(){this.history=[],this.index=-1}action(e,t,i){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:i}),this.index++}getHistoryUndoSize(){return this.index+1}getHistoryRedoSize(){return this.history.length-(this.index+1)}clearComponentHistory(e){var t=this.history.findIndex(function(i){return i.component===e});t>-1&&(this.history.splice(t,1),t<=this.index&&this.index--,this.clearComponentHistory(e))}undo(){if(this.index>-1){let e=this.history[this.index];return As.undoers[e.type].call(this,e),this.index--,this.dispatchExternal("historyUndo",e.type,e.component.getComponent(),e.data),!0}else return console.warn(this.options("history")?"History Undo Error - No more history to undo":"History module not enabled"),!1}redo(){if(this.history.length-1>this.index){this.index++;let e=this.history[this.index];return As.redoers[e.type].call(this,e),this.dispatchExternal("historyRedo",e.type,e.component.getComponent(),e.data),!0}else return console.warn(this.options("history")?"History Redo Error - No more history to redo":"History module not enabled"),!1}_rebindRow(e,t){this.history.forEach(function(i){if(i.component instanceof Qe)i.component===e&&(i.component=t);else if(i.component instanceof Yi&&i.component.row===e){var n=i.component.column.getField();n&&(i.component=t.getCell(n))}})}}class qf extends ke{static moduleName="htmlTableImport";constructor(e){super(e),this.fieldIndex=[],this.hasIndex=!1}initialize(){this.tableElementCheck()}tableElementCheck(){this.table.originalElement&&this.table.originalElement.tagName==="TABLE"&&(this.table.originalElement.childNodes.length?this.parseTable():console.warn("Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element."))}parseTable(){var e=this.table.originalElement,t=this.table.options,i=e.getElementsByTagName("th"),n=e.getElementsByTagName("tbody")[0],r=[];this.hasIndex=!1,this.dispatchExternal("htmlImporting"),n=n?n.getElementsByTagName("tr"):[],this._extractOptions(e,t),i.length?this._extractHeaders(i,n):this._generateBlankHeaders(i,n);for(var a=0;a<n.length;a++){var o=n[a],l=o.getElementsByTagName("td"),u={};this.hasIndex||(u[t.index]=a);for(var h=0;h<l.length;h++){var m=l[h];typeof this.fieldIndex[h]<"u"&&(u[this.fieldIndex[h]]=m.innerHTML)}r.push(u)}t.data=r,this.dispatchExternal("htmlImported")}_extractOptions(e,t,i){var n=e.attributes,r=Object.keys(i||t),a={};r.forEach(h=>{a[h.toLowerCase()]=h});for(var o in n){var l=n[o],u;l&&typeof l=="object"&&l.name&&l.name.indexOf("tabulator-")===0&&(u=l.name.replace("tabulator-",""),typeof a[u]<"u"&&(t[a[u]]=this._attribValue(l.value)))}}_attribValue(e){return e==="true"?!0:e==="false"?!1:e}_findCol(e){var t=this.table.options.columns.find(i=>i.title===e);return t||!1}_extractHeaders(e,t){for(var i=0;i<e.length;i++){var n=e[i],r=!1,a=this._findCol(n.textContent),o;a?r=!0:a={title:n.textContent.trim()},a.field||(a.field=n.textContent.trim().toLowerCase().replaceAll(" ","_")),o=n.getAttribute("width"),o&&!a.width&&(a.width=o),this._extractOptions(n,a,this.table.columnManager.optionsList.registeredDefaults),this.fieldIndex[i]=a.field,a.field==this.table.options.index&&(this.hasIndex=!0),r||this.table.options.columns.push(a)}}_generateBlankHeaders(e,t){for(var i=0;i<e.length;i++){var n=e[i],r={title:"",field:"col"+i};this.fieldIndex[i]=r.field;var a=n.getAttribute("width");a&&(r.width=a),this.table.options.columns.push(r)}}}function Jf(s){var e=[],t=0,i=0,n=!1;for(let r=0;r<s.length;r++){let a=s[r],o=s[r+1];if(e[t]||(e[t]=[]),e[t][i]||(e[t][i]=""),a=='"'&&n&&o=='"'){e[t][i]+=a,r++;continue}if(a=='"'){n=!n;continue}if(a==","&&!n){i++;continue}if(a=="\r"&&o==`
33
+ `&&!n){i=0,t++,r++;continue}if((a=="\r"||a==`
34
+ `)&&!n){i=0,t++;continue}e[t][i]+=a}return e}function Xf(s){try{return JSON.parse(s)}catch(e){return console.warn("JSON Import Error - File contents is invalid JSON",e),Promise.reject()}}function Zf(s){return s}function Qf(s){var e=this.dependencyRegistry.lookup("XLSX"),t=e.read(s),i=t.Sheets[t.SheetNames[0]];return e.utils.sheet_to_json(i,{header:1})}var ep={csv:Jf,json:Xf,array:Zf,xlsx:Qf};class An extends ke{static moduleName="import";static importers=ep;constructor(e){super(e),this.registerTableOption("importFormat"),this.registerTableOption("importReader","text"),this.registerTableOption("importHeaderTransform"),this.registerTableOption("importValueTransform"),this.registerTableOption("importDataValidator"),this.registerTableOption("importFileValidator")}initialize(){this.registerTableFunction("import",this.importFromFile.bind(this)),this.table.options.importFormat&&(this.subscribe("data-loading",this.loadDataCheck.bind(this),10),this.subscribe("data-load",this.loadData.bind(this),10))}loadDataCheck(e){return this.table.options.importFormat&&(typeof e=="string"||Array.isArray(e)&&e.length&&Array.isArray(e))}loadData(e,t,i,n,r){return this.importData(this.lookupImporter(),e).then(this.structureData.bind(this)).catch(a=>(console.error("Import Error:",a||"Unable to import data"),Promise.reject(a)))}lookupImporter(e){var t;return e||(e=this.table.options.importFormat),typeof e=="string"?t=An.importers[e]:t=e,t||console.error("Import Error - Importer not found:",e),t}importFromFile(e,t,i){var n=this.lookupImporter(e);if(n)return this.pickFile(t,i).then(this.importData.bind(this,n)).then(this.structureData.bind(this)).then(this.mutateData.bind(this)).then(this.validateData.bind(this)).then(this.setData.bind(this)).catch(r=>(this.dispatch("import-error",r),this.dispatchExternal("importError",r),console.error("Import Error:",r||"Unable to import file"),this.table.dataLoader.alertError(),setTimeout(()=>{this.table.dataLoader.clearAlert()},3e3),Promise.reject(r)))}pickFile(e,t){return new Promise((i,n)=>{var r=document.createElement("input");r.type="file",r.accept=e,r.addEventListener("change",a=>{var o=r.files[0],l=new FileReader,u=this.validateFile(o);if(u===!0){switch(this.dispatch("import-importing",r.files),this.dispatchExternal("importImporting",r.files),t||this.table.options.importReader){case"buffer":l.readAsArrayBuffer(o);break;case"binary":l.readAsBinaryString(o);break;case"url":l.readAsDataURL(o);break;case"text":default:l.readAsText(o)}l.onload=h=>{i(l.result)},l.onerror=h=>{console.warn("File Load Error - Unable to read file"),n(h)}}else n(u)}),this.dispatch("import-choose"),this.dispatchExternal("importChoose"),r.click()})}importData(e,t){var i;return this.table.dataLoader.alertLoader(),new Promise((n,r)=>{setTimeout(()=>{i=e.call(this.table,t),i instanceof Promise||i?n(i):r()},10)})}structureData(e){var t=[];return Array.isArray(e)&&e.length&&Array.isArray(e[0])?(this.table.options.autoColumns?t=this.structureArrayToObject(e):t=this.structureArrayToColumns(e),t):e}mutateData(e){var t=[];return Array.isArray(e)?e.forEach(i=>{t.push(this.table.modules.mutator.transformRow(i,"import"))}):t=e,t}transformHeader(e){var t=[];if(this.table.options.importHeaderTransform)e.forEach(i=>{t.push(this.table.options.importHeaderTransform.call(this.table,i,e))});else return e;return t}transformData(e){var t=[];if(this.table.options.importValueTransform)e.forEach(i=>{t.push(this.table.options.importValueTransform.call(this.table,i,e))});else return e;return t}structureArrayToObject(e){var t=this.transformHeader(e.shift()),i=e.map(n=>{var r={};return n=this.transformData(n),t.forEach((a,o)=>{r[a]=n[o]}),r});return i}structureArrayToColumns(e){var t=[],i=this.transformHeader(e[0]),n=this.table.getColumns();return n[0]&&i[0]&&n[0].getDefinition().title===i[0]&&e.shift(),e.forEach(r=>{var a={};r=this.transformData(r),r.forEach((o,l)=>{var u=n[l];u&&(a[u.getField()]=o)}),t.push(a)}),t}validateFile(e){return this.table.options.importFileValidator?this.table.options.importFileValidator.call(this.table,e):!0}validateData(e){var t;return this.table.options.importDataValidator?(t=this.table.options.importDataValidator.call(this.table,e),t===!0?e:Promise.reject(t)):e}setData(e){return this.dispatch("import-imported",e),this.dispatchExternal("importImported",e),this.table.dataLoader.clearAlert(),this.table.setData(e)}}class tp extends ke{static moduleName="interaction";constructor(e){super(e),this.eventMap={rowClick:"row-click",rowDblClick:"row-dblclick",rowContext:"row-contextmenu",rowMouseEnter:"row-mouseenter",rowMouseLeave:"row-mouseleave",rowMouseOver:"row-mouseover",rowMouseOut:"row-mouseout",rowMouseMove:"row-mousemove",rowMouseDown:"row-mousedown",rowMouseUp:"row-mouseup",rowTap:"row",rowDblTap:"row",rowTapHold:"row",cellClick:"cell-click",cellDblClick:"cell-dblclick",cellContext:"cell-contextmenu",cellMouseEnter:"cell-mouseenter",cellMouseLeave:"cell-mouseleave",cellMouseOver:"cell-mouseover",cellMouseOut:"cell-mouseout",cellMouseMove:"cell-mousemove",cellMouseDown:"cell-mousedown",cellMouseUp:"cell-mouseup",cellTap:"cell",cellDblTap:"cell",cellTapHold:"cell",headerClick:"column-click",headerDblClick:"column-dblclick",headerContext:"column-contextmenu",headerMouseEnter:"column-mouseenter",headerMouseLeave:"column-mouseleave",headerMouseOver:"column-mouseover",headerMouseOut:"column-mouseout",headerMouseMove:"column-mousemove",headerMouseDown:"column-mousedown",headerMouseUp:"column-mouseup",headerTap:"column",headerDblTap:"column",headerTapHold:"column",groupClick:"group-click",groupDblClick:"group-dblclick",groupContext:"group-contextmenu",groupMouseEnter:"group-mouseenter",groupMouseLeave:"group-mouseleave",groupMouseOver:"group-mouseover",groupMouseOut:"group-mouseout",groupMouseMove:"group-mousemove",groupMouseDown:"group-mousedown",groupMouseUp:"group-mouseup",groupTap:"group",groupDblTap:"group",groupTapHold:"group"},this.subscribers={},this.touchSubscribers={},this.columnSubscribers={},this.touchWatchers={row:{tap:null,tapDbl:null,tapHold:null},cell:{tap:null,tapDbl:null,tapHold:null},column:{tap:null,tapDbl:null,tapHold:null},group:{tap:null,tapDbl:null,tapHold:null}},this.registerColumnOption("headerClick"),this.registerColumnOption("headerDblClick"),this.registerColumnOption("headerContext"),this.registerColumnOption("headerMouseEnter"),this.registerColumnOption("headerMouseLeave"),this.registerColumnOption("headerMouseOver"),this.registerColumnOption("headerMouseOut"),this.registerColumnOption("headerMouseMove"),this.registerColumnOption("headerMouseDown"),this.registerColumnOption("headerMouseUp"),this.registerColumnOption("headerTap"),this.registerColumnOption("headerDblTap"),this.registerColumnOption("headerTapHold"),this.registerColumnOption("cellClick"),this.registerColumnOption("cellDblClick"),this.registerColumnOption("cellContext"),this.registerColumnOption("cellMouseEnter"),this.registerColumnOption("cellMouseLeave"),this.registerColumnOption("cellMouseOver"),this.registerColumnOption("cellMouseOut"),this.registerColumnOption("cellMouseMove"),this.registerColumnOption("cellMouseDown"),this.registerColumnOption("cellMouseUp"),this.registerColumnOption("cellTap"),this.registerColumnOption("cellDblTap"),this.registerColumnOption("cellTapHold")}initialize(){this.initializeExternalEvents(),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("cell-dblclick",this.cellContentsSelectionFixer.bind(this)),this.subscribe("scroll-horizontal",this.clearTouchWatchers.bind(this)),this.subscribe("scroll-vertical",this.clearTouchWatchers.bind(this))}clearTouchWatchers(){var e=Object.values(this.touchWatchers);e.forEach(t=>{for(let i in t)t[i]=null})}cellContentsSelectionFixer(e,t){var i;if(!(this.table.modExists("edit")&&this.table.modules.edit.currentCell===t)){e.preventDefault();try{document.selection?(i=document.body.createTextRange(),i.moveToElementText(t.getElement()),i.select()):window.getSelection&&(i=document.createRange(),i.selectNode(t.getElement()),window.getSelection().removeAllRanges(),window.getSelection().addRange(i))}catch{}}}initializeExternalEvents(){for(let e in this.eventMap)this.subscriptionChangeExternal(e,this.subscriptionChanged.bind(this,e))}subscriptionChanged(e,t){t?this.subscribers[e]||(this.eventMap[e].includes("-")?(this.subscribers[e]=this.handle.bind(this,e),this.subscribe(this.eventMap[e],this.subscribers[e])):this.subscribeTouchEvents(e)):this.eventMap[e].includes("-")?this.subscribers[e]&&!this.columnSubscribers[e]&&!this.subscribedExternal(e)&&(this.unsubscribe(this.eventMap[e],this.subscribers[e]),delete this.subscribers[e]):this.unsubscribeTouchEvents(e)}subscribeTouchEvents(e){var t=this.eventMap[e];this.touchSubscribers[t+"-touchstart"]||(this.touchSubscribers[t+"-touchstart"]=this.handleTouch.bind(this,t,"start"),this.touchSubscribers[t+"-touchend"]=this.handleTouch.bind(this,t,"end"),this.subscribe(t+"-touchstart",this.touchSubscribers[t+"-touchstart"]),this.subscribe(t+"-touchend",this.touchSubscribers[t+"-touchend"])),this.subscribers[e]=!0}unsubscribeTouchEvents(e){var t=!0,i=this.eventMap[e];if(this.subscribers[e]&&!this.subscribedExternal(e)){delete this.subscribers[e];for(let n in this.eventMap)this.eventMap[n]===i&&this.subscribers[n]&&(t=!1);t&&(this.unsubscribe(i+"-touchstart",this.touchSubscribers[i+"-touchstart"]),this.unsubscribe(i+"-touchend",this.touchSubscribers[i+"-touchend"]),delete this.touchSubscribers[i+"-touchstart"],delete this.touchSubscribers[i+"-touchend"])}}initializeColumn(e){var t=e.definition;for(let i in this.eventMap)t[i]&&(this.subscriptionChanged(i,!0),this.columnSubscribers[i]||(this.columnSubscribers[i]=[]),this.columnSubscribers[i].push(e))}handle(e,t,i){this.dispatchEvent(e,t,i)}handleTouch(e,t,i,n){var r=this.touchWatchers[e];switch(e==="column"&&(e="header"),t){case"start":r.tap=!0,clearTimeout(r.tapHold),r.tapHold=setTimeout(()=>{clearTimeout(r.tapHold),r.tapHold=null,r.tap=null,clearTimeout(r.tapDbl),r.tapDbl=null,this.dispatchEvent(e+"TapHold",i,n)},1e3);break;case"end":r.tap&&(r.tap=null,this.dispatchEvent(e+"Tap",i,n)),r.tapDbl?(clearTimeout(r.tapDbl),r.tapDbl=null,this.dispatchEvent(e+"DblTap",i,n)):r.tapDbl=setTimeout(()=>{clearTimeout(r.tapDbl),r.tapDbl=null},300),clearTimeout(r.tapHold),r.tapHold=null;break}}dispatchEvent(e,t,i){var n=i.getComponent(),r;this.columnSubscribers[e]&&(i instanceof Yi?r=i.column.definition[e]:i instanceof _t&&(r=i.definition[e]),r&&r(t,n)),this.dispatchExternal(e,t,n)}}var ip={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,navLeft:37,navRight:39,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35},sp={keyBlock:function(s){s.stopPropagation(),s.preventDefault()},scrollPageUp:function(s){var e=this.table.rowManager,t=e.scrollTop-e.element.clientHeight;s.preventDefault(),e.displayRowsCount&&(t>=0?e.element.scrollTop=t:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(s){var e=this.table.rowManager,t=e.scrollTop+e.element.clientHeight,i=e.element.scrollHeight;s.preventDefault(),e.displayRowsCount&&(t<=i?e.element.scrollTop=t:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(s){var e=this.table.rowManager;s.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(s){var e=this.table.rowManager;s.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(s){this.dispatch("keybinding-nav-prev",s)},navNext:function(s){this.dispatch("keybinding-nav-next",s)},navLeft:function(s){this.dispatch("keybinding-nav-left",s)},navRight:function(s){this.dispatch("keybinding-nav-right",s)},navUp:function(s){this.dispatch("keybinding-nav-up",s)},navDown:function(s){this.dispatch("keybinding-nav-down",s)}};class $i extends ke{static moduleName="keybindings";static bindings=ip;static actions=sp;constructor(e){super(e),this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1,this.registerTableOption("keybindings",{}),this.registerTableOption("tabEndNewRow",!1)}initialize(){var e=this.table.options.keybindings,t={};this.watchKeys={},this.pressedKeys=[],e!==!1&&(Object.assign(t,$i.bindings),Object.assign(t,e),this.mapBindings(t),this.bindEvents()),this.subscribe("table-destroy",this.clearBindings.bind(this))}mapBindings(e){for(let t in e)$i.actions[t]?e[t]&&(typeof e[t]!="object"&&(e[t]=[e[t]]),e[t].forEach(i=>{var n=Array.isArray(i)?i:[i];n.forEach(r=>{this.mapBinding(t,r)})})):console.warn("Key Binding Error - no such action:",t)}mapBinding(e,t){var i={action:$i.actions[e],keys:[],ctrl:!1,shift:!1,meta:!1},n=t.toString().toLowerCase().split(" ").join("").split("+");n.forEach(r=>{switch(r){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;case"meta":i.meta=!0;break;default:r=isNaN(r)?r.toUpperCase().charCodeAt(0):parseInt(r),i.keys.push(r),this.watchKeys[r]||(this.watchKeys[r]=[]),this.watchKeys[r].push(i)}})}bindEvents(){var e=this;this.keyupBinding=function(t){var i=t.keyCode,n=e.watchKeys[i];n&&(e.pressedKeys.push(i),n.forEach(function(r){e.checkBinding(t,r)}))},this.keydownBinding=function(t){var i=t.keyCode,n=e.watchKeys[i];if(n){var r=e.pressedKeys.indexOf(i);r>-1&&e.pressedKeys.splice(r,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)}clearBindings(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)}checkBinding(e,t){var i=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta?(t.keys.forEach(n=>{var r=this.pressedKeys.indexOf(n);r==-1&&(i=!1)}),i&&t.action.call(this,e),!0):!1}}class np extends ke{static moduleName="menu";constructor(e){super(e),this.menuContainer=null,this.nestedMenuBlock=!1,this.currentComponent=null,this.rootPopup=null,this.columnSubscribers={},this.registerTableOption("rowContextMenu",!1),this.registerTableOption("rowClickMenu",!1),this.registerTableOption("rowDblClickMenu",!1),this.registerTableOption("groupContextMenu",!1),this.registerTableOption("groupClickMenu",!1),this.registerTableOption("groupDblClickMenu",!1),this.registerColumnOption("headerContextMenu"),this.registerColumnOption("headerClickMenu"),this.registerColumnOption("headerDblClickMenu"),this.registerColumnOption("headerMenu"),this.registerColumnOption("headerMenuIcon"),this.registerColumnOption("contextMenu"),this.registerColumnOption("clickMenu"),this.registerColumnOption("dblClickMenu")}initialize(){this.deprecatedOptionsCheck(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){}initializeRowWatchers(){this.table.options.rowContextMenu&&(this.subscribe("row-contextmenu",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu)),this.table.on("rowTapHold",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu))),this.table.options.rowClickMenu&&this.subscribe("row-click",this.loadMenuEvent.bind(this,this.table.options.rowClickMenu)),this.table.options.rowDblClickMenu&&this.subscribe("row-dblclick",this.loadMenuEvent.bind(this,this.table.options.rowDblClickMenu))}initializeGroupWatchers(){this.table.options.groupContextMenu&&(this.subscribe("group-contextmenu",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu)),this.table.on("groupTapHold",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu))),this.table.options.groupClickMenu&&this.subscribe("group-click",this.loadMenuEvent.bind(this,this.table.options.groupClickMenu)),this.table.options.groupDblClickMenu&&this.subscribe("group-dblclick",this.loadMenuEvent.bind(this,this.table.options.groupDblClickMenu))}initializeColumn(e){var t=e.definition;t.headerContextMenu&&!this.columnSubscribers.headerContextMenu&&(this.columnSubscribers.headerContextMenu=this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextMenu),this.table.on("headerTapHold",this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"))),t.headerClickMenu&&!this.columnSubscribers.headerClickMenu&&(this.columnSubscribers.headerClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerClickMenu"),this.subscribe("column-click",this.columnSubscribers.headerClickMenu)),t.headerDblClickMenu&&!this.columnSubscribers.headerDblClickMenu&&(this.columnSubscribers.headerDblClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerDblClickMenu"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickMenu)),t.headerMenu&&this.initializeColumnHeaderMenu(e),t.contextMenu&&!this.columnSubscribers.contextMenu&&(this.columnSubscribers.contextMenu=this.loadMenuTableCellEvent.bind(this,"contextMenu"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextMenu),this.table.on("cellTapHold",this.loadMenuTableCellEvent.bind(this,"contextMenu"))),t.clickMenu&&!this.columnSubscribers.clickMenu&&(this.columnSubscribers.clickMenu=this.loadMenuTableCellEvent.bind(this,"clickMenu"),this.subscribe("cell-click",this.columnSubscribers.clickMenu)),t.dblClickMenu&&!this.columnSubscribers.dblClickMenu&&(this.columnSubscribers.dblClickMenu=this.loadMenuTableCellEvent.bind(this,"dblClickMenu"),this.subscribe("cell-dblclick",this.columnSubscribers.dblClickMenu))}initializeColumnHeaderMenu(e){var t=e.definition.headerMenuIcon,i;i=document.createElement("span"),i.classList.add("tabulator-header-popup-button"),t?(typeof t=="function"&&(t=t(e.getComponent())),t instanceof HTMLElement?i.appendChild(t):i.innerHTML=t):i.innerHTML="&vellip;",i.addEventListener("click",n=>{n.stopPropagation(),n.preventDefault(),this.loadMenuEvent(e.definition.headerMenu,n,e)}),e.titleElement.insertBefore(i,e.titleElement.firstChild)}loadMenuTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadMenuEvent(i.column.definition[e],t,i)}loadMenuTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadMenuEvent(i.definition[e],t,i)}loadMenuEvent(e,t,i){i._group?i=i._group:i._row&&(i=i._row),e=typeof e=="function"?e.call(this.table,t,i.getComponent()):e,this.loadMenu(t,i,e)}loadMenu(e,t,i,n,r){var a=!(e instanceof MouseEvent),o=document.createElement("div"),l;if(o.classList.add("tabulator-menu"),a||e.preventDefault(),!(!i||!i.length)){if(n)l=r.child(o);else{if(this.nestedMenuBlock){if(this.rootPopup)return}else this.nestedMenuBlock=setTimeout(()=>{this.nestedMenuBlock=!1},100);this.rootPopup&&this.rootPopup.hide(),this.rootPopup=l=this.popup(o)}i.forEach(u=>{var h=document.createElement("div"),m=u.label,v=u.disabled;u.separator?h.classList.add("tabulator-menu-separator"):(h.classList.add("tabulator-menu-item"),typeof m=="function"&&(m=m.call(this.table,t.getComponent())),m instanceof Node?h.appendChild(m):h.innerHTML=m,typeof v=="function"&&(v=v.call(this.table,t.getComponent())),v?(h.classList.add("tabulator-menu-item-disabled"),h.addEventListener("click",C=>{C.stopPropagation()})):u.menu&&u.menu.length?h.addEventListener("click",C=>{C.stopPropagation(),this.loadMenu(C,t,u.menu,h,l)}):u.action&&h.addEventListener("click",C=>{u.action(C,t.getComponent())}),u.menu&&u.menu.length&&h.classList.add("tabulator-menu-item-submenu")),o.appendChild(h)}),o.addEventListener("click",u=>{this.rootPopup&&this.rootPopup.hide()}),l.show(n||e),l===this.rootPopup&&(this.rootPopup.hideOnBlur(()=>{this.rootPopup=null,this.currentComponent&&(this.dispatch("menu-closed",i,l),this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)}),this.currentComponent=t,this.dispatch("menu-opened",i,l),this.dispatchExternal("menuOpened",t.getComponent()))}}}class rp extends ke{static moduleName="moveColumn";constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.registerTableOption("movableColumns",!1)}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e}initialize(){this.table.options.movableColumns&&(this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("alert-show",this.abortMove.bind(this)))}abortMove(){clearTimeout(this.checkTimeout)}initializeColumn(e){var t=this,i={},n;!e.modules.frozen&&!e.isGroup&&!e.isRowHeader&&(n=e.getElement(),i.mousemove=(function(r){e.parent===t.moving.parent&&((t.touchMove?r.touches[0].pageX:r.pageX)-He.elOffset(n).left+t.table.columnManager.contentsElement.scrollLeft>e.getWidth()/2?(t.toCol!==e||!t.toColAfter)&&(n.parentNode.insertBefore(t.placeholderElement,n.nextSibling),t.moveColumn(e,!0)):(t.toCol!==e||t.toColAfter)&&(n.parentNode.insertBefore(t.placeholderElement,n),t.moveColumn(e,!1)))}).bind(t),n.addEventListener("mousedown",function(r){t.touchMove=!1,r.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(r,e)},t.checkPeriod))}),n.addEventListener("mouseup",function(r){r.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),t.bindTouchEvents(e)),e.modules.moveColumn=i}bindTouchEvents(e){var t=e.getElement(),i=!1,n,r,a,o,l,u;t.addEventListener("touchstart",h=>{this.checkTimeout=setTimeout(()=>{this.touchMove=!0,n=e.nextColumn(),a=n?n.getWidth()/2:0,r=e.prevColumn(),o=r?r.getWidth()/2:0,l=0,u=0,i=!1,this.startMove(h,e)},this.checkPeriod)},{passive:!0}),t.addEventListener("touchmove",h=>{var m,v;this.moving&&(this.moveHover(h),i||(i=h.touches[0].pageX),m=h.touches[0].pageX-i,m>0?n&&m-l>a&&(v=n,v!==e&&(i=h.touches[0].pageX,v.getElement().parentNode.insertBefore(this.placeholderElement,v.getElement().nextSibling),this.moveColumn(v,!0))):r&&-m-u>o&&(v=r,v!==e&&(i=h.touches[0].pageX,v.getElement().parentNode.insertBefore(this.placeholderElement,v.getElement()),this.moveColumn(v,!1))),v&&(n=v.nextColumn(),l=a,a=n?n.getWidth()/2:0,r=v.prevColumn(),u=o,o=r?r.getWidth()/2:0))},{passive:!0}),t.addEventListener("touchend",h=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&this.endMove(h)})}startMove(e,t){var i=t.getElement(),n=this.table.columnManager.getContentsElement(),r=this.table.columnManager.getHeadersElement();this.table.modules.selectRange&&this.table.modules.selectRange.columnSelection&&this.table.modules.selectRange.mousedown&&this.table.modules.selectRange.selecting==="column"||(this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-He.elOffset(i).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),n.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom=n.clientHeight-r.offsetHeight+"px",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e),this.dispatch("column-moving",e,this.moving))}_bindMouseMove(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})}_unbindMouseMove(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})}moveColumn(e,t){var i=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(n,r){var a=n.getElement(!0);a.parentNode&&i[r]&&a.parentNode.insertBefore(i[r].getElement(),a.nextSibling)}):e.getCells().forEach(function(n,r){var a=n.getElement(!0);a.parentNode&&i[r]&&a.parentNode.insertBefore(i[r].getElement(),a)})}endMove(e){(e.which===1||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))}moveHover(e){var t=this.table.columnManager.getContentsElement(),i=t.scrollLeft,n=(this.touchMove?e.touches[0].pageX:e.pageX)-He.elOffset(t).left+i,r;this.hoverElement.style.left=n-this.startX+"px",n-i<this.autoScrollMargin&&(this.autoScrollTimeout||(this.autoScrollTimeout=setTimeout(()=>{r=Math.max(0,i-5),this.table.rowManager.getElement().scrollLeft=r,this.autoScrollTimeout=!1},1))),i+t.clientWidth-n<this.autoScrollMargin&&(this.autoScrollTimeout||(this.autoScrollTimeout=setTimeout(()=>{r=Math.min(t.clientWidth,i+5),this.table.rowManager.getElement().scrollLeft=r,this.autoScrollTimeout=!1},1)))}}var ap={delete:function(s,e,t){s.delete()}},op={insert:function(s,e,t){return this.table.addRow(s.getData(),void 0,e),!0},add:function(s,e,t){return this.table.addRow(s.getData()),!0},update:function(s,e,t){return e?(e.update(s.getData()),!0):!1},replace:function(s,e,t){return e?(this.table.addRow(s.getData(),void 0,e),e.delete(),!0):!1}};class Hs extends ke{static moduleName="moveRow";static senders=ap;static receivers=op;constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1,this.registerTableOption("movableRows",!1),this.registerTableOption("movableRowsConnectedTables",!1),this.registerTableOption("movableRowsConnectedElements",!1),this.registerTableOption("movableRowsSender",!1),this.registerTableOption("movableRowsReceiver","insert"),this.registerColumnOption("rowHandle")}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e}initialize(){this.table.options.movableRows&&(this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements,this.subscribe("cell-init",this.initializeCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)))}initializeGroupHeader(e){var t=this,i={};i.mouseup=(function(n){t.tableRowDrop(n,e)}).bind(t),i.mousemove=(function(n){var r;n.pageY-He.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?(t.toRow!==e||!t.toRowAfter)&&(r=e.getElement(),r.parentNode.insertBefore(t.placeholderElement,r.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(r=e.getElement(),r.previousSibling&&(r.parentNode.insertBefore(t.placeholderElement,r),t.moveRow(e,!1)))}).bind(t),e.modules.moveRow=i}initializeRow(e){var t=this,i={},n;i.mouseup=(function(r){t.tableRowDrop(r,e)}).bind(t),i.mousemove=(function(r){var a=e.getElement();r.pageY-He.elOffset(a).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?(t.toRow!==e||!t.toRowAfter)&&(a.parentNode.insertBefore(t.placeholderElement,a.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(a.parentNode.insertBefore(t.placeholderElement,a),t.moveRow(e,!1))}).bind(t),this.hasHandle||(n=e.getElement(),n.addEventListener("mousedown",function(r){r.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(r,e)},t.checkPeriod))}),n.addEventListener("mouseup",function(r){r.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=i}initializeColumn(e){e.definition.rowHandle&&this.table.options.movableRows!==!1&&(this.hasHandle=!0)}initializeCell(e){if(e.column.definition.rowHandle&&this.table.options.movableRows!==!1){var t=this,i=e.getElement(!0);i.addEventListener("mousedown",function(n){n.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(n,e.row)},t.checkPeriod))}),i.addEventListener("mouseup",function(n){n.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e.row,i)}}bindTouchEvents(e,t){var i=!1,n,r,a,o,l,u;t.addEventListener("touchstart",h=>{this.checkTimeout=setTimeout(()=>{this.touchMove=!0,n=e.nextRow(),a=n?n.getHeight()/2:0,r=e.prevRow(),o=r?r.getHeight()/2:0,l=0,u=0,i=!1,this.startMove(h,e)},this.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",h=>{var m,v;this.moving&&(h.preventDefault(),this.moveHover(h),i||(i=h.touches[0].pageY),m=h.touches[0].pageY-i,m>0?n&&m-l>a&&(v=n,v!==e&&(i=h.touches[0].pageY,v.getElement().parentNode.insertBefore(this.placeholderElement,v.getElement().nextSibling),this.moveRow(v,!0))):r&&-m-u>o&&(v=r,v!==e&&(i=h.touches[0].pageY,v.getElement().parentNode.insertBefore(this.placeholderElement,v.getElement()),this.moveRow(v,!1))),v&&(n=v.nextRow(),l=a,a=n?n.getHeight()/2:0,r=v.prevRow(),u=o,o=r?r.getHeight()/2:0))}),t.addEventListener("touchend",h=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&(this.endMove(h),this.touchMove=!1)})}_bindMouseMove(){this.table.rowManager.getDisplayRows().forEach(e=>{(e.type==="row"||e.type==="group")&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})}_unbindMouseMove(){this.table.rowManager.getDisplayRows().forEach(e=>{(e.type==="row"||e.type==="group")&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})}startMove(e,t){var i=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i)),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.dispatchExternal("rowMoving",t.getComponent()),this.moveHover(e)}setStartPosition(e,t){var i=this.touchMove?e.touches[0].pageX:e.pageX,n=this.touchMove?e.touches[0].pageY:e.pageY,r,a;r=t.getElement(),this.connection?(a=r.getBoundingClientRect(),this.startX=a.left-i+window.pageXOffset,this.startY=a.top-n+window.pageYOffset):this.startY=n-r.getBoundingClientRect().top}endMove(e){(!e||e.which===1||this.touchMove)&&(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow?this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter):this.dispatchExternal("rowMoveCancelled",this.moving.getComponent()),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))}moveRow(e,t){this.toRow=e,this.toRowAfter=t}moveHover(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)}moveHoverTable(e){var t=this.table.rowManager.getElement(),i=t.scrollTop,n=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+i;this.hoverElement.style.top=Math.min(n-this.startY,this.table.rowManager.element.scrollHeight-this.hoverElement.offsetHeight)+"px"}moveHoverConnections(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"}elementRowDrop(e,t,i){this.dispatchExternal("movableRowsElementDrop",e,t,i?i.getComponent():!1)}connectToTables(e){var t;this.connectionSelectorsTables&&(t=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStart",t),this.commsSend(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach(i=>{typeof i=="string"?this.connectionElements=this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(i))):this.connectionElements.push(i)}),this.connectionElements.forEach(i=>{var n=r=>{this.elementRowDrop(r,i,this.moving)};i.addEventListener("mouseup",n),i.tabulatorElementDropEvent=n,i.classList.add("tabulator-movingrow-receiving")}))}disconnectFromTables(){var e;this.connectionSelectorsTables&&(e=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStop",e),this.commsSend(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach(t=>{t.classList.remove("tabulator-movingrow-receiving"),t.removeEventListener("mouseup",t.tabulatorElementDropEvent),delete t.tabulatorElementDropEvent})}connect(e,t){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach(i=>{i.type==="row"&&i.modules.moveRow&&i.modules.moveRow.mouseup&&i.getElement().addEventListener("mouseup",i.modules.moveRow.mouseup)}),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStart",t,e),!0)}disconnect(e){e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach(t=>{t.type==="row"&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)}),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStop",e)):console.warn("Move Row Error - trying to disconnect from non connected table")}dropComplete(e,t,i){var n=!1;if(i){switch(typeof this.table.options.movableRowsSender){case"string":n=Hs.senders[this.table.options.movableRowsSender];break;case"function":n=this.table.options.movableRowsSender;break}n?n.call(this,this.moving?this.moving.getComponent():void 0,t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.dispatchExternal("movableRowsSent",this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.dispatchExternal("movableRowsSentFailed",this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()}tableRowDrop(e,t){var i=!1,n=!1;switch(e.stopImmediatePropagation(),typeof this.table.options.movableRowsReceiver){case"string":i=Hs.receivers[this.table.options.movableRowsReceiver];break;case"function":i=this.table.options.movableRowsReceiver;break}i?n=i.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),n?this.dispatchExternal("movableRowsReceived",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.dispatchExternal("movableRowsReceivedFailed",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.commsSend(this.connectedTable,"moveRow","dropcomplete",{row:t,success:n})}commsReceived(e,t,i){switch(t){case"connect":return this.connect(e,i.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,i.row,i.success)}}}var lp={};class zs extends ke{static moduleName="mutator";static mutators=lp;constructor(e){super(e),this.allowedTypes=["","data","edit","clipboard","import"],this.enabled=!0,this.registerColumnOption("mutator"),this.registerColumnOption("mutatorParams"),this.registerColumnOption("mutatorData"),this.registerColumnOption("mutatorDataParams"),this.registerColumnOption("mutatorEdit"),this.registerColumnOption("mutatorEditParams"),this.registerColumnOption("mutatorClipboard"),this.registerColumnOption("mutatorClipboardParams"),this.registerColumnOption("mutatorImport"),this.registerColumnOption("mutatorImportParams"),this.registerColumnOption("mutateLink")}initialize(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("cell-value-changed",this.mutateLink.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-init-before",this.rowDataChanged.bind(this)),this.subscribe("row-data-changing",this.rowDataChanged.bind(this))}rowDataChanged(e,t,i){return this.transformRow(t,"data",i)}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(n=>{var r="mutator"+(n.charAt(0).toUpperCase()+n.slice(1)),a;e.definition[r]&&(a=this.lookupMutator(e.definition[r]),a&&(t=!0,i[r]={mutator:a,params:e.definition[r+"Params"]||{}}))}),t&&(e.modules.mutate=i)}lookupMutator(e){var t=!1;switch(typeof e){case"string":zs.mutators[e]?t=zs.mutators[e]:console.warn("Mutator Error - No such mutator found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t,i){var n="mutator"+(t.charAt(0).toUpperCase()+t.slice(1)),r;return this.enabled&&this.table.columnManager.traverse(a=>{var o,l,u;a.modules.mutate&&(o=a.modules.mutate[n]||a.modules.mutate.mutator||!1,o&&(r=a.getFieldValue(typeof i<"u"?i:e),(t=="data"&&!i||typeof r<"u")&&(u=a.getComponent(),l=typeof o.params=="function"?o.params(r,e,t,u):o.params,a.setFieldValue(e,o.mutator(r,e,t,l,u)))))}),e}transformCell(e,t){if(e.column.modules.mutate){var i=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,n={};if(i)return n=Object.assign(n,e.row.getData()),e.column.setFieldValue(n,t),i.mutator(t,n,"edit",i.params,e.getComponent())}return t}mutateLink(e){var t=e.column.definition.mutateLink;t&&(Array.isArray(t)||(t=[t]),t.forEach(i=>{var n=e.row.getCell(i);n&&n.setValue(n.getValue(),!0,!0)}))}enable(){this.enabled=!0}disable(){this.enabled=!1}}function up(s,e,t,i,n){var r=document.createElement("span"),a=document.createElement("span"),o=document.createElement("span"),l=document.createElement("span"),u=document.createElement("span"),h=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",m=>{a.innerHTML=m}),this.table.modules.localize.langBind("pagination|counter|of",m=>{l.innerHTML=m}),this.table.modules.localize.langBind("pagination|counter|rows",m=>{h.innerHTML=m}),i?(o.innerHTML=" "+e+"-"+Math.min(e+s-1,i)+" ",u.innerHTML=" "+i+" ",r.appendChild(a),r.appendChild(o),r.appendChild(l),r.appendChild(u),r.appendChild(h)):(o.innerHTML=" 0 ",r.appendChild(a),r.appendChild(o),r.appendChild(h)),r}function hp(s,e,t,i,n){var r=document.createElement("span"),a=document.createElement("span"),o=document.createElement("span"),l=document.createElement("span"),u=document.createElement("span"),h=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",m=>{a.innerHTML=m}),o.innerHTML=" "+t+" ",this.table.modules.localize.langBind("pagination|counter|of",m=>{l.innerHTML=m}),u.innerHTML=" "+n+" ",this.table.modules.localize.langBind("pagination|counter|pages",m=>{h.innerHTML=m}),r.appendChild(a),r.appendChild(o),r.appendChild(l),r.appendChild(u),r.appendChild(h),r}var dp={rows:up,pages:hp};class Hn extends ke{static moduleName="page";static pageCounters=dp;constructor(e){super(e),this.mode="local",this.progressiveLoad=!1,this.element=null,this.pageCounterElement=null,this.pageCounter=null,this.size=0,this.page=1,this.count=5,this.max=1,this.remoteRowCountEstimate=null,this.initialLoad=!0,this.dataChanging=!1,this.pageSizes=[],this.registerTableOption("pagination",!1),this.registerTableOption("paginationMode","local"),this.registerTableOption("paginationSize",!1),this.registerTableOption("paginationInitialPage",1),this.registerTableOption("paginationCounter",!1),this.registerTableOption("paginationCounterElement",!1),this.registerTableOption("paginationButtonCount",5),this.registerTableOption("paginationSizeSelector",!1),this.registerTableOption("paginationElement",!1),this.registerTableOption("paginationAddRow","page"),this.registerTableOption("paginationOutOfRange",!1),this.registerTableOption("progressiveLoad",!1),this.registerTableOption("progressiveLoadDelay",0),this.registerTableOption("progressiveLoadScrollMargin",0),this.registerTableFunction("setMaxPage",this.setMaxPage.bind(this)),this.registerTableFunction("setPage",this.setPage.bind(this)),this.registerTableFunction("setPageToRow",this.userSetPageToRow.bind(this)),this.registerTableFunction("setPageSize",this.userSetPageSize.bind(this)),this.registerTableFunction("getPageSize",this.getPageSize.bind(this)),this.registerTableFunction("previousPage",this.previousPage.bind(this)),this.registerTableFunction("nextPage",this.nextPage.bind(this)),this.registerTableFunction("getPage",this.getPage.bind(this)),this.registerTableFunction("getPageMax",this.getPageMax.bind(this)),this.registerComponentFunction("row","pageTo",this.setPageToRow.bind(this))}initialize(){this.table.options.pagination?(this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("footer-redraw",this.footerRedraw.bind(this)),this.table.options.paginationAddRow=="page"&&this.subscribe("row-adding-position",this.rowAddingPosition.bind(this)),this.table.options.paginationMode==="remote"&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this))),this.table.options.progressiveLoad&&console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"),this.registerDisplayHandler(this.restOnRenderBefore.bind(this),40),this.registerDisplayHandler(this.getRows.bind(this),50),this.createElements(),this.initializePageCounter(),this.initializePaginator()):this.table.options.progressiveLoad&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.initializeProgressive(this.table.options.progressiveLoad),this.table.options.progressiveLoad==="scroll"&&this.subscribe("scroll-vertical",this.scrollVertical.bind(this)))}rowAddingPosition(e,t){var i=this.table.rowManager,n=i.getDisplayRows(),r;return t?n.length?r=n[0]:i.activeRows.length&&(r=i.activeRows[i.activeRows.length-1],t=!1):n.length&&(r=n[n.length-1],t=!(n.length<this.size)),{index:r,top:t}}calculatePageSizes(){var e,t;this.table.options.paginationSize?this.size=this.table.options.paginationSize:(e=document.createElement("div"),e.classList.add("tabulator-row"),e.style.visibility="hidden",t=document.createElement("div"),t.classList.add("tabulator-cell"),t.innerHTML="Page Row Test",e.appendChild(t),this.table.rowManager.getTableElement().appendChild(e),this.size=Math.floor(this.table.rowManager.getElement().clientHeight/e.offsetHeight),this.table.rowManager.getTableElement().removeChild(e)),this.dispatchExternal("pageSizeChanged",this.size),this.generatePageSizeSelectList()}initialLoadComplete(){this.initialLoad=!1}remotePageParams(e,t,i,n){return this.initialLoad||(this.progressiveLoad&&!i||!this.progressiveLoad&&!this.dataChanging)&&this.reset(!0),n.page=this.page,this.size&&(n.size=this.size),n}userSetPageToRow(e){return this.table.options.pagination&&(e=this.table.rowManager.findRow(e),e)?this.setPageToRow(e):Promise.reject()}userSetPageSize(e){return this.table.options.pagination?(this.setPageSize(e),this.setPage(1)):!1}scrollVertical(e,t){var i,n,r;!t&&!this.table.dataLoader.loading&&(i=this.table.rowManager.getElement(),n=i.scrollHeight-i.clientHeight-e,r=this.table.options.progressiveLoadScrollMargin||i.clientHeight*2,n<r&&this.nextPage().catch(()=>{}))}restOnRenderBefore(e,t){return t||this.mode==="local"&&this.reset(),e}rowsUpdated(){this.refreshData(!0,"all")}createElements(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))}generatePageSizeSelectList(){var e=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))e=this.table.options.paginationSizeSelector,this.pageSizes=e,this.pageSizes.indexOf(this.size)==-1&&e.unshift(this.size);else if(this.pageSizes.indexOf(this.size)==-1){e=[];for(let t=1;t<5;t++)e.push(this.size*t);this.pageSizes=e}else e=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);e.forEach(t=>{var i=document.createElement("option");i.value=t,t===!0?this.langBind("pagination|all",function(n){i.innerHTML=n}):i.innerHTML=t,this.pageSizeSelect.appendChild(i)}),this.pageSizeSelect.value=this.size}}initializePageCounter(){var e=this.table.options.paginationCounter,t=null;e&&(typeof e=="function"?t=e:t=Hn.pageCounters[e],t?(this.pageCounter=t,this.pageCounterElement=document.createElement("span"),this.pageCounterElement.classList.add("tabulator-page-counter")):console.warn("Pagination Error - No such page counter found: ",e))}initializePaginator(e){var t,i;e||(this.langBind("pagination|first",n=>{this.firstBut.innerHTML=n}),this.langBind("pagination|first_title",n=>{this.firstBut.setAttribute("aria-label",n),this.firstBut.setAttribute("title",n)}),this.langBind("pagination|prev",n=>{this.prevBut.innerHTML=n}),this.langBind("pagination|prev_title",n=>{this.prevBut.setAttribute("aria-label",n),this.prevBut.setAttribute("title",n)}),this.langBind("pagination|next",n=>{this.nextBut.innerHTML=n}),this.langBind("pagination|next_title",n=>{this.nextBut.setAttribute("aria-label",n),this.nextBut.setAttribute("title",n)}),this.langBind("pagination|last",n=>{this.lastBut.innerHTML=n}),this.langBind("pagination|last_title",n=>{this.lastBut.setAttribute("aria-label",n),this.lastBut.setAttribute("title",n)}),this.firstBut.addEventListener("click",()=>{this.setPage(1)}),this.prevBut.addEventListener("click",()=>{this.previousPage()}),this.nextBut.addEventListener("click",()=>{this.nextPage()}),this.lastBut.addEventListener("click",()=>{this.setPage(this.max)}),this.table.options.paginationElement&&(this.element=this.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),this.langBind("pagination|page_size",n=>{this.pageSizeSelect.setAttribute("aria-label",n),this.pageSizeSelect.setAttribute("title",n),t.innerHTML=n}),this.element.appendChild(t),this.element.appendChild(this.pageSizeSelect),this.pageSizeSelect.addEventListener("change",n=>{this.setPageSize(this.pageSizeSelect.value=="true"?!0:this.pageSizeSelect.value),this.setPage(1)})),this.element.appendChild(this.firstBut),this.element.appendChild(this.prevBut),this.element.appendChild(this.pagesElement),this.element.appendChild(this.nextBut),this.element.appendChild(this.lastBut),this.table.options.paginationElement||(this.table.options.paginationCounter&&(this.table.options.paginationCounterElement?this.table.options.paginationCounterElement instanceof HTMLElement?this.table.options.paginationCounterElement.appendChild(this.pageCounterElement):typeof this.table.options.paginationCounterElement=="string"&&(i=document.querySelector(this.table.options.paginationCounterElement),i?i.appendChild(this.pageCounterElement):console.warn("Pagination Error - Unable to find element matching paginationCounterElement selector:",this.table.options.paginationCounterElement)):this.footerAppend(this.pageCounterElement)),this.footerAppend(this.element)),this.page=this.table.options.paginationInitialPage,this.count=this.table.options.paginationButtonCount),this.mode=this.table.options.paginationMode}initializeProgressive(e){this.initializePaginator(!0),this.mode="progressive_"+e,this.progressiveLoad=!0}trackChanges(){this.dispatch("page-changed")}setMaxRows(e){e?this.max=this.size===!0?1:Math.ceil(e/this.size):this.max=1,this.page>this.max&&(this.page=this.max)}reset(e){this.initialLoad||(this.mode=="local"||e)&&(this.page=1,this.trackChanges())}setMaxPage(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())}setPage(e){switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return e=parseInt(e),e>0&&e<=this.max||this.mode!=="local"?(this.page=e,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Requested page is out of range of 1 - "+this.max+":",e),Promise.reject())}setPageToRow(e){var t=this.displayRows(-1),i=t.indexOf(e);if(i>-1){var n=this.size===!0?1:Math.ceil((i+1)/this.size);return this.setPage(n)}else return console.warn("Pagination Error - Requested row is not visible"),Promise.reject()}setPageSize(e){e!==!0&&(e=parseInt(e)),e>0&&(this.size=e,this.dispatchExternal("pageSizeChanged",e)),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.trackChanges()}_setPageCounter(e,t,i){var n;if(this.pageCounter)switch(this.mode==="remote"&&(t=this.size,i=(this.page-1)*this.size+1,e=this.remoteRowCountEstimate),n=this.pageCounter.call(this,t,i,this.page,e,this.max),typeof n){case"object":if(n instanceof Node){for(;this.pageCounterElement.firstChild;)this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);this.pageCounterElement.appendChild(n)}else this.pageCounterElement.innerHTML="",n!=null&&console.warn("Page Counter Error - Page Counter has returned a type of object, the only valid page counter object return is an instance of Node, the page counter returned:",n);break;case"undefined":this.pageCounterElement.innerHTML="";break;default:this.pageCounterElement.innerHTML=n}}_setPageButtons(){let e=Math.floor((this.count-1)/2),t=Math.ceil((this.count-1)/2),i=this.max-this.page+e+1<this.count?this.max-this.count+1:Math.max(this.page-e,1),n=this.page<=t?Math.min(this.count,this.max):Math.min(this.page+t,this.max);for(;this.pagesElement.firstChild;)this.pagesElement.removeChild(this.pagesElement.firstChild);this.page==1?(this.firstBut.disabled=!0,this.prevBut.disabled=!0):(this.firstBut.disabled=!1,this.prevBut.disabled=!1),this.page==this.max?(this.lastBut.disabled=!0,this.nextBut.disabled=!0):(this.lastBut.disabled=!1,this.nextBut.disabled=!1);for(let r=i;r<=n;r++)r>0&&r<=this.max&&this.pagesElement.appendChild(this._generatePageButton(r));this.footerRedraw()}_generatePageButton(e){var t=document.createElement("button");return t.classList.add("tabulator-page"),e==this.page&&t.classList.add("active"),t.setAttribute("type","button"),t.setAttribute("role","button"),this.langBind("pagination|page_title",i=>{t.setAttribute("aria-label",i+" "+e),t.setAttribute("title",i+" "+e)}),t.setAttribute("data-page",e),t.textContent=e,t.addEventListener("click",i=>{this.setPage(e)}),t}previousPage(){return this.page>1?(this.page--,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Previous page would be less than page 1:",0),Promise.reject())}nextPage(){return this.page<this.max?(this.page++,this.trackChanges(),this.trigger()):(this.progressiveLoad||console.warn("Pagination Error - Next page would be greater than maximum page of "+this.max+":",this.max+1),Promise.reject())}getPage(){return this.page}getPageMax(){return this.max}getPageSize(e){return this.size}getMode(){return this.mode}getRows(e){var t=0,i,n,r,a,o=e.filter(l=>l.type==="row");if(this.mode=="local"){i=[],this.setMaxRows(e.length),this.size===!0?(n=0,r=e.length):(n=this.size*(this.page-1),r=n+parseInt(this.size)),this._setPageButtons();for(let l=n;l<r;l++){let u=e[l];u&&(i.push(u),u.type==="row"&&(a||(a=u),t++))}return this._setPageCounter(o.length,t,a?o.indexOf(a)+1:0),i}else return this._setPageButtons(),this._setPageCounter(o.length),e.slice(0)}trigger(){var e;switch(this.mode){case"local":return e=this.table.rowManager.scrollLeft,this.refreshData(),this.table.rowManager.scrollHorizontal(e),this.dispatchExternal("pageLoaded",this.getPage()),Promise.resolve();case"remote":return this.dataChanging=!0,this.reloadData(null).finally(()=>{this.dataChanging=!1});case"progressive_load":case"progressive_scroll":return this.reloadData(null,!0);default:return console.warn("Pagination Error - no such pagination mode:",this.mode),Promise.reject()}}_parseRemoteData(e){var t,i;if(typeof e.last_page>"u"&&console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").last_page||"last_page")+"' property"),e.data)if(this.max=parseInt(e.last_page)||1,this.remoteRowCountEstimate=typeof e.last_row<"u"?e.last_row:e.last_page*this.size-(this.page==e.last_page?this.size-e.data.length:0),this.progressiveLoad){switch(this.mode){case"progressive_load":this.page==1?this.table.rowManager.setData(e.data,!1,this.page==1):this.table.rowManager.addRows(e.data),this.page<this.max&&setTimeout(()=>{this.nextPage()},this.table.options.progressiveLoadDelay);break;case"progressive_scroll":e=this.page===1?e.data:this.table.rowManager.getData().concat(e.data),this.table.rowManager.setData(e,this.page!==1,this.page==1),t=this.table.options.progressiveLoadScrollMargin||this.table.rowManager.element.clientHeight*2,this.table.rowManager.element.scrollHeight<=this.table.rowManager.element.clientHeight+t&&this.page<this.max&&setTimeout(()=>{this.nextPage()});break}return!1}else{if(this.page>this.max&&(console.warn("Remote Pagination Error - Server returned last page value lower than the current page"),i=this.options("paginationOutOfRange"),i))return this.setPage(typeof i=="function"?i.call(this,this.page,this.max):i);this.dispatchExternal("pageLoaded",this.getPage())}else console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").data||"data")+"' property");return e.data}footerRedraw(){var e=this.table.footerManager.containerElement;Math.ceil(e.clientWidth)-e.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(e.clientWidth)-e.scrollWidth<0&&(this.pagesElement.style.display="none"))}}var cp={local:function(s,e){var t=localStorage.getItem(s+"-"+e);return t?JSON.parse(t):!1},cookie:function(s,e){var t=document.cookie,i=s+"-"+e,n=t.indexOf(i+"="),r,a;return n>-1&&(t=t.slice(n),r=t.indexOf(";"),r>-1&&(t=t.slice(0,r)),a=t.replace(i+"=","")),a?JSON.parse(a):!1}},fp={local:function(s,e,t){localStorage.setItem(s+"-"+e,JSON.stringify(t))},cookie:function(s,e,t){var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=s+"-"+e+"="+JSON.stringify(t)+"; expires="+i.toUTCString()}};class Ot extends ke{static moduleName="persistence";static moduleInitOrder=-10;static readers=cp;static writers=fp;constructor(e){super(e),this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1,this.registerTableOption("persistence",!1),this.registerTableOption("persistenceID",""),this.registerTableOption("persistenceMode",!0),this.registerTableOption("persistenceReaderFunc",!1),this.registerTableOption("persistenceWriterFunc",!1)}localStorageTest(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}initialize(){if(this.table.options.persistence){var e=this.table.options.persistenceMode,t=this.table.options.persistenceID,i;this.mode=e!==!0?e:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?typeof this.table.options.persistenceReaderFunc=="function"?this.readFunc=this.table.options.persistenceReaderFunc:Ot.readers[this.table.options.persistenceReaderFunc]?this.readFunc=Ot.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):Ot.readers[this.mode]?this.readFunc=Ot.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?typeof this.table.options.persistenceWriterFunc=="function"?this.writeFunc=this.table.options.persistenceWriterFunc:Ot.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=Ot.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):Ot.writers[this.mode]?this.writeFunc=Ot.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(t||this.table.element.getAttribute("id")||""),this.config={sort:this.table.options.persistence===!0||this.table.options.persistence.sort,filter:this.table.options.persistence===!0||this.table.options.persistence.filter,headerFilter:this.table.options.persistence===!0||this.table.options.persistence.headerFilter,group:this.table.options.persistence===!0||this.table.options.persistence.group,page:this.table.options.persistence===!0||this.table.options.persistence.page,columns:this.table.options.persistence===!0?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(i=this.retrieveData("page"),i&&(typeof i.paginationSize<"u"&&(this.config.page===!0||this.config.page.size)&&(this.table.options.paginationSize=i.paginationSize),typeof i.paginationInitialPage<"u"&&(this.config.page===!0||this.config.page.page)&&(this.table.options.paginationInitialPage=i.paginationInitialPage))),this.config.group&&(i=this.retrieveData("group"),i&&(typeof i.groupBy<"u"&&(this.config.group===!0||this.config.group.groupBy)&&(this.table.options.groupBy=i.groupBy),typeof i.groupStartOpen<"u"&&(this.config.group===!0||this.config.group.groupStartOpen)&&(this.table.options.groupStartOpen=i.groupStartOpen),typeof i.groupHeader<"u"&&(this.config.group===!0||this.config.group.groupHeader)&&(this.table.options.groupHeader=i.groupHeader))),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-show",this.save.bind(this,"columns")),this.subscribe("column-hide",this.save.bind(this,"columns")),this.subscribe("column-moved",this.save.bind(this,"columns"))),this.subscribe("table-built",this.tableBuilt.bind(this),0),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("filter-changed",this.eventSave.bind(this,"filter")),this.subscribe("filter-changed",this.eventSave.bind(this,"headerFilter")),this.subscribe("sort-changed",this.eventSave.bind(this,"sort")),this.subscribe("group-changed",this.eventSave.bind(this,"group")),this.subscribe("page-changed",this.eventSave.bind(this,"page")),this.subscribe("column-resized",this.eventSave.bind(this,"columns")),this.subscribe("column-width",this.eventSave.bind(this,"columns")),this.subscribe("layout-refreshed",this.eventSave.bind(this,"columns"))}this.registerTableFunction("getColumnLayout",this.getColumnLayout.bind(this)),this.registerTableFunction("setColumnLayout",this.setColumnLayout.bind(this))}eventSave(e){this.config[e]&&this.save(e)}tableBuilt(){var e,t,i;this.config.sort&&(e=this.load("sort"),e&&(this.table.options.initialSort=e)),this.config.filter&&(t=this.load("filter"),t&&(this.table.options.initialFilter=t)),this.config.headerFilter&&(i=this.load("headerFilter"),i&&(this.table.options.initialHeaderFilter=i))}tableRedraw(e){e&&this.config.columns&&this.save("columns")}getColumnLayout(){return this.parseColumns(this.table.columnManager.getColumns())}setColumnLayout(e){return this.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns,e,!0)),!0}initializeColumn(e){var t,i;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),i=this.config.columns===!0?Object.keys(t):this.config.columns,i.forEach(n=>{var r=Object.getOwnPropertyDescriptor(t,n),a=t[n];r&&Object.defineProperty(t,n,{set:o=>{a=o,this.defWatcherBlock||this.save("columns"),r.set&&r.set(o)},get:()=>(r.get&&r.get(),a)})}),this.defWatcherBlock=!1)}load(e,t){var i=this.retrieveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i}retrieveData(e){return this.readFunc?this.readFunc(this.id,e):!1}mergeDefinition(e,t,i){var n=[];return t=t||[],t.forEach((r,a)=>{var o=this._findColumn(e,r),l;o&&(i?l=Object.keys(r):this.config.columns===!0||this.config.columns==null?(l=Object.keys(o),l.push("width")):l=this.config.columns,l.forEach(u=>{u!=="columns"&&typeof r[u]<"u"&&(o[u]=r[u])}),o.columns&&(o.columns=this.mergeDefinition(o.columns,r.columns)),n.push(o))}),e.forEach((r,a)=>{var o=this._findColumn(t,r);o||(n.length>a?n.splice(a,0,r):n.push(r))}),n}_findColumn(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find(function(n){switch(i){case"group":return n.title===t.title&&n.columns.length===t.columns.length;case"field":return n.field===t.field;case"object":return n===t}})}save(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"headerFilter":t=this.table.modules.filter.getHeaderFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig();break}this.writeFunc&&this.writeFunc(this.id,e,t)}validateSorters(e){return e.forEach(function(t){t.column=t.field,delete t.field}),e}getGroupConfig(){var e={};return this.config.group&&((this.config.group===!0||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(this.config.group===!0||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(this.config.group===!0||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e}getPageConfig(){var e={};return this.config.page&&((this.config.page===!0||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(this.config.page===!0||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e}parseColumns(e){var t=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach(n=>{var r={},a=n.getDefinition(),o;n.isGroup?(r.title=a.title,r.columns=this.parseColumns(n.getColumns())):(r.field=n.getField(),this.config.columns===!0||this.config.columns==null?(o=Object.keys(a),o.push("width"),o.push("visible")):o=this.config.columns,o.forEach(l=>{switch(l){case"width":r.width=n.getWidth();break;case"visible":r.visible=n.visible;break;default:typeof a[l]!="function"&&i.indexOf(l)===-1&&(r[l]=a[l])}})),t.push(r)}),t}}class pp extends ke{static moduleName="popup";constructor(e){super(e),this.columnSubscribers={},this.registerTableOption("rowContextPopup",!1),this.registerTableOption("rowClickPopup",!1),this.registerTableOption("rowDblClickPopup",!1),this.registerTableOption("groupContextPopup",!1),this.registerTableOption("groupClickPopup",!1),this.registerTableOption("groupDblClickPopup",!1),this.registerColumnOption("headerContextPopup"),this.registerColumnOption("headerClickPopup"),this.registerColumnOption("headerDblClickPopup"),this.registerColumnOption("headerPopup"),this.registerColumnOption("headerPopupIcon"),this.registerColumnOption("contextPopup"),this.registerColumnOption("clickPopup"),this.registerColumnOption("dblClickPopup"),this.registerComponentFunction("cell","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("column","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("row","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("group","popup",this._componentPopupCall.bind(this))}initialize(){this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}_componentPopupCall(e,t,i){this.loadPopupEvent(t,null,e,i)}initializeRowWatchers(){this.table.options.rowContextPopup&&(this.subscribe("row-contextmenu",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup)),this.table.on("rowTapHold",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup))),this.table.options.rowClickPopup&&this.subscribe("row-click",this.loadPopupEvent.bind(this,this.table.options.rowClickPopup)),this.table.options.rowDblClickPopup&&this.subscribe("row-dblclick",this.loadPopupEvent.bind(this,this.table.options.rowDblClickPopup))}initializeGroupWatchers(){this.table.options.groupContextPopup&&(this.subscribe("group-contextmenu",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup)),this.table.on("groupTapHold",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup))),this.table.options.groupClickPopup&&this.subscribe("group-click",this.loadPopupEvent.bind(this,this.table.options.groupClickPopup)),this.table.options.groupDblClickPopup&&this.subscribe("group-dblclick",this.loadPopupEvent.bind(this,this.table.options.groupDblClickPopup))}initializeColumn(e){var t=e.definition;t.headerContextPopup&&!this.columnSubscribers.headerContextPopup&&(this.columnSubscribers.headerContextPopup=this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextPopup),this.table.on("headerTapHold",this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"))),t.headerClickPopup&&!this.columnSubscribers.headerClickPopup&&(this.columnSubscribers.headerClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerClickPopup"),this.subscribe("column-click",this.columnSubscribers.headerClickPopup)),t.headerDblClickPopup&&!this.columnSubscribers.headerDblClickPopup&&(this.columnSubscribers.headerDblClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerDblClickPopup"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickPopup)),t.headerPopup&&this.initializeColumnHeaderPopup(e),t.contextPopup&&!this.columnSubscribers.contextPopup&&(this.columnSubscribers.contextPopup=this.loadPopupTableCellEvent.bind(this,"contextPopup"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextPopup),this.table.on("cellTapHold",this.loadPopupTableCellEvent.bind(this,"contextPopup"))),t.clickPopup&&!this.columnSubscribers.clickPopup&&(this.columnSubscribers.clickPopup=this.loadPopupTableCellEvent.bind(this,"clickPopup"),this.subscribe("cell-click",this.columnSubscribers.clickPopup)),t.dblClickPopup&&!this.columnSubscribers.dblClickPopup&&(this.columnSubscribers.dblClickPopup=this.loadPopupTableCellEvent.bind(this,"dblClickPopup"),this.subscribe("cell-click",this.columnSubscribers.dblClickPopup))}initializeColumnHeaderPopup(e){var t=e.definition.headerPopupIcon,i;i=document.createElement("span"),i.classList.add("tabulator-header-popup-button"),t?(typeof t=="function"&&(t=t(e.getComponent())),t instanceof HTMLElement?i.appendChild(t):i.innerHTML=t):i.innerHTML="&vellip;",i.addEventListener("click",n=>{n.stopPropagation(),n.preventDefault(),this.loadPopupEvent(e.definition.headerPopup,n,e)}),e.titleElement.insertBefore(i,e.titleElement.firstChild)}loadPopupTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadPopupEvent(i.column.definition[e],t,i)}loadPopupTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadPopupEvent(i.definition[e],t,i)}loadPopupEvent(e,t,i,n){var r;function a(o){r=o}i._group?i=i._group:i._row&&(i=i._row),e=typeof e=="function"?e.call(this.table,t,i.getComponent(),a):e,this.loadPopup(t,i,e,r,n)}loadPopup(e,t,i,n,r){var a=!(e instanceof MouseEvent),o,l;i instanceof HTMLElement?o=i:(o=document.createElement("div"),o.innerHTML=i),o.classList.add("tabulator-popup"),o.addEventListener("click",u=>{u.stopPropagation()}),a||e.preventDefault(),l=this.popup(o),typeof n=="function"&&l.renderCallback(n),e?l.show(e):l.show(t.getElement(),r||"center"),l.hideOnBlur(()=>{this.dispatchExternal("popupClosed",t.getComponent())}),this.dispatchExternal("popupOpened",t.getComponent())}}class mp extends ke{static moduleName="print";constructor(e){super(e),this.element=!1,this.manualBlock=!1,this.beforeprintEventHandler=null,this.afterprintEventHandler=null,this.registerTableOption("printAsHtml",!1),this.registerTableOption("printFormatter",!1),this.registerTableOption("printHeader",!1),this.registerTableOption("printFooter",!1),this.registerTableOption("printStyled",!0),this.registerTableOption("printRowRange","visible"),this.registerTableOption("printConfig",{}),this.registerColumnOption("print"),this.registerColumnOption("titlePrint")}initialize(){this.table.options.printAsHtml&&(this.beforeprintEventHandler=this.replaceTable.bind(this),this.afterprintEventHandler=this.cleanup.bind(this),window.addEventListener("beforeprint",this.beforeprintEventHandler),window.addEventListener("afterprint",this.afterprintEventHandler),this.subscribe("table-destroy",this.destroy.bind(this))),this.registerTableFunction("print",this.printFullscreen.bind(this))}destroy(){this.table.options.printAsHtml&&(window.removeEventListener("beforeprint",this.beforeprintEventHandler),window.removeEventListener("afterprint",this.afterprintEventHandler))}replaceTable(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.generateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))}cleanup(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")}printFullscreen(e,t,i){var n=window.scrollX,r=window.scrollY,a=document.createElement("div"),o=document.createElement("div"),l=this.table.modules.export.generateTable(typeof i<"u"?i:this.table.options.printConfig,typeof t<"u"?t:this.table.options.printStyled,e||this.table.options.printRowRange,"print"),u,h;this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(a.classList.add("tabulator-print-header"),u=typeof this.table.options.printHeader=="function"?this.table.options.printHeader.call(this.table):this.table.options.printHeader,typeof u=="string"?a.innerHTML=u:a.appendChild(u),this.element.appendChild(a)),this.element.appendChild(l),this.table.options.printFooter&&(o.classList.add("tabulator-print-footer"),h=typeof this.table.options.printFooter=="function"?this.table.options.printFooter.call(this.table):this.table.options.printFooter,typeof h=="string"?o.innerHTML=h:o.appendChild(h),this.element.appendChild(o)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,l),window.print(),this.cleanup(),window.scrollTo(n,r),this.manualBlock=!1}}class gp extends ke{static moduleName="reactiveData";constructor(e){super(e),this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0,this.registerTableOption("reactiveData",!1)}initialize(){this.table.options.reactiveData&&(this.subscribe("cell-value-save-before",this.block.bind(this,"cellsave")),this.subscribe("cell-value-save-after",this.unblock.bind(this,"cellsave")),this.subscribe("row-data-save-before",this.block.bind(this,"rowsave")),this.subscribe("row-data-save-after",this.unblock.bind(this,"rowsave")),this.subscribe("row-data-init-after",this.watchRow.bind(this)),this.subscribe("data-processing",this.watchData.bind(this)),this.subscribe("table-destroy",this.unwatchData.bind(this)))}watchData(e){var t=this,i;this.currentVersion++,i=this.currentVersion,this.unwatchData(),this.data=e,this.origFuncs.push=e.push,Object.defineProperty(this.data,"push",{enumerable:!1,configurable:!0,value:function(){var n=Array.from(arguments),r;return!t.blocked&&i===t.currentVersion&&(t.block("data-push"),n.forEach(a=>{t.table.rowManager.addRowActual(a,!1)}),r=t.origFuncs.push.apply(e,arguments),t.unblock("data-push")),r}}),this.origFuncs.unshift=e.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var n=Array.from(arguments),r;return!t.blocked&&i===t.currentVersion&&(t.block("data-unshift"),n.forEach(a=>{t.table.rowManager.addRowActual(a,!0)}),r=t.origFuncs.unshift.apply(e,arguments),t.unblock("data-unshift")),r}}),this.origFuncs.shift=e.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var n,r;return!t.blocked&&i===t.currentVersion&&(t.block("data-shift"),t.data.length&&(n=t.table.rowManager.getRowFromDataObject(t.data[0]),n&&n.deleteActual()),r=t.origFuncs.shift.call(e),t.unblock("data-shift")),r}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var n,r;return!t.blocked&&i===t.currentVersion&&(t.block("data-pop"),t.data.length&&(n=t.table.rowManager.getRowFromDataObject(t.data[t.data.length-1]),n&&n.deleteActual()),r=t.origFuncs.pop.call(e),t.unblock("data-pop")),r}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var n=Array.from(arguments),r=n[0]<0?e.length+n[0]:n[0],a=n[1],o=n[2]?n.slice(2):!1,l,u;if(!t.blocked&&i===t.currentVersion){if(t.block("data-splice"),o&&(l=e[r]?t.table.rowManager.getRowFromDataObject(e[r]):!1,l?o.forEach(m=>{t.table.rowManager.addRowActual(m,!0,l,!0)}):(o=o.slice().reverse(),o.forEach(m=>{t.table.rowManager.addRowActual(m,!0,!1,!0)}))),a!==0){var h=e.slice(r,typeof n[1]>"u"?n[1]:r+a);h.forEach((m,v)=>{var C=t.table.rowManager.getRowFromDataObject(m);C&&C.deleteActual(v!==h.length-1)})}(o||a!==0)&&t.table.rowManager.reRenderInPosition(),u=t.origFuncs.splice.apply(e,arguments),t.unblock("data-splice")}return u}})}unwatchData(){if(this.data!==!1)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})}watchRow(e){var t=e.getData();for(var i in t)this.watchKey(e,t,i);this.table.options.dataTree&&this.watchTreeChildren(e)}watchTreeChildren(e){var t=this,i=e.getData()[this.table.options.dataTreeChildField],n={};i&&(n.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-push");var r=n.push.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-push")}return r}}),n.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-unshift");var r=n.unshift.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-unshift")}return r}}),n.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-shift");var r=n.shift.call(i);this.rebuildTree(e),t.unblock("tree-shift")}return r}}),n.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-pop");var r=n.pop.call(i);this.rebuildTree(e),t.unblock("tree-pop")}return r}}),n.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-splice");var r=n.splice.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-splice")}return r}}))}rebuildTree(e){this.table.modules.dataTree.initializeRow(e),this.table.modules.dataTree.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)}watchKey(e,t,i){var n=this,r=Object.getOwnPropertyDescriptor(t,i),a=t[i],o=this.currentVersion;Object.defineProperty(t,i,{set:l=>{if(a=l,!n.blocked&&o===n.currentVersion){n.block("key");var u={};u[i]=l,e.updateData(u),n.unblock("key")}r.set&&r.set(l)},get:()=>(r.get&&r.get(),a)})}unwatchRow(e){var t=e.getData();for(var i in t)Object.defineProperty(t,i,{value:t[i]})}block(e){this.blocked||(this.blocked=e)}unblock(e){this.blocked===e&&(this.blocked=!1)}}class bp extends ke{static moduleName="resizeColumns";constructor(e){super(e),this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.latestX=!1,this.handle=null,this.initialNextColumn=null,this.nextColumn=null,this.initialized=!1,this.registerColumnOption("resizable",!0),this.registerTableOption("resizableColumnFit",!1),this.registerTableOption("resizableColumnGuide",!1)}initialize(){this.subscribe("column-rendered",this.layoutColumnHeader.bind(this))}initializeEventWatchers(){this.initialized||(this.subscribe("cell-rendered",this.layoutCellHandles.bind(this)),this.subscribe("cell-delete",this.deInitializeComponent.bind(this)),this.subscribe("cell-height",this.resizeHandle.bind(this)),this.subscribe("column-moved",this.columnLayoutUpdated.bind(this)),this.subscribe("column-hide",this.deInitializeColumn.bind(this)),this.subscribe("column-show",this.columnLayoutUpdated.bind(this)),this.subscribe("column-width",this.columnWidthUpdated.bind(this)),this.subscribe("column-delete",this.deInitializeComponent.bind(this)),this.subscribe("column-height",this.resizeHandle.bind(this)),this.initialized=!0)}layoutCellHandles(e){e.row.type==="row"&&(this.deInitializeComponent(e),this.initializeColumn("cell",e,e.column,e.element))}layoutColumnHeader(e){e.definition.resizable&&(this.initializeEventWatchers(),this.deInitializeComponent(e),this.initializeColumn("header",e,e,e.element))}columnLayoutUpdated(e){var t=e.prevColumn();this.reinitializeColumn(e),t&&this.reinitializeColumn(t)}columnWidthUpdated(e){e.modules.frozen&&(this.table.modules.frozenColumns.leftColumns.includes(e)?this.table.modules.frozenColumns.leftColumns.forEach(t=>{this.reinitializeColumn(t)}):this.table.modules.frozenColumns.rightColumns.includes(e)&&this.table.modules.frozenColumns.rightColumns.forEach(t=>{this.reinitializeColumn(t)}))}frozenColumnOffset(e){var t=!1;return e.modules.frozen&&(t=e.modules.frozen.marginValue,e.modules.frozen.position==="left"?t+=e.getWidth()-3:t&&(t-=3)),t!==!1?t+"px":!1}reinitializeColumn(e){var t=this.frozenColumnOffset(e);e.cells.forEach(i=>{i.modules.resize&&i.modules.resize.handleEl&&(t&&(i.modules.resize.handleEl.style[e.modules.frozen.position]=t,i.modules.resize.handleEl.style["z-index"]=11),i.element.after(i.modules.resize.handleEl))}),e.modules.resize&&e.modules.resize.handleEl&&(t&&(e.modules.resize.handleEl.style[e.modules.frozen.position]=t),e.element.after(e.modules.resize.handleEl))}initializeColumn(e,t,i,n){var r=this,a=!1,o=i.definition.resizable,l={},u=i.getLastColumn();if(e==="header"&&(a=i.definition.formatter=="textarea"||i.definition.variableHeight,l={variableHeight:a}),(o===!0||o==e)&&this._checkResizability(u)){var h=document.createElement("span");h.className="tabulator-col-resize-handle",h.addEventListener("click",function(v){v.stopPropagation()});var m=function(v){r.startColumn=i,r.initialNextColumn=r.nextColumn=u.nextColumn(),r._mouseDown(v,u,h)};h.addEventListener("mousedown",m),h.addEventListener("touchstart",m,{passive:!0}),h.addEventListener("dblclick",v=>{var C=u.getWidth();v.stopPropagation(),u.reinitializeWidth(!0),C!==u.getWidth()&&(r.dispatch("column-resized",u),r.dispatchExternal("columnResized",u.getComponent()))}),i.modules.frozen&&(h.style.position="sticky",h.style[i.modules.frozen.position]=this.frozenColumnOffset(i)),l.handleEl=h,n.parentNode&&i.visible&&n.after(h)}t.modules.resize=l}deInitializeColumn(e){this.deInitializeComponent(e),e.cells.forEach(t=>{this.deInitializeComponent(t)})}deInitializeComponent(e){var t;e.modules.resize&&(t=e.modules.resize.handleEl,t&&t.parentElement&&t.parentElement.removeChild(t))}resizeHandle(e,t){e.modules.resize&&e.modules.resize.handleEl&&(e.modules.resize.handleEl.style.height=t)}resize(e,t){var i=typeof e.clientX>"u"?e.touches[0].clientX:e.clientX,n=i-this.startX,r=i-this.latestX,a,o;if(this.latestX=i,this.table.rtl&&(n=-n,r=-r),a=t.width==t.minWidth||t.width==t.maxWidth,t.setWidth(this.startWidth+n),o=t.width==t.minWidth||t.width==t.maxWidth,r<0&&(this.nextColumn=this.initialNextColumn),this.table.options.resizableColumnFit&&this.nextColumn&&!(a&&o)){let l=this.nextColumn.getWidth();r>0&&l<=this.nextColumn.minWidth&&(this.nextColumn=this.nextColumn.nextColumn()),this.nextColumn&&this.nextColumn.setWidth(this.nextColumn.getWidth()-r)}this.table.columnManager.rerenderColumns(!0),!this.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}calcGuidePosition(e,t,i){var n=typeof e.clientX>"u"?e.touches[0].clientX:e.clientX,r=i.getBoundingClientRect().x-this.table.element.getBoundingClientRect().x,a=this.table.element.getBoundingClientRect().x,o=t.element.getBoundingClientRect().left-a,l=n-this.startX,u=Math.max(r+l,o+t.minWidth);return t.maxWidth&&(u=Math.min(u,o+t.maxWidth)),u}_checkResizability(e){return e.definition.resizable}_mouseDown(e,t,i){var n=this,r;this.dispatchExternal("columnResizing",t.getComponent()),n.table.options.resizableColumnGuide&&(r=document.createElement("span"),r.classList.add("tabulator-col-resize-guide"),n.table.element.appendChild(r),setTimeout(()=>{r.style.left=n.calcGuidePosition(e,t,i)+"px"})),n.table.element.classList.add("tabulator-block-select");function a(l){n.table.options.resizableColumnGuide?r.style.left=n.calcGuidePosition(l,t,i)+"px":n.resize(l,t)}function o(l){n.table.options.resizableColumnGuide&&(n.resize(l,t),r.remove()),n.startColumn.modules.edit&&(n.startColumn.modules.edit.blocked=!1),n.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",a),i.removeEventListener("touchmove",a),i.removeEventListener("touchend",o),n.table.element.classList.remove("tabulator-block-select"),n.startWidth!==t.getWidth()&&(n.table.columnManager.verticalAlignHeaders(),n.dispatch("column-resized",t),n.dispatchExternal("columnResized",t.getComponent()))}e.stopPropagation(),n.startColumn.modules.edit&&(n.startColumn.modules.edit.blocked=!0),n.startX=typeof e.clientX>"u"?e.touches[0].clientX:e.clientX,n.latestX=n.startX,n.startWidth=t.getWidth(),document.body.addEventListener("mousemove",a),document.body.addEventListener("mouseup",o),i.addEventListener("touchmove",a,{passive:!0}),i.addEventListener("touchend",o)}}class vp extends ke{static moduleName="resizeRows";constructor(e){super(e),this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null,this.registerTableOption("resizableRows",!1),this.registerTableOption("resizableRowGuide",!1)}initialize(){this.table.options.resizableRows&&this.subscribe("row-layout-after",this.initializeRow.bind(this))}initializeRow(e){var t=this,i=e.getElement(),n=document.createElement("div");n.className="tabulator-row-resize-handle";var r=document.createElement("div");r.className="tabulator-row-resize-handle prev",n.addEventListener("click",function(l){l.stopPropagation()});var a=function(l){t.startRow=e,t._mouseDown(l,e,n)};n.addEventListener("mousedown",a),n.addEventListener("touchstart",a,{passive:!0}),r.addEventListener("click",function(l){l.stopPropagation()});var o=function(l){var u=t.table.rowManager.prevDisplayRow(e);u&&(t.startRow=u,t._mouseDown(l,u,r))};r.addEventListener("mousedown",o),r.addEventListener("touchstart",o,{passive:!0}),i.appendChild(n),i.appendChild(r)}resize(e,t){t.setHeight(this.startHeight+((typeof e.screenY>"u"?e.touches[0].screenY:e.screenY)-this.startY))}calcGuidePosition(e,t,i){var n=typeof e.screenY>"u"?e.touches[0].screenY:e.screenY,r=i.getBoundingClientRect().y-this.table.element.getBoundingClientRect().y,a=this.table.element.getBoundingClientRect().y,o=t.element.getBoundingClientRect().top-a,l=n-this.startY;return Math.max(r+l,o)}_mouseDown(e,t,i){var n=this,r;n.dispatchExternal("rowResizing",t.getComponent()),n.table.options.resizableRowGuide&&(r=document.createElement("span"),r.classList.add("tabulator-row-resize-guide"),n.table.element.appendChild(r),setTimeout(()=>{r.style.top=n.calcGuidePosition(e,t,i)+"px"})),n.table.element.classList.add("tabulator-block-select");function a(l){n.table.options.resizableRowGuide?r.style.top=n.calcGuidePosition(l,t,i)+"px":n.resize(l,t)}function o(l){n.table.options.resizableRowGuide&&(n.resize(l,t),r.remove()),document.body.removeEventListener("mouseup",a),document.body.removeEventListener("mousemove",a),i.removeEventListener("touchmove",a),i.removeEventListener("touchend",o),n.table.element.classList.remove("tabulator-block-select"),n.dispatchExternal("rowResized",t.getComponent())}e.stopPropagation(),n.startY=typeof e.screenY>"u"?e.touches[0].screenY:e.screenY,n.startHeight=t.getHeight(),document.body.addEventListener("mousemove",a),document.body.addEventListener("mouseup",o),i.addEventListener("touchmove",a,{passive:!0}),i.addEventListener("touchend",o)}}class yp extends ke{static moduleName="resizeTable";constructor(e){super(e),this.binding=!1,this.visibilityObserver=!1,this.resizeObserver=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1,this.visible=!1,this.initialized=!1,this.initialRedraw=!1,this.registerTableOption("autoResize",!0)}initialize(){if(this.table.options.autoResize){var e=this.table,t;this.tableHeight=e.element.clientHeight,this.tableWidth=e.element.clientWidth,e.element.parentNode&&(this.containerHeight=e.element.parentNode.clientHeight,this.containerWidth=e.element.parentNode.clientWidth),typeof IntersectionObserver<"u"&&typeof ResizeObserver<"u"&&e.rowManager.getRenderMode()==="virtual"?(this.initializeVisibilityObserver(),this.autoResize=!0,this.resizeObserver=new ResizeObserver(i=>{if(!e.browserMobile||e.browserMobile&&(!e.modules.edit||e.modules.edit&&!e.modules.edit.currentCell)){var n=Math.floor(i[0].contentRect.height),r=Math.floor(i[0].contentRect.width);(this.tableHeight!=n||this.tableWidth!=r)&&(this.tableHeight=n,this.tableWidth=r,e.element.parentNode&&(this.containerHeight=e.element.parentNode.clientHeight,this.containerWidth=e.element.parentNode.clientWidth),this.redrawTable())}}),this.resizeObserver.observe(e.element),t=window.getComputedStyle(e.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver(i=>{if(!e.browserMobile||e.browserMobile&&(!e.modules.edit||e.modules.edit&&!e.modules.edit.currentCell)){var n=Math.floor(i[0].contentRect.height),r=Math.floor(i[0].contentRect.width);(this.containerHeight!=n||this.containerWidth!=r)&&(this.containerHeight=n,this.containerWidth=r,this.tableHeight=e.element.clientHeight,this.tableWidth=e.element.clientWidth),this.redrawTable()}}),this.containerObserver.observe(this.table.element.parentNode)),this.subscribe("table-resize",this.tableResized.bind(this))):(this.binding=function(){(!e.browserMobile||e.browserMobile&&(!e.modules.edit||e.modules.edit&&!e.modules.edit.currentCell))&&(e.columnManager.rerenderColumns(!0),e.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}initializeVisibilityObserver(){this.visibilityObserver=new IntersectionObserver(e=>{this.visible=e[0].isIntersecting,this.initialized?this.visible&&(this.redrawTable(this.initialRedraw),this.initialRedraw=!1):(this.initialized=!0,this.initialRedraw=!this.visible)}),this.visibilityObserver.observe(this.table.element)}redrawTable(e){this.initialized&&this.visible&&(this.table.columnManager.rerenderColumns(!0),this.table.redraw(e))}tableResized(){this.table.rowManager.redraw()}clearBindings(){this.binding&&window.removeEventListener("resize",this.binding),this.resizeObserver&&this.resizeObserver.unobserve(this.table.element),this.visibilityObserver&&this.visibilityObserver.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}}function wp(s,e,t){var i=document.createElement("div"),n=s.getRow()._row.modules.responsiveLayout;i.classList.add("tabulator-responsive-collapse-toggle"),i.innerHTML=`<svg class='tabulator-responsive-collapse-toggle-open' viewbox="0 0 24 24">
35
+ <line x1="7" y1="12" x2="17" y2="12" fill="none" stroke-width="3" stroke-linecap="round" />
36
+ <line y1="7" x1="12" y2="17" x2="12" fill="none" stroke-width="3" stroke-linecap="round" />
37
+ </svg>
38
+
39
+ <svg class='tabulator-responsive-collapse-toggle-close' viewbox="0 0 24 24">
40
+ <line x1="7" y1="12" x2="17" y2="12" fill="none" stroke-width="3" stroke-linecap="round" />
41
+ </svg>`,s.getElement().classList.add("tabulator-row-handle");function r(a){var o=n.element;n.open=a,o&&(n.open?(i.classList.add("open"),o.style.display=""):(i.classList.remove("open"),o.style.display="none"))}return i.addEventListener("click",function(a){a.stopImmediatePropagation(),r(!n.open),s.getTable().rowManager.adjustTableSize()}),r(n.open),i}var Cp={format:{formatters:{responsiveCollapse:wp}}};class Ep extends ke{static moduleName="responsiveLayout";static moduleExtensions=Cp;constructor(e){super(e),this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1,this.registerTableOption("responsiveLayout",!1),this.registerTableOption("responsiveLayoutCollapseStartOpen",!0),this.registerTableOption("responsiveLayoutCollapseUseFormatters",!0),this.registerTableOption("responsiveLayoutCollapseFormatter",!1),this.registerColumnOption("responsive")}initialize(){this.table.options.responsiveLayout&&(this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-show",this.updateColumnVisibility.bind(this)),this.subscribe("column-hide",this.updateColumnVisibility.bind(this)),this.subscribe("columns-loaded",this.initializeResponsivity.bind(this)),this.subscribe("column-moved",this.initializeResponsivity.bind(this)),this.subscribe("column-add",this.initializeResponsivity.bind(this)),this.subscribe("column-delete",this.initializeResponsivity.bind(this)),this.subscribe("table-redrawing",this.tableRedraw.bind(this)),this.table.options.responsiveLayout==="collapse"&&(this.subscribe("row-data-changed",this.generateCollapsedRowContent.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout",this.layoutRow.bind(this))))}tableRedraw(e){["fitColumns","fitDataStretch"].indexOf(this.layoutMode())===-1&&(e||this.update())}initializeResponsivity(){var e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.collapseFormatter&&(this.collapseFormatter=this.collapseFormatter.bind(this.table)),this.table.columnManager.columnsByIndex.forEach((t,i)=>{t.modules.responsive&&t.modules.responsive.order&&t.modules.responsive.visible&&(t.modules.responsive.index=i,e.push(t),!t.visible&&this.mode==="collapse"&&this.hiddenColumns.push(t))}),e=e.reverse(),e=e.sort((t,i)=>{var n=i.modules.responsive.order-t.modules.responsive.order;return n||i.modules.responsive.index-t.modules.responsive.index}),this.columns=e,this.mode==="collapse"&&this.generateCollapsedContent();for(let t of this.table.columnManager.columnsByIndex)if(t.definition.formatter=="responsiveCollapse"){this.collapseHandleColumn=t;break}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())}initializeColumn(e){var t=e.getDefinition();e.modules.responsive={order:typeof t.responsive>"u"?1:t.responsive,visible:t.visible!==!1}}initializeRow(e){var t;e.type!=="calc"&&(t=document.createElement("div"),t.classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))}layoutRow(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))}updateColumnVisibility(e,t){!t&&e.modules.responsive&&(e.modules.responsive.visible=e.visible,this.initializeResponsivity())}hideColumn(e){var t=this.hiddenColumns.length;e.hide(!1,!0),this.mode==="collapse"&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())}showColumn(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),this.mode==="collapse"&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())}update(){for(var e=!0;e;){let t=this.table.modules.layout.getMode()=="fitColumns"?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),i=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-t;if(i<0){let n=this.columns[this.index];n?(this.hideColumn(n),this.index++):e=!1}else{let n=this.columns[this.index-1];n&&i>0&&i>=n.getWidth()?(this.showColumn(n),this.index--):e=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}}generateCollapsedContent(){var e=this.table.rowManager.getDisplayRows();e.forEach(t=>{this.generateCollapsedRowContent(t)})}generateCollapsedRowContent(e){var t,i;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);i=this.collapseFormatter(this.generateCollapsedRowData(e)),i&&t.appendChild(i),e.calcHeight(!0)}}generateCollapsedRowData(e){var t=e.getData(),i=[],n;return this.hiddenColumns.forEach(r=>{var a=r.getFieldValue(t);if(r.definition.title&&r.field)if(r.modules.format&&this.table.options.responsiveLayoutCollapseUseFormatters){let o=function(l){l()};n={value:!1,data:{},getValue:function(){return a},getData:function(){return t},getType:function(){return"cell"},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return r.getComponent()},getTable:()=>this.table},i.push({field:r.field,title:r.definition.title,value:r.modules.format.formatter.call(this.table.modules.format,n,r.modules.format.params,o)})}else i.push({field:r.field,title:r.definition.title,value:a})}),i}formatCollapsedData(e){var t=document.createElement("table");return e.forEach(i=>{var n=document.createElement("tr"),r=document.createElement("td"),a=document.createElement("td"),o,l=document.createElement("strong");r.appendChild(l),this.modules.localize.bind("columns|"+i.field,function(u){l.innerHTML=u||i.title}),i.value instanceof Node?(o=document.createElement("div"),o.appendChild(i.value),a.appendChild(o)):a.innerHTML=i.value,n.appendChild(r),n.appendChild(a),t.appendChild(n)}),Object.keys(e).length?t:""}}function kp(s,e,t){var i=document.createElement("input"),n=!1;if(i.type="checkbox",i.setAttribute("aria-label","Select Row"),this.table.modExists("selectRow",!0))if(i.addEventListener("click",a=>{a.stopPropagation()}),typeof s.getRow=="function"){var r=s.getRow();r instanceof Ls?(i.addEventListener("change",a=>{this.table.options.selectableRowsRangeMode==="click"&&n?n=!1:r.toggleSelect()}),this.table.options.selectableRowsRangeMode==="click"&&i.addEventListener("click",a=>{n=!0,this.table.modules.selectRow.handleComplexRowClick(r._row,a)}),i.checked=r.isSelected&&r.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(r,i)):i=""}else i.addEventListener("change",a=>{this.table.modules.selectRow.selectedRows.length?this.table.deselectRow():this.table.selectRow(e.rowRange)}),this.table.modules.selectRow.registerHeaderSelectCheckbox(i);return i}var xp={format:{formatters:{rowSelection:kp}}};class Mp extends ke{static moduleName="selectRow";static moduleExtensions=xp;constructor(e){super(e),this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null,this.registerTableOption("selectableRows","highlight"),this.registerTableOption("selectableRowsRangeMode","drag"),this.registerTableOption("selectableRowsRollingSelection",!0),this.registerTableOption("selectableRowsPersistence",!0),this.registerTableOption("selectableRowsCheck",function(t,i){return!0}),this.registerTableFunction("selectRow",this.selectRows.bind(this)),this.registerTableFunction("deselectRow",this.deselectRows.bind(this)),this.registerTableFunction("toggleSelectRow",this.toggleRow.bind(this)),this.registerTableFunction("getSelectedRows",this.getSelectedRows.bind(this)),this.registerTableFunction("getSelectedData",this.getSelectedData.bind(this)),this.registerComponentFunction("row","select",this.selectRows.bind(this)),this.registerComponentFunction("row","deselect",this.deselectRows.bind(this)),this.registerComponentFunction("row","toggleSelect",this.toggleRow.bind(this)),this.registerComponentFunction("row","isSelected",this.isRowSelected.bind(this))}initialize(){this.deprecatedOptionsCheck(),this.table.options.selectableRows==="highlight"&&this.table.options.selectableRange&&(this.table.options.selectableRows=!1),this.table.options.selectableRows!==!1&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-deleting",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clearSelectionData.bind(this)),this.subscribe("rows-retrieve",this.rowRetrieve.bind(this)),this.table.options.selectableRows&&!this.table.options.selectableRowsPersistence&&this.subscribe("data-refreshing",this.deselectRows.bind(this)))}deprecatedOptionsCheck(){}rowRetrieve(e,t){return e==="selected"?this.selectedRows:t}rowDeleted(e){this._deselectRow(e,!0)}clearSelectionData(e){var t=this.selectedRows.length;this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],t&&e!==!0&&this._rowSelectionChanged()}initializeRow(e){var t=this,i=t.checkRowSelectability(e),n=e.getElement(),r=function(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",r)};e.modules.select={selected:!1},n.classList.toggle("tabulator-selectable",i),n.classList.toggle("tabulator-unselectable",!i),t.checkRowSelectability(e)&&t.table.options.selectableRows&&t.table.options.selectableRows!="highlight"&&(t.table.options.selectableRowsRangeMode==="click"?n.addEventListener("click",this.handleComplexRowClick.bind(this,e)):(n.addEventListener("click",function(a){(!t.table.modExists("edit")||!t.table.modules.edit.getCurrentCell())&&t.table._clearSelection(),t.selecting||t.toggleRow(e)}),n.addEventListener("mousedown",function(a){if(a.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",r),document.body.addEventListener("keyup",r),t.toggleRow(e),!1}),n.addEventListener("mouseenter",function(a){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),n.addEventListener("mouseout",function(a){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))})))}handleComplexRowClick(e,t){if(t.shiftKey){this.table._clearSelection(),this.lastClickedRow=this.lastClickedRow||e;var i=this.table.rowManager.getDisplayRowIndex(this.lastClickedRow),n=this.table.rowManager.getDisplayRowIndex(e),r=i<=n?i:n,a=i>=n?i:n,o=this.table.rowManager.getDisplayRows().slice(0),l=o.splice(r,a-r+1);t.ctrlKey||t.metaKey?(l.forEach(u=>{u!==this.lastClickedRow&&(this.table.options.selectableRows!==!0&&!this.isRowSelected(e)?this.selectedRows.length<this.table.options.selectableRows&&this.toggleRow(u):this.toggleRow(u))}),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.table.options.selectableRows!==!0&&l.length>this.table.options.selectableRows&&(l=l.slice(0,this.table.options.selectableRows)),this.selectRows(l)),this.table._clearSelection()}else t.ctrlKey||t.metaKey?(this.toggleRow(e),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.selectRows(e),this.lastClickedRow=e)}checkRowSelectability(e){return e&&e.type==="row"?this.table.options.selectableRowsCheck.call(this.table,e.getComponent()):!1}toggleRow(e){this.checkRowSelectability(e)&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))}selectRows(e){var t=[],i,n;switch(typeof e){case"undefined":i=this.table.rowManager.rows;break;case"number":i=this.table.rowManager.findRow(e);break;case"string":i=this.table.rowManager.findRow(e),i||(i=this.table.rowManager.getRows(e));break;default:i=e;break}Array.isArray(i)?i.length&&(i.forEach(r=>{n=this._selectRow(r,!0,!0),n&&t.push(n)}),this._rowSelectionChanged(!1,t)):i&&this._selectRow(i,!1,!0)}_selectRow(e,t,i){if(!isNaN(this.table.options.selectableRows)&&this.table.options.selectableRows!==!0&&!i&&this.selectedRows.length>=this.table.options.selectableRows)if(this.table.options.selectableRowsRollingSelection)this._deselectRow(this.selectedRows[0]);else return!1;var n=this.table.rowManager.findRow(e);if(n){if(this.selectedRows.indexOf(n)==-1)return n.getElement().classList.add("tabulator-selected"),n.modules.select||(n.modules.select={}),n.modules.select.selected=!0,n.modules.select.checkboxEl&&(n.modules.select.checkboxEl.checked=!0),this.selectedRows.push(n),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(n,!0),this.dispatchExternal("rowSelected",n.getComponent()),this._rowSelectionChanged(t,n),n}else t||console.warn("Selection Error - No such row found, ignoring selection:"+e)}isRowSelected(e){return this.selectedRows.indexOf(e)!==-1}deselectRows(e,t){var i=[],n,r;switch(typeof e){case"undefined":n=Object.assign([],this.selectedRows);break;case"number":n=this.table.rowManager.findRow(e);break;case"string":n=this.table.rowManager.findRow(e),n||(n=this.table.rowManager.getRows(e));break;default:n=e;break}Array.isArray(n)?n.length&&(n.forEach(a=>{r=this._deselectRow(a,!0,!0),r&&i.push(r)}),this._rowSelectionChanged(t,[],i)):n&&this._deselectRow(n,t,!0)}_deselectRow(e,t){var i=this,n=i.table.rowManager.findRow(e),r,a;if(n){if(r=i.selectedRows.findIndex(function(o){return o==n}),r>-1)return a=n.getElement(),a&&a.classList.remove("tabulator-selected"),n.modules.select||(n.modules.select={}),n.modules.select.selected=!1,n.modules.select.checkboxEl&&(n.modules.select.checkboxEl.checked=!1),i.selectedRows.splice(r,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(n,!1),this.dispatchExternal("rowDeselected",n.getComponent()),i._rowSelectionChanged(t,void 0,n),n}else t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)}getSelectedData(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e}getSelectedRows(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e}_rowSelectionChanged(e,t=[],i=[]){this.headerCheckboxElement&&(this.selectedRows.length===0?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||(Array.isArray(t)||(t=[t]),t=t.map(n=>n.getComponent()),Array.isArray(i)||(i=[i]),i=i.map(n=>n.getComponent()),this.dispatchExternal("rowSelectionChanged",this.getSelectedData(),this.getSelectedRows(),t,i))}registerRowSelectCheckbox(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t}registerHeaderSelectCheckbox(e){this.headerCheckboxElement=e}childRowSelection(e,t){var i=this.table.modules.dataTree.getChildren(e,!0,!0);if(t)for(let n of i)this._selectRow(n,!0);else for(let n of i)this._deselectRow(n,!0)}}class Sp{constructor(e){return this._range=e,new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._range.table.componentFunctionBinder.handle("range",t._range,i)}})}getElement(){return this._range.element}getData(){return this._range.getData()}getCells(){return this._range.getCells(!0,!0)}getStructuredCells(){return this._range.getStructuredCells()}getRows(){return this._range.getRows().map(e=>e.getComponent())}getColumns(){return this._range.getColumns().map(e=>e.getComponent())}getBounds(){return this._range.getBounds()}getTopEdge(){return this._range.top}getBottomEdge(){return this._range.bottom}getLeftEdge(){return this._range.left}getRightEdge(){return this._range.right}setBounds(e,t){this._range.destroyedGuard("setBounds")&&this._range.setBounds(e&&e._cell,t&&t._cell)}setStartBound(e){this._range.destroyedGuard("setStartBound")&&(this._range.setEndBound(e&&e._cell),this._range.rangeManager.layoutElement())}setEndBound(e){this._range.destroyedGuard("setEndBound")&&(this._range.setEndBound(e&&e._cell),this._range.rangeManager.layoutElement())}clearValues(){this._range.destroyedGuard("clearValues")&&this._range.clearValues()}remove(){this._range.destroyedGuard("remove")&&this._range.destroy(!0)}}class Rp extends Je{constructor(e,t,i,n){super(e),this.rangeManager=t,this.element=null,this.initialized=!1,this.initializing={start:!1,end:!1},this.destroyed=!1,this.top=0,this.bottom=0,this.left=0,this.right=0,this.table=e,this.start={row:0,col:0},this.end={row:0,col:0},this.rangeManager.rowHeader&&(this.left=1,this.right=1,this.start.col=1,this.end.col=1),this.initElement(),setTimeout(()=>{this.initBounds(i,n)})}initElement(){this.element=document.createElement("div"),this.element.classList.add("tabulator-range")}initBounds(e,t){this._updateMinMax(),e&&this.setBounds(e,t||e)}setStart(e,t){(this.start.row!==e||this.start.col!==t)&&(this.start.row=e,this.start.col=t,this.initializing.start=!0,this._updateMinMax())}setEnd(e,t){(this.end.row!==e||this.end.col!==t)&&(this.end.row=e,this.end.col=t,this.initializing.end=!0,this._updateMinMax())}setBounds(e,t,i){e&&this.setStartBound(e),this.setEndBound(t||e),this.rangeManager.layoutElement(i)}setStartBound(e){var t,i;e.type==="column"?this.rangeManager.columnSelection&&this.setStart(0,e.getPosition()-1):(t=e.row.position-1,i=e.column.getPosition()-1,e.column===this.rangeManager.rowHeader?this.setStart(t,1):this.setStart(t,i))}setEndBound(e){var t=this._getTableRows().length,i,n,r;e.type==="column"?this.rangeManager.columnSelection&&(this.rangeManager.selecting==="column"?this.setEnd(t-1,e.getPosition()-1):this.rangeManager.selecting==="cell"&&this.setEnd(0,e.getPosition()-1)):(i=e.row.position-1,n=e.column.getPosition()-1,r=e.column===this.rangeManager.rowHeader,this.rangeManager.selecting==="row"?this.setEnd(i,this._getTableColumns().length-1):this.rangeManager.selecting!=="row"&&r?this.setEnd(i,0):this.rangeManager.selecting==="column"?this.setEnd(t-1,n):this.setEnd(i,n))}_updateMinMax(){this.top=Math.min(this.start.row,this.end.row),this.bottom=Math.max(this.start.row,this.end.row),this.left=Math.min(this.start.col,this.end.col),this.right=Math.max(this.start.col,this.end.col),this.initialized?this.dispatchExternal("rangeChanged",this.getComponent()):this.initializing.start&&this.initializing.end&&(this.initialized=!0,this.dispatchExternal("rangeAdded",this.getComponent()))}_getTableColumns(){return this.table.columnManager.getVisibleColumnsByIndex()}_getTableRows(){return this.table.rowManager.getDisplayRows().filter(e=>e.type==="row")}layout(){var e=this.table.rowManager.renderer.vDomTop,t=this.table.rowManager.renderer.vDomBottom,i=this.table.columnManager.renderer.leftCol,n=this.table.columnManager.renderer.rightCol,r,a,o,l,u,h,m,v,C,F;this.table.options.renderHorizontal==="virtual"&&this.rangeManager.rowHeader&&(n+=1),e==null&&(e=0),t==null&&(t=1/0),i==null&&(i=0),n==null&&(n=1/0),this.overlaps(i,e,n,t)&&(r=Math.max(this.top,e),a=Math.min(this.bottom,t),o=Math.max(this.left,i),l=Math.min(this.right,n),u=this.rangeManager.getCell(r,o),h=this.rangeManager.getCell(a,l),m=u.getElement(),v=h.getElement(),C=u.row.getElement(),F=h.row.getElement(),this.element.classList.add("tabulator-range-active"),this.table.rtl?(this.element.style.right=C.offsetWidth-m.offsetLeft-m.offsetWidth+"px",this.element.style.width=m.offsetLeft+m.offsetWidth-v.offsetLeft+"px"):(this.element.style.left=C.offsetLeft+m.offsetLeft+"px",this.element.style.width=v.offsetLeft+v.offsetWidth-m.offsetLeft+"px"),this.element.style.top=C.offsetTop+"px",this.element.style.height=F.offsetTop+F.offsetHeight-C.offsetTop+"px")}atTopLeft(e){return e.row.position-1===this.top&&e.column.getPosition()-1===this.left}atBottomRight(e){return e.row.position-1===this.bottom&&e.column.getPosition()-1===this.right}occupies(e){return this.occupiesRow(e.row)&&this.occupiesColumn(e.column)}occupiesRow(e){return this.top<=e.position-1&&e.position-1<=this.bottom}occupiesColumn(e){return this.left<=e.getPosition()-1&&e.getPosition()-1<=this.right}overlaps(e,t,i,n){return!(this.left>i||e>this.right||this.top>n||t>this.bottom)}getData(){var e=[],t=this.getRows(),i=this.getColumns();return t.forEach(n=>{var r=n.getData(),a={};i.forEach(o=>{a[o.field]=r[o.field]}),e.push(a)}),e}getCells(e,t){var i=[],n=this.getRows(),r=this.getColumns();return e?i=n.map(a=>{var o=[];return a.getCells().forEach(l=>{r.includes(l.column)&&o.push(t?l.getComponent():l)}),o}):n.forEach(a=>{a.getCells().forEach(o=>{r.includes(o.column)&&i.push(t?o.getComponent():o)})}),i}getStructuredCells(){return this.getCells(!0,!0)}getRows(){return this._getTableRows().slice(this.top,this.bottom+1)}getColumns(){return this._getTableColumns().slice(this.left,this.right+1)}clearValues(){var e=this.getCells(),t=this.table.options.selectableRangeClearCellsValue;this.table.blockRedraw(),e.forEach(i=>{i.setValue(t)}),this.table.restoreRedraw()}getBounds(e){var t=this.getCells(!1,e),i={start:null,end:null};return t.length?(i.start=t[0],i.end=t[t.length-1]):console.warn("No bounds defined on range"),i}getComponent(){return this.component||(this.component=new Sp(this)),this.component}destroy(e){this.destroyed=!0,this.element.remove(),e&&this.rangeManager.rangeRemoved(this),this.initialized&&this.dispatchExternal("rangeRemoved",this.getComponent())}destroyedGuard(e){return this.destroyed&&console.warn("You cannot call the "+e+" function on a destroyed range"),!this.destroyed}}var Dp={rangeJumpUp:["ctrl + 38","meta + 38"],rangeJumpDown:["ctrl + 40","meta + 40"],rangeJumpLeft:["ctrl + 37","meta + 37"],rangeJumpRight:["ctrl + 39","meta + 39"],rangeExpandUp:"shift + 38",rangeExpandDown:"shift + 40",rangeExpandLeft:"shift + 37",rangeExpandRight:"shift + 39",rangeExpandJumpUp:["ctrl + shift + 38","meta + shift + 38"],rangeExpandJumpDown:["ctrl + shift + 40","meta + shift + 40"],rangeExpandJumpLeft:["ctrl + shift + 37","meta + shift + 37"],rangeExpandJumpRight:["ctrl + shift + 39","meta + shift + 39"]},Tp={rangeJumpLeft:function(s){this.dispatch("keybinding-nav-range",s,"left",!0,!1)},rangeJumpRight:function(s){this.dispatch("keybinding-nav-range",s,"right",!0,!1)},rangeJumpUp:function(s){this.dispatch("keybinding-nav-range",s,"up",!0,!1)},rangeJumpDown:function(s){this.dispatch("keybinding-nav-range",s,"down",!0,!1)},rangeExpandLeft:function(s){this.dispatch("keybinding-nav-range",s,"left",!1,!0)},rangeExpandRight:function(s){this.dispatch("keybinding-nav-range",s,"right",!1,!0)},rangeExpandUp:function(s){this.dispatch("keybinding-nav-range",s,"up",!1,!0)},rangeExpandDown:function(s){this.dispatch("keybinding-nav-range",s,"down",!1,!0)},rangeExpandJumpLeft:function(s){this.dispatch("keybinding-nav-range",s,"left",!0,!0)},rangeExpandJumpRight:function(s){this.dispatch("keybinding-nav-range",s,"right",!0,!0)},rangeExpandJumpUp:function(s){this.dispatch("keybinding-nav-range",s,"up",!0,!0)},rangeExpandJumpDown:function(s){this.dispatch("keybinding-nav-range",s,"down",!0,!0)}},_p={range:function(s){var e=[],t=this.table.modules.selectRange.activeRange,i=!1,n,r,a,o,l;return l=s.length,t&&(n=t.getBounds(),r=n.start,n.start===n.end&&(i=!0),r&&(e=this.table.rowManager.activeRows.slice(),a=e.indexOf(r.row),i?o=s.length:o=e.indexOf(n.end.row)-a+1,a>-1&&(this.table.blockRedraw(),e=e.slice(a,a+o),e.forEach((u,h)=>{u.updateData(s[h%l])}),this.table.restoreRedraw()))),e}},Op={range:function(s){var e=[],t=[],i=this.table.modules.selectRange.activeRange,n=!1,r,a,o,l,u;return i&&(r=i.getBounds(),a=r.start,r.start===r.end&&(n=!0),a&&(s=s.split(`
42
+ `),s.forEach(function(h){e.push(h.split(" "))}),e.length&&(l=this.table.columnManager.getVisibleColumnsByIndex(),u=l.indexOf(a.column),u>-1)))?(n?o=e[0].length:o=l.indexOf(r.end.column)-u+1,l=l.slice(u,u+o),e.forEach(h=>{var m={},v=h.length;l.forEach(function(C,F){m[C.field]=h[F%v]}),t.push(m)}),t):!1}},Lp={range:function(){var s=this.modules.selectRange.selectedColumns();return this.columnManager.rowHeader&&s.unshift(this.columnManager.rowHeader),s}},Pp={range:function(){return this.modules.selectRange.selectedRows()}},Fp={keybindings:{bindings:Dp,actions:Tp},clipboard:{pasteActions:_p,pasteParsers:Op},export:{columnLookups:Lp,rowLookups:Pp}};class Ap extends ke{static moduleName="selectRange";static moduleInitOrder=1;static moduleExtensions=Fp;constructor(e){super(e),this.selecting="cell",this.mousedown=!1,this.ranges=[],this.overlay=null,this.rowHeader=null,this.layoutChangeTimeout=null,this.columnSelection=!1,this.rowSelection=!1,this.maxRanges=0,this.activeRange=!1,this.blockKeydown=!1,this.keyDownEvent=this._handleKeyDown.bind(this),this.mouseUpEvent=this._handleMouseUp.bind(this),this.registerTableOption("selectableRange",!1),this.registerTableOption("selectableRangeColumns",!1),this.registerTableOption("selectableRangeRows",!1),this.registerTableOption("selectableRangeClearCells",!1),this.registerTableOption("selectableRangeClearCellsValue",void 0),this.registerTableOption("selectableRangeAutoFocus",!0),this.registerTableFunction("getRangesData",this.getRangesData.bind(this)),this.registerTableFunction("getRanges",this.getRanges.bind(this)),this.registerTableFunction("addRange",this.addRangeFromComponent.bind(this)),this.registerComponentFunction("cell","getRanges",this.cellGetRanges.bind(this)),this.registerComponentFunction("row","getRanges",this.rowGetRanges.bind(this)),this.registerComponentFunction("column","getRanges",this.colGetRanges.bind(this))}initialize(){this.options("selectableRange")&&(this.options("selectableRows")?console.warn("SelectRange functionality cannot be used in conjunction with row selection"):(this.maxRanges=this.options("selectableRange"),this.initializeTable(),this.initializeWatchers()),this.options("columns").findIndex(e=>e.frozen)>0&&console.warn("Having frozen column in arbitrary position with selectRange option may result in unpredictable behavior."),this.options("columns").filter(e=>e.frozen)>1&&console.warn("Having multiple frozen columns with selectRange option may result in unpredictable behavior."))}initializeTable(){this.overlay=document.createElement("div"),this.overlay.classList.add("tabulator-range-overlay"),this.rangeContainer=document.createElement("div"),this.rangeContainer.classList.add("tabulator-range-container"),this.activeRangeCellElement=document.createElement("div"),this.activeRangeCellElement.classList.add("tabulator-range-cell-active"),this.overlay.appendChild(this.rangeContainer),this.overlay.appendChild(this.activeRangeCellElement),this.table.rowManager.element.addEventListener("keydown",this.keyDownEvent),this.resetRanges(),this.table.rowManager.element.appendChild(this.overlay),this.table.columnManager.element.setAttribute("tabindex",0),this.table.element.classList.add("tabulator-ranges")}initializeWatchers(){this.columnSelection=this.options("selectableRangeColumns"),this.rowSelection=this.options("selectableRangeRows"),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-mousedown",this.handleColumnMouseDown.bind(this)),this.subscribe("column-mousemove",this.handleColumnMouseMove.bind(this)),this.subscribe("column-resized",this.handleColumnResized.bind(this)),this.subscribe("column-moving",this.handleColumnMoving.bind(this)),this.subscribe("column-moved",this.handleColumnMoved.bind(this)),this.subscribe("column-width",this.layoutChange.bind(this)),this.subscribe("column-height",this.layoutChange.bind(this)),this.subscribe("column-resized",this.layoutChange.bind(this)),this.subscribe("columns-loaded",this.updateHeaderColumn.bind(this)),this.subscribe("cell-height",this.layoutChange.bind(this)),this.subscribe("cell-rendered",this.renderCell.bind(this)),this.subscribe("cell-mousedown",this.handleCellMouseDown.bind(this)),this.subscribe("cell-mousemove",this.handleCellMouseMove.bind(this)),this.subscribe("cell-click",this.handleCellClick.bind(this)),this.subscribe("cell-editing",this.handleEditingCell.bind(this)),this.subscribe("page-changed",this.redraw.bind(this)),this.subscribe("scroll-vertical",this.layoutChange.bind(this)),this.subscribe("scroll-horizontal",this.layoutChange.bind(this)),this.subscribe("data-destroy",this.tableDestroyed.bind(this)),this.subscribe("data-processed",this.resetRanges.bind(this)),this.subscribe("table-layout",this.layoutElement.bind(this)),this.subscribe("table-redraw",this.redraw.bind(this)),this.subscribe("table-destroy",this.tableDestroyed.bind(this)),this.subscribe("edit-editor-clear",this.finishEditingCell.bind(this)),this.subscribe("edit-blur",this.restoreFocus.bind(this)),this.subscribe("keybinding-nav-prev",this.keyNavigate.bind(this,"left")),this.subscribe("keybinding-nav-next",this.keyNavigate.bind(this,"right")),this.subscribe("keybinding-nav-left",this.keyNavigate.bind(this,"left")),this.subscribe("keybinding-nav-right",this.keyNavigate.bind(this,"right")),this.subscribe("keybinding-nav-up",this.keyNavigate.bind(this,"up")),this.subscribe("keybinding-nav-down",this.keyNavigate.bind(this,"down")),this.subscribe("keybinding-nav-range",this.keyNavigateRange.bind(this))}initializeColumn(e){this.columnSelection&&e.definition.headerSort&&this.options("headerSortClickElement")!=="icon"&&console.warn("Using column headerSort with selectableRangeColumns option may result in unpredictable behavior. Consider using headerSortClickElement: 'icon'."),e.modules.edit}updateHeaderColumn(){var e;this.rowSelection&&(this.rowHeader=this.table.columnManager.getVisibleColumnsByIndex()[0],this.rowHeader&&(this.rowHeader.definition.cssClass=this.rowHeader.definition.cssClass+" tabulator-range-row-header",this.rowHeader.definition.headerSort&&console.warn("Using column headerSort with selectableRangeRows option may result in unpredictable behavior"),this.rowHeader.definition.editor&&console.warn("Using column editor with selectableRangeRows option may result in unpredictable behavior"))),this.table.modules.frozenColumns&&this.table.modules.frozenColumns.active&&(e=this.table.modules.frozenColumns.getFrozenColumns(),(e.length>1||e.length===1&&e[0]!==this.rowHeader)&&console.warn("Using frozen columns that are not the range header in combination with the selectRange option may result in unpredictable behavior"))}getRanges(){return this.ranges.map(e=>e.getComponent())}getRangesData(){return this.ranges.map(e=>e.getData())}addRangeFromComponent(e,t){return e=e?e._cell:null,t=t?t._cell:null,this.addRange(e,t)}cellGetRanges(e){var t=[];return e.column===this.rowHeader?t=this.ranges.filter(i=>i.occupiesRow(e.row)):t=this.ranges.filter(i=>i.occupies(e)),t.map(i=>i.getComponent())}rowGetRanges(e){var t=this.ranges.filter(i=>i.occupiesRow(e));return t.map(i=>i.getComponent())}colGetRanges(e){var t=this.ranges.filter(i=>i.occupiesColumn(e));return t.map(i=>i.getComponent())}_handleMouseUp(e){this.mousedown=!1,document.removeEventListener("mouseup",this.mouseUpEvent)}_handleKeyDown(e){if(!this.blockKeydown&&(!this.table.modules.edit||this.table.modules.edit&&!this.table.modules.edit.currentCell)){if(e.key==="Enter"){if(this.table.modules.edit&&this.table.modules.edit.currentCell)return;this.table.modules.edit.editCell(this.getActiveCell()),e.preventDefault()}(e.key==="Backspace"||e.key==="Delete")&&this.options("selectableRangeClearCells")&&this.activeRange&&this.activeRange.clearValues()}}initializeFocus(e){var t;this.restoreFocus();try{document.selection?(t=document.body.createTextRange(),t.moveToElementText(e.getElement()),t.select()):window.getSelection&&(t=document.createRange(),t.selectNode(e.getElement()),window.getSelection().removeAllRanges(),window.getSelection().addRange(t))}catch{}}restoreFocus(e){return this.table.rowManager.element.focus(),!0}handleColumnResized(e){var t;this.selecting!=="column"&&this.selecting!=="all"||(t=this.ranges.some(i=>i.occupiesColumn(e)),t&&this.ranges.forEach(i=>{var n=i.getColumns(!0);n.forEach(r=>{r!==e&&r.setWidth(e.width)})}))}handleColumnMoving(e,t){this.resetRanges().setBounds(t),this.overlay.style.visibility="hidden"}handleColumnMoved(e,t,i){this.activeRange.setBounds(e),this.layoutElement()}handleColumnMouseDown(e,t){e.button===2&&(this.selecting==="column"||this.selecting==="all")&&this.activeRange.occupiesColumn(t)||this.table.options.movableColumns&&this.selecting==="column"&&this.activeRange.occupiesColumn(t)||(this.mousedown=!0,document.addEventListener("mouseup",this.mouseUpEvent),this.newSelection(e,t))}handleColumnMouseMove(e,t){t===this.rowHeader||!this.mousedown||this.selecting==="all"||this.activeRange.setBounds(!1,t,!0)}renderCell(e){var t=e.getElement(),i=this.ranges.findIndex(n=>n.occupies(e));t.classList.toggle("tabulator-range-selected",i!==-1),t.classList.toggle("tabulator-range-only-cell-selected",this.ranges.length===1&&this.ranges[0].atTopLeft(e)&&this.ranges[0].atBottomRight(e)),t.dataset.range=i}handleCellMouseDown(e,t){e.button===2&&(this.activeRange.occupies(t)||(this.selecting==="row"||this.selecting==="all")&&this.activeRange.occupiesRow(t.row))||(this.mousedown=!0,document.addEventListener("mouseup",this.mouseUpEvent),this.newSelection(e,t))}handleCellMouseMove(e,t){!this.mousedown||this.selecting==="all"||this.activeRange.setBounds(!1,t,!0)}handleCellClick(e,t){this.initializeFocus(t)}handleEditingCell(e){this.activeRange&&this.activeRange.setBounds(e)}finishEditingCell(){this.blockKeydown=!0,this.table.rowManager.element.focus(),setTimeout(()=>{this.blockKeydown=!1},10)}keyNavigate(e,t){this.navigate(!1,!1,e),t.preventDefault()}keyNavigateRange(e,t,i,n){this.navigate(i,n,t),e.preventDefault()}navigate(e,t,i){var n=!1,r,a,o,l,u,h,m,v,C,F,x;if(this.table.modules.edit&&this.table.modules.edit.currentCell)return!1;if(this.ranges.length>1&&(this.ranges=this.ranges.filter(R=>R===this.activeRange?(R.setEnd(R.start.row,R.start.col),!0):(R.destroy(),!1))),r=this.activeRange,o={top:r.top,bottom:r.bottom,left:r.left,right:r.right},a=t?r.end:r.start,l=a.row,u=a.col,e)switch(i){case"left":u=this.findJumpCellLeft(r.start.row,a.col);break;case"right":u=this.findJumpCellRight(r.start.row,a.col);break;case"up":l=this.findJumpCellUp(a.row,r.start.col);break;case"down":l=this.findJumpCellDown(a.row,r.start.col);break}else{if(t&&(this.selecting==="row"&&(i==="left"||i==="right")||this.selecting==="column"&&(i==="up"||i==="down")))return;switch(i){case"left":u=Math.max(u-1,0);break;case"right":u=Math.min(u+1,this.getTableColumns().length-1);break;case"up":l=Math.max(l-1,0);break;case"down":l=Math.min(l+1,this.getTableRows().length-1);break}}if(this.rowHeader&&u===0&&(u=1),t||r.setStart(l,u),r.setEnd(l,u),t||(this.selecting="cell"),n=o.top!==r.top||o.bottom!==r.bottom||o.left!==r.left||o.right!==r.right,n)return h=this.getRowByRangePos(r.end.row),m=this.getColumnByRangePos(r.end.col),v=h.getElement().getBoundingClientRect(),F=m.getElement().getBoundingClientRect(),C=this.table.rowManager.getElement().getBoundingClientRect(),x=this.table.columnManager.getElement().getBoundingClientRect(),v.top>=C.top&&v.bottom<=C.bottom||(h.getElement().parentNode&&m.getElement().parentNode?this.autoScroll(r,h.getElement(),m.getElement()):h.getComponent().scrollTo(void 0,!1)),F.left>=x.left+this.getRowHeaderWidth()&&F.right<=x.right||(h.getElement().parentNode&&m.getElement().parentNode?this.autoScroll(r,h.getElement(),m.getElement()):m.getComponent().scrollTo(void 0,!1)),this.layoutElement(),!0}rangeRemoved(e){this.ranges=this.ranges.filter(t=>t!==e),this.activeRange===e&&(this.ranges.length?this.activeRange=this.ranges[this.ranges.length-1]:this.addRange()),this.layoutElement()}findJumpRow(e,t,i,n,r){return i&&(t=t.reverse()),this.findJumpItem(n,r,t,function(a){return a.getData()[e.getField()]})}findJumpCol(e,t,i,n,r){return i&&(t=t.reverse()),this.findJumpItem(n,r,t,function(a){return e.getData()[a.getField()]})}findJumpItem(e,t,i,n){var r;for(let a of i){let o=n(a);if(e){if(r=a,o)break}else if(t){if(r=a,o)break}else if(o)r=a;else break}return r}findJumpCellLeft(e,t){var i=this.getRowByRangePos(e),n=this.getTableColumns(),r=this.isEmpty(i.getData()[n[t].getField()]),a=n[t-1]?this.isEmpty(i.getData()[n[t-1].getField()]):!1,o=this.rowHeader?n.slice(1,t):n.slice(0,t),l=this.findJumpCol(i,o,!0,r,a);return l?l.getPosition()-1:t}findJumpCellRight(e,t){var i=this.getRowByRangePos(e),n=this.getTableColumns(),r=this.isEmpty(i.getData()[n[t].getField()]),a=n[t+1]?this.isEmpty(i.getData()[n[t+1].getField()]):!1,o=this.findJumpCol(i,n.slice(t+1,n.length),!1,r,a);return o?o.getPosition()-1:t}findJumpCellUp(e,t){var i=this.getColumnByRangePos(t),n=this.getTableRows(),r=this.isEmpty(n[e].getData()[i.getField()]),a=n[e-1]?this.isEmpty(n[e-1].getData()[i.getField()]):!1,o=this.findJumpRow(i,n.slice(0,e),!0,r,a);return o?o.position-1:e}findJumpCellDown(e,t){var i=this.getColumnByRangePos(t),n=this.getTableRows(),r=this.isEmpty(n[e].getData()[i.getField()]),a=n[e+1]?this.isEmpty(n[e+1].getData()[i.getField()]):!1,o=this.findJumpRow(i,n.slice(e+1,n.length),!1,r,a);return o?o.position-1:e}newSelection(e,t){var i;if(t.type==="column"){if(!this.columnSelection)return;if(t===this.rowHeader){i=this.resetRanges(),this.selecting="all";var n,r=this.getCell(-1,-1);this.rowHeader?n=this.getCell(0,1):n=this.getCell(0,0),i.setBounds(n,r);return}else this.selecting="column"}else t.column===this.rowHeader?this.selecting="row":this.selecting="cell";e.shiftKey?this.activeRange.setBounds(!1,t):e.ctrlKey?this.addRange().setBounds(t):this.resetRanges().setBounds(t)}autoScroll(e,t,i){var n=this.table.rowManager.element,r,a,o,l;typeof t>"u"&&(t=this.getRowByRangePos(e.end.row).getElement()),typeof i>"u"&&(i=this.getColumnByRangePos(e.end.col).getElement()),r={left:i.offsetLeft,right:i.offsetLeft+i.offsetWidth,top:t.offsetTop,bottom:t.offsetTop+t.offsetHeight},a={left:n.scrollLeft+this.getRowHeaderWidth(),right:Math.ceil(n.scrollLeft+n.clientWidth),top:n.scrollTop,bottom:n.scrollTop+n.offsetHeight-this.table.rowManager.scrollbarWidth},o=a.left<r.left&&r.left<a.right&&a.left<r.right&&r.right<a.right,l=a.top<r.top&&r.top<a.bottom&&a.top<r.bottom&&r.bottom<a.bottom,o||(r.left<a.left?n.scrollLeft=r.left-this.getRowHeaderWidth():r.right>a.right&&(n.scrollLeft=Math.min(r.right-n.clientWidth,r.left-this.getRowHeaderWidth()))),l||(r.top<a.top?n.scrollTop=r.top:r.bottom>a.bottom&&(n.scrollTop=r.bottom-n.clientHeight))}layoutChange(){this.overlay.style.visibility="hidden",clearTimeout(this.layoutChangeTimeout),this.layoutChangeTimeout=setTimeout(this.layoutRanges.bind(this),200)}redraw(e){e&&(this.selecting="cell",this.resetRanges(),this.layoutElement())}layoutElement(e){var t;e?t=this.table.rowManager.getVisibleRows(!0):t=this.table.rowManager.getRows(),t.forEach(i=>{i.type==="row"&&(this.layoutRow(i),i.cells.forEach(n=>this.renderCell(n)))}),this.getTableColumns().forEach(i=>{this.layoutColumn(i)}),this.layoutRanges()}layoutRow(e){var t=e.getElement(),i=!1,n=this.ranges.some(r=>r.occupiesRow(e));this.selecting==="row"?i=n:this.selecting==="all"&&(i=!0),t.classList.toggle("tabulator-range-selected",i),t.classList.toggle("tabulator-range-highlight",n)}layoutColumn(e){var t=e.getElement(),i=!1,n=this.ranges.some(r=>r.occupiesColumn(e));this.selecting==="column"?i=n:this.selecting==="all"&&(i=!0),t.classList.toggle("tabulator-range-selected",i),t.classList.toggle("tabulator-range-highlight",n)}layoutRanges(){var e,t,i;this.table.initialized&&(e=this.getActiveCell(),e&&(t=e.getElement(),i=e.row.getElement(),this.table.rtl?this.activeRangeCellElement.style.right=i.offsetWidth-t.offsetLeft-t.offsetWidth+"px":this.activeRangeCellElement.style.left=i.offsetLeft+t.offsetLeft+"px",this.activeRangeCellElement.style.top=i.offsetTop+"px",this.activeRangeCellElement.style.width=t.offsetWidth+"px",this.activeRangeCellElement.style.height=i.offsetHeight+"px",this.ranges.forEach(n=>n.layout()),this.overlay.style.visibility="visible"))}getCell(e,t){var i;return t<0&&(t=this.getTableColumns().length+t,t<0)?null:(e<0&&(e=this.getTableRows().length+e),i=this.table.rowManager.getRowFromPosition(e+1),i?i.getCells(!1,!0).filter(n=>n.column.visible)[t]:null)}getActiveCell(){return this.getCell(this.activeRange.start.row,this.activeRange.start.col)}getRowByRangePos(e){return this.getTableRows()[e]}getColumnByRangePos(e){return this.getTableColumns()[e]}getTableRows(){return this.table.rowManager.getDisplayRows().filter(e=>e.type==="row")}getTableColumns(){return this.table.columnManager.getVisibleColumnsByIndex()}addRange(e,t){var i;return this.maxRanges!==!0&&this.ranges.length>=this.maxRanges&&this.ranges.shift().destroy(),i=new Rp(this.table,this,e,t),this.activeRange=i,this.ranges.push(i),this.rangeContainer.appendChild(i.element),i}resetRanges(){var e,t,i;return this.ranges.forEach(n=>n.destroy()),this.ranges=[],e=this.addRange(),this.table.rowManager.activeRows.length&&(i=this.table.rowManager.activeRows[0].cells.filter(n=>n.column.visible),t=i[this.rowHeader?1:0],t&&(e.setBounds(t),this.options("selectableRangeAutoFocus")&&this.initializeFocus(t))),e}tableDestroyed(){document.removeEventListener("mouseup",this.mouseUpEvent),this.table.rowManager.element.removeEventListener("keydown",this.keyDownEvent)}selectedRows(e){return e?this.activeRange.getRows().map(t=>t.getComponent()):this.activeRange.getRows()}selectedColumns(e){return e?this.activeRange.getColumns().map(t=>t.getComponent()):this.activeRange.getColumns()}getRowHeaderWidth(){return this.rowHeader?this.rowHeader.getElement().offsetWidth:0}isEmpty(e){return e==null||e===""}}function Hp(s,e,t,i,n,r,a){var o=a.alignEmptyValues,l=a.decimalSeparator,u=a.thousandSeparator,h=0;if(s=String(s),e=String(e),u&&(s=s.split(u).join(""),e=e.split(u).join("")),l&&(s=s.split(l).join("."),e=e.split(l).join(".")),s=parseFloat(s),e=parseFloat(e),isNaN(s))h=isNaN(e)?0:-1;else if(isNaN(e))h=1;else return s-e;return(o==="top"&&r==="desc"||o==="bottom"&&r==="asc")&&(h*=-1),h}function zp(s,e,t,i,n,r,a){var o=a.alignEmptyValues,l=0,u;if(!s)l=e?-1:0;else if(!e)l=1;else{switch(typeof a.locale){case"boolean":a.locale&&(u=this.langLocale());break;case"string":u=a.locale;break}return String(s).toLowerCase().localeCompare(String(e).toLowerCase(),u)}return(o==="top"&&r==="desc"||o==="bottom"&&r==="asc")&&(l*=-1),l}function zn(s,e,t,i,n,r,a){var o=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),l=a.format||"dd/MM/yyyy HH:mm:ss",u=a.alignEmptyValues,h=0;if(typeof o<"u"){if(o.isDateTime(s)||(l==="iso"?s=o.fromISO(String(s)):s=o.fromFormat(String(s),l)),o.isDateTime(e)||(l==="iso"?e=o.fromISO(String(e)):e=o.fromFormat(String(e),l)),!s.isValid)h=e.isValid?-1:0;else if(!e.isValid)h=1;else return s-e;return(u==="top"&&r==="desc"||u==="bottom"&&r==="asc")&&(h*=-1),h}else console.error("Sort Error - 'datetime' sorter is dependant on luxon.js")}function Bp(s,e,t,i,n,r,a){return a.format||(a.format="dd/MM/yyyy"),zn.call(this,s,e,t,i,n,r,a)}function Np(s,e,t,i,n,r,a){return a.format||(a.format="HH:mm"),zn.call(this,s,e,t,i,n,r,a)}function Ip(s,e,t,i,n,r,a){var o=s===!0||s==="true"||s==="True"||s===1?1:0,l=e===!0||e==="true"||e==="True"||e===1?1:0;return o-l}function Vp(s,e,t,i,n,r,a){var o=a.type||"length",l=a.alignEmptyValues,u=0,h=this.table,m;a.valueMap&&(typeof a.valueMap=="string"?m=function(C){return C.map(F=>He.retrieveNestedData(h.options.nestedFieldSeparator,a.valueMap,F))}:m=a.valueMap);function v(C){var F;switch(m&&(C=m(C)),o){case"length":F=C.length;break;case"sum":F=C.reduce(function(x,R){return x+R});break;case"max":F=Math.max.apply(null,C);break;case"min":F=Math.min.apply(null,C);break;case"avg":F=C.reduce(function(x,R){return x+R})/C.length;break;case"string":F=C.join("");break}return F}if(!Array.isArray(s))u=Array.isArray(e)?-1:0;else if(!Array.isArray(e))u=1;else return o==="string"?String(v(s)).toLowerCase().localeCompare(String(v(e)).toLowerCase()):v(e)-v(s);return(l==="top"&&r==="desc"||l==="bottom"&&r==="asc")&&(u*=-1),u}function jp(s,e,t,i,n,r,a){var o=typeof s>"u"?0:1,l=typeof e>"u"?0:1;return o-l}function Wp(s,e,t,i,n,r,a){var o,l,u,h,m=0,v,C=/(\d+)|(\D+)/g,F=/\d/,x=a.alignEmptyValues,R=0;if(!s&&s!==0)R=!e&&e!==0?0:-1;else if(!e&&e!==0)R=1;else{if(isFinite(s)&&isFinite(e))return s-e;if(o=String(s).toLowerCase(),l=String(e).toLowerCase(),o===l)return 0;if(!(F.test(o)&&F.test(l)))return o>l?1:-1;for(o=o.match(C),l=l.match(C),v=o.length>l.length?l.length:o.length;m<v;)if(u=o[m],h=l[m++],u!==h)return isFinite(u)&&isFinite(h)?(u.charAt(0)==="0"&&(u="."+u),h.charAt(0)==="0"&&(h="."+h),u-h):u>h?1:-1;return o.length>l.length}return(x==="top"&&r==="desc"||x==="bottom"&&r==="asc")&&(R*=-1),R}var Yp={number:Hp,string:zp,date:Bp,time:Np,datetime:zn,boolean:Ip,array:Vp,exists:jp,alphanum:Wp};class Ui extends ke{static moduleName="sort";static sorters=Yp;constructor(e){super(e),this.sortList=[],this.changed=!1,this.registerTableOption("sortMode","local"),this.registerTableOption("initialSort",!1),this.registerTableOption("columnHeaderSortMulti",!0),this.registerTableOption("sortOrderReverse",!1),this.registerTableOption("headerSortElement","<div class='tabulator-arrow'></div>"),this.registerTableOption("headerSortClickElement","header"),this.registerColumnOption("sorter"),this.registerColumnOption("sorterParams"),this.registerColumnOption("headerSort",!0),this.registerColumnOption("headerSortStartingDir"),this.registerColumnOption("headerSortTristate")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.registerDataHandler(this.sort.bind(this),20),this.registerTableFunction("setSort",this.userSetSort.bind(this)),this.registerTableFunction("getSorters",this.getSort.bind(this)),this.registerTableFunction("clearSort",this.clearSort.bind(this)),this.table.options.sortMode==="remote"&&this.subscribe("data-params",this.remoteSortParams.bind(this))}tableBuilt(){this.table.options.initialSort&&this.setSort(this.table.options.initialSort)}remoteSortParams(e,t,i,n){var r=this.getSort();return r.forEach(a=>{delete a.column}),n.sort=r,n}userSetSort(e,t){this.setSort(e,t),this.refreshSort()}clearSort(){this.clear(),this.refreshSort()}initializeColumn(e){var t=!1,i,n;switch(typeof e.definition.sorter){case"string":Ui.sorters[e.definition.sorter]?t=Ui.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":t=e.definition.sorter;break}if(e.modules.sort={sorter:t,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:e.definition.headerSortTristate},e.definition.headerSort!==!1){switch(i=e.getElement(),i.classList.add("tabulator-sortable"),n=document.createElement("div"),n.classList.add("tabulator-col-sorter"),this.table.options.headerSortClickElement){case"icon":n.classList.add("tabulator-col-sorter-element");break;case"header":i.classList.add("tabulator-col-sorter-element");break;default:i.classList.add("tabulator-col-sorter-element");break}switch(this.table.options.headerSortElement){case"function":break;case"object":n.appendChild(this.table.options.headerSortElement);break;default:n.innerHTML=this.table.options.headerSortElement}e.titleHolderElement.appendChild(n),e.modules.sort.element=n,this.setColumnHeaderSortIcon(e,"none"),this.table.options.headerSortClickElement==="icon"&&n.addEventListener("mousedown",r=>{r.stopPropagation()}),(this.table.options.headerSortClickElement==="icon"?n:i).addEventListener("click",r=>{var a="",o=[],l=!1;if(e.modules.sort){if(e.modules.sort.tristate)e.modules.sort.dir=="none"?a=e.modules.sort.startingDir:e.modules.sort.dir==e.modules.sort.startingDir?a=e.modules.sort.dir=="asc"?"desc":"asc":a="none";else switch(e.modules.sort.dir){case"asc":a="desc";break;case"desc":a="asc";break;default:a=e.modules.sort.startingDir}this.table.options.columnHeaderSortMulti&&(r.shiftKey||r.ctrlKey)?(o=this.getSort(),l=o.findIndex(u=>u.field===e.getField()),l>-1?(o[l].dir=a,l=o.splice(l,1)[0],a!="none"&&o.push(l)):a!="none"&&o.push({column:e,dir:a}),this.setSort(o)):a=="none"?this.clear():this.setSort(e,a),this.refreshSort()}})}}refreshSort(){this.table.options.sortMode==="remote"?this.reloadData(null,!1,!1):this.refreshData(!0)}hasChanged(){var e=this.changed;return this.changed=!1,e}getSort(){var e=this,t=[];return e.sortList.forEach(function(i){i.column&&t.push({column:i.column.getComponent(),field:i.column.getField(),dir:i.dir})}),t}setSort(e,t){var i=this,n=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach(function(r){var a;a=i.table.columnManager.findColumn(r.column),a?(r.column=a,n.push(r),i.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",r.column)}),i.sortList=n,this.dispatch("sort-changed")}clear(){this.setSort([])}findSorter(e){var t=this.table.rowManager.activeRows[0],i="string",n,r;if(t&&(t=t.getData(),n=e.getField(),n))switch(r=e.getFieldValue(t),typeof r){case"undefined":i="string";break;case"boolean":i="boolean";break;default:!isNaN(r)&&r!==""?i="number":r.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum");break}return Ui.sorters[i]}sort(e,t){var i=this,n=this.table.options.sortOrderReverse?i.sortList.slice().reverse():i.sortList,r=[],a=[];return this.subscribedExternal("dataSorting")&&this.dispatchExternal("dataSorting",i.getSort()),t||i.clearColumnHeaders(),this.table.options.sortMode!=="remote"?(n.forEach(function(o,l){var u;o.column&&(u=o.column.modules.sort,u&&(u.sorter||(u.sorter=i.findSorter(o.column)),o.params=typeof u.params=="function"?u.params(o.column.getComponent(),o.dir):u.params,r.push(o)),t||i.setColumnHeader(o.column,o.dir))}),r.length&&i._sortItems(e,r)):t||n.forEach(function(o,l){i.setColumnHeader(o.column,o.dir)}),this.subscribedExternal("dataSorted")&&(e.forEach(o=>{a.push(o.getComponent())}),this.dispatchExternal("dataSorted",i.getSort(),a)),e}clearColumnHeaders(){this.table.columnManager.getRealColumns().forEach(e=>{e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"),this.setColumnHeaderSortIcon(e,"none"))})}setColumnHeader(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort",t==="asc"?"ascending":"descending"),this.setColumnHeaderSortIcon(e,t)}setColumnHeaderSortIcon(e,t){var i=e.modules.sort.element,n;if(e.definition.headerSort&&typeof this.table.options.headerSortElement=="function"){for(;i.firstChild;)i.removeChild(i.firstChild);n=this.table.options.headerSortElement.call(this.table,e.getComponent(),t),typeof n=="object"?i.appendChild(n):i.innerHTML=n}}_sortItems(e,t){var i=t.length-1;e.sort((n,r)=>{for(var a,o=i;o>=0;o--){let l=t[o];if(a=this._sortRow(n,r,l.column,l.dir,l.params),a!==0)break}return a})}_sortRow(e,t,i,n,r){var a,o,l=n=="asc"?e:t,u=n=="asc"?t:e;return e=i.getFieldValue(l.getData()),t=i.getFieldValue(u.getData()),e=typeof e<"u"?e:"",t=typeof t<"u"?t:"",a=l.getComponent(),o=u.getComponent(),i.modules.sort.sorter.call(this,e,t,a,o,i.getComponent(),n,r)}}class Gp{constructor(e,t){this.columnCount=e,this.rowCount=t,this.columnString=[],this.columns=[],this.rows=[]}genColumns(e){var t=Math.max(this.columnCount,Math.max(...e.map(i=>i.length)));this.columnString=[],this.columns=[];for(let i=1;i<=t;i++)this.incrementChar(this.columnString.length-1),this.columns.push(this.columnString.join(""));return this.columns}genRows(e){var t=Math.max(this.rowCount,e.length);this.rows=[];for(let i=1;i<=t;i++)this.rows.push(i);return this.rows}incrementChar(e){let t=this.columnString[e];t?t!=="Z"?this.columnString[e]=String.fromCharCode(this.columnString[e].charCodeAt(0)+1):(this.columnString[e]="A",e?this.incrementChar(e-1):this.columnString.push("A")):this.columnString.push("A")}setRowCount(e){this.rowCount=e}setColumnCount(e){this.columnCount=e}}class ha{constructor(e){return this._sheet=e,new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._sheet.table.componentFunctionBinder.handle("sheet",t._sheet,i)}})}getTitle(){return this._sheet.title}getKey(){return this._sheet.key}getDefinition(){return this._sheet.getDefinition()}getData(){return this._sheet.getData()}setData(e){return this._sheet.setData(e)}clear(){return this._sheet.clear()}remove(){return this._sheet.remove()}active(){return this._sheet.active()}setTitle(e){return this._sheet.setTitle(e)}setRows(e){return this._sheet.setRows(e)}setColumns(e){return this._sheet.setColumns(e)}}class da extends Je{constructor(e,t){super(e.table),this.spreadsheetManager=e,this.definition=t,this.title=this.definition.title||"",this.key=this.definition.key||this.definition.title,this.rowCount=this.definition.rows,this.columnCount=this.definition.columns,this.data=this.definition.data||[],this.element=null,this.isActive=!1,this.grid=new Gp(this.columnCount,this.rowCount),this.defaultColumnDefinition={width:100,headerHozAlign:"center",headerSort:!1},this.columnDefinition=Object.assign(this.defaultColumnDefinition,this.options("spreadsheetColumnDefinition")),this.columnDefs=[],this.rowDefs=[],this.columnFields=[],this.columns=[],this.rows=[],this.scrollTop=null,this.scrollLeft=null,this.initialize(),this.dispatchExternal("sheetAdded",this.getComponent())}initialize(){this.initializeElement(),this.initializeColumns(),this.initializeRows()}reinitialize(){this.initializeColumns(),this.initializeRows()}initializeElement(){this.element=document.createElement("div"),this.element.classList.add("tabulator-spreadsheet-tab"),this.element.innerText=this.title,this.element.addEventListener("click",()=>{this.spreadsheetManager.loadSheet(this)})}initializeColumns(){this.grid.setColumnCount(this.columnCount),this.columnFields=this.grid.genColumns(this.data),this.columnDefs=[],this.columnFields.forEach(e=>{var t=Object.assign({},this.columnDefinition);t.field=e,t.title=e,this.columnDefs.push(t)})}initializeRows(){var e;this.grid.setRowCount(this.rowCount),e=this.grid.genRows(this.data),this.rowDefs=[],e.forEach((t,i)=>{var n={_id:t},r=this.data[i];r&&r.forEach((a,o)=>{var l=this.columnFields[o];l&&(n[l]=a)}),this.rowDefs.push(n)})}unload(){this.isActive=!1,this.scrollTop=this.table.rowManager.scrollTop,this.scrollLeft=this.table.rowManager.scrollLeft,this.data=this.getData(!0),this.element.classList.remove("tabulator-spreadsheet-tab-active")}load(){var e=!this.isActive;this.isActive=!0,this.table.blockRedraw(),this.table.setData([]),this.table.setColumns(this.columnDefs),this.table.setData(this.rowDefs),this.table.restoreRedraw(),e&&this.scrollTop!==null&&(this.table.rowManager.element.scrollLeft=this.scrollLeft,this.table.rowManager.element.scrollTop=this.scrollTop),this.element.classList.add("tabulator-spreadsheet-tab-active"),this.dispatchExternal("sheetLoaded",this.getComponent())}getComponent(){return new ha(this)}getDefinition(){return{title:this.title,key:this.key,rows:this.rowCount,columns:this.columnCount,data:this.getData()}}getData(e){var t=[],i,n,r;return this.rowDefs.forEach(a=>{var o=[];this.columnFields.forEach(l=>{o.push(a[l])}),t.push(o)}),!e&&!this.options("spreadsheetOutputFull")&&(i=t.map(a=>a.findLastIndex(o=>typeof o<"u")+1),n=Math.max(...i),r=i.findLastIndex(a=>a>0)+1,t=t.slice(0,r),t=t.map(a=>a.slice(0,n))),t}setData(e){this.data=e,this.reinitialize(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}clear(){this.setData([])}setTitle(e){this.title=e,this.element.innerText=e,this.dispatchExternal("sheetUpdated",this.getComponent())}setRows(e){this.rowCount=e,this.initializeRows(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}setColumns(e){this.columnCount=e,this.reinitialize(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}remove(){this.spreadsheetManager.removeSheet(this)}destroy(){this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.dispatchExternal("sheetRemoved",this.getComponent())}active(){this.spreadsheetManager.loadSheet(this)}}class $p extends ke{static moduleName="spreadsheet";constructor(e){super(e),this.sheets=[],this.element=null,this.registerTableOption("spreadsheet",!1),this.registerTableOption("spreadsheetRows",50),this.registerTableOption("spreadsheetColumns",50),this.registerTableOption("spreadsheetColumnDefinition",{}),this.registerTableOption("spreadsheetOutputFull",!1),this.registerTableOption("spreadsheetData",!1),this.registerTableOption("spreadsheetSheets",!1),this.registerTableOption("spreadsheetSheetTabs",!1),this.registerTableOption("spreadsheetSheetTabsElement",!1),this.registerTableFunction("setSheets",this.setSheets.bind(this)),this.registerTableFunction("addSheet",this.addSheet.bind(this)),this.registerTableFunction("getSheets",this.getSheets.bind(this)),this.registerTableFunction("getSheetDefinitions",this.getSheetDefinitions.bind(this)),this.registerTableFunction("setSheetData",this.setSheetData.bind(this)),this.registerTableFunction("getSheet",this.getSheet.bind(this)),this.registerTableFunction("getSheetData",this.getSheetData.bind(this)),this.registerTableFunction("clearSheet",this.clearSheet.bind(this)),this.registerTableFunction("removeSheet",this.removeSheetFunc.bind(this)),this.registerTableFunction("activeSheet",this.activeSheetFunc.bind(this))}initialize(){this.options("spreadsheet")&&(this.subscribe("table-initialized",this.tableInitialized.bind(this)),this.subscribe("data-loaded",this.loadRemoteData.bind(this)),this.table.options.index="_id",this.options("spreadsheetData")&&this.options("spreadsheetSheets")&&(console.warn("You cannot use spreadsheetData and spreadsheetSheets at the same time, ignoring spreadsheetData"),this.table.options.spreadsheetData=!1),this.compatibilityCheck(),this.options("spreadsheetSheetTabs")&&this.initializeTabset())}compatibilityCheck(){this.options("data")&&console.warn("Do not use the data option when working with spreadsheets, use either spreadsheetData or spreadsheetSheets to pass data into the table"),this.options("pagination")&&console.warn("The spreadsheet module is not compatible with the pagination module"),this.options("groupBy")&&console.warn("The spreadsheet module is not compatible with the row grouping module"),this.options("responsiveCollapse")&&console.warn("The spreadsheet module is not compatible with the responsive collapse module")}initializeTabset(){this.element=document.createElement("div"),this.element.classList.add("tabulator-spreadsheet-tabs");var e=this.options("spreadsheetSheetTabsElement");e&&!(e instanceof HTMLElement)&&(e=document.querySelector(e),e||console.warn("Unable to find element matching spreadsheetSheetTabsElement selector:",this.options("spreadsheetSheetTabsElement"))),e?e.appendChild(this.element):this.footerAppend(this.element)}tableInitialized(){this.sheets.length?this.loadSheet(this.sheets[0]):this.options("spreadsheetSheets")?this.loadSheets(this.options("spreadsheetSheets")):this.options("spreadsheetData")&&this.loadData(this.options("spreadsheetData"))}loadRemoteData(e,t,i){return console.log("data",e,t,i),Array.isArray(e)?(this.table.dataLoader.clearAlert(),this.dispatchExternal("dataLoaded",e),!e.length||Array.isArray(e[0])?this.loadData(e):this.loadSheets(e)):console.error(`Spreadsheet Loading Error - Unable to process remote data due to invalid data type
43
+ Expecting: array
44
+ Received: `,typeof e,`
45
+ Data: `,e),!1}loadData(e){var t={data:e};this.loadSheet(this.newSheet(t))}destroySheets(){this.sheets.forEach(e=>{e.destroy()}),this.sheets=[],this.activeSheet=null}loadSheets(e){Array.isArray(e)||(e=[]),this.destroySheets(),e.forEach(t=>{this.newSheet(t)}),this.loadSheet(this.sheets[0])}loadSheet(e){this.activeSheet!==e&&(this.activeSheet&&this.activeSheet.unload(),this.activeSheet=e,e.load())}newSheet(e={}){var t;return e.rows||(e.rows=this.options("spreadsheetRows")),e.columns||(e.columns=this.options("spreadsheetColumns")),t=new da(this,e),this.sheets.push(t),this.element&&this.element.appendChild(t.element),t}removeSheet(e){var t=this.sheets.indexOf(e),i;this.sheets.length>1?t>-1&&(this.sheets.splice(t,1),e.destroy(),this.activeSheet===e&&(i=this.sheets[t-1]||this.sheets[0],i?this.loadSheet(i):this.activeSheet=null)):console.warn("Unable to remove sheet, at least one sheet must be active")}lookupSheet(e){return e?e instanceof da?e:e instanceof ha?e._sheet:this.sheets.find(t=>t.key===e)||!1:this.activeSheet}setSheets(e){return this.loadSheets(e),this.getSheets()}addSheet(e){return this.newSheet(e).getComponent()}getSheetDefinitions(){return this.sheets.map(e=>e.getDefinition())}getSheets(){return this.sheets.map(e=>e.getComponent())}getSheet(e){var t=this.lookupSheet(e);return t?t.getComponent():!1}setSheetData(e,t){e&&!t&&(t=e,e=!1);var i=this.lookupSheet(e);return i?i.setData(t):!1}getSheetData(e){var t=this.lookupSheet(e);return t?t.getData():!1}clearSheet(e){var t=this.lookupSheet(e);return t?t.clear():!1}removeSheetFunc(e){var t=this.lookupSheet(e);t&&this.removeSheet(t)}activeSheetFunc(e){var t=this.lookupSheet(e);return t?this.loadSheet(t):!1}}class Up extends ke{static moduleName="tooltip";constructor(e){super(e),this.tooltipSubscriber=null,this.headerSubscriber=null,this.timeout=null,this.popupInstance=null,this.registerTableOption("tooltipDelay",300),this.registerColumnOption("tooltip"),this.registerColumnOption("headerTooltip")}initialize(){this.deprecatedOptionsCheck(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){}initializeColumn(e){e.definition.headerTooltip&&!this.headerSubscriber&&(this.headerSubscriber=!0,this.subscribe("column-mousemove",this.mousemoveCheck.bind(this,"headerTooltip")),this.subscribe("column-mouseout",this.mouseoutCheck.bind(this,"headerTooltip"))),e.definition.tooltip&&!this.tooltipSubscriber&&(this.tooltipSubscriber=!0,this.subscribe("cell-mousemove",this.mousemoveCheck.bind(this,"tooltip")),this.subscribe("cell-mouseout",this.mouseoutCheck.bind(this,"tooltip")))}mousemoveCheck(e,t,i){var n=e==="tooltip"?i.column.definition.tooltip:i.definition.headerTooltip;n&&(this.clearPopup(),this.timeout=setTimeout(this.loadTooltip.bind(this,t,i,n),this.table.options.tooltipDelay))}mouseoutCheck(e,t,i){this.popupInstance||this.clearPopup()}clearPopup(e,t,i){clearTimeout(this.timeout),this.timeout=null,this.popupInstance&&this.popupInstance.hide()}loadTooltip(e,t,i){var n,r,a;function o(l){r=l}typeof i=="function"&&(i=i(e,t.getComponent(),o)),i instanceof HTMLElement?n=i:(n=document.createElement("div"),i===!0&&(t instanceof Yi?i=t.value:t.definition.field?this.langBind("columns|"+t.definition.field,l=>{n.innerHTML=i=l||t.definition.title}):i=t.definition.title),n.innerHTML=i),(i||i===0||i===!1)&&(n.classList.add("tabulator-tooltip"),n.addEventListener("mousemove",l=>l.preventDefault()),this.popupInstance=this.popup(n),typeof r=="function"&&this.popupInstance.renderCallback(r),a=this.popupInstance.containerEventCoords(e),this.popupInstance.show(a.x+15,a.y+15).hideOnBlur(()=>{this.dispatchExternal("TooltipClosed",t.getComponent()),this.popupInstance=null}),this.dispatchExternal("TooltipOpened",t.getComponent()))}}var Kp={integer:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:(e=Number(e),!isNaN(e)&&isFinite(e)&&Math.floor(e)===e)},float:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:(e=Number(e),!isNaN(e)&&isFinite(e)&&e%1!==0)},numeric:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:!isNaN(e)},string:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:isNaN(e)},alphanumeric:function(s,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=new RegExp(/^[a-z0-9]+$/i);return i.test(e)},max:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:parseFloat(e)<=t},min:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:parseFloat(e)>=t},starts:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).toLowerCase().startsWith(String(t).toLowerCase())},ends:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).toLowerCase().endsWith(String(t).toLowerCase())},minLength:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).length>=t},maxLength:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).length<=t},in:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:(typeof t=="string"&&(t=t.split("|")),t.indexOf(e)>-1)},regex:function(s,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=new RegExp(t);return i.test(e)},unique:function(s,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=!0,n=s.getData(),r=s.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(a){var o=a.getData();o!==n&&e==r.getFieldValue(o)&&(i=!1)}),i},required:function(s,e,t){return e!==""&&e!==null&&typeof e<"u"}};class Bn extends ke{static moduleName="validate";static validators=Kp;constructor(e){super(e),this.invalidCells=[],this.registerTableOption("validationMode","blocking"),this.registerColumnOption("validator"),this.registerTableFunction("getInvalidCells",this.getInvalidCells.bind(this)),this.registerTableFunction("clearCellValidation",this.userClearCellValidation.bind(this)),this.registerTableFunction("validate",this.userValidate.bind(this)),this.registerComponentFunction("cell","isValid",this.cellIsValid.bind(this)),this.registerComponentFunction("cell","clearValidation",this.clearValidation.bind(this)),this.registerComponentFunction("cell","validate",this.cellValidate.bind(this)),this.registerComponentFunction("column","validate",this.columnValidate.bind(this)),this.registerComponentFunction("row","validate",this.rowValidate.bind(this))}initialize(){this.subscribe("cell-delete",this.clearValidation.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("edit-success",this.editValidate.bind(this)),this.subscribe("edit-editor-clear",this.editorClear.bind(this)),this.subscribe("edit-edited-clear",this.editedClear.bind(this))}editValidate(e,t,i){var n=this.table.options.validationMode!=="manual"?this.validate(e.column.modules.validate,e,t):!0;return n!==!0&&setTimeout(()=>{e.getElement().classList.add("tabulator-validation-fail"),this.dispatchExternal("validationFailed",e.getComponent(),t,n)}),n}editorClear(e,t){t&&e.column.modules.validate&&this.cellValidate(e),e.getElement().classList.remove("tabulator-validation-fail")}editedClear(e){e.modules.validate&&(e.modules.validate.invalid=!1)}cellIsValid(e){return e.modules.validate&&e.modules.validate.invalid||!0}cellValidate(e){return this.validate(e.column.modules.validate,e,e.getValue())}columnValidate(e){var t=[];return e.cells.forEach(i=>{this.cellValidate(i)!==!0&&t.push(i.getComponent())}),t.length?t:!0}rowValidate(e){var t=[];return e.cells.forEach(i=>{this.cellValidate(i)!==!0&&t.push(i.getComponent())}),t.length?t:!0}userClearCellValidation(e){e||(e=this.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach(t=>{this.clearValidation(t._getSelf())})}userValidate(e){var t=[];return this.table.rowManager.rows.forEach(i=>{i=i.getComponent();var n=i.validate();n!==!0&&(t=t.concat(n))}),t.length?t:!0}initializeColumnCheck(e){typeof e.definition.validator<"u"&&this.initializeColumn(e)}initializeColumn(e){var t=this,i=[],n;e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach(r=>{n=t._extractValidator(r),n&&i.push(n)}):(n=this._extractValidator(e.definition.validator),n&&i.push(n)),e.modules.validate=i.length?i:!1)}_extractValidator(e){var t,i,n;switch(typeof e){case"string":return n=e.indexOf(":"),n>-1?(t=e.substring(0,n),i=e.substring(n+1)):t=e,this._buildValidator(t,i);case"function":return this._buildValidator(e);case"object":return this._buildValidator(e.type,e.parameters)}}_buildValidator(e,t){var i=typeof e=="function"?e:Bn.validators[e];return i?{type:typeof e=="function"?"function":e,func:i,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)}validate(e,t,i){var n=this,r=[],a=this.invalidCells.indexOf(t);return e&&e.forEach(o=>{o.func.call(n,t.getComponent(),i,o.params)||r.push({type:o.type,parameters:o.params})}),t.modules.validate||(t.modules.validate={}),r.length?(t.modules.validate.invalid=r,this.table.options.validationMode!=="manual"&&t.getElement().classList.add("tabulator-validation-fail"),a==-1&&this.invalidCells.push(t)):(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),a>-1&&this.invalidCells.splice(a,1)),r.length?r:!0}getInvalidCells(){var e=[];return this.invalidCells.forEach(t=>{e.push(t.getComponent())}),e}clearValidation(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.getElement().classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,t=this.invalidCells.indexOf(e),t>-1&&this.invalidCells.splice(t,1))}}var Nn=Object.freeze({__proto__:null,AccessorModule:_s,AjaxModule:vi,ClipboardModule:Os,ColumnCalcsModule:yi,DataTreeModule:Gc,DownloadModule:Ps,EditModule:Pn,ExportModule:Gi,FilterModule:si,FormatModule:wi,FrozenColumnsModule:If,FrozenRowsModule:Vf,GroupRowsModule:Wf,HistoryModule:As,HtmlTableImportModule:qf,ImportModule:An,InteractionModule:tp,KeybindingsModule:$i,MenuModule:np,MoveColumnsModule:rp,MoveRowsModule:Hs,MutatorModule:zs,PageModule:Hn,PersistenceModule:Ot,PopupModule:pp,PrintModule:mp,ReactiveDataModule:gp,ResizeColumnsModule:bp,ResizeRowsModule:vp,ResizeTableModule:yp,ResponsiveLayoutModule:Ep,SelectRangeModule:Ap,SelectRowModule:Mp,SortModule:Ui,SpreadsheetModule:$p,TooltipModule:Up,ValidateModule:Bn}),qp={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,debugInvalidComponentFuncs:!0,debugInitialization:!0,debugDeprecation:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",popupContainer:!1,columns:[],columnDefaults:{},rowHeader:!1,data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",footerElement:!1,index:"id",textDirection:"auto",addRowPos:"bottom",headerVisible:!0,renderVertical:"virtual",renderHorizontal:"basic",renderVerticalBuffer:0,scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,rowHeight:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{},dependencies:{}};class ca{constructor(e,t,i={}){this.table=e,this.msgType=t,this.registeredDefaults=Object.assign({},i)}register(e,t){this.registeredDefaults[e]=t}generate(e,t={}){var i=Object.assign({},this.registeredDefaults),n=this.table.options.debugInvalidOptions||t.debugInvalidOptions===!0;Object.assign(i,e);for(let r in t)i.hasOwnProperty(r)||(n&&console.warn("Invalid "+this.msgType+" option:",r),i[r]=t.key);for(let r in i)r in t?i[r]=t[r]:Array.isArray(i[r])?i[r]=Object.assign([],i[r]):typeof i[r]=="object"&&i[r]!==null?i[r]=Object.assign({},i[r]):typeof i[r]>"u"&&delete i[r];return i}}class Bs extends Je{constructor(e){super(e),this.elementVertical=e.rowManager.element,this.elementHorizontal=e.columnManager.element,this.tableElement=e.rowManager.tableElement,this.verticalFillMode="fit"}initialize(){}clearRows(){}clearColumns(){}reinitializeColumnWidths(e){}renderRows(){}renderColumns(){}rerenderRows(e){e&&e()}rerenderColumns(e,t){}renderRowCells(e){}rerenderRowCells(e,t){}scrollColumns(e,t){}scrollRows(e,t){}resize(){}scrollToRow(e){}scrollToRowNearestTop(e){}visibleRows(e){return[]}rows(){return this.table.rowManager.getDisplayRows()}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}clear(){this.clearRows(),this.clearColumns()}render(){this.renderRows(),this.renderColumns()}rerender(e){this.rerenderRows(),this.rerenderColumns()}scrollToRowPosition(e,t,i){var n=this.rows().indexOf(e),r=e.getElement(),a=0;return new Promise((o,l)=>{if(n>-1){if(typeof i>"u"&&(i=this.table.options.scrollToRowIfVisible),!i&&He.elVisible(r)&&(a=He.elOffset(r).top-He.elOffset(this.elementVertical).top,a>0&&a<this.elementVertical.clientHeight-r.offsetHeight))return o(),!1;switch(typeof t>"u"&&(t=this.table.options.scrollToRowPosition),t==="nearest"&&(t=this.scrollToRowNearestTop(e)?"top":"bottom"),this.scrollToRow(e),t){case"middle":case"center":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop+(r.offsetTop-this.elementVertical.scrollTop)-(this.elementVertical.scrollHeight-r.offsetTop)/2:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight/2;break;case"bottom":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop-(this.elementVertical.scrollHeight-r.offsetTop)+r.offsetHeight:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight+r.offsetHeight;break;case"top":this.elementVertical.scrollTop=r.offsetTop;break}o()}else console.warn("Scroll Error - Row not visible"),l("Scroll Error - Row not visible")})}}class Jp extends Bs{constructor(e){super(e)}renderRowCells(e,t){const i=document.createDocumentFragment();e.cells.forEach(n=>{i.appendChild(n.getElement())}),e.element.appendChild(i),t||e.cells.forEach(n=>{n.cellRendered()})}reinitializeColumnWidths(e){e.forEach(function(t){t.reinitializeWidth()})}}class Xp extends Bs{constructor(e){super(e),this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.windowBuffer=200,this.visibleRows=null,this.initialized=!1,this.isFitData=!1,this.columns=[]}initialize(){this.compatibilityCheck(),this.layoutCheck(),this.vertScrollListen()}compatibilityCheck(){this.options("layout")=="fitDataTable"&&console.warn("Horizontal Virtual DOM is not compatible with fitDataTable layout mode"),this.options("responsiveLayout")&&console.warn("Horizontal Virtual DOM is not compatible with responsive columns"),this.options("rtl")&&console.warn("Horizontal Virtual DOM is not currently compatible with RTL text direction")}layoutCheck(){this.isFitData=this.options("layout").startsWith("fitData")}vertScrollListen(){this.subscribe("scroll-vertical",this.clearVisRowCache.bind(this)),this.subscribe("data-refreshed",this.clearVisRowCache.bind(this))}clearVisRowCache(){this.visibleRows=null}renderColumns(e,t){this.dataChange()}scrollColumns(e,t){this.scrollLeft!=e&&(this.scrollLeft=e,this.scroll(e-(this.vDomScrollPosLeft+this.windowBuffer)))}calcWindowBuffer(){var e=this.elementVertical.clientWidth;this.table.columnManager.columnsByIndex.forEach(t=>{if(t.visible){var i=t.getWidth();i>e&&(e=i)}}),this.windowBuffer=e*2}rerenderColumns(e,t){var i={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol},n=0;e&&!this.initialized||(this.clear(),this.calcWindowBuffer(),this.scrollLeft=this.elementVertical.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.windowBuffer,this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,this.table.columnManager.columnsByIndex.forEach(r=>{var a={},o;r.visible&&(r.modules.frozen||(o=r.getWidth(),a.leftPos=n,a.rightPos=n+o,a.width=o,this.isFitData&&(a.fitDataCheck=r.modules.vdomHoz?r.modules.vdomHoz.fitDataCheck:!0),n+o>this.vDomScrollPosLeft&&n<this.vDomScrollPosRight?(this.leftCol==-1&&(this.leftCol=this.columns.length,this.vDomPadLeft=n),this.rightCol=this.columns.length):this.leftCol!==-1&&(this.vDomPadRight+=o),this.columns.push(r),r.modules.vdomHoz=a,n+=o))}),this.tableElement.style.paddingLeft=this.vDomPadLeft+"px",this.tableElement.style.paddingRight=this.vDomPadRight+"px",this.initialized=!0,t||(!e||this.reinitChanged(i))&&this.reinitializeRows(),this.elementVertical.scrollLeft=this.scrollLeft)}renderRowCells(e){if(this.initialized)this.initializeRow(e);else{const t=document.createDocumentFragment();e.cells.forEach(i=>{t.appendChild(i.getElement())}),e.element.appendChild(t),e.cells.forEach(i=>{i.cellRendered()})}}rerenderRowCells(e,t){this.reinitializeRow(e,t)}reinitializeColumnWidths(e){for(let t=this.leftCol;t<=this.rightCol;t++){let i=this.columns[t];i&&i.reinitializeWidth()}}deinitialize(){this.initialized=!1}clear(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0}dataChange(){var e=!1,t,i;if(this.isFitData){if(this.table.columnManager.columnsByIndex.forEach(n=>{!n.definition.width&&n.visible&&(e=!0)}),e&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,t=this.chain("rows-sample",[1],[],()=>this.table.rowManager.getDisplayRows())[0],t)){i=t.getElement(),t.generateCells(),this.tableElement.appendChild(i);for(let n=0;n<t.cells.length;n++){let r=t.cells[n];i.appendChild(r.getElement()),r.column.reinitializeWidth()}i.parentNode.removeChild(i),this.rerenderColumns(!1,!0)}}else this.options("layout")==="fitColumns"&&(this.layoutRefresh(),this.rerenderColumns(!1,!0))}reinitChanged(e){var t=!0;return e.cols.length!==this.columns.length||e.leftCol!==this.leftCol||e.rightCol!==this.rightCol?!0:(e.cols.forEach((i,n)=>{i!==this.columns[n]&&(t=!1)}),!t)}reinitializeRows(){var e=this.getVisibleRows(),t=this.table.rowManager.getRows().filter(i=>!e.includes(i));e.forEach(i=>{this.reinitializeRow(i,!0)}),t.forEach(i=>{i.deinitialize()})}getVisibleRows(){return this.visibleRows||(this.visibleRows=this.table.rowManager.getVisibleRows()),this.visibleRows}scroll(e){this.vDomScrollPosLeft+=e,this.vDomScrollPosRight+=e,Math.abs(e)>this.windowBuffer/2?this.rerenderColumns():e>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())}colPositionAdjust(e,t,i){for(let n=e;n<t;n++){let r=this.columns[n];r.modules.vdomHoz.leftPos+=i,r.modules.vdomHoz.rightPos+=i}}addColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol+1];i&&i.modules.vdomHoz.leftPos<=this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach(n=>{if(n.type!=="group"){var r=n.getCell(i);n.getElement().insertBefore(r.getElement(),n.getCell(this.columns[this.rightCol]).getElement().nextSibling),r.cellRendered()}}),this.fitDataColActualWidthCheck(i),this.rightCol++,this.getVisibleRows().forEach(n=>{n.type!=="group"&&(n.modules.vdomHoz.rightCol=this.rightCol)}),this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth()):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}addColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol-1];if(i)if(i.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){e=!0,this.getVisibleRows().forEach(r=>{if(r.type!=="group"){var a=r.getCell(i);r.getElement().insertBefore(a.getElement(),r.getCell(this.columns[this.leftCol]).getElement()),a.cellRendered()}}),this.leftCol--,this.getVisibleRows().forEach(r=>{r.type!=="group"&&(r.modules.vdomHoz.leftCol=this.leftCol)}),this.leftCol<=0?this.vDomPadLeft=0:this.vDomPadLeft-=i.getWidth();let n=this.fitDataColActualWidthCheck(i);n&&(this.scrollLeft=this.elementVertical.scrollLeft=this.elementVertical.scrollLeft+n,this.vDomPadRight-=n)}else t=!1;else t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}removeColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol];i&&i.modules.vdomHoz.leftPos>this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach(n=>{if(n.type!=="group"){var r=n.getCell(i);try{n.getElement().removeChild(r.getElement())}catch(a){console.warn("Could not removeColRight",a.message)}}}),this.vDomPadRight+=i.getWidth(),this.rightCol--,this.getVisibleRows().forEach(n=>{n.type!=="group"&&(n.modules.vdomHoz.rightCol=this.rightCol)})):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}removeColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol];i&&i.modules.vdomHoz.rightPos<this.vDomScrollPosLeft?(e=!0,this.getVisibleRows().forEach(n=>{if(n.type!=="group"){var r=n.getCell(i);try{n.getElement().removeChild(r.getElement())}catch(a){console.warn("Could not removeColLeft",a.message)}}}),this.vDomPadLeft+=i.getWidth(),this.leftCol++,this.getVisibleRows().forEach(n=>{n.type!=="group"&&(n.modules.vdomHoz.leftCol=this.leftCol)})):t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}fitDataColActualWidthCheck(e){var t,i;return e.modules.vdomHoz.fitDataCheck&&(e.reinitializeWidth(),t=e.getWidth(),i=t-e.modules.vdomHoz.width,i&&(e.modules.vdomHoz.rightPos+=i,e.modules.vdomHoz.width=t,this.colPositionAdjust(this.columns.indexOf(e)+1,this.columns.length,i)),e.modules.vdomHoz.fitDataCheck=!1),i}initializeRow(e){if(e.type!=="group"){e.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol},this.table.modules.frozenColumns&&this.table.modules.frozenColumns.leftColumns.forEach(t=>{this.appendCell(e,t)});for(let t=this.leftCol;t<=this.rightCol;t++)this.appendCell(e,this.columns[t]);this.table.modules.frozenColumns&&this.table.modules.frozenColumns.rightColumns.forEach(t=>{this.appendCell(e,t)})}}appendCell(e,t){if(t&&t.visible){let i=e.getCell(t);e.getElement().appendChild(i.getElement()),i.cellRendered()}}reinitializeRow(e,t){if(e.type!=="group"&&(t||!e.modules.vdomHoz||e.modules.vdomHoz.leftCol!==this.leftCol||e.modules.vdomHoz.rightCol!==this.rightCol)){for(var i=e.getElement();i.firstChild;)i.removeChild(i.firstChild);this.initializeRow(e)}}}class Zp extends Je{constructor(e){super(e),this.blockHozScrollEvent=!1,this.headersElement=null,this.contentsElement=null,this.rowHeader=null,this.element=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.optionsList=new ca(this.table,"column definition",la),this.redrawBlock=!1,this.redrawBlockUpdate=null,this.renderer=null}initialize(){this.initializeRenderer(),this.headersElement=this.createHeadersElement(),this.contentsElement=this.createHeaderContentsElement(),this.element=this.createHeaderElement(),this.contentsElement.insertBefore(this.headersElement,this.contentsElement.firstChild),this.element.insertBefore(this.contentsElement,this.element.firstChild),this.initializeScrollWheelWatcher(),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("scrollbar-vertical",this.padVerticalScrollbar.bind(this))}padVerticalScrollbar(e){this.table.rtl?this.headersElement.style.marginLeft=e+"px":this.headersElement.style.marginRight=e+"px"}initializeRenderer(){var e,t={virtual:Xp,basic:Jp};typeof this.table.options.renderHorizontal=="string"?e=t[this.table.options.renderHorizontal]:e=this.table.options.renderHorizontal,e?(this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize()):console.error("Unable to find matching renderer:",this.table.options.renderHorizontal)}createHeadersElement(){var e=document.createElement("div");return e.classList.add("tabulator-headers"),e.setAttribute("role","row"),e}createHeaderContentsElement(){var e=document.createElement("div");return e.classList.add("tabulator-header-contents"),e.setAttribute("role","rowgroup"),e}createHeaderElement(){var e=document.createElement("div");return e.classList.add("tabulator-header"),e.setAttribute("role","rowgroup"),this.table.options.headerVisible||e.classList.add("tabulator-header-hidden"),e}getElement(){return this.element}getContentsElement(){return this.contentsElement}getHeadersElement(){return this.headersElement}scrollHorizontal(e){this.contentsElement.scrollLeft=e,this.scrollLeft=e,this.renderer.scrollColumns(e)}initializeScrollWheelWatcher(){this.contentsElement.addEventListener("wheel",e=>{var t;e.deltaX&&(t=this.contentsElement.scrollLeft+e.deltaX,this.table.rowManager.scrollHorizontal(t),this.table.columnManager.scrollHorizontal(t))})}generateColumnsFromRowData(e){var t=[],i={},n=this.table.options.autoColumns==="full"?e:[e[0]],r=this.table.options.autoColumnsDefinitions;if(e&&e.length){if(n.forEach(a=>{Object.keys(a).forEach((o,l)=>{let u=a[o],h;i[o]?i[o]!==!0&&typeof u<"u"&&(i[o].sorter=this.calculateSorterFromValue(u),i[o]=!0):(h={field:o,title:o,sorter:this.calculateSorterFromValue(u)},t.splice(l,0,h),i[o]=typeof u>"u"?h:!0)})}),r)switch(typeof r){case"function":this.table.options.columns=r.call(this.table,t);break;case"object":Array.isArray(r)?t.forEach(a=>{var o=r.find(l=>l.field===a.field);o&&Object.assign(a,o)}):t.forEach(a=>{r[a.field]&&Object.assign(a,r[a.field])}),this.table.options.columns=t;break}else this.table.options.columns=t;this.setColumns(this.table.options.columns)}}calculateSorterFromValue(e){var t;switch(typeof e){case"undefined":t="string";break;case"boolean":t="boolean";break;case"number":t="number";break;case"object":Array.isArray(e)?t="array":t="string";break;default:!isNaN(e)&&e!==""?t="number":e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?t="alphanum":t="string";break}return t}setColumns(e,t){for(;this.headersElement.firstChild;)this.headersElement.removeChild(this.headersElement.firstChild);this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.dispatch("columns-loading"),this.dispatchExternal("columnsLoading"),this.table.options.rowHeader&&(this.rowHeader=new _t(this.table.options.rowHeader===!0?{}:this.table.options.rowHeader,this,!0),this.columns.push(this.rowHeader),this.headersElement.appendChild(this.rowHeader.getElement()),this.rowHeader.columnRendered()),e.forEach((i,n)=>{this._addColumn(i)}),this._reIndexColumns(),this.dispatch("columns-loaded"),this.subscribedExternal("columnsLoaded")&&this.dispatchExternal("columnsLoaded",this.getComponents()),this.rerenderColumns(!1,!0),this.redraw(!0)}_addColumn(e,t,i){var n=new _t(e,this),r=n.getElement(),a=i&&this.findColumnIndex(i);if(t&&this.rowHeader&&(!i||i===this.rowHeader)&&(t=!1,i=this.rowHeader,a=0),i&&a>-1){var o=i.getTopColumn(),l=this.columns.indexOf(o),u=o.getElement();t?(this.columns.splice(l,0,n),u.parentNode.insertBefore(r,u)):(this.columns.splice(l+1,0,n),u.parentNode.insertBefore(r,u.nextSibling))}else t?(this.columns.unshift(n),this.headersElement.insertBefore(n.getElement(),this.headersElement.firstChild)):(this.columns.push(n),this.headersElement.appendChild(n.getElement()));return n.columnRendered(),n}registerColumnField(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)}registerColumnPosition(e){this.columnsByIndex.push(e)}_reIndexColumns(){this.columnsByIndex=[],this.columns.forEach(function(e){e.reRegisterPosition()})}verticalAlignHeaders(){var e=0;this.redrawBlock||(this.headersElement.style.height="",this.columns.forEach(t=>{t.clearVerticalAlign()}),this.columns.forEach(t=>{var i=t.getHeight();i>e&&(e=i)}),this.headersElement.style.height=e+"px",this.columns.forEach(t=>{t.verticalAlign(this.table.options.columnHeaderVertAlign,e)}),this.table.rowManager.adjustTableSize())}findColumn(e){var t;if(typeof e=="object"){if(e instanceof _t)return e;if(e instanceof oa)return e._getSelf()||!1;if(typeof HTMLElement<"u"&&e instanceof HTMLElement)return t=[],this.columns.forEach(n=>{t.push(n),t=t.concat(n.getColumns(!0))}),t.find(n=>n.element===e)||!1}else return this.columnsByField[e]||!1;return!1}getColumnByField(e){return this.columnsByField[e]}getColumnsByFieldRoot(e){var t=[];return Object.keys(this.columnsByField).forEach(i=>{var n=this.table.options.nestedFieldSeparator?i.split(this.table.options.nestedFieldSeparator)[0]:i;n===e&&t.push(this.columnsByField[i])}),t}getColumnByIndex(e){return this.columnsByIndex[e]}getFirstVisibleColumn(){var e=this.columnsByIndex.findIndex(t=>t.visible);return e>-1?this.columnsByIndex[e]:!1}getVisibleColumnsByIndex(){return this.columnsByIndex.filter(e=>e.visible)}getColumns(){return this.columns}findColumnIndex(e){return this.columnsByIndex.findIndex(t=>e===t)}getRealColumns(){return this.columnsByIndex}traverse(e){this.columnsByIndex.forEach((t,i)=>{e(t,i)})}getDefinitions(e){var t=[];return this.columnsByIndex.forEach(i=>{(!e||e&&i.visible)&&t.push(i.getDefinition())}),t}getDefinitionTree(){var e=[];return this.columns.forEach(t=>{e.push(t.getDefinition(!0))}),e}getComponents(e){var t=[],i=e?this.columns:this.columnsByIndex;return i.forEach(n=>{t.push(n.getComponent())}),t}getWidth(){var e=0;return this.columnsByIndex.forEach(t=>{t.visible&&(e+=t.getWidth())}),e}moveColumn(e,t,i){t.element.parentNode.insertBefore(e.element,t.element),i&&t.element.parentNode.insertBefore(t.element,e.element),this.moveColumnActual(e,t,i),this.verticalAlignHeaders(),this.table.rowManager.reinitialize()}moveColumnActual(e,t,i){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,i):this._moveColumnInArray(this.columns,e,t,i),this._moveColumnInArray(this.columnsByIndex,e,t,i,!0),this.rerenderColumns(!0),this.dispatch("column-moved",e,t,i),this.subscribedExternal("columnMoved")&&this.dispatchExternal("columnMoved",e.getComponent(),this.table.columnManager.getComponents())}_moveColumnInArray(e,t,i,n,r){var a=e.indexOf(t),o,l=[];a>-1&&(e.splice(a,1),o=e.indexOf(i),o>-1?n&&(o=o+1):o=a,e.splice(o,0,t),r&&(l=this.chain("column-moving-rows",[t,i,n],null,[])||[],l=l.concat(this.table.rowManager.rows),l.forEach(function(u){if(u.cells.length){var h=u.cells.splice(a,1)[0];u.cells.splice(o,0,h)}})))}scrollToColumn(e,t,i){var n=0,r=e.getLeftOffset(),a=0,o=e.getElement();return new Promise((l,u)=>{if(typeof t>"u"&&(t=this.table.options.scrollToColumnPosition),typeof i>"u"&&(i=this.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":a=-this.element.clientWidth/2;break;case"right":a=o.clientWidth-this.headersElement.clientWidth;break}if(!i&&r>0&&r+o.offsetWidth<this.element.clientWidth)return!1;n=r+a,n=Math.max(Math.min(n,this.table.rowManager.element.scrollWidth-this.table.rowManager.element.clientWidth),0),this.table.rowManager.scrollHorizontal(n),this.scrollHorizontal(n),l()}else console.warn("Scroll Error - Column not visible"),u("Scroll Error - Column not visible")})}generateCells(e){var t=[];return this.columnsByIndex.forEach(i=>{t.push(i.generateCell(e))}),t}getFlexBaseWidth(){var e=this.table.element.clientWidth,t=0;return this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(e-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,r,a;i.visible&&(n=i.definition.width||0,r=parseInt(i.minWidth),typeof n=="string"?n.indexOf("%")>-1?a=e/100*parseInt(n):a=parseInt(n):a=n,t+=a>r?a:r)}),t}addColumn(e,t,i){return new Promise((n,r)=>{var a=this._addColumn(e,t,i);this._reIndexColumns(),this.dispatch("column-add",e,t,i),this.layoutMode()!="fitColumns"&&a.reinitializeWidth(),this.redraw(!0),this.table.rowManager.reinitialize(),this.rerenderColumns(),n(a)})}deregisterColumn(e){var t=e.getField(),i;t&&delete this.columnsByField[t],i=this.columnsByIndex.indexOf(e),i>-1&&this.columnsByIndex.splice(i,1),i=this.columns.indexOf(e),i>-1&&this.columns.splice(i,1),this.verticalAlignHeaders(),this.redraw()}rerenderColumns(e,t){this.redrawBlock?(e===!1||e===!0&&this.redrawBlockUpdate===null)&&(this.redrawBlockUpdate=e):this.renderer.rerenderColumns(e,t)}blockRedraw(){this.redrawBlock=!0,this.redrawBlockUpdate=null}restoreRedraw(){this.redrawBlock=!1,this.verticalAlignHeaders(),this.renderer.rerenderColumns(this.redrawBlockUpdate)}redraw(e){He.elVisible(this.element)&&this.verticalAlignHeaders(),e&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",e)||this.layoutRefresh(e),this.dispatch("table-redraw",e),this.table.footerManager.redraw()}}class Qp extends Bs{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.scrollTop=0,e.scrollLeft=0,e.style.minWidth="",e.style.minHeight="",e.style.display="",e.style.visibility=""}renderRows(){var e=this.tableElement,t=!0,i=document.createDocumentFragment(),n=this.rows();n.forEach((r,a)=>{this.styleRow(r,a),r.initialize(!1,!0),r.type!=="group"&&(t=!1),i.appendChild(r.getElement())}),e.appendChild(i),n.forEach(r=>{r.rendered(),r.heightInitialized||r.calcHeight(!0)}),n.forEach(r=>{r.heightInitialized||r.setCellHeight()}),t?e.style.minWidth=this.table.columnManager.getWidth()+"px":e.style.minWidth=""}rerenderRows(e){this.clearRows(),e&&e(),this.renderRows(),this.rows().length||this.table.rowManager.tableEmpty()}scrollToRowNearestTop(e){var t=He.elOffset(e.getElement()).top;return!(Math.abs(this.elementVertical.scrollTop-t)>Math.abs(this.elementVertical.scrollTop+this.elementVertical.clientHeight-t))}scrollToRow(e){var t=e.getElement();this.elementVertical.scrollTop=He.elOffset(t).top-He.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(e){return this.rows()}}class em extends Bs{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[]}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.style.paddingTop="",e.style.paddingBottom="",e.style.minHeight="",e.style.display="",e.style.visibility="",this.elementVertical.scrollTop=0,this.elementVertical.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0}renderRows(){this._virtualRenderFill()}rerenderRows(e){for(var t=this.elementVertical.scrollTop,i=!1,n=!1,r=this.table.rowManager.scrollLeft,a=this.rows(),o=this.vDomTop;o<=this.vDomBottom;o++)if(a[o]){var l=t-a[o].getElement().offsetTop;if(n===!1||Math.abs(l)<n)n=l,i=o;else break}a.forEach(u=>{u.deinitializeHeight()}),e&&e(),this.rows().length?this._virtualRenderFill(i===!1?this.rows.length-1:i,!0,n||0):(this.clear(),this.table.rowManager.tableEmpty()),this.scrollColumns(r)}scrollColumns(e){this.table.rowManager.scrollHorizontal(e)}scrollRows(e,t){var i=e-this.vDomScrollPosTop,n=e-this.vDomScrollPosBottom,r=this.vDomWindowBuffer*2,a=this.rows();if(this.scrollTop=e,-i>r||n>r){var o=this.table.rowManager.scrollLeft;this._virtualRenderFill(Math.floor(this.elementVertical.scrollTop/this.elementVertical.scrollHeight*a.length)),this.scrollColumns(o)}else t?(i<0&&this._addTopRow(a,-i),n<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(a,-n):this.vDomScrollPosBottom=this.scrollTop)):(n>=0&&this._addBottomRow(a,n),i>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(a,i):this.vDomScrollPosTop=this.scrollTop))}resize(){this.vDomWindowBuffer=this.table.options.renderVerticalBuffer||this.elementVertical.clientHeight}scrollToRowNearestTop(e){var t=this.rows().indexOf(e);return!(Math.abs(this.vDomTop-t)>Math.abs(this.vDomBottom-t))}scrollToRow(e){var t=this.rows().indexOf(e);t>-1&&this._virtualRenderFill(t,!0)}visibleRows(e){var t=this.elementVertical.scrollTop,i=this.elementVertical.clientHeight+t,n=!1,r=0,a=0,o=this.rows();if(e)r=this.vDomTop,a=this.vDomBottom;else for(var l=this.vDomTop;l<=this.vDomBottom;l++)if(o[l])if(n)if(i-o[l].getElement().offsetTop>=0)a=l;else break;else if(t-o[l].getElement().offsetTop>=0)r=l;else if(n=!0,i-o[l].getElement().offsetTop>=0)a=l;else break;return o.slice(r,a+1)}_virtualRenderFill(e,t,i){var n=this.tableElement,r=this.elementVertical,a=0,o=0,l=0,u=0,h=0,m=0,v=this.rows(),C=v.length,F=0,x,R,M=[],k=0,_=0,p=this.table.rowManager.fixedHeight,w=this.elementVertical.clientHeight,c=this.table.options.rowHeight,y=!0;if(e=e||0,i=i||0,!e)this.clear();else{for(;n.firstChild;)n.removeChild(n.firstChild);u=(C-e+1)*this.vDomRowHeight,u<w&&(e-=Math.ceil((w-u)/this.vDomRowHeight),e<0&&(e=0)),a=Math.min(Math.max(Math.floor(this.vDomWindowBuffer/this.vDomRowHeight),this.vDomWindowMinMarginRows),e),e-=a}if(C&&He.elVisible(this.elementVertical)){for(this.vDomTop=e,this.vDomBottom=e-1,p||this.table.options.maxHeight?(c&&(_=w/c+this.vDomWindowBuffer/c),_=Math.max(this.vDomWindowMinTotalRows,Math.ceil(_))):_=C;(_==C||o<=w+this.vDomWindowBuffer||k<this.vDomWindowMinTotalRows)&&this.vDomBottom<C-1;){for(M=[],R=document.createDocumentFragment(),m=0;m<_&&this.vDomBottom<C-1;)F=this.vDomBottom+1,x=v[F],this.styleRow(x,F),x.initialize(!1,!0),!x.heightInitialized&&!this.table.options.rowHeight&&x.clearCellHeight(),R.appendChild(x.getElement()),M.push(x),this.vDomBottom++,m++;if(!M.length)break;n.appendChild(R),M.forEach(g=>{g.rendered(),g.heightInitialized||g.calcHeight(!0)}),M.forEach(g=>{g.heightInitialized||g.setCellHeight()}),M.forEach(g=>{l=g.getHeight(),k<a?h+=l:o+=l,l>this.vDomWindowBuffer&&(this.vDomWindowBuffer=l*2),k++}),y=this.table.rowManager.adjustTableSize(),w=this.elementVertical.clientHeight,y&&(p||this.table.options.maxHeight)&&(c=o/k,_=Math.max(this.vDomWindowMinTotalRows,Math.ceil(w/c+this.vDomWindowBuffer/c)))}e?(this.vDomTopPad=t?this.vDomRowHeight*this.vDomTop+i:this.scrollTop-h,this.vDomBottomPad=this.vDomBottom==C-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-o-h,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((o+h)/k),this.vDomBottomPad=this.vDomRowHeight*(C-this.vDomBottom-1),this.vDomScrollHeight=h+o+this.vDomBottomPad-w),n.style.paddingTop=this.vDomTopPad+"px",n.style.paddingBottom=this.vDomBottomPad+"px",t&&(this.scrollTop=this.vDomTopPad+h+i-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-w:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-w),this.elementVertical.scrollWidth>this.elementVertical.clientWidth&&t&&(this.scrollTop+=this.elementVertical.offsetHeight-w),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,r.scrollTop=this.scrollTop,this.dispatch("render-virtual-fill")}}_addTopRow(e,t){for(var i=this.tableElement,n=[],r=0,a=this.vDomTop-1,o=0,l=!0;l;)if(this.vDomTop){let u=e[a],h,m;u&&o<this.vDomMaxRenderChain?(h=u.getHeight()||this.vDomRowHeight,m=u.initialized,t>=h?(this.styleRow(u,a),i.insertBefore(u.getElement(),i.firstChild),(!u.initialized||!u.heightInitialized)&&n.push(u),u.initialize(),m||(h=u.getElement().offsetHeight,h>this.vDomWindowBuffer&&(this.vDomWindowBuffer=h*2)),t-=h,r+=h,this.vDomTop--,a--,o++):l=!1):l=!1}else l=!1;for(let u of n)u.clearCellHeight();this._quickNormalizeRowHeight(n),r&&(this.vDomTopPad-=r,this.vDomTopPad<0&&(this.vDomTopPad=a*this.vDomRowHeight),a<1&&(this.vDomTopPad=0),i.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=r)}_removeTopRow(e,t){for(var i=[],n=0,r=0,a=!0;a;){let o=e[this.vDomTop],l;o&&r<this.vDomMaxRenderChain?(l=o.getHeight()||this.vDomRowHeight,t>=l?(this.vDomTop++,t-=l,n+=l,i.push(o),r++):a=!1):a=!1}for(let o of i){let l=o.getElement();l.parentNode&&l.parentNode.removeChild(l)}n&&(this.vDomTopPad+=n,this.tableElement.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?n:n+this.vDomWindowBuffer)}_addBottomRow(e,t){for(var i=this.tableElement,n=[],r=0,a=this.vDomBottom+1,o=0,l=!0;l;){let u=e[a],h,m;u&&o<this.vDomMaxRenderChain?(h=u.getHeight()||this.vDomRowHeight,m=u.initialized,t>=h?(this.styleRow(u,a),i.appendChild(u.getElement()),(!u.initialized||!u.heightInitialized)&&n.push(u),u.initialize(),m||(h=u.getElement().offsetHeight,h>this.vDomWindowBuffer&&(this.vDomWindowBuffer=h*2)),t-=h,r+=h,this.vDomBottom++,a++,o++):l=!1):l=!1}for(let u of n)u.clearCellHeight();this._quickNormalizeRowHeight(n),r&&(this.vDomBottomPad-=r,(this.vDomBottomPad<0||a==e.length-1)&&(this.vDomBottomPad=0),i.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=r)}_removeBottomRow(e,t){for(var i=[],n=0,r=0,a=!0;a;){let o=e[this.vDomBottom],l;o&&r<this.vDomMaxRenderChain?(l=o.getHeight()||this.vDomRowHeight,t>=l?(this.vDomBottom--,t-=l,n+=l,i.push(o),r++):a=!1):a=!1}for(let o of i){let l=o.getElement();l.parentNode&&l.parentNode.removeChild(l)}n&&(this.vDomBottomPad+=n,this.vDomBottomPad<0&&(this.vDomBottomPad=0),this.tableElement.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=n)}_quickNormalizeRowHeight(e){for(let t of e)t.calcHeight();for(let t of e)t.setCellHeight()}}class tm extends Je{constructor(e){super(e),this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.placeholder=null,this.placeholderContents=null,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRowsPipeline=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRenderInPosition=!1,this.dataPipeline=[],this.displayPipeline=[],this.scrollbarWidth=0,this.renderer=null}createHolderElement(){var e=document.createElement("div");return e.classList.add("tabulator-tableholder"),e.setAttribute("tabindex",0),e}createTableElement(){var e=document.createElement("div");return e.classList.add("tabulator-table"),e.setAttribute("role","rowgroup"),e}initializePlaceholder(){var e=this.table.options.placeholder;if(typeof e=="function"&&(e=e.call(this.table)),e=this.chain("placeholder",[e],e,e)||e,e){let t=document.createElement("div");if(t.classList.add("tabulator-placeholder"),typeof e=="string"){let i=document.createElement("div");i.classList.add("tabulator-placeholder-contents"),i.innerHTML=e,t.appendChild(i),this.placeholderContents=i}else typeof HTMLElement<"u"&&e instanceof HTMLElement?(t.appendChild(e),this.placeholderContents=e):(console.warn("Invalid placeholder provided, must be string or HTML Element",e),this.el=null);this.placeholder=t}}getElement(){return this.element}getTableElement(){return this.tableElement}initialize(){this.initializePlaceholder(),this.initializeRenderer(),this.element.appendChild(this.tableElement),this.firstRender=!0,this.element.addEventListener("scroll",()=>{var e=this.element.scrollLeft,t=this.scrollLeft>e,i=this.element.scrollTop,n=this.scrollTop>i;this.scrollLeft!=e&&(this.scrollLeft=e,this.dispatch("scroll-horizontal",e,t),this.dispatchExternal("scrollHorizontal",e,t),this._positionPlaceholder()),this.scrollTop!=i&&(this.scrollTop=i,this.renderer.scrollRows(i,n),this.dispatch("scroll-vertical",i,n),this.dispatchExternal("scrollVertical",i,n))})}findRow(e){if(typeof e=="object"){if(e instanceof Qe)return e;if(e instanceof Ls)return e._getSelf()||!1;if(typeof HTMLElement<"u"&&e instanceof HTMLElement)return this.rows.find(i=>i.getElement()===e)||!1;if(e===null)return!1}else return typeof e>"u"?!1:this.rows.find(i=>i.data[this.table.options.index]==e)||!1;return!1}getRowFromDataObject(e){var t=this.rows.find(i=>i.data===e);return t||!1}getRowFromPosition(e){return this.getDisplayRows().find(t=>t.type==="row"&&t.getPosition()===e&&t.isDisplayed())}scrollToRow(e,t,i){return this.renderer.scrollToRowPosition(e,t,i)}setData(e,t,i){return new Promise((n,r)=>{t&&this.getDisplayRows().length?this.table.options.pagination?this._setDataActual(e,!0):this.reRenderInPosition(()=>{this._setDataActual(e)}):(this.table.options.autoColumns&&i&&this.table.initialized&&this.table.columnManager.generateColumnsFromRowData(e),this.resetScroll(),this._setDataActual(e)),n()})}_setDataActual(e,t){this.dispatchExternal("dataProcessing",e),this._wipeElements(),Array.isArray(e)?(this.dispatch("data-processing",e),e.forEach((i,n)=>{if(i&&typeof i=="object"){var r=new Qe(i,this);this.rows.push(r)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",i)}),this.refreshActiveData(!1,!1,t),this.dispatch("data-processed",e),this.dispatchExternal("dataProcessed",e)):console.error(`Data Loading Error - Unable to process data due to invalid data type
46
+ Expecting: array
47
+ Received: `,typeof e,`
48
+ Data: `,e)}_wipeElements(){this.dispatch("rows-wipe"),this.destroy(),this.adjustTableSize(),this.dispatch("rows-wiped")}destroy(){this.rows.forEach(e=>{e.wipe()}),this.rows=[],this.activeRows=[],this.activeRowsPipeline=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0}deleteRow(e,t){var i=this.rows.indexOf(e),n=this.activeRows.indexOf(e);n>-1&&this.activeRows.splice(n,1),i>-1&&this.rows.splice(i,1),this.setActiveRows(this.activeRows),this.displayRowIterator(r=>{var a=r.indexOf(e);a>-1&&r.splice(a,1)}),t||this.reRenderInPosition(),this.regenerateRowPositions(),this.dispatchExternal("rowDeleted",e.getComponent()),this.displayRowsCount||this.tableEmpty(),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.getData())}addRow(e,t,i,n){var r=this.addRowActual(e,t,i,n);return r}addRows(e,t,i,n){var r=[];return new Promise((a,o)=>{t=this.findAddRowPos(t),Array.isArray(e)||(e=[e]),(typeof i>"u"&&t||typeof i<"u"&&!t)&&e.reverse(),e.forEach((l,u)=>{var h=this.addRow(l,t,i,!0);r.push(h),this.dispatch("row-added",h,l,t,i)}),this.refreshActiveData(n?"displayPipeline":!1,!1,!0),this.regenerateRowPositions(),this.displayRowsCount&&this._clearPlaceholder(),a(r)})}findAddRowPos(e){return typeof e>"u"&&(e=this.table.options.addRowPos),e==="pos"&&(e=!0),e==="bottom"&&(e=!1),e}addRowActual(e,t,i,n){var r=e instanceof Qe?e:new Qe(e||{},this),a=this.findAddRowPos(t),o=-1,l,u;return i||(u=this.chain("row-adding-position",[r,a],null,{index:i,top:a}),i=u.index,a=u.top),typeof i<"u"&&(i=this.findRow(i)),i=this.chain("row-adding-index",[r,i,a],null,i),i&&(o=this.rows.indexOf(i)),i&&o>-1?(l=this.activeRows.indexOf(i),this.displayRowIterator(function(h){var m=h.indexOf(i);m>-1&&h.splice(a?m:m+1,0,r)}),l>-1&&this.activeRows.splice(a?l:l+1,0,r),this.rows.splice(a?o:o+1,0,r)):a?(this.displayRowIterator(function(h){h.unshift(r)}),this.activeRows.unshift(r),this.rows.unshift(r)):(this.displayRowIterator(function(h){h.push(r)}),this.activeRows.push(r),this.rows.push(r)),this.setActiveRows(this.activeRows),this.dispatchExternal("rowAdded",r.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),n||this.reRenderInPosition(),r}moveRow(e,t,i){this.dispatch("row-move",e,t,i),this.moveRowActual(e,t,i),this.regenerateRowPositions(),this.dispatch("row-moved",e,t,i),this.dispatchExternal("rowMoved",e.getComponent())}moveRowActual(e,t,i){this.moveRowInArray(this.rows,e,t,i),this.moveRowInArray(this.activeRows,e,t,i),this.displayRowIterator(n=>{this.moveRowInArray(n,e,t,i)}),this.dispatch("row-moving",e,t,i)}moveRowInArray(e,t,i,n){var r,a,o,l;if(t!==i&&(r=e.indexOf(t),r>-1&&(e.splice(r,1),a=e.indexOf(i),a>-1?n?e.splice(a+1,0,t):e.splice(a,0,t):e.splice(r,0,t)),e===this.getDisplayRows())){o=r<a?r:a,l=a>r?a:r+1;for(let u=o;u<=l;u++)e[u]&&this.styleRow(e[u],u)}}clearData(){this.setData([])}getRowIndex(e){return this.findRowIndex(e,this.rows)}getDisplayRowIndex(e){var t=this.getDisplayRows().indexOf(e);return t>-1?t:!1}nextDisplayRow(e,t){var i=this.getDisplayRowIndex(e),n=!1;return i!==!1&&i<this.displayRowsCount-1&&(n=this.getDisplayRows()[i+1]),n&&(!(n instanceof Qe)||n.type!="row")?this.nextDisplayRow(n,t):n}prevDisplayRow(e,t){var i=this.getDisplayRowIndex(e),n=!1;return i&&(n=this.getDisplayRows()[i-1]),t&&n&&(!(n instanceof Qe)||n.type!="row")?this.prevDisplayRow(n,t):n}findRowIndex(e,t){var i;return e=this.findRow(e),e&&(i=t.indexOf(e),i>-1)?i:!1}getData(e,t){var i=[],n=this.getRows(e);return n.forEach(function(r){r.type=="row"&&i.push(r.getData(t||"data"))}),i}getComponents(e){var t=[],i=this.getRows(e);return i.forEach(function(n){t.push(n.getComponent())}),t}getDataCount(e){var t=this.getRows(e);return t.length}scrollHorizontal(e){this.scrollLeft=e,this.element.scrollLeft=e,this.dispatch("scroll-horizontal",e)}registerDataPipelineHandler(e,t){typeof t<"u"?(this.dataPipeline.push({handler:e,priority:t}),this.dataPipeline.sort((i,n)=>i.priority-n.priority)):console.error("Data pipeline handlers must have a priority in order to be registered")}registerDisplayPipelineHandler(e,t){typeof t<"u"?(this.displayPipeline.push({handler:e,priority:t}),this.displayPipeline.sort((i,n)=>i.priority-n.priority)):console.error("Display pipeline handlers must have a priority in order to be registered")}refreshActiveData(e,t,i){var n=this.table,r="",a=0,o=["all","dataPipeline","display","displayPipeline","end"];if(!this.table.destroyed){if(typeof e=="function")if(a=this.dataPipeline.findIndex(l=>l.handler===e),a>-1)r="dataPipeline",t&&(a==this.dataPipeline.length-1?r="display":a++);else if(a=this.displayPipeline.findIndex(l=>l.handler===e),a>-1)r="displayPipeline",t&&(a==this.displayPipeline.length-1?r="end":a++);else{console.error("Unable to refresh data, invalid handler provided",e);return}else r=e||"all",a=0;if(this.redrawBlock){(!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===r&&a<this.redrawBlockRestoreConfig.index||o.indexOf(r)<o.indexOf(this.redrawBlockRestoreConfig.stage)))&&(this.redrawBlockRestoreConfig={handler:e,skipStage:t,renderInPosition:i,stage:r,index:a});return}else He.elVisible(this.element)?i?this.reRenderInPosition(this.refreshPipelines.bind(this,e,r,a,i)):(this.refreshPipelines(e,r,a,i),e||this.table.columnManager.renderer.renderColumns(),this.renderTable(),n.options.layoutColumnsOnNewData&&this.table.columnManager.redraw(!0)):this.refreshPipelines(e,r,a,i),this.dispatch("data-refreshed")}}refreshPipelines(e,t,i,n){switch(this.dispatch("data-refreshing"),(!e||!this.activeRowsPipeline[0])&&(this.activeRowsPipeline[0]=this.rows.slice(0)),t){case"all":case"dataPipeline":for(let r=i;r<this.dataPipeline.length;r++){let a=this.dataPipeline[r].handler(this.activeRowsPipeline[r].slice(0));this.activeRowsPipeline[r+1]=a||this.activeRowsPipeline[r].slice(0)}this.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);case"display":i=0,this.resetDisplayRows();case"displayPipeline":for(let r=i;r<this.displayPipeline.length;r++){let a=this.displayPipeline[r].handler((r?this.getDisplayRows(r-1):this.activeRows).slice(0),n);this.setDisplayRows(a||this.getDisplayRows(r-1).slice(0),r)}case"end":this.regenerateRowPositions()}this.getDisplayRows().length&&this._clearPlaceholder()}regenerateRowPositions(){var e=this.getDisplayRows(),t=1;e.forEach(i=>{i.type==="row"&&(i.setPosition(t),t++)})}setActiveRows(e){this.activeRows=this.activeRows=Object.assign([],e),this.activeRowsCount=this.activeRows.length}resetDisplayRows(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length}setDisplayRows(e,t){this.displayRows[t]=e,t==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length)}getDisplayRows(e){return typeof e>"u"?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[e]||[]}getVisibleRows(e,t){var i=Object.assign([],this.renderer.visibleRows(!t));return e&&(i=this.chain("rows-visible",[t],i,i)),i}displayRowIterator(e){this.activeRowsPipeline.forEach(e),this.displayRows.forEach(e),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length}getRows(e){var t=[];switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!1,!0);break;default:t=this.chain("rows-retrieve",e,null,this.rows)||this.rows}return t}reRenderInPosition(e){this.redrawBlock?e?e():this.redrawBlockRenderInPosition=!0:(this.dispatchExternal("renderStarted"),this.renderer.rerenderRows(e),this.fixedHeight||this.adjustTableSize(),this.scrollBarCheck(),this.dispatchExternal("renderComplete"))}scrollBarCheck(){var e=0;this.element.scrollHeight>this.element.clientHeight&&(e=this.element.offsetWidth-this.element.clientWidth),e!==this.scrollbarWidth&&(this.scrollbarWidth=e,this.dispatch("scrollbar-vertical",e))}initializeRenderer(){var e,t={virtual:em,basic:Qp};typeof this.table.options.renderVertical=="string"?e=t[this.table.options.renderVertical]:e=this.table.options.renderVertical,e?(this.renderMode=this.table.options.renderVertical,this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize(),(this.table.element.clientHeight||this.table.options.height)&&!(this.table.options.minHeight&&this.table.options.maxHeight)?this.fixedHeight=!0:this.fixedHeight=!1):console.error("Unable to find matching renderer:",this.table.options.renderVertical)}getRenderMode(){return this.renderMode}renderTable(){this.dispatchExternal("renderStarted"),this.element.scrollTop=0,this._clearTable(),this.displayRowsCount?(this.renderer.renderRows(),this.firstRender&&(this.firstRender=!1,this.fixedHeight||this.adjustTableSize(),this.layoutRefresh(!0))):this.renderEmptyScroll(),this.fixedHeight||this.adjustTableSize(),this.dispatch("table-layout"),this.displayRowsCount||this._showPlaceholder(),this.scrollBarCheck(),this.dispatchExternal("renderComplete")}renderEmptyScroll(){this.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}_clearTable(){this._clearPlaceholder(),this.scrollTop=0,this.scrollLeft=0,this.renderer.clearRows()}tableEmpty(){this.renderEmptyScroll(),this._showPlaceholder()}checkPlaceholder(){this.displayRowsCount?this._clearPlaceholder():this.tableEmpty()}_showPlaceholder(){this.placeholder&&(this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.initializePlaceholder(),this.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.placeholder),this._positionPlaceholder(),this.adjustTableSize())}_clearPlaceholder(){this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.tableElement.style.minWidth="",this.tableElement.style.display=""}_positionPlaceholder(){this.placeholder&&this.placeholder.parentNode&&(this.placeholder.style.width=this.table.columnManager.getWidth()+"px",this.placeholderContents.style.width=this.table.rowManager.element.clientWidth+"px",this.placeholderContents.style.marginLeft=this.scrollLeft+"px")}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}normalizeHeight(e){this.activeRows.forEach(function(t){t.normalizeHeight(e)})}adjustTableSize(){let e=this.element.clientHeight,t,i=!1;if(this.renderer.verticalFillMode==="fill"){let n=Math.floor(this.table.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&this.table.footerManager.active&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));if(this.fixedHeight){t=isNaN(this.table.options.minHeight)?this.table.options.minHeight:this.table.options.minHeight+"px";const r="calc(100% - "+n+"px)";this.element.style.minHeight=t||"calc(100% - "+n+"px)",this.element.style.height=r,this.element.style.maxHeight=r}else this.element.style.height="",this.element.style.height=this.table.element.clientHeight-n+"px",this.element.scrollTop=this.scrollTop;this.renderer.resize(),!this.fixedHeight&&e!=this.element.clientHeight&&(i=!0,this.subscribed("table-resize")?this.dispatch("table-resize"):this.redraw()),this.scrollBarCheck()}return this._positionPlaceholder(),i}reinitialize(){this.rows.forEach(function(e){e.reinitialize(!0)})}blockRedraw(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1}restoreRedraw(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.handler,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRenderInPosition&&this.reRenderInPosition(),this.redrawBlockRenderInPosition=!1}redraw(e){this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,e?this.renderTable():(this.reRenderInPosition(),this.scrollHorizontal(this.scrollLeft))}resetScroll(){if(this.element.scrollLeft=0,this.element.scrollTop=0,this.table.browser==="ie"){var e=document.createEvent("Event");e.initEvent("scroll",!1,!0),this.element.dispatchEvent(e)}else this.element.dispatchEvent(new Event("scroll"))}}class im extends Je{constructor(e){super(e),this.active=!1,this.element=this.createElement(),this.containerElement=this.createContainerElement(),this.external=!1}initialize(){this.initializeElement()}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer"),e}createContainerElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer-contents"),this.element.appendChild(e),e}initializeElement(){if(this.table.options.footerElement)switch(typeof this.table.options.footerElement){case"string":this.table.options.footerElement[0]==="<"?this.containerElement.innerHTML=this.table.options.footerElement:(this.external=!0,this.containerElement=document.querySelector(this.table.options.footerElement));break;default:this.element=this.table.options.footerElement;break}}getElement(){return this.element}append(e){this.activate(),this.containerElement.appendChild(e),this.table.rowManager.adjustTableSize()}prepend(e){this.activate(),this.element.insertBefore(e,this.element.firstChild),this.table.rowManager.adjustTableSize()}remove(e){e.parentNode.removeChild(e),this.deactivate()}deactivate(e){(!this.element.firstChild||e)&&(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)}activate(){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display=""))}redraw(){this.dispatch("footer-redraw")}}class sm extends Je{constructor(e){super(e),this.el=null,this.abortClasses=["tabulator-headers","tabulator-table"],this.previousTargets={},this.listeners=["click","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","mouseup","mousedown","touchstart","touchend"],this.componentMap={"tabulator-cell":"cell","tabulator-row":"row","tabulator-group":"group","tabulator-col":"column"},this.pseudoTrackers={row:{subscriber:null,target:null},cell:{subscriber:null,target:null},group:{subscriber:null,target:null},column:{subscriber:null,target:null}},this.pseudoTracking=!1}initialize(){this.el=this.table.element,this.buildListenerMap(),this.bindSubscriptionWatchers()}buildListenerMap(){var e={};this.listeners.forEach(t=>{e[t]={handler:null,components:[]}}),this.listeners=e}bindPseudoEvents(){Object.keys(this.pseudoTrackers).forEach(e=>{this.pseudoTrackers[e].subscriber=this.pseudoMouseEnter.bind(this,e),this.subscribe(e+"-mouseover",this.pseudoTrackers[e].subscriber)}),this.pseudoTracking=!0}pseudoMouseEnter(e,t,i){this.pseudoTrackers[e].target!==i&&(this.pseudoTrackers[e].target&&this.dispatch(e+"-mouseleave",t,this.pseudoTrackers[e].target),this.pseudoMouseLeave(e,t),this.pseudoTrackers[e].target=i,this.dispatch(e+"-mouseenter",t,i))}pseudoMouseLeave(e,t){var i=Object.keys(this.pseudoTrackers),n={row:["cell"],cell:["row"]};i=i.filter(r=>{var a=n[e];return r!==e&&(!a||a&&!a.includes(r))}),i.forEach(r=>{var a=this.pseudoTrackers[r].target;this.pseudoTrackers[r].target&&(this.dispatch(r+"-mouseleave",t,a),this.pseudoTrackers[r].target=null)})}bindSubscriptionWatchers(){var e=Object.keys(this.listeners),t=Object.values(this.componentMap);for(let i of t)for(let n of e){let r=i+"-"+n;this.subscriptionChange(r,this.subscriptionChanged.bind(this,i,n))}this.subscribe("table-destroy",this.clearWatchers.bind(this))}subscriptionChanged(e,t,i){var n=this.listeners[t].components,r=n.indexOf(e),a=!1;i?r===-1&&(n.push(e),a=!0):this.subscribed(e+"-"+t)||r>-1&&(n.splice(r,1),a=!0),(t==="mouseenter"||t==="mouseleave")&&!this.pseudoTracking&&this.bindPseudoEvents(),a&&this.updateEventListeners()}updateEventListeners(){for(let e in this.listeners){let t=this.listeners[e];t.components.length?t.handler||(t.handler=this.track.bind(this,e),this.el.addEventListener(e,t.handler)):t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}track(e,t){var i=t.composedPath&&t.composedPath()||t.path,n=this.findTargets(i);n=this.bindComponents(e,n),this.triggerEvents(e,t,n),this.pseudoTracking&&(e=="mouseover"||e=="mouseleave")&&!Object.keys(n).length&&this.pseudoMouseLeave("none",t)}findTargets(e){var t={};let i=Object.keys(this.componentMap);for(let n of e){let r=n.classList?[...n.classList]:[];if(r.filter(l=>this.abortClasses.includes(l)).length)break;let o=r.filter(l=>i.includes(l));for(let l of o)t[this.componentMap[l]]||(t[this.componentMap[l]]=n)}return t.group&&t.group===t.row&&delete t.row,t}bindComponents(e,t){var i=Object.keys(t).reverse(),n=this.listeners[e],r={},a={},o={};for(let l of i){let u,h=t[l],m=this.previousTargets[l];if(m&&m.target===h)u=m.component;else switch(l){case"row":case"group":(n.components.includes("row")||n.components.includes("cell")||n.components.includes("group"))&&(u=this.table.rowManager.getVisibleRows(!0).find(C=>C.getElement()===h),t.row&&t.row.parentNode&&t.row.parentNode.closest(".tabulator-row")&&(t[l]=!1));break;case"column":n.components.includes("column")&&(u=this.table.columnManager.findColumn(h));break;case"cell":n.components.includes("cell")&&(r.row instanceof Qe?u=r.row.findCell(h):t.row&&console.warn("Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?"));break}u&&(r[l]=u,o[l]={target:h,component:u})}return this.previousTargets=o,Object.keys(t).forEach(l=>{let u=r[l];a[l]=u}),a}triggerEvents(e,t,i){var n=this.listeners[e];for(let r in i)i[r]&&n.components.includes(r)&&this.dispatch(r+"-"+e,t,i[r])}clearWatchers(){for(let e in this.listeners){let t=this.listeners[e];t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}}class nm{constructor(e){this.table=e,this.bindings={}}bind(e,t,i){this.bindings[e]||(this.bindings[e]={}),this.bindings[e][t]?console.warn("Unable to bind component handler, a matching function name is already bound",e,t,i):this.bindings[e][t]=i}handle(e,t,i){if(this.bindings[e]&&this.bindings[e][i]&&typeof this.bindings[e][i].bind=="function")return this.bindings[e][i].bind(null,t);i!=="then"&&typeof i=="string"&&!i.startsWith("_")&&this.table.options.debugInvalidComponentFuncs&&console.error("The "+e+" component does not have a "+i+" function, have you checked that you have the correct Tabulator module installed?")}}class rm extends Je{constructor(e){super(e),this.requestOrder=0,this.loading=!1}initialize(){}load(e,t,i,n,r,a){var o=++this.requestOrder;if(this.table.destroyed)return Promise.resolve();if(this.dispatchExternal("dataLoading",e),e&&(e.indexOf("{")==0||e.indexOf("[")==0)&&(e=JSON.parse(e)),this.confirm("data-loading",[e,t,i,r])){this.loading=!0,r||this.alertLoader(),t=this.chain("data-params",[e,i,r],t||{},t||{}),t=this.mapParams(t,this.table.options.dataSendParams);var l=this.chain("data-load",[e,t,i,r],!1,Promise.resolve([]));return l.then(u=>{if(this.table.destroyed)console.warn("Data Load Response Blocked - Table has been destroyed");else{!Array.isArray(u)&&typeof u=="object"&&(u=this.mapParams(u,this.objectInvert(this.table.options.dataReceiveParams)));var h=this.chain("data-loaded",[u],null,u);o==this.requestOrder?(this.clearAlert(),h!==!1&&(this.dispatchExternal("dataLoaded",h),this.table.rowManager.setData(h,n,typeof a>"u"?!n:a))):console.warn("Data Load Response Blocked - An active data load request was blocked by an attempt to change table data while the request was being made")}}).catch(u=>{console.error("Data Load Error: ",u),this.dispatchExternal("dataLoadError",u),r||this.alertError(),setTimeout(()=>{this.clearAlert()},this.table.options.dataLoaderErrorTimeout)}).finally(()=>{this.loading=!1})}else return this.dispatchExternal("dataLoaded",e),e||(e=[]),this.table.rowManager.setData(e,n,typeof a>"u"?!n:a),Promise.resolve()}mapParams(e,t){var i={};for(let n in e)i[t.hasOwnProperty(n)?t[n]:n]=e[n];return i}objectInvert(e){var t={};for(let i in e)t[e[i]]=i;return t}blockActiveLoad(){this.requestOrder++}alertLoader(){var e=typeof this.table.options.dataLoader=="function"?this.table.options.dataLoader():this.table.options.dataLoader;e&&this.table.alertManager.alert(this.table.options.dataLoaderLoading||this.langText("data|loading"))}alertError(){this.table.alertManager.alert(this.table.options.dataLoaderError||this.langText("data|error"),"error")}clearAlert(){this.table.alertManager.clear()}}class am{constructor(e,t,i){this.table=e,this.events={},this.optionsList=t||{},this.subscriptionNotifiers={},this.dispatch=i?this._debugDispatch.bind(this):this._dispatch.bind(this),this.debug=i}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifySubscriptionChange(e,!0)}subscribe(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t),this._notifySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e])if(t)if(i=this.events[e].findIndex(n=>n===t),i>-1)this.events[e].splice(i,1);else{console.warn("Cannot remove event, no matching event found:",e,t);return}else delete this.events[e];else{console.warn("Cannot remove event, no events set on:",e);return}this._notifySubscriptionChange(e,!1)}subscribed(e){return this.events[e]&&this.events[e].length}_notifySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach(n=>{n(t)})}_dispatch(){var e=Array.from(arguments),t=e.shift(),i;return this.events[t]&&this.events[t].forEach((n,r)=>{let a=n.apply(this.table,e);r||(i=a)}),i}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="ExternalEvent:"+e[0],(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}}class om{constructor(e){this.events={},this.subscriptionNotifiers={},this.dispatch=e?this._debugDispatch.bind(this):this._dispatch.bind(this),this.chain=e?this._debugChain.bind(this):this._chain.bind(this),this.confirm=e?this._debugConfirm.bind(this):this._confirm.bind(this),this.debug=e}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifySubscriptionChange(e,!0)}subscribe(e,t,i=1e4){this.events[e]||(this.events[e]=[]),this.events[e].push({callback:t,priority:i}),this.events[e].sort((n,r)=>n.priority-r.priority),this._notifySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e]){if(t)if(i=this.events[e].findIndex(n=>n.callback===t),i>-1)this.events[e].splice(i,1);else{console.warn("Cannot remove event, no matching event found:",e,t);return}}else{console.warn("Cannot remove event, no events set on:",e);return}this._notifySubscriptionChange(e,!1)}subscribed(e){return this.events[e]&&this.events[e].length}_chain(e,t,i,n){var r=i;return Array.isArray(t)||(t=[t]),this.subscribed(e)?(this.events[e].forEach((a,o)=>{r=a.callback.apply(this,t.concat([r]))}),r):typeof n=="function"?n():n}_confirm(e,t){var i=!1;return Array.isArray(t)||(t=[t]),this.subscribed(e)&&this.events[e].forEach((n,r)=>{n.callback.apply(this,t)&&(i=!0)}),i}_notifySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach(n=>{n(t)})}_dispatch(){var e=Array.from(arguments),t=e.shift();this.events[t]&&this.events[t].forEach(i=>{i.callback.apply(this,e)})}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}_debugChain(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._chain(...arguments)}_debugConfirm(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._confirm(...arguments)}}class lm extends Je{constructor(e){super(e)}_warnUser(){this.options("debugDeprecation")&&console.warn(...arguments)}check(e,t,i){var n="";return typeof this.options(e)<"u"?(n="Deprecated Setup Option - Use of the %c"+e+"%c option is now deprecated",t?(n=n+", Please use the %c"+t+"%c option instead",this._warnUser(n,"font-weight: bold;","font-weight: normal;","font-weight: bold;","font-weight: normal;"),i&&(this.table.options[t]=this.table.options[e])):this._warnUser(n,"font-weight: bold;","font-weight: normal;"),!1):!0}checkMsg(e,t){return typeof this.options(e)<"u"?(this._warnUser("%cDeprecated Setup Option - Use of the %c"+e+" %c option is now deprecated, "+t,"font-weight: normal;","font-weight: bold;","font-weight: normal;"),!1):!0}msg(e){this._warnUser(e)}}class um extends Je{constructor(e){super(e),this.deps={},this.props={}}initialize(){this.deps=Object.assign({},this.options("dependencies"))}lookup(e,t,i){if(Array.isArray(e)){for(const r of e){var n=this.lookup(r,t,!0);if(n)break}if(n)return n;this.error(e)}else return t?this.lookupProp(e,t,i):this.lookupKey(e,i)}lookupProp(e,t,i){var n;if(this.props[e]&&this.props[e][t])return this.props[e][t];if(n=this.lookupKey(e,i),n)return this.props[e]||(this.props[e]={}),this.props[e][t]=n[t]||n,this.props[e][t]}lookupKey(e,t){var i;return this.deps[e]?i=this.deps[e]:window[e]?(this.deps[e]=window[e],i=this.deps[e]):t||this.error(e),i}error(e){console.error("Unable to find dependency",e,"Please check documentation and ensure you have imported the required library into your project")}}function hm(s,e){e&&this.table.columnManager.renderer.reinitializeColumnWidths(s),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function fa(s,e){s.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function dm(s,e){var t=0,i=this.table.rowManager.element.clientWidth,n=0,r=!1;s.forEach((a,o)=>{a.widthFixed||a.reinitializeWidth(),(this.table.options.responsiveLayout?a.modules.responsive.visible:a.visible)&&(r=a),a.visible&&(t+=a.getWidth())}),r?(n=i-t+r.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(r.setWidth(0),this.table.modules.responsiveLayout.update()),n>0?r.setWidth(n):r.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function cm(s,e){var t=this.table.rowManager.element.getBoundingClientRect().width,i=0,n=0,r=0,a=0,o=[],l=[],u=0,h=0,m=0;function v(F){var x;return typeof F=="string"?F.indexOf("%")>-1?x=t/100*parseInt(F):x=parseInt(F):x=F,x}function C(F,x,R,M){var k=[],_=0,p=0,w=0,c=r,y=0,g=0,b=[];function f(S){return R*(S.column.definition.widthGrow||1)}function E(S){return v(S.width)-R*(S.column.definition.widthShrink||0)}return F.forEach(function(S,D){var A=M?E(S):f(S);S.column.minWidth>=A?k.push(S):S.column.maxWidth&&S.column.maxWidth<A?(S.width=S.column.maxWidth,x-=S.column.maxWidth,c-=M?S.column.definition.widthShrink||1:S.column.definition.widthGrow||1,c&&(R=Math.floor(x/c))):(b.push(S),g+=M?S.column.definition.widthShrink||1:S.column.definition.widthGrow||1)}),k.length?(k.forEach(function(S){_+=M?S.width-S.column.minWidth:S.column.minWidth,S.width=S.column.minWidth}),p=x-_,w=g?Math.floor(p/g):p,y=C(b,p,w,M)):(y=g?x-Math.floor(x/g)*g:x,b.forEach(function(S){S.width=M?E(S):f(S)})),y}this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(t-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),s.forEach(function(F){var x,R,M;F.visible&&(x=F.definition.width,R=parseInt(F.minWidth),x?(M=v(x),i+=M>R?M:R,F.definition.widthShrink&&(l.push({column:F,width:M>R?M:R}),u+=F.definition.widthShrink)):(o.push({column:F,width:0}),r+=F.definition.widthGrow||1))}),n=t-i,a=Math.floor(n/r),m=C(o,n,a,!1),o.length&&m>0&&(o[o.length-1].width+=m),o.forEach(function(F){n-=F.width}),h=Math.abs(m)+n,h>0&&u&&(m=C(l,h,Math.floor(h/u),!0)),m&&l.length&&(l[l.length-1].width-=m),o.forEach(function(F){F.column.setWidth(F.width)}),l.forEach(function(F){F.column.setWidth(F.width)})}var fm={fitData:hm,fitDataFill:fa,fitDataTable:fa,fitDataStretch:dm,fitColumns:cm};class Ns extends ke{static moduleName="layout";static modes=fm;constructor(e){super(e,"layout"),this.mode=null,this.registerTableOption("layout","fitData"),this.registerTableOption("layoutColumnsOnNewData",!1),this.registerColumnOption("widthGrow"),this.registerColumnOption("widthShrink")}initialize(){var e=this.table.options.layout;Ns.modes[e]?this.mode=e:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+e),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode),this.subscribe("column-init",this.initializeColumn.bind(this))}initializeColumn(e){e.definition.widthGrow&&(e.definition.widthGrow=Number(e.definition.widthGrow)),e.definition.widthShrink&&(e.definition.widthShrink=Number(e.definition.widthShrink))}getMode(){return this.mode}layout(e){var t=this.table.columnManager.columnsByIndex.find(i=>i.definition.variableHeight||i.definition.formatter==="textarea");this.dispatch("layout-refreshing"),Ns.modes[this.mode].call(this,this.table.columnManager.columnsByIndex,e),t&&this.table.rowManager.normalizeHeight(!0),this.dispatch("layout-refreshed")}}var pm={default:{groups:{item:"item",items:"items"},columns:{},data:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All",counter:{showing:"Showing",of:"of",rows:"rows",pages:"pages"}},headerFilters:{default:"filter column...",columns:{}}}};class In extends ke{static moduleName="localize";static langs=pm;constructor(e){super(e),this.locale="default",this.lang=!1,this.bindings={},this.langList={},this.registerTableOption("locale",!1),this.registerTableOption("langs",{})}initialize(){this.langList=He.deepClone(In.langs),this.table.options.columnDefaults.headerFilterPlaceholder!==!1&&this.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);for(let e in this.table.options.langs)this.installLang(e,this.table.options.langs[e]);this.setLocale(this.table.options.locale),this.registerTableFunction("setLocale",this.setLocale.bind(this)),this.registerTableFunction("getLocale",this.getLocale.bind(this)),this.registerTableFunction("getLang",this.getLang.bind(this))}setHeaderFilterPlaceholder(e){this.langList.default.headerFilters.default=e}installLang(e,t){this.langList[e]?this._setLangProp(this.langList[e],t):this.langList[e]=t}_setLangProp(e,t){for(let i in t)e[i]&&typeof e[i]=="object"?this._setLangProp(e[i],t[i]):e[i]=t[i]}setLocale(e){e=e||"default";function t(i,n){for(var r in i)typeof i[r]=="object"?(n[r]||(n[r]={}),t(i[r],n[r])):n[r]=i[r]}if(e===!0&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!this.langList[e]){let i=e.split("-")[0];this.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,i),e=i):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}this.locale=e,this.lang=He.deepClone(this.langList.default||{}),e!="default"&&t(this.langList[e],this.lang),this.dispatchExternal("localized",this.locale,this.lang),this._executeBindings()}getLocale(e){return this.locale}getLang(e){return e?this.langList[e]:this.lang}getText(e,t){var i=t?e+"|"+t:e,n=i.split("|"),r=this._getLangElement(n,this.locale);return r||""}_getLangElement(e,t){var i=this.lang;return e.forEach(function(n){var r;i&&(r=i[n],typeof r<"u"?i=r:i=!1)}),i}bind(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)}_executeBindings(){for(let e in this.bindings)this.bindings[e].forEach(t=>{t(this.getText(e),this.lang)})}}class mm extends ke{static moduleName="comms";constructor(e){super(e)}initialize(){this.registerTableFunction("tableComms",this.receive.bind(this))}getConnections(e){var t=[],i;return i=this.table.constructor.registry.lookupTable(e),i.forEach(n=>{this.table!==n&&t.push(n)}),t}send(e,t,i,n){var r=this.getConnections(e);r.forEach(a=>{a.tableComms(this.table.element,t,i,n)}),!r.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)}receive(e,t,i,n){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,i,n);console.warn("Inter-table Comms Error - no such module:",t)}}var gm=Object.freeze({__proto__:null,CommsModule:mm,LayoutModule:Ns,LocalizeModule:In});class vt{static registry={tables:[],register(e){vt.registry.tables.push(e)},deregister(e){var t=vt.registry.tables.indexOf(e);t>-1&&vt.registry.tables.splice(t,1)},lookupTable(e,t){var i=[],n,r;if(typeof e=="string"){if(n=document.querySelectorAll(e),n.length)for(var a=0;a<n.length;a++)r=vt.registry.matchElement(n[a]),r&&i.push(r)}else typeof HTMLElement<"u"&&e instanceof HTMLElement||e instanceof vt?(r=vt.registry.matchElement(e),r&&i.push(r)):Array.isArray(e)?e.forEach(function(o){i=i.concat(vt.registry.lookupTable(o))}):t||console.warn("Table Connection Error - Invalid Selector",e);return i},matchElement(e){return vt.registry.tables.find(function(t){return e instanceof vt?t===e:t.element===e})}};static findTable(e){var t=vt.registry.lookupTable(e,!0);return Array.isArray(t)&&!t.length?!1:t}}class Ge extends vt{static moduleBindings={};static moduleExtensions={};static modulesRegistered=!1;static defaultModules=!1;constructor(){super()}static initializeModuleBinder(e){Ge.modulesRegistered||(Ge.modulesRegistered=!0,Ge._registerModules(gm,!0),e&&Ge._registerModules(e))}static _extendModule(e,t,i){if(Ge.moduleBindings[e]){var n=Ge.moduleBindings[e][t];if(n)if(typeof i=="object")for(let r in i)n[r]=i[r];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",t)}else console.warn("Module Error - module does not exist:",e)}static _registerModules(e,t){var i=Object.values(e);t&&i.forEach(n=>{n.prototype.moduleCore=!0}),Ge._registerModule(i)}static _registerModule(e){Array.isArray(e)||(e=[e]),e.forEach(t=>{Ge._registerModuleBinding(t),Ge._registerModuleExtensions(t)})}static _registerModuleBinding(e){e.moduleName?Ge.moduleBindings[e.moduleName]=e:console.error("Unable to bind module, no moduleName defined",e.moduleName)}static _registerModuleExtensions(e){var t=e.moduleExtensions;if(e.moduleExtensions)for(let i in t){let n=t[i];if(Ge.moduleBindings[i])for(let r in n)Ge._extendModule(i,r,n[r]);else{Ge.moduleExtensions[i]||(Ge.moduleExtensions[i]={});for(let r in n)Ge.moduleExtensions[i][r]||(Ge.moduleExtensions[i][r]={}),Object.assign(Ge.moduleExtensions[i][r],n[r])}}Ge._extendModuleFromQueue(e)}static _extendModuleFromQueue(e){var t=Ge.moduleExtensions[e.moduleName];if(t)for(let i in t)Ge._extendModule(e.moduleName,i,t[i])}_bindModules(){var e=[],t=[],i=[];this.modules={};for(var n in Ge.moduleBindings){let r=Ge.moduleBindings[n],a=new r(this);this.modules[n]=a,r.prototype.moduleCore?this.modulesCore.push(a):r.moduleInitOrder?r.moduleInitOrder<0?e.push(a):t.push(a):i.push(a)}e.sort((r,a)=>r.moduleInitOrder>a.moduleInitOrder?1:-1),t.sort((r,a)=>r.moduleInitOrder>a.moduleInitOrder?1:-1),this.modulesRegular=e.concat(i.concat(t))}}class bm extends Je{constructor(e){super(e),this.element=this._createAlertElement(),this.msgElement=this._createMsgElement(),this.type=null,this.element.appendChild(this.msgElement)}_createAlertElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert"),e}_createMsgElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert-msg"),e.setAttribute("role","alert"),e}_typeClass(){return"tabulator-alert-state-"+this.type}alert(e,t="msg"){if(e){for(this.clear(),this.dispatch("alert-show",t),this.type=t;this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.add(this._typeClass()),typeof e=="function"&&(e=e()),e instanceof HTMLElement?this.msgElement.appendChild(e):this.msgElement.innerHTML=e,this.table.element.appendChild(this.element)}}clear(){this.dispatch("alert-hide",this.type),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.msgElement.classList.remove(this._typeClass())}}class Kt extends Ge{static defaultOptions=qp;static extendModule(){Kt.initializeModuleBinder(),Kt._extendModule(...arguments)}static registerModule(){Kt.initializeModuleBinder(),Kt._registerModule(...arguments)}constructor(e,t,i){super(),Kt.initializeModuleBinder(i),this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.alertManager=null,this.vdomHoz=null,this.externalEvents=null,this.eventBus=null,this.interactionMonitor=!1,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.originalElement=null,this.componentFunctionBinder=new nm(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.deprecationAdvisor=new lm(this),this.optionsList=new ca(this,"table constructor"),this.dependencyRegistry=new um(this),this.initialized=!1,this.destroyed=!1,this.initializeElement(e)&&(this.initializeCoreSystems(t),setTimeout(()=>{this._create()})),this.constructor.registry.register(this)}initializeElement(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement?(this.element=e,!0):typeof e=="string"?(this.element=document.querySelector(e),this.element?!0:(console.error("Tabulator Creation Error - no element found matching selector: ",e),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",e),!1)}initializeCoreSystems(e){this.columnManager=new Zp(this),this.rowManager=new tm(this),this.footerManager=new im(this),this.dataLoader=new rm(this),this.alertManager=new bm(this),this._bindModules(),this.options=this.optionsList.generate(Kt.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new am(this,this.options,this.options.debugEventsExternal),this.eventBus=new om(this.options.debugEventsInternal),this.interactionMonitor=new sm(this),this.dataLoader.initialize(),this.footerManager.initialize(),this.dependencyRegistry.initialize()}_mapDeprecatedFunctionality(){}_clearSelection(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")}_create(){this.externalEvents.dispatch("tableBuilding"),this.eventBus.dispatch("table-building"),this._rtlCheck(),this._buildElement(),this._initializeTable(),this.initialized=!0,this._loadInitialData().finally(()=>{this.eventBus.dispatch("table-initialized"),this.externalEvents.dispatch("tableBuilt")})}_rtlCheck(){var e=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if(e.direction!=="rtl")break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}}_clearObjectPointers(){this.options.columns=this.options.columns.slice(0),Array.isArray(this.options.data)&&!this.options.reactiveData&&(this.options.data=this.options.data.slice(0))}_buildElement(){var e=this.element,t=this.options,i;if(e.tagName==="TABLE"){this.originalElement=this.element,i=document.createElement("div");var n=e.attributes;for(var r in n)typeof n[r]=="object"&&i.setAttribute(n[r].name,n[r].value);e.parentNode.replaceChild(i,e),this.element=e=i}for(e.classList.add("tabulator"),e.setAttribute("role","grid");e.firstChild;)e.removeChild(e.firstChild);t.height&&(t.height=isNaN(t.height)?t.height:t.height+"px",e.style.height=t.height),t.minHeight!==!1&&(t.minHeight=isNaN(t.minHeight)?t.minHeight:t.minHeight+"px",e.style.minHeight=t.minHeight),t.maxHeight!==!1&&(t.maxHeight=isNaN(t.maxHeight)?t.maxHeight:t.maxHeight+"px",e.style.maxHeight=t.maxHeight)}_initializeTable(){var e=this.element,t=this.options;this.interactionMonitor.initialize(),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modulesCore.forEach(i=>{i.initialize()}),e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),t.footerElement&&this.footerManager.activate(),t.autoColumns&&t.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modulesRegular.forEach(i=>{i.initialize()}),this.columnManager.setColumns(t.columns),this.eventBus.dispatch("table-built")}_loadInitialData(){return this.dataLoader.load(this.options.data).finally(()=>{this.columnManager.verticalAlignHeaders()})}destroy(){var e=this.element;for(this.destroyed=!0,this.constructor.registry.deregister(this),this.eventBus.dispatch("table-destroy"),this.rowManager.destroy();e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("tabulator"),this.externalEvents.dispatch("tableDestroyed")}_detectBrowser(){var e=navigator.userAgent||navigator.vendor||window.opera;e.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):e.indexOf("Mac OS")>-1?(this.browser="safari",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.slice(0,4))}initGuard(e,t){var i,n;return this.options.debugInitialization&&!this.initialized&&(e||(i=new Error().stack.split(`
49
+ `),n=i[0]=="Error"?i[2]:i[1],n[0]==" "?e=n.trim().split(" ")[1].split(".")[1]:e=n.trim().split("@")[0]),console.warn("Table Not Initialized - Calling the "+e+" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function."+(t?" "+t:""))),this.initialized}blockRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-blocking"),this.rowManager.blockRedraw(),this.columnManager.blockRedraw(),this.eventBus.dispatch("redraw-blocked")}restoreRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-restoring"),this.rowManager.restoreRedraw(),this.columnManager.restoreRedraw(),this.eventBus.dispatch("redraw-restored")}setData(e,t,i){return this.initGuard(!1,"To set initial data please use the 'data' property in the table constructor."),this.dataLoader.load(e,t,i,!1)}clearData(){this.initGuard(),this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}getData(e){return this.rowManager.getData(e)}getDataCount(e){return this.rowManager.getDataCount(e)}replaceData(e,t,i){return this.initGuard(),this.dataLoader.load(e,t,i,!0,!0)}updateData(e){var t=0;return this.initGuard(),new Promise((i,n)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e&&e.length>0?e.forEach(r=>{var a=this.rowManager.findRow(r[this.options.index]);a?(t++,a.updateData(r).then(()=>{t--,t||i()}).catch(o=>{n("Update Error - Unable to update row",r,o)})):n("Update Error - Unable to find row",r)}):(console.warn("Update Error - No data provided"),n("Update Error - No data provided"))})}addData(e,t,i){return this.initGuard(),new Promise((n,r)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e?this.rowManager.addRows(e,t,i).then(a=>{var o=[];a.forEach(function(l){o.push(l.getComponent())}),n(o)}):(console.warn("Update Error - No data provided"),r("Update Error - No data provided"))})}updateOrAddData(e){var t=[],i=0;return this.initGuard(),new Promise((n,r)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e&&e.length>0?e.forEach(a=>{var o=this.rowManager.findRow(a[this.options.index]);i++,o?o.updateData(a).then(()=>{i--,t.push(o.getComponent()),i||n(t)}):this.rowManager.addRows(a).then(l=>{i--,t.push(l[0].getComponent()),i||n(t)})}):(console.warn("Update Error - No data provided"),r("Update Error - No data provided"))})}getRow(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}getRowFromPosition(e){var t=this.rowManager.getRowFromPosition(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}deleteRow(e){var t=[];this.initGuard(),Array.isArray(e)||(e=[e]);for(let i of e){let n=this.rowManager.findRow(i,!0);if(n)t.push(n);else return console.error("Delete Error - No matching row found:",i),Promise.reject("Delete Error - No matching row found")}return t.sort((i,n)=>this.rowManager.rows.indexOf(i)>this.rowManager.rows.indexOf(n)?1:-1),t.forEach(i=>{i.delete()}),this.rowManager.reRenderInPosition(),Promise.resolve()}addRow(e,t,i){return this.initGuard(),typeof e=="string"&&(e=JSON.parse(e)),this.rowManager.addRows(e,t,i,!0).then(n=>n[0].getComponent())}updateOrAddRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),typeof t=="string"&&(t=JSON.parse(t)),i?i.updateData(t).then(()=>i.getComponent()):this.rowManager.addRows(t).then(n=>n[0].getComponent())}updateRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),typeof t=="string"&&(t=JSON.parse(t)),i?i.updateData(t).then(()=>Promise.resolve(i.getComponent())):(console.warn("Update Error - No matching row found:",e),Promise.reject("Update Error - No matching row found"))}scrollToRow(e,t,i){var n=this.rowManager.findRow(e);return n?this.rowManager.scrollToRow(n,t,i):(console.warn("Scroll Error - No matching row found:",e),Promise.reject("Scroll Error - No matching row found"))}moveRow(e,t,i){var n=this.rowManager.findRow(e);this.initGuard(),n?n.moveToRow(t,i):console.warn("Move Error - No matching row found:",e)}getRows(e){return this.rowManager.getComponents(e)}getRowPosition(e){var t=this.rowManager.findRow(e);return t?t.getPosition():(console.warn("Position Error - No matching row found:",e),!1)}setColumns(e){this.initGuard(!1,"To set initial columns please use the 'columns' property in the table constructor"),this.columnManager.setColumns(e)}getColumns(e){return this.columnManager.getComponents(e)}getColumn(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)}getColumnDefinitions(){return this.columnManager.getDefinitionTree()}showColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.show();else return console.warn("Column Show Error - No matching column found:",e),!1}hideColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.hide();else return console.warn("Column Hide Error - No matching column found:",e),!1}toggleColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.visible?t.hide():t.show();else return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1}addColumn(e,t,i){var n=this.columnManager.findColumn(i);return this.initGuard(),this.columnManager.addColumn(e,t,n).then(r=>r.getComponent())}deleteColumn(e){var t=this.columnManager.findColumn(e);return this.initGuard(),t?t.delete():(console.warn("Column Delete Error - No matching column found:",e),Promise.reject())}updateColumnDefinition(e,t){var i=this.columnManager.findColumn(e);return this.initGuard(),i?i.updateDefinition(t):(console.warn("Column Update Error - No matching column found:",e),Promise.reject())}moveColumn(e,t,i){var n=this.columnManager.findColumn(e),r=this.columnManager.findColumn(t);this.initGuard(),n?r?this.columnManager.moveColumn(n,r,i):console.warn("Move Error - No matching column found:",r):console.warn("Move Error - No matching column found:",e)}scrollToColumn(e,t,i){return new Promise((n,r)=>{var a=this.columnManager.findColumn(e);return a?this.columnManager.scrollToColumn(a,t,i):(console.warn("Scroll Error - No matching column found:",e),Promise.reject("Scroll Error - No matching column found"))})}redraw(e){this.initGuard(),this.columnManager.redraw(e),this.rowManager.redraw(e)}setHeight(e){this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.initializeRenderer(),this.rowManager.redraw(!0)}on(e,t){this.externalEvents.subscribe(e,t)}off(e,t){this.externalEvents.unsubscribe(e,t)}dispatchEvent(){var e=Array.from(arguments);e.shift(),this.externalEvents.dispatch(...arguments)}alert(e,t){this.initGuard(),this.alertManager.alert(e,t)}clearAlert(){this.initGuard(),this.alertManager.clear()}modExists(e,t){return this.modules[e]?!0:(t&&console.error("Tabulator Module Not Installed: "+e),!1)}module(e){var t=this.modules[e];return t||console.error("Tabulator module not installed: "+e),t}}var Ki=Kt;class vm extends Ki{static extendModule(){Ki.initializeModuleBinder(Nn),Ki._extendModule(...arguments)}static registerModule(){Ki.initializeModuleBinder(Nn),Ki._registerModule(...arguments)}constructor(e,t,i){super(e,t,Nn)}}var ym=vm,wm=Object.defineProperty,Cm=Object.defineProperties,Em=Object.getOwnPropertyDescriptors,pa=Object.getOwnPropertySymbols,km=Object.prototype.hasOwnProperty,xm=Object.prototype.propertyIsEnumerable,ma=(s,e,t)=>e in s?wm(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Ei=(s,e)=>{for(var t in e||(e={}))km.call(e,t)&&ma(s,t,e[t]);if(pa)for(var t of pa(e))xm.call(e,t)&&ma(s,t,e[t]);return s},ga=(s,e)=>Cm(s,Em(e));const Mm={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer(){this.autoscroll&&this.maybeAdjustScroll()},open(s){this.autoscroll&&s&&this.$nextTick(()=>this.maybeAdjustScroll())}},methods:{maybeAdjustScroll(){var s;const e=((s=this.$refs.dropdownMenu)==null?void 0:s.children[this.typeAheadPointer])||!1;if(e){const t=this.getDropdownViewport(),{top:i,bottom:n,height:r}=e.getBoundingClientRect();if(i<t.top)return this.$refs.dropdownMenu.scrollTop=e.offsetTop;if(n>t.bottom)return this.$refs.dropdownMenu.scrollTop=e.offsetTop-(t.height-r)}},getDropdownViewport(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},Sm={data(){return{typeAheadPointer:-1}},watch:{filteredOptions(){for(let s=0;s<this.filteredOptions.length;s++)if(this.selectable(this.filteredOptions[s])){this.typeAheadPointer=s;break}},open(s){s&&this.typeAheadToLastSelected()},selectedValue(){this.open&&this.typeAheadToLastSelected()}},methods:{typeAheadUp(){for(let s=this.typeAheadPointer-1;s>=0;s--)if(this.selectable(this.filteredOptions[s])){this.typeAheadPointer=s;break}},typeAheadDown(){for(let s=this.typeAheadPointer+1;s<this.filteredOptions.length;s++)if(this.selectable(this.filteredOptions[s])){this.typeAheadPointer=s;break}},typeAheadSelect(){const s=this.filteredOptions[this.typeAheadPointer];s&&this.selectable(s)&&this.select(s)},typeAheadToLastSelected(){this.typeAheadPointer=this.selectedValue.length!==0?this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length-1]):-1}}},Rm={props:{loading:{type:Boolean,default:!1}},data(){return{mutableLoading:!1}},watch:{search(){this.$emit("search",this.search,this.toggleLoading)},loading(s){this.mutableLoading=s}},methods:{toggleLoading(s=null){return s==null?this.mutableLoading=!this.mutableLoading:this.mutableLoading=s}}},Vn=(s,e)=>{const t=s.__vccOpts||s;for(const[i,n]of e)t[i]=n;return t},Dm={},Tm={xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"},_m=d.createElementVNode("path",{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"},null,-1),Om=[_m];function Lm(s,e){return d.openBlock(),d.createElementBlock("svg",Tm,Om)}const Pm=Vn(Dm,[["render",Lm]]),Fm={},Am={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"},Hm=d.createElementVNode("path",{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"},null,-1),zm=[Hm];function Bm(s,e){return d.openBlock(),d.createElementBlock("svg",Am,zm)}const Nm=Vn(Fm,[["render",Bm]]),ba={Deselect:Pm,OpenIndicator:Nm},Im={mounted(s,{instance:e}){if(e.appendToBody){const{height:t,top:i,left:n,width:r}=e.$refs.toggle.getBoundingClientRect();let a=window.scrollX||window.pageXOffset,o=window.scrollY||window.pageYOffset;s.unbindPosition=e.calculatePosition(s,e,{width:r+"px",left:a+n+"px",top:o+i+t+"px"}),document.body.appendChild(s)}},unmounted(s,{instance:e}){e.appendToBody&&(s.unbindPosition&&typeof s.unbindPosition=="function"&&s.unbindPosition(),s.parentNode&&s.parentNode.removeChild(s))}};function Vm(s){const e={};return Object.keys(s).sort().forEach(t=>{e[t]=s[t]}),JSON.stringify(e)}let jm=0;function Wm(){return++jm}const Ym={components:Ei({},ba),directives:{appendToBody:Im},mixins:[Mm,Sm,Rm],compatConfig:{MODE:3},emits:["open","close","update:modelValue","search","search:compositionstart","search:compositionend","search:keydown","search:blur","search:focus","search:input","option:created","option:selecting","option:selected","option:deselecting","option:deselected"],props:{modelValue:{},components:{type:Object,default:()=>({})},options:{type:Array,default(){return[]}},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},deselectFromDropdown:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},placeholder:{type:String,default:""},transition:{type:String,default:"vs__fade"},clearSearchOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},label:{type:String,default:"label"},autocomplete:{type:String,default:"off"},reduce:{type:Function,default:s=>s},selectable:{type:Function,default:s=>!0},getOptionLabel:{type:Function,default(s){return typeof s=="object"?s.hasOwnProperty(this.label)?s[this.label]:console.warn(`[vue-select warn]: Label key "option.${this.label}" does not exist in options object ${JSON.stringify(s)}.
50
+ https://vue-select.org/api/props.html#getoptionlabel`):s}},getOptionKey:{type:Function,default(s){if(typeof s!="object")return s;try{return s.hasOwnProperty("id")?s.id:Vm(s)}catch(e){return console.warn(`[vue-select warn]: Could not stringify this option to generate unique key. Please provide'getOptionKey' prop to return a unique key for each option.
51
+ https://vue-select.org/api/props.html#getoptionkey`,s,e)}}},onTab:{type:Function,default:function(){this.selectOnTab&&!this.isComposing&&this.typeAheadSelect()}},taggable:{type:Boolean,default:!1},tabindex:{type:Number,default:null},pushTags:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},filterBy:{type:Function,default(s,e,t){return(e||"").toLocaleLowerCase().indexOf(t.toLocaleLowerCase())>-1}},filter:{type:Function,default(s,e){return s.filter(t=>{let i=this.getOptionLabel(t);return typeof i=="number"&&(i=i.toString()),this.filterBy(t,i,e)})}},createOption:{type:Function,default(s){return typeof this.optionList[0]=="object"?{[this.label]:s}:s}},resetOnOptionsChange:{default:!1,validator:s=>["function","boolean"].includes(typeof s)},clearSearchOnBlur:{type:Function,default:function({clearSearchOnSelect:s,multiple:e}){return s&&!e}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:()=>[13]},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:(s,e)=>s},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default(s,e,{width:t,top:i,left:n}){s.style.top=i,s.style.left=n,s.style.width=t}},dropdownShouldOpen:{type:Function,default({noDrop:s,open:e,mutableLoading:t}){return s?!1:e&&!t}},uid:{type:[String,Number],default:()=>Wm()}},data(){return{search:"",open:!1,isComposing:!1,pushedTags:[],_value:[],deselectButtons:[]}},computed:{isReducingValues(){return this.$props.reduce!==this.$options.props.reduce.default},isTrackingValues(){return typeof this.modelValue>"u"||this.isReducingValues},selectedValue(){let s=this.modelValue;return this.isTrackingValues&&(s=this.$data._value),s!=null&&s!==""?[].concat(s):[]},optionList(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl(){return this.$slots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope(){const s={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:Ei({disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,id:this.inputId,"aria-autocomplete":"list","aria-labelledby":`vs${this.uid}__combobox`,"aria-controls":`vs${this.uid}__listbox`,ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":`vs${this.uid}__option-${this.typeAheadPointer}`}:{}),events:{compositionstart:()=>this.isComposing=!0,compositionend:()=>this.isComposing=!1,keydown:this.onSearchKeyDown,blur:this.onSearchBlur,focus:this.onSearchFocus,input:e=>this.search=e.target.value}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.mutableLoading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:s,listFooter:s,header:ga(Ei({},s),{deselect:this.deselect}),footer:ga(Ei({},s),{deselect:this.deselect})}},childComponents(){return Ei(Ei({},ba),this.components)},stateClasses(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--multiple":this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching(){return!!this.search},dropdownOpen(){return this.dropdownShouldOpen(this)},searchPlaceholder(){return this.isValueEmpty&&this.placeholder?this.placeholder:void 0},filteredOptions(){const s=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return s;const e=this.search.length?this.filter(s,this.search,this):s;if(this.taggable&&this.search.length){const t=this.createOption(this.search);this.optionExists(t)||e.unshift(t)}return e},isValueEmpty(){return this.selectedValue.length===0},showClearButton(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options(s,e){const t=()=>typeof this.resetOnOptionsChange=="function"?this.resetOnOptionsChange(s,e,this.selectedValue):this.resetOnOptionsChange;!this.taggable&&t()&&this.clearSelection(),this.modelValue&&this.isTrackingValues&&this.setInternalValueFromOptions(this.modelValue)},modelValue:{immediate:!0,handler(s){this.isTrackingValues&&this.setInternalValueFromOptions(s)}},multiple(){this.clearSelection()},open(s){this.$emit(s?"open":"close")}},created(){this.mutableLoading=this.loading},methods:{setInternalValueFromOptions(s){Array.isArray(s)?this.$data._value=s.map(e=>this.findOptionFromReducedValue(e)):this.$data._value=this.findOptionFromReducedValue(s)},select(s){this.$emit("option:selecting",s),this.isOptionSelected(s)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(s):(this.taggable&&!this.optionExists(s)&&(this.$emit("option:created",s),this.pushTag(s)),this.multiple&&(s=this.selectedValue.concat(s)),this.updateValue(s),this.$emit("option:selected",s)),this.onAfterSelect(s)},deselect(s){this.$emit("option:deselecting",s),this.updateValue(this.selectedValue.filter(e=>!this.optionComparator(e,s))),this.$emit("option:deselected",s)},clearSelection(){this.updateValue(this.multiple?[]:null)},onAfterSelect(s){this.closeOnSelect&&(this.open=!this.open,this.searchEl.blur()),this.clearSearchOnSelect&&(this.search="")},updateValue(s){typeof this.modelValue>"u"&&(this.$data._value=s),s!==null&&(Array.isArray(s)?s=s.map(e=>this.reduce(e)):s=this.reduce(s)),this.$emit("update:modelValue",s)},toggleDropdown(s){const e=s.target!==this.searchEl;e&&s.preventDefault();const t=[...this.deselectButtons||[],this.$refs.clearButton];if(this.searchEl===void 0||t.filter(Boolean).some(i=>i.contains(s.target)||i===s.target)){s.preventDefault();return}this.open&&e?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected(s){return this.selectedValue.some(e=>this.optionComparator(e,s))},isOptionDeselectable(s){return this.isOptionSelected(s)&&this.deselectFromDropdown},optionComparator(s,e){return this.getOptionKey(s)===this.getOptionKey(e)},findOptionFromReducedValue(s){const e=i=>JSON.stringify(this.reduce(i))===JSON.stringify(s),t=[...this.options,...this.pushedTags].filter(e);return t.length===1?t[0]:t.find(i=>this.optionComparator(i,this.$data._value))||s},closeSearchOptions(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){let s=null;this.multiple&&(s=[...this.selectedValue.slice(0,this.selectedValue.length-1)]),this.updateValue(s)}},optionExists(s){return this.optionList.some(e=>this.optionComparator(e,s))},normalizeOptionForSlot(s){return typeof s=="object"?s:{[this.label]:s}},pushTag(s){this.pushedTags.push(s)},onEscape(){this.search.length?this.search="":this.searchEl.blur()},onSearchBlur(){if(this.mousedown&&!this.searching)this.mousedown=!1;else{const{clearSearchOnSelect:s,multiple:e}=this;this.clearSearchOnBlur({clearSearchOnSelect:s,multiple:e})&&(this.search=""),this.closeSearchOptions();return}if(this.search.length===0&&this.options.length===0){this.closeSearchOptions();return}},onSearchFocus(){this.open=!0,this.$emit("search:focus")},onMousedown(){this.mousedown=!0},onMouseUp(){this.mousedown=!1},onSearchKeyDown(s){const e=n=>(n.preventDefault(),!this.isComposing&&this.typeAheadSelect()),t={8:n=>this.maybeDeleteValue(),9:n=>this.onTab(),27:n=>this.onEscape(),38:n=>(n.preventDefault(),this.typeAheadUp()),40:n=>(n.preventDefault(),this.typeAheadDown())};this.selectOnKeyCodes.forEach(n=>t[n]=e);const i=this.mapKeydown(t,this);if(typeof i[s.keyCode]=="function")return i[s.keyCode](s)}}},Gm=["dir"],$m=["id","aria-expanded","aria-owns"],Um={ref:"selectedOptions",class:"vs__selected-options"},Km=["disabled","title","aria-label","onClick"],qm={ref:"actions",class:"vs__actions"},Jm=["disabled"],Xm={class:"vs__spinner"},Zm=["id"],Qm=["id","aria-selected","onMouseover","onClick"],eg={key:0,class:"vs__no-options"},tg=d.createTextVNode(" Sorry, no matching options. "),ig=["id"];function sg(s,e,t,i,n,r){const a=d.resolveDirective("append-to-body");return d.openBlock(),d.createElementBlock("div",{dir:t.dir,class:d.normalizeClass(["v-select",r.stateClasses])},[d.renderSlot(s.$slots,"header",d.normalizeProps(d.guardReactiveProps(r.scope.header))),d.createElementVNode("div",{id:`vs${t.uid}__combobox`,ref:"toggle",class:"vs__dropdown-toggle",role:"combobox","aria-expanded":r.dropdownOpen.toString(),"aria-owns":`vs${t.uid}__listbox`,"aria-label":"Search for option",onMousedown:e[1]||(e[1]=o=>r.toggleDropdown(o))},[d.createElementVNode("div",Um,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.selectedValue,(o,l)=>d.renderSlot(s.$slots,"selected-option-container",{option:r.normalizeOptionForSlot(o),deselect:r.deselect,multiple:t.multiple,disabled:t.disabled},()=>[(d.openBlock(),d.createElementBlock("span",{key:t.getOptionKey(o),class:"vs__selected"},[d.renderSlot(s.$slots,"selected-option",d.normalizeProps(d.guardReactiveProps(r.normalizeOptionForSlot(o))),()=>[d.createTextVNode(d.toDisplayString(t.getOptionLabel(o)),1)]),t.multiple?(d.openBlock(),d.createElementBlock("button",{key:0,ref_for:!0,ref:u=>n.deselectButtons[l]=u,disabled:t.disabled,type:"button",class:"vs__deselect",title:`Deselect ${t.getOptionLabel(o)}`,"aria-label":`Deselect ${t.getOptionLabel(o)}`,onClick:u=>r.deselect(o)},[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(r.childComponents.Deselect)))],8,Km)):d.createCommentVNode("",!0)]))])),256)),d.renderSlot(s.$slots,"search",d.normalizeProps(d.guardReactiveProps(r.scope.search)),()=>[d.createElementVNode("input",d.mergeProps({class:"vs__search"},r.scope.search.attributes,d.toHandlers(r.scope.search.events)),null,16)])],512),d.createElementVNode("div",qm,[d.withDirectives(d.createElementVNode("button",{ref:"clearButton",disabled:t.disabled,type:"button",class:"vs__clear",title:"Clear Selected","aria-label":"Clear Selected",onClick:e[0]||(e[0]=(...o)=>r.clearSelection&&r.clearSelection(...o))},[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(r.childComponents.Deselect)))],8,Jm),[[d.vShow,r.showClearButton]]),d.renderSlot(s.$slots,"open-indicator",d.normalizeProps(d.guardReactiveProps(r.scope.openIndicator)),()=>[t.noDrop?d.createCommentVNode("",!0):(d.openBlock(),d.createBlock(d.resolveDynamicComponent(r.childComponents.OpenIndicator),d.normalizeProps(d.mergeProps({key:0},r.scope.openIndicator.attributes)),null,16))]),d.renderSlot(s.$slots,"spinner",d.normalizeProps(d.guardReactiveProps(r.scope.spinner)),()=>[d.withDirectives(d.createElementVNode("div",Xm,"Loading...",512),[[d.vShow,s.mutableLoading]])])],512)],40,$m),d.createVNode(d.Transition,{name:t.transition},{default:d.withCtx(()=>[r.dropdownOpen?d.withDirectives((d.openBlock(),d.createElementBlock("ul",{id:`vs${t.uid}__listbox`,ref:"dropdownMenu",key:`vs${t.uid}__listbox`,class:"vs__dropdown-menu",role:"listbox",tabindex:"-1",onMousedown:e[2]||(e[2]=d.withModifiers((...o)=>r.onMousedown&&r.onMousedown(...o),["prevent"])),onMouseup:e[3]||(e[3]=(...o)=>r.onMouseUp&&r.onMouseUp(...o))},[d.renderSlot(s.$slots,"list-header",d.normalizeProps(d.guardReactiveProps(r.scope.listHeader))),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.filteredOptions,(o,l)=>(d.openBlock(),d.createElementBlock("li",{id:`vs${t.uid}__option-${l}`,key:t.getOptionKey(o),role:"option",class:d.normalizeClass(["vs__dropdown-option",{"vs__dropdown-option--deselect":r.isOptionDeselectable(o)&&l===s.typeAheadPointer,"vs__dropdown-option--selected":r.isOptionSelected(o),"vs__dropdown-option--highlight":l===s.typeAheadPointer,"vs__dropdown-option--disabled":!t.selectable(o)}]),"aria-selected":l===s.typeAheadPointer?!0:null,onMouseover:u=>t.selectable(o)?s.typeAheadPointer=l:null,onClick:d.withModifiers(u=>t.selectable(o)?r.select(o):null,["prevent","stop"])},[d.renderSlot(s.$slots,"option",d.normalizeProps(d.guardReactiveProps(r.normalizeOptionForSlot(o))),()=>[d.createTextVNode(d.toDisplayString(t.getOptionLabel(o)),1)])],42,Qm))),128)),r.filteredOptions.length===0?(d.openBlock(),d.createElementBlock("li",eg,[d.renderSlot(s.$slots,"no-options",d.normalizeProps(d.guardReactiveProps(r.scope.noOptions)),()=>[tg])])):d.createCommentVNode("",!0),d.renderSlot(s.$slots,"list-footer",d.normalizeProps(d.guardReactiveProps(r.scope.listFooter)))],40,Zm)),[[a]]):(d.openBlock(),d.createElementBlock("ul",{key:1,id:`vs${t.uid}__listbox`,role:"listbox",style:{display:"none",visibility:"hidden"}},null,8,ig))]),_:3},8,["name"]),d.renderSlot(s.$slots,"footer",d.normalizeProps(d.guardReactiveProps(r.scope.footer)))],10,Gm)}const ng=Vn(Ym,[["render",sg]]);var rt="top",yt="bottom",wt="right",at="left",jn="auto",qi=[rt,yt,wt,at],ki="start",Ji="end",rg="clippingParents",va="viewport",Xi="popper",ag="reference",ya=qi.reduce(function(s,e){return s.concat([e+"-"+ki,e+"-"+Ji])},[]),wa=[].concat(qi,[jn]).reduce(function(s,e){return s.concat([e,e+"-"+ki,e+"-"+Ji])},[]),og="beforeRead",lg="read",ug="afterRead",hg="beforeMain",dg="main",cg="afterMain",fg="beforeWrite",pg="write",mg="afterWrite",gg=[og,lg,ug,hg,dg,cg,fg,pg,mg];function Lt(s){return s?(s.nodeName||"").toLowerCase():null}function dt(s){if(s==null)return window;if(s.toString()!=="[object Window]"){var e=s.ownerDocument;return e&&e.defaultView||window}return s}function ni(s){var e=dt(s).Element;return s instanceof e||s instanceof Element}function Ct(s){var e=dt(s).HTMLElement;return s instanceof e||s instanceof HTMLElement}function Wn(s){if(typeof ShadowRoot>"u")return!1;var e=dt(s).ShadowRoot;return s instanceof e||s instanceof ShadowRoot}function bg(s){var e=s.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];!Ct(r)||!Lt(r)||(Object.assign(r.style,i),Object.keys(n).forEach(function(a){var o=n[a];o===!1?r.removeAttribute(a):r.setAttribute(a,o===!0?"":o)}))})}function vg(s){var e=s.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(i){var n=e.elements[i],r=e.attributes[i]||{},a=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:t[i]),o=a.reduce(function(l,u){return l[u]="",l},{});!Ct(n)||!Lt(n)||(Object.assign(n.style,o),Object.keys(r).forEach(function(l){n.removeAttribute(l)}))})}}const yg={name:"applyStyles",enabled:!0,phase:"write",fn:bg,effect:vg,requires:["computeStyles"]};function Pt(s){return s.split("-")[0]}var ri=Math.max,Is=Math.min,xi=Math.round;function Yn(){var s=navigator.userAgentData;return s!=null&&s.brands&&Array.isArray(s.brands)?s.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Ca(){return!/^((?!chrome|android).)*safari/i.test(Yn())}function Mi(s,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var i=s.getBoundingClientRect(),n=1,r=1;e&&Ct(s)&&(n=s.offsetWidth>0&&xi(i.width)/s.offsetWidth||1,r=s.offsetHeight>0&&xi(i.height)/s.offsetHeight||1);var a=ni(s)?dt(s):window,o=a.visualViewport,l=!Ca()&&t,u=(i.left+(l&&o?o.offsetLeft:0))/n,h=(i.top+(l&&o?o.offsetTop:0))/r,m=i.width/n,v=i.height/r;return{width:m,height:v,top:h,right:u+m,bottom:h+v,left:u,x:u,y:h}}function Gn(s){var e=Mi(s),t=s.offsetWidth,i=s.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:s.offsetLeft,y:s.offsetTop,width:t,height:i}}function Ea(s,e){var t=e.getRootNode&&e.getRootNode();if(s.contains(e))return!0;if(t&&Wn(t)){var i=e;do{if(i&&s.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Yt(s){return dt(s).getComputedStyle(s)}function wg(s){return["table","td","th"].indexOf(Lt(s))>=0}function qt(s){return((ni(s)?s.ownerDocument:s.document)||window.document).documentElement}function Vs(s){return Lt(s)==="html"?s:s.assignedSlot||s.parentNode||(Wn(s)?s.host:null)||qt(s)}function ka(s){return!Ct(s)||Yt(s).position==="fixed"?null:s.offsetParent}function Cg(s){var e=/firefox/i.test(Yn()),t=/Trident/i.test(Yn());if(t&&Ct(s)){var i=Yt(s);if(i.position==="fixed")return null}var n=Vs(s);for(Wn(n)&&(n=n.host);Ct(n)&&["html","body"].indexOf(Lt(n))<0;){var r=Yt(n);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return n;n=n.parentNode}return null}function Zi(s){for(var e=dt(s),t=ka(s);t&&wg(t)&&Yt(t).position==="static";)t=ka(t);return t&&(Lt(t)==="html"||Lt(t)==="body"&&Yt(t).position==="static")?e:t||Cg(s)||e}function $n(s){return["top","bottom"].indexOf(s)>=0?"x":"y"}function Qi(s,e,t){return ri(s,Is(e,t))}function Eg(s,e,t){var i=Qi(s,e,t);return i>t?t:i}function xa(){return{top:0,right:0,bottom:0,left:0}}function Ma(s){return Object.assign({},xa(),s)}function Sa(s,e){return e.reduce(function(t,i){return t[i]=s,t},{})}var kg=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Ma(typeof e!="number"?e:Sa(e,qi))};function xg(s){var e,t=s.state,i=s.name,n=s.options,r=t.elements.arrow,a=t.modifiersData.popperOffsets,o=Pt(t.placement),l=$n(o),u=[at,wt].indexOf(o)>=0,h=u?"height":"width";if(!(!r||!a)){var m=kg(n.padding,t),v=Gn(r),C=l==="y"?rt:at,F=l==="y"?yt:wt,x=t.rects.reference[h]+t.rects.reference[l]-a[l]-t.rects.popper[h],R=a[l]-t.rects.reference[l],M=Zi(r),k=M?l==="y"?M.clientHeight||0:M.clientWidth||0:0,_=x/2-R/2,p=m[C],w=k-v[h]-m[F],c=k/2-v[h]/2+_,y=Qi(p,c,w),g=l;t.modifiersData[i]=(e={},e[g]=y,e.centerOffset=y-c,e)}}function Mg(s){var e=s.state,t=s.options,i=t.element,n=i===void 0?"[data-popper-arrow]":i;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||Ea(e.elements.popper,n)&&(e.elements.arrow=n))}const Sg={name:"arrow",enabled:!0,phase:"main",fn:xg,effect:Mg,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Si(s){return s.split("-")[1]}var Rg={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Dg(s,e){var t=s.x,i=s.y,n=e.devicePixelRatio||1;return{x:xi(t*n)/n||0,y:xi(i*n)/n||0}}function Ra(s){var e,t=s.popper,i=s.popperRect,n=s.placement,r=s.variation,a=s.offsets,o=s.position,l=s.gpuAcceleration,u=s.adaptive,h=s.roundOffsets,m=s.isFixed,v=a.x,C=v===void 0?0:v,F=a.y,x=F===void 0?0:F,R=typeof h=="function"?h({x:C,y:x}):{x:C,y:x};C=R.x,x=R.y;var M=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),_=at,p=rt,w=window;if(u){var c=Zi(t),y="clientHeight",g="clientWidth";if(c===dt(t)&&(c=qt(t),Yt(c).position!=="static"&&o==="absolute"&&(y="scrollHeight",g="scrollWidth")),c=c,n===rt||(n===at||n===wt)&&r===Ji){p=yt;var b=m&&c===w&&w.visualViewport?w.visualViewport.height:c[y];x-=b-i.height,x*=l?1:-1}if(n===at||(n===rt||n===yt)&&r===Ji){_=wt;var f=m&&c===w&&w.visualViewport?w.visualViewport.width:c[g];C-=f-i.width,C*=l?1:-1}}var E=Object.assign({position:o},u&&Rg),S=h===!0?Dg({x:C,y:x},dt(t)):{x:C,y:x};if(C=S.x,x=S.y,l){var D;return Object.assign({},E,(D={},D[p]=k?"0":"",D[_]=M?"0":"",D.transform=(w.devicePixelRatio||1)<=1?"translate("+C+"px, "+x+"px)":"translate3d("+C+"px, "+x+"px, 0)",D))}return Object.assign({},E,(e={},e[p]=k?x+"px":"",e[_]=M?C+"px":"",e.transform="",e))}function Tg(s){var e=s.state,t=s.options,i=t.gpuAcceleration,n=i===void 0?!0:i,r=t.adaptive,a=r===void 0?!0:r,o=t.roundOffsets,l=o===void 0?!0:o,u={placement:Pt(e.placement),variation:Si(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Ra(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Ra(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const _g={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Tg,data:{}};var js={passive:!0};function Og(s){var e=s.state,t=s.instance,i=s.options,n=i.scroll,r=n===void 0?!0:n,a=i.resize,o=a===void 0?!0:a,l=dt(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&u.forEach(function(h){h.addEventListener("scroll",t.update,js)}),o&&l.addEventListener("resize",t.update,js),function(){r&&u.forEach(function(h){h.removeEventListener("scroll",t.update,js)}),o&&l.removeEventListener("resize",t.update,js)}}const Lg={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Og,data:{}};var Pg={left:"right",right:"left",bottom:"top",top:"bottom"};function Ws(s){return s.replace(/left|right|bottom|top/g,function(e){return Pg[e]})}var Fg={start:"end",end:"start"};function Da(s){return s.replace(/start|end/g,function(e){return Fg[e]})}function Un(s){var e=dt(s),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function Kn(s){return Mi(qt(s)).left+Un(s).scrollLeft}function Ag(s,e){var t=dt(s),i=qt(s),n=t.visualViewport,r=i.clientWidth,a=i.clientHeight,o=0,l=0;if(n){r=n.width,a=n.height;var u=Ca();(u||!u&&e==="fixed")&&(o=n.offsetLeft,l=n.offsetTop)}return{width:r,height:a,x:o+Kn(s),y:l}}function Hg(s){var e,t=qt(s),i=Un(s),n=(e=s.ownerDocument)==null?void 0:e.body,r=ri(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),a=ri(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),o=-i.scrollLeft+Kn(s),l=-i.scrollTop;return Yt(n||t).direction==="rtl"&&(o+=ri(t.clientWidth,n?n.clientWidth:0)-r),{width:r,height:a,x:o,y:l}}function qn(s){var e=Yt(s),t=e.overflow,i=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+n+i)}function Ta(s){return["html","body","#document"].indexOf(Lt(s))>=0?s.ownerDocument.body:Ct(s)&&qn(s)?s:Ta(Vs(s))}function es(s,e){var t;e===void 0&&(e=[]);var i=Ta(s),n=i===((t=s.ownerDocument)==null?void 0:t.body),r=dt(i),a=n?[r].concat(r.visualViewport||[],qn(i)?i:[]):i,o=e.concat(a);return n?o:o.concat(es(Vs(a)))}function Jn(s){return Object.assign({},s,{left:s.x,top:s.y,right:s.x+s.width,bottom:s.y+s.height})}function zg(s,e){var t=Mi(s,!1,e==="fixed");return t.top=t.top+s.clientTop,t.left=t.left+s.clientLeft,t.bottom=t.top+s.clientHeight,t.right=t.left+s.clientWidth,t.width=s.clientWidth,t.height=s.clientHeight,t.x=t.left,t.y=t.top,t}function _a(s,e,t){return e===va?Jn(Ag(s,t)):ni(e)?zg(e,t):Jn(Hg(qt(s)))}function Bg(s){var e=es(Vs(s)),t=["absolute","fixed"].indexOf(Yt(s).position)>=0,i=t&&Ct(s)?Zi(s):s;return ni(i)?e.filter(function(n){return ni(n)&&Ea(n,i)&&Lt(n)!=="body"}):[]}function Ng(s,e,t,i){var n=e==="clippingParents"?Bg(s):[].concat(e),r=[].concat(n,[t]),a=r[0],o=r.reduce(function(l,u){var h=_a(s,u,i);return l.top=ri(h.top,l.top),l.right=Is(h.right,l.right),l.bottom=Is(h.bottom,l.bottom),l.left=ri(h.left,l.left),l},_a(s,a,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function Oa(s){var e=s.reference,t=s.element,i=s.placement,n=i?Pt(i):null,r=i?Si(i):null,a=e.x+e.width/2-t.width/2,o=e.y+e.height/2-t.height/2,l;switch(n){case rt:l={x:a,y:e.y-t.height};break;case yt:l={x:a,y:e.y+e.height};break;case wt:l={x:e.x+e.width,y:o};break;case at:l={x:e.x-t.width,y:o};break;default:l={x:e.x,y:e.y}}var u=n?$n(n):null;if(u!=null){var h=u==="y"?"height":"width";switch(r){case ki:l[u]=l[u]-(e[h]/2-t[h]/2);break;case Ji:l[u]=l[u]+(e[h]/2-t[h]/2);break}}return l}function ts(s,e){e===void 0&&(e={});var t=e,i=t.placement,n=i===void 0?s.placement:i,r=t.strategy,a=r===void 0?s.strategy:r,o=t.boundary,l=o===void 0?rg:o,u=t.rootBoundary,h=u===void 0?va:u,m=t.elementContext,v=m===void 0?Xi:m,C=t.altBoundary,F=C===void 0?!1:C,x=t.padding,R=x===void 0?0:x,M=Ma(typeof R!="number"?R:Sa(R,qi)),k=v===Xi?ag:Xi,_=s.rects.popper,p=s.elements[F?k:v],w=Ng(ni(p)?p:p.contextElement||qt(s.elements.popper),l,h,a),c=Mi(s.elements.reference),y=Oa({reference:c,element:_,placement:n}),g=Jn(Object.assign({},_,y)),b=v===Xi?g:c,f={top:w.top-b.top+M.top,bottom:b.bottom-w.bottom+M.bottom,left:w.left-b.left+M.left,right:b.right-w.right+M.right},E=s.modifiersData.offset;if(v===Xi&&E){var S=E[n];Object.keys(f).forEach(function(D){var A=[wt,yt].indexOf(D)>=0?1:-1,N=[rt,yt].indexOf(D)>=0?"y":"x";f[D]+=S[N]*A})}return f}function Ig(s,e){e===void 0&&(e={});var t=e,i=t.placement,n=t.boundary,r=t.rootBoundary,a=t.padding,o=t.flipVariations,l=t.allowedAutoPlacements,u=l===void 0?wa:l,h=Si(i),m=h?o?ya:ya.filter(function(F){return Si(F)===h}):qi,v=m.filter(function(F){return u.indexOf(F)>=0});v.length===0&&(v=m);var C=v.reduce(function(F,x){return F[x]=ts(s,{placement:x,boundary:n,rootBoundary:r,padding:a})[Pt(x)],F},{});return Object.keys(C).sort(function(F,x){return C[F]-C[x]})}function Vg(s){if(Pt(s)===jn)return[];var e=Ws(s);return[Da(s),e,Da(e)]}function jg(s){var e=s.state,t=s.options,i=s.name;if(!e.modifiersData[i]._skip){for(var n=t.mainAxis,r=n===void 0?!0:n,a=t.altAxis,o=a===void 0?!0:a,l=t.fallbackPlacements,u=t.padding,h=t.boundary,m=t.rootBoundary,v=t.altBoundary,C=t.flipVariations,F=C===void 0?!0:C,x=t.allowedAutoPlacements,R=e.options.placement,M=Pt(R),k=M===R,_=l||(k||!F?[Ws(R)]:Vg(R)),p=[R].concat(_).reduce(function(U,K){return U.concat(Pt(K)===jn?Ig(e,{placement:K,boundary:h,rootBoundary:m,padding:u,flipVariations:F,allowedAutoPlacements:x}):K)},[]),w=e.rects.reference,c=e.rects.popper,y=new Map,g=!0,b=p[0],f=0;f<p.length;f++){var E=p[f],S=Pt(E),D=Si(E)===ki,A=[rt,yt].indexOf(S)>=0,N=A?"width":"height",V=ts(e,{placement:E,boundary:h,rootBoundary:m,altBoundary:v,padding:u}),B=A?D?wt:at:D?yt:rt;w[N]>c[N]&&(B=Ws(B));var j=Ws(B),$=[];if(r&&$.push(V[S]<=0),o&&$.push(V[B]<=0,V[j]<=0),$.every(function(U){return U})){b=E,g=!1;break}y.set(E,$)}if(g)for(var T=F?3:1,P=function(K){var Q=p.find(function(ie){var Y=y.get(ie);if(Y)return Y.slice(0,K).every(function(H){return H})});if(Q)return b=Q,"break"},W=T;W>0;W--){var z=P(W);if(z==="break")break}e.placement!==b&&(e.modifiersData[i]._skip=!0,e.placement=b,e.reset=!0)}}const Wg={name:"flip",enabled:!0,phase:"main",fn:jg,requiresIfExists:["offset"],data:{_skip:!1}};function La(s,e,t){return t===void 0&&(t={x:0,y:0}),{top:s.top-e.height-t.y,right:s.right-e.width+t.x,bottom:s.bottom-e.height+t.y,left:s.left-e.width-t.x}}function Pa(s){return[rt,wt,yt,at].some(function(e){return s[e]>=0})}function Yg(s){var e=s.state,t=s.name,i=e.rects.reference,n=e.rects.popper,r=e.modifiersData.preventOverflow,a=ts(e,{elementContext:"reference"}),o=ts(e,{altBoundary:!0}),l=La(a,i),u=La(o,n,r),h=Pa(l),m=Pa(u);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:m},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":m})}const Gg={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Yg};function $g(s,e,t){var i=Pt(s),n=[at,rt].indexOf(i)>=0?-1:1,r=typeof t=="function"?t(Object.assign({},e,{placement:s})):t,a=r[0],o=r[1];return a=a||0,o=(o||0)*n,[at,wt].indexOf(i)>=0?{x:o,y:a}:{x:a,y:o}}function Ug(s){var e=s.state,t=s.options,i=s.name,n=t.offset,r=n===void 0?[0,0]:n,a=wa.reduce(function(h,m){return h[m]=$g(m,e.rects,r),h},{}),o=a[e.placement],l=o.x,u=o.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[i]=a}const Kg={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ug};function qg(s){var e=s.state,t=s.name;e.modifiersData[t]=Oa({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const Jg={name:"popperOffsets",enabled:!0,phase:"read",fn:qg,data:{}};function Xg(s){return s==="x"?"y":"x"}function Zg(s){var e=s.state,t=s.options,i=s.name,n=t.mainAxis,r=n===void 0?!0:n,a=t.altAxis,o=a===void 0?!1:a,l=t.boundary,u=t.rootBoundary,h=t.altBoundary,m=t.padding,v=t.tether,C=v===void 0?!0:v,F=t.tetherOffset,x=F===void 0?0:F,R=ts(e,{boundary:l,rootBoundary:u,padding:m,altBoundary:h}),M=Pt(e.placement),k=Si(e.placement),_=!k,p=$n(M),w=Xg(p),c=e.modifiersData.popperOffsets,y=e.rects.reference,g=e.rects.popper,b=typeof x=="function"?x(Object.assign({},e.rects,{placement:e.placement})):x,f=typeof b=="number"?{mainAxis:b,altAxis:b}:Object.assign({mainAxis:0,altAxis:0},b),E=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,S={x:0,y:0};if(c){if(r){var D,A=p==="y"?rt:at,N=p==="y"?yt:wt,V=p==="y"?"height":"width",B=c[p],j=B+R[A],$=B-R[N],T=C?-g[V]/2:0,P=k===ki?y[V]:g[V],W=k===ki?-g[V]:-y[V],z=e.elements.arrow,U=C&&z?Gn(z):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:xa(),Q=K[A],ie=K[N],Y=Qi(0,y[V],U[V]),H=_?y[V]/2-T-Y-Q-f.mainAxis:P-Y-Q-f.mainAxis,ee=_?-y[V]/2+T+Y+ie+f.mainAxis:W+Y+ie+f.mainAxis,X=e.elements.arrow&&Zi(e.elements.arrow),q=X?p==="y"?X.clientTop||0:X.clientLeft||0:0,oe=(D=E?.[p])!=null?D:0,ne=B+H-oe-q,me=B+ee-oe,be=Qi(C?Is(j,ne):j,B,C?ri($,me):$);c[p]=be,S[p]=be-B}if(o){var xe,je=p==="x"?rt:at,Le=p==="x"?yt:wt,Ne=c[w],se=w==="y"?"height":"width",G=Ne+R[je],Z=Ne-R[Le],re=[rt,at].indexOf(M)!==-1,te=(xe=E?.[w])!=null?xe:0,pe=re?G:Ne-y[se]-g[se]-te+f.altAxis,Me=re?Ne+y[se]+g[se]-te-f.altAxis:Z,ve=C&&re?Eg(pe,Ne,Me):Qi(C?pe:G,Ne,C?Me:Z);c[w]=ve,S[w]=ve-Ne}e.modifiersData[i]=S}}const Qg={name:"preventOverflow",enabled:!0,phase:"main",fn:Zg,requiresIfExists:["offset"]};function eb(s){return{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}}function tb(s){return s===dt(s)||!Ct(s)?Un(s):eb(s)}function ib(s){var e=s.getBoundingClientRect(),t=xi(e.width)/s.offsetWidth||1,i=xi(e.height)/s.offsetHeight||1;return t!==1||i!==1}function sb(s,e,t){t===void 0&&(t=!1);var i=Ct(e),n=Ct(e)&&ib(e),r=qt(e),a=Mi(s,n,t),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&((Lt(e)!=="body"||qn(r))&&(o=tb(e)),Ct(e)?(l=Mi(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):r&&(l.x=Kn(r))),{x:a.left+o.scrollLeft-l.x,y:a.top+o.scrollTop-l.y,width:a.width,height:a.height}}function nb(s){var e=new Map,t=new Set,i=[];s.forEach(function(r){e.set(r.name,r)});function n(r){t.add(r.name);var a=[].concat(r.requires||[],r.requiresIfExists||[]);a.forEach(function(o){if(!t.has(o)){var l=e.get(o);l&&n(l)}}),i.push(r)}return s.forEach(function(r){t.has(r.name)||n(r)}),i}function rb(s){var e=nb(s);return gg.reduce(function(t,i){return t.concat(e.filter(function(n){return n.phase===i}))},[])}function ab(s){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(s())})})),e}}function ob(s){var e=s.reduce(function(t,i){var n=t[i.name];return t[i.name]=n?Object.assign({},n,i,{options:Object.assign({},n.options,i.options),data:Object.assign({},n.data,i.data)}):i,t},{});return Object.keys(e).map(function(t){return e[t]})}var Fa={placement:"bottom",modifiers:[],strategy:"absolute"};function Aa(){for(var s=arguments.length,e=new Array(s),t=0;t<s;t++)e[t]=arguments[t];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function lb(s){s===void 0&&(s={});var e=s,t=e.defaultModifiers,i=t===void 0?[]:t,n=e.defaultOptions,r=n===void 0?Fa:n;return function(o,l,u){u===void 0&&(u=r);var h={placement:"bottom",orderedModifiers:[],options:Object.assign({},Fa,r),modifiersData:{},elements:{reference:o,popper:l},attributes:{},styles:{}},m=[],v=!1,C={state:h,setOptions:function(M){var k=typeof M=="function"?M(h.options):M;x(),h.options=Object.assign({},r,h.options,k),h.scrollParents={reference:ni(o)?es(o):o.contextElement?es(o.contextElement):[],popper:es(l)};var _=rb(ob([].concat(i,h.options.modifiers)));return h.orderedModifiers=_.filter(function(p){return p.enabled}),F(),C.update()},forceUpdate:function(){if(!v){var M=h.elements,k=M.reference,_=M.popper;if(Aa(k,_)){h.rects={reference:sb(k,Zi(_),h.options.strategy==="fixed"),popper:Gn(_)},h.reset=!1,h.placement=h.options.placement,h.orderedModifiers.forEach(function(f){return h.modifiersData[f.name]=Object.assign({},f.data)});for(var p=0;p<h.orderedModifiers.length;p++){if(h.reset===!0){h.reset=!1,p=-1;continue}var w=h.orderedModifiers[p],c=w.fn,y=w.options,g=y===void 0?{}:y,b=w.name;typeof c=="function"&&(h=c({state:h,options:g,name:b,instance:C})||h)}}}},update:ab(function(){return new Promise(function(R){C.forceUpdate(),R(h)})}),destroy:function(){x(),v=!0}};if(!Aa(o,l))return C;C.setOptions(u).then(function(R){!v&&u.onFirstUpdate&&u.onFirstUpdate(R)});function F(){h.orderedModifiers.forEach(function(R){var M=R.name,k=R.options,_=k===void 0?{}:k,p=R.effect;if(typeof p=="function"){var w=p({state:h,name:M,instance:C,options:_}),c=function(){};m.push(w||c)}})}function x(){m.forEach(function(R){return R()}),m=[]}return C}}var ub=[Lg,Jg,_g,yg,Kg,Wg,Qg,Sg,Gg],hb=lb({defaultModifiers:ub});function db(s,e,{width:t}){s.style.width=t;const i=hb(e.$refs.toggle,s,{placement:e.$attrs.placement,modifiers:[{name:"offset",options:{offset:[0,-1]}},{name:"toggleClass",enabled:!0,phase:"write",fn({state:n}){e.$el.classList.toggle("drop-up",n.placement==="top")}}]});return()=>i.destroy()}const cb={class:"text-muted"},fb={key:0,class:"py-1"},pb={class:"text-wrap"},mb=["innerHTML"],gb={key:1,class:"text-muted p-0"},bb={class:"text-wrap"},vb={key:2,class:"text-muted p-0 small d-flex justify-content-center"},yb={class:"text-wrap px-2"},wb={class:"selected"},Cb=["innerHTML"],Eb={key:0,style:{"border-left-color":"rgba(88, 151, 251, 0.71)"},class:"vs__spinner"},kb={__name:"VSelect",props:{modelValue:[String,Object,Number],reduce:{type:Function,default:s=>s.id},hint:{type:String,default:""},classes:{type:Array,default:()=>[]},options:{type:Array,default:()=>[]},title:{type:String},disabled:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},multiple:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},allowClear:{type:Boolean,default:!0},searchTimout:{type:Number,default:1e3},dropDownPlacement:{type:String,default:"bottom",validator(s,e){return["bottom","top"].includes(s)}},error:{type:[Array,String],default:null}},emits:["update:modelValue","search","blur","focus"],setup(s,{emit:e}){const t=e,i=s,n=i.multiple?[]:null;d.getCurrentInstance();const r=d.ref(n),a=Xh(l,i.searchTimout),o=d.computed(()=>{const m=Zh(i.options);return m?m.map(v=>{const C=i.modelValue;return C?{...v,disabled:v.id===C}:v}):[]});function l(m){t("search",m)}const u=m=>!(!m.id||m.disabled),h=d.computed(()=>Array.isArray(i.error)?i.error?.filter(Boolean):typeof i.error=="string"&&i.error?[i.error]:[]);return d.watch(()=>i.modelValue,m=>{r.value=i.modelValue},{deep:!0}),d.watch(()=>r.value,m=>{t("update:modelValue",m)},{deep:!0}),d.onMounted(()=>{r.value=i.modelValue}),(m,v)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[s.title?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(m.titleClass)},d.toDisplayString(s.title),3)):d.createCommentVNode("",!0),d.createVNode(d.unref(ng),d.mergeProps({class:"style-chooser"},m.$attrs,{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=C=>r.value=C),reduce:s.reduce,options:o.value,multiple:s.multiple,placeholder:s.placeholder,disabled:s.disabled,loading:s.isLoading,clearable:s.allowClear,placement:s.dropDownPlacement,appendToBody:s.dropDownPlacement==="top","calculate-position":d.unref(db),selectable:C=>u(C),"onSearch:blur":v[1]||(v[1]=C=>t("blur")),"onSearch:focus":v[2]||(v[2]=C=>t("focus")),onSearch:d.unref(a),class:[...s.classes,s.error?"not-valid":""]}),{"no-options":d.withCtx(({search:C,searching:F,loading:x})=>[d.createElementVNode("span",cb,d.toDisplayString(s.hint),1)]),option:d.withCtx(({label:C,html:F,id:x,disabled:R})=>[x?(d.openBlock(),d.createElementBlock("div",fb,[d.createElementVNode("div",pb,d.toDisplayString(C),1),F?(d.openBlock(),d.createElementBlock("div",{key:0,innerHTML:F},null,8,mb)):d.createCommentVNode("",!0)])):R?(d.openBlock(),d.createElementBlock("div",gb,[d.createElementVNode("div",bb,d.toDisplayString(C)+"disabled",1)])):(d.openBlock(),d.createElementBlock("div",vb,[v[3]||(v[3]=d.createElementVNode("span",null,"-",-1)),d.createElementVNode("span",yb,d.toDisplayString(C),1),v[4]||(v[4]=d.createElementVNode("span",null,"-",-1))]))]),"selected-option":d.withCtx(({label:C,html:F})=>[d.createElementVNode("div",wb,[d.createElementVNode("div",null,d.toDisplayString(C),1),F?(d.openBlock(),d.createElementBlock("div",{key:0,innerHTML:F},null,8,Cb)):d.createCommentVNode("",!0)])]),spinner:d.withCtx(({loading:C})=>[C?(d.openBlock(),d.createElementBlock("div",Eb)):d.createCommentVNode("",!0)]),_:1},16,["modelValue","reduce","options","multiple","placeholder","disabled","loading","clearable","placement","appendToBody","calculate-position","selectable","onSearch","class"]),d.createVNode(Ii,{errors:h.value},null,8,["errors"])],64))}},xb={key:0,class:"bi bi-chevron-up"},Mb={key:1,class:"bi bi-chevron-down"},Sb=it({__name:"SubFilterToggleBtn",props:["modelValue"],emits:["update:modelValue"],setup(s,{emit:e}){const t=e,i=s,n=()=>{t("update:modelValue",!i.modelValue)};return(r,a)=>(d.openBlock(),d.createElementBlock("div",{class:"icon",onClick:n},[s.modelValue?(d.openBlock(),d.createElementBlock("i",xb)):(d.openBlock(),d.createElementBlock("i",Mb))]))}},[["__scopeId","data-v-4810f2ed"]]),Ha={gender:{MALE:1,FEMALE:2,MIXED_GENDER:3,NOT_GENDER:4},address_fields:["postal_code","region_code","district_code","locality_code","sub_locality_code","street_code","house","flat"],userRoles:{ADMIN:1,VETERINARIAN:2,SHTP:3,LOCAL_EPIZOOTOLOGIST:4,ORGANIZATION_ADMIN:5,REGIONAL_REPRESENTATIVE:6,AGENCY:7,CENTRAL_WAREHOUSE:8,DISTRICT_REPRESENTATIVE:9,COUNTERPARTY:10,VETERINARIAN_REGISTRATOR:11,LABORATORY:12,INTEGRATOR:13},timeTypes:{HOUR:1,DAY:2,WEEK:3,MONTH:4,YEAR:5},defaultTableOptions:{headerSortClickElement:"icon",printAsHtml:!0,printConfig:{},reactiveData:!0,movableColumns:!0,layout:"fitDataFill",layoutColumnsOnNewData:!0,resizableColumnFit:!0,pagination:!0,paginationMode:"remote",paginationCounter:"rows",paginationSize:10,columns:[]},customPerPageOptions:[{id:10,label:10},{id:40,label:40},{id:100,label:100},{id:150,label:150},{id:200,label:200}],bird_ids:[19,20,21,22,23,24,25],fish_ids:[38,39,40,41,42],animal_kinds:{COW:1,PIG:2,HORSE:3,BEE:4,DOG:5,CAT:6,DEER:7,MARAL:8,CAMEL:9,DONKEY:10,BISON:11,GOST:12,SHEEP:13,MULE:14,LOSHAK:15,ZEBU:16,BUFFALO:17,GRUNTING_OX:18,CHICKEN:19,DUCK:20,GOOSE:21,TURKEY:22,GUINEA_FOWL:23,QUAIL:24,OSTRICH:25,FOX:26,SABLE:27,MINK:28,FERRET:29,RABBIT:30,ARCTIC_FOX:31,RACCOON_DOG:32,NUTRIA:33,ALPACAS:34,PHEASANT:35,PEACOCK:36,RACCOON:37,STURGEON:38,SALMON:39,CARP:40,CATFISH:41,BASS:42},mask_regex:{INTEGER:"^[0-9]*$",DECIMAL:"^[0-9]{1,10}[.]?[0-9]{1}$",HUNDREDTHS:"^([0]{1}[.][0-9]{1,2}|[1-9][0-9]*[.]?[0-9]{1,2})$",THOUSANDS:"^([0]{1}[.][0-9]{1,2}|[1-9][0-9]*[.]?[0-9]{1,3})$",NO_LIMIT_AFTER_DOT:"^[0-9]{1,10}[.]?[0-9]*$",ABOVE_ONE:"^[1-9]+[0-9]*$",NO_START_SPACE:"^[^ ]+.*$",NO_SPACE:"[^ ]*"}};Object.preventExtensions(Ha);const Rb={class:"position-relative",style:{"min-height":"300px"}},Db={key:0,class:"tabulator hide-to-print sticky-bottom bg-white"},Tb={class:"row"},_b={key:0,class:"col-auto"},Ob={class:"col"},Lb={class:"tabulator-footer",ref:"footer"},Pb=["id"],Fb=["disabled"],Ab={key:0,class:"spinner-border spinner-border-sm",role:"status","aria-hidden":"true"},Hb="",zb=d.defineComponent({__name:"Table",props:{langs:{type:Object,default:()=>({})},paginationPage:{type:Number,default:null},locale:{type:String,default:"ru"},columnHide:{type:String,default:""},columnShow:{type:String,default:""},options:{type:Object,default:()=>({})},filters:{type:[Array,Function,Object],default:()=>[]},tableData:{type:Array,default:()=>[]},showAllColumnsIfAllHidden:{type:Boolean,default:!1},parentComponent:{type:Object,default:()=>({})},selectedRowsStorage:{type:Array,default:()=>[]},isVisibleColumnSubFilter:{type:Boolean,default:null},loadMoreText:{type:String,default:"Load More"}},emits:["selectedRow","unselectedRow","updateSelectedRows","updateUnselectedRows","updateTable","onHideColumn","onShowColumn","onTableRowClick","onCellClick","onTableRowMoved","pageLoaded","savePaginationPage","updateIsVisibleColumnSubFilter"],setup(s,{emit:e}){const t=s,i=e,n=d.inject("selectedTabIndex",d.ref()),r=d.inject("selectAll",d.ref(0)),a=d.ref(""),o=d.ref(null),l=d.ref({data:[],rows:[]}),u=d.ref(new Set(t.selectedRowsStorage)),h=d.ref(!1),m=d.ref(td()),v=d.ref(null),C=d.ref(null),F=d.ref(!1),x=d.computed(()=>t.options?.paginationMode==="remote"),R=d.computed(()=>Ha.customPerPageOptions),M=d.useSlots(),k=H=>!!M[H],_=()=>{a.value=""},p=H=>!H||!H.length?[]:H.map(ee=>ee),w=()=>({}),c=()=>{if(!v.value)return;const H=v.value.querySelector(".tabulator-header");!H||t.isVisibleColumnSubFilter===null||ed(H,Sb,{modelValue:t.isVisibleColumnSubFilter,"onUpdate:modelValue":ee=>i("updateIsVisibleColumnSubFilter",ee)})},y=()=>{if(!v.value)return;const H=v.value.querySelector(".tabulator-header");H&&(H.classList.add("position-relative"),c())},g=()=>{if(!C.value)return;const H=v.value?.parentNode?.querySelector(".tabulator-footer"),ee=C.value.last_page;if(!ee||isNaN(+ee)){H&&H.classList.add("d-none");return}ee>1?H&&H.classList.remove("d-none"):H&&H.classList.add("d-none")},b=()=>{F.value=!0},f=()=>{F.value=!1},E=()=>{F.value=!1},S=()=>{h.value=!0,i("updateTable",C.value),C.value&&(C.value.setLocale(t.locale),C.value.selectRow(Array.from(u.value)))},D=H=>{setTimeout(()=>{i("savePaginationPage",H)}),x.value&&g(),r.value>0&&i("pageLoaded"),F.value=!1,y()},A=H=>{const ee=H.getData(),X=C.value?.options?.index||"id",q=ee[X]??null;q!==null&&(u.value.add(q),l.value.data.push(ee),l.value.rows.push(H),i("updateSelectedRows",{data:l.value.data,row:l.value.rows}),i("selectedRow",{data:ee,row:H}))},N=H=>{const ee=H.getData(),X=C.value?.options?.index||"id",q=ee[X]??null;if(q===null)return;u.value.delete(q);const oe=l.value.data.findIndex(ne=>ne[X]===q);oe!==-1&&(l.value.data.splice(oe,1),l.value.rows.splice(oe,1)),i("updateUnselectedRows",{data:ee,row:H}),i("unselectedRow",{data:ee,row:H})},V=function(){C.value&&C.value.selectRow(Array.from(u.value)),F.value=!0},B=(H,ee)=>{if(ee?._cell?.column?.definition?.hasCellClickHandler){i("onCellClick",H,ee);return}const X=[],q=H.target;for(let oe=0;oe<q.childNodes.length;oe++){const ne=q.childNodes[oe];ne.nodeName==="INPUT"&&ne.type==="checkbox"&&X.push("checkbox")}X.includes("checkbox")||i("onTableRowClick",H,ee._cell.row,t.parentComponent)},j=H=>{C.value&&i("onTableRowMoved",C.value.getColumnLayout())},$=()=>{setTimeout(()=>{F.value=!0})},T=()=>{setTimeout(()=>{F.value=!1,Y()})},P=()=>{h.value=!1},W=()=>{if(!v.value)return;F.value=!0;const H={...t.options,data:t.tableData,langs:t.langs||w(),columns:p(t.options.columns),dataLoaderLoading:`<img alt="" src="${Hb}">`,placeholder:"Ничего не найдено",ajaxResponse:function(ee,X,q){return this.last_page=q.last_page,q.data}};x.value&&(H.footerElement=`#tabulator-footer${m.value}`),C.value=new ym(v.value,H),C.value.on("dataLoading",b),C.value.on("dataLoaded",f),C.value.on("dataLoadError",E),C.value.on("tableBuilt",S),C.value.on("pageLoaded",D),C.value.on("rowSelected",A),C.value.on("rowDeselected",N),C.value.on("dataProcessed",V),C.value.on("cellClick",B),C.value.on("columnMoved",j),C.value.on("renderStarted",$),C.value.on("renderComplete",T),C.value.on("tableDestroyed",P)},z=H=>{if(!h.value||!H||!C.value)return;const ee=C.value.options.ajaxParams;ee&&(ee.per_page=Number(H)),C.value.options.paginationSize=Number(H),C.value.setPageSize(H)},U=()=>{if(!C.value)return;const H=640,ee=C.value.options;if(x.value)ee.ajaxParams?.per_page<H&&(ee.ajaxParams.per_page+=40),C.value.setData();else{const X=C.value.getPageSize();typeof X=="number"&&X<H&&C.value.setPageSize(X+40)}ee.paginationSize>=H&&(a.value="Необходимо воспользоваться переходом по страницам")},K=H=>{H!==""&&C.value&&(C.value.showColumn(H),i("onShowColumn",C.value.getColumnLayout()))},Q=H=>{H!==""&&C.value&&(C.value.hideColumn(H),i("onHideColumn",C.value.getColumnLayout()))},ie=H=>{C.value&&(H.filter(({visible:ee})=>!ee).length===H.length?H.map(({field:ee})=>{d.nextTick(()=>C.value?.showColumn(ee))}):H.map(({field:ee,visible:X})=>{X?C.value?.showColumn(ee):C.value?.hideColumn(ee)}))},Y=()=>{d.nextTick(()=>{if(!C.value||C.value.getPage()!==1||!t.paginationPage||t.paginationPage===C.value.getPage())return!1;C.value.setPage(t.paginationPage)})};return d.onMounted(()=>{W()}),d.onBeforeUnmount(()=>{C.value&&C.value.destroy()}),d.watch(()=>t.columnShow,H=>{H&&K(H)}),d.watch(()=>t.columnHide,H=>{H&&Q(H)}),d.watch(()=>t.filters,H=>{C.value&&C.value.setFilter(H)},{deep:!0}),d.watch(()=>t.tableData,H=>{C.value&&!x.value&&C.value.setData(H)},{deep:!1}),d.watch(n,()=>{C.value&&C.value.deselectRow()}),d.watch(r,H=>{H>0&&C.value&&C.value.selectRow()}),d.watch(()=>t.options.columns,H=>{!h.value||!C.value||!H||(!H.find(({visible:ee})=>ee)&&t.showAllColumnsIfAllHidden?ie(H):C.value.setColumns(H))},{deep:!0}),d.watch(()=>t.selectedRowsStorage,H=>{H&&(u.value=new Set(H))},{deep:!0}),d.watch(h,H=>{H&&(t.showAllColumnsIfAllHidden&&ie(t.options.columns||[]),t.tableData.length>0&&C.value?.setData(t.tableData))},{deep:!0}),(H,ee)=>(d.openBlock(),d.createElementBlock("div",Rb,[d.createElementVNode("div",{ref_key:"tableRef",ref:v},null,512),x.value?(d.openBlock(),d.createElementBlock("div",Db,[d.createElementVNode("div",Tb,[k("table-footer-left")?(d.openBlock(),d.createElementBlock("div",_b,[d.renderSlot(H.$slots,"table-footer-left")])):d.createCommentVNode("",!0),d.createElementVNode("div",Ob,[d.createElementVNode("div",Lb,[d.createElementVNode("div",{class:"tabulator-footer-contents d-flex",id:`tabulator-footer${m.value}`},[d.createElementVNode("button",{class:"btn btn-primary me-3",id:"loadMoreButton",onClick:U,disabled:F.value},[d.createTextVNode(d.toDisplayString(s.loadMoreText)+" ",1),ee[2]||(ee[2]=d.createElementVNode("i",{class:"bi bi-plus-lg"},null,-1)),F.value?(d.openBlock(),d.createElementBlock("div",Ab)):d.createCommentVNode("",!0)],8,Fb),d.createVNode(kb,{class:"me-3",style:{"min-width":"150px"},modelValue:o.value,"onUpdate:modelValue":[ee[0]||(ee[0]=X=>o.value=X),ee[1]||(ee[1]=X=>z(X))],allowClear:!1,options:R.value,dropDownPlacement:"top"},null,8,["modelValue","options"])],8,Pb)],512)])])])):d.createCommentVNode("",!0),d.createVNode(na,{message:a.value,onClearMessage:_},null,8,["message"])]))}}),Bb={class:"accordion-header",style:{background:"transparent"}},Nb=["aria-expanded","aria-controls"],Ib={key:0},Vb=["id"],jb={class:"accordion-body px-0"},Wb=it(d.defineComponent({__name:"DefaultAccordion",props:{title:{},titleFontSize:{default:16},isCollapsed:{type:Boolean,default:!0},isVisibleBorderBottom:{type:Boolean,default:!0},isCollapsedDefault:{type:Boolean,default:!0},isTitleBold:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1}},emits:["update-visibility"],setup(s,{emit:e}){const t=s,i=e,n=d.useSlots(),r=d.ref(Math.random().toString(36).substr(2,9)),a=l=>!!n[l],o=()=>{const l=!t.isCollapsed;i("update-visibility",l)};return d.watch(()=>t.isCollapsedDefault,l=>{i("update-visibility",l)},{deep:!0}),(l,u)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["accordion accordion-flush",{"w-100":l.fullWidth}]),style:{background:"transparent"}},[d.createElementVNode("div",{class:d.normalizeClass(["accordion-item",{"border-bottom":l.isVisibleBorderBottom}]),style:{background:"transparent"}},[d.createElementVNode("h2",Bb,[d.createElementVNode("button",{onClick:o,class:d.normalizeClass(["accordion-button collapsed ps-0",{visible:!l.isCollapsed,"fw-bolder":l.isTitleBold}]),style:d.normalizeStyle(`font-size:${l.titleFontSize}px;`),type:"button","aria-expanded":!l.isCollapsed,"aria-controls":`accordion-${r.value}`},d.toDisplayString(l.title),15,Nb)]),d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>[a("accordion-body")?(d.openBlock(),d.createElementBlock("div",Ib,[d.withDirectives(d.createElementVNode("div",{class:"accordion-collapse collapse show",id:`accordion-${r.value}`},[d.createElementVNode("div",jb,[d.renderSlot(l.$slots,"accordion-body",{},void 0,!0)])],8,Vb),[[d.vShow,!l.isCollapsed]])])):d.createCommentVNode("",!0)]),_:3})],2)],2))}}),[["__scopeId","data-v-99bfaf08"]]);Fe.AddButton=ja,Fe.Card=ac,Fe.CardInfo=Cc,Fe.Checkbox=cd,Fe.ConfirmationModal=Xd,Fe.CustomInput=rd,Fe.DefaultAccordion=Wb,Fe.DefaultButton=Ia,Fe.DefaultDropDown=sc,Fe.DefaultModal=sa,Fe.Divider=Oc,Fe.ErrorMessageComponent=Tc,Fe.ExportButton=Ya,Fe.Flatpickr=Md,Fe.FormError=Ii,Fe.Icon=Ys,Fe.PageTitle=cc,Fe.PasswordInput=ld,Fe.PrintButton=Wa,Fe.Spinner=Qn,Fe.Table=zb,Fe.Toast=na,Object.defineProperty(Fe,Symbol.toStringTag,{value:"Module"})}));