golden-logic-ui 1.0.35 → 1.0.37

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 { openBlock as d, createElementBlock as u, createElementVNode as s, createCommentVNode as g, createStaticVNode as Ie, inject as he, watch as ee, effectScope as Te, computed as fe, reactive as ge, resolveComponent as q, Fragment as y, createVNode as G, normalizeClass as p, toDisplayString as f, withModifiers as A, withDirectives as C, vModelText as I, renderList as w, normalizeStyle as Me, renderSlot as P, createTextVNode as v, vShow as T, createBlock as F, resolveDynamicComponent as X, mergeProps as U, withCtx as z, ref as S, onMounted as M, mergeModels as ae, useModel as Ne, vModelDynamic as Ve, provide as Le, pushScopeId as Be, popScopeId as Ge, toHandlers as K, TransitionGroup as Fe, unref as Re, resolveDirective as me, markRaw as Ue } from "vue";
1
+ import { openBlock as d, createElementBlock as u, createElementVNode as s, createCommentVNode as g, createStaticVNode as Ie, inject as fe, watch as ee, effectScope as Te, computed as te, reactive as ge, resolveComponent as q, Fragment as y, createVNode as G, normalizeClass as p, toDisplayString as f, withModifiers as A, withDirectives as C, vModelText as I, renderList as w, normalizeStyle as Me, renderSlot as P, createTextVNode as v, vShow as T, createBlock as F, resolveDynamicComponent as X, mergeProps as U, withCtx as z, ref as S, onMounted as M, mergeModels as ie, useModel as Ne, vModelDynamic as Ve, provide as Le, pushScopeId as Be, popScopeId as Ge, toHandlers as K, TransitionGroup as Fe, unref as Re, resolveDirective as me, markRaw as Ue } from "vue";
2
2
  const k = (e, t) => {
3
3
  const r = e.__vccOpts || e;
4
4
  for (const [n, a] of t)
@@ -50,7 +50,7 @@ function Je(e, t, r, n, a, o) {
50
50
  ])
51
51
  ])) : g("", !0);
52
52
  }
53
- const te = /* @__PURE__ */ k(qe, [["render", Je]]);
53
+ const re = /* @__PURE__ */ k(qe, [["render", Je]]);
54
54
  function Qe() {
55
55
  return _e().__VUE_DEVTOOLS_GLOBAL_HOOK__;
56
56
  }
@@ -148,7 +148,7 @@ function at(e, t) {
148
148
  */
149
149
  var pe = "store";
150
150
  function be(e) {
151
- return e === void 0 && (e = null), he(e !== null ? e : pe);
151
+ return e === void 0 && (e = null), fe(e !== null ? e : pe);
152
152
  }
153
153
  function N(e, t) {
154
154
  Object.keys(e).forEach(function(r) {
@@ -179,15 +179,15 @@ function ve(e, t, r) {
179
179
  function xe(e, t) {
180
180
  e._actions = /* @__PURE__ */ Object.create(null), e._mutations = /* @__PURE__ */ Object.create(null), e._wrappedGetters = /* @__PURE__ */ Object.create(null), e._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
181
181
  var r = e.state;
182
- Z(e, r, [], e._modules.root, !0), re(e, r, t);
182
+ Z(e, r, [], e._modules.root, !0), se(e, r, t);
183
183
  }
184
- function re(e, t, r) {
184
+ function se(e, t, r) {
185
185
  var n = e._state, a = e._scope;
186
186
  e.getters = {}, e._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
187
187
  var o = e._wrappedGetters, l = {}, i = {}, c = Te(!0);
188
188
  c.run(function() {
189
189
  N(o, function(h, m) {
190
- l[m] = lt(h, e), i[m] = fe(function() {
190
+ l[m] = lt(h, e), i[m] = te(function() {
191
191
  return l[m]();
192
192
  }), Object.defineProperty(e.getters, m, {
193
193
  get: function() {
@@ -206,7 +206,7 @@ function re(e, t, r) {
206
206
  function Z(e, t, r, n, a) {
207
207
  var o = !r.length, l = e._modules.getNamespace(r);
208
208
  if (n.namespaced && (e._modulesNamespaceMap[l] && process.env.NODE_ENV !== "production" && console.error("[vuex] duplicate namespace " + l + " for the namespaced module " + r.join("/")), e._modulesNamespaceMap[l] = n), !o && !a) {
209
- var i = se(t, r.slice(0, -1)), c = r[r.length - 1];
209
+ var i = ne(t, r.slice(0, -1)), c = r[r.length - 1];
210
210
  e._withCommit(function() {
211
211
  process.env.NODE_ENV !== "production" && c in i && console.warn(
212
212
  '[vuex] state field "' + c + '" was overridden by a module with the same name at "' + r.join(".") + '"'
@@ -256,7 +256,7 @@ function dt(e, t, r) {
256
256
  },
257
257
  state: {
258
258
  get: function() {
259
- return se(e.state, r);
259
+ return ne(e.state, r);
260
260
  }
261
261
  }
262
262
  }), a;
@@ -325,7 +325,7 @@ function ft(e) {
325
325
  process.env.NODE_ENV !== "production" && E(e._committing, "do not mutate vuex store state outside mutation handlers.");
326
326
  }, { deep: !0, flush: "sync" });
327
327
  }
328
- function se(e, t) {
328
+ function ne(e, t) {
329
329
  return t.reduce(function(r, n) {
330
330
  return r[n];
331
331
  }, e);
@@ -333,7 +333,7 @@ function se(e, t) {
333
333
  function H(e, t, r) {
334
334
  return ye(e) && e.type && (r = t, t = e, e = e.type), process.env.NODE_ENV !== "production" && E(typeof e == "string", "expects string as the type, but found " + typeof e + "."), { type: e, payload: t, options: r };
335
335
  }
336
- var gt = "vuex bindings", ie = "vuex:mutations", W = "vuex:actions", B = "vuex", mt = 0;
336
+ var gt = "vuex bindings", le = "vuex:mutations", W = "vuex:actions", B = "vuex", mt = 0;
337
337
  function _t(e, t) {
338
338
  at(
339
339
  {
@@ -347,13 +347,13 @@ function _t(e, t) {
347
347
  },
348
348
  function(r) {
349
349
  r.addTimelineLayer({
350
- id: ie,
350
+ id: le,
351
351
  label: "Vuex Mutations",
352
- color: le
352
+ color: de
353
353
  }), r.addTimelineLayer({
354
354
  id: W,
355
355
  label: "Vuex Actions",
356
- color: le
356
+ color: de
357
357
  }), r.addInspector({
358
358
  id: B,
359
359
  label: "Vuex",
@@ -387,7 +387,7 @@ function _t(e, t) {
387
387
  }), t.subscribe(function(n, a) {
388
388
  var o = {};
389
389
  n.payload && (o.payload = n.payload), o.state = a, r.notifyComponentUpdate(), r.sendInspectorTree(B), r.sendInspectorState(B), r.addTimelineEvent({
390
- layerId: ie,
390
+ layerId: le,
391
391
  event: {
392
392
  time: Date.now(),
393
393
  title: n.type,
@@ -432,7 +432,7 @@ function _t(e, t) {
432
432
  }
433
433
  );
434
434
  }
435
- var le = 8702998, pt = 6710886, bt = 16777215, ke = {
435
+ var de = 8702998, pt = 6710886, bt = 16777215, ke = {
436
436
  label: "namespaced",
437
437
  textColor: bt,
438
438
  backgroundColor: pt
@@ -634,7 +634,7 @@ function De(e, t, r) {
634
634
  );
635
635
  }
636
636
  }
637
- var de = {
637
+ var ue = {
638
638
  assert: function(e) {
639
639
  return typeof e == "function";
640
640
  },
@@ -644,15 +644,15 @@ var de = {
644
644
  return typeof e == "function" || typeof e == "object" && typeof e.handler == "function";
645
645
  },
646
646
  expected: 'function or object with "handler" function'
647
- }, ue = {
648
- getters: de,
649
- mutations: de,
647
+ }, ce = {
648
+ getters: ue,
649
+ mutations: ue,
650
650
  actions: wt
651
651
  };
652
652
  function Pe(e, t) {
653
- Object.keys(ue).forEach(function(r) {
653
+ Object.keys(ce).forEach(function(r) {
654
654
  if (t[r]) {
655
- var n = ue[r];
655
+ var n = ce[r];
656
656
  N(t[r], function(a, o) {
657
657
  E(
658
658
  n.assert(a),
@@ -682,19 +682,19 @@ var D = function e(t) {
682
682
  return h.call(l, x, $, R);
683
683
  }, this.strict = a;
684
684
  var m = this._modules.root.state;
685
- Z(this, m, [], this._modules.root), re(this, m), n.forEach(function(b) {
685
+ Z(this, m, [], this._modules.root), se(this, m), n.forEach(function(b) {
686
686
  return b(r);
687
687
  });
688
- }, ne = { state: { configurable: !0 } };
688
+ }, oe = { state: { configurable: !0 } };
689
689
  D.prototype.install = function(t, r) {
690
690
  t.provide(r || pe, this), t.config.globalProperties.$store = this;
691
691
  var n = this._devtools !== void 0 ? this._devtools : process.env.NODE_ENV !== "production" || !1;
692
692
  n && _t(t, this);
693
693
  };
694
- ne.state.get = function() {
694
+ oe.state.get = function() {
695
695
  return this._state.data;
696
696
  };
697
- ne.state.set = function(e) {
697
+ oe.state.set = function(e) {
698
698
  process.env.NODE_ENV !== "production" && E(!1, "use store.replaceState() to explicit replace store state.");
699
699
  };
700
700
  D.prototype.commit = function(t, r, n) {
@@ -777,12 +777,12 @@ D.prototype.replaceState = function(t) {
777
777
  });
778
778
  };
779
779
  D.prototype.registerModule = function(t, r, n) {
780
- n === void 0 && (n = {}), typeof t == "string" && (t = [t]), process.env.NODE_ENV !== "production" && (E(Array.isArray(t), "module path must be a string or an Array."), E(t.length > 0, "cannot register the root module by using registerModule.")), this._modules.register(t, r), Z(this, this.state, t, this._modules.get(t), n.preserveState), re(this, this.state);
780
+ n === void 0 && (n = {}), typeof t == "string" && (t = [t]), process.env.NODE_ENV !== "production" && (E(Array.isArray(t), "module path must be a string or an Array."), E(t.length > 0, "cannot register the root module by using registerModule.")), this._modules.register(t, r), Z(this, this.state, t, this._modules.get(t), n.preserveState), se(this, this.state);
781
781
  };
782
782
  D.prototype.unregisterModule = function(t) {
783
783
  var r = this;
784
784
  typeof t == "string" && (t = [t]), process.env.NODE_ENV !== "production" && E(Array.isArray(t), "module path must be a string or an Array."), this._modules.unregister(t), this._withCommit(function() {
785
- var n = se(r.state, t.slice(0, -1));
785
+ var n = ne(r.state, t.slice(0, -1));
786
786
  delete n[t[t.length - 1]];
787
787
  }), xe(this);
788
788
  };
@@ -796,10 +796,10 @@ D.prototype._withCommit = function(t) {
796
796
  var r = this._committing;
797
797
  this._committing = !0, t(), this._committing = r;
798
798
  };
799
- Object.defineProperties(D.prototype, ne);
799
+ Object.defineProperties(D.prototype, oe);
800
800
  var $t = je(function(e, t) {
801
801
  var r = {};
802
- return process.env.NODE_ENV !== "production" && !oe(t) && console.error("[vuex] mapState: mapper parameter must be either an Array or an Object"), Ee(t).forEach(function(n) {
802
+ return process.env.NODE_ENV !== "production" && !ae(t) && console.error("[vuex] mapState: mapper parameter must be either an Array or an Object"), Ee(t).forEach(function(n) {
803
803
  var a = n.key, o = n.val;
804
804
  r[a] = function() {
805
805
  var i = this.$store.state, c = this.$store.getters;
@@ -814,7 +814,7 @@ var $t = je(function(e, t) {
814
814
  }), r;
815
815
  }), Ct = je(function(e, t) {
816
816
  var r = {};
817
- return process.env.NODE_ENV !== "production" && !oe(t) && console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"), Ee(t).forEach(function(n) {
817
+ return process.env.NODE_ENV !== "production" && !ae(t) && console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"), Ee(t).forEach(function(n) {
818
818
  var a = n.key, o = n.val;
819
819
  r[a] = function() {
820
820
  for (var i = [], c = arguments.length; c--; )
@@ -831,13 +831,13 @@ var $t = je(function(e, t) {
831
831
  }), r;
832
832
  });
833
833
  function Ee(e) {
834
- return oe(e) ? Array.isArray(e) ? e.map(function(t) {
834
+ return ae(e) ? Array.isArray(e) ? e.map(function(t) {
835
835
  return { key: t, val: t };
836
836
  }) : Object.keys(e).map(function(t) {
837
837
  return { key: t, val: e[t] };
838
838
  }) : [];
839
839
  }
840
- function oe(e) {
840
+ function ae(e) {
841
841
  return Array.isArray(e) || ye(e);
842
842
  }
843
843
  function je(e) {
@@ -851,7 +851,7 @@ function Ae(e, t, r) {
851
851
  }
852
852
  const St = {
853
853
  components: {
854
- DeleteConfirmationModal: te
854
+ DeleteConfirmationModal: re
855
855
  },
856
856
  props: {
857
857
  is_required: {
@@ -1284,7 +1284,7 @@ const td = /* @__PURE__ */ k(cr, [["render", mr]]), _r = { class: "bg-white bord
1284
1284
  }
1285
1285
  },
1286
1286
  setup(e) {
1287
- const t = e, r = fe(() => t.class);
1287
+ const t = e, r = te(() => t.class);
1288
1288
  return (n, a) => (d(), u("div", {
1289
1289
  class: p(["flex flex-col gap-9", r.value])
1290
1290
  }, [
@@ -2093,7 +2093,7 @@ const nd = /* @__PURE__ */ k(Gr, [["render", Rr]]), Ur = { class: "font-bold pte
2093
2093
  }
2094
2094
  }, ys = { class: "font-bold ptext-lg dark:text-white" }, vs = { class: "mb-4 text-base text-gray-900 dark:text-white" }, xs = /* @__PURE__ */ s("hr", { class: "!opacity-100 bg-gray-200 border-0 dark:bg-gray-700" }, null, -1), ws = ["for"], ks = ["required", "name", "id", "type"], $s = { class: "gl-span-form-error" }, Cs = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, ld = {
2095
2095
  __name: "GlTextInput",
2096
- props: /* @__PURE__ */ ae({
2096
+ props: /* @__PURE__ */ ie({
2097
2097
  is_required: {
2098
2098
  type: Boolean,
2099
2099
  default: !1
@@ -2134,7 +2134,7 @@ const nd = /* @__PURE__ */ k(Gr, [["render", Rr]]), Ur = { class: "font-bold pte
2134
2134
  modelValue: {},
2135
2135
  modelModifiers: {}
2136
2136
  }),
2137
- emits: /* @__PURE__ */ ae(["update:modelValue", "keydown"], ["update:modelValue"]),
2137
+ emits: /* @__PURE__ */ ie(["update:modelValue", "keydown"], ["update:modelValue"]),
2138
2138
  setup(e, { expose: t, emit: r }) {
2139
2139
  const n = e, a = r, o = S(null), l = Ne(e, "modelValue");
2140
2140
  return M(() => {
@@ -2225,7 +2225,7 @@ const dd = /* @__PURE__ */ k(Ss, [["render", Ts]]), Ms = {
2225
2225
  props: ["title"],
2226
2226
  setup() {
2227
2227
  return {
2228
- selectedTitle: he("selectedTitle")
2228
+ selectedTitle: fe("selectedTitle")
2229
2229
  };
2230
2230
  }
2231
2231
  }, Ns = { class: "block" };
@@ -2761,15 +2761,15 @@ const cd = /* @__PURE__ */ k(Ls, [["render", Un], ["__scopeId", "data-v-a94f16a9
2761
2761
  },
2762
2762
  emits: ["update:modelValue"],
2763
2763
  setup(e, { emit: t }) {
2764
- const r = e, n = t, a = S(null);
2764
+ const r = e, n = t, a = S(null), o = te(() => r.modelValue);
2765
2765
  M(() => {
2766
- r.model_value != "" && (n("update:modelValue", r.model_value), a.value.checked = r.model_value == 1), r.modelValue != "" && (n("update:modelValue", r.modelValue), a.value.checked = r.modelValue == 1);
2766
+ r.model_value != "" && (n("update:modelValue", r.model_value), a.value.checked = r.model_value == 1), o != "" && (n("update:modelValue", o), a.value.checked = o == 1);
2767
2767
  });
2768
- const o = (l) => {
2769
- const i = l.target.checked ? 1 : 0;
2770
- n("update:modelValue", i);
2768
+ const l = (i) => {
2769
+ const c = i.target.checked ? 1 : 0;
2770
+ n("update:modelValue", c);
2771
2771
  };
2772
- return (l, i) => (d(), u(y, null, [
2772
+ return (i, c) => (d(), u(y, null, [
2773
2773
  e.show ? (d(), u("div", {
2774
2774
  key: 0,
2775
2775
  class: p(e.field_name)
@@ -2807,13 +2807,13 @@ const cd = /* @__PURE__ */ k(Ls, [["render", Un], ["__scopeId", "data-v-a94f16a9
2807
2807
  class: "sr-only peer",
2808
2808
  name: e.field_name,
2809
2809
  id: e.field_name,
2810
- value: e.model_value || e.modelValue,
2811
- checked: e.model_value == 1 || e.modelValue == 1,
2810
+ value: e.model_value || o.value,
2811
+ checked: e.model_value == 1 || o.value == 1,
2812
2812
  "true-value": 1,
2813
2813
  "false-value": 0,
2814
2814
  ref_key: "input",
2815
2815
  ref: a,
2816
- onChange: o
2816
+ onChange: l
2817
2817
  }, null, 40, ao),
2818
2818
  io
2819
2819
  ])
@@ -4094,14 +4094,14 @@ const pd = /* @__PURE__ */ k(Sa, [["render", ui]]), ci = {
4094
4094
  remove(e) {
4095
4095
  Q.items.splice(e, 1);
4096
4096
  }
4097
- }, ce = {
4097
+ }, he = {
4098
4098
  state: Q,
4099
4099
  methods: Pi
4100
4100
  }, bd = {
4101
4101
  __name: "GlToastList",
4102
4102
  setup(e) {
4103
4103
  function t(r) {
4104
- ce.methods.remove(r);
4104
+ he.methods.remove(r);
4105
4105
  }
4106
4106
  return (r, n) => (d(), F(Fe, {
4107
4107
  tag: "div",
@@ -4112,7 +4112,7 @@ const pd = /* @__PURE__ */ k(Sa, [["render", ui]]), ci = {
4112
4112
  class: "fixed z-50 w-full max-w-xs space-y-4 top-4 right-4"
4113
4113
  }, {
4114
4114
  default: z(() => [
4115
- (d(!0), u(y, null, w(Re(ce).state.items, (a, o) => (d(), F(Di, {
4115
+ (d(!0), u(y, null, w(Re(he).state.items, (a, o) => (d(), F(Di, {
4116
4116
  key: a.key,
4117
4117
  message: a.message,
4118
4118
  type: a.type,
@@ -4187,7 +4187,7 @@ const pd = /* @__PURE__ */ k(Sa, [["render", ui]]), ci = {
4187
4187
  return (x, $) => {
4188
4188
  const R = me("click-outside");
4189
4189
  return d(), u(y, null, [
4190
- G(te, {
4190
+ G(re, {
4191
4191
  isOpen: o.value,
4192
4192
  onConfirmDelete: b,
4193
4193
  onCancelDelete: c
@@ -4293,7 +4293,7 @@ const pd = /* @__PURE__ */ k(Sa, [["render", ui]]), ci = {
4293
4293
  return (x, $) => {
4294
4294
  const R = me("click-outside");
4295
4295
  return d(), u(y, null, [
4296
- G(te, {
4296
+ G(re, {
4297
4297
  isOpen: o.value,
4298
4298
  onConfirmDelete: b,
4299
4299
  onCancelDelete: c
@@ -4677,7 +4677,7 @@ export {
4677
4677
  Cd as GlDatatablePicture,
4678
4678
  Sd as GlDatatableStatus,
4679
4679
  Od as GlDatatableStatusGeneral,
4680
- te as GlDeleteConfirmationModal,
4680
+ re as GlDeleteConfirmationModal,
4681
4681
  gd as GlDropdown,
4682
4682
  Ql as GlFilesUpload,
4683
4683
  td as GlLanguageSelector,
@@ -4693,7 +4693,7 @@ export {
4693
4693
  md as GlTextarea,
4694
4694
  od as GlTextareaTranslate,
4695
4695
  ad as GlTinymceTranslate,
4696
- ce as GlToast,
4696
+ he as GlToast,
4697
4697
  bd as GlToastList,
4698
4698
  fd as GlToggleBox
4699
4699
  };
@@ -4,4 +4,4 @@
4
4
  * @license MIT
5
5
  */var z="store";function G(t){return t===void 0&&(t=null),e.inject(t!==null?t:z)}function w(t,r){Object.keys(t).forEach(function(o){return r(t[o],o)})}function v(t){return t!==null&&typeof t=="object"}function Ne(t){return t&&typeof t.then=="function"}function k(t,r){if(!t)throw new Error("[vuex] "+r)}function Ve(t,r){return function(){return t(r)}}function R(t,r,o){return r.indexOf(t)<0&&(o&&o.prepend?r.unshift(t):r.push(t)),function(){var n=r.indexOf(t);n>-1&&r.splice(n,1)}}function U(t,r){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var o=t.state;S(t,o,[],t._modules.root,!0),O(t,o,r)}function O(t,r,o){var n=t._state,a=t._scope;t.getters={},t._makeLocalGettersCache=Object.create(null);var l=t._wrappedGetters,i={},s={},d=e.effectScope(!0);d.run(function(){w(l,function(c,m){i[m]=Ve(c,t),s[m]=e.computed(function(){return i[m]()}),Object.defineProperty(t.getters,m,{get:function(){return s[m].value},enumerable:!0})})}),t._state=e.reactive({data:r}),t._scope=d,t.strict&&$e(t),n&&o&&t._withCommit(function(){n.data=null}),a&&a.stop()}function S(t,r,o,n,a){var l=!o.length,i=t._modules.getNamespace(o);if(n.namespaced&&(t._modulesNamespaceMap[i]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+i+" for the namespaced module "+o.join("/")),t._modulesNamespaceMap[i]=n),!l&&!a){var s=P(r,o.slice(0,-1)),d=o[o.length-1];t._withCommit(function(){process.env.NODE_ENV!=="production"&&d in s&&console.warn('[vuex] state field "'+d+'" was overridden by a module with the same name at "'+o.join(".")+'"'),s[d]=n.state})}var c=n.context=Be(t,i,o);n.forEachMutation(function(m,f){var g=i+f;Ce(t,g,m,c)}),n.forEachAction(function(m,f){var g=m.root?f:i+f,p=m.handler||m;Se(t,g,p,c)}),n.forEachGetter(function(m,f){var g=i+f;De(t,g,m,c)}),n.forEachChild(function(m,f){S(t,r,o.concat(f),m,a)})}function Be(t,r,o){var n=r==="",a={dispatch:n?t.dispatch:function(l,i,s){var d=D(l,i,s),c=d.payload,m=d.options,f=d.type;if((!m||!m.root)&&(f=r+f,process.env.NODE_ENV!=="production"&&!t._actions[f])){console.error("[vuex] unknown local action type: "+d.type+", global type: "+f);return}return t.dispatch(f,c)},commit:n?t.commit:function(l,i,s){var d=D(l,i,s),c=d.payload,m=d.options,f=d.type;if((!m||!m.root)&&(f=r+f,process.env.NODE_ENV!=="production"&&!t._mutations[f])){console.error("[vuex] unknown local mutation type: "+d.type+", global type: "+f);return}t.commit(f,c,m)}};return Object.defineProperties(a,{getters:{get:n?function(){return t.getters}:function(){return q(t,r)}},state:{get:function(){return P(t.state,o)}}}),a}function q(t,r){if(!t._makeLocalGettersCache[r]){var o={},n=r.length;Object.keys(t.getters).forEach(function(a){if(a.slice(0,n)===r){var l=a.slice(n);Object.defineProperty(o,l,{get:function(){return t.getters[a]},enumerable:!0})}}),t._makeLocalGettersCache[r]=o}return t._makeLocalGettersCache[r]}function Ce(t,r,o,n){var a=t._mutations[r]||(t._mutations[r]=[]);a.push(function(i){o.call(t,n.state,i)})}function Se(t,r,o,n){var a=t._actions[r]||(t._actions[r]=[]);a.push(function(i){var s=o.call(t,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:t.getters,rootState:t.state},i);return Ne(s)||(s=Promise.resolve(s)),t._devtoolHook?s.catch(function(d){throw t._devtoolHook.emit("vuex:error",d),d}):s})}function De(t,r,o,n){if(t._wrappedGetters[r]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+r);return}t._wrappedGetters[r]=function(l){return o(n.state,n.getters,l.state,l.getters)}}function $e(t){e.watch(function(){return t._state.data},function(){process.env.NODE_ENV!=="production"&&k(t._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function P(t,r){return r.reduce(function(o,n){return o[n]},t)}function D(t,r,o){return v(t)&&t.type&&(o=r,r=t,t=t.type),process.env.NODE_ENV!=="production"&&k(typeof t=="string","expects string as the type, but found "+typeof t+"."),{type:t,payload:r,options:o}}var Oe="vuex bindings",H="vuex:mutations",T="vuex:actions",V="vuex",Pe=0;function Te(t,r){Ee({id:"org.vuejs.vuex",app:t,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[Oe]},function(o){o.addTimelineLayer({id:H,label:"Vuex Mutations",color:Z}),o.addTimelineLayer({id:T,label:"Vuex Actions",color:Z}),o.addInspector({id:V,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),o.on.getInspectorTree(function(n){if(n.app===t&&n.inspectorId===V)if(n.filter){var a=[];Y(a,r._modules.root,n.filter,""),n.rootNodes=a}else n.rootNodes=[X(r._modules.root,"")]}),o.on.getInspectorState(function(n){if(n.app===t&&n.inspectorId===V){var a=n.nodeId;q(r,a),n.state=Ae(Le(r._modules,a),a==="root"?r.getters:r._makeLocalGettersCache,a)}}),o.on.editInspectorState(function(n){if(n.app===t&&n.inspectorId===V){var a=n.nodeId,l=n.path;a!=="root"&&(l=a.split("/").filter(Boolean).concat(l)),r._withCommit(function(){n.set(r._state.data,l,n.state.value)})}}),r.subscribe(function(n,a){var l={};n.payload&&(l.payload=n.payload),l.state=a,o.notifyComponentUpdate(),o.sendInspectorTree(V),o.sendInspectorState(V),o.addTimelineEvent({layerId:H,event:{time:Date.now(),title:n.type,data:l}})}),r.subscribeAction({before:function(n,a){var l={};n.payload&&(l.payload=n.payload),n._id=Pe++,n._time=Date.now(),l.state=a,o.addTimelineEvent({layerId:T,event:{time:n._time,title:n.type,groupId:n._id,subtitle:"start",data:l}})},after:function(n,a){var l={},i=Date.now()-n._time;l.duration={_custom:{type:"duration",display:i+"ms",tooltip:"Action duration",value:i}},n.payload&&(l.payload=n.payload),l.state=a,o.addTimelineEvent({layerId:T,event:{time:Date.now(),title:n.type,groupId:n._id,subtitle:"end",data:l}})}})})}var Z=8702998,Me=6710886,je=16777215,K={label:"namespaced",textColor:je,backgroundColor:Me};function W(t){return t&&t!=="root"?t.split("/").slice(-2,-1)[0]:"Root"}function X(t,r){return{id:r||"root",label:W(r),tags:t.namespaced?[K]:[],children:Object.keys(t._children).map(function(o){return X(t._children[o],r+o+"/")})}}function Y(t,r,o,n){n.includes(o)&&t.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:r.namespaced?[K]:[]}),Object.keys(r._children).forEach(function(a){Y(t,r._children[a],o,n+a+"/")})}function Ae(t,r,o){r=o==="root"?r:r[o];var n=Object.keys(r),a={state:Object.keys(t.state).map(function(i){return{key:i,editable:!0,value:t.state[i]}})};if(n.length){var l=Ie(r);a.getters=Object.keys(l).map(function(i){return{key:i.endsWith("/")?W(i):i,editable:!1,value:M(function(){return l[i]})}})}return a}function Ie(t){var r={};return Object.keys(t).forEach(function(o){var n=o.split("/");if(n.length>1){var a=r,l=n.pop();n.forEach(function(i){a[i]||(a[i]={_custom:{value:{},display:i,tooltip:"Module",abstract:!0}}),a=a[i]._custom.value}),a[l]=M(function(){return t[o]})}else r[o]=M(function(){return t[o]})}),r}function Le(t,r){var o=r.split("/").filter(function(n){return n});return o.reduce(function(n,a,l){var i=n[a];if(!i)throw new Error('Missing module "'+a+'" for path "'+r+'".');return l===o.length-1?i:i._children},r==="root"?t:t.root._children)}function M(t){try{return t()}catch(r){return r}}var x=function(r,o){this.runtime=o,this._children=Object.create(null),this._rawModule=r;var n=r.state;this.state=(typeof n=="function"?n():n)||{}},J={namespaced:{configurable:!0}};J.namespaced.get=function(){return!!this._rawModule.namespaced},x.prototype.addChild=function(r,o){this._children[r]=o},x.prototype.removeChild=function(r){delete this._children[r]},x.prototype.getChild=function(r){return this._children[r]},x.prototype.hasChild=function(r){return r in this._children},x.prototype.update=function(r){this._rawModule.namespaced=r.namespaced,r.actions&&(this._rawModule.actions=r.actions),r.mutations&&(this._rawModule.mutations=r.mutations),r.getters&&(this._rawModule.getters=r.getters)},x.prototype.forEachChild=function(r){w(this._children,r)},x.prototype.forEachGetter=function(r){this._rawModule.getters&&w(this._rawModule.getters,r)},x.prototype.forEachAction=function(r){this._rawModule.actions&&w(this._rawModule.actions,r)},x.prototype.forEachMutation=function(r){this._rawModule.mutations&&w(this._rawModule.mutations,r)},Object.defineProperties(x.prototype,J);var E=function(r){this.register([],r,!1)};E.prototype.get=function(r){return r.reduce(function(o,n){return o.getChild(n)},this.root)},E.prototype.getNamespace=function(r){var o=this.root;return r.reduce(function(n,a){return o=o.getChild(a),n+(o.namespaced?a+"/":"")},"")},E.prototype.update=function(r){Q([],this.root,r)},E.prototype.register=function(r,o,n){var a=this;n===void 0&&(n=!0),process.env.NODE_ENV!=="production"&&re(r,o);var l=new x(o,n);if(r.length===0)this.root=l;else{var i=this.get(r.slice(0,-1));i.addChild(r[r.length-1],l)}o.modules&&w(o.modules,function(s,d){a.register(r.concat(d),s,n)})},E.prototype.unregister=function(r){var o=this.get(r.slice(0,-1)),n=r[r.length-1],a=o.getChild(n);if(!a){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+n+"', which is not registered");return}a.runtime&&o.removeChild(n)},E.prototype.isRegistered=function(r){var o=this.get(r.slice(0,-1)),n=r[r.length-1];return o?o.hasChild(n):!1};function Q(t,r,o){if(process.env.NODE_ENV!=="production"&&re(t,o),r.update(o),o.modules)for(var n in o.modules){if(!r.getChild(n)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+n+"' on hot reloading, manual reload is needed");return}Q(t.concat(n),r.getChild(n),o.modules[n])}}var ee={assert:function(t){return typeof t=="function"},expected:"function"},Fe={assert:function(t){return typeof t=="function"||typeof t=="object"&&typeof t.handler=="function"},expected:'function or object with "handler" function'},te={getters:ee,mutations:ee,actions:Fe};function re(t,r){Object.keys(te).forEach(function(o){if(r[o]){var n=te[o];w(r[o],function(a,l){k(n.assert(a),ze(t,o,l,a,n.expected))})}})}function ze(t,r,o,n,a){var l=r+" should be "+a+' but "'+r+"."+o+'"';return t.length>0&&(l+=' in module "'+t.join(".")+'"'),l+=" is "+JSON.stringify(n)+".",l}var b=function t(r){var o=this;r===void 0&&(r={}),process.env.NODE_ENV!=="production"&&(k(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),k(this instanceof t,"store must be called with the new operator."));var n=r.plugins;n===void 0&&(n=[]);var a=r.strict;a===void 0&&(a=!1);var l=r.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new E(r),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=l;var i=this,s=this,d=s.dispatch,c=s.commit;this.dispatch=function(g,p){return d.call(i,g,p)},this.commit=function(g,p,B){return c.call(i,g,p,B)},this.strict=a;var m=this._modules.root.state;S(this,m,[],this._modules.root),O(this,m),n.forEach(function(f){return f(o)})},j={state:{configurable:!0}};b.prototype.install=function(r,o){r.provide(o||z,this),r.config.globalProperties.$store=this;var n=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;n&&Te(r,this)},j.state.get=function(){return this._state.data},j.state.set=function(t){process.env.NODE_ENV!=="production"&&k(!1,"use store.replaceState() to explicit replace store state.")},b.prototype.commit=function(r,o,n){var a=this,l=D(r,o,n),i=l.type,s=l.payload,d=l.options,c={type:i,payload:s},m=this._mutations[i];if(!m){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+i);return}this._withCommit(function(){m.forEach(function(g){g(s)})}),this._subscribers.slice().forEach(function(f){return f(c,a.state)}),process.env.NODE_ENV!=="production"&&d&&d.silent&&console.warn("[vuex] mutation type: "+i+". Silent option has been removed. Use the filter functionality in the vue-devtools")},b.prototype.dispatch=function(r,o){var n=this,a=D(r,o),l=a.type,i=a.payload,s={type:l,payload:i},d=this._actions[l];if(!d){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+l);return}try{this._actionSubscribers.slice().filter(function(m){return m.before}).forEach(function(m){return m.before(s,n.state)})}catch(m){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(m))}var c=d.length>1?Promise.all(d.map(function(m){return m(i)})):d[0](i);return new Promise(function(m,f){c.then(function(g){try{n._actionSubscribers.filter(function(p){return p.after}).forEach(function(p){return p.after(s,n.state)})}catch(p){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(p))}m(g)},function(g){try{n._actionSubscribers.filter(function(p){return p.error}).forEach(function(p){return p.error(s,n.state,g)})}catch(p){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(p))}f(g)})})},b.prototype.subscribe=function(r,o){return R(r,this._subscribers,o)},b.prototype.subscribeAction=function(r,o){var n=typeof r=="function"?{before:r}:r;return R(n,this._actionSubscribers,o)},b.prototype.watch=function(r,o,n){var a=this;return process.env.NODE_ENV!=="production"&&k(typeof r=="function","store.watch only accepts a function."),e.watch(function(){return r(a.state,a.getters)},o,Object.assign({},n))},b.prototype.replaceState=function(r){var o=this;this._withCommit(function(){o._state.data=r})},b.prototype.registerModule=function(r,o,n){n===void 0&&(n={}),typeof r=="string"&&(r=[r]),process.env.NODE_ENV!=="production"&&(k(Array.isArray(r),"module path must be a string or an Array."),k(r.length>0,"cannot register the root module by using registerModule.")),this._modules.register(r,o),S(this,this.state,r,this._modules.get(r),n.preserveState),O(this,this.state)},b.prototype.unregisterModule=function(r){var o=this;typeof r=="string"&&(r=[r]),process.env.NODE_ENV!=="production"&&k(Array.isArray(r),"module path must be a string or an Array."),this._modules.unregister(r),this._withCommit(function(){var n=P(o.state,r.slice(0,-1));delete n[r[r.length-1]]}),U(this)},b.prototype.hasModule=function(r){return typeof r=="string"&&(r=[r]),process.env.NODE_ENV!=="production"&&k(Array.isArray(r),"module path must be a string or an Array."),this._modules.isRegistered(r)},b.prototype.hotUpdate=function(r){this._modules.update(r),U(this,!0)},b.prototype._withCommit=function(r){var o=this._committing;this._committing=!0,r(),this._committing=o},Object.defineProperties(b.prototype,j);var Ge=ne(function(t,r){var o={};return process.env.NODE_ENV!=="production"&&!A(r)&&console.error("[vuex] mapState: mapper parameter must be either an Array or an Object"),oe(r).forEach(function(n){var a=n.key,l=n.val;o[a]=function(){var s=this.$store.state,d=this.$store.getters;if(t){var c=le(this.$store,"mapState",t);if(!c)return;s=c.context.state,d=c.context.getters}return typeof l=="function"?l.call(this,s,d):s[l]},o[a].vuex=!0}),o}),ve=ne(function(t,r){var o={};return process.env.NODE_ENV!=="production"&&!A(r)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),oe(r).forEach(function(n){var a=n.key,l=n.val;o[a]=function(){for(var s=[],d=arguments.length;d--;)s[d]=arguments[d];var c=this.$store.commit;if(t){var m=le(this.$store,"mapMutations",t);if(!m)return;c=m.context.commit}return typeof l=="function"?l.apply(this,[c].concat(s)):c.apply(this.$store,[l].concat(s))}}),o});function oe(t){return A(t)?Array.isArray(t)?t.map(function(r){return{key:r,val:r}}):Object.keys(t).map(function(r){return{key:r,val:t[r]}}):[]}function A(t){return Array.isArray(t)||v(t)}function ne(t){return function(r,o){return typeof r!="string"?(o=r,r=""):r.charAt(r.length-1)!=="/"&&(r+="/"),t(r,o)}}function le(t,r,o){var n=t._modulesNamespaceMap[o];return process.env.NODE_ENV!=="production"&&!n&&console.error("[vuex] module namespace not found in "+r+"(): "+o),n}const Re={components:{DeleteConfirmationModal:C},props:{is_required:{type:Boolean,default:!1},error_message:{type:String,default:""},description:{type:String,default:""},show:{type:Boolean,default:!1},has_multiple_file:{show:Boolean,default:!1},field_name:{type:String,default:""},label_name:{type:String,default:""},route_url:{type:String,default:""},model_value:{type:Array,default:[]},file_config:{type:Object,default:{}},is_enable_delete:{type:Boolean,default:!0}},emits:["uploaded"],data(){return{media_id:"",error_message_data:"",open_delete_modal:!1,files:[],uploadFileList:[],isDragging:!1}},methods:{closeDeleteModal(){this.open_delete_modal=!1},deleteAction(){axios.delete(this.route_url+"/destroyMedia/"+this.media_id).then(t=>{let r=this.uploadFileList.findIndex(o=>o.id===this.media_id);r!==-1&&this.uploadFileList.splice(r,1),this.closeDeleteModal(),this.$store.commit("notification/SHOW_NOTIFICATION",{message:"Item deleted successfully.",type:"success",duration:5e3})}).catch(t=>{console.error(t),this.is_loading=!1})},getFileName(t){return t.length>12?t.substring(0,13)+"... ."+t.split(".")[1]:t},formatFileSize(t){if(t===0)return"0 Bytes";const r=1024,o=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(t)/Math.log(r));return parseFloat((t/Math.pow(r,n)).toFixed(2))+" "+o[n]},onDragOver(t){t.preventDefault(),this.isDragging=!0,t.dataTransfer.dropEffect="copy"},onDragLeave(t){t.preventDefault(),this.isDragging=!1},onDrop(t){t.preventDefault(),this.isDragging=!1;const r=t.dataTransfer.files;Array.from(r).forEach(o=>{this.uploadFile(o)})},async uploadFiles(t){const r=t.target.files,o=Array.from(r).map(n=>this.uploadFile(n));await Promise.all(o),this.$emit("uploaded")},getFirstError(t,r){return t.hasOwnProperty(r)?t[r][0]:""},async uploadFile(t){return new Promise((r,o)=>{t||r();const n=new FormData;n.append("file",t),Object.entries(this.file_config).forEach(([a,l])=>{n.append(a,l)}),this.files.push({file_name:t.name,loading:0}),axios.post(this.route_url+"/media",n,{onUploadProgress:a=>{this.files[this.files.length-1].loading=Math.floor(a.loaded/a.total*100)}}).then(a=>{let l=this.files.findIndex(i=>i.file_name===t.name);l!==-1&&this.files.splice(l,1),this.uploadFileList.push({file_name:a.data.file_name,size:a.data.size,id:a.data.id,url:a.data.url}),this.error_message_data="",r()}).catch(a=>{a.response.status===422?this.error_message_data=this.getFirstError(a.response.data.errors,"file"):console.error("An error occurred:",a);let l=this.files.findIndex(i=>i.file_name===t.name);l!==-1&&this.files.splice(l,1),console.log(a),r()})})}},computed:{uploadedFileIds(){var t;return this.has_multiple_file?this.uploadFileList.map(r=>r.id):((t=this.uploadFileList[0])==null?void 0:t.id)||null}},mounted(){console.log(this.model_value),this.model_value?Array.isArray(this.model_value)?this.uploadFileList=this.model_value:this.uploadFileList=[this.model_value]:this.uploadFileList=[],this.error_message_data=this.error_message}},Ue={class:"flex flex-col items-center justify-center pt-5 pb-6"},qe=["multiple"],He=["name"],Ze=[e.createElementVNode("svg",{class:"w-8 h-8 mb-4 text-gray-500 dark:text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})],-1),e.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-gray-400"}," Drag & drop files or browse ",-1)],Ke={key:1},We=[e.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-gray-400"},"Drop files here",-1)],Xe={class:"mt-2 gl-span-form-error"},Ye={class:"block mt-2 mb-3 text-sm font-normal leading-5 text-gray-500"},Je={key:0,class:""},Qe={class:"flex items-center justify-between p-2 mb-2 text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white"},et=e.createElementVNode("i",{class:"text-3xl fas fa-file-alt"},null,-1),tt={class:"w-full ml-3"},rt={class:"flex items-center justify-between mb-1"},ot={class:"text-xs text-black dark:text-white"},nt={class:"text-xs text-black dark:text-white"},lt={class:"w-full h-1 mb-1 bg-white rounded-full dark:bg-gray-800"},at={class:"overflow-x-scroll max-h-56"},st={class:"flex items-center justify-between p-2 mb-2 text-gray-900 rounded-lg bg-gray-50 hover:bg-gray-100 hover:shadow dark:bg-gray-600 dark:hover:bg-gray-500 dark:text-white"},it={class:"flex items-center"},dt=e.createElementVNode("i",{class:"text-3xl fas fa-file-alt","aria-hidden":"true"},null,-1),ct={class:"flex flex-col ml-3"},mt={class:"text-xs"},ht={class:"text-xs"},ft={class:"flex gap-2"},gt=["href"],ut=["onClick"];function pt(t,r,o,n,a,l){const i=e.resolveComponent("DeleteConfirmationModal");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(i,{isOpen:a.open_delete_modal,onConfirmDelete:l.deleteAction,onCancelDelete:l.closeDeleteModal},null,8,["isOpen","onConfirmDelete","onCancelDelete"]),e.createElementVNode("div",{class:e.normalizeClass([{"border-red-500 dark:border-red-500":a.error_message_data!=="","border-gray-200 dark:border-gray-700":a.error_message_data==""},"w-full p-4 bg-white border rounded-lg shadow dark:bg-gray-800"])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-form":a.error_message_data=="","gl-label-form-invalid":a.error_message_data!=="",required:o.is_required})},e.toDisplayString(o.label_name),3),e.createElementVNode("div",{onDragover:r[3]||(r[3]=e.withModifiers((...s)=>l.onDragOver&&l.onDragOver(...s),["prevent"])),onDragleave:r[4]||(r[4]=e.withModifiers((...s)=>l.onDragLeave&&l.onDragLeave(...s),["prevent"])),onDrop:r[5]||(r[5]=e.withModifiers((...s)=>l.onDrop&&l.onDrop(...s),["prevent"])),class:"flex flex-col items-center justify-center w-full h-40 mt-3 mb-3 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600"},[e.createElementVNode("div",Ue,[e.createElementVNode("input",{type:"file",ref:"file_input"+o.field_name,hidden:"",multiple:o.has_multiple_file,onChange:r[0]||(r[0]=(...s)=>l.uploadFiles&&l.uploadFiles(...s))},null,40,qe),e.withDirectives(e.createElementVNode("input",{type:"hidden",name:o.field_name,"onUpdate:modelValue":r[1]||(r[1]=s=>l.uploadedFileIds=s)},null,8,He),[[e.vModelText,l.uploadedFileIds]]),a.isDragging?(e.openBlock(),e.createElementBlock("div",Ke,We)):(e.openBlock(),e.createElementBlock("div",{key:0,class:"flex flex-col items-center justify-center",onClick:r[2]||(r[2]=s=>t.$refs["file_input"+this.field_name].click())},Ze))])],32),e.createElementVNode("span",Xe,e.toDisplayString(a.error_message_data),1),e.createElementVNode("small",Ye,e.toDisplayString(o.description),1),a.files.length>0?(e.openBlock(),e.createElementBlock("section",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.files,(s,d)=>(e.openBlock(),e.createElementBlock("li",Qe,[et,e.createElementVNode("div",tt,[e.createElementVNode("div",rt,[e.createElementVNode("span",ot,e.toDisplayString(l.getFileName(s.file_name)),1),e.createElementVNode("span",nt,e.toDisplayString(s.loading),1)]),e.createElementVNode("div",lt,[e.createElementVNode("div",{class:"h-full bg-gray-500 rounded-full dark:bg-gray-400",style:e.normalizeStyle({width:s.loading+"%"})},null,4)])])]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("section",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.uploadFileList,(s,d)=>(e.openBlock(),e.createElementBlock("li",st,[e.createElementVNode("div",it,[dt,e.createElementVNode("div",ct,[e.createElementVNode("span",mt,e.toDisplayString(l.getFileName(s.file_name)),1),e.createElementVNode("span",ht,e.toDisplayString(l.formatFileSize(s.size)),1)])]),e.createElementVNode("div",ft,[e.createElementVNode("a",{href:s.url,target:"_blank",class:"text-lg text-blue-600 cursor-pointer dark:text-blue-400 fas fa-download"},null,8,gt),o.is_enable_delete?(e.openBlock(),e.createElementBlock("i",{key:0,onClick:c=>{a.media_id=s.id,a.open_delete_modal=!0},class:"text-lg text-red-600 cursor-pointer dark:text-red-400 fas fa-x"},null,8,ut)):e.createCommentVNode("",!0)])]))),256))])],2)],64)}const _t=u(Re,[["render",pt]]),yt={computed:{...Ge("notification",["notification"]),alertClasses(){switch(this.notification.type){case"info":return"text-blue-800 bg-blue-50 dark:bg-gray-800 dark:text-blue-400";case"error":return"text-red-800 bg-red-50 dark:bg-gray-800 dark:text-red-400";case"success":return"text-green-800 bg-green-50 dark:bg-gray-800 dark:text-green-400";case"warning":return"text-yellow-800 bg-yellow-50 dark:bg-gray-800 dark:text-yellow-300";case"dark":return"text-gray-800 bg-gray-50 dark:bg-gray-800 dark:text-gray-300";default:return""}},buttonClasses(){switch(this.notification.type){case"info":return"bg-blue-50 text-blue-500 focus:ring-blue-400 hover:bg-blue-200 dark:hover:bg-gray-700";case"error":return"bg-red-50 text-red-500 focus:ring-red-400 hover:bg-red-200 dark:hover:bg-gray-700";case"success":return"bg-green-50 text-green-500 focus:ring-green-400 hover:bg-green-200 dark:hover:bg-gray-700";case"warning":return"bg-yellow-50 text-yellow-500 focus:ring-yellow-400 hover:bg-yellow-200 dark:hover:bg-gray-700";case"dark":return"bg-gray-50 text-gray-500 focus:ring-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700";default:return""}}},methods:{...ve("notification",["HIDE_NOTIFICATION"]),dismiss(){this.HIDE_NOTIFICATION()}},watch:{"notification.show":function(t){t&&setTimeout(()=>{this.dismiss()},this.notification.duration)}}},bt=e.createElementVNode("svg",{class:"flex-shrink-0 w-4 h-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"})],-1),kt=e.createElementVNode("span",{class:"sr-only"},"Info",-1),xt={class:"mr-3 text-sm font-medium ms-3"},wt=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{class:"w-3 h-3","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"})],-1)];function Et(t,r,o,n,a,l){return t.notification.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["fixed right-0 z-50 flex items-center p-4 m-5 mb-4 rounded-lg shadow-lg",l.alertClasses]),role:"alert"},[bt,kt,e.createElementVNode("div",xt,e.toDisplayString(t.notification.message),1),e.createElementVNode("button",{type:"button",onClick:r[0]||(r[0]=(...i)=>l.dismiss&&l.dismiss(...i)),class:e.normalizeClass(["inline-flex items-center justify-center w-6 h-6 p-1 -mx-1 -my-1 rounded-lg ms-auto focus:ring-2 hover:bg-opacity-50",l.buttonClasses]),"aria-label":"Close"},wt,2)],2)):e.createCommentVNode("",!0)}const Nt=u(yt,[["render",Et]]),Vt={components:{},props:{field_name:{type:String,default:""},trans_selector_name:{type:String,default:"i18n_selector"}},data(){return{locals:[],default_language:""}},methods:{getLocals(){const t={id:this.menu_id};axios.get("/admin/get_locals",{params:t}).then(r=>{this.locals=r.data.locals,this.default_language=r.data.default_language,console.log("default_language",this.default_language)}).catch(r=>{console.error(r)})}},created(){this.getLocals()},mounted(){}},Bt={class:"grid w-full gap-1 mt-5 mb-5 md:gap-0 md:grid-cols-10 language-selector"},Ct=["name","value","id","checked"],St=["for"];function Dt(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock("ul",Bt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.locals,(i,s)=>(e.openBlock(),e.createElementBlock("li",null,[e.createElementVNode("input",{type:"radio",name:o.trans_selector_name,value:i,class:"hidden peer",id:i+"_"+o.field_name,autocomplete:"off",checked:i===a.default_language},null,8,Ct),e.createElementVNode("label",{for:i+"_"+o.field_name,class:e.normalizeClass([{"border md:!rounded-s-lg":s===0,"border md:!rounded-e-lg":s===a.locals.length-1,"border-t border-b":s!==0&&s!==a.locals.length-1},"w-full p-1 font-bold text-center text-gray-500 uppercase bg-white border-gray-200 rounded-lg cursor-pointer md:rounded-none dark:hover:text-gray-300 dark:border-gray-700 dark:peer-checked:text-blue-500 peer-checked:border-blue-600 peer-checked:text-blue-600 hover:text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:bg-gray-800 dark:hover:bg-gray-700"])},e.toDisplayString(i),11,St)]))),256))])}const $t=u(Vt,[["render",Dt]]),Ot={class:"bg-white border rounded-lg border-stroke shadow-default dark:border-strokedark dark:bg-boxdark"},Pt={class:"px-3 py-4 border-b border-stroke dark:border-strokedark"},Tt={class:"font-semibold text-black dark:text-white"},Mt={key:0,class:"p-6"},jt={__name:"GlCard",props:{class:{type:String,default:""}},setup(t){const r=t,o=e.computed(()=>r.class);return(n,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col gap-9",o.value])},[e.createElementVNode("div",Ot,[e.createElementVNode("div",Pt,[e.createElementVNode("h3",Tt,[e.renderSlot(n.$slots,"header")])]),n.$slots.body?(e.openBlock(),e.createElementBlock("div",Mt,[e.renderSlot(n.$slots,"body")])):e.createCommentVNode("",!0)])],2))}},At={name:"MultiSelectDropdown",template:"MultiSelectDropdown",props:{modelValue:{type:[String,Number],default:""},default_value:{type:Array,default:[]},field_name:{type:String,default:""},is_required:{type:Boolean,default:!1},has_cancel:{type:Boolean,default:!0},label_name:{type:String,default:""},options:{type:Array,required:!0,default:[],note:"Options of dropdown. An array of options with id and name"},placeholder:{type:String,required:!1,default:"Please select an option",note:"Placeholder of dropdown"},maxItem:{type:Number,required:!1,default:100,note:"Max items showing"},show:{type:Boolean,default:!1},error_message:{type:String,default:""}},data(){return{selected:[],count:0,optionsShown:!1,searchFilter:"",selectedIds:[]}},created(){this.$emit("selected",this.selected)},mounted(){self=this;var t=this.convertedOptionsDefault();this.selected=this.options_values.filter(r=>t.includes(r.id+"")),this.show||(document.body.addEventListener("click",function(r){self.clearData(r)}),document.getElementById(this.field_name+"search").addEventListener("keydown",function(r){if(_.includes([37,38,39,40,13],r.keyCode)){if((r.keyCode===38||r.keyCode===40)&&r.preventDefault(),r.keyCode===40&&self.posts=="")return;self.selectItem(r.keyCode)}}),document.addEventListener("keypress",function(r){r.key==="Enter"&&r.target.form&&r.preventDefault()}))},computed:{options_values(){return this.convertedOptions()},filteredOptions(){const t=[],r=new RegExp(this.searchFilter,"ig");for(const o of this.options_values){const n=String(o.name);(this.searchFilter.length<1||n.match(r))&&t.length<this.maxItem&&t.push(o)}return t}},emits:["update:modelValue","selected","selectionChanged"],methods:{selectAll(){this.selected=this.convertedOptions()},deselectAll(){this.selected=[]},isOptionSelected(t){return this.selected.findIndex(r=>r.id===t)!==-1},clearData:function(t){t.target.id!=this.field_name+"search"&&t.target.id!=this.field_name&&!t.target.classList.contains("showOptions")&&(this.exit(),this.count=0)},selectItem:function(t){t==40&&this.count<this.filteredOptions.length&&(this.count++,document.getElementById(this.count).scrollIntoView()),t==38&&this.count>1&&(this.count--,document.getElementById(this.count).scrollIntoView()),t==13&&document.getElementById(this.count).click()},convertedOptions(){return this.options.map((t,r)=>typeof t=="object"?t:{id:t,name:t})},convertedOptionsDefault(){return this.default_value.map((t,r)=>typeof t=="object"?t.id+"":t+"")},clearOption(t){let r=this.selected.findIndex(o=>o.id===t.id);r!==-1&&this.selected.splice(r,1),this.selectedIds=this.selected.map(o=>o.id),this.$emit("update:modelValue",this.selectedIds),this.$emit("selected",this.selectedIds)},selectOption(t){let r=this.selected.findIndex(o=>o.id===t.id);r!==-1?this.selected.splice(r,1):this.selected.push(t),this.selectedIds=this.selected.map(o=>o.id),this.$emit("update:modelValue",this.selectedIds),this.$emit("selected",this.selectedIds)},showOptions(){this.show||(this.searchFilter="",this.optionsShown=!0,this.$nextTick(()=>{this.$refs[this.field_name+"search"].focus()}))},ClearInput(){this.show||(this.selected=[],this.searchFilter="",this.showOptions())},exit(){this.selected||(this.selected=[],this.searchFilter=""),this.optionsShown=!1},keyMonitor:function(t){if(_.includes([37,38,39,40,13],t.keyCode)){if((t.keyCode===38||t.keyCode===40)&&t.preventDefault(),t.keyCode===40&&self.posts=="")return;this.selectItem(t.keyCode)}}},watch:{searchFilter(){this.filteredOptions.length},selected(t){this.selectedIds=t.map(r=>r.id),this.$emit("update:modelValue",this.selectedIds),this.$emit("selected",this.selectedIds),this.$emit("selectionChanged",this.selectedIds)}}},It={class:"font-bold ptext-lg dark:text-white"},Lt={class:"mt-3 mb-4"},Ft={class:"bg-blue-100 text-blue-800 text-sm font-medium mb-2 mt-2 me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300"},zt=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),Gt=["name","value"],vt={key:0,class:"dropdown"},Rt={class:"inline-flex ml-2 rounded-md shadow-sm",role:"group"},Ut={class:"border border-gray-200 rounded-lg focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500"},qt={class:"relative"},Ht=["onClick"],Zt={class:"text-gray-700 bg-white dark:border-strokedark dark:bg-boxdark dark:text-gray-200 !border-b !border-t-0 !border-r !border-l absolute w-full z-[999999999] showOptions"},Kt={class:"p-1"},Wt=e.createElementVNode("label",{for:"default-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1),Xt={class:"relative"},Yt=e.createElementVNode("div",{class:"absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3"},[e.createElementVNode("svg",{class:"w-4 h-4 text-gray-500 dark:text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"})])],-1),Jt=["id"],Qt={class:"overflow-y-auto max-h-64"},er=["onClick","onMousedown","id"];function tr(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock(e.Fragment,null,[o.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.field_name)},[e.createElementVNode("h3",It,e.toDisplayString(o.label_name),1),e.createElementVNode("p",Lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.selected,(i,s)=>(e.openBlock(),e.createElementBlock("span",Ft,e.toDisplayString(i.name),1))),256))]),zt],2)):e.createCommentVNode("",!0),o.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",o.field_name])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.selectedIds,(i,s)=>(e.openBlock(),e.createElementBlock("input",{type:"hidden",name:o.field_name+"[]",key:s,value:i},null,8,Gt))),128)),o.options?(e.openBlock(),e.createElementBlock("div",vt,[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-form":o.error_message=="","gl-label-form-invalid":o.error_message!=="",required:o.is_required})},e.toDisplayString(o.label_name),3),e.createElementVNode("div",Rt,[e.createElementVNode("button",{onClick:r[0]||(r[0]=(...i)=>l.selectAll&&l.selectAll(...i)),type:"button",class:"px-4 py-0 text-sm font-medium text-gray-900 bg-transparent border border-gray-900 rounded-s-md hover:bg-gray-900 hover:text-white focus:z-10 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700"}," Select all "),e.createElementVNode("button",{onClick:r[1]||(r[1]=(...i)=>l.deselectAll&&l.deselectAll(...i)),type:"button",class:"px-4 py-0 text-sm font-medium text-gray-900 bg-transparent border border-gray-900 rounded-e-md hover:bg-gray-900 hover:text-white focus:z-10 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700"}," Deselect all ")]),e.createElementVNode("div",Ut,[e.createElementVNode("div",qt,[e.createElementVNode("div",{class:"flex flex-wrap gap-2 pl-8 pr-2 gl-multi-dropdown showOptions",onClick:r[2]||(r[2]=i=>l.showOptions())},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.selected,(i,s)=>(e.openBlock(),e.createElementBlock("span",{key:s,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded pointer-events-none dark:bg-blue-900 dark:text-blue-300"},[e.createTextVNode(e.toDisplayString(i.name)+" ",1),e.createElementVNode("i",{onClick:e.withModifiers(d=>l.clearOption(i),["stop"]),class:"cursor-pointer pointer-events-auto hover:text-red-600 dark:hover:text-red-400 fas fa-times"},null,8,Ht)]))),128))]),e.createElementVNode("i",{class:e.normalizeClass([a.optionsShown?"fa-angle-up":"fa-angle-down","absolute text-xl text-gray-500 cursor-pointer fas right-2 hover:text-gray-700"]),style:{top:"11px"}},null,2)]),e.withDirectives(e.createElementVNode("div",Zt,[e.createElementVNode("div",Kt,[Wt,e.createElementVNode("div",Xt,[Yt,e.withDirectives(e.createElementVNode("input",{type:"search","onUpdate:modelValue":r[3]||(r[3]=i=>a.searchFilter=i),id:o.field_name+"search",ref:o.field_name+"search",onBlur:r[4]||(r[4]=i=>l.exit()),autocomplete:"off",class:"block w-full p-2 text-sm text-gray-900 border border-gray-300 rounded-lg ps-10 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search ..."},null,40,Jt),[[e.vModelText,a.searchFilter]])])]),e.createElementVNode("div",Qt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.filteredOptions,(i,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["block px-2 py-2 text-xs leading-4 text-gray-700 no-underline cursor-pointer dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",s+1==a.count||l.isOptionSelected(i.id)?"bg-gray-100 dark:bg-gray-600":""]),onClick:d=>l.selectOption(i),onMousedown:d=>l.selectOption(i),key:s,id:s+1},e.toDisplayString(i.name||i.id||"-"),43,er))),128))])],512),[[e.vShow,a.optionsShown]])])])):e.createCommentVNode("",!0)],2))],64)}const rr=u(At,[["render",tr]]),or={props:{button_type:{type:String,default:"default"},is_submit:{type:Boolean,default:!1},icon:{type:String,default:""},is_loading:{type:Boolean,default:!1},tag:{type:String,default:"button"},href:{type:String,default:""}},computed:{buttonTypeClass(){switch(this.button_type){case"default":return"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800";case"alternative":return" text-gray-900 bg-white border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700";case"dark":return"text-white bg-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-700 dark:border-gray-700";case"light":return"text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 focus:ring-4 focus:ring-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600 dark:focus:ring-gray-700";case"green":return" text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800";case"red":return" text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900";case"yellow":return" text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 dark:focus:ring-yellow-900";case"purple":return" text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 dark:bg-purple-600 dark:hover:bg-purple-700 dark:focus:ring-purple-900";default:return""}}},methods:{}},nr=e.createElementVNode("svg",{"aria-hidden":"true",role:"status",class:"inline w-4 h-4 me-3 animate-spin",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.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"}),e.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:"#1C64F2"})],-1);function lr(t,r,o,n,a,l){return o.is_loading?(e.openBlock(),e.createBlock(e.resolveDynamicComponent("button"),{key:1,disabled:"",class:e.normalizeClass(`flex items-center gap-2 focus:outline-none text-sm px-2 py-2 me-2 font-medium rounded-lg ${l.buttonTypeClass}`)},{default:e.withCtx(()=>[nr,e.createTextVNode(" Loading... ")]),_:1},8,["class"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.tag),e.mergeProps({key:0,type:o.is_submit},{type:o.is_submit?"submit":void 0},{href:o.tag==="a"?o.href:void 0,class:`flex items-center gap-2 focus:outline-none text-sm px-5 py-2 me-2 font-medium rounded-lg ${l.buttonTypeClass}`}),{default:e.withCtx(()=>[o.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([o.icon,"text-base"])},null,2)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default")]),_:3},16,["type","href","class"]))}const ar=u(or,[["render",lr]]),sr={class:"font-bold ptext-lg dark:text-white"},ir=["name","id"],dr=["id"],cr=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),mr=["for"],hr=e.createElementVNode("span",{class:"language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300"},null,-1),fr=["name","id"],gr=["required","name","id","type"],ur={class:"gl-span-form-error"},pr={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},_r={__name:"GlTextareaTranslate",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:null},modelValue:{type:[String,Number],default:""},model_value_translate:{type:[String,Object],default:null},modelValueTranslate:{type:[String,Object],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},get_field_translations:{type:String,default:""},description:{type:String,default:""},translatable:{type:Object,default:null}},emits:["update:modelValue","update:modelValueTranslate","keydown"],setup(t,{expose:r,emit:o}){const n=t,a=o,l=e.ref(null),i=e.ref(null);return e.onMounted(()=>{l.value!==null&&l.value.hasAttribute("autofocus")&&l.value.focus(),n.model_value&&(a("update:modelValue",n.model_value),l.value.value=n.model_value),n.model_value_translate,n.translatable&&axios.post("/admin/get_field_translations",{model:n.translatable.model,row_id:n.translatable.row_id,field:n.translatable.field}).then(s=>{i.value.value=JSON.stringify(s.data),a("update:modelValueTranslate",JSON.stringify(s.data)),console.log("input_translate",i.value.value)}).catch(s=>{console.log(s)})}),r({focus:()=>l.value.focus()}),(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",sr,e.toDisplayString(t.label_name),1),e.withDirectives(e.createElementVNode("input",{type:"hidden","data-i18n":"true",name:t.field_name+"_i18n",id:t.field_name+"_i18n",ref_key:"input_translate",ref:i,"onUpdate:modelValue":d[0]||(d[0]=c=>s.inputTranslateValue=c)},null,8,ir),[[e.vModelText,s.inputTranslateValue]]),e.createElementVNode("p",{id:t.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},e.toDisplayString(t.model_value),9,dr),cr],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-translation-form":t.error_message=="","gl-label-translation-form-invalid":t.error_message!=="",required:t.is_required}),for:t.field_name},e.toDisplayString(t.label_name),11,mr),hr,e.createElementVNode("input",{class:"mb-4",type:"hidden","data-i18n":"true",name:t.field_name+"_i18n",id:t.field_name+"_i18n",onInput:d[1]||(d[1]=c=>s.$emit("update:modelValueTranslate",c.target.value)),ref_key:"input_translate",ref:i},null,40,fr),e.createElementVNode("textarea",{required:t.is_required,name:t.field_name,id:t.field_name,class:e.normalizeClass({" gl-textarea-form form-input-translation mt-4 ":t.error_message==""," gl-textarea-form-invalid form-input-translation mt-4 ":t.error_message!==""}),type:t.type,onInput:d[2]||(d[2]=c=>s.$emit("update:modelValue",c.target.value)),onKeydown:d[3]||(d[3]=c=>s.$emit("keydown",c)),ref_key:"input",ref:l,rows:"4"},`
6
6
  `,42,gr),e.createElementVNode("span",ur,e.toDisplayString(t.error_message),1),e.createElementVNode("small",pr,e.toDisplayString(t.description),1)],2))],64))}},yr={class:"font-bold ptext-lg dark:text-white"},br=["name","id"],kr=["id"],xr=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),wr=["for"],Er=e.createElementVNode("span",{class:"language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300"},null,-1),Nr=["name","id"],Vr=["name","id","type"],Br={class:"gl-span-form-error"},Cr={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},Sr={__name:"GlTinymceTranslate",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:null},modelValue:{type:[String,Number],default:""},model_value_translate:{type:[String,Object],default:null},modelValueTranslate:{type:[String,Object],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},get_field_translations:{type:String,default:""},description:{type:String,default:""},translatable:{type:Object,default:null}},emits:["update:modelValue","update:modelValueTranslate","keydown"],setup(t,{expose:r,emit:o}){const n=t,a=o,l=e.ref(null),i=e.ref(null);return e.onMounted(()=>{tinymce.init({selector:"#"+n.field_name,width:"100%",height:300}),console.log("tinymce ",n.model_value),l.value!==null&&l.value.hasAttribute("autofocus")&&l.value.focus(),n.model_value&&(a("update:modelValue",n.model_value),l.value.value=n.model_value),n.model_value_translate,n.translatable&&axios.post("/admin/get_field_translations",{model:n.translatable.model,row_id:n.translatable.row_id,field:n.translatable.field}).then(s=>{i.value.value=JSON.stringify(s.data),a("update:modelValueTranslate",JSON.stringify(s.data))}).catch(s=>{console.log(s)})}),r({focus:()=>l.value.focus()}),(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",yr,e.toDisplayString(t.label_name),1),e.withDirectives(e.createElementVNode("input",{type:"hidden","data-i18n":"true",name:t.field_name+"_i18n",id:t.field_name+"_i18n",ref_key:"input_translate",ref:i,"onUpdate:modelValue":d[0]||(d[0]=c=>s.inputTranslateValue=c)},null,8,br),[[e.vModelText,s.inputTranslateValue]]),e.createElementVNode("p",{id:t.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},e.toDisplayString(t.model_value),9,kr),xr],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-translation-form":t.error_message=="","gl-label-translation-form-invalid":t.error_message!=="",required:t.is_required}),for:t.field_name},e.toDisplayString(t.label_name),11,wr),Er,e.createElementVNode("input",{class:"mb-4",type:"hidden","data-i18n":"true",name:t.field_name+"_i18n",id:t.field_name+"_i18n",onInput:d[1]||(d[1]=c=>s.$emit("update:modelValueTranslate",c.target.value)),ref_key:"input_translate",ref:i},null,40,Nr),e.createElementVNode("textarea",{name:t.field_name,id:t.field_name,class:e.normalizeClass(["tiny",{" gl-textarea-form form-input-translation mt-4 ":t.error_message==""," gl-textarea-form-invalid form-input-translation mt-4 ":t.error_message!==""}]),type:t.type,onInput:d[2]||(d[2]=c=>s.$emit("update:modelValue",c.target.value)),onKeydown:d[3]||(d[3]=c=>s.$emit("keydown",c)),ref_key:"input",ref:l,rows:"4"},`
7
- `,42,Vr),e.createElementVNode("span",Br,e.toDisplayString(t.error_message),1),e.createElementVNode("small",Cr,e.toDisplayString(t.description),1)],2))],64))}},Dr={class:"font-bold ptext-lg dark:text-white"},$r=["name","id"],Or=["id"],Pr=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),Tr=["for"],Mr=e.createElementVNode("span",{class:"language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300"},null,-1),jr=["name","id"],Ar=["required","name","id","type"],Ir={class:"gl-span-form-error"},Lr={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},Fr={__name:"GlTextTranslate",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:null},modelValue:{type:[String,Number],default:""},model_value_translate:{type:[String,Object],default:null},modelValueTranslate:{type:[String,Object],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},get_field_translations:{type:String,default:""},description:{type:String,default:""},translatable:{type:Object,default:null}},emits:["update:modelValue","update:modelValueTranslate","keydown"],setup(t,{expose:r,emit:o}){const n=t,a=o,l=e.ref(null),i=e.ref(null);return e.onMounted(()=>{l.value!==null&&l.value.hasAttribute("autofocus")&&l.value.focus(),n.model_value&&(a("update:modelValue",n.model_value),l.value.value=n.model_value),n.model_value_translate,n.translatable&&axios.post("/admin/get_field_translations",{model:n.translatable.model,row_id:n.translatable.row_id,field:n.translatable.field}).then(s=>{i.value.value=JSON.stringify(s.data),a("update:modelValueTranslate",JSON.stringify(s.data))}).catch(s=>{console.log(s)})}),r({focus:()=>l.value.focus()}),(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",Dr,e.toDisplayString(t.label_name),1),e.withDirectives(e.createElementVNode("input",{type:"hidden","data-i18n":"true",name:t.field_name+"_i18n",id:t.field_name+"_i18n",ref:"input_translate_s","onUpdate:modelValue":d[0]||(d[0]=c=>s.inputTranslateValue=c)},null,8,$r),[[e.vModelText,s.inputTranslateValue]]),e.createElementVNode("p",{id:t.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},e.toDisplayString(t.model_value),9,Or),Pr],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-translation-form":t.error_message=="","gl-label-translation-form-invalid":t.error_message!=="",required:t.is_required}),for:t.field_name},e.toDisplayString(t.label_name),11,Tr),Mr,e.createElementVNode("input",{class:"mb-4",type:"hidden","data-i18n":"true",name:t.field_name+"_i18n",id:t.field_name+"_i18n",onInput:d[1]||(d[1]=c=>s.$emit("update:modelValueTranslate",c.target.value)),ref_key:"input_translate",ref:i},null,40,jr),e.createElementVNode("input",{required:t.is_required,name:t.field_name,id:t.field_name,class:e.normalizeClass({" gl-input-form form-input-translation mt-2 ":t.error_message==""," gl-input-form-invalid form-input-translation mt-2 ":t.error_message!==""}),type:t.type,onInput:d[2]||(d[2]=c=>s.$emit("update:modelValue",c.target.value)),onKeydown:d[3]||(d[3]=c=>s.$emit("keydown",c)),ref_key:"input",ref:l},null,42,Ar),e.createElementVNode("span",Ir,e.toDisplayString(t.error_message),1),e.createElementVNode("small",Lr,e.toDisplayString(t.description),1)],2))],64))}},zr={class:"font-bold ptext-lg dark:text-white"},Gr={class:"mb-4 text-base text-gray-900 dark:text-white"},vr=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),Rr=["for"],Ur=["required","name","id","type"],qr={class:"gl-span-form-error"},Hr={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},Zr={__name:"GlTextInput",props:e.mergeModels({is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue","keydown"],["update:modelValue"]),setup(t,{expose:r,emit:o}){const n=t,a=o,l=e.ref(null),i=e.useModel(t,"modelValue");return e.onMounted(()=>{l.value!==null&&l.value.hasAttribute("autofocus")&&l.value.focus(),n.model_value!=""&&(a("update:modelValue",n.model_value),l.value.value=n.model_value)}),r({focus:()=>l.value.focus()}),(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",zr,e.toDisplayString(t.label_name),1),e.createElementVNode("p",Gr,e.toDisplayString(t.type=="password"?t.model_value.replace(/./g,"*"):t.model_value),1),vr],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-form":t.error_message=="","gl-label-form-invalid":t.error_message!=="",required:t.is_required}),for:t.field_name},e.toDisplayString(t.label_name),11,Rr),e.withDirectives(e.createElementVNode("input",{required:t.is_required,name:t.field_name,id:t.field_name,class:e.normalizeClass({"gl-input-form":t.error_message=="","gl-input-form-invalid":t.error_message!==""}),type:t.type,"onUpdate:modelValue":d[0]||(d[0]=c=>i.value=c),onKeydown:d[1]||(d[1]=c=>s.$emit("keydown",c)),ref_key:"input",ref:l},null,42,Ur),[[e.vModelDynamic,i.value]]),e.createElementVNode("span",qr,e.toDisplayString(t.error_message),1),e.createElementVNode("small",Hr,e.toDisplayString(t.description),1)],2))],64))}},Kr={setup(t,{slots:r}){const o=e.ref(r.default().map(a=>a.props)),n=e.ref(o.value[0].title);return e.provide("selectedTitle",n),{tabs:o,selectedTitle:n}}},Wr={class:"flex flex-wrap"},Xr={class:"w-full"},Yr={class:"flex flex-row flex-wrap gap-1 pt-3 pb-4 mb-0 list-none"},Jr=["onClick"],Qr={class:"relative flex flex-col w-full min-w-0 mb-6 break-words bg-white rounded shadow-lg dark:border-strokedark dark:bg-boxdark"},eo={class:"flex-auto px-4 py-5"},to={class:"tab-content tab-space"};function ro(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Wr,[e.createElementVNode("div",Xr,[e.createElementVNode("ul",Yr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabs,i=>(e.openBlock(),e.createElementBlock("li",{key:i.title,onClick:s=>n.selectedTitle=i.title,class:"flex-auto -mb-px text-center"},[e.createElementVNode("a",{class:e.normalizeClass([{"text-slate-600 bg-white dark:bg-meta-4":n.selectedTitle!=i.title,"text-white bg-slate-600 dark:bg-primary":n.selectedTitle===i.title},"block px-5 py-3 text-xs font-bold leading-normal uppercase rounded shadow-lg hover:text-white tex hover:bg-slate-600 dark:hover:bg-primary dark:text-white tabs_buttons"])},[e.createElementVNode("i",{class:e.normalizeClass([i.icon,"mr-1 text-base"])},null,2),e.createTextVNode(" "+e.toDisplayString(i.title),1)],2)],8,Jr))),128))])])]),e.createElementVNode("div",Qr,[e.createElementVNode("div",eo,[e.createElementVNode("div",to,[e.renderSlot(t.$slots,"default")])])])],64)}const oo=u(Kr,[["render",ro]]),no={props:["title"],setup(){return{selectedTitle:e.inject("selectedTitle")}}},lo={class:"block"};function ao(t,r,o,n,a,l){return e.withDirectives((e.openBlock(),e.createElementBlock("div",lo,[e.renderSlot(t.$slots,"default")],512)),[[e.vShow,o.title==n.selectedTitle]])}const so=u(no,[["render",ao]]),io={props:{elements_to_show_prop:{type:Number,default:3},hide_arrow:{type:Boolean,default:!1},disable_touch:{type:Boolean,default:!1},direction_property:{type:String,default:"ltr"},slider_arrows_indicators_position:{type:String,default:"arrows_outside_slider"}},data:function(){return{elementsToShow:3,dotsNum:0,currentDot:1,dotsNavigation:[],touchStartX:0,isMoving:!1,initialX:0,initialY:0,Random_string:this.generateRandomString(6)}},mounted(){this.elementsToShow=this.elements_to_show_prop,this.initSlider(),this.disable_touch||this.movingActions()},methods:{sliderIndicatorsAction(){var t="";return this.direction_property=="rtl"?(t+=" space-x-reverse ",t+=" slider_indicators "):this.slider_arrows_indicators_position=="arrows_indicators_inside_slider"&&(t+=" slider_indicators "),t},sliderContainerAction(){var t="";return!this.hide_arrow&&this.slider_arrows_indicators_position=="arrows_outside_slider"?t+=" w-12/12 xl:w-8/12 xxl:w-8/12 md:w-8/12 sm:w-8/12":this.slider_arrows_indicators_position!="arrows_outside_slider"&&(t+=" w-12/12 "),t},generateRandomString(t){let r="";const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=o.length;for(let a=0;a<t;a++)r+=o.charAt(Math.floor(Math.random()*n));return r},movingActions(){let t=this,r=document.getElementById("slider_"+this.Random_string);const o=a=>{r.style.cursor="grabbing";const l=s=>{const d=s.clientX||s.touches&&s.touches[0]&&s.touches[0].clientX,c=s.clientY||s.touches&&s.touches[0]&&s.touches[0].clientY,m=d-t.initialX,f=c-t.initialY;Math.abs(m)>Math.abs(f)?(s.preventDefault(),Math.abs(m)>=70&&(m<0?t.next():t.prev(),t.initialX=d)):r.style.cursor="grab",Math.abs(f)>Math.abs(m)&&(r.style.cursor="grab")},i=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("touchmove",l),document.removeEventListener("mouseup",i),document.removeEventListener("touchend",i),r.style.cursor="grab"};document.addEventListener("mousemove",l),document.addEventListener("touchmove",l,{passive:!1}),document.addEventListener("mouseup",i),document.addEventListener("touchend",i),t.initialX=a.clientX||a.touches&&a.touches[0]&&a.touches[0].clientX,t.initialY=a.clientY||a.touches&&a.touches[0]&&a.touches[0].clientY},n=a=>{a.key==="ArrowLeft"?t.prev():a.key==="ArrowRight"&&t.next()};r.addEventListener("mousedown",o),r.addEventListener("touchstart",o),document.addEventListener("keydown",n)},next(){this.currentDot<this.dotsNavigation.length&&(this.currentDot++,this.setDot(this.currentDot))},prev(){this.currentDot>1&&(this.currentDot--,this.setDot(this.currentDot))},initSlider(){let t=document.getElementById("sliderContainer_"+this.Random_string),r=document.getElementById("mainSliderContainer_"+this.Random_string),o=document.getElementById("slider_"+this.Random_string),n=o.querySelectorAll("li"),a=Array.from(n).filter(s=>s.parentNode===o),l=t.clientWidth,i=l/this.elementsToShow;if(this.elementsToShow>1?document.body.clientWidth<1e3?(this.elementsToShow=1,i=this.hide_arrow?r.clientWidth:l):document.body.clientWidth<1500&&(this.elementsToShow=2):(this.elementsToShow=1,i=this.hide_arrow?r.clientWidth:l),a.length>1){this.dotsNum=this.elementsToShow==1?a.length:a.length-this.elementsToShow+1;let s=this.elementsToShow==1?i*a.length/this.dotsNum:i*(a.length-this.elementsToShow)/(this.dotsNum-1);this.dotsNavigation=[];for(let d=0;d<this.dotsNum;d++)this.dotsNavigation.push(s*d)}o.style.width=a.length*i+"px",o.style.transition="margin",o.style.transitionDuration="1s";for(let s=0;s<a.length;s++){const d=a[s];d.style.width=i+"px"}},setDot(t){let r=document.getElementById("slider_"+this.Random_string);this.direction_property=="rtl"?r.style.marginRight=-this.dotsNavigation[t-1]+"px":r.style.marginLeft=-this.dotsNavigation[t-1]+"px",this.currentDot=t}}},y=t=>(e.pushScopeId("data-v-a94f16a9"),t=t(),e.popScopeId(),t),co=["id"],mo={key:0,class:"items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"},ho={class:"w-full"},fo={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},go=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],uo={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},po=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],_o=["id"],yo=["id"],bo={class:"w-full"},ko={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},xo=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],wo={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Eo=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],No={class:"w-full"},Vo={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Bo=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],Co={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},So=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],Do=["onClick"],$o=[y(()=>e.createElementVNode("span",null,null,-1))],Oo={key:1,class:"flex justify-between pl-5 pr-5"},Po=["onClick"],To=[y(()=>e.createElementVNode("span",null,null,-1))],Mo={key:0,class:"flex"},jo={class:"flex items-center"},Ao={class:"w-full"},Io={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Lo=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],Fo={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},zo=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],Go={class:"flex items-center"},vo={class:"w-full"},Ro={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Uo=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],qo={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Ho=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],Zo={key:1,class:"items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"},Ko={class:"w-full"},Wo={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Xo=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],Yo={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Jo=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))];function Qo(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["",!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slide"?"flex":"relative block"]),id:"mainSliderContainer_"+t.Random_string},[t.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?(e.openBlock(),e.createElementBlock("div",mo,[e.createElementVNode("div",ho,[e.createElementVNode("button",{class:"p-3 mr-5 rounded-full shadow-lg arrow_button_styles",onClick:r[0]||(r[0]=i=>l.prev())},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",fo,go)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",uo,po)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-hidden",l.sliderContainerAction()]),id:"sliderContainer_"+t.Random_string},[e.createElementVNode("ul",{class:"flex",id:"slider_"+t.Random_string},[t.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_indicators_inside_slider"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["items-center justify-center hidden arrow_button xl:flex xxl:flex md:flex sm:flex",o.direction_property=="rtl"?"arrow_button_next":"arrow_button_prev"])},[e.createElementVNode("div",bo,[e.createElementVNode("button",{class:"p-3 rounded-full shadow-lg arrow_button_styles",onClick:r[1]||(r[1]=e.withModifiers(i=>l.prev(),["stop"]))},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",ko,xo)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",wo,Eo)):e.createCommentVNode("",!0)])])],2)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},void 0,!0),t.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_indicators_inside_slider"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["items-center justify-center hidden xl:flex xxl:flex md:flex sm:flex arrow_button",o.direction_property=="rtl"?"arrow_button_prev":"arrow_button_next"])},[e.createElementVNode("div",No,[e.createElementVNode("button",{class:"p-3 rounded-full shadow-lg arrow_button_styles",onClick:r[2]||(r[2]=e.withModifiers(i=>l.next(),["stop"]))},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",Vo,Bo)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",Co,So)):e.createCommentVNode("",!0)])])],2)):e.createCommentVNode("",!0)],8,yo),o.slider_arrows_indicators_position!="arrows_indicators_below_slider"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex justify-center mb-1 space-x-1",l.sliderIndicatorsAction()])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dotsNum,i=>(e.openBlock(),e.createElementBlock("button",{role:"button",class:e.normalizeClass(["gl-dot",{active:t.currentDot==i}]),key:i,onClick:s=>l.setDot(i)},$o,10,Do))),128))],2)):e.createCommentVNode("",!0),o.slider_arrows_indicators_position=="arrows_indicators_below_slider"?(e.openBlock(),e.createElementBlock("div",Oo,[e.createElementVNode("div",{class:e.normalizeClass(["flex justify-center mb-1 space-x-1",l.sliderIndicatorsAction()])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dotsNum,i=>(e.openBlock(),e.createElementBlock("button",{role:"button",class:e.normalizeClass(["gl-dot",{active:t.currentDot==i}]),key:i,onClick:s=>l.setDot(i)},To,10,Po))),128))],2),t.dotsNum>0?(e.openBlock(),e.createElementBlock("div",Mo,[e.createElementVNode("div",jo,[e.createElementVNode("div",Ao,[e.createElementVNode("button",{class:e.normalizeClass(["p-3 rounded-full arrow_button_styles",o.direction_property=="rtl"?"ml-3":"mr-3"]),onClick:r[3]||(r[3]=i=>l.prev())},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",Io,Lo)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",Fo,zo)):e.createCommentVNode("",!0)],2)])]),e.createElementVNode("div",Go,[e.createElementVNode("div",vo,[e.createElementVNode("button",{class:"p-3 rounded-full arrow_button_styles",onClick:r[4]||(r[4]=i=>l.next())},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",Ro,Uo)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",qo,Ho)):e.createCommentVNode("",!0)])])])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,_o),t.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?(e.openBlock(),e.createElementBlock("div",Zo,[e.createElementVNode("div",Ko,[e.createElementVNode("button",{class:"p-3 ml-5 rounded-full shadow-lg arrow_button_styles",onClick:r[5]||(r[5]=i=>l.next())},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",Wo,Xo)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",Yo,Jo)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],10,co)])}const en=u(io,[["render",Qo],["__scopeId","data-v-a94f16a9"]]),tn={class:"fixed left-0 top-13 z-[1055] h-full w-full overflow-y-auto overflow-x-hidden outline-none inset-0 bg-black bg-opacity-80",tabindex:"-1","aria-hidden":"true"},rn={class:"pointer-events-auto relative flex max-h-[100%] w-full flex-col overflow-hidden text-current shadow-4 outline-none bg-white border rounded-lg border-stroke dark:border-strokedark dark:bg-boxdark"},on={class:"flex items-center justify-between flex-shrink-0 pt-10 pb-3 pl-3 pr-3 border-b-2 dark:border-gray-600"},nn={class:"text-xl font-medium leading-normal text-surface dark:text-white"},ln=[e.createElementVNode("span",{class:"[&>svg]:h-6 [&>svg]:w-6"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])],-1)],an={class:"relative p-4 overflow-y-auto"},sn={class:"flex flex-wrap items-center justify-end flex-shrink-0 p-4 border-t-2 rounded-b-md border-neutral-100 dark:border-gray-600"},dn={__name:"GlModal",props:{is_open:{type:Boolean,default:!1},title:{type:String,default:""},max_width:{type:String,default:"max-w-2xl"}},emits:["closeModal"],setup(t,{emit:r}){const o=t,n=r,a=()=>{document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight="0px"},l=()=>{document.documentElement.style.overflow="",document.documentElement.style.paddingRight=""},i=()=>{n("closeModal"),l()};return e.watch(()=>o.is_open,(s,d)=>{s?a():l()},{immediate:!0,deep:!0}),(s,d)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",tn,[e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none relative h-[calc(100%-1rem)] w-auto translate-y-[-50px] transition-all duration-300 ease-in-out min-[576px]:mx-auto min-[576px]:mt-7 min-[576px]:h-[calc(100%-3.5rem)]",t.max_width])},[e.createElementVNode("div",rn,[e.createElementVNode("div",on,[e.createElementVNode("h5",nn,e.toDisplayString(t.title),1),e.createElementVNode("button",{type:"button",class:"box-content border-none rounded-none text-neutral-500 hover:text-neutral-800 hover:no-underline focus:text-neutral-800 focus:opacity-100 focus:shadow-none focus:outline-none dark:text-neutral-400 dark:hover:text-neutral-300 dark:focus:text-neutral-300",onClick:i,"aria-label":"Close"},ln)]),e.createElementVNode("div",an,[e.renderSlot(s.$slots,"body")]),e.createElementVNode("div",sn,[e.renderSlot(s.$slots,"buttons"),e.createElementVNode("button",{onClick:i,type:"button",class:"px-5 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-200 rounded-lg ms-3 hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-blue-300 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Close ")])])],2)],512)),[[e.vShow,t.is_open]])}},cn={class:"mb-4"},mn={class:"flex justify-between px-6 py-3 -mb-px border border-gray-300 no-underlin"},hn={class:"relative inline-flex items-center cursor-pointer"},fn=["name","id"],gn=e.createElementVNode("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1),un=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),pn={class:"flex justify-between px-6 py-3 -mb-px border border-gray-200 rounded-lg no-underlin dark:border-gray-600 dark:focus:border-frontenddark"},_n={class:"relative inline-flex items-center cursor-pointer"},yn=["name","id","value","checked"],bn=e.createElementVNode("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1),kn={class:"gl-span-form-error"},xn={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},wn={__name:"GlToggleBox",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:String,required:!0},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""}},emits:["update:modelValue"],setup(t,{emit:r}){const o=t,n=r,a=e.ref(null);e.onMounted(()=>{o.model_value!=""&&(n("update:modelValue",o.model_value),a.value.checked=o.model_value==1),o.modelValue!=""&&(n("update:modelValue",o.modelValue),a.value.checked=o.modelValue==1)});const l=i=>{const s=i.target.checked?1:0;n("update:modelValue",s)};return(i,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("div",cn,[e.createElementVNode("li",mn,[e.createTextVNode(e.toDisplayString(t.label_name)+" ",1),e.createElementVNode("label",hn,[e.createElementVNode("input",{type:"checkbox",class:"sr-only peer",name:t.field_name,id:t.field_name,"true-value":1,"false-value":0,ref_key:"input",ref:a,disabled:""},null,8,fn),gn])])]),un],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("li",pn,[e.createTextVNode(e.toDisplayString(t.label_name)+" ",1),e.createElementVNode("label",_n,[e.createElementVNode("input",{type:"checkbox",class:"sr-only peer",name:t.field_name,id:t.field_name,value:t.model_value||t.modelValue,checked:t.model_value==1||t.modelValue==1,"true-value":1,"false-value":0,ref_key:"input",ref:a,onChange:l},null,40,yn),bn])]),e.createElementVNode("span",kn,e.toDisplayString(t.error_message),1),e.createElementVNode("small",xn,e.toDisplayString(t.description),1)],2))],64))}},En={name:"Dropdown",template:"Dropdown",props:{modelValue:{type:[String,Number],default:""},default_value:{type:[String,Number],default:""},field_name:{type:String,default:""},is_required:{type:Boolean,default:!1},has_cancel:{type:Boolean,default:!0},label_name:{type:String,default:""},options:{type:Array,required:!0,default:[],note:"Options of dropdown. An array of options with id and name"},placeholder:{type:String,required:!1,default:"Please select an option",note:"Placeholder of dropdown"},maxItem:{type:Number,required:!1,default:1e4,note:"Max items showing"},show:{type:Boolean,default:!1},error_message:{type:String,default:""},description:{type:String,default:""}},emits:["update:modelValue","selected","selectionChanged"],data(){return{selected:{},count:0,optionsShown:!1,searchFilter:"",uuid:""}},created(){this.$emit("selected",this.selected)},mounted(){this.uuid=this.generateUUID(),self=this;var t=this.convertedOptionDefault();this.selected=this.options_values.find(r=>String(r.id)===String(t))||{},this.show||(document.body.addEventListener("click",function(r){self.clearData(r)}),document.addEventListener("keypress",function(r){r.key==="Enter"&&r.target.form&&r.preventDefault()}))},computed:{options_values(){return this.convertedOptions()},filteredOptions(){const t=[],r=new RegExp(this.searchFilter,"ig");for(const o of this.options_values){const n=String(o.name);(this.searchFilter.length<1||n.match(r))&&t.length<this.maxItem&&t.push(o)}return t}},methods:{handleKeyDown(t){if(["ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Enter"].includes(t.key)){if(["ArrowUp","ArrowDown"].includes(t.key)&&t.preventDefault(),t.key==="ArrowDown"&&this.posts==="")return;this.selectPost(t.key)}},generateUUID(){let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(o){const n=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(o==="x"?n:n&3|8).toString(16)})},isObjectNotEmpty(t){return Object.keys(t).length>0},clearData:function(t){t.target.id!=this.field_name+"search"+this.uuid&&t.target.id!=this.field_name&&!t.target.classList.contains("showOptions")&&(this.exit(),this.count=0)},scrollToElement:function(t){const r=`${t}${this.uuid}`,o=document.getElementById(r);o&&o.scrollIntoView()},clickElement:function(t){const r=`${t}${this.uuid}`,o=document.getElementById(r);o&&o.click()},selectPost:function(t){t==="ArrowDown"&&this.count<this.filteredOptions.length&&(this.count++,this.scrollToElement(this.count)),t==="ArrowUp"&&this.count>1&&(this.count--,this.scrollToElement(this.count)),t==="Enter"&&this.clickElement(this.count)},convertedOptions(){return this.options.map((t,r)=>typeof t=="object"?t:{id:t,name:t})},convertedOptionDefault(){var t=this.default_value||this.modelValue;return console.log("default_value_options : ",this.default_value," - ",this.modelValue," - ",t),t?typeof t=="object"?t.id+"":t+"":""},updateModelValue(t){this.$emit("update:modelValue",t.target.value)},selectOption(t){this.selected=t,this.optionsShown=!1,this.$emit("selected",this.selected),this.$emit("selectionChanged",this.selected)},showOptions(){this.show||(this.searchFilter="",this.optionsShown=!0,this.$nextTick(()=>{this.$refs[this.field_name+"search"+this.uuid].focus()}))},ClearInput(){this.show||(this.selected={},this.searchFilter="",this.$emit("update:modelValue",""),this.showOptions())},exit(){this.selected.id||(this.selected={},this.searchFilter=""),this.$emit("selected",this.selected),this.optionsShown=!1}},watch:{searchFilter(){this.filteredOptions.length===0&&(this.selected={})},selected(t){this.isObjectNotEmpty(t)&&this.$emit("update:modelValue",t.id)}}},Nn={class:"font-bold ptext-lg dark:text-white"},Vn={class:"mt-3 mb-4"},Bn={class:"bg-blue-100 text-blue-800 text-sm font-medium mb-2 mt-2 me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300"},Cn=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),Sn=["name","id","value"],Dn={key:0,class:"dropdown"},$n={class:"border border-gray-200 rounded-lg focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500"},On={class:"relative showOptions"},Pn=["value","placeholder"],Tn={class:"text-gray-700 bg-white dark:border-strokedark dark:bg-boxdark dark:text-gray-200 !border-b !border-t-0 !border-r !border-l absolute w-full z-[999999999]"},Mn={class:"p-1"},jn=e.createElementVNode("label",{for:"default-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1),An={class:"relative"},In=e.createElementVNode("div",{class:"absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3"},[e.createElementVNode("svg",{class:"w-4 h-4 text-gray-500 dark:text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"})])],-1),Ln=["id"],Fn={class:"overflow-y-auto max-h-64"},zn=["onClick","onMousedown","id"],Gn={class:"flex items-center py-2 pl-10 pr-4"},vn={key:0,class:"absolute flex items-center flex-shrink-0 w-4 h-4 text-green-500 left-2 dark:text-green-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},Rn=[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M1 5.917 5.724 10.5 15 1.5"},null,-1)],Un={class:"block mt-1 text-sm font-normal leading-5 text-red-500"},qn={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"};function Hn(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock(e.Fragment,null,[o.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.field_name)},[e.createElementVNode("h3",Nn,e.toDisplayString(o.label_name),1),e.createElementVNode("p",Vn,[e.createElementVNode("span",Bn,e.toDisplayString(t.selectedValue.name),1)]),Cn],2)):e.createCommentVNode("",!0),o.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",o.field_name])},[e.createElementVNode("input",{type:"hidden",name:o.field_name,id:o.field_name,value:a.selected.id},null,8,Sn),o.options?(e.openBlock(),e.createElementBlock("div",Dn,[o.label_name?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass({"gl-label-form":o.error_message=="","gl-label-form-invalid":o.error_message!=="",required:o.is_required})},e.toDisplayString(o.label_name),3)):e.createCommentVNode("",!0),e.createElementVNode("div",$n,[e.createElementVNode("div",On,[e.createElementVNode("input",{class:e.normalizeClass([{"gl-input-form":o.error_message=="","gl-input-form-invalid":o.error_message!==""},"pl-8 pr-2 showOptions"]),ref:o.field_name,onClick:r[0]||(r[0]=i=>l.showOptions()),value:a.selected.name,placeholder:o.placeholder,autocomplete:"off",readonly:""},null,10,Pn),e.withDirectives(e.createElementVNode("i",{onClick:r[1]||(r[1]=e.withModifiers(i=>l.ClearInput(),["stop"])),class:"absolute text-gray-500 cursor-pointer fas fa-times right-7 hover:text-gray-700 dark:hover:text-gray-800",style:{top:"13px"}},null,512),[[e.vShow,l.isObjectNotEmpty(a.selected)&&o.has_cancel]]),e.createElementVNode("i",{onClick:r[2]||(r[2]=i=>!a.optionsShown&&l.showOptions()),class:e.normalizeClass([a.optionsShown?"fa-angle-up":"fa-angle-down","absolute text-xl text-gray-500 cursor-pointer fas right-2 hover:text-gray-700 dark:hover:text-gray-800 showOptions"]),style:{top:"11px"}},null,2)]),e.withDirectives(e.createElementVNode("div",Tn,[e.createElementVNode("div",Mn,[jn,e.createElementVNode("div",An,[In,e.withDirectives(e.createElementVNode("input",{type:"search","onUpdate:modelValue":r[3]||(r[3]=i=>a.searchFilter=i),ref:`${o.field_name}search${a.uuid}`,id:`${o.field_name}search${a.uuid}`,onKeydown:r[4]||(r[4]=(...i)=>l.handleKeyDown&&l.handleKeyDown(...i)),onBlur:r[5]||(r[5]=i=>l.exit()),autocomplete:"off",class:"block w-full p-2 text-sm text-gray-900 border rounded-lg outline-none border-frontend ps-10 bg-gray-50 focus:border-frontend dark:bg-gray-700 dark:border-frontenddark dark:placeholder-frontenddark dark:text-white dark:focus:border-frontenddark",placeholder:"Search ..."},null,40,Ln),[[e.vModelText,a.searchFilter]])])]),e.createElementVNode("div",Fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.filteredOptions,(i,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative px-2 py-2 text-xs leading-4 text-gray-700 no-underline cursor-pointer dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",s+1==a.count?"bg-gray-100 dark:bg-gray-600":""]),onClick:d=>l.selectOption(i),onMousedown:d=>l.selectOption(i),key:s,id:`${s+1}${a.uuid}`},[e.createElementVNode("div",Gn,[a.selected.id===i.id?(e.openBlock(),e.createElementBlock("svg",vn,Rn)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(i.name||i.id||"-"),1)])],42,zn))),128))])],512),[[e.vShow,a.optionsShown]])])])):e.createCommentVNode("",!0),e.createElementVNode("span",Un,e.toDisplayString(o.error_message),1),e.createElementVNode("small",qn,e.toDisplayString(o.description),1)],2))],64)}const Zn=u(En,[["render",Hn]]),Kn={class:"font-bold ptext-lg dark:text-white"},Wn=["id"],Xn=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),Yn=["for"],Jn=["required","name","id","type","placeholder"],Qn={class:"gl-span-form-error"},el={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},tl={__name:"GlTextarea",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""},place_holder:{type:String,default:""}},emits:["update:modelValue","keydown"],setup(t,{expose:r,emit:o}){const n=t,a=o,l=e.ref(null);return e.onMounted(()=>{l.value!==null&&l.value.hasAttribute("autofocus")&&l.value.focus(),n.model_value&&(a("update:modelValue",n.model_value),l.value.value=n.model_value),n.modelValue!=""&&(a("update:modelValue",n.modelValue),l.value.value=n.modelValue)}),r({focus:()=>l.value.focus()}),(i,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",Kn,e.toDisplayString(t.label_name),1),e.createElementVNode("p",{id:t.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},e.toDisplayString(t.model_value),9,Wn),Xn],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-form":t.error_message=="","gl-label-form-invalid":t.error_message!=="",required:t.is_required}),for:t.field_name},e.toDisplayString(t.label_name),11,Yn),e.createElementVNode("textarea",{required:t.is_required,name:t.field_name,id:t.field_name,class:e.normalizeClass({" gl-textarea-form mt-4 ":t.error_message==""," gl-textarea-form-invalid mt-4 ":t.error_message!==""}),type:t.type,onInput:s[0]||(s[0]=d=>i.$emit("update:modelValue",d.target.value)),ref_key:"input",ref:l,rows:"4",placeholder:t.place_holder},null,42,Jn),e.createElementVNode("span",Qn,e.toDisplayString(t.error_message),1),e.createElementVNode("small",el,e.toDisplayString(t.description),1)],2))],64))}},rl={compatConfig:{MODE:3},inheritAttrs:!1,emits:["pagination-change-page"],components:{RenderlessPagination:{emits:["pagination-change-page"],props:{data:{type:Object,default:()=>{}},limit:{type:Number,default:0}},computed:{isApiResource(){return!!this.data.meta},currentPage(){return this.isApiResource?this.data.meta.current_page:this.data.current_page},firstPageUrl(){return this.isApiResource?this.data.links.first:null},from(){return this.isApiResource?this.data.meta.from:this.data.from},lastPage(){return this.isApiResource?this.data.meta.last_page:this.data.last_page},lastPageUrl(){return this.isApiResource?this.data.links.last:null},nextPageUrl(){return this.isApiResource?this.data.links.next:this.data.next_page_url},perPage(){return this.isApiResource?this.data.meta.per_page:this.data.per_page},prevPageUrl(){return this.isApiResource?this.data.links.prev:this.data.prev_page_url},to(){return this.isApiResource?this.data.meta.to:this.data.to},total(){return this.isApiResource?this.data.meta.total:this.data.total},pageRange(){if(this.limit===-1)return 0;if(this.limit===0)return this.lastPage;for(var t=this.currentPage,r=this.lastPage,o=this.limit,n=t-o,a=t+o+1,l=[],i=[],s,d=1;d<=r;d++)(d===1||d===r||d>=n&&d<a)&&l.push(d);return l.forEach(function(c){s&&(c-s===2?i.push(s+1):c-s!==1&&i.push("...")),i.push(c),s=c}),i}},methods:{previousPage(){this.selectPage(this.currentPage-1)},nextPage(){this.selectPage(this.currentPage+1)},selectPage(t){t!=="..."&&this.$emit("pagination-change-page",t)}},render(){return this.$slots.default({data:this.data,limit:this.limit,computed:{isApiResource:this.isApiResource,currentPage:this.currentPage,firstPageUrl:this.firstPageUrl,from:this.from,lastPage:this.lastPage,lastPageUrl:this.lastPageUrl,nextPageUrl:this.nextPageUrl,perPage:this.perPage,prevPageUrl:this.prevPageUrl,to:this.to,total:this.total,pageRange:this.pageRange},prevButtonEvents:{click:t=>{t.preventDefault(),this.previousPage()}},nextButtonEvents:{click:t=>{t.preventDefault(),this.nextPage()}},pageButtonEvents:t=>({click:r=>{r.preventDefault(),this.selectPage(t)}})})}}},props:{data:{type:Object,default:()=>{}},limit:{type:Number,default:0},showDisabled:{type:Boolean,default:!1},size:{type:String,default:"default",validator:t=>["small","default","large"].indexOf(t)!==-1},align:{type:String,default:"left",validator:t=>["left","center","right"].indexOf(t)!==-1}},methods:{onPaginationChangePage(t){this.$emit("pagination-change-page",t)}},mounted(){}},ol={class:"flex flex-col items-center"},nl={key:0,class:"text-sm text-gray-700 dark:text-gray-400"},ll={class:"font-semibold text-gray-900 dark:text-white"},al={class:"font-semibold text-gray-900 dark:text-white"},sl={class:"font-semibold text-gray-900 dark:text-white"},il=["tabindex"],dl=e.createElementVNode("span",{class:"sr-only"},"Previous",-1),cl=e.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 1 1 5l4 4"})],-1),ml=["aria-current"],hl=["tabindex"],fl=e.createElementVNode("span",{class:"sr-only"},"Next",-1),gl=e.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"})],-1);function ul(t,r,o,n,a,l){const i=e.resolveComponent("RenderlessPagination");return e.openBlock(),e.createBlock(i,{data:o.data,limit:o.limit,onPaginationChangePage:l.onPaginationChangePage},{default:e.withCtx(s=>[e.createElementVNode("div",ol,[s.computed.total>s.computed.perPage?(e.openBlock(),e.createElementBlock("span",nl,[e.createTextVNode(" Showing "),e.createElementVNode("span",ll,e.toDisplayString(s.computed.from),1),e.createTextVNode(" to "),e.createElementVNode("span",al,e.toDisplayString(s.computed.to),1),e.createTextVNode(" of "),e.createElementVNode("span",sl,e.toDisplayString(s.computed.total),1),e.createTextVNode(" Entries ")])):e.createCommentVNode("",!0),s.computed.total>s.computed.perPage?(e.openBlock(),e.createElementBlock("ul",e.mergeProps({key:1},t.$attrs,{class:["flex items-center h-8 -space-x-px text-sm",{"pagination-sm":o.size=="small","pagination-lg":o.size=="large","justify-content-center":o.align=="center","justify-content-end":o.align=="right"}]}),[s.computed.prevPageUrl||o.showDisabled?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass(["flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 ms-0 border-e-0 rounded-s-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white",{disabled:!s.computed.prevPageUrl}])},[e.createElementVNode("a",e.mergeProps({class:"page-link",href:"#","aria-label":"Previous",tabindex:!s.computed.prevPageUrl&&-1},e.toHandlers(s.prevButtonEvents,!0)),[e.renderSlot(t.$slots,"prev-nav",{},()=>[dl,cl])],16,il)],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.computed.pageRange,(d,c)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["",{active:d==s.computed.currentPage}]),key:c},[e.createElementVNode("a",e.mergeProps({class:"",href:"#"},e.toHandlers(s.pageButtonEvents(d),!0),{"aria-current":d==s.computed.currentPage?"page":null,class:d==s.computed.currentPage?"z-10 flex items-center justify-center px-3 h-8 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white":"flex items-center justify-center px-3 h-8 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"}),e.toDisplayString(d),17,ml)],2))),128)),s.computed.nextPageUrl||o.showDisabled?(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 rounded-e-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white",{disabled:!s.computed.nextPageUrl}])},[e.createElementVNode("a",e.mergeProps({class:"",href:"#","aria-label":"Next",tabindex:!s.computed.nextPageUrl&&-1},e.toHandlers(s.nextButtonEvents,!0)),[e.renderSlot(t.$slots,"next-nav",{},()=>[fl,gl])],16,hl)],2)):e.createCommentVNode("",!0)],16)):e.createCommentVNode("",!0)])]),_:3},8,["data","limit","onPaginationChangePage"])}const ae=u(rl,[["render",ul]]),pl={components:{TailwindPagination:ae},props:{data:Array,columns:Array,get_item_url:String,xprops:Object,refreshData:Boolean},data(){return{isMounted:!1,limit:5,showDisabled:!1,size:"default",align:"left",search:"",isDropdownOpen:!1,itemLists:[],tableData:[],sortField:this.columns[0].field_name,sortOrder:"asc",pageOptions:[5,10,20,50],perPage:5,page:1}},computed:{filteredData(){const t=this.search.toLowerCase();return this.sortData(this.data).filter(o=>Object.values(o).some(n=>n.toString().toLowerCase().includes(t)))}},methods:{forDynCompIs(t){return typeof t=="object"?t:null},GetItemLists(t=1){this.page=t;const r={sort:this.sortField,order:this.sortOrder,s:this.search,limit:this.perPage,page:this.page};axios.get(this.xprops.route_get_data,{params:r}).then(o=>{this.itemLists=o.data}).catch(o=>{console.error(o)})},updateSortColumn(t,r){r&&(t===this.sortField?this.sortOrder=this.sortOrder==="asc"?"desc":"asc":(this.sortField=t,this.sortOrder="asc"),this.GetItemLists(this.page))},handleSearch(){this.sortField=this.columns[0].field_name,this.sortOrder="asc",this.page=1,this.GetItemLists(this.page)}},beforeDestroy(){},mounted(){this.GetItemLists(),this.isMounted=!0},watch:{searchFilter(){this.filteredOptions.length===0?this.selected={}:this.selected=this.filteredOptions[0]},perPage(t){this.page=1,this.perPage=t,this.GetItemLists(this.page)},refreshData(t,r){this.isMounted&&t!==r&&this.GetItemLists()}}},_l={class:"p-2"},yl={class:"flex flex-col flex-wrap pb-4 space-y-4 xl:flex-row xl:items-center xl:justify-between flex-column sm:space-y-0"},bl={class:"flex items-center gap-2"},kl=e.createElementVNode("span",{class:"font-medium"}," Show ",-1),xl={style:{"margin-top":"9px"}},wl=e.createElementVNode("span",{class:"font-medium"}," Entries ",-1),El=e.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1),Nl={class:"relative"},Vl=e.createElementVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3"},[e.createElementVNode("svg",{class:"w-5 h-5 text-gray-500 dark:text-gray-400","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z","clip-rule":"evenodd"})])],-1),Bl={class:"overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"},Cl={class:"w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse border-spacing-y-3 lg:border-spacing-y-0 dark:border-strokedark dark:bg-boxdark"},Sl={class:"hidden text-sm font-normal text-center text-gray-700 uppercase lg:table-header-group dark:border-strokedark bg-gray-50 dark:bg-gray-700 dark:text-gray-400"},Dl=["onClick"],$l={key:0,class:"ml-2"},Ol={key:0,class:"fa fa-arrow-up"},Pl={key:1,class:"fa fa-arrow-down"},Tl=["data-label"],Ml={class:"overflow-auto max-h-40"},jl={class:"flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800"};function Al(t,r,o,n,a,l){const i=e.resolveComponent("dropdown"),s=e.resolveComponent("TailwindPagination");return e.openBlock(),e.createElementBlock("div",_l,[e.createElementVNode("div",yl,[e.createElementVNode("div",bl,[kl,e.createElementVNode("div",xl,[e.createVNode(i,{has_cancel:!1,options:a.pageOptions,modelValue:a.perPage,"onUpdate:modelValue":r[0]||(r[0]=d=>a.perPage=d),is_required:!1,field_name:"perPage",label_name:"",default_value:5,show:!1,placeholder:"Please select an option"},null,8,["options","modelValue"])]),wl]),El,e.createElementVNode("div",Nl,[Vl,e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":r[1]||(r[1]=d=>a.search=d),onInput:r[2]||(r[2]=d=>l.handleSearch()),class:"block w-full p-2 text-sm text-gray-900 border border-gray-300 rounded-lg ps-10 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search ..."},null,544),[[e.vModelText,a.search]])])]),e.createElementVNode("div",Bl,[e.createElementVNode("table",Cl,[e.createElementVNode("thead",Sl,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,(d,c)=>(e.openBlock(),e.createElementBlock("th",{key:c,onClick:m=>l.updateSortColumn(d.field_name,d.sortable),class:"w-full px-4 py-2 lg:w-2/12"},[e.createTextVNode(e.toDisplayString(d.field_label)+" ",1),a.sortField===d.field_name?(e.openBlock(),e.createElementBlock("span",$l,[a.sortOrder==="asc"?(e.openBlock(),e.createElementBlock("i",Ol)):(e.openBlock(),e.createElementBlock("i",Pl))])):e.createCommentVNode("",!0)],8,Dl))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.itemLists.data,(d,c)=>(e.openBlock(),e.createElementBlock("tr",{key:c,class:"bg-white dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,(m,f)=>(e.openBlock(),e.createElementBlock("td",{key:f,"data-label":m.field_label,class:"text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none flex md:flex-row flex-col justify-between gap-2 lg:table-cell py-4 px-5 lg:py-2.5 lg:px-4 border dark:border-gray-700"},[e.createElementVNode("div",Ml,[m.tdComp?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.forDynCompIs(m.tdComp)),{key:0,row:d,field:m.field_name,xprops:o.xprops,tdProps:m.tdProps,onDeleteAction:r[3]||(r[3]=g=>l.GetItemLists())},null,40,["row","field","xprops","tdProps"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(d[m.field_name]),1)],64))])],8,Tl))),128))]))),128))])])]),e.createElementVNode("div",jl,[e.createVNode(s,{class:"mt-3 mb-0",data:a.itemLists,limit:a.limit,size:a.size,align:a.align,onPaginationChangePage:l.GetItemLists},null,8,["data","limit","size","align","onPaginationChangePage"])])])}const Il=u(pl,[["render",Al]]),Ll={components:{},props:{data:Array,columns:Array},data(){return{showNoOfEntries:[1,2,3,10,20,30,40],search:"",isDropdownOpen:!1,sortKey:"",sortOrder:1,currentPage:1,itemsPerPage:10,jumpToPage:"",maxDisplayedPages:10}},computed:{filteredData(){const t=this.search.toLowerCase();return this.sortData(this.data).filter(o=>Object.values(o).some(n=>n!=null&&n.toString().toLowerCase().includes(t)))},totalPages(){return Math.ceil(this.filteredData.length/this.itemsPerPage)},paginatedData(){const t=(this.currentPage-1)*this.itemsPerPage,r=t+this.itemsPerPage;return this.filteredData.slice(t,r)},displayedPageNumbers(){let t=Math.max(this.currentPage-Math.floor(this.maxDisplayedPages/2),1),r=t+this.maxDisplayedPages-1;return r>this.totalPages&&(r=this.totalPages,t=Math.max(r-this.maxDisplayedPages+1,1)),Array.from({length:r-t+1},(o,n)=>t+n)},firstItemIndex(){return this.itemsPerPage*(this.currentPage-1)+1},lastItemIndex(){const t=this.itemsPerPage*this.currentPage;return t>this.filteredData.length?this.filteredData.length:t}},methods:{handleItemsPerPageChange(t){this.itemsPerPage=t},goToPage(t){t>=1&&t<=this.totalPages&&(this.currentPage=t)},sort(t){t===this.sortKey?this.sortOrder*=-1:(this.sortKey=t,this.sortOrder=1)},sortData(t){return this.sortKey?t.slice().sort((r,o)=>(r[this.sortKey]<o[this.sortKey]?-1:1)*this.sortOrder):t},previousPage(){this.currentPage>1&&this.currentPage--},nextPage(){this.currentPage<this.totalPages&&this.currentPage++},firstPage(){this.currentPage=1},lastPage(){this.currentPage=this.totalPages},goToPage(t){t>=1&&t<=this.totalPages&&(this.currentPage=t)},onJumpToPageChange(){const t=parseInt(this.jumpToPage);t>=1&&t<=this.totalPages&&(this.jumpToPage=t)},jumpToPageButton(){this.jumpToPage>=1&&this.jumpToPage<=this.totalPages&&(this.currentPage=this.jumpToPage)},closeBoxOnbodyClick(){event.target.closest(".main_box_close")||(this.isDropdownOpen=!1)}},beforeDestroy(){document.body.removeEventListener("click",this.closeBoxOnbodyClick)},mounted(){document.body.addEventListener("click",this.closeBoxOnbodyClick)}},Fl={class:"p-2"},zl={class:"flex flex-wrap pb-4 space-y-4 md:items-center md:justify-between flex-column sm:flex-row sm:space-y-0"},Gl={class:"flex items-center gap-2"},vl=e.createElementVNode("span",{class:"font-medium"}," Show ",-1),Rl={style:{"margin-top":"9px"}},Ul=e.createElementVNode("span",{class:"font-medium"}," Entries ",-1),ql=e.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1),Hl={class:"relative"},Zl=e.createElementVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3"},[e.createElementVNode("svg",{class:"w-5 h-5 text-gray-500 dark:text-gray-400","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z","clip-rule":"evenodd"})])],-1),Kl={class:"overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"},Wl={class:"w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse border-spacing-y-3 lg:border-spacing-y-0 dark:border-strokedark dark:bg-boxdark"},Xl={class:"hidden text-sm font-normal text-center text-gray-700 uppercase lg:table-header-group dark:border-strokedark bg-gray-50 dark:bg-gray-700 dark:text-gray-400"},Yl=["onClick"],Jl={key:0,class:"ml-2"},Ql=["data-label"],ea=["innerHTML"],ta={class:"flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800"},ra={class:"flex justify-between flex-1 sm:hidden"},oa=["disabled"],na=["disabled"],la={class:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between"},aa={class:"text-sm text-gray-700 dark:text-gray-400"},sa={class:"font-medium"},ia={class:"font-medium"},da={class:"font-medium"},ca={"aria-label":"Page navigation"},ma={class:"flex items-center h-8 -space-x-px text-sm"},ha=["disabled"],fa=[e.createElementVNode("span",{class:"sr-only"},"Previous",-1),e.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 1 1 5l4 4"})],-1)],ga=["onClick"],ua=["onClick"],pa=["disabled"],_a=[e.createElementVNode("span",{class:"sr-only"},"Next",-1),e.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"})],-1)];function ya(t,r,o,n,a,l){const i=e.resolveComponent("dropdown");return e.openBlock(),e.createElementBlock("div",Fl,[e.createElementVNode("div",zl,[e.createElementVNode("div",Gl,[vl,e.createElementVNode("div",Rl,[e.createVNode(i,{has_cancel:!1,options:a.showNoOfEntries,modelValue:a.itemsPerPage,"onUpdate:modelValue":r[0]||(r[0]=s=>a.itemsPerPage=s),is_required:!1,field_name:"NoOfEntries",label_name:"",default_value:"10",show:!1,placeholder:"Please select an option"},null,8,["options","modelValue"])]),Ul]),ql,e.createElementVNode("div",Hl,[Zl,e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":r[1]||(r[1]=s=>a.search=s),class:"block p-2 text-sm text-gray-900 border border-gray-300 rounded-lg ps-10 w-80 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search ..."},null,512),[[e.vModelText,a.search]])])]),e.createElementVNode("div",Kl,[e.createElementVNode("table",Wl,[e.createElementVNode("thead",Xl,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,(s,d)=>(e.openBlock(),e.createElementBlock("th",{key:d,onClick:c=>l.sort(s),class:"w-full px-4 py-2 lg:w-2/12"},[e.createTextVNode(e.toDisplayString(s)+" ",1),a.sortKey===s?(e.openBlock(),e.createElementBlock("span",Jl,e.toDisplayString(a.sortOrder===1?"▲":"▼"),1)):e.createCommentVNode("",!0)],8,Yl))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.paginatedData,(s,d)=>(e.openBlock(),e.createElementBlock("tr",{key:d,class:"bg-white dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,(c,m)=>(e.openBlock(),e.createElementBlock("td",{key:m,"data-label":c,class:"text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none flex md:flex-row flex-col justify-between gap-2 lg:table-cell py-4 px-5 lg:py-2.5 lg:px-4 border dark:border-gray-700"},[e.createElementVNode("p",{class:"text-pretty",innerHTML:s[m]},null,8,ea)],8,Ql))),128))]))),128))])])]),e.createElementVNode("div",ta,[e.createElementVNode("div",ra,[e.createElementVNode("a",{href:"#",onClick:r[2]||(r[2]=(...s)=>l.previousPage&&l.previousPage(...s)),disabled:a.currentPage===1,class:"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},"Previous",8,oa),e.createElementVNode("a",{href:"#",onClick:r[3]||(r[3]=(...s)=>l.nextPage&&l.nextPage(...s)),disabled:a.currentPage===l.totalPages,class:"relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},"Next",8,na)]),e.createElementVNode("div",la,[e.createElementVNode("div",null,[e.createElementVNode("p",aa,[e.createTextVNode(" Showing "),e.createElementVNode("span",sa,e.toDisplayString(l.firstItemIndex),1),e.createTextVNode(" to "),e.createElementVNode("span",ia,e.toDisplayString(l.lastItemIndex),1),e.createTextVNode(" of "),e.createElementVNode("span",da,e.toDisplayString(l.filteredData.length),1),e.createTextVNode(" entries ")])]),e.createElementVNode("div",null,[e.createElementVNode("nav",ca,[e.createElementVNode("ul",ma,[e.createElementVNode("li",null,[e.createElementVNode("a",{href:"#",onClick:r[4]||(r[4]=(...s)=>l.previousPage&&l.previousPage(...s)),disabled:a.currentPage===1,class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 ms-0 border-e-0 rounded-s-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},fa,8,ha)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.displayedPageNumbers,s=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s},[e.createElementVNode("li",null,[a.currentPage!==s?(e.openBlock(),e.createElementBlock("a",{key:0,href:"#",onClick:d=>l.goToPage(s),class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},e.toDisplayString(s),9,ga)):e.createCommentVNode("",!0)]),e.createElementVNode("li",null,[a.currentPage===s?(e.openBlock(),e.createElementBlock("a",{key:0,href:"#",onClick:d=>l.goToPage(s),"aria-current":"page",class:"z-10 flex items-center justify-center h-8 px-3 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white"},e.toDisplayString(s),9,ua)):e.createCommentVNode("",!0)])],64))),128)),e.createElementVNode("li",null,[e.createElementVNode("a",{href:"#",onClick:r[5]||(r[5]=(...s)=>l.nextPage&&l.nextPage(...s)),disabled:a.currentPage===l.totalPages,class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 rounded-e-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},_a,8,pa)])])])])])])])}const ba=u(Ll,[["render",ya]]),ka={class:"flex items-center p-4 text-gray-500 bg-white rounded-lg shadow dark:bg-gray-800 dark:text-gray-400",role:"alert"},xa={key:0,class:"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-green-500 bg-green-100 rounded-lg dark:bg-green-800 dark:text-green-200"},wa=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})],-1),e.createElementVNode("span",{class:"sr-only"},"Check icon",-1)],Ea={key:1,class:"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-red-500 bg-red-100 rounded-lg dark:bg-red-800 dark:text-red-200"},Na=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 11.793a1 1 0 1 1-1.414 1.414L10 11.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L8.586 10 6.293 7.707a1 1 0 0 1 1.414-1.414L10 8.586l2.293-2.293a1 1 0 0 1 1.414 1.414L11.414 10l2.293 2.293Z"})],-1),e.createElementVNode("span",{class:"sr-only"},"Error icon",-1)],Va={key:2,class:"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-orange-500 bg-orange-100 rounded-lg dark:bg-orange-700 dark:text-orange-200"},Ba=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z"})],-1),e.createElementVNode("span",{class:"sr-only"},"Warning icon",-1)],Ca={class:"ml-3 text-sm font-normal"},Sa=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)],Da={__name:"ToastListItem",props:{message:String,duration:{type:Number,default:2e3},type:{type:String,default:"success"}},emits:["remove"],setup(t,{emit:r}){const o=t;e.onMounted(()=>{setTimeout(()=>n("remove"),o.duration)});const n=r;return(a,l)=>(e.openBlock(),e.createElementBlock("div",ka,[o.type==="success"?(e.openBlock(),e.createElementBlock("div",xa,wa)):e.createCommentVNode("",!0),o.type==="error"?(e.openBlock(),e.createElementBlock("div",Ea,Na)):e.createCommentVNode("",!0),o.type==="warning"?(e.openBlock(),e.createElementBlock("div",Va,Ba)):e.createCommentVNode("",!0),e.createElementVNode("div",Ca,e.toDisplayString(o.message),1),e.createElementVNode("button",{onClick:l[0]||(l[0]=i=>n("remove")),type:"button",class:"-mx-1.5 -my-1.5 ml-auto inline-flex h-8 w-8 rounded-lg bg-white p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white","data-dismiss-target":"#toast-default","aria-label":"Close"},Sa)]))}},I=e.reactive({items:[]}),L={state:I,methods:{add(t){I.items.unshift({key:Symbol(),message:t.message,type:t.type,duration:t.duration})},remove(t){I.items.splice(t,1)}}},$a={__name:"GlToastList",setup(t){function r(o){L.methods.remove(o)}return(o,n)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"div","enter-from-class":"translate-x-full opacity-0","enter-active-class":"duration-500","leave-active-class":"duration-500","leave-to-class":"translate-x-full opacity-0",class:"fixed z-50 w-full max-w-xs space-y-4 top-4 right-4"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(L).state.items,(a,l)=>(e.openBlock(),e.createBlock(Da,{key:a.key,message:a.message,type:a.type,duration:a.duration,onRemove:i=>r(l)},null,8,["message","type","duration","onRemove"]))),128))]),_:1}))}},Oa={key:0,class:"flex justify-center"},Pa=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 4 15"},[e.createElementVNode("path",{d:"M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})],-1)],Ta={class:"absolute z-10 mt-5 origin-top-right bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700 dark:divide-gray-600"},Ma={class:"py-2 text-sm text-gray-700 dark:text-gray-200","aria-labelledby":"dropdownDividerButton"},ja={key:0},Aa=["href"],Ia=e.createElementVNode("i",{class:"mr-2 fa-solid fa-list-ul opacity-80"},null,-1),La={key:1},Fa=e.createElementVNode("i",{class:"mr-2 fa-solid fa-trash-can opacity-80"},null,-1),za={__name:"DatatableAction",props:{field:{type:String,default:""},route_url:{type:String,default:""},row:{type:[Array,Object],default:[]},xprops:{type:Object,default:{}},tdProps:{type:Object,default:{}}},emits:["deleteAction"],setup(t,{emit:r}){const o=G(),n=t,a=e.ref(!1),l=e.ref(!1),i=()=>{a.value=!1},s=()=>{a.value=!0},d=()=>{l.value=!1},c=()=>{l.value=!0},m=r,f=()=>{axios.delete(`${n.xprops.route}/${n.row.id}`).then(()=>{d(),m("deleteAction"),o.commit("notification/SHOW_NOTIFICATION",{message:"Item deleted successfully.",type:"success",duration:5e3})}).catch(g=>{console.log(g)})};return(g,p)=>{const B=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(C,{isOpen:l.value,onConfirmDelete:f,onCancelDelete:d},null,8,["isOpen"]),t.row&&g.can(`edit_${t.xprops.permission} || delete_${t.xprops.permission}`)?e.withDirectives((e.openBlock(),e.createElementBlock("div",Oa,[e.createElementVNode("button",{onClick:s,class:"inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-none dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",type:"button"},Pa),e.withDirectives(e.createElementVNode("div",Ta,[e.createElementVNode("ul",Ma,[g.can(`edit_${t.xprops.permission}`)?(e.openBlock(),e.createElementBlock("li",ja,[e.createElementVNode("a",{href:t.xprops.route+"/"+t.row.id+"/edit",class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},[Ia,e.createTextVNode(" Edit")],8,Aa)])):e.createCommentVNode("",!0),g.can(`delete_${t.xprops.permission}`)?(e.openBlock(),e.createElementBlock("li",La,[e.createElementVNode("a",{href:"#",onClick:e.withModifiers(c,["prevent"]),class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},[Fa,e.createTextVNode(" Remove")])])):e.createCommentVNode("",!0)])],512),[[e.vShow,a.value]])])),[[B,i]]):e.createCommentVNode("",!0)],64)}}},Ga={key:0,class:"flex justify-center"},va=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 4 15"},[e.createElementVNode("path",{d:"M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})],-1)],Ra={class:"absolute z-10 mt-5 origin-top-right bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700 dark:divide-gray-600"},Ua={class:"py-2 text-sm text-gray-700 dark:text-gray-200","aria-labelledby":"dropdownDividerButton"},qa={key:0},Ha=e.createElementVNode("i",{class:"mr-2 fa-solid fa-trash-can opacity-80"},null,-1),Za={__name:"DatatableDeleteAction",props:{field:{type:String,default:""},route_url:{type:String,default:""},row:{type:[Array,Object],default:[]},xprops:{type:Object,default:{}},tdProps:{type:Object,default:{}}},emits:["deleteAction"],setup(t,{emit:r}){const o=G(),n=t,a=e.ref(!1),l=e.ref(!1),i=()=>{a.value=!1},s=()=>{a.value=!0},d=()=>{l.value=!1},c=()=>{l.value=!0},m=r,f=()=>{axios.delete(`${n.xprops.route}/${n.row.id}`).then(()=>{d(),m("deleteAction"),o.commit("notification/SHOW_NOTIFICATION",{message:"Item deleted successfully.",type:"success",duration:5e3})}).catch(g=>{console.log(g)})};return(g,p)=>{const B=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(C,{isOpen:l.value,onConfirmDelete:f,onCancelDelete:d},null,8,["isOpen"]),t.row&&g.can(`delete_${t.xprops.permission}`)?e.withDirectives((e.openBlock(),e.createElementBlock("div",Ga,[e.createElementVNode("button",{onClick:s,class:"inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-none dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",type:"button"},va),e.withDirectives(e.createElementVNode("div",Ra,[e.createElementVNode("ul",Ua,[g.can(`delete_${t.xprops.permission}`)?(e.openBlock(),e.createElementBlock("li",qa,[e.createElementVNode("a",{href:"#",onClick:e.withModifiers(c,["prevent"]),class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},[Ha,e.createTextVNode(" Remove")])])):e.createCommentVNode("",!0)])],512),[[e.vShow,a.value]])])),[[B,i]]):e.createCommentVNode("",!0)],64)}}},Ka={props:["field","row"],computed:{isArray(){return Array.isArray(this.row)},isObject(){return typeof this.row=="object"},isString(){return typeof this.row=="string"}},mounted(){console.log("row : ",this.row)}},Wa=["href","title"],Xa=e.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1),Ya={key:1,class:"m-1 d-inline-block"},Ja=["href","title"],Qa=e.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1);function es(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock("div",null,[l.isArray?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.row,(i,s)=>(e.openBlock(),e.createElementBlock("div",{key:s,class:"m-1 d-inline-block"},[e.createElementVNode("a",{href:i,title:i,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[Xa,e.createTextVNode(" Download ")],8,Wa)]))),128)):l.isString?(e.openBlock(),e.createElementBlock("div",Ya,[e.createElementVNode("a",{href:o.row,title:o.row,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[Qa,e.createTextVNode(" Download ")],8,Ja)])):e.createCommentVNode("",!0)])}const ts=u(Ka,[["render",es]]),rs={props:["field","row"],computed:{isArray(){return Array.isArray(this.row[this.field])},isObject(){return typeof this.row[this.field]=="object"}}},os=["href","title"],ns=e.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1),ls={key:1,class:"m-1 d-inline-block"},as=["href","title"],ss=e.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1);function is(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock("div",null,[l.isArray?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.row[o.field],i=>(e.openBlock(),e.createElementBlock("div",{key:i.id,class:"m-1 d-inline-block"},[e.createElementVNode("a",{href:i.url,title:i.name,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[ns,e.createTextVNode(" Download ")],8,os)]))),128)):l.isObject?(e.openBlock(),e.createElementBlock("div",ls,[e.createElementVNode("a",{href:o.row[o.field].url,title:o.row[o.field].name,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[ss,e.createTextVNode(" Download ")],8,as)])):e.createCommentVNode("",!0)])}const ds=u(rs,[["render",is]]),cs={props:["field","row","tdProps"]},ms={key:0},hs=["innerHTML"];function fs(t,r,o,n,a,l){return o.row[o.field]?(e.openBlock(),e.createElementBlock("div",ms,[e.createElementVNode("div",{class:"w-full",innerHTML:o.row[o.field]},null,8,hs)])):e.createCommentVNode("",!0)}const gs=u(cs,[["render",fs]]),us={props:["field","row","tdProps"],computed:{entry(){const[t,r]=this.field.split(".");return e.markRaw({key:t,field:r})},isArray(){return Array.isArray(this.row[this.entry.key])},isObject(){return typeof this.row[this.entry.key]=="object"}}},ps={class:"flex flex-wrap gap-2"},_s={key:1,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded dark:bg-blue-900 dark:text-blue-300"};function ys(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock("div",ps,[l.isArray?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.row[l.entry.key],(i,s)=>(e.openBlock(),e.createElementBlock("span",{key:s,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded dark:bg-blue-900 dark:text-blue-300"},e.toDisplayString(i[l.entry.field]),1))),128)):l.isObject?(e.openBlock(),e.createElementBlock("span",_s,e.toDisplayString(o.row[l.entry.key][l.entry.field]),1)):e.createCommentVNode("",!0)])}const bs=u(us,[["render",ys]]),ks={props:["field","row","tdProps"]},xs={key:0},ws={class:"m-1 d-inline-block"},Es=["href","title"],Ns=["src","alt","title"];function Vs(t,r,o,n,a,l){return o.row[o.field]?(e.openBlock(),e.createElementBlock("div",xs,[e.createElementVNode("div",ws,[e.createElementVNode("a",{href:o.row[o.field].url,title:o.row[o.field].name,target:"_blank"},[e.createElementVNode("img",{src:o.row[o.field].thumbnail,alt:o.row[o.field].name,title:o.row[o.field].name},null,8,Ns)],8,Es)])])):e.createCommentVNode("",!0)}const Bs=u(ks,[["render",Vs],["__scopeId","data-v-3a28c02c"]]),Cs={props:["field","row","tdProps"],computed:{isActive(){return this.row[this.field]===1}}},Ss={class:"flex flex-wrap gap-2"},Ds={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},$s=e.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1),Os={key:1,class:"inline-flex items-center bg-red-100 text-red-800 text-xs font-medium px-2.5 py-0.5 rounded-full dark:bg-red-900 dark:text-red-300"},Ps=e.createElementVNode("span",{class:"w-2 h-2 bg-red-500 rounded-full me-1"},null,-1);function Ts(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock("div",Ss,[l.isActive?(e.openBlock(),e.createElementBlock("span",Ds,[$s,e.createTextVNode(" Active ")])):l.isActive?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",Os,[Ps,e.createTextVNode(" Inactive ")]))])}const Ms=u(Cs,[["render",Ts]]),js={props:["field","row","tdProps"],computed:{hasLabelColor(t){const r=this.tdProps.status_general_labels_color.find(o=>o.label===this.row[this.field]);return r?r.class:""}}},As={class:"flex flex-wrap gap-2"},Is={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},Ls=e.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1),Fs={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-red-800 bg-red-100 rounded-full dark:bg-red-900 dark:text-red-300"},zs=e.createElementVNode("span",{class:"w-2 h-2 bg-red-500 rounded-full me-1"},null,-1),Gs={key:2,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-yellow-800 bg-yellow-100 rounded-full dark:bg-gray-700 dark:text-yellow-300"},vs=e.createElementVNode("span",{class:"w-2 h-2 bg-yellow-500 rounded-full me-1"},null,-1),Rs={key:3,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-full dark:bg-gray-700 dark:text-blue-400"},Us=e.createElementVNode("span",{class:"w-2 h-2 bg-blue-500 rounded-full me-1"},null,-1);function qs(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock("div",As,[l.hasLabelColor=="green"?(e.openBlock(),e.createElementBlock("span",Is,[Ls,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0),l.hasLabelColor=="red"?(e.openBlock(),e.createElementBlock("span",Fs,[zs,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0),l.hasLabelColor=="yellow"?(e.openBlock(),e.createElementBlock("span",Gs,[vs,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0),l.hasLabelColor=="default"?(e.openBlock(),e.createElementBlock("span",Rs,[Us,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0)])}const Hs=u(js,[["render",qs]]),Zs={props:["isOpen","title","button_text"],methods:{confirmAction(){this.$emit("confirm-action")},cancelAction(){this.$emit("cancel-action")}}},Ks={key:0,class:"fixed inset-0 z-50 overflow-y-auto",role:"dialog","aria-modal":"true"},Ws={class:"flex items-end justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0"},Xs=e.createElementVNode("div",{class:"fixed inset-0 transition-opacity bg-gray-500 bg-opacity-75","aria-hidden":"true"},null,-1),Ys=e.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"​",-1),Js={class:"inline-block overflow-hidden text-left align-bottom transition-all transform bg-white rounded-lg shadow-xl sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"},Qs={class:"px-4 pt-5 pb-4 bg-white sm:p-6 sm:pb-4"},ei={class:"sm:flex sm:items-start"},ti={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},ri={class:"text-lg font-medium leading-6 text-gray-900"},oi={class:"mt-2"},ni={class:"px-4 py-3 bg-gray-50 sm:px-6 sm:flex sm:flex-row-reverse"};function li(t,r,o,n,a,l){return o.isOpen?(e.openBlock(),e.createElementBlock("div",Ks,[e.createElementVNode("div",Ws,[Xs,Ys,e.createElementVNode("div",Js,[e.createElementVNode("div",Qs,[e.createElementVNode("div",ei,[e.createElementVNode("div",ti,[e.createElementVNode("h3",ri,e.toDisplayString(o.title),1),e.createElementVNode("div",oi,[e.renderSlot(t.$slots,"default")])])])]),e.createElementVNode("div",ni,[e.createElementVNode("button",{onClick:r[0]||(r[0]=(...i)=>l.confirmAction&&l.confirmAction(...i)),type:"button",class:"inline-flex justify-center w-full px-4 py-2 text-base font-medium text-white bg-red-600 border border-transparent rounded-md shadow-sm hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(o.button_text),1),e.createElementVNode("button",{onClick:r[1]||(r[1]=(...i)=>l.cancelAction&&l.cancelAction(...i)),type:"button",class:"inline-flex justify-center w-full px-4 py-2 mt-3 text-base font-medium text-gray-700 bg-white border border-gray-300 rounded-md shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"}," Cancel ")])])])])):e.createCommentVNode("",!0)}const ai=u(Zs,[["render",li]]);h.GlButton=ar,h.GlCard=jt,h.GlConfirmationModal=ai,h.GlDataTable=ba,h.GlDataTableServerSide=Il,h.GlDatatableAction=za,h.GlDatatableDeleteAction=Za,h.GlDatatableFileDownload=ts,h.GlDatatableFiles=ds,h.GlDatatableHtml=gs,h.GlDatatableList=bs,h.GlDatatablePicture=Bs,h.GlDatatableStatus=Ms,h.GlDatatableStatusGeneral=Hs,h.GlDeleteConfirmationModal=C,h.GlDropdown=Zn,h.GlFilesUpload=_t,h.GlLanguageSelector=$t,h.GlModal=dn,h.GlMultiItemSlide=en,h.GlMultiSelectDropdown=rr,h.GlNotify=Nt,h.GlTab=so,h.GlTabsWrapper=oo,h.GlTailwindPagination=ae,h.GlTextInput=Zr,h.GlTextTranslate=Fr,h.GlTextarea=tl,h.GlTextareaTranslate=_r,h.GlTinymceTranslate=Sr,h.GlToast=L,h.GlToastList=$a,h.GlToggleBox=wn,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
7
+ `,42,Vr),e.createElementVNode("span",Br,e.toDisplayString(t.error_message),1),e.createElementVNode("small",Cr,e.toDisplayString(t.description),1)],2))],64))}},Dr={class:"font-bold ptext-lg dark:text-white"},$r=["name","id"],Or=["id"],Pr=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),Tr=["for"],Mr=e.createElementVNode("span",{class:"language-label js-language-label bg-blue-100 text-blue-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300"},null,-1),jr=["name","id"],Ar=["required","name","id","type"],Ir={class:"gl-span-form-error"},Lr={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},Fr={__name:"GlTextTranslate",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:null},modelValue:{type:[String,Number],default:""},model_value_translate:{type:[String,Object],default:null},modelValueTranslate:{type:[String,Object],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},get_field_translations:{type:String,default:""},description:{type:String,default:""},translatable:{type:Object,default:null}},emits:["update:modelValue","update:modelValueTranslate","keydown"],setup(t,{expose:r,emit:o}){const n=t,a=o,l=e.ref(null),i=e.ref(null);return e.onMounted(()=>{l.value!==null&&l.value.hasAttribute("autofocus")&&l.value.focus(),n.model_value&&(a("update:modelValue",n.model_value),l.value.value=n.model_value),n.model_value_translate,n.translatable&&axios.post("/admin/get_field_translations",{model:n.translatable.model,row_id:n.translatable.row_id,field:n.translatable.field}).then(s=>{i.value.value=JSON.stringify(s.data),a("update:modelValueTranslate",JSON.stringify(s.data))}).catch(s=>{console.log(s)})}),r({focus:()=>l.value.focus()}),(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",Dr,e.toDisplayString(t.label_name),1),e.withDirectives(e.createElementVNode("input",{type:"hidden","data-i18n":"true",name:t.field_name+"_i18n",id:t.field_name+"_i18n",ref:"input_translate_s","onUpdate:modelValue":d[0]||(d[0]=c=>s.inputTranslateValue=c)},null,8,$r),[[e.vModelText,s.inputTranslateValue]]),e.createElementVNode("p",{id:t.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},e.toDisplayString(t.model_value),9,Or),Pr],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-translation-form":t.error_message=="","gl-label-translation-form-invalid":t.error_message!=="",required:t.is_required}),for:t.field_name},e.toDisplayString(t.label_name),11,Tr),Mr,e.createElementVNode("input",{class:"mb-4",type:"hidden","data-i18n":"true",name:t.field_name+"_i18n",id:t.field_name+"_i18n",onInput:d[1]||(d[1]=c=>s.$emit("update:modelValueTranslate",c.target.value)),ref_key:"input_translate",ref:i},null,40,jr),e.createElementVNode("input",{required:t.is_required,name:t.field_name,id:t.field_name,class:e.normalizeClass({" gl-input-form form-input-translation mt-2 ":t.error_message==""," gl-input-form-invalid form-input-translation mt-2 ":t.error_message!==""}),type:t.type,onInput:d[2]||(d[2]=c=>s.$emit("update:modelValue",c.target.value)),onKeydown:d[3]||(d[3]=c=>s.$emit("keydown",c)),ref_key:"input",ref:l},null,42,Ar),e.createElementVNode("span",Ir,e.toDisplayString(t.error_message),1),e.createElementVNode("small",Lr,e.toDisplayString(t.description),1)],2))],64))}},zr={class:"font-bold ptext-lg dark:text-white"},Gr={class:"mb-4 text-base text-gray-900 dark:text-white"},vr=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),Rr=["for"],Ur=["required","name","id","type"],qr={class:"gl-span-form-error"},Hr={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},Zr={__name:"GlTextInput",props:e.mergeModels({is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["update:modelValue","keydown"],["update:modelValue"]),setup(t,{expose:r,emit:o}){const n=t,a=o,l=e.ref(null),i=e.useModel(t,"modelValue");return e.onMounted(()=>{l.value!==null&&l.value.hasAttribute("autofocus")&&l.value.focus(),n.model_value!=""&&(a("update:modelValue",n.model_value),l.value.value=n.model_value)}),r({focus:()=>l.value.focus()}),(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",zr,e.toDisplayString(t.label_name),1),e.createElementVNode("p",Gr,e.toDisplayString(t.type=="password"?t.model_value.replace(/./g,"*"):t.model_value),1),vr],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-form":t.error_message=="","gl-label-form-invalid":t.error_message!=="",required:t.is_required}),for:t.field_name},e.toDisplayString(t.label_name),11,Rr),e.withDirectives(e.createElementVNode("input",{required:t.is_required,name:t.field_name,id:t.field_name,class:e.normalizeClass({"gl-input-form":t.error_message=="","gl-input-form-invalid":t.error_message!==""}),type:t.type,"onUpdate:modelValue":d[0]||(d[0]=c=>i.value=c),onKeydown:d[1]||(d[1]=c=>s.$emit("keydown",c)),ref_key:"input",ref:l},null,42,Ur),[[e.vModelDynamic,i.value]]),e.createElementVNode("span",qr,e.toDisplayString(t.error_message),1),e.createElementVNode("small",Hr,e.toDisplayString(t.description),1)],2))],64))}},Kr={setup(t,{slots:r}){const o=e.ref(r.default().map(a=>a.props)),n=e.ref(o.value[0].title);return e.provide("selectedTitle",n),{tabs:o,selectedTitle:n}}},Wr={class:"flex flex-wrap"},Xr={class:"w-full"},Yr={class:"flex flex-row flex-wrap gap-1 pt-3 pb-4 mb-0 list-none"},Jr=["onClick"],Qr={class:"relative flex flex-col w-full min-w-0 mb-6 break-words bg-white rounded shadow-lg dark:border-strokedark dark:bg-boxdark"},eo={class:"flex-auto px-4 py-5"},to={class:"tab-content tab-space"};function ro(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Wr,[e.createElementVNode("div",Xr,[e.createElementVNode("ul",Yr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.tabs,i=>(e.openBlock(),e.createElementBlock("li",{key:i.title,onClick:s=>n.selectedTitle=i.title,class:"flex-auto -mb-px text-center"},[e.createElementVNode("a",{class:e.normalizeClass([{"text-slate-600 bg-white dark:bg-meta-4":n.selectedTitle!=i.title,"text-white bg-slate-600 dark:bg-primary":n.selectedTitle===i.title},"block px-5 py-3 text-xs font-bold leading-normal uppercase rounded shadow-lg hover:text-white tex hover:bg-slate-600 dark:hover:bg-primary dark:text-white tabs_buttons"])},[e.createElementVNode("i",{class:e.normalizeClass([i.icon,"mr-1 text-base"])},null,2),e.createTextVNode(" "+e.toDisplayString(i.title),1)],2)],8,Jr))),128))])])]),e.createElementVNode("div",Qr,[e.createElementVNode("div",eo,[e.createElementVNode("div",to,[e.renderSlot(t.$slots,"default")])])])],64)}const oo=u(Kr,[["render",ro]]),no={props:["title"],setup(){return{selectedTitle:e.inject("selectedTitle")}}},lo={class:"block"};function ao(t,r,o,n,a,l){return e.withDirectives((e.openBlock(),e.createElementBlock("div",lo,[e.renderSlot(t.$slots,"default")],512)),[[e.vShow,o.title==n.selectedTitle]])}const so=u(no,[["render",ao]]),io={props:{elements_to_show_prop:{type:Number,default:3},hide_arrow:{type:Boolean,default:!1},disable_touch:{type:Boolean,default:!1},direction_property:{type:String,default:"ltr"},slider_arrows_indicators_position:{type:String,default:"arrows_outside_slider"}},data:function(){return{elementsToShow:3,dotsNum:0,currentDot:1,dotsNavigation:[],touchStartX:0,isMoving:!1,initialX:0,initialY:0,Random_string:this.generateRandomString(6)}},mounted(){this.elementsToShow=this.elements_to_show_prop,this.initSlider(),this.disable_touch||this.movingActions()},methods:{sliderIndicatorsAction(){var t="";return this.direction_property=="rtl"?(t+=" space-x-reverse ",t+=" slider_indicators "):this.slider_arrows_indicators_position=="arrows_indicators_inside_slider"&&(t+=" slider_indicators "),t},sliderContainerAction(){var t="";return!this.hide_arrow&&this.slider_arrows_indicators_position=="arrows_outside_slider"?t+=" w-12/12 xl:w-8/12 xxl:w-8/12 md:w-8/12 sm:w-8/12":this.slider_arrows_indicators_position!="arrows_outside_slider"&&(t+=" w-12/12 "),t},generateRandomString(t){let r="";const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=o.length;for(let a=0;a<t;a++)r+=o.charAt(Math.floor(Math.random()*n));return r},movingActions(){let t=this,r=document.getElementById("slider_"+this.Random_string);const o=a=>{r.style.cursor="grabbing";const l=s=>{const d=s.clientX||s.touches&&s.touches[0]&&s.touches[0].clientX,c=s.clientY||s.touches&&s.touches[0]&&s.touches[0].clientY,m=d-t.initialX,f=c-t.initialY;Math.abs(m)>Math.abs(f)?(s.preventDefault(),Math.abs(m)>=70&&(m<0?t.next():t.prev(),t.initialX=d)):r.style.cursor="grab",Math.abs(f)>Math.abs(m)&&(r.style.cursor="grab")},i=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("touchmove",l),document.removeEventListener("mouseup",i),document.removeEventListener("touchend",i),r.style.cursor="grab"};document.addEventListener("mousemove",l),document.addEventListener("touchmove",l,{passive:!1}),document.addEventListener("mouseup",i),document.addEventListener("touchend",i),t.initialX=a.clientX||a.touches&&a.touches[0]&&a.touches[0].clientX,t.initialY=a.clientY||a.touches&&a.touches[0]&&a.touches[0].clientY},n=a=>{a.key==="ArrowLeft"?t.prev():a.key==="ArrowRight"&&t.next()};r.addEventListener("mousedown",o),r.addEventListener("touchstart",o),document.addEventListener("keydown",n)},next(){this.currentDot<this.dotsNavigation.length&&(this.currentDot++,this.setDot(this.currentDot))},prev(){this.currentDot>1&&(this.currentDot--,this.setDot(this.currentDot))},initSlider(){let t=document.getElementById("sliderContainer_"+this.Random_string),r=document.getElementById("mainSliderContainer_"+this.Random_string),o=document.getElementById("slider_"+this.Random_string),n=o.querySelectorAll("li"),a=Array.from(n).filter(s=>s.parentNode===o),l=t.clientWidth,i=l/this.elementsToShow;if(this.elementsToShow>1?document.body.clientWidth<1e3?(this.elementsToShow=1,i=this.hide_arrow?r.clientWidth:l):document.body.clientWidth<1500&&(this.elementsToShow=2):(this.elementsToShow=1,i=this.hide_arrow?r.clientWidth:l),a.length>1){this.dotsNum=this.elementsToShow==1?a.length:a.length-this.elementsToShow+1;let s=this.elementsToShow==1?i*a.length/this.dotsNum:i*(a.length-this.elementsToShow)/(this.dotsNum-1);this.dotsNavigation=[];for(let d=0;d<this.dotsNum;d++)this.dotsNavigation.push(s*d)}o.style.width=a.length*i+"px",o.style.transition="margin",o.style.transitionDuration="1s";for(let s=0;s<a.length;s++){const d=a[s];d.style.width=i+"px"}},setDot(t){let r=document.getElementById("slider_"+this.Random_string);this.direction_property=="rtl"?r.style.marginRight=-this.dotsNavigation[t-1]+"px":r.style.marginLeft=-this.dotsNavigation[t-1]+"px",this.currentDot=t}}},y=t=>(e.pushScopeId("data-v-a94f16a9"),t=t(),e.popScopeId(),t),co=["id"],mo={key:0,class:"items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"},ho={class:"w-full"},fo={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},go=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],uo={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},po=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],_o=["id"],yo=["id"],bo={class:"w-full"},ko={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},xo=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],wo={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Eo=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],No={class:"w-full"},Vo={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Bo=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],Co={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},So=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],Do=["onClick"],$o=[y(()=>e.createElementVNode("span",null,null,-1))],Oo={key:1,class:"flex justify-between pl-5 pr-5"},Po=["onClick"],To=[y(()=>e.createElementVNode("span",null,null,-1))],Mo={key:0,class:"flex"},jo={class:"flex items-center"},Ao={class:"w-full"},Io={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Lo=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],Fo={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},zo=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],Go={class:"flex items-center"},vo={class:"w-full"},Ro={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Uo=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],qo={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Ho=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))],Zo={key:1,class:"items-center hidden w-2/12 xl:flex xxl:flex md:flex sm:flex arrow_button"},Ko={class:"w-full"},Wo={key:0,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Xo=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"},null,-1))],Yo={key:1,xmlns:"http://www.w3.org/2000/svg",class:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},Jo=[y(()=>e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M11 17l-5-5m0 0l5-5m-5 5h12"},null,-1))];function Qo(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",{class:e.normalizeClass(["",!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slide"?"flex":"relative block"]),id:"mainSliderContainer_"+t.Random_string},[t.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?(e.openBlock(),e.createElementBlock("div",mo,[e.createElementVNode("div",ho,[e.createElementVNode("button",{class:"p-3 mr-5 rounded-full shadow-lg arrow_button_styles",onClick:r[0]||(r[0]=i=>l.prev())},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",fo,go)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",uo,po)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["overflow-hidden",l.sliderContainerAction()]),id:"sliderContainer_"+t.Random_string},[e.createElementVNode("ul",{class:"flex",id:"slider_"+t.Random_string},[t.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_indicators_inside_slider"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["items-center justify-center hidden arrow_button xl:flex xxl:flex md:flex sm:flex",o.direction_property=="rtl"?"arrow_button_next":"arrow_button_prev"])},[e.createElementVNode("div",bo,[e.createElementVNode("button",{class:"p-3 rounded-full shadow-lg arrow_button_styles",onClick:r[1]||(r[1]=e.withModifiers(i=>l.prev(),["stop"]))},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",ko,xo)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",wo,Eo)):e.createCommentVNode("",!0)])])],2)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},void 0,!0),t.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_indicators_inside_slider"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["items-center justify-center hidden xl:flex xxl:flex md:flex sm:flex arrow_button",o.direction_property=="rtl"?"arrow_button_prev":"arrow_button_next"])},[e.createElementVNode("div",No,[e.createElementVNode("button",{class:"p-3 rounded-full shadow-lg arrow_button_styles",onClick:r[2]||(r[2]=e.withModifiers(i=>l.next(),["stop"]))},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",Vo,Bo)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",Co,So)):e.createCommentVNode("",!0)])])],2)):e.createCommentVNode("",!0)],8,yo),o.slider_arrows_indicators_position!="arrows_indicators_below_slider"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["flex justify-center mb-1 space-x-1",l.sliderIndicatorsAction()])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dotsNum,i=>(e.openBlock(),e.createElementBlock("button",{role:"button",class:e.normalizeClass(["gl-dot",{active:t.currentDot==i}]),key:i,onClick:s=>l.setDot(i)},$o,10,Do))),128))],2)):e.createCommentVNode("",!0),o.slider_arrows_indicators_position=="arrows_indicators_below_slider"?(e.openBlock(),e.createElementBlock("div",Oo,[e.createElementVNode("div",{class:e.normalizeClass(["flex justify-center mb-1 space-x-1",l.sliderIndicatorsAction()])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dotsNum,i=>(e.openBlock(),e.createElementBlock("button",{role:"button",class:e.normalizeClass(["gl-dot",{active:t.currentDot==i}]),key:i,onClick:s=>l.setDot(i)},To,10,Po))),128))],2),t.dotsNum>0?(e.openBlock(),e.createElementBlock("div",Mo,[e.createElementVNode("div",jo,[e.createElementVNode("div",Ao,[e.createElementVNode("button",{class:e.normalizeClass(["p-3 rounded-full arrow_button_styles",o.direction_property=="rtl"?"ml-3":"mr-3"]),onClick:r[3]||(r[3]=i=>l.prev())},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",Io,Lo)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",Fo,zo)):e.createCommentVNode("",!0)],2)])]),e.createElementVNode("div",Go,[e.createElementVNode("div",vo,[e.createElementVNode("button",{class:"p-3 rounded-full arrow_button_styles",onClick:r[4]||(r[4]=i=>l.next())},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",Ro,Uo)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",qo,Ho)):e.createCommentVNode("",!0)])])])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,_o),t.dotsNum>0&&!o.hide_arrow&&o.slider_arrows_indicators_position=="arrows_outside_slider"?(e.openBlock(),e.createElementBlock("div",Zo,[e.createElementVNode("div",Ko,[e.createElementVNode("button",{class:"p-3 ml-5 rounded-full shadow-lg arrow_button_styles",onClick:r[5]||(r[5]=i=>l.next())},[o.direction_property=="ltr"?(e.openBlock(),e.createElementBlock("svg",Wo,Xo)):e.createCommentVNode("",!0),o.direction_property=="rtl"?(e.openBlock(),e.createElementBlock("svg",Yo,Jo)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],10,co)])}const en=u(io,[["render",Qo],["__scopeId","data-v-a94f16a9"]]),tn={class:"fixed left-0 top-13 z-[1055] h-full w-full overflow-y-auto overflow-x-hidden outline-none inset-0 bg-black bg-opacity-80",tabindex:"-1","aria-hidden":"true"},rn={class:"pointer-events-auto relative flex max-h-[100%] w-full flex-col overflow-hidden text-current shadow-4 outline-none bg-white border rounded-lg border-stroke dark:border-strokedark dark:bg-boxdark"},on={class:"flex items-center justify-between flex-shrink-0 pt-10 pb-3 pl-3 pr-3 border-b-2 dark:border-gray-600"},nn={class:"text-xl font-medium leading-normal text-surface dark:text-white"},ln=[e.createElementVNode("span",{class:"[&>svg]:h-6 [&>svg]:w-6"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])],-1)],an={class:"relative p-4 overflow-y-auto"},sn={class:"flex flex-wrap items-center justify-end flex-shrink-0 p-4 border-t-2 rounded-b-md border-neutral-100 dark:border-gray-600"},dn={__name:"GlModal",props:{is_open:{type:Boolean,default:!1},title:{type:String,default:""},max_width:{type:String,default:"max-w-2xl"}},emits:["closeModal"],setup(t,{emit:r}){const o=t,n=r,a=()=>{document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight="0px"},l=()=>{document.documentElement.style.overflow="",document.documentElement.style.paddingRight=""},i=()=>{n("closeModal"),l()};return e.watch(()=>o.is_open,(s,d)=>{s?a():l()},{immediate:!0,deep:!0}),(s,d)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",tn,[e.createElementVNode("div",{class:e.normalizeClass(["pointer-events-none relative h-[calc(100%-1rem)] w-auto translate-y-[-50px] transition-all duration-300 ease-in-out min-[576px]:mx-auto min-[576px]:mt-7 min-[576px]:h-[calc(100%-3.5rem)]",t.max_width])},[e.createElementVNode("div",rn,[e.createElementVNode("div",on,[e.createElementVNode("h5",nn,e.toDisplayString(t.title),1),e.createElementVNode("button",{type:"button",class:"box-content border-none rounded-none text-neutral-500 hover:text-neutral-800 hover:no-underline focus:text-neutral-800 focus:opacity-100 focus:shadow-none focus:outline-none dark:text-neutral-400 dark:hover:text-neutral-300 dark:focus:text-neutral-300",onClick:i,"aria-label":"Close"},ln)]),e.createElementVNode("div",an,[e.renderSlot(s.$slots,"body")]),e.createElementVNode("div",sn,[e.renderSlot(s.$slots,"buttons"),e.createElementVNode("button",{onClick:i,type:"button",class:"px-5 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-200 rounded-lg ms-3 hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-blue-300 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Close ")])])],2)],512)),[[e.vShow,t.is_open]])}},cn={class:"mb-4"},mn={class:"flex justify-between px-6 py-3 -mb-px border border-gray-300 no-underlin"},hn={class:"relative inline-flex items-center cursor-pointer"},fn=["name","id"],gn=e.createElementVNode("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1),un=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),pn={class:"flex justify-between px-6 py-3 -mb-px border border-gray-200 rounded-lg no-underlin dark:border-gray-600 dark:focus:border-frontenddark"},_n={class:"relative inline-flex items-center cursor-pointer"},yn=["name","id","value","checked"],bn=e.createElementVNode("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"},null,-1),kn={class:"gl-span-form-error"},xn={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},wn={__name:"GlToggleBox",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:String,required:!0},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""}},emits:["update:modelValue"],setup(t,{emit:r}){const o=t,n=r,a=e.ref(null),l=e.computed(()=>o.modelValue);e.onMounted(()=>{o.model_value!=""&&(n("update:modelValue",o.model_value),a.value.checked=o.model_value==1),l!=""&&(n("update:modelValue",l),a.value.checked=l==1)});const i=s=>{const d=s.target.checked?1:0;n("update:modelValue",d)};return(s,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("div",cn,[e.createElementVNode("li",mn,[e.createTextVNode(e.toDisplayString(t.label_name)+" ",1),e.createElementVNode("label",hn,[e.createElementVNode("input",{type:"checkbox",class:"sr-only peer",name:t.field_name,id:t.field_name,"true-value":1,"false-value":0,ref_key:"input",ref:a,disabled:""},null,8,fn),gn])])]),un],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("li",pn,[e.createTextVNode(e.toDisplayString(t.label_name)+" ",1),e.createElementVNode("label",_n,[e.createElementVNode("input",{type:"checkbox",class:"sr-only peer",name:t.field_name,id:t.field_name,value:t.model_value||l.value,checked:t.model_value==1||l.value==1,"true-value":1,"false-value":0,ref_key:"input",ref:a,onChange:i},null,40,yn),bn])]),e.createElementVNode("span",kn,e.toDisplayString(t.error_message),1),e.createElementVNode("small",xn,e.toDisplayString(t.description),1)],2))],64))}},En={name:"Dropdown",template:"Dropdown",props:{modelValue:{type:[String,Number],default:""},default_value:{type:[String,Number],default:""},field_name:{type:String,default:""},is_required:{type:Boolean,default:!1},has_cancel:{type:Boolean,default:!0},label_name:{type:String,default:""},options:{type:Array,required:!0,default:[],note:"Options of dropdown. An array of options with id and name"},placeholder:{type:String,required:!1,default:"Please select an option",note:"Placeholder of dropdown"},maxItem:{type:Number,required:!1,default:1e4,note:"Max items showing"},show:{type:Boolean,default:!1},error_message:{type:String,default:""},description:{type:String,default:""}},emits:["update:modelValue","selected","selectionChanged"],data(){return{selected:{},count:0,optionsShown:!1,searchFilter:"",uuid:""}},created(){this.$emit("selected",this.selected)},mounted(){this.uuid=this.generateUUID(),self=this;var t=this.convertedOptionDefault();this.selected=this.options_values.find(r=>String(r.id)===String(t))||{},this.show||(document.body.addEventListener("click",function(r){self.clearData(r)}),document.addEventListener("keypress",function(r){r.key==="Enter"&&r.target.form&&r.preventDefault()}))},computed:{options_values(){return this.convertedOptions()},filteredOptions(){const t=[],r=new RegExp(this.searchFilter,"ig");for(const o of this.options_values){const n=String(o.name);(this.searchFilter.length<1||n.match(r))&&t.length<this.maxItem&&t.push(o)}return t}},methods:{handleKeyDown(t){if(["ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Enter"].includes(t.key)){if(["ArrowUp","ArrowDown"].includes(t.key)&&t.preventDefault(),t.key==="ArrowDown"&&this.posts==="")return;this.selectPost(t.key)}},generateUUID(){let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(o){const n=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(o==="x"?n:n&3|8).toString(16)})},isObjectNotEmpty(t){return Object.keys(t).length>0},clearData:function(t){t.target.id!=this.field_name+"search"+this.uuid&&t.target.id!=this.field_name&&!t.target.classList.contains("showOptions")&&(this.exit(),this.count=0)},scrollToElement:function(t){const r=`${t}${this.uuid}`,o=document.getElementById(r);o&&o.scrollIntoView()},clickElement:function(t){const r=`${t}${this.uuid}`,o=document.getElementById(r);o&&o.click()},selectPost:function(t){t==="ArrowDown"&&this.count<this.filteredOptions.length&&(this.count++,this.scrollToElement(this.count)),t==="ArrowUp"&&this.count>1&&(this.count--,this.scrollToElement(this.count)),t==="Enter"&&this.clickElement(this.count)},convertedOptions(){return this.options.map((t,r)=>typeof t=="object"?t:{id:t,name:t})},convertedOptionDefault(){var t=this.default_value||this.modelValue;return console.log("default_value_options : ",this.default_value," - ",this.modelValue," - ",t),t?typeof t=="object"?t.id+"":t+"":""},updateModelValue(t){this.$emit("update:modelValue",t.target.value)},selectOption(t){this.selected=t,this.optionsShown=!1,this.$emit("selected",this.selected),this.$emit("selectionChanged",this.selected)},showOptions(){this.show||(this.searchFilter="",this.optionsShown=!0,this.$nextTick(()=>{this.$refs[this.field_name+"search"+this.uuid].focus()}))},ClearInput(){this.show||(this.selected={},this.searchFilter="",this.$emit("update:modelValue",""),this.showOptions())},exit(){this.selected.id||(this.selected={},this.searchFilter=""),this.$emit("selected",this.selected),this.optionsShown=!1}},watch:{searchFilter(){this.filteredOptions.length===0&&(this.selected={})},selected(t){this.isObjectNotEmpty(t)&&this.$emit("update:modelValue",t.id)}}},Nn={class:"font-bold ptext-lg dark:text-white"},Vn={class:"mt-3 mb-4"},Bn={class:"bg-blue-100 text-blue-800 text-sm font-medium mb-2 mt-2 me-2 px-2.5 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300"},Cn=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),Sn=["name","id","value"],Dn={key:0,class:"dropdown"},$n={class:"border border-gray-200 rounded-lg focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500"},On={class:"relative showOptions"},Pn=["value","placeholder"],Tn={class:"text-gray-700 bg-white dark:border-strokedark dark:bg-boxdark dark:text-gray-200 !border-b !border-t-0 !border-r !border-l absolute w-full z-[999999999]"},Mn={class:"p-1"},jn=e.createElementVNode("label",{for:"default-search",class:"mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"},"Search",-1),An={class:"relative"},In=e.createElementVNode("div",{class:"absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3"},[e.createElementVNode("svg",{class:"w-4 h-4 text-gray-500 dark:text-gray-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"})])],-1),Ln=["id"],Fn={class:"overflow-y-auto max-h-64"},zn=["onClick","onMousedown","id"],Gn={class:"flex items-center py-2 pl-10 pr-4"},vn={key:0,class:"absolute flex items-center flex-shrink-0 w-4 h-4 text-green-500 left-2 dark:text-green-400","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 12"},Rn=[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M1 5.917 5.724 10.5 15 1.5"},null,-1)],Un={class:"block mt-1 text-sm font-normal leading-5 text-red-500"},qn={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"};function Hn(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock(e.Fragment,null,[o.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(o.field_name)},[e.createElementVNode("h3",Nn,e.toDisplayString(o.label_name),1),e.createElementVNode("p",Vn,[e.createElementVNode("span",Bn,e.toDisplayString(t.selectedValue.name),1)]),Cn],2)):e.createCommentVNode("",!0),o.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",o.field_name])},[e.createElementVNode("input",{type:"hidden",name:o.field_name,id:o.field_name,value:a.selected.id},null,8,Sn),o.options?(e.openBlock(),e.createElementBlock("div",Dn,[o.label_name?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass({"gl-label-form":o.error_message=="","gl-label-form-invalid":o.error_message!=="",required:o.is_required})},e.toDisplayString(o.label_name),3)):e.createCommentVNode("",!0),e.createElementVNode("div",$n,[e.createElementVNode("div",On,[e.createElementVNode("input",{class:e.normalizeClass([{"gl-input-form":o.error_message=="","gl-input-form-invalid":o.error_message!==""},"pl-8 pr-2 showOptions"]),ref:o.field_name,onClick:r[0]||(r[0]=i=>l.showOptions()),value:a.selected.name,placeholder:o.placeholder,autocomplete:"off",readonly:""},null,10,Pn),e.withDirectives(e.createElementVNode("i",{onClick:r[1]||(r[1]=e.withModifiers(i=>l.ClearInput(),["stop"])),class:"absolute text-gray-500 cursor-pointer fas fa-times right-7 hover:text-gray-700 dark:hover:text-gray-800",style:{top:"13px"}},null,512),[[e.vShow,l.isObjectNotEmpty(a.selected)&&o.has_cancel]]),e.createElementVNode("i",{onClick:r[2]||(r[2]=i=>!a.optionsShown&&l.showOptions()),class:e.normalizeClass([a.optionsShown?"fa-angle-up":"fa-angle-down","absolute text-xl text-gray-500 cursor-pointer fas right-2 hover:text-gray-700 dark:hover:text-gray-800 showOptions"]),style:{top:"11px"}},null,2)]),e.withDirectives(e.createElementVNode("div",Tn,[e.createElementVNode("div",Mn,[jn,e.createElementVNode("div",An,[In,e.withDirectives(e.createElementVNode("input",{type:"search","onUpdate:modelValue":r[3]||(r[3]=i=>a.searchFilter=i),ref:`${o.field_name}search${a.uuid}`,id:`${o.field_name}search${a.uuid}`,onKeydown:r[4]||(r[4]=(...i)=>l.handleKeyDown&&l.handleKeyDown(...i)),onBlur:r[5]||(r[5]=i=>l.exit()),autocomplete:"off",class:"block w-full p-2 text-sm text-gray-900 border rounded-lg outline-none border-frontend ps-10 bg-gray-50 focus:border-frontend dark:bg-gray-700 dark:border-frontenddark dark:placeholder-frontenddark dark:text-white dark:focus:border-frontenddark",placeholder:"Search ..."},null,40,Ln),[[e.vModelText,a.searchFilter]])])]),e.createElementVNode("div",Fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.filteredOptions,(i,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["relative px-2 py-2 text-xs leading-4 text-gray-700 no-underline cursor-pointer dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",s+1==a.count?"bg-gray-100 dark:bg-gray-600":""]),onClick:d=>l.selectOption(i),onMousedown:d=>l.selectOption(i),key:s,id:`${s+1}${a.uuid}`},[e.createElementVNode("div",Gn,[a.selected.id===i.id?(e.openBlock(),e.createElementBlock("svg",vn,Rn)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(i.name||i.id||"-"),1)])],42,zn))),128))])],512),[[e.vShow,a.optionsShown]])])])):e.createCommentVNode("",!0),e.createElementVNode("span",Un,e.toDisplayString(o.error_message),1),e.createElementVNode("small",qn,e.toDisplayString(o.description),1)],2))],64)}const Zn=u(En,[["render",Hn]]),Kn={class:"font-bold ptext-lg dark:text-white"},Wn=["id"],Xn=e.createElementVNode("hr",{class:"!opacity-100 bg-gray-200 border-0 dark:bg-gray-700"},null,-1),Yn=["for"],Jn=["required","name","id","type","placeholder"],Qn={class:"gl-span-form-error"},el={class:"block mt-1 text-sm font-normal leading-5 text-gray-500"},tl={__name:"GlTextarea",props:{is_required:{type:Boolean,default:!1},show:{type:Boolean,default:!1},error_message:{type:String,default:""},model_value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},field_name:{type:String,default:""},label_name:{type:String,default:""},description:{type:String,default:""},place_holder:{type:String,default:""}},emits:["update:modelValue","keydown"],setup(t,{expose:r,emit:o}){const n=t,a=o,l=e.ref(null);return e.onMounted(()=>{l.value!==null&&l.value.hasAttribute("autofocus")&&l.value.focus(),n.model_value&&(a("update:modelValue",n.model_value),l.value.value=n.model_value),n.modelValue!=""&&(a("update:modelValue",n.modelValue),l.value.value=n.modelValue)}),r({focus:()=>l.value.focus()}),(i,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.show?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(t.field_name)},[e.createElementVNode("h3",Kn,e.toDisplayString(t.label_name),1),e.createElementVNode("p",{id:t.field_name,class:"mb-4 text-base text-gray-900 input_tr_show dark:text-white"},e.toDisplayString(t.model_value),9,Wn),Xn],2)):e.createCommentVNode("",!0),t.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["mb-4",t.field_name])},[e.createElementVNode("label",{class:e.normalizeClass({"gl-label-form":t.error_message=="","gl-label-form-invalid":t.error_message!=="",required:t.is_required}),for:t.field_name},e.toDisplayString(t.label_name),11,Yn),e.createElementVNode("textarea",{required:t.is_required,name:t.field_name,id:t.field_name,class:e.normalizeClass({" gl-textarea-form mt-4 ":t.error_message==""," gl-textarea-form-invalid mt-4 ":t.error_message!==""}),type:t.type,onInput:s[0]||(s[0]=d=>i.$emit("update:modelValue",d.target.value)),ref_key:"input",ref:l,rows:"4",placeholder:t.place_holder},null,42,Jn),e.createElementVNode("span",Qn,e.toDisplayString(t.error_message),1),e.createElementVNode("small",el,e.toDisplayString(t.description),1)],2))],64))}},rl={compatConfig:{MODE:3},inheritAttrs:!1,emits:["pagination-change-page"],components:{RenderlessPagination:{emits:["pagination-change-page"],props:{data:{type:Object,default:()=>{}},limit:{type:Number,default:0}},computed:{isApiResource(){return!!this.data.meta},currentPage(){return this.isApiResource?this.data.meta.current_page:this.data.current_page},firstPageUrl(){return this.isApiResource?this.data.links.first:null},from(){return this.isApiResource?this.data.meta.from:this.data.from},lastPage(){return this.isApiResource?this.data.meta.last_page:this.data.last_page},lastPageUrl(){return this.isApiResource?this.data.links.last:null},nextPageUrl(){return this.isApiResource?this.data.links.next:this.data.next_page_url},perPage(){return this.isApiResource?this.data.meta.per_page:this.data.per_page},prevPageUrl(){return this.isApiResource?this.data.links.prev:this.data.prev_page_url},to(){return this.isApiResource?this.data.meta.to:this.data.to},total(){return this.isApiResource?this.data.meta.total:this.data.total},pageRange(){if(this.limit===-1)return 0;if(this.limit===0)return this.lastPage;for(var t=this.currentPage,r=this.lastPage,o=this.limit,n=t-o,a=t+o+1,l=[],i=[],s,d=1;d<=r;d++)(d===1||d===r||d>=n&&d<a)&&l.push(d);return l.forEach(function(c){s&&(c-s===2?i.push(s+1):c-s!==1&&i.push("...")),i.push(c),s=c}),i}},methods:{previousPage(){this.selectPage(this.currentPage-1)},nextPage(){this.selectPage(this.currentPage+1)},selectPage(t){t!=="..."&&this.$emit("pagination-change-page",t)}},render(){return this.$slots.default({data:this.data,limit:this.limit,computed:{isApiResource:this.isApiResource,currentPage:this.currentPage,firstPageUrl:this.firstPageUrl,from:this.from,lastPage:this.lastPage,lastPageUrl:this.lastPageUrl,nextPageUrl:this.nextPageUrl,perPage:this.perPage,prevPageUrl:this.prevPageUrl,to:this.to,total:this.total,pageRange:this.pageRange},prevButtonEvents:{click:t=>{t.preventDefault(),this.previousPage()}},nextButtonEvents:{click:t=>{t.preventDefault(),this.nextPage()}},pageButtonEvents:t=>({click:r=>{r.preventDefault(),this.selectPage(t)}})})}}},props:{data:{type:Object,default:()=>{}},limit:{type:Number,default:0},showDisabled:{type:Boolean,default:!1},size:{type:String,default:"default",validator:t=>["small","default","large"].indexOf(t)!==-1},align:{type:String,default:"left",validator:t=>["left","center","right"].indexOf(t)!==-1}},methods:{onPaginationChangePage(t){this.$emit("pagination-change-page",t)}},mounted(){}},ol={class:"flex flex-col items-center"},nl={key:0,class:"text-sm text-gray-700 dark:text-gray-400"},ll={class:"font-semibold text-gray-900 dark:text-white"},al={class:"font-semibold text-gray-900 dark:text-white"},sl={class:"font-semibold text-gray-900 dark:text-white"},il=["tabindex"],dl=e.createElementVNode("span",{class:"sr-only"},"Previous",-1),cl=e.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 1 1 5l4 4"})],-1),ml=["aria-current"],hl=["tabindex"],fl=e.createElementVNode("span",{class:"sr-only"},"Next",-1),gl=e.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"})],-1);function ul(t,r,o,n,a,l){const i=e.resolveComponent("RenderlessPagination");return e.openBlock(),e.createBlock(i,{data:o.data,limit:o.limit,onPaginationChangePage:l.onPaginationChangePage},{default:e.withCtx(s=>[e.createElementVNode("div",ol,[s.computed.total>s.computed.perPage?(e.openBlock(),e.createElementBlock("span",nl,[e.createTextVNode(" Showing "),e.createElementVNode("span",ll,e.toDisplayString(s.computed.from),1),e.createTextVNode(" to "),e.createElementVNode("span",al,e.toDisplayString(s.computed.to),1),e.createTextVNode(" of "),e.createElementVNode("span",sl,e.toDisplayString(s.computed.total),1),e.createTextVNode(" Entries ")])):e.createCommentVNode("",!0),s.computed.total>s.computed.perPage?(e.openBlock(),e.createElementBlock("ul",e.mergeProps({key:1},t.$attrs,{class:["flex items-center h-8 -space-x-px text-sm",{"pagination-sm":o.size=="small","pagination-lg":o.size=="large","justify-content-center":o.align=="center","justify-content-end":o.align=="right"}]}),[s.computed.prevPageUrl||o.showDisabled?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass(["flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 ms-0 border-e-0 rounded-s-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white",{disabled:!s.computed.prevPageUrl}])},[e.createElementVNode("a",e.mergeProps({class:"page-link",href:"#","aria-label":"Previous",tabindex:!s.computed.prevPageUrl&&-1},e.toHandlers(s.prevButtonEvents,!0)),[e.renderSlot(t.$slots,"prev-nav",{},()=>[dl,cl])],16,il)],2)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.computed.pageRange,(d,c)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["",{active:d==s.computed.currentPage}]),key:c},[e.createElementVNode("a",e.mergeProps({class:"",href:"#"},e.toHandlers(s.pageButtonEvents(d),!0),{"aria-current":d==s.computed.currentPage?"page":null,class:d==s.computed.currentPage?"z-10 flex items-center justify-center px-3 h-8 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white":"flex items-center justify-center px-3 h-8 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"}),e.toDisplayString(d),17,ml)],2))),128)),s.computed.nextPageUrl||o.showDisabled?(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 rounded-e-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white",{disabled:!s.computed.nextPageUrl}])},[e.createElementVNode("a",e.mergeProps({class:"",href:"#","aria-label":"Next",tabindex:!s.computed.nextPageUrl&&-1},e.toHandlers(s.nextButtonEvents,!0)),[e.renderSlot(t.$slots,"next-nav",{},()=>[fl,gl])],16,hl)],2)):e.createCommentVNode("",!0)],16)):e.createCommentVNode("",!0)])]),_:3},8,["data","limit","onPaginationChangePage"])}const ae=u(rl,[["render",ul]]),pl={components:{TailwindPagination:ae},props:{data:Array,columns:Array,get_item_url:String,xprops:Object,refreshData:Boolean},data(){return{isMounted:!1,limit:5,showDisabled:!1,size:"default",align:"left",search:"",isDropdownOpen:!1,itemLists:[],tableData:[],sortField:this.columns[0].field_name,sortOrder:"asc",pageOptions:[5,10,20,50],perPage:5,page:1}},computed:{filteredData(){const t=this.search.toLowerCase();return this.sortData(this.data).filter(o=>Object.values(o).some(n=>n.toString().toLowerCase().includes(t)))}},methods:{forDynCompIs(t){return typeof t=="object"?t:null},GetItemLists(t=1){this.page=t;const r={sort:this.sortField,order:this.sortOrder,s:this.search,limit:this.perPage,page:this.page};axios.get(this.xprops.route_get_data,{params:r}).then(o=>{this.itemLists=o.data}).catch(o=>{console.error(o)})},updateSortColumn(t,r){r&&(t===this.sortField?this.sortOrder=this.sortOrder==="asc"?"desc":"asc":(this.sortField=t,this.sortOrder="asc"),this.GetItemLists(this.page))},handleSearch(){this.sortField=this.columns[0].field_name,this.sortOrder="asc",this.page=1,this.GetItemLists(this.page)}},beforeDestroy(){},mounted(){this.GetItemLists(),this.isMounted=!0},watch:{searchFilter(){this.filteredOptions.length===0?this.selected={}:this.selected=this.filteredOptions[0]},perPage(t){this.page=1,this.perPage=t,this.GetItemLists(this.page)},refreshData(t,r){this.isMounted&&t!==r&&this.GetItemLists()}}},_l={class:"p-2"},yl={class:"flex flex-col flex-wrap pb-4 space-y-4 xl:flex-row xl:items-center xl:justify-between flex-column sm:space-y-0"},bl={class:"flex items-center gap-2"},kl=e.createElementVNode("span",{class:"font-medium"}," Show ",-1),xl={style:{"margin-top":"9px"}},wl=e.createElementVNode("span",{class:"font-medium"}," Entries ",-1),El=e.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1),Nl={class:"relative"},Vl=e.createElementVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3"},[e.createElementVNode("svg",{class:"w-5 h-5 text-gray-500 dark:text-gray-400","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z","clip-rule":"evenodd"})])],-1),Bl={class:"overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"},Cl={class:"w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse border-spacing-y-3 lg:border-spacing-y-0 dark:border-strokedark dark:bg-boxdark"},Sl={class:"hidden text-sm font-normal text-center text-gray-700 uppercase lg:table-header-group dark:border-strokedark bg-gray-50 dark:bg-gray-700 dark:text-gray-400"},Dl=["onClick"],$l={key:0,class:"ml-2"},Ol={key:0,class:"fa fa-arrow-up"},Pl={key:1,class:"fa fa-arrow-down"},Tl=["data-label"],Ml={class:"overflow-auto max-h-40"},jl={class:"flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800"};function Al(t,r,o,n,a,l){const i=e.resolveComponent("dropdown"),s=e.resolveComponent("TailwindPagination");return e.openBlock(),e.createElementBlock("div",_l,[e.createElementVNode("div",yl,[e.createElementVNode("div",bl,[kl,e.createElementVNode("div",xl,[e.createVNode(i,{has_cancel:!1,options:a.pageOptions,modelValue:a.perPage,"onUpdate:modelValue":r[0]||(r[0]=d=>a.perPage=d),is_required:!1,field_name:"perPage",label_name:"",default_value:5,show:!1,placeholder:"Please select an option"},null,8,["options","modelValue"])]),wl]),El,e.createElementVNode("div",Nl,[Vl,e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":r[1]||(r[1]=d=>a.search=d),onInput:r[2]||(r[2]=d=>l.handleSearch()),class:"block w-full p-2 text-sm text-gray-900 border border-gray-300 rounded-lg ps-10 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search ..."},null,544),[[e.vModelText,a.search]])])]),e.createElementVNode("div",Bl,[e.createElementVNode("table",Cl,[e.createElementVNode("thead",Sl,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,(d,c)=>(e.openBlock(),e.createElementBlock("th",{key:c,onClick:m=>l.updateSortColumn(d.field_name,d.sortable),class:"w-full px-4 py-2 lg:w-2/12"},[e.createTextVNode(e.toDisplayString(d.field_label)+" ",1),a.sortField===d.field_name?(e.openBlock(),e.createElementBlock("span",$l,[a.sortOrder==="asc"?(e.openBlock(),e.createElementBlock("i",Ol)):(e.openBlock(),e.createElementBlock("i",Pl))])):e.createCommentVNode("",!0)],8,Dl))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.itemLists.data,(d,c)=>(e.openBlock(),e.createElementBlock("tr",{key:c,class:"bg-white dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,(m,f)=>(e.openBlock(),e.createElementBlock("td",{key:f,"data-label":m.field_label,class:"text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none flex md:flex-row flex-col justify-between gap-2 lg:table-cell py-4 px-5 lg:py-2.5 lg:px-4 border dark:border-gray-700"},[e.createElementVNode("div",Ml,[m.tdComp?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.forDynCompIs(m.tdComp)),{key:0,row:d,field:m.field_name,xprops:o.xprops,tdProps:m.tdProps,onDeleteAction:r[3]||(r[3]=g=>l.GetItemLists())},null,40,["row","field","xprops","tdProps"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(d[m.field_name]),1)],64))])],8,Tl))),128))]))),128))])])]),e.createElementVNode("div",jl,[e.createVNode(s,{class:"mt-3 mb-0",data:a.itemLists,limit:a.limit,size:a.size,align:a.align,onPaginationChangePage:l.GetItemLists},null,8,["data","limit","size","align","onPaginationChangePage"])])])}const Il=u(pl,[["render",Al]]),Ll={components:{},props:{data:Array,columns:Array},data(){return{showNoOfEntries:[1,2,3,10,20,30,40],search:"",isDropdownOpen:!1,sortKey:"",sortOrder:1,currentPage:1,itemsPerPage:10,jumpToPage:"",maxDisplayedPages:10}},computed:{filteredData(){const t=this.search.toLowerCase();return this.sortData(this.data).filter(o=>Object.values(o).some(n=>n!=null&&n.toString().toLowerCase().includes(t)))},totalPages(){return Math.ceil(this.filteredData.length/this.itemsPerPage)},paginatedData(){const t=(this.currentPage-1)*this.itemsPerPage,r=t+this.itemsPerPage;return this.filteredData.slice(t,r)},displayedPageNumbers(){let t=Math.max(this.currentPage-Math.floor(this.maxDisplayedPages/2),1),r=t+this.maxDisplayedPages-1;return r>this.totalPages&&(r=this.totalPages,t=Math.max(r-this.maxDisplayedPages+1,1)),Array.from({length:r-t+1},(o,n)=>t+n)},firstItemIndex(){return this.itemsPerPage*(this.currentPage-1)+1},lastItemIndex(){const t=this.itemsPerPage*this.currentPage;return t>this.filteredData.length?this.filteredData.length:t}},methods:{handleItemsPerPageChange(t){this.itemsPerPage=t},goToPage(t){t>=1&&t<=this.totalPages&&(this.currentPage=t)},sort(t){t===this.sortKey?this.sortOrder*=-1:(this.sortKey=t,this.sortOrder=1)},sortData(t){return this.sortKey?t.slice().sort((r,o)=>(r[this.sortKey]<o[this.sortKey]?-1:1)*this.sortOrder):t},previousPage(){this.currentPage>1&&this.currentPage--},nextPage(){this.currentPage<this.totalPages&&this.currentPage++},firstPage(){this.currentPage=1},lastPage(){this.currentPage=this.totalPages},goToPage(t){t>=1&&t<=this.totalPages&&(this.currentPage=t)},onJumpToPageChange(){const t=parseInt(this.jumpToPage);t>=1&&t<=this.totalPages&&(this.jumpToPage=t)},jumpToPageButton(){this.jumpToPage>=1&&this.jumpToPage<=this.totalPages&&(this.currentPage=this.jumpToPage)},closeBoxOnbodyClick(){event.target.closest(".main_box_close")||(this.isDropdownOpen=!1)}},beforeDestroy(){document.body.removeEventListener("click",this.closeBoxOnbodyClick)},mounted(){document.body.addEventListener("click",this.closeBoxOnbodyClick)}},Fl={class:"p-2"},zl={class:"flex flex-wrap pb-4 space-y-4 md:items-center md:justify-between flex-column sm:flex-row sm:space-y-0"},Gl={class:"flex items-center gap-2"},vl=e.createElementVNode("span",{class:"font-medium"}," Show ",-1),Rl={style:{"margin-top":"9px"}},Ul=e.createElementVNode("span",{class:"font-medium"}," Entries ",-1),ql=e.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1),Hl={class:"relative"},Zl=e.createElementVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pointer-events-none rtl:inset-r-0 rtl:right-0 ps-3"},[e.createElementVNode("svg",{class:"w-5 h-5 text-gray-500 dark:text-gray-400","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z","clip-rule":"evenodd"})])],-1),Kl={class:"overflow-auto rounded-lg dark:text-gray-400 dark:bg-gray-800"},Wl={class:"w-full h-full max-w-full overflow-hidden bg-white border-separate xl:overflow-auto lg:border-collapse border-spacing-y-3 lg:border-spacing-y-0 dark:border-strokedark dark:bg-boxdark"},Xl={class:"hidden text-sm font-normal text-center text-gray-700 uppercase lg:table-header-group dark:border-strokedark bg-gray-50 dark:bg-gray-700 dark:text-gray-400"},Yl=["onClick"],Jl={key:0,class:"ml-2"},Ql=["data-label"],ea=["innerHTML"],ta={class:"flex items-center justify-between px-4 py-3 bg-white border-gray-200 sm:px-6 dark:text-gray-400 dark:bg-gray-800"},ra={class:"flex justify-between flex-1 sm:hidden"},oa=["disabled"],na=["disabled"],la={class:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between"},aa={class:"text-sm text-gray-700 dark:text-gray-400"},sa={class:"font-medium"},ia={class:"font-medium"},da={class:"font-medium"},ca={"aria-label":"Page navigation"},ma={class:"flex items-center h-8 -space-x-px text-sm"},ha=["disabled"],fa=[e.createElementVNode("span",{class:"sr-only"},"Previous",-1),e.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 1 1 5l4 4"})],-1)],ga=["onClick"],ua=["onClick"],pa=["disabled"],_a=[e.createElementVNode("span",{class:"sr-only"},"Next",-1),e.createElementVNode("svg",{class:"w-2.5 h-2.5 rtl:rotate-180","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"},[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"})],-1)];function ya(t,r,o,n,a,l){const i=e.resolveComponent("dropdown");return e.openBlock(),e.createElementBlock("div",Fl,[e.createElementVNode("div",zl,[e.createElementVNode("div",Gl,[vl,e.createElementVNode("div",Rl,[e.createVNode(i,{has_cancel:!1,options:a.showNoOfEntries,modelValue:a.itemsPerPage,"onUpdate:modelValue":r[0]||(r[0]=s=>a.itemsPerPage=s),is_required:!1,field_name:"NoOfEntries",label_name:"",default_value:"10",show:!1,placeholder:"Please select an option"},null,8,["options","modelValue"])]),Ul]),ql,e.createElementVNode("div",Hl,[Zl,e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":r[1]||(r[1]=s=>a.search=s),class:"block p-2 text-sm text-gray-900 border border-gray-300 rounded-lg ps-10 w-80 bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search ..."},null,512),[[e.vModelText,a.search]])])]),e.createElementVNode("div",Kl,[e.createElementVNode("table",Wl,[e.createElementVNode("thead",Xl,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,(s,d)=>(e.openBlock(),e.createElementBlock("th",{key:d,onClick:c=>l.sort(s),class:"w-full px-4 py-2 lg:w-2/12"},[e.createTextVNode(e.toDisplayString(s)+" ",1),a.sortKey===s?(e.openBlock(),e.createElementBlock("span",Jl,e.toDisplayString(a.sortOrder===1?"▲":"▼"),1)):e.createCommentVNode("",!0)],8,Yl))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.paginatedData,(s,d)=>(e.openBlock(),e.createElementBlock("tr",{key:d,class:"bg-white dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.columns,(c,m)=>(e.openBlock(),e.createElementBlock("td",{key:m,"data-label":c,class:"text-pretty before:content-[attr(data-label)] before:font-bold lg:before:content-none flex md:flex-row flex-col justify-between gap-2 lg:table-cell py-4 px-5 lg:py-2.5 lg:px-4 border dark:border-gray-700"},[e.createElementVNode("p",{class:"text-pretty",innerHTML:s[m]},null,8,ea)],8,Ql))),128))]))),128))])])]),e.createElementVNode("div",ta,[e.createElementVNode("div",ra,[e.createElementVNode("a",{href:"#",onClick:r[2]||(r[2]=(...s)=>l.previousPage&&l.previousPage(...s)),disabled:a.currentPage===1,class:"relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},"Previous",8,oa),e.createElementVNode("a",{href:"#",onClick:r[3]||(r[3]=(...s)=>l.nextPage&&l.nextPage(...s)),disabled:a.currentPage===l.totalPages,class:"relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"},"Next",8,na)]),e.createElementVNode("div",la,[e.createElementVNode("div",null,[e.createElementVNode("p",aa,[e.createTextVNode(" Showing "),e.createElementVNode("span",sa,e.toDisplayString(l.firstItemIndex),1),e.createTextVNode(" to "),e.createElementVNode("span",ia,e.toDisplayString(l.lastItemIndex),1),e.createTextVNode(" of "),e.createElementVNode("span",da,e.toDisplayString(l.filteredData.length),1),e.createTextVNode(" entries ")])]),e.createElementVNode("div",null,[e.createElementVNode("nav",ca,[e.createElementVNode("ul",ma,[e.createElementVNode("li",null,[e.createElementVNode("a",{href:"#",onClick:r[4]||(r[4]=(...s)=>l.previousPage&&l.previousPage(...s)),disabled:a.currentPage===1,class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 ms-0 border-e-0 rounded-s-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},fa,8,ha)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.displayedPageNumbers,s=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s},[e.createElementVNode("li",null,[a.currentPage!==s?(e.openBlock(),e.createElementBlock("a",{key:0,href:"#",onClick:d=>l.goToPage(s),class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},e.toDisplayString(s),9,ga)):e.createCommentVNode("",!0)]),e.createElementVNode("li",null,[a.currentPage===s?(e.openBlock(),e.createElementBlock("a",{key:0,href:"#",onClick:d=>l.goToPage(s),"aria-current":"page",class:"z-10 flex items-center justify-center h-8 px-3 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white"},e.toDisplayString(s),9,ua)):e.createCommentVNode("",!0)])],64))),128)),e.createElementVNode("li",null,[e.createElementVNode("a",{href:"#",onClick:r[5]||(r[5]=(...s)=>l.nextPage&&l.nextPage(...s)),disabled:a.currentPage===l.totalPages,class:"flex items-center justify-center h-8 px-3 leading-tight text-gray-500 bg-white border border-gray-300 rounded-e-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},_a,8,pa)])])])])])])])}const ba=u(Ll,[["render",ya]]),ka={class:"flex items-center p-4 text-gray-500 bg-white rounded-lg shadow dark:bg-gray-800 dark:text-gray-400",role:"alert"},xa={key:0,class:"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-green-500 bg-green-100 rounded-lg dark:bg-green-800 dark:text-green-200"},wa=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})],-1),e.createElementVNode("span",{class:"sr-only"},"Check icon",-1)],Ea={key:1,class:"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-red-500 bg-red-100 rounded-lg dark:bg-red-800 dark:text-red-200"},Na=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 11.793a1 1 0 1 1-1.414 1.414L10 11.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L8.586 10 6.293 7.707a1 1 0 0 1 1.414-1.414L10 8.586l2.293-2.293a1 1 0 0 1 1.414 1.414L11.414 10l2.293 2.293Z"})],-1),e.createElementVNode("span",{class:"sr-only"},"Error icon",-1)],Va={key:2,class:"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-orange-500 bg-orange-100 rounded-lg dark:bg-orange-700 dark:text-orange-200"},Ba=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[e.createElementVNode("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM10 15a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-4a1 1 0 0 1-2 0V6a1 1 0 0 1 2 0v5Z"})],-1),e.createElementVNode("span",{class:"sr-only"},"Warning icon",-1)],Ca={class:"ml-3 text-sm font-normal"},Sa=[e.createElementVNode("span",{class:"sr-only"},"Close",-1),e.createElementVNode("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)],Da={__name:"ToastListItem",props:{message:String,duration:{type:Number,default:2e3},type:{type:String,default:"success"}},emits:["remove"],setup(t,{emit:r}){const o=t;e.onMounted(()=>{setTimeout(()=>n("remove"),o.duration)});const n=r;return(a,l)=>(e.openBlock(),e.createElementBlock("div",ka,[o.type==="success"?(e.openBlock(),e.createElementBlock("div",xa,wa)):e.createCommentVNode("",!0),o.type==="error"?(e.openBlock(),e.createElementBlock("div",Ea,Na)):e.createCommentVNode("",!0),o.type==="warning"?(e.openBlock(),e.createElementBlock("div",Va,Ba)):e.createCommentVNode("",!0),e.createElementVNode("div",Ca,e.toDisplayString(o.message),1),e.createElementVNode("button",{onClick:l[0]||(l[0]=i=>n("remove")),type:"button",class:"-mx-1.5 -my-1.5 ml-auto inline-flex h-8 w-8 rounded-lg bg-white p-1.5 text-gray-400 hover:bg-gray-100 hover:text-gray-900 focus:ring-2 focus:ring-gray-300 dark:bg-gray-800 dark:text-gray-500 dark:hover:bg-gray-700 dark:hover:text-white","data-dismiss-target":"#toast-default","aria-label":"Close"},Sa)]))}},I=e.reactive({items:[]}),L={state:I,methods:{add(t){I.items.unshift({key:Symbol(),message:t.message,type:t.type,duration:t.duration})},remove(t){I.items.splice(t,1)}}},$a={__name:"GlToastList",setup(t){function r(o){L.methods.remove(o)}return(o,n)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"div","enter-from-class":"translate-x-full opacity-0","enter-active-class":"duration-500","leave-active-class":"duration-500","leave-to-class":"translate-x-full opacity-0",class:"fixed z-50 w-full max-w-xs space-y-4 top-4 right-4"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(L).state.items,(a,l)=>(e.openBlock(),e.createBlock(Da,{key:a.key,message:a.message,type:a.type,duration:a.duration,onRemove:i=>r(l)},null,8,["message","type","duration","onRemove"]))),128))]),_:1}))}},Oa={key:0,class:"flex justify-center"},Pa=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 4 15"},[e.createElementVNode("path",{d:"M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})],-1)],Ta={class:"absolute z-10 mt-5 origin-top-right bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700 dark:divide-gray-600"},Ma={class:"py-2 text-sm text-gray-700 dark:text-gray-200","aria-labelledby":"dropdownDividerButton"},ja={key:0},Aa=["href"],Ia=e.createElementVNode("i",{class:"mr-2 fa-solid fa-list-ul opacity-80"},null,-1),La={key:1},Fa=e.createElementVNode("i",{class:"mr-2 fa-solid fa-trash-can opacity-80"},null,-1),za={__name:"DatatableAction",props:{field:{type:String,default:""},route_url:{type:String,default:""},row:{type:[Array,Object],default:[]},xprops:{type:Object,default:{}},tdProps:{type:Object,default:{}}},emits:["deleteAction"],setup(t,{emit:r}){const o=G(),n=t,a=e.ref(!1),l=e.ref(!1),i=()=>{a.value=!1},s=()=>{a.value=!0},d=()=>{l.value=!1},c=()=>{l.value=!0},m=r,f=()=>{axios.delete(`${n.xprops.route}/${n.row.id}`).then(()=>{d(),m("deleteAction"),o.commit("notification/SHOW_NOTIFICATION",{message:"Item deleted successfully.",type:"success",duration:5e3})}).catch(g=>{console.log(g)})};return(g,p)=>{const B=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(C,{isOpen:l.value,onConfirmDelete:f,onCancelDelete:d},null,8,["isOpen"]),t.row&&g.can(`edit_${t.xprops.permission} || delete_${t.xprops.permission}`)?e.withDirectives((e.openBlock(),e.createElementBlock("div",Oa,[e.createElementVNode("button",{onClick:s,class:"inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-none dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",type:"button"},Pa),e.withDirectives(e.createElementVNode("div",Ta,[e.createElementVNode("ul",Ma,[g.can(`edit_${t.xprops.permission}`)?(e.openBlock(),e.createElementBlock("li",ja,[e.createElementVNode("a",{href:t.xprops.route+"/"+t.row.id+"/edit",class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},[Ia,e.createTextVNode(" Edit")],8,Aa)])):e.createCommentVNode("",!0),g.can(`delete_${t.xprops.permission}`)?(e.openBlock(),e.createElementBlock("li",La,[e.createElementVNode("a",{href:"#",onClick:e.withModifiers(c,["prevent"]),class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},[Fa,e.createTextVNode(" Remove")])])):e.createCommentVNode("",!0)])],512),[[e.vShow,a.value]])])),[[B,i]]):e.createCommentVNode("",!0)],64)}}},Ga={key:0,class:"flex justify-center"},va=[e.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 4 15"},[e.createElementVNode("path",{d:"M3.5 1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 6.041a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm0 5.959a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"})],-1)],Ra={class:"absolute z-10 mt-5 origin-top-right bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700 dark:divide-gray-600"},Ua={class:"py-2 text-sm text-gray-700 dark:text-gray-200","aria-labelledby":"dropdownDividerButton"},qa={key:0},Ha=e.createElementVNode("i",{class:"mr-2 fa-solid fa-trash-can opacity-80"},null,-1),Za={__name:"DatatableDeleteAction",props:{field:{type:String,default:""},route_url:{type:String,default:""},row:{type:[Array,Object],default:[]},xprops:{type:Object,default:{}},tdProps:{type:Object,default:{}}},emits:["deleteAction"],setup(t,{emit:r}){const o=G(),n=t,a=e.ref(!1),l=e.ref(!1),i=()=>{a.value=!1},s=()=>{a.value=!0},d=()=>{l.value=!1},c=()=>{l.value=!0},m=r,f=()=>{axios.delete(`${n.xprops.route}/${n.row.id}`).then(()=>{d(),m("deleteAction"),o.commit("notification/SHOW_NOTIFICATION",{message:"Item deleted successfully.",type:"success",duration:5e3})}).catch(g=>{console.log(g)})};return(g,p)=>{const B=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(C,{isOpen:l.value,onConfirmDelete:f,onCancelDelete:d},null,8,["isOpen"]),t.row&&g.can(`delete_${t.xprops.permission}`)?e.withDirectives((e.openBlock(),e.createElementBlock("div",Ga,[e.createElementVNode("button",{onClick:s,class:"inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-white rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-none dark:text-white focus:ring-gray-50 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-600",type:"button"},va),e.withDirectives(e.createElementVNode("div",Ra,[e.createElementVNode("ul",Ua,[g.can(`delete_${t.xprops.permission}`)?(e.openBlock(),e.createElementBlock("li",qa,[e.createElementVNode("a",{href:"#",onClick:e.withModifiers(c,["prevent"]),class:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"},[Ha,e.createTextVNode(" Remove")])])):e.createCommentVNode("",!0)])],512),[[e.vShow,a.value]])])),[[B,i]]):e.createCommentVNode("",!0)],64)}}},Ka={props:["field","row"],computed:{isArray(){return Array.isArray(this.row)},isObject(){return typeof this.row=="object"},isString(){return typeof this.row=="string"}},mounted(){console.log("row : ",this.row)}},Wa=["href","title"],Xa=e.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1),Ya={key:1,class:"m-1 d-inline-block"},Ja=["href","title"],Qa=e.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1);function es(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock("div",null,[l.isArray?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.row,(i,s)=>(e.openBlock(),e.createElementBlock("div",{key:s,class:"m-1 d-inline-block"},[e.createElementVNode("a",{href:i,title:i,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[Xa,e.createTextVNode(" Download ")],8,Wa)]))),128)):l.isString?(e.openBlock(),e.createElementBlock("div",Ya,[e.createElementVNode("a",{href:o.row,title:o.row,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[Qa,e.createTextVNode(" Download ")],8,Ja)])):e.createCommentVNode("",!0)])}const ts=u(Ka,[["render",es]]),rs={props:["field","row"],computed:{isArray(){return Array.isArray(this.row[this.field])},isObject(){return typeof this.row[this.field]=="object"}}},os=["href","title"],ns=e.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1),ls={key:1,class:"m-1 d-inline-block"},as=["href","title"],ss=e.createElementVNode("svg",{class:"w-3 h-3 text-white me-2","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M13 11.15V4a1 1 0 1 0-2 0v7.15L8.78 8.374a1 1 0 1 0-1.56 1.25l4 5a1 1 0 0 0 1.56 0l4-5a1 1 0 1 0-1.56-1.25L13 11.15Z","clip-rule":"evenodd"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.657 15.874 7.358 13H5a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2.358l-2.3 2.874a3 3 0 0 1-4.685 0ZM17 16a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H17Z","clip-rule":"evenodd"})],-1);function is(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock("div",null,[l.isArray?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.row[o.field],i=>(e.openBlock(),e.createElementBlock("div",{key:i.id,class:"m-1 d-inline-block"},[e.createElementVNode("a",{href:i.url,title:i.name,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[ns,e.createTextVNode(" Download ")],8,os)]))),128)):l.isObject?(e.openBlock(),e.createElementBlock("div",ls,[e.createElementVNode("a",{href:o.row[o.field].url,title:o.row[o.field].name,target:"_blank",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},[ss,e.createTextVNode(" Download ")],8,as)])):e.createCommentVNode("",!0)])}const ds=u(rs,[["render",is]]),cs={props:["field","row","tdProps"]},ms={key:0},hs=["innerHTML"];function fs(t,r,o,n,a,l){return o.row[o.field]?(e.openBlock(),e.createElementBlock("div",ms,[e.createElementVNode("div",{class:"w-full",innerHTML:o.row[o.field]},null,8,hs)])):e.createCommentVNode("",!0)}const gs=u(cs,[["render",fs]]),us={props:["field","row","tdProps"],computed:{entry(){const[t,r]=this.field.split(".");return e.markRaw({key:t,field:r})},isArray(){return Array.isArray(this.row[this.entry.key])},isObject(){return typeof this.row[this.entry.key]=="object"}}},ps={class:"flex flex-wrap gap-2"},_s={key:1,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded dark:bg-blue-900 dark:text-blue-300"};function ys(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock("div",ps,[l.isArray?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.row[l.entry.key],(i,s)=>(e.openBlock(),e.createElementBlock("span",{key:s,class:"px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded dark:bg-blue-900 dark:text-blue-300"},e.toDisplayString(i[l.entry.field]),1))),128)):l.isObject?(e.openBlock(),e.createElementBlock("span",_s,e.toDisplayString(o.row[l.entry.key][l.entry.field]),1)):e.createCommentVNode("",!0)])}const bs=u(us,[["render",ys]]),ks={props:["field","row","tdProps"]},xs={key:0},ws={class:"m-1 d-inline-block"},Es=["href","title"],Ns=["src","alt","title"];function Vs(t,r,o,n,a,l){return o.row[o.field]?(e.openBlock(),e.createElementBlock("div",xs,[e.createElementVNode("div",ws,[e.createElementVNode("a",{href:o.row[o.field].url,title:o.row[o.field].name,target:"_blank"},[e.createElementVNode("img",{src:o.row[o.field].thumbnail,alt:o.row[o.field].name,title:o.row[o.field].name},null,8,Ns)],8,Es)])])):e.createCommentVNode("",!0)}const Bs=u(ks,[["render",Vs],["__scopeId","data-v-3a28c02c"]]),Cs={props:["field","row","tdProps"],computed:{isActive(){return this.row[this.field]===1}}},Ss={class:"flex flex-wrap gap-2"},Ds={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},$s=e.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1),Os={key:1,class:"inline-flex items-center bg-red-100 text-red-800 text-xs font-medium px-2.5 py-0.5 rounded-full dark:bg-red-900 dark:text-red-300"},Ps=e.createElementVNode("span",{class:"w-2 h-2 bg-red-500 rounded-full me-1"},null,-1);function Ts(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock("div",Ss,[l.isActive?(e.openBlock(),e.createElementBlock("span",Ds,[$s,e.createTextVNode(" Active ")])):l.isActive?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",Os,[Ps,e.createTextVNode(" Inactive ")]))])}const Ms=u(Cs,[["render",Ts]]),js={props:["field","row","tdProps"],computed:{hasLabelColor(t){const r=this.tdProps.status_general_labels_color.find(o=>o.label===this.row[this.field]);return r?r.class:""}}},As={class:"flex flex-wrap gap-2"},Is={key:0,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-green-800 bg-green-100 rounded-full dark:bg-green-900 dark:text-green-300"},Ls=e.createElementVNode("span",{class:"w-2 h-2 bg-green-500 rounded-full me-1"},null,-1),Fs={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-red-800 bg-red-100 rounded-full dark:bg-red-900 dark:text-red-300"},zs=e.createElementVNode("span",{class:"w-2 h-2 bg-red-500 rounded-full me-1"},null,-1),Gs={key:2,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-yellow-800 bg-yellow-100 rounded-full dark:bg-gray-700 dark:text-yellow-300"},vs=e.createElementVNode("span",{class:"w-2 h-2 bg-yellow-500 rounded-full me-1"},null,-1),Rs={key:3,class:"inline-flex items-center px-2 py-1 text-xs font-medium text-blue-800 bg-blue-100 rounded-full dark:bg-gray-700 dark:text-blue-400"},Us=e.createElementVNode("span",{class:"w-2 h-2 bg-blue-500 rounded-full me-1"},null,-1);function qs(t,r,o,n,a,l){return e.openBlock(),e.createElementBlock("div",As,[l.hasLabelColor=="green"?(e.openBlock(),e.createElementBlock("span",Is,[Ls,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0),l.hasLabelColor=="red"?(e.openBlock(),e.createElementBlock("span",Fs,[zs,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0),l.hasLabelColor=="yellow"?(e.openBlock(),e.createElementBlock("span",Gs,[vs,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0),l.hasLabelColor=="default"?(e.openBlock(),e.createElementBlock("span",Rs,[Us,e.createTextVNode(" "+e.toDisplayString(this.row[this.field]),1)])):e.createCommentVNode("",!0)])}const Hs=u(js,[["render",qs]]),Zs={props:["isOpen","title","button_text"],methods:{confirmAction(){this.$emit("confirm-action")},cancelAction(){this.$emit("cancel-action")}}},Ks={key:0,class:"fixed inset-0 z-50 overflow-y-auto",role:"dialog","aria-modal":"true"},Ws={class:"flex items-end justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0"},Xs=e.createElementVNode("div",{class:"fixed inset-0 transition-opacity bg-gray-500 bg-opacity-75","aria-hidden":"true"},null,-1),Ys=e.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"​",-1),Js={class:"inline-block overflow-hidden text-left align-bottom transition-all transform bg-white rounded-lg shadow-xl sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"},Qs={class:"px-4 pt-5 pb-4 bg-white sm:p-6 sm:pb-4"},ei={class:"sm:flex sm:items-start"},ti={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},ri={class:"text-lg font-medium leading-6 text-gray-900"},oi={class:"mt-2"},ni={class:"px-4 py-3 bg-gray-50 sm:px-6 sm:flex sm:flex-row-reverse"};function li(t,r,o,n,a,l){return o.isOpen?(e.openBlock(),e.createElementBlock("div",Ks,[e.createElementVNode("div",Ws,[Xs,Ys,e.createElementVNode("div",Js,[e.createElementVNode("div",Qs,[e.createElementVNode("div",ei,[e.createElementVNode("div",ti,[e.createElementVNode("h3",ri,e.toDisplayString(o.title),1),e.createElementVNode("div",oi,[e.renderSlot(t.$slots,"default")])])])]),e.createElementVNode("div",ni,[e.createElementVNode("button",{onClick:r[0]||(r[0]=(...i)=>l.confirmAction&&l.confirmAction(...i)),type:"button",class:"inline-flex justify-center w-full px-4 py-2 text-base font-medium text-white bg-red-600 border border-transparent rounded-md shadow-sm hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"},e.toDisplayString(o.button_text),1),e.createElementVNode("button",{onClick:r[1]||(r[1]=(...i)=>l.cancelAction&&l.cancelAction(...i)),type:"button",class:"inline-flex justify-center w-full px-4 py-2 mt-3 text-base font-medium text-gray-700 bg-white border border-gray-300 rounded-md shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"}," Cancel ")])])])])):e.createCommentVNode("",!0)}const ai=u(Zs,[["render",li]]);h.GlButton=ar,h.GlCard=jt,h.GlConfirmationModal=ai,h.GlDataTable=ba,h.GlDataTableServerSide=Il,h.GlDatatableAction=za,h.GlDatatableDeleteAction=Za,h.GlDatatableFileDownload=ts,h.GlDatatableFiles=ds,h.GlDatatableHtml=gs,h.GlDatatableList=bs,h.GlDatatablePicture=Bs,h.GlDatatableStatus=Ms,h.GlDatatableStatusGeneral=Hs,h.GlDeleteConfirmationModal=C,h.GlDropdown=Zn,h.GlFilesUpload=_t,h.GlLanguageSelector=$t,h.GlModal=dn,h.GlMultiItemSlide=en,h.GlMultiSelectDropdown=rr,h.GlNotify=Nt,h.GlTab=so,h.GlTabsWrapper=oo,h.GlTailwindPagination=ae,h.GlTextInput=Zr,h.GlTextTranslate=Fr,h.GlTextarea=tl,h.GlTextareaTranslate=_r,h.GlTinymceTranslate=Sr,h.GlToast=L,h.GlToastList=$a,h.GlToggleBox=wn,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  },
21
21
  "private": false,
22
- "version": "1.0.35",
22
+ "version": "1.0.37",
23
23
  "scripts": {
24
24
  "dev": "vite",
25
25
  "build": "vite build",