vue-tailwind-datatable
Advanced tools
Comparing version
@@ -1,1 +0,1 @@ | ||
var DataTable=function(e){"use strict";function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,s,i=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){return function(){return e.apply(t,arguments)}}const{toString:l}=Object.prototype,{getPrototypeOf:c}=Object,u=(d=Object.create(null),e=>{const t=l.call(e);return d[t]||(d[t]=t.slice(8,-1).toLowerCase())});var d;const f=e=>(e=e.toLowerCase(),t=>u(t)===e),p=e=>t=>typeof t===e,{isArray:m}=Array,h=p("undefined");const y=f("ArrayBuffer");const g=p("string"),b=p("function"),v=p("number"),w=e=>null!==e&&"object"==typeof e,E=e=>{if("object"!==u(e))return!1;const t=c(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},O=f("Date"),S=f("File"),x=f("Blob"),k=f("FileList"),N=f("URLSearchParams");function A(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),m(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let s;for(r=0;r<a;r++)s=o[r],t.call(null,e[s],s,e)}}function B(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,T=e=>!h(e)&&e!==R;const P=(j="undefined"!=typeof Uint8Array&&c(Uint8Array),e=>j&&e instanceof j);var j;const _=f("HTMLFormElement"),C=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),D=f("RegExp"),L=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};A(n,((n,o)=>{!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},V="abcdefghijklmnopqrstuvwxyz",F="0123456789",U={DIGIT:F,ALPHA:V,ALPHA_DIGIT:V+V.toUpperCase()+F};var z={isArray:m,isArrayBuffer:y,isBuffer:function(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{const t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||l.call(e)===t||b(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&y(e.buffer),t},isString:g,isNumber:v,isBoolean:e=>!0===e||!1===e,isObject:w,isPlainObject:E,isUndefined:h,isDate:O,isFile:S,isBlob:x,isRegExp:D,isFunction:b,isStream:e=>w(e)&&b(e.pipe),isURLSearchParams:N,isTypedArray:P,isFileList:k,forEach:A,merge:function e(){const{caseless:t}=T(this)&&this||{},n={},r=(r,o)=>{const a=t&&B(n,o)||o;E(n[a])&&E(r)?n[a]=e(n[a],r):E(r)?n[a]=e({},r):m(r)?n[a]=r.slice():n[a]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&A(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(A(t,((t,r)=>{n&&b(t)?e[r]=i(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,a,s;const i={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],r&&!r(s,e,t)||i[s]||(t[s]=e[s],i[s]=!0);e=!1!==n&&c(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:u,kindOfTest:f,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(m(e))return e;let t=e.length;if(!v(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:_,hasOwnProperty:C,hasOwnProp:C,reduceDescriptors:L,freezeMethods:e=>{L(e,((t,n)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];b(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return m(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:B,global:R,isContextDefined:T,ALPHABET:U,generateString:(e=16,t=U.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(w(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=m(e)?[]:{};return A(e,((e,t)=>{const a=n(e,r+1);!h(a)&&(o[t]=a)})),t[r]=void 0,o}}return e};return n(e,0)}};function M(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}z.inherits(M,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const I=M.prototype,q={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{q[e]={value:e}})),Object.defineProperties(M,q),Object.defineProperty(I,"isAxiosError",{value:!0}),M.from=(e,t,n,r,o,a)=>{const s=Object.create(I);return z.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),M.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};function H(e){return z.isPlainObject(e)||z.isArray(e)}function J(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function K(e,t,n){return e?e.concat(t).map((function(e,t){return e=J(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const W=z.toFlatObject(z,{},null,(function(e){return/^is[A-Z]/.test(e)}));function $(e,t,n){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!z.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,a=n.dots,s=n.indexes,i=(n.Blob||"undefined"!=typeof Blob&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(z.isDate(e))return e.toISOString();if(!i&&z.isBlob(e))throw new M("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(e)||z.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let i=e;if(e&&!o&&"object"==typeof e)if(z.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(z.isArray(e)&&function(e){return z.isArray(e)&&!e.some(H)}(e)||(z.isFileList(e)||z.endsWith(n,"[]"))&&(i=z.toArray(e)))return n=J(n),i.forEach((function(e,r){!z.isUndefined(e)&&null!==e&&t.append(!0===s?K([n],r,a):null===s?n:n+"[]",l(e))})),!1;return!!H(e)||(t.append(K(o,n,a),l(e)),!1)}const u=[],d=Object.assign(W,{defaultVisitor:c,convertValue:l,isVisitable:H});if(!z.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!z.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),z.forEach(n,(function(n,a){!0===(!(z.isUndefined(n)||null===n)&&o.call(t,n,z.isString(a)?a.trim():a,r,d))&&e(n,r?r.concat(a):[a])})),u.pop()}}(e),t}function G(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function X(e,t){this._pairs=[],e&&$(e,this,t)}const Q=X.prototype;function Z(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Y(e,t,n){if(!t)return e;const r=n&&n.encode||Z,o=n&&n.serialize;let a;if(a=o?o(t,n):z.isURLSearchParams(t)?t.toString():new X(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}Q.append=function(e,t){this._pairs.push([e,t])},Q.toString=function(e){const t=e?function(t){return e.call(this,t,G)}:G;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var ee=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){z.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},te={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ne="undefined"!=typeof URLSearchParams?URLSearchParams:X,re=FormData;const oe=(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),ae="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var se={isBrowser:!0,classes:{URLSearchParams:ne,FormData:re,Blob:Blob},isStandardBrowserEnv:oe,isStandardBrowserWebWorkerEnv:ae,protocols:["http","https","file","blob","url","data"]};function ie(e){function t(e,n,r,o){let a=e[o++];const s=Number.isFinite(+a),i=o>=e.length;if(a=!a&&z.isArray(r)?r.length:a,i)return z.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!s;r[a]&&z.isObject(r[a])||(r[a]=[]);return t(e,n,r[a],o)&&z.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}(r[a])),!s}if(z.isFormData(e)&&z.isFunction(e.entries)){const n={};return z.forEachEntry(e,((e,r)=>{t(function(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const le={"Content-Type":void 0};const ce={transitional:te,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=z.isObject(e);o&&z.isHTMLForm(e)&&(e=new FormData(e));if(z.isFormData(e))return r&&r?JSON.stringify(ie(e)):e;if(z.isArrayBuffer(e)||z.isBuffer(e)||z.isStream(e)||z.isFile(e)||z.isBlob(e))return e;if(z.isArrayBufferView(e))return e.buffer;if(z.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return $(e,new se.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return se.isNode&&z.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=z.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return $(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ce.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&z.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw M.from(e,M.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:se.classes.FormData,Blob:se.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};z.forEach(["delete","get","head"],(function(e){ce.headers[e]={}})),z.forEach(["post","put","patch"],(function(e){ce.headers[e]=z.merge(le)}));var ue=ce;const de=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const fe=Symbol("internals");function pe(e){return e&&String(e).trim().toLowerCase()}function me(e){return!1===e||null==e?e:z.isArray(e)?e.map(me):String(e)}function he(e,t,n,r){return z.isFunction(r)?r.call(this,t,n):z.isString(t)?z.isString(r)?-1!==t.indexOf(r):z.isRegExp(r)?r.test(t):void 0:void 0}class ye{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=pe(t);if(!o)throw new Error("header name must be a non-empty string");const a=z.findKey(r,o);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=me(e))}const a=(e,t)=>z.forEach(e,((e,n)=>o(e,n,t)));return z.isPlainObject(e)||e instanceof this.constructor?a(e,t):z.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z]+$/.test(e.trim())?a((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&de[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=pe(e)){const n=z.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(z.isFunction(t))return t.call(this,e,n);if(z.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=pe(e)){const n=z.findKey(this,e);return!(!n||void 0===this[n]||t&&!he(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=pe(e)){const o=z.findKey(n,e);!o||t&&!he(0,n[o],o,t)||(delete n[o],r=!0)}}return z.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!he(0,this[o],o,e)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return z.forEach(this,((r,o)=>{const a=z.findKey(n,o);if(a)return t[a]=me(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=me(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return z.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&z.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[fe]=this[fe]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=pe(e);t[r]||(!function(e,t){const n=z.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return z.isArray(e)?e.forEach(r):r(e),this}}ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.freezeMethods(ye.prototype),z.freezeMethods(ye);var ge=ye;function be(e,t){const n=this||ue,r=t||n,o=ge.from(r.headers);let a=r.data;return z.forEach(e,(function(e){a=e.call(n,a,o.normalize(),t?t.status:void 0)})),o.normalize(),a}function ve(e){return!(!e||!e.__CANCEL__)}function we(e,t,n){M.call(this,null==e?"canceled":e,M.ERR_CANCELED,t,n),this.name="CanceledError"}z.inherits(we,M,{__CANCEL__:!0});var Ee=se.isStandardBrowserEnv?{write:function(e,t,n,r,o,a){const s=[];s.push(e+"="+encodeURIComponent(t)),z.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),z.isString(r)&&s.push("path="+r),z.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Oe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Se=se.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=z.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function xe(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,a=0,s=0;return t=void 0!==t?t:1e3,function(i){const l=Date.now(),c=r[s];o||(o=l),n[a]=i,r[a]=l;let u=s,d=0;for(;u!==a;)d+=n[u++],u%=e;if(a=(a+1)%e,a===s&&(s=(s+1)%e),l-o<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,i=a-n,l=r(i);n=a;const c={loaded:a,total:s,progress:s?a/s:void 0,bytes:i,rate:l||void 0,estimated:l&&s&&a<=s?(s-a)/l:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const ke={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=ge.from(e.headers).normalize(),a=e.responseType;let s;function i(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}z.isFormData(r)&&(se.isStandardBrowserEnv||se.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const c=Oe(e.baseURL,e.url);function u(){if(!l)return;const r=ge.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new M("Request failed with status code "+n.status,[M.ERR_BAD_REQUEST,M.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),i()}),(function(e){n(e),i()}),{data:a&&"text"!==a&&"json"!==a?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),Y(c,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=u:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(u)},l.onabort=function(){l&&(n(new M("Request aborted",M.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new M("Network Error",M.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||te;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new M(t,r.clarifyTimeoutError?M.ETIMEDOUT:M.ECONNABORTED,e,l)),l=null},se.isStandardBrowserEnv){const t=(e.withCredentials||Se(c))&&e.xsrfCookieName&&Ee.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&z.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),z.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&"json"!==a&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",xe(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",xe(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{l&&(n(!t||t.type?new we(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const d=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(c);d&&-1===se.protocols.indexOf(d)?n(new M("Unsupported protocol "+d+":",M.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};z.forEach(ke,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var Ne={getAdapter:e=>{e=z.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=z.isString(n)?ke[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new M(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(z.hasOwnProp(ke,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!z.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:ke};function Ae(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new we(null,e)}function Be(e){Ae(e),e.headers=ge.from(e.headers),e.data=be.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Ne.getAdapter(e.adapter||ue.adapter)(e).then((function(t){return Ae(e),t.data=be.call(e,e.transformResponse,t),t.headers=ge.from(t.headers),t}),(function(t){return ve(t)||(Ae(e),t&&t.response&&(t.response.data=be.call(e,e.transformResponse,t.response),t.response.headers=ge.from(t.response.headers))),Promise.reject(t)}))}const Re=e=>e instanceof ge?e.toJSON():e;function Te(e,t){t=t||{};const n={};function r(e,t,n){return z.isPlainObject(e)&&z.isPlainObject(t)?z.merge.call({caseless:n},e,t):z.isPlainObject(t)?z.merge({},t):z.isArray(t)?t.slice():t}function o(e,t,n){return z.isUndefined(t)?z.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function a(e,t){if(!z.isUndefined(t))return r(void 0,t)}function s(e,t){return z.isUndefined(t)?z.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(n,o,a){return a in t?r(n,o):a in e?r(void 0,n):void 0}const l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(e,t)=>o(Re(e),Re(t),!0)};return z.forEach(Object.keys(e).concat(Object.keys(t)),(function(r){const a=l[r]||o,s=a(e[r],t[r],r);z.isUndefined(s)&&a!==i||(n[r]=s)})),n}const Pe="1.3.2",je={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{je[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const _e={};je.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Pe+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,a)=>{if(!1===e)throw new M(r(o," has been removed"+(t?" in "+t:"")),M.ERR_DEPRECATED);return t&&!_e[o]&&(_e[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}};var Ce={assertOptions:function(e,t,n){if("object"!=typeof e)throw new M("options must be an object",M.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],s=t[a];if(s){const t=e[a],n=void 0===t||s(t,a,e);if(!0!==n)throw new M("option "+a+" must be "+n,M.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new M("Unknown option "+a,M.ERR_BAD_OPTION)}},validators:je};const De=Ce.validators;class Le{constructor(e){this.defaults=e,this.interceptors={request:new ee,response:new ee}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Te(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;let a;void 0!==n&&Ce.assertOptions(n,{silentJSONParsing:De.transitional(De.boolean),forcedJSONParsing:De.transitional(De.boolean),clarifyTimeoutError:De.transitional(De.boolean)},!1),void 0!==r&&Ce.assertOptions(r,{encode:De.function,serialize:De.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase(),a=o&&z.merge(o.common,o[t.method]),a&&z.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=ge.concat(a,o);const s=[];let i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!i){const e=[Be.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=s.length;let f=t;for(d=0;d<u;){const e=s[d++],t=s[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=Be.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Y(Oe((e=Te(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}z.forEach(["delete","get","head","options"],(function(e){Le.prototype[e]=function(t,n){return this.request(Te(n||{},{method:e,url:t,data:(n||{}).data}))}})),z.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Te(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Le.prototype[e]=t(),Le.prototype[e+"Form"]=t(!0)}));var Ve=Le;class Fe{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new we(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Fe((function(t){e=t})),cancel:e}}}var Ue=Fe;const ze={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ze).forEach((([e,t])=>{ze[t]=e}));var Me=ze;const Ie=function e(t){const n=new Ve(t),r=i(Ve.prototype.request,n);return z.extend(r,Ve.prototype,n,{allOwnKeys:!0}),z.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Te(t,n))},r}(ue);Ie.Axios=Ve,Ie.CanceledError=we,Ie.CancelToken=Ue,Ie.isCancel=ve,Ie.VERSION=Pe,Ie.toFormData=$,Ie.AxiosError=M,Ie.Cancel=Ie.CanceledError,Ie.all=function(e){return Promise.all(e)},Ie.spread=function(e){return function(t){return e.apply(null,t)}},Ie.isAxiosError=function(e){return z.isObject(e)&&!0===e.isAxiosError},Ie.mergeConfig=Te,Ie.AxiosHeaders=ge,Ie.formToJSON=e=>ie(z.isHTMLForm(e)?new FormData(e):e),Ie.HttpStatusCode=Me,Ie.default=Ie;var qe=Ie,He={key:0,class:"block md:flex md:flex-1 md:items-center md:justify-between mb-3"},Je={key:0,class:"text-xs text-center md:text-left mb-2 md:mb-0"},Ke=["value"],We=e.createElementVNode("span",{class:"text-gray-600"},"Items Per Page",-1),$e={key:1},Ge={class:"overflow-x-auto shadow ring-1 ring-black ring-opacity-5 md:rounded-lg mb-3"},Xe={class:"min-w-full divide-y divide-gray-300"},Qe={class:"bg-gray-50"},Ze=["onClick"],Ye={key:0,class:"mr-1"},et={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"inline-block w-4 h-4 text-gray-500"},tt=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 4.5A.75.75 0 013 3.75h14.25a.75.75 0 010 1.5H3a.75.75 0 01-.75-.75zm14.47 3.97a.75.75 0 011.06 0l3.75 3.75a.75.75 0 11-1.06 1.06L18 10.81V21a.75.75 0 01-1.5 0V10.81l-2.47 2.47a.75.75 0 11-1.06-1.06l3.75-3.75zM2.25 9A.75.75 0 013 8.25h9.75a.75.75 0 010 1.5H3A.75.75 0 012.25 9zm0 4.5a.75.75 0 01.75-.75h5.25a.75.75 0 010 1.5H3a.75.75 0 01-.75-.75z","clip-rule":"evenodd"},null,-1)],nt={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"inline-block w-4 h-4 text-gray-500"},rt=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 4.5A.75.75 0 013 3.75h14.25a.75.75 0 010 1.5H3a.75.75 0 01-.75-.75zm0 4.5A.75.75 0 013 8.25h9.75a.75.75 0 010 1.5H3A.75.75 0 012.25 9zm15-.75A.75.75 0 0118 9v10.19l2.47-2.47a.75.75 0 111.06 1.06l-3.75 3.75a.75.75 0 01-1.06 0l-3.75-3.75a.75.75 0 111.06-1.06l2.47 2.47V9a.75.75 0 01.75-.75zm-15 5.25a.75.75 0 01.75-.75h9.75a.75.75 0 010 1.5H3a.75.75 0 01-.75-.75z","clip-rule":"evenodd"},null,-1)],ot={class:"relative divide-y divide-gray-200 bg-white"},at={key:0},st=["colspan"],it=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"inline-block w-6 h-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})],-1),lt={key:1},ct=["colspan"],ut={key:0},dt={key:0,class:"flex items-center"},ft={key:1,class:"flex items-center"},pt=["innerHTML"],mt={key:3,class:"absolute inset-0 flex items-center justify-center bg-gray-100/70"},ht=[e.createElementVNode("svg",{class:"inline-block animate-spin -ml-1 mr-3 h-5 w-5 text-gray-600",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)],yt={class:"block md:flex md:flex-1 md:items-center md:justify-between text-center md:text-left"},gt={class:"hidden min-[420px]:block mb-2 md:mb-0"},bt={class:"text-xs lg:text-sm text-gray-700"},vt={class:"font-medium"},wt={class:"font-medium"},Et={class:"font-medium"},Ot={key:0},St={class:"font-medium"},xt={class:"isolate inline-flex -space-x-px rounded-md shadow-sm","aria-label":"Pagination"},kt=[e.createElementVNode("span",{class:"sr-only"},"Previous",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.72 12.53a.75.75 0 010-1.06l7.5-7.5a.75.75 0 111.06 1.06L9.31 12l6.97 6.97a.75.75 0 11-1.06 1.06l-7.5-7.5z","clip-rule":"evenodd"})],-1)],Nt=["disabled"],At=["value"],Bt=[e.createElementVNode("span",{class:"sr-only"},"Next",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.28 11.47a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 01-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 011.06-1.06l7.5 7.5z","clip-rule":"evenodd"})],-1)],Rt={__name:"data-table",props:{columns:{type:[Array,Object],default:function(){return[]}},data:{type:Array,default:function(){return[]}},allowedItemsPerPage:{type:Array,default:null},is_ssp_mode:{type:Boolean,default:!1},url:{type:String,default:null},is_search_enable:{type:Boolean,default:!1},defaultItemsPerPage:{type:Number,default:null},defaultSortBy:{type:[String,Number],default:null},defaultSortDesc:{type:Boolean,default:!1},is_fetch_on_init:{type:Boolean,default:!0}},setup:function(t,o){var a=o.expose,s=t,i=e.ref(null),l=e.ref(1),c=e.ref(null),u=e.ref(null),d=e.ref(null),f=e.reactive({by:null,desc:!1}),p=e.ref(""),m=e.ref({}),h=e.ref(!0),y=e.ref(!1),g=e.ref(!1),b=e.computed((function(){var e={start:1,end:1};return s.is_ssp_mode?null!==i.value&&(e.start=i.value.data.current_item_position_start,e.end=i.value.data.current_item_position_end):d.value>0?(e.start=(l.value-1)*d.value+1,e.start=e.start<0?0:e.start,e.end=l.value*d.value,e.end>u.value&&(e.end=u.value)):e.end=u.value,e})),v=e.computed((function(){var e=[];for(var t in s.columns){var n=s.columns[t];"object"!==r(n)?e.push({label:n,db:t,sortable:!0,class:[]}):(void 0===n.sortable&&(n.sortable=!0),void 0===n.class&&(n.class=[]),e.push(n))}return e})),w=e.computed((function(){var e=[];return s.is_ssp_mode?null!==i.value&&(e=i.value.data.items):(e=s.data.sort((function(e,t){var n=E.value.by;return E.value.desc?e[n]<t[n]?1:t[n]<e[n]?-1:0:e[n]>t[n]?1:t[n]>e[n]?-1:0})),p.value.length>0&&(e=e.filter((function(e){for(var t in e)if(e[t].toString().toLowerCase().search(p.value.toLowerCase())>=0)return!0;return!1})))),e})),E=e.computed((function(){var e={by:s.defaultSortBy,desc:s.defaultSortDesc};return"string"==typeof f.by?v.value.some((function(e){return e.db===f.by}))&&(e.by=f.by,e.desc=f.desc):null===e.by&&(e.by=v.value[0].db),e})),O=e.computed((function(){return-1==d.value||null==u.value?1:Math.ceil(u.value/d.value)})),S=function(e){if(h.value)return!1;var t=l.value+e;if(t<1||t>O.value)return!1;l.value=t,x()},x=function(){s.is_ssp_mode&&k()},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s.is_ssp_mode)return!1;if(y.value)return!1;if("string"!=typeof s.url)throw new Error("`url` is required.");h.value=!0,y.value=!0,g.value=!1;var t=N();void 0!==e.params&&(t=n(n({},t),e.params)),qe.get(s.url,{params:t}).then((function(t){i.value=t.data,c.value=t.data.data.total_item_count,u.value=t.data.data.total_filtered_item_count,"function"==typeof e.success&&e.success(t)})).catch((function(e){console.log(e),g.value=!0})).then((function(){h.value=!1,y.value=!1}))},N=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r={page:l.value,itemsPerPage:d.value,sortBy:E.value.by,sortDesc:E.value.desc?"true":"false"};if(p.value.length>0&&(r.search=p.value),r=n(n({},r),m.value),"function"==typeof e&&(r=e(r)),t){var o={};for(var a in r){var s=r[a];if(Array.isArray(s))for(var i in s)o["".concat(a,"[").concat(i,"]")]=s[i];else o[a]=s}return new URLSearchParams(o).toString()}return r};e.watch(d,(function(){l.value>O.value&&(l.value=O.value),x()})),e.watch(f,(function(){x()}));var A=null;return e.watch(p,(function(){s.is_ssp_mode?(h.value=!0,null!==A&&clearTimeout(A),A=setTimeout((function(){l.value=1,k((function(){A=null}))}),800)):(l.value=1,u.value=w.value.length)})),e.onMounted((function(){var e,t;null===d.value&&(d.value=null!==(e=s.defaultItemsPerPage)&&void 0!==e?e:Array.isArray(s.allowedItemsPerPage)&&null!==(t=s.allowedItemsPerPage[0])&&void 0!==t?t:10),f.desc=E.value.desc,f.by=E.value.by,s.is_ssp_mode?s.is_fetch_on_init&&k():(h.value=!1,c.value=u.value=s.data.length)})),a({fetchData:k,setParams:function(e){m.value=e},getParams:N}),function(n,o){return e.openBlock(),e.createElementBlock("div",null,[null!==t.allowedItemsPerPage||t.is_search_enable?(e.openBlock(),e.createElementBlock("div",He,[null!==t.allowedItemsPerPage?(e.openBlock(),e.createElementBlock("div",Je,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":o[0]||(o[0]=function(e){return d.value=e}),class:"mr-2 rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-xs"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.allowedItemsPerPage,(function(t,n){return e.openBlock(),e.createElementBlock("option",{value:t,key:n},[-1==t?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" All ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t),1)],64))],8,Ke)})),128))],512),[[e.vModelSelect,d.value]]),We])):e.createCommentVNode("",!0),t.is_search_enable?(e.openBlock(),e.createElementBlock("div",$e,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=function(e){return p.value=e}),type:"text",onKeyup:o[2]||(o[2]=e.withKeys((function(e){return x()}),["enter"])),placeholder:"Search / Filter",autocomplete:"off",class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-xs"},null,544),[[e.vModelText,p.value]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ge,[e.createElementVNode("table",Xe,[e.createElementVNode("thead",Qe,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(v),(function(t){return e.openBlock(),e.createElementBlock("th",{key:t.db,scope:"col",class:e.normalizeClass(["px-3 py-3.5 text-sm font-semibold text-gray-900 text-center",{"cursor-pointer":t.sortable}]),onClick:function(e){return n=t.db,void 0!==(r=v.value.find((function(e){return e.db==n})))&&!!r.sortable&&(E.value.by==n?f.desc=!f.desc:f.desc=!1,f.by=n,!0);var n,r}},[e.unref(E).by==t.db?(e.openBlock(),e.createElementBlock("span",Ye,[!1===e.unref(E).desc?(e.openBlock(),e.createElementBlock("svg",et,tt)):(e.openBlock(),e.createElementBlock("svg",nt,rt))])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.label),1)],10,Ze)})),128))])]),e.createElementVNode("tbody",ot,[g.value?(e.openBlock(),e.createElementBlock("tr",at,[e.createElementVNode("td",{class:"text-center py-6 px-2 text-red-400 bg-red-50/80",colspan:e.unref(v).length},[it,e.createTextVNode(" Failed to load ")],8,st)])):e.unref(w).length<=0?(e.openBlock(),e.createElementBlock("tr",lt,[e.createElementVNode("td",{class:"text-center py-6 px-2 text-gray-500",colspan:e.unref(v).length}," No data ",8,ct)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(e.unref(w),(function(o,a){return e.openBlock(),e.createElementBlock(e.Fragment,{key:a},[t.is_ssp_mode||a+1>=e.unref(b).start&&a<e.unref(b).end?(e.openBlock(),e.createElementBlock("tr",ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(v),(function(t,a){return e.openBlock(),e.createElementBlock("td",{class:e.normalizeClass(["whitespace-nowrap px-3 py-4 text-sm text-gray-500",t.class]),key:a},["object"!==r(o[t.db])||Array.isArray(o[t.db])||null===o[t.db]?Array.isArray(o[t.db])?(e.openBlock(),e.createElementBlock("div",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o[t.db],(function(t){return e.renderSlot(n.$slots,t.slotName,{data:t})})),256))])):"html:"===o[t.db].toString().substring(0,5)?(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:o[t.db].substring(5)},null,8,pt)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createTextVNode(e.toDisplayString(o[t.db]),1)],64)):(e.openBlock(),e.createElementBlock("div",dt,[e.renderSlot(n.$slots,o[t.db].slotName,{data:o[t.db]})]))],2)})),128))])):e.createCommentVNode("",!0)],64)})),128)),h.value?(e.openBlock(),e.createElementBlock("div",mt,ht)):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",yt,[e.createElementVNode("div",gt,[e.createElementVNode("p",bt,[e.createTextVNode(" Showing "),e.createElementVNode("span",vt,e.toDisplayString(e.unref(b).start),1),e.createTextVNode(" to "),e.createElementVNode("span",wt,e.toDisplayString(e.unref(b).end),1),e.createTextVNode(" of "),e.createElementVNode("span",Et,e.toDisplayString(u.value),1),e.createTextVNode(" results "),p.value.length>0?(e.openBlock(),e.createElementBlock("span",Ot,[e.createTextVNode("(filtered from "),e.createElementVNode("span",St,e.toDisplayString(c.value),1),e.createTextVNode(" items)")])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[e.createElementVNode("nav",xt,[e.createElementVNode("a",{onClick:o[3]||(o[3]=function(e){return S(-1)}),href:"javascript:void(0);",class:e.normalizeClass(["relative inline-flex items-center rounded-l-md border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20",{"opacity-40 cursor-default":l.value<=1||h.value}])},kt,2),e.createElementVNode("span",null,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":o[4]||(o[4]=function(e){return l.value=e}),onChange:o[5]||(o[5]=function(e){return x()}),class:"relative inline-flex items-center border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20 appearance-none bg-none cursor-pointer text-center",disabled:e.unref(w).length<=0||h.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(O),(function(t){return e.openBlock(),e.createElementBlock("option",{key:t,value:t},e.toDisplayString(t),9,At)})),128))],40,Nt),[[e.vModelSelect,l.value]])]),e.createElementVNode("a",{onClick:o[6]||(o[6]=function(e){return S(1)}),href:"javascript:void(0);",class:e.normalizeClass(["relative inline-flex items-center rounded-r-md border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20",{"opacity-40 cursor-default":l.value>=e.unref(O)||h.value}])},Bt,2)])])])])}}},Tt=function(){var e=Rt;return e.install=function(t){t.component("DataTable",e)},e}(),Pt=Object.freeze({__proto__:null,default:Tt});return Object.entries(Pt).forEach((function(e){var t=a(e,2),n=t[0],r=t[1];"default"!==n&&(Tt[n]=r)})),Tt}(Vue); | ||
var DataTable=function(e){"use strict";function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,s,i=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){return function(){return e.apply(t,arguments)}}const{toString:l}=Object.prototype,{getPrototypeOf:c}=Object,u=(d=Object.create(null),e=>{const t=l.call(e);return d[t]||(d[t]=t.slice(8,-1).toLowerCase())});var d;const f=e=>(e=e.toLowerCase(),t=>u(t)===e),p=e=>t=>typeof t===e,{isArray:m}=Array,h=p("undefined");const y=f("ArrayBuffer");const g=p("string"),b=p("function"),v=p("number"),w=e=>null!==e&&"object"==typeof e,E=e=>{if("object"!==u(e))return!1;const t=c(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},O=f("Date"),S=f("File"),x=f("Blob"),k=f("FileList"),N=f("URLSearchParams");function A(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),m(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let s;for(r=0;r<a;r++)s=o[r],t.call(null,e[s],s,e)}}function B(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,T=e=>!h(e)&&e!==R;const P=(j="undefined"!=typeof Uint8Array&&c(Uint8Array),e=>j&&e instanceof j);var j;const _=f("HTMLFormElement"),C=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),D=f("RegExp"),L=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};A(n,((n,o)=>{!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},V="abcdefghijklmnopqrstuvwxyz",F="0123456789",U={DIGIT:F,ALPHA:V,ALPHA_DIGIT:V+V.toUpperCase()+F};var z={isArray:m,isArrayBuffer:y,isBuffer:function(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{const t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||l.call(e)===t||b(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&y(e.buffer),t},isString:g,isNumber:v,isBoolean:e=>!0===e||!1===e,isObject:w,isPlainObject:E,isUndefined:h,isDate:O,isFile:S,isBlob:x,isRegExp:D,isFunction:b,isStream:e=>w(e)&&b(e.pipe),isURLSearchParams:N,isTypedArray:P,isFileList:k,forEach:A,merge:function e(){const{caseless:t}=T(this)&&this||{},n={},r=(r,o)=>{const a=t&&B(n,o)||o;E(n[a])&&E(r)?n[a]=e(n[a],r):E(r)?n[a]=e({},r):m(r)?n[a]=r.slice():n[a]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&A(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(A(t,((t,r)=>{n&&b(t)?e[r]=i(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,a,s;const i={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],r&&!r(s,e,t)||i[s]||(t[s]=e[s],i[s]=!0);e=!1!==n&&c(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:u,kindOfTest:f,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(m(e))return e;let t=e.length;if(!v(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:_,hasOwnProperty:C,hasOwnProp:C,reduceDescriptors:L,freezeMethods:e=>{L(e,((t,n)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];b(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return m(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:B,global:R,isContextDefined:T,ALPHABET:U,generateString:(e=16,t=U.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(w(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=m(e)?[]:{};return A(e,((e,t)=>{const a=n(e,r+1);!h(a)&&(o[t]=a)})),t[r]=void 0,o}}return e};return n(e,0)}};function M(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}z.inherits(M,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const I=M.prototype,q={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{q[e]={value:e}})),Object.defineProperties(M,q),Object.defineProperty(I,"isAxiosError",{value:!0}),M.from=(e,t,n,r,o,a)=>{const s=Object.create(I);return z.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),M.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};function H(e){return z.isPlainObject(e)||z.isArray(e)}function J(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function K(e,t,n){return e?e.concat(t).map((function(e,t){return e=J(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const W=z.toFlatObject(z,{},null,(function(e){return/^is[A-Z]/.test(e)}));function $(e,t,n){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!z.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,a=n.dots,s=n.indexes,i=(n.Blob||"undefined"!=typeof Blob&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(z.isDate(e))return e.toISOString();if(!i&&z.isBlob(e))throw new M("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(e)||z.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let i=e;if(e&&!o&&"object"==typeof e)if(z.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(z.isArray(e)&&function(e){return z.isArray(e)&&!e.some(H)}(e)||(z.isFileList(e)||z.endsWith(n,"[]"))&&(i=z.toArray(e)))return n=J(n),i.forEach((function(e,r){!z.isUndefined(e)&&null!==e&&t.append(!0===s?K([n],r,a):null===s?n:n+"[]",l(e))})),!1;return!!H(e)||(t.append(K(o,n,a),l(e)),!1)}const u=[],d=Object.assign(W,{defaultVisitor:c,convertValue:l,isVisitable:H});if(!z.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!z.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),z.forEach(n,(function(n,a){!0===(!(z.isUndefined(n)||null===n)&&o.call(t,n,z.isString(a)?a.trim():a,r,d))&&e(n,r?r.concat(a):[a])})),u.pop()}}(e),t}function G(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function X(e,t){this._pairs=[],e&&$(e,this,t)}const Q=X.prototype;function Z(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Y(e,t,n){if(!t)return e;const r=n&&n.encode||Z,o=n&&n.serialize;let a;if(a=o?o(t,n):z.isURLSearchParams(t)?t.toString():new X(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}Q.append=function(e,t){this._pairs.push([e,t])},Q.toString=function(e){const t=e?function(t){return e.call(this,t,G)}:G;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var ee=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){z.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},te={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ne="undefined"!=typeof URLSearchParams?URLSearchParams:X,re=FormData;const oe=(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),ae="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var se={isBrowser:!0,classes:{URLSearchParams:ne,FormData:re,Blob:Blob},isStandardBrowserEnv:oe,isStandardBrowserWebWorkerEnv:ae,protocols:["http","https","file","blob","url","data"]};function ie(e){function t(e,n,r,o){let a=e[o++];const s=Number.isFinite(+a),i=o>=e.length;if(a=!a&&z.isArray(r)?r.length:a,i)return z.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!s;r[a]&&z.isObject(r[a])||(r[a]=[]);return t(e,n,r[a],o)&&z.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}(r[a])),!s}if(z.isFormData(e)&&z.isFunction(e.entries)){const n={};return z.forEachEntry(e,((e,r)=>{t(function(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const le={"Content-Type":void 0};const ce={transitional:te,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=z.isObject(e);o&&z.isHTMLForm(e)&&(e=new FormData(e));if(z.isFormData(e))return r&&r?JSON.stringify(ie(e)):e;if(z.isArrayBuffer(e)||z.isBuffer(e)||z.isStream(e)||z.isFile(e)||z.isBlob(e))return e;if(z.isArrayBufferView(e))return e.buffer;if(z.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return $(e,new se.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return se.isNode&&z.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=z.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return $(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ce.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&z.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw M.from(e,M.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:se.classes.FormData,Blob:se.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};z.forEach(["delete","get","head"],(function(e){ce.headers[e]={}})),z.forEach(["post","put","patch"],(function(e){ce.headers[e]=z.merge(le)}));var ue=ce;const de=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const fe=Symbol("internals");function pe(e){return e&&String(e).trim().toLowerCase()}function me(e){return!1===e||null==e?e:z.isArray(e)?e.map(me):String(e)}function he(e,t,n,r){return z.isFunction(r)?r.call(this,t,n):z.isString(t)?z.isString(r)?-1!==t.indexOf(r):z.isRegExp(r)?r.test(t):void 0:void 0}class ye{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=pe(t);if(!o)throw new Error("header name must be a non-empty string");const a=z.findKey(r,o);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=me(e))}const a=(e,t)=>z.forEach(e,((e,n)=>o(e,n,t)));return z.isPlainObject(e)||e instanceof this.constructor?a(e,t):z.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z]+$/.test(e.trim())?a((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&de[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=pe(e)){const n=z.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(z.isFunction(t))return t.call(this,e,n);if(z.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=pe(e)){const n=z.findKey(this,e);return!(!n||void 0===this[n]||t&&!he(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=pe(e)){const o=z.findKey(n,e);!o||t&&!he(0,n[o],o,t)||(delete n[o],r=!0)}}return z.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!he(0,this[o],o,e)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return z.forEach(this,((r,o)=>{const a=z.findKey(n,o);if(a)return t[a]=me(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=me(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return z.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&z.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[fe]=this[fe]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=pe(e);t[r]||(!function(e,t){const n=z.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return z.isArray(e)?e.forEach(r):r(e),this}}ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),z.freezeMethods(ye.prototype),z.freezeMethods(ye);var ge=ye;function be(e,t){const n=this||ue,r=t||n,o=ge.from(r.headers);let a=r.data;return z.forEach(e,(function(e){a=e.call(n,a,o.normalize(),t?t.status:void 0)})),o.normalize(),a}function ve(e){return!(!e||!e.__CANCEL__)}function we(e,t,n){M.call(this,null==e?"canceled":e,M.ERR_CANCELED,t,n),this.name="CanceledError"}z.inherits(we,M,{__CANCEL__:!0});var Ee=se.isStandardBrowserEnv?{write:function(e,t,n,r,o,a){const s=[];s.push(e+"="+encodeURIComponent(t)),z.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),z.isString(r)&&s.push("path="+r),z.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Oe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Se=se.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=z.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function xe(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,a=0,s=0;return t=void 0!==t?t:1e3,function(i){const l=Date.now(),c=r[s];o||(o=l),n[a]=i,r[a]=l;let u=s,d=0;for(;u!==a;)d+=n[u++],u%=e;if(a=(a+1)%e,a===s&&(s=(s+1)%e),l-o<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,i=a-n,l=r(i);n=a;const c={loaded:a,total:s,progress:s?a/s:void 0,bytes:i,rate:l||void 0,estimated:l&&s&&a<=s?(s-a)/l:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const ke={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=ge.from(e.headers).normalize(),a=e.responseType;let s;function i(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}z.isFormData(r)&&(se.isStandardBrowserEnv||se.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const c=Oe(e.baseURL,e.url);function u(){if(!l)return;const r=ge.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new M("Request failed with status code "+n.status,[M.ERR_BAD_REQUEST,M.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),i()}),(function(e){n(e),i()}),{data:a&&"text"!==a&&"json"!==a?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),Y(c,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=u:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(u)},l.onabort=function(){l&&(n(new M("Request aborted",M.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new M("Network Error",M.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||te;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new M(t,r.clarifyTimeoutError?M.ETIMEDOUT:M.ECONNABORTED,e,l)),l=null},se.isStandardBrowserEnv){const t=(e.withCredentials||Se(c))&&e.xsrfCookieName&&Ee.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&z.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),z.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&"json"!==a&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",xe(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",xe(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{l&&(n(!t||t.type?new we(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const d=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(c);d&&-1===se.protocols.indexOf(d)?n(new M("Unsupported protocol "+d+":",M.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};z.forEach(ke,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var Ne={getAdapter:e=>{e=z.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=z.isString(n)?ke[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new M(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(z.hasOwnProp(ke,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!z.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:ke};function Ae(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new we(null,e)}function Be(e){Ae(e),e.headers=ge.from(e.headers),e.data=be.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Ne.getAdapter(e.adapter||ue.adapter)(e).then((function(t){return Ae(e),t.data=be.call(e,e.transformResponse,t),t.headers=ge.from(t.headers),t}),(function(t){return ve(t)||(Ae(e),t&&t.response&&(t.response.data=be.call(e,e.transformResponse,t.response),t.response.headers=ge.from(t.response.headers))),Promise.reject(t)}))}const Re=e=>e instanceof ge?e.toJSON():e;function Te(e,t){t=t||{};const n={};function r(e,t,n){return z.isPlainObject(e)&&z.isPlainObject(t)?z.merge.call({caseless:n},e,t):z.isPlainObject(t)?z.merge({},t):z.isArray(t)?t.slice():t}function o(e,t,n){return z.isUndefined(t)?z.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function a(e,t){if(!z.isUndefined(t))return r(void 0,t)}function s(e,t){return z.isUndefined(t)?z.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(n,o,a){return a in t?r(n,o):a in e?r(void 0,n):void 0}const l={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(e,t)=>o(Re(e),Re(t),!0)};return z.forEach(Object.keys(e).concat(Object.keys(t)),(function(r){const a=l[r]||o,s=a(e[r],t[r],r);z.isUndefined(s)&&a!==i||(n[r]=s)})),n}const Pe="1.3.2",je={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{je[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const _e={};je.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Pe+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,a)=>{if(!1===e)throw new M(r(o," has been removed"+(t?" in "+t:"")),M.ERR_DEPRECATED);return t&&!_e[o]&&(_e[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}};var Ce={assertOptions:function(e,t,n){if("object"!=typeof e)throw new M("options must be an object",M.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],s=t[a];if(s){const t=e[a],n=void 0===t||s(t,a,e);if(!0!==n)throw new M("option "+a+" must be "+n,M.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new M("Unknown option "+a,M.ERR_BAD_OPTION)}},validators:je};const De=Ce.validators;class Le{constructor(e){this.defaults=e,this.interceptors={request:new ee,response:new ee}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Te(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;let a;void 0!==n&&Ce.assertOptions(n,{silentJSONParsing:De.transitional(De.boolean),forcedJSONParsing:De.transitional(De.boolean),clarifyTimeoutError:De.transitional(De.boolean)},!1),void 0!==r&&Ce.assertOptions(r,{encode:De.function,serialize:De.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase(),a=o&&z.merge(o.common,o[t.method]),a&&z.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=ge.concat(a,o);const s=[];let i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!i){const e=[Be.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=s.length;let f=t;for(d=0;d<u;){const e=s[d++],t=s[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=Be.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Y(Oe((e=Te(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}z.forEach(["delete","get","head","options"],(function(e){Le.prototype[e]=function(t,n){return this.request(Te(n||{},{method:e,url:t,data:(n||{}).data}))}})),z.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Te(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Le.prototype[e]=t(),Le.prototype[e+"Form"]=t(!0)}));var Ve=Le;class Fe{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new we(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Fe((function(t){e=t})),cancel:e}}}var Ue=Fe;const ze={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ze).forEach((([e,t])=>{ze[t]=e}));var Me=ze;const Ie=function e(t){const n=new Ve(t),r=i(Ve.prototype.request,n);return z.extend(r,Ve.prototype,n,{allOwnKeys:!0}),z.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Te(t,n))},r}(ue);Ie.Axios=Ve,Ie.CanceledError=we,Ie.CancelToken=Ue,Ie.isCancel=ve,Ie.VERSION=Pe,Ie.toFormData=$,Ie.AxiosError=M,Ie.Cancel=Ie.CanceledError,Ie.all=function(e){return Promise.all(e)},Ie.spread=function(e){return function(t){return e.apply(null,t)}},Ie.isAxiosError=function(e){return z.isObject(e)&&!0===e.isAxiosError},Ie.mergeConfig=Te,Ie.AxiosHeaders=ge,Ie.formToJSON=e=>ie(z.isHTMLForm(e)?new FormData(e):e),Ie.HttpStatusCode=Me,Ie.default=Ie;var qe=Ie,He={key:0,class:"block md:flex md:flex-1 md:items-center md:justify-between mb-3"},Je={key:0,class:"text-xs text-center md:text-left mb-2 md:mb-0"},Ke=["value"],We=e.createElementVNode("span",{class:"text-gray-600"},"Items Per Page",-1),$e={key:1},Ge={class:"overflow-x-auto shadow ring-1 ring-black ring-opacity-5 md:rounded-lg mb-3"},Xe={class:"min-w-full divide-y divide-gray-300"},Qe={class:"bg-gray-50"},Ze=["onClick"],Ye={key:0,class:"mr-1"},et={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"inline-block w-4 h-4 text-gray-500"},tt=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 4.5A.75.75 0 013 3.75h14.25a.75.75 0 010 1.5H3a.75.75 0 01-.75-.75zm14.47 3.97a.75.75 0 011.06 0l3.75 3.75a.75.75 0 11-1.06 1.06L18 10.81V21a.75.75 0 01-1.5 0V10.81l-2.47 2.47a.75.75 0 11-1.06-1.06l3.75-3.75zM2.25 9A.75.75 0 013 8.25h9.75a.75.75 0 010 1.5H3A.75.75 0 012.25 9zm0 4.5a.75.75 0 01.75-.75h5.25a.75.75 0 010 1.5H3a.75.75 0 01-.75-.75z","clip-rule":"evenodd"},null,-1)],nt={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"inline-block w-4 h-4 text-gray-500"},rt=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 4.5A.75.75 0 013 3.75h14.25a.75.75 0 010 1.5H3a.75.75 0 01-.75-.75zm0 4.5A.75.75 0 013 8.25h9.75a.75.75 0 010 1.5H3A.75.75 0 012.25 9zm15-.75A.75.75 0 0118 9v10.19l2.47-2.47a.75.75 0 111.06 1.06l-3.75 3.75a.75.75 0 01-1.06 0l-3.75-3.75a.75.75 0 111.06-1.06l2.47 2.47V9a.75.75 0 01.75-.75zm-15 5.25a.75.75 0 01.75-.75h9.75a.75.75 0 010 1.5H3a.75.75 0 01-.75-.75z","clip-rule":"evenodd"},null,-1)],ot={class:"relative divide-y divide-gray-200 bg-white"},at={key:0},st=["colspan"],it=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"inline-block w-6 h-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})],-1),lt={key:1},ct=["colspan"],ut={key:0},dt={key:0,class:"flex items-center"},ft={key:1,class:"flex items-center"},pt=["innerHTML"],mt={key:3,class:"absolute inset-0 flex items-center justify-center bg-gray-100/70"},ht=[e.createElementVNode("svg",{class:"inline-block animate-spin -ml-1 mr-3 h-5 w-5 text-gray-600",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)],yt={class:"block md:flex md:flex-1 md:items-center md:justify-between text-center md:text-left"},gt={class:"hidden min-[420px]:block mb-2 md:mb-0"},bt={class:"text-xs lg:text-sm text-gray-700"},vt={class:"font-medium"},wt={class:"font-medium"},Et={class:"font-medium"},Ot={key:0},St={class:"font-medium"},xt={class:"isolate inline-flex -space-x-px rounded-md shadow-sm","aria-label":"Pagination"},kt=[e.createElementVNode("span",{class:"sr-only"},"Previous",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.72 12.53a.75.75 0 010-1.06l7.5-7.5a.75.75 0 111.06 1.06L9.31 12l6.97 6.97a.75.75 0 11-1.06 1.06l-7.5-7.5z","clip-rule":"evenodd"})],-1)],Nt=["disabled"],At=["value"],Bt=[e.createElementVNode("span",{class:"sr-only"},"Next",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.28 11.47a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 01-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 011.06-1.06l7.5 7.5z","clip-rule":"evenodd"})],-1)],Rt={__name:"data-table",props:{columns:{type:[Array,Object],default:function(){return[]}},data:{type:Array,default:function(){return[]}},allowedItemsPerPage:{type:Array,default:null},is_ssp_mode:{type:Boolean,default:!1},url:{type:String,default:null},is_search_enable:{type:Boolean,default:!1},defaultItemsPerPage:{type:Number,default:null},defaultSortBy:{type:[String,Number],default:null},defaultSortDesc:{type:Boolean,default:!1},is_fetch_on_init:{type:Boolean,default:!0}},setup:function(t,o){var a=o.expose,s=t,i=e.ref(null),l=e.ref(1),c=e.ref(null),u=e.ref(null),d=e.ref(null),f=e.reactive({by:null,desc:!1}),p=e.ref(""),m=e.ref({}),h=e.ref(!0),y=e.ref(!1),g=e.ref(!1),b=e.ref(!1),v=e.computed((function(){var e={start:1,end:1};return s.is_ssp_mode?null!==i.value&&(e.start=i.value.data.current_item_position_start,e.end=i.value.data.current_item_position_end):d.value>0?(e.start=(l.value-1)*d.value+1,e.start=e.start<0?0:e.start,e.end=l.value*d.value,e.end>u.value&&(e.end=u.value)):e.end=u.value,e})),w=e.computed((function(){var e=[];for(var t in s.columns){var n=s.columns[t];"object"!==r(n)?e.push({label:n,db:t,sortable:!0,class:[]}):(void 0===n.sortable&&(n.sortable=!0),void 0===n.class&&(n.class=[]),e.push(n))}return e})),E=e.computed((function(){var e=[];return s.is_ssp_mode?null!==i.value&&(e=i.value.data.items):(e=s.data.sort((function(e,t){var n=O.value.by;return O.value.desc?e[n]<t[n]?1:t[n]<e[n]?-1:0:e[n]>t[n]?1:t[n]>e[n]?-1:0})),p.value.length>0&&(e=e.filter((function(e){for(var t in e)if(e[t].toString().toLowerCase().search(p.value.toLowerCase())>=0)return!0;return!1})))),e})),O=e.computed((function(){var e={by:s.defaultSortBy,desc:s.defaultSortDesc};return"string"==typeof f.by?w.value.some((function(e){return e.db===f.by}))&&(e.by=f.by,e.desc=f.desc):null===e.by&&(e.by=w.value[0].db),e})),S=e.computed((function(){return-1==d.value||null==u.value?1:Math.ceil(u.value/d.value)})),x=function(e){if(h.value)return!1;var t=l.value+e;if(t<1||t>S.value)return!1;l.value=t,k()},k=function(){s.is_ssp_mode&&N()},N=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!s.is_ssp_mode)return!1;if(y.value)return!1;if("string"!=typeof s.url)throw new Error("`url` is required.");h.value=!0,y.value=!0,g.value=!1;var t=A();void 0!==e.params&&(t=n(n({},t),e.params)),qe.get(s.url,{params:t}).then((function(t){i.value=t.data,c.value=t.data.data.total_item_count,u.value=t.data.data.total_filtered_item_count,"function"==typeof e.success&&e.success(t)})).catch((function(e){console.log(e),g.value=!0})).then((function(){h.value=!1,y.value=!1}))},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r={page:l.value,itemsPerPage:d.value,sortBy:O.value.by,sortDesc:O.value.desc?"true":"false"};if(p.value.length>0&&(r.search=p.value),r=n(n({},r),m.value),"function"==typeof e&&(r=e(r)),t){var o={};for(var a in r){var s=r[a];if(Array.isArray(s))for(var i in s)o["".concat(a,"[").concat(i,"]")]=s[i];else o[a]=s}return new URLSearchParams(o).toString()}return r};e.watch(d,(function(){b.value&&(l.value>S.value&&(l.value=S.value),k())})),e.watch(f,(function(){b.value&&k()}));var B=null;return e.watch(p,(function(){s.is_ssp_mode?(h.value=!0,null!==B&&clearTimeout(B),B=setTimeout((function(){l.value=1,N((function(){B=null}))}),800)):(l.value=1,u.value=E.value.length)})),e.onMounted((function(){var e,t;null===d.value&&(d.value=null!==(e=s.defaultItemsPerPage)&&void 0!==e?e:Array.isArray(s.allowedItemsPerPage)&&null!==(t=s.allowedItemsPerPage[0])&&void 0!==t?t:10),f.desc=O.value.desc,f.by=O.value.by,s.is_ssp_mode?s.is_fetch_on_init&&N():(h.value=!1,c.value=u.value=s.data.length),b.value=!0})),a({fetchData:N,setParams:function(e){m.value=e},getParams:A}),function(n,o){return e.openBlock(),e.createElementBlock("div",null,[null!==t.allowedItemsPerPage||t.is_search_enable?(e.openBlock(),e.createElementBlock("div",He,[null!==t.allowedItemsPerPage?(e.openBlock(),e.createElementBlock("div",Je,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":o[0]||(o[0]=function(e){return d.value=e}),class:"mr-2 rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-xs"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.allowedItemsPerPage,(function(t,n){return e.openBlock(),e.createElementBlock("option",{value:t,key:n},[-1==t?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" All ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t),1)],64))],8,Ke)})),128))],512),[[e.vModelSelect,d.value]]),We])):e.createCommentVNode("",!0),t.is_search_enable?(e.openBlock(),e.createElementBlock("div",$e,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=function(e){return p.value=e}),type:"text",onKeyup:o[2]||(o[2]=e.withKeys((function(e){return k()}),["enter"])),placeholder:"Search / Filter",autocomplete:"off",class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-xs"},null,544),[[e.vModelText,p.value]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ge,[e.createElementVNode("table",Xe,[e.createElementVNode("thead",Qe,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),(function(t){return e.openBlock(),e.createElementBlock("th",{key:t.db,scope:"col",class:e.normalizeClass(["px-3 py-3.5 text-sm font-semibold text-gray-900 text-center",{"cursor-pointer":t.sortable}]),onClick:function(e){return n=t.db,void 0!==(r=w.value.find((function(e){return e.db==n})))&&!!r.sortable&&(O.value.by==n?f.desc=!f.desc:f.desc=!1,f.by=n,!0);var n,r}},[e.unref(O).by==t.db?(e.openBlock(),e.createElementBlock("span",Ye,[!1===e.unref(O).desc?(e.openBlock(),e.createElementBlock("svg",et,tt)):(e.openBlock(),e.createElementBlock("svg",nt,rt))])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.label),1)],10,Ze)})),128))])]),e.createElementVNode("tbody",ot,[g.value?(e.openBlock(),e.createElementBlock("tr",at,[e.createElementVNode("td",{class:"text-center py-6 px-2 text-red-400 bg-red-50/80",colspan:e.unref(w).length},[it,e.createTextVNode(" Failed to load ")],8,st)])):e.unref(E).length<=0?(e.openBlock(),e.createElementBlock("tr",lt,[e.createElementVNode("td",{class:"text-center py-6 px-2 text-gray-500",colspan:e.unref(w).length}," No data ",8,ct)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(e.unref(E),(function(o,a){return e.openBlock(),e.createElementBlock(e.Fragment,{key:a},[t.is_ssp_mode||a+1>=e.unref(v).start&&a<e.unref(v).end?(e.openBlock(),e.createElementBlock("tr",ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),(function(t,a){return e.openBlock(),e.createElementBlock("td",{class:e.normalizeClass(["whitespace-nowrap px-3 py-4 text-sm text-gray-500",t.class]),key:a},["object"!==r(o[t.db])||Array.isArray(o[t.db])||null===o[t.db]?Array.isArray(o[t.db])?(e.openBlock(),e.createElementBlock("div",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o[t.db],(function(t){return e.renderSlot(n.$slots,t.slotName,{data:t})})),256))])):"html:"===o[t.db].toString().substring(0,5)?(e.openBlock(),e.createElementBlock("span",{key:2,innerHTML:o[t.db].substring(5)},null,8,pt)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createTextVNode(e.toDisplayString(o[t.db]),1)],64)):(e.openBlock(),e.createElementBlock("div",dt,[e.renderSlot(n.$slots,o[t.db].slotName,{data:o[t.db]})]))],2)})),128))])):e.createCommentVNode("",!0)],64)})),128)),h.value?(e.openBlock(),e.createElementBlock("div",mt,ht)):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",yt,[e.createElementVNode("div",gt,[e.createElementVNode("p",bt,[e.createTextVNode(" Showing "),e.createElementVNode("span",vt,e.toDisplayString(e.unref(v).start),1),e.createTextVNode(" to "),e.createElementVNode("span",wt,e.toDisplayString(e.unref(v).end),1),e.createTextVNode(" of "),e.createElementVNode("span",Et,e.toDisplayString(u.value),1),e.createTextVNode(" results "),p.value.length>0?(e.openBlock(),e.createElementBlock("span",Ot,[e.createTextVNode("(filtered from "),e.createElementVNode("span",St,e.toDisplayString(c.value),1),e.createTextVNode(" items)")])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[e.createElementVNode("nav",xt,[e.createElementVNode("a",{onClick:o[3]||(o[3]=function(e){return x(-1)}),href:"javascript:void(0);",class:e.normalizeClass(["relative inline-flex items-center rounded-l-md border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20",{"opacity-40 cursor-default":l.value<=1||h.value}])},kt,2),e.createElementVNode("span",null,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":o[4]||(o[4]=function(e){return l.value=e}),onChange:o[5]||(o[5]=function(e){return k()}),class:"relative inline-flex items-center border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20 appearance-none bg-none cursor-pointer text-center",disabled:e.unref(E).length<=0||h.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(S),(function(t){return e.openBlock(),e.createElementBlock("option",{key:t,value:t},e.toDisplayString(t),9,At)})),128))],40,Nt),[[e.vModelSelect,l.value]])]),e.createElementVNode("a",{onClick:o[6]||(o[6]=function(e){return x(1)}),href:"javascript:void(0);",class:e.normalizeClass(["relative inline-flex items-center rounded-r-md border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20",{"opacity-40 cursor-default":l.value>=e.unref(S)||h.value}])},Bt,2)])])])])}}},Tt=function(){var e=Rt;return e.install=function(t){t.component("DataTable",e)},e}(),Pt=Object.freeze({__proto__:null,default:Tt});return Object.entries(Pt).forEach((function(e){var t=a(e,2),n=t[0],r=t[1];"default"!==n&&(Tt[n]=r)})),Tt}(Vue); |
{ | ||
"name": "vue-tailwind-datatable", | ||
"version": "1.3.7", | ||
"version": "1.3.8", | ||
"description": "DataTable component for Vue3 using TailwindCSS", | ||
@@ -5,0 +5,0 @@ "main": "dist/data-table.ssr.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
289166
0.16%6550
0.12%