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B,OAC9F6E,EAAsB7E,EAAoBQ,EAAEqE,E","sources":["webpack:///webpack/runtime/chunk loaded","webpack:///webpack/runtime/load script","webpack:///./src/main/webapp/assets/composables/useTextHelpers.ts","webpack:///./src/main/webapp/assets/modules/help.ts","webpack:///./src/main/webapp/assets/modules/injected-js-handlers/buildInfo.ts","webpack:///./src/main/webapp/assets/modules/injected-js-handlers/reseller-user.ts","webpack:///./src/main/webapp/assets/modules/injected-js-handlers/reseller.ts","webpack:///./src/main/webapp/assets/modules/libs/datatablequery.ts","webpack:///./src/main/webapp/assets/modules/libs/querybuilder.ts","webpack:///./src/main/webapp/assets/modules/managers/session.ts","webpack:///./src/main/webapp/assets/modules/managers/stats.ts","webpack:///./src/main/webapp/assets/modules/managers/tenant-template.ts","webpack:///./src/main/webapp/assets/modules/managers/tenant.ts","webpack:///./src/main/webapp/assets/modules/tenant-edit-dialog/assistant-utils.ts","webpack:///./src/main/webapp/assets/modules/tenant-edit-dialog/sales-flow-utils.ts","webpack:///./src/main/webapp/assets/modules/tenant-edit-dialog/tenant-edit-dialog-utils.ts","webpack:///./src/main/webapp/assets/modules/tenant-edit-dialog/types.ts","webpack:///./src/main/webapp/assets/modules/utils/country.ts","webpack:///./src/main/webapp/assets/modules/utils/debounce.ts","webpack:///./src/main/webapp/assets/modules/utils/language.ts","webpack:///./src/main/webapp/assets/modules/utils/localehelpers.ts","webpack:///./src/main/webapp/assets/modules/utils/locales.ts","webpack:///./src/main/webapp/assets/modules/utils/sort-options.ts","webpack:///./src/main/webapp/assets/modules/utils/util.ts","webpack:///./src/main/webapp/assets/modules/utils/validators.ts","webpack:///./src/main/webapp/assets/modules/utils/vuehelper.ts","webpack:///./src/main/webapp/assets/plugins/pinia.ts","webpack:///./src/main/webapp/assets/plugins/store/index.ts","webpack:///./src/main/webapp/assets/plugins/store/localestore.ts","webpack:///./src/main/webapp/assets/modules/index.ts","webpack:///./src/main/webapp/templates-hidden/liftwrapper.ts","webpack:///./src/main/webapp/types/badge.ts","webpack:///./src/main/webapp/types/oldtypes.ts","webpack:///./src/main/webapp/types/theme.ts","webpack:///./src/main/webapp/types/whitelabel.ts","webpack:///./src/main/webapp/types/authtype.ts","webpack:///./src/main/webapp/types/interval.ts","webpack:///./target/scala-2.13/classes/ts/com.nodefactory.diehard.ui.assistants.AssistantDefinition.ts","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/ensure chunk","webpack:///webpack/runtime/get javascript chunk filename","webpack:///webpack/runtime/getFullHash","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///webpack/runtime/node module decorator","webpack:///webpack/runtime/publicPath","webpack:///webpack/runtime/jsonp chunk loading","webpack:///webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\n// data-webpack is not used as build has no uniqueName\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","import Util from \"@/modules/utils/util\"\nimport Country from \"@/modules/utils/country\"\nimport Locale from \"@/modules/utils/locales\"\nimport { __ } from \"@/modules/utils/localehelpers\"\n\nexport function useTextHelpers() {\n  return {\n    _(val: string): string {\n      return Locale.translate(val)\n    },\n\n    translate(val: string): string {\n      return Locale.translate(val)\n    },\n\n    translateWithArgs(val: string, args: string[]): string {\n      return __(val, args)\n    },\n\n    isSet(val: any): boolean {\n      return Util.isSet(val)\n    },\n\n    capitalize(v: string): string {\n      return Locale.capitalize(v)\n    },\n\n    isEmptyObject(obj: any): boolean {\n      return Util.isEmptyObject(obj)\n    },\n\n    notEmptyObject(obj: any): boolean {\n      return Util.notEmptyObject(obj)\n    },\n\n    isNonEmptyArray(arr: any): boolean {\n      return Util.isNonEmptyArray(arr)\n    },\n\n    isNonEmptyText(text: any): boolean {\n      return Util.isNonEmptyText(text)\n    },\n\n    dateTimeFormat(val: string): string | undefined {\n      if (Util.isSet(val)) {\n        return Locale.dateTimeFormat(val)\n      }\n\n      return undefined\n    },\n\n    deepClone(obj: any) {\n      return Util.deepClone(obj)\n    },\n\n    isInt(possibleInt: any): boolean {\n      return !isNaN(parseInt(possibleInt))\n    },\n\n    isFloat(possibleFloat: any): boolean {\n      return !isNaN(parseFloat(possibleFloat))\n    },\n\n    translateCountry(countryCode: string | undefined): string | undefined {\n      if (!countryCode) return undefined\n      return Country.getCountryNameByCode3(countryCode)\n    },\n\n    asDefinedString(val: any): string {\n      if (Util.isSet(val)) return String(val)\n      else return \"\"\n    },\n\n    nonEmptyString(val: any): null | string {\n      if (!Util.isSet(val)) return null\n      if (typeof(val) !== \"string\") return this.asDefinedString(val)\n      return val?.length > 0 ? val : null\n    },\n  }\n}","import { Marked } from \"marked\"\n\nexport interface HelpHeading {\n  id: string\n  text: string\n}\n\nexport interface HelpArticle {\n  slug: string\n  title: string\n  section: string\n  html: string\n  headings: HelpHeading[]\n}\n\nexport interface HelpSection {\n  key: string\n  title: string\n  articles: HelpArticle[]\n}\n\n/*\n * Articles are markdown files in assets/help/<lang>/<NN>-<section>/<NN>-<slug>.md,\n * with title and section in the front matter. Numbers give the order.\n * Links to other articles are written as [text](help:<slug>).\n * The build copies them to /public/assets/help together with an index.json listing them.\n */\nconst HELP_URL = \"/public/assets/help\"\nconst DEFAULT_LANG = \"eng\"\n\nconst slugify = (text: string): string => {\n  return text\n    .toLowerCase()\n    .normalize(\"NFKD\")\n    .replace(/[̀-ͯ]/g, \"\")\n    .replace(/[^a-z0-9]+/g, \"-\")\n    .replace(/^-|-$/g, \"\")\n}\n\nconst parseArticle = (raw: string): { meta: Record<string, string>, html: string, headings: HelpHeading[] } => {\n  const match = raw.match(/^---\\r?\\n([\\s\\S]*?)\\r?\\n---\\r?\\n?([\\s\\S]*)$/)\n  const meta: Record<string, string> = {}\n\n  for (const line of (match?.[1] ?? \"\").split(/\\r?\\n/)) {\n    const kv = line.match(/^(\\w+):\\s*\"?(.*?)\"?\\s*$/)\n    if (kv) meta[kv[1] as string] = kv[2] as string\n  }\n\n  // Headings get an id so the article can link to them from its table of contents\n  const headings: HelpHeading[] = []\n  const marked = new Marked({\n    renderer: {\n      heading({ tokens, depth }) {\n        const text = this.parser.parseInline(tokens)\n        const id = slugify(text.replace(/<[^>]*>/g, \"\"))\n        if (depth === 2) headings.push({ id, text: text.replace(/<[^>]*>/g, \"\") })\n        return `<h${depth} id=\"${id}\">${text}</h${depth}>\\n`\n      },\n    },\n  })\n\n  const html = marked.parse(match?.[2] ?? raw, { async: false })\n  return { meta, html, headings }\n}\n\nconst fetchText = async (url: string): Promise<string> => {\n  const res = await fetch(url)\n  if (!res.ok) throw new Error(`${res.status} ${url}`)\n  return res.text()\n}\n\nconst getHelp = async (lang: string, files: string[]): Promise<HelpSection[]> => {\n  const sections = new Map<string, HelpSection>()\n  const keys = files.filter((k) => k.startsWith(`${lang}/`)).sort()\n  const raws = await Promise.all(keys.map((key) => fetchText(`${HELP_URL}/${key}`)))\n\n  keys.forEach((key, index) => {\n    const [ , folder, file ] = key.split(\"/\")\n    if (!folder || !file) return\n\n    const {\n      meta,\n      html,\n      headings,\n    } = parseArticle(raws[index] as string)\n    const slug = file.replace(/^\\d+-/, \"\").replace(/\\.md$/, \"\")\n\n    let section = sections.get(folder)\n    if (!section) {\n      section = { key: folder, title: meta[\"section\"] ?? folder, articles: []}\n      sections.set(folder, section)\n    }\n\n    section.articles.push({ slug, title: meta[\"title\"] ?? slug, section: section.title, html, headings })\n  })\n\n  return Array.from(sections.values())\n}\n\nconst cache: Record<string, Promise<HelpSection[]>> = {}\n\nconst Help = {\n  /** All help sections and articles in the given language code, English if it has none */\n  async sections(lang: string | undefined): Promise<HelpSection[]> {\n    try {\n      const files: string[] = JSON.parse(await fetchText(`${HELP_URL}/index.json`))\n      const langs = new Set(files.map((k) => k.split(\"/\")[0]))\n      const resolved = lang && langs.has(lang) ? lang : DEFAULT_LANG\n\n      return await (cache[resolved] ??= getHelp(resolved, files))\n    } catch {\n      return []\n    }\n  },\n}\n\nexport default Help\n","const BuildInfo = {\n  isTestMode(): boolean {\n    return window.applicationInfo?.testMode === \"true\"\n  },\n\n  siteName(): string {\n    return window.applicationInfo?.siteName\n  },\n\n  versionNumber(): string {\n    return window.applicationInfo?.versionNumber\n  },\n\n  buildNumber(): string {\n    return window.applicationInfo?.buildNumber\n  },\n\n  backendName(): string {\n    return window.applicationInfo?.backendName\n  },\n}\n\nexport default BuildInfo","import Util from \"@/modules/utils/util\"\n\nconst ResellerUser = {\n  login(): string | undefined {\n    return window?.__resellerUser?.login\n  },\n  fullName(): string | undefined {\n    return window?.__resellerUser?.fullName\n  },\n  email(): string | undefined {\n    return window?.__resellerUser?.email\n  },\n  language(): string | undefined {\n    return window?.__resellerUser?.language\n  },\n  permissions(): string[] {\n    return window?.__resellerUser?.expandedPermissions || []\n  },\n  hasPermission(perm: string): boolean {\n    if (!perm) return false\n    if (!Util.isNonEmptyArray(ResellerUser.permissions())) return false\n\n    const perms = ResellerUser.permissions()\n\n    if (Array.isArray(perms)) {\n      return perms.includes(perm)\n    }\n\n    return false\n  },\n  isReseller(): boolean {\n    return window?.__resellerUser.userType === \"Reseller\"\n  },\n  isAdmin(): boolean {\n    return window?.__resellerUser.userType === \"Admin\"\n  },\n}\n\nexport default ResellerUser\n","import Util from \"@/modules/utils/util\"\n\nconst Reseller = {\n  codeName(): string | undefined {\n    return window?.__reseller?.codeName\n  },\n  name(): string | undefined {\n    return window?.__reseller?.name\n  },\n  email(): string | undefined {\n    return window?.__reseller?.email\n  },\n  defaultWhiteLabel(): string | undefined {\n    return window?.__reseller?.tenantWhiteLabel\n  },\n  allowableTenantOptions(): string[] {\n    return window?.__reseller?.allowableTenantOptions || []\n  },\n  options(): string[] {\n    return window?.__reseller?.options || []\n  },\n  hasAllowableTenantOption(opt: string): boolean {\n    if (!opt) return false\n    if (!Util.isNonEmptyArray(Reseller.allowableTenantOptions())) return false\n\n    return Reseller.allowableTenantOptions().includes(opt)\n  },\n  hasOption(opt: string): boolean {\n    if (!opt) return false\n    if (!Util.isNonEmptyArray(Reseller.options())) return false\n\n    return Reseller.options().includes(opt)\n  },\n  language(): string | undefined {\n    return window?.__reseller?.language\n  },\n  country(): string | undefined {\n    return window?.__reseller?.country\n  },\n  timeZone(): string | undefined {\n    return window?.__reseller?.timeZone\n  },\n}\n\nexport default Reseller\n","import Debouncer from \"@/modules/utils/debounce\"\nimport { QueryBuilder } from \"@/modules/libs/querybuilder\"\n\nimport {\n  DataTableOptions,\n  DeletedFlag,\n} from \"@/types\"\n\nexport class DataTableQuery {\n  options: DataTableOptions<any>\n  reloadCallback: Function\n\n  queryBuilder = new QueryBuilder()\n  debouncer = new Debouncer()\n\n  constructor(options: DataTableOptions<any>, reloadCallback: Function) {\n    this.options = options\n    this.setOptions(options)\n    this.reloadCallback = reloadCallback\n\n    this.updateList()\n  }\n\n  setOptions(options: DataTableOptions<any>): void {\n    if (!options) return\n\n    this.options.page = options.page\n    this.options.itemsPerPage = options.itemsPerPage\n    this.options.sortBy = options.sortBy\n    this.options.sortDesc = options.sortDesc\n\n    const sortByHead = this.options?.sortBy?.[0]\n    const sortDescHead = this.options?.sortDesc?.[0]\n\n    if (sortByHead !== undefined && sortDescHead !== undefined) {\n      if (typeof(sortByHead) === \"string\") {\n        this.queryBuilder.setOrder(sortByHead, sortDescHead)\n      }\n    }\n\n    this.queryBuilder.setNumRecords(this.options.itemsPerPage)\n\n    const offset = (options.page - 1) * options.itemsPerPage\n\n    this.queryBuilder.setOffset(offset)\n  }\n\n  updateList(): void {\n    if (this.reloadCallback) {\n      this.debouncer.debounce(() =>\n        this.reloadCallback(this.queryBuilder.getQuery())\n      )\n    }\n  }\n\n  setDeletedFlagFilter(flag: DeletedFlag): void {\n    this.queryBuilder.setDeletedFlag(flag)\n  }\n}\n","import Util from \"@/modules/utils/util\"\n\nimport {\n  DeletedFlag,\n  Filter,\n  FilterClause,\n  isCustomData,\n  isFilterClauseWithFieldValue,\n  isFilterClauseWithSubclauses,\n  Ordering,\n  Query,\n  QueryDirection,\n} from \"@/types\"\n\nexport class QueryBuilder {\n  order: Ordering = {\n    direction: QueryDirection.descending,\n    field: \"lastModified\",\n  }\n  deletedFlag: DeletedFlag = DeletedFlag.NotDeleted\n  numRecords: number = 25\n  offset: number = 0\n  filters: FilterClause[] = []\n\n  constructor(\n    filters?: FilterClause[],\n    orderField?: string,\n    ascendingOrDescending?: boolean,\n    deletedFlag?: DeletedFlag,\n    numRecords?: number,\n    offset?: number\n  ) {\n    if (filters !== undefined) {\n      this.filters = filters\n    }\n    if (orderField !== undefined) {\n      this.setOrder(orderField, this.order.direction === QueryDirection.descending)\n    }\n    if (ascendingOrDescending !== undefined) {\n      this.setOrder(this.order.field, ascendingOrDescending)\n    }\n    if (deletedFlag !== undefined) {\n      this.deletedFlag = deletedFlag\n    }\n    if (numRecords !== undefined) {\n      this.numRecords = numRecords\n    }\n    if (offset !== undefined) {\n      this.offset = offset\n    }\n  }\n\n  /**\n   * Get a query object to send to backend\n   */\n  getQuery(): Query {\n    return {\n      filter: this.getFilter(),\n      order: [ this.order ],\n      deletedFlag: this.deletedFlag,\n      numRecords: this.numRecords,\n      offset: this.offset,\n    }\n  }\n\n  setOrder(field: string, descending: boolean): void {\n    this.order = {\n      direction: descending ? QueryDirection.descending : QueryDirection.ascending,\n      field: field,\n    }\n  }\n\n  /**\n   * Set the deleted flag\n   */\n  setDeletedFlag(flag: DeletedFlag): void {\n    this.deletedFlag = flag\n  }\n\n  /**\n   * Set the offset\n   */\n  setOffset(offset: number): void {\n    this.offset = offset\n  }\n\n  /**\n   * Set the num records\n   */\n  setNumRecords(numRecords: number): void {\n    this.numRecords = numRecords\n  }\n\n  /**\n   * Get filter object\n   */\n  getFilter(): Filter | undefined {\n    if (this.filters.length > 0) {\n      return {\n        type: \"and\",\n        subclauses: this.filters,\n      }\n    } else {\n      return undefined\n    }\n  }\n\n  /**\n   * Add filter\n   */\n  addFilter(filter: FilterClause): void {\n    this.filters.push(filter)\n  }\n\n  /**\n   * Remove filter\n   */\n  removeFilter(filter: FilterClause): void {\n    const filterAreEq = (filterA: FilterClause,\n      filterB: FilterClause): boolean => {\n      if (isCustomData(filterA) && isCustomData(filterB)) {\n        return filterA.key + filterA.moduleId === filterB.key + filterB.moduleId\n      } else if (isFilterClauseWithSubclauses(filterA) || isFilterClauseWithSubclauses(filterB)) {\n        const filterAFields = []\n        const filterBFields = []\n\n        if (isFilterClauseWithSubclauses(filterA)) {\n          const clauses = filterA.subclauses.filter(s => isFilterClauseWithFieldValue(s))\n          filterAFields.push(...clauses.map(c => c.field))\n        } else if (isFilterClauseWithFieldValue(filterA)) {\n          filterAFields.push(filterA.field)\n        }\n\n        if (isFilterClauseWithSubclauses(filterB)) {\n          const clauses = filterB.subclauses.filter(s => isFilterClauseWithFieldValue(s))\n          filterBFields.push(...clauses.map(c => c.field))\n        } else if (isFilterClauseWithFieldValue(filterB)) {\n          filterBFields.push(filterB.field)\n        }\n\n        return Util.intersection(filterAFields, filterBFields)?.length > 0\n      }\n      else if (isFilterClauseWithFieldValue(filterA) && isFilterClauseWithFieldValue(filterB)) {\n        return filterA.field === filterB.field\n      }\n\n      return false\n    }\n\n    const index = this.filters.findIndex((obj) => filterAreEq(obj, filter))\n\n    if (index !== -1) this.filters.splice(index, 1)\n  }\n}\n","import {\n  AuthType,\n} from \"@/types\"\n\nexport type LoginLogoutResponse = {\n  succeeded: boolean,\n}\n\nexport type AuthTypeOrRedirectResponse = {\n  OK: boolean,\n  redirectUri?: string,\n  authType?: AuthType,\n  err?: string,\n}\n\nconst Session = {\n  login(reseller: string, login: string, password: string): Promise<LoginLogoutResponse> {\n    return window.sessionServerFuncs\n      .login({\n        reseller: reseller,\n        login: login,\n        password: password,\n      })\n  },\n\n  logout(): Promise<LoginLogoutResponse> {\n    return window.sessionServerFuncs.logout(\"\")\n  },\n\n  changeLanguage(language: string): Promise<void> {\n    return window.sessionServerFuncs.changeLanguage(language)\n  },\n\n  checkAuthTypeOrRedirect(codeName: string): Promise<AuthTypeOrRedirectResponse> {\n    return window.sessionServerFuncs.checkAuthTypeOrRedirect(codeName)\n  },\n}\n\nexport default Session","import {\n  TenantIssueSummary,\n  TransferStatsSummary,\n  RequestTenantCount,\n  TenantCounts,\n  TenantCountsPerAssistant,\n  TenantCountsPerConnector,\n  TenantCountsPerCountry,\n  TenantCountsPerOption,\n} from \"@/types\"\n\nimport moment from \"moment\"\n\nexport default {\n  /**\n   * Get daily summarized transfer stats for a tenant.\n   * Returns an object with keys as record types and then an object with import/export lists.\n   * @param from - YYYY-MM-DD\n   * @param to - YYYY-MM-DD\n   */\n  dailySummarizedTransferStats(from: string, to: string): Promise<TransferStatsSummary[]> {\n    const list: TransferStatsSummary[] = []\n\n    return new Promise((res, rej) => {\n      return window?.statsServerFuncs.dailySummarizedTransferStats({\n        fromTime: from + \"T00:00:00Z\",\n        toTime: to + \"T23:59:59Z\",\n      })\n        .then((response: any) => {\n          if (Array.isArray(response)) {\n            list.push(...response)\n          }\n          else {\n            return rej(response)\n          }\n        })\n        .catch((error: any) => rej(error))\n        .done(() => res(list))\n    })\n  },\n\n  /**\n   * Get if there is tenants with issues\n   * Returns boolean\n   */\n  async tenantsWithIssues(): Promise<number> {\n    const fromDate = moment().subtract(3, \"hours\").startOf(\"hour\").format(\"YYYY-MM-DDTHH:mm:ssZ\")\n    const toDate = moment().subtract(1, \"hours\").endOf(\"hour\").format(\"YYYY-MM-DDTHH:mm:ssZ\")\n\n    try {\n      const allTenantsWithIssues = await this.tenantsIssues(fromDate, toDate)\n      const tenantsWithIssues = allTenantsWithIssues.filter(tenant => tenant.numIssues > 0).length\n      return tenantsWithIssues || 0\n    } catch {\n      return 0\n    }\n  },\n\n  /**\n   * Get daily summarized transfer stats for a tenant.\n   * Returns an object with keys as record types and then an object with import/export lists.\n   * @param from - YYYY-MM-DD\n   * @param to - YYYY-MM-DD\n   */\n  tenantsIssues(from: string, to: string): Promise<TenantIssueSummary[]> {\n    const savedIssues: TenantIssueSummary[] = []\n    const previousTenants: Map<string, boolean> = new Map()\n\n    const processIssueData = (issues: TenantIssueSummary[]): void => {\n      const sortByLatest = issues.sort((a: TenantIssueSummary, b: TenantIssueSummary) => {\n        return new Date(b.hour).getTime() - new Date(a.hour).getTime()\n      })\n\n      for (let issue of sortByLatest) {\n        if (previousTenants.has(issue.tenantCodeName)) {\n          let existing = savedIssues.find(x => x.tenantCodeName === issue.tenantCodeName)\n\n          if (existing) {\n            existing.numIssues = Math.max(existing.numIssues, issue.numIssues)\n          }\n        }\n        else {\n          previousTenants.set(issue.tenantCodeName, true)\n          savedIssues.push(issue)\n        }\n      }\n    }\n\n    return new Promise((resolve, reject) => {\n      return window?.statsServerFuncs.requestTenantTransferIssuesCounts({\n        fromTime: from,\n        toTime: to,\n      })\n        .then((issues: TenantIssueSummary[]) => processIssueData(issues))\n        .catch(reject)\n        .done(() => resolve(savedIssues))\n    })\n  },\n\n  requestTenantCounts(fromTime: string, toTime: string): Promise<TenantCounts[]> {\n    const list: TenantCounts[] = []\n\n    return new Promise((resolve, reject) => {\n      return window?.statsServerFuncs.requestTenantCounts({\n        type: RequestTenantCount.TenantCounts,\n        fromTime: fromTime,\n        toTime: toTime,\n      })\n        .then((counts: TenantCounts[]) => list.push(...counts))\n        .fail(reject)\n        .done(() => resolve(list))\n    })\n  },\n\n  requestTenantCountsPerAssistant(fromTime: string, toTime: string)\n    : Promise<TenantCountsPerAssistant[]> {\n    const list: TenantCountsPerAssistant[] = []\n\n    return new Promise((resolve, reject) => {\n      return window?.statsServerFuncs.requestTenantCounts({\n        type: RequestTenantCount.TenantCountsPerAssistant,\n        fromTime: fromTime,\n        toTime: toTime,\n      })\n        .then((counts: TenantCountsPerAssistant[]) => list.push(...counts))\n        .fail(reject)\n        .done(() => resolve(list))\n    })\n  },\n\n  requestTenantCountsPerConnector(fromTime: string, toTime: string)\n    : Promise<TenantCountsPerConnector[]> {\n    const list: TenantCountsPerConnector[] = []\n\n    return new Promise((resolve, reject) => {\n      return window?.statsServerFuncs.requestTenantCounts({\n        type: RequestTenantCount.TenantCountsPerConnector,\n        fromTime: fromTime,\n        toTime: toTime,\n      })\n        .then((counts: TenantCountsPerConnector[]) => list.push(...counts))\n        .fail(reject)\n        .done(() => resolve(list))\n    })\n  },\n\n  requestTenantCountsPerCountry(fromTime: string, toTime: string)\n    : Promise<TenantCountsPerCountry[]> {\n    const list: TenantCountsPerCountry[] = []\n\n    return new Promise((resolve, reject) => {\n      return window?.statsServerFuncs.requestTenantCounts({\n        type: RequestTenantCount.TenantCountsPerCountry,\n        fromTime: fromTime,\n        toTime: toTime,\n      })\n        .then((counts: TenantCountsPerCountry[]) => list.push(...counts))\n        .fail(reject)\n        .done(() => resolve(list))\n    })\n  },\n\n  requestTenantCountsPerOption(fromTime: string, toTime: string)\n    : Promise<TenantCountsPerOption[]> {\n    const list: TenantCountsPerOption[] = []\n\n    return new Promise((resolve, reject) => {\n      return window?.statsServerFuncs.requestTenantCounts({\n        type: RequestTenantCount.TenantCountsPerOption,\n        fromTime: fromTime,\n        toTime: toTime,\n      })\n        .then((counts: TenantCountsPerOption[]) => list.push(...counts))\n        .fail(reject)\n        .done(() => resolve(list))\n    })\n  },\n}\n","import {\n  TenantTemplate,\n  SuccessResponse,\n  FailureResponse,\n} from \"@/types\"\n\nexport default {\n  listTenantTemplates(): Promise<TenantTemplate[]> {\n    const data: TenantTemplate[] = []\n\n    return new Promise((resolve, reject) => {\n      return window?.tenantServerFuncs.listTenantTemplates(\"\")\n        .then((result: any) => {\n          if (Array.isArray(result)) {\n            data.push(...result)\n          }\n        })\n        .catch((error: any) => reject(error))\n        .done(() => resolve(data))\n    })\n  },\n\n  getTenantTemplate(localId: string): Promise<TenantTemplate> {\n    return window?.tenantServerFuncs.getTenantTemplate(localId)\n  },\n\n  createTenantTemplate(template: TenantTemplate): Promise<SuccessResponse | FailureResponse> {\n    return new Promise((resolve, reject) => {\n      return window?.tenantServerFuncs.createTenantTemplate(template)\n        .then((response: any) => resolve(response))\n        .catch((error: any) => reject(error))\n    })\n  },\n\n  editTenantTemplate(template: TenantTemplate): Promise<SuccessResponse | FailureResponse> {\n    return new Promise((resolve, reject) => {\n      return window?.tenantServerFuncs.editTenantTemplate(template)\n        .then((response: any) => resolve(response))\n        .catch((error: any) => reject(error))\n    })\n  },\n\n  deleteTenantTemplate(localId: string): Promise<SuccessResponse | FailureResponse> {\n    return new Promise((resolve, reject) => {\n      return window?.tenantServerFuncs.deleteTenantTemplate(localId)\n        .then((response: any) => {\n          if (response.OK) {\n            return resolve(response)\n          }\n          else {\n            return reject(response)\n          }\n        })\n        .catch((error: any) => reject(error))\n    })\n  },\n}\n","import {\n  AssistantDefinition, Query,\n  Tenant as TenantType,\n} from \"@/types\"\n\nimport Util from \"@/modules/utils/util\"\n\nexport type ListTenantResponse = {\n  count?: number,\n  data: TenantType[],\n}\n\nexport type DeleteTenantResponse = {\n  success: boolean,\n}\n\nconst Tenant = {\n  availableAssistants(): Promise<AssistantDefinition[]> {\n    return window?.tenantServerFuncs.assistants(\"\")\n  },\n\n  getTenantByCodeName(codeName: string): Promise<TenantType> {\n    return new Promise((resolve, reject) => {\n      return window.tenantServerFuncs.getTenantByCodeName(codeName)\n        .then((response: any) => {\n          if (response.OK) {\n            return resolve(response.data)\n          }\n          else {\n            return reject(response)\n          }\n        })\n        .catch((err: any) => reject(err))\n    })\n  },\n\n  loginAsTenant(codeName: string, path?: string): void {\n    const url = \"/tenants/loginas/\" + codeName + (path ? path : \"\")\n    window.open(url, \"_blank\")\n  },\n\n  saveTenant(tenantData: TenantType): Promise<TenantType> {\n    return window.tenantServerFuncs.saveTenant(tenantData)\n  },\n\n  listTenants(query: Query): Promise<ListTenantResponse> {\n    return new Promise((resolve, reject) => {\n      let count: number | undefined = undefined\n      let tenants: TenantType[] = []\n\n      return window.tenantServerFuncs\n        .listTenants(query)\n        .then((res: any) => {\n          if (Array.isArray(res)) {\n            const tenantBatch = (res as TenantType[])\n            tenants.push(...tenantBatch)\n          }\n          else {\n            count = (res.count as number)\n          }\n        })\n        .catch(reject)\n        .done(() => resolve({\n          count: Util.isSet(count) ? count : tenants.length,\n          data: tenants,\n        }))\n    })\n  },\n\n  deleteTenant(codeName: string): Promise<DeleteTenantResponse> {\n    return new Promise((resolve, reject) => {\n      return window.tenantServerFuncs\n        .deleteTenant(codeName)\n        .then((response: any) => resolve(response))\n        .catch((error: any) => reject(error))\n    })\n  },\n}\n\nexport default Tenant","import Util from \"@/modules/utils/util\"\n\nimport {\n  AssistantDefinition,\n  isAllOf,\n  isAnyOf,\n  isConditionalIf,\n  isNoneOf,\n  isOpt,\n  Selectable,\n  TenantOptionRule,\n  TenantOptionRuleGroup,\n} from \"@/types\"\nimport Reseller from \"@/modules/injected-js-handlers/reseller\"\n\nconst ruleAccepts = (\n  rule: TenantOptionRule,\n  tenantOptions: string[]\n): boolean => {\n  if (isOpt(rule)) return tenantOptions.includes(rule.tenantOption)\n  if (isAllOf(rule)) {\n    return rule.children.every((c) => ruleAccepts(c, tenantOptions))\n  }\n  if (isAnyOf(rule)) {\n    return rule.children.some((c) => ruleAccepts(c, tenantOptions))\n  }\n  if (isNoneOf(rule)) {\n    return !rule.children.some((c) => ruleAccepts(c, tenantOptions))\n  }\n  if (isConditionalIf(rule)) {\n    if (ruleAccepts(rule.condition, tenantOptions)) {\n      return rule.body.every((c) => ruleAccepts(c, tenantOptions))\n    }\n    return true\n  }\n\n  return false\n}\n\nconst AssistantUtils = {\n\n  /**\n   * Function that checks that based on the inputed tenant option rule that\n   * the tenant has the proper tenant opts set.\n   */\n  accepts(\n    holder: TenantOptionRule | TenantOptionRule[]): boolean {\n    const opts = AssistantUtils.acceptsHelperFunc(holder)\n\n    return opts.length === 0\n  },\n\n  /**\n   * Returns all opts that aren't set based on the list that it was given and\n   * the requirements that was set.\n   */\n  acceptsHelperFunc(holder: TenantOptionRule | TenantOptionRule[]): string[] {\n    const opts: string[] = []\n\n    const all = (elements: TenantOptionRule[],\n      collect: boolean = false\n    ): boolean => {\n      if (elements.length === 0) return false\n      let result = true\n\n      for (let element of elements) {\n        const accepted = helperFunc(element, collect)\n\n        if (!accepted) {\n          result = false\n        }\n      }\n\n      return result\n    }\n\n    const any = (elements: TenantOptionRule[],\n      collect: boolean = false\n    ): boolean => {\n      if (elements.length === 0) return false\n      let result = false\n\n      for (let element of elements) {\n        const accepted = helperFunc(element, collect)\n\n        if (accepted) {\n          result = true\n        }\n      }\n\n      return result\n    }\n\n    const helperFunc = (\n      subHolder: TenantOptionRule | TenantOptionRule[],\n      collect: boolean = true\n    ): boolean => {\n      if (Array.isArray(subHolder)) {\n        const checkFn = (_collect: boolean): boolean => all(subHolder, _collect)\n\n        const firstCheck = checkFn(false)\n\n        if (firstCheck) return true\n        else return checkFn(true)\n      }\n      else {\n        if (isAllOf(subHolder)) {\n          const checkFn = (_collect: boolean): boolean => all(subHolder.children, _collect)\n\n          const firstCheck = checkFn(false)\n\n          if (firstCheck) return true\n          else return checkFn(true)\n        }\n        else if (isAnyOf(subHolder)) {\n          const checkFn = (_collect: boolean): boolean => any(subHolder.children, _collect)\n\n          const firstCheck = checkFn(false)\n\n          if (firstCheck) return true\n          else return checkFn(true)\n        }\n        else if (isNoneOf(subHolder)) {\n          const checkFn = (_collect: boolean): boolean => !any(subHolder.children, _collect)\n\n          const firstCheck = checkFn(false)\n\n          if (firstCheck) return true\n          else return checkFn(true)\n        }\n        else if (isConditionalIf(subHolder)) {\n          const checkCondFn = (_collect: boolean): boolean => helperFunc(subHolder.condition, _collect)\n          const checkBodyFn = (_collect: boolean): boolean => helperFunc(subHolder.body, _collect)\n\n          const firstCheck = checkCondFn(false)\n\n          if (firstCheck) {\n            const secondCheck = checkBodyFn(false)\n\n            if (secondCheck) return true\n            else {\n              return checkBodyFn(true)\n            }\n          }\n          else return false\n        }\n        else if (isOpt(subHolder)) {\n          const result = Reseller.hasAllowableTenantOption(subHolder.tenantOption)\n\n          if (collect) {\n            if (!result) {\n              opts.push(subHolder.tenantOption)\n            }\n          }\n          return result\n        }\n      }\n\n      throw new Error(\"Should not happen\")\n    }\n\n    helperFunc(holder)\n\n    return Array.of(...new Set(opts))\n  },\n\n  getGroups(\n    definition: AssistantDefinition,\n    availableTenantOptions: string[],\n    currentTenantOptions: string[]\n  ): TenantOptionRuleGroup[] {\n    const groups: Record<string, TenantOptionRuleGroup> = {}\n    const definedGroups = definition.requiredOptions.filter((r) =>\n      Util.isSet(r.ruleTag)\n    )\n\n    for (let group of definedGroups) {\n      const systems = AssistantUtils.getSystems(group)\n      const obj: TenantOptionRuleGroup = {\n        systems: systems.sort(),\n        ruleTag: group.ruleTag,\n        label: group.ruleTag,\n        children: {},\n        allowMultiple: false,\n        selectable: systems.map(system => {\n          const holder = AssistantUtils\n            .getGroupBySystem(group, system)\n\n          const checkMissingOpts = (): string[] => {\n            if (holder) {\n              return AssistantUtils.acceptsHelperFunc(holder)\n            }\n            else return []\n          }\n\n          const missing = checkMissingOpts()\n\n          return {\n            system: system,\n            available: missing.length === 0,\n            missingOpts: missing,\n          }\n        })\n          .reduce((a, b) => {\n            a[b.system] = b\n            return a\n          }, ({} as Record<string, Selectable>)),\n      }\n\n      if (isAnyOf(group)) {\n        obj.allowMultiple = group.allowMultiple\n      }\n      if (isConditionalIf(group)) {\n        if (group.body.length > 0 && isAnyOf(group.body[0])) {\n          obj.allowMultiple = group.body[0].allowMultiple\n        }\n      }\n\n      /* Group opts by system */\n      obj.children = obj.systems.reduce((origin, system) => {\n        origin[system] = AssistantUtils.getOptsInGroupBySystem(group, system,\n          availableTenantOptions, currentTenantOptions, true)\n        return origin\n      }, ({} as Record<string, string[]>))\n\n      groups[group.ruleTag] = obj\n    }\n\n    return Object.values(groups)\n  },\n\n  getGroupBySystem(\n    holder: TenantOptionRule | TenantOptionRule[],\n    system: string\n  ): TenantOptionRule | undefined {\n    if (Array.isArray(holder)) {\n      return holder\n        .find(el => AssistantUtils.getGroupBySystem(el, system))\n    }\n    else {\n      if (isAllOf(holder) && holder.system === system) {\n        return holder\n      }\n      else if (isAnyOf(holder)) {\n        return holder.children\n          .filter(c => isAllOf(c))\n          .find(\n            (c) => AssistantUtils\n              .getGroupBySystem(c, system) && c?.system === system\n          )\n      }\n      else if (isConditionalIf(holder)) {\n        const condHolder = AssistantUtils.getGroupBySystem(holder.condition, system)\n\n        if (condHolder) return condHolder\n\n        return holder.body\n          .find(el => AssistantUtils.getGroupBySystem(el, system))\n      }\n      return undefined\n    }\n  },\n\n  getSystems(holder: TenantOptionRule): string[] {\n    if (isAllOf(holder)) {\n      if (holder.system) return [ holder.system ]\n    }\n    else if (isAnyOf(holder)) {\n      return holder.children\n        .flatMap((c) => AssistantUtils.getSystems(c))\n    }\n    else if (isConditionalIf(holder)) {\n      return holder.body\n        .flatMap((c) => AssistantUtils.getSystems(c))\n    }\n\n    return []\n  },\n\n  getOptsInGroup(\n    holder: TenantOptionRule,\n    availableTenantOptions: string[],\n    currentTenantOptions: string[]\n  ): string[] {\n    if (isAllOf(holder))\n      return holder.children.flatMap((c) =>\n        AssistantUtils\n          .getOptsInGroup(c, availableTenantOptions, currentTenantOptions)\n      )\n    if (isConditionalIf(holder)) {\n      if (ruleAccepts(holder.condition, currentTenantOptions)) {\n        return holder.body.flatMap((c) =>\n          AssistantUtils.getOptsInGroup(c, availableTenantOptions, currentTenantOptions)\n        )\n      } else return []\n    }\n    if (isOpt(holder)) return [ holder.tenantOption ]\n\n    return []\n  },\n\n  getOptsInGroupBySystem(\n    holder: TenantOptionRule,\n    system: string,\n    availableTenantOptions: string[],\n    currentTenantOptions: string[],\n    allAvailable: boolean = false\n  ): string[] {\n    if (isAllOf(holder) && holder.system === system) {\n      return AssistantUtils\n        .getOptsInGroup(holder, availableTenantOptions, currentTenantOptions)\n    }\n    else if (isAnyOf(holder)) {\n      return holder.children.flatMap((c) => AssistantUtils\n        .getOptsInGroupBySystem(c, system, availableTenantOptions, currentTenantOptions))\n    }\n    else if (isConditionalIf(holder)) {\n      if (\n        allAvailable || ruleAccepts(holder.condition, currentTenantOptions)\n      ) {\n        return holder.body\n          .flatMap((c) => AssistantUtils\n            .getOptsInGroupBySystem(c, system, availableTenantOptions, currentTenantOptions))\n      } else return []\n    }\n\n    return []\n  },\n\n  getOpts(group: TenantOptionRuleGroup, system: string): string[] {\n    return group.children?.[system] || []\n  },\n}\n\nexport default AssistantUtils\n","import { useTextHelpers } from \"@/composables/useTextHelpers\"\nimport Util from \"@/modules/utils/util\"\n\nimport AssistantUtils from \"@/modules/tenant-edit-dialog/assistant-utils\"\n\nimport Reseller from \"@/modules/injected-js-handlers/reseller\"\n\nimport { AssistantDefinition as AssistantDefinitionCode } from \"@/types/generated/com.nodefactory.diehard.ui.assistants.AssistantDefinition\"\n\nimport {\n  PartnerOption,\n  RequiredOptType,\n  SalesFlowType,\n} from \"@/modules/tenant-edit-dialog/types\"\n\nimport {\n  Assistant,\n  AssistantDefinition,\n  ConnectorObject,\n  TenantOptionRuleChildren,\n  isAllOf,\n  isOpt,\n} from \"@/types\"\n\nconst translate = (val: string): string => useTextHelpers().translate(val)\n\nexport interface SalesFlowTenant {\n  newOptions: string[],\n  assistants: Assistant[],\n}\n\ninterface RequiredOpt {\n  type: RequiredOptType,\n  value: string,\n}\n\nexport interface AssistantPlugDefinitionObj {\n  text: string,\n  requiredOpts: RequiredOpt[],\n  import?: boolean,\n  export?: boolean\n}\n\nexport interface SpecialPlugDefinitionObj {\n  plug: AssistantPlugDefinitionObj,\n  text: string,\n  connection: ConnectorObject,\n  import?: boolean,\n  export?: boolean\n}\n\nexport interface CompatibleWith {\n  assistantCode: AssistantDefinitionCode,\n}\n\nexport interface SourceType {\n  value: SalesFlowType,\n  text: string,\n  byline?: string,\n  compatibleWith: Record<string, CompatibleWith>\n}\n\nexport interface DestinationType {\n  value: SalesFlowType,\n  text: string,\n  compatibleWith: Record<string, CompatibleWith>\n}\n\n/* eslint-disable no-unused-vars */\nexport enum Group {\n  ecommerce = \"ecommerce\",\n  erp = \"erp\",\n  marketplace = \"marketplace\",\n  payment = \"payment\",\n  pos = \"pos\",\n  logistics = \"logistics\",\n  misc = \"misc\",\n}\n/* eslint-enable no-unused-vars */\n\nexport const SalesFlowUtils = {\n\n  assistantPlugDefinition: (() => (({\n    [AssistantDefinitionCode.OrderTransfer]: {\n      order: [\n        {\n          text: translate(\"Orders\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"import.orders\",\n            },\n          ],\n          import: true,\n        },\n        {\n          text: translate(\"Orders\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"export.orders\",\n            },\n            {\n              type: RequiredOptType.Equals,\n              value: PartnerOption.Shiplink,\n            },\n          ],\n          export: true,\n        },\n      ],\n      shipments: [\n        {\n          text: translate(\"Shipments\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"import.shipments\",\n            },\n          ],\n          import: true,\n        },\n        {\n          text: translate(\"Orders\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"orders_as_shipments\",\n            },\n          ],\n          export: true,\n        },\n      ],\n    },\n\n    [AssistantDefinitionCode.OrderAutoLedgerEntrySettlement]: {\n      order: [\n        {\n          text: translate(\"Orders\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"import.orders\",\n            },\n          ],\n          import: true,\n        },\n      ],\n      payouts: [\n        {\n          text: translate(\"Payouts\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.Contains,\n              value: \"as_settlementreport\",\n            },\n          ],\n          import: true,\n        },\n      ],\n      ledgerentries: [\n        {\n          text: translate(\"Ledger_entries\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"export.accounting.ledgerentries\",\n            },\n          ],\n          export: true,\n        },\n      ],\n    },\n\n    [AssistantDefinitionCode.LedgerEntryTransferSettlement]: {\n      ledgerentries: [\n        {\n          text: translate(\"Ledger_entries\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"import.accounting.ledgerentries\",\n            },\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"import.transactions_as_ledgerentry\",\n            },\n          ],\n          import: true,\n        },\n        {\n          text: translate(\"Ledger_entries\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"export.accounting.ledgerentries\",\n            },\n          ],\n          export: true,\n        },\n        {\n          text: translate(\"Ledger_entries_account_transaction\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"import.accounttransaction_as_ledgerentry\",\n            },\n          ],\n          import: true,\n        },\n        {\n          text: translate(\"Ledger_entries_purchase\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"import.purchase_as_ledgerentry\",\n            },\n          ],\n          import: true,\n        },\n      ],\n      transactions: [\n        {\n          text: translate(\"Transactions\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"import.transactions_as_ledgerentry\",\n            },\n          ],\n          import: true,\n        },\n      ],\n      orders: [\n        {\n          text: translate(\"Orders\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"import.orders\",\n            },\n          ],\n          import: true,\n        },\n        {\n          text: translate(\"Orders\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"export.orders\",\n            },\n          ],\n          export: true,\n        },\n      ],\n\n      invoices: [\n        {\n          text: translate(\"Invoices\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"export.invoices\",\n            },\n          ],\n          export: true,\n        },\n      ],\n    },\n\n    [AssistantDefinitionCode.ZReportSettlement]: {\n      transactions: [\n        {\n          text: translate(\"Transactions\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"_as_zreport\",\n            },\n          ],\n          import: true,\n        },\n      ],\n      payouts: [\n        {\n          text: translate(\"Payouts\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.Contains,\n              value: \"as_settlementreport\",\n            },\n          ],\n          import: true,\n        },\n      ],\n      ledgerentries: [\n        {\n          text: translate(\"Ledger_entries\"),\n          requiredOpts: [\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"export.zreport.bookings\",\n            },\n            {\n              type: RequiredOptType.EndsWith,\n              value: \"export.settlementreport.bookings\",\n            },\n          ],\n          export: true,\n        },\n      ],\n    },\n  } as Record<string, Record<string, AssistantPlugDefinitionObj[]>>))),\n\n  sourceTypeOptions: (() => (([\n    {\n      value: SalesFlowType.Orders,\n      text: translate(\"Orders\"),\n      byline: translate(\"Orders_and_payouts\"),\n      compatibleWith: {\n        [SalesFlowType.Orders]: {\n          assistantCode: AssistantDefinitionCode.OrderTransfer,\n        },\n        [SalesFlowType.LedgerEntries]: {\n          assistantCode: AssistantDefinitionCode.OrderAutoLedgerEntrySettlement,\n        },\n      },\n    },\n    {\n      value: SalesFlowType.LedgerEntries,\n      text: translate(\"Transactions\"),\n      byline: translate(\"Ledger_entries_sie_files\"),\n      compatibleWith: {\n        [SalesFlowType.LedgerEntries]: {\n          assistantCode: AssistantDefinitionCode.LedgerEntryTransferSettlement,\n        },\n      },\n    },\n    {\n      value: SalesFlowType.ZReports,\n      text: translate(\"Zreports\"),\n      byline: translate(\"Zreports_and_settlements\"),\n      compatibleWith: {\n        [SalesFlowType.LedgerEntries]: {\n          assistantCode: AssistantDefinitionCode.ZReportSettlement,\n        },\n      },\n    },\n  ] as SourceType[]))),\n\n  destinationTypeOptions: (() => (([\n    {\n      value: SalesFlowType.Orders,\n      text: translate(\"Orders\"),\n      compatibleWith: {\n        [SalesFlowType.Orders]: {\n          assistantCode: AssistantDefinitionCode.OrderTransfer,\n        },\n      },\n    },\n    {\n      value: SalesFlowType.LedgerEntries,\n      text: translate(\"Ledger_entries\"),\n      compatibleWith: {\n        [SalesFlowType.Orders]: {\n          assistantCode: AssistantDefinitionCode.OrderAutoLedgerEntrySettlement,\n        },\n        [SalesFlowType.LedgerEntries]: {\n          assistantCode: AssistantDefinitionCode.LedgerEntryTransferSettlement,\n        },\n        [SalesFlowType.ZReports]: {\n          assistantCode: AssistantDefinitionCode.ZReportSettlement,\n        },\n      },\n    },\n  ] as DestinationType[]))),\n\n  hasOption(options: string[] | undefined,\n    opt: string | undefined): boolean {\n    if (!options || !opt) return false\n\n    return options.includes(opt)\n  },\n\n  getSystemOpt(type: string): string {\n    if (type === PartnerOption.Shiplink) return type\n    return `${type}.connection`\n  },\n\n  getPlugOpt(options: string[] | undefined,\n    type: string,\n    opt: string): string | undefined {\n    return (options || []).find(\n      (o: string) => o.includes(type) && o.includes(opt)\n    )\n  },\n\n  getPlugs(systems: ConnectorObject[],\n    options: string[],\n    plugObjects: AssistantPlugDefinitionObj[]): SpecialPlugDefinitionObj[] {\n    return plugObjects\n      .filter((plug: AssistantPlugDefinitionObj) =>\n        (options || []).some((opt: string) => {\n          return plug.requiredOpts.some((o: RequiredOpt) => {\n            if (o.type === RequiredOptType.StartsWith) return opt.startsWith(o.value)\n            else if (o.type === RequiredOptType.EndsWith) return opt.endsWith(o.value)\n            else if (o.type === RequiredOptType.Contains) return opt.includes(o.value)\n            return o.value === opt\n          })\n        }))\n      .flatMap((plug: AssistantPlugDefinitionObj) => {\n        return systems\n          .filter((connObj: ConnectorObject) => {\n            const checks = [\n              SalesFlowUtils.hasOption(options, SalesFlowUtils.getSystemOpt(connObj.value)),\n              plug.requiredOpts.some((opt: RequiredOpt) =>\n                SalesFlowUtils.hasOption(options,\n                  SalesFlowUtils.getPlugOpt(options, connObj.value, opt.value))\n              ),\n            ]\n\n            return checks.every(c => c)\n          })\n          .map((c: ConnectorObject) => ({\n            import: plugObjects.every(p => p.import),\n            export: plugObjects.every(p => p.export),\n            text: plug.text,\n            connection: c,\n            plug,\n          }))\n      })\n  },\n\n  getRootOptions(assistantDefinition: AssistantDefinition): string[] {\n    const allRules = assistantDefinition.requiredOptions\n      .filter(rule => isAllOf(rule))\n\n    if (Util.isNonEmptyArray(allRules)) {\n      const requiredRule = allRules[0]\n\n      if (requiredRule) {\n        return requiredRule.children\n          .filter(c => isOpt(c))\n          .map(c => c.tenantOption)\n      }\n    }\n    return []\n  },\n\n  visibleAvailableAssistants(assistantDefinitions: AssistantDefinition[])\n  : AssistantDefinition[] {\n    return assistantDefinitions\n      .filter((assistant: AssistantDefinition) => {\n        const rootOptions = SalesFlowUtils.getRootOptions(assistant) || []\n        return rootOptions.every((opt: string) => Reseller.hasAllowableTenantOption(opt))\n      })\n  },\n\n  allowedSourceTypeOptions(assistantDefinitions: AssistantDefinition[]\n  ):\n    SourceType[] {\n    return SalesFlowUtils.sourceTypeOptions()\n      .filter((s: SourceType) => {\n        const compatibleAssistants = Object\n          .values(s.compatibleWith)\n          .map((v): string => v.assistantCode)\n          .filter(assCode => {\n            const assistantDef = assistantDefinitions\n              .find((ass: AssistantDefinition) => ass.code === assCode)\n\n            if (assistantDef) {\n              const head = assistantDef.requiredOptions?.[0] || []\n              const sources = (assistantDef.requiredOptions?.[1] as TenantOptionRuleChildren)?.children || []\n\n              return AssistantUtils.accepts(head) &&\n                sources.some(holder => AssistantUtils.accepts(holder))\n            }\n            return false\n          })\n\n        return SalesFlowUtils.visibleAvailableAssistants(assistantDefinitions)\n          .some((ass: AssistantDefinition) => compatibleAssistants.includes(ass.code))\n      })\n  },\n\n  allowedDestinationTypeOptions(assistantDefinitions: AssistantDefinition[]\n  ): DestinationType[] {\n    return SalesFlowUtils.destinationTypeOptions()\n      .filter((s: DestinationType) => {\n        const compatibleAssistants = Object\n          .values(s.compatibleWith)\n          .map((v): string => v.assistantCode)\n          .filter(assCode => {\n            const assistantDef = assistantDefinitions\n              .find((ass: AssistantDefinition) => ass.code === assCode)\n\n            if (assistantDef) {\n              return AssistantUtils.accepts(assistantDef.requiredOptions?.[0] || [])\n            }\n            return false\n          })\n\n        return SalesFlowUtils.visibleAvailableAssistants(assistantDefinitions)\n          .some((ass: AssistantDefinition) => compatibleAssistants.includes(ass.code))\n      })\n  },\n\n  visibleSourceTypeOptions(\n    sourceType: SalesFlowType | undefined,\n    destinationType: SalesFlowType | undefined\n  ): SourceType[] {\n    if (!sourceType || !destinationType)\n      return SalesFlowUtils.sourceTypeOptions()\n\n    return SalesFlowUtils.sourceTypeOptions()\n      .filter((s: SourceType) => Object.keys(s.compatibleWith)\n        .includes((destinationType as string)))\n  },\n\n  visibleDestinationTypeOptions(\n    sourceType: SalesFlowType | undefined,\n    destinationType: SalesFlowType | undefined,\n    assistantDefinitions: AssistantDefinition[]\n  ): DestinationType[] {\n    if (!sourceType) return []\n\n    if (!destinationType) {\n      return SalesFlowUtils.allowedDestinationTypeOptions(assistantDefinitions)\n        .filter((d: DestinationType) => {\n          return Object.keys(d.compatibleWith)\n            .includes((sourceType as string))\n        })\n    }\n\n    return SalesFlowUtils.allowedDestinationTypeOptions(assistantDefinitions)\n      .filter((d: DestinationType) => {\n        const isCompatibleWithSourceType = Object.keys(d.compatibleWith)\n          .includes((sourceType as string))\n\n        const isCompatibleWith = SalesFlowUtils.visibleSourceTypeOptions(sourceType, destinationType)\n          .some((s: SourceType) => {\n            return Object.keys(s.compatibleWith).includes((destinationType as string))\n          })\n\n        return isCompatibleWithSourceType && isCompatibleWith\n      })\n  },\n}","import Util from \"@/modules/utils/util\"\nimport AssistantUtils from \"@/modules/tenant-edit-dialog/assistant-utils\"\n\nimport {\n  AssistantDefinition,\n  TenantOptionRuleGroup,\n} from \"@/types\"\n\nexport const TenantEditDialogUtils = {\n  getSystemOptPrefixFromSystem(system: string): string {\n    switch (system) {\n      case \"shiplink\":\n        return \"api.partner.shiplink\"\n      default:\n        return `${system}`\n    }\n  },\n\n  getSystemOpt(system: string): string {\n    switch (system) {\n      case \"sie\":\n        return \"sie.connection\"\n      case \"shiplink\":\n        return \"api.partner.shiplink\"\n      default:\n        return `${system}.connection`\n    }\n  },\n\n  clearGroupSelection(group: TenantOptionRuleGroup,\n    system: string, options: string[]): string[] {\n    const tenantOptions: string[] = Util.deepClone(options || [])\n    let opts = AssistantUtils.getOpts(group, system)\n    const systemOptPrefix = TenantEditDialogUtils\n      .getSystemOptPrefixFromSystem(system)\n\n    // If other opts with that system exists\n    if (\n      tenantOptions\n        .filter((opt) => !opts.includes(opt))\n        .some((o) => o.includes(systemOptPrefix))\n    ) {\n      // Dont remove other opts\n      opts = opts.filter((o) => o !== TenantEditDialogUtils\n        .getSystemOpt(system))\n    }\n\n    return tenantOptions.filter((opt) => !opts.includes(opt))\n  },\n\n  hasOption(opt: string, options: string[] | undefined): boolean {\n    if (!options) return false\n    return options.includes(opt)\n  },\n\n  doChangeGroupSelection(group: TenantOptionRuleGroup,\n    system: string, options: string[]): string[] {\n    let tenantOptions = Util.deepClone(options || [])\n    const opts = AssistantUtils.getOpts(group, system)\n\n    if (opts.every((opt) => TenantEditDialogUtils.hasOption(opt, options))) {\n      return TenantEditDialogUtils.clearGroupSelection(group, system, options)\n    } else {\n      tenantOptions.push(...opts)\n      tenantOptions = Array.of(...new Set(tenantOptions))\n      return tenantOptions\n    }\n  },\n\n  changeGroupSelection(group: TenantOptionRuleGroup,\n    system: string,\n    options: string[]): string[] {\n    if (group.allowMultiple) {\n      return TenantEditDialogUtils.doChangeGroupSelection(group, system, options)\n    } else {\n      let newOptList = options\n      for (let otherSystem of group.systems.filter((s) => s !== system)) {\n        if (TenantEditDialogUtils.isGroupActive(group, otherSystem, newOptList)) {\n          newOptList = TenantEditDialogUtils.clearGroupSelection(group, otherSystem, newOptList)\n        }\n      }\n\n      return TenantEditDialogUtils.doChangeGroupSelection(group, system, newOptList)\n    }\n  },\n\n  addOptsOrRemove(opts: string[], options: string[]): string[] {\n    let tenantOptions = Util.deepClone(options || [])\n\n    if (opts.some(opt => tenantOptions.includes(opt))) {\n      for (let opt of opts) {\n        tenantOptions.splice(tenantOptions.indexOf(opt), 1)\n      }\n    }\n    else {\n      tenantOptions.push(...opts)\n    }\n\n    return tenantOptions\n  },\n\n  isGroupActive(group: TenantOptionRuleGroup, system: string,\n    options: string[]): boolean {\n    const opts = AssistantUtils.getOpts(group, system)\n\n    if (Util.isNonEmptyArray(opts)) {\n      return opts.every((opt) => TenantEditDialogUtils.hasOption(opt, options))\n    }\n\n    return false\n  },\n\n  getAssistantDefinition(code: string,\n    availableAssistants: AssistantDefinition[]):\n    AssistantDefinition | undefined {\n    return availableAssistants\n      .find((a) => a.code === code)\n  },\n}\n","/* eslint-disable no-unused-vars */\nexport enum SalesFlowType {\n  Orders = \"orders\",\n  LedgerEntries = \"ledgerentries\",\n  ZReports = \"zreports\",\n}\n\nexport enum RequiredOptType {\n  EndsWith = \"endsWith\",\n  Equals = \"equals\",\n  Contains = \"contains\",\n  StartsWith = \"startsWith\",\n}\n\nexport enum PartnerOption {\n  Shiplink = \"api.partner.shiplink\",\n}\n\nexport enum CountryCode {\n  SE = \"SE\",\n  NO = \"NO\",\n  DK = \"DK\",\n  FI = \"FI\",\n  NL = \"NL\",\n  GB = \"GB\",\n}\n/* eslint-enable no-unused-vars */\n","import Util from \"@/modules/utils/util\"\nimport Locale from \"@/modules/utils/locales\"\nimport {\n  Country,\n} from \"@/types\"\n\nconst CountryHelper = {\n  /**\n   *\n   * @returns Country map with either code2 or code3 as key and\n   * country as value.\n   * @private\n   */\n  _createCountryMap(field: \"code3\" | \"code2\"): Record<string, Country> {\n    return Locale.allCountries()\n      .reduce((a: Record<string, Country>, b: Country) => {\n        a[b[field]] = b\n        return a\n      }, {})\n  },\n}\n\nlet allCountries: Country[] = []\nlet code2Map: Record<string, Country> = {}\nlet code3Map: Record<string, Country> = {}\n\nconst init = (): void => {\n  if (!Util.notEmptyObject(code3Map)) {\n    code3Map = CountryHelper._createCountryMap(\"code3\")\n  }\n\n  if (!Util.notEmptyObject(code2Map)) {\n    code2Map = CountryHelper._createCountryMap(\"code2\")\n  }\n\n  if (!Util.isNonEmptyArray(allCountries)) {\n    allCountries = Locale.allCountries()\n  }\n}\n\nconst _Country = {\n  /**\n   * Get country name by country code\n   * @param {Country.code3 | Country.code2} code\n   * @returns {Country.name | Country.code3 | Country.code2 | undefined}\n   */\n  getCountryNameByCode3(code: string): string | undefined {\n    if (!Util.isSet(code)) return code\n\n    init()\n\n    const country = _Country.getCountryFromCode(code)\n\n    return country ? country.name : code\n  },\n\n  /**\n   * Retrieves the code3 version from a code2 version of a country\n   * @param {Country.code2} code2\n   * @returns {Country.code3|undefined}\n   */\n  countryCode2ToCode3(code2: string): string | undefined {\n    init()\n\n    if (!(code2 in code2Map)) return undefined\n\n    return code2Map[code2]?.code3\n  },\n\n  /**\n   * Retrieves the code3 version from a code2 version of a country\n   */\n  countryCode3ToCode2(code3: string): string | undefined {\n    init()\n\n    if (!(code3 in code3Map)) return undefined\n\n    return code3Map[code3]?.code2\n  },\n\n  getCountryFromCode(code: string): Country | undefined {\n    init()\n\n    if (code in code3Map) return code3Map[code]\n    if (code in code2Map) return code2Map[code]\n\n    return undefined\n  },\n\n  /**\n   * Convert a code3 code to a unicode flag\n   * @param {Country.code3} country\n   * @returns {string|undefined} - unicode flag or undefined\n   */\n  convertCountryToUnicodeFlag(country: string): string | undefined {\n    if (!Util.isSet(country)) return undefined\n\n    init()\n\n    const code2 = _Country.countryCode3ToCode2(country)\n\n    if (Util.isSet(code2)) {\n      const magicUnicodeNr = 127397\n      const emojiCode = code2\n        .toString()\n        .toUpperCase()\n        .split(\"\")\n        .map((char) =>\n          String.fromCodePoint(char.charCodeAt(0) + magicUnicodeNr)\n        )\n        .join(\"\")\n\n      return emojiCode\n    }\n\n    return undefined\n  },\n}\n\nexport default _Country\n","export interface DebouncerType {\n  time: number\n  timeoutId: ReturnType<typeof setTimeout> | null\n  // eslint-disable-next-line\n  debounce(callback: () => void, newTime?: number): void\n}\n\nclass Debouncer implements DebouncerType {\n  time: number\n  timeoutId: ReturnType<typeof setTimeout> | null\n\n  constructor(time?: number) {\n    const DEFAULT_TIMEOUT: number = 750\n\n    if (time) this.time = time\n    else this.time = DEFAULT_TIMEOUT\n\n    this.timeoutId = null\n  }\n\n  debounce(callback: () => void, newTime?: number): void {\n    if (this.timeoutId) clearTimeout(this.timeoutId)\n    const time = newTime || this.time\n\n    this.timeoutId = setTimeout(() => callback(), time)\n  }\n}\n\nexport default Debouncer\n","import Util from \"@/modules/utils/util\"\nimport { useLocale } from \"@/plugins/store/localestore\"\n\nimport {\n  Language,\n} from \"@/types\"\n\nconst LangHelper = {\n  _createLanguageMap(field: \"code3\" | \"code2\"): Record<string, Language> {\n    return useLocale().languages\n      .reduce((a: Record<string, Language>, b: Language) => {\n        a[b[field]] = b\n        return a\n      }, {})\n  },\n\n  /**\n   * Since the locale store isn't populated from the beginning, create\n   * the map once we have it. Then return it.\n   * @param {\"code3\" | \"code2\"} field\n   */\n  initLanguageMap(field: \"code3\" | \"code2\"): Record<string, Language> {\n    const map = field === \"code3\" ? allLanguagesMap : allLanguagesCode2Map\n\n    if (Object.keys(map).length > 0) return map\n    else {\n      if (field === \"code3\") {\n        allLanguagesMap = LangHelper._createLanguageMap(field)\n        return allLanguagesMap\n      }\n      else {\n        allLanguagesCode2Map = LangHelper._createLanguageMap(field)\n        return allLanguagesCode2Map\n      }\n    }\n  },\n}\n\nlet allLanguagesMap: Record<string, Language> = {}\nlet allLanguagesCode2Map: Record<string, Language> = {}\n\nconst _Language = {\n  allLanguages: (): Language[] => useLocale().languages,\n  allLanguagesMap: (): Record<string, Language> => LangHelper.initLanguageMap(\"code3\"),\n  allLanguagesCode2Map: (): Record<string, Language> => LangHelper.initLanguageMap(\"code2\"),\n\n  getLanguageNameByCode(code: string): string | undefined {\n    return _Language.allLanguagesMap()?.[code]?.name\n  },\n\n  getLanguageNameByCode2(code2: string): string | undefined {\n    return _Language.allLanguagesCode2Map()?.[code2]?.name\n  },\n\n  code3ToCode2(code3: string): string | undefined {\n    return _Language.allLanguagesMap()?.[code3]?.code2\n  },\n\n  code2ToCode3(code2: string): string | undefined {\n    return _Language.allLanguages()\n      .find(obj => obj.code2 === code2)?.code3\n  },\n\n  isValidCode(code3: string): boolean {\n    return Util.isSet(_Language.allLanguagesMap()?.[code3])\n  },\n\n  customSort(a: Language, b: Language): number {\n    const ordering: string[] = [\n      \"swe\", \"eng\", \"nor\", \"dan\", \"fin\", \"nld\",\n    ]\n\n    const aIndex = ordering.indexOf(a.code3)\n    const bIndex = ordering.indexOf(b.code3)\n\n    if (aIndex !== -1 && bIndex !== -1) return aIndex - bIndex\n    if (aIndex !== -1) return -1\n    if (bIndex !== -1) return 1\n    return a.name.localeCompare(b.name)\n  },\n}\n\nexport default _Language","import Util from \"@/modules/utils/util\"\nimport Locale from \"@/modules/utils/locales\"\n\n/**\n * Tag translation function\n */\nexport const _ = (key: string): string => Locale.translate(key)\n\n/**\n * Function to translate with arguments\n * Example: __('Hello_world', [_('cool')])\n * If the text in _resources.html is:\n * <res name=\"Hello_world\">Hello this {} world!</res>\n * Becomes:\n * Hello this cool world!\n * @param textId {string} - the name in _resources.html\n * @param arr {String[]} - if the object has keys that matches the text inside the\n * brackets, then the brackets and the key will be replaced by the text.\n * @returns {string} - the text with the arguments\n */\nexport const __ = (textId: string, arr: string[]): string => {\n  let text = _(textId)\n\n  if (Util.isNonEmptyArray(arr)) {\n    arr.forEach((val) => {\n      if (Util.isString(text)) {\n        text = text.replace(\"{}\", val)\n      }\n    })\n  }\n  return text\n}\n","import moment from \"moment\"\n\nimport { useLocale } from \"@/plugins/store/localestore\"\n\nimport {\n  Language,\n  Country,\n  Currency,\n  TimeZone,\n} from \"@/types\"\n\nexport default {\n  allLanguages(): Language[] {\n    return useLocale().languages\n  },\n  allCountries(): Country[] {\n    return useLocale().countries\n  },\n  allCurrencies(): Currency[] {\n    return useLocale().currencies\n  },\n  allTimeZones(): TimeZone[] {\n    return useLocale().timezones\n  },\n  translate(msg: string): string {\n    return useLocale().texts[msg] ?? msg\n  },\n  formatToIsoDate(input: string): string {\n    return moment(input).format(\"YYYY-MM-DD\")\n  },\n  dateTimeFormat(inp: string): string {\n    return moment(inp).format(\"YYYY-MM-DD HH:mm:ss\")\n  },\n  dateTimeShortFormat(inp: string): string {\n    return moment(inp).format(\"YYYY-MM-DD HH:mm\")\n  },\n  capitalize(val: string): string {\n    if (val?.length > 0) {\n      const head: string | undefined = val[0]\n      const tail: string = val.slice(1)\n\n      return head?.toUpperCase() + tail\n    }\n    return \"\"\n  },\n}\n","import { GroupedOptionObject } from \"@/types\"\n\n/* eslint-disable */\nexport interface SortOptionsType<T extends string = string> {\n  options: T[]\n  optionObject: GroupedOptionObject<T>\n\n  doGroupSort: () => void\n  sortOptions: () => GroupedOptionObject<T>\n  checkOptions: (group: T[], dataGroup: T[],\n                 forceDeselect: boolean) => T[]\n}\n/* eslint-enable */\n\nclass SortOptions<T extends string = string> implements SortOptionsType<T> {\n  options: T[]\n  optionObject: GroupedOptionObject<T>\n\n  constructor(options: T[]) {\n    this.options = options\n    this.optionObject = {}\n\n    this.doGroupSort()\n  }\n\n  doGroupSort(): void {\n    const defaultObject: GroupedOptionObject<T> = {}\n    this.optionObject = this.options.reduce((a, b) => {\n      const category: string | undefined = b.split(\".\")[0]\n\n      if (category) {\n        if (category in a && a && a[category]) {\n          a[category].push(b)\n        }\n        else {\n          a[category] = [ b ]\n        }\n      }\n\n      return a\n    }, defaultObject)\n  }\n\n  sortOptions(): GroupedOptionObject<T> {\n    return this.optionObject\n  }\n\n  checkOptions(group: T[], dataGroup: T[],\n    forceDeselect: boolean = false): T[] {\n    const clone = Array.of(...dataGroup)\n    const isParentChecked = group.every((op) => clone.includes(op))\n\n    if (forceDeselect || isParentChecked) {\n      return clone.filter((op) => !group.includes(op))\n    } else {\n      return clone.concat(...group)\n    }\n  }\n}\n\nexport default SortOptions\n","import moment from \"moment\"\nimport $ from \"jquery\"\n\nimport ResellerUser from \"@/modules/injected-js-handlers/reseller-user\"\n\nimport {\n  Undefined,\n} from \"@/types\"\n\nconst Util = {\n  isSet<T>(val: T | Undefined): val is T {\n    return val !== undefined && val !== null\n  },\n\n  /**\n   * Create a clone of the object or array\n   * @param val - the object or array to which you want to clone\n   */\n  deepClone(val: any): any {\n    return JSON.parse(JSON.stringify(val))\n  },\n\n  isObject<T extends Object>(obj: T | undefined | null): obj is T {\n    return typeof obj === \"object\" && obj !== null && !Array.isArray(obj)\n  },\n\n  isString(val: any): val is string {\n    return typeof val === \"string\"\n  },\n\n  isNonEmptyArray(arr: any): boolean {\n    return arr && Array.isArray(arr) && arr.length > 0\n  },\n\n  isEmptyArray(arr: any): boolean {\n    return arr && Array.isArray(arr) && arr.length === 0\n  },\n\n  notEmptyObject(obj: any): boolean {\n    return (\n      obj !== undefined && $.isPlainObject(obj) && Object.keys(obj).length > 0\n    )\n  },\n\n  getLocalizedDate(date: string): string {\n    const currentDate = moment()\n    const fromDate = moment(date)\n    const resellerLanguage = ResellerUser.language()\n\n    let locale = \"en\"\n    let format = \"MMM Do\"\n\n    if (resellerLanguage === \"swe\") {\n      locale = \"sv\"\n      format = \"Do MMM\"\n    }\n\n    if (fromDate.year() !== currentDate.year()) {\n      return fromDate.locale(locale).format(format + \" YYYY\")\n    } else {\n      return fromDate.locale(locale).format(format)\n    }\n  },\n\n  isEmptyObject(obj: any): boolean {\n    return Util.isObject(obj) && !Util.notEmptyObject(obj)\n  },\n\n  isNonEmptyText(text: any): boolean {\n    return Util.isSet(text) && typeof text === \"string\" && text.length > 0\n  },\n\n  addThousandSeparator(num: number): string {\n    return num\n      .toString()\n      .replace(/\\B(?=(\\d{3})+(?!\\d))/g, \" \")\n  },\n\n  intersection(arr1: string[], arr2: string[]): string[] {\n    if (Util.isNonEmptyArray(arr1) && Util.isNonEmptyArray(arr2)) {\n      return arr1.filter((v) => arr2.includes(v))\n    }\n    return []\n  },\n\n  isSafari(): boolean {\n    return navigator.userAgent.includes(\"Safari/\") && !Util.isChrome()\n  },\n\n  isChrome(): boolean {\n    return (\n      navigator.userAgent.includes(\"Chrome/\") &&\n      !navigator.userAgent.includes(\"Chromium/\")\n    )\n  },\n\n  getUniqueId(): string {\n    try {\n      return crypto.randomUUID()\n    }\n    catch {\n      const randStrFn = () => {\n        return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1)\n      }\n\n      return Array.of(...new Array(5)).map(() => randStrFn()).join(\"-\")\n    }\n  },\n}\n\nexport default Util\n","import { useTextHelpers } from \"@/composables/useTextHelpers\"\nimport {\n  Rule,\n  RuleCallback,\n} from \"@/types\"\n\nexport class Validation {\n  ref: HTMLFormElement\n  errors: string[]\n\n  constructor(ref: HTMLFormElement) {\n    this.ref = ref\n    this.errors = []\n\n    this.checkForErrors()\n  }\n\n  checkForErrors(): void {\n    this.errors = []\n\n    for (let i in this.ref?.inputs || {}) {\n      let inp = this.ref.inputs[i]\n      inp.validate()\n\n      for (let j in inp.errorBucket) {\n        let err = inp.errorBucket[j]\n        const field = inp.$attrs[\"rule-label\"] || inp.label\n        this.errors.push(`Field: ${field}. Message: ${err}`)\n      }\n    }\n  }\n\n  hasErrors(): boolean {\n    return this.errors.length > 0\n  }\n\n  getErrors(): string[] {\n    return this.errors\n  }\n\n  getErrorString(): string {\n    return this.getErrors().join(\"\\n\")\n  }\n}\n\nexport interface DefaultValidatorsType {\n  /* eslint-disable */\n  isUnset(value: any): boolean\n  required(value: any): Rule\n  requiredOnCreate(isCreate: boolean): RuleCallback\n  minLength(len: number): RuleCallback\n  isEmail(value: any): Rule\n  isUri(value: any): Rule\n  passWordMatch(password: any, confirm: any): RuleCallback\n  correctLoginFormat(): RuleCallback\n  /* eslint-enable */\n}\n\nconst translate = (val: string): string => useTextHelpers().translate(val)\n\nconst translateWithArgs = (val: string, args: string[]): string => useTextHelpers().translateWithArgs(val, args)\n\nexport const DefaultValidators: DefaultValidatorsType = {\n  isUnset(value: any): boolean {\n    return value === undefined || value === null || value === \"\"\n  },\n\n  required(value: any): Rule {\n    if (DefaultValidators.isUnset(value)) return translate(\"Cannot_be_empty\")\n    return true\n  },\n\n  requiredOnCreate(isCreate: boolean): RuleCallback {\n    return (value: any): Rule => {\n      if (isCreate && DefaultValidators.isUnset(value))\n        return translate(\"Cannot_be_empty\")\n      return true\n    }\n  },\n\n  minLength(len: number): RuleCallback {\n    return (value: any): Rule => {\n      if (!value || value.length < len) return translateWithArgs(\"Must_be_at_least\", [ len + \"\" ])\n      else return true\n    }\n  },\n\n  isEmail(value: any): Rule {\n    let check = (): boolean => {\n      if (!value || value.length < 1) return true\n\n      let parts = value.split(\"@\")\n      if (parts.length !== 2) return false\n\n      let user = parts[0]\n      let domain = parts[1]\n\n      if (user.length < 1) return false\n      if (domain.length < 3) return false\n\n      return true\n    }\n\n    if (check()) return true\n    else return translate(\"Not_an_email_address\")\n  },\n\n  isUri(value: any): Rule {\n    const regex = /^http(s|):\\/\\/.+$/\n    if (!value || value.length < 1) return true\n    if (!regex.test(value)) return translate(\"Not_proper_uri\")\n    return true\n  },\n\n  passWordMatch(password: any, confirm: any): RuleCallback {\n    return (): Rule => {\n      if (password !== confirm) return translate(\"Password_confirmation_must_match\")\n      else return true\n    }\n  },\n\n  correctLoginFormat(): RuleCallback {\n    const regex = /^[a-z0-9_@.-]+$/\n    return (value: any): Rule => {\n      if (regex.test(value)) return true\n      return translate(\"Contains_unsupported_characters\")\n    }\n  },\n}\n","import Vue, { Component, Ref } from \"vue\"\n\nimport Util from \"@/modules/utils/util\"\n\nconst VueHelper = {\n  /**\n   * When we have a dialog that is mounted in runtime as compared to being mounted in the beginning\n   * of a page life cycle we need to make sure that the dialog is fully available. This special use\n   * case is for dialogs that are available yet rarely used. See example with connector dialogs.\n   *\n   * It would be memory consuming to load all Vue Components on page visit as a user may have\n   * many dialogs and be able to add many more. If we have the option to add these dialogs\n   * they will take a lot of memory. By using this waitForRender method we can reduce all the\n   * dialogs to a single dialog. By using the Vue dynamic component:\n   * https://vuejs.org/v2/guide/components-dynamic-async.html\n   *\n   * We can mount the component in runtime and if we do that we need to make sure it is ready before\n   * we call on certain methods in the component.\n   * @param _this - the vue instance object of the component\n   * @param refName - the name of the ref component\n   * @param functionName - the name of the method you want to access\n   * @returns the component that is rendered\n   */\n  waitForRender(_this: Vue, refName: string = \"dialog\",\n    functionName: string = \"open\"): Promise<Element | Vue> {\n    const checkFunction = (refObj: Ref<Component>): boolean => {\n      const checkFn = (obj: any): boolean => typeof(obj) === \"object\" && functionName in obj &&\n        obj[functionName] !== undefined &&\n        typeof(obj[functionName]) === \"function\"\n\n      if (Array.isArray(refObj) && Util.isNonEmptyArray(refObj)) {\n        return checkFn(refObj[0])\n      } else {\n        return checkFn(refObj)\n      }\n    }\n\n    const checkProperty = (refObj: Ref<Component>): boolean => {\n      // Check that the component is fully mounted\n      const doCheck = (obj: any): boolean => obj && obj._isVue && obj._isMounted || false\n\n      if (Array.isArray(refObj) && Util.isNonEmptyArray(refObj)) {\n        return doCheck(refObj[0])\n      } else {\n        return doCheck(refObj)\n      }\n    }\n\n    const getRefObj = (): any => {\n      // Check that the $refs object has been initialized\n      return _this?.$refs?.[refName]\n    }\n\n    /* Wait for dynamic dialog ref to render */\n    return new Promise((res) => {\n      const interval = setInterval(() => {\n        try {\n          const refObj = getRefObj()\n\n          // Is Vue Ref object initialized\n          if (!refObj) return\n\n          // Check if function is ready\n          let isReady\n          if (Util.isSet(functionName)) {\n            isReady = checkFunction(refObj) && checkProperty(refObj)\n          } else {\n            isReady = checkProperty(refObj)\n          }\n\n          if (isReady) {\n            res(refObj)\n            clearInterval(interval)\n          }\n        }\n        // eslint-disable-next-line no-unused-vars\n        catch (e) {\n          clearInterval(interval)\n        }\n        // Check every 100ms if the dialog is rendered\n      }, 50)\n    })\n  },\n}\n\nexport default VueHelper\n","import Vue from \"vue\"\nimport { createPinia, setActivePinia, PiniaVuePlugin } from \"pinia\"\nimport createPersistedState from \"pinia-plugin-persistedstate\"\n\nVue.use(PiniaVuePlugin)\n\nconst pinia = createPinia()\npinia.use(createPersistedState)\n\n/* Allows calling stores (e.g. useLocale()) from modules that get\n * evaluated before the root Vue instance is constructed. */\nsetActivePinia(pinia)\n\nexport default pinia","export enum StoreKeys {\n  // eslint-disable-next-line no-unused-vars\n  Dialog = \"dialog\",\n  // eslint-disable-next-line no-unused-vars\n  Locale = \"locale\",\n  // eslint-disable-next-line no-unused-vars\n  Sidebar = \"sidebar\",\n}","import { defineStore } from \"pinia\"\n\nimport { StoreKeys } from \"@/plugins/store\"\n\nimport type { Country, Currency, Language, TimeZone } from \"@/types\"\n\ninterface LocaleStoreState {\n  countries: Country[]\n  currencies: Currency[]\n  languages: Language[]\n  texts: Record<string, string>\n  timezones: TimeZone[]\n}\n\nconst state: LocaleStoreState = {\n  countries: [],\n  currencies: [],\n  languages: [],\n  texts: {},\n  timezones: [],\n}\n\nexport const useLocale = defineStore(StoreKeys.Locale, {\n  state: (): LocaleStoreState => state,\n\n  actions: {\n    setLocale(data: LocaleStoreState): void {\n      this.countries = data.countries\n      this.currencies = data.currencies\n      this.languages = data.languages\n      this.texts = data.texts\n      this.timezones = data.timezones\n    },\n  },\n})\n","import Locale from \"@/modules/utils/locales\"\nimport { _, __ } from \"@/modules/utils/localehelpers\"\nimport Language from \"@/modules/utils/language\"\nimport Country from \"@/modules/utils/country\"\nimport BuildInfo from \"@/modules/injected-js-handlers/buildInfo\"\nimport Debouncer from \"@/modules/utils/debounce\"\nimport Help from \"@/modules/help\"\nimport Reseller from \"@/modules/injected-js-handlers/reseller\"\nimport ResellerUser from \"@/modules/injected-js-handlers/reseller-user\"\nimport SortOptions from \"@/modules/utils/sort-options\"\nimport Stats from \"@/modules/managers/stats\"\nimport Tenant from \"@/modules/managers/tenant\"\nimport TenantTemplate from \"@/modules/managers/tenant-template\"\nimport Util from \"@/modules/utils/util\"\nimport { DefaultValidators, Validation } from \"@/modules/utils/validators\"\nimport VueHelper from \"@/modules/utils/vuehelper\"\nimport { DataTableQuery } from \"@/modules/libs/datatablequery\"\nimport { QueryBuilder } from \"@/modules/libs/querybuilder\"\nimport AssistantUtils from \"@/modules/tenant-edit-dialog/assistant-utils\"\nimport { SalesFlowUtils } from \"@/modules/tenant-edit-dialog/sales-flow-utils\"\nimport { TenantEditDialogUtils } from \"@/modules/tenant-edit-dialog/tenant-edit-dialog-utils\"\nimport Session from \"@/modules/managers/session\"\n\nconst Modules = {\n  Locale,\n  _,\n  __,\n  Language,\n  Country,\n  BuildInfo,\n  Debouncer,\n  Help,\n  Reseller,\n  ResellerUser,\n  SortOptions,\n  Stats,\n  Tenant,\n  TenantTemplate,\n  Util,\n  DefaultValidators,\n  Validation,\n  VueHelper,\n  DataTableQuery,\n  QueryBuilder,\n  AssistantUtils,\n  SalesFlowUtils,\n  TenantEditDialogUtils,\n  Session,\n}\n\nexport default Modules","import \"@/plugins/pinia\"\n\nimport $ from \"jquery\"\nimport Locale from \"@/modules/utils/locales\"\nimport Modules from \"@/modules\"\n\nwindow.jQuery = $\nwindow._ = Locale.translate\nwindow.Modules = Modules","/* eslint-disable no-unused-vars */\nexport enum BadgeStatus {\n  Warning = \"warning\",\n  Error = \"error\",\n  Success = \"success\",\n  Neutral = \"neutral\",\n}\n/* eslint-enable no-unused-vars */\n","import type { BadgeStatus } from \"@/types/badge\"\nimport type { ResellerPermission } from \"@/types/generated/com.nodefactory.diehard.reseller.ResellerPermission\"\nimport type { UserPermission } from \"@/types/generated/com.nodefactory.diehard.tenant.UserPermission\"\n\ninterface TypeCheckable {\n  type: string\n}\n\ninterface CoreRecord {\n  created?: string,\n  createdBy?: string,\n  lastModified?: string,\n  lastModifiedBy?: string,\n}\n\ninterface QueryTypeCheckable extends TypeCheckable {}\ninterface TenantOptionRuleCheckable extends TypeCheckable {}\n\nfunction is<T extends QueryTypeCheckable | TenantOptionRuleCheckable>(\n  ident: string, field: keyof T, variable: T): boolean {\n  return variable[field] === ident\n}\n\nexport function isAnd(variable: QueryTypeCheckable | And): variable is And {\n  return is(\"and\", \"type\", variable)\n}\n\nexport function isOr(variable: QueryTypeCheckable | Or): variable is Or {\n  return is(\"or\", \"type\", variable)\n}\n\nexport function isEQ(variable: QueryTypeCheckable | EQ): variable is EQ {\n  return is(\"eq\", \"type\", variable)\n}\n\nexport function isNE(variable: QueryTypeCheckable | NE): variable is NE {\n  return is(\"ne\", \"type\", variable)\n}\n\nexport function isGT(variable: QueryTypeCheckable | GT): variable is GT {\n  return is(\"gt\", \"type\", variable)\n}\n\nexport function isGE(variable: QueryTypeCheckable | GE): variable is GE {\n  return is(\"ge\", \"type\", variable)\n}\n\nexport function isLT(variable: QueryTypeCheckable | LT): variable is LT {\n  return is(\"lt\", \"type\", variable)\n}\n\nexport function isLE(variable: QueryTypeCheckable | LE): variable is LE {\n  return is(\"le\", \"type\", variable)\n}\n\nexport function isContains(variable: QueryTypeCheckable | Contains): variable is Contains {\n  return is(\"substring\", \"type\", variable)\n}\n\nexport function isCustomData(\n  variable: QueryTypeCheckable | FilterClauseWithCustomData):\n  variable is FilterClauseWithCustomData {\n  return is(\"customdata\", \"type\", variable)\n}\n\nexport function isFilterClauseWithFieldValue(variable: QueryTypeCheckable | FilterClauseWithFieldValue):\n  variable is FilterClauseWithFieldValue {\n  const identifiers = [\n    \"eq\",\n    \"ne\",\n    \"substring\",\n    \"lt\",\n    \"le\",\n    \"gt\",\n    \"ge\",\n    \"customdata\",\n  ]\n\n  return identifiers.some(ident => is(ident, \"type\", variable))\n}\n\nexport function isFilterClauseWithSubclauses(variable: QueryTypeCheckable | FilterClauseWithSubclauses):\n  variable is FilterClauseWithSubclauses {\n  const identifiers = [\n    \"or\",\n    \"and\",\n  ]\n\n  return identifiers.some(ident => is(ident, \"type\", variable))\n}\n\nexport interface TenantOptionRule extends TenantOptionRuleCheckable {\n  ruleTag: string\n}\n\nexport interface TenantOptionRuleOpt extends TenantOptionRule {\n  tenantOption: string\n  type: \"Opt\"\n}\n\nexport interface TenantOptionRuleChildren extends TenantOptionRule {\n  children: TenantOptionRule[]\n}\n\nexport interface TenantOptionRuleChildrenAll extends TenantOptionRuleChildren {\n  system: string\n  type: \"AllOf\"\n}\n\nexport interface TenantOptionRuleConditional extends TenantOptionRule {\n  condition: TenantOptionRule\n  body: TenantOptionRule[]\n}\n\nexport interface TenantOptionRuleChildrenAny extends TenantOptionRuleChildren {\n  allowMultiple: boolean\n  type: \"AnyOf\"\n}\n\nexport interface TenantOptionRuleChildrenNoneOf extends TenantOptionRuleChildren {\n  type: \"NoneOf\"\n}\n\nexport interface TenantOptionRuleIf extends TenantOptionRule {\n  condition: TenantOptionRule\n  body: TenantOptionRule[]\n  type: \"If\"\n}\n\nexport interface Selectable {\n  system: string,\n  available: boolean,\n  missingOpts: string[],\n}\n\nexport interface TenantOptionRuleGroup {\n  systems: string[]\n  ruleTag: string\n  label: string\n  allowMultiple: boolean\n  children: Record<string, string[]>,\n  selectable: Record<string, Selectable>,\n}\n\nexport function isAnyOf(\n  variable: TenantOptionRuleCheckable | TenantOptionRuleChildrenAny | undefined):\n  variable is TenantOptionRuleChildrenAny {\n  if (!variable) return false\n  return is(\"AnyOf\", \"type\", variable)\n}\n\nexport function isAllOf(\n  variable: TenantOptionRuleCheckable | TenantOptionRuleChildrenAll | undefined):\n  variable is TenantOptionRuleChildrenAll {\n  if (!variable) return false\n  return is(\"AllOf\", \"type\", variable)\n}\n\nexport function isNoneOf(\n  variable: TenantOptionRuleCheckable | TenantOptionRuleChildrenNoneOf | undefined):\n  variable is TenantOptionRuleChildrenNoneOf {\n  if (!variable) return false\n  return is(\"NoneOf\", \"type\", variable)\n}\n\nexport function isOpt(\n  variable: TenantOptionRuleCheckable | TenantOptionRuleOpt | undefined):\n  variable is TenantOptionRuleOpt {\n  if (!variable) return false\n  return is(\"Opt\", \"type\", variable)\n}\n\nexport function isConditionalIf(\n  variable: TenantOptionRuleCheckable | TenantOptionRuleIf | undefined):\n  variable is TenantOptionRuleIf {\n  if (!variable) return false\n  return is(\"If\", \"type\", variable)\n}\n\ninterface FilterValue {\n  value: any\n  type: any\n}\n\nexport interface FilterValueBoolean extends FilterValue {\n  value: boolean\n}\n\nexport interface FilterValueNumber extends FilterValue {\n  value: number\n}\n\nexport interface Filter {\n  subclauses: FilterClause[]\n  type: string\n}\n\nexport interface FilterClause extends QueryTypeCheckable {}\n\nexport interface FilterClauseWithSubclauses extends FilterClause {\n  subclauses: FilterClauseWithFieldValue[]\n}\n\ninterface FilterClauseWithField extends FilterClause {\n  field: string\n}\n\nexport interface FilterClauseWithFieldValue extends FilterClauseWithField {\n  value: FilterValue\n}\n\nexport interface FilterClauseWithCustomData extends FilterClauseWithFieldValue {\n  value: FilterValue\n  moduleId: string\n  key: string\n  connectionId: string | undefined\n  type: \"customdata\"\n}\n\nexport interface EQ extends FilterClauseWithFieldValue {\n  type: \"eq\"\n}\nexport interface NE extends FilterClauseWithFieldValue {\n  type: \"ne\"\n}\nexport interface GT extends FilterClauseWithFieldValue {\n  type: \"gt\"\n}\nexport interface GE extends FilterClauseWithFieldValue {\n  type: \"ge\"\n}\nexport interface LT extends FilterClauseWithFieldValue {\n  type: \"lt\"\n}\nexport interface LE extends FilterClauseWithFieldValue {\n  type: \"le\"\n}\nexport interface Contains extends FilterClauseWithFieldValue {\n  type: \"substring\"\n}\nexport interface And extends FilterClauseWithSubclauses {\n  type: \"and\"\n}\nexport interface Or extends FilterClauseWithSubclauses {\n  type: \"or\"\n}\n\n/* eslint-disable */\nexport enum FilterClauses {\n  EQ = \"eq\",\n  NE = \"ne\",\n  GT = \"gt\",\n  GE = \"ge\",\n  LT = \"lt\",\n  LE = \"le\",\n  Contains = \"substring\",\n  Or = \"or\",\n  And = \"and\",\n}\n/* eslint-enable */\n\nexport interface Query {\n  offset: number,\n  numRecords: number,\n  order: Ordering[],\n  deletedFlag: DeletedFlag,\n  filter?: Filter | undefined,\n}\n\n/* eslint-disable */\nexport enum QueryDirection {\n  ascending = \"ascending\",\n  descending = \"descending\"\n}\n/* eslint-enable */\n\n/* eslint-disable */\nexport enum DeletedFlag {\n  NotDeleted = \"not-deleted\",\n  Deleted = \"only-deleted\",\n  Both = \"both\",\n}\n/* eslint-enable */\n\nexport interface Ordering {\n  direction: QueryDirection,\n  field: string\n}\n\nexport interface DataTableOptions<Item> {\n  itemsPerPage: number,\n  page: number,\n  sortBy: Array<keyof Item>,\n  sortDesc: Array<boolean>\n}\n\nexport type HeaderType = \"datetime\"\nexport type SortableAndFilterableType = \"string\" | \"int\" | \"decimal\" | \"bool\" | \"datetime\"\n\nexport interface FilterableItem {\n  text: string\n  value: string\n  // Show the item as a status badge in the filter list\n  badge?: BadgeStatus\n}\n\nexport interface FilterableProps {\n  [key: string]: FilterableItem[]\n}\n\nexport interface Assistant {\n  id?: string,\n  code?: string,\n  comments?: string,\n  name?: string,\n  parameters?: Record<string, string>,\n}\n\nexport interface ConnectorObject {\n  opt: string,\n  name: string,\n  value: string,\n  group: string,\n  wizardEnabled?: boolean,\n  stepperWizard?: boolean,\n  byPartner?: boolean,\n  hasNoConfig?: boolean,\n  componentName?: string,\n}\n\nexport interface AssistantParameter {\n  fieldName?: string,\n  type?: string,\n  defaultValue?: string,\n  values?: string[],\n}\n\nexport interface AssistantDefinition {\n  code: string,\n  name: string,\n  description: string,\n  requiredOptions: TenantOptionRule[],\n  parameters: Record<string, AssistantParameter>,\n}\n\ninterface ConnectorOptionsPerConnector {\n  maxConnections?: number | undefined,\n}\n\nexport interface ConnectorOptions {\n  maxTotalConnections?: number | undefined,\n  defaultMaxConnections?: number | undefined,\n  perConnector?: Record<string, ConnectorOptionsPerConnector> | undefined,\n}\n\nexport interface TenantCommon extends CoreRecord {\n  localId?: string,\n  customData?: any\n\n  defaultLanguage?: string | undefined,\n  languages?: string[],\n\n  defaultCountry?: string | undefined,\n  countries?: string[],\n\n  defaultTimeZone?: string | undefined,\n\n  options?: string[],\n  whiteLabel?: string | undefined,\n\n  assistants?: Assistant[],\n  connectorOptions?: ConnectorOptions,\n  shardCost?: number | null,\n}\n\nexport interface Tenant extends TenantCommon {\n  codeName?: string,\n  resellerCodeName?: string,\n  active?: boolean,\n\n  fullName?: string,\n  email?: string,\n\n  customerReference?: string,\n  comments?: string,\n\n  shardId?: number,\n\n  fixedCost?: number,\n}\n\nexport interface TenantTemplate extends TenantCommon {\n  code: string | undefined\n  name?: string\n  description?: string\n\n  tenantComments?: string\n}\n\nexport interface TenantUser extends CoreRecord {\n  login?: string,\n  localId?: string,\n  userType?: string,\n  fullName?: string,\n  email?: string,\n\n  defaultLanguage?: string,\n\n  pwd?: string,\n\n  permissions?: string[],\n  antiPermissions?: string[],\n}\n\nexport interface Reseller extends CoreRecord {\n  codeName: string,\n  active: boolean,\n  language: string,\n\n  options: string[],\n  allowableTenantOptions: string[],\n\n  customerReference?: string,\n  tenantPrefix?: string,\n\n  webhookConfig?: any,\n  tenantStatsConfig?: any,\n\n  userAuthConfigType?: string,\n}\n\nexport interface ResellerUser extends CoreRecord {\n  login?: string,\n  localId?: string,\n  userType?: string,\n  fullName?: string,\n  email?: string,\n\n  pwd?: string,\n  language?: string,\n\n  permissions?: (ResellerPermission | UserPermission)[],\n}\n\nexport interface Header {\n  text: string,\n  value: string,\n  filterField?: string,\n  type?: HeaderType,\n  headerType?: HeaderType,\n  filterType?: SortableAndFilterableType,\n  multiple?: boolean,\n  filterable?: boolean,\n  searchable?: boolean,\n  sortable?: boolean,\n  selections?: keyof FilterableProps\n  attach?: boolean,\n  width?: number,\n}\n\ninterface Response {\n  OK: boolean\n}\n\nexport interface SuccessResponse extends Response {\n  OK: true\n}\n\nexport interface FailureResponse extends Response {\n  OK: false\n  err: string\n}\n\nexport type RecordType = \"customer\" | \"order\" | \"orderrow\" |\n  \"invoice\" | \"invoicerow\" | \"supplierinvoice\" | \"supplierinvoicerow\" |\n  \"shipment\" | \"product\" | \"pricelist\" | \"productcategory\" |\n  \"productvariantgroup\" | \"attribute\" | \"contengroup\" | \"paymentmethod\" |\n  \"paymenttransaction\" | \"paymenttransactionevent\" | \"cashregister\" |\n  \"zreport\" | \"settlementreport\" | \"ledgeraccount\" | \"ledgerentry\" |\n  \"ledgerentryrow\"\n\nexport type Direction = \"import\" | \"export\" | \"bidi\" | \"na\"\n\nexport interface TransferStatsSummmaryMeta {\n  tenant: string,\n  date: string,\n  recordType: RecordType,\n  direction: Direction\n}\n\nexport interface TransferStatsSummary {\n  meta: TransferStatsSummmaryMeta,\n  numberOfTransfers: number\n  numConsiderd: number\n  numFailed: number\n  numIgnored: number\n  numCreated: number\n  numUpdated: number\n  numUnchanged: number\n  numOther: number\n}\n\nexport interface TenantIssueSummary {\n  hour: string\n  tenantCodeName: string\n  numIssues: number\n  tenantName: string\n}\n\nexport interface TenantIssueSummaryWithChange extends TenantIssueSummary {\n  numIssuesChange: number\n}\n\nexport type Rule = true | string\n\n// eslint-disable-next-line\nexport type RuleCallback = (v?: any) => Rule\n\n// eslint-disable-next-line\nexport type Reject = (reason?: any) => void\n\nexport type GroupedOptionObject<T extends string = string> = Record<string, T[]>\n\n/* eslint-disable */\nexport enum RequestTenantCount {\n  TenantCounts = \"tenantCounts\",\n  TenantCountsPerAssistant = \"tenantCountsPerAssistant\",\n  TenantCountsPerConnector = \"tenantCountsPerConnector\",\n  TenantCountsPerCountry = \"tenantCountsPerCountry\",\n  TenantCountsPerOption = \"tenantCountsPerOption\",\n}\n/* eslint-enaable */\n\n/* eslint-disable */\nexport enum TenantCountTypes {\n  TenantCount = \"TenantCount\",\n  TenantCountPerAssistant = \"TenantCountPerAssistant\",\n  TenantCountPerConnector = \"TenantCountPerConnector\",\n  TenantCountPerCountry = \"TenantCountPerCountry\",\n  TenantCountPerOption = \"TenantCountPerOption\",\n}\n/* eslint-enaable */\n\nexport interface TenantCountsSuper {\n  hour: string,\n  type: string,\n}\n\nexport interface TenantCounts extends TenantCountsSuper {\n  activeCount: number,\n  inactiveCount: number,\n  totalCount: number,\n}\n\nexport interface TenantCountsPerAssistant extends TenantCountsSuper {\n  assistantCode: string,\n  count: number,\n}\n\nexport interface TenantCountsPerConnector extends TenantCountsSuper {\n  connectorCode: string,\n  count: number,\n}\n\nexport interface TenantCountsPerCountry extends TenantCountsSuper {\n  country: string,\n  count: number,\n}\n\nexport interface TenantCountsPerOption extends TenantCountsSuper {\n  option: string,\n  count: number,\n}\n\nexport type NormalValue = string | boolean | number | object\nexport type Undefined = undefined | null\nexport type Defined<T> = T extends Undefined ? never : T\n\nexport interface CredentialParameterDefinition {\n  type: string,\n  fieldName: string,\n  name: string,\n  mandatory: boolean,\n  secret: boolean,\n}\n\ninterface StringParameterDefinition\n  extends CredentialParameterDefinition {\n  secret: false,\n  value: string,\n  type: \"StringParam\",\n}\n\ninterface NumberParameterDefinition\n  extends CredentialParameterDefinition {\n  secret: false,\n  value: number,\n  type: \"IntegerParam\",\n}\n\ninterface SecretParameterDefinition\n  extends CredentialParameterDefinition {\n  secret: true,\n}\n\nexport interface SecretStringParameterDefinition {\n  secret: false,\n  value: string,\n  type: \"SecretParam\",\n}\n\nexport interface CredentialParameterSecretFileData\n  extends SecretParameterDefinition {\n  fileTypes?: string[],\n  maxFileSize?: number,\n  type: \"SecretFileDataParam\",\n}\n\nexport const isSecretFileDataParam = (param: CredentialParameterDefinition):\n  param is SecretParameterDefinition => {\n  return param.type === \"SecretFileDataParam\"\n}\n\nexport interface CredentialDefinition {\n  type: string,\n  name: string,\n  description: string,\n  allowAnyTag: string,\n  knownTags: string,\n  requiredAllowableTenantOptions: string,\n  parameterDefinitions: CredentialParameterDefinition[],\n  allowMultipleTagged: string,\n}\n\nexport interface Credential {\n  type?: string,\n  connectorType?: string,\n  tag?: string,\n  comments?: string,\n  lastModified?: string,\n  lastModifiedBy?: string,\n  parameters: Record<string, any>,\n  hasParams?: boolean,\n  hasSecrest?: boolean,\n}\n\nexport interface OAuth2ClientCredential\n  extends CredentialDefinition {\n  parameters: {\n    clientId: StringParameterDefinition,\n    clientSecret: SecretStringParameterDefinition,\n  },\n}\n\nexport interface TlsCertificateCredential\n  extends CredentialDefinition {\n  parameters: {\n    certificatePassword: SecretStringParameterDefinition,\n    certificateData: CredentialParameterSecretFileData,\n  },\n}\n\nexport type ConnectorSupportingCredential = {\n  typeCode: string,\n  creds: CredentialDefinition[],\n}\n\nexport type CountHour = {\n  hour: string,\n  count: number,\n}\n\nexport interface StatsGroup {\n  start: CountHour,\n  end: CountHour,\n\n  change: number,\n  changePercentage: number,\n  percentage: number | undefined,\n  timeline: Record<string, number>  | undefined,\n  color: string | undefined,\n  value: string | undefined,\n  title: string | undefined,\n}\n\nexport enum EditType {\n  Tenant = \"Tenant\",\n  User = \"User\",\n}","/* eslint-disable no-unused-vars */\nexport enum ThemeMode {\n  Dark = \"dark\",\n  Light = \"light\",\n}\n/* eslint-enable no-unused-vars */\n","/* eslint-disable no-unused-vars */\nexport enum WhiteLabel {\n  Stripe = \"stripe\",\n  Embedded_Shiplink = \"embedded_shiplink\",\n  Embedded_Sendify = \"embedded_sendify\",\n  Fortnox = \"fortnox\",\n}\n/* eslint-enable no-unused-vars */\n","/* eslint-disable no-unused-vars */\nexport enum AuthType {\n  OpenIDConnect = \"OpenIDConnect\",\n  UserPassword = \"UserPassword\",\n}\n/* eslint-enable no-unused-vars */\n","/* eslint-disable no-unused-vars */\nexport enum IntervalUnit {\n  Days = \"days\",\n  Months = \"months\",\n  Custom = \"custom\",\n}\n\nexport enum ChartDirection {\n  Import = \"import\",\n  Export = \"export\",\n}\n/* eslint-enable no-unused-vars */\n","/* *********** GENERATED FILE! DON'T POKE *****************\n * Original class:\n *   com.nodefactory.diehard.ui.assistants.AssistantDefinition$\n */\nexport enum AssistantDefinition {\n  LedgerEntryTransferSettlement = \"ledger-entry-transfer-settlement\",\n  Auth = \"auth\",\n  ZReportSettlement = \"zreport-settlement\",\n  OrderAutoLedgerEntrySettlement = \"order-auto-ledger-entry-settlement\",\n  OrderTransfer = \"order-transfer\",\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tif (!(moduleId in __webpack_modules__)) {\n\t\tdelete __webpack_module_cache__[moduleId];\n\t\tvar e = new Error(\"Cannot find module '\" + moduleId + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + (chunkId === 4528 ? \"chunk-user-lang-select\" : chunkId) + \".js?id=\" + __webpack_require__.h().slice(0, 8) + \"\";\n};","__webpack_require__.h = () => (\"3a7703d23a5f46a81ff4\")","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t9423: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunk\"] = self[\"webpackChunk\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [2076], () => (__webpack_require__(2905)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","useTextHelpers","_","val","translate","translateWithArgs","args","__","isSet","capitalize","v","isEmptyObject","obj","notEmptyObject","isNonEmptyArray","arr","isNonEmptyText","text","dateTimeFormat","deepClone","isInt","possibleInt","isNaN","parseInt","isFloat","possibleFloat","parseFloat","translateCountry","countryCode","getCountryNameByCode3","asDefinedString","String","nonEmptyString","this","length","HELP_URL","parseArticle","raw","match","meta","line","split","kv","headings","html","renderer","heading","tokens","depth","parser","parseInline","id","toLowerCase","normalize","replace","slugify","push","parse","async","fetchText","url","res","fetch","ok","Error","status","cache","sections","lang","files","JSON","langs","Set","map","k","resolved","has","Map","keys","filter","startsWith","sort","raws","Promise","all","key","forEach","index","folder","file","slug","section","get","title","articles","set","Array","from","values","getHelp","isTestMode","window","applicationInfo","testMode","siteName","versionNumber","buildNumber","backendName","ResellerUser","login","__resellerUser","fullName","email","language","permissions","expandedPermissions","hasPermission","perm","perms","isArray","includes","isReseller","userType","isAdmin","Reseller","codeName","__reseller","name","defaultWhiteLabel","tenantWhiteLabel","allowableTenantOptions","options","hasAllowableTenantOption","opt","hasOption","country","timeZone","DataTableQuery","constructor","reloadCallback","queryBuilder","debouncer","setOptions","updateList","page","itemsPerPage","sortBy","sortDesc","sortByHead","sortDescHead","undefined","setOrder","setNumRecords","offset","setOffset","debounce","getQuery","setDeletedFlagFilter","flag","setDeletedFlag","QueryBuilder","filters","orderField","ascendingOrDescending","deletedFlag","numRecords","order","direction","descending","field","NotDeleted","getFilter","ascending","type","subclauses","addFilter","removeFilter","findIndex","filterA","filterB","moduleId","filterAFields","filterBFields","clauses","s","c","intersection","filterAreEq","splice","reseller","password","sessionServerFuncs","logout","changeLanguage","checkAuthTypeOrRedirect","dailySummarizedTransferStats","to","list","rej","statsServerFuncs","fromTime","toTime","then","response","catch","error","done","tenantsWithIssues","fromDate","subtract","startOf","format","toDate","endOf","allTenantsWithIssues","tenantsIssues","tenant","numIssues","savedIssues","previousTenants","resolve","reject","requestTenantTransferIssuesCounts","issues","sortByLatest","a","b","Date","hour","getTime","issue","tenantCodeName","existing","find","x","Math","max","processIssueData","requestTenantCounts","TenantCounts","counts","fail","requestTenantCountsPerAssistant","TenantCountsPerAssistant","requestTenantCountsPerConnector","TenantCountsPerConnector","requestTenantCountsPerCountry","TenantCountsPerCountry","requestTenantCountsPerOption","TenantCountsPerOption","listTenantTemplates","data","tenantServerFuncs","result","getTenantTemplate","localId","createTenantTemplate","template","editTenantTemplate","deleteTenantTemplate","OK","availableAssistants","assistants","getTenantByCodeName","err","loginAsTenant","path","open","saveTenant","tenantData","listTenants","query","count","tenants","tenantBatch","deleteTenant","ruleAccepts","rule","tenantOptions","tenantOption","children","every","some","condition","body","AssistantUtils","accepts","holder","acceptsHelperFunc","opts","elements","collect","element","helperFunc","any","subHolder","checkFn","_collect","checkBodyFn","checkCondFn","of","getGroups","definition","availableTenantOptions","currentTenantOptions","groups","definedGroups","requiredOptions","r","ruleTag","group","systems","getSystems","label","allowMultiple","selectable","system","getGroupBySystem","missing","available","missingOpts","reduce","origin","getOptsInGroupBySystem","Object","el","condHolder","flatMap","getOptsInGroup","allAvailable","getOpts","Group","SalesFlowUtils","assistantPlugDefinition","OrderTransfer","requiredOpts","EndsWith","value","import","Equals","Shiplink","export","shipments","OrderAutoLedgerEntrySettlement","payouts","Contains","ledgerentries","LedgerEntryTransferSettlement","transactions","orders","invoices","ZReportSettlement","sourceTypeOptions","Orders","byline","compatibleWith","assistantCode","LedgerEntries","ZReports","destinationTypeOptions","getSystemOpt","getPlugOpt","o","getPlugs","plugObjects","plug","StartsWith","endsWith","connObj","p","connection","getRootOptions","assistantDefinition","allRules","requiredRule","visibleAvailableAssistants","assistantDefinitions","assistant","allowedSourceTypeOptions","compatibleAssistants","assCode","assistantDef","ass","code","head","sources","A","allowedDestinationTypeOptions","visibleSourceTypeOptions","sourceType","destinationType","visibleDestinationTypeOptions","d","isCompatibleWithSourceType","isCompatibleWith","TenantEditDialogUtils","getSystemOptPrefixFromSystem","clearGroupSelection","systemOptPrefix","doChangeGroupSelection","changeGroupSelection","newOptList","otherSystem","isGroupActive","addOptsOrRemove","indexOf","getAssistantDefinition","SalesFlowType","RequiredOptType","PartnerOption","CountryCode","CountryHelper","_createCountryMap","allCountries","code2Map","code3Map","init","_Country","getCountryFromCode","countryCode2ToCode3","code2","code3","countryCode3ToCode2","convertCountryToUnicodeFlag","magicUnicodeNr","toString","toUpperCase","char","fromCodePoint","charCodeAt","join","time","timeoutId","callback","newTime","clearTimeout","setTimeout","LangHelper","_createLanguageMap","languages","initLanguageMap","allLanguagesMap","allLanguagesCode2Map","_Language","allLanguages","getLanguageNameByCode","getLanguageNameByCode2","code3ToCode2","code2ToCode3","isValidCode","customSort","ordering","aIndex","bIndex","localeCompare","textId","isString","countries","allCurrencies","currencies","allTimeZones","timezones","msg","texts","formatToIsoDate","input","inp","dateTimeShortFormat","tail","slice","optionObject","doGroupSort","category","sortOptions","checkOptions","dataGroup","forceDeselect","clone","isParentChecked","op","concat","Util","stringify","isObject","isEmptyArray","getLocalizedDate","date","currentDate","locale","year","addThousandSeparator","num","arr1","arr2","isSafari","navigator","userAgent","isChrome","getUniqueId","crypto","randomUUID","randStrFn","floor","random","substring","Validation","ref","errors","checkForErrors","i","inputs","validate","j","errorBucket","$attrs","hasErrors","getErrors","getErrorString","DefaultValidators","isUnset","required","requiredOnCreate","isCreate","minLength","len","isEmail","parts","user","domain","check","isUri","test","passWordMatch","confirm","correctLoginFormat","regex","waitForRender","_this","refName","functionName","checkProperty","refObj","doCheck","_isVue","_isMounted","interval","setInterval","$refs","isReady","checkFunction","clearInterval","e","use","pinia","StoreKeys","state","useLocale","Locale","actions","setLocale","Language","Country","BuildInfo","Debouncer","Help","SortOptions","Stats","Tenant","TenantTemplate","VueHelper","Session","jQuery","Modules","BadgeStatus","FilterClauses","QueryDirection","DeletedFlag","RequestTenantCount","TenantCountTypes","is","ident","variable","isCustomData","isFilterClauseWithFieldValue","isFilterClauseWithSubclauses","isAnyOf","isAllOf","isNoneOf","isOpt","isConditionalIf","isSecretFileDataParam","param","EditType","ThemeMode","WhiteLabel","AuthType","IntervalUnit","ChartDirection","AssistantDefinition","__webpack_module_cache__","__webpack_require__","cachedModule","exports","module","loaded","__webpack_modules__","call","m","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","n","getter","__esModule","defineProperty","enumerable","f","chunkId","promises","u","h","g","globalThis","Function","prop","prototype","hasOwnProperty","l","script","needAttach","scripts","document","getElementsByTagName","getAttribute","createElement","charset","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","timeout","doneFns","parentNode","removeChild","bind","target","appendChild","Symbol","toStringTag","nmd","paths","scriptUrl","importScripts","location","currentScript","tagName","installedChunks","installedChunkData","promise","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","self","__webpack_exports__"],"sourceRoot":""}