magner
Version:
Universal admin panel magnetic to any backend
1,359 lines • 537 kB
JavaScript
var cd = Object.defineProperty;
var pd = (e, d, t) => d in e ? cd(e, d, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[d] = t;
var B1 = (e, d, t) => (pd(e, typeof d != "symbol" ? d + "" : d, t), t);
import { defineComponent as Y, defineAsyncComponent as fd, computed as K, resolveComponent as w, openBlock as f, createBlock as E, withCtx as T, createVNode as R, markRaw as md, resolveDynamicComponent as C1, createCommentVNode as z, createElementBlock as O, normalizeClass as r1, Suspense as Ne, createElementVNode as H, createApp as gd, ref as U, Fragment as e1, renderList as a1, createTextVNode as t1, toDisplayString as q, watch as S1, renderSlot as l1, normalizeProps as w1, guardReactiveProps as Z1, resolveDirective as J1, mergeProps as m1, withDirectives as G1, watchEffect as u1, onMounted as M1, createSlots as q1, onUpdated as hd, shallowRef as g1, nextTick as yd, withModifiers as re, reactive as R1, withKeys as vd, vShow as bd, createStaticVNode as Cd, normalizeStyle as wd, onUnmounted as _d } from "vue";
import kd, { ElMessageBox as ie, ElMessage as Sd, ElNotification as Ad } from "element-plus";
import { useStore as Id, createStore as Ld } from "vuex";
import { createRouter as Td, createWebHistory as Ed, useRoute as A1, useRouter as H1 } from "vue-router";
import { createI18n as Md, useI18n as Y1 } from "vue-i18n";
import Dd from "wretch";
import { create as Fe } from "maska";
import Od from "intl-tel-input";
const G = {}, Ve = Symbol(), Nd = () => Ld({
/**
* Store state. Has persistent data about user-chosen language,
* currency and additional information that could be shared between components.
*/
state() {
return {
project: {},
language: "",
user: null,
role: null,
mobileSidebarOpened: !1,
sidebarCollapsed: typeof window < "u" && G.lstorage.read("sidebarCollapsed") || !1,
modalData: null
};
},
mutations: {
setProject(e, d) {
e.project = d;
},
setLanguage(e, d) {
e.language = d, d ? G.lstorage.put("language", d) : G.lstorage.delete("language");
},
setUser(e, d) {
e.user = d;
},
setRole(e, d) {
e.role = d;
},
setMobileSidebarOpened(e, d) {
e.mobileSidebarOpened = d;
},
setSidebarCollapsed(e, d) {
e.sidebarCollapsed = d, d ? G.lstorage.put("sidebarCollapsed", d) : G.lstorage.delete("sidebarCollapsed");
},
setModalComponent(e, d) {
e.modalData = d;
}
},
actions: {
changeProject(e, d) {
e.commit("setProject", d);
},
changeLanguage(e, d) {
e.commit("setLanguage", d);
},
changeUser(e, d) {
e.commit("setUser", d);
},
changeRole(e, d) {
e.commit("setRole", d);
},
logout(e) {
e.commit("setUser", null), e.commit("setRole", null);
},
toggleMobileSidebarOpened(e, d) {
e.commit("setMobileSidebarOpened", !e.state.mobileSidebarOpened);
},
toggleSidebarCollapsed(e) {
e.commit("setSidebarCollapsed", !e.state.sidebarCollapsed);
},
changeModalComponent(e, d) {
e.commit("setModalComponent", d);
}
},
getters: {
isMultipleLanguages(e) {
var d;
return ((d = Object.keys(e.project.languages)) == null ? void 0 : d.length) > 1;
}
}
}), I1 = () => Id(Ve), Fd = Y({
name: "App",
components: {
MagnerModal: fd(() => import("./modal-Ds8zYCCC.mjs"))
},
setup() {
const e = I1();
return {
locale: K(() => {
var t;
return ((t = e.state.project.locales) == null ? void 0 : t[e.state.language]) || null;
})
};
}
}), X = (e, d) => {
const t = e.__vccOpts || e;
for (const [n, i] of d)
t[n] = i;
return t;
};
function Vd(e, d, t, n, i, s) {
const u = w("MagnerModal"), p = w("router-view"), m = w("el-config-provider");
return f(), E(m, { locale: e.locale }, {
default: T(() => [
R(u),
R(p)
]),
_: 1
}, 8, ["locale"]);
}
const Pd = /* @__PURE__ */ X(Fd, [["render", Vd]]), Bd = (e, d) => {
const t = e[d];
return t ? typeof t == "function" ? t() : Promise.resolve(t) : new Promise((n, i) => {
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(i.bind(null, new Error("Unknown variable dynamic import: " + d)));
});
}, Rd = Y({
name: "SvgImporter",
props: {
icon: {
type: [Function],
default: null
},
core: {
type: String,
default: null
}
},
async setup(e) {
var t;
let d;
try {
const n = e.core ? await Bd(/* @__PURE__ */ Object.assign({ "../../assets/icons/brand-light.svg": () => Promise.resolve().then(() => Ht), "../../assets/icons/chevron.svg": () => import("./chevron-DF751VcV.mjs"), "../../assets/icons/chevrons.svg": () => import("./chevrons-Bk7pgb5F.mjs"), "../../assets/icons/cloud.svg": () => import("./cloud-JYrJLgiE.mjs"), "../../assets/icons/export.svg": () => import("./export-DOTbTfPJ.mjs"), "../../assets/icons/file.svg": () => import("./file-DvtipZg0.mjs"), "../../assets/icons/filter.svg": () => Promise.resolve().then(() => c3), "../../assets/icons/globe.svg": () => Promise.resolve().then(() => Xt), "../../assets/icons/logo-light.svg": () => import("./logo-light-oxyIVG0n.mjs"), "../../assets/icons/menu.svg": () => import("./menu-B_2fQyJD.mjs"), "../../assets/icons/not-found.svg": () => import("./not-found-BTIcHT2L.mjs"), "../../assets/icons/plus.svg": () => Promise.resolve().then(() => z2), "../../assets/icons/question.svg": () => import("./question-Dpg7X33s.mjs"), "../../assets/icons/settings.svg": () => import("./settings-BpKUa1-_.mjs"), "../../assets/icons/share.svg": () => import("./share-CyVhXnXa.mjs"), "../../assets/icons/user.svg": () => Promise.resolve().then(() => Y3), "../../assets/icons/x.svg": () => Promise.resolve().then(() => J2) }), `../../assets/icons/${e.core}.svg`) : await ((t = e.icon) == null ? void 0 : t.call(e)) || null;
d = (n == null ? void 0 : n.default) || n;
} catch {
throw new Error("Couldn't load the icon!");
}
return {
node: d ? md(d) : null
};
}
});
function Ud(e, d, t, n, i, s) {
return e.node ? (f(), E(C1(e.node), { key: 0 })) : z("", !0);
}
const Pe = /* @__PURE__ */ X(Rd, [["render", Ud]]), jd = Y({
name: "SvgIcon",
components: {
SvgImporter: Pe
},
props: {
icon: {
type: Function,
default: null
},
name: {
type: String,
default: ""
},
size: {
type: String,
default: "md"
},
rotate: {
type: String,
default: "top"
},
core: {
type: String,
default: null
}
}
}), qd = /* @__PURE__ */ H("svg", null, null, -1);
function zd(e, d, t, n, i, s) {
const u = w("SvgImporter");
return f(), O("i", {
class: r1([[
e.core || e.name ? "icon-" + e.core || e.name : "",
"size-" + e.size,
"rotate-" + e.rotate
], "icon"])
}, [
(f(), E(Ne, null, {
default: T(() => [
R(u, {
icon: e.icon,
core: e.core
}, null, 8, ["icon", "core"])
]),
fallback: T(() => [
qd
]),
_: 1
}))
], 2);
}
const Be = /* @__PURE__ */ X(jd, [["render", zd]]), Gd = (e) => {
const d = () => {
const t = localStorage.getItem(e);
if (t)
try {
return JSON.parse(t);
} catch {
return {};
}
else
return localStorage.setItem(e, JSON.stringify({})), {};
};
return {
read: (t) => d()[t],
put: (t, n) => {
const i = d();
i[t] = n, localStorage.setItem(e, JSON.stringify(i));
},
delete: (t) => {
const n = d();
delete n[t], localStorage.setItem(e, JSON.stringify(n));
},
deepRead: (t, n) => {
var i;
return (i = d()[t]) == null ? void 0 : i[n];
},
deepPut: (t, n, i) => {
const s = d();
s[t] ? s[t] = { ...s[t], [n]: i } : s[t] = { [n]: i }, localStorage.setItem(e, JSON.stringify(s));
}
};
}, Hd = () => () => [Nd(), Ve], Kd = (e) => {
G.manifest = e.manifest(), G.lstorage = Gd(`magner-${G.manifest.short_name}`);
const d = Hd()();
G.store = d[0], G.appStore = e.appStore, G.development = e.development();
const t = e.i18n();
G.t = t.i18n.global.t, G.locales = t.config.elLocales, G.languages = t.config.languages, G.store.dispatch("changeLanguage", t.config.mainLanguage);
const n = e.routing();
G.router = n.router, G.routes = n.routing, G.store.dispatch("changeProject", G), gd(Pd).use(kd).component("SvgIcon", Be).use(...d).use(n.router).use(t.i18n).mount("#app");
}, E4 = (e) => () => e, M4 = (e) => () => e, Wd = async (e) => {
var s, u, p, m;
const d = G.store;
if (G.development.noBackendMode)
return !0;
const t = G.routes.global, n = G.development.profileRequest;
if (e) {
if (d.state.user)
return !!(d.state.role && (e === !0 || e.includes(d.state.role)));
const c = await n(null), g = (s = c.data) == null ? void 0 : s.role;
return c.error ? { name: t.homeNoAuthName } : (await d.dispatch("changeUser", (u = c.data) == null ? void 0 : u.user), await d.dispatch("changeRole", c.data.role), g && (e === !0 || e.includes(g)) ? !0 : { name: t.homeHasAuthName });
}
if (d.state.user)
return { name: t.homeHasAuthName };
const i = await n(null);
return i.error ? !0 : (await d.dispatch("changeRole", (p = i.data) == null ? void 0 : p.role), await d.dispatch("changeUser", (m = i.data) == null ? void 0 : m.user), { name: t.homeHasAuthName });
}, Zd = {
path: "/login",
name: "login",
component: () => Promise.resolve().then(() => i3)
}, Jd = {
path: "/table",
name: "table",
component: () => Promise.resolve().then(() => j3),
roles: !0
}, Yd = {
path: "/card/:id",
name: "card",
component: () => Promise.resolve().then(() => Ut),
roles: !0
}, Xd = {
path: "/:pathMatch(.*)*",
name: "error",
component: () => Promise.resolve().then(() => T2)
}, Te = {
login: Zd,
table: Jd,
404: Xd,
card: Yd
}, Re = (e) => e.map((d) => {
var n, i;
if (d.type === "layout") {
const s = Re(d.layout.routes);
let u;
return d.layout ? typeof d.layout.layout == "string" ? u = () => Promise.resolve().then(() => v4) : u = d.layout.layout : u = () => import("./empty-BVeii-CK.mjs"), {
path: d.layout.path,
name: d.layout.name,
component: u,
props: {
routes: s,
data: d.layout.props
},
children: s
};
}
let t;
if (d.type === "preset") {
if (!((n = d.preset) != null && n.preset))
throw new Error(`No preset type provided for the route with path "${((i = d.route) == null ? void 0 : i.path) || ""}"`);
if (!Te[d.preset.preset])
throw new Error(`Unsupported preset: ${d.preset.preset || ""}`);
t = {
...Te[d.preset.preset],
...d.route,
props: {
...d.route.props || {},
config: d.preset.config || {}
}
};
} else
t = { ...d.route };
if (!t.component)
throw new Error(`Component for the route with path "${t.path}" is not defined.`);
return t.meta = { roles: t.roles }, t.beforeEnter = Wd.bind(null, t.roles), t;
}).flat(), D4 = (e) => () => {
const d = Re(e.routes);
return {
router: Td({
history: Ed(e.global.suffixUrl),
routes: d
}),
routing: e
};
}, Qd = {
core: {
header: {
logout: "Чиқиш"
},
sidebar: {
collapse: "Бузиш"
},
messages: {
error: "Муаммо юзага келди.",
not_found_title: "Извините, такой страницы не существует",
not_found_disc: "Возможно, вы ошиблись в адресе или страница была удалена."
},
card: {
remove: "Ўчириш",
success_creation: "Яратиш муваффақиятли якунланди!",
success_edition: "Таҳрирлаш муваффақиятли амалга оширилди!",
success_removal: "Ўчириш муваффақиятли якунланди!",
attention: "Диққат!",
removal_confirm: 'Ушбу"{msg}"ни ўчириб ташламоқчимисиз?',
confirm_button_text: "Ҳа",
cancel_button_text: "Бекор қилиш",
add_more: "Қўшиш"
},
form: {
clear: "Тозалаш",
submit: "Тасдиқлаш",
remove: "Ўчириш",
cancel: "Бекор қилиш",
failed_action: "Ҳаракатни амалга оширишни иложи бўлмади.",
input_phone: {
without_mask: "Маскасиз"
},
select: {
check_all: "Барча танланг",
clear: "Тозалаш",
ok: "OK"
},
dropzone: {
drag_here: "Файлни шу ерга ташланг ёки",
click_upload: "юклаб олиш учун шу ерни босинг.",
wrong_format: "Файл нотўғри форматда {filename}",
wrong_size: "Файлнинг максимал ҳажми {мах} дан ошиб кетди. Максимал ҳажми:{мах}",
max_files: "Юкланган файлларнинг максимал сони: {мах}"
}
},
table: {
filters: "Фильтрлар",
more_filters: "Барча фильтрлар",
filters_applied: "Фильтрлар қўлланилди",
filters_submit: "Фильтрларни қўллаш",
rows_selected: "{cоунт} қатор танланди | {cоунт} қатор танланди | {cоунт} танланди строк",
remove: "Ўчириш",
filters_close: "Бекор қилиш"
},
validation: {
empty: "Майдон бўш бўла олмайди.",
email: "Электрон почта формати нотўғри",
password: "Парол 6 та белгидан кам бўлмаслиги керак"
},
modal: {
before_close: "Ҳақиқатан ҳам ойнани ёпмоқчимисиз?"
}
}
}, xd = {
core: {
header: {
logout: "Log out"
},
sidebar: {
collapse: "Collapse"
},
messages: {
error: "An error happened",
not_found_title: "Sorry, there is no such page",
not_found_disc: "You may have been wrong in the address or the page has been deleted."
},
card: {
remove: "Remove",
success_creation: "Created successfully!",
success_edition: "Edited successfully!",
success_removal: "Removed successfully!",
attention: "Attention!",
removal_confirm: 'Are you sure you want to delete "{msg}"?',
confirm_button_text: "Yes",
cancel_button_text: "Cancel",
add_more: "Add more"
},
form: {
clear: "Clear",
submit: "Submit",
remove: "Remove",
cancel: "Cancel",
failed_action: "Failed in performing the action",
input_phone: {
without_mask: "Without Mask"
},
select: {
check_all: "Select all",
clear: "Clear",
ok: "OK"
},
dropzone: {
drag_here: "Drag file here or",
click_upload: "click for upload",
wrong_format: "Wrong format for file {filename}",
wrong_size: "Maximal size exceeded for file {filename}. Max: {size} MB",
max_files: "Maximal files amount is {max}"
}
},
table: {
filters: "Filters",
more_filters: "All filters",
filters_applied: "Filters applied",
filters_submit: "Apply filters",
rows_selected: "One row selected | {count} rows selected",
remove: "Remove",
filters_close: "Close"
},
validation: {
empty: "This field cannot be empty",
email: "Wrong email format",
password: "Password cannot be shorter than 6 symbols"
},
modal: {
before_close: 'Are you sure you want to close this window?"'
}
}
}, e2 = (e) => {
const d = [2, 0, 1, 1, 1, 2];
return e % 100 > 4 && e % 100 < 20 ? 2 : d[e % 10 < 5 ? e % 10 : 5];
}, d2 = {
core: {
header: {
logout: "Выйти"
},
sidebar: {
collapse: "Свернуть"
},
messages: {
error: "Произошла ошибка",
not_found_title: "Извините, такой страницы не существует",
not_found_disc: "Возможно, вы ошиблись в адресе или страница была удалена."
},
card: {
remove: "Удалить",
success_creation: "Создание прошло успешно!",
success_edition: "Изменение прошло успешно!",
success_removal: "Удаление прошло успешно!",
attention: "Внимание!",
removal_confirm: 'Вы уверены, что хотите удалить "{msg}"?',
confirm_button_text: "Да",
cancel_button_text: "Отмена",
add_more: "Добавить"
},
form: {
clear: "Очистить",
submit: "Подтвердить",
remove: "Удалить",
cancel: "Отменить",
failed_action: "Не удалось выполнить действие",
input_phone: {
without_mask: "Без маски"
},
select: {
check_all: "Выбрать все",
clear: "Очистить",
ok: "OK"
},
dropzone: {
drag_here: "Перетащите файлы сюда или",
click_upload: "нажмите для загрузки",
wrong_format: "Неправильный формат файла {filename}",
wrong_size: "Превышен максимальный размер файла {filename}. Максимум: {size} МБ",
max_files: "Mаксимальное количество загружаемых файлов: {max}"
}
},
table: {
filters: "Фильтры",
more_filters: "Все фильтры",
filters_applied: "Применено фильтров",
filters_submit: "Применить фильтры",
rows_selected: "Выбрана {count} строка | Выбрано {count} строки | Выбрано {count} строк",
remove: "Удалить",
filters_close: "Закрыть"
},
validation: {
empty: "Поле не может быть пустым",
email: "Неверный формат емейл",
password: "Пароль не может быть короче 6 символов"
},
modal: {
before_close: "Вы уверены, что хотите закрыть окно?"
}
}
}, Ee = {
en: xd,
ru: d2,
uz: Qd
}, O4 = (e) => () => {
const d = Object.entries(e.translation).reduce((n, i) => {
const s = i[0], u = i[1];
if (!Ee[s])
throw new Error(`There is no core translation for the "${s}" language.
Please, create such translation in the src/core/controllers/i18n/ directory.`);
const p = Ee[s];
return n[s] = {
...p,
...u
}, n;
}, {});
return {
i18n: Md({
legacy: !1,
locale: typeof window < "u" && G.lstorage.read("language") || e.mainLanguage,
fallbackLocale: e.fallbackLanguage,
pluralRules: {
ru: e2
},
messages: d
}),
config: e
};
}, ne = (e, d) => ({
key: e,
params: d || null
}), f1 = (e, d) => e ? typeof e == "string" ? e : e.params ? d(e.key, e.params) : d(e.key) : "", o1 = () => {
const {
t: e,
d,
n: t,
locale: n
} = Y1();
return {
t: e,
d,
n: t,
locale: n,
customT: (i) => f1(i, e)
};
};
class ae extends Error {
constructor(t) {
super();
B1(this, "name");
Object.setPrototypeOf(this, new.target.prototype), this.name = f1(t, G.t);
}
}
const t2 = {
/** Special function. Works as a 'required' field and is disabled when
* editing the entity card (to allow PATCH method) */
empty: ({ rule: e, value: d }, t) => {
typeof d == "string" && d.trim() === "" || !d ? t(new ae(ne("core.validation.empty"))) : t();
},
password: ({ rule: e, value: d }, t) => {
d.length < 6 ? t(new ae(ne("core.validation.password"))) : t();
},
email: ({ rule: e, value: d }, t) => {
d.match(/[^@]+@[^.]+\..+/i) ? t() : t(new ae(ne("core.validation.email")));
}
}, N4 = (e) => ({
...t2,
...e
}), F4 = (e) => () => e, V4 = (e) => e, P4 = (e) => e, B4 = (e) => e, R4 = (e) => e, U4 = (e) => e, j4 = (e) => e, q4 = (e) => {
const d = e();
Kd(d);
}, Ue = (e) => e, z4 = Ue, G4 = Ue, je = async (e, d) => d({
data: e,
router: G.router,
lstorage: G.lstorage
}), H4 = (e) => new Promise(
(d, t) => {
G.store.dispatch("changeModalComponent", {
config: e,
handleSuccess: (n) => d(n),
handleFail: (n) => t(n)
});
}
), L1 = () => {
const e = U(!1), d = matchMedia("(max-width: 767px)");
return e.value = d.matches, d.addEventListener("change", (t) => {
e.value = t.matches;
}), e;
}, o2 = (e) => ie.confirm(
f1(e.message, G.t),
f1(e.title, G.t),
e
), K4 = (e) => ie.alert(
f1(e.message, G.t),
f1(e.title, G.t),
e
), W4 = (e) => ie.prompt(
f1(e.message, G.t),
f1(e.title, G.t),
e
), W1 = (e) => Sd({
message: f1(e.message, G.t),
type: e.type,
duration: e.duration,
onClose: e.onClose,
showClose: e.showClose,
center: e.textAlignCenter,
customClass: e.class,
dangerouslyUseHTMLString: e.stringIsHtml
}), Z4 = (e) => Ad({
message: f1(e.message, G.t),
title: f1(e.title, G.t),
type: e.type,
duration: e.duration,
onClose: e.onClose,
onClick: e.onClick,
showClose: e.showClose,
customClass: e.class,
iconClass: e.iconClass,
dangerouslyUseHTMLString: e.stringIsHtml
}), n2 = (e) => {
switch (e) {
case "string":
return "";
case "number":
return null;
case "boolean":
return !1;
case "array":
return [];
case "object":
return {};
case "date":
return null;
default:
return "";
}
}, z1 = (e) => {
const d = [];
return Array.isArray(e) ? d.push(...e.map((t) => z1(t)).flat()) : e.layout ? d.push(...z1(e.layout)) : e.fields && d.push(...e.fields), d;
}, a2 = (e) => {
try {
return JSON.parse(decodeURI((e == null ? void 0 : e.data) || ""));
} catch {
return null;
}
}, X1 = (e) => {
let d;
return Array.isArray(e) ? d = e : d = z1(e), d;
}, U1 = (e, d) => e.reduce((t, n) => {
if (n.type === "collection") {
const i = (d == null ? void 0 : d[n.name]) || [], s = i.length ?? (n.props.showFirst ? 1 : 0), u = z1(n.layout);
return t[n.name] = new Array(s).fill(0).map((p, m) => U1(
u,
(i == null ? void 0 : i[m]) || {}
)), t;
}
return t[n.name] = (d == null ? void 0 : d[n.name]) ?? n2(n.dataType || "string"), t;
}, {}), qe = (e, d) => Object.entries(e).reduce((t, n) => {
if (!(d != null && d.hasOwnProperty(n[0])))
return t;
const i = d[n[0]], s = n[1];
return typeof s != "object" && i !== s || Array.isArray(s) && (s.some((p, m) => {
const c = i == null ? void 0 : i[m];
if (p !== c)
return !0;
if (typeof p == "object" && typeof c == "object") {
const g = qe(p, c);
return !!Object.keys(g).length;
}
return !1;
}) || (s == null ? void 0 : s.length) !== (i == null ? void 0 : i.length)) ? (t[n[0]] = s, t) : (typeof s == "object" && s instanceof Date && (t[n[0]] = s), Array.isArray(i) && !Array.isArray(s) && (t[n[0]] = s), t);
}, {}), r2 = (e) => ({
hidden: K(() => Array.isArray(e) ? !1 : typeof e.props.hidden == "function" ? e.props.hidden() : e.props.hidden || !1)
}), i2 = (e, d, t) => {
e.props.inner || (e.props.inner = {}), typeof e.props.inner.hiddenCondition != "function" && typeof e.props.hidden == "function" && (e.props.inner.hiddenCondition = e.props.hidden);
const n = e.props.inner.hiddenCondition;
typeof n == "function" && (e.props.hidden = n.bind(null, {
state: d,
isNew: t || !1,
role: G.store.state.role
}));
}, ze = (e, d, t) => (i2(e, d, t), e.layout && e.layout.forEach((n) => {
ze(n, d, t);
}), e), l2 = (e, d, t) => {
let n;
return Array.isArray(e) ? n = e : n = ze(e, d, t), n;
}, $1 = (e, d) => {
const t = K(() => typeof e.props.disabled == "function" ? e.props.disabled(e.parent) : e.props.disabled || !1), n = K(() => typeof e.props.hidden == "function" ? e.props.hidden(e.parent) : e.props.hidden || !1), i = K(() => typeof e.props.readOnly == "function" ? e.props.readOnly(e.parent) : e.props.readOnly || !1), s = K(() => typeof e.props.changed == "function" ? e.props.changed(e.parent) : e.props.changed || !1), u = K(() => typeof e.props.hiddenCollectionAddButton == "function" ? e.props.hiddenCollectionAddButton(e.parent) : e.props.hiddenCollectionAddButton || !1), p = K(() => {
var m, c;
return i.value && e.props.readOnlyFormatter ? (c = (m = e.props).readOnlyFormatter) == null ? void 0 : c.call(m, d || null) : d || "";
});
return {
disabled: t,
hidden: n,
readOnly: i,
readOnlyText: p,
hiddenCollectionAddButton: u,
changed: s
};
}, Ge = (e, d, t, n) => {
e.props.inner || (e.props.inner = {}), typeof e.props.inner.disabledCondition != "function" && typeof e.props.disabled == "function" && (e.props.inner.disabledCondition = e.props.disabled);
const i = (n == null ? void 0 : n.disabled) ?? e.props.inner.disabledCondition;
typeof i == "function" && (e.props.disabled = i.bind(null, {
state: d,
isNew: t || !1,
role: G.store.state.role
})), typeof e.props.inner.hiddenCondition != "function" && typeof e.props.hidden == "function" && (e.props.inner.hiddenCondition = e.props.hidden);
const s = (n == null ? void 0 : n.hidden) ?? e.props.inner.hiddenCondition;
typeof s == "function" && (e.props.hidden = s.bind(null, {
state: d,
isNew: t || !1,
role: G.store.state.role
})), typeof e.props.inner.readOnlyCondition != "function" && typeof e.props.readOnly == "function" && (e.props.inner.readOnlyCondition = e.props.readOnly);
const u = (n == null ? void 0 : n.readOnly) ?? e.props.inner.readOnlyCondition;
typeof u == "function" && (e.props.readOnly = u.bind(null, {
state: d,
isNew: t || !1,
role: G.store.state.role
})), typeof e.props.inner.changedCondition != "function" && typeof e.props.changed == "function" && (e.props.inner.changedCondition = e.props.changed);
const p = (n == null ? void 0 : n.changed) ?? e.props.inner.changedCondition;
if (typeof p == "function" && (e.props.changed = p.bind(null, {
state: d,
isNew: t || !1,
role: G.store.state.role
})), e.type === "collection") {
typeof e.props.inner.hiddenCollectionAddButtonCondition != "function" && typeof e.props.hiddenCollectionAddButton == "function" && (e.props.inner.hiddenCollectionAddButtonCondition = e.props.hiddenCollectionAddButton);
const m = (n == null ? void 0 : n.hiddenCollectionAddButton) ?? e.props.inner.hiddenCollectionAddButtonCondition;
typeof m == "function" && (e.props.hiddenCollectionAddButton = m.bind(null, {
state: d,
isNew: t || !1,
role: G.store.state.role
})), X1(e).forEach((g) => Ge(g, d, t, {
readOnly: e.props.readOnly || void 0,
disabled: e.props.disabled || void 0,
hidden: e.props.hidden || void 0,
changed: e.props.changed || void 0,
hiddenCollectionAddButton: e.props.hiddenCollectionAddButton || void 0
}));
}
}, s2 = (e, d, t) => {
e.props.inner || (e.props.inner = {}), typeof e.props.inner.hiddenCondition != "function" && typeof e.props.hidden == "function" && (e.props.inner.hiddenCondition = e.props.hidden);
const n = e.props.inner.hiddenCondition;
typeof n == "function" && (e.props.hidden = n.bind(null, {
state: d,
isNew: t || !1,
role: G.store.state.role
}));
}, u2 = (e) => ({
hidden: K(() => typeof e.props.hidden == "function" ? e.props.hidden() : e.props.hidden || !1)
}), $2 = async (e) => ({ data: e }), c2 = async (e, d) => {
var t;
if (d && d(e), e != null && e.response && e.text)
try {
const n = await JSON.parse(e.text);
return { error: new le({ status: ((t = e.response) == null ? void 0 : t.status) ?? 500, data: n }) };
} catch {
return { error: new Error(e.text) };
}
return { error: new Error(e.message) };
}, Me = async (e, d) => d.json($2).catch((t) => c2(t, e.interceptError)), p2 = (e) => {
const d = Dd(e.baseUrl || "", e.fetchOptions || {}), t = (i) => (s, u = {}) => Me(e, i(s, u)), n = (i) => (s, u, p = {}) => Me(e, i(s, u, p));
return {
instance: d,
get: t((i, s) => d.url(i).get(s)),
post: n((i, s, u) => d.url(i).post(s, u)),
put: n((i, s, u) => d.url(i).put(s, u)),
patch: n((i, s, u) => d.url(i).patch(s, u)),
delete: t((i, s) => d.url(i).delete(s)),
head: t((i, s) => d.url(i).head(s)),
opts: t((i, s) => d.url(i).opts(s))
};
}, J4 = (e) => {
const d = p2(e), t = (u) => async (p) => u({
api: d,
urlToData: e.urlToData,
dataToUrl: e.dataToUrl,
parseError: e.parseError || ((m) => ({ message: m.name, fields: {} })),
router: G.router,
lstorage: G.lstorage,
appStore: G.appStore,
data: p
});
return {
api: d,
custom: t,
card: t,
table: t,
profile: t
};
};
class le extends Error {
constructor(t) {
super();
B1(this, "name");
B1(this, "status");
B1(this, "data");
Object.setPrototypeOf(this, new.target.prototype), Error.captureStackTrace && Error.captureStackTrace(this, le), this.name = "ApiError", this.status = t.status, this.data = t.data;
}
}
const f2 = Y({
name: "PageHeaderActions",
props: {
actions: {
type: Array,
default: () => []
},
size: {
type: String,
default: "default"
},
requestData: {
type: Object,
default: () => ({})
}
},
emits: ["action"],
setup(e, d) {
const { t, customT: n } = o1(), i = A1(), s = {
cancel: t("core.form.cancel"),
clear: t("core.form.clear"),
remove: t("core.form.remove"),
submit: t("core.form.submit")
};
return {
getTranslation: (c) => c.type === "action" && !c.props.text ? s[c.emits] : n(c.props.text || ""),
getLink: (c) => typeof c == "function" ? c(i) : c,
act: async (c) => {
if (c.action) {
const g = await je(e.requestData, c.action);
if (g || g === "") {
W1({
type: "error",
message: typeof g != "boolean" ? n(g) : t("core.form.failed_action")
});
return;
}
}
d.emit("action", c);
}
};
}
}), m2 = { class: "generic-form_actions" };
function g2(e, d, t, n, i, s) {
const u = w("el-button"), p = w("router-link");
return f(), O("div", m2, [
(f(!0), O(e1, null, a1(e.actions, (m, c) => (f(), O(e1, { key: c }, [
m.type === "link" ? (f(), E(p, {
key: 0,
to: e.getLink(m.to),
class: "generic-form_actions_link"
}, {
default: T(() => [
R(u, {
size: e.size,
loading: m.loading,
type: m.props.type || "default",
"native-type": m.props.nativeType || "button",
class: r1([m.props.class || "", "width-full"]),
plain: m.props.plain,
icon: m.props.icon
}, {
default: T(() => [
t1(q(e.getTranslation(m)), 1)
]),
_: 2
}, 1032, ["size", "loading", "type", "native-type", "class", "plain", "icon"])
]),
_: 2
}, 1032, ["to"])) : (f(), E(u, {
key: 1,
size: e.size,
loading: m.loading,
type: m.props.type || "default",
"native-type": m.props.nativeType || "button",
plain: m.props.plain,
icon: m.props.icon,
class: r1(["generic-form_actions_action", m.props.class || "", "width-full"]),
onClick: (g) => e.act(m)
}, {
default: T(() => [
t1(q(e.getTranslation(m)), 1)
]),
_: 2
}, 1032, ["size", "loading", "type", "native-type", "plain", "icon", "class", "onClick"]))
], 64))), 128))
]);
}
const h2 = /* @__PURE__ */ X(f2, [["render", g2]]), y2 = Y({
name: "PageHeader",
components: {
PageHeaderActions: h2
},
props: {
header: {
type: Object,
required: !0
},
isNew: {
type: Boolean,
default: !1
},
requestData: {
type: Object,
default: () => ({})
}
},
emits: ["action"],
setup(e, d) {
const { customT: t } = o1(), n = A1(), i = K(() => {
var c, g, v;
return {
tabs: ((c = e.header.tabs) == null ? void 0 : c.map((C, P) => ({ ...C, index: P.toString() })).filter((C) => !e.isNew || e.isNew && !C.hideIfNew)) || [],
activeIndex: ((v = (g = e.header.tabs) == null ? void 0 : g.findIndex((C) => C.active)) == null ? void 0 : v.toString()) || -1
};
}), s = K(() => e.isNew && e.header.newTitle ? t(e.header.newTitle) : e.header.title ? t(e.header.title) : ""), u = K(() => e.header.tag), p = K(() => s.value || i.value.tabs.length || u.value);
return {
customT: t,
emitAction: (c) => d.emit("action", c),
hasPageHeader: p,
route: n,
tabs: i,
title: s,
tag: u
};
}
}), v2 = {
key: 0,
class: "magner-page-header"
}, b2 = { class: "magner-page-header_title-container" }, C2 = { class: "magner-page-header_title" }, w2 = { key: 1 };
function _2(e, d, t, n, i, s) {
var v;
const u = w("el-tag"), p = w("router-link"), m = w("el-tab-pane"), c = w("el-tabs"), g = w("PageHeaderActions");
return e.hasPageHeader ? (f(), O("div", v2, [
H("div", b2, [
H("h1", C2, q(e.title), 1),
e.tag && e.requestData[e.tag.name] ? (f(), E(u, {
key: 0,
class: "magner-page-header_tag",
type: e.tag.props.type ?? "",
size: e.tag.props.size ?? "default",
effect: e.tag.props.effect ?? "light",
round: e.tag.props.round ?? !1
}, {
default: T(() => [
t1(q(e.requestData[e.tag.name]), 1)
]),
_: 1
}, 8, ["type", "size", "effect", "round"])) : z("", !0)
]),
e.header.tabs && e.tabs.tabs.length ? (f(), E(c, {
key: 0,
"model-value": e.tabs.activeIndex,
type: "card",
class: "magner-page-header_tabs"
}, {
default: T(() => [
(f(!0), O(e1, null, a1(e.tabs.tabs, (C) => (f(), E(m, {
key: C.index,
name: C.index
}, {
label: T(() => [
C.active ? (f(), O("span", w2, q(e.customT(C.label)), 1)) : (f(), E(p, {
key: 0,
to: typeof C.link == "function" ? C.link(e.route) : C.link
}, {
default: T(() => [
t1(q(e.customT(C.label)), 1)
]),
_: 2
}, 1032, ["to"]))
]),
_: 2
}, 1032, ["name"]))), 128))
]),
_: 1
}, 8, ["model-value"])) : z("", !0),
(v = e.header.actions) != null && v.length ? (f(), E(g, {
key: 1,
actions: e.header.actions,
"request-data": e.requestData,
onAction: e.emitAction
}, null, 8, ["actions", "request-data", "onAction"])) : z("", !0)
])) : z("", !0);
}
const He = /* @__PURE__ */ X(y2, [["render", _2]]), k2 = Y({
name: "ErrorPage",
components: { SvgImporter: Pe },
setup() {
const { t: e } = o1();
return {
t: e
};
}
}), S2 = { class: "magner-not-found" }, A2 = { class: "magner-not-found_icon" }, I2 = { class: "magner-not-found_message" };
function L2(e, d, t, n, i, s) {
const u = w("svg-importer");
return f(), O("div", S2, [
H("div", A2, [
R(u, { icon: () => import("./not-found-BTIcHT2L.mjs") }, null, 8, ["icon"])
]),
H("div", I2, [
H("h1", null, q(e.t("core.messages.not_found_title")), 1),
H("p", null, q(e.t("core.messages.not_found_disc")), 1)
])
]);
}
const Ke = /* @__PURE__ */ X(k2, [["render", L2]]), T2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
default: Ke
}, Symbol.toStringTag, { value: "Module" })), E2 = Y({
name: "RequestHandler",
props: {
request: {
type: Function,
required: !0
},
data: {
type: [Object, Number, String],
default: () => ({})
},
disabled: {
type: Boolean,
default: !1
}
},
emits: ["loading", "error"],
async setup(e, d) {
const t = U(""), n = U(), i = U(!1), s = U(!1);
let u = null;
const p = (c) => {
i.value = c, d.emit("loading", c);
}, m = async (c) => {
if (e.disabled)
return;
p(!0);
const g = await e.request(c || e.data);
p(!1), s.value = !0, n.value = g.data, g.error && (t.value = g.error, d.emit("error", g.error));
};
return S1(() => e.data, (c) => {
u && clearTimeout(u), u = setTimeout(() => {
m(c);
}, 1e3);
}, { deep: !0 }), await m(), {
response: n,
error: t,
loading: i,
makeRequest: m
};
}
});
function M2(e, d, t, n, i, s) {
return l1(e.$slots, "default", w1(Z1({ error: e.error, response: e.response, loading: e.loading })));
}
const D2 = /* @__PURE__ */ X(E2, [["render", M2]]), O2 = Y({
name: "Dynamic",
components: { ErrorPage: Ke, RequestHandler: D2 },
props: {
request: {
type: Function,
required: !0
},
data: {
type: [Object, Number, String],
default: () => ({})
},
disabled: {
type: Boolean,
default: !1
}
},
emits: ["error"],
setup(e, d) {
const t = U(), { customT: n, t: i } = o1();
return {
reqHandler: t,
makeRequest: () => {
var p, m;
(m = (p = t.value).makeRequest) == null || m.call(p);
},
emitError: (p) => {
d.emit("error", p);
},
customT: n,
t: i
};
}
}), N2 = { class: "loading" };
function F2(e, d, t, n, i, s) {
const u = w("error-page"), p = w("RequestHandler"), m = J1("loading");
return f(), E(Ne, null, {
default: T(() => [
R(p, {
ref: "reqHandler",
request: e.request,
data: e.data,
disabled: e.disabled,
onError: e.emitError
}, {
default: T(({ response: c, error: g, loading: v }) => [
g ? l1(e.$slots, "error", {
key: 0,
error: g
}, () => [
R(u)
]) : l1(e.$slots, "default", w1(m1({ key: 1 }, { response: c, loading: v })))
]),
_: 3
}, 8, ["request", "data", "disabled", "onError"])
]),
fallback: T(() => [
G1(H("div", N2, null, 512), [
[m, !0]
])
]),
_: 3
});
}
const We = /* @__PURE__ */ X(O2, [["render", F2]]), Ze = () => {
setTimeout(() => {
var d;
const e = document.querySelector(".is-error");
if (e) {
const t = document.querySelector(".js-main-layout"), n = document.querySelector(".js-header").offsetHeight, i = (t == null ? void 0 : t.scrollTop) ?? 0, s = ((d = e.getBoundingClientRect()) == null ? void 0 : d.top) ?? 0;
t.scrollTo({
top: i + s - n,
behavior: "smooth"
});
}
}, 100);
}, V2 = (e, d, t) => {
if (!e.validation || !d || d === !0)
return null;
const n = (Array.isArray(e.validation) ? e.validation : [e.validation]).filter((i) => !d.includes(i.type));
return n.length ? n.map((i) => ({
type: e.dataType || "string",
trigger: i.trigger,
validator: (s, u, p) => G.development.validation[i.type]({
rule: s,
value: u,
form: t
}, p)
})) : null;
}, P2 = V2, B2 = {
xmlns: "http://www.w3.org/2000/svg",
width: "24",
height: "24",
viewBox: "0 0 24 24",
fill: "none",
stroke: "currentColor",
"stroke-width": "2",
"stroke-linecap": "round",
"stroke-linejoin": "round",
class: "feather feather-plus"
}, R2 = /* @__PURE__ */ H("line", {
x1: "12",
y1: "5",
x2: "12",
y2: "19"
}, null, -1), U2 = /* @__PURE__ */ H("line", {
x1: "5",
y1: "12",
x2: "19",
y2: "12"
}, null, -1), j2 = [
R2,
U2
];
function q2(e, d) {
return f(), O("svg", B2, [...j2]);
}
const se = { render: q2 }, z2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
default: se
}, Symbol.toStringTag, { value: "Module" })), G2 = {
xmlns: "http://www.w3.org/2000/svg",
width: "24",
height: "24",
viewBox: "0 0 24 24",
fill: "none",
stroke: "currentColor",
"stroke-width": "2",
"stroke-linecap": "round",
"stroke-linejoin": "round",
class: "feather feather-x"
}, H2 = /* @__PURE__ */ H("line", {
x1: "18",
y1: "6",
x2: "6",
y2: "18"
}, null, -1), K2 = /* @__PURE__ */ H("line", {
x1: "6",
y1: "6",
x2: "18",
y2: "18"
}, null, -1), W2 = [
H2,
K2
];
function Z2(e, d) {
return f(), O("svg", G2, [...W2]);
}
const Q1 = { render: Z2 }, J2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
default: Q1
}, Symbol.toStringTag, { value: "Module" })), Y2 = (e, d, t) => {
let n;
return (i) => {
if (d.value = i, typeof e > "u") {
t(i);
return;
}
n && clearTimeout(n), n = setTimeout(() => {
t(i);
}, e);
};
}, ue = Y2, X2 = Y({
name: "ReadonlyWrap",
props: {
field: {
type: Object,
required: !0
},
value: {
type: [String, Number, Object, Array, Boolean],
default: ""
},
grayBlock: {
type: Boolean,
default: !1
}
},
emits: ["blur"],
setup: (e) => {
const { readOnly: d, readOnlyText: t } = $1(e.field, e.value);
return {
readOnly: d,
readOnlyText: t
};
}
});
function Q2(e, d, t, n, i, s) {
return e.readOnly ? l1(e.$slots, "readonly", w1(m1({ key: 1 }, { text: e.readOnlyText })), () => [
H("div", {
class: r1([{ "gray-block": e.grayBlock }, "readonly-block"])
}, q(e.readOnlyText), 3)
]) : l1(e.$slots, "default", { key: 0 });
}
const v1 = /* @__PURE__ */ X(X2, [["render", Q2]]), x2 = Y({
name: "FormInput",
components: { ReadonlyWrap: v1 },
props: {
field: {
type: Object,
required: !0
},
modelValue: {
type: [String, Number],
default: ""
}
},
emits: ["update:modelValue", "blur"],
setup(e, d) {
const t = U(e.modelValue), n = U(), { customT: i } = o1(), { disabled: s } = $1(e.field);
u1(() => {
t.value = e.modelValue;
});
const u = ue(e.field.props.inputDelay || 0, t, (p) => {
d.emit("update:modelValue", p);
});
return M1(() => {
var m;
const p = (m = n.value) == null ? void 0 : m.input;
e.field.props.mask && p && Fe(p, e.field.props.mask);
}), {
customT: i,
val: t,
disabled: s,
input: n,
changeVal: u
};
}
}), e0 = { class: "generic-form_icon" }, d0 = { class: "generic-form_icon" };
function t0(e, d, t, n, i, s) {
const u = w("svg-icon"), p = w("el-input"), m = w("ReadonlyWrap");
return f(), E(m, {
field: e.field,
value: e.val,
"gray-block": ""
}, {
default: T(() => [
R(p, {
ref: "input",
"model-value": e.val,
name: e.field.name,
placeholder: e.customT(e.field.props.placeholder),
type: e.field.props.type || "text",
maxlength: e.field.props.maxLength,
minlength: e.field.props.minLength,
"show-word-limit": e.field.props.showLetterLimit,
clearable: e.field.props.clearable,
autofocus: e.field.props.autofocus,
autocomplete: e.field.props.autocomplete,
disabled: e.disabled,
"validate-event": !1,
onBlur: d[0] || (d[0] = (c) => e.$emit("blur", c)),
onInput: e.changeVal
}, q1({ _: 2 }, [
e.field.props.prefixIcon ? {
name: "prefix",
fn: T(() => [
H("div", e0, [
R(u, {
icon: e.field.props.prefixIcon,
size: "sm"
}, null, 8, ["icon"])
])
]),
key: "0"
} : void 0,
e.field.props.suffixIcon ? {
name: "suffix",
fn: T(() => [
H("div", d0, [
R(u, {
icon: e.field.props.suffixIcon,
size: "sm"
}, null, 8, ["icon"])
])
]),
key: "1"
} : void 0
]), 1032, ["model-value", "name", "placeholder", "type", "maxlength", "minlength", "show-word-limit", "clearable", "autofocus", "autocomplete", "disabled", "onInput"])
]),
_: 1
}, 8, ["field", "value"]);
}
const o0 = /* @__PURE__ */ X(x2, [["render", t0]]);
var n0 = { exports: {} };
(function(e) {
(function(d) {
e.exports ? e.exports = d() : window.intlTelInput = d();
})(function(d) {
return function() {
for (var t = [["Afghanistan (افغانستان)", "af", "93"], ["Albania (Shqipëri)", "al", "355"], ["Algeria (الجزائر)", "dz", "213"], ["American Samoa", "as", "1", 5, ["684"]], ["Andorra", "ad", "376"], ["Angola", "ao", "244"], ["Anguilla", "ai", "1", 6, ["264"]], ["Antigua and Barbuda", "ag", "1", 7, ["268"]], ["Argentina", "ar", "54"], ["Armenia (Հայաստան)", "am", "374"], ["Aruba", "aw", "297"], ["Australia", "au", "61", 0], ["Austria (Österreich)", "at", "43"], ["Azerbaijan (Azərbaycan)", "az", "994"], ["Bahamas", "bs", "1", 8, ["242"]], ["Bahrain (البحرين)", "bh", "973"], ["Bangladesh (বাংলাদেশ)", "bd", "880"], ["Barbados", "bb", "1", 9, ["246"]], ["Belarus (Беларусь)", "by", "375"], ["Belgium (België)", "be", "32"], ["Belize", "bz", "501"], ["Benin (Bénin)", "bj", "229"], ["Bermuda", "bm", "1", 10, ["441"]], ["Bhutan (འབྲུག)", "bt", "975"], ["Bolivia", "bo", "591"], ["Bosnia and Herzegovina (Босна и Херцеговина)", "ba", "387"], ["Botswana", "bw", "267"], ["Brazil (Brasil)", "br", "55"], ["British Indian Ocean Territory", "io", "246"], ["British Virgin Islands", "vg", "1", 11, ["284"]], ["Brunei", "bn", "673"], ["Bulgaria (България)", "bg", "359"], ["Burkina Faso", "bf", "226"], ["Burundi (Uburundi)", "bi", "257"], ["Cambodia (កម្ពុជា)", "kh", "855"], ["Cameroon (Cameroun)", "cm", "237"], ["Canada", "ca", "1", 1, ["204", "226", "236", "249", "250", "289", "306", "343", "365", "387", "403", "416", "418", "431", "437", "438", "450", "506", "514", "519", "548", "579", "581", "587", "604", "613", "639", "647", "672", "705", "709", "742", "778", "780", "782", "807", "819", "825", "867", "873", "902", "905"]], ["Cape Verde (Kabu Verdi)", "cv", "238"], ["Caribbean Netherlands", "bq", "599", 1, ["3", "4", "7"]], ["Cayman Islands", "ky", "1", 12, ["345"]], ["Central African Republic (République centrafricaine)", "cf", "236"], ["Chad (Tchad)", "td", "235"], ["Chile", "cl", "56"], ["China (中国)", "cn", "86"], ["Christmas Island", "cx", "61", 2, ["89164"]], ["Cocos (Keeling) Islands", "cc", "61", 1, ["89162"]], ["Colombia", "co", "57"], ["Comoros (جزر القمر)", "km", "269"], ["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)", "cd", "243"], ["Congo (Republic) (Congo-Brazzaville)", "cg", "242"], ["Cook Islands", "ck", "682"], ["Costa Rica", "cr", "506"], ["Côte d’Ivoire", "ci", "225"], ["Croatia (Hrvatska)", "hr", "385"], ["Cuba", "cu", "53"], ["Curaçao", "cw", "599", 0], ["Cyprus (Κύπρος)", "cy", "357"], ["Czech Republic (Česká republika)", "cz", "420"], ["Denmark (Danmark)", "dk", "45"], ["Djibouti", "dj", "253"], ["Dominica", "dm", "1", 13, ["767"]], ["Dominican Republic (República Dominicana)", "do", "1", 2, ["809", "829", "849"]], ["Ecuador", "ec", "593"], ["Egypt (مصر)", "eg", "20"], ["El Salvador", "sv", "503"], ["Equatorial Guinea (Guinea Ecuatorial)", "gq", "240"], ["Eritrea", "er", "291"], ["Estonia (Eesti)", "ee", "372"], ["Ethiopia", "et", "251"], ["Falkland Islands (Islas Malvinas)", "fk", "500"], ["Faroe Islands (Føroyar)", "fo", "298"], ["Fiji", "fj", "679"], ["Finland (Suomi)", "fi", "358", 0], ["France", "fr", "33"], ["French Guiana (Guyane française)", "gf", "594"], ["French Polynesia (Polynésie française)", "pf", "689"], ["Gabon", "ga", "241"], ["Gambia", "gm", "220"], ["Georgia (საქართველო)", "ge", "995"], ["Germany (Deutschland)", "de", "49"], ["Ghana (Gaana)", "gh", "233"], ["Gibraltar", "gi", "350"], ["Greece (Ελλάδα)", "gr", "30"], ["Greenland (Kalaallit Nunaat)", "gl", "299"], ["Grenada", "gd", "1", 14, ["473"]], ["Guadeloupe", "gp", "590", 0], ["Guam", "gu", "1", 15, ["671"]], ["Guatemala", "gt", "502"], ["Guernsey", "gg", "44", 1, ["1481", "7781", "7839", "7911"]], ["Guinea (Guinée)", "gn", "224"], ["Guinea-Bissau (Guiné Bissau)", "gw", "245"], ["Guyana", "gy", "592"], ["Haiti", "ht", "509"], ["Honduras", "hn", "504"], ["Hong Kong (香港)", "hk", "852"], ["Hungary (Magyarország)", "hu", "36"], ["Iceland (Ísland)", "is", "354"], ["India (भारत)", "in", "91"], ["Indonesia", "id", "62"], ["Iran (ایران)", "ir", "98"], ["Iraq (العراق)", "iq", "964"], ["Ireland", "ie", "353"], ["Isle of Man", "im", "44", 2, ["1624", "74576", "7524", "7924", "7624"]], ["Israel (ישראל)", "il", "972"], ["Italy (Italia)", "it", "39", 0], ["Jamaica", "jm", "1", 4, ["876", "658"]], ["Japan (日本)", "jp", "81"], ["Jersey", "je", "44", 3, ["1534", "7509", "7700", "7797", "7829", "7937"]], ["Jordan (الأردن)", "jo", "962"], ["Kazakhstan (Казахстан)", "kz", "7", 1, ["33", "7"]], ["Kenya", "ke", "254"], ["Kiribati", "ki", "686"], ["Kosovo", "xk", "383"], ["Kuwait (الكويت)", "kw", "965"], ["Kyrgyzstan (Кыргызстан)", "kg", "996"], ["Laos (ລາວ)", "la", "856"], ["Latvia (Latvija)", "lv", "371"], ["Lebanon (لبنان)", "lb", "961"], ["Lesotho", "ls", "266"], ["Liberia", "lr", "231"], ["Libya (ليبيا)", "ly", "218"], ["Liechtenstein", "li", "423"], ["Lithuania (Lietuva)", "lt", "370"], ["Luxembourg", "lu", "352"], ["Macau (澳門)", "mo", "853"], ["Macedonia (FYROM) (Македонија)", "mk", "389"], ["Madagascar (Madagasikara)", "mg", "261"], ["Malawi", "mw", "265"], ["Malaysia", "my", "60"], ["Maldives", "mv", "960"], ["Mali", "ml", "223"], ["Malta", "mt", "356"], ["Marshall Islands", "mh", "692"], ["Martinique", "mq", "596"], ["Mauritania (موريتانيا)", "mr", "222"], ["Mauritius (Moris)", "mu", "230"], ["Mayotte", "yt", "262", 1, ["269", "639"]], ["Mexico (México)", "mx", "52"], ["Micronesia", "fm", "691"], ["Moldova (Republica Moldova)", "md", "373"], ["Monaco", "mc", "377"], ["Mongolia (Монгол)", "mn", "976"], ["Montenegro (Crna Gora)", "me", "382"], ["Montserrat", "ms", "1", 16, ["664"]], ["Morocco (المغرب)", "ma", "212", 0], ["Mozambique (Moçambique)", "mz", "258"], ["Myanmar (Burma) (မြန်မာ)", "mm", "95"], ["Namibia (Namibië)", "na", "264"], ["Nauru", "nr", "674"], ["Nepal (नेपाल)", "np", "977"], ["Netherlands (Nederland)", "nl", "31"], ["New Caledonia (Nouvelle-Calédonie)", "nc", "687"], ["New Zealand", "nz", "64"], ["Nicaragua", "ni", "505"], ["Niger (Nijar)", "ne", "227"], ["Nigeria", "ng", "234"], ["Niue", "nu", "683"], ["Norfolk Island", "nf", "672"], ["North Korea (조선 민주주의 인민 공화국)", "kp", "850"], ["Northern Mariana Islands", "mp", "1", 17, ["670"]], ["Norway (Norge)", "no", "47", 0], ["Oman (عُمان)", "om", "968"], ["Pakistan (پاکستان)", "pk", "92"], ["Palau", "pw", "680"], ["Palestine (فلسطين)", "ps", "970"], ["Panama (Panamá)", "pa", "507"], ["Papua New Guinea", "pg", "675"], ["Paraguay", "py", "595"], ["Peru (Perú)", "pe", "51"], ["Philippines", "ph", "63"], ["Poland (Polska)", "pl", "48"], ["Portugal", "pt", "351"], ["Puerto Rico", "pr",