sm-click-library-ui 0.0.43 → 0.0.44
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getCurrentScope as Et, onScopeDispose as vt, unref as St, watch as ue, ref as
|
|
1
|
+
import { getCurrentScope as Et, onScopeDispose as vt, unref as St, watch as ue, ref as I, computed as Ue, openBlock as b, createElementBlock as _, createElementVNode as p, toDisplayString as k, normalizeClass as L, renderSlot as W, createCommentVNode as R, pushScopeId as $e, popScopeId as ze, onMounted as Ct, resolveComponent as Rt, createBlock as Se, withCtx as B, createTextVNode as Ot, Fragment as At, renderList as Tt, createVNode as Ce } from "vue";
|
|
2
2
|
function kt(e) {
|
|
3
3
|
return Et() ? (vt(e), !0) : !1;
|
|
4
4
|
}
|
|
@@ -90,9 +90,9 @@ const Ve = (e, t) => {
|
|
|
90
90
|
"fill-rule": "evenodd",
|
|
91
91
|
d: "M18.4 10.3A2 2 0 0 0 17 7H7a2 2 0 0 0-1.5 3.3l4.9 5.9a2 2 0 0 0 3 0l5-6Z",
|
|
92
92
|
"clip-rule": "evenodd"
|
|
93
|
-
}, null, -1)),
|
|
93
|
+
}, null, -1)), It = [
|
|
94
94
|
Mt
|
|
95
|
-
],
|
|
95
|
+
], Ut = {
|
|
96
96
|
key: 0,
|
|
97
97
|
class: "select_widget_lib"
|
|
98
98
|
}, $t = {
|
|
@@ -107,8 +107,8 @@ const Ve = (e, t) => {
|
|
|
107
107
|
},
|
|
108
108
|
emits: ["closeSelect"],
|
|
109
109
|
setup(e, { emit: t }) {
|
|
110
|
-
const s = e, n =
|
|
111
|
-
|
|
110
|
+
const s = e, n = I(!1), r = I(null);
|
|
111
|
+
Ue(
|
|
112
112
|
() => s.selectConfig.some((l) => l.freeSlot)
|
|
113
113
|
);
|
|
114
114
|
const o = () => {
|
|
@@ -134,10 +134,10 @@ const Ve = (e, t) => {
|
|
|
134
134
|
xmlns: "http://www.w3.org/2000/svg",
|
|
135
135
|
fill: "currentColor",
|
|
136
136
|
viewBox: "0 0 24 24"
|
|
137
|
-
},
|
|
137
|
+
}, It, 2))
|
|
138
138
|
])
|
|
139
139
|
]),
|
|
140
|
-
n.value ? (b(), _("section",
|
|
140
|
+
n.value ? (b(), _("section", Ut, [
|
|
141
141
|
p("div", null, [
|
|
142
142
|
W(l.$slots, "free-slot", {}, void 0, !0)
|
|
143
143
|
])
|
|
@@ -289,7 +289,7 @@ const Ve = (e, t) => {
|
|
|
289
289
|
}
|
|
290
290
|
},
|
|
291
291
|
setup(e) {
|
|
292
|
-
const t = e, s =
|
|
292
|
+
const t = e, s = Ue(() => t.success ? "border-green-500 text-green-500 shadow-md shadow-green-700" : t.info ? "border-blue-400 text-blue-400 shadow-md shadow-blue-700" : t.alert ? "border-yellow-400 text-yellow-400 shadow-md shadow-yellow-700" : t.error ? "border-red-500 text-red-500 shadow-md shadow-red-700" : "border-white text-white");
|
|
293
293
|
return (n, r) => (b(), _("div", {
|
|
294
294
|
class: L([s.value, "bg-base-300 border-2 p-2 rounded-lg flex-col items-center"])
|
|
295
295
|
}, [
|
|
@@ -314,7 +314,7 @@ function Xe(e, t) {
|
|
|
314
314
|
const { toString: gn } = Object.prototype, { getPrototypeOf: ge } = Object, ee = /* @__PURE__ */ ((e) => (t) => {
|
|
315
315
|
const s = gn.call(t);
|
|
316
316
|
return e[s] || (e[s] = s.slice(8, -1).toLowerCase());
|
|
317
|
-
})(/* @__PURE__ */ Object.create(null)), T = (e) => (e = e.toLowerCase(), (t) => ee(t) === e), te = (e) => (t) => typeof t === e, { isArray:
|
|
317
|
+
})(/* @__PURE__ */ Object.create(null)), T = (e) => (e = e.toLowerCase(), (t) => ee(t) === e), te = (e) => (t) => typeof t === e, { isArray: U } = Array, J = te("undefined");
|
|
318
318
|
function bn(e) {
|
|
319
319
|
return e !== null && !J(e) && e.constructor !== null && !J(e.constructor) && O(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
320
320
|
}
|
|
@@ -337,7 +337,7 @@ function V(e, t, { allOwnKeys: s = !1 } = {}) {
|
|
|
337
337
|
if (e === null || typeof e > "u")
|
|
338
338
|
return;
|
|
339
339
|
let n, r;
|
|
340
|
-
if (typeof e != "object" && (e = [e]),
|
|
340
|
+
if (typeof e != "object" && (e = [e]), U(e))
|
|
341
341
|
for (n = 0, r = e.length; n < r; n++)
|
|
342
342
|
t.call(null, e[n], n, e);
|
|
343
343
|
else {
|
|
@@ -360,7 +360,7 @@ const tt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typ
|
|
|
360
360
|
function de() {
|
|
361
361
|
const { caseless: e } = nt(this) && this || {}, t = {}, s = (n, r) => {
|
|
362
362
|
const o = e && et(t, r) || r;
|
|
363
|
-
G(t[o]) && G(n) ? t[o] = de(t[o], n) : G(n) ? t[o] = de({}, n) :
|
|
363
|
+
G(t[o]) && G(n) ? t[o] = de(t[o], n) : G(n) ? t[o] = de({}, n) : U(n) ? t[o] = n.slice() : t[o] = n;
|
|
364
364
|
};
|
|
365
365
|
for (let n = 0, r = arguments.length; n < r; n++)
|
|
366
366
|
arguments[n] && V(arguments[n], s);
|
|
@@ -382,13 +382,13 @@ const Fn = (e, t, s, { allOwnKeys: n } = {}) => (V(t, (r, o) => {
|
|
|
382
382
|
e = s !== !1 && ge(e);
|
|
383
383
|
} while (e && (!s || s(e, t)) && e !== Object.prototype);
|
|
384
384
|
return t;
|
|
385
|
-
},
|
|
385
|
+
}, In = (e, t, s) => {
|
|
386
386
|
e = String(e), (s === void 0 || s > e.length) && (s = e.length), s -= t.length;
|
|
387
387
|
const n = e.indexOf(t, s);
|
|
388
388
|
return n !== -1 && n === s;
|
|
389
|
-
},
|
|
389
|
+
}, Un = (e) => {
|
|
390
390
|
if (!e) return null;
|
|
391
|
-
if (
|
|
391
|
+
if (U(e)) return e;
|
|
392
392
|
let t = e.length;
|
|
393
393
|
if (!Qe(t)) return null;
|
|
394
394
|
const s = new Array(t);
|
|
@@ -440,7 +440,7 @@ const Fn = (e, t, s, { allOwnKeys: n } = {}) => (V(t, (r, o) => {
|
|
|
440
440
|
s[o] = !0;
|
|
441
441
|
});
|
|
442
442
|
};
|
|
443
|
-
return
|
|
443
|
+
return U(e) ? n(e) : n(String(e).split(t)), s;
|
|
444
444
|
}, Kn = () => {
|
|
445
445
|
}, Gn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, ie = "abcdefghijklmnopqrstuvwxyz", Ae = "0123456789", rt = {
|
|
446
446
|
DIGIT: Ae,
|
|
@@ -463,7 +463,7 @@ const Qn = (e) => {
|
|
|
463
463
|
return;
|
|
464
464
|
if (!("toJSON" in n)) {
|
|
465
465
|
t[r] = n;
|
|
466
|
-
const o =
|
|
466
|
+
const o = U(n) ? [] : {};
|
|
467
467
|
return V(n, (i, l) => {
|
|
468
468
|
const h = s(i, r + 1);
|
|
469
469
|
!J(h) && (o[l] = h);
|
|
@@ -474,7 +474,7 @@ const Qn = (e) => {
|
|
|
474
474
|
};
|
|
475
475
|
return s(e, 0);
|
|
476
476
|
}, es = T("AsyncFunction"), ts = (e) => e && (ne(e) || O(e)) && O(e.then) && O(e.catch), a = {
|
|
477
|
-
isArray:
|
|
477
|
+
isArray: U,
|
|
478
478
|
isArrayBuffer: Ye,
|
|
479
479
|
isBuffer: bn,
|
|
480
480
|
isFormData: An,
|
|
@@ -507,8 +507,8 @@ const Qn = (e) => {
|
|
|
507
507
|
toFlatObject: Mn,
|
|
508
508
|
kindOf: ee,
|
|
509
509
|
kindOfTest: T,
|
|
510
|
-
endsWith:
|
|
511
|
-
toArray:
|
|
510
|
+
endsWith: In,
|
|
511
|
+
toArray: Un,
|
|
512
512
|
forEachEntry: zn,
|
|
513
513
|
matchAll: qn,
|
|
514
514
|
isHTMLForm: Hn,
|
|
@@ -1471,7 +1471,7 @@ const Ds = async (e) => {
|
|
|
1471
1471
|
}, Ms = async (e, t) => {
|
|
1472
1472
|
const s = a.toFiniteNumber(e.getContentLength());
|
|
1473
1473
|
return s ?? Ds(t);
|
|
1474
|
-
},
|
|
1474
|
+
}, Is = re && (async (e) => {
|
|
1475
1475
|
let {
|
|
1476
1476
|
url: t,
|
|
1477
1477
|
method: s,
|
|
@@ -1554,7 +1554,7 @@ const Ds = async (e) => {
|
|
|
1554
1554
|
}), me = {
|
|
1555
1555
|
http: ns,
|
|
1556
1556
|
xhr: Ls,
|
|
1557
|
-
fetch:
|
|
1557
|
+
fetch: Is
|
|
1558
1558
|
};
|
|
1559
1559
|
a.forEach(me, (e, t) => {
|
|
1560
1560
|
if (e) {
|
|
@@ -1565,7 +1565,7 @@ a.forEach(me, (e, t) => {
|
|
|
1565
1565
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1566
1566
|
}
|
|
1567
1567
|
});
|
|
1568
|
-
const De = (e) => `- ${e}`,
|
|
1568
|
+
const De = (e) => `- ${e}`, Us = (e) => a.isFunction(e) || e === null || e === !1, yt = {
|
|
1569
1569
|
getAdapter: (e) => {
|
|
1570
1570
|
e = a.isArray(e) ? e : [e];
|
|
1571
1571
|
const { length: t } = e;
|
|
@@ -1574,7 +1574,7 @@ const De = (e) => `- ${e}`, Is = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1574
1574
|
for (let o = 0; o < t; o++) {
|
|
1575
1575
|
s = e[o];
|
|
1576
1576
|
let i;
|
|
1577
|
-
if (n = s, !
|
|
1577
|
+
if (n = s, !Us(s) && (n = me[(i = String(s)).toLowerCase()], n === void 0))
|
|
1578
1578
|
throw new g(`Unknown adapter '${i}'`);
|
|
1579
1579
|
if (n)
|
|
1580
1580
|
break;
|
|
@@ -1624,7 +1624,7 @@ const gt = "1.7.2", xe = {};
|
|
|
1624
1624
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1625
1625
|
};
|
|
1626
1626
|
});
|
|
1627
|
-
const
|
|
1627
|
+
const Ie = {};
|
|
1628
1628
|
xe.transitional = function(t, s, n) {
|
|
1629
1629
|
function r(o, i) {
|
|
1630
1630
|
return "[Axios v" + gt + "] Transitional option '" + o + "'" + i + (n ? ". " + n : "");
|
|
@@ -1635,7 +1635,7 @@ xe.transitional = function(t, s, n) {
|
|
|
1635
1635
|
r(i, " has been removed" + (s ? " in " + s : "")),
|
|
1636
1636
|
g.ERR_DEPRECATED
|
|
1637
1637
|
);
|
|
1638
|
-
return s && !
|
|
1638
|
+
return s && !Ie[i] && (Ie[i] = !0, console.warn(
|
|
1639
1639
|
r(
|
|
1640
1640
|
i,
|
|
1641
1641
|
" has been deprecated since v" + s + " and will be removed in the near future"
|
|
@@ -2129,7 +2129,7 @@ const Hs = { class: "w-full relative text-current" }, Js = { class: "flex cursor
|
|
|
2129
2129
|
},
|
|
2130
2130
|
emits: ["update:modelValue", "function"],
|
|
2131
2131
|
setup(e, { emit: t }) {
|
|
2132
|
-
const s =
|
|
2132
|
+
const s = I(!1), n = I(null), r = I(!0), o = e, i = t, l = I(null);
|
|
2133
2133
|
async function h() {
|
|
2134
2134
|
try {
|
|
2135
2135
|
let d = o.url, m = o.status_url;
|
|
@@ -2263,10 +2263,10 @@ const Hs = { class: "w-full relative text-current" }, Js = { class: "flex cursor
|
|
|
2263
2263
|
Ce(w, {
|
|
2264
2264
|
class: "dark:popper-light popper-dark",
|
|
2265
2265
|
hover: !0,
|
|
2266
|
-
placement: "
|
|
2266
|
+
placement: "right"
|
|
2267
2267
|
}, {
|
|
2268
2268
|
content: B(() => [
|
|
2269
|
-
p("span", null, k(e.type && u.type !== e.type ? "
|
|
2269
|
+
p("span", null, k(e.type && u.type !== e.type ? "Não é possível utilizar esse tipo de Instância neste recurso" : e.webhooks === !0 ? "Essa instância está com o Atendimento desabilitado" : "Essa aplicação é somente para instâncias sem atendimento habilitado."), 1)
|
|
2270
2270
|
]),
|
|
2271
2271
|
default: B(() => [
|
|
2272
2272
|
e.type && u.type !== e.type || e.webhooks !== void 0 && e.webhooks !== u.webhooks ? (b(), _("svg", Rr, Ar)) : R("", !0)
|
|
@@ -2322,7 +2322,7 @@ const Hs = { class: "w-full relative text-current" }, Js = { class: "flex cursor
|
|
|
2322
2322
|
function Dr(e) {
|
|
2323
2323
|
e.component("primarySelect", Ze), e.component("simpleModal", Ke), e.component("simpleCard", Ge), e.component("instanceSelect", _t);
|
|
2324
2324
|
}
|
|
2325
|
-
const
|
|
2325
|
+
const Ir = {
|
|
2326
2326
|
install: Dr,
|
|
2327
2327
|
primarySelect: Ze,
|
|
2328
2328
|
simpleModal: Ke,
|
|
@@ -2330,5 +2330,5 @@ const Ur = {
|
|
|
2330
2330
|
instanceSelect: _t
|
|
2331
2331
|
};
|
|
2332
2332
|
export {
|
|
2333
|
-
|
|
2333
|
+
Ir as default
|
|
2334
2334
|
};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...o){const n=new this(t);return o.forEach(r=>n.set(r)),n}static accessor(t){const n=(this[He]=this[He]={accessors:{}}).accessors,r=this.prototype;function i(a){const c=I(a);n[c]||(Un(r,a),n[c]=!0)}return l.isArray(t)?t.forEach(i):i(t),this}}x.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(x.prototype,({value:e},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[o]=n}}}),l.freezeMethods(x);function ie(e,t){const o=this||$,n=t||o,r=x.from(n.headers);let i=n.data;return l.forEach(e,function(c){i=c.call(o,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function Je(e){return!!(e&&e.__CANCEL__)}function P(e,t,o){g.call(this,e??"canceled",g.ERR_CANCELED,t,o),this.name="CanceledError"}l.inherits(P,g,{__CANCEL__:!0});function Ze(e,t,o){const n=o.config.validateStatus;!o.status||!n||n(o.status)?e(o):t(new g("Request failed with status code "+o.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function zn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function qn(e,t){e=e||10;const o=new Array(e),n=new Array(e);let r=0,i=0,a;return t=t!==void 0?t:1e3,function(h){const p=Date.now(),d=n[i];a||(a=p),o[r]=h,n[r]=p;let f=i,m=0;for(;f!==r;)m+=o[f++],f=f%e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),p-a<t)return;const w=d&&p-d;return w?Math.round(m*1e3/w):void 0}}function Hn(e,t){let o=0;const n=1e3/t;let r=null;return function(){const a=this===!0,c=Date.now();if(a||c-o>n)return r&&(clearTimeout(r),r=null),o=c,e.apply(null,arguments);r||(r=setTimeout(()=>(r=null,o=Date.now(),e.apply(null,arguments)),n-(c-o)))}}const K=(e,t,o=3)=>{let n=0;const r=qn(50,250);return Hn(i=>{const a=i.loaded,c=i.lengthComputable?i.total:void 0,h=a-n,p=r(h),d=a<=c;n=a;const f={loaded:a,total:c,progress:c?a/c:void 0,bytes:h,rate:p||void 0,estimated:p&&c&&d?(c-a)/p:void 0,event:i,lengthComputable:c!=null};f[t?"download":"upload"]=!0,e(f)},o)},Jn=N.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");let n;function r(i){let a=i;return t&&(o.setAttribute("href",a),a=o.href),o.setAttribute("href",a),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:o.pathname.charAt(0)==="/"?o.pathname:"/"+o.pathname}}return n=r(window.location.href),function(a){const c=l.isString(a)?r(a):a;return c.protocol===n.protocol&&c.host===n.host}}():function(){return function(){return!0}}(),Zn=N.hasStandardBrowserEnv?{write(e,t,o,n,r,i){const a=[e+"="+encodeURIComponent(t)];l.isNumber(o)&&a.push("expires="+new Date(o).toGMTString()),l.isString(n)&&a.push("path="+n),l.isString(r)&&a.push("domain="+r),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Wn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function We(e,t){return e&&!Wn(t)?vn(e,t):t}const ve=e=>e instanceof x?{...e}:e;function A(e,t){t=t||{};const o={};function n(p,d,f){return l.isPlainObject(p)&&l.isPlainObject(d)?l.merge.call({caseless:f},p,d):l.isPlainObject(d)?l.merge({},d):l.isArray(d)?d.slice():d}function r(p,d,f){if(l.isUndefined(d)){if(!l.isUndefined(p))return n(void 0,p,f)}else return n(p,d,f)}function i(p,d){if(!l.isUndefined(d))return n(void 0,d)}function a(p,d){if(l.isUndefined(d)){if(!l.isUndefined(p))return n(void 0,p)}else return n(void 0,d)}function c(p,d,f){if(f in t)return n(p,d);if(f in e)return n(void 0,p)}const h={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(p,d)=>r(ve(p),ve(d),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=h[d]||r,m=f(e[d],t[d],d);l.isUndefined(m)&&f!==c||(o[d]=m)}),o}const Ke=e=>{const t=A({},e);let{data:o,withXSRFToken:n,xsrfHeaderName:r,xsrfCookieName:i,headers:a,auth:c}=t;t.headers=a=x.from(a),t.url=Ie(We(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let h;if(l.isFormData(o)){if(N.hasStandardBrowserEnv||N.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((h=a.getContentType())!==!1){const[p,...d]=h?h.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([p||"multipart/form-data",...d].join("; "))}}if(N.hasStandardBrowserEnv&&(n&&l.isFunction(n)&&(n=n(t)),n||n!==!1&&Jn(t.url))){const p=r&&i&&Zn.read(i);p&&a.set(r,p)}return t},Kn=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(o,n){const r=Ke(e);let i=r.data;const a=x.from(r.headers).normalize();let{responseType:c}=r,h;function p(){r.cancelToken&&r.cancelToken.unsubscribe(h),r.signal&&r.signal.removeEventListener("abort",h)}let d=new XMLHttpRequest;d.open(r.method.toUpperCase(),r.url,!0),d.timeout=r.timeout;function f(){if(!d)return;const w=x.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),y={data:!c||c==="text"||c==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:w,config:e,request:d};Ze(function(C){o(C),p()},function(C){n(C),p()},y),d=null}"onloadend"in d?d.onloadend=f:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(f)},d.onabort=function(){d&&(n(new g("Request aborted",g.ECONNABORTED,r,d)),d=null)},d.onerror=function(){n(new g("Network Error",g.ERR_NETWORK,r,d)),d=null},d.ontimeout=function(){let u=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const y=r.transitional||ze;r.timeoutErrorMessage&&(u=r.timeoutErrorMessage),n(new g(u,y.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,r,d)),d=null},i===void 0&&a.setContentType(null),"setRequestHeader"in d&&l.forEach(a.toJSON(),function(u,y){d.setRequestHeader(y,u)}),l.isUndefined(r.withCredentials)||(d.withCredentials=!!r.withCredentials),c&&c!=="json"&&(d.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&d.addEventListener("progress",K(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",K(r.onUploadProgress)),(r.cancelToken||r.signal)&&(h=w=>{d&&(n(!w||w.type?new P(null,e,d):w),d.abort(),d=null)},r.cancelToken&&r.cancelToken.subscribe(h),r.signal&&(r.signal.aborted?h():r.signal.addEventListener("abort",h)));const m=zn(r.url);if(m&&N.protocols.indexOf(m)===-1){n(new g("Unsupported protocol "+m+":",g.ERR_BAD_REQUEST,e));return}d.send(i||null)})},Xn=(e,t)=>{let o=new AbortController,n;const r=function(h){if(!n){n=!0,a();const p=h instanceof Error?h:this.reason;o.abort(p instanceof g?p:new P(p instanceof Error?p.message:p))}};let i=t&&setTimeout(()=>{r(new g(`timeout ${t} of ms exceeded`,g.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(h=>{h&&(h.removeEventListener?h.removeEventListener("abort",r):h.unsubscribe(r))}),e=null)};e.forEach(h=>h&&h.addEventListener&&h.addEventListener("abort",r));const{signal:c}=o;return c.unsubscribe=a,[c,()=>{i&&clearTimeout(i),i=null}]},Gn=function*(e,t){let o=e.byteLength;if(!t||o<t){yield e;return}let n=0,r;for(;n<o;)r=n+t,yield e.slice(n,r),n=r},Yn=async function*(e,t,o){for await(const n of e)yield*Gn(ArrayBuffer.isView(n)?n:await o(String(n)),t)},Xe=(e,t,o,n,r)=>{const i=Yn(e,t,r);let a=0;return new ReadableStream({type:"bytes",async pull(c){const{done:h,value:p}=await i.next();if(h){c.close(),n();return}let d=p.byteLength;o&&o(a+=d),c.enqueue(new Uint8Array(p))},cancel(c){return n(c),i.return()}},{highWaterMark:2})},Ge=(e,t)=>{const o=e!=null;return n=>setTimeout(()=>t({lengthComputable:o,total:e,loaded:n}))},X=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ye=X&&typeof ReadableStream=="function",ae=X&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Qn=Ye&&(()=>{let e=!1;const t=new Request(N.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Qe=64*1024,le=Ye&&!!(()=>{try{return l.isReadableStream(new Response("").body)}catch{}})(),G={stream:le&&(e=>e.body)};X&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!G[t]&&(G[t]=l.isFunction(e[t])?o=>o[t]():(o,n)=>{throw new g(`Response type '${t}' is not supported`,g.ERR_NOT_SUPPORT,n)})})})(new Response);const eo=async e=>{if(e==null)return 0;if(l.isBlob(e))return e.size;if(l.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(l.isArrayBufferView(e))return e.byteLength;if(l.isURLSearchParams(e)&&(e=e+""),l.isString(e))return(await ae(e)).byteLength},to=async(e,t)=>{const o=l.toFiniteNumber(e.getContentLength());return o??eo(t)},ce={http:Sn,xhr:Kn,fetch:X&&(async e=>{let{url:t,method:o,data:n,signal:r,cancelToken:i,timeout:a,onDownloadProgress:c,onUploadProgress:h,responseType:p,headers:d,withCredentials:f="same-origin",fetchOptions:m}=Ke(e);p=p?(p+"").toLowerCase():"text";let[w,u]=r||i||a?Xn([r,i],a):[],y,_;const C=()=>{!y&&setTimeout(()=>{w&&w.unsubscribe()}),y=!0};let R;try{if(h&&Qn&&o!=="get"&&o!=="head"&&(R=await to(d,n))!==0){let B=new Request(t,{method:"POST",body:n,duplex:"half"}),V;l.isFormData(n)&&(V=B.headers.get("content-type"))&&d.setContentType(V),B.body&&(n=Xe(B.body,Qe,Ge(R,K(h)),null,ae))}l.isString(f)||(f=f?"cors":"omit"),_=new Request(t,{...m,signal:w,method:o.toUpperCase(),headers:d.normalize().toJSON(),body:n,duplex:"half",withCredentials:f});let E=await fetch(_);const U=le&&(p==="stream"||p==="response");if(le&&(c||U)){const B={};["status","statusText","headers"].forEach(at=>{B[at]=E[at]});const V=l.toFiniteNumber(E.headers.get("content-length"));E=new Response(Xe(E.body,Qe,c&&Ge(V,K(c,!0)),U&&C,ae),B)}p=p||"text";let Wo=await G[l.findKey(G,p)||"text"](E,e);return!U&&C(),u&&u(),await new Promise((B,V)=>{Ze(B,V,{data:Wo,headers:x.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:_})})}catch(E){throw C(),E&&E.name==="TypeError"&&/fetch/i.test(E.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,e,_),{cause:E.cause||E}):g.from(E,E&&E.code,e,_)}})};l.forEach(ce,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const et=e=>`- ${e}`,no=e=>l.isFunction(e)||e===null||e===!1,tt={getAdapter:e=>{e=l.isArray(e)?e:[e];const{length:t}=e;let o,n;const r={};for(let i=0;i<t;i++){o=e[i];let a;if(n=o,!no(o)&&(n=ce[(a=String(o)).toLowerCase()],n===void 0))throw new g(`Unknown adapter '${a}'`);if(n)break;r[a||"#"+i]=n}if(!n){const i=Object.entries(r).map(([c,h])=>`adapter ${c} `+(h===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
|
|
4
4
|
`+i.map(et).join(`
|
|
5
5
|
`):" "+et(i[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:ce};function de(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new P(null,e)}function nt(e){return de(e),e.headers=x.from(e.headers),e.data=ie.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tt.getAdapter(e.adapter||$.adapter)(e).then(function(n){return de(e),n.data=ie.call(e,e.transformResponse,n),n.headers=x.from(n.headers),n},function(n){return Je(n)||(de(e),n&&n.response&&(n.response.data=ie.call(e,e.transformResponse,n.response),n.response.headers=x.from(n.response.headers))),Promise.reject(n)})}const ot="1.7.2",ue={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ue[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const rt={};ue.transitional=function(t,o,n){function r(i,a){return"[Axios v"+ot+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return(i,a,c)=>{if(t===!1)throw new g(r(a," has been removed"+(o?" in "+o:"")),g.ERR_DEPRECATED);return o&&!rt[a]&&(rt[a]=!0,console.warn(r(a," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(i,a,c):!0}};function oo(e,t,o){if(typeof e!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let r=n.length;for(;r-- >0;){const i=n[r],a=t[i];if(a){const c=e[i],h=c===void 0||a(c,i,e);if(h!==!0)throw new g("option "+i+" must be "+h,g.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new g("Unknown option "+i,g.ERR_BAD_OPTION)}}const fe={assertOptions:oo,validators:ue},O=fe.validators;class T{constructor(t){this.defaults=t,this.interceptors={request:new Ue,response:new Ue}}async request(t,o){try{return await this._request(t,o)}catch(n){if(n instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
6
|
-
`+i):n.stack=i}catch{}}throw n}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=A(this.defaults,o);const{transitional:n,paramsSerializer:r,headers:i}=o;n!==void 0&&fe.assertOptions(n,{silentJSONParsing:O.transitional(O.boolean),forcedJSONParsing:O.transitional(O.boolean),clarifyTimeoutError:O.transitional(O.boolean)},!1),r!=null&&(l.isFunction(r)?o.paramsSerializer={serialize:r}:fe.assertOptions(r,{encode:O.function,serialize:O.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=i&&l.merge(i.common,i[o.method]);i&&l.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),o.headers=x.concat(a,i);const c=[];let h=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(o)===!1||(h=h&&y.synchronous,c.unshift(y.fulfilled,y.rejected))});const p=[];this.interceptors.response.forEach(function(y){p.push(y.fulfilled,y.rejected)});let d,f=0,m;if(!h){const u=[nt.bind(this),void 0];for(u.unshift.apply(u,c),u.push.apply(u,p),m=u.length,d=Promise.resolve(o);f<m;)d=d.then(u[f++],u[f++]);return d}m=c.length;let w=o;for(f=0;f<m;){const u=c[f++],y=c[f++];try{w=u(w)}catch(_){y.call(this,_);break}}try{d=nt.call(this,w)}catch(u){return Promise.reject(u)}for(f=0,m=p.length;f<m;)d=d.then(p[f++],p[f++]);return d}getUri(t){t=A(this.defaults,t);const o=We(t.baseURL,t.url);return Ie(o,t.params,t.paramsSerializer)}}l.forEach(["delete","get","head","options"],function(t){T.prototype[t]=function(o,n){return this.request(A(n||{},{method:t,url:o,data:(n||{}).data}))}}),l.forEach(["post","put","patch"],function(t){function o(n){return function(i,a,c){return this.request(A(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}T.prototype[t]=o(),T.prototype[t+"Form"]=o(!0)});class pe{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(i){o=i});const n=this;this.promise.then(r=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](r);n._listeners=null}),this.promise.then=r=>{let i;const a=new Promise(c=>{n.subscribe(c),i=c}).then(r);return a.cancel=function(){n.unsubscribe(i)},a},t(function(i,a,c){n.reason||(n.reason=new P(i,a,c),o(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}static source(){let t;return{token:new pe(function(r){t=r}),cancel:t}}}function ro(e){return function(o){return e.apply(null,o)}}function so(e){return l.isObject(e)&&e.isAxiosError===!0}const he={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(he).forEach(([e,t])=>{he[t]=e});function st(e){const t=new T(e),o=Se(T.prototype.request,t);return l.extend(o,T.prototype,t,{allOwnKeys:!0}),l.extend(o,t,null,{allOwnKeys:!0}),o.create=function(r){return st(A(e,r))},o}const b=st($);b.Axios=T,b.CanceledError=P,b.CancelToken=pe,b.isCancel=Je,b.VERSION=ot,b.toFormData=W,b.AxiosError=g,b.Cancel=b.CanceledError,b.all=function(t){return Promise.all(t)},b.spread=ro,b.isAxiosError=so,b.mergeConfig=A,b.AxiosHeaders=x,b.formToJSON=e=>qe(l.isHTMLForm(e)?new FormData(e):e),b.getAdapter=tt.getAdapter,b.HttpStatusCode=he,b.default=b;const io={class:"w-full relative text-current"},ao={class:"flex cursor-pointer justify-between items-center"},lo={key:0},co={key:0},uo={key:1,class:"flex items-center gap-2"},fo={class:"flex gap-3 items-center flex-shrink-0"},po={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-5 h-5 text-green-400",viewBox:"0 0 16 16"},ho=[s.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"},null,-1)],mo={key:1,class:"relative"},wo=s.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-5 h-5 text-green-400",viewBox:"0 0 16 16"},[s.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})],-1),yo={style:{color:"#0081FB"},xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"w-5 h-5 absolute -bottom-2 -right-2 rounded-full bi bi-meta",viewBox:"0 0 16 16"},go=[s.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.217 5.243C9.145 3.988 10.171 3 11.483 3 13.96 3 16 6.153 16.001 9.907c0 2.29-.986 3.725-2.757 3.725-1.543 0-2.395-.866-3.924-3.424l-.667-1.123-.118-.197a54.944 54.944 0 0 0-.53-.877l-1.178 2.08c-1.673 2.925-2.615 3.541-3.923 3.541C1.086 13.632 0 12.217 0 9.973 0 6.388 1.995 3 4.598 3c.319 0 .625.039.924.122.31.086.611.22.913.407.577.359 1.154.915 1.782 1.714Zm1.516 2.224c-.252-.41-.494-.787-.727-1.133L9 6.326c.845-1.305 1.543-1.954 2.372-1.954 1.723 0 3.102 2.537 3.102 5.653 0 1.188-.39 1.877-1.195 1.877-.773 0-1.142-.51-2.61-2.87l-.937-1.565ZM4.846 4.756c.725.1 1.385.634 2.34 2.001A212.13 212.13 0 0 0 5.551 9.3c-1.357 2.126-1.826 2.603-2.581 2.603-.777 0-1.24-.682-1.24-1.9 0-2.602 1.298-5.264 2.846-5.264.091 0 .181.006.27.018Z"},null,-1)],Eo={class:"my-auto text-center mx-auto group-hover:inline-block"},bo={class:"w-full"},_o={key:1,class:"flex items-center gap-2 justify-center"},Co=s.createElementVNode("svg",{"aria-hidden":"true",class:"inline w-5 h-5 text-blue-300 animate-spin fill-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s.createElementVNode("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),s.createElementVNode("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),xo={class:"flex px-4 items-center gap-2"},So=[s.createElementVNode("svg",{class:"w-4 h-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},[s.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18 17.94 6M18 18 6.06 6"})],-1)],ko=[s.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m19 9-7 7-7-7"},null,-1)],No={key:0,class:"rounded-b-lg overflow-y-auto max-h-[200px] absolute top-[48px] w-full z-20 text-sm shadow shadow-black dark:shadow-gray-400 bg-base-300 p-2"},Ro={class:"gap-2 flex flex-col"},Oo={class:"select-none cursor-pointer w-full"},Bo=["onClick","disabled"],Ao={class:"flex w-full items-center pl-2 gap-3"},To={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-4 h-4 flex-shrink-0 text-green-400",viewBox:"0 0 16 16"},Lo=[s.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"},null,-1)],Po={key:1,class:"relative"},Vo=s.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-4 h-4 flex-shrink-0 text-green-400",viewBox:"0 0 16 16"},[s.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})],-1),Do={style:{color:"#0081FB"},xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"w-4 h-4 absolute flex-shrink-0 -bottom-2 -right-2 rounded-full bi bi-meta",viewBox:"0 0 16 16"},Fo=[s.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.217 5.243C9.145 3.988 10.171 3 11.483 3 13.96 3 16 6.153 16.001 9.907c0 2.29-.986 3.725-2.757 3.725-1.543 0-2.395-.866-3.924-3.424l-.667-1.123-.118-.197a54.944 54.944 0 0 0-.53-.877l-1.178 2.08c-1.673 2.925-2.615 3.541-3.923 3.541C1.086 13.632 0 12.217 0 9.973 0 6.388 1.995 3 4.598 3c.319 0 .625.039.924.122.31.086.611.22.913.407.577.359 1.154.915 1.782 1.714Zm1.516 2.224c-.252-.41-.494-.787-.727-1.133L9 6.326c.845-1.305 1.543-1.954 2.372-1.954 1.723 0 3.102 2.537 3.102 5.653 0 1.188-.39 1.877-1.195 1.877-.773 0-1.142-.51-2.61-2.87l-.937-1.565ZM4.846 4.756c.725.1 1.385.634 2.34 2.001A212.13 212.13 0 0 0 5.551 9.3c-1.357 2.126-1.826 2.603-2.581 2.603-.777 0-1.24-.682-1.24-1.9 0-2.602 1.298-5.264 2.846-5.264.091 0 .181.006.27.018Z"},null,-1)],jo={key:0,class:"w-6 h-6 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},Mo=[s.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 10V7a4 4 0 1 1 8 0v3h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h1Zm2-3a2 2 0 1 1 4 0v3h-4V7Zm2 6a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z","clip-rule":"evenodd"},null,-1)],$o={class:"w-full text-center"},Io={class:"my-auto text-center mx-auto group-hover:inline-block"},Uo={key:1,class:"flex justify-center"},zo=[s.createElementVNode("div",{class:"h-5 w-5 border-t-transparent border-solid animate-spin rounded-full border-white border-4"},null,-1)],qo={class:"flex min-w-[50px] text-sm text-center items-center my-auto flex-shrink-0 px-1 justify-center"},Ho=s.createElementVNode("svg",{class:"w-6 h-6","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[s.createElementVNode("path",{d:"M7.978 4a2.553 2.553 0 0 0-1.926.877C4.233 6.7 3.699 8.751 4.153 10.814c.44 1.995 1.778 3.893 3.456 5.572 1.68 1.679 3.577 3.018 5.57 3.459 2.062.456 4.115-.073 5.94-1.885a2.556 2.556 0 0 0 .001-3.861l-1.21-1.21a2.689 2.689 0 0 0-3.802 0l-.617.618a.806.806 0 0 1-1.14 0l-1.854-1.855a.807.807 0 0 1 0-1.14l.618-.62a2.692 2.692 0 0 0 0-3.803l-1.21-1.211A2.555 2.555 0 0 0 7.978 4Z"})],-1),Jo={key:1,class:"p-4"},it={__name:"index",props:{modelValue:{type:Object,default:null},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzIyNTE5NjE1LCJpYXQiOjE3MjI0MzMyMTUsImp0aSI6ImUzYzJmMThjZmNjODQ1NTY4OTBhNmZjNDk4OTM2M2NhIiwidXNlcl9pZCI6IjYyNGRmZTIzLTkyZDAtNDNmMS04MDYxLWEyMzIxZjJiNWViYiJ9.lIQ_m_89bc4rskubPHm0YTNkzn_PwGpJmedLr_A0MkM"},type:{type:String},webhooks:{type:Boolean,default:void 0},url:{type:String,default:"http://localhost:8000/v1/api/instances/instance/"},status_url:{type:String,default:"http://localhost:8000/v1/api/instances/status_instance/"}},emits:["update:modelValue","function"],setup(e,{emit:t}){const o=s.ref(!1),n=s.ref(null),r=s.ref(!0),i=e,a=t,c=s.ref(null);async function h(){try{let f=i.url,m=i.status_url;const u=await b.get(`${f}`,{headers:{Authorization:`Bearer ${i.token}`}});c.value=u.data,c.value.forEach(async y=>{y.isLoading=!0;try{(await b.get(`${m}?instance=${y.id}`,{headers:{Authorization:`Bearer ${i.token}`}})).data.instance_status!=="Disconnected"?y.status=!0:y.status=!1}catch{y.status="Offline"}y.isLoading=!1})}catch(f){console.log(f)}r.value=!1}function p(f){n.value=f,a("function",f)}s.watch(()=>i.modelValue,f=>{n.value=f},{immediate:!0}),s.watch(n,f=>{a("update:modelValue",f)}),s.onMounted(async()=>{await h()});function d(f){if(f=f.replace(/\D/g,""),f.length>=12&&f.startsWith("55"))return"+"+f.slice(0,2)+" "+f.slice(2,4)+" "+f.slice(4,9)+"-"+f.slice(9);if(f.length===11)return"+55 "+f.slice(0,2)+" "+f.slice(2,7)+"-"+f.slice(7);if(f.length===10){const m=f.slice(0,2),w=f.slice(2);return"+55 "+m+" "+w.slice(0,5)+"-"+w.slice(5)}else return f}return(f,m)=>{const w=s.resolveComponent("Popper");return s.openBlock(),s.createElementBlock("main",io,[s.createElementVNode("div",{class:s.normalizeClass([{"rounded-b-none":o.value},"rounded-lg shadow dark:shadow-gray-400 shadow-gray-900 dark:bg-base-100 bg-base-100 text-center"])},[s.createElementVNode("div",ao,[s.createElementVNode("p",{onClick:m[0]||(m[0]=u=>o.value=!o.value),class:"w-full p-3 px-4 select-none"},[r.value?(s.openBlock(),s.createElementBlock("div",_o,[Co,s.createTextVNode("Carregando instâncias...")])):(s.openBlock(),s.createElementBlock("div",lo,[n.value?(s.openBlock(),s.createElementBlock("span",uo,[s.createElementVNode("header",fo,[n.value.type==="whatsapp-qrcode"?(s.openBlock(),s.createElementBlock("svg",po,ho)):n.value.type==="whatsapp-api-official"?(s.openBlock(),s.createElementBlock("div",mo,[wo,(s.openBlock(),s.createElementBlock("svg",yo,go))])):s.createCommentVNode("",!0),n.value&&n.value.status!==void 0?(s.openBlock(),s.createBlock(w,{key:2,class:"dark:popper-light popper-dark",hover:!0,placement:"right"},{content:s.withCtx(()=>[s.createElementVNode("main",{class:s.normalizeClass(["p-1 rounded px-3",{"bg-red-500":n.value.status===!1,"bg-green-500":n.value.status===!0,"bg-purple-500":n.value.status==="Offline"}])},[s.createElementVNode("div",Eo,s.toDisplayString(n.value.status===!0?"Conectada":n.value.status===!1?"Desconectada":"Indefinida"),1)],2)]),default:s.withCtx(()=>[n.value.isLoading?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass([{"bg-red-500":n.value.status===!1,"bg-green-500":n.value.status===!0,"bg-purple-500":n.value.status==="Offline"},"text-xs w-5 h-5 py-1 shadow flex justify-start shadow-gray-900 dark:shadow-gray-400 rounded-full cursor-pointer transition-all duration-200 ease-in-out"])},null,2))]),_:1})):s.createCommentVNode("",!0)]),s.createElementVNode("div",bo,s.toDisplayString(n.value.name),1)])):(s.openBlock(),s.createElementBlock("span",co,s.toDisplayString(c.value?c.value.length:"Sem")+" Instâncias disponíveis",1))]))]),s.createElementVNode("footer",xo,[s.createElementVNode("button",{onClick:m[1]||(m[1]=u=>(n.value=null,o.value=!1))},So),s.createElementVNode("button",{onClick:m[2]||(m[2]=u=>o.value=!o.value)},[(s.openBlock(),s.createElementBlock("svg",{class:s.normalizeClass([{"rotate-180":o.value},"w-4 h-4 ease-out transition"]),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},ko,2))])])])],2),o.value?(s.openBlock(),s.createElementBlock("nav",No,[s.createElementVNode("ul",Ro,[c.value.length>0?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(c.value,(u,y)=>(s.openBlock(),s.createElementBlock("li",Oo,[s.createElementVNode("button",{class:s.normalizeClass([n.value&&n.value.id===u.id?"bg-base-100":"bg-base-200 hover:bg-base-100","flex rounded-md justify-between items-center p-2 px-1 w-full"]),onClick:_=>(n.value=u,o.value=!1,p(u)),disabled:n.value&&n.value.id===u.id||e.type&&u.type!==e.type||e.webhooks!==void 0&&e.webhooks!==u.webhooks},[s.createElementVNode("div",Ao,[u.type==="whatsapp-qrcode"?(s.openBlock(),s.createElementBlock("svg",To,Lo)):u.type==="whatsapp-api-official"?(s.openBlock(),s.createElementBlock("div",Po,[Vo,(s.openBlock(),s.createElementBlock("svg",Do,Fo))])):s.createCommentVNode("",!0),s.createVNode(w,{class:"dark:popper-light popper-dark",hover:!0,placement:"left"},{content:s.withCtx(()=>[s.createElementVNode("span",null,s.toDisplayString(e.type&&u.type!==e.type?"Esse tipo de instância não é permitido nessa aplicação.":e.webhooks===!0?"O atendimento não está habilitado para essa instância":"Essa aplicação é somente para instâncias sem atendimento habilitado."),1)]),default:s.withCtx(()=>[e.type&&u.type!==e.type||e.webhooks!==void 0&&e.webhooks!==u.webhooks?(s.openBlock(),s.createElementBlock("svg",jo,Mo)):s.createCommentVNode("",!0)]),_:2},1024),s.createElementVNode("p",$o,s.toDisplayString(u.name),1),s.createVNode(w,{class:"dark:popper-light popper-dark",hover:!0,placement:"left"},{content:s.withCtx(()=>[s.createElementVNode("main",{class:s.normalizeClass(["p-1 rounded px-3",{"bg-red-500":u.status===!1,"bg-green-500":u.status===!0,"bg-purple-500":u.status==="Offline"}])},[s.createElementVNode("div",Io,s.toDisplayString(u.status===!0?"Conectada":u.status===!1?"Desconectada":"Indefinida"),1)],2)]),default:s.withCtx(()=>[u.isLoading?(s.openBlock(),s.createElementBlock("div",Uo,zo)):(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass([{"bg-red-500":u.status===!1,"bg-green-500":u.status===!0,"bg-purple-500":u.status==="Offline"},"text-xs w-5 h-5 py-1 shadow flex justify-start shadow-gray-900 dark:shadow-gray-400 rounded-full cursor-pointer transition-all duration-200 ease-in-out"])},null,2))]),_:2},1024)]),s.createElementVNode("div",qo,[u.telephone?(s.openBlock(),s.createBlock(w,{key:0,class:"dark:popper-light popper-dark",hover:!0,placement:"left"},{content:s.withCtx(()=>[s.createElementVNode("div",null,s.toDisplayString(u.telephone?d(u.telephone):""),1)]),default:s.withCtx(()=>[Ho]),_:2},1024)):s.createCommentVNode("",!0)])],10,Bo)]))),256)):(s.openBlock(),s.createElementBlock("div",Jo," Sem instâncias disponíveis"))])])):s.createCommentVNode("",!0)])}}};function Zo(e){e.component("primarySelect",be),e.component("simpleModal",Ce),e.component("simpleCard",xe),e.component("instanceSelect",it)}return{install:Zo,primarySelect:be,simpleModal:Ce,simpleCard:xe,instanceSelect:it}});
|
|
6
|
+
`+i):n.stack=i}catch{}}throw n}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=A(this.defaults,o);const{transitional:n,paramsSerializer:r,headers:i}=o;n!==void 0&&fe.assertOptions(n,{silentJSONParsing:O.transitional(O.boolean),forcedJSONParsing:O.transitional(O.boolean),clarifyTimeoutError:O.transitional(O.boolean)},!1),r!=null&&(l.isFunction(r)?o.paramsSerializer={serialize:r}:fe.assertOptions(r,{encode:O.function,serialize:O.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let a=i&&l.merge(i.common,i[o.method]);i&&l.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),o.headers=x.concat(a,i);const c=[];let h=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(o)===!1||(h=h&&y.synchronous,c.unshift(y.fulfilled,y.rejected))});const p=[];this.interceptors.response.forEach(function(y){p.push(y.fulfilled,y.rejected)});let d,f=0,m;if(!h){const u=[nt.bind(this),void 0];for(u.unshift.apply(u,c),u.push.apply(u,p),m=u.length,d=Promise.resolve(o);f<m;)d=d.then(u[f++],u[f++]);return d}m=c.length;let w=o;for(f=0;f<m;){const u=c[f++],y=c[f++];try{w=u(w)}catch(_){y.call(this,_);break}}try{d=nt.call(this,w)}catch(u){return Promise.reject(u)}for(f=0,m=p.length;f<m;)d=d.then(p[f++],p[f++]);return d}getUri(t){t=A(this.defaults,t);const o=We(t.baseURL,t.url);return Ie(o,t.params,t.paramsSerializer)}}l.forEach(["delete","get","head","options"],function(t){T.prototype[t]=function(o,n){return this.request(A(n||{},{method:t,url:o,data:(n||{}).data}))}}),l.forEach(["post","put","patch"],function(t){function o(n){return function(i,a,c){return this.request(A(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}T.prototype[t]=o(),T.prototype[t+"Form"]=o(!0)});class pe{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(i){o=i});const n=this;this.promise.then(r=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](r);n._listeners=null}),this.promise.then=r=>{let i;const a=new Promise(c=>{n.subscribe(c),i=c}).then(r);return a.cancel=function(){n.unsubscribe(i)},a},t(function(i,a,c){n.reason||(n.reason=new P(i,a,c),o(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}static source(){let t;return{token:new pe(function(r){t=r}),cancel:t}}}function ro(e){return function(o){return e.apply(null,o)}}function so(e){return l.isObject(e)&&e.isAxiosError===!0}const he={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(he).forEach(([e,t])=>{he[t]=e});function st(e){const t=new T(e),o=Se(T.prototype.request,t);return l.extend(o,T.prototype,t,{allOwnKeys:!0}),l.extend(o,t,null,{allOwnKeys:!0}),o.create=function(r){return st(A(e,r))},o}const b=st($);b.Axios=T,b.CanceledError=P,b.CancelToken=pe,b.isCancel=Je,b.VERSION=ot,b.toFormData=W,b.AxiosError=g,b.Cancel=b.CanceledError,b.all=function(t){return Promise.all(t)},b.spread=ro,b.isAxiosError=so,b.mergeConfig=A,b.AxiosHeaders=x,b.formToJSON=e=>qe(l.isHTMLForm(e)?new FormData(e):e),b.getAdapter=tt.getAdapter,b.HttpStatusCode=he,b.default=b;const io={class:"w-full relative text-current"},ao={class:"flex cursor-pointer justify-between items-center"},lo={key:0},co={key:0},uo={key:1,class:"flex items-center gap-2"},fo={class:"flex gap-3 items-center flex-shrink-0"},po={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-5 h-5 text-green-400",viewBox:"0 0 16 16"},ho=[s.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"},null,-1)],mo={key:1,class:"relative"},wo=s.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-5 h-5 text-green-400",viewBox:"0 0 16 16"},[s.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})],-1),yo={style:{color:"#0081FB"},xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"w-5 h-5 absolute -bottom-2 -right-2 rounded-full bi bi-meta",viewBox:"0 0 16 16"},go=[s.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.217 5.243C9.145 3.988 10.171 3 11.483 3 13.96 3 16 6.153 16.001 9.907c0 2.29-.986 3.725-2.757 3.725-1.543 0-2.395-.866-3.924-3.424l-.667-1.123-.118-.197a54.944 54.944 0 0 0-.53-.877l-1.178 2.08c-1.673 2.925-2.615 3.541-3.923 3.541C1.086 13.632 0 12.217 0 9.973 0 6.388 1.995 3 4.598 3c.319 0 .625.039.924.122.31.086.611.22.913.407.577.359 1.154.915 1.782 1.714Zm1.516 2.224c-.252-.41-.494-.787-.727-1.133L9 6.326c.845-1.305 1.543-1.954 2.372-1.954 1.723 0 3.102 2.537 3.102 5.653 0 1.188-.39 1.877-1.195 1.877-.773 0-1.142-.51-2.61-2.87l-.937-1.565ZM4.846 4.756c.725.1 1.385.634 2.34 2.001A212.13 212.13 0 0 0 5.551 9.3c-1.357 2.126-1.826 2.603-2.581 2.603-.777 0-1.24-.682-1.24-1.9 0-2.602 1.298-5.264 2.846-5.264.091 0 .181.006.27.018Z"},null,-1)],Eo={class:"my-auto text-center mx-auto group-hover:inline-block"},bo={class:"w-full"},_o={key:1,class:"flex items-center gap-2 justify-center"},Co=s.createElementVNode("svg",{"aria-hidden":"true",class:"inline w-5 h-5 text-blue-300 animate-spin fill-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s.createElementVNode("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),s.createElementVNode("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),xo={class:"flex px-4 items-center gap-2"},So=[s.createElementVNode("svg",{class:"w-4 h-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},[s.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18 17.94 6M18 18 6.06 6"})],-1)],ko=[s.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m19 9-7 7-7-7"},null,-1)],No={key:0,class:"rounded-b-lg overflow-y-auto max-h-[200px] absolute top-[48px] w-full z-20 text-sm shadow shadow-black dark:shadow-gray-400 bg-base-300 p-2"},Ro={class:"gap-2 flex flex-col"},Oo={class:"select-none cursor-pointer w-full"},Bo=["onClick","disabled"],Ao={class:"flex w-full items-center pl-2 gap-3"},To={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-4 h-4 flex-shrink-0 text-green-400",viewBox:"0 0 16 16"},Lo=[s.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"},null,-1)],Po={key:1,class:"relative"},Vo=s.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"w-4 h-4 flex-shrink-0 text-green-400",viewBox:"0 0 16 16"},[s.createElementVNode("path",{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})],-1),Do={style:{color:"#0081FB"},xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"w-4 h-4 absolute flex-shrink-0 -bottom-2 -right-2 rounded-full bi bi-meta",viewBox:"0 0 16 16"},Fo=[s.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.217 5.243C9.145 3.988 10.171 3 11.483 3 13.96 3 16 6.153 16.001 9.907c0 2.29-.986 3.725-2.757 3.725-1.543 0-2.395-.866-3.924-3.424l-.667-1.123-.118-.197a54.944 54.944 0 0 0-.53-.877l-1.178 2.08c-1.673 2.925-2.615 3.541-3.923 3.541C1.086 13.632 0 12.217 0 9.973 0 6.388 1.995 3 4.598 3c.319 0 .625.039.924.122.31.086.611.22.913.407.577.359 1.154.915 1.782 1.714Zm1.516 2.224c-.252-.41-.494-.787-.727-1.133L9 6.326c.845-1.305 1.543-1.954 2.372-1.954 1.723 0 3.102 2.537 3.102 5.653 0 1.188-.39 1.877-1.195 1.877-.773 0-1.142-.51-2.61-2.87l-.937-1.565ZM4.846 4.756c.725.1 1.385.634 2.34 2.001A212.13 212.13 0 0 0 5.551 9.3c-1.357 2.126-1.826 2.603-2.581 2.603-.777 0-1.24-.682-1.24-1.9 0-2.602 1.298-5.264 2.846-5.264.091 0 .181.006.27.018Z"},null,-1)],jo={key:0,class:"w-6 h-6 flex-shrink-0","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},Mo=[s.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 10V7a4 4 0 1 1 8 0v3h1a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h1Zm2-3a2 2 0 1 1 4 0v3h-4V7Zm2 6a1 1 0 0 1 1 1v3a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1Z","clip-rule":"evenodd"},null,-1)],$o={class:"w-full text-center"},Io={class:"my-auto text-center mx-auto group-hover:inline-block"},Uo={key:1,class:"flex justify-center"},zo=[s.createElementVNode("div",{class:"h-5 w-5 border-t-transparent border-solid animate-spin rounded-full border-white border-4"},null,-1)],qo={class:"flex min-w-[50px] text-sm text-center items-center my-auto flex-shrink-0 px-1 justify-center"},Ho=s.createElementVNode("svg",{class:"w-6 h-6","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24"},[s.createElementVNode("path",{d:"M7.978 4a2.553 2.553 0 0 0-1.926.877C4.233 6.7 3.699 8.751 4.153 10.814c.44 1.995 1.778 3.893 3.456 5.572 1.68 1.679 3.577 3.018 5.57 3.459 2.062.456 4.115-.073 5.94-1.885a2.556 2.556 0 0 0 .001-3.861l-1.21-1.21a2.689 2.689 0 0 0-3.802 0l-.617.618a.806.806 0 0 1-1.14 0l-1.854-1.855a.807.807 0 0 1 0-1.14l.618-.62a2.692 2.692 0 0 0 0-3.803l-1.21-1.211A2.555 2.555 0 0 0 7.978 4Z"})],-1),Jo={key:1,class:"p-4"},it={__name:"index",props:{modelValue:{type:Object,default:null},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzIyNTE5NjE1LCJpYXQiOjE3MjI0MzMyMTUsImp0aSI6ImUzYzJmMThjZmNjODQ1NTY4OTBhNmZjNDk4OTM2M2NhIiwidXNlcl9pZCI6IjYyNGRmZTIzLTkyZDAtNDNmMS04MDYxLWEyMzIxZjJiNWViYiJ9.lIQ_m_89bc4rskubPHm0YTNkzn_PwGpJmedLr_A0MkM"},type:{type:String},webhooks:{type:Boolean,default:void 0},url:{type:String,default:"http://localhost:8000/v1/api/instances/instance/"},status_url:{type:String,default:"http://localhost:8000/v1/api/instances/status_instance/"}},emits:["update:modelValue","function"],setup(e,{emit:t}){const o=s.ref(!1),n=s.ref(null),r=s.ref(!0),i=e,a=t,c=s.ref(null);async function h(){try{let f=i.url,m=i.status_url;const u=await b.get(`${f}`,{headers:{Authorization:`Bearer ${i.token}`}});c.value=u.data,c.value.forEach(async y=>{y.isLoading=!0;try{(await b.get(`${m}?instance=${y.id}`,{headers:{Authorization:`Bearer ${i.token}`}})).data.instance_status!=="Disconnected"?y.status=!0:y.status=!1}catch{y.status="Offline"}y.isLoading=!1})}catch(f){console.log(f)}r.value=!1}function p(f){n.value=f,a("function",f)}s.watch(()=>i.modelValue,f=>{n.value=f},{immediate:!0}),s.watch(n,f=>{a("update:modelValue",f)}),s.onMounted(async()=>{await h()});function d(f){if(f=f.replace(/\D/g,""),f.length>=12&&f.startsWith("55"))return"+"+f.slice(0,2)+" "+f.slice(2,4)+" "+f.slice(4,9)+"-"+f.slice(9);if(f.length===11)return"+55 "+f.slice(0,2)+" "+f.slice(2,7)+"-"+f.slice(7);if(f.length===10){const m=f.slice(0,2),w=f.slice(2);return"+55 "+m+" "+w.slice(0,5)+"-"+w.slice(5)}else return f}return(f,m)=>{const w=s.resolveComponent("Popper");return s.openBlock(),s.createElementBlock("main",io,[s.createElementVNode("div",{class:s.normalizeClass([{"rounded-b-none":o.value},"rounded-lg shadow dark:shadow-gray-400 shadow-gray-900 dark:bg-base-100 bg-base-100 text-center"])},[s.createElementVNode("div",ao,[s.createElementVNode("p",{onClick:m[0]||(m[0]=u=>o.value=!o.value),class:"w-full p-3 px-4 select-none"},[r.value?(s.openBlock(),s.createElementBlock("div",_o,[Co,s.createTextVNode("Carregando instâncias...")])):(s.openBlock(),s.createElementBlock("div",lo,[n.value?(s.openBlock(),s.createElementBlock("span",uo,[s.createElementVNode("header",fo,[n.value.type==="whatsapp-qrcode"?(s.openBlock(),s.createElementBlock("svg",po,ho)):n.value.type==="whatsapp-api-official"?(s.openBlock(),s.createElementBlock("div",mo,[wo,(s.openBlock(),s.createElementBlock("svg",yo,go))])):s.createCommentVNode("",!0),n.value&&n.value.status!==void 0?(s.openBlock(),s.createBlock(w,{key:2,class:"dark:popper-light popper-dark",hover:!0,placement:"right"},{content:s.withCtx(()=>[s.createElementVNode("main",{class:s.normalizeClass(["p-1 rounded px-3",{"bg-red-500":n.value.status===!1,"bg-green-500":n.value.status===!0,"bg-purple-500":n.value.status==="Offline"}])},[s.createElementVNode("div",Eo,s.toDisplayString(n.value.status===!0?"Conectada":n.value.status===!1?"Desconectada":"Indefinida"),1)],2)]),default:s.withCtx(()=>[n.value.isLoading?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass([{"bg-red-500":n.value.status===!1,"bg-green-500":n.value.status===!0,"bg-purple-500":n.value.status==="Offline"},"text-xs w-5 h-5 py-1 shadow flex justify-start shadow-gray-900 dark:shadow-gray-400 rounded-full cursor-pointer transition-all duration-200 ease-in-out"])},null,2))]),_:1})):s.createCommentVNode("",!0)]),s.createElementVNode("div",bo,s.toDisplayString(n.value.name),1)])):(s.openBlock(),s.createElementBlock("span",co,s.toDisplayString(c.value?c.value.length:"Sem")+" Instâncias disponíveis",1))]))]),s.createElementVNode("footer",xo,[s.createElementVNode("button",{onClick:m[1]||(m[1]=u=>(n.value=null,o.value=!1))},So),s.createElementVNode("button",{onClick:m[2]||(m[2]=u=>o.value=!o.value)},[(s.openBlock(),s.createElementBlock("svg",{class:s.normalizeClass([{"rotate-180":o.value},"w-4 h-4 ease-out transition"]),"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},ko,2))])])])],2),o.value?(s.openBlock(),s.createElementBlock("nav",No,[s.createElementVNode("ul",Ro,[c.value.length>0?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(c.value,(u,y)=>(s.openBlock(),s.createElementBlock("li",Oo,[s.createElementVNode("button",{class:s.normalizeClass([n.value&&n.value.id===u.id?"bg-base-100":"bg-base-200 hover:bg-base-100","flex rounded-md justify-between items-center p-2 px-1 w-full"]),onClick:_=>(n.value=u,o.value=!1,p(u)),disabled:n.value&&n.value.id===u.id||e.type&&u.type!==e.type||e.webhooks!==void 0&&e.webhooks!==u.webhooks},[s.createElementVNode("div",Ao,[u.type==="whatsapp-qrcode"?(s.openBlock(),s.createElementBlock("svg",To,Lo)):u.type==="whatsapp-api-official"?(s.openBlock(),s.createElementBlock("div",Po,[Vo,(s.openBlock(),s.createElementBlock("svg",Do,Fo))])):s.createCommentVNode("",!0),s.createVNode(w,{class:"dark:popper-light popper-dark",hover:!0,placement:"right"},{content:s.withCtx(()=>[s.createElementVNode("span",null,s.toDisplayString(e.type&&u.type!==e.type?"Não é possível utilizar esse tipo de Instância neste recurso":e.webhooks===!0?"Essa instância está com o Atendimento desabilitado":"Essa aplicação é somente para instâncias sem atendimento habilitado."),1)]),default:s.withCtx(()=>[e.type&&u.type!==e.type||e.webhooks!==void 0&&e.webhooks!==u.webhooks?(s.openBlock(),s.createElementBlock("svg",jo,Mo)):s.createCommentVNode("",!0)]),_:2},1024),s.createElementVNode("p",$o,s.toDisplayString(u.name),1),s.createVNode(w,{class:"dark:popper-light popper-dark",hover:!0,placement:"left"},{content:s.withCtx(()=>[s.createElementVNode("main",{class:s.normalizeClass(["p-1 rounded px-3",{"bg-red-500":u.status===!1,"bg-green-500":u.status===!0,"bg-purple-500":u.status==="Offline"}])},[s.createElementVNode("div",Io,s.toDisplayString(u.status===!0?"Conectada":u.status===!1?"Desconectada":"Indefinida"),1)],2)]),default:s.withCtx(()=>[u.isLoading?(s.openBlock(),s.createElementBlock("div",Uo,zo)):(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass([{"bg-red-500":u.status===!1,"bg-green-500":u.status===!0,"bg-purple-500":u.status==="Offline"},"text-xs w-5 h-5 py-1 shadow flex justify-start shadow-gray-900 dark:shadow-gray-400 rounded-full cursor-pointer transition-all duration-200 ease-in-out"])},null,2))]),_:2},1024)]),s.createElementVNode("div",qo,[u.telephone?(s.openBlock(),s.createBlock(w,{key:0,class:"dark:popper-light popper-dark",hover:!0,placement:"left"},{content:s.withCtx(()=>[s.createElementVNode("div",null,s.toDisplayString(u.telephone?d(u.telephone):""),1)]),default:s.withCtx(()=>[Ho]),_:2},1024)):s.createCommentVNode("",!0)])],10,Bo)]))),256)):(s.openBlock(),s.createElementBlock("div",Jo," Sem instâncias disponíveis"))])])):s.createCommentVNode("",!0)])}}};function Zo(e){e.component("primarySelect",be),e.component("simpleModal",Ce),e.component("simpleCard",xe),e.component("instanceSelect",it)}return{install:Zo,primarySelect:be,simpleModal:Ce,simpleCard:xe,instanceSelect:it}});
|