diff --git a/creator/packages/steedos-creator/client/views/amis_action.js b/creator/packages/steedos-creator/client/views/amis_action.js index e13d405a09..686a1713e1 100644 --- a/creator/packages/steedos-creator/client/views/amis_action.js +++ b/creator/packages/steedos-creator/client/views/amis_action.js @@ -2,7 +2,7 @@ * @Author: baozhoutao@steedos.com * @Date: 2022-09-06 11:54:55 * @LastEditors: baozhoutao@steedos.com - * @LastEditTime: 2023-08-23 09:57:34 + * @LastEditTime: 2023-10-10 10:50:02 * @Description: */ const normalizeLink = (to, location = window.location) => { @@ -100,6 +100,35 @@ const getEvn = ()=>{ } else { FlowRouter.go(to); } + }, + requestAdaptor: (config)=>{ + // url是相对路径 + if(config.url && (!/^http[s]?:\/\//i.test(config.url))){ + if(Meteor.isCordova){ + config.url = Meteor.absoluteUrl(config.url) + } + + if(!config.headers){ + config.headers = {} + } + + if(!config.headers.Authorization && Builder.settings.context && Builder.settings.context.tenantId && Builder.settings.context.authToken){ + config.headers.Authorization = `Bearer ${Builder.settings.context.tenantId},${Builder.settings.context.authToken}`; + } + }else if(config.url && Meteor.isCordova && Builder.settings.context && Builder.settings.context.rootUrl && config.url.startsWith(Builder.settings.context.rootUrl)){ + // 是绝对路径,且是cordova环境, 且以root url开头, 则自动处理认证 + if(Meteor.isCordova){ + if(!config.headers){ + config.headers = {} + } + + if(!config.headers.Authorization && Builder.settings.context && Builder.settings.context.tenantId && Builder.settings.context.authToken){ + config.headers.Authorization = `Bearer ${Builder.settings.context.tenantId},${Builder.settings.context.authToken}`; + } + } + } + console.log('env.requestAdaptor=action==', config); + return config; } } } diff --git a/creator/packages/steedos-formbuilder/lib/transform.coffee b/creator/packages/steedos-formbuilder/lib/transform.coffee index 68d5d5c07e..4e76ce8613 100644 --- a/creator/packages/steedos-formbuilder/lib/transform.coffee +++ b/creator/packages/steedos-formbuilder/lib/transform.coffee @@ -6,7 +6,10 @@ getFormFieldOptions = (field)-> else default_value = [] _.each options, (option)-> - if _.contains(default_value, option) + itemValue = option + if option.indexOf(':') > -1 + itemValue = option.split(':')[1] + if _.contains(default_value, itemValue) values.push {label: option, value: option, selected: true} else values.push {label: option, value: option} @@ -130,6 +133,8 @@ Creator.formBuilder.transformFormFieldsOut = (fields)-> if ['radio-group', 'select'].includes(field.type) field.default_value = (_.find field.values, (v)-> return v.selected)?.label + if field.default_value && field.default_value.indexOf(':') > -1 + field.default_value = field.default_value.split(':')[1]; if ['checkbox-group'].includes(field.type) field.default_value = (_.pluck (_.filter field.values, (v)-> return v.selected diff --git a/deploy/cluster/.env.sample b/deploy/cluster/.env.sample new file mode 100644 index 0000000000..5ab462466e --- /dev/null +++ b/deploy/cluster/.env.sample @@ -0,0 +1,16 @@ +# Initial Steedos Packages +STEEDOS_INITIAL_PACKAGES= + +# Secrets +MINIO_ROOT_USER=steedos +MINIO_ROOT_PASSWORD=steedos123 +MINIO_DEFAULT_BUCKETS=steedos +MONGODB_ROOT_PASSWORD=steedos +MONGODB_DATABASE=steedos +MONGODB_REPLICA_SET_NAME=steedos +MONGODB_REPLICA_SET_KEY=steedos +REDIS_PASSWORD=steedos +NATS_USERNAME=steedos +NATS_PASSWORD=steedos +NODE_RED_USERNAME=steedos +NODE_RED_PASSWORD=steedos \ No newline at end of file diff --git a/deploy/cluster/README.md b/deploy/cluster/README.md new file mode 100644 index 0000000000..1360852b52 --- /dev/null +++ b/deploy/cluster/README.md @@ -0,0 +1,43 @@ +# Steedos Enterprise Edition + +## Getting Started + +### Setup environment variables + +``` +cp .env.sample .env +``` + +### Start Services + +``` +docker-compose up +``` + +### Stop Services + +``` +docker-compose down +``` + +## Data Backup + +https://docs.docker.com/storage/volumes/#backup-restore-or-migrate-data-volumes + +## Data Clean + +Clean all data. + +``` +docker-compose down +docker volume rm steedos-enterprise_steedos-minio-data +docker volume rm steedos-enterprise_steedos-mongodb-data +``` + +## Connect to MongoDB Cluster + +vi /etc/hosts + +``` +127.0.0.1 mongodb-primary mongodb-secondary mongodb-arbiter +``` diff --git a/deploy/cluster/docker-compose.yml b/deploy/cluster/docker-compose.yml index bade07c06a..de4a16311c 100644 --- a/deploy/cluster/docker-compose.yml +++ b/deploy/cluster/docker-compose.yml @@ -13,50 +13,122 @@ services: - 8080:80 steedos: - image: steedos/steedos-enterprise:2.5.15-beta.12 - scale: 2 + image: steedos/steedos-enterprise:2.5 + deploy: + mode: replicated + replicas: 2 environment: - - MONGO_URL=mongodb://mongodb:27017/steedos - - MONGO_OPLOG_URL=mongodb://mongodb:27017/local - STEEDOS_LICENSE=trial + - MONGO_URL=mongodb://root:${MONGODB_ROOT_PASSWORD}@mongodb-primary,mongodb-secondary/${MONGODB_DATABASE}?authSource=admin + - MONGO_OPLOG_URL=mongodb://root:${MONGODB_ROOT_PASSWORD}@mongodb-primary:27017/local?authSource=admin + - STEEDOS_CFS_STORE=S3 + - STEEDOS_CFS_AWS_S3_ENDPOINT=http://minio:9000 + - STEEDOS_CFS_AWS_S3_FORCE_PATH_STYLE=true + - STEEDOS_CFS_AWS_S3_BUCKET=${MINIO_DEFAULT_BUCKETS:-steedos} + - STEEDOS_CFS_AWS_S3_ACCESS_KEY_ID=${MINIO_ROOT_USER} + - STEEDOS_CFS_AWS_S3_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD} volumes: - - "./stacks:/steedos-stacks" + - "steedos-storage:/steedos-storage" tty: true depends_on: - mongodb: + mongodb-primary: condition: service_healthy steedos-cron: - image: steedos/steedos-enterprise:2.5.15-beta.10 + image: steedos/steedos-enterprise:2.5 environment: - - MONGO_URL=mongodb://mongodb:27017/steedos - - MONGO_OPLOG_URL=mongodb://mongodb:27017/local + - STEEDOS_LICENSE=trial + - MONGO_URL=mongodb://root:${MONGODB_ROOT_PASSWORD}@mongodb-primary,mongodb-secondary/${MONGODB_DATABASE}?authSource=admin + - MONGO_OPLOG_URL=mongodb://root:${MONGODB_ROOT_PASSWORD}@mongodb-primary:27017/local?authSource=admin + - STEEDOS_CFS_STORE=S3 + - STEEDOS_CFS_AWS_S3_ENDPOINT=http://minio:9000 + - STEEDOS_CFS_AWS_S3_FORCE_PATH_STYLE=true + - STEEDOS_CFS_AWS_S3_BUCKET=${MINIO_DEFAULT_BUCKETS:-steedos} + - STEEDOS_CFS_AWS_S3_ACCESS_KEY_ID=${MINIO_ROOT_USER} + - STEEDOS_CFS_AWS_S3_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD} - STEEDOS_CRON=true volumes: - - "./stacks:/steedos-stacks" + - "steedos-storage:/steedos-storage" tty: true depends_on: - mongodb: + mongodb-primary: condition: service_healthy - mongodb: - image: mongo:4.4 + + # Database Service Cluster + mongodb-primary: + image: 'bitnami/mongodb:4.4' ports: - 27017:27017 - command: "--bind_ip_all --replSet steedos --logpath /var/log/mongodb/mongod.log" + environment: + - MONGODB_ADVERTISED_HOSTNAME=mongodb-primary + - MONGODB_REPLICA_SET_MODE=primary + - MONGODB_ROOT_PASSWORD=${MONGODB_ROOT_PASSWORD} + - MONGODB_REPLICA_SET_NAME=${MONGODB_REPLICA_SET_NAME} + - MONGODB_REPLICA_SET_KEY=${MONGODB_REPLICA_SET_KEY} + volumes: + - 'steedos-mongo-primary-data:/bitnami' healthcheck: - test: echo 'db.runCommand("ping").ok' | mongo --quiet | grep 1 + test: echo 'rs.status().ok' | mongo admin -u root -p ${MONGODB_PASSWORD:-steedos} --quiet | grep 1 interval: 10s timeout: 10s retries: 5 - volumes: - - './mongo-data:/data/db' - mongodb-init: - image: mongo:4.4 - restart: "no" + mongodb-secondary: + image: 'bitnami/mongodb:4.4' depends_on: - mongodb: - condition: service_healthy - command: > - mongo --host mongodb:27017 --eval "rs.initiate({ _id: 'steedos', members: [{_id: 0, host: 'mongodb:27017'}]})" + - mongodb-primary + environment: + - MONGODB_ADVERTISED_HOSTNAME=mongodb-secondary + - MONGODB_REPLICA_SET_MODE=secondary + - MONGODB_INITIAL_PRIMARY_HOST=mongodb-primary + - MONGODB_INITIAL_PRIMARY_PORT_NUMBER=27017 + - MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD=${MONGODB_ROOT_PASSWORD} + - MONGODB_REPLICA_SET_NAME=${MONGODB_REPLICA_SET_NAME} + - MONGODB_REPLICA_SET_KEY=${MONGODB_REPLICA_SET_KEY} + healthcheck: + test: echo 'rs.status().ok' | mongo admin -u root -p ${MONGODB_PASSWORD:-steedos} --quiet | grep 1 + interval: 10s + timeout: 10s + retries: 5 + + mongodb-arbiter: + image: 'bitnami/mongodb:4.4' + depends_on: + - mongodb-primary + environment: + - MONGODB_ADVERTISED_HOSTNAME=mongodb-arbiter + - MONGODB_REPLICA_SET_MODE=arbiter + - MONGODB_INITIAL_PRIMARY_HOST=mongodb-primary + - MONGODB_INITIAL_PRIMARY_PORT_NUMBER=27017 + - MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD=${MONGODB_ROOT_PASSWORD} + - ALLOW_EMPTY_PASSWORD=yes + - MONGODB_REPLICA_SET_NAME=${MONGODB_REPLICA_SET_NAME} + - MONGODB_REPLICA_SET_KEY=${MONGODB_REPLICA_SET_KEY} + healthcheck: + test: echo 'rs.status().ok' | mongo admin -u root -p ${MONGODB_PASSWORD:-steedos} --quiet | grep 1 + interval: 10s + timeout: 10s + retries: 5 + + # S3 Storage Service + minio: + image: bitnami/minio + environment: + MINIO_ROOT_USER: ${MINIO_ROOT_USER:-steedos} + MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-steedos123} + MINIO_DEFAULT_BUCKETS: ${MINIO_DEFAULT_BUCKETS:-steedos} + volumes: + - steedos-minio-data:/data + ports: + - "9000:9000" + - "9001:9001" + + +volumes: + steedos-storage: + driver: local + steedos-minio-data: + driver: local + steedos-mongo-primary-data: + driver: local \ No newline at end of file diff --git a/ee/sso-oidc/package.json b/ee/sso-oidc/package.json index 6b15d94c1b..b85110f395 100644 --- a/ee/sso-oidc/package.json +++ b/ee/sso-oidc/package.json @@ -1,6 +1,6 @@ { "name": "@steedos/ee_sso-oidc", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "main": "package.service.js", "scripts": { "build": "tsc" @@ -11,14 +11,14 @@ "access": "public" }, "dependencies": { - "@steedos/accounts": "2.5.16-beta.1", - "@steedos/objectql": "2.5.16-beta.1", - "@steedos/service-package-loader": "2.5.16-beta.1", + "@steedos/accounts": "2.5.16-beta.2", + "@steedos/objectql": "2.5.16-beta.2", + "@steedos/service-package-loader": "2.5.16-beta.2", "@techpass/passport-openidconnect": "^0.3.2", "express": "4.18.1", "node-fetch": "^2.6.7", "passport": "^0.6.0", "request-ip": "^2.2.0" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/examples/with-datadog/package.json b/examples/with-datadog/package.json index c76bd0b870..37e3e96d12 100644 --- a/examples/with-datadog/package.json +++ b/examples/with-datadog/package.json @@ -1,12 +1,12 @@ { "name": "with-datadog", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "private": true, "scripts": { "start": "steedos start" }, "dependencies": { - "@steedos/service-community": "2.5.16-beta.1" + "@steedos/service-community": "2.5.16-beta.2" }, "devDependencies": { "dd-trace": "3.7.1" diff --git a/examples/with-k6/package.json b/examples/with-k6/package.json index 890def069b..572ae4c005 100644 --- a/examples/with-k6/package.json +++ b/examples/with-k6/package.json @@ -1,6 +1,6 @@ { "name": "with-k6", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "private": true, "scripts": { "start": "steedos start", @@ -8,7 +8,7 @@ "k6:menus": "k6 run -e ROOT_URL=http://127.0.0.1:5100 -e API_KEY=apikey,8FzpeOTInPZcqWeFoCdSEy8s6FDpuITWPz15bIM0kNL ./.script/test.menus.js" }, "dependencies": { - "@steedos/service-community": "2.5.16-beta.1" + "@steedos/service-community": "2.5.16-beta.2" }, "devDependencies": { "dd-trace": "3.7.1" diff --git a/examples/with-postgres/package.json b/examples/with-postgres/package.json index a37ccc2936..27df58832a 100644 --- a/examples/with-postgres/package.json +++ b/examples/with-postgres/package.json @@ -1,11 +1,11 @@ { "name": "@steedos-examples/with-postgres", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "private": true, "scripts": { "start": "steedos start" }, "dependencies": { - "@steedos/service-community": "2.5.16-beta.1" + "@steedos/service-community": "2.5.16-beta.2" } } diff --git a/examples/with-tracing-jaeger/package.json b/examples/with-tracing-jaeger/package.json index 7075591f53..24237eb292 100644 --- a/examples/with-tracing-jaeger/package.json +++ b/examples/with-tracing-jaeger/package.json @@ -1,12 +1,12 @@ { "name": "with-tracing-jaeger", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "private": true, "scripts": { "start": "steedos start" }, "dependencies": { - "@steedos/service-community": "2.5.16-beta.1" + "@steedos/service-community": "2.5.16-beta.2" }, "devDependencies": { "jaeger-client": "^3.19.0" diff --git a/lerna.json b/lerna.json index 7cb0038b50..e95a0b192a 100644 --- a/lerna.json +++ b/lerna.json @@ -9,5 +9,5 @@ ], "useWorkspaces": true, "npmClient": "yarn", - "version": "2.5.16-beta.1" + "version": "2.5.16-beta.2" } diff --git a/packages/accounts/package.json b/packages/accounts/package.json index f34b823798..e725a40fda 100644 --- a/packages/accounts/package.json +++ b/packages/accounts/package.json @@ -1,7 +1,7 @@ { "name": "@steedos/accounts", "private": false, - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "main": "lib/index.js", "files": [ "/package.json", @@ -55,20 +55,20 @@ "validator": "^13.6.0" }, "devDependencies": { - "@steedos/auth": "2.5.16-beta.1", - "@steedos/meteor-bundle-runner": "2.5.16-beta.1", - "@steedos/objectql": "2.5.16-beta.1", + "@steedos/auth": "2.5.16-beta.2", + "@steedos/meteor-bundle-runner": "2.5.16-beta.2", + "@steedos/objectql": "2.5.16-beta.2", "@types/dotenv-flow": "^3.0.0", "@types/node": "12.6.8", "cross-env": "^7.0.3", "dotenv": "^8.2.0", "dotenv-flow": "^3.1.0", "nodemon": "^2.0.19", - "steedos-server": "2.5.16-beta.1", + "steedos-server": "2.5.16-beta.2", "typescript": "4.6.3" }, "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/auth/package.json b/packages/auth/package.json index fc41f1603d..c43a80edbd 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -1,7 +1,7 @@ { "name": "@steedos/auth", "private": false, - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "main": "lib/index.js", "scripts": { "watch": "tsc --watch", @@ -13,8 +13,8 @@ "access": "public" }, "dependencies": { - "@steedos/cachers": "2.5.16-beta.1", - "@steedos/objectql": "2.5.16-beta.1", + "@steedos/cachers": "2.5.16-beta.2", + "@steedos/objectql": "2.5.16-beta.2", "cookies": "^0.8.0", "express": "^4.16.4", "ismobilejs": "^1.1.1", @@ -25,5 +25,5 @@ "devDependencies": { "typescript": "4.6.3" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/cachers/package.json b/packages/cachers/package.json index d4163baef2..df99c5ab2f 100644 --- a/packages/cachers/package.json +++ b/packages/cachers/package.json @@ -1,7 +1,7 @@ { "name": "@steedos/cachers", "private": false, - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "", "main": "lib/index.js", "scripts": { @@ -19,5 +19,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/cli/default.steedos.config.js b/packages/cli/default.steedos.config.js index 2a7d6ce46e..ac3392529b 100644 --- a/packages/cli/default.steedos.config.js +++ b/packages/cli/default.steedos.config.js @@ -29,7 +29,7 @@ if(_.isEmpty(process.env.STEEDOS_AMIS_URL)) { process.env.STEEDOS_AMIS_URL = process.env.STEEDOS_AMIS_URL.replace(/\/+$/, ""); if(_.isEmpty(process.env.STEEDOS_PUBLIC_PAGE_ASSETURLS)) { - process.env.STEEDOS_PUBLIC_PAGE_ASSETURLS = process.env.STEEDOS_UNPKG_URL + "/@steedos-widgets/amis-object@1.3.4-beta.11/dist/assets.json"; + process.env.STEEDOS_PUBLIC_PAGE_ASSETURLS = process.env.STEEDOS_UNPKG_URL + "/@steedos-widgets/amis-object@1.3.4-beta.12/dist/assets.json"; } if(_.isEmpty(process.env.SERIALIZER)){ diff --git a/packages/cli/package.json b/packages/cli/package.json index f844e1e1d6..26d16977da 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "steedos-cli", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "Develop and run your enterprise apps in miniutes", "main": "dist/index.js", "scripts": { @@ -38,8 +38,8 @@ "@oclif/command": "^1.8.16", "@oclif/config": "^1.8.3", "@oclif/plugin-help": "^5.1.12", - "@steedos/metadata-core": "2.5.16-beta.1", - "@steedos/metadata-registrar": "2.5.16-beta.1", + "@steedos/metadata-core": "2.5.16-beta.2", + "@steedos/metadata-registrar": "2.5.16-beta.2", "archiver": "^5.0.2", "chalk": "2.4.2", "change-case": "^3.1.0", @@ -82,5 +82,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/client/package.json b/packages/client/package.json index ce778236a4..ff5a45eb0b 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,7 +1,7 @@ { "private": false, "name": "@steedos/client", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "client lib for steedos", "main": "lib/index.js", "scripts": { @@ -17,8 +17,8 @@ }, "license": "MIT", "dependencies": { - "@steedos/filters": "2.5.16-beta.1", + "@steedos/filters": "2.5.16-beta.2", "node-fetch": "^2.6.7" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/core/package.json b/packages/core/package.json index b5a1bc50fa..c1ae69734f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@steedos/core", "private": false, - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "", "main": "lib/index.js", "scripts": { @@ -14,15 +14,15 @@ "author": "", "license": "ISC", "dependencies": { - "@steedos/auth": "2.5.16-beta.1", - "@steedos/filters": "2.5.16-beta.1", - "@steedos/i18n": "2.5.16-beta.1", - "@steedos/metadata-core": "2.5.16-beta.1", - "@steedos/migrate": "2.5.16-beta.1", - "@steedos/objectql": "2.5.16-beta.1", - "@steedos/odata-v4-mongodb": "2.5.16-beta.1", - "@steedos/process": "2.5.16-beta.1", - "@steedos/standard-objects": "2.5.16-beta.1", + "@steedos/auth": "2.5.16-beta.2", + "@steedos/filters": "2.5.16-beta.2", + "@steedos/i18n": "2.5.16-beta.2", + "@steedos/metadata-core": "2.5.16-beta.2", + "@steedos/migrate": "2.5.16-beta.2", + "@steedos/objectql": "2.5.16-beta.2", + "@steedos/odata-v4-mongodb": "2.5.16-beta.2", + "@steedos/process": "2.5.16-beta.2", + "@steedos/standard-objects": "2.5.16-beta.2", "body-parser": "^1.18.1", "bunyan-sfdx-no-dtrace": "^1.8.2", "clone": "^2.1.2", @@ -45,7 +45,7 @@ "devDependencies": { "@salesforce/kit": "1.0.4", "@salesforce/ts-types": "1.1.2", - "@steedos/meteor-bundle-runner": "2.5.16-beta.1", + "@steedos/meteor-bundle-runner": "2.5.16-beta.2", "@types/express": "^4.16.1", "@types/node": "^11.10.4", "@types/underscore": "^1.8.13", @@ -57,5 +57,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/create-steedos-app/package.json b/packages/create-steedos-app/package.json index 97b40eb02c..0b01d2c578 100644 --- a/packages/create-steedos-app/package.json +++ b/packages/create-steedos-app/package.json @@ -1,6 +1,6 @@ { "name": "create-steedos-app", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "keywords": [ "react", "steedos" @@ -48,5 +48,5 @@ "engines": { "node": ">=12.22.0" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/create-steedos-package/package.json b/packages/create-steedos-package/package.json index 59f373eb4f..688cb0b550 100644 --- a/packages/create-steedos-package/package.json +++ b/packages/create-steedos-package/package.json @@ -1,6 +1,6 @@ { "name": "create-steedos-package", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "keywords": [ "steedos" ], @@ -39,5 +39,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/data-import/package.json b/packages/data-import/package.json index 45cb357cf1..dba7fbf965 100644 --- a/packages/data-import/package.json +++ b/packages/data-import/package.json @@ -1,16 +1,16 @@ { "name": "@steedos/data-import", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "main": "lib/index.js", "license": "MIT", "scripts": { "build": "rm -rf ./lib && tsc" }, "dependencies": { - "@steedos/core": "2.5.16-beta.1", - "@steedos/metadata-api": "2.5.16-beta.1", - "@steedos/metadata-core": "2.5.16-beta.1", - "@steedos/objectql": "2.5.16-beta.1", + "@steedos/core": "2.5.16-beta.2", + "@steedos/metadata-api": "2.5.16-beta.2", + "@steedos/metadata-core": "2.5.16-beta.2", + "@steedos/objectql": "2.5.16-beta.2", "bson": "4.6.4", "csvtojson": "~2.0.10", "dotenv-flow": "^3.1.0", @@ -24,5 +24,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/filters/package.json b/packages/filters/package.json index d9020d3460..d6d3587af3 100644 --- a/packages/filters/package.json +++ b/packages/filters/package.json @@ -1,7 +1,7 @@ { "name": "@steedos/filters", "private": false, - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "filters lib for steedos", "main": "lib/index.js", "files": [ @@ -36,5 +36,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/formula/package.json b/packages/formula/package.json index 9f7aa6670e..4ff03ee55c 100644 --- a/packages/formula/package.json +++ b/packages/formula/package.json @@ -1,6 +1,6 @@ { "name": "@steedos/formula", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "Salesforce Formula Parser", "main": "lib/formulon.js", "files": [ @@ -46,5 +46,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/i18n/package.json b/packages/i18n/package.json index fe50077020..0bbe549a95 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -1,7 +1,7 @@ { "name": "@steedos/i18n", "private": false, - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "", "main": "lib/index.js", "scripts": { @@ -11,7 +11,7 @@ "author": "", "license": "ISC", "dependencies": { - "@steedos/cachers": "2.5.16-beta.1", + "@steedos/cachers": "2.5.16-beta.2", "i18next": "^19.3.4", "i18next-sprintf-postprocessor": "^0.2.2", "underscore": "1.13.4" @@ -22,5 +22,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/metadata-api/package.json b/packages/metadata-api/package.json index 23b890c87c..d6588beab6 100644 --- a/packages/metadata-api/package.json +++ b/packages/metadata-api/package.json @@ -1,6 +1,6 @@ { "name": "@steedos/metadata-api", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "", "main": "lib/index.js", "files": [ @@ -21,10 +21,10 @@ "access": "public" }, "dependencies": { - "@steedos/auth": "2.5.16-beta.1", - "@steedos/core": "2.5.16-beta.1", - "@steedos/metadata-core": "2.5.16-beta.1", - "@steedos/objectql": "2.5.16-beta.1", + "@steedos/auth": "2.5.16-beta.2", + "@steedos/core": "2.5.16-beta.2", + "@steedos/metadata-core": "2.5.16-beta.2", + "@steedos/objectql": "2.5.16-beta.2", "chalk": "^4.1.0", "clone": "2.1.2", "compressing": "^1.5.1", @@ -36,9 +36,9 @@ "underscore": "^1.11.0" }, "devDependencies": { - "@steedos/service-meteor-package-loader": "2.5.16-beta.1", + "@steedos/service-meteor-package-loader": "2.5.16-beta.2", "javascript-obfuscator": "^2.9.1", "typescript": "4.6.3" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/metadata-core/package.json b/packages/metadata-core/package.json index ebd41a42a1..f6e3f091b1 100644 --- a/packages/metadata-core/package.json +++ b/packages/metadata-core/package.json @@ -1,6 +1,6 @@ { "name": "@steedos/metadata-core", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "", "main": "lib/index.js", "files": [ @@ -12,7 +12,7 @@ "build": "tsc" }, "dependencies": { - "@steedos/client": "2.5.16-beta.1", + "@steedos/client": "2.5.16-beta.2", "archiver": "^5.1.0", "chalk": "^4.1.0", "clone": "^2.1.2", @@ -39,5 +39,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/metadata-registrar/package.json b/packages/metadata-registrar/package.json index 74a4c083a3..218ab4e566 100644 --- a/packages/metadata-registrar/package.json +++ b/packages/metadata-registrar/package.json @@ -1,6 +1,6 @@ { "name": "@steedos/metadata-registrar", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "", "main": "lib/index.js", "files": [ @@ -13,8 +13,8 @@ }, "dependencies": { "@salesforce/ts-types": "1.1.2", - "@steedos/client": "2.5.16-beta.1", - "@steedos/metadata-core": "2.5.16-beta.1", + "@steedos/client": "2.5.16-beta.2", + "@steedos/metadata-core": "2.5.16-beta.2", "archiver": "^5.1.0", "chalk": "^4.1.0", "clone": "^2.1.2", @@ -42,5 +42,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/meteor-bundle-dependencies/package.json b/packages/meteor-bundle-dependencies/package.json index b87bfecc55..65b93f8c4f 100644 --- a/packages/meteor-bundle-dependencies/package.json +++ b/packages/meteor-bundle-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "@steedos/meteor-bundle-dependencies", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "", "main": "index.js", "private": false, @@ -56,5 +56,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/meteor-bundle-runner/package.json b/packages/meteor-bundle-runner/package.json index 415822f57b..07a825c4e5 100644 --- a/packages/meteor-bundle-runner/package.json +++ b/packages/meteor-bundle-runner/package.json @@ -1,6 +1,6 @@ { "name": "@steedos/meteor-bundle-runner", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "Run meteor bundles and inject your own nodejs code.", "main": "index.js", "private": false, @@ -26,5 +26,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/migrate/package.json b/packages/migrate/package.json index fba313b058..3d91cc36b0 100644 --- a/packages/migrate/package.json +++ b/packages/migrate/package.json @@ -1,6 +1,6 @@ { "name": "@steedos/migrate", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "Migration scripts for steedos", "main": "index.js", "license": "MIT", @@ -12,5 +12,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/objectql/package.json b/packages/objectql/package.json index c2fed0ddea..3fd11b2c03 100644 --- a/packages/objectql/package.json +++ b/packages/objectql/package.json @@ -1,7 +1,7 @@ { "name": "@steedos/objectql", "private": false, - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "", "main": "lib/index.js", "scripts": { @@ -16,17 +16,17 @@ "dependencies": { "@salesforce/kit": "1.0.4", "@salesforce/ts-types": "1.1.1", - "@steedos/cachers": "2.5.16-beta.1", - "@steedos/filters": "2.5.16-beta.1", - "@steedos/formula": "2.5.16-beta.1", - "@steedos/i18n": "2.5.16-beta.1", - "@steedos/metadata-core": "2.5.16-beta.1", - "@steedos/metadata-registrar": "2.5.16-beta.1", - "@steedos/odata-v4-mongodb": "2.5.16-beta.1", - "@steedos/odata-v4-sql": "2.5.16-beta.1", - "@steedos/odata-v4-typeorm": "2.5.16-beta.1", - "@steedos/schemas": "2.5.16-beta.1", - "@steedos/standard-objects": "2.5.16-beta.1", + "@steedos/cachers": "2.5.16-beta.2", + "@steedos/filters": "2.5.16-beta.2", + "@steedos/formula": "2.5.16-beta.2", + "@steedos/i18n": "2.5.16-beta.2", + "@steedos/metadata-core": "2.5.16-beta.2", + "@steedos/metadata-registrar": "2.5.16-beta.2", + "@steedos/odata-v4-mongodb": "2.5.16-beta.2", + "@steedos/odata-v4-sql": "2.5.16-beta.2", + "@steedos/odata-v4-typeorm": "2.5.16-beta.2", + "@steedos/schemas": "2.5.16-beta.2", + "@steedos/standard-objects": "2.5.16-beta.2", "app-root-path": "^2.2.1", "body-parser": "^1.18.1", "bunyan-sfdx-no-dtrace": "^1.8.2", @@ -55,7 +55,7 @@ "vm2": "^3.9.17" }, "devDependencies": { - "@steedos/meteor-bundle-runner": "2.5.16-beta.1", + "@steedos/meteor-bundle-runner": "2.5.16-beta.2", "@types/express": "^4.16.1", "@types/node": "^11.10.4", "@types/underscore": "^1.8.13", @@ -65,5 +65,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/odata-v4-mongodb/package.json b/packages/odata-v4-mongodb/package.json index 98eaa40594..78a164ecbc 100644 --- a/packages/odata-v4-mongodb/package.json +++ b/packages/odata-v4-mongodb/package.json @@ -1,6 +1,6 @@ { "name": "@steedos/odata-v4-mongodb", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "Service OData requests from a MongoDB data store", "main": "lib/index.js", "directories": { @@ -26,12 +26,12 @@ }, "homepage": "https://github.com/jaystack/odata-v4-mongodb#readme", "dependencies": { - "@steedos/odata-v4-parser": "2.5.16-beta.1", + "@steedos/odata-v4-parser": "2.5.16-beta.2", "odata-v4-literal": "^0.1.0" }, "private": false, "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/odata-v4-parser/package.json b/packages/odata-v4-parser/package.json index 5abf242dac..dff5447a5e 100644 --- a/packages/odata-v4-parser/package.json +++ b/packages/odata-v4-parser/package.json @@ -1,6 +1,6 @@ { "name": "@steedos/odata-v4-parser", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "OData v4 Parser", "main": "lib/parser.js", "repository": { @@ -20,5 +20,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/odata-v4-sql/package.json b/packages/odata-v4-sql/package.json index 96f6bd0df4..646784141a 100644 --- a/packages/odata-v4-sql/package.json +++ b/packages/odata-v4-sql/package.json @@ -1,6 +1,6 @@ { "name": "@steedos/odata-v4-sql", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "OData to SQL query compiler", "main": "lib/index.js", "typings": "lib/index", @@ -27,7 +27,7 @@ }, "homepage": "https://github.com/jaystack/odata-v4-sql#readme", "dependencies": { - "@steedos/odata-v4-parser": "2.5.16-beta.1", + "@steedos/odata-v4-parser": "2.5.16-beta.2", "odata-v4-literal": "^0.1.0" }, "publishConfig": { @@ -36,5 +36,5 @@ "devDependencies": { "typescript": "4.6.3" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/odata-v4-typeorm/package.json b/packages/odata-v4-typeorm/package.json index 8e2d457d0b..3dab684e72 100644 --- a/packages/odata-v4-typeorm/package.json +++ b/packages/odata-v4-typeorm/package.json @@ -1,7 +1,7 @@ { "name": "@steedos/odata-v4-typeorm", "private": false, - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "OData to TYPEORM query compiler", "main": "lib/index.js", "typings": "lib/index", @@ -29,12 +29,12 @@ }, "homepage": "https://github.com/steedos/odata-v4-typeorm#readme", "dependencies": { - "@steedos/odata-v4-parser": "2.5.16-beta.1", - "@steedos/odata-v4-sql": "2.5.16-beta.1", + "@steedos/odata-v4-parser": "2.5.16-beta.2", + "@steedos/odata-v4-sql": "2.5.16-beta.2", "odata-v4-literal": "^0.1.0" }, "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/plugin-company/package.json b/packages/plugin-company/package.json index ac1a60df0f..48b987c7fa 100644 --- a/packages/plugin-company/package.json +++ b/packages/plugin-company/package.json @@ -1,7 +1,7 @@ { "name": "@steedos/plugin-company", "private": false, - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "Enterprise plugin for steedos", "main": "index.js", "repository": { @@ -17,5 +17,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/process/package.json b/packages/process/package.json index 5a77f08b3a..ea03b9f562 100644 --- a/packages/process/package.json +++ b/packages/process/package.json @@ -1,6 +1,6 @@ { "name": "@steedos/process", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "main": "lib/index.js", "repository": "https://github.com/steedos/steedos-platform.git", "scripts": { @@ -16,9 +16,9 @@ "typescript": "4.6.3" }, "dependencies": { - "@steedos/auth": "2.5.16-beta.1", - "@steedos/objectql": "2.5.16-beta.1", + "@steedos/auth": "2.5.16-beta.2", + "@steedos/objectql": "2.5.16-beta.2", "express": "4.18.1" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/router/package.json b/packages/router/package.json index 228c084464..7da53a34d4 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,7 +1,7 @@ { "name": "@steedos/router", "private": false, - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "", "main": "lib/index.js", "scripts": { @@ -18,5 +18,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/schemas/package.json b/packages/schemas/package.json index 7192af32d0..a1c6da47f3 100644 --- a/packages/schemas/package.json +++ b/packages/schemas/package.json @@ -1,6 +1,6 @@ { "name": "@steedos/schemas", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "main": "index.js", "repository": "https://github.com/steedos/schemas.git", "author": "sunhaolin ", @@ -9,5 +9,5 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/standard-objects/package.json b/packages/standard-objects/package.json index 6c375ebe9b..1da52a5ade 100644 --- a/packages/standard-objects/package.json +++ b/packages/standard-objects/package.json @@ -1,7 +1,7 @@ { "name": "@steedos/standard-objects", "private": false, - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "Standard objects for steedos", "main": "index.js", "license": "Apache", @@ -9,13 +9,13 @@ "publishConfig": { "access": "public" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570", + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2", "dependencies": { - "@steedos/auth": "2.5.16-beta.1", - "@steedos/core": "2.5.16-beta.1", - "@steedos/filters": "2.5.16-beta.1", - "@steedos/i18n": "2.5.16-beta.1", - "@steedos/metadata-core": "2.5.16-beta.1", - "@steedos/metadata-registrar": "2.5.16-beta.1" + "@steedos/auth": "2.5.16-beta.2", + "@steedos/core": "2.5.16-beta.2", + "@steedos/filters": "2.5.16-beta.2", + "@steedos/i18n": "2.5.16-beta.2", + "@steedos/metadata-core": "2.5.16-beta.2", + "@steedos/metadata-registrar": "2.5.16-beta.2" } } diff --git a/packages/steedos-plugin-schema-builder/package.json b/packages/steedos-plugin-schema-builder/package.json index e050467450..87d39b5b8e 100644 --- a/packages/steedos-plugin-schema-builder/package.json +++ b/packages/steedos-plugin-schema-builder/package.json @@ -1,6 +1,6 @@ { "name": "@steedos/steedos-plugin-schema-builder", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "description": "显示对象关系图", "main": "index.js", "author": "", @@ -10,5 +10,5 @@ "access": "public" }, "homepage": "https://www.steedos.com", - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/packages/workflow/package.json b/packages/workflow/package.json index b8c76314b3..38792673e3 100644 --- a/packages/workflow/package.json +++ b/packages/workflow/package.json @@ -1,6 +1,6 @@ { "name": "@steedos/workflow", - "version": "2.5.16-beta.1", + "version": "2.5.16-beta.2", "main": "index.js", "repository": "https://github.com/steedos/steedos-platform/packages/workflow.git", "author": "sunhaolin ", @@ -10,17 +10,17 @@ "access": "public" }, "dependencies": { - "@steedos/auth": "2.5.16-beta.1", - "@steedos/objectql": "2.5.16-beta.1", + "@steedos/auth": "2.5.16-beta.2", + "@steedos/objectql": "2.5.16-beta.2", "@steedos/steedos-plugin-workflow": "^2.1.3", "body-parser": "^1.19.0", "express": "^4.17.1", "underscore": "^1.9.1" }, "devDependencies": { - "@steedos/core": "2.5.16-beta.1", - "@steedos/meteor-bundle-runner": "2.5.16-beta.1", - "steedos-server": "2.5.16-beta.1" + "@steedos/core": "2.5.16-beta.2", + "@steedos/meteor-bundle-runner": "2.5.16-beta.2", + "steedos-server": "2.5.16-beta.2" }, - "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570" + "gitHead": "f8b3f647c00f580f9a10547a4a8afec0398bcbe2" } diff --git a/server/bundle/programs/server/packages/modules.js b/server/bundle/programs/server/packages/modules.js index f256f9c832..cd7ab14607 100644 --- a/server/bundle/programs/server/packages/modules.js +++ b/server/bundle/programs/server/packages/modules.js @@ -463,7 +463,7 @@ module.useNode(); // module.exports = { "name": "@steedos/objectql", - "version": "2.5.15-beta.12", + "version": "2.5.15-beta.14", "main": "lib/index.js" }; @@ -490,7 +490,7 @@ module.useNode(); // module.exports = { "name": "@steedos/i18n", - "version": "2.5.15-beta.12", + "version": "2.5.15-beta.14", "main": "lib/index.js" }; @@ -517,7 +517,7 @@ module.useNode(); // module.exports = { "name": "@steedos/core", - "version": "2.5.15-beta.12", + "version": "2.5.15-beta.14", "main": "lib/index.js" }; @@ -544,7 +544,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-meteor-package-loader", - "version": "2.5.15-beta.12", + "version": "2.5.15-beta.14", "main": "index.js" }; @@ -571,7 +571,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-api", - "version": "2.5.15-beta.12", + "version": "2.5.15-beta.14", "main": "index.js" }; @@ -598,7 +598,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-metadata-server", - "version": "2.5.15-beta.12", + "version": "2.5.15-beta.14", "main": "index.js" }; @@ -625,7 +625,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-package-registry", - "version": "2.5.15-beta.12", + "version": "2.5.15-beta.14", "main": "package.service.js" }; @@ -652,7 +652,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-objectql", - "version": "2.5.15-beta.12", + "version": "2.5.15-beta.14", "main": "package.service.js" }; @@ -679,7 +679,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-ui", - "version": "2.5.15-beta.12", + "version": "2.5.15-beta.14", "main": "package.service.js" }; @@ -706,7 +706,7 @@ module.useNode(); // module.exports = { "name": "@steedos/service-pages", - "version": "2.5.15-beta.12", + "version": "2.5.15-beta.14", "main": "package.service.js" }; @@ -733,7 +733,7 @@ module.useNode(); // module.exports = { "name": "@steedos/router", - "version": "2.5.15-beta.12", + "version": "2.5.15-beta.14", "main": "lib/index.js" }; @@ -760,7 +760,7 @@ module.useNode(); // module.exports = { "name": "@steedos/auth", - "version": "2.5.15-beta.12", + "version": "2.5.15-beta.14", "main": "lib/index.js" }; @@ -787,7 +787,7 @@ module.useNode(); // module.exports = { "name": "@steedos/workflow", - "version": "2.5.15-beta.12", + "version": "2.5.15-beta.14", "main": "index.js" }; diff --git a/server/bundle/programs/web.browser.legacy/d5f372170ee952f1ff72451eb1632c94a7763f93.js b/server/bundle/programs/web.browser.legacy/ef2d994633d5dbd0358ffc4116e6608cc64b453e.js similarity index 98% rename from server/bundle/programs/web.browser.legacy/d5f372170ee952f1ff72451eb1632c94a7763f93.js rename to server/bundle/programs/web.browser.legacy/ef2d994633d5dbd0358ffc4116e6608cc64b453e.js index 13fbad54bf..6b4246639b 100644 --- a/server/bundle/programs/web.browser.legacy/d5f372170ee952f1ff72451eb1632c94a7763f93.js +++ b/server/bundle/programs/web.browser.legacy/ef2d994633d5dbd0358ffc4116e6608cc64b453e.js @@ -68,7 +68,7 @@ object-assign * Copyright 2011-2019 Twitter, Inc. * Licensed under the MIT license */ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this,i;return e(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||e(r).trigger(e.support.transition.end)}),t),this},e((function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})}))}(jQuery),function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};function r(t){return this.each((function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),"string"==typeof t&&i[t].call(r)}))}n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.close=function(t){var r=e(this),i=r.attr("data-target");i||(i=(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=e(document).find(i);function s(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=r.closest(".alert")),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",s).emulateTransitionEnd(n.TRANSITION_DURATION):s())};var i=e.fn.alert;e.fn.alert=r,e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=i,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.isLoading=!1};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.button"),o="object"==typeof n&&n;i||r.data("bs.button",i=new t(this,o)),"toggle"==n?i.toggle():n&&i.setState(n)}))}t.VERSION="3.4.1",t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(t){var n="disabled",r=this.$element,i=r.is("input")?"val":"html",o=r.data();t+="Text",null==o.resetText&&r.data("resetText",r[i]()),setTimeout(e.proxy((function(){r[i](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,r.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,r.removeClass(n).removeAttr(n).prop(n,!1))}),this),0)},t.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var r=e.fn.button;e.fn.button=n,e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=r,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var r=e(t.target).closest(".btn");n.call(r,"toggle"),e(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),r.is("input,button")?r.trigger("focus"):r.find("input:visible,button:visible").first().trigger("focus"))})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))}))}(jQuery),function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.carousel"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n),s="string"==typeof n?n:o.slide;i||r.data("bs.carousel",i=new t(this,o)),"number"==typeof n?i.to(n):s?i[s]():o.interval&&i.pause().cycle()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=600,t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},t.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},t.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t),r;if(("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap)return t;var i,o=(n+("prev"==e?-1:1))%this.$items.length;return this.$items.eq(o)},t.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){t.to(e)})):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",this.$items.eq(e))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){if(!this.sliding)return this.slide("next")},t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},t.prototype.slide=function(n,r){var i=this.$element.find(".item.active"),o=r||this.getItemForDirection(n,i),s=this.interval,a="next"==n?"left":"right",u=this;if(o.hasClass("active"))return this.sliding=!1;var f=o[0],c=e.Event("slide.bs.carousel",{relatedTarget:f,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=e(this.$indicators.children()[this.getItemIndex(o)]);l&&l.addClass("active")}var h=e.Event("slid.bs.carousel",{relatedTarget:f,direction:a});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(n),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(a),o.addClass(a),i.one("bsTransitionEnd",(function(){o.removeClass([n,a].join(" ")).addClass("active"),i.removeClass(["active",a].join(" ")),u.sliding=!1,setTimeout((function(){u.$element.trigger(h)}),0)})).emulateTransitionEnd(t.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),s&&this.cycle(),this}};var r=e.fn.carousel;e.fn.carousel=n,e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=r,this};var i=function(t){var r=e(this),i=r.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=r.attr("data-target")||i,s=e(document).find(o);if(s.hasClass("carousel")){var a=e.extend({},s.data(),r.data()),u=r.attr("data-slide-to");u&&(a.interval=!1),n.call(s,a),u&&s.data("bs.carousel").to(u),t.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),e(window).on("load",(function(){e('[data-ride="carousel"]').each((function(){var t=e(this);n.call(t,t.data())}))}))}(jQuery),function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.$trigger=e('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var n,r=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(document).find(r)}function r(n){return this.each((function(){var r=e(this),i=r.data("bs.collapse"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n);!i&&o.toggle&&/show|hide/.test(n)&&(o.toggle=!1),i||r.data("bs.collapse",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=350,t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e;return this.$element.hasClass("width")?"width":"height"},t.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var n,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(n=i.data("bs.collapse"))&&n.transitioning)){var o=e.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){i&&i.length&&(r.call(i,"hide"),n||i.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return a.call(this);var u=e.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",e.proxy(a,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[s](this.$element[0][u])}}}},t.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var n=e.Event("hide.bs.collapse");if(this.$element.trigger(n),!n.isDefaultPrevented()){var r=this.dimension();this.$element[r](this.$element[r]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!e.support.transition)return i.call(this);this.$element[r](0).one("bsTransitionEnd",e.proxy(i,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}}},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},t.prototype.getParent=function(){return e(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy((function(t,r){var i=e(r);this.addAriaAndCollapsedClass(n(i),i)}),this)).end()},t.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var i=e.fn.collapse;e.fn.collapse=r,e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=i,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){var i=e(this);i.attr("data-target")||t.preventDefault();var o=n(i),s,a=o.data("bs.collapse")?"toggle":i.data();r.call(o,a)}))}(jQuery),function(e){"use strict";var t=".dropdown-backdrop",n='[data-toggle="dropdown"]',r=function(t){e(t).on("click.bs.dropdown",this.toggle)};function i(t){var n=t.attr("data-target");n||(n=(n=t.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r="#"!==n?e(document).find(n):null;return r&&r.length?r:t.parent()}function o(r){r&&3===r.which||(e(t).remove(),e(n).each((function(){var t=e(this),n=i(t),o={relatedTarget:this};n.hasClass("open")&&(r&&"click"==r.type&&/input|textarea/i.test(r.target.tagName)&&e.contains(n[0],r.target)||(n.trigger(r=e.Event("hide.bs.dropdown",o)),r.isDefaultPrevented()||(t.attr("aria-expanded","false"),n.removeClass("open").trigger(e.Event("hidden.bs.dropdown",o)))))})))}function s(t){return this.each((function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),"string"==typeof t&&i[t].call(n)}))}r.VERSION="3.4.1",r.prototype.toggle=function(t){var n=e(this);if(!n.is(".disabled, :disabled")){var r=i(n),s=r.hasClass("open");if(o(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",o);var a={relatedTarget:this};if(r.trigger(t=e.Event("show.bs.dropdown",a)),t.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(e.Event("shown.bs.dropdown",a))}return!1}},r.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var r=e(this);if(t.preventDefault(),t.stopPropagation(),!r.is(".disabled, :disabled")){var o=i(r),s=o.hasClass("open");if(!s&&27!=t.which||s&&27==t.which)return 27==t.which&&o.find(n).trigger("focus"),r.trigger("click");var a=" li:not(.disabled):visible a",u=o.find(".dropdown-menu"+a);if(u.length){var f=u.index(t.target);38==t.which&&f>0&&f--,40==t.which&&fdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},t.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:i},f.prototype.init=function(t,n,r){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&e(document).find(e.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),o=i.length;o--;){var s=i[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",u="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},f.prototype.getDefaults=function(){return f.DEFAULTS},f.prototype.getOptions=function(n){var r=this.$element.data();for(var i in r)r.hasOwnProperty(i)&&-1!==e.inArray(i,t)&&delete r[i];return(n=e.extend({},this.getDefaults(),r,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=u(n.template,n.whiteList,n.sanitizeFn)),n},f.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,(function(e,r){n[e]!=r&&(t[e]=r)})),t},f.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},f.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},f.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},f.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var n=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!n)return;var r=this,i=this.tip(),o=this.getUID(this.type);this.setContent(),i.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&i.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,u=a.test(s);u&&(s=s.replace(a,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?i.appendTo(e(document).find(this.options.container)):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),l=i[0].offsetWidth,h=i[0].offsetHeight;if(u){var d=s,p=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+h>p.bottom?"top":"top"==s&&c.top-hp.width?"left":"left"==s&&c.left-ls.top+s.height&&(i.top=s.top+s.height-u)}else{var f=t.left-o,c=t.left+o+n;fs.right&&(i.left=s.left+s.width-c)}return i},f.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},f.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},f.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},f.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},f.prototype.enable=function(){this.enabled=!0},f.prototype.disable=function(){this.enabled=!1},f.prototype.toggleEnabled=function(){this.enabled=!this.enabled},f.prototype.toggle=function(t){var n=this;t&&((n=e(t.currentTarget).data("bs."+this.type))||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},f.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide((function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null}))},f.prototype.sanitizeHtml=function(e){return u(e,this.options.whiteList,this.options.sanitizeFn)};var l=e.fn.tooltip;e.fn.tooltip=c,e.fn.tooltip.Constructor=f,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=l,this}}(jQuery),function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");function n(n){return this.each((function(){var r=e(this),i=r.data("bs.popover"),o="object"==typeof n&&n;!i&&/destroy|hide/.test(n)||(i||r.data("bs.popover",i=new t(this,o)),"string"==typeof n&&i[n]())}))}t.VERSION="3.4.1",t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();if(this.options.html){var r=typeof n;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===r&&(n=this.sanitizeHtml(n))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===r?"html":"append"](n)}else e.find(".popover-title").text(t),e.find(".popover-content").children().detach().end().text(n);e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var r=e.fn.popover;e.fn.popover=n,e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=r,this}}(jQuery),function(e){"use strict";function t(n,r){this.$body=e(document.body),this.$scrollElement=e(n).is(document.body)?e(window):e(n),this.options=e.extend({},t.DEFAULTS,r),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each((function(){var r=e(this),i=r.data("bs.scrollspy"),o="object"==typeof n&&n;i||r.data("bs.scrollspy",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",r=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",r=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var t=e(this),i=t.data("target")||t.attr("href"),o=/^#./.test(i)&&e(i);return o&&o.length&&o.is(":visible")&&[[o[n]().top+r,i]]||null})).sort((function(e,t){return e[0]-t[0]})).each((function(){t.offsets.push(this[0]),t.targets.push(this[1])}))},t.prototype.process=function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.getScrollHeight(),n=this.options.offset+t-this.$scrollElement.height(),r=this.offsets,i=this.targets,o=this.activeTarget,s;if(this.scrollHeight!=t&&this.refresh(),e>=n)return o!=(s=i[i.length-1])&&this.activate(s);if(o&&e=r[s]&&(void 0===r[s+1]||e .active"),s=i&&e.support.transition&&(o.length&&o.hasClass("fade")||!!r.find("> .fade").length);function a(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),n.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(n[0].offsetWidth,n.addClass("in")):n.removeClass("fade"),n.parent(".dropdown-menu").length&&n.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&s?o.one("bsTransitionEnd",a).emulateTransitionEnd(t.TRANSITION_DURATION):a(),o.removeClass("in")};var r=e.fn.tab;e.fn.tab=n,e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=r,this};var i=function(t){t.preventDefault(),n.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(e){"use strict";var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r);var i=this.options.target===t.DEFAULTS.target?e(this.options.target):e(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.affix"),o="object"==typeof n&&n;i||r.data("bs.affix",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0,target:window},t.prototype.getState=function(e,t,n,r){var i=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return i=e-r&&"bottom"},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var e=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),r=this.options.offset,i=r.top,o=r.bottom,s=Math.max(e(document).height(),e(document.body).height());"object"!=typeof r&&(o=i=r),"function"==typeof i&&(i=r.top(this.$element)),"function"==typeof o&&(o=r.bottom(this.$element));var a=this.getState(s,n,i,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var u="affix"+(a?"-"+a:""),f=e.Event(u+".bs.affix");if(this.$element.trigger(f),f.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-o})}};var r=e.fn.affix;e.fn.affix=n,e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=r,this},e(window).on("load",(function(){e('[data-spy="affix"]').each((function(){var t=e(this),r=t.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),n.call(t,r)}))}))}(jQuery)}}}},fibers:{"package.json":function e(t,n,e){e.exports={name:"fibers",version:"5.0.3",main:"fibers"}},"fibers.js":function e(t,n,e,r,i){if(process.fiberLib)e.exports=process.fiberLib;else{var o=t("fs"),s=t("path"),a=t("detect-libc");Math.random();var u=s.join(i,"bin",process.platform+"-"+process.arch+"-"+process.versions.modules+("linux"===process.platform?"-"+a.family:""),"fibers");try{process.fiberLib=e.exports=t(u).Fiber}catch(c){throw console.error("## There is an issue with `node-fibers` ##\n`"+u+".node` is missing.\n\nTry running this to fix the issue: "+process.execPath+" "+i.replace(" ","\\ ")+"/build"),console.error(c.stack||c.message||c),new Error("Missing binary. See message above.")}f(e.exports)}function f(e){try{var t=process.binding("async_wrap"),n;if(t.asyncIdStackSize instanceof Function)n=t.asyncIdStackSize;else{if(void 0===t.constants.kStackLength)throw new Error("Couldn't figure out how to get async stack size");l=t.constants.kStackLength,n=function(){return t.async_hook_fields[l]}}var r=t.popAsyncContext||t.popAsyncIds,i=t.pushAsyncContext||t.pushAsyncIds,o,s;if(!r||!i)throw new Error("Push/pop do not exist");o=void 0===t.constants.kExecutionAsyncId?t.constants.kCurrentAsyncId:t.constants.kExecutionAsyncId,s=void 0===t.constants.kTriggerAsyncId?t.constants.kCurrentTriggerId:t.constants.kTriggerAsyncId;var a=t.async_id_fields||t.async_uid_fields;function u(){for(var e=n(),t=new Array(e);e>0;--e){var i=a[o];t[e-1]={asyncId:i,triggerId:a[s]},r(i)}return t}function f(e){for(var t=0;t0)i.changeLanguage(e,r);else if(0!=a[u]){a[u]=0;var f=new XMLHttpRequest;f.overrideMimeType("application/json"),f.open("GET",u,!1),f.send(null),200===f.status?a[u]=1:a[u]=-1,n.addResourceBundle(e,s,JSON.parse(f.response)||{}),i.changeLanguage(e,r)}};n.changeLanguage=p;var g=function(e,t,n){return i.format(e,t,n)};n.format=g;var b=function(){return i.languages};n.getLanguages=b;var m=function(e,t){return i.loadLanguages(e,t)};n.loadLanguages=m;var v=function(e,t){return i.loadNamespaces(e,t)};n.loadNamespaces=v;var y=function(e,t){return i.on(e,t)};n.on=y;var _=function(e,t){return i.off(e,t)};n.off=_,r.__exportStar(t("./i18n/i18n"),n),r.__exportStar(t("./i18n/i18n.app"),n),r.__exportStar(t("./translations"),n)},i18n:{"i18n.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fallbackKeys=n.getObjectI18nTemplate=n.translationI18nObjects=n.addObjectsI18n=n.translationI18nObject=void 0;var r=t("../index"),i=t("underscore"),o=t("clone"),s="_",a="base",u="core",f="translation",c=function(e,t){var n={lng:t,ns:f};if((0,r.exists)(e,n))return(0,r._t)(e,n)},l=function(e){return"".concat(e,"__object")},h=function(e,t){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t)},d=function(e,t){var n=h(e,t);return"".concat(n).concat("_","inlineHelpText")},p=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","group").concat("_").concat(n)},g=function(e,t,n){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t).concat("_","options").concat("_").concat(n)},b=function(e,t){return"".concat(e).concat("_","action").concat("_").concat(t)},m=function(e,t){return"".concat(e).concat("_","listview").concat("_").concat(t)},v=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},y=function(e,t,n){var r=l(t);return c(r,e)||n||""},_=function(e,t,n,r,i){var o=h(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=_(e,a,n,r,i))}return s||r||""},w=function(e,t,n,r,i){var o=d(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=w(e,a,n,r,i))}return s||r||""},k=function(e,t,n,r){var i=p(t,n);return c(i,e)||r||""},j=function(e,t,n,r,i,o){var s=g(t,n,r),a=c(s,e);if(!a){var u=v(o);u&&"base"!=t&&"core"!=t&&(a=j(e,u,n,r,i,o))}return a||i||""},x=function(e,t,n,r,i){var o=b(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=x(e,a,n,r,i))}return s||r||""},S=function(e,t,n,r,i){var o=m(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=S(e,a,n,r,i))}return s||r||""},D=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},E=function(e){i.forEach(e.fields,(function(e,t){var n=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;return e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return n.push(D(e))}))):n.push(D(e))})),e.options=n}catch(r){console.error("convertFieldsOptions error: ",e.options,r)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},A=function(e,t,n){n.label=y(e,t,n.label),i.each(n.fields,(function(r,o){if(r.label=_(e,t,o,r.label,n.datasource),r.inlineHelpText&&(r.inlineHelpText=w(e,t,o,r.inlineHelpText,n.datasource)),r.group&&(r.group=k(e,t,r.group,r.group)),r.options){var s=[];i.each(r.options,(function(r){if(i.has(r,"value")){var a=j(e,t,o,r.value,r.label,n.datasource);s.push(i.extend({},r,{label:a}))}else s.push(r)})),r.options=s}})),i.each(n.actions,(function(r,i){r.label=x(e,t,i,r.label,n.datasource)})),i.each(n.list_views,(function(r,i){r.label=S(e,t,i,r.label,n.datasource)}))};n.translationI18nObject=A;var C=function(e){i.each(e,(function(e){(0,r.addResourceBundle)(e.lng,f,e.data,!0,!0)}))};n.addObjectsI18n=C;var M=function(e,t){i.each(t,(function(t,r){(0,n.translationI18nObject)(e,r,t)}))};n.translationI18nObjects=M;var O=function(e,t,n){var r=o(n);E(r);var s={};return s[l(t)]=y(e,t,r.label),i.each(r.fields,(function(n,o){s[h(t,o)]=_(e,t,o,n.label),n.inlineHelpText&&(s[d(t,o)]=w(e,t,o,n.inlineHelpText,r.datasource)),n.group&&(s[p(t,n.group)]=k(e,t,n.group,n.group)),n.options&&i.each(n.options,(function(n){i.has(n,"value")&&(s[g(t,o,n.value)]=j(e,t,o,n.value,n.label))}))})),i.each(r.actions,(function(n,r){s[b(t,r)]=x(e,t,r,n.label)})),i.each(r.list_views,(function(n,r){s[m(t,r)]=S(e,t,r,n.label)})),s};n.getObjectI18nTemplate=O,n.fallbackKeys={getObjectLabelKey:l,getObjectFieldLabelKey:h,getObjectFieldInlineHelpTextLabelKey:d,getObjectFieldGroupKey:p,getObjectFieldOptionsLabelKey:g,getObjectActionLabelKey:b,getObjectListviewLabelKey:m}},"i18n.app.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.appFallbackKeys=n.getAppI18nTemplate=n.translationI18nApps=n.translationI18nMenus=void 0;var r=t("../index"),i=t("underscore"),o=t("clone"),s="translation",a="_",u=function(e,t){var n={lng:t,ns:s};if((0,r.exists)(e,n))return(0,r._t)(e,n)},f=function(e){return"app".concat("_").concat(e).concat("_","name")},c=function(e){return"app".concat("_").concat(e).concat("_","description")},l=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","tab_group").concat("_").concat(n)},h=function(e){return"menu".concat("_").concat(e)},d=function(e){return"tab".concat("_").concat(e)},p=function(e,t,n){var r=f(t);return u(r,e)||n||""},g=function(e,t,n){var r=c(t);return u(r,e)||n||""},b=function(e,t,n){var r=h(t);return u(r,e)||n||""},m=function(e,t,r){r.label=p(e,t,r.label||r.name),r.description=g(e,t,r.description),(0,n.translationI18nMenus)(e,r.admin_menus)},v=function(e,t){i.each(t,(function(t){var n=b(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationI18nMenus=v;var y=function(e,t){i.each(t,(function(t,n){m(e,n,t)}))};n.translationI18nApps=y;var _=function(e,t,n){var r=o(n),s={};return s[f(t)]=p(e,t,r.label||r.name),s[c(t)]=g(e,t,r.description),i.each(r.admin_menus,(function(t){s[h(t._id)]=b(e,t._id,t.label||t.name)})),s};n.getAppI18nTemplate=_,n.appFallbackKeys={getAppLabelKey:f,getAppDescriptionKey:c,getAppGroupKey:l,getMenuLabelKey:h,getTabKey:d}}},translations:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SteedosTranslationPrefixKeys=n.convertObject=void 0;var r=t("tslib"),i=t("underscore");r.__exportStar(t("./objectTranslation"),n),r.__exportStar(t("./translation"),n),r.__exportStar(t("./templates/objectTranslation"),n),r.__exportStar(t("./templates/translation"),n);var o=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},s=function(e){i.forEach(e.fields,(function(e,t){var n=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return n.push(o(e))}))):n.push(o(e))})),e.options=n}catch(r){console.error("convertFieldsOptions error: ",e.options,r)}else if(e.options&&i.isArray(e.options))try{i.forEach(e.options,(function(e){i.isString(e)?n.push(o(e)):n.push(e)})),e.options=n}catch(r){console.error("Creator.convertFieldsOptions",e.options,r)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},a;n.convertObject=s,function(e){e.Object="CustomObject",e.Field="CustomField",e.Action="CustomAction",e.Listview="CustomListview",e.Permission="CustomPermission",e.ValidationRule="CustomValidationRule",e.Application="CustomApplication",e.Tab="CustomTabs",e.Permissionset="CustomPermissionset",e.Profile="CustomProfile",e.Report="CustomReport",e.Workflow="Workflow",e.Layout="Layout",e.Client="Client",e.Server="Server",e.Function="Function",e.Router="Router",e.Trigger="Trigger"}(a=n.SteedosTranslationPrefixKeys||(n.SteedosTranslationPrefixKeys={}))},"objectTranslation.js":function e(t,n,e,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addObjectsTranslation=n.getObjectTranslationTemplate=n.translationObjects=n.translationObject=n.translationObjectLabel=void 0;var i=t("underscore"),o=t("./"),s=t("../index"),a=t("./index"),u=t("../i18n/i18n"),f=t("lodash"),c=t("crypto"),l,h=(0,t("@steedos/cachers").getCacher)("lru.translations.objects");function d(e){var t;return c.createHash("md5").update(e).digest("hex")}var p=function(e,t){return"".concat(e,"_").concat(t.name,"_").concat(d(JSON.stringify(t)))},g=t("clone"),b=".",m="base",v="core",y="translation",_="object",w="field",k="listview",j="action",x=function(e,t){var n={lng:t,ns:y,keySeparator:!1};if((0,s.exists)(e,n))return(0,s._t)(e,n)},S=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},D=function(e){switch(e){case"object":return o.SteedosTranslationPrefixKeys.Object;case"field":return o.SteedosTranslationPrefixKeys.Field;case"listview":return o.SteedosTranslationPrefixKeys.Listview;case"action":return o.SteedosTranslationPrefixKeys.Action;default:return"CustomLabels"}},E=function(e){var t;return[D(),e].join(".")},A=function(e){var t;return[D("object"),e,"label"].join(".")},C=function(e){var t;return[D("object"),e,"description"].join(".")},M=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"label"].join(".")},O=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"help"].join(".")},T=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"description"].join(".")},B=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_"),r;return[D("field"),e,"group",n].join(".")},I=function(e,t,n){var r;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"options",n].join(".")},R=function(e,t){var n;return[D("action"),e,t].join(".")},F=function(e,t){var n;return[D("listview"),e,t].join(".")},P=function(e,t,n){var r,i=[A(t)],o=u.fallbackKeys.getObjectLabelKey(t);return o&&i.push(o),x(i,e)||n||""};n.translationObjectLabel=P;var N=function(e,t,n){var r=C(t);return x(r,e)||n||""},L=function(e,t,n,r,i,o){var s,a=[M(t,n)],f=u.fallbackKeys.getObjectFieldLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=L(e,l,n,r,i))}return c||r||""},z=function(e,t,n,r,i,o){var s,a=[O(t,n)],f=u.fallbackKeys.getObjectFieldInlineHelpTextLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=z(e,l,n,r,i))}return c||r||""},U=function(e,t,n,r,i,o){var s=T(t,n),a,u=x([s],e);if(1!=o&&!u){var f=S(i);f&&"base"!=t&&"core"!=t&&(u=U(e,f,n,r,i))}return u||r||""},q=function(e,t,n,r,i,o){var s,a=[B(t,n)],f=u.fallbackKeys.getObjectFieldGroupKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=q(e,l,n,r,i))}return c||r||""},$=function(e,t,n,r,i,o,s){var a,f=[I(t,n,r)],c=u.fallbackKeys.getObjectFieldOptionsLabelKey(t,n,r);c&&f.push(c);var l=x(f,e);if(1!=s&&!l){var h=S(o);h&&"base"!=t&&"core"!=t&&(l=$(e,h,n,r,i,o))}return l||i||""},H=function(e,t,n,r,i,o){var s,a=[R(t,n)],f=u.fallbackKeys.getObjectActionLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=H(e,l,n,r,i))}return c||r||""},W=function(e,t,n,r,i,o){var s,a=[F(t,n)],f=u.fallbackKeys.getObjectListviewLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=W(e,l,n,r,i))}return c||r||""},Y=function(e,t,r,o,s){void 0===s&&(s=!1);var u=p(e,r);"test_obj_layout1"===t&&console.log("translationObject",t,u);var c=h.get(u);if(c)return Object.assign(r,(0,f.cloneDeep)(c));o&&(0,a.convertObject)(r),r.label=(0,n.translationObjectLabel)(e,t,r.label),r.description=N(e,t,r.description),i.each(r.fields,(function(n,o){if(n.label=L(e,t,o,n.label,r.datasource,s),n.inlineHelpText&&(n.inlineHelpText=z(e,t,o,n.inlineHelpText,r.datasource,s)),n.group&&(n.group=q(e,t,n.group,n.group,r.datasource,s)),n.options){var a=[];i.each(n.options,(function(n){if(i.has(n,"value")){var u=$(e,t,o,n.value,n.label,r.datasource,s);a.push(i.extend({},n,{label:u}))}else a.push(n)})),n.options=a}})),i.each(r.actions,(function(n,i){n.label=H(e,t,i,n.label,r.datasource,s)})),i.each(r.list_views,(function(n,i){n.label=W(e,t,i,n.label,r.datasource,s)})),h.set(u,(0,f.cloneDeep)(r))};n.translationObject=Y;var V=function(e,t){i.each(t,(function(t,r){(0,n.translationObject)(e,r,t)}))};n.translationObjects=V;var K=function(e,t,r){var o=g(r);(0,a.convertObject)(o);var s={};return s[A(t)]=(0,n.translationObjectLabel)(e,t,o.label),s[C(t)]=N(e,t,o.description),i.each(o.fields,(function(n,r){s[M(t,r)]=L(e,t,r,n.label),n.inlineHelpText&&(s[O(t,r)]=z(e,t,r,n.inlineHelpText,o.datasource)),n.description&&(s[T(t,r)]=U(e,t,r,n.description,o.datasource)),n.group&&(s[B(t,n.group)]=q(e,t,n.group,n.group,o.datasource)),n.options&&i.each(n.options,(function(n){i.has(n,"value")&&(s[I(t,r,n.value)]=$(e,t,r,n.value,n.label))}))})),i.each(o.actions,(function(n,r){s[R(t,r)]=H(e,t,r,n.label)})),i.each(o.list_views,(function(n,r){s[F(t,r)]=W(e,t,r,n.label)})),s};function G(e,t){var n=g(e);(0,a.convertObject)(n);var r={},o=n.name;return o||console.error("Error: Invalid objectTranslation:"+t),r[A(o)]=n.label,r[C(o)]=n.description,i.each(n.fields,(function(e,t){r[M(o,t)]=e.label,e.help&&(r[O(o,t)]=e.help),e.description&&(r[T(o,t)]=e.description),e.options&&i.each(e.options,(function(e){i.has(e,"value")&&(r[I(o,t,e.value)]=e.label)}))})),i.each(n.groups,(function(e,t){r[B(o,t)]=e})),i.each(n.actions,(function(e,t){r[R(o,t)]=e.label})),i.each(n.listviews,(function(e,t){r[F(o,t)]=e.label})),i.each(n.CustomLabels,(function(e,t){r[E(t)]=e})),r}n.getObjectTranslationTemplate=K;var X=function(e){i.each(e,(function(e){var t=G(e.data,e.__filename);(0,s.addResourceBundle)(e.lng,y,t,!0,!0)}))};n.addObjectsTranslation=X},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addTranslations=n.convertTranslation=n.convertTranslationData=n.getAppTranslationTemplate=n.translationApps=n.translationMenus=n.translationApp=n.translationTabLabel=n.translationTabGroup=void 0;var r=t("../index"),i=t("underscore"),o=t("./"),s=t("../i18n/i18n.app"),a=t("clone"),u="translation",f=".",c="app",l="menu",h="tab",d=function(e){switch(e){case"app":return o.SteedosTranslationPrefixKeys.Application;case"tab":return o.SteedosTranslationPrefixKeys.Tab;default:return"CustomLabels"}},p=function(e){var t;return[d(),e].join(".")},g=function(e,t){var n={lng:t,ns:u,keySeparator:!1};if((0,r.exists)(e,n))return(0,r._t)(e,n)},b=function(e){var t;return[d("app"),e,"name"].join(".")},m=function(e){var t;return[d("app"),e,"description"].join(".")},v=function(e,t){var n,r;return[d("app"),e,"groups",t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_")].join(".")},y=function(e){var t;return[d("menu"),"menu_".concat(e)].join(".")},_=function(e){var t;return[d("tab"),e].join(".")},w=function(e,t,n){var r,i=[b(t)],o=s.appFallbackKeys.getAppLabelKey(t);return o&&i.push(o),g(i,e)||n||""},k=function(e,t,n){var r,i=[m(t)],o=s.appFallbackKeys.getAppDescriptionKey(t);return o&&i.push(o),g(i,e)||n||""},j=function(e,t,n,r){var i,o=[v(t,n)],a=s.appFallbackKeys.getAppGroupKey(t,n);return a&&o.push(a),g(o,e)||r||""};n.translationTabGroup=j;var x=function(e,t,n){var r,i=[y(t)],o=s.appFallbackKeys.getMenuLabelKey(t);return o&&i.push(o),g(i,e)||n||""},S=function(e,t,n){var r,i=[_(t)],o=s.appFallbackKeys.getTabKey(t);return o&&i.push(o),g(i,e)||n||""};n.translationTabLabel=S;var D=function(e,t,r){r.label=w(e,t,r.label||r.name),r.description=k(e,t,r.description),i.each(r.tab_groups,(function(i,o){r.tab_groups[o].id=i.id||i.group_name,r.tab_groups[o].group_name=(0,n.translationTabGroup)(e,t,i.group_name,i.group_name)})),(0,n.translationMenus)(e,r.admin_menus)};n.translationApp=D;var E=function(e,t){i.each(t,(function(t){var n=x(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationMenus=E;var A=function(e,t){i.each(t,(function(t,r){(0,n.translationApp)(e,r,t)}))};n.translationApps=A;var C=function(e,t,n){var r=a(n),o={};return o[b(t)]=w(e,t,r.label||r.name),o[m(t)]=k(e,t,r.description),i.each(r.admin_menus,(function(t){o[y(t._id)]=x(e,t._id,t.label||t.name)})),o};n.getAppTranslationTemplate=C;var M=function(e,t,n){i.isArray(n)?i.each(n,(function(e){M(e,"",e)})):n&&i.each(i.keys(n),(function(r){var o=t?"".concat(t,".").concat(r):r,s=n[r];"object"==typeof s?i.isArray(s)?i.each(s,(function(e){M(e,o,s)})):M(e,o,s):e[o]=s}))};function O(e){for(var t in e)"object"==typeof e[t]&&M(e,t,e[t]);return e}n.convertTranslationData=O;var T=function(e){var t=a(e),n={};return i.each(t.CustomApplications,(function(e,t){n[b(t)]=e.name,n[m(t)]=e.description,i.each(e.groups,(function(e,r){n[v(t,r)]=e}))})),i.each(t.CustomTabs,(function(e,t){n[_(t)]=e})),i.each(t.CustomLabels,(function(e,t){var r;if("simpleschema"!=t&&i.isObject(e)){var o=O(((r={})[t]=e,r));i.each(o,(function(e,t){i.isObject(e)||(n[p(t)]=e)}))}else n[p(t)]=e})),n};n.convertTranslation=T;var B=function(e){i.each(e,(function(e){var t=(0,n.convertTranslation)(e.data);(0,r.addResourceBundle)(e.lng,u,t,!0,!0)}))};n.addTranslations=B},templates:{"objectTranslation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getObjectMetadataTranslationTemplate=void 0;var r=t("underscore"),i=t("../index"),o=t("clone");function s(e,t){var n={};return r.each(e,(function(e){n[e]="help"===e?t.inlineHelpText||"":t[e]||""})),n}function a(e){return s(["label","description"],e)}function u(e){switch(e.type){case"select":return s(["label","help","options","description"],e);default:return s(["label","help","description"],e)}}function f(e){return s(["label"],e)}function c(e){return s(["label"],e)}function l(e){var t={};return r.each(e,(function(e,n){t[n]=u(e)})),t}function h(e){var t={};return r.each(e,(function(e,n){t[n]=c(e)})),t}function d(e){var t={};return r.each(e,(function(e,n){t[n]=f(e)})),t}function p(e,t){var n={};return r.each(e,(function(e,r){if(e.group){var i=e.group.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");n[i]=t[r].group}})),n}var g=function(e,t,n,s){void 0===s&&(s=!1);var u=o(n);1!=s&&(0,i.translationObject)(e,t,u,!0,s);var f=Object.assign({},a(u));f=Object.assign({},f,{fields:l(u.fields)});var c=p(n.fields,u.fields);r.isEmpty(c)||(f=Object.assign({},f,{groups:c}));var g=d(u.list_views);r.isEmpty(g)||(f=Object.assign({},f,{listviews:g}));var b=h(u.actions);return r.isEmpty(b)||(f=Object.assign({},f,{actions:b})),Object.assign({name:t},f)};n.getObjectMetadataTranslationTemplate=g},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAppMetadataTranslationTemplate=void 0;var r=t("underscore"),i=t("../index"),o=t("clone");function s(e,t){var n={};return r.each(e,(function(e){n[e]=t[e]||""})),n}function a(e){var t={groups:{}};return e?(r.each(e,(function(e){var n=e.group_name.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t.groups[n]=e.group_name})),t):{}}var u=function(e){return Object.assign({},s(["name","description"],e),a(e.tab_groups))},f=function(e){var t={};return r.each(e,(function(e,n){t[n]=n})),t},c=function(e){var t={};return r.each(e,(function(e){var n=e.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t[n]=e})),t},l=function(e,t,n){var r,s=o(n);(0,i.translationApp)(e,t,s);var a={},l;return s.tab_items?a=f(s.tab_items):s.tabs&&(a=c(s.tabs)),Object.assign({},{CustomApplications:(r={},r[t]=u(s),r)},{CustomTabs:a})};n.getAppMetadataTranslationTemplate=l}}}},node_modules:{i18next:{"package.json":function e(t,n,e){e.exports={name:"i18next",version:"19.9.2",module:"./dist/esm/i18next.js",main:"./dist/cjs/i18next.js"}},dist:{esm:{"i18next.js":function e(t,n,e){let r,i,o,s,a,u,f,c;e.link("@babel/runtime/helpers/esm/typeof",{default(e){r=e}},0),e.link("@babel/runtime/helpers/esm/objectSpread",{default(e){i=e}},1),e.link("@babel/runtime/helpers/esm/classCallCheck",{default(e){o=e}},2),e.link("@babel/runtime/helpers/esm/createClass",{default(e){s=e}},3),e.link("@babel/runtime/helpers/esm/possibleConstructorReturn",{default(e){a=e}},4),e.link("@babel/runtime/helpers/esm/getPrototypeOf",{default(e){u=e}},5),e.link("@babel/runtime/helpers/esm/assertThisInitialized",{default(e){f=e}},6),e.link("@babel/runtime/helpers/esm/inherits",{default(e){c=e}},7);var l={type:"logger",log:function e(t){this.output("log",t)},warn:function e(t){this.output("warn",t)},error:function e(t){this.output("error",t)},output:function e(t,n){console&&console[t]&&console[t].apply(console,n)}},h,d=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.init(t,n)}return s(e,[{key:"init",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||l,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function e(t){this.debug=t}},{key:"log",value:function e(){for(var t=arguments.length,n=new Array(t),r=0;r1?n-1:0),i=1;i-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function y(e,t,n){var r=v(e,t,Object),i,o;r.obj[r.k]=n}function _(e,t,n,r){var i=v(e,t,Object),o=i.obj,s=i.k;o[s]=o[s]||[],r&&(o[s]=o[s].concat(n)),r||o[s].push(n)}function w(e,t){var n=v(e,t),r=n.obj,i=n.k;if(r)return r[i]}function k(e,t,n){var r=w(e,n);return void 0!==r?r:w(t,n)}function j(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):j(e[r],t[r],n):e[r]=t[r]);return e}function x(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var S={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function D(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return S[e]})):e}var E="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,A=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return o(this,t),n=a(this,u(t).call(this)),E&&p.call(f(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return c(t,e),s(t,[{key:"addNamespaces",value:function e(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function e(t){var n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}},{key:"getResource",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=[t,n];return r&&"string"!=typeof r&&(s=s.concat(r)),r&&"string"==typeof r&&(s=s.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(s=t.split(".")),w(this.data,s)}},{key:"addResource",value:function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},s=this.options.keySeparator;void 0===s&&(s=".");var a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(i=n,n=(a=t.split("."))[1]),this.addNamespaces(n),y(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}},{key:"addResources",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)"string"!=typeof r[o]&&"[object Array]"!==Object.prototype.toString.apply(r[o])||this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}},{key:"addResourceBundle",value:function e(t,n,r,o,s){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},u=[t,n];t.indexOf(".")>-1&&(o=r,r=n,n=(u=t.split("."))[1]),this.addNamespaces(n);var f=w(this.data,u)||{};o?j(f,r,s):f=i({},f,r),y(this.data,u,f),a.silent||this.emit("added",t,n,r)}},{key:"removeResourceBundle",value:function e(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}},{key:"hasResourceBundle",value:function e(t,n){return void 0!==this.getResource(t,n)}},{key:"getResourceBundle",value:function e(t,n){return n||(n=this.options.defaultNS),"v1"===this.options.compatibilityAPI?i({},{},this.getResource(t,n)):this.getResource(t,n)}},{key:"getDataByLanguage",value:function e(t){return this.data[t]}},{key:"toJSON",value:function e(){return this.data}}]),t}(p),C={processors:{},addPostProcessor:function e(t){this.processors[t.name]=t},handle:function e(t,n,r,i,o){var s=this;return t.forEach((function(e){s.processors[e]&&(n=s.processors[e].process(n,r,i,o))})),n}},M={},O=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o(this,t),n=a(this,u(t).call(this)),E&&p.call(f(n)),m(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,f(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=d.create("translator"),n}return c(t,e),s(t,[{key:"changeLanguage",value:function e(t){t&&(this.language=t)}},{key:"exists",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(t,n);return r&&void 0!==r.res}},{key:"extractFromKey",value:function e(t,n){var r=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=n.ns||this.options.defaultNS;if(r&&t.indexOf(r)>-1){var s=t.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:t,namespaces:o};var a=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),t=a.join(i)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function e(n,o,s){var a=this;if("object"!==r(o)&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),null==n)return"";Array.isArray(n)||(n=[String(n)]);var u=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,f=this.extractFromKey(n[n.length-1],o),c=f.key,l=f.namespaces,h=l[l.length-1],d=o.lng||this.language,p=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var g=o.nsSeparator||this.options.nsSeparator;return h+g+c}return c}var b=this.resolve(n,o),m=b&&b.res,v=b&&b.usedKey||c,y=b&&b.exactUsedKey||c,_=Object.prototype.toString.apply(m),w=["[object Number]","[object Function]","[object RegExp]"],k=void 0!==o.joinArrays?o.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(j&&m&&x&&w.indexOf(_)<0&&("string"!=typeof k||"[object Array]"!==_)){if(!o.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,m,o):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(u){var S="[object Array]"===_,D=S?[]:{},E=S?y:v;for(var A in m)if(Object.prototype.hasOwnProperty.call(m,A)){var C="".concat(E).concat(u).concat(A);D[A]=this.translate(C,i({},o,{joinArrays:!1,ns:l})),D[A]===C&&(D[A]=m[A])}m=D}}else if(j&&"string"==typeof k&&"[object Array]"===_)(m=m.join(k))&&(m=this.extendTranslation(m,n,o,s));else{var M=!1,O=!1,T=void 0!==o.count&&"string"!=typeof o.count,B=t.hasDefaultValue(o),I=T?this.pluralResolver.getSuffix(d,o.count):"",R=o["defaultValue".concat(I)]||o.defaultValue;!this.isValidLookup(m)&&B&&(M=!0,m=R),this.isValidLookup(m)||(O=!0,m=c);var F=B&&R!==m&&this.options.updateMissing;if(O||M||F){if(this.logger.log(F?"updateKey":"missingKey",d,h,c,F?R:m),u){var P=this.resolve(c,i({},o,{keySeparator:!1}));P&&P.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var N=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var z=0;z1&&void 0!==arguments[1]?arguments[1]:{},i,o,s,a,u;return"string"==typeof t&&(t=[t]),t.forEach((function(e){if(!n.isValidLookup(i)){var t=n.extractFromKey(e,r),f=t.key;o=f;var c=t.namespaces;n.options.fallbackNS&&(c=c.concat(n.options.fallbackNS));var l=void 0!==r.count&&"string"!=typeof r.count,h=void 0!==r.context&&"string"==typeof r.context&&""!==r.context,d=r.lngs?r.lngs:n.languageUtils.toResolveHierarchy(r.lng||n.language,r.fallbackLng);c.forEach((function(e){n.isValidLookup(i)||(u=e,!M["".concat(d[0],"-").concat(e)]&&n.utils&&n.utils.hasLoadedNamespace&&!n.utils.hasLoadedNamespace(u)&&(M["".concat(d[0],"-").concat(e)]=!0,n.logger.warn('key "'.concat(o,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(u,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(t){if(!n.isValidLookup(i)){a=t;var o=f,u=[o],c,d;if(n.i18nFormat&&n.i18nFormat.addLookupKeys)n.i18nFormat.addLookupKeys(u,f,t,e,r);else l&&(c=n.pluralResolver.getSuffix(t,r.count)),l&&h&&u.push(o+c),h&&u.push(o+="".concat(n.options.contextSeparator).concat(r.context)),l&&u.push(o+=c);for(;d=u.pop();)n.isValidLookup(i)||(s=d,i=n.getResource(t,e,d,r))}})))}))}})),{res:i,usedKey:o,exactUsedKey:s,usedLng:a,usedNS:u}}},{key:"isValidLookup",value:function e(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}}],[{key:"hasDefaultValue",value:function e(t){var n="defaultValue";for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&void 0!==t[r])return!0;return!1}}]),t}(p);function T(e){return e.charAt(0).toUpperCase()+e.slice(1)}var B=function(){function e(t){o(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=d.create("languageUtils")}return s(e,[{key:"getScriptPartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return null;var n=t.split("-");return 2===n.length?null:(n.pop(),"x"===n[n.length-1].toLowerCase()?null:this.formatLanguageCode(n.join("-")))}},{key:"getLanguagePartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return t;var n=t.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function e(t){if("string"==typeof t&&t.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],r=t.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=T(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=T(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=T(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function e(t){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function e(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function e(t){var n=this,r;return t?(t.forEach((function(e){if(!r){var t=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(t)||(r=t)}})),!r&&this.options.supportedLngs&&t.forEach((function(e){if(!r){var t=n.getLanguagePartFromCode(e);if(n.isSupportedCode(t))return r=t;r=n.options.supportedLngs.find((function(e){if(0===e.indexOf(t))return e}))}})),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r):null}},{key:"getFallbackCodes",value:function e(t,n){if(!t)return[];if("function"==typeof t&&(t=t(n)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!n)return t.default||[];var r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}},{key:"toResolveHierarchy",value:function e(t,n){var r=this,i=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],s=function e(t){t&&(r.isSupportedCode(t)?o.push(t):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(t))):"string"==typeof t&&s(this.formatLanguageCode(t)),i.forEach((function(e){o.indexOf(e)<0&&s(r.formatLanguageCode(e))})),o}}]),e}(),I=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],R={1:function e(t){return Number(t>1)},2:function e(t){return Number(1!=t)},3:function e(t){return 0},4:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function e(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function e(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function e(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function e(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function e(t){return Number(t>=2)},10:function e(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function e(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function e(t){return Number(t%10!=1||t%100==11)},13:function e(t){return Number(0!==t)},14:function e(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function e(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function e(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function e(t){return Number(0==t?0:1==t?1:2)},19:function e(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function e(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function e(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function e(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}};function F(){var e={};return I.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:R[t.fc]}}))})),e}var P=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.languageUtils=t,this.options=n,this.logger=d.create("pluralResolver"),this.rules=F()}return s(e,[{key:"addRule",value:function e(t,n){this.rules[t]=n}},{key:"getRule",value:function e(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function e(t){var n=this.getRule(t);return n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function e(t,n){return this.getSuffixes(t).map((function(e){return n+e}))}},{key:"getSuffixes",value:function e(t){var n=this,r=this.getRule(t);return r?r.numbers.map((function(e){return n.getSuffix(t,e)})):[]}},{key:"getSuffix",value:function e(t,n){var r=this,i=this.getRule(t);if(i){var o=i.noAbs?i.plurals(n):i.plurals(Math.abs(n)),s=i.numbers[o];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]&&(2===s?s="plural":1===s&&(s=""));var a=function e(){return r.options.prepend&&s.toString()?r.options.prepend+s.toString():s.toString()};return"v1"===this.options.compatibilityJSON?1===s?"":"number"==typeof s?"_plural_".concat(s.toString()):a():"v2"===this.options.compatibilityJSON?a():this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),N=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.logger=d.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return s(e,[{key:"init",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var n=t.interpolation;this.escape=void 0!==n.escape?n.escape:D,this.escapeValue=void 0===n.escapeValue||n.escapeValue,this.useRawValueToEscape=void 0!==n.useRawValueToEscape&&n.useRawValueToEscape,this.prefix=n.prefix?x(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?x(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?x(n.nestingPrefix):n.nestingPrefixEscaped||x("$t("),this.nestingSuffix=n.nestingSuffix?x(n.nestingSuffix):n.nestingSuffixEscaped||x(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=void 0!==n.alwaysFormat&&n.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function e(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function e(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function e(t,n,r,i){var o=this,s,a,u,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function e(t){if(t.indexOf(o.formatSeparator)<0){var s=k(n,f,t);return o.alwaysFormat?o.format(s,void 0,r):s}var a=t.split(o.formatSeparator),u=a.shift().trim(),c=a.join(o.formatSeparator).trim();return o.format(k(n,f,u),c,r,i)};this.resetRegExp();var h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,p;return[{regex:this.regexpUnescape,safeValue:function e(t){return c(t)}},{regex:this.regexp,safeValue:function e(t){return o.escapeValue?c(o.escape(t)):c(t)}}].forEach((function(e){for(u=0;s=e.regex.exec(t);){if(void 0===(a=l(s[1].trim())))if("function"==typeof h){var n=h(t,s,i);a="string"==typeof n?n:""}else{if(d){a=s[0];continue}o.logger.warn("missed to pass in variable ".concat(s[1]," for interpolating ").concat(t)),a=""}else"string"==typeof a||o.useRawValueToEscape||(a=b(a));if(t=t.replace(s[0],e.safeValue(a)),e.regex.lastIndex=0,++u>=o.maxReplaces)break}})),t}},{key:"nest",value:function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s,a,u=i({},o);function f(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,u)).replace(/'/g,'"');try{u=JSON.parse(o),t&&(u=i({},t,u))}catch(s){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),s),"".concat(e).concat(n).concat(o)}return delete u.defaultValue,e}for(u.applyPostProcessor=!1,delete u.defaultValue;s=this.nestingRegexp.exec(t);){var c=[],l=!1;if(s[0].includes(this.formatSeparator)&&!/{.*}/.test(s[1])){var h=s[1].split(this.formatSeparator).map((function(e){return e.trim()}));s[1]=h.shift(),c=h,l=!0}if((a=n(f.call(this,s[1].trim(),u),u))&&s[0]===t&&"string"!=typeof a)return a;"string"!=typeof a&&(a=b(a)),a||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(t)),a=""),l&&(a=c.reduce((function(e,t){return r.format(e,t,o.lng,o)}),a.trim())),t=t.replace(s[0],a),this.regexp.lastIndex=0}return t}}]),e}();function L(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}var z=function(e){function t(e,n,r){var i,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return o(this,t),i=a(this,u(t).call(this)),E&&p.call(f(i)),i.backend=e,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=s,i.logger=d.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,s.backend,s),i}return c(t,e),s(t,[{key:"queueLoad",value:function e(t,n,r,i){var o=this,s=[],a=[],u=[],f=[];return t.forEach((function(e){var t=!0;n.forEach((function(n){var i="".concat(e,"|").concat(n);!r.reload&&o.store.hasResourceBundle(e,n)?o.state[i]=2:o.state[i]<0||(1===o.state[i]?a.indexOf(i)<0&&a.push(i):(o.state[i]=1,t=!1,a.indexOf(i)<0&&a.push(i),s.indexOf(i)<0&&s.push(i),f.indexOf(n)<0&&f.push(n)))})),t||u.push(e)})),(s.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:i}),{toLoad:s,pending:a,toLoadLanguages:u,toLoadNamespaces:f}}},{key:"loaded",value:function e(t,n,r){var i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),r&&this.store.addResourceBundle(o,s,r),this.state[t]=n?-1:2;var e={};this.queue.forEach((function(r){_(r.loaded,[o],s),L(r.pending,t),n&&r.errors.push(n),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(t){e[t]||(e[t]=[]),r.loaded[t].length&&r.loaded[t].forEach((function(n){e[t].indexOf(n)<0&&e[t].push(n)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",e),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function e(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[r](t,n,(function(e,u){e&&u&&o<5?setTimeout((function(){i.read.call(i,t,n,r,o+1,2*s,a)}),s):a(e,u)})):a(null,{})}},{key:"prepareLoading",value:function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof n&&(n=[n]);var s=this.queueLoad(t,n,i,o);if(!s.toLoad.length)return s.pending.length||o(),null;s.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function e(t,n,r){this.prepareLoading(t,n,{},r)}},{key:"reload",value:function e(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}},{key:"loadOne",value:function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=t.split("|"),o=i[0],s=i[1];this.read(o,s,"read",void 0,void 0,(function(e,i){e&&n.logger.warn("".concat(r,"loading namespace ").concat(s," for language ").concat(o," failed"),e),!e&&i&&n.logger.log("".concat(r,"loaded namespace ").concat(s," for language ").concat(o),i),n.loaded(t,e,i)}))}},{key:"saveMissing",value:function e(t,n,r,o,s){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(n,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(t,n,r,o,null,i({},a,{isUpdate:s})),t&&t[0]&&this.store.addResource(t[0],n,r,o))}}]),t}(p);function U(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function e(t){var n={};if("object"===r(t[1])&&(n=t[1]),"string"==typeof t[1]&&(n.defaultValue=t[1]),"string"==typeof t[2]&&(n.tDescription=t[2]),"object"===r(t[2])||"object"===r(t[3])){var i=t[3]||t[2];Object.keys(i).forEach((function(e){n[e]=i[e]}))}return n},interpolation:{escapeValue:!0,format:function e(t,n,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function q(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function $(){}var H,W=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(o(this,t),e=a(this,u(t).call(this)),E&&p.call(f(e)),e.options=q(n),e.services={},e.logger=d,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),a(e,f(e));setTimeout((function(){e.init(n,r)}),0)}return e}return c(t,e),s(t,[{key:"init",value:function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function o(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof n&&(r=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=i({},U(),this.options,q(n)),this.format=this.options.interpolation.format,r||(r=$),!this.options.isClone){this.modules.logger?d.init(o(this.modules.logger),this.options):d.init(null,this.options);var s=new B(this.options);this.store=new A(this.options.resources,this.options);var a=this.services;a.logger=d,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new P(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new N(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new z(o(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var f=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];f.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var l=g(),h=function e(){var n=function e(n,i){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),l.resolve(i),r(n,i)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return n(null,t.t.bind(t));t.changeLanguage(t.options.lng,n)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),l}},{key:"loadResources",value:function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,i=r,o="string"==typeof t?t:this.language;if("function"==typeof t&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return i();var s=[],a=function e(t){var r;t&&n.services.languageUtils.toResolveHierarchy(t).forEach((function(e){s.indexOf(e)<0&&s.push(e)}))};if(o)a(o);else{var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(s,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function e(t,n,r){var i=g();return t||(t=this.languages),n||(n=this.options.ns),r||(r=$),this.services.backendConnector.reload(t,n,(function(e){i.resolve(),r(e)})),i}},{key:"use",value:function e(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&C.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function e(t,n){var r=this;this.isLanguageChangingTo=t;var i=g();this.emit("languageChanging",t);var o=function e(t,o){o?(r.language=o,r.languages=r.services.languageUtils.toResolveHierarchy(o),r.translator.changeLanguage(o),r.isLanguageChangingTo=void 0,r.emit("languageChanged",o),r.logger.log("languageChanged",o)):r.isLanguageChangingTo=void 0,i.resolve((function(){return r.t.apply(r,arguments)})),n&&n(t,(function(){return r.t.apply(r,arguments)}))},s=function e(t){var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||(r.language=n,r.languages=r.services.languageUtils.toResolveHierarchy(n)),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,(function(e){o(e,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(s):s(t):s(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function e(t,n){var o=this,s=function e(t,n){var s;if("object"!==r(n)){for(var a=arguments.length,u=new Array(a>2?a-2:0),f=2;f1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=this.languages[0],o=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var a=function e(t,r){var i=n.services.backendConnector.state["".concat(t,"|").concat(r)];return-1===i||2===i};if(r.precheck){var u=r.precheck(this,a);if(void 0!==u)return u}return!!this.hasResourceBundle(i,t)||(!this.services.backendConnector.backend||!(!a(i,t)||o&&!a(s,t)))}},{key:"loadNamespaces",value:function e(t,n){var r=this,i=g();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){i.resolve(),n&&n(e)})),i):(n&&n(),Promise.resolve())}},{key:"loadLanguages",value:function e(t,n){var r=g();"string"==typeof t&&(t=[t]);var i=this.options.preload||[],o=t.filter((function(e){return i.indexOf(e)<0}));return o.length?(this.options.preload=i.concat(o),this.loadResources((function(e){r.resolve(),n&&n(e)})),r):(n&&n(),Promise.resolve())}},{key:"dir",value:function e(t){return t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),t?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr":"rtl";var n}},{key:"createInstance",value:function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(n,r)}},{key:"cloneInstance",value:function e(){var n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,s=i({},this.options,r,{isClone:!0}),a=new t(s),u=["store","services","language"];return u.forEach((function(e){a[e]=n[e]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new O(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rr,root:()=>i,ArrayProto:()=>o,ObjProto:()=>s,SymbolProto:()=>a,push:()=>u,slice:()=>f,toString:()=>c,hasOwnProperty:()=>l,supportsArrayBuffer:()=>h,supportsDataView:()=>d,nativeIsArray:()=>p,nativeKeys:()=>g,nativeCreate:()=>b,nativeIsView:()=>m,_isNaN:()=>v,_isFinite:()=>y,hasEnumBug:()=>_,nonEnumerableProps:()=>w,MAX_ARRAY_INDEX:()=>k});var r="1.13.4",i="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},o=Array.prototype,s=Object.prototype,a="undefined"!=typeof Symbol?Symbol.prototype:null,u=o.push,f=o.slice,c=s.toString,l=s.hasOwnProperty,h="undefined"!=typeof ArrayBuffer,d="undefined"!=typeof DataView,p=Array.isArray,g=Object.keys,b=Object.create,m=h&&ArrayBuffer.isView,v=isNaN,y=isFinite,_=!{toString:null}.propertyIsEnumerable("toString"),w=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],k=Math.pow(2,53)-1},"restArguments.js":function e(t,n,e){function r(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;ir})},"isObject.js":function e(t,n,e){function r(e){var t=typeof e;return"function"===t||"object"===t&&!!e}e.export({default:()=>r})},"isNull.js":function e(t,n,e){function r(e){return null===e}e.export({default:()=>r})},"isUndefined.js":function e(t,n,e){function r(e){return void 0===e}e.export({default:()=>r})},"isBoolean.js":function e(t,n,e){let r;function i(e){return!0===e||!1===e||"[object Boolean]"===r.call(e)}e.export({default:()=>i}),e.link("./_setup.js",{toString(e){r=e}},0)},"isElement.js":function e(t,n,e){function r(e){return!(!e||1!==e.nodeType)}e.export({default:()=>r})},"isString.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("String"))},"_tagTester.js":function e(t,n,e){let r;function i(e){var t="[object "+e+"]";return function(e){return r.call(e)===t}}e.export({default:()=>i}),e.link("./_setup.js",{toString(e){r=e}},0)},"isNumber.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Number"))},"isDate.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Date"))},"isRegExp.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("RegExp"))},"isError.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Error"))},"isSymbol.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Symbol"))},"isArrayBuffer.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("ArrayBuffer"))},"isDataView.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./isArrayBuffer.js",{default(e){o=e}},2),e.link("./_stringTagBug.js",{hasStringTagBug(e){s=e}},3);var a=r("DataView");function u(e){return null!=e&&i(e.getInt8)&&o(e.buffer)}e.exportDefault(s?u:a)},"isFunction.js":function e(t,n,e){let r,i;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_setup.js",{root(e){i=e}},1);var o=r("Function"),s=i.document&&i.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof s&&(o=function(e){return"function"==typeof e||!1}),e.exportDefault(o)},"_stringTagBug.js":function e(t,n,e){let r,i;e.export({hasStringTagBug:()=>o,isIE11:()=>s}),e.link("./_setup.js",{supportsDataView(e){r=e}},0),e.link("./_hasObjectTag.js",{default(e){i=e}},1);var o=r&&i(new DataView(new ArrayBuffer(8))),s="undefined"!=typeof Map&&i(new Map)},"_hasObjectTag.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Object"))},"isArray.js":function e(t,n,e){let r,i;e.link("./_setup.js",{nativeIsArray(e){r=e}},0),e.link("./_tagTester.js",{default(e){i=e}},1),e.exportDefault(r||i("Array"))},"isArguments.js":function e(t,n,e){let r,i;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1);var o=r("Arguments");!function(){o(arguments)||(o=function(e){return i(e,"callee")})}(),e.exportDefault(o)},"_has.js":function e(t,n,e){let r;function i(e,t){return null!=e&&r.call(e,t)}e.export({default:()=>i}),e.link("./_setup.js",{hasOwnProperty(e){r=e}},0)},"isFinite.js":function e(t,n,e){let r,i;function o(e){return!i(e)&&r(e)&&!isNaN(parseFloat(e))}e.export({default:()=>o}),e.link("./_setup.js",{_isFinite(e){r=e}},0),e.link("./isSymbol.js",{default(e){i=e}},1)},"isNaN.js":function e(t,n,e){let r,i;function o(e){return i(e)&&r(e)}e.export({default:()=>o}),e.link("./_setup.js",{_isNaN(e){r=e}},0),e.link("./isNumber.js",{default(e){i=e}},1)},"isTypedArray.js":function e(t,n,e){let r,i,o,s,a,u;e.link("./_setup.js",{supportsArrayBuffer(e){r=e},nativeIsView(e){i=e},toString(e){o=e}},0),e.link("./isDataView.js",{default(e){s=e}},1),e.link("./constant.js",{default(e){a=e}},2),e.link("./_isBufferLike.js",{default(e){u=e}},3);var f=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function c(e){return i?i(e)&&!s(e):u(e)&&f.test(o.call(e))}e.exportDefault(r?c:a(!1))},"constant.js":function e(t,n,e){function r(e){return function(){return e}}e.export({default:()=>r})},"_isBufferLike.js":function e(t,n,e){let r,i;e.link("./_createSizePropertyCheck.js",{default(e){r=e}},0),e.link("./_getByteLength.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createSizePropertyCheck.js":function e(t,n,e){let r;function i(e){return function(t){var n=e(t);return"number"==typeof n&&n>=0&&n<=r}}e.export({default:()=>i}),e.link("./_setup.js",{MAX_ARRAY_INDEX(e){r=e}},0)},"_getByteLength.js":function e(t,n,e){let r;e.link("./_shallowProperty.js",{default(e){r=e}},0),e.exportDefault(r("byteLength"))},"_shallowProperty.js":function e(t,n,e){function r(e){return function(t){return null==t?void 0:t[e]}}e.export({default:()=>r})},"isEmpty.js":function e(t,n,e){let r,i,o,s,a;function u(e){if(null==e)return!0;var t=r(e);return"number"==typeof t&&(i(e)||o(e)||s(e))?0===t:0===r(a(e))}e.export({default:()=>u}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),e.link("./isString.js",{default(e){o=e}},2),e.link("./isArguments.js",{default(e){s=e}},3),e.link("./keys.js",{default(e){a=e}},4)},"_getLength.js":function e(t,n,e){let r;e.link("./_shallowProperty.js",{default(e){r=e}},0),e.exportDefault(r("length"))},"keys.js":function e(t,n,e){let r,i,o,s,a;function u(e){if(!r(e))return[];if(i)return i(e);var t=[];for(var n in e)s(e,n)&&t.push(n);return o&&a(e,t),t}e.export({default:()=>u}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{nativeKeys(e){i=e},hasEnumBug(e){o=e}},1),e.link("./_has.js",{default(e){s=e}},2),e.link("./_collectNonEnumProps.js",{default(e){a=e}},3)},"_collectNonEnumProps.js":function e(t,n,e){let r,i,o,s;function a(e){for(var t={},n=e.length,r=0;ru}),e.link("./_setup.js",{nonEnumerableProps(e){r=e},ObjProto(e){i=e}},0),e.link("./isFunction.js",{default(e){o=e}},1),e.link("./_has.js",{default(e){s=e}},2)},"isMatch.js":function e(t,n,e){let r;function i(e,t){var n=r(t),i=n.length;if(null==e)return!i;for(var o=Object(e),s=0;si}),e.link("./keys.js",{default(e){r=e}},0)},"isEqual.js":function e(t,n,e){let r,i,o,s,a,u,f,c,l,h,d;e.export({default:()=>m}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_setup.js",{toString(e){i=e},SymbolProto(e){o=e}},1),e.link("./_getByteLength.js",{default(e){s=e}},2),e.link("./isTypedArray.js",{default(e){a=e}},3),e.link("./isFunction.js",{default(e){u=e}},4),e.link("./_stringTagBug.js",{hasStringTagBug(e){f=e}},5),e.link("./isDataView.js",{default(e){c=e}},6),e.link("./keys.js",{default(e){l=e}},7),e.link("./_has.js",{default(e){h=e}},8),e.link("./_toBufferView.js",{default(e){d=e}},9);var p="[object DataView]";function g(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&b(e,t,n,r)}function b(e,t,n,m){e instanceof r&&(e=e._wrapped),t instanceof r&&(t=t._wrapped);var v=i.call(e);if(v!==i.call(t))return!1;if(f&&"[object Object]"==v&&c(e)){if(!c(t))return!1;v=p}switch(v){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return o.valueOf.call(e)===o.valueOf.call(t);case"[object ArrayBuffer]":case p:return b(d(e),d(t),n,m)}var y="[object Array]"===v;if(!y&&a(e)){var _;if(s(e)!==s(t))return!1;if(e.buffer===t.buffer&&e.byteOffset===t.byteOffset)return!0;y=!0}if(!y){if("object"!=typeof e||"object"!=typeof t)return!1;var w=e.constructor,k=t.constructor;if(w!==k&&!(u(w)&&w instanceof w&&u(k)&&k instanceof k)&&"constructor"in e&&"constructor"in t)return!1}m=m||[];for(var j=(n=n||[]).length;j--;)if(n[j]===e)return m[j]===t;if(n.push(e),m.push(t),y){if((j=e.length)!==t.length)return!1;for(;j--;)if(!g(e[j],t[j],n,m))return!1}else{var x=l(e),S;if(j=x.length,l(t).length!==j)return!1;for(;j--;)if(S=x[j],!h(t,S)||!g(e[S],t[S],n,m))return!1}return n.pop(),m.pop(),!0}function m(e,t){return g(e,t)}},"underscore.js":function e(t,n,e){let r;function i(e){return e instanceof i?e:this instanceof i?void(this._wrapped=e):new i(e)}e.export({default:()=>i}),e.link("./_setup.js",{VERSION(e){r=e}},0),i.VERSION=r,i.prototype.value=function(){return this._wrapped},i.prototype.valueOf=i.prototype.toJSON=i.prototype.value,i.prototype.toString=function(){return String(this._wrapped)}},"_toBufferView.js":function e(t,n,e){let r;function i(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,r(e))}e.export({default:()=>i}),e.link("./_getByteLength.js",{default(e){r=e}},0)},"isMap.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},mapMethods(e){s=e}},2),e.exportDefault(i?o(s):r("Map"))},"_methodFingerprint.js":function e(t,n,e){let r,i,o;function s(e){var t=r(e);return function(n){if(null==n)return!1;var s=o(n);if(r(s))return!1;for(var u=0;us,mapMethods:()=>l,weakMapMethods:()=>h,setMethods:()=>d}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./allKeys.js",{default(e){o=e}},2);var a="forEach",u="has",f=["clear","delete"],c=["get","has","set"],l=f.concat(a,c),h=f.concat(c),d=["add"].concat(f,a,"has")},"allKeys.js":function e(t,n,e){let r,i,o;function s(e){if(!r(e))return[];var t=[];for(var n in e)t.push(n);return i&&o(e,t),t}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{hasEnumBug(e){i=e}},1),e.link("./_collectNonEnumProps.js",{default(e){o=e}},2)},"isWeakMap.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},weakMapMethods(e){s=e}},2),e.exportDefault(i?o(s):r("WeakMap"))},"isSet.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},setMethods(e){s=e}},2),e.exportDefault(i?o(s):r("Set"))},"isWeakSet.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("WeakSet"))},"values.js":function e(t,n,e){let r;function i(e){for(var t=r(e),n=t.length,i=Array(n),o=0;oi}),e.link("./keys.js",{default(e){r=e}},0)},"pairs.js":function e(t,n,e){let r;function i(e){for(var t=r(e),n=t.length,i=Array(n),o=0;oi}),e.link("./keys.js",{default(e){r=e}},0)},"invert.js":function e(t,n,e){let r;function i(e){for(var t={},n=r(e),i=0,o=n.length;ii}),e.link("./keys.js",{default(e){r=e}},0)},"functions.js":function e(t,n,e){let r;function i(e){var t=[];for(var n in e)r(e[n])&&t.push(n);return t.sort()}e.export({default:()=>i}),e.link("./isFunction.js",{default(e){r=e}},0)},"extend.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./allKeys.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createAssigner.js":function e(t,n,e){function r(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;ir})},"extendOwn.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1),e.exportDefault(r(i))},"defaults.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./allKeys.js",{default(e){i=e}},1),e.exportDefault(r(i,!0))},"create.js":function e(t,n,e){let r,i;function o(e,t){var n=r(e);return t&&i(n,t),n}e.export({default:()=>o}),e.link("./_baseCreate.js",{default(e){r=e}},0),e.link("./extendOwn.js",{default(e){i=e}},1)},"_baseCreate.js":function e(t,n,e){let r,i;function o(){return function(){}}function s(e){if(!r(e))return{};if(i)return i(e);var t=function(){};t.prototype=e;var n=new t;return t.prototype=null,n}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{nativeCreate(e){i=e}},1)},"clone.js":function e(t,n,e){let r,i,o;function s(e){return r(e)?i(e)?e.slice():o({},e):e}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),e.link("./extend.js",{default(e){o=e}},2)},"tap.js":function e(t,n,e){function r(e,t){return t(e),e}e.export({default:()=>r})},"get.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s=i(e,r(t));return o(s)?n:s}e.export({default:()=>s}),e.link("./_toPath.js",{default(e){r=e}},0),e.link("./_deepGet.js",{default(e){i=e}},1),e.link("./isUndefined.js",{default(e){o=e}},2)},"_toPath.js":function e(t,n,e){let r;function i(e){return r.toPath(e)}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./toPath.js")},"toPath.js":function e(t,n,e){let r,i;function o(e){return i(e)?e:[e]}e.export({default:()=>o}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),r.toPath=o},"_deepGet.js":function e(t,n,e){function r(e,t){for(var n=t.length,r=0;rr})},"has.js":function e(t,n,e){let r,i;function o(e,t){for(var n=(t=i(t)).length,o=0;oo}),e.link("./_has.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"mapObject.js":function e(t,n,e){let r,i;function o(e,t,n){t=r(t,n);for(var o=i(e),s=o.length,a={},u=0;uo}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"_cb.js":function e(t,n,e){let r,i,o;function s(e,t,n){return r.iteratee!==o?r.iteratee(e,t):i(e,t,n)}e.export({default:()=>s}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_baseIteratee.js",{default(e){i=e}},1),e.link("./iteratee.js",{default(e){o=e}},2)},"_baseIteratee.js":function e(t,n,e){let r,i,o,s,a,u,f;function c(e,t,n){return null==e?r:i(e)?f(e,t,n):o(e)&&!s(e)?a(e):u(e)}e.export({default:()=>c}),e.link("./identity.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./isObject.js",{default(e){o=e}},2),e.link("./isArray.js",{default(e){s=e}},3),e.link("./matcher.js",{default(e){a=e}},4),e.link("./property.js",{default(e){u=e}},5),e.link("./_optimizeCb.js",{default(e){f=e}},6)},"identity.js":function e(t,n,e){function r(e){return e}e.export({default:()=>r})},"matcher.js":function e(t,n,e){let r,i;function o(e){return e=r({},e),function(t){return i(t,e)}}e.export({default:()=>o}),e.link("./extendOwn.js",{default(e){r=e}},0),e.link("./isMatch.js",{default(e){i=e}},1)},"property.js":function e(t,n,e){let r,i;function o(e){return e=i(e),function(t){return r(t,e)}}e.export({default:()=>o}),e.link("./_deepGet.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"_optimizeCb.js":function e(t,n,e){function r(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}}e.export({default:()=>r})},"iteratee.js":function e(t,n,e){let r,i;function o(e,t){return i(e,t,1/0)}e.export({default:()=>o}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_baseIteratee.js",{default(e){i=e}},1),r.iteratee=o},"noop.js":function e(t,n,e){function r(){}e.export({default:()=>r})},"propertyOf.js":function e(t,n,e){let r,i;function o(e){return null==e?r:function(t){return i(e,t)}}e.export({default:()=>o}),e.link("./noop.js",{default(e){r=e}},0),e.link("./get.js",{default(e){i=e}},1)},"times.js":function e(t,n,e){let r;function i(e,t,n){var i=Array(Math.max(0,e));t=r(t,n,1);for(var o=0;oi}),e.link("./_optimizeCb.js",{default(e){r=e}},0)},"random.js":function e(t,n,e){function r(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}e.export({default:()=>r})},"now.js":function e(t,n,e){e.exportDefault(Date.now||function(){return(new Date).getTime()})},"escape.js":function e(t,n,e){let r,i;e.link("./_createEscaper.js",{default(e){r=e}},0),e.link("./_escapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createEscaper.js":function e(t,n,e){let r;function i(e){var t=function(t){return e[t]},n="(?:"+r(e).join("|")+")",i=RegExp(n),o=RegExp(n,"g");return function(e){return e=null==e?"":""+e,i.test(e)?e.replace(o,t):e}}e.export({default:()=>i}),e.link("./keys.js",{default(e){r=e}},0)},"_escapeMap.js":function e(t,n,e){e.exportDefault({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"})},"unescape.js":function e(t,n,e){let r,i;e.link("./_createEscaper.js",{default(e){r=e}},0),e.link("./_unescapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_unescapeMap.js":function e(t,n,e){let r,i;e.link("./invert.js",{default(e){r=e}},0),e.link("./_escapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"templateSettings.js":function e(t,n,e){let r;e.link("./underscore.js",{default(e){r=e}},0),e.exportDefault(r.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g})},"template.js":function e(t,n,e){let r,i;e.export({default:()=>c}),e.link("./defaults.js",{default(e){r=e}},0),e.link("./underscore.js",{default(e){i=e}},1),e.link("./templateSettings.js");var o=/(.)^/,s={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},a=/\\|'|\r|\n|\u2028|\u2029/g;function u(e){return"\\"+s[e]}var f=/^\s*(\w|\$)+\s*$/;function c(e,t,n){!t&&n&&(t=n),t=r({},t,i.templateSettings);var s=RegExp([(t.escape||o).source,(t.interpolate||o).source,(t.evaluate||o).source].join("|")+"|$","g"),c=0,l="__p+='";e.replace(s,(function(t,n,r,i,o){return l+=e.slice(c,o).replace(a,u),c=o+t.length,n?l+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?l+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(l+="';\n"+i+"\n__p+='"),t})),l+="';\n";var h=t.variable,d;if(h){if(!f.test(h))throw new Error("variable is not a bare identifier: "+h)}else l="with(obj||{}){\n"+l+"}\n",h="obj";l="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+l+"return __p;\n";try{d=new Function(h,"_",l)}catch(g){throw g.source=l,g}var p=function(e){return d.call(this,e,i)};return p.source="function("+h+"){\n"+l+"}",p}},"result.js":function e(t,n,e){let r,i;function o(e,t,n){var o=(t=i(t)).length;if(!o)return r(n)?n.call(e):n;for(var s=0;so}),e.link("./isFunction.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"uniqueId.js":function e(t,n,e){e.export({default:()=>i});var r=0;function i(e){var t=++r+"";return e?e+t:t}},"chain.js":function e(t,n,e){let r;function i(e){var t=r(e);return t._chain=!0,t}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0)},"partial.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_executeBound.js",{default(e){i=e}},1),e.link("./underscore.js",{default(e){o=e}},2);var s=r((function(e,t){var n=s.placeholder,r=function(){for(var o=0,s=t.length,a=Array(s),u=0;uo}),e.link("./_baseCreate.js",{default(e){r=e}},0),e.link("./isObject.js",{default(e){i=e}},1)},"bind.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./_executeBound.js",{default(e){o=e}},2),e.exportDefault(r((function(e,t,n){if(!i(e))throw new TypeError("Bind must be called on a function");var s=r((function(r){return o(e,s,t,this,n.concat(r))}));return s})))},"bindAll.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_flatten.js",{default(e){i=e}},1),e.link("./bind.js",{default(e){o=e}},2),e.exportDefault(r((function(e,t){var n=(t=i(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=o(e[r],e)}return e})))},"_flatten.js":function e(t,n,e){let r,i,o,s;function a(e,t,n,u){if(u=u||[],t||0===t){if(t<=0)return u.concat(e)}else t=1/0;for(var f=u.length,c=0,l=r(e);c1)a(h,t-1,n,u),f=u.length;else for(var d=0,p=h.length;da}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./isArray.js",{default(e){o=e}},2),e.link("./isArguments.js",{default(e){s=e}},3)},"_isArrayLike.js":function e(t,n,e){let r,i;e.link("./_createSizePropertyCheck.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1),e.exportDefault(r(i))},"memoize.js":function e(t,n,e){let r;function i(e,t){var n=function(i){var o=n.cache,s=""+(t?t.apply(this,arguments):i);return r(o,s)||(o[s]=e.apply(this,arguments)),o[s]};return n.cache={},n}e.export({default:()=>i}),e.link("./_has.js",{default(e){r=e}},0)},"delay.js":function e(t,n,e){let r;e.link("./restArguments.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})))},"defer.js":function e(t,n,e){let r,i,o;e.link("./partial.js",{default(e){r=e}},0),e.link("./delay.js",{default(e){i=e}},1),e.link("./underscore.js",{default(e){o=e}},2),e.exportDefault(r(i,o,1))},"throttle.js":function e(t,n,e){let r;function i(e,t,n){var i,o,s,a,u=0;n||(n={});var f=function(){u=!1===n.leading?0:r(),i=null,a=e.apply(o,s),i||(o=s=null)},c=function(){var c=r();u||!1!==n.leading||(u=c);var l=t-(c-u);return o=this,s=arguments,l<=0||l>t?(i&&(clearTimeout(i),i=null),u=c,a=e.apply(o,s),i||(o=s=null)):i||!1===n.trailing||(i=setTimeout(f,l)),a};return c.cancel=function(){clearTimeout(i),u=0,i=o=s=null},c}e.export({default:()=>i}),e.link("./now.js",{default(e){r=e}},0)},"debounce.js":function e(t,n,e){let r,i;function o(e,t,n){var o,s,a,u,f,c=function(){var r=i()-s;t>r?o=setTimeout(c,t-r):(o=null,n||(u=e.apply(f,a)),o||(a=f=null))},l=r((function(r){return f=this,a=r,s=i(),o||(o=setTimeout(c,t),n&&(u=e.apply(f,a))),u}));return l.cancel=function(){clearTimeout(o),o=a=f=null},l}e.export({default:()=>o}),e.link("./restArguments.js",{default(e){r=e}},0),e.link("./now.js",{default(e){i=e}},1)},"wrap.js":function e(t,n,e){let r;function i(e,t){return r(t,e)}e.export({default:()=>i}),e.link("./partial.js",{default(e){r=e}},0)},"negate.js":function e(t,n,e){function r(e){return function(){return!e.apply(this,arguments)}}e.export({default:()=>r})},"compose.js":function e(t,n,e){function r(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}e.export({default:()=>r})},"after.js":function e(t,n,e){function r(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}e.export({default:()=>r})},"before.js":function e(t,n,e){function r(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}e.export({default:()=>r})},"once.js":function e(t,n,e){let r,i;e.link("./partial.js",{default(e){r=e}},0),e.link("./before.js",{default(e){i=e}},1),e.exportDefault(r(i,2))},"findKey.js":function e(t,n,e){let r,i;function o(e,t,n){t=r(t,n);for(var o=i(e),s,a=0,u=o.length;ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"findIndex.js":function e(t,n,e){let r;e.link("./_createPredicateIndexFinder.js",{default(e){r=e}},0),e.exportDefault(r(1))},"_createPredicateIndexFinder.js":function e(t,n,e){let r,i;function o(e){return function(t,n,o){n=r(n,o);for(var s=i(t),a=e>0?0:s-1;a>=0&&ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1)},"findLastIndex.js":function e(t,n,e){let r;e.link("./_createPredicateIndexFinder.js",{default(e){r=e}},0),e.exportDefault(r(-1))},"sortedIndex.js":function e(t,n,e){let r,i;function o(e,t,n,o){for(var s=(n=r(n,o,1))(t),a=0,u=i(e);ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1)},"indexOf.js":function e(t,n,e){let r,i,o;e.link("./sortedIndex.js",{default(e){r=e}},0),e.link("./findIndex.js",{default(e){i=e}},1),e.link("./_createIndexFinder.js",{default(e){o=e}},2),e.exportDefault(o(1,i,r))},"_createIndexFinder.js":function e(t,n,e){let r,i,o;function s(e,t,n){return function(s,a,u){var f=0,c=r(s);if("number"==typeof u)e>0?f=u>=0?u:Math.max(u+c,f):c=u>=0?Math.min(u+1,c):u+c+1;else if(n&&u&&c)return s[u=n(s,a)]===a?u:-1;if(a!=a)return(u=t(i.call(s,f,c),o))>=0?u+f:-1;for(u=e>0?f:c-1;u>=0&&us}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./_setup.js",{slice(e){i=e}},1),e.link("./isNaN.js",{default(e){o=e}},2)},"lastIndexOf.js":function e(t,n,e){let r,i;e.link("./findLastIndex.js",{default(e){r=e}},0),e.link("./_createIndexFinder.js",{default(e){i=e}},1),e.exportDefault(i(-1,r))},"find.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s,a=(r(e)?i:o)(e,t,n);if(void 0!==a&&-1!==a)return e[a]}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./findIndex.js",{default(e){i=e}},1),e.link("./findKey.js",{default(e){o=e}},2)},"findWhere.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./find.js",{default(e){r=e}},0),e.link("./matcher.js",{default(e){i=e}},1)},"each.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s,a;if(t=r(t,n),i(e))for(s=0,a=e.length;ss}),e.link("./_optimizeCb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"map.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=Array(a),f=0;fs}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"reduce.js":function e(t,n,e){let r;e.link("./_createReduce.js",{default(e){r=e}},0),e.exportDefault(r(1))},"_createReduce.js":function e(t,n,e){let r,i,o;function s(e){var t=function(t,n,o,s){var a=!r(t)&&i(t),u=(a||t).length,f=e>0?0:u-1;for(s||(o=t[a?a[f]:f],f+=e);f>=0&&f=3;return t(e,o(n,i,4),r,s)}}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1),e.link("./_optimizeCb.js",{default(e){o=e}},2)},"reduceRight.js":function e(t,n,e){let r;e.link("./_createReduce.js",{default(e){r=e}},0),e.exportDefault(r(-1))},"filter.js":function e(t,n,e){let r,i;function o(e,t,n){var o=[];return t=r(t,n),i(e,(function(e,n,r){t(e,n,r)&&o.push(e)})),o}e.export({default:()=>o}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1)},"reject.js":function e(t,n,e){let r,i,o;function s(e,t,n){return r(e,i(o(t)),n)}e.export({default:()=>s}),e.link("./filter.js",{default(e){r=e}},0),e.link("./negate.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2)},"every.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=0;us}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"some.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=0;us}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"contains.js":function e(t,n,e){let r,i,o;function s(e,t,n,s){return r(e)||(e=i(e)),("number"!=typeof n||s)&&(n=0),o(e,t,n)>=0}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./indexOf.js",{default(e){o=e}},2)},"invoke.js":function e(t,n,e){let r,i,o,s,a;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./map.js",{default(e){o=e}},2),e.link("./_deepGet.js",{default(e){s=e}},3),e.link("./_toPath.js",{default(e){a=e}},4),e.exportDefault(r((function(e,t,n){var r,u;return i(t)?u=t:(t=a(t),r=t.slice(0,-1),t=t[t.length-1]),o(e,(function(e){var i=u;if(!i){if(r&&r.length&&(e=s(e,r)),null==e)return;i=e[t]}return null==i?i:i.apply(e,n)}))})))},"pluck.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./map.js",{default(e){r=e}},0),e.link("./property.js",{default(e){i=e}},1)},"where.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./filter.js",{default(e){r=e}},0),e.link("./matcher.js",{default(e){i=e}},1)},"max.js":function e(t,n,e){let r,i,o,s;function a(e,t,n){var a=-1/0,u=-1/0,f,c;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var l=0,h=(e=r(e)?e:i(e)).length;la&&(a=f);else t=o(t,n),s(e,(function(e,n,r){((c=t(e,n,r))>u||c===-1/0&&a===-1/0)&&(a=e,u=c)}));return a}e.export({default:()=>a}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2),e.link("./each.js",{default(e){s=e}},3)},"min.js":function e(t,n,e){let r,i,o,s;function a(e,t,n){var a=1/0,u=1/0,f,c;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var l=0,h=(e=r(e)?e:i(e)).length;la}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2),e.link("./each.js",{default(e){s=e}},3)},"shuffle.js":function e(t,n,e){let r;function i(e){return r(e,1/0)}e.export({default:()=>i}),e.link("./sample.js",{default(e){r=e}},0)},"sample.js":function e(t,n,e){let r,i,o,s,a;function u(e,t,n){if(null==t||n)return r(e)||(e=i(e)),e[s(e.length-1)];var u=a(e),f=o(u);t=Math.max(Math.min(t,f),0);for(var c=f-1,l=0;lu}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_getLength.js",{default(e){o=e}},2),e.link("./random.js",{default(e){s=e}},3),e.link("./toArray.js",{default(e){a=e}},4)},"toArray.js":function e(t,n,e){let r,i,o,s,a,u,f;e.export({default:()=>l}),e.link("./isArray.js",{default(e){r=e}},0),e.link("./_setup.js",{slice(e){i=e}},1),e.link("./isString.js",{default(e){o=e}},2),e.link("./_isArrayLike.js",{default(e){s=e}},3),e.link("./map.js",{default(e){a=e}},4),e.link("./identity.js",{default(e){u=e}},5),e.link("./values.js",{default(e){f=e}},6);var c=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function l(e){return e?r(e)?i.call(e):o(e)?e.match(c):s(e)?a(e,u):f(e):[]}},"sortBy.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s=0;return t=r(t,n),i(o(e,(function(e,n,r){return{value:e,index:s++,criteria:t(e,n,r)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(ns}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./pluck.js",{default(e){i=e}},1),e.link("./map.js",{default(e){o=e}},2)},"groupBy.js":function e(t,n,e){let r,i;e.link("./_group.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t,n){i(e,n)?e[n].push(t):e[n]=[t]})))},"_group.js":function e(t,n,e){let r,i;function o(e,t){return function(n,o,s){var a=t?[[],[]]:{};return o=r(o,s),i(n,(function(t,r){var i=o(t,r,n);e(a,t,i)})),a}}e.export({default:()=>o}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1)},"indexBy.js":function e(t,n,e){let r;e.link("./_group.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){e[n]=t})))},"countBy.js":function e(t,n,e){let r,i;e.link("./_group.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t,n){i(e,n)?e[n]++:e[n]=1})))},"partition.js":function e(t,n,e){let r;e.link("./_group.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){e[n?0:1].push(t)}),!0))},"size.js":function e(t,n,e){let r,i;function o(e){return null==e?0:r(e)?e.length:i(e).length}e.export({default:()=>o}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"pick.js":function e(t,n,e){let r,i,o,s,a,u;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./_optimizeCb.js",{default(e){o=e}},2),e.link("./allKeys.js",{default(e){s=e}},3),e.link("./_keyInObj.js",{default(e){a=e}},4),e.link("./_flatten.js",{default(e){u=e}},5),e.exportDefault(r((function(e,t){var n={},r=t[0];if(null==e)return n;i(r)?(t.length>1&&(r=o(r,t[1])),t=s(e)):(r=a,t=u(t,!1,!1),e=Object(e));for(var f=0,c=t.length;fr})},"omit.js":function e(t,n,e){let r,i,o,s,a,u,f;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./negate.js",{default(e){o=e}},2),e.link("./map.js",{default(e){s=e}},3),e.link("./_flatten.js",{default(e){a=e}},4),e.link("./contains.js",{default(e){u=e}},5),e.link("./pick.js",{default(e){f=e}},6),e.exportDefault(r((function(e,t){var n=t[0],r;return i(n)?(n=o(n),t.length>1&&(r=t[1])):(t=s(a(t,!1,!1),String),n=function(e,n){return!u(t,n)}),f(e,n,r)})))},"first.js":function e(t,n,e){let r;function i(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:r(e,e.length-t)}e.export({default:()=>i}),e.link("./initial.js",{default(e){r=e}},0)},"initial.js":function e(t,n,e){let r;function i(e,t,n){return r.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}e.export({default:()=>i}),e.link("./_setup.js",{slice(e){r=e}},0)},"last.js":function e(t,n,e){let r;function i(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:r(e,Math.max(0,e.length-t))}e.export({default:()=>i}),e.link("./rest.js",{default(e){r=e}},0)},"rest.js":function e(t,n,e){let r;function i(e,t,n){return r.call(e,null==t||n?1:t)}e.export({default:()=>i}),e.link("./_setup.js",{slice(e){r=e}},0)},"compact.js":function e(t,n,e){let r;function i(e){return r(e,Boolean)}e.export({default:()=>i}),e.link("./filter.js",{default(e){r=e}},0)},"flatten.js":function e(t,n,e){let r;function i(e,t){return r(e,t,!1)}e.export({default:()=>i}),e.link("./_flatten.js",{default(e){r=e}},0)},"without.js":function e(t,n,e){let r,i;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./difference.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t){return i(e,t)})))},"difference.js":function e(t,n,e){let r,i,o,s;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_flatten.js",{default(e){i=e}},1),e.link("./filter.js",{default(e){o=e}},2),e.link("./contains.js",{default(e){s=e}},3),e.exportDefault(r((function(e,t){return t=i(t,!0,!0),o(e,(function(e){return!s(t,e)}))})))},"uniq.js":function e(t,n,e){let r,i,o,s;function a(e,t,n,a){r(t)||(a=n,n=t,t=!1),null!=n&&(n=i(n,a));for(var u=[],f=[],c=0,l=o(e);ca}),e.link("./isBoolean.js",{default(e){r=e}},0),e.link("./_cb.js",{default(e){i=e}},1),e.link("./_getLength.js",{default(e){o=e}},2),e.link("./contains.js",{default(e){s=e}},3)},"union.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./uniq.js",{default(e){i=e}},1),e.link("./_flatten.js",{default(e){o=e}},2),e.exportDefault(r((function(e){return i(o(e,!0,!0))})))},"intersection.js":function e(t,n,e){let r,i;function o(e){for(var t=[],n=arguments.length,o=0,s=r(e);oo}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./contains.js",{default(e){i=e}},1)},"unzip.js":function e(t,n,e){let r,i,o;function s(e){for(var t=e&&r(e,i).length||0,n=Array(t),s=0;ss}),e.link("./max.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1),e.link("./pluck.js",{default(e){o=e}},2)},"zip.js":function e(t,n,e){let r,i;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./unzip.js",{default(e){i=e}},1),e.exportDefault(r(i))},"object.js":function e(t,n,e){let r;function i(e,t){for(var n={},i=0,o=r(e);ii}),e.link("./_getLength.js",{default(e){r=e}},0)},"range.js":function e(t,n,e){function r(e,t,n){null==t&&(t=e||0,e=0),n||(n=tr})},"chunk.js":function e(t,n,e){let r;function i(e,t){if(null==t||t<1)return[];for(var n=[],i=0,o=e.length;ii}),e.link("./_setup.js",{slice(e){r=e}},0)},"mixin.js":function e(t,n,e){let r,i,o,s,a;function u(e){return i(o(e),(function(t){var n=r[t]=e[t];r.prototype[t]=function(){var e=[this._wrapped];return s.apply(e,arguments),a(this,n.apply(r,e))}})),r}e.export({default:()=>u}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1),e.link("./functions.js",{default(e){o=e}},2),e.link("./_setup.js",{push(e){s=e}},3),e.link("./_chainResult.js",{default(e){a=e}},4)},"_chainResult.js":function e(t,n,e){let r;function i(e,t){return e._chain?r(t).chain():t}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0)},"underscore-array-methods.js":function e(t,n,e){let r,i,o,s;e.link("./underscore.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1),e.link("./_setup.js",{ArrayProto(e){o=e}},2),e.link("./_chainResult.js",{default(e){s=e}},3),i(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=o[e];r.prototype[e]=function(){var n=this._wrapped;return null!=n&&(t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0]),s(this,n)}})),i(["concat","join","slice"],(function(e){var t=o[e];r.prototype[e]=function(){var e=this._wrapped;return null!=e&&(e=t.apply(e,arguments)),s(this,e)}})),e.exportDefault(r)}}}}},cachers:{"package.json":function e(t,n,e){e.exports={name:"@steedos/cachers",version:"2.5.15-beta.12",main:"lib/index.js"}},lib:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getCacherNames=n.clearCacher=n.getCacher=void 0;var r={},i=t("./memory"),o=t("./memory-lru"),s=function(e,t){return r[e]||(e.startsWith("lru.")?r[e]=new o.MemoryLRUCacher(t):r[e]=new i.MemoryCacher),r[e]};n.getCacher=s;var a=function(e){r[e]&&r[e].clear()};n.clearCacher=a;var u=function(){return Object.keys(r)};n.getCacherNames=u},"memory.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryCacher=void 0;var r=t("lodash"),i=function(){function e(){this.cache={}}return e.prototype.get=function(e){return this.cache[e]},e.prototype.delete=function(e){delete this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.clear=function(){this.cache={}},e.prototype.keys=function(){return(0,r.keys)(this.cache)},e.prototype.values=function(){return(0,r.values)(this.cache)},e}();n.MemoryCacher=i},"memory-lru.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryLRUCacher=void 0;var r=t("lodash"),i=t("lru-cache"),o={max:5e3,ttl:null,keygen:null,maxParamsLength:null},s=function(){function e(e){this.opts=(0,r.defaultsDeep)(e,o),this.cache=new i({max:this.opts.max,maxAge:this.opts.ttl?1e3*this.opts.ttl:null,updateAgeOnGet:!!this.opts.ttl})}return e.prototype.get=function(e){return this.cache.get(e)},e.prototype.set=function(e,t,n){return this.cache.set(e,t,n)},e.prototype.delete=function(e){return this.cache.delete(e)},e.prototype.clear=function(){return this.cache.clear()},e.prototype.keys=function(){return this.cache.keys()},e.prototype.values=function(){return this.cache.values()},e}();n.MemoryLRUCacher=s}},node_modules:{"lru-cache":{"package.json":function e(t,n,e){e.exports={name:"lru-cache",version:"7.14.1",main:"index.js"}},"index.js":function e(t,n,e){const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,i="function"==typeof AbortController,o=i?AbortController:class e{constructor(){this.signal=new u}abort(){this.signal.dispatchEvent("abort")}},s="function"==typeof AbortSignal,a="function"==typeof o.AbortSignal,u=s?AbortSignal:a?o.AbortController:class e{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(e){if("abort"===e){this.aborted=!0;const t={type:e,target:this};this.onabort(t),this._listeners.forEach(e=>e(t),this)}}onabort(){}addEventListener(e,t){"abort"===e&&this._listeners.push(t)}removeEventListener(e,t){"abort"===e&&(this._listeners=this._listeners.filter(e=>e!==t))}},f=new Set,c=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;p(n)&&g(n,`${e} option`,`options.${t}`,_)},l=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(p(n)){const{prototype:r}=_,{get:i}=Object.getOwnPropertyDescriptor(r,e);g(n,`${e} method`,`cache.${t}()`,i)}},h=(e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(p(n)){const{prototype:r}=_,{get:i}=Object.getOwnPropertyDescriptor(r,e);g(n,`${e} property`,`cache.${t}`,i)}},d=(...e)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...e):console.error(...e)},p=e=>!f.has(e),g=(e,t,n,r)=>{f.add(e);const i=`The ${t} is deprecated. Please use ${n} instead.`;d(i,"DeprecationWarning",e,r)},b=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),m=e=>b(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?v:null:null;class v extends Array{constructor(e){super(e),this.fill(0)}}class y{constructor(e){if(0===e)return[];const t=m(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class _{constructor(e={}){const{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:s,allowStale:a,dispose:u,disposeAfter:l,noDisposeOnSet:h,noUpdateTTL:g,maxSize:v=0,maxEntrySize:w=0,sizeCalculation:k,fetchMethod:j,fetchContext:x,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:D}=e,{length:E,maxAge:A,stale:C}=e instanceof _?{}:e;if(0!==t&&!b(t))throw new TypeError("max option must be a nonnegative integer");const M=t?m(t):Array;if(!M)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=v,this.maxEntrySize=w||this.maxSize,this.sizeCalculation=k||E,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=j||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=x,!this.fetchMethod&&void 0!==x)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new M(t),this.prev=new M(t),this.head=0,this.tail=0,this.free=new y(t),this.initialFill=1,this.size=0,"function"==typeof u&&(this.dispose=u),"function"==typeof l?(this.disposeAfter=l,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!S,0!==this.maxEntrySize){if(0!==this.maxSize&&!b(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!b(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!a||!!C,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!s,this.ttlResolution=b(r)||0===r?r:1,this.ttlAutopurge=!!i,this.ttl=n||A||0,this.ttl){if(!b(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const e="LRU_CACHE_UNBOUNDED";if(p(e)){f.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";d(t,"UnboundedCacheWarning",e,_)}}C&&c("stale","allowStale"),A&&c("maxAge","ttl"),E&&c("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new v(this.max),this.starts=new v(this.max),this.setItemTTL=(e,t,n=r.now())=>{if(this.starts[e]=0!==t?n:0,this.ttls[e]=t,0!==t&&this.ttlAutopurge){const n=setTimeout(()=>{this.isStale(e)&&this.delete(this.keyList[e])},t+1);n.unref&&n.unref()}},this.updateItemAge=e=>{this.starts[e]=0!==this.ttls[e]?r.now():0};let e=0;const t=()=>{const t=r.now();if(this.ttlResolution>0){e=t;const n=setTimeout(()=>e=0,this.ttlResolution);n.unref&&n.unref()}return t};this.getRemainingTTL=n=>{const r=this.keyMap.get(n);return void 0===r?0:0===this.ttls[r]||0===this.starts[r]?1/0:this.starts[r]+this.ttls[r]-(e||t())},this.isStale=n=>0!==this.ttls[n]&&0!==this.starts[n]&&(e||t())-this.starts[n]>this.ttls[n]}updateItemAge(e){}setItemTTL(e,t,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new v(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,n,r)=>{if(this.isBackgroundFetch(t))return 0;if(!b(n)){if(!r)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof r)throw new TypeError("sizeCalculation must be a function");if(n=r(t,e),!b(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.addItemSize=(e,t)=>{if(this.sizes[e]=t,this.maxSize){const t=this.maxSize-this.sizes[e];for(;this.calculatedSize>t;)this.evict(!0)}this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,n,r){if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.head);)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.tail);)t=this.next[t]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(const e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(const e of this.indexes())yield this.keyList[e]}*rkeys(){for(const e of this.rindexes())yield this.keyList[e]}*values(){for(const e of this.indexes())yield this.valList[e]}*rvalues(){for(const e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const n of this.indexes())if(e(this.valList[n],this.keyList[n],this))return this.get(this.keyList[n],t)}forEach(e,t=this){for(const n of this.indexes())e.call(t,this.valList[n],this.keyList[n],this)}rforEach(e,t=this){for(const n of this.rindexes())e.call(t,this.valList[n],this.keyList[n],this)}get prune(){return l("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){const e=[];for(const t of this.indexes({allowStale:!0})){const n=this.keyList[t],i=this.valList[t],o=this.isBackgroundFetch(i)?i.__staleWhileFetching:i,s={value:o};if(this.ttls){s.ttl=this.ttls[t];const e=r.now()-this.starts[t];s.start=Math.floor(Date.now()-e)}this.sizes&&(s.size=this.sizes[t]),e.unshift([n,s])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}dispose(e,t,n){}set(e,t,{ttl:n=this.ttl,start:r,noDisposeOnSet:i=this.noDisposeOnSet,size:o=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL}={}){if(o=this.requireSize(e,t,o,s),this.maxEntrySize&&o>this.maxEntrySize)return this.delete(e),this;let u=0===this.size?void 0:this.keyMap.get(e);if(void 0===u)u=this.newIndex(),this.keyList[u]=e,this.valList[u]=t,this.keyMap.set(e,u),this.next[this.tail]=u,this.prev[u]=this.tail,this.tail=u,this.size++,this.addItemSize(u,o),a=!1;else{const n=this.valList[u];t!==n&&(this.isBackgroundFetch(n)?n.__abortController.abort():i||(this.dispose(n,e,"set"),this.disposeAfter&&this.disposed.push([n,e,"set"])),this.removeItemSize(u),this.valList[u]=t,this.addItemSize(u,o)),this.moveToTail(u)}if(0===n||0!==this.ttl||this.ttls||this.initializeTTLTracking(),a||this.setItemTTL(u,n,r),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const t=this.head,n=this.keyList[t],r=this.valList[t];return this.isBackgroundFetch(r)?r.__abortController.abort():(this.dispose(r,n,"evict"),this.disposeAfter&&this.disposed.push([r,n,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(n),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas}={}){const n=this.keyMap.get(e);return void 0!==n&&!this.isStale(n)&&(t&&this.updateItemAge(n),!0)}peek(e,{allowStale:t=this.allowStale}={}){const n=this.keyMap.get(e);if(void 0!==n&&(t||!this.isStale(n))){const e=this.valList[n];return this.isBackgroundFetch(e)?e.__staleWhileFetching:e}}backgroundFetch(e,t,n,r){const i=void 0===t?void 0:this.valList[t];if(this.isBackgroundFetch(i))return i;const s=new o,a={signal:s.signal,options:n,context:r},u=t=>(s.signal.aborted||this.set(e,t,a.options),t),f=r=>{if(this.valList[t]===l){const r=!n.noDeleteOnFetchRejection||void 0===l.__staleWhileFetching;r?this.delete(e):this.valList[t]=l.__staleWhileFetching}if(l.__returned===l)throw r},c=t=>t(this.fetchMethod(e,i,a)),l=new Promise(c).then(u,f);return l.__abortController=s,l.__staleWhileFetching=i,l.__returned=null,void 0===t?(this.set(e,l,a.options),t=this.keyMap.get(e)):this.valList[t]=l,l}isBackgroundFetch(e){return e&&"object"==typeof e&&"function"==typeof e.then&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||null===e.__returned)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,fetchContext:c=this.fetchContext,forceRefresh:l=!1}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r});const h={allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r,ttl:i,noDisposeOnSet:o,size:s,sizeCalculation:a,noUpdateTTL:u,noDeleteOnFetchRejection:f};let d=this.keyMap.get(e);if(void 0===d){const t=this.backgroundFetch(e,d,h,c);return t.__returned=t}{const r=this.valList[d];if(this.isBackgroundFetch(r))return t&&void 0!==r.__staleWhileFetching?r.__staleWhileFetching:r.__returned=r;if(!l&&!this.isStale(d))return this.moveToTail(d),n&&this.updateItemAge(d),r;const i=this.backgroundFetch(e,d,h,c);return t&&void 0!==i.__staleWhileFetching?i.__staleWhileFetching:i.__returned=i}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet}={}){const i=this.keyMap.get(e);if(void 0!==i){const o=this.valList[i],s=this.isBackgroundFetch(o);if(this.isStale(i))return s?t?o.__staleWhileFetching:void 0:(r||this.delete(e),t?o:void 0);if(s)return;return this.moveToTail(i),n&&this.updateItemAge(i),o}}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return l("del","delete"),this.delete}delete(e){let t=!1;if(0!==this.size){const n=this.keyMap.get(e);if(void 0!==n)if(t=!0,1===this.size)this.clear();else{this.removeItemSize(n);const t=this.valList[n];this.isBackgroundFetch(t)?t.__abortController.abort():(this.dispose(t,e,"delete"),this.disposeAfter&&this.disposed.push([t,e,"delete"])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(const e of this.rindexes({allowStale:!0})){const t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort();else{const n=this.keyList[e];this.dispose(t,n,"delete"),this.disposeAfter&&this.disposed.push([t,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return l("reset","clear"),this.clear}get length(){return h("length","size"),this.size}static get AbortController(){return o}static get AbortSignal(){return u}}e.exports=_}}}}},tslib:{"package.json":function e(t,n,e){e.exports={name:"tslib",version:"2.3.1",module:"tslib.es6.js",main:"tslib.js"}},"tslib.es6.js":function e(t,n,e){e.export({__extends:()=>i,__assign:()=>o,__rest:()=>s,__decorate:()=>a,__param:()=>u,__metadata:()=>f,__awaiter:()=>c,__generator:()=>l,__createBinding:()=>h,__exportStar:()=>d,__values:()=>p,__read:()=>g,__spread:()=>b,__spreadArrays:()=>m,__spreadArray:()=>v,__await:()=>y,__asyncGenerator:()=>_,__asyncDelegator:()=>w,__asyncValues:()=>k,__makeTemplateObject:()=>j,__importStar:()=>S,__importDefault:()=>D,__classPrivateFieldGet:()=>E,__classPrivateFieldSet:()=>A}); +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this,i;return e(this).one("bsTransitionEnd",(function(){n=!0})),setTimeout((function(){n||e(r).trigger(e.support.transition.end)}),t),this},e((function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})}))}(jQuery),function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};function r(t){return this.each((function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),"string"==typeof t&&i[t].call(r)}))}n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.close=function(t){var r=e(this),i=r.attr("data-target");i||(i=(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=e(document).find(i);function s(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=r.closest(".alert")),o.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),e.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",s).emulateTransitionEnd(n.TRANSITION_DURATION):s())};var i=e.fn.alert;e.fn.alert=r,e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=i,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}(jQuery),function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.isLoading=!1};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.button"),o="object"==typeof n&&n;i||r.data("bs.button",i=new t(this,o)),"toggle"==n?i.toggle():n&&i.setState(n)}))}t.VERSION="3.4.1",t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(t){var n="disabled",r=this.$element,i=r.is("input")?"val":"html",o=r.data();t+="Text",null==o.resetText&&r.data("resetText",r[i]()),setTimeout(e.proxy((function(){r[i](null==o[t]?this.options[t]:o[t]),"loadingText"==t?(this.isLoading=!0,r.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,r.removeClass(n).removeAttr(n).prop(n,!1))}),this),0)},t.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var r=e.fn.button;e.fn.button=n,e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=r,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var r=e(t.target).closest(".btn");n.call(r,"toggle"),e(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),r.is("input,button")?r.trigger("focus"):r.find("input:visible,button:visible").first().trigger("focus"))})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))}))}(jQuery),function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.carousel"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n),s="string"==typeof n?n:o.slide;i||r.data("bs.carousel",i=new t(this,o)),"number"==typeof n?i.to(n):s?i[s]():o.interval&&i.pause().cycle()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=600,t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},t.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},t.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},t.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t),r;if(("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap)return t;var i,o=(n+("prev"==e?-1:1))%this.$items.length;return this.$items.eq(o)},t.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){t.to(e)})):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",this.$items.eq(e))},t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},t.prototype.next=function(){if(!this.sliding)return this.slide("next")},t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},t.prototype.slide=function(n,r){var i=this.$element.find(".item.active"),o=r||this.getItemForDirection(n,i),s=this.interval,a="next"==n?"left":"right",u=this;if(o.hasClass("active"))return this.sliding=!1;var f=o[0],c=e.Event("slide.bs.carousel",{relatedTarget:f,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=e(this.$indicators.children()[this.getItemIndex(o)]);l&&l.addClass("active")}var h=e.Event("slid.bs.carousel",{relatedTarget:f,direction:a});return e.support.transition&&this.$element.hasClass("slide")?(o.addClass(n),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(a),o.addClass(a),i.one("bsTransitionEnd",(function(){o.removeClass([n,a].join(" ")).addClass("active"),i.removeClass(["active",a].join(" ")),u.sliding=!1,setTimeout((function(){u.$element.trigger(h)}),0)})).emulateTransitionEnd(t.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),s&&this.cycle(),this}};var r=e.fn.carousel;e.fn.carousel=n,e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=r,this};var i=function(t){var r=e(this),i=r.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=r.attr("data-target")||i,s=e(document).find(o);if(s.hasClass("carousel")){var a=e.extend({},s.data(),r.data()),u=r.attr("data-slide-to");u&&(a.interval=!1),n.call(s,a),u&&s.data("bs.carousel").to(u),t.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),e(window).on("load",(function(){e('[data-ride="carousel"]').each((function(){var t=e(this);n.call(t,t.data())}))}))}(jQuery),function(e){"use strict";var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.$trigger=e('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var n,r=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(document).find(r)}function r(n){return this.each((function(){var r=e(this),i=r.data("bs.collapse"),o=e.extend({},t.DEFAULTS,r.data(),"object"==typeof n&&n);!i&&o.toggle&&/show|hide/.test(n)&&(o.toggle=!1),i||r.data("bs.collapse",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.TRANSITION_DURATION=350,t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e;return this.$element.hasClass("width")?"width":"height"},t.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var n,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(n=i.data("bs.collapse"))&&n.transitioning)){var o=e.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){i&&i.length&&(r.call(i,"hide"),n||i.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return a.call(this);var u=e.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",e.proxy(a,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[s](this.$element[0][u])}}}},t.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var n=e.Event("hide.bs.collapse");if(this.$element.trigger(n),!n.isDefaultPrevented()){var r=this.dimension();this.$element[r](this.$element[r]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!e.support.transition)return i.call(this);this.$element[r](0).one("bsTransitionEnd",e.proxy(i,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}}},t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},t.prototype.getParent=function(){return e(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy((function(t,r){var i=e(r);this.addAriaAndCollapsedClass(n(i),i)}),this)).end()},t.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var i=e.fn.collapse;e.fn.collapse=r,e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=i,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){var i=e(this);i.attr("data-target")||t.preventDefault();var o=n(i),s,a=o.data("bs.collapse")?"toggle":i.data();r.call(o,a)}))}(jQuery),function(e){"use strict";var t=".dropdown-backdrop",n='[data-toggle="dropdown"]',r=function(t){e(t).on("click.bs.dropdown",this.toggle)};function i(t){var n=t.attr("data-target");n||(n=(n=t.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r="#"!==n?e(document).find(n):null;return r&&r.length?r:t.parent()}function o(r){r&&3===r.which||(e(t).remove(),e(n).each((function(){var t=e(this),n=i(t),o={relatedTarget:this};n.hasClass("open")&&(r&&"click"==r.type&&/input|textarea/i.test(r.target.tagName)&&e.contains(n[0],r.target)||(n.trigger(r=e.Event("hide.bs.dropdown",o)),r.isDefaultPrevented()||(t.attr("aria-expanded","false"),n.removeClass("open").trigger(e.Event("hidden.bs.dropdown",o)))))})))}function s(t){return this.each((function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),"string"==typeof t&&i[t].call(n)}))}r.VERSION="3.4.1",r.prototype.toggle=function(t){var n=e(this);if(!n.is(".disabled, :disabled")){var r=i(n),s=r.hasClass("open");if(o(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",o);var a={relatedTarget:this};if(r.trigger(t=e.Event("show.bs.dropdown",a)),t.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(e.Event("shown.bs.dropdown",a))}return!1}},r.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var r=e(this);if(t.preventDefault(),t.stopPropagation(),!r.is(".disabled, :disabled")){var o=i(r),s=o.hasClass("open");if(!s&&27!=t.which||s&&27==t.which)return 27==t.which&&o.find(n).trigger("focus"),r.trigger("click");var a=" li:not(.disabled):visible a",u=o.find(".dropdown-menu"+a);if(u.length){var f=u.index(t.target);38==t.which&&f>0&&f--,40==t.which&&fdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},t.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:i},f.prototype.init=function(t,n,r){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&e(document).find(e.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),o=i.length;o--;){var s=i[o];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",u="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},f.prototype.getDefaults=function(){return f.DEFAULTS},f.prototype.getOptions=function(n){var r=this.$element.data();for(var i in r)r.hasOwnProperty(i)&&-1!==e.inArray(i,t)&&delete r[i];return(n=e.extend({},this.getDefaults(),r,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=u(n.template,n.whiteList,n.sanitizeFn)),n},f.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,(function(e,r){n[e]!=r&&(t[e]=r)})),t},f.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},f.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},f.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},f.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var n=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!n)return;var r=this,i=this.tip(),o=this.getUID(this.type);this.setContent(),i.attr("id",o),this.$element.attr("aria-describedby",o),this.options.animation&&i.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,u=a.test(s);u&&(s=s.replace(a,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?i.appendTo(e(document).find(this.options.container)):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),l=i[0].offsetWidth,h=i[0].offsetHeight;if(u){var d=s,p=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+h>p.bottom?"top":"top"==s&&c.top-hp.width?"left":"left"==s&&c.left-ls.top+s.height&&(i.top=s.top+s.height-u)}else{var f=t.left-o,c=t.left+o+n;fs.right&&(i.left=s.left+s.width-c)}return i},f.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)},f.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},f.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},f.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},f.prototype.enable=function(){this.enabled=!0},f.prototype.disable=function(){this.enabled=!1},f.prototype.toggleEnabled=function(){this.enabled=!this.enabled},f.prototype.toggle=function(t){var n=this;t&&((n=e(t.currentTarget).data("bs."+this.type))||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},f.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide((function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null}))},f.prototype.sanitizeHtml=function(e){return u(e,this.options.whiteList,this.options.sanitizeFn)};var l=e.fn.tooltip;e.fn.tooltip=c,e.fn.tooltip.Constructor=f,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=l,this}}(jQuery),function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");function n(n){return this.each((function(){var r=e(this),i=r.data("bs.popover"),o="object"==typeof n&&n;!i&&/destroy|hide/.test(n)||(i||r.data("bs.popover",i=new t(this,o)),"string"==typeof n&&i[n]())}))}t.VERSION="3.4.1",t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();if(this.options.html){var r=typeof n;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===r&&(n=this.sanitizeHtml(n))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===r?"html":"append"](n)}else e.find(".popover-title").text(t),e.find(".popover-content").children().detach().end().text(n);e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var r=e.fn.popover;e.fn.popover=n,e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=r,this}}(jQuery),function(e){"use strict";function t(n,r){this.$body=e(document.body),this.$scrollElement=e(n).is(document.body)?e(window):e(n),this.options=e.extend({},t.DEFAULTS,r),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each((function(){var r=e(this),i=r.data("bs.scrollspy"),o="object"==typeof n&&n;i||r.data("bs.scrollspy",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",r=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",r=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var t=e(this),i=t.data("target")||t.attr("href"),o=/^#./.test(i)&&e(i);return o&&o.length&&o.is(":visible")&&[[o[n]().top+r,i]]||null})).sort((function(e,t){return e[0]-t[0]})).each((function(){t.offsets.push(this[0]),t.targets.push(this[1])}))},t.prototype.process=function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.getScrollHeight(),n=this.options.offset+t-this.$scrollElement.height(),r=this.offsets,i=this.targets,o=this.activeTarget,s;if(this.scrollHeight!=t&&this.refresh(),e>=n)return o!=(s=i[i.length-1])&&this.activate(s);if(o&&e=r[s]&&(void 0===r[s+1]||e .active"),s=i&&e.support.transition&&(o.length&&o.hasClass("fade")||!!r.find("> .fade").length);function a(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),n.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(n[0].offsetWidth,n.addClass("in")):n.removeClass("fade"),n.parent(".dropdown-menu").length&&n.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&s?o.one("bsTransitionEnd",a).emulateTransitionEnd(t.TRANSITION_DURATION):a(),o.removeClass("in")};var r=e.fn.tab;e.fn.tab=n,e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=r,this};var i=function(t){t.preventDefault(),n.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(e){"use strict";var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r);var i=this.options.target===t.DEFAULTS.target?e(this.options.target):e(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var r=e(this),i=r.data("bs.affix"),o="object"==typeof n&&n;i||r.data("bs.affix",i=new t(this,o)),"string"==typeof n&&i[n]()}))}t.VERSION="3.4.1",t.RESET="affix affix-top affix-bottom",t.DEFAULTS={offset:0,target:window},t.prototype.getState=function(e,t,n,r){var i=this.$target.scrollTop(),o=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return i=e-r&&"bottom"},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var e=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),r=this.options.offset,i=r.top,o=r.bottom,s=Math.max(e(document).height(),e(document.body).height());"object"!=typeof r&&(o=i=r),"function"==typeof i&&(i=r.top(this.$element)),"function"==typeof o&&(o=r.bottom(this.$element));var a=this.getState(s,n,i,o);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var u="affix"+(a?"-"+a:""),f=e.Event(u+".bs.affix");if(this.$element.trigger(f),f.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-o})}};var r=e.fn.affix;e.fn.affix=n,e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=r,this},e(window).on("load",(function(){e('[data-spy="affix"]').each((function(){var t=e(this),r=t.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),n.call(t,r)}))}))}(jQuery)}}}},fibers:{"package.json":function e(t,n,e){e.exports={name:"fibers",version:"5.0.3",main:"fibers"}},"fibers.js":function e(t,n,e,r,i){if(process.fiberLib)e.exports=process.fiberLib;else{var o=t("fs"),s=t("path"),a=t("detect-libc");Math.random();var u=s.join(i,"bin",process.platform+"-"+process.arch+"-"+process.versions.modules+("linux"===process.platform?"-"+a.family:""),"fibers");try{process.fiberLib=e.exports=t(u).Fiber}catch(c){throw console.error("## There is an issue with `node-fibers` ##\n`"+u+".node` is missing.\n\nTry running this to fix the issue: "+process.execPath+" "+i.replace(" ","\\ ")+"/build"),console.error(c.stack||c.message||c),new Error("Missing binary. See message above.")}f(e.exports)}function f(e){try{var t=process.binding("async_wrap"),n;if(t.asyncIdStackSize instanceof Function)n=t.asyncIdStackSize;else{if(void 0===t.constants.kStackLength)throw new Error("Couldn't figure out how to get async stack size");l=t.constants.kStackLength,n=function(){return t.async_hook_fields[l]}}var r=t.popAsyncContext||t.popAsyncIds,i=t.pushAsyncContext||t.pushAsyncIds,o,s;if(!r||!i)throw new Error("Push/pop do not exist");o=void 0===t.constants.kExecutionAsyncId?t.constants.kCurrentAsyncId:t.constants.kExecutionAsyncId,s=void 0===t.constants.kTriggerAsyncId?t.constants.kCurrentTriggerId:t.constants.kTriggerAsyncId;var a=t.async_id_fields||t.async_uid_fields;function u(){for(var e=n(),t=new Array(e);e>0;--e){var i=a[o];t[e-1]={asyncId:i,triggerId:a[s]},r(i)}return t}function f(e){for(var t=0;t0)i.changeLanguage(e,r);else if(0!=a[u]){a[u]=0;var f=new XMLHttpRequest;f.overrideMimeType("application/json"),f.open("GET",u,!1),f.send(null),200===f.status?a[u]=1:a[u]=-1,n.addResourceBundle(e,s,JSON.parse(f.response)||{}),i.changeLanguage(e,r)}};n.changeLanguage=p;var g=function(e,t,n){return i.format(e,t,n)};n.format=g;var b=function(){return i.languages};n.getLanguages=b;var m=function(e,t){return i.loadLanguages(e,t)};n.loadLanguages=m;var v=function(e,t){return i.loadNamespaces(e,t)};n.loadNamespaces=v;var y=function(e,t){return i.on(e,t)};n.on=y;var _=function(e,t){return i.off(e,t)};n.off=_,r.__exportStar(t("./i18n/i18n"),n),r.__exportStar(t("./i18n/i18n.app"),n),r.__exportStar(t("./translations"),n)},i18n:{"i18n.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fallbackKeys=n.getObjectI18nTemplate=n.translationI18nObjects=n.addObjectsI18n=n.translationI18nObject=void 0;var r=t("../index"),i=t("underscore"),o=t("clone"),s="_",a="base",u="core",f="translation",c=function(e,t){var n={lng:t,ns:f};if((0,r.exists)(e,n))return(0,r._t)(e,n)},l=function(e){return"".concat(e,"__object")},h=function(e,t){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t)},d=function(e,t){var n=h(e,t);return"".concat(n).concat("_","inlineHelpText")},p=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","group").concat("_").concat(n)},g=function(e,t,n){return t&&(t=t.replace(/\./g,"_")),"".concat(e).concat("_","field").concat("_").concat(t).concat("_","options").concat("_").concat(n)},b=function(e,t){return"".concat(e).concat("_","action").concat("_").concat(t)},m=function(e,t){return"".concat(e).concat("_","listview").concat("_").concat(t)},v=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},y=function(e,t,n){var r=l(t);return c(r,e)||n||""},_=function(e,t,n,r,i){var o=h(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=_(e,a,n,r,i))}return s||r||""},w=function(e,t,n,r,i){var o=d(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=w(e,a,n,r,i))}return s||r||""},k=function(e,t,n,r){var i=p(t,n);return c(i,e)||r||""},j=function(e,t,n,r,i,o){var s=g(t,n,r),a=c(s,e);if(!a){var u=v(o);u&&"base"!=t&&"core"!=t&&(a=j(e,u,n,r,i,o))}return a||i||""},x=function(e,t,n,r,i){var o=b(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=x(e,a,n,r,i))}return s||r||""},S=function(e,t,n,r,i){var o=m(t,n),s=c(o,e);if(!s){var a=v(i);a&&"base"!=t&&"core"!=t&&(s=S(e,a,n,r,i))}return s||r||""},D=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},E=function(e){i.forEach(e.fields,(function(e,t){var n=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;return e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return n.push(D(e))}))):n.push(D(e))})),e.options=n}catch(r){console.error("convertFieldsOptions error: ",e.options,r)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},A=function(e,t,n){n.label=y(e,t,n.label),i.each(n.fields,(function(r,o){if(r.label=_(e,t,o,r.label,n.datasource),r.inlineHelpText&&(r.inlineHelpText=w(e,t,o,r.inlineHelpText,n.datasource)),r.group&&(r.group=k(e,t,r.group,r.group)),r.options){var s=[];i.each(r.options,(function(r){if(i.has(r,"value")){var a=j(e,t,o,r.value,r.label,n.datasource);s.push(i.extend({},r,{label:a}))}else s.push(r)})),r.options=s}})),i.each(n.actions,(function(r,i){r.label=x(e,t,i,r.label,n.datasource)})),i.each(n.list_views,(function(r,i){r.label=S(e,t,i,r.label,n.datasource)}))};n.translationI18nObject=A;var C=function(e){i.each(e,(function(e){(0,r.addResourceBundle)(e.lng,f,e.data,!0,!0)}))};n.addObjectsI18n=C;var M=function(e,t){i.each(t,(function(t,r){(0,n.translationI18nObject)(e,r,t)}))};n.translationI18nObjects=M;var O=function(e,t,n){var r=o(n);E(r);var s={};return s[l(t)]=y(e,t,r.label),i.each(r.fields,(function(n,o){s[h(t,o)]=_(e,t,o,n.label),n.inlineHelpText&&(s[d(t,o)]=w(e,t,o,n.inlineHelpText,r.datasource)),n.group&&(s[p(t,n.group)]=k(e,t,n.group,n.group)),n.options&&i.each(n.options,(function(n){i.has(n,"value")&&(s[g(t,o,n.value)]=j(e,t,o,n.value,n.label))}))})),i.each(r.actions,(function(n,r){s[b(t,r)]=x(e,t,r,n.label)})),i.each(r.list_views,(function(n,r){s[m(t,r)]=S(e,t,r,n.label)})),s};n.getObjectI18nTemplate=O,n.fallbackKeys={getObjectLabelKey:l,getObjectFieldLabelKey:h,getObjectFieldInlineHelpTextLabelKey:d,getObjectFieldGroupKey:p,getObjectFieldOptionsLabelKey:g,getObjectActionLabelKey:b,getObjectListviewLabelKey:m}},"i18n.app.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.appFallbackKeys=n.getAppI18nTemplate=n.translationI18nApps=n.translationI18nMenus=void 0;var r=t("../index"),i=t("underscore"),o=t("clone"),s="translation",a="_",u=function(e,t){var n={lng:t,ns:s};if((0,r.exists)(e,n))return(0,r._t)(e,n)},f=function(e){return"app".concat("_").concat(e).concat("_","name")},c=function(e){return"app".concat("_").concat(e).concat("_","description")},l=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");return"".concat(e).concat("_","tab_group").concat("_").concat(n)},h=function(e){return"menu".concat("_").concat(e)},d=function(e){return"tab".concat("_").concat(e)},p=function(e,t,n){var r=f(t);return u(r,e)||n||""},g=function(e,t,n){var r=c(t);return u(r,e)||n||""},b=function(e,t,n){var r=h(t);return u(r,e)||n||""},m=function(e,t,r){r.label=p(e,t,r.label||r.name),r.description=g(e,t,r.description),(0,n.translationI18nMenus)(e,r.admin_menus)},v=function(e,t){i.each(t,(function(t){var n=b(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationI18nMenus=v;var y=function(e,t){i.each(t,(function(t,n){m(e,n,t)}))};n.translationI18nApps=y;var _=function(e,t,n){var r=o(n),s={};return s[f(t)]=p(e,t,r.label||r.name),s[c(t)]=g(e,t,r.description),i.each(r.admin_menus,(function(t){s[h(t._id)]=b(e,t._id,t.label||t.name)})),s};n.getAppI18nTemplate=_,n.appFallbackKeys={getAppLabelKey:f,getAppDescriptionKey:c,getAppGroupKey:l,getMenuLabelKey:h,getTabKey:d}}},translations:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SteedosTranslationPrefixKeys=n.convertObject=void 0;var r=t("tslib"),i=t("underscore");r.__exportStar(t("./objectTranslation"),n),r.__exportStar(t("./translation"),n),r.__exportStar(t("./templates/objectTranslation"),n),r.__exportStar(t("./templates/translation"),n);var o=function(e){var t;return(t=e.split(":")).length>1?{label:t[0],value:t[1]}:{label:t[0],value:t[0]}},s=function(e){i.forEach(e.fields,(function(e,t){var n=[];if(e.options&&i.isString(e.options))try{i.forEach(e.options.split("\n"),(function(e){var t;e.indexOf(",")?(t=e.split(","),i.forEach(t,(function(e){return n.push(o(e))}))):n.push(o(e))})),e.options=n}catch(r){console.error("convertFieldsOptions error: ",e.options,r)}else if(e.options&&i.isArray(e.options))try{i.forEach(e.options,(function(e){i.isString(e)?n.push(o(e)):n.push(e)})),e.options=n}catch(r){console.error("Creator.convertFieldsOptions",e.options,r)}else e.options&&!i.isFunction(e.options)&&!i.isArray(e.options)&&i.isObject(e.options)&&(i.each(e.options,(function(e,t){return n.push({label:e,value:t})})),e.options=n)}))},a;n.convertObject=s,function(e){e.Object="CustomObject",e.Field="CustomField",e.Action="CustomAction",e.Listview="CustomListview",e.Permission="CustomPermission",e.ValidationRule="CustomValidationRule",e.Application="CustomApplication",e.Tab="CustomTabs",e.Permissionset="CustomPermissionset",e.Profile="CustomProfile",e.Report="CustomReport",e.Workflow="Workflow",e.Layout="Layout",e.Client="Client",e.Server="Server",e.Function="Function",e.Router="Router",e.Trigger="Trigger"}(a=n.SteedosTranslationPrefixKeys||(n.SteedosTranslationPrefixKeys={}))},"objectTranslation.js":function e(t,n,e,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addObjectsTranslation=n.getObjectTranslationTemplate=n.translationObjects=n.translationObject=n.translationObjectLabel=void 0;var i=t("underscore"),o=t("./"),s=t("../index"),a=t("./index"),u=t("../i18n/i18n"),f=t("lodash"),c=t("crypto"),l,h=(0,t("@steedos/cachers").getCacher)("lru.translations.objects");function d(e){var t;return c.createHash("md5").update(e).digest("hex")}var p=function(e,t){return"".concat(e,"_").concat(t.name,"_").concat(d(JSON.stringify(t)))},g=t("clone"),b=".",m="base",v="core",y="translation",_="object",w="field",k="listview",j="action",x=function(e,t){var n={lng:t,ns:y,keySeparator:!1};if((0,s.exists)(e,n))return(0,s._t)(e,n)},S=function(e){if(!e)return"";var t="core";return"default"!==e&&"meteor"!==e||(t="base"),t},D=function(e){switch(e){case"object":return o.SteedosTranslationPrefixKeys.Object;case"field":return o.SteedosTranslationPrefixKeys.Field;case"listview":return o.SteedosTranslationPrefixKeys.Listview;case"action":return o.SteedosTranslationPrefixKeys.Action;default:return"CustomLabels"}},E=function(e){var t;return[D(),e].join(".")},A=function(e){var t;return[D("object"),e,"label"].join(".")},C=function(e){var t;return[D("object"),e,"description"].join(".")},M=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"label"].join(".")},O=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"help"].join(".")},T=function(e,t){var n;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"description"].join(".")},B=function(e,t){var n=t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_"),r;return[D("field"),e,"group",n].join(".")},I=function(e,t,n){var r;return t&&(t=t.replace(/\./g,"_")),[D("field"),e,t,"options",n].join(".")},R=function(e,t){var n;return[D("action"),e,t].join(".")},F=function(e,t){var n;return[D("listview"),e,t].join(".")},P=function(e,t,n){var r,i=[A(t)],o=u.fallbackKeys.getObjectLabelKey(t);return o&&i.push(o),x(i,e)||n||""};n.translationObjectLabel=P;var N=function(e,t,n){var r=C(t);return x(r,e)||n||""},L=function(e,t,n,r,i,o){var s,a=[M(t,n)],f=u.fallbackKeys.getObjectFieldLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=L(e,l,n,r,i))}return c||r||""},z=function(e,t,n,r,i,o){var s,a=[O(t,n)],f=u.fallbackKeys.getObjectFieldInlineHelpTextLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=z(e,l,n,r,i))}return c||r||""},U=function(e,t,n,r,i,o){var s=T(t,n),a,u=x([s],e);if(1!=o&&!u){var f=S(i);f&&"base"!=t&&"core"!=t&&(u=U(e,f,n,r,i))}return u||r||""},q=function(e,t,n,r,i,o){var s,a=[B(t,n)],f=u.fallbackKeys.getObjectFieldGroupKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=q(e,l,n,r,i))}return c||r||""},$=function(e,t,n,r,i,o,s){var a,f=[I(t,n,r)],c=u.fallbackKeys.getObjectFieldOptionsLabelKey(t,n,r);c&&f.push(c);var l=x(f,e);if(1!=s&&!l){var h=S(o);h&&"base"!=t&&"core"!=t&&(l=$(e,h,n,r,i,o))}return l||i||""},H=function(e,t,n,r,i,o){var s,a=[R(t,n)],f=u.fallbackKeys.getObjectActionLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=H(e,l,n,r,i))}return c||r||""},W=function(e,t,n,r,i,o){var s,a=[F(t,n)],f=u.fallbackKeys.getObjectListviewLabelKey(t,n);f&&a.push(f);var c=x(a,e);if(1!=o&&!c){var l=S(i);l&&"base"!=t&&"core"!=t&&(c=W(e,l,n,r,i))}return c||r||""},Y=function(e,t,r,o,s){void 0===s&&(s=!1);var u=p(e,r);"test_obj_layout1"===t&&console.log("translationObject",t,u);var c=h.get(u);if(c)return Object.assign(r,(0,f.cloneDeep)(c));o&&(0,a.convertObject)(r),r.label=(0,n.translationObjectLabel)(e,t,r.label),r.description=N(e,t,r.description),i.each(r.fields,(function(n,o){if(n.label=L(e,t,o,n.label,r.datasource,s),n.inlineHelpText&&(n.inlineHelpText=z(e,t,o,n.inlineHelpText,r.datasource,s)),n.group&&(n.group=q(e,t,n.group,n.group,r.datasource,s)),n.options){var a=[];i.each(n.options,(function(n){if(i.has(n,"value")){var u=$(e,t,o,n.value,n.label,r.datasource,s);a.push(i.extend({},n,{label:u}))}else a.push(n)})),n.options=a}})),i.each(r.actions,(function(n,i){n.label=H(e,t,i,n.label,r.datasource,s)})),i.each(r.list_views,(function(n,i){n.label=W(e,t,i,n.label,r.datasource,s)})),h.set(u,(0,f.cloneDeep)(r))};n.translationObject=Y;var V=function(e,t){i.each(t,(function(t,r){(0,n.translationObject)(e,r,t)}))};n.translationObjects=V;var K=function(e,t,r){var o=g(r);(0,a.convertObject)(o);var s={};return s[A(t)]=(0,n.translationObjectLabel)(e,t,o.label),s[C(t)]=N(e,t,o.description),i.each(o.fields,(function(n,r){s[M(t,r)]=L(e,t,r,n.label),n.inlineHelpText&&(s[O(t,r)]=z(e,t,r,n.inlineHelpText,o.datasource)),n.description&&(s[T(t,r)]=U(e,t,r,n.description,o.datasource)),n.group&&(s[B(t,n.group)]=q(e,t,n.group,n.group,o.datasource)),n.options&&i.each(n.options,(function(n){i.has(n,"value")&&(s[I(t,r,n.value)]=$(e,t,r,n.value,n.label))}))})),i.each(o.actions,(function(n,r){s[R(t,r)]=H(e,t,r,n.label)})),i.each(o.list_views,(function(n,r){s[F(t,r)]=W(e,t,r,n.label)})),s};function G(e,t){var n=g(e);(0,a.convertObject)(n);var r={},o=n.name;return o||console.error("Error: Invalid objectTranslation:"+t),r[A(o)]=n.label,r[C(o)]=n.description,i.each(n.fields,(function(e,t){r[M(o,t)]=e.label,e.help&&(r[O(o,t)]=e.help),e.description&&(r[T(o,t)]=e.description),e.options&&i.each(e.options,(function(e){i.has(e,"value")&&(r[I(o,t,e.value)]=e.label)}))})),i.each(n.groups,(function(e,t){r[B(o,t)]=e})),i.each(n.actions,(function(e,t){r[R(o,t)]=e.label})),i.each(n.listviews,(function(e,t){r[F(o,t)]=e.label})),i.each(n.CustomLabels,(function(e,t){r[E(t)]=e})),r}n.getObjectTranslationTemplate=K;var X=function(e){i.each(e,(function(e){var t=G(e.data,e.__filename);(0,s.addResourceBundle)(e.lng,y,t,!0,!0)}))};n.addObjectsTranslation=X},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addTranslations=n.convertTranslation=n.convertTranslationData=n.getAppTranslationTemplate=n.translationApps=n.translationMenus=n.translationApp=n.translationTabLabel=n.translationTabGroup=void 0;var r=t("../index"),i=t("underscore"),o=t("./"),s=t("../i18n/i18n.app"),a=t("clone"),u="translation",f=".",c="app",l="menu",h="tab",d=function(e){switch(e){case"app":return o.SteedosTranslationPrefixKeys.Application;case"tab":return o.SteedosTranslationPrefixKeys.Tab;default:return"CustomLabels"}},p=function(e){var t;return[d(),e].join(".")},g=function(e,t){var n={lng:t,ns:u,keySeparator:!1};if((0,r.exists)(e,n))return(0,r._t)(e,n)},b=function(e){var t;return[d("app"),e,"name"].join(".")},m=function(e){var t;return[d("app"),e,"description"].join(".")},v=function(e,t){var n,r;return[d("app"),e,"groups",t.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_")].join(".")},y=function(e){var t;return[d("menu"),"menu_".concat(e)].join(".")},_=function(e){var t;return[d("tab"),e].join(".")},w=function(e,t,n){var r,i=[b(t)],o=s.appFallbackKeys.getAppLabelKey(t);return o&&i.push(o),g(i,e)||n||""},k=function(e,t,n){var r,i=[m(t)],o=s.appFallbackKeys.getAppDescriptionKey(t);return o&&i.push(o),g(i,e)||n||""},j=function(e,t,n,r){var i,o=[v(t,n)],a=s.appFallbackKeys.getAppGroupKey(t,n);return a&&o.push(a),g(o,e)||r||""};n.translationTabGroup=j;var x=function(e,t,n){var r,i=[y(t)],o=s.appFallbackKeys.getMenuLabelKey(t);return o&&i.push(o),g(i,e)||n||""},S=function(e,t,n){var r,i=[_(t)],o=s.appFallbackKeys.getTabKey(t);return o&&i.push(o),g(i,e)||n||""};n.translationTabLabel=S;var D=function(e,t,r){r.label=w(e,t,r.label||r.name),r.description=k(e,t,r.description),i.each(r.tab_groups,(function(i,o){r.tab_groups[o].id=i.id||i.group_name,r.tab_groups[o].group_name=(0,n.translationTabGroup)(e,t,i.group_name,i.group_name)})),(0,n.translationMenus)(e,r.admin_menus)};n.translationApp=D;var E=function(e,t){i.each(t,(function(t){var n=x(e,t._id,t.label||t.name);t.label=n,t.name=n}))};n.translationMenus=E;var A=function(e,t){i.each(t,(function(t,r){(0,n.translationApp)(e,r,t)}))};n.translationApps=A;var C=function(e,t,n){var r=a(n),o={};return o[b(t)]=w(e,t,r.label||r.name),o[m(t)]=k(e,t,r.description),i.each(r.admin_menus,(function(t){o[y(t._id)]=x(e,t._id,t.label||t.name)})),o};n.getAppTranslationTemplate=C;var M=function(e,t,n){i.isArray(n)?i.each(n,(function(e){M(e,"",e)})):n&&i.each(i.keys(n),(function(r){var o=t?"".concat(t,".").concat(r):r,s=n[r];"object"==typeof s?i.isArray(s)?i.each(s,(function(e){M(e,o,s)})):M(e,o,s):e[o]=s}))};function O(e){for(var t in e)"object"==typeof e[t]&&M(e,t,e[t]);return e}n.convertTranslationData=O;var T=function(e){var t=a(e),n={};return i.each(t.CustomApplications,(function(e,t){n[b(t)]=e.name,n[m(t)]=e.description,i.each(e.groups,(function(e,r){n[v(t,r)]=e}))})),i.each(t.CustomTabs,(function(e,t){n[_(t)]=e})),i.each(t.CustomLabels,(function(e,t){var r;if("simpleschema"!=t&&i.isObject(e)){var o=O(((r={})[t]=e,r));i.each(o,(function(e,t){i.isObject(e)||(n[p(t)]=e)}))}else n[p(t)]=e})),n};n.convertTranslation=T;var B=function(e){i.each(e,(function(e){var t=(0,n.convertTranslation)(e.data);(0,r.addResourceBundle)(e.lng,u,t,!0,!0)}))};n.addTranslations=B},templates:{"objectTranslation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getObjectMetadataTranslationTemplate=void 0;var r=t("underscore"),i=t("../index"),o=t("clone");function s(e,t){var n={};return r.each(e,(function(e){n[e]="help"===e?t.inlineHelpText||"":t[e]||""})),n}function a(e){return s(["label","description"],e)}function u(e){switch(e.type){case"select":return s(["label","help","options","description"],e);default:return s(["label","help","description"],e)}}function f(e){return s(["label"],e)}function c(e){return s(["label"],e)}function l(e){var t={};return r.each(e,(function(e,n){t[n]=u(e)})),t}function h(e){var t={};return r.each(e,(function(e,n){t[n]=c(e)})),t}function d(e){var t={};return r.each(e,(function(e,n){t[n]=f(e)})),t}function p(e,t){var n={};return r.each(e,(function(e,r){if(e.group){var i=e.group.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");n[i]=t[r].group}})),n}var g=function(e,t,n,s){void 0===s&&(s=!1);var u=o(n);1!=s&&(0,i.translationObject)(e,t,u,!0,s);var f=Object.assign({},a(u));f=Object.assign({},f,{fields:l(u.fields)});var c=p(n.fields,u.fields);r.isEmpty(c)||(f=Object.assign({},f,{groups:c}));var g=d(u.list_views);r.isEmpty(g)||(f=Object.assign({},f,{listviews:g}));var b=h(u.actions);return r.isEmpty(b)||(f=Object.assign({},f,{actions:b})),Object.assign({name:t},f)};n.getObjectMetadataTranslationTemplate=g},"translation.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAppMetadataTranslationTemplate=void 0;var r=t("underscore"),i=t("../index"),o=t("clone");function s(e,t){var n={};return r.each(e,(function(e){n[e]=t[e]||""})),n}function a(e){var t={groups:{}};return e?(r.each(e,(function(e){var n=e.group_name.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t.groups[n]=e.group_name})),t):{}}var u=function(e){return Object.assign({},s(["name","description"],e),a(e.tab_groups))},f=function(e){var t={};return r.each(e,(function(e,n){t[n]=n})),t},c=function(e){var t={};return r.each(e,(function(e){var n=e.toLocaleLowerCase().replace(/\%/g,"_").replace(/\./g,"_").replace(/\ /g,"_");t[n]=e})),t},l=function(e,t,n){var r,s=o(n);(0,i.translationApp)(e,t,s);var a={},l;return s.tab_items?a=f(s.tab_items):s.tabs&&(a=c(s.tabs)),Object.assign({},{CustomApplications:(r={},r[t]=u(s),r)},{CustomTabs:a})};n.getAppMetadataTranslationTemplate=l}}}},node_modules:{i18next:{"package.json":function e(t,n,e){e.exports={name:"i18next",version:"19.9.2",module:"./dist/esm/i18next.js",main:"./dist/cjs/i18next.js"}},dist:{esm:{"i18next.js":function e(t,n,e){let r,i,o,s,a,u,f,c;e.link("@babel/runtime/helpers/esm/typeof",{default(e){r=e}},0),e.link("@babel/runtime/helpers/esm/objectSpread",{default(e){i=e}},1),e.link("@babel/runtime/helpers/esm/classCallCheck",{default(e){o=e}},2),e.link("@babel/runtime/helpers/esm/createClass",{default(e){s=e}},3),e.link("@babel/runtime/helpers/esm/possibleConstructorReturn",{default(e){a=e}},4),e.link("@babel/runtime/helpers/esm/getPrototypeOf",{default(e){u=e}},5),e.link("@babel/runtime/helpers/esm/assertThisInitialized",{default(e){f=e}},6),e.link("@babel/runtime/helpers/esm/inherits",{default(e){c=e}},7);var l={type:"logger",log:function e(t){this.output("log",t)},warn:function e(t){this.output("warn",t)},error:function e(t){this.output("error",t)},output:function e(t,n){console&&console[t]&&console[t].apply(console,n)}},h,d=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.init(t,n)}return s(e,[{key:"init",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||l,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function e(t){this.debug=t}},{key:"log",value:function e(){for(var t=arguments.length,n=new Array(t),r=0;r1?n-1:0),i=1;i-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function y(e,t,n){var r=v(e,t,Object),i,o;r.obj[r.k]=n}function _(e,t,n,r){var i=v(e,t,Object),o=i.obj,s=i.k;o[s]=o[s]||[],r&&(o[s]=o[s].concat(n)),r||o[s].push(n)}function w(e,t){var n=v(e,t),r=n.obj,i=n.k;if(r)return r[i]}function k(e,t,n){var r=w(e,n);return void 0!==r?r:w(t,n)}function j(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):j(e[r],t[r],n):e[r]=t[r]);return e}function x(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var S={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function D(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return S[e]})):e}var E="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,A=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return o(this,t),n=a(this,u(t).call(this)),E&&p.call(f(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return c(t,e),s(t,[{key:"addNamespaces",value:function e(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function e(t){var n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}},{key:"getResource",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==i.keySeparator?i.keySeparator:this.options.keySeparator,s=[t,n];return r&&"string"!=typeof r&&(s=s.concat(r)),r&&"string"==typeof r&&(s=s.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(s=t.split(".")),w(this.data,s)}},{key:"addResource",value:function e(t,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},s=this.options.keySeparator;void 0===s&&(s=".");var a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(i=n,n=(a=t.split("."))[1]),this.addNamespaces(n),y(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}},{key:"addResources",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)"string"!=typeof r[o]&&"[object Array]"!==Object.prototype.toString.apply(r[o])||this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}},{key:"addResourceBundle",value:function e(t,n,r,o,s){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},u=[t,n];t.indexOf(".")>-1&&(o=r,r=n,n=(u=t.split("."))[1]),this.addNamespaces(n);var f=w(this.data,u)||{};o?j(f,r,s):f=i({},f,r),y(this.data,u,f),a.silent||this.emit("added",t,n,r)}},{key:"removeResourceBundle",value:function e(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}},{key:"hasResourceBundle",value:function e(t,n){return void 0!==this.getResource(t,n)}},{key:"getResourceBundle",value:function e(t,n){return n||(n=this.options.defaultNS),"v1"===this.options.compatibilityAPI?i({},{},this.getResource(t,n)):this.getResource(t,n)}},{key:"getDataByLanguage",value:function e(t){return this.data[t]}},{key:"toJSON",value:function e(){return this.data}}]),t}(p),C={processors:{},addPostProcessor:function e(t){this.processors[t.name]=t},handle:function e(t,n,r,i,o){var s=this;return t.forEach((function(e){s.processors[e]&&(n=s.processors[e].process(n,r,i,o))})),n}},M={},O=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o(this,t),n=a(this,u(t).call(this)),E&&p.call(f(n)),m(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,f(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=d.create("translator"),n}return c(t,e),s(t,[{key:"changeLanguage",value:function e(t){t&&(this.language=t)}},{key:"exists",value:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(t,n);return r&&void 0!==r.res}},{key:"extractFromKey",value:function e(t,n){var r=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=n.ns||this.options.defaultNS;if(r&&t.indexOf(r)>-1){var s=t.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:t,namespaces:o};var a=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),t=a.join(i)}return"string"==typeof o&&(o=[o]),{key:t,namespaces:o}}},{key:"translate",value:function e(n,o,s){var a=this;if("object"!==r(o)&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),null==n)return"";Array.isArray(n)||(n=[String(n)]);var u=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,f=this.extractFromKey(n[n.length-1],o),c=f.key,l=f.namespaces,h=l[l.length-1],d=o.lng||this.language,p=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var g=o.nsSeparator||this.options.nsSeparator;return h+g+c}return c}var b=this.resolve(n,o),m=b&&b.res,v=b&&b.usedKey||c,y=b&&b.exactUsedKey||c,_=Object.prototype.toString.apply(m),w=["[object Number]","[object Function]","[object RegExp]"],k=void 0!==o.joinArrays?o.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(j&&m&&x&&w.indexOf(_)<0&&("string"!=typeof k||"[object Array]"!==_)){if(!o.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,m,o):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(u){var S="[object Array]"===_,D=S?[]:{},E=S?y:v;for(var A in m)if(Object.prototype.hasOwnProperty.call(m,A)){var C="".concat(E).concat(u).concat(A);D[A]=this.translate(C,i({},o,{joinArrays:!1,ns:l})),D[A]===C&&(D[A]=m[A])}m=D}}else if(j&&"string"==typeof k&&"[object Array]"===_)(m=m.join(k))&&(m=this.extendTranslation(m,n,o,s));else{var M=!1,O=!1,T=void 0!==o.count&&"string"!=typeof o.count,B=t.hasDefaultValue(o),I=T?this.pluralResolver.getSuffix(d,o.count):"",R=o["defaultValue".concat(I)]||o.defaultValue;!this.isValidLookup(m)&&B&&(M=!0,m=R),this.isValidLookup(m)||(O=!0,m=c);var F=B&&R!==m&&this.options.updateMissing;if(O||M||F){if(this.logger.log(F?"updateKey":"missingKey",d,h,c,F?R:m),u){var P=this.resolve(c,i({},o,{keySeparator:!1}));P&&P.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var N=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var z=0;z1&&void 0!==arguments[1]?arguments[1]:{},i,o,s,a,u;return"string"==typeof t&&(t=[t]),t.forEach((function(e){if(!n.isValidLookup(i)){var t=n.extractFromKey(e,r),f=t.key;o=f;var c=t.namespaces;n.options.fallbackNS&&(c=c.concat(n.options.fallbackNS));var l=void 0!==r.count&&"string"!=typeof r.count,h=void 0!==r.context&&"string"==typeof r.context&&""!==r.context,d=r.lngs?r.lngs:n.languageUtils.toResolveHierarchy(r.lng||n.language,r.fallbackLng);c.forEach((function(e){n.isValidLookup(i)||(u=e,!M["".concat(d[0],"-").concat(e)]&&n.utils&&n.utils.hasLoadedNamespace&&!n.utils.hasLoadedNamespace(u)&&(M["".concat(d[0],"-").concat(e)]=!0,n.logger.warn('key "'.concat(o,'" for languages "').concat(d.join(", "),'" won\'t get resolved as namespace "').concat(u,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((function(t){if(!n.isValidLookup(i)){a=t;var o=f,u=[o],c,d;if(n.i18nFormat&&n.i18nFormat.addLookupKeys)n.i18nFormat.addLookupKeys(u,f,t,e,r);else l&&(c=n.pluralResolver.getSuffix(t,r.count)),l&&h&&u.push(o+c),h&&u.push(o+="".concat(n.options.contextSeparator).concat(r.context)),l&&u.push(o+=c);for(;d=u.pop();)n.isValidLookup(i)||(s=d,i=n.getResource(t,e,d,r))}})))}))}})),{res:i,usedKey:o,exactUsedKey:s,usedLng:a,usedNS:u}}},{key:"isValidLookup",value:function e(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}}],[{key:"hasDefaultValue",value:function e(t){var n="defaultValue";for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&void 0!==t[r])return!0;return!1}}]),t}(p);function T(e){return e.charAt(0).toUpperCase()+e.slice(1)}var B=function(){function e(t){o(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=d.create("languageUtils")}return s(e,[{key:"getScriptPartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return null;var n=t.split("-");return 2===n.length?null:(n.pop(),"x"===n[n.length-1].toLowerCase()?null:this.formatLanguageCode(n.join("-")))}},{key:"getLanguagePartFromCode",value:function e(t){if(!t||t.indexOf("-")<0)return t;var n=t.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function e(t){if("string"==typeof t&&t.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],r=t.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=T(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=T(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=T(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function e(t){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function e(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function e(t){var n=this,r;return t?(t.forEach((function(e){if(!r){var t=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(t)||(r=t)}})),!r&&this.options.supportedLngs&&t.forEach((function(e){if(!r){var t=n.getLanguagePartFromCode(e);if(n.isSupportedCode(t))return r=t;r=n.options.supportedLngs.find((function(e){if(0===e.indexOf(t))return e}))}})),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r):null}},{key:"getFallbackCodes",value:function e(t,n){if(!t)return[];if("function"==typeof t&&(t=t(n)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!n)return t.default||[];var r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}},{key:"toResolveHierarchy",value:function e(t,n){var r=this,i=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],s=function e(t){t&&(r.isSupportedCode(t)?o.push(t):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(t))):"string"==typeof t&&s(this.formatLanguageCode(t)),i.forEach((function(e){o.indexOf(e)<0&&s(r.formatLanguageCode(e))})),o}}]),e}(),I=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],R={1:function e(t){return Number(t>1)},2:function e(t){return Number(1!=t)},3:function e(t){return 0},4:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function e(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function e(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function e(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function e(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function e(t){return Number(t>=2)},10:function e(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function e(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function e(t){return Number(t%10!=1||t%100==11)},13:function e(t){return Number(0!==t)},14:function e(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function e(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function e(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function e(t){return Number(1==t||t%10==1&&t%100!=11?0:1)},18:function e(t){return Number(0==t?0:1==t?1:2)},19:function e(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function e(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function e(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function e(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}};function F(){var e={};return I.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:R[t.fc]}}))})),e}var P=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),this.languageUtils=t,this.options=n,this.logger=d.create("pluralResolver"),this.rules=F()}return s(e,[{key:"addRule",value:function e(t,n){this.rules[t]=n}},{key:"getRule",value:function e(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function e(t){var n=this.getRule(t);return n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function e(t,n){return this.getSuffixes(t).map((function(e){return n+e}))}},{key:"getSuffixes",value:function e(t){var n=this,r=this.getRule(t);return r?r.numbers.map((function(e){return n.getSuffix(t,e)})):[]}},{key:"getSuffix",value:function e(t,n){var r=this,i=this.getRule(t);if(i){var o=i.noAbs?i.plurals(n):i.plurals(Math.abs(n)),s=i.numbers[o];this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]&&(2===s?s="plural":1===s&&(s=""));var a=function e(){return r.options.prepend&&s.toString()?r.options.prepend+s.toString():s.toString()};return"v1"===this.options.compatibilityJSON?1===s?"":"number"==typeof s?"_plural_".concat(s.toString()):a():"v2"===this.options.compatibilityJSON?a():this.options.simplifyPluralSuffix&&2===i.numbers.length&&1===i.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),N=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),this.logger=d.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return s(e,[{key:"init",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var n=t.interpolation;this.escape=void 0!==n.escape?n.escape:D,this.escapeValue=void 0===n.escapeValue||n.escapeValue,this.useRawValueToEscape=void 0!==n.useRawValueToEscape&&n.useRawValueToEscape,this.prefix=n.prefix?x(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?x(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?x(n.nestingPrefix):n.nestingPrefixEscaped||x("$t("),this.nestingSuffix=n.nestingSuffix?x(n.nestingSuffix):n.nestingSuffixEscaped||x(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=void 0!==n.alwaysFormat&&n.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function e(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function e(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function e(t,n,r,i){var o=this,s,a,u,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function e(t){if(t.indexOf(o.formatSeparator)<0){var s=k(n,f,t);return o.alwaysFormat?o.format(s,void 0,r):s}var a=t.split(o.formatSeparator),u=a.shift().trim(),c=a.join(o.formatSeparator).trim();return o.format(k(n,f,u),c,r,i)};this.resetRegExp();var h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,p;return[{regex:this.regexpUnescape,safeValue:function e(t){return c(t)}},{regex:this.regexp,safeValue:function e(t){return o.escapeValue?c(o.escape(t)):c(t)}}].forEach((function(e){for(u=0;s=e.regex.exec(t);){if(void 0===(a=l(s[1].trim())))if("function"==typeof h){var n=h(t,s,i);a="string"==typeof n?n:""}else{if(d){a=s[0];continue}o.logger.warn("missed to pass in variable ".concat(s[1]," for interpolating ").concat(t)),a=""}else"string"==typeof a||o.useRawValueToEscape||(a=b(a));if(t=t.replace(s[0],e.safeValue(a)),e.regex.lastIndex=0,++u>=o.maxReplaces)break}})),t}},{key:"nest",value:function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s,a,u=i({},o);function f(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,u)).replace(/'/g,'"');try{u=JSON.parse(o),t&&(u=i({},t,u))}catch(s){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),s),"".concat(e).concat(n).concat(o)}return delete u.defaultValue,e}for(u.applyPostProcessor=!1,delete u.defaultValue;s=this.nestingRegexp.exec(t);){var c=[],l=!1;if(s[0].includes(this.formatSeparator)&&!/{.*}/.test(s[1])){var h=s[1].split(this.formatSeparator).map((function(e){return e.trim()}));s[1]=h.shift(),c=h,l=!0}if((a=n(f.call(this,s[1].trim(),u),u))&&s[0]===t&&"string"!=typeof a)return a;"string"!=typeof a&&(a=b(a)),a||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(t)),a=""),l&&(a=c.reduce((function(e,t){return r.format(e,t,o.lng,o)}),a.trim())),t=t.replace(s[0],a),this.regexp.lastIndex=0}return t}}]),e}();function L(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}var z=function(e){function t(e,n,r){var i,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return o(this,t),i=a(this,u(t).call(this)),E&&p.call(f(i)),i.backend=e,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=s,i.logger=d.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,s.backend,s),i}return c(t,e),s(t,[{key:"queueLoad",value:function e(t,n,r,i){var o=this,s=[],a=[],u=[],f=[];return t.forEach((function(e){var t=!0;n.forEach((function(n){var i="".concat(e,"|").concat(n);!r.reload&&o.store.hasResourceBundle(e,n)?o.state[i]=2:o.state[i]<0||(1===o.state[i]?a.indexOf(i)<0&&a.push(i):(o.state[i]=1,t=!1,a.indexOf(i)<0&&a.push(i),s.indexOf(i)<0&&s.push(i),f.indexOf(n)<0&&f.push(n)))})),t||u.push(e)})),(s.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:i}),{toLoad:s,pending:a,toLoadLanguages:u,toLoadNamespaces:f}}},{key:"loaded",value:function e(t,n,r){var i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),r&&this.store.addResourceBundle(o,s,r),this.state[t]=n?-1:2;var e={};this.queue.forEach((function(r){_(r.loaded,[o],s),L(r.pending,t),n&&r.errors.push(n),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(t){e[t]||(e[t]=[]),r.loaded[t].length&&r.loaded[t].forEach((function(n){e[t].indexOf(n)<0&&e[t].push(n)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",e),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function e(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return t.length?this.backend[r](t,n,(function(e,u){e&&u&&o<5?setTimeout((function(){i.read.call(i,t,n,r,o+1,2*s,a)}),s):a(e,u)})):a(null,{})}},{key:"prepareLoading",value:function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof n&&(n=[n]);var s=this.queueLoad(t,n,i,o);if(!s.toLoad.length)return s.pending.length||o(),null;s.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function e(t,n,r){this.prepareLoading(t,n,{},r)}},{key:"reload",value:function e(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}},{key:"loadOne",value:function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=t.split("|"),o=i[0],s=i[1];this.read(o,s,"read",void 0,void 0,(function(e,i){e&&n.logger.warn("".concat(r,"loading namespace ").concat(s," for language ").concat(o," failed"),e),!e&&i&&n.logger.log("".concat(r,"loaded namespace ").concat(s," for language ").concat(o),i),n.loaded(t,e,i)}))}},{key:"saveMissing",value:function e(t,n,r,o,s){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(n,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(t,n,r,o,null,i({},a,{isUpdate:s})),t&&t[0]&&this.store.addResource(t[0],n,r,o))}}]),t}(p);function U(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function e(t){var n={};if("object"===r(t[1])&&(n=t[1]),"string"==typeof t[1]&&(n.defaultValue=t[1]),"string"==typeof t[2]&&(n.tDescription=t[2]),"object"===r(t[2])||"object"===r(t[3])){var i=t[3]||t[2];Object.keys(i).forEach((function(e){n[e]=i[e]}))}return n},interpolation:{escapeValue:!0,format:function e(t,n,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function q(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function $(){}var H,W=new(function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(o(this,t),e=a(this,u(t).call(this)),E&&p.call(f(e)),e.options=q(n),e.services={},e.logger=d,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),a(e,f(e));setTimeout((function(){e.init(n,r)}),0)}return e}return c(t,e),s(t,[{key:"init",value:function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function o(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof n&&(r=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=i({},U(),this.options,q(n)),this.format=this.options.interpolation.format,r||(r=$),!this.options.isClone){this.modules.logger?d.init(o(this.modules.logger),this.options):d.init(null,this.options);var s=new B(this.options);this.store=new A(this.options.resources,this.options);var a=this.services;a.logger=d,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new P(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new N(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new z(o(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var f=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];f.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}));var c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}}));var l=g(),h=function e(){var n=function e(n,i){t.isInitialized&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),l.resolve(i),r(n,i)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return n(null,t.t.bind(t));t.changeLanguage(t.options.lng,n)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),l}},{key:"loadResources",value:function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,i=r,o="string"==typeof t?t:this.language;if("function"==typeof t&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return i();var s=[],a=function e(t){var r;t&&n.services.languageUtils.toResolveHierarchy(t).forEach((function(e){s.indexOf(e)<0&&s.push(e)}))};if(o)a(o);else{var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(s,this.options.ns,i)}else i(null)}},{key:"reloadResources",value:function e(t,n,r){var i=g();return t||(t=this.languages),n||(n=this.options.ns),r||(r=$),this.services.backendConnector.reload(t,n,(function(e){i.resolve(),r(e)})),i}},{key:"use",value:function e(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&C.addPostProcessor(t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"changeLanguage",value:function e(t,n){var r=this;this.isLanguageChangingTo=t;var i=g();this.emit("languageChanging",t);var o=function e(t,o){o?(r.language=o,r.languages=r.services.languageUtils.toResolveHierarchy(o),r.translator.changeLanguage(o),r.isLanguageChangingTo=void 0,r.emit("languageChanged",o),r.logger.log("languageChanged",o)):r.isLanguageChangingTo=void 0,i.resolve((function(){return r.t.apply(r,arguments)})),n&&n(t,(function(){return r.t.apply(r,arguments)}))},s=function e(t){var n="string"==typeof t?t:r.services.languageUtils.getBestMatchFromCodes(t);n&&(r.language||(r.language=n,r.languages=r.services.languageUtils.toResolveHierarchy(n)),r.translator.language||r.translator.changeLanguage(n),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(n)),r.loadResources(n,(function(e){o(e,n)}))};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(s):s(t):s(this.services.languageDetector.detect()),i}},{key:"getFixedT",value:function e(t,n){var o=this,s=function e(t,n){var s;if("object"!==r(n)){for(var a=arguments.length,u=new Array(a>2?a-2:0),f=2;f1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var i=this.languages[0],o=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if("cimode"===i.toLowerCase())return!0;var a=function e(t,r){var i=n.services.backendConnector.state["".concat(t,"|").concat(r)];return-1===i||2===i};if(r.precheck){var u=r.precheck(this,a);if(void 0!==u)return u}return!!this.hasResourceBundle(i,t)||(!this.services.backendConnector.backend||!(!a(i,t)||o&&!a(s,t)))}},{key:"loadNamespaces",value:function e(t,n){var r=this,i=g();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){i.resolve(),n&&n(e)})),i):(n&&n(),Promise.resolve())}},{key:"loadLanguages",value:function e(t,n){var r=g();"string"==typeof t&&(t=[t]);var i=this.options.preload||[],o=t.filter((function(e){return i.indexOf(e)<0}));return o.length?(this.options.preload=i.concat(o),this.loadResources((function(e){r.resolve(),n&&n(e)})),r):(n&&n(),Promise.resolve())}},{key:"dir",value:function e(t){return t||(t=this.languages&&this.languages.length>0?this.languages[0]:this.language),t?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>=0?"rtl":"ltr":"rtl";var n}},{key:"createInstance",value:function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(n,r)}},{key:"cloneInstance",value:function e(){var n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,s=i({},this.options,r,{isClone:!0}),a=new t(s),u=["store","services","language"];return u.forEach((function(e){a[e]=n[e]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new O(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rr,root:()=>i,ArrayProto:()=>o,ObjProto:()=>s,SymbolProto:()=>a,push:()=>u,slice:()=>f,toString:()=>c,hasOwnProperty:()=>l,supportsArrayBuffer:()=>h,supportsDataView:()=>d,nativeIsArray:()=>p,nativeKeys:()=>g,nativeCreate:()=>b,nativeIsView:()=>m,_isNaN:()=>v,_isFinite:()=>y,hasEnumBug:()=>_,nonEnumerableProps:()=>w,MAX_ARRAY_INDEX:()=>k});var r="1.13.4",i="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},o=Array.prototype,s=Object.prototype,a="undefined"!=typeof Symbol?Symbol.prototype:null,u=o.push,f=o.slice,c=s.toString,l=s.hasOwnProperty,h="undefined"!=typeof ArrayBuffer,d="undefined"!=typeof DataView,p=Array.isArray,g=Object.keys,b=Object.create,m=h&&ArrayBuffer.isView,v=isNaN,y=isFinite,_=!{toString:null}.propertyIsEnumerable("toString"),w=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],k=Math.pow(2,53)-1},"restArguments.js":function e(t,n,e){function r(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;ir})},"isObject.js":function e(t,n,e){function r(e){var t=typeof e;return"function"===t||"object"===t&&!!e}e.export({default:()=>r})},"isNull.js":function e(t,n,e){function r(e){return null===e}e.export({default:()=>r})},"isUndefined.js":function e(t,n,e){function r(e){return void 0===e}e.export({default:()=>r})},"isBoolean.js":function e(t,n,e){let r;function i(e){return!0===e||!1===e||"[object Boolean]"===r.call(e)}e.export({default:()=>i}),e.link("./_setup.js",{toString(e){r=e}},0)},"isElement.js":function e(t,n,e){function r(e){return!(!e||1!==e.nodeType)}e.export({default:()=>r})},"isString.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("String"))},"_tagTester.js":function e(t,n,e){let r;function i(e){var t="[object "+e+"]";return function(e){return r.call(e)===t}}e.export({default:()=>i}),e.link("./_setup.js",{toString(e){r=e}},0)},"isNumber.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Number"))},"isDate.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Date"))},"isRegExp.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("RegExp"))},"isError.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Error"))},"isSymbol.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Symbol"))},"isArrayBuffer.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("ArrayBuffer"))},"isDataView.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./isArrayBuffer.js",{default(e){o=e}},2),e.link("./_stringTagBug.js",{hasStringTagBug(e){s=e}},3);var a=r("DataView");function u(e){return null!=e&&i(e.getInt8)&&o(e.buffer)}e.exportDefault(s?u:a)},"isFunction.js":function e(t,n,e){let r,i;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_setup.js",{root(e){i=e}},1);var o=r("Function"),s=i.document&&i.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof s&&(o=function(e){return"function"==typeof e||!1}),e.exportDefault(o)},"_stringTagBug.js":function e(t,n,e){let r,i;e.export({hasStringTagBug:()=>o,isIE11:()=>s}),e.link("./_setup.js",{supportsDataView(e){r=e}},0),e.link("./_hasObjectTag.js",{default(e){i=e}},1);var o=r&&i(new DataView(new ArrayBuffer(8))),s="undefined"!=typeof Map&&i(new Map)},"_hasObjectTag.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("Object"))},"isArray.js":function e(t,n,e){let r,i;e.link("./_setup.js",{nativeIsArray(e){r=e}},0),e.link("./_tagTester.js",{default(e){i=e}},1),e.exportDefault(r||i("Array"))},"isArguments.js":function e(t,n,e){let r,i;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1);var o=r("Arguments");!function(){o(arguments)||(o=function(e){return i(e,"callee")})}(),e.exportDefault(o)},"_has.js":function e(t,n,e){let r;function i(e,t){return null!=e&&r.call(e,t)}e.export({default:()=>i}),e.link("./_setup.js",{hasOwnProperty(e){r=e}},0)},"isFinite.js":function e(t,n,e){let r,i;function o(e){return!i(e)&&r(e)&&!isNaN(parseFloat(e))}e.export({default:()=>o}),e.link("./_setup.js",{_isFinite(e){r=e}},0),e.link("./isSymbol.js",{default(e){i=e}},1)},"isNaN.js":function e(t,n,e){let r,i;function o(e){return i(e)&&r(e)}e.export({default:()=>o}),e.link("./_setup.js",{_isNaN(e){r=e}},0),e.link("./isNumber.js",{default(e){i=e}},1)},"isTypedArray.js":function e(t,n,e){let r,i,o,s,a,u;e.link("./_setup.js",{supportsArrayBuffer(e){r=e},nativeIsView(e){i=e},toString(e){o=e}},0),e.link("./isDataView.js",{default(e){s=e}},1),e.link("./constant.js",{default(e){a=e}},2),e.link("./_isBufferLike.js",{default(e){u=e}},3);var f=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function c(e){return i?i(e)&&!s(e):u(e)&&f.test(o.call(e))}e.exportDefault(r?c:a(!1))},"constant.js":function e(t,n,e){function r(e){return function(){return e}}e.export({default:()=>r})},"_isBufferLike.js":function e(t,n,e){let r,i;e.link("./_createSizePropertyCheck.js",{default(e){r=e}},0),e.link("./_getByteLength.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createSizePropertyCheck.js":function e(t,n,e){let r;function i(e){return function(t){var n=e(t);return"number"==typeof n&&n>=0&&n<=r}}e.export({default:()=>i}),e.link("./_setup.js",{MAX_ARRAY_INDEX(e){r=e}},0)},"_getByteLength.js":function e(t,n,e){let r;e.link("./_shallowProperty.js",{default(e){r=e}},0),e.exportDefault(r("byteLength"))},"_shallowProperty.js":function e(t,n,e){function r(e){return function(t){return null==t?void 0:t[e]}}e.export({default:()=>r})},"isEmpty.js":function e(t,n,e){let r,i,o,s,a;function u(e){if(null==e)return!0;var t=r(e);return"number"==typeof t&&(i(e)||o(e)||s(e))?0===t:0===r(a(e))}e.export({default:()=>u}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),e.link("./isString.js",{default(e){o=e}},2),e.link("./isArguments.js",{default(e){s=e}},3),e.link("./keys.js",{default(e){a=e}},4)},"_getLength.js":function e(t,n,e){let r;e.link("./_shallowProperty.js",{default(e){r=e}},0),e.exportDefault(r("length"))},"keys.js":function e(t,n,e){let r,i,o,s,a;function u(e){if(!r(e))return[];if(i)return i(e);var t=[];for(var n in e)s(e,n)&&t.push(n);return o&&a(e,t),t}e.export({default:()=>u}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{nativeKeys(e){i=e},hasEnumBug(e){o=e}},1),e.link("./_has.js",{default(e){s=e}},2),e.link("./_collectNonEnumProps.js",{default(e){a=e}},3)},"_collectNonEnumProps.js":function e(t,n,e){let r,i,o,s;function a(e){for(var t={},n=e.length,r=0;ru}),e.link("./_setup.js",{nonEnumerableProps(e){r=e},ObjProto(e){i=e}},0),e.link("./isFunction.js",{default(e){o=e}},1),e.link("./_has.js",{default(e){s=e}},2)},"isMatch.js":function e(t,n,e){let r;function i(e,t){var n=r(t),i=n.length;if(null==e)return!i;for(var o=Object(e),s=0;si}),e.link("./keys.js",{default(e){r=e}},0)},"isEqual.js":function e(t,n,e){let r,i,o,s,a,u,f,c,l,h,d;e.export({default:()=>m}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_setup.js",{toString(e){i=e},SymbolProto(e){o=e}},1),e.link("./_getByteLength.js",{default(e){s=e}},2),e.link("./isTypedArray.js",{default(e){a=e}},3),e.link("./isFunction.js",{default(e){u=e}},4),e.link("./_stringTagBug.js",{hasStringTagBug(e){f=e}},5),e.link("./isDataView.js",{default(e){c=e}},6),e.link("./keys.js",{default(e){l=e}},7),e.link("./_has.js",{default(e){h=e}},8),e.link("./_toBufferView.js",{default(e){d=e}},9);var p="[object DataView]";function g(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&b(e,t,n,r)}function b(e,t,n,m){e instanceof r&&(e=e._wrapped),t instanceof r&&(t=t._wrapped);var v=i.call(e);if(v!==i.call(t))return!1;if(f&&"[object Object]"==v&&c(e)){if(!c(t))return!1;v=p}switch(v){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return o.valueOf.call(e)===o.valueOf.call(t);case"[object ArrayBuffer]":case p:return b(d(e),d(t),n,m)}var y="[object Array]"===v;if(!y&&a(e)){var _;if(s(e)!==s(t))return!1;if(e.buffer===t.buffer&&e.byteOffset===t.byteOffset)return!0;y=!0}if(!y){if("object"!=typeof e||"object"!=typeof t)return!1;var w=e.constructor,k=t.constructor;if(w!==k&&!(u(w)&&w instanceof w&&u(k)&&k instanceof k)&&"constructor"in e&&"constructor"in t)return!1}m=m||[];for(var j=(n=n||[]).length;j--;)if(n[j]===e)return m[j]===t;if(n.push(e),m.push(t),y){if((j=e.length)!==t.length)return!1;for(;j--;)if(!g(e[j],t[j],n,m))return!1}else{var x=l(e),S;if(j=x.length,l(t).length!==j)return!1;for(;j--;)if(S=x[j],!h(t,S)||!g(e[S],t[S],n,m))return!1}return n.pop(),m.pop(),!0}function m(e,t){return g(e,t)}},"underscore.js":function e(t,n,e){let r;function i(e){return e instanceof i?e:this instanceof i?void(this._wrapped=e):new i(e)}e.export({default:()=>i}),e.link("./_setup.js",{VERSION(e){r=e}},0),i.VERSION=r,i.prototype.value=function(){return this._wrapped},i.prototype.valueOf=i.prototype.toJSON=i.prototype.value,i.prototype.toString=function(){return String(this._wrapped)}},"_toBufferView.js":function e(t,n,e){let r;function i(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,r(e))}e.export({default:()=>i}),e.link("./_getByteLength.js",{default(e){r=e}},0)},"isMap.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},mapMethods(e){s=e}},2),e.exportDefault(i?o(s):r("Map"))},"_methodFingerprint.js":function e(t,n,e){let r,i,o;function s(e){var t=r(e);return function(n){if(null==n)return!1;var s=o(n);if(r(s))return!1;for(var u=0;us,mapMethods:()=>l,weakMapMethods:()=>h,setMethods:()=>d}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./allKeys.js",{default(e){o=e}},2);var a="forEach",u="has",f=["clear","delete"],c=["get","has","set"],l=f.concat(a,c),h=f.concat(c),d=["add"].concat(f,a,"has")},"allKeys.js":function e(t,n,e){let r,i,o;function s(e){if(!r(e))return[];var t=[];for(var n in e)t.push(n);return i&&o(e,t),t}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{hasEnumBug(e){i=e}},1),e.link("./_collectNonEnumProps.js",{default(e){o=e}},2)},"isWeakMap.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},weakMapMethods(e){s=e}},2),e.exportDefault(i?o(s):r("WeakMap"))},"isSet.js":function e(t,n,e){let r,i,o,s;e.link("./_tagTester.js",{default(e){r=e}},0),e.link("./_stringTagBug.js",{isIE11(e){i=e}},1),e.link("./_methodFingerprint.js",{ie11fingerprint(e){o=e},setMethods(e){s=e}},2),e.exportDefault(i?o(s):r("Set"))},"isWeakSet.js":function e(t,n,e){let r;e.link("./_tagTester.js",{default(e){r=e}},0),e.exportDefault(r("WeakSet"))},"values.js":function e(t,n,e){let r;function i(e){for(var t=r(e),n=t.length,i=Array(n),o=0;oi}),e.link("./keys.js",{default(e){r=e}},0)},"pairs.js":function e(t,n,e){let r;function i(e){for(var t=r(e),n=t.length,i=Array(n),o=0;oi}),e.link("./keys.js",{default(e){r=e}},0)},"invert.js":function e(t,n,e){let r;function i(e){for(var t={},n=r(e),i=0,o=n.length;ii}),e.link("./keys.js",{default(e){r=e}},0)},"functions.js":function e(t,n,e){let r;function i(e){var t=[];for(var n in e)r(e[n])&&t.push(n);return t.sort()}e.export({default:()=>i}),e.link("./isFunction.js",{default(e){r=e}},0)},"extend.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./allKeys.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createAssigner.js":function e(t,n,e){function r(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;ir})},"extendOwn.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1),e.exportDefault(r(i))},"defaults.js":function e(t,n,e){let r,i;e.link("./_createAssigner.js",{default(e){r=e}},0),e.link("./allKeys.js",{default(e){i=e}},1),e.exportDefault(r(i,!0))},"create.js":function e(t,n,e){let r,i;function o(e,t){var n=r(e);return t&&i(n,t),n}e.export({default:()=>o}),e.link("./_baseCreate.js",{default(e){r=e}},0),e.link("./extendOwn.js",{default(e){i=e}},1)},"_baseCreate.js":function e(t,n,e){let r,i;function o(){return function(){}}function s(e){if(!r(e))return{};if(i)return i(e);var t=function(){};t.prototype=e;var n=new t;return t.prototype=null,n}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./_setup.js",{nativeCreate(e){i=e}},1)},"clone.js":function e(t,n,e){let r,i,o;function s(e){return r(e)?i(e)?e.slice():o({},e):e}e.export({default:()=>s}),e.link("./isObject.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),e.link("./extend.js",{default(e){o=e}},2)},"tap.js":function e(t,n,e){function r(e,t){return t(e),e}e.export({default:()=>r})},"get.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s=i(e,r(t));return o(s)?n:s}e.export({default:()=>s}),e.link("./_toPath.js",{default(e){r=e}},0),e.link("./_deepGet.js",{default(e){i=e}},1),e.link("./isUndefined.js",{default(e){o=e}},2)},"_toPath.js":function e(t,n,e){let r;function i(e){return r.toPath(e)}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./toPath.js")},"toPath.js":function e(t,n,e){let r,i;function o(e){return i(e)?e:[e]}e.export({default:()=>o}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./isArray.js",{default(e){i=e}},1),r.toPath=o},"_deepGet.js":function e(t,n,e){function r(e,t){for(var n=t.length,r=0;rr})},"has.js":function e(t,n,e){let r,i;function o(e,t){for(var n=(t=i(t)).length,o=0;oo}),e.link("./_has.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"mapObject.js":function e(t,n,e){let r,i;function o(e,t,n){t=r(t,n);for(var o=i(e),s=o.length,a={},u=0;uo}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"_cb.js":function e(t,n,e){let r,i,o;function s(e,t,n){return r.iteratee!==o?r.iteratee(e,t):i(e,t,n)}e.export({default:()=>s}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_baseIteratee.js",{default(e){i=e}},1),e.link("./iteratee.js",{default(e){o=e}},2)},"_baseIteratee.js":function e(t,n,e){let r,i,o,s,a,u,f;function c(e,t,n){return null==e?r:i(e)?f(e,t,n):o(e)&&!s(e)?a(e):u(e)}e.export({default:()=>c}),e.link("./identity.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./isObject.js",{default(e){o=e}},2),e.link("./isArray.js",{default(e){s=e}},3),e.link("./matcher.js",{default(e){a=e}},4),e.link("./property.js",{default(e){u=e}},5),e.link("./_optimizeCb.js",{default(e){f=e}},6)},"identity.js":function e(t,n,e){function r(e){return e}e.export({default:()=>r})},"matcher.js":function e(t,n,e){let r,i;function o(e){return e=r({},e),function(t){return i(t,e)}}e.export({default:()=>o}),e.link("./extendOwn.js",{default(e){r=e}},0),e.link("./isMatch.js",{default(e){i=e}},1)},"property.js":function e(t,n,e){let r,i;function o(e){return e=i(e),function(t){return r(t,e)}}e.export({default:()=>o}),e.link("./_deepGet.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"_optimizeCb.js":function e(t,n,e){function r(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}}e.export({default:()=>r})},"iteratee.js":function e(t,n,e){let r,i;function o(e,t){return i(e,t,1/0)}e.export({default:()=>o}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./_baseIteratee.js",{default(e){i=e}},1),r.iteratee=o},"noop.js":function e(t,n,e){function r(){}e.export({default:()=>r})},"propertyOf.js":function e(t,n,e){let r,i;function o(e){return null==e?r:function(t){return i(e,t)}}e.export({default:()=>o}),e.link("./noop.js",{default(e){r=e}},0),e.link("./get.js",{default(e){i=e}},1)},"times.js":function e(t,n,e){let r;function i(e,t,n){var i=Array(Math.max(0,e));t=r(t,n,1);for(var o=0;oi}),e.link("./_optimizeCb.js",{default(e){r=e}},0)},"random.js":function e(t,n,e){function r(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}e.export({default:()=>r})},"now.js":function e(t,n,e){e.exportDefault(Date.now||function(){return(new Date).getTime()})},"escape.js":function e(t,n,e){let r,i;e.link("./_createEscaper.js",{default(e){r=e}},0),e.link("./_escapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_createEscaper.js":function e(t,n,e){let r;function i(e){var t=function(t){return e[t]},n="(?:"+r(e).join("|")+")",i=RegExp(n),o=RegExp(n,"g");return function(e){return e=null==e?"":""+e,i.test(e)?e.replace(o,t):e}}e.export({default:()=>i}),e.link("./keys.js",{default(e){r=e}},0)},"_escapeMap.js":function e(t,n,e){e.exportDefault({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"})},"unescape.js":function e(t,n,e){let r,i;e.link("./_createEscaper.js",{default(e){r=e}},0),e.link("./_unescapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"_unescapeMap.js":function e(t,n,e){let r,i;e.link("./invert.js",{default(e){r=e}},0),e.link("./_escapeMap.js",{default(e){i=e}},1),e.exportDefault(r(i))},"templateSettings.js":function e(t,n,e){let r;e.link("./underscore.js",{default(e){r=e}},0),e.exportDefault(r.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g})},"template.js":function e(t,n,e){let r,i;e.export({default:()=>c}),e.link("./defaults.js",{default(e){r=e}},0),e.link("./underscore.js",{default(e){i=e}},1),e.link("./templateSettings.js");var o=/(.)^/,s={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},a=/\\|'|\r|\n|\u2028|\u2029/g;function u(e){return"\\"+s[e]}var f=/^\s*(\w|\$)+\s*$/;function c(e,t,n){!t&&n&&(t=n),t=r({},t,i.templateSettings);var s=RegExp([(t.escape||o).source,(t.interpolate||o).source,(t.evaluate||o).source].join("|")+"|$","g"),c=0,l="__p+='";e.replace(s,(function(t,n,r,i,o){return l+=e.slice(c,o).replace(a,u),c=o+t.length,n?l+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?l+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(l+="';\n"+i+"\n__p+='"),t})),l+="';\n";var h=t.variable,d;if(h){if(!f.test(h))throw new Error("variable is not a bare identifier: "+h)}else l="with(obj||{}){\n"+l+"}\n",h="obj";l="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+l+"return __p;\n";try{d=new Function(h,"_",l)}catch(g){throw g.source=l,g}var p=function(e){return d.call(this,e,i)};return p.source="function("+h+"){\n"+l+"}",p}},"result.js":function e(t,n,e){let r,i;function o(e,t,n){var o=(t=i(t)).length;if(!o)return r(n)?n.call(e):n;for(var s=0;so}),e.link("./isFunction.js",{default(e){r=e}},0),e.link("./_toPath.js",{default(e){i=e}},1)},"uniqueId.js":function e(t,n,e){e.export({default:()=>i});var r=0;function i(e){var t=++r+"";return e?e+t:t}},"chain.js":function e(t,n,e){let r;function i(e){var t=r(e);return t._chain=!0,t}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0)},"partial.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_executeBound.js",{default(e){i=e}},1),e.link("./underscore.js",{default(e){o=e}},2);var s=r((function(e,t){var n=s.placeholder,r=function(){for(var o=0,s=t.length,a=Array(s),u=0;uo}),e.link("./_baseCreate.js",{default(e){r=e}},0),e.link("./isObject.js",{default(e){i=e}},1)},"bind.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./_executeBound.js",{default(e){o=e}},2),e.exportDefault(r((function(e,t,n){if(!i(e))throw new TypeError("Bind must be called on a function");var s=r((function(r){return o(e,s,t,this,n.concat(r))}));return s})))},"bindAll.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_flatten.js",{default(e){i=e}},1),e.link("./bind.js",{default(e){o=e}},2),e.exportDefault(r((function(e,t){var n=(t=i(t,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=o(e[r],e)}return e})))},"_flatten.js":function e(t,n,e){let r,i,o,s;function a(e,t,n,u){if(u=u||[],t||0===t){if(t<=0)return u.concat(e)}else t=1/0;for(var f=u.length,c=0,l=r(e);c1)a(h,t-1,n,u),f=u.length;else for(var d=0,p=h.length;da}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./isArray.js",{default(e){o=e}},2),e.link("./isArguments.js",{default(e){s=e}},3)},"_isArrayLike.js":function e(t,n,e){let r,i;e.link("./_createSizePropertyCheck.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1),e.exportDefault(r(i))},"memoize.js":function e(t,n,e){let r;function i(e,t){var n=function(i){var o=n.cache,s=""+(t?t.apply(this,arguments):i);return r(o,s)||(o[s]=e.apply(this,arguments)),o[s]};return n.cache={},n}e.export({default:()=>i}),e.link("./_has.js",{default(e){r=e}},0)},"delay.js":function e(t,n,e){let r;e.link("./restArguments.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})))},"defer.js":function e(t,n,e){let r,i,o;e.link("./partial.js",{default(e){r=e}},0),e.link("./delay.js",{default(e){i=e}},1),e.link("./underscore.js",{default(e){o=e}},2),e.exportDefault(r(i,o,1))},"throttle.js":function e(t,n,e){let r;function i(e,t,n){var i,o,s,a,u=0;n||(n={});var f=function(){u=!1===n.leading?0:r(),i=null,a=e.apply(o,s),i||(o=s=null)},c=function(){var c=r();u||!1!==n.leading||(u=c);var l=t-(c-u);return o=this,s=arguments,l<=0||l>t?(i&&(clearTimeout(i),i=null),u=c,a=e.apply(o,s),i||(o=s=null)):i||!1===n.trailing||(i=setTimeout(f,l)),a};return c.cancel=function(){clearTimeout(i),u=0,i=o=s=null},c}e.export({default:()=>i}),e.link("./now.js",{default(e){r=e}},0)},"debounce.js":function e(t,n,e){let r,i;function o(e,t,n){var o,s,a,u,f,c=function(){var r=i()-s;t>r?o=setTimeout(c,t-r):(o=null,n||(u=e.apply(f,a)),o||(a=f=null))},l=r((function(r){return f=this,a=r,s=i(),o||(o=setTimeout(c,t),n&&(u=e.apply(f,a))),u}));return l.cancel=function(){clearTimeout(o),o=a=f=null},l}e.export({default:()=>o}),e.link("./restArguments.js",{default(e){r=e}},0),e.link("./now.js",{default(e){i=e}},1)},"wrap.js":function e(t,n,e){let r;function i(e,t){return r(t,e)}e.export({default:()=>i}),e.link("./partial.js",{default(e){r=e}},0)},"negate.js":function e(t,n,e){function r(e){return function(){return!e.apply(this,arguments)}}e.export({default:()=>r})},"compose.js":function e(t,n,e){function r(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}e.export({default:()=>r})},"after.js":function e(t,n,e){function r(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}e.export({default:()=>r})},"before.js":function e(t,n,e){function r(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}e.export({default:()=>r})},"once.js":function e(t,n,e){let r,i;e.link("./partial.js",{default(e){r=e}},0),e.link("./before.js",{default(e){i=e}},1),e.exportDefault(r(i,2))},"findKey.js":function e(t,n,e){let r,i;function o(e,t,n){t=r(t,n);for(var o=i(e),s,a=0,u=o.length;ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"findIndex.js":function e(t,n,e){let r;e.link("./_createPredicateIndexFinder.js",{default(e){r=e}},0),e.exportDefault(r(1))},"_createPredicateIndexFinder.js":function e(t,n,e){let r,i;function o(e){return function(t,n,o){n=r(n,o);for(var s=i(t),a=e>0?0:s-1;a>=0&&ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1)},"findLastIndex.js":function e(t,n,e){let r;e.link("./_createPredicateIndexFinder.js",{default(e){r=e}},0),e.exportDefault(r(-1))},"sortedIndex.js":function e(t,n,e){let r,i;function o(e,t,n,o){for(var s=(n=r(n,o,1))(t),a=0,u=i(e);ao}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1)},"indexOf.js":function e(t,n,e){let r,i,o;e.link("./sortedIndex.js",{default(e){r=e}},0),e.link("./findIndex.js",{default(e){i=e}},1),e.link("./_createIndexFinder.js",{default(e){o=e}},2),e.exportDefault(o(1,i,r))},"_createIndexFinder.js":function e(t,n,e){let r,i,o;function s(e,t,n){return function(s,a,u){var f=0,c=r(s);if("number"==typeof u)e>0?f=u>=0?u:Math.max(u+c,f):c=u>=0?Math.min(u+1,c):u+c+1;else if(n&&u&&c)return s[u=n(s,a)]===a?u:-1;if(a!=a)return(u=t(i.call(s,f,c),o))>=0?u+f:-1;for(u=e>0?f:c-1;u>=0&&us}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./_setup.js",{slice(e){i=e}},1),e.link("./isNaN.js",{default(e){o=e}},2)},"lastIndexOf.js":function e(t,n,e){let r,i;e.link("./findLastIndex.js",{default(e){r=e}},0),e.link("./_createIndexFinder.js",{default(e){i=e}},1),e.exportDefault(i(-1,r))},"find.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s,a=(r(e)?i:o)(e,t,n);if(void 0!==a&&-1!==a)return e[a]}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./findIndex.js",{default(e){i=e}},1),e.link("./findKey.js",{default(e){o=e}},2)},"findWhere.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./find.js",{default(e){r=e}},0),e.link("./matcher.js",{default(e){i=e}},1)},"each.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s,a;if(t=r(t,n),i(e))for(s=0,a=e.length;ss}),e.link("./_optimizeCb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"map.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=Array(a),f=0;fs}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"reduce.js":function e(t,n,e){let r;e.link("./_createReduce.js",{default(e){r=e}},0),e.exportDefault(r(1))},"_createReduce.js":function e(t,n,e){let r,i,o;function s(e){var t=function(t,n,o,s){var a=!r(t)&&i(t),u=(a||t).length,f=e>0?0:u-1;for(s||(o=t[a?a[f]:f],f+=e);f>=0&&f=3;return t(e,o(n,i,4),r,s)}}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1),e.link("./_optimizeCb.js",{default(e){o=e}},2)},"reduceRight.js":function e(t,n,e){let r;e.link("./_createReduce.js",{default(e){r=e}},0),e.exportDefault(r(-1))},"filter.js":function e(t,n,e){let r,i;function o(e,t,n){var o=[];return t=r(t,n),i(e,(function(e,n,r){t(e,n,r)&&o.push(e)})),o}e.export({default:()=>o}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1)},"reject.js":function e(t,n,e){let r,i,o;function s(e,t,n){return r(e,i(o(t)),n)}e.export({default:()=>s}),e.link("./filter.js",{default(e){r=e}},0),e.link("./negate.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2)},"every.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=0;us}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"some.js":function e(t,n,e){let r,i,o;function s(e,t,n){t=r(t,n);for(var s=!i(e)&&o(e),a=(s||e).length,u=0;us}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./_isArrayLike.js",{default(e){i=e}},1),e.link("./keys.js",{default(e){o=e}},2)},"contains.js":function e(t,n,e){let r,i,o;function s(e,t,n,s){return r(e)||(e=i(e)),("number"!=typeof n||s)&&(n=0),o(e,t,n)>=0}e.export({default:()=>s}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./indexOf.js",{default(e){o=e}},2)},"invoke.js":function e(t,n,e){let r,i,o,s,a;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./map.js",{default(e){o=e}},2),e.link("./_deepGet.js",{default(e){s=e}},3),e.link("./_toPath.js",{default(e){a=e}},4),e.exportDefault(r((function(e,t,n){var r,u;return i(t)?u=t:(t=a(t),r=t.slice(0,-1),t=t[t.length-1]),o(e,(function(e){var i=u;if(!i){if(r&&r.length&&(e=s(e,r)),null==e)return;i=e[t]}return null==i?i:i.apply(e,n)}))})))},"pluck.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./map.js",{default(e){r=e}},0),e.link("./property.js",{default(e){i=e}},1)},"where.js":function e(t,n,e){let r,i;function o(e,t){return r(e,i(t))}e.export({default:()=>o}),e.link("./filter.js",{default(e){r=e}},0),e.link("./matcher.js",{default(e){i=e}},1)},"max.js":function e(t,n,e){let r,i,o,s;function a(e,t,n){var a=-1/0,u=-1/0,f,c;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var l=0,h=(e=r(e)?e:i(e)).length;la&&(a=f);else t=o(t,n),s(e,(function(e,n,r){((c=t(e,n,r))>u||c===-1/0&&a===-1/0)&&(a=e,u=c)}));return a}e.export({default:()=>a}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2),e.link("./each.js",{default(e){s=e}},3)},"min.js":function e(t,n,e){let r,i,o,s;function a(e,t,n){var a=1/0,u=1/0,f,c;if(null==t||"number"==typeof t&&"object"!=typeof e[0]&&null!=e)for(var l=0,h=(e=r(e)?e:i(e)).length;la}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_cb.js",{default(e){o=e}},2),e.link("./each.js",{default(e){s=e}},3)},"shuffle.js":function e(t,n,e){let r;function i(e){return r(e,1/0)}e.export({default:()=>i}),e.link("./sample.js",{default(e){r=e}},0)},"sample.js":function e(t,n,e){let r,i,o,s,a;function u(e,t,n){if(null==t||n)return r(e)||(e=i(e)),e[s(e.length-1)];var u=a(e),f=o(u);t=Math.max(Math.min(t,f),0);for(var c=f-1,l=0;lu}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./values.js",{default(e){i=e}},1),e.link("./_getLength.js",{default(e){o=e}},2),e.link("./random.js",{default(e){s=e}},3),e.link("./toArray.js",{default(e){a=e}},4)},"toArray.js":function e(t,n,e){let r,i,o,s,a,u,f;e.export({default:()=>l}),e.link("./isArray.js",{default(e){r=e}},0),e.link("./_setup.js",{slice(e){i=e}},1),e.link("./isString.js",{default(e){o=e}},2),e.link("./_isArrayLike.js",{default(e){s=e}},3),e.link("./map.js",{default(e){a=e}},4),e.link("./identity.js",{default(e){u=e}},5),e.link("./values.js",{default(e){f=e}},6);var c=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function l(e){return e?r(e)?i.call(e):o(e)?e.match(c):s(e)?a(e,u):f(e):[]}},"sortBy.js":function e(t,n,e){let r,i,o;function s(e,t,n){var s=0;return t=r(t,n),i(o(e,(function(e,n,r){return{value:e,index:s++,criteria:t(e,n,r)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(ns}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./pluck.js",{default(e){i=e}},1),e.link("./map.js",{default(e){o=e}},2)},"groupBy.js":function e(t,n,e){let r,i;e.link("./_group.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t,n){i(e,n)?e[n].push(t):e[n]=[t]})))},"_group.js":function e(t,n,e){let r,i;function o(e,t){return function(n,o,s){var a=t?[[],[]]:{};return o=r(o,s),i(n,(function(t,r){var i=o(t,r,n);e(a,t,i)})),a}}e.export({default:()=>o}),e.link("./_cb.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1)},"indexBy.js":function e(t,n,e){let r;e.link("./_group.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){e[n]=t})))},"countBy.js":function e(t,n,e){let r,i;e.link("./_group.js",{default(e){r=e}},0),e.link("./_has.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t,n){i(e,n)?e[n]++:e[n]=1})))},"partition.js":function e(t,n,e){let r;e.link("./_group.js",{default(e){r=e}},0),e.exportDefault(r((function(e,t,n){e[n?0:1].push(t)}),!0))},"size.js":function e(t,n,e){let r,i;function o(e){return null==e?0:r(e)?e.length:i(e).length}e.export({default:()=>o}),e.link("./_isArrayLike.js",{default(e){r=e}},0),e.link("./keys.js",{default(e){i=e}},1)},"pick.js":function e(t,n,e){let r,i,o,s,a,u;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./_optimizeCb.js",{default(e){o=e}},2),e.link("./allKeys.js",{default(e){s=e}},3),e.link("./_keyInObj.js",{default(e){a=e}},4),e.link("./_flatten.js",{default(e){u=e}},5),e.exportDefault(r((function(e,t){var n={},r=t[0];if(null==e)return n;i(r)?(t.length>1&&(r=o(r,t[1])),t=s(e)):(r=a,t=u(t,!1,!1),e=Object(e));for(var f=0,c=t.length;fr})},"omit.js":function e(t,n,e){let r,i,o,s,a,u,f;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./isFunction.js",{default(e){i=e}},1),e.link("./negate.js",{default(e){o=e}},2),e.link("./map.js",{default(e){s=e}},3),e.link("./_flatten.js",{default(e){a=e}},4),e.link("./contains.js",{default(e){u=e}},5),e.link("./pick.js",{default(e){f=e}},6),e.exportDefault(r((function(e,t){var n=t[0],r;return i(n)?(n=o(n),t.length>1&&(r=t[1])):(t=s(a(t,!1,!1),String),n=function(e,n){return!u(t,n)}),f(e,n,r)})))},"first.js":function e(t,n,e){let r;function i(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:r(e,e.length-t)}e.export({default:()=>i}),e.link("./initial.js",{default(e){r=e}},0)},"initial.js":function e(t,n,e){let r;function i(e,t,n){return r.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}e.export({default:()=>i}),e.link("./_setup.js",{slice(e){r=e}},0)},"last.js":function e(t,n,e){let r;function i(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:r(e,Math.max(0,e.length-t))}e.export({default:()=>i}),e.link("./rest.js",{default(e){r=e}},0)},"rest.js":function e(t,n,e){let r;function i(e,t,n){return r.call(e,null==t||n?1:t)}e.export({default:()=>i}),e.link("./_setup.js",{slice(e){r=e}},0)},"compact.js":function e(t,n,e){let r;function i(e){return r(e,Boolean)}e.export({default:()=>i}),e.link("./filter.js",{default(e){r=e}},0)},"flatten.js":function e(t,n,e){let r;function i(e,t){return r(e,t,!1)}e.export({default:()=>i}),e.link("./_flatten.js",{default(e){r=e}},0)},"without.js":function e(t,n,e){let r,i;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./difference.js",{default(e){i=e}},1),e.exportDefault(r((function(e,t){return i(e,t)})))},"difference.js":function e(t,n,e){let r,i,o,s;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./_flatten.js",{default(e){i=e}},1),e.link("./filter.js",{default(e){o=e}},2),e.link("./contains.js",{default(e){s=e}},3),e.exportDefault(r((function(e,t){return t=i(t,!0,!0),o(e,(function(e){return!s(t,e)}))})))},"uniq.js":function e(t,n,e){let r,i,o,s;function a(e,t,n,a){r(t)||(a=n,n=t,t=!1),null!=n&&(n=i(n,a));for(var u=[],f=[],c=0,l=o(e);ca}),e.link("./isBoolean.js",{default(e){r=e}},0),e.link("./_cb.js",{default(e){i=e}},1),e.link("./_getLength.js",{default(e){o=e}},2),e.link("./contains.js",{default(e){s=e}},3)},"union.js":function e(t,n,e){let r,i,o;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./uniq.js",{default(e){i=e}},1),e.link("./_flatten.js",{default(e){o=e}},2),e.exportDefault(r((function(e){return i(o(e,!0,!0))})))},"intersection.js":function e(t,n,e){let r,i;function o(e){for(var t=[],n=arguments.length,o=0,s=r(e);oo}),e.link("./_getLength.js",{default(e){r=e}},0),e.link("./contains.js",{default(e){i=e}},1)},"unzip.js":function e(t,n,e){let r,i,o;function s(e){for(var t=e&&r(e,i).length||0,n=Array(t),s=0;ss}),e.link("./max.js",{default(e){r=e}},0),e.link("./_getLength.js",{default(e){i=e}},1),e.link("./pluck.js",{default(e){o=e}},2)},"zip.js":function e(t,n,e){let r,i;e.link("./restArguments.js",{default(e){r=e}},0),e.link("./unzip.js",{default(e){i=e}},1),e.exportDefault(r(i))},"object.js":function e(t,n,e){let r;function i(e,t){for(var n={},i=0,o=r(e);ii}),e.link("./_getLength.js",{default(e){r=e}},0)},"range.js":function e(t,n,e){function r(e,t,n){null==t&&(t=e||0,e=0),n||(n=tr})},"chunk.js":function e(t,n,e){let r;function i(e,t){if(null==t||t<1)return[];for(var n=[],i=0,o=e.length;ii}),e.link("./_setup.js",{slice(e){r=e}},0)},"mixin.js":function e(t,n,e){let r,i,o,s,a;function u(e){return i(o(e),(function(t){var n=r[t]=e[t];r.prototype[t]=function(){var e=[this._wrapped];return s.apply(e,arguments),a(this,n.apply(r,e))}})),r}e.export({default:()=>u}),e.link("./underscore.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1),e.link("./functions.js",{default(e){o=e}},2),e.link("./_setup.js",{push(e){s=e}},3),e.link("./_chainResult.js",{default(e){a=e}},4)},"_chainResult.js":function e(t,n,e){let r;function i(e,t){return e._chain?r(t).chain():t}e.export({default:()=>i}),e.link("./underscore.js",{default(e){r=e}},0)},"underscore-array-methods.js":function e(t,n,e){let r,i,o,s;e.link("./underscore.js",{default(e){r=e}},0),e.link("./each.js",{default(e){i=e}},1),e.link("./_setup.js",{ArrayProto(e){o=e}},2),e.link("./_chainResult.js",{default(e){s=e}},3),i(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=o[e];r.prototype[e]=function(){var n=this._wrapped;return null!=n&&(t.apply(n,arguments),"shift"!==e&&"splice"!==e||0!==n.length||delete n[0]),s(this,n)}})),i(["concat","join","slice"],(function(e){var t=o[e];r.prototype[e]=function(){var e=this._wrapped;return null!=e&&(e=t.apply(e,arguments)),s(this,e)}})),e.exportDefault(r)}}}}},cachers:{"package.json":function e(t,n,e){e.exports={name:"@steedos/cachers",version:"2.5.15-beta.14",main:"lib/index.js"}},lib:{"index.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getCacherNames=n.clearCacher=n.getCacher=void 0;var r={},i=t("./memory"),o=t("./memory-lru"),s=function(e,t){return r[e]||(e.startsWith("lru.")?r[e]=new o.MemoryLRUCacher(t):r[e]=new i.MemoryCacher),r[e]};n.getCacher=s;var a=function(e){r[e]&&r[e].clear()};n.clearCacher=a;var u=function(){return Object.keys(r)};n.getCacherNames=u},"memory.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryCacher=void 0;var r=t("lodash"),i=function(){function e(){this.cache={}}return e.prototype.get=function(e){return this.cache[e]},e.prototype.delete=function(e){delete this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.clear=function(){this.cache={}},e.prototype.keys=function(){return(0,r.keys)(this.cache)},e.prototype.values=function(){return(0,r.values)(this.cache)},e}();n.MemoryCacher=i},"memory-lru.js":function e(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MemoryLRUCacher=void 0;var r=t("lodash"),i=t("lru-cache"),o={max:5e3,ttl:null,keygen:null,maxParamsLength:null},s=function(){function e(e){this.opts=(0,r.defaultsDeep)(e,o),this.cache=new i({max:this.opts.max,maxAge:this.opts.ttl?1e3*this.opts.ttl:null,updateAgeOnGet:!!this.opts.ttl})}return e.prototype.get=function(e){return this.cache.get(e)},e.prototype.set=function(e,t,n){return this.cache.set(e,t,n)},e.prototype.delete=function(e){return this.cache.delete(e)},e.prototype.clear=function(){return this.cache.clear()},e.prototype.keys=function(){return this.cache.keys()},e.prototype.values=function(){return this.cache.values()},e}();n.MemoryLRUCacher=s}},node_modules:{"lru-cache":{"package.json":function e(t,n,e){e.exports={name:"lru-cache",version:"7.14.1",main:"index.js"}},"index.js":function e(t,n,e){const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,i="function"==typeof AbortController,o=i?AbortController:class e{constructor(){this.signal=new u}abort(){this.signal.dispatchEvent("abort")}},s="function"==typeof AbortSignal,a="function"==typeof o.AbortSignal,u=s?AbortSignal:a?o.AbortController:class e{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(e){if("abort"===e){this.aborted=!0;const t={type:e,target:this};this.onabort(t),this._listeners.forEach(e=>e(t),this)}}onabort(){}addEventListener(e,t){"abort"===e&&this._listeners.push(t)}removeEventListener(e,t){"abort"===e&&(this._listeners=this._listeners.filter(e=>e!==t))}},f=new Set,c=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;p(n)&&g(n,`${e} option`,`options.${t}`,_)},l=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(p(n)){const{prototype:r}=_,{get:i}=Object.getOwnPropertyDescriptor(r,e);g(n,`${e} method`,`cache.${t}()`,i)}},h=(e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(p(n)){const{prototype:r}=_,{get:i}=Object.getOwnPropertyDescriptor(r,e);g(n,`${e} property`,`cache.${t}`,i)}},d=(...e)=>{"object"==typeof process&&process&&"function"==typeof process.emitWarning?process.emitWarning(...e):console.error(...e)},p=e=>!f.has(e),g=(e,t,n,r)=>{f.add(e);const i=`The ${t} is deprecated. Please use ${n} instead.`;d(i,"DeprecationWarning",e,r)},b=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),m=e=>b(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?v:null:null;class v extends Array{constructor(e){super(e),this.fill(0)}}class y{constructor(e){if(0===e)return[];const t=m(e);this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class _{constructor(e={}){const{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:s,allowStale:a,dispose:u,disposeAfter:l,noDisposeOnSet:h,noUpdateTTL:g,maxSize:v=0,maxEntrySize:w=0,sizeCalculation:k,fetchMethod:j,fetchContext:x,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:D}=e,{length:E,maxAge:A,stale:C}=e instanceof _?{}:e;if(0!==t&&!b(t))throw new TypeError("max option must be a nonnegative integer");const M=t?m(t):Array;if(!M)throw new Error("invalid max value: "+t);if(this.max=t,this.maxSize=v,this.maxEntrySize=w||this.maxSize,this.sizeCalculation=k||E,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=j||null,this.fetchMethod&&"function"!=typeof this.fetchMethod)throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=x,!this.fetchMethod&&void 0!==x)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(t).fill(null),this.valList=new Array(t).fill(null),this.next=new M(t),this.prev=new M(t),this.head=0,this.tail=0,this.free=new y(t),this.initialFill=1,this.size=0,"function"==typeof u&&(this.dispose=u),"function"==typeof l?(this.disposeAfter=l,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!h,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!S,0!==this.maxEntrySize){if(0!==this.maxSize&&!b(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!b(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!a||!!C,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!s,this.ttlResolution=b(r)||0===r?r:1,this.ttlAutopurge=!!i,this.ttl=n||A||0,this.ttl){if(!b(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(0===this.max&&0===this.ttl&&0===this.maxSize)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const e="LRU_CACHE_UNBOUNDED";if(p(e)){f.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";d(t,"UnboundedCacheWarning",e,_)}}C&&c("stale","allowStale"),A&&c("maxAge","ttl"),E&&c("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new v(this.max),this.starts=new v(this.max),this.setItemTTL=(e,t,n=r.now())=>{if(this.starts[e]=0!==t?n:0,this.ttls[e]=t,0!==t&&this.ttlAutopurge){const n=setTimeout(()=>{this.isStale(e)&&this.delete(this.keyList[e])},t+1);n.unref&&n.unref()}},this.updateItemAge=e=>{this.starts[e]=0!==this.ttls[e]?r.now():0};let e=0;const t=()=>{const t=r.now();if(this.ttlResolution>0){e=t;const n=setTimeout(()=>e=0,this.ttlResolution);n.unref&&n.unref()}return t};this.getRemainingTTL=n=>{const r=this.keyMap.get(n);return void 0===r?0:0===this.ttls[r]||0===this.starts[r]?1/0:this.starts[r]+this.ttls[r]-(e||t())},this.isStale=n=>0!==this.ttls[n]&&0!==this.starts[n]&&(e||t())-this.starts[n]>this.ttls[n]}updateItemAge(e){}setItemTTL(e,t,n){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new v(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,t,n,r)=>{if(this.isBackgroundFetch(t))return 0;if(!b(n)){if(!r)throw new TypeError("invalid size value (must be positive integer)");if("function"!=typeof r)throw new TypeError("sizeCalculation must be a function");if(n=r(t,e),!b(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.addItemSize=(e,t)=>{if(this.sizes[e]=t,this.maxSize){const t=this.maxSize-this.sizes[e];for(;this.calculatedSize>t;)this.evict(!0)}this.calculatedSize+=this.sizes[e]}}removeItemSize(e){}addItemSize(e,t){}requireSize(e,t,n,r){if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.tail;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.head);)t=this.prev[t]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let t=this.head;this.isValidIndex(t)&&(!e&&this.isStale(t)||(yield t),t!==this.tail);)t=this.next[t]}isValidIndex(e){return this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())yield[this.keyList[e],this.valList[e]]}*rentries(){for(const e of this.rindexes())yield[this.keyList[e],this.valList[e]]}*keys(){for(const e of this.indexes())yield this.keyList[e]}*rkeys(){for(const e of this.rindexes())yield this.keyList[e]}*values(){for(const e of this.indexes())yield this.valList[e]}*rvalues(){for(const e of this.rindexes())yield this.valList[e]}[Symbol.iterator](){return this.entries()}find(e,t={}){for(const n of this.indexes())if(e(this.valList[n],this.keyList[n],this))return this.get(this.keyList[n],t)}forEach(e,t=this){for(const n of this.indexes())e.call(t,this.valList[n],this.keyList[n],this)}rforEach(e,t=this){for(const n of this.rindexes())e.call(t,this.valList[n],this.keyList[n],this)}get prune(){return l("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const t of this.rindexes({allowStale:!0}))this.isStale(t)&&(this.delete(this.keyList[t]),e=!0);return e}dump(){const e=[];for(const t of this.indexes({allowStale:!0})){const n=this.keyList[t],i=this.valList[t],o=this.isBackgroundFetch(i)?i.__staleWhileFetching:i,s={value:o};if(this.ttls){s.ttl=this.ttls[t];const e=r.now()-this.starts[t];s.start=Math.floor(Date.now()-e)}this.sizes&&(s.size=this.sizes[t]),e.unshift([n,s])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}dispose(e,t,n){}set(e,t,{ttl:n=this.ttl,start:r,noDisposeOnSet:i=this.noDisposeOnSet,size:o=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL}={}){if(o=this.requireSize(e,t,o,s),this.maxEntrySize&&o>this.maxEntrySize)return this.delete(e),this;let u=0===this.size?void 0:this.keyMap.get(e);if(void 0===u)u=this.newIndex(),this.keyList[u]=e,this.valList[u]=t,this.keyMap.set(e,u),this.next[this.tail]=u,this.prev[u]=this.tail,this.tail=u,this.size++,this.addItemSize(u,o),a=!1;else{const n=this.valList[u];t!==n&&(this.isBackgroundFetch(n)?n.__abortController.abort():i||(this.dispose(n,e,"set"),this.disposeAfter&&this.disposed.push([n,e,"set"])),this.removeItemSize(u),this.valList[u]=t,this.addItemSize(u,o)),this.moveToTail(u)}if(0===n||0!==this.ttl||this.ttls||this.initializeTTLTracking(),a||this.setItemTTL(u,n,r),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return 0===this.size?this.tail:this.size===this.max&&0!==this.max?this.evict(!1):0!==this.free.length?this.free.pop():this.initialFill++}pop(){if(this.size){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const t=this.head,n=this.keyList[t],r=this.valList[t];return this.isBackgroundFetch(r)?r.__abortController.abort():(this.dispose(r,n,"evict"),this.disposeAfter&&this.disposed.push([r,n,"evict"])),this.removeItemSize(t),e&&(this.keyList[t]=null,this.valList[t]=null,this.free.push(t)),this.head=this.next[t],this.keyMap.delete(n),this.size--,t}has(e,{updateAgeOnHas:t=this.updateAgeOnHas}={}){const n=this.keyMap.get(e);return void 0!==n&&!this.isStale(n)&&(t&&this.updateItemAge(n),!0)}peek(e,{allowStale:t=this.allowStale}={}){const n=this.keyMap.get(e);if(void 0!==n&&(t||!this.isStale(n))){const e=this.valList[n];return this.isBackgroundFetch(e)?e.__staleWhileFetching:e}}backgroundFetch(e,t,n,r){const i=void 0===t?void 0:this.valList[t];if(this.isBackgroundFetch(i))return i;const s=new o,a={signal:s.signal,options:n,context:r},u=t=>(s.signal.aborted||this.set(e,t,a.options),t),f=r=>{if(this.valList[t]===l){const r=!n.noDeleteOnFetchRejection||void 0===l.__staleWhileFetching;r?this.delete(e):this.valList[t]=l.__staleWhileFetching}if(l.__returned===l)throw r},c=t=>t(this.fetchMethod(e,i,a)),l=new Promise(c).then(u,f);return l.__abortController=s,l.__staleWhileFetching=i,l.__returned=null,void 0===t?(this.set(e,l,a.options),t=this.keyMap.get(e)):this.valList[t]=l,l}isBackgroundFetch(e){return e&&"object"==typeof e&&"function"==typeof e.then&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||null===e.__returned)}async fetch(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:i=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,fetchContext:c=this.fetchContext,forceRefresh:l=!1}={}){if(!this.fetchMethod)return this.get(e,{allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r});const h={allowStale:t,updateAgeOnGet:n,noDeleteOnStaleGet:r,ttl:i,noDisposeOnSet:o,size:s,sizeCalculation:a,noUpdateTTL:u,noDeleteOnFetchRejection:f};let d=this.keyMap.get(e);if(void 0===d){const t=this.backgroundFetch(e,d,h,c);return t.__returned=t}{const r=this.valList[d];if(this.isBackgroundFetch(r))return t&&void 0!==r.__staleWhileFetching?r.__staleWhileFetching:r.__returned=r;if(!l&&!this.isStale(d))return this.moveToTail(d),n&&this.updateItemAge(d),r;const i=this.backgroundFetch(e,d,h,c);return t&&void 0!==i.__staleWhileFetching?i.__staleWhileFetching:i.__returned=i}}get(e,{allowStale:t=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet}={}){const i=this.keyMap.get(e);if(void 0!==i){const o=this.valList[i],s=this.isBackgroundFetch(o);if(this.isStale(i))return s?t?o.__staleWhileFetching:void 0:(r||this.delete(e),t?o:void 0);if(s)return;return this.moveToTail(i),n&&this.updateItemAge(i),o}}connect(e,t){this.prev[t]=e,this.next[e]=t}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return l("del","delete"),this.delete}delete(e){let t=!1;if(0!==this.size){const n=this.keyMap.get(e);if(void 0!==n)if(t=!0,1===this.size)this.clear();else{this.removeItemSize(n);const t=this.valList[n];this.isBackgroundFetch(t)?t.__abortController.abort():(this.dispose(t,e,"delete"),this.disposeAfter&&this.disposed.push([t,e,"delete"])),this.keyMap.delete(e),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return t}clear(){for(const e of this.rindexes({allowStale:!0})){const t=this.valList[e];if(this.isBackgroundFetch(t))t.__abortController.abort();else{const n=this.keyList[e];this.dispose(t,n,"delete"),this.disposeAfter&&this.disposed.push([t,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return l("reset","clear"),this.clear}get length(){return h("length","size"),this.size}static get AbortController(){return o}static get AbortSignal(){return u}}e.exports=_}}}}},tslib:{"package.json":function e(t,n,e){e.exports={name:"tslib",version:"2.3.1",module:"tslib.es6.js",main:"tslib.js"}},"tslib.es6.js":function e(t,n,e){e.export({__extends:()=>i,__assign:()=>o,__rest:()=>s,__decorate:()=>a,__param:()=>u,__metadata:()=>f,__awaiter:()=>c,__generator:()=>l,__createBinding:()=>h,__exportStar:()=>d,__values:()=>p,__read:()=>g,__spread:()=>b,__spreadArrays:()=>m,__spreadArray:()=>v,__await:()=>y,__asyncGenerator:()=>_,__asyncDelegator:()=>w,__asyncValues:()=>k,__makeTemplateObject:()=>j,__importStar:()=>S,__importDefault:()=>D,__classPrivateFieldGet:()=>E,__classPrivateFieldSet:()=>A}); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. @@ -706,7 +706,7 @@ var r,a;r=this,a=function(t){var e=function(){"use strict";return{isMsie:functio */ var r,a;r=this,a=function(t){var e=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(t){return!t||/^\s*$/.test(t)},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isArray:t.isArray,isFunction:t.isFunction,isObject:t.isPlainObject,isUndefined:function(t){return void 0===t},isElement:function(t){return!(!t||1!==t.nodeType)},isJQuery:function(e){return e instanceof t},toStr:function t(n){return e.isUndefined(n)||null===n?"":n+""},bind:t.proxy,each:function(e,n){function i(t,e){return n(e,t)}t.each(e,i)},map:t.map,filter:t.grep,every:function(e,n){var i=!0;return e?(t.each(e,(function(t,r){if(!(i=n.call(null,r,t,e)))return!1})),!!i):i},some:function(e,n){var i=!1;return e?(t.each(e,(function(t,r){if(i=n.call(null,r,t,e))return!1})),!!i):i},mixin:t.extend,identity:function(t){return t},clone:function(e){return t.extend(!0,{},e)},getIdGenerator:function(){var t=0;return function(){return t++}},templatify:function e(n){return t.isFunction(n)?n:i;function i(){return String(n)}},defer:function(t){setTimeout(t,0)},debounce:function(t,e,n){var i,r;return function(){var a=this,o=arguments,s,u;return s=function(){i=null,n||(r=t.apply(a,o))},u=n&&!i,clearTimeout(i),i=setTimeout(s,e),u&&(r=t.apply(a,o)),r}},throttle:function(t,e){var n,i,r,a,o,s;return o=0,s=function(){o=new Date,r=null,a=t.apply(n,i)},function(){var u=new Date,l=e-(u-o);return n=this,i=arguments,l<=0?(clearTimeout(r),r=null,o=u,a=t.apply(n,i)):r||(r=setTimeout(s,l)),a}},stringify:function(t){return e.isString(t)?t:JSON.stringify(t)},noop:function(){}}}(),n=function(){"use strict";var t={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return n;function n(n){var o,s;return s=e.mixin({},t,n),{css:(o={css:a(),classes:s,html:i(s),selectors:r(s)}).css,html:o.html,classes:o.classes,selectors:o.selectors,mixin:function(t){e.mixin(t,o)}}}function i(t){return{wrapper:'',menu:'
'}}function r(t){var n={};return e.each(t,(function(t,e){n[e]="."+t})),n}function a(){var t={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return e.isMsie()&&e.mixin(t.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),t}}(),i=function(){"use strict";var n,i;function r(e){e&&e.el||t.error("EventBus initialized without el"),this.$el=t(e.el)}return n="typeahead:",i={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},e.mixin(r.prototype,{_trigger:function(e,i){var r;return r=t.Event(n+e),(i=i||[]).unshift(r),this.$el.trigger.apply(this.$el,i),r},before:function(t){var e,n;return e=[].slice.call(arguments,1),(n=this._trigger("before"+t,e)).isDefaultPrevented()},trigger:function(t){var e;this._trigger(t,[].slice.call(arguments,1)),(e=i[t])&&this._trigger(e,[].slice.call(arguments,1))}}),r}(),r=function(){"use strict";var t=/\s+/,e=u();return{onSync:r,onAsync:i,off:a,trigger:o};function n(e,n,i,r){var a;if(!i)return this;for(n=n.split(t),i=r?l(i,r):i,this._callbacks=this._callbacks||{};a=n.shift();)this._callbacks[a]=this._callbacks[a]||{sync:[],async:[]},this._callbacks[a][e].push(i);return this}function i(t,e,i){return n.call(this,"async",t,e,i)}function r(t,e,i){return n.call(this,"sync",t,e,i)}function a(e){var n;if(!this._callbacks)return this;for(e=e.split(t);n=e.shift();)delete this._callbacks[n];return this}function o(n){var i,r,a,o,u;if(!this._callbacks)return this;for(n=n.split(t),a=[].slice.call(arguments,1);(i=n.shift())&&(r=this._callbacks[i]);)o=s(r.sync,this,[i].concat(a)),u=s(r.async,this,[i].concat(a)),o()&&e(u);return this}function s(t,e,n){return i;function i(){for(var i,r=0,a=t.length;!i&&r9?this.$input.on("input.tt",o):this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",(function(i){n[i.which||i.keyCode]||e.defer(e.bind(t._onInput,t,i))})),this},focus:function t(){this.$input.focus()},blur:function t(){this.$input.blur()},getLangDir:function t(){return this.dir},getQuery:function t(){return this.query||""},setQuery:function t(e,n){this.setInputValue(e),this._setQuery(e,n)},hasQueryChangedSinceLastFocus:function t(){return this.query!==this.queryWhenFocused},getInputValue:function t(){return this.$input.val()},setInputValue:function t(e){this.$input.val(e),this.clearHintIfInvalid(),this._checkLanguageDirection()},resetInputValue:function t(){this.setInputValue(this.query)},getHint:function t(){return this.$hint.val()},setHint:function t(e){this.$hint.val(e)},clearHint:function t(){this.setHint("")},clearHintIfInvalid:function t(){var e,n,i,r;i=(e=this.getInputValue())!==(n=this.getHint())&&0===n.indexOf(e),!(r=""!==e&&i&&!this.hasOverflow())&&this.clearHint()},hasFocus:function t(){return this.$input.is(":focus")},hasOverflow:function t(){var e=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=e},isCursorAtEnd:function(){var t,n,i;return t=this.$input.val().length,n=this.$input[0].selectionStart,e.isNumber(n)?n===t:!document.selection||((i=document.selection.createRange()).moveStart("character",-t),t===i.text.length)},destroy:function e(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$overflowHelper.remove(),this.$hint=this.$input=this.$overflowHelper=t("
")}}),i;function a(e){return t('').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:e.css("font-family"),fontSize:e.css("font-size"),fontStyle:e.css("font-style"),fontVariant:e.css("font-variant"),fontWeight:e.css("font-weight"),wordSpacing:e.css("word-spacing"),letterSpacing:e.css("letter-spacing"),textIndent:e.css("text-indent"),textRendering:e.css("text-rendering"),textTransform:e.css("text-transform")}).insertAfter(e)}function o(t,e){return i.normalizeQuery(t)===i.normalizeQuery(e)}function s(t){return t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}}(),s=function(){"use strict";var n,i;function o(n,r){(n=n||{}).templates=n.templates||{},n.templates.notFound=n.templates.notFound||n.templates.empty,n.source||t.error("missing source"),n.node||t.error("missing node"),n.name&&(n.name,0)&&t.error("invalid dataset name: "+n.name),r.mixin(this),this.highlight=!!n.highlight,this.name=n.name||i(),this.limit=n.limit||5,this.displayFn=s(n.display||n.displayKey),this.templates=u(n.templates,this.displayFn),this.source=n.source.__ttAdapter?n.source.__ttAdapter():n.source,this.async=e.isUndefined(n.async)?this.source.length>2:!!n.async,this._resetLastSuggestion(),this.$el=t(n.node).addClass(this.classes.dataset).addClass(this.classes.dataset+"-"+this.name)}return n={val:"tt-selectable-display",obj:"tt-selectable-object"},i=e.getIdGenerator(),o.extractData=function e(i){var r=t(i);return r.data(n.obj)?{val:r.data(n.val)||"",obj:r.data(n.obj)||null}:null},e.mixin(o.prototype,r,{_overwrite:function t(e,n){(n=n||[]).length?this._renderSuggestions(e,n):this.async&&this.templates.pending?this._renderPending(e):!this.async&&this.templates.notFound?this._renderNotFound(e):this._empty(),this.trigger("rendered",this.name,n,!1)},_append:function t(e,n){(n=n||[]).length&&this.$lastSuggestion.length?this._appendSuggestions(e,n):n.length?this._renderSuggestions(e,n):!this.$lastSuggestion.length&&this.templates.notFound&&this._renderNotFound(e),this.trigger("rendered",this.name,n,!0)},_renderSuggestions:function t(e,n){var i;i=this._getSuggestionsFragment(e,n),this.$lastSuggestion=i.children().last(),this.$el.html(i).prepend(this._getHeader(e,n)).append(this._getFooter(e,n))},_appendSuggestions:function t(e,n){var i,r;r=(i=this._getSuggestionsFragment(e,n)).children().last(),this.$lastSuggestion.after(i),this.$lastSuggestion=r},_renderPending:function t(e){var n=this.templates.pending;this._resetLastSuggestion(),n&&this.$el.html(n({query:e,dataset:this.name}))},_renderNotFound:function t(e){var n=this.templates.notFound;this._resetLastSuggestion(),n&&this.$el.html(n({query:e,dataset:this.name}))},_empty:function t(){this.$el.empty(),this._resetLastSuggestion()},_getSuggestionsFragment:function i(r,o){var s=this,u;return u=document.createDocumentFragment(),e.each(o,(function e(i){var a,o;o=s._injectQuery(r,i),a=t(s.templates.suggestion(o)).data(n.obj,i).data(n.val,s.displayFn(i)).addClass(s.classes.suggestion+" "+s.classes.selectable),u.appendChild(a[0])})),this.highlight&&a({className:this.classes.highlight,node:u,pattern:r}),t(u)},_getFooter:function t(e,n){return this.templates.footer?this.templates.footer({query:e,suggestions:n,dataset:this.name}):null},_getHeader:function t(e,n){return this.templates.header?this.templates.header({query:e,suggestions:n,dataset:this.name}):null},_resetLastSuggestion:function e(){this.$lastSuggestion=t()},_injectQuery:function t(n,i){return e.isObject(i)?e.mixin({_query:n},i):i},update:function e(n){var i=this,r=!1,a=!1,o=0;function s(t){a||(a=!0,t=(t||[]).slice(0,i.limit),o=t.length,i._overwrite(n,t),o")}}),o;function s(t){return t=t||e.stringify,e.isFunction(t)?t:n;function n(e){return e[t]}}function u(n,i){return{notFound:n.notFound&&e.templatify(n.notFound),pending:n.pending&&e.templatify(n.pending),header:n.header&&e.templatify(n.header),footer:n.footer&&e.templatify(n.footer),suggestion:n.suggestion||r};function r(e){return t("
").text(i(e))}}function l(t){return!0}}(),u=function(){"use strict";function n(n,i){var r=this;function a(e){var n=r.$node.find(e.node).first();return e.node=n.length?n:t("
").appendTo(r.$node),new s(e,i)}(n=n||{}).node||t.error("node is required"),i.mixin(this),this.$node=t(n.node),this.query=null,this.datasets=e.map(n.datasets,a)}return e.mixin(n.prototype,r,{_onSelectableClick:function e(n){this.trigger("selectableClicked",t(n.currentTarget))},_onRendered:function t(e,n,i,r){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetRendered",n,i,r)},_onCleared:function t(){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetCleared")},_propagate:function t(){this.trigger.apply(this,arguments)},_allDatasetsEmpty:function t(){return e.every(this.datasets,n);function n(t){return t.isEmpty()}},_getSelectables:function t(){return this.$node.find(this.selectors.selectable)},_removeCursor:function t(){var e=this.getActiveSelectable();e&&e.removeClass(this.classes.cursor)},_ensureVisible:function t(e){var n,i,r,a;i=(n=e.position().top)+e.outerHeight(!0),r=this.$node.scrollTop(),a=this.$node.height()+parseInt(this.$node.css("paddingTop"),10)+parseInt(this.$node.css("paddingBottom"),10),n<0?this.$node.scrollTop(r+n):a"),e.each(this.datasets,i)}}),n}(),l=function(){"use strict";var t=u.prototype;function n(){u.apply(this,[].slice.call(arguments,0))}return e.mixin(n.prototype,u.prototype,{open:function e(){return!this._allDatasetsEmpty()&&this._show(),t.open.apply(this,[].slice.call(arguments,0))},close:function e(){return this._hide(),t.close.apply(this,[].slice.call(arguments,0))},_onRendered:function e(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),t._onRendered.apply(this,[].slice.call(arguments,0))},_onCleared:function e(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),t._onCleared.apply(this,[].slice.call(arguments,0))},setLanguageDirection:function e(n){return this.$node.css("ltr"===n?this.css.ltr:this.css.rtl),t.setLanguageDirection.apply(this,[].slice.call(arguments,0))},_hide:function t(){this.$node.hide()},_show:function t(){this.$node.css("display","block")}}),n}(),c=function(){"use strict";function n(n,r){var a,o,s,u,l,c,d,f,h,p,m;(n=n||{}).input||t.error("missing input"),n.menu||t.error("missing menu"),n.eventBus||t.error("missing event bus"),r.mixin(this),this.eventBus=n.eventBus,this.minLength=e.isNumber(n.minLength)?n.minLength:1,this.input=n.input,this.menu=n.menu,this.enabled=!0,this.active=!1,this.input.hasFocus()&&this.activate(),this.dir=this.input.getLangDir(),this._hacks(),this.menu.bind().onSync("selectableClicked",this._onSelectableClicked,this).onSync("asyncRequested",this._onAsyncRequested,this).onSync("asyncCanceled",this._onAsyncCanceled,this).onSync("asyncReceived",this._onAsyncReceived,this).onSync("datasetRendered",this._onDatasetRendered,this).onSync("datasetCleared",this._onDatasetCleared,this),a=i(this,"activate","open","_onFocused"),o=i(this,"deactivate","_onBlurred"),s=i(this,"isActive","isOpen","_onEnterKeyed"),u=i(this,"isActive","isOpen","_onTabKeyed"),l=i(this,"isActive","_onEscKeyed"),c=i(this,"isActive","open","_onUpKeyed"),d=i(this,"isActive","open","_onDownKeyed"),f=i(this,"isActive","isOpen","_onLeftKeyed"),h=i(this,"isActive","isOpen","_onRightKeyed"),p=i(this,"_openIfActive","_onQueryChanged"),m=i(this,"_openIfActive","_onWhitespaceChanged"),this.input.bind().onSync("focused",a,this).onSync("blurred",o,this).onSync("enterKeyed",s,this).onSync("tabKeyed",u,this).onSync("escKeyed",l,this).onSync("upKeyed",c,this).onSync("downKeyed",d,this).onSync("leftKeyed",f,this).onSync("rightKeyed",h,this).onSync("queryChanged",p,this).onSync("whitespaceChanged",m,this).onSync("langDirChanged",this._onLangDirChanged,this)}return e.mixin(n.prototype,{_hacks:function n(){var i,r;i=this.input.$input||t("
"),r=this.menu.$node||t("
"),i.on("blur.tt",(function(t){var n,a,o;n=document.activeElement,a=r.is(n),o=r.has(n).length>0,e.isMsie()&&(a||o)&&(t.preventDefault(),t.stopImmediatePropagation(),e.defer((function(){i.focus()})))})),r.on("mousedown.tt",(function(t){t.preventDefault()}))},_onSelectableClicked:function t(e,n){this.select(n)},_onDatasetCleared:function t(){this._updateHint()},_onDatasetRendered:function t(e,n,i,r){this._updateHint(),this.eventBus.trigger("render",i,r,n)},_onAsyncRequested:function t(e,n,i){this.eventBus.trigger("asyncrequest",i,n)},_onAsyncCanceled:function t(e,n,i){this.eventBus.trigger("asynccancel",i,n)},_onAsyncReceived:function t(e,n,i){this.eventBus.trigger("asyncreceive",i,n)},_onFocused:function t(){this._minLengthMet()&&this.menu.update(this.input.getQuery())},_onBlurred:function t(){this.input.hasQueryChangedSinceLastFocus()&&this.eventBus.trigger("change",this.input.getQuery())},_onEnterKeyed:function t(e,n){var i;(i=this.menu.getActiveSelectable())&&this.select(i)&&n.preventDefault()},_onTabKeyed:function t(e,n){var i;(i=this.menu.getActiveSelectable())?this.select(i)&&n.preventDefault():(i=this.menu.getTopSelectable())&&this.autocomplete(i)&&n.preventDefault()},_onEscKeyed:function t(){this.close()},_onUpKeyed:function t(){this.moveCursor(-1)},_onDownKeyed:function t(){this.moveCursor(1)},_onLeftKeyed:function t(){"rtl"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onRightKeyed:function t(){"ltr"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onQueryChanged:function t(e,n){this._minLengthMet(n)?this.menu.update(n):this.menu.empty()},_onWhitespaceChanged:function t(){this._updateHint()},_onLangDirChanged:function t(e,n){this.dir!==n&&(this.dir=n,this.menu.setLanguageDirection(n))},_openIfActive:function t(){this.isActive()&&this.open()},_minLengthMet:function t(n){return(n=e.isString(n)?n:this.input.getQuery()||"").length>=this.minLength},_updateHint:function t(){var n,i,r,a,s,u,l;n=this.menu.getTopSelectable(),i=this.menu.getSelectableData(n),r=this.input.getInputValue(),!i||e.isBlankString(r)||this.input.hasOverflow()?this.input.clearHint():(a=o.normalizeQuery(r),s=e.escapeRegExChars(a),(l=(u=new RegExp("^(?:"+s+")(.+$)","i")).exec(i.val))&&this.input.setHint(r+l[1]))},isEnabled:function t(){return this.enabled},enable:function t(){this.enabled=!0},disable:function t(){this.enabled=!1},isActive:function t(){return this.active},activate:function t(){return!!this.isActive()||!(!this.isEnabled()||this.eventBus.before("active"))&&(this.active=!0,this.eventBus.trigger("active"),!0)},deactivate:function t(){return!this.isActive()||!this.eventBus.before("idle")&&(this.active=!1,this.close(),this.eventBus.trigger("idle"),!0)},isOpen:function t(){return this.menu.isOpen()},open:function t(){return this.isOpen()||this.eventBus.before("open")||(this.menu.open(),this._updateHint(),this.eventBus.trigger("open")),this.isOpen()},close:function t(){return this.isOpen()&&!this.eventBus.before("close")&&(this.menu.close(),this.input.clearHint(),this.input.resetInputValue(),this.eventBus.trigger("close")),!this.isOpen()},setVal:function t(n){this.input.setQuery(e.toStr(n))},getVal:function t(){return this.input.getQuery()},select:function t(e){var n=this.menu.getSelectableData(e);return!(!n||this.eventBus.before("select",n.obj)||(this.input.setQuery(n.val,!0),this.eventBus.trigger("select",n.obj),this.close(),0))},autocomplete:function t(e){var n,i,r;return n=this.input.getQuery(),!(!(r=(i=this.menu.getSelectableData(e))&&n!==i.val)||this.eventBus.before("autocomplete",i.obj)||(this.input.setQuery(i.val),this.eventBus.trigger("autocomplete",i.obj),0))},moveCursor:function t(e){var n,i,r,a,o;return n=this.input.getQuery(),i=this.menu.selectableRelativeToCursor(e),a=(r=this.menu.getSelectableData(i))?r.obj:null,!(o=this._minLengthMet()&&this.menu.update(n))&&!this.eventBus.before("cursorchange",a)&&(this.menu.setCursor(i),r?this.input.setInputValue(r.val):(this.input.resetInputValue(),this._updateHint()),this.eventBus.trigger("cursorchange",a),!0)},destroy:function t(){this.input.destroy(),this.menu.destroy()}}),n;function i(t){var n=[].slice.call(arguments,1);return function(){var i=[].slice.call(arguments);e.each(n,(function(e){return t[e].apply(t,i)}))}}}();!function(){"use strict";var r,a,s;function d(e,n){e.each((function(){var e=t(this),i;(i=e.data(a.typeahead))&&n(i,e)}))}function f(t,e){return t.clone().addClass(e.classes.hint).removeData().css(e.css.hint).css(p(t)).prop("readonly",!0).removeAttr("id name placeholder required").attr({autocomplete:"off",spellcheck:"false",tabindex:-1})}function h(t,e){t.data(a.attrs,{dir:t.attr("dir"),autocomplete:t.attr("autocomplete"),spellcheck:t.attr("spellcheck"),style:t.attr("style")}),t.addClass(e.classes.input).attr({autocomplete:"off",spellcheck:!1});try{!t.attr("dir")&&t.attr("dir","auto")}catch(n){}return t}function p(t){return{backgroundAttachment:t.css("background-attachment"),backgroundClip:t.css("background-clip"),backgroundColor:t.css("background-color"),backgroundImage:t.css("background-image"),backgroundOrigin:t.css("background-origin"),backgroundPosition:t.css("background-position"),backgroundRepeat:t.css("background-repeat"),backgroundSize:t.css("background-size")}}function m(t){var n,i;n=t.data(a.www),i=t.parent().filter(n.selectors.wrapper),e.each(t.data(a.attrs),(function(n,i){e.isUndefined(n)?t.removeAttr(i):t.attr(i,n)})),t.removeData(a.typeahead).removeData(a.www).removeData(a.attr).removeClass(n.classes.input),i.length&&(t.detach().insertAfter(i),i.remove())}function g(n){var i,r;return(r=(i=e.isJQuery(n)||e.isElement(n))?t(n).first():[]).length?r:null}r=t.fn.typeahead,a={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"},s={initialize:function r(s,d){var p;return d=e.isArray(d)?d:[].slice.call(arguments,1),p=n((s=s||{}).classNames),this.each(m);function m(){var n,r,m,v,_,y,b,k,w,x,T;e.each(d,(function(t){t.highlight=!!s.highlight})),n=t(this),r=t(p.html.wrapper),m=g(s.hint),v=g(s.menu),_=!1!==s.hint&&!m,y=!1!==s.menu&&!v,_&&(m=f(n,p)),y&&(v=t(p.html.menu).css(p.css.menu)),m&&m.val(""),n=h(n,p),(_||y)&&(r.css(p.css.wrapper),n.css(_?p.css.input:p.css.inputWithNoHint),n.wrap(r).parent().prepend(_?m:null).append(y?v:null)),T=y?l:u,b=new i({el:n}),k=new o({hint:m,input:n},p),w=new T({node:v,datasets:d},p),x=new c({input:k,menu:w,eventBus:b,minLength:s.minLength},p),n.data(a.www,p),n.data(a.typeahead,x)}},isEnabled:function t(){var e;return d(this.first(),(function(t){e=t.isEnabled()})),e},enable:function t(){return d(this,(function(t){t.enable()})),this},disable:function t(){return d(this,(function(t){t.disable()})),this},isActive:function t(){var e;return d(this.first(),(function(t){e=t.isActive()})),e},activate:function t(){return d(this,(function(t){t.activate()})),this},deactivate:function t(){return d(this,(function(t){t.deactivate()})),this},isOpen:function t(){var e;return d(this.first(),(function(t){e=t.isOpen()})),e},open:function t(){return d(this,(function(t){t.open()})),this},close:function t(){return d(this,(function(t){t.close()})),this},select:function e(n){var i=!1,r=t(n);return d(this.first(),(function(t){i=t.select(r)})),i},autocomplete:function e(n){var i=!1,r=t(n);return d(this.first(),(function(t){i=t.autocomplete(r)})),i},moveCursor:function t(e){var n=!1;return d(this.first(),(function(t){n=t.moveCursor(e)})),n},val:function t(e){var n;return arguments.length?(d(this,(function(t){t.setVal(e)})),this):(d(this.first(),(function(t){n=t.getVal()})),n)},destroy:function t(){return d(this,(function(t,e){m(e),t.destroy()})),this}},t.fn.typeahead=function(t){return s[t]?s[t].apply(this,[].slice.call(arguments,1)):s.initialize.apply(this,arguments)},t.fn.typeahead.noConflict=function e(){return t.fn.typeahead=r,this}}()},"function"==typeof define&&define.amd?define("typeahead.js",["jquery"],(function(t){return a(t)})):"object"==typeof n?t.exports=a(e("jquery")):a(jQuery)}).call(this,t)}},"template.af-typeahead.js":function t(){q.__checkName("afTypeAhead"),q.afTypeAhead=new q("Template.afTypeAhead",(function(){var t=this;return R.DIV({class:"typeahead-basics"},"\n ",R.INPUT(R.Attrs({type:"text",value:function(){return M.mustache(M.dot(t.lookup("."),"value"))},placeholder:""},(function(){return M.attrMustache(M.dot(t.lookup("."),"atts"))}))),"\n ")}))},"af-typeahead.coffee":function t(){var e=P="object"==typeof P?P:{};b.addInputType("typeahead",{template:"afTypeAhead",valueIn:function(t,e){return t},valueOut:function(){return this.val()},valueConverters:{stringArray:b.valueConverters.stringToStringArray,number:b.valueConverters.stringToNumber,numerArray:b.valueConverters.stringToNumberArray,boolean:b.valueConverters.stringToBoolean,booleanArray:b.valueConverters.stringToBooleanArray,date:b.valueConverters.stringToDate,dateArray:b.valueConverters.stringToDateArray},contextAdjust:function(t){return void 0===t.atts.maxlength&&"number"==typeof t.max&&(t.atts.maxlength=t.max),t.atts.class="typeahead form-control",t}}),q.afTypeAhead.helpers,q.afTypeAhead.events,q.afTypeAhead.onRendered((function(){var t,e,n,i;return n=this.data.selectOptions,t=this.data.atts.id,e=this.data.name,i=function(t){return function(e,n){var i,r;return i=[],e?(r=new RegExp(e,"i"),$.each(t,(function(t,e){r.test(e)&&i.push(e)})),n(i)):n(t)}},$("#"+t).typeahead({hint:!1,highlight:!0,minLength:0},{name:e,limit:10,source:i(n.getProperty("label"))})}))}},"coreform-number":{"template.steedos-number.js":function t(){q.__checkName("afSteedosNumber"),q.afSteedosNumber=new q("Template.afSteedosNumber",(function(){var t=this;return R.INPUT(R.Attrs({type:"number",value:function(){return M.mustache(M.dot(t.lookup("."),"value"))}},(function(){return M.attrMustache(M.dot(t.lookup("."),"atts"))})))}))},"steedos-number.coffee":function t(){var e=P="object"==typeof P?P:{},n;b.addInputType("steedosNumber",{template:"afSteedosNumber",valueIn:function(t,e){return t?Number(t).toFixed(e.scale):(0).toFixed(e.scale)},valueOut:function(){return b.valueConverters.stringToNumber(this.val())},valueConverters:{string:b.valueConverters.numberToString,stringArray:b.valueConverters.numberToStringArray,numberArray:b.valueConverters.numberToNumberArray,boolean:b.valueConverters.numberToBoolean,booleanArray:b.valueConverters.numberToBooleanArray},contextAdjust:function(t){var e,n;return e=t.atts.scale||0,void 0===t.atts.max&&"number"==typeof t.max&&(t.atts.max=t.max),void 0===t.atts.min&&"number"==typeof t.min&&(t.atts.min=t.min),void 0===t.atts.step&&a.isNumber(e)&&e>0&&(n="0.",a.range(e).forEach((function(t,n){var i;return n===e-1?i+"1":i+"0"})),t.atts.step="0."),t.atts.class="form-control",t.precision=t.atts.precision,t.scale=t.atts.scale,t}}),n=function(t,e,n,i){var r,a;return a=b.getFormId(),r=new Number(t),t.indexOf(".")>-1?t.length-1>n?Number(t.substring(0,n-i-1)).toFixed(i):r.toFixed(i):t.length>n?Number(t.substring(0,n-i)).toFixed(i):r.toFixed(i)},q.afSteedosNumber.events({"blur input[type=number]":function(t,e){return t.currentTarget.value=n(t.currentTarget.value,this.atts.name,this.atts.precision,this.atts.scale)}})}},"coreform-date-mobile":{"template.date.js":function t(){q.__checkName("steedosInputDateMobile"),q.steedosInputDateMobile=new q("Template.steedosInputDateMobile",(function(){var t=this;return R.INPUT(R.Attrs({type:function(){return M.mustache(t.lookup("inputtype"))},value:function(){return M.mustache(M.dot(t.lookup("."),"value"))}},(function(){return M.attrMustache(t.lookup("atts"))})))}))},"date.js":function t(){b.addInputType("steedos-date-mobile",{template:"steedosInputDateMobile",valueIn:function(t,e){let n="datetime";return e.dateMobileOptions&&(n=e.dateMobileOptions.type),"string"==typeof t&&(t=new Date(t)),t="date"===n?k.utc(t).format("YYYY-MM-DD"):k(t).format("YYYY-MM-DDTHH:mm:ss")},valueOut:function(){let t=this.val(),e=this.attr("type");if(!t)return t;if("date"===e)return t;{let e;return(t=k.tz(b.Utility.dateToNormalizedLocalDateAndTimeString(t),"utc").toDate()).setHours(t.getHours()+t.getTimezoneOffset()/60),t}}}),q.steedosInputDateMobile.helpers({atts:function(){var t=a.clone(this.atts);return delete(t=b.Utility.addClass(t,"form-control")).dateMobileOptions,t},inputtype:function(){let t="datetime";switch(this.atts.dateMobileOptions&&(t=this.atts.dateMobileOptions.type),t){case"datetime":return"datetime-local";case"date":return"date";default:return"datetime-local"}}})}},"coreform-html":{"template.html.js":function t(){q.__checkName("steedosInputHtml"),q.steedosInputHtml=new q("Template.steedosInputHtml",(function(){var t=this;return j.If((function(){return M.call(t.lookup("isReadOnly"))}),(function(){return["\n ",R.DIV(R.Attrs((function(){return M.attrMustache(t.lookup("attsPlusFormControlClass"))})),"\n ",j.View("lookup:..value",(function(){return M.makeRaw(M.mustache(M.dot(t.lookup("."),"value")))})),"\n "),"\n ",R.INPUT(R.Attrs({type:"text",value:function(){return M.mustache(M.dot(t.lookup("."),"value"))},style:"display: none"},(function(){return M.attrMustache(M.dot(t.lookup("."),"atts"))}),(function(){return M.attrMustache(t.lookup("attsPlusFormControlClass"))}))),"\n "]}),(function(){return["\n ",R.INPUT(R.Attrs({type:"text",value:function(){return M.mustache(M.dot(t.lookup("."),"value"))}},(function(){return M.attrMustache(M.dot(t.lookup("."),"atts"))}),(function(){return M.attrMustache(t.lookup("attsPlusFormControlClass"))}))),"\n "]}))}))},"html.js":function t(){b.addInputType("steedosHtml",{template:"steedosInputHtml",valueConverters:{stringArray:b.valueConverters.stringToStringArray},contextAdjust:function(t){return void 0===t.atts.maxlength&&"number"==typeof t.max&&(t.atts.maxlength=t.max),t}}),q.steedosInputHtml.helpers({isReadOnly:function(){var t=this.atts;return!(!t.hasOwnProperty("disabled")&&!t.hasOwnProperty("readonly"))}})}}},components:{"slds-quickForm":{"template.slds-quickForm.js":function t(){q.__checkName("quickForm_slds"),q.quickForm_slds=new q("Template.quickForm_slds",(function(){var t=this;return R.DIV({class:function(){return["quickForm_slds ",j.If((function(){return M.call(t.lookup("horizontal"))}),(function(){return"horizontal"}))]}},"\n\t",j._TemplateWith((function(){return M.call(t.lookup("qfAutoFormContext"))}),(function(){return M.include(t.lookupTemplate("autoForm"),(function(){return["\n\t\t",j.If((function(){return M.call(M.dot(t.lookup("schemaFields"),"grouplessFields"))}),(function(){return["\n\t\t\t",j.Each((function(){return M.call(M.dot(t.lookup("schemaFields"),"grouplessFields"))}),(function(){return["\n\t\t\t\t",R.DIV({class:function(){return["slds-grid view-page-section-row ",j.If((function(){return M.dataMustache(t.lookup("has_wide_field"),t.lookup("."))}),(function(){return"wide-fields"}))]}},"\n\t\t\t\t\t",j.Each((function(){return M.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t",R.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t",R.DIV({class:function(){return["slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput ",j.If((function(){return M.dataMustache(t.lookup("hasInlineHelpText"),t.lookup("."))}),(function(){return"has-inline-text"}))]}},"\n\t\t\t\t\t\t\t\t",j.If((function(){return M.dataMustache(t.lookup("is_range"),t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t",M.include(t.lookupTemplate("range_field")),"\n\t\t\t\t\t\t\t\t"]}),(function(){return["\n\t\t\t\t\t\t\t\t\t",j.Unless((function(){return M.dataMustache(t.lookup("is_renge_end"),t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t",j.If((function(){return M.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t",j.If((function(){return M.dataMustache(t.lookup("hasInlineHelpText"),t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t",R.DIV({class:"info-popover",id:function(){return["info_popover_",M.mustache(t.lookup("."))]},style:"display: none"},j.View("lookup:hasInlineHelpText",(function(){return M.mustache(t.lookup("hasInlineHelpText"),t.lookup("."))}))),"\n\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t",j.If((function(){return M.call(t.lookup("horizontal"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t",j._TemplateWith((function(){return{name:M.call(t.lookup(".")),class:M.call(M.dataMustache(t.lookup("getClass"),t.lookup("."))),template:M.call("bootstrap3-horizontal"),"label-class":M.call("col-sm-3 col-xs-12"),"input-col-class":M.call("col-sm-9 col-xs-12")}}),(function(){return M.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t\t\t\t"]}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t",j._TemplateWith((function(){return{name:M.call(t.lookup(".")),class:M.call(M.dataMustache(t.lookup("getClass"),t.lookup(".")))}}),(function(){return M.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t"]})),"\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"),"\n\t\t\t"]})),"\n\t\t"]})),"\n\n\t\t",j.If((function(){return M.call(M.dot(t.lookup("schemaFields"),"groupFields"))}),(function(){return["\n\t\t\t",j.Each((function(){return M.call(M.dot(t.lookup("schemaFields"),"groupFields"))}),(function(){return["\n\t\t\t\t",j.If((function(){return M.call(M.dot(t.lookup("."),"fields"))}),(function(){return["\n\t\t\t\t\t",R.DIV({class:function(){return["slds-section group-section ",j.If((function(){return M.call(t.lookup("autoExpandGroup"))}),(function(){return"slds-is-open"}))]}},"\n\t\t\t\t\t\t",R.H3({class:"slds-section__title group-section-control"},"\n\t\t\t\t\t\t\t",j._TemplateWith((function(){return{className:M.call("slds-section__title-action"),iconClassName:M.call("slds-section__title-action-icon slds-button__icon_left"),iconCategory:M.call("utility"),iconName:M.call("switch"),variant:M.call("icon"),label:M.call(M.dot(t.lookup("."),"name"))}}),(function(){return M.include(t.lookupTemplate("steedos_button"))})),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t\t",R.DIV({"aria-hidden":"false",class:"slds-section__content",id:"expando-unique-id"},"\n\t\t\t\t\t\t\t",j.Each((function(){return M.call(M.dot(t.lookup("."),"fields"))}),(function(){return["\n\t\t\t\t\t\t\t\t",R.DIV({class:function(){return["slds-grid view-page-section-row ",j.If((function(){return M.dataMustache(t.lookup("has_wide_field"),t.lookup("."))}),(function(){return"wide-fields"}))]}},"\n\t\t\t\t\t\t\t\t\t",j.Each((function(){return M.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t",R.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t\t\t\t\t\t",R.DIV({class:function(){return["slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput ",j.If((function(){return M.dataMustache(t.lookup("hasInlineHelpText"),t.lookup("."))}),(function(){return"has-inline-text"}))]}},"\n\t\t\t\t\t\t\t\t\t\t",j.If((function(){return M.dataMustache(t.lookup("is_range"),t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t",M.include(t.lookupTemplate("range_field")),"\n\t\t\t\t\t\t\t\t\t\t"]}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t",j.Unless((function(){return M.dataMustache(t.lookup("is_renge_end"),t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t",j.If((function(){return M.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t",j.If((function(){return M.dataMustache(t.lookup("hasInlineHelpText"),t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",R.DIV({class:"info-popover",id:function(){return["info_popover_",M.mustache(t.lookup("."))]},style:"display: none"},j.View("lookup:hasInlineHelpText",(function(){return M.mustache(t.lookup("hasInlineHelpText"),t.lookup("."))}))),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t",j.If((function(){return M.call(t.lookup("horizontal"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",j._TemplateWith((function(){return{name:M.call(t.lookup(".")),class:M.call(M.dataMustache(t.lookup("getClass"),t.lookup("."))),template:M.call("bootstrap3-horizontal"),"label-class":M.call("col-sm-3 col-xs-12"),"input-col-class":M.call("col-sm-9 col-xs-12")}}),(function(){return M.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t"]}),(function(){return["\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t",j._TemplateWith((function(){return{name:M.call(t.lookup(".")),class:M.call(M.dataMustache(t.lookup("getClass"),t.lookup(".")))}}),(function(){return M.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t\t"),"\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"]})),"\n\t\t\t"]})),"\n\t\t"]})),"\n\n\t\t",j.If((function(){return M.call(M.dot(t.lookup("schemaFields"),"hiddenFields"))}),(function(){return["\n\t\t\t",R.DIV({class:"slds-grid view-page-section-row hidden-fields"},"\n\t\t\t\t",R.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t",j.Each((function(){return M.call(M.dot(t.lookup("schemaFields"),"hiddenFields"))}),(function(){return["\n\t\t\t\t\t\t",R.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t",j.If((function(){return M.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t",j.If((function(){return M.call(t.lookup("horizontal"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t",j._TemplateWith((function(){return{name:M.call(t.lookup(".")),class:M.call(M.dataMustache(t.lookup("getClass"),t.lookup("."))),template:M.call("bootstrap3-horizontal"),"label-class":M.call("col-sm-3 col-xs-12"),"input-col-class":M.call("col-sm-9 col-xs-12")}}),(function(){return M.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t"]}),(function(){return["\n\t\t\t\t\t\t\t\t\t",j._TemplateWith((function(){return{name:M.call(t.lookup(".")),class:M.call(M.dataMustache(t.lookup("getClass"),t.lookup(".")))}}),(function(){return M.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t"]})),"\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"),"\n\t\t\t"),"\n\t\t"]})),"\n\n\t\t",j.If((function(){return M.call(M.dot(t.lookup("schemaFields"),"disabledFields"))}),(function(){return["\n\t\t\t",R.DIV({class:"slds-grid view-page-section-row disabled-fields"},"\n\t\t\t\t",R.DIV({class:"slds-has-flexi-truncate slds-p-horizontal_x-small full view-page-block-item"},"\n\t\t\t\t\t",j.Each((function(){return M.call(M.dot(t.lookup("schemaFields"),"disabledFields"))}),(function(){return["\n\t\t\t\t\t\t",R.DIV({class:"slds-form-element slds-form-element_edit slds-grow slds-hint-parent slds-p-vertical_xx-small override--slds-form-element uiInput"},"\n\t\t\t\t\t\t\t",j.If((function(){return M.call(t.lookup("."))}),(function(){return["\n\t\t\t\t\t\t\t\t",j.If((function(){return M.call(t.lookup("horizontal"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t",j._TemplateWith((function(){return{name:M.call(t.lookup(".")),disabled:M.call(!1),readonly:M.call(!0),class:M.call(M.dataMustache(t.lookup("getClass"),t.lookup("."))),template:M.call("bootstrap3-horizontal"),"label-class":M.call("col-sm-3 col-xs-12"),"input-col-class":M.call("col-sm-9 col-xs-12")}}),(function(){return M.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t"]}),(function(){return["\n\t\t\t\t\t\t\t\t\t",j._TemplateWith((function(){return{name:M.call(t.lookup(".")),disabled:M.call(!1),readonly:M.call(!0),class:M.call(M.dataMustache(t.lookup("getClass"),t.lookup(".")))}}),(function(){return M.include(t.lookupTemplate("afQuickField"))})),"\n\t\t\t\t\t\t\t\t"]})),"\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"),"\n\t\t\t"),"\n\t\t"]})),"\n\t"]}))})),"\n\t")})),q.__checkName("range_field"),q.range_field=new q("Template.range_field",(function(){var t=this;return R.DIV({class:function(){return["range-field field-code-",M.mustache(t.lookup("startName"))]}},"\n\t\t",R.DIV({class:"form-group"},"\n\t\t\t",R.LABEL({class:"col-sm-3 control-label",for:"dao2yaGvD4SFjifBi"},"\n\t\t\t\t",j.View("lookup:afFieldLabelText",(function(){return M.mustache(t.lookup("afFieldLabelText"),M.kw({name:t.lookup("startName"),class:"col-sm-3 col-xs-12"}))})),"\n\t\t\t"),"\n\t\t\t",R.DIV({class:"col-sm-9 col-xs-12"},"\n\t\t\t\t",R.DIV({class:"row show-grid"},"\n\t\t\t\t\t",R.DIV({class:"col-sm-6 col-xs-6 start"},j._TemplateWith((function(){return{name:M.call(t.lookup("startName")),class:M.call(M.dataMustache(t.lookup("getClass"),t.lookup("."))),label:M.call(!1)}}),(function(){return M.include(t.lookupTemplate("afQuickField"))}))),"\n\t\t\t\t\t",R.DIV({class:"col-sm-6 col-xs-6 end"},j._TemplateWith((function(){return{name:M.call(t.lookup("endName")),class:M.call(M.dataMustache(t.lookup("getClass"),t.lookup("."))),label:M.call(!1)}}),(function(){return M.include(t.lookupTemplate("afQuickField"))}))),"\n\t\t\t\t"),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"slds-quickForm.coffee":function t(){var e=P="object"==typeof P?P:{};q.quickForm_slds.helpers({isDisabled:function(t){var e,n,i,r;return null!=(e=q.instance())&&null!=(n=e.data)&&null!=(i=n.qfAutoFormContext.schema._schema[t])&&null!=(r=i.autoform)?r.disabled:void 0},hasInlineHelpText:function(t){var e,n,i,r;return null!=(e=q.instance())&&null!=(n=e.data)&&null!=(i=n.qfAutoFormContext.schema._schema[t])&&null!=(r=i.autoform)?r.inlineHelpText:void 0},is_range:function(t){var e,n,i,r;return null!=(e=q.instance())&&null!=(n=e.data)&&null!=(i=n.qfAutoFormContext.schema._schema[t])&&null!=(r=i.autoform)?r.is_range:void 0},is_renge_end:function(t){return null!=t?t.endsWith("_endLine"):void 0},getClass:function(t){var e,n,i,r;if("steedosGrid"!==(null!=(e=q.instance())&&null!=(n=e.data)&&null!=(i=n.qfAutoFormContext.schema._schema[t])&&null!=(r=i.autoform)?r.type:void 0))return"form-control"},schemaFields:function(){var t,e,n,i,o,s,u,l,c,d,f,h,p;return d=[],p=this.qfAutoFormContext.schema,h=p._schema,s=p._firstLevelSchemaKeys,(f=this.qfAutoFormContext.fields||s)||(f=[]),a.each(h,(function(t,e){var n;if(a.indexOf(s,e)>-1&&!(null!=(n=t.autoform)?n.omit:void 0))return d.push(e)})),1===d.length?o={grouplessFields:[d]}:(l=Creator.getHiddenFields(h),t=Creator.getDisabledFields(h),n=[],i=[],c=r.get("cmEditSingleField"),u=[],u=Creator.getFieldsWithNoGroup(h),u=Creator.getFieldsInFirstLevel(s,u),f&&(u=a.intersection(f,u)),u=Creator.getFieldsWithoutOmit(h,u),u=Creator.getFieldsForReorder(h,u,c),e=Creator.getSortedFieldGroupNames(h),a.each(e,(function(t){return i=Creator.getFieldsForGroup(h,t),i=Creator.getFieldsInFirstLevel(s,i),f&&(i=a.intersection(f,i)),i=Creator.getFieldsWithoutOmit(h,i),i=Creator.getFieldsForReorder(h,i,c),n.push({name:t,fields:i})})),o={grouplessFields:u,groupFields:n,hiddenFields:l,disabledFields:t})},horizontal:function(){return q.instance().data.atts.horizontal},is_range_fields:function(t){var e,n,i,r;if((null!=t?t.length:void 0)>0&&t[0])return null!=(e=q.instance())&&null!=(n=e.data)&&null!=(i=n.qfAutoFormContext.schema._schema[t[0]])&&null!=(r=i.autoform)?r.is_range:void 0},has_wide_field:function(t){var e,n,i,r;if((null!=t?t.length:void 0)>0&&t[0])return null!=(e=q.instance())&&null!=(n=e.data)&&null!=(i=n.qfAutoFormContext.schema._schema[t[0]])&&null!=(r=i.autoform)?r.is_wide:void 0},autoExpandGroup:function(){return q.instance().data.atts.autoExpandGroup||!1}}),q.quickForm_slds.events({"click .group-section-control":function(t,e){return t.preventDefault(),t.stopPropagation(),$(t.currentTarget).closest(".group-section").toggleClass("slds-is-open")}}),q.quickForm_slds.onRendered((function(){var t;return t=this,this.$(".has-inline-text").each((function(){var t,e;return t='\n\t\n',$(".control-label",$(this)).append(t)})),this.$(".info-popover").each((function(){var t;return t=$("~ .form-group .help-info",$(this)).attr("id"),$(this).dxPopover({target:"#"+t,showEvent:"mouseenter",hideEvent:"mouseleave",position:"top",width:300,animation:{show:{type:"pop",from:{scale:0},to:{scale:1}},hide:{type:"fade",from:1,to:0}}})}))})),q.range_field.helpers({startName:function(){return this.toString()},endName:function(){return this.toString()+"_endLine"},getClass:function(t){return"form-control"}})}}}}}}}}},{extensions:[".js",".json",".coffee",".html",".less"]});W("/node_modules/meteor/steedos:autoform/client/core.coffee"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/boolean-checkbox/template.boolean-checkbox.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/boolean-checkbox/boolean-checkbox.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/boolean-toggle/template.boolean-toggle.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/boolean-toggle/boolean-toggle.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-org-localdata/template.select-orgs.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-org-localdata/select-orgs.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-org/lib/template.cf_organization.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-org/lib/cf_organization.coffee"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-org/lib/template.cf_organization_modal.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-org/lib/cf_organization_modal.coffee"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-org/template.select-orgs.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-org/select-orgs.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-user-localdata/template.select-users.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-user-localdata/select-users.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-user/lib/cf_data_manager.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-user/lib/cf_tabular_space_user.coffee"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-user/lib/template.cf_contact_modal.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-user/lib/cf_contact_modal.coffee"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-user/lib/template.cf_organization_list.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-user/lib/cf_organization_list.coffee"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-user/lib/template.cf_space_user_list.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-user/lib/cf_space_user_list.coffee"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-user/lib/template.cf_organization_modal.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-user/lib/cf_organization_modal.coffee"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-user/template.select-users.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-user/select-users.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-tree/template.select-tree.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-tree/select-tree.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-email/template.email.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-email/email.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-url/template.url.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-url/url.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-widearea/template.widearea.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-widearea/widearea.coffee"),W("/node_modules/meteor/steedos:autoform/client/coreform/components/slds-quickForm/template.slds-quickForm.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/components/slds-quickForm/slds-quickForm.coffee"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-typeahead/typeahead.js/bloodhound.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-typeahead/typeahead.js/typeahead.bundle.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-typeahead/typeahead.js/typeahead.jquery.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-typeahead/template.af-typeahead.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-typeahead/af-typeahead.coffee"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-number/template.steedos-number.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-number/steedos-number.coffee"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-date-mobile/template.date.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-date-mobile/date.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-html/template.html.js"),W("/node_modules/meteor/steedos:autoform/client/coreform/inputTypes/coreform-html/html.js"),Package._define("steedos:autoform",{CFDataManager:L})}(); -!function(){var Meteor=Package.meteor.Meteor,global=Package.meteor.global,meteorEnv=Package.meteor.meteorEnv,ReactiveVar=Package["reactive-var"].ReactiveVar,ReactiveDict=Package["reactive-dict"].ReactiveDict,Random=Package.random.Random,DDP=Package["ddp-client"].DDP,check=Package.check.check,Match=Package.check.Match,_=Package.underscore._,Tracker=Package.tracker.Tracker,Deps=Package.tracker.Deps,Session=Package.session.Session,Blaze=Package.ui.Blaze,UI=Package.ui.UI,Handlebars=Package.ui.Handlebars,Template=Package["templating-runtime"].Template,SimpleSchema=Package["aldeed:simple-schema"].SimpleSchema,MongoObject=Package["aldeed:simple-schema"].MongoObject,Tabular=Package["aldeed:tabular"].Tabular,AutoForm=Package["aldeed:autoform"].AutoForm,CollectionHooks=Package["matb33:collection-hooks"].CollectionHooks,BlazeLayout=Package["kadira:blaze-layout"].BlazeLayout,FlowRouter=Package["kadira:flow-router"].FlowRouter,SubsManager=Package["meteorhacks:subs-manager"].SubsManager,moment=Package["momentjs:moment"].moment,UniSelectize=Package["steedos:autoform-lookup"].UniSelectize,Accounts=Package["accounts-base"].Accounts,Selector=Package["steedos:base"].Selector,Steedos=Package["steedos:base"].Steedos,AjaxCollection=Package["steedos:base"].AjaxCollection,SteedosDataManager=Package["steedos:base"].SteedosDataManager,SteedosOffice=Package["steedos:base"].SteedosOffice,Modal=Package["steedos:base"].Modal,CFDataManager=Package["steedos:autoform"].CFDataManager,Push=Package["raix:push"].Push,Logger=Package["steedos:logger"].Logger,_i18n=Package["universe:i18n"]._i18n,i18n=Package["universe:i18n"].i18n,Promise=Package.promise.Promise,meteorInstall=Package.modules.meteorInstall,HTML=Package.htmljs.HTML,Collection2=Package["aldeed:collection2-core"].Collection2,FS=Package["steedos:cfs-base-package"].FS,Spacebars=Package.spacebars.Spacebars,Mongo=Package.mongo.Mongo,__coffeescriptShare,regions,require=meteorInstall({node_modules:{meteor:{"steedos:creator":{"core.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Creator.getSchema=function(e){var t;return null!=(t=Creator.getObject(e))?t.schema:void 0},Creator.getObjectHomeComponent=function(e){return!1},Creator.getObjectUrl=function(e,t,r){var o,a;return r||(r=Session.get("app_id")),e||(e=Session.get("object_name")),a=null!=(o=Creator.getListView(e,null))?o._id:void 0,t?Creator.getRelativeUrl("/app/"+r+"/"+e+"/view/"+t):Creator.getObjectHomeComponent(e)?Creator.getRelativeUrl("/app/"+r+"/"+e):a?Creator.getRelativeUrl("/app/"+r+"/"+e+"/grid/"+a):Creator.getRelativeUrl("/app/"+r+"/"+e)},Creator.getObjectAbsoluteUrl=function(e,t,r){var o,a;return r||(r=Session.get("app_id")),e||(e=Session.get("object_name")),a=null!=(o=Creator.getListView(e,null))?o._id:void 0,t?Steedos.absoluteUrl("/app/"+r+"/"+e+"/view/"+t,!0):Steedos.absoluteUrl("/app/"+r+"/"+e+"/grid/"+a,!0)},Creator.getObjectRouterUrl=function(e,t,r){var o,a;return r||(r=Session.get("app_id")),e||(e=Session.get("object_name")),a=null!=(o=Creator.getListView(e,null))?o._id:void 0,t?"/app/"+r+"/"+e+"/view/"+t:"/app/"+r+"/"+e+"/grid/"+a},Creator.getListViewUrl=function(e,t,r){var o;return o=Creator.getListViewRelativeUrl(e,t,r),Creator.getRelativeUrl(o)},Creator.getListViewRelativeUrl=function(e,t,r){return"/app/"+t+"/"+e+"/grid/"+r},Creator.getSwitchListUrl=function(e,t,r){return r?Creator.getRelativeUrl("/app/"+t+"/"+e+"/"+r+"/list"):Creator.getRelativeUrl("/app/"+t+"/"+e+"/list/switch")},Creator.getRelatedObjectUrl=function(e,t,r,o,a){return a?Creator.getRelativeUrl("/app/"+t+"/"+e+"/"+r+"/"+o+"/grid?related_field_name="+a):Creator.getRelativeUrl("/app/"+t+"/"+e+"/"+r+"/"+o+"/grid")},Creator.getObjectLookupFieldOptions=function(e,t,r,o){var a,n,i,s,c,l;return n=[],e?(i=null!=(a=Creator.getObject(e))?a.fields:void 0,s=null!=a?a.icon:void 0,_.forEach(i,(function(e,t){if(!r||!e.hidden)return"select"===e.type?n.push({label:""+(e.label||t),value:""+t,icon:s}):n.push({label:e.label||t,value:t,icon:s})})),t&&_.forEach(i,(function(e,t){var o;if(!r||!e.hidden)return("lookup"===e.type||"master_detail"===e.type)&&e.reference_to&&_.isString(e.reference_to)&&(o=Creator.getObject(e.reference_to))?_.forEach(o.fields,(function(r,a){return n.push({label:(e.label||t)+"=>"+(r.label||a),value:t+"."+a,icon:null!=o?o.icon:void 0})})):void 0})),o&&(c=Creator.getRelatedObjects(e),_.each(c,(l=this,function(e){var t,r;return r=Creator.getObjectLookupFieldOptions(e.object_name,!1,!1,!1),t=Creator.getObject(e.object_name),_.each(r,(function(r){if(e.foreign_key!==r.value)return n.push({label:(t.label||t.name)+"=>"+r.label,value:t.name+"."+r.value,icon:null!=t?t.icon:void 0})}))}))),n):n},Creator.getObjectFilterFieldOptions=function(e){var t,r,o,a,n;return r=[],e?(o=null!=(t=Creator.getObject(e))?t.fields:void 0,n=Creator.getFields(e),a=null!=t?t.icon:void 0,_.forEach(o,(function(e,t){if(!_.include(["grid","object","[Object]","[object]","Object","avatar","image","markdown","html"],e.type)&&!e.hidden&&!/\w+\./.test(t)&&_.indexOf(n,t)>-1)return r.push({label:e.label||t,value:t,icon:a})})),r):r},Creator.getObjectFieldOptions=function(e){var t,r,o,a,n;return r=[],e?(o=null!=(t=Creator.getObject(e))?t.fields:void 0,n=Creator.getFields(e),a=null!=t?t.icon:void 0,_.forEach(o,(function(e,t){if(!_.include(["grid","object","[Object]","[object]","Object","markdown","html"],e.type)&&!/\w+\./.test(t)&&_.indexOf(n,t)>-1)return r.push({label:e.label||t,value:t,icon:a})})),r):r},Creator.getFiltersWithFilterFields=function(e,t,r){return e||(e=[]),r||(r=[]),(null!=r?r.length:void 0)&&r.forEach((function(r){if(_.isString(r)&&(r={field:r,required:!1}),t[r.field]&&!_.findWhere(e,{field:r.field}))return e.push({field:r.field,is_default:!0,is_required:r.required})})),e.forEach((function(e){var t;return t=r.find((function(t){return t===e.field||t.field===e.field})),_.isString(t)&&(t={field:t,required:!1}),t?(e.is_default=!0,e.is_required=t.required):(delete e.is_default,delete e.is_required)})),e},Creator.getObjectRecord=function(e,t,r,o){var a,n,i,s,c,l;if(e||(e=Session.get("object_name")),t||(t=Session.get("record_id")),Meteor.isClient){if(e!==Session.get("object_name")||t!==Session.get("record_id"))return Creator.odata.get(e,t,r,o);if(null!=(s=Template.instance())?s.record:void 0)return null!=(c=Template.instance())&&null!=(l=c.record)?l.get():void 0}if("meteor"!==(n=Creator.getObject(e)).database_name&&n.database_name){if(e&&t)return Creator.odata.get(e,t,r,o)}else if(a=Creator.getCollection(e))return i=a.findOne(t)},Creator.getObjectRecordName=function(e,t){var r,o;if(e||(e=Creator.getObjectRecord()),e&&(r="organizations"===t?"name":null!=(o=Creator.getObject(t))?o.NAME_FIELD_KEY:void 0,e&&r))return e.label||e[r]},Creator.getApp=function(e){var t,r;return(t=Session.get("_app_menus")||Session.get("app_menus"))?r=t.find((function(t){return t.id===e})):{}},Creator.getAppDashboard=function(e){var t,r;if(t=Creator.getApp(e))return r=null,_.each(Creator.Dashboards,(function(e,o){var a;if((null!=(a=e.apps)?a.indexOf(t._id):void 0)>-1)return r=e})),r},Creator.getAppDashboardComponent=function(e){var t;t=Creator.getApp(e)},Creator.getAppObjectNames=function(e){var t,r,o,a;if(t=Creator.getApp(e))return r=(o=Steedos.isMobile())?t.mobile_objects:t.objects,a=[],t&&_.each(r,(function(e){var t;if(null!=(t=Creator.getObject(e))?t.permissions.get().allowRead:void 0)return a.push(e)})),a},Creator.getUrlWithToken=function(e,t){var r,o,a;return(a={})["X-Space-Id"]=Steedos.spaceId(),a["X-User-Id"]=Steedos.userId(),a["X-Company-Ids"]=Steedos.getUserCompanyIds(),a["X-Auth-Token"]=Accounts._storedLoginToken(),Steedos.isExpression(e)&&(e=Steedos.parseSingleExpression(e,t,"#",Creator.USER_CONTEXT)),""+e+(o=(r=/(\#.+\?)|(\?[^#]*$)/g.test(e))?"&":"?")+$.param(a)},Creator.getAppMenu=function(e,t){var r;return(r=Creator.getAppMenus(e))&&r.find((function(e){return e.id===t}))},Creator.getAppMenuUrlForInternet=function(e){return Creator.getUrlWithToken(e.path,e)},Creator.getAppMenuUrl=function(e){var t;return t=e.path,"url"===e.type?e.target?Creator.getAppMenuUrlForInternet(e):"/app/-/tab_iframe/"+e.id:e.path},Creator.getAppMenus=function(e){var t,r;return(t=Session.get("_app_menus")||Session.get("app_menus"))?(r=t.find((function(t){return t.id===e})))?r.children:void 0:[]},Creator.loadAppsMenus=function(){var e,t,r;return e={},(t=Steedos.isMobile())&&(e.mobile=t),r={type:"get",data:e,success:function(e){return Session.set("app_menus",e)}},null!=Steedos?Steedos.authRequest("/service/api/apps/menus",r):void 0},Creator.creatorAppsSelector=function(e,t){var r,o,a;return r=void 0,a=void 0,_.each(e,(function(e,t){e._id||(e._id=t),e.is_creator||(e.visible=!1)})),a=_.sortBy(_.values(e),"sort"),o={},r={},_.each(a,(function(e){return"admin"===e._id?r=e:o[e._id]=e})),o.admin=r,t.length&&_.each(o,(function(e,r){t.indexOf(r)>-1?e.visible=e.is_creator:e.visible=!1})),o},Creator.visibleAppsSelector=function(e,t){var r;return null==t&&(t=!0),r=[],_.each(e,(function(e,o){(!1!==e.visible&&"admin"!==e._id||t&&"admin"===e._id)&&r.push(e)})),r},Creator.getVisibleApps=function(e){var t,r;return t=Creator._subApp.get(),r=Object.assign({},Creator.Apps,{apps:t}),Creator.visibleAppsSelector(r,e)},Creator.getVisibleAppsObjects=function(){var e,t,r;return e=Creator.getVisibleApps(),r=_.flatten(_.pluck(e,"objects")),t=(t=_.filter(Creator.Objects,(function(e){return!(r.indexOf(e.name)<0)}))).sort(Creator.sortingMethod.bind({key:"label"})),t=_.pluck(t,"name"),_.uniq(t)},Creator.getAppsObjects=function(){var e,t;return e=[],t=[],_.forEach(Creator.Apps,(function(r){return t=_.filter(r.objects,(function(e){return!e.hidden})),e=e.concat(t)})),_.uniq(e)},Creator.validateFilters=function(e,t){var r,o,a,n,i,s,c;if(a=_.map(e,(function(e){return!_.isEmpty(e)&&e})),a=_.compact(a),o="",n=a.length,t){if(t=t.replace(/\n/g,"").replace(/\s+/g," "),/[._\-!+]+/gi.test(t)&&(o="含有特殊字符。"),!o)if(s=t.match(/\d+/gi))for(s.forEach((function(e){if(e<1||e>n)return o="您的筛选条件引用了未定义的筛选器:"+e+"。"})),i=1;i<=n;)s.includes(""+i)||(o="有些筛选条件进行了定义,但未在高级筛选条件中被引用。"),i++;else o="有些筛选条件进行了定义,但未在高级筛选条件中被引用。";if(o||(c=t.match(/[a-zA-Z]+/gi))&&c.forEach((function(e){if(!/^(and|or)$/gi.test(e))return o="检查您的高级筛选条件中的拼写。"})),!o){try{Creator.eval(t.replace(/and/gi,"&&").replace(/or/gi,"||"))}catch(l){r=l,o="您的筛选器中含有特殊字符"}(/(AND)[^()]+(OR)/gi.test(t)||/(OR)[^()]+(AND)/gi.test(t))&&(o="您的筛选器必须在连续性的 AND 和 OR 表达式前后使用括号。")}}return!o||(console.log("error",o),Meteor.isClient&&toastr.error(o),!1)},Creator.formatFiltersToMongo=function(e,t){var r;if(null!=e?e.length:void 0)return e[0]instanceof Array||(e=_.map(e,(function(e){return[e.field,e.operation,e.value]}))),r=[],_.each(e,(function(e){var o,a,n,i,s;return o=e[0],a=e[1],s=Meteor.isClient?Creator.evaluateFormula(e[2]):Creator.evaluateFormula(e[2],null,t),(i={})[o]={},"="===a?i[o].$eq=s:"<>"===a?i[o].$ne=s:">"===a?i[o].$gt=s:">="===a?i[o].$gte=s:"<"===a?i[o].$lt=s:"<="===a?i[o].$lte=s:"startswith"===a?(n=new RegExp("^"+s,"i"),i[o].$regex=n):"contains"===a?(n=new RegExp(s,"i"),i[o].$regex=n):"notcontains"===a&&(n=new RegExp("^((?!"+s+").)*$","i"),i[o].$regex=n),r.push(i)})),r},Creator.isBetweenFilterOperation=function(e){var t;return"between"===e||!!(null!=(t=Creator.getBetweenTimeBuiltinValues(!0))?t[e]:void 0)},Creator.formatFiltersToDev=function(e,t,r){var o,a;if(e.length)return(null!=r?r.is_logic_or:void 0)&&(o=[],e.forEach((function(e){return o.push(e),o.push("or")})),o.pop(),e=o),a=SteedosFilters.formatFiltersToDev(e,Creator.USER_CONTEXT)},Creator.formatLogicFiltersToDev=function(e,t,r){var o;return o="["+(o=(o=t.replace(/\(\s+/gi,"(").replace(/\s+\)/gi,")").replace(/\(/g,"[").replace(/\)/g,"]").replace(/\s+/g,",").replace(/(and|or)/gi,"'$1'")).replace(/(\d)+/gi,(function(t){var o,a,n,i,s;return o=e[t-1],a=o.field,n=o.operation,s=Meteor.isClient?Creator.evaluateFormula(o.value):Creator.evaluateFormula(o.value,null,r),i=[],!0===_.isArray(s)?("="===n?_.each(s,(function(e){return i.push([a,n,e],"or")})):"<>"===n?_.each(s,(function(e){return i.push([a,n,e],"and")})):_.each(s,(function(e){return i.push([a,n,e],"or")})),"and"!==i[i.length-1]&&"or"!==i[i.length-1]||i.pop()):i=[a,n,s],JSON.stringify(i)})))+"]",Creator.eval(o)},Creator.getRelatedObjects=function(e,t,r){var o,a,n,i,s;return Meteor.isClient&&(e||(e=Session.get("object_name")),t||(t=Session.get("spaceId")),r||(r=Meteor.userId())),n=[],(o=Creator.getObject(e))?(i=Creator.getObjectRelateds(o._collection_name),0===(null!=(n=_.pluck(i,"object_name"))?n.length:void 0)?n:(s=(a=Creator.getPermissions(e,t,r)).unrelated_objects,n=_.difference(n,s),_.filter(i,(function(e){var o,i,s,c;return c=e.object_name,i=n.indexOf(c)>-1,o=null!=(s=Creator.getPermissions(c,t,r))?s.allowRead:void 0,"cms_files"===c&&(o=o&&a.allowReadFiles),i&&o})))):n},Creator.getRelatedObjectNames=function(e,t,r){var o;return o=Creator.getRelatedObjects(e,t,r),_.pluck(o,"object_name")},Creator.getRelatedObjectListActions=function(e,t,r){var o;return o=Creator.getActions(e,t,r),o=_.filter(o,(function(e){return"standard_follow"!==e.name&&("standard_query"!==e.name&&("list"===e.on&&("function"==typeof e.visible?e.visible():e.visible)))}))},Creator.getActions=function(e,t,r){var o,a,n,i,s,c;if(Meteor.isClient&&(e||(e=Session.get("object_name")),t||(t=Session.get("spaceId")),r||(r=Meteor.userId())),n=Creator.getObject(e))return i=Creator.getPermissions(e,t,r),a=i.disabled_actions,o=_.sortBy(_.values(n.actions),"sort"),_.has(n,"allow_customActions")&&(o=_.filter(o,(function(e){return _.include(n.allow_customActions,e.name)||_.include(_.keys(Creator.getObject("base").actions)||{},e.name)}))),_.has(n,"exclude_actions")&&(o=_.filter(o,(function(e){return!_.include(n.exclude_actions,e.name)}))),_.each(o,(function(e){if(Steedos.isMobile()&&["record","record_only"].indexOf(e.on)>-1&&"standard_edit"!==e.name)return"record_only"===e.on?e.on="record_only_more":e.on="record_more"})),Steedos.isMobile()&&["cms_files","cfs.files.filerecord"].indexOf(e)>-1&&(null!=(s=o.find((function(e){return"standard_edit"===e.name})))&&(s.on="record_more"),null!=(c=o.find((function(e){return"download"===e.name})))&&(c.on="record")),o=_.filter(o,(function(e){return _.indexOf(a,e.name)<0}))},Creator.getListViews=function(e,t,r){var o,a,n,i,s,c;if(Meteor.isClient&&(e||(e=Session.get("object_name")),t||(t=Session.get("spaceId")),r||(r=Meteor.userId())),e&&(s=Creator.getObject(e)))return o=(null!=(c=Creator.getPermissions(e,t,r))?c.disabled_list_views:void 0)||[],i=[],a=Steedos.isMobile(),_.each(s.list_views,(function(e,t){return e.name=t})),n=_.sortBy(_.values(s.list_views),"sort_no"),_.each(n,(function(e){var t;if(!a||"calendar"!==e.type)return"default"===e.name||(t=_.indexOf(o,e.name)>-1||e._id&&_.indexOf(o,e._id)>-1)&&e.owner!==r?void 0:i.push(e)})),i},Creator.getFields=function(e,t,r){var o,a,n;return Meteor.isClient&&(e||(e=Session.get("object_name")),t||(t=Session.get("spaceId")),r||(r=Meteor.userId())),o=Creator.getObjectFieldsName(e),n=null!=(a=Creator.getPermissions(e,t,r))?a.unreadable_fields:void 0,_.difference(o,n)},Creator.isloading=function(){return!Creator.bootstrapLoaded.get()},Creator.convertSpecialCharacter=function(e){return e.replace(/([\^\$\(\)\*\+\?\.\\\|\[\]\{\}])/g,"\\$1")},Creator.getDisabledFields=function(e){var t;return t=_.map(e,(function(e,t){return e.autoform&&e.autoform.disabled&&!e.autoform.omit&&t})),t=_.compact(t)},Creator.getHiddenFields=function(e){var t;return t=_.map(e,(function(e,t){return e.autoform&&"hidden"===e.autoform.type&&!e.autoform.omit&&t})),t=_.compact(t)},Creator.getFieldsWithNoGroup=function(e){var t;return t=_.map(e,(function(e,t){return(!e.autoform||!e.autoform.group||"-"===e.autoform.group)&&(!e.autoform||"hidden"!==e.autoform.type)&&t})),t=_.compact(t)},Creator.getSortedFieldGroupNames=function(e){var t;return t=_.map(e,(function(e){return e.autoform&&"-"!==e.autoform.group&&e.autoform.group})),t=_.compact(t),t=_.unique(t)},Creator.getFieldsForGroup=function(e,t){var r;return r=_.map(e,(function(e,r){return e.autoform&&e.autoform.group===t&&"hidden"!==e.autoform.type&&r})),r=_.compact(r)},Creator.getSystemBaseFields=function(){return["created","created_by","modified","modified_by"]},Creator.getFieldsWithoutSystemBase=function(e){return _.difference(e,Creator.getSystemBaseFields())},Creator.getFieldsWithoutOmit=function(e,t){return t=_.map(t,(function(t){var r,o;return(null==(o=(r=_.pick(e,t))[t].autoform)||!o.omit)&&t})),t=_.compact(t)},Creator.getFieldsInFirstLevel=function(e,t){return t=_.map(t,(function(t){return _.indexOf(e,t)>-1&&t})),t=_.compact(t)},Creator.getFieldsForReorder=function(e,t,r){var o,a,n,i,s,c,l,u;for(n=[],i=0,o=_.filter(t,(function(e){return!e.endsWith("_endLine")}));i-1&&(o=e[t].data_type),o):"text"},Meteor.isServer&&(Creator.getAllRelatedObjects=function(e){var t;return t=[],_.each(Creator.Objects,(function(r,o){return _.each(r.fields,(function(r,a){if("master_detail"===r.type&&r.reference_to&&r.reference_to===e)return t.push(o)}))})),Creator.getObject(e).enable_files&&t.push("cms_files"),t}),Meteor.isServer&&(Steedos.formatIndex=function(e){var t,r,o,a,n,i;return o={background:!0},(r=(null!=(a=Meteor.settings)&&null!=(n=a.datasources)&&null!=(i=n.default)?i.documentDB:void 0)||!1)&&e.length>0&&(t=e.join("."),o.name=t,t.length>52&&(o.name=t.substring(0,52))),o})},lib:{"apps.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Creator.appsByName={}},"object_recent.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};this.ObjectRecent={},ObjectRecent.insert=function(e,t,r){return Meteor.call("object_recent_viewed",e,t,Session.get("spaceId"),(function(){if(r&&_.isFunction(r))return r()}))}},"filters_transform.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},r;this.FiltersTransform={},r=function(e){return["date","datetime","time","currency","number"].includes(e)?"between":["text","textarea","html"].includes(e)?"contains":"="},FiltersTransform.queryToFilters=function(e){var t,o,a,n;if(e)return n=e.query,a=e.object_name,o=Creator.getObject(a).fields,t=[],_.each(n,(function(e,a){var n,i;if(o[a]){if(i=Creator.getFieldDataType(o,a),["date","datetime","time","currency","number"].includes(i))return t.push({field:a,operation:r(i),start_value:e,value:[e,null]});if(!["text","textarea","html"].includes(i))return["boolean"].includes(i)?t.push({field:a,operation:"=",value:e}):t.push({field:a,operation:r(i),value:e});if(_.isString(e))return t.push({field:a,operation:r(i),value:e});if(_.isArray(e))return t.push({field:a,operation:"=",value:e})}else if(a=a.replace(/(_endLine)$/,""),i=Creator.getFieldDataType(o,a),o[a]&&["date","datetime","time","currency","number"].includes(i))return(n=_.find(t,(function(e){return e.field===a})))?(n.end_value=e,n.value[1]=e):t.push({field:a,operation:r(i),end_value:e,value:[null,e]})})),t}},"form_manager.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},r,o;this.FormManager={},SimpleSchema.messages({formValidate:"[value]"}),FormManager.getRelatedInitialValues=(o=this,function(e,t,r){var o,a,n,i,s;if(!_.isString(t))throw new Meteor.Error("main_record_id must be String");return o={},i="",Creator.getRelatedList(e,t).forEach((function(e){if(r===e.object_name)return i=e.related_field_name})),a="company_id",(s=Creator.getObject(r))&&i&&s.fields[i]&&s.fields[i].reference_to_field&&(a=a+","+s.fields[i].reference_to_field),(n=Creator.odata.get(e,t,a))&&i&&n[s.fields[i].reference_to_field]&&(t=n[s.fields[i].reference_to_field]),o={},i&&("objects"===e?o[i]=Creator.getObjectRecord().name:(s=Creator.getObject(r),_.isString(s.fields[i].reference_to)?s.fields[i].multiple?o[i]=[t]:o[i]=t:o[i]={o:e,ids:[t]})),!_.has(o,"company_id")&&(null!=n?n.company_id:void 0)&&(o.company_id=n.company_id),o=Object.assign({},o,FormManager.getInitialValues(r,o))}),FormManager.getInitialValues=function(e,t){var r,o,a;return o=null!=(r=Creator.getObject(e))&&null!=(a=r.form)?a.initialValues:void 0,_.isFunction(o)?o.apply({doc:t||{}}):{}},FormManager.validate=function(e,t){var r,o,a,n,i,s;if(a=null!=(o=Creator.getObject(e))&&null!=(n=o.form)?n.validate:void 0,_.isFunction(a))try{if(s=a.apply({},[null!=(i=AutoForm.getFormValues(t))?i.insertDoc:void 0]),_.isBoolean(s)&&!1===s)return!1;if(!_.isEmpty(s)&&_.isObject(s))return _.each(s,(function(e,r){return AutoForm.addStickyValidationError(t,r,"formValidate",e),toastr.error(e)})),!1}catch(c){return r=c,console.error(r),toastr.error(r.message),!1}return!0},FormManager.onSubmit=function(e,t){var r,o,a,n,i;return o=null!=(r=Creator.getObject(e))&&null!=(n=r.form)?n.onSubmit:void 0,!(_.isFunction(o)&&(a=o.apply({},[null!=(i=AutoForm.getFormValues(t))?i.insertDoc:void 0]),!_.isEmpty(a)&&_.isObject(a)))||(_.each(a,(function(e,r){return AutoForm.addStickyValidationError(t,r,"formValidate",e),toastr.error(e)})),!1)},r=function(e,t,r){var o,a,n;return o={userId:Meteor.userId(),spaceId:Session.get("spaceId"),object_name:e},_.has(r,"previousDoc")&&(o.previousDoc=r.previousDoc),t.endsWith("Delete")?(o.id=r._id,o.doc=Creator.odata.get(e,r._id),t.startsWith("error")&&(o.error=r.error)):t.startsWith("after")?(o.id=null!=(a=r.dbDoc)?a._id:void 0,o.doc=r.dbDoc):t.startsWith("before")?(t.endsWith("Insert")||(o.id=r._id),t.endsWith("Update")?o.doc=null!=(n=r.doc)?n.$set:void 0:o.doc=r.doc):t.startsWith("error")&&(o.id=r._id,o.doc=r.doc,o.error=r.error),o},FormManager.getPreviousDoc=function(e,t,r){var o,a,n,i,s;if(("update"===r||"delete"===r)&&(o="after",a="after"+r.charAt(0).toLocaleUpperCase()+_.rest(r.split("")).join(""),i=null!=(n=Creator.getObject(e))&&null!=(s=n.form)?s[a]:void 0,_.isFunction(i)))return Creator.odata.get(e,t)},FormManager.runHook=function(e,t,o,a){var n,i,s,c,l,u,d,p;if(l=""+o+t.charAt(0).toLocaleUpperCase()+_.rest(t.split("")).join(""),"view"===t||"edit"===t)return FormManager.runViewEditHook(e,l,a.schema,a.record,a.doc);if(s=a.formId,d=null!=(u=Creator.getObject(e))&&null!=(p=u.form)?p[l]:void 0,_.isFunction(d))try{if(n=r(e,l,a),c=d.apply(n),_.isBoolean(c)&&!1===c)return!1;if(s&&"before"===o&&!_.isEmpty(c)&&_.isObject(c))return _.each(c,(function(e,t){return AutoForm.addStickyValidationError(s,t,"formValidate",e),toastr.error(e)})),!1}catch(f){return i=f,console.error(i),toastr.error(i.message),!1}return!0},FormManager.runViewEditHook=function(e,t,r,o,a){var n,i,s,c,l,u,d;if(l=null!=(u=Creator.getObject(e))&&null!=(d=u.form)?d[t]:void 0,_.isFunction(l)&&(s=r.get(),c={id:(i=a||o.get())._id,userId:Meteor.userId(),spaceId:Session.get("spaceId"),object_name:e,doc:i,schema:s},!1!==(n=l.apply(c))))return r.set(s),o.set(i)}},"grid_export.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},r,o;this.ObjectGrid={},this.GridExport={},r={equals:"=",notEqual:"!=",contains:"contains",notContains:"notcontains",startsWith:"startswith",endsWith:"=",lessThan:"<",lessThanOrEqual:"<=",greaterThan:">",greaterThanOrEqual:">=",empty:"empty"},o=function(e){var t;return t=[],_.forEach(e,(function(e,o){var a;return"between"===e.type?"number"===e.filterType?t.push([o,"between",[e.numberFrom,e.numberTo]]):e.filter?t.push([o,e.type,e.filter]):t.push([o,"between",[e.dateFrom,e.dateTo]]):_.isEmpty(e.filter)?e.operator?(a=[],e.condition1&&a.push([o,r[e.condition1.type],e.condition1.filter]),a.push(e.operator.toLocaleLowerCase()),e.condition2&&a.push([o,r[e.condition2.type],e.condition2.filter]),t.push(a)):void 0:(a=[o,r[e.type],e.filter],t.push(a))})),t},ObjectGrid.getFilters=function(e,t,r,a,n){var i,s,c,l,u,d;return s=Steedos.Page.Listview.getDefaultName(e,t),l=window.gridRefs&&window.gridRefs[s]&&window.gridRefs[s].current?window.gridRefs[s].current:window.gridRef.current,u=[],i=Creator.getListViewFilters(e,t,r,a,n),d=o(l.api.getFilterModel()),c=_.compact([].concat(i).concat(d))},GridExport.excel=function(e,t,r,a,n,i,s){var c,l,u,d,p,f,m,g,h,v,b,w,S;return u=Steedos.Page.Listview.getDefaultName(e,t),f=window.gridRefs&&window.gridRefs[u]&&window.gridRefs[u].current?window.gridRefs[u].current:window.gridRef.current,v=[],_.each(f.props.columnDefs,(function(e){if(e&&e.field)return v.push(e.field)})),b=[],_.forEach(f.api.getSortModel(),(function(e){return b.push([e.colId,e.sort])})),l=Creator.getListViewFilters(e,t,r,a,n,s),S=o(f.api.getFilterModel()),p=_.compact([].concat(l).concat(S)),c=SteedosFilters.formatFiltersToODataQuery(p),d=r?i+"-"+Creator.getObject(a).label:Creator.getObject(e).label+"-"+(null!=(h=Creator.getListView(e,t))?h.label:void 0),g=[],_.map(b,(function(e){var t;return t="desc"===e[1]?e[0]+" desc":e[0],g.push(t)})),m=g.join(","),d=encodeURIComponent(d),w=r?"/api/record/export/"+a+"?$select="+v.toString()+"&filename="+d:"/api/record/export/"+e+"?$select="+v.toString()+"&filename="+d,b.length>0&&(w=w+"&$orderby="+m),c&&(w=w+"&$filter="+c),Meteor.isCordova?Steedos.cordovaDownload(encodeURI(Steedos.absoluteUrl(w)),d+".xlsx"):window.open(w)}}},client:{"listview.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},r,o,a,n,i;n=function(e,t,r){var o,a,n;return o=null!=t?t.columns:void 0,r&&((null!=t?t.mobile_columns:void 0)?o=t.mobile_columns:(null!=(n=Creator.getObjectFirstListView(e))?n.mobile_columns:void 0)?o=n.mobile_columns:o&&(o=Creator.pickObjectMobileColumns(e,o))),o||(a=Creator.getObjectFirstListViewColumns(e,r))&&(o=a),o},o=function(e,t,r){var o,a,i,s,c,l;return s=(c=Creator.getObject(e)).NAME_FIELD_KEY,"organizations"===c.name&&(s="name"),o=[s],(i=Creator.getCollection("object_listviews").findOne(t))?o=n(e,i,r):c.list_views&&(l=c.list_views[t],o=n(e,l,r)),o=o.map((function(e){var t,r;return t=_.isObject(e)?e.field:e,(null!=(r=c.fields[t])?r.type:void 0)?t:void 0})),Creator.isCommonSpace(Session.get("spaceId"))&&o.indexOf("space")<0&&o.push("space"),"cms_files"===e&&o.push("parent"),o=_.compact(o),a=Creator.getObjectFieldsName(e),_.intersection(o,a)},i=function(e,t,r,o){var a;return r?(a=Creator.getObject(e).fields,o&&(t=t.filter((function(e){var t,o;return"master_detail"!==(null!=(o=a[e])?o.type:void 0)||(!!a[e].multiple||(a[e].reference_to?(t=a[e].reference_to,_.isFunction(t)&&(t=t())):t=a[e].optionsFunction({}).getProperty("value"),!!_.isArray(t)||t!==r))}))),t):t},r=function(e,t){var r,o;return o=Creator.getObject(e).fields,r=[],_.each(t,(function(e){var t;if(null!=(t=o[e])?t.depend_on:void 0)return r=_.union(o[e].depend_on)})),r},a=function(e,t,r){var o,a;return a=_.intersection(["owner","company_id","company_ids","locked"],_.keys(e.fields)),!r&&e.enable_tree&&(a.push("parent"),a.push("children")),(o=Creator.getObjectDefaultExtraColumns(e.name))&&(a=_.union(a,o)),a},Creator.unionSelectColumnsWithExtraAndDepandOn=function(e,t,o,n){var i,s;return i=t.name,s=a(t,o,n),e=_.union(e,s),e=_.union(e,r(i,e))},Creator.getListViewFilters=function(e,t,r,o,a,n){var i,s,c,l,u,d,p,f,m,g;if(!e)return null;if(c=Creator.getObject(e),r)l=Creator.getODataRelatedFilter(e,o,a,t,n);else{if(d=Session.get("filter_logic"),p=Session.get("filter_scope"),u=Session.get("filter_items"),s=c.fields,u&&u.length>0&&window.lodash.isArray(u[0]))return l=u,(g=Creator.getStandardQuery(e,Session.get("standard_query")))&&g.length&&(l=l?[l,"and",g]:g),(m=Session.get("grid_sidebar_filters"))&&m.length&&(l=l?[l,"and",m]:m),l||(l=null),l;i=[],_.forEach(u,(function(t){var r,o,a,n,c,l,u,d,p,f,m;if(void 0!==t.value)if(r=s[null!=t?t.field:void 0],o=Creator.getFieldDataType(s,null!=t?t.field:void 0),["text","textarea","html","code"].includes(o)){if(_.isString(t.value)&&(m=t.value.trim().split(" "),l=[],m.forEach((function(e){return e=encodeURIComponent(Creator.convertSpecialCharacter(e)),l.push([t.field,t.operation,e])})),l.length>0))return c=!1,["<>","notcontains"].includes(t.operation)&&(c=!1),i.push(Creator.formatFiltersToDev(l,e,{is_logic_or:c}))}else{if(!["lookup","master_detail"].includes(o))return i.push(t);if(a=null!=r?r.reference_to:void 0,_.isFunction(a)&&(a=a()),!_.isArray(a))return i.push(t);if((null!=(u=t.value)?u.ids:void 0)&&i.push({field:t.field+".ids",operation:t.operation,value:null!=(d=t.value)?d.ids:void 0}),null!=(p=t.value)?p.o:void 0)return n=Creator.getObject(null!=(f=t.value)?f.o:void 0),i.push({field:t.field+".o",operation:t.operation,value:n._collection_name})}})),i.length>0&&(f={filter_logic:d,filter_scope:p,filters:i}),l=Creator.getODataFilter(t,e,f),(g=Creator.getStandardQuery(e,Session.get("standard_query")))&&g.length&&(l=l?[l,"and",g]:g),r||(m=Session.get("grid_sidebar_filters"))&&m.length&&(l=l?[l,"and",m]:m)}return l||(l=null),l},Creator.getODataEndpointUrl=function(e,t,r,o){var a,n;return r?(a=Creator.formatObjectName(o),n=Creator.getListViewIsRecent(e,t)?"/api/v4/"+a+"/recent":"/api/v4/"+a):(a=Creator.formatObjectName(e),n=Creator.getListViewIsRecent(e,t)?"/api/v4/"+a+"/recent":"/api/v4/"+a),Steedos.absoluteUrl(n)},Creator.getListviewColumns=function(e,t,r,a,n,s){var c,l;return c=e.name,l=Tracker.nonreactive((function(){return o(c,a,s)})),n&&n.customRelatedListObject&&(n.columns&&(l=n.columns),s&&n.mobile_columns&&(l=n.mobile_columns),l&&(l=l.map((function(e){return _.isObject(e)?e.field:_.isString(e)?e:void 0})),l=_.uniq(_.compact(l)))),l=i(c,l,t,r)}},views:{"_helpers.coffee":function e(){var r=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Creator.helpers={object_name:function(){return Session.get("object_name")},object:function(){return Creator.getObject(Session.get("object_name"))},object_listviews:function(){return Creator.getObject("object_listviews")},objectLabel:function(e){return Creator.getObject(e).label},getOperationLabel:function(e){switch(e){case"=":return t("creator_filter_operation_equal");case"<>":return t("creator_filter_operation_unequal");case"<":return t("creator_filter_operation_less_than");case">":return t("creator_filter_operation_greater_than");case"<=":return t("creator_filter_operation_less_or_equal");case">=":return t("creator_filter_operation_greater_or_equal");case"contains":return t("creator_filter_operation_contains");case"notcontains":return t("creator_filter_operation_does_not_contain");case"startswith":return t("creator_filter_operation_starts_with");case"between":return t("creator_filter_operation_between")}},isMobile:function(){return Steedos.isMobile()}}},"template.page_template.js":function e(){Template.__checkName("page_template"),Template.page_template=new Template("Template.page_template",(function(){var e=this;return HTML.Raw('
')}))},"page_template.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Template.page_template.onRendered((function(){var e,t;return t=this,e=Session.get("app_id"),this.containerList=[],this.autorun((function(){var r;if(r=Steedos.Page.App.render(t,Session.get("pageApiName"),e))return t.containerList.push(r)}))})),Template.page_template.onDestroyed((function(){return _.each(this.containerList,(function(e){if(e)return ReactDOM.unmountComponentAtNode(e)}))}))},"template.page_object.js":function e(){Template.__checkName("page_object"),Template.page_object=new Template("Template.page_object",(function(){var e=this;return HTML.Raw('
')}))},"page_object.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Template.page_object.onRendered((function(){var e;return e=this,Steedos.Page.Object.Template.onRendered.apply(this)})),Template.page_object.onDestroyed((function(){var e;return e=this,Steedos.Page.Object.Template.onDestroyed.apply(this)}))},"template.page_record_view.js":function e(){Template.__checkName("page_record_view"),Template.page_record_view=new Template("Template.page_record_view",(function(){var e=this;return HTML.Raw('
')}))},"page_record_view.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Template.page_record_view.onRendered((function(){var e,t,r;return r=this,e=Session.get("object_name"),t=Session.get("record_id"),this.containerList=[],this.pageName=null,this.autorun((function(){var o,a,n,i,s,c,l,u,d,p;if(d=!0,(l=r.data.regions()).objectName!==(null!=(i=this.lastRegions)?i.objectName:void 0)&&(d=!1),this.lastRegions=l,d&&r.pageName)try{if(SteedosUI.refs[r.pageName])return(p={objectName:e}).recordId=Tracker.nonreactive((function(){return Session.get("record_id")})),n=(null!=(s=SteedosUI.refs[r.pageName])&&null!=(c=s.__$schema)?c.data:void 0)||{},SteedosUI.refs[r.pageName].updateProps({data:window._.defaultsDeep(p,n)})}catch(f){a=f,console.error(r.pageName+": "+a)}if(!d&&r.pageName&&SteedosUI.refs[r.pageName])try{SteedosUI.refs[r.pageName].unmount()}catch(f){a=f,console.error(r.pageName+": "+a)}if(r.data.regions&&(l=Tracker.nonreactive(r.data.regions),this.lastRegions=l,l&&l.page&&l.page.schema&&(u=l.page.schema,_.isString(u)&&(u=JSON.parse(u)),r.pageName=u.name)),e=Tracker.nonreactive((function(){return Session.get("object_name")})),t=Tracker.nonreactive((function(){return Session.get("record_id")})),o=Steedos.Page.Record.render(r,e,t))return r.containerList.push(o)}))})),Template.page_record_view.onDestroyed((function(){var e;try{SteedosUI.refs[this.pageName].unmount()}catch(t){e=t,console.error(this.pageName+": "+e)}return _.each(this.containerList,(function(e){if(e)return ReactDOM.unmountComponentAtNode(e)}))}))},"template.page_list_view.js":function e(){Template.__checkName("page_list_view"),Template.page_list_view=new Template("Template.page_list_view",(function(){var e=this;return HTML.Raw('
')}))},"page_list_view.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Template.page_list_view.onRendered((function(){var e,t;return t=this,e=Session.get("object_name"),this.containerList=[],this.pageName=null,this.autorun((function(){var r,o,a,n;if(t.pageName)try{SteedosUI.refs[t.pageName].unmount()}catch(i){o=i,console.error(t.pageName+": "+o)}if(t.data.regions&&(a=t.data.regions())&&a.page&&a.page.schema&&(n=a.page.schema,_.isString(n)&&(n=JSON.parse(n)),t.pageName=n.name),r=Steedos.Page.Listview.render(t,e))return t.containerList.push(r)}))})),Template.page_list_view.onDestroyed((function(){var e;try{SteedosUI.refs[this.pageName].unmount()}catch(t){e=t,console.error(this.pageName+": "+e)}return _.each(this.containerList,(function(e){if(e)return ReactDOM.unmountComponentAtNode(e)}))}))},"template.page_related_list_view.js":function e(){Template.__checkName("page_related_list_view"),Template.page_related_list_view=new Template("Template.page_related_list_view",(function(){var e=this;return HTML.Raw('')}))},"page_related_list_view.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Template.page_related_list_view.onRendered((function(){var e,t,r;return r=this,e=Session.get("object_name"),t=Session.get("record_id"),this.containerList=[],this.pageName=null,this.autorun((function(){var o,a,n,i;if(r.pageName)try{SteedosUI.refs[r.pageName].unmount()}catch(s){a=s,console.error(r.pageName+": "+a)}if(r.data.regions&&(n=r.data.regions())&&n.page&&n.page.schema&&(i=n.page.schema,_.isString(i)&&(i=JSON.parse(i)),r.pageName=i.name),o=Steedos.Page.RelatedListview.render(r,e,t))return r.containerList.push(o)}))})),Template.page_related_list_view.onDestroyed((function(){var e;try{SteedosUI.refs[this.pageName].unmount()}catch(t){e=t,console.error(this.pageName+": "+e)}return _.each(this.containerList,(function(e){if(e)return ReactDOM.unmountComponentAtNode(e)}))}))},"template.app_home.js":function e(){Template.__checkName("creator_app_home"),Template.creator_app_home=new Template("Template.creator_app_home",(function(){var e=this;return""}))},"app_home.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},r;r=function(e){var t,r,o,a,n;return(null!=(t=Creator.getApp(e))?t.isExternalUrl:void 0)?/^http(s?):\/\//.test(t.path)?t.blank?window.open(t.path):window.location.href=t.path:FlowRouter.go(t.path):(a=Creator.getAppMenus(e),(r=_.first(a))?"url"===(o=Object.assign({},r,{target:!1})).type&&o.is_use_iframe?FlowRouter.go(o.path):(n=Creator.getAppMenuUrl(o),FlowRouter.go(n)):FlowRouter.go("/app/"+e))},Template.creator_app_home.onRendered((function(){return this.autorun((function(){var e,t,o;if(o=Creator.bootstrapLoaded.get(),_.has(FlowRouter.current().params,"app_id")){if(e=Session.get("app_id"),o&&e)return r(e)}else if(t=Steedos.getFirstApp(),o&&t)return r(t.code||t.id)}))}))},"template.app_iframe.js":function e(){Template.__checkName("creator_app_iframe"),Template.creator_app_iframe=new Template("Template.creator_app_iframe",(function(){var e=this;return Blaze.If((function(){return Spacebars.call(e.lookup("subsReady"))}),(function(){return["\n\t\t",HTML.IFRAME({id:"app_iframe",src:function(){return Spacebars.mustache(e.lookup("url"))},style:"width: 100%; height: 100%;"}),"\n\t"]}))}))},"app_iframe.coffee":function module(){__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};var share=__coffeescriptShare;Template.creator_app_iframe.helpers({subsReady:function(){return Steedos.subsBootstrap.ready()},url:function(){var e,t;return t=Session.get("app_id"),(e=Creator.getApp(t))&&!e.on_click&&e.url?Creator.getUrlWithToken(e.url,e):""}}),Template.creator_app_iframe.events,Template.creator_app_iframe.onCreated((function(){})),Template.creator_app_iframe.onRendered((function(){var app,app_id,e,evalFunString,iframe;if(Steedos.forbidNodeContextmenu(window,"#app_iframe"),app_id=Session.get("app_id"),app=Creator.getApp(app_id),iframe=$("#app_iframe"),app&&app.on_click){evalFunString="(function(){"+app.on_click+"})()";try{return eval(evalFunString)}catch(error){return e=error,console.error("catch some error when eval the on_click script for app link:"),console.error(e.message+"\r\n"+e.stack)}}})),Template.creator_app_iframe.onDestroyed((function(){}))},"template.page_iframe.js":function e(){Template.__checkName("page_iframe"),Template.page_iframe=new Template("Template.page_iframe",(function(){var e=this;return HTML.IFRAME({name:"pageIframe",src:function(){return Spacebars.mustache(e.lookup("url"))},style:function(){return Spacebars.mustache(e.lookup("style"))},class:function(){return Spacebars.mustache(e.lookup("className"))}})}))},"page_iframe.js":function e(){var t=function(e){const{data:t}=e;"nav.click"===t.type&&FlowRouter.current().params.tab_id==t.data.id&&$("[name='pageIframe']").attr("src",$("[name='pageIframe']").attr("src"))};Template.page_iframe.helpers({url:()=>{if(Template.instance().data.regions)return(regions=Template.instance().data.regions()).queryParams.url},className:()=>{if(Template.instance().data.regions)return(regions=Template.instance().data.regions()).queryParams.className||""},style:()=>Template.instance().data.regions&&(regions=Template.instance().data.regions()).queryParams.style||"width: 100%; height: 100%;"}),Template.page_iframe.onCreated((function(){window.addEventListener("message",t)})),Template.page_iframe.onDestroyed((function(){window.removeEventListener("message",t)})),Template.page_iframe.onRendered((function(){window.Steedos.setDocumentTitle({pageName:null,tabName:null})}))},"template.initiate_approval.js":function e(){Template.__checkName("initiate_approval"),Template.initiate_approval=new Template("Template.initiate_approval",(function(){var e=this;return HTML.DIV({class:"modal fade creator-modal",id:"initiate_approval"},"\n\t\t",HTML.DIV({class:"modal-dialog slds-modal slds-fade-in-open"},"\n\t\t\t",HTML.DIV({class:"slds-modal__container"},"\n\t\t\t\t",HTML.HEADER({class:"slds-modal__header"},"\n\t\t\t\t\t",HTML.DIV({"data-dismiss":"modal"},"\n\t\t\t\t\t\t",Blaze._TemplateWith((function(){return{className:Spacebars.call("slds-modal__close slds-button__icon"),iconSize:Spacebars.call("large"),inverse:Spacebars.call(!0),iconCategory:Spacebars.call("utility"),iconName:Spacebars.call("close"),title:Spacebars.call(Spacebars.dataMustache(e.lookup("_"),"close")),variant:Spacebars.call("icon")}}),(function(){return Spacebars.include(e.lookupTemplate("steedos_button"))})),"\n\t\t\t\t\t"),"\n\t\t\t\t\t",HTML.Raw('

\n\t\t\t\t\t\t选择流程发起审批\n\t\t\t\t\t

'),"\n\t\t\t\t"),"\n\n\t\t\t\t",HTML.DIV({class:"slds-modal__content slds-p-around_medium",style:"font-size: 17px;"},"\n\t\t\t\t\t",Blaze.Each((function(){return Spacebars.call(e.lookup("flows"))}),(function(){return["\n\t\t\t\t\t",HTML.DIV({class:"weui_cells_weui_cells_access"},"\n\t\t\t\t\t\t",HTML.A({class:"weui_cell","data-flow":function(){return Spacebars.mustache(e.lookup("flow_id"))}},"\n\t\t\t\t\t\t\t",HTML.I({class:"ion ion-ios-compose-outline"}),HTML.CharRef({html:" ",str:" "}),HTML.CharRef({html:" ",str:" "}),Blaze.View("lookup:flow_name",(function(){return Spacebars.mustache(e.lookup("flow_name"))})),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\n\t\t\t\t"),"\n\n\t\t\t"),"\n\t\t"),"\n\t")}))},"initiate_approval.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Template.initiate_approval.helpers({flows:function(){return _.where(Creator.object_workflows,{object_name:this.object_name,can_add:!0})}}),Template.initiate_approval.events({"click .weui_cell":function(e,t){var r,o,a,n,i,s,c;o=e.currentTarget.dataset.flow,a=t.data.object_name,n=t.data.record_id,i=[{o:a,ids:[n]}],(s={}).methodOverride="POST",s["X-User-Id"]=Meteor.userId(),s["X-Auth-Token"]=Accounts._storedLoginToken(),c=Steedos.absoluteUrl()+"api/object/workflow/drafts?"+$.param(s),r={Instances:[{flow:o,applicant:Meteor.userId(),space:Session.get("spaceId"),record_ids:i}]},r=JSON.stringify(r),$(document.body).addClass("loading"),$.ajax({url:c,type:"POST",async:!0,data:r,dataType:"json",processData:!1,contentType:"application/json",success:function(e,r){var o;$(document.body).removeClass("loading"),e.errors?e.errors.forEach((function(e){toastr.error(e.errorMessage)})):(o=e.inserts[0],Steedos.openWindow(Steedos.absoluteUrl("/app/"+FlowRouter.current().params.app_id+"/instances/view/"+o._id+"?display="+FlowRouter.current().queryParams.display+"&side_object=instances&side_listview_id=draft")),Modal.hide(t),SteedosUI.reloadRecord(a,n),FlowRouter.reload())},error:function(e,t,r){$(document.body).removeClass("loading"),toastr.error(t)}})}})},"template.amis_action.js":function e(){Template.__checkName("amis_action"),Template.amis_action=new Template("Template.amis_action",(function(){var e=this;return HTML.LI({class:function(){return["steedos-amis-button steedos-button-",Spacebars.mustache(e.lookup("objectName")),"-",Spacebars.mustache(e.lookup("name"))," ",Spacebars.mustache(e.lookup("buttonClassName"))]}})}))},"amis_action.js":function e(){const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location;(e=e||"")&&"#"===e[0]?e=t.pathname+t.search+e:e&&"?"===e[0]&&(e=t.pathname+e);const r=e.indexOf("?"),o=e.indexOf("#");let a=~r?e.substring(0,r):~o?e.substring(0,o):e,n=~r?e.substring(r,~o?o:void 0):"",i=~o?e.substring(o):t.hash;if(a){if("/"!=a[0]&&!/^https?\:\/\//.test(a)){let e;const r=t.pathname.split("/");let o;for(r.pop();o=/^\.\.?\//.exec(a);)"../"===o[0]&&r.pop(),a=a.substring(o[0].length);a=r.concat(a).join("/")}}else a=t.pathname;return a+n+i},r=()=>({theme:"antd",getModalContainer:e=>{let t=document.querySelector("#amisModalContainer");return t||((t=document.createElement("div")).className="amis-scope",t.style.height="0px",t.id="amisModalContainer",document.body.appendChild(t)),t},notify:(e,t)=>{var r,o;(null===(r=t.props)||void 0===r?void 0:r.schema.tpl)?SteedosUI.message[e](null===(o=t.props)||void 0===o?void 0:o.schema.tpl):"string"==typeof t?SteedosUI.message[e](t):console.warn("notify",e,t)},confirm:e=>new Promise((t,r)=>SteedosUI.Modal.confirm({title:e,onOk:()=>{t(!0)},okText:"确认",cancelText:"取消"})),jumpTo:(e,r)=>{if("goBack"===e)return window.history.back();e=t(e),r&&"url"===r.actionType?!1===r.blank?FlowRouter.go(e):window.open(e):r&&e&&r.target?window.open(e,r.target):/^https?:\/\//.test(e)?window.location.replace(e):FlowRouter.go(e)}});Template.amis_action.helpers({objectName:()=>{var e=Template.instance().data;return e.button.object||e.button.object_name},name:()=>{var e;return Template.instance().data.button.name},buttonClassName:()=>{var e;return Template.instance().data.buttonClassName}}),Template.amis_action.onRendered(()=>{var e=Template.instance().data,t=e.button,o=e.buttonClassName,a=e.inMore,n=e.data,i=e.env,s=".steedos-button-"+(t.object||e.button.object_name)+"-"+t.name;const c=()=>{var e=Creator.USER_CONTEXT?Creator.USER_CONTEXT.user.language:null;return e?e="cn"===(e="zh"===(e="en"===(e=e.replace("_","-"))?"en-US":e)?"zh-CN":e)?"zh-CN":e:"zh-CN"};Promise.all([waitForThing(window,"amis")]).then(()=>{var e=amisRequire("amis/embed"),o=t.amis_schema?_.isString(t.amis_schema)?JSON.parse(t.amis_schema):t.amis_schema:{type:"service",bodyClassName:"p-0",body:[{type:"button",label:t.label}],regions:["body"]};const a=__meteor_runtime_config__.ROOT_URL,l=lodash.defaultsDeep({},{data:n},{data:{app_id:n.appId,object_name:n.objectName,record_id:n.recordId,formFactor:Steedos.isMobile()?"SMALL":"LARGE",context:{rootUrl:Meteor.isCordova?a.endsWith("/")?a.substr(0,a.length-1):a:"",tenantId:Creator.USER_CONTEXT.spaceId,userId:Creator.USER_CONTEXT.userId,authToken:Creator.USER_CONTEXT.user.authToken,user:Creator.USER_CONTEXT.user},global:{userId:Creator.USER_CONTEXT.userId,spaceId:Creator.USER_CONTEXT.spaceId,user:Creator.USER_CONTEXT.user,now:new Date},scopeId:o.name||o.id,$scopeId:o.name||o.id}});return o=lodash.defaultsDeep(l,o),e.embed(s,o,{locale:c()},Object.assign(r(),i))})})}},layout:{"template.layout.js":function e(){Template.__checkName("creatorLayout"),Template.creatorLayout=new Template("Template.creatorLayout",(function(){var e=this;return Blaze.If((function(){return Spacebars.call(e.lookup("isloading"))}),(function(){return"\n\t"}),(function(){return["\n\t\t",HTML.DIV({class:"steedos skin-blue-light creator h-full flex flex-col relative overflow-hidden"},"\n\t\t\t\n\n\t\t\t",HTML.HEADER({id:"header",class:"steedos-global-header-root flex-none"}),"\n\n\t\t\t\t\n\t\t\t",HTML.DIV({id:"main",class:function(){return["creator-content-wrapper ",Blaze.If((function(){return Spacebars.call(e.lookup("split"))}),(function(){return"split"}))]}},"\n\n\n\n\t\t\t\t",HTML.Comment(' {{#if split}}\n\t\t\t\t\t
\n\t\t\t\t\t\t{{> Template.dynamic template="creatorSidebar"}}\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t{{> Template.dynamic template=main}}\n\t\t\t\t\t
\n\t\t\t\t{{else}} '),"\n\t\t\t\t\t",Blaze._TemplateWith((function(){return{template:Spacebars.call(e.lookup("main"))}}),(function(){return Spacebars.include((function(){return Spacebars.call(Template.__dynamic)}))})),"\n\t\t\t\t",HTML.Comment(" {{/if}} "),"\n\t\t\t"),"\n\t\t\t",HTML.FOOTER({id:"footer",class:"steedos-global-footer-root flex-none"}),"\n\t\t"),"\n",HTML.Comment(' \n\t\t
\n\t\t\t{{> status}}\n\t\t
'),"\n\t\t"]}))}))},"layout.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},r,o;Template.creatorLayout.helpers(Creator.helpers),Template.creatorLayout.helpers({isloading:function(){return Creator.isloading()},collection:function(){return Session.get("action_collection")},fields:function(){return Session.get("action_fields")},collectionName:function(){return Session.get("action_collection_name")},doc:function(){return Session.get("action_record_id")},saveAndInsert:function(){var e,t,r,o;return!!(e=Session.get("action_save_and_insert"))&&(r=(t=Session.get("action_collection")).replace(/Creator.Collections./,""),null!=(o=Creator.getPermissions(r))?o.allowCreate:void 0)},split:function(){var e,t,r;return!(!(e=Creator.getApp())||"admin"!==e._id)&&(r=/\/app\/\w+\/search\//,t=Session.get("router-path"),!r.test(t))},object_name:function(){return Session.get("object_name")},recordId:function(){return Session.get("recordId")},title:function(){return"编辑"},triggerLabel:function(){return"编辑"},onAddFinish:function(){return function(e){var t,r,o,a,n;return a=e[0],n="/app/"+(t=Session.get("app_id"))+"/"+(r=Session.get("object_name"))+"/view/"+(o=a._id),FlowRouter.go(n),!0}},onEditFinish:function(){return function(){return setTimeout((function(){return FlowRouter.reload()}),1),!0}}}),Template.creatorLayout.onRendered((function(){var e;return e=Session.get("pageApiName")||Session.get("object_name")||Session.get("tab_name"),this.autorun((function(){return Steedos.Page.Header.render(Session.get("app_id"),e)})),this.autorun((function(){return Steedos.Page.Footer.render(Session.get("app_id"),e)})),this.autorun((function(){var e,t;if(t=Session.get("pageApiName")||Session.get("object_name")||Session.get("tab_name"),window.SteedosUI&&(e=SteedosUI.refs.globalHeader))return Meteor.setTimeout((function(){var t;try{return e.updateProps({location:FlowRouter.current()},(function(){return console.log("amisScope.updateProps callback.......")}))}catch(r){t=r}}),100)})),this.autorun((function(){var e,t;if(t=Session.get("pageApiName")||Session.get("object_name")||Session.get("tab_name"),window.SteedosUI&&(e=SteedosUI.refs.globalFooter))return Meteor.setTimeout((function(){var t;try{return e.updateProps({location:FlowRouter.current()},(function(){return console.log("amisScope.updateProps callback.......")}))}catch(r){t=r}}),100)}))})),r=function(){var e;return"calendar"===(null!=(e=Creator.getListView(Session.get("object_name",Session.get("list_view_id"))))?e.type:void 0)},AutoForm.hooks({creatorAddForm:{onSuccess:function(e,t){var o,a,n,i;if($("#afModal").modal("hide"),"/app/:app_id/:object_name/calendar/"!==FlowRouter._current.route.path&&!r())return"post"===t.type?(i="/app/"+(o=Session.get("app_id"))+"/"+(a=t.object_name)+"/view/"+(n=t._id),FlowRouter.go(i)):void 0}}},!1),AutoForm.hooks({creatorEditForm:{onSuccess:function(e,t){var o,a,n,i,s,c;if($("#afModal").modal("hide"),!r())return"post"===t.type&&(c="/app/"+(o=Session.get("app_id"))+"/"+(a=t.object_name)+"/view/"+(s=t._id),FlowRouter.go(c)),this.docId&&t.object_name?(i=Creator.getObjectUrl(t.object_name,this.docId),n=Creator.getObjectRecordName(this.updateDoc.$set,t.object_name),Creator.updateTempNavLabel(t.object_name,i,n)):void 0}}},!1),AutoForm.hooks({creatorCellEditForm:{onSuccess:function(e,t){var r,o;if($("#afModal").modal("hide"),this.docId&&t.object_name)return o=Creator.getObjectUrl(t.object_name,this.docId),r=Creator.getObjectRecordName(this.updateDoc.$set,t.object_name),Creator.updateTempNavLabel(t.object_name,o,r)}}},!1),o=function(e,t){return FlowRouter.current().route.path.endsWith("/:record_id")?FlowRouter.reload():window.refreshGrid()},AutoForm.hooks({creatorAddRelatedForm:{onSuccess:o}},!1)},"template.loading.js":function e(){Template.__checkName("creatorLoading"),Template.creatorLoading=new Template("Template.creatorLoading",(function(){var e=this;return HTML.Raw('
\n
\n Loading\n
\n
\n
\n
')}))},"template.empty_layout.js":function e(){Template.__checkName("empty_layout"),Template.empty_layout=new Template("Template.empty_layout",(function(){var e=this;return Blaze._TemplateWith((function(){return{template:Spacebars.call(e.lookup("main"))}}),(function(){return Spacebars.include((function(){return Spacebars.call(Template.__dynamic)}))}))}))}},mobile:{"template.admin.js":function e(){Template.__checkName("adminMenu"),Template.adminMenu=new Template("Template.adminMenu",(function(){var e=this;return HTML.DIV({class:"admin-menu mobile-template-container",id:"admin_menu"},"\n\n ",HTML.DIV({class:"admin-menu-content mobile-template-content"},"\n\t\t\t",HTML.DIV({class:"weui-panel weui-panel_access user-info"},"\n\t\t\t\t",HTML.A({class:"weui-media-box weui-media-box_appmsg"},"\n\t\t\t\t\t",HTML.DIV({class:"weui-media-box__hd",style:function(){return["background: url(",Spacebars.mustache(e.lookup("avatarURL")),")"]}},"\n\t\t\t\t\t\t",HTML.Raw('\x3c!-- --\x3e'),"\n\t\t\t\t\t"),"\n\t\t\t\t\t",HTML.DIV({class:"weui-media-box__bd"},"\n\t\t\t\t\t\t",HTML.H4({class:"weui-media-box__title"},Blaze.View("lookup:name",(function(){return Spacebars.mustache(e.lookup("name"))}))),"\n\t\t\t\t\t\t",HTML.P({class:"weui-media-box__desc"},"\n\t\t\t\t\t\t\t",Blaze.View("lookup:_",(function(){return Spacebars.mustache(e.lookup("_"),"Company")})),":",Blaze.View("lookup:spaceName",(function(){return Spacebars.mustache(e.lookup("spaceName"))})),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"),"\n\t\t\t\t"),"\n\t\t\t"),"\n\n\t\t\t",HTML.DIV({class:"weui-panel"},"\n\t\t\t\t",HTML.DIV({class:"weui-panel__bd"},"\n\t\t\t\t\t",HTML.DIV({class:"weui-media-box weui-media-box_small-appmsg"},"\n\t\t\t\t\t\t",HTML.DIV({class:"weui-cells"},"\n\t\t\t\t\t\t\t",HTML.A({class:"weui-cell weui-cell_access btn-switch-space"},"\n\t\t\t\t\t\t\t\t",HTML.DIV({class:"weui-cell__bd weui-cell_primary"},"\n\t\t\t\t\t\t\t\t\t",HTML.P(Blaze.View("lookup:_",(function(){return Spacebars.mustache(e.lookup("_"),"Switch Company")}))),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t",HTML.SPAN({class:"space-name"},Blaze.View("lookup:spaceName",(function(){return Spacebars.mustache(e.lookup("spaceName"))}))),"\n\t\t\t\t\t\t\t\t",HTML.Raw(''),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"),"\n\n\n\n\t\t\t\t\t",HTML.DIV({class:"weui-media-box weui-media-box_small-appmsg"},"\n\t\t\t\t\t\t",HTML.DIV({class:"weui-cells"},"\n\t\t\t\t\t\t\t",HTML.A({class:"weui-cell weui-cell_access btn-change-password"},"\n\t\t\t\t\t\t\t\t",HTML.DIV({class:"weui-cell__bd weui-cell_primary"},"\n\t\t\t\t\t\t\t\t\t",HTML.P(Blaze.View("lookup:_",(function(){return Spacebars.mustache(e.lookup("_"),"Change Password")}))),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t",HTML.Raw(''),"\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"),"\n\t\t\t"),"\n\n ",HTML.DIV({class:"weui-panel"},"\n\t\t\t\t",HTML.DIV({class:"weui-panel__bd"},"\n\t\t\t\t\t",HTML.DIV({class:"weui-media-box weui-media-box_small-appmsg"},"\n\t\t\t\t\t\t",HTML.DIV({class:"weui-cells"},"\n\t\t\t\t\t\t\t",HTML.A({class:"weui-cell weui-cell_access log-out steedos-logout"},"\n\t\t\t\t\t\t\t\t",HTML.DIV({class:"weui-cell__bd weui-cell_primary"},"\n\t\t\t\t\t\t\t\t\t",HTML.P(Blaze.View("lookup:_",(function(){return Spacebars.mustache(e.lookup("_"),"Logout")}))),"\n\t\t\t\t\t\t\t\t"),"\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"),"\n\t\t\t"),"\n "),"\n ")}))},"admin.coffee":function e(){var r=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Template.adminMenu.helpers({avatarURL:function(e,t,r,o){var a,n;return n=Meteor.userId(),(e=null!=(a=Creator.getCollection("users").findOne({_id:n}))?a.avatar:void 0)?Steedos.absoluteUrl("avatar/"+Meteor.userId()+"?avatar="+e):Creator.getRelativeUrl("/images/default-avatar.png")},name:function(){var e;return null!=(e=Creator.getCollection("users").findOne())?e.name:void 0},logoutUrL:function(){return Creator.getRelativeUrl("/accounts/a/#/logout")},spaceName:function(){var e;return Session.get("spaceId")&&(e=db.spaces.findOne(Session.get("spaceId")))?e.name:t("none_space_selected_title")}}),Template.adminMenu.events({"click .steedos-logout":function(){return Steedos.logout()},"click .admin-menu-back":function(e,t){var r;return r=urlQuery[urlQuery.length-2],urlQuery.pop(),t.$("#admin_menu").animateCss("fadeOutRight",(function(){return Blaze.remove(t.view),r?FlowRouter.go(r):FlowRouter.go("/app")}))},"click .btn-switch-space":function(e,t){return FlowRouter.go("/user_settings/switchspace")},"click .btn-change-password":function(e,t){return Modal.show("reset_password_modal")},"click .btn-change-avatar":function(e,t){return t.$("#mobile-avator-upload").click()},"change #mobile-avator-upload":function(e,r){var o;if(o=e.target.files[0])return $("body").addClass("loading"),db.avatars.insert(o,(function(e,r){return e?(console.error(e),toastr.error(t(e.reason)),$(document.body).removeClass("loading")):setTimeout((function(){return Meteor.call("updateUserAvatar",r._id,(function(e,r){return(null!=r?r.error:void 0)?($(document.body).removeClass("loading"),toastr.error(t(r.message))):$(document.body).removeClass("loading")}))}),3e3)}))}})},"template.switch_space.js":function e(){Template.__checkName("switchSpace"),Template.switchSpace=new Template("Template.switchSpace",(function(){var e=this;return HTML.DIV({class:"switch-space mobile-template-container",id:"switch_space"},"\n\t\t\n\t\t",HTML.DIV({class:"switch-space-content mobile-template-content"},"\n\t\t\t",HTML.DIV({class:"weui-panel"},"\n\t\t\t\t",HTML.DIV({class:"weui-panel__bd"},"\n\t\t\t\t\t",HTML.DIV({class:"weui-media-box weui-media-box_small-appmsg"},"\n\t\t\t\t\t\t",HTML.DIV({class:"weui-cells"},"\n\t\t\t\t\t\t\t",Blaze.Each((function(){return Spacebars.call(e.lookup("spaces"))}),(function(){return["\n\t\t\t\t\t\t\t",HTML.A({class:"weui-cell weui-cell_access switchSpace"},"\n\t\t\t\t\t\t\t\t",HTML.DIV({class:"weui-cell__bd weui-cell_primary"},"\n\t\t\t\t\t\t\t\t\t",HTML.P(Blaze.View("lookup:name",(function(){return Spacebars.mustache(e.lookup("name"))}))),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t",Blaze.If((function(){return Spacebars.dataMustache(e.lookup("current_space"),e.lookup("_id"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t",HTML.SPAN({class:"weui-icon-success-no-circle"}),"\n\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t"),"\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"),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"switch_space.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Template.switchSpace.helpers({spaces:function(){return db.spaces.find()},current_space:function(e){return e===Session.get("spaceId")}}),Template.switchSpace.events({"click .switchSpace":function(e,t){return Steedos.setSpaceId(this._id),FlowRouter.go("/app")},"click .switch-space-back":function(e,t){var r;return r=urlQuery[urlQuery.length-2],urlQuery.pop(),t.$("#switch_space").animateCss("fadeOutRight",(function(){return Blaze.remove(t.view),r?FlowRouter.go(r):FlowRouter.go("/app")}))}})}},"core.coffee":function e(){var r=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},o;Creator.Pages={},o=["owner","company_id","company_ids","locked"],Steedos.addPage=function(e,t){if(e)return Creator.Pages[e]=t},Creator.getLayout=function(e){return e||(e=Session.get("app_id")),"steedos"===e?"steedosLayout":"creatorLayout"},Creator.createObject=function(e,t){var r,o;return o=Creator.getObject(e),r="Creator.Collections."+e,Session.set("action_collection",r),Session.set("action_save_and_insert",!0),Session.set("action_collection_name",o.label),Session.set("action_object_name",e),Session.set("action_fields",void 0),Session.set("cmDoc",t),Meteor.defer((function(){return $(".creator-add").click()}))},Meteor.isClient&&(Creator.TabularSelectedIds={},Meteor.autorun((function(){var e,t;if(e=Session.get("list_view_id"),t=Session.get("object_name"))return Creator.TabularSelectedIds[t]=[]})),Creator.remainCheckboxState=function(e){var t,r,o,a,n,i,s;if((t=e.find(".select-all")).length&&(a=(o=null!=(n=t[0])?n.dataset:void 0).objectName,i=Creator.TabularSelectedIds[a]))return(r=e.find(".select-one")).each((function(e,t){var r;return r=i.indexOf(t.dataset.id)>-1,$(t).prop("checked",r)})),(s=i.length)>0&&r.length!==s?t.prop("indeterminate",!0):(t.prop("indeterminate",!1),0===s?t.prop("checked",!1):s===r.length?t.prop("checked",!0):void 0)},Creator.isListViewFilterEditable=function(e){return!e.shared||e.shared&&e.owner===Steedos.userId()},Creator.getODataFilter=function(e,t,r){var o,a,n,i,s,c,l,u,d,p,f,m,g;if(g=Meteor.userId(),m=Session.get("spaceId"),a=Creator.Collections.object_listviews.findOne(e))(l=Creator.isListViewFilterEditable(a))||((o={}).filter_scope=a.filter_scope,o.filters=a.filters);else if(o={},m&&g){if(!(u=Creator.getListView(t,e)))return["_id","=",-1];o.filter_scope=u.filter_scope,o.filters=u.filters}if(Creator.isCloudAdminSpace(m)&&_.include(["users","space_users","spaces"],t)&&delete o.filters,o&&(r?(o.filter_scope&&(r.filter_scope=o.filter_scope),_.isFunction(r.filters)||(null!=(d=r.filters)?d.length:void 0)?(_.isFunction(o.filters)||(null!=(p=o.filters)?p.length:void 0))&&(r.filters=[[r.filters,"and",o.filters]]):r.filters=o.filters):r=o),r||(r={}),n=r.filter_logic,i=r.filter_scope,s=r.filters,f=[],_.isFunction(s)&&(s=s()),a?n?(c=Creator.formatLogicFiltersToDev(s,n),f.length?f.push("and",c):f.push(c)):s&&s.length>0&&(f.length>0&&f.push("and"),(s=Creator.formatFiltersToDev(s,t))&&s.length>0&&(s=[s]),_.each(s,(function(e){return f.push(e)}))):m&&g&&("users"!==t||Creator.isCloudAdminSpace(m)||f.push(["_id","=",g]),s&&(s=Creator.formatFiltersToDev(s,t))&&s.length>0&&(s=[s],f.length>0&&f.push("and"),_.each(s,(function(e){if("spaces"!==t||e.length>0&&"_id"!==e[0])return f.push(e)})))),"mine"===i&&(f.length>0&&f.push("and"),f.push(["owner","=",g])),0!==f.length)return f},Creator.getODataRelatedFilter=function(e,t,r,o,a){var n,i,s,c,l,u,d,p,f,m,g,h,v,b,w,S,C;if(r&&(S=Steedos.spaceId(),C=Meteor.userId(),v=a?[a]:Creator.getRelatedList(e,r),h="",u="",w=[],n=function(e){return w.length>0&&w.push("and"),w.push(e)},_.each(v,(function(e){if(e.object_name===t)return e.filtersFunction?u=e.filtersFunction:h=e.related_field_name})),h||u)){if(h=h.replace(/\./g,"/"),o&&(i=Creator.getListView(t,o))){if(s=i.filter_logic,c=i.filter_scope,l=i.filters,u)return l=u(Creator.odata.get(e,r));s?(d=Creator.formatLogicFiltersToDev(l,s),n(d)):l&&l.length>0&&(l=_.map(l,(function(e){return _.isObject(e)&&!_.isArray(e)?Meteor.isClient&&_.isString(null!=e?e._value:void 0)?[e.field,e.operation,Creator.eval("("+e._value+")")()]:[e.field,e.operation,e.value]:e})),(l=Creator.formatFiltersToDev(l,t))&&l.length>0&&(l=[l]),_.each(l,(function(e){return n(e)})))}if("cfs.files.filerecord"===t&&n(["metadata/space","=",S]),m=Creator.getObject(t),p=t===e&&(null!=m?m.enable_tree:void 0),"cms_files"===t?(n(["parent/o","=",e]),n(["parent/ids","=",r])):"objects"===e?n([h,"=",r]):p||((b=null!=m?m.fields:void 0)&&(g=b[h]),g&&g.reference_to_field&&(f=Creator.odata.get(e,r,g.reference_to_field),"permission_fields"===t&&"object_fields"===e&&n(["object_name","=",f.object]),f&&f[g.reference_to_field]&&(r=f[g.reference_to_field])),!g||"master_detail"!==g.type&&"lookup"!==g.type?g&&"grid"===g.type?(n([h+".o","=",e]),n([h+".ids","=",r])):n([h,"=",r]):_.isFunction(g.reference_to)?_.isArray(g.reference_to())?n([h+".ids","=",r]):n([h,"=",r]):_.isArray(g.reference_to)?n([h+".ids","=",r]):n([h,"=",r])),"mine"===c&&n(["owner","=",C]),0!==w.length)return w}},Creator.getJsReportUrlQuery=function(){var e,t,r;return r="?space_id="+Steedos.getSpaceId(),(t=Tracker.nonreactive((function(){return Session.get("filter_items")})))&&(r+="&user_filters="+(e=encodeURI(JSON.stringify(t)))),r},Creator.getJsReportViewUrl=function(e){var t;return t=Creator.getRelativeUrl("/plugins/jsreport/web/viewer_db/"+e),t+=Creator.getJsReportUrlQuery()},Creator.getJsReportExcelUrl=function(e){var t;return t=Creator.getRelativeUrl("/plugins/jsreport/api/report_db/"+e+"/excel"),t+=Creator.getJsReportUrlQuery()},Creator.getJsReportPdfUrl=function(e){var t;return t=Creator.getRelativeUrl("/plugins/jsreport/api/report_db/"+e+"/pdf"),t+=Creator.getJsReportUrlQuery()},Creator.getStimulsoftReportViewUrl=function(e){var t;return t=Creator.getRelativeUrl("/plugins/stimulsoft/web/viewer_db/"+e),t+=Creator.getJsReportUrlQuery()},Creator.getStimulsoftReportDesignerUrl=function(e){var t;return t=Creator.getRelativeUrl("/plugins/stimulsoft/web/designer_db/"+e),t+=Creator.getJsReportUrlQuery()},Creator.objectOdataSelectFields=function(e){var t,r;return t=e.fields,r=(r=_.keys(t)).filter((function(e){return e.indexOf(".")<0})),e&&["default","meteor"].indexOf(e.database_name||"default")>-1&&(r=_.union(r.concat(o))),r.join(",")},Creator.objectOdataExpandFields=function(e,t){var r,o;return r=[],o=e.fields,t||(t=_.keys(o)),_.each(t,(function(e){var t,a,n;if(("master_detail"===(null!=(a=o[e])?a.type:void 0)||"lookup"===(null!=(n=o[e])?n.type:void 0))&&(o[e].reference_to?(t=o[e].reference_to,_.isFunction(t)&&(t=t())):_.isFunction(o[e].optionsFunction)&&(t=o[e].optionsFunction({}).getProperty("value")),_.isArray(t)||(t=[t]),t=_.map(t,(function(e){var t,r;return t=(null!=(r=Creator.getObject(e))?r.NAME_FIELD_KEY:void 0)||"name"})),t=_.compact(t),(t=(t=_.uniq(t)).join(","))&&e.indexOf("$")<0))return e.indexOf(".")<0?r.push(e):r.push(e.replace(".","/"))})),r.join(",")},Creator.relatedObjectFileUploadHandler=function(e,r){var o,a,n,i,s,c,l,u,d,p;for(u=null!=(o=e.currentTarget.dataset)?o.parent:void 0,s=e.currentTarget.files,c=0,d=Session.get("record_id"),l=Session.get("object_name"),p=Session.get("spaceId");c0&&(t=!0),!t})),t},Creator.pushCurrentPathToUrlQuery=function(){var e;if((e=FlowRouter.current().path)!==urlQuery[urlQuery.length-1])return urlQuery.push(e)},Creator.getStandardQuery=function(e,t){var r,o,a,n,i,s;if(o=Creator.getObject(e).fields,t&&t.query&&_.size(t.query)&&t.object_name===e)return a=t.object_name,i=t.query,s=[],t.is_mini?_.each(i,(function(e,t){var r,n,i,c;if(o[t])if(r=Creator.getFieldDataType(o,t),["currency","number"].includes(r)){if(!_.isString(e))return s.push([t,"=",e]);if(c=e.trim().split(" "),n=[],c.forEach((function(e){var r,o;try{if(o=Number(e),_.isNumber(o)&&!_.isNaN(o))return n.push([t,"=",o])}catch(a){return r=a,console.error(r)}})),n.length>0)return s.push(Creator.formatFiltersToDev(n,a,{is_logic_or:!1}))}else if(["text","textarea","html","select","autonumber","url","email"].includes(r))if(_.isString(e)){if(c=e.trim().split(" "),i=[],c.forEach((function(e){return e=encodeURIComponent(Creator.convertSpecialCharacter(e)),"select"===r&&o[t].multiple?i.push([t,"=",e]):i.push([t,"contains",e])})),i.length>0)return s.push(Creator.formatFiltersToDev(i,a,{is_logic_or:!1}))}else if(_.isArray(e))return s.push([t,"=",e])})):_.each(i,(function(e,t){var r,n,i,c,l,u;if(o[t]){if(n=Creator.getFieldDataType(o,t),["date","datetime","time","currency","number"].includes(n))return s.push([t,">=",e]);if(["text","textarea","html"].includes(n)){if(_.isString(e)){if(u=e.trim().split(" "),l=[],u.forEach((function(e){return e=encodeURIComponent(Creator.convertSpecialCharacter(e)),l.push([t,"contains",e])})),l.length>0)return s.push(Creator.formatFiltersToDev(l,a,{is_logic_or:!1}))}else if(_.isArray(e))return s.push([t,"=",e])}else{if(["boolean"].includes(n))return s.push([t,"=",JSON.parse(e)]);if(!["lookup","master_detail"].includes(n))return s.push([t,"=",e]);if(i=null!=(r=o[t])?r.reference_to:void 0,_.isFunction(i)&&(i=i()),!_.isArray(i))return s.push([t,"=",e]);if((null!=e?e.ids:void 0)&&s.push({field:t+".ids",operation:"=",value:null!=e?e.ids:void 0}),null!=e?e.o:void 0)return c=Creator.getObject(null!=e?e.o:void 0),s.push({field:t+".o",operation:"=",value:c._collection_name})}}else if(t=t.replace(/(_endLine)$/,""),n=Creator.getFieldDataType(o,t),o[t]&&["date","datetime","time","currency","number"].includes(n))return s.push([t,"<=",e])})),n={is_logic_or:r=!!t.is_mini},Creator.formatFiltersToDev(s,a,n);delete Session.keys.standard_query},Creator.getSafeObjectUrl=function(e,t,r){var o;return _.isString(e)?(o="users"===e?Creator.getObject("space_users"):Creator.getObject(e)).permissions.get().allowRead?Creator.getObjectUrl(e,t,r):void 0:""},Creator.formatFileSize=function(e){var t,r;return r="KB",(t=e/1024)>1024&&(t/=1024,r="MB"),t>1024&&(t/=1024,r="GB"),t.toFixed(2)+r},Creator.getTableCellData=function(e){var r,o,a,n,i,s,c,l,u,d,p,f,m,g,h,v,b,w,S,C,y,j,T,R;if(d=[],R=e.val,g=e.object_name,y=(j=Creator.getObject(g)).NAME_FIELD_KEY,"organizations"===g&&(y="name"),o=e.field){if(a=o.type,"formula"===o.type)a=o.data_type;else if("select"===o.type&&o.data_type&&"text"!==o.data_type)a=o.data_type;else if("summary"===o.type)if("count"===o.summary_type)a="number";else{if(!(C=Creator.getObject(o.summary_object)))throw new Meteor.Error(500,"The summary_object '"+o.summary_object+"' is not found for the field '"+o.name+"'");if(!(S=C.fields[o.summary_field]))throw new Meteor.Error(500,"The summary_field '"+o.summary_field+"' is not found for the field '"+o.name+"'");"formula"!==(a=S.type)&&"summary"!==a||(a=S.data_type),_.isNumber(o.scale)||(r=function(e){var t,o;return _.isNumber(e.scale)?e.scale:"summary"===e.type&&(o=Creator.getObject(e.summary_object))?(t=o.fields[e.summary_field])?r(t):null:void 0},o.scale=r(S))}return v=null!=(h=e.field)?h.reference_to:void 0,_.isFunction(v)&&(v=v()),"grid"===a?d.push({isTable:!0}):"location"===a?d.push({value:(null!=R?R.address:void 0)||"",id:e._id}):"lookup"!==a&&"master_detail"!==a||_.isEmpty(R)?"image"===a?"string"==typeof R?d.push({value:R,id:e._id,isImage:!0,baseUrl:Creator.getRelativeUrl("/api/files/images")}):d.push({value:R,id:e._id,isImages:!0,baseUrl:Creator.getRelativeUrl("/api/files/images")}):"avatar"===a?"string"==typeof R?d.push({value:R,id:e._id,isImage:!0,baseUrl:Creator.getRelativeUrl("/api/files/avatars")}):d.push({value:R,id:e._id,isImages:!0,baseUrl:Creator.getRelativeUrl("/api/files/avatars")}):"code"===a?(R=R?"...":"",d.push({value:R,id:e._id})):"password"===a?(R=R?"******":"",d.push({value:R,id:e._id})):"url"===a?((null!=(f=R)?f.startsWith("http"):void 0)||(f=Steedos.absoluteUrl(encodeURI(f))),d.push({value:R,href:f,id:e._id,isUrl:!0})):"email"===a?d.push({value:R,href:f,id:e._id,isEmail:!0}):"boolean"===a||"toggle"===a?(R=e.val?t("YES"):t("NO"),d.push({value:R,checked:e.val,id:e._id,isBoolean:!0})):"select"===a?(s=o.allOptions||o.options,u=e.doc||{},c=e.record_val,_.isFunction(o.options)&&(s=o.options(c||u)),_.isFunction(o.optionsFunction)&&(s=o.optionsFunction(c||u)),w=e.val,_.isArray(w)||(w=[w]),m=[],_.each(s,(function(e){if(_.indexOf(w,e.value)>-1)return m.push({label:e.label,value:e.value})})),R=(R=m.map((function(e){return e.label}))).join(","),d.push({value:R,items:m,id:e._id,isSelects:!0})):(R&&["datetime","date","time"].indexOf(a)>=0?"odata"===e.agreement?"datetime"===a?"string"==typeof e.val&&/\d+Z$/.test(e.val)?R=moment(e.val).format("YYYY-MM-DD H:mm"):(T=moment().utcOffset()/60,R=moment(e.val).add(T,"hours").format("YYYY-MM-DD H:mm")):"date"===a&&(R="string"==typeof e.val&&/\d+Z$/.test(e.val)?moment.utc(e.val).format("YYYY-MM-DD"):moment(e.val).format("YYYY-MM-DD")):"datetime"===a?R=moment(e.val).format("YYYY-MM-DD H:mm"):"date"===a?R=moment.utc(e.val).format("YYYY-MM-DD"):"time"===a&&(R=moment.utc(e.val).format("HH:mm")):null===e.val?R="":"lookup"===a?_.isFunction(o.optionsFunction)&&(u=e.doc||{},(l=R)&&(_.isArray(l)||(l=[l]),(b=_.filter(o.optionsFunction(u),(function(e){return l.indexOf(e.value)>-1})))&&(R=b.getProperty("label")))):"filesize"===a?R=Creator.formatFileSize(R):["number","currency","percent"].indexOf(a)>-1&&_.isNumber(R)?(p=0,p=_.isNumber(o.scale)?o.scale:"currency"===a?2:0,"percent"===a&&(R*=100),R=Steedos.numberToString(R,p),"percent"===a&&(R+="%")):"markdown"===a?_.isEmpty(R)||(R=Spacebars.SafeString(marked(R))):"html"===a?_.isEmpty(R)||(R=Spacebars.SafeString(R)):"textarea"===a&&R&&(R=(R=R.replace(/\n/g,"\n
")).replace(/ /g," ")),"record_details"!==e.parent_view&&e.field_name===y&&(f=Creator.getObjectUrl(e.object_name,e._id)),d.push({value:R,href:f,id:e._id,type:a})):_.isFunction(o.optionsFunction)&&"company"!==v?(u=e.doc||{},c=e.record_val,(l=R)&&(l=_.isArray(l)?l.map((function(e){return _.isObject(e)?e._id:e})):_.isObject(l)?[l._id]:[l],i=o.optionsFunction(c||u),(b=_.filter(i,(function(e){return l.indexOf(null!=e?e.value:void 0)>-1})))&&(R&&_.isArray(R)&&_.isArray(b)&&(b=Creator.getOrderlySetByIds(b,R,"value")),R=b.getProperty("label"))),v?"objects"===v?_.each(b,(function(t){var r,o,a;return a=t.label,(null!=(r=Creator.getObject(t.value))?r._id:void 0)?(o=Creator.getSafeObjectUrl(v,r._id),d.push({reference_to:v,rid:a,value:a,id:e._id,href:o})):d.push({value:R,id:e._id})})):(n=e.val,_.isArray(n)||(n=n?[n]:[]),_.each(n,(function(t){var r,o,a;return _.isString(t)?(b=_.filter(i,(function(e){return t===(null!=e?e.value:void 0)})),d.push({value:b.getProperty("label"),id:e._id})):(v=t["reference_to._o"]||v,o=t._id,a=t._NAME_FIELD_VALUE,r=Creator.getSafeObjectUrl(v,o),d.push({reference_to:v,rid:o,value:a,href:r,id:e._id}))}))):d.push({value:R,id:e._id})):(_.isArray(R)||(R=R?[R]:[]),_.each(R,(function(t){var r,o,a;if(t)return v=t["reference_to._o"]||v,o=t._id,a=t._NAME_FIELD_VALUE,_.isString(t)&&(o=t,a=t),r=Creator.getSafeObjectUrl(v,o),d.push({reference_to:v,rid:o,value:a,href:r,id:e._id})}))),d}},Creator.openSafeObjectUrl=function(e,t){var r;return Steedos.isMobile()||(r=Creator.getSafeObjectUrl(e,t,"-"))&&window.open(r,"_blank","width=800, height=600, left=50, top= 50, toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes"),"undefined"!=typeof event&&null!==event&&event.stopPropagation(),"undefined"!=typeof event&&null!==event&&event.preventDefault(),!1},Creator.getAppLabel=function(e){return e||(e=Creator.getApp()),e?e.label?t(e.label):t(e.name):""},Creator.measureWidth=_.memoize((function(e,t,r){var o,a,n,i;return(o=arguments.callee.canvas)||(o=document.createElement("canvas"),(n=document.createDocumentFragment()).appendChild(o),arguments.callee.canvas=o),(a=o.getContext("2d")).font=t,i=a.measureText(e).width,r&&i>r?r:i})),Creator.showPreviewButton=function(e){var t,r,o,a,n;return!!((null!=(n=null!=(t=Meteor.settings)&&null!=(r=t.public)?r.webservices:void 0)&&null!=(o=n.officeOnline)?o.url:void 0)&&Steedos.isOfficeFile(e)||(null!=n&&null!=(a=n.pdfOnline)?a.url:void 0)&&Steedos.isPdfFile(e))},Creator.officeOnlinePreview=function(e,t){var r,o,a,n,i,s,c,l,u,d,p,f,m,_,g,h;return a=null!=(s=Meteor.settings)&&null!=(c=s.public)&&null!=(l=c.webservices)&&null!=(u=l.officeOnline)?u.url:void 0,i=null!=(d=Meteor.settings)&&null!=(p=d.public)&&null!=(f=p.webservices)&&null!=(m=f.pdfOnline)?m.url:void 0,a&&""!==a||i&&""!==i?(h=Meteor.userId(),_=Steedos.spaceId(),r={authToken:o=Accounts._storedLoginToken()},e=e+"?token="+(g=window.btoa(JSON.stringify(r))),Steedos.isPdfFile(t)?(n=e,i&&""!==i&&(n=i+encodeURIComponent(e)),Steedos.openWindow(n)):(n=a+encodeURIComponent(e),Steedos.openWindow(n))):(toastr.error(TAPi18n.__("creator_office_online_web_url_required")),!1)},Creator.isImageAttachment=function(e){var t,r;return!(e.split(".").length<2)&&(t=e.split(".").pop().toLowerCase(),-1!==(r=["png","jpg","jpeg","bmp","gif","webp","psd","svg","tiff"]).indexOf(t))},Creator.isHtmlAttachment=function(e){var t,r;return!(e.split(".").length<2)&&(t=e.split(".").pop().toLowerCase(),-1!==(r=["html","htm"]).indexOf(t))}),Meteor.startup((function(){return $(document).on("click",(function(e){return $(e.target).closest(".slds-table td").length<1?$(".slds-table").addClass("slds-no-cell-focus"):$(".slds-table").removeClass("slds-no-cell-focus")})),$(window).resize((function(){if($(".list-table-container table.dataTable").length)return $(".list-table-container table.dataTable thead th").each((function(){var e;return e=$(this).outerWidth(),$(".slds-th__action",this).css("width",e+"px")}))})),$(document).keydown((function(e){if("13"===e.keyCode||"Enter"===e.key){if($(".modal").length>1)return;if("TEXTAREA"!==e.target.tagName||$(e.target).closest("div").hasClass("bootstrap-tagsinput")){if("update"===Session.get("cmOperation"))return e.preventDefault(),e.stopPropagation(),$(".creator-auotform-modals .btn-update").click();if("insert"===Session.get("cmOperation"))return e.preventDefault(),e.stopPropagation(),$(".creator-auotform-modals .btn-insert").click()}}}))}))},"colors.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},r,o,a,n,i;n="border-radius: 10px;padding: 1px 6px;display: inline-block;",i=function(e){return 3===(e=e.slice(1)).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),{r:Number.parseInt(e.slice(0,2),16),g:Number.parseInt(e.slice(2,4),16),b:Number.parseInt(e.slice(4,6),16)}},a=function(e,t,r){var o,a,n,s;return.299*(n=(s=i(e)).r)+.587*(a=s.g)+.114*(o=s.b)>186?r:t},o=function(e,t,r){var o,a,n,s,c,l,u;return(o=.2126*(n=(u=[(c=(l=i(e)).r)/255,(s=l.g)/255,(a=l.b)/255]).map((function(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})))[0]+.7152*n[1]+.0722*n[2])>.179?r:t},r=function(e){var t,r;return r=[],t=e.fields,_.each(t,(function(t,a){var i;if(i=t.options,_.isFunction(i)&&(i=i({})),"select"===t.type&&(null!=i?i.length:void 0))return _.each(i,(function(t){var i,s;if(t.color)return i=t.color,/^#/.test(i)||(i="#"+i),s=o(i,"#fff","#333"),r.push(".creator-cell-color-"+e.name+"-"+a+"-"+t.value+"{"+n+"background:"+i+";color:"+s+";}")}))})),r},Creator.appendObjectFieldsColorStyles=function(){var e,t;return $("#object_fields_color_styles").remove(),t=[],_.each(Creator.Objects,(function(e){return t=_.union(t,r(e))})),t.push(".creator-cell-multiple-color{\n\tmargin-right:1px;\n}\n@media (max-width:767px) {\n\t.creator-cell-multiple-color{\n\t\tmargin-right:4px;\n\t}\n}"),e=$('"),$("head").append(e)}},"temp_navs.coffee":function e(){var r=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},o,a,n,i,s,c,l,u,d,p;s=!1,a=function(){var e;if(e=sessionStorage.getItem("temp_navs"))return e.split(",").map((function(e){var t;return{name:(t=e.split(":"))[0],url:t[1],label:t[2],is_temp:!0}}))},n=function(e,t,r){return sessionStorage.getItem("temp_navs_id")},d=function(e){return sessionStorage.setItem("temp_navs_id",e)},p=function(e){var t,r;return e||(e=[]),t=(r=e.map((function(e){var t;return t=e.name,e.url&&(t+=":"+e.url),e.label&&(t+=":"+e.label),t}))).join(","),sessionStorage.setItem("temp_navs",t)},c=[],o=function(e,t){var r;return r=t||Creator.getObjectUrl(e),c.push(r)},u=function(e,t){var r,o;if(o=t||Creator.getObjectUrl(e),(r=c.indexOf(o))>-1)return c.splice(r,1)},i=function(e,t){var r,o,a,n,i,s;for(r=t||Creator.getObjectUrl(e),o=2,s=6,i=!1;!i&&o<8&&!((a=urlQuery.length-o)<0);)n=urlQuery[a],__meteor_runtime_config__.ROOT_URL_PATH_PREFIX+n!==r?(i=n&&c.indexOf(__meteor_runtime_config__.ROOT_URL_PATH_PREFIX+n)<0,o++):o++;return i?n:null},l=function(e,t,r,a){var n,s,c,l,u,d,p,f,m;return n=Session.get("object_name"),s=Session.get("record_id"),t?(l=(c=Creator.getObjectUrl(n,s))===t)||(l=FlowRouter.current().path===t):l=n===e,l?(d=i(e,t),o(e,t),d?(FlowRouter.go(d),urlQuery.pop(),urlQuery.pop()):((f=r[a])||(f=r[a-1]),f?(m=f.url?f.url:Creator.getObjectUrl(f.name),FlowRouter.redirect(m)):(u=(p=Creator.getAppMenus())[p.length-1],FlowRouter.redirect(u.path)))):o(e,t)},Creator.getTempNavs=function(){var e;return(e=Session.get("temp_navs"))||(e=a())&&Session.set("temp_navs",e),e},Creator.getTempNavsId=function(){var e;return(e=Session.get("temp_navs_id"))||(e=n())&&Session.set("temp_navs_id",e),e},Creator.createTempNav=function(e,t,r){var o,a;if(t||!(["users","cms_files","cfs.files.filerecord"].indexOf(e)>-1))return(a=Creator.getTempNavs())||(a=[]),(o=a.find((function(r){return t?r.name===e&&r.url===t:r.name===e})))?void 0:(a.push({name:e,url:t,label:r,is_temp:!0}),Session.set("temp_navs",a),p(a),u(e,t))},Creator.updateTempNavLabel=function(e,t,r){var o,a;if(t&&r)return(a=Creator.getTempNavs())||(a=[]),(o=a.find((function(r){return r.name===e&&r.url===t})))?(o.label=r,Session.set("temp_navs",a),p(a)):void 0},Creator.removeTempNavItem=function(e,t){var r,o,a;if((a=Session.get("temp_navs"))&&(o=null,r=a.filter((function(r,a){var n;return(n=t?r.name===e&&r.url===t:r.name===e)&&(o=a),!n})),_.isNumber(o)))return s=!0,l(e,t,r,o),Meteor.defer((function(){return Session.set("temp_navs",r),p(r),s=!1})),!0},Creator.resetTempNavsIfNeeded=function(){var e,t,r;if((t=(r=Creator.getTempNavsId())!==(e=Meteor.userId()+":"+Steedos.spaceId()+":"+Session.get("app_id")))&&(Session.set("temp_navs",null),p(null),c.length=0),t||!Session.get("temp_navs_id"))return Session.set("temp_navs_id",e),d(e)},Meteor.startup((function(){if(!Steedos.isMobile())return Tracker.autorun((function(){var e,t;if(Creator.bootstrapLoaded.get()&&(t=Session.get("spaceId"),e=Session.get("app_id"),t&&e))return Creator.resetTempNavsIfNeeded()})),Tracker.autorun((function(e){var r,o,a,n,i,c,l,u,d,p,f,m,g,h,v;if(u=Session.get("object_name"),h=Session.get("tab_name"),p=Session.get("record_id"),i=Creator.getAppMenus(),u&&i&&i.length&&(f=Session.get("record_name"),n=_.pluck(i,"id"),o=Session.get("temp_navs_force_create"),(null!=n?n.indexOf(u||h):void 0)<0||o)){if(o&&s)return void Session.set("temp_navs_force_create",!1);if(!(l=Creator.getObject(u)))return;if(p){if(!(d=Creator.getObjectRecord()))return;if(v=Creator.getObjectUrl(u,p),o&&(r=urlQuery[urlQuery.length-3])&&(g=new RegExp(r+"$")).test(v))return void Session.set("temp_navs_force_create",!1);a=f||("cfs.files.filerecord"===u?t("cfs_files_filerecord__object")+"-"+(null!=d&&null!=(m=d.original)?m.name:void 0):d[c=l.NAME_FIELD_KEY||"name"]),Creator.createTempNav(u,v,a)}else Creator.createTempNav(u);if(o)return Session.set("temp_navs_force_create",!1)}}))}))},"router.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},r,o,a,n;this.urlQuery=new Array,o=function(e,t){var r,o;Meteor.userId()&&(Creator.pushCurrentPathToUrlQuery(),"-"!==(r=e.params.app_id)&&r&&Session.get("app_id")!==r?Session.set("app_id",r):"-"!==r||Session.get("app_id")||(o=Steedos.getFirstApp(),Session.set("app_id",o.id)))},n=function(e,t){var r,o,a,n;if(o=Tracker.nonreactive((function(){return Session.get("object_name")})),a=Tracker.nonreactive((function(){return Session.get("record_id")})),r=e.params.object_name,n=e.params.record_id,Session.set("object_name",r),Session.set("tab_name",null),Session.set("pageApiName",null),Session.set("record_id",n),Session.set("record_name",null),n&&(o&&o!==r||a&&n!==a))return Session.set("temp_navs_force_create",!0)},r=function(e,t){var r;if("admin"===(r=e.params.app_id)&&Steedos.isMobile())return t("/user_settings"),urlQuery.pop()},FlowRouter.route("/app",{triggersEnter:[o],action:function(e,t){return BlazeLayout.render(Creator.getLayout(),{main:"creator_app_home"})}}),FlowRouter.route("/app/menu",{triggersEnter:[o],action:function(e,t){var r;return r="app_object_menu",Session.set("hidden_header",!0),BlazeLayout.render(Creator.getLayout(),{main:r})},triggersExit:[function(e,t){if(Steedos.isMobile())return Session.set("hidden_header",void 0)}]}),FlowRouter.route("/app/:app_id",{triggersEnter:[o],action:function(e,t){var r,o,a;return"-"!==(o=FlowRouter.getParam("app_id"))&&(Session.set("object_name",null),Session.set("record_id",null),Session.set("app_id",o)),Session.set("admin_template_name",null),a=(r=Creator.getApp(o))&&r.is_use_iframe?"creator_app_iframe":"creator_app_home",BlazeLayout.render(Creator.getLayout(),{main:a})}}),FlowRouter.route("/app/:app_id/page/:page_id",{triggersEnter:[o],action:function(e,t){var r,o;return console.log("params",e),r=FlowRouter.getParam("app_id"),o=null!=e?e.page_id:void 0,Session.set("pageApiName",o),Session.set("object_name",null),BlazeLayout.render(Creator.getLayout(),{main:"page_template",regions:{appId:r,pageId:o}})},triggersExit:[function(e,t){return Session.set("pageApiName",null)}]}),FlowRouter.route("/page/:page_id/",{action:function(e,t){return BlazeLayout.render(Creator.getLayout(),{main:"page"})}}),FlowRouter.route("/app/:app_id/tab_iframe/:tab_id",{triggersEnter:[o],action:function(e,t){var r;return r=FlowRouter.getParam("tab_id"),Session.set("tab_name",r),Session.set("object_name",null),BlazeLayout.render(Creator.getLayout(),{main:"page_iframe",regions:{params:e,queryParams:t}})},triggersExit:[function(e,t){return Session.set("tab_name",null)}]}),(a=FlowRouter.group({prefix:"/app/:app_id/:object_name",name:"objectRoutes",triggersEnter:[o,n]})).route("/",{triggersEnter:[function(e,t){var r,o,a,n,i;return n=e.params.object_name,o=(null!=(a=window.getFirstListView(n))?a.name:void 0)||(null!=a?a._id:void 0),t(i="/app/"+(r=e.params.app_id)+"/"+n+"/grid/"+o)}],action:function(e,t){return BlazeLayout.render(Creator.getLayout(),{main:"object_home"})}}),a.route("/:record_id/:related_object_name/grid",{action:function(e,t){var r,o,a,n,i,s,c,l;return o={app_id:r=Session.get("app_id"),object_name:n=FlowRouter.getParam("object_name"),record_id:s=FlowRouter.getParam("record_id"),related_object_name:l=FlowRouter.getParam("related_object_name")},Session.set("related_object_name",l),a="related_object_list",(i=Steedos.Page.getPage("related_list",r,l))&&(a="page_related_list_view",c={page:i,appId:Session.get("app_id"),objectName:n,recordId:s,relatedObjectName:l,__timestamp:(new Date).getTime()}),Meteor.setTimeout((function(){return BlazeLayout.render(Creator.getLayout(),{main:a,regions:c})}),10)}}),a.route("/view/:record_id",{action:function(e,t){var r,o,a,n,i,s,c;return t["X-Space-Id"]&&Steedos.setSpaceId(t["X-Space-Id"]),o={app_id:r=FlowRouter.getParam("app_id"),object_name:n=FlowRouter.getParam("object_name"),record_id:s=FlowRouter.getParam("record_id")},ObjectRecent.insert(n,s),Session.set("detail_info_visible",!0),a="creator_view",(i=Steedos.Page.getPage("record",Session.get("app_id"),n,s))&&(a="page_object",c=window._.defaultsDeep({display:Steedos.Page.getDisplay(n)},FlowRouter.current().queryParams,{page:i,appId:Session.get("app_id"),recordId:s,objectName:n,pageType:"record",__timestamp:(new Date).getTime()})),Meteor.setTimeout((function(){return BlazeLayout.render(Creator.getLayout(),{main:a,regions:c})}),10)},triggersExit:[function(e,t){var r,o,a,n;if(Session.get("instance_change")&&("instances"===(null!=(r=e.params)?r.object_name:void 0)&&"draft"===(null!=(o=e.queryParams)?o.side_listview_id:void 0)||"instance_tasks"===(null!=(a=e.params)?a.object_name:void 0)&&"inbox"===(null!=(n=e.queryParams)?n.side_listview_id:void 0)))return InstanceManager.saveIns(!1)}]}),a.route("/grid/:list_view_id",{action:function(e,t){var r,o,a,n,i;return Session.set("record_id",null),Session.get("object_name")===FlowRouter.getParam("object_name")&&Session.get("list_view_id")===FlowRouter.getParam("list_view_id")||(Session.set("filter_target",null),Session.set("filter_items",null)),Session.get("object_name")!==FlowRouter.getParam("object_name")&&Session.set("list_view_id",null),"true"===(null!=t?t.hidden_header:void 0)&&Session.set("hidden_header",!0),"-"!==(r=FlowRouter.getParam("app_id"))&&Session.set("app_id",r),a=FlowRouter.getParam("object_name"),Session.set("object_name",a),Session.set("list_view_id",FlowRouter.getParam("list_view_id")),Session.set("list_view_visible",!1),Tracker.afterFlush((function(){return Session.set("list_view_visible",!0)})),(n=Steedos.Page.getPage("list",Session.get("app_id"),a))&&(o="page_object",i=window._.defaultsDeep({display:Steedos.Page.getDisplay(a)},FlowRouter.current().queryParams,{page:n,appId:Session.get("app_id"),objectName:a,listViewId:Session.get("list_view_id"),pageType:"list",__timestamp:(new Date).getTime()})),BlazeLayout.render(Creator.getLayout(),{main:o,regions:i})}}),FlowRouter.notFound={action:function(e,t){var r;try{throw new Error("404 not found:"+window.location.href)}catch(o){r=o,console.log(r,window.location.href)}return BlazeLayout.render("empty_layout",{main:"notFound"})}}},"tenant.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};$.getJSON("/accounts/settings",(function(e){if(null!=e?e.tenant:void 0)return Session.set("tenant_settings",e.tenant)}))},"animate.js":function e(){$.fn.extend({animateCss:function(e,t){var r=function(e){var t={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(var r in t)if(void 0!==e.style[r])return t[r]}(document.createElement("div"));return this.addClass("animated "+e).one(r,(function(){$(this).removeClass("animated "+e),"function"==typeof t&&t()})),this}})},"colResizable-1.6.js":function e(){!function(e){var t=e(document),r=e("head"),o=null,a={},n=0,i="id",s="px",c="JColResizer",l="JCLRFlex",u=parseInt,d=Math,p=navigator.userAgent.indexOf("Trident/4.0")>0,f;try{f=sessionStorage}catch(T){}r.append("");var m=function(t,o){var s=e(t);if(s.opt=o,s.mode=o.resizeMode,s.dc=s.opt.disabledColumns,s.opt.disable)return _(s);var l=s.id=s.attr(i)||c+n++;s.p=s.opt.postbackSafe,!s.is("table")||a[l]&&!s.opt.partialRefresh&&s.prev(".JCLRgrips").length>0||("col-resize"!==s.opt.hoverCursor&&r.append(""),s.addClass(c).attr(i,l).before('
'),s.g=[],s.c=[],s.w=s.width(),s.gc=s.prev(),s.f=s.opt.fixed,o.marginLeft&&s.gc.css("marginLeft",o.marginLeft),o.marginRight&&s.gc.css("marginRight",o.marginRight),s.cs=u(p?t.cellSpacing||t.currentStyle.borderSpacing:s.css("border-spacing"))||2,s.b=u(p?t.border||t.currentStyle.borderLeftWidth:s.css("border-left-width"))||1,a[l]=s,g(s))},_=function(e){var t=e.attr(i),e;(e=a[t])&&e.is("table")&&(e.removeClass(c+" "+l).gc.remove(),delete a[t])},g=function(t){var r=t.find(">thead>tr:first>th,>thead>tr:first>td");r.length||(r=t.find(">tbody>tr:first>th,>tr:first>th,>tbody>tr:first>td, >tr:first>td")),r=r.filter(":visible"),t.cg=t.find("col"),t.ln=r.length,t.p&&f&&f[t.id]&&h(t,r),r.each((function(r){var o=e(this),a=-1!=t.dc.indexOf(r),n=e(t.gc.append('
')[0].lastChild);n.append(a?"":t.opt.gripInnerHtml).append('
'),r==t.ln-1&&(n.addClass("JCLRLastGrip"),t.f&&n.html("")),n.bind("touchstart mousedown",y),a?n.addClass("JCLRdisabledGrip"):n.removeClass("JCLRdisabledGrip").bind("touchstart mousedown",y),n.t=t,n.i=r,n.c=o,o.w=o.width(),t.g.push(n),t.c.push(o),o.width(o.w).removeAttr("width"),n.data(c,{i:r,t:t.attr(i),last:r==t.ln-1})})),t.cg.removeAttr("width"),t.find("td, th").not(r).not("table th, table td").each((function(){e(this).removeAttr("width")})),t.f||t.removeAttr("width").addClass(l),v(t)},h=function(e,t){var r,o=0,a=0,n=[],i;if(t){if(e.cg.removeAttr("width"),e.opt.flush)return void(f[e.id]="");for(i=(r=f[e.id].split(";"))[e.ln+1],!e.f&&i&&(e.width(i*=1),e.opt.overflow&&(e.css("min-width",i+s),e.w=i));a*{cursor:"+s.opt.dragCursor+"!important}"),l.addClass(s.opt.draggingClass),o=l,s.c[i.i].l)for(var d=0,p;d"+(r.label||a),value:t+"."+a,icon:null!=o?o.icon:void 0})})):void 0})),o&&(c=Creator.getRelatedObjects(e),_.each(c,(l=this,function(e){var t,r;return r=Creator.getObjectLookupFieldOptions(e.object_name,!1,!1,!1),t=Creator.getObject(e.object_name),_.each(r,(function(r){if(e.foreign_key!==r.value)return n.push({label:(t.label||t.name)+"=>"+r.label,value:t.name+"."+r.value,icon:null!=t?t.icon:void 0})}))}))),n):n},Creator.getObjectFilterFieldOptions=function(e){var t,r,o,a,n;return r=[],e?(o=null!=(t=Creator.getObject(e))?t.fields:void 0,n=Creator.getFields(e),a=null!=t?t.icon:void 0,_.forEach(o,(function(e,t){if(!_.include(["grid","object","[Object]","[object]","Object","avatar","image","markdown","html"],e.type)&&!e.hidden&&!/\w+\./.test(t)&&_.indexOf(n,t)>-1)return r.push({label:e.label||t,value:t,icon:a})})),r):r},Creator.getObjectFieldOptions=function(e){var t,r,o,a,n;return r=[],e?(o=null!=(t=Creator.getObject(e))?t.fields:void 0,n=Creator.getFields(e),a=null!=t?t.icon:void 0,_.forEach(o,(function(e,t){if(!_.include(["grid","object","[Object]","[object]","Object","markdown","html"],e.type)&&!/\w+\./.test(t)&&_.indexOf(n,t)>-1)return r.push({label:e.label||t,value:t,icon:a})})),r):r},Creator.getFiltersWithFilterFields=function(e,t,r){return e||(e=[]),r||(r=[]),(null!=r?r.length:void 0)&&r.forEach((function(r){if(_.isString(r)&&(r={field:r,required:!1}),t[r.field]&&!_.findWhere(e,{field:r.field}))return e.push({field:r.field,is_default:!0,is_required:r.required})})),e.forEach((function(e){var t;return t=r.find((function(t){return t===e.field||t.field===e.field})),_.isString(t)&&(t={field:t,required:!1}),t?(e.is_default=!0,e.is_required=t.required):(delete e.is_default,delete e.is_required)})),e},Creator.getObjectRecord=function(e,t,r,o){var a,n,i,s,c,l;if(e||(e=Session.get("object_name")),t||(t=Session.get("record_id")),Meteor.isClient){if(e!==Session.get("object_name")||t!==Session.get("record_id"))return Creator.odata.get(e,t,r,o);if(null!=(s=Template.instance())?s.record:void 0)return null!=(c=Template.instance())&&null!=(l=c.record)?l.get():void 0}if("meteor"!==(n=Creator.getObject(e)).database_name&&n.database_name){if(e&&t)return Creator.odata.get(e,t,r,o)}else if(a=Creator.getCollection(e))return i=a.findOne(t)},Creator.getObjectRecordName=function(e,t){var r,o;if(e||(e=Creator.getObjectRecord()),e&&(r="organizations"===t?"name":null!=(o=Creator.getObject(t))?o.NAME_FIELD_KEY:void 0,e&&r))return e.label||e[r]},Creator.getApp=function(e){var t,r;return(t=Session.get("_app_menus")||Session.get("app_menus"))?r=t.find((function(t){return t.id===e})):{}},Creator.getAppDashboard=function(e){var t,r;if(t=Creator.getApp(e))return r=null,_.each(Creator.Dashboards,(function(e,o){var a;if((null!=(a=e.apps)?a.indexOf(t._id):void 0)>-1)return r=e})),r},Creator.getAppDashboardComponent=function(e){var t;t=Creator.getApp(e)},Creator.getAppObjectNames=function(e){var t,r,o,a;if(t=Creator.getApp(e))return r=(o=Steedos.isMobile())?t.mobile_objects:t.objects,a=[],t&&_.each(r,(function(e){var t;if(null!=(t=Creator.getObject(e))?t.permissions.get().allowRead:void 0)return a.push(e)})),a},Creator.getUrlWithToken=function(e,t){var r,o,a;return(a={})["X-Space-Id"]=Steedos.spaceId(),a["X-User-Id"]=Steedos.userId(),a["X-Company-Ids"]=Steedos.getUserCompanyIds(),a["X-Auth-Token"]=Accounts._storedLoginToken(),Steedos.isExpression(e)&&(e=Steedos.parseSingleExpression(e,t,"#",Creator.USER_CONTEXT)),""+e+(o=(r=/(\#.+\?)|(\?[^#]*$)/g.test(e))?"&":"?")+$.param(a)},Creator.getAppMenu=function(e,t){var r;return(r=Creator.getAppMenus(e))&&r.find((function(e){return e.id===t}))},Creator.getAppMenuUrlForInternet=function(e){return Creator.getUrlWithToken(e.path,e)},Creator.getAppMenuUrl=function(e){var t;return t=e.path,"url"===e.type?e.target?Creator.getAppMenuUrlForInternet(e):"/app/-/tab_iframe/"+e.id:e.path},Creator.getAppMenus=function(e){var t,r;return(t=Session.get("_app_menus")||Session.get("app_menus"))?(r=t.find((function(t){return t.id===e})))?r.children:void 0:[]},Creator.loadAppsMenus=function(){var e,t,r;return e={},(t=Steedos.isMobile())&&(e.mobile=t),r={type:"get",data:e,success:function(e){return Session.set("app_menus",e)}},null!=Steedos?Steedos.authRequest("/service/api/apps/menus",r):void 0},Creator.creatorAppsSelector=function(e,t){var r,o,a;return r=void 0,a=void 0,_.each(e,(function(e,t){e._id||(e._id=t),e.is_creator||(e.visible=!1)})),a=_.sortBy(_.values(e),"sort"),o={},r={},_.each(a,(function(e){return"admin"===e._id?r=e:o[e._id]=e})),o.admin=r,t.length&&_.each(o,(function(e,r){t.indexOf(r)>-1?e.visible=e.is_creator:e.visible=!1})),o},Creator.visibleAppsSelector=function(e,t){var r;return null==t&&(t=!0),r=[],_.each(e,(function(e,o){(!1!==e.visible&&"admin"!==e._id||t&&"admin"===e._id)&&r.push(e)})),r},Creator.getVisibleApps=function(e){var t,r;return t=Creator._subApp.get(),r=Object.assign({},Creator.Apps,{apps:t}),Creator.visibleAppsSelector(r,e)},Creator.getVisibleAppsObjects=function(){var e,t,r;return e=Creator.getVisibleApps(),r=_.flatten(_.pluck(e,"objects")),t=(t=_.filter(Creator.Objects,(function(e){return!(r.indexOf(e.name)<0)}))).sort(Creator.sortingMethod.bind({key:"label"})),t=_.pluck(t,"name"),_.uniq(t)},Creator.getAppsObjects=function(){var e,t;return e=[],t=[],_.forEach(Creator.Apps,(function(r){return t=_.filter(r.objects,(function(e){return!e.hidden})),e=e.concat(t)})),_.uniq(e)},Creator.validateFilters=function(e,t){var r,o,a,n,i,s,c;if(a=_.map(e,(function(e){return!_.isEmpty(e)&&e})),a=_.compact(a),o="",n=a.length,t){if(t=t.replace(/\n/g,"").replace(/\s+/g," "),/[._\-!+]+/gi.test(t)&&(o="含有特殊字符。"),!o)if(s=t.match(/\d+/gi))for(s.forEach((function(e){if(e<1||e>n)return o="您的筛选条件引用了未定义的筛选器:"+e+"。"})),i=1;i<=n;)s.includes(""+i)||(o="有些筛选条件进行了定义,但未在高级筛选条件中被引用。"),i++;else o="有些筛选条件进行了定义,但未在高级筛选条件中被引用。";if(o||(c=t.match(/[a-zA-Z]+/gi))&&c.forEach((function(e){if(!/^(and|or)$/gi.test(e))return o="检查您的高级筛选条件中的拼写。"})),!o){try{Creator.eval(t.replace(/and/gi,"&&").replace(/or/gi,"||"))}catch(l){r=l,o="您的筛选器中含有特殊字符"}(/(AND)[^()]+(OR)/gi.test(t)||/(OR)[^()]+(AND)/gi.test(t))&&(o="您的筛选器必须在连续性的 AND 和 OR 表达式前后使用括号。")}}return!o||(console.log("error",o),Meteor.isClient&&toastr.error(o),!1)},Creator.formatFiltersToMongo=function(e,t){var r;if(null!=e?e.length:void 0)return e[0]instanceof Array||(e=_.map(e,(function(e){return[e.field,e.operation,e.value]}))),r=[],_.each(e,(function(e){var o,a,n,i,s;return o=e[0],a=e[1],s=Meteor.isClient?Creator.evaluateFormula(e[2]):Creator.evaluateFormula(e[2],null,t),(i={})[o]={},"="===a?i[o].$eq=s:"<>"===a?i[o].$ne=s:">"===a?i[o].$gt=s:">="===a?i[o].$gte=s:"<"===a?i[o].$lt=s:"<="===a?i[o].$lte=s:"startswith"===a?(n=new RegExp("^"+s,"i"),i[o].$regex=n):"contains"===a?(n=new RegExp(s,"i"),i[o].$regex=n):"notcontains"===a&&(n=new RegExp("^((?!"+s+").)*$","i"),i[o].$regex=n),r.push(i)})),r},Creator.isBetweenFilterOperation=function(e){var t;return"between"===e||!!(null!=(t=Creator.getBetweenTimeBuiltinValues(!0))?t[e]:void 0)},Creator.formatFiltersToDev=function(e,t,r){var o,a;if(e.length)return(null!=r?r.is_logic_or:void 0)&&(o=[],e.forEach((function(e){return o.push(e),o.push("or")})),o.pop(),e=o),a=SteedosFilters.formatFiltersToDev(e,Creator.USER_CONTEXT)},Creator.formatLogicFiltersToDev=function(e,t,r){var o;return o="["+(o=(o=t.replace(/\(\s+/gi,"(").replace(/\s+\)/gi,")").replace(/\(/g,"[").replace(/\)/g,"]").replace(/\s+/g,",").replace(/(and|or)/gi,"'$1'")).replace(/(\d)+/gi,(function(t){var o,a,n,i,s;return o=e[t-1],a=o.field,n=o.operation,s=Meteor.isClient?Creator.evaluateFormula(o.value):Creator.evaluateFormula(o.value,null,r),i=[],!0===_.isArray(s)?("="===n?_.each(s,(function(e){return i.push([a,n,e],"or")})):"<>"===n?_.each(s,(function(e){return i.push([a,n,e],"and")})):_.each(s,(function(e){return i.push([a,n,e],"or")})),"and"!==i[i.length-1]&&"or"!==i[i.length-1]||i.pop()):i=[a,n,s],JSON.stringify(i)})))+"]",Creator.eval(o)},Creator.getRelatedObjects=function(e,t,r){var o,a,n,i,s;return Meteor.isClient&&(e||(e=Session.get("object_name")),t||(t=Session.get("spaceId")),r||(r=Meteor.userId())),n=[],(o=Creator.getObject(e))?(i=Creator.getObjectRelateds(o._collection_name),0===(null!=(n=_.pluck(i,"object_name"))?n.length:void 0)?n:(s=(a=Creator.getPermissions(e,t,r)).unrelated_objects,n=_.difference(n,s),_.filter(i,(function(e){var o,i,s,c;return c=e.object_name,i=n.indexOf(c)>-1,o=null!=(s=Creator.getPermissions(c,t,r))?s.allowRead:void 0,"cms_files"===c&&(o=o&&a.allowReadFiles),i&&o})))):n},Creator.getRelatedObjectNames=function(e,t,r){var o;return o=Creator.getRelatedObjects(e,t,r),_.pluck(o,"object_name")},Creator.getRelatedObjectListActions=function(e,t,r){var o;return o=Creator.getActions(e,t,r),o=_.filter(o,(function(e){return"standard_follow"!==e.name&&("standard_query"!==e.name&&("list"===e.on&&("function"==typeof e.visible?e.visible():e.visible)))}))},Creator.getActions=function(e,t,r){var o,a,n,i,s,c;if(Meteor.isClient&&(e||(e=Session.get("object_name")),t||(t=Session.get("spaceId")),r||(r=Meteor.userId())),n=Creator.getObject(e))return i=Creator.getPermissions(e,t,r),a=i.disabled_actions,o=_.sortBy(_.values(n.actions),"sort"),_.has(n,"allow_customActions")&&(o=_.filter(o,(function(e){return _.include(n.allow_customActions,e.name)||_.include(_.keys(Creator.getObject("base").actions)||{},e.name)}))),_.has(n,"exclude_actions")&&(o=_.filter(o,(function(e){return!_.include(n.exclude_actions,e.name)}))),_.each(o,(function(e){if(Steedos.isMobile()&&["record","record_only"].indexOf(e.on)>-1&&"standard_edit"!==e.name)return"record_only"===e.on?e.on="record_only_more":e.on="record_more"})),Steedos.isMobile()&&["cms_files","cfs.files.filerecord"].indexOf(e)>-1&&(null!=(s=o.find((function(e){return"standard_edit"===e.name})))&&(s.on="record_more"),null!=(c=o.find((function(e){return"download"===e.name})))&&(c.on="record")),o=_.filter(o,(function(e){return _.indexOf(a,e.name)<0}))},Creator.getListViews=function(e,t,r){var o,a,n,i,s,c;if(Meteor.isClient&&(e||(e=Session.get("object_name")),t||(t=Session.get("spaceId")),r||(r=Meteor.userId())),e&&(s=Creator.getObject(e)))return o=(null!=(c=Creator.getPermissions(e,t,r))?c.disabled_list_views:void 0)||[],i=[],a=Steedos.isMobile(),_.each(s.list_views,(function(e,t){return e.name=t})),n=_.sortBy(_.values(s.list_views),"sort_no"),_.each(n,(function(e){var t;if(!a||"calendar"!==e.type)return"default"===e.name||(t=_.indexOf(o,e.name)>-1||e._id&&_.indexOf(o,e._id)>-1)&&e.owner!==r?void 0:i.push(e)})),i},Creator.getFields=function(e,t,r){var o,a,n;return Meteor.isClient&&(e||(e=Session.get("object_name")),t||(t=Session.get("spaceId")),r||(r=Meteor.userId())),o=Creator.getObjectFieldsName(e),n=null!=(a=Creator.getPermissions(e,t,r))?a.unreadable_fields:void 0,_.difference(o,n)},Creator.isloading=function(){return!Creator.bootstrapLoaded.get()},Creator.convertSpecialCharacter=function(e){return e.replace(/([\^\$\(\)\*\+\?\.\\\|\[\]\{\}])/g,"\\$1")},Creator.getDisabledFields=function(e){var t;return t=_.map(e,(function(e,t){return e.autoform&&e.autoform.disabled&&!e.autoform.omit&&t})),t=_.compact(t)},Creator.getHiddenFields=function(e){var t;return t=_.map(e,(function(e,t){return e.autoform&&"hidden"===e.autoform.type&&!e.autoform.omit&&t})),t=_.compact(t)},Creator.getFieldsWithNoGroup=function(e){var t;return t=_.map(e,(function(e,t){return(!e.autoform||!e.autoform.group||"-"===e.autoform.group)&&(!e.autoform||"hidden"!==e.autoform.type)&&t})),t=_.compact(t)},Creator.getSortedFieldGroupNames=function(e){var t;return t=_.map(e,(function(e){return e.autoform&&"-"!==e.autoform.group&&e.autoform.group})),t=_.compact(t),t=_.unique(t)},Creator.getFieldsForGroup=function(e,t){var r;return r=_.map(e,(function(e,r){return e.autoform&&e.autoform.group===t&&"hidden"!==e.autoform.type&&r})),r=_.compact(r)},Creator.getSystemBaseFields=function(){return["created","created_by","modified","modified_by"]},Creator.getFieldsWithoutSystemBase=function(e){return _.difference(e,Creator.getSystemBaseFields())},Creator.getFieldsWithoutOmit=function(e,t){return t=_.map(t,(function(t){var r,o;return(null==(o=(r=_.pick(e,t))[t].autoform)||!o.omit)&&t})),t=_.compact(t)},Creator.getFieldsInFirstLevel=function(e,t){return t=_.map(t,(function(t){return _.indexOf(e,t)>-1&&t})),t=_.compact(t)},Creator.getFieldsForReorder=function(e,t,r){var o,a,n,i,s,c,l,u;for(n=[],i=0,o=_.filter(t,(function(e){return!e.endsWith("_endLine")}));i-1&&(o=e[t].data_type),o):"text"},Meteor.isServer&&(Creator.getAllRelatedObjects=function(e){var t;return t=[],_.each(Creator.Objects,(function(r,o){return _.each(r.fields,(function(r,a){if("master_detail"===r.type&&r.reference_to&&r.reference_to===e)return t.push(o)}))})),Creator.getObject(e).enable_files&&t.push("cms_files"),t}),Meteor.isServer&&(Steedos.formatIndex=function(e){var t,r,o,a,n,i;return o={background:!0},(r=(null!=(a=Meteor.settings)&&null!=(n=a.datasources)&&null!=(i=n.default)?i.documentDB:void 0)||!1)&&e.length>0&&(t=e.join("."),o.name=t,t.length>52&&(o.name=t.substring(0,52))),o})},lib:{"apps.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Creator.appsByName={}},"object_recent.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};this.ObjectRecent={},ObjectRecent.insert=function(e,t,r){return Meteor.call("object_recent_viewed",e,t,Session.get("spaceId"),(function(){if(r&&_.isFunction(r))return r()}))}},"filters_transform.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},r;this.FiltersTransform={},r=function(e){return["date","datetime","time","currency","number"].includes(e)?"between":["text","textarea","html"].includes(e)?"contains":"="},FiltersTransform.queryToFilters=function(e){var t,o,a,n;if(e)return n=e.query,a=e.object_name,o=Creator.getObject(a).fields,t=[],_.each(n,(function(e,a){var n,i;if(o[a]){if(i=Creator.getFieldDataType(o,a),["date","datetime","time","currency","number"].includes(i))return t.push({field:a,operation:r(i),start_value:e,value:[e,null]});if(!["text","textarea","html"].includes(i))return["boolean"].includes(i)?t.push({field:a,operation:"=",value:e}):t.push({field:a,operation:r(i),value:e});if(_.isString(e))return t.push({field:a,operation:r(i),value:e});if(_.isArray(e))return t.push({field:a,operation:"=",value:e})}else if(a=a.replace(/(_endLine)$/,""),i=Creator.getFieldDataType(o,a),o[a]&&["date","datetime","time","currency","number"].includes(i))return(n=_.find(t,(function(e){return e.field===a})))?(n.end_value=e,n.value[1]=e):t.push({field:a,operation:r(i),end_value:e,value:[null,e]})})),t}},"form_manager.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},r,o;this.FormManager={},SimpleSchema.messages({formValidate:"[value]"}),FormManager.getRelatedInitialValues=(o=this,function(e,t,r){var o,a,n,i,s;if(!_.isString(t))throw new Meteor.Error("main_record_id must be String");return o={},i="",Creator.getRelatedList(e,t).forEach((function(e){if(r===e.object_name)return i=e.related_field_name})),a="company_id",(s=Creator.getObject(r))&&i&&s.fields[i]&&s.fields[i].reference_to_field&&(a=a+","+s.fields[i].reference_to_field),(n=Creator.odata.get(e,t,a))&&i&&n[s.fields[i].reference_to_field]&&(t=n[s.fields[i].reference_to_field]),o={},i&&("objects"===e?o[i]=Creator.getObjectRecord().name:(s=Creator.getObject(r),_.isString(s.fields[i].reference_to)?s.fields[i].multiple?o[i]=[t]:o[i]=t:o[i]={o:e,ids:[t]})),!_.has(o,"company_id")&&(null!=n?n.company_id:void 0)&&(o.company_id=n.company_id),o=Object.assign({},o,FormManager.getInitialValues(r,o))}),FormManager.getInitialValues=function(e,t){var r,o,a;return o=null!=(r=Creator.getObject(e))&&null!=(a=r.form)?a.initialValues:void 0,_.isFunction(o)?o.apply({doc:t||{}}):{}},FormManager.validate=function(e,t){var r,o,a,n,i,s;if(a=null!=(o=Creator.getObject(e))&&null!=(n=o.form)?n.validate:void 0,_.isFunction(a))try{if(s=a.apply({},[null!=(i=AutoForm.getFormValues(t))?i.insertDoc:void 0]),_.isBoolean(s)&&!1===s)return!1;if(!_.isEmpty(s)&&_.isObject(s))return _.each(s,(function(e,r){return AutoForm.addStickyValidationError(t,r,"formValidate",e),toastr.error(e)})),!1}catch(c){return r=c,console.error(r),toastr.error(r.message),!1}return!0},FormManager.onSubmit=function(e,t){var r,o,a,n,i;return o=null!=(r=Creator.getObject(e))&&null!=(n=r.form)?n.onSubmit:void 0,!(_.isFunction(o)&&(a=o.apply({},[null!=(i=AutoForm.getFormValues(t))?i.insertDoc:void 0]),!_.isEmpty(a)&&_.isObject(a)))||(_.each(a,(function(e,r){return AutoForm.addStickyValidationError(t,r,"formValidate",e),toastr.error(e)})),!1)},r=function(e,t,r){var o,a,n;return o={userId:Meteor.userId(),spaceId:Session.get("spaceId"),object_name:e},_.has(r,"previousDoc")&&(o.previousDoc=r.previousDoc),t.endsWith("Delete")?(o.id=r._id,o.doc=Creator.odata.get(e,r._id),t.startsWith("error")&&(o.error=r.error)):t.startsWith("after")?(o.id=null!=(a=r.dbDoc)?a._id:void 0,o.doc=r.dbDoc):t.startsWith("before")?(t.endsWith("Insert")||(o.id=r._id),t.endsWith("Update")?o.doc=null!=(n=r.doc)?n.$set:void 0:o.doc=r.doc):t.startsWith("error")&&(o.id=r._id,o.doc=r.doc,o.error=r.error),o},FormManager.getPreviousDoc=function(e,t,r){var o,a,n,i,s;if(("update"===r||"delete"===r)&&(o="after",a="after"+r.charAt(0).toLocaleUpperCase()+_.rest(r.split("")).join(""),i=null!=(n=Creator.getObject(e))&&null!=(s=n.form)?s[a]:void 0,_.isFunction(i)))return Creator.odata.get(e,t)},FormManager.runHook=function(e,t,o,a){var n,i,s,c,l,u,d,p;if(l=""+o+t.charAt(0).toLocaleUpperCase()+_.rest(t.split("")).join(""),"view"===t||"edit"===t)return FormManager.runViewEditHook(e,l,a.schema,a.record,a.doc);if(s=a.formId,d=null!=(u=Creator.getObject(e))&&null!=(p=u.form)?p[l]:void 0,_.isFunction(d))try{if(n=r(e,l,a),c=d.apply(n),_.isBoolean(c)&&!1===c)return!1;if(s&&"before"===o&&!_.isEmpty(c)&&_.isObject(c))return _.each(c,(function(e,t){return AutoForm.addStickyValidationError(s,t,"formValidate",e),toastr.error(e)})),!1}catch(f){return i=f,console.error(i),toastr.error(i.message),!1}return!0},FormManager.runViewEditHook=function(e,t,r,o,a){var n,i,s,c,l,u,d;if(l=null!=(u=Creator.getObject(e))&&null!=(d=u.form)?d[t]:void 0,_.isFunction(l)&&(s=r.get(),c={id:(i=a||o.get())._id,userId:Meteor.userId(),spaceId:Session.get("spaceId"),object_name:e,doc:i,schema:s},!1!==(n=l.apply(c))))return r.set(s),o.set(i)}},"grid_export.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},r,o;this.ObjectGrid={},this.GridExport={},r={equals:"=",notEqual:"!=",contains:"contains",notContains:"notcontains",startsWith:"startswith",endsWith:"=",lessThan:"<",lessThanOrEqual:"<=",greaterThan:">",greaterThanOrEqual:">=",empty:"empty"},o=function(e){var t;return t=[],_.forEach(e,(function(e,o){var a;return"between"===e.type?"number"===e.filterType?t.push([o,"between",[e.numberFrom,e.numberTo]]):e.filter?t.push([o,e.type,e.filter]):t.push([o,"between",[e.dateFrom,e.dateTo]]):_.isEmpty(e.filter)?e.operator?(a=[],e.condition1&&a.push([o,r[e.condition1.type],e.condition1.filter]),a.push(e.operator.toLocaleLowerCase()),e.condition2&&a.push([o,r[e.condition2.type],e.condition2.filter]),t.push(a)):void 0:(a=[o,r[e.type],e.filter],t.push(a))})),t},ObjectGrid.getFilters=function(e,t,r,a,n){var i,s,c,l,u,d;return s=Steedos.Page.Listview.getDefaultName(e,t),l=window.gridRefs&&window.gridRefs[s]&&window.gridRefs[s].current?window.gridRefs[s].current:window.gridRef.current,u=[],i=Creator.getListViewFilters(e,t,r,a,n),d=o(l.api.getFilterModel()),c=_.compact([].concat(i).concat(d))},GridExport.excel=function(e,t,r,a,n,i,s){var c,l,u,d,p,f,m,g,h,v,b,w,S;return u=Steedos.Page.Listview.getDefaultName(e,t),f=window.gridRefs&&window.gridRefs[u]&&window.gridRefs[u].current?window.gridRefs[u].current:window.gridRef.current,v=[],_.each(f.props.columnDefs,(function(e){if(e&&e.field)return v.push(e.field)})),b=[],_.forEach(f.api.getSortModel(),(function(e){return b.push([e.colId,e.sort])})),l=Creator.getListViewFilters(e,t,r,a,n,s),S=o(f.api.getFilterModel()),p=_.compact([].concat(l).concat(S)),c=SteedosFilters.formatFiltersToODataQuery(p),d=r?i+"-"+Creator.getObject(a).label:Creator.getObject(e).label+"-"+(null!=(h=Creator.getListView(e,t))?h.label:void 0),g=[],_.map(b,(function(e){var t;return t="desc"===e[1]?e[0]+" desc":e[0],g.push(t)})),m=g.join(","),d=encodeURIComponent(d),w=r?"/api/record/export/"+a+"?$select="+v.toString()+"&filename="+d:"/api/record/export/"+e+"?$select="+v.toString()+"&filename="+d,b.length>0&&(w=w+"&$orderby="+m),c&&(w=w+"&$filter="+c),Meteor.isCordova?Steedos.cordovaDownload(encodeURI(Steedos.absoluteUrl(w)),d+".xlsx"):window.open(w)}}},client:{"listview.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},r,o,a,n,i;n=function(e,t,r){var o,a,n;return o=null!=t?t.columns:void 0,r&&((null!=t?t.mobile_columns:void 0)?o=t.mobile_columns:(null!=(n=Creator.getObjectFirstListView(e))?n.mobile_columns:void 0)?o=n.mobile_columns:o&&(o=Creator.pickObjectMobileColumns(e,o))),o||(a=Creator.getObjectFirstListViewColumns(e,r))&&(o=a),o},o=function(e,t,r){var o,a,i,s,c,l;return s=(c=Creator.getObject(e)).NAME_FIELD_KEY,"organizations"===c.name&&(s="name"),o=[s],(i=Creator.getCollection("object_listviews").findOne(t))?o=n(e,i,r):c.list_views&&(l=c.list_views[t],o=n(e,l,r)),o=o.map((function(e){var t,r;return t=_.isObject(e)?e.field:e,(null!=(r=c.fields[t])?r.type:void 0)?t:void 0})),Creator.isCommonSpace(Session.get("spaceId"))&&o.indexOf("space")<0&&o.push("space"),"cms_files"===e&&o.push("parent"),o=_.compact(o),a=Creator.getObjectFieldsName(e),_.intersection(o,a)},i=function(e,t,r,o){var a;return r?(a=Creator.getObject(e).fields,o&&(t=t.filter((function(e){var t,o;return"master_detail"!==(null!=(o=a[e])?o.type:void 0)||(!!a[e].multiple||(a[e].reference_to?(t=a[e].reference_to,_.isFunction(t)&&(t=t())):t=a[e].optionsFunction({}).getProperty("value"),!!_.isArray(t)||t!==r))}))),t):t},r=function(e,t){var r,o;return o=Creator.getObject(e).fields,r=[],_.each(t,(function(e){var t;if(null!=(t=o[e])?t.depend_on:void 0)return r=_.union(o[e].depend_on)})),r},a=function(e,t,r){var o,a;return a=_.intersection(["owner","company_id","company_ids","locked"],_.keys(e.fields)),!r&&e.enable_tree&&(a.push("parent"),a.push("children")),(o=Creator.getObjectDefaultExtraColumns(e.name))&&(a=_.union(a,o)),a},Creator.unionSelectColumnsWithExtraAndDepandOn=function(e,t,o,n){var i,s;return i=t.name,s=a(t,o,n),e=_.union(e,s),e=_.union(e,r(i,e))},Creator.getListViewFilters=function(e,t,r,o,a,n){var i,s,c,l,u,d,p,f,m,g;if(!e)return null;if(c=Creator.getObject(e),r)l=Creator.getODataRelatedFilter(e,o,a,t,n);else{if(d=Session.get("filter_logic"),p=Session.get("filter_scope"),u=Session.get("filter_items"),s=c.fields,u&&u.length>0&&window.lodash.isArray(u[0]))return l=u,(g=Creator.getStandardQuery(e,Session.get("standard_query")))&&g.length&&(l=l?[l,"and",g]:g),(m=Session.get("grid_sidebar_filters"))&&m.length&&(l=l?[l,"and",m]:m),l||(l=null),l;i=[],_.forEach(u,(function(t){var r,o,a,n,c,l,u,d,p,f,m;if(void 0!==t.value)if(r=s[null!=t?t.field:void 0],o=Creator.getFieldDataType(s,null!=t?t.field:void 0),["text","textarea","html","code"].includes(o)){if(_.isString(t.value)&&(m=t.value.trim().split(" "),l=[],m.forEach((function(e){return e=encodeURIComponent(Creator.convertSpecialCharacter(e)),l.push([t.field,t.operation,e])})),l.length>0))return c=!1,["<>","notcontains"].includes(t.operation)&&(c=!1),i.push(Creator.formatFiltersToDev(l,e,{is_logic_or:c}))}else{if(!["lookup","master_detail"].includes(o))return i.push(t);if(a=null!=r?r.reference_to:void 0,_.isFunction(a)&&(a=a()),!_.isArray(a))return i.push(t);if((null!=(u=t.value)?u.ids:void 0)&&i.push({field:t.field+".ids",operation:t.operation,value:null!=(d=t.value)?d.ids:void 0}),null!=(p=t.value)?p.o:void 0)return n=Creator.getObject(null!=(f=t.value)?f.o:void 0),i.push({field:t.field+".o",operation:t.operation,value:n._collection_name})}})),i.length>0&&(f={filter_logic:d,filter_scope:p,filters:i}),l=Creator.getODataFilter(t,e,f),(g=Creator.getStandardQuery(e,Session.get("standard_query")))&&g.length&&(l=l?[l,"and",g]:g),r||(m=Session.get("grid_sidebar_filters"))&&m.length&&(l=l?[l,"and",m]:m)}return l||(l=null),l},Creator.getODataEndpointUrl=function(e,t,r,o){var a,n;return r?(a=Creator.formatObjectName(o),n=Creator.getListViewIsRecent(e,t)?"/api/v4/"+a+"/recent":"/api/v4/"+a):(a=Creator.formatObjectName(e),n=Creator.getListViewIsRecent(e,t)?"/api/v4/"+a+"/recent":"/api/v4/"+a),Steedos.absoluteUrl(n)},Creator.getListviewColumns=function(e,t,r,a,n,s){var c,l;return c=e.name,l=Tracker.nonreactive((function(){return o(c,a,s)})),n&&n.customRelatedListObject&&(n.columns&&(l=n.columns),s&&n.mobile_columns&&(l=n.mobile_columns),l&&(l=l.map((function(e){return _.isObject(e)?e.field:_.isString(e)?e:void 0})),l=_.uniq(_.compact(l)))),l=i(c,l,t,r)}},views:{"_helpers.coffee":function e(){var r=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Creator.helpers={object_name:function(){return Session.get("object_name")},object:function(){return Creator.getObject(Session.get("object_name"))},object_listviews:function(){return Creator.getObject("object_listviews")},objectLabel:function(e){return Creator.getObject(e).label},getOperationLabel:function(e){switch(e){case"=":return t("creator_filter_operation_equal");case"<>":return t("creator_filter_operation_unequal");case"<":return t("creator_filter_operation_less_than");case">":return t("creator_filter_operation_greater_than");case"<=":return t("creator_filter_operation_less_or_equal");case">=":return t("creator_filter_operation_greater_or_equal");case"contains":return t("creator_filter_operation_contains");case"notcontains":return t("creator_filter_operation_does_not_contain");case"startswith":return t("creator_filter_operation_starts_with");case"between":return t("creator_filter_operation_between")}},isMobile:function(){return Steedos.isMobile()}}},"template.page_template.js":function e(){Template.__checkName("page_template"),Template.page_template=new Template("Template.page_template",(function(){var e=this;return HTML.Raw('
')}))},"page_template.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Template.page_template.onRendered((function(){var e,t;return t=this,e=Session.get("app_id"),this.containerList=[],this.autorun((function(){var r;if(r=Steedos.Page.App.render(t,Session.get("pageApiName"),e))return t.containerList.push(r)}))})),Template.page_template.onDestroyed((function(){return _.each(this.containerList,(function(e){if(e)return ReactDOM.unmountComponentAtNode(e)}))}))},"template.page_object.js":function e(){Template.__checkName("page_object"),Template.page_object=new Template("Template.page_object",(function(){var e=this;return HTML.Raw('
')}))},"page_object.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Template.page_object.onRendered((function(){var e;return e=this,Steedos.Page.Object.Template.onRendered.apply(this)})),Template.page_object.onDestroyed((function(){var e;return e=this,Steedos.Page.Object.Template.onDestroyed.apply(this)}))},"template.page_record_view.js":function e(){Template.__checkName("page_record_view"),Template.page_record_view=new Template("Template.page_record_view",(function(){var e=this;return HTML.Raw('
')}))},"page_record_view.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Template.page_record_view.onRendered((function(){var e,t,r;return r=this,e=Session.get("object_name"),t=Session.get("record_id"),this.containerList=[],this.pageName=null,this.autorun((function(){var o,a,n,i,s,c,l,u,d,p;if(d=!0,(l=r.data.regions()).objectName!==(null!=(i=this.lastRegions)?i.objectName:void 0)&&(d=!1),this.lastRegions=l,d&&r.pageName)try{if(SteedosUI.refs[r.pageName])return(p={objectName:e}).recordId=Tracker.nonreactive((function(){return Session.get("record_id")})),n=(null!=(s=SteedosUI.refs[r.pageName])&&null!=(c=s.__$schema)?c.data:void 0)||{},SteedosUI.refs[r.pageName].updateProps({data:window._.defaultsDeep(p,n)})}catch(f){a=f,console.error(r.pageName+": "+a)}if(!d&&r.pageName&&SteedosUI.refs[r.pageName])try{SteedosUI.refs[r.pageName].unmount()}catch(f){a=f,console.error(r.pageName+": "+a)}if(r.data.regions&&(l=Tracker.nonreactive(r.data.regions),this.lastRegions=l,l&&l.page&&l.page.schema&&(u=l.page.schema,_.isString(u)&&(u=JSON.parse(u)),r.pageName=u.name)),e=Tracker.nonreactive((function(){return Session.get("object_name")})),t=Tracker.nonreactive((function(){return Session.get("record_id")})),o=Steedos.Page.Record.render(r,e,t))return r.containerList.push(o)}))})),Template.page_record_view.onDestroyed((function(){var e;try{SteedosUI.refs[this.pageName].unmount()}catch(t){e=t,console.error(this.pageName+": "+e)}return _.each(this.containerList,(function(e){if(e)return ReactDOM.unmountComponentAtNode(e)}))}))},"template.page_list_view.js":function e(){Template.__checkName("page_list_view"),Template.page_list_view=new Template("Template.page_list_view",(function(){var e=this;return HTML.Raw('
')}))},"page_list_view.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Template.page_list_view.onRendered((function(){var e,t;return t=this,e=Session.get("object_name"),this.containerList=[],this.pageName=null,this.autorun((function(){var r,o,a,n;if(t.pageName)try{SteedosUI.refs[t.pageName].unmount()}catch(i){o=i,console.error(t.pageName+": "+o)}if(t.data.regions&&(a=t.data.regions())&&a.page&&a.page.schema&&(n=a.page.schema,_.isString(n)&&(n=JSON.parse(n)),t.pageName=n.name),r=Steedos.Page.Listview.render(t,e))return t.containerList.push(r)}))})),Template.page_list_view.onDestroyed((function(){var e;try{SteedosUI.refs[this.pageName].unmount()}catch(t){e=t,console.error(this.pageName+": "+e)}return _.each(this.containerList,(function(e){if(e)return ReactDOM.unmountComponentAtNode(e)}))}))},"template.page_related_list_view.js":function e(){Template.__checkName("page_related_list_view"),Template.page_related_list_view=new Template("Template.page_related_list_view",(function(){var e=this;return HTML.Raw('')}))},"page_related_list_view.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Template.page_related_list_view.onRendered((function(){var e,t,r;return r=this,e=Session.get("object_name"),t=Session.get("record_id"),this.containerList=[],this.pageName=null,this.autorun((function(){var o,a,n,i;if(r.pageName)try{SteedosUI.refs[r.pageName].unmount()}catch(s){a=s,console.error(r.pageName+": "+a)}if(r.data.regions&&(n=r.data.regions())&&n.page&&n.page.schema&&(i=n.page.schema,_.isString(i)&&(i=JSON.parse(i)),r.pageName=i.name),o=Steedos.Page.RelatedListview.render(r,e,t))return r.containerList.push(o)}))})),Template.page_related_list_view.onDestroyed((function(){var e;try{SteedosUI.refs[this.pageName].unmount()}catch(t){e=t,console.error(this.pageName+": "+e)}return _.each(this.containerList,(function(e){if(e)return ReactDOM.unmountComponentAtNode(e)}))}))},"template.app_home.js":function e(){Template.__checkName("creator_app_home"),Template.creator_app_home=new Template("Template.creator_app_home",(function(){var e=this;return""}))},"app_home.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},r;r=function(e){var t,r,o,a,n;return(null!=(t=Creator.getApp(e))?t.isExternalUrl:void 0)?/^http(s?):\/\//.test(t.path)?t.blank?window.open(t.path):window.location.href=t.path:FlowRouter.go(t.path):(a=Creator.getAppMenus(e),(r=_.first(a))?"url"===(o=Object.assign({},r,{target:!1})).type&&o.is_use_iframe?FlowRouter.go(o.path):(n=Creator.getAppMenuUrl(o),FlowRouter.go(n)):FlowRouter.go("/app/"+e))},Template.creator_app_home.onRendered((function(){return this.autorun((function(){var e,t,o;if(o=Creator.bootstrapLoaded.get(),_.has(FlowRouter.current().params,"app_id")){if(e=Session.get("app_id"),o&&e)return r(e)}else if(t=Steedos.getFirstApp(),o&&t)return r(t.code||t.id)}))}))},"template.app_iframe.js":function e(){Template.__checkName("creator_app_iframe"),Template.creator_app_iframe=new Template("Template.creator_app_iframe",(function(){var e=this;return Blaze.If((function(){return Spacebars.call(e.lookup("subsReady"))}),(function(){return["\n\t\t",HTML.IFRAME({id:"app_iframe",src:function(){return Spacebars.mustache(e.lookup("url"))},style:"width: 100%; height: 100%;"}),"\n\t"]}))}))},"app_iframe.coffee":function module(){__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};var share=__coffeescriptShare;Template.creator_app_iframe.helpers({subsReady:function(){return Steedos.subsBootstrap.ready()},url:function(){var e,t;return t=Session.get("app_id"),(e=Creator.getApp(t))&&!e.on_click&&e.url?Creator.getUrlWithToken(e.url,e):""}}),Template.creator_app_iframe.events,Template.creator_app_iframe.onCreated((function(){})),Template.creator_app_iframe.onRendered((function(){var app,app_id,e,evalFunString,iframe;if(Steedos.forbidNodeContextmenu(window,"#app_iframe"),app_id=Session.get("app_id"),app=Creator.getApp(app_id),iframe=$("#app_iframe"),app&&app.on_click){evalFunString="(function(){"+app.on_click+"})()";try{return eval(evalFunString)}catch(error){return e=error,console.error("catch some error when eval the on_click script for app link:"),console.error(e.message+"\r\n"+e.stack)}}})),Template.creator_app_iframe.onDestroyed((function(){}))},"template.page_iframe.js":function e(){Template.__checkName("page_iframe"),Template.page_iframe=new Template("Template.page_iframe",(function(){var e=this;return HTML.IFRAME({name:"pageIframe",src:function(){return Spacebars.mustache(e.lookup("url"))},style:function(){return Spacebars.mustache(e.lookup("style"))},class:function(){return Spacebars.mustache(e.lookup("className"))}})}))},"page_iframe.js":function e(){var t=function(e){const{data:t}=e;"nav.click"===t.type&&FlowRouter.current().params.tab_id==t.data.id&&$("[name='pageIframe']").attr("src",$("[name='pageIframe']").attr("src"))};Template.page_iframe.helpers({url:()=>{if(Template.instance().data.regions)return(regions=Template.instance().data.regions()).queryParams.url},className:()=>{if(Template.instance().data.regions)return(regions=Template.instance().data.regions()).queryParams.className||""},style:()=>Template.instance().data.regions&&(regions=Template.instance().data.regions()).queryParams.style||"width: 100%; height: 100%;"}),Template.page_iframe.onCreated((function(){window.addEventListener("message",t)})),Template.page_iframe.onDestroyed((function(){window.removeEventListener("message",t)})),Template.page_iframe.onRendered((function(){window.Steedos.setDocumentTitle({pageName:null,tabName:null})}))},"template.initiate_approval.js":function e(){Template.__checkName("initiate_approval"),Template.initiate_approval=new Template("Template.initiate_approval",(function(){var e=this;return HTML.DIV({class:"modal fade creator-modal",id:"initiate_approval"},"\n\t\t",HTML.DIV({class:"modal-dialog slds-modal slds-fade-in-open"},"\n\t\t\t",HTML.DIV({class:"slds-modal__container"},"\n\t\t\t\t",HTML.HEADER({class:"slds-modal__header"},"\n\t\t\t\t\t",HTML.DIV({"data-dismiss":"modal"},"\n\t\t\t\t\t\t",Blaze._TemplateWith((function(){return{className:Spacebars.call("slds-modal__close slds-button__icon"),iconSize:Spacebars.call("large"),inverse:Spacebars.call(!0),iconCategory:Spacebars.call("utility"),iconName:Spacebars.call("close"),title:Spacebars.call(Spacebars.dataMustache(e.lookup("_"),"close")),variant:Spacebars.call("icon")}}),(function(){return Spacebars.include(e.lookupTemplate("steedos_button"))})),"\n\t\t\t\t\t"),"\n\t\t\t\t\t",HTML.Raw('

\n\t\t\t\t\t\t选择流程发起审批\n\t\t\t\t\t

'),"\n\t\t\t\t"),"\n\n\t\t\t\t",HTML.DIV({class:"slds-modal__content slds-p-around_medium",style:"font-size: 17px;"},"\n\t\t\t\t\t",Blaze.Each((function(){return Spacebars.call(e.lookup("flows"))}),(function(){return["\n\t\t\t\t\t",HTML.DIV({class:"weui_cells_weui_cells_access"},"\n\t\t\t\t\t\t",HTML.A({class:"weui_cell","data-flow":function(){return Spacebars.mustache(e.lookup("flow_id"))}},"\n\t\t\t\t\t\t\t",HTML.I({class:"ion ion-ios-compose-outline"}),HTML.CharRef({html:" ",str:" "}),HTML.CharRef({html:" ",str:" "}),Blaze.View("lookup:flow_name",(function(){return Spacebars.mustache(e.lookup("flow_name"))})),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"),"\n\t\t\t\t\t"]})),"\n\n\t\t\t\t"),"\n\n\t\t\t"),"\n\t\t"),"\n\t")}))},"initiate_approval.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Template.initiate_approval.helpers({flows:function(){return _.where(Creator.object_workflows,{object_name:this.object_name,can_add:!0})}}),Template.initiate_approval.events({"click .weui_cell":function(e,t){var r,o,a,n,i,s,c;o=e.currentTarget.dataset.flow,a=t.data.object_name,n=t.data.record_id,i=[{o:a,ids:[n]}],(s={}).methodOverride="POST",s["X-User-Id"]=Meteor.userId(),s["X-Auth-Token"]=Accounts._storedLoginToken(),c=Steedos.absoluteUrl()+"api/object/workflow/drafts?"+$.param(s),r={Instances:[{flow:o,applicant:Meteor.userId(),space:Session.get("spaceId"),record_ids:i}]},r=JSON.stringify(r),$(document.body).addClass("loading"),$.ajax({url:c,type:"POST",async:!0,data:r,dataType:"json",processData:!1,contentType:"application/json",success:function(e,r){var o;$(document.body).removeClass("loading"),e.errors?e.errors.forEach((function(e){toastr.error(e.errorMessage)})):(o=e.inserts[0],Steedos.openWindow(Steedos.absoluteUrl("/app/"+FlowRouter.current().params.app_id+"/instances/view/"+o._id+"?display="+FlowRouter.current().queryParams.display+"&side_object=instances&side_listview_id=draft")),Modal.hide(t),SteedosUI.reloadRecord(a,n),FlowRouter.reload())},error:function(e,t,r){$(document.body).removeClass("loading"),toastr.error(t)}})}})},"template.amis_action.js":function e(){Template.__checkName("amis_action"),Template.amis_action=new Template("Template.amis_action",(function(){var e=this;return HTML.LI({class:function(){return["steedos-amis-button steedos-button-",Spacebars.mustache(e.lookup("objectName")),"-",Spacebars.mustache(e.lookup("name"))," ",Spacebars.mustache(e.lookup("buttonClassName"))]}})}))},"amis_action.js":function e(){const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location;(e=e||"")&&"#"===e[0]?e=t.pathname+t.search+e:e&&"?"===e[0]&&(e=t.pathname+e);const r=e.indexOf("?"),o=e.indexOf("#");let a=~r?e.substring(0,r):~o?e.substring(0,o):e,n=~r?e.substring(r,~o?o:void 0):"",i=~o?e.substring(o):t.hash;if(a){if("/"!=a[0]&&!/^https?\:\/\//.test(a)){let e;const r=t.pathname.split("/");let o;for(r.pop();o=/^\.\.?\//.exec(a);)"../"===o[0]&&r.pop(),a=a.substring(o[0].length);a=r.concat(a).join("/")}}else a=t.pathname;return a+n+i},r=()=>({theme:"antd",getModalContainer:e=>{let t=document.querySelector("#amisModalContainer");return t||((t=document.createElement("div")).className="amis-scope",t.style.height="0px",t.id="amisModalContainer",document.body.appendChild(t)),t},notify:(e,t)=>{var r,o;(null===(r=t.props)||void 0===r?void 0:r.schema.tpl)?SteedosUI.message[e](null===(o=t.props)||void 0===o?void 0:o.schema.tpl):"string"==typeof t?SteedosUI.message[e](t):console.warn("notify",e,t)},confirm:e=>new Promise((t,r)=>SteedosUI.Modal.confirm({title:e,onOk:()=>{t(!0)},okText:"确认",cancelText:"取消"})),jumpTo:(e,r)=>{if("goBack"===e)return window.history.back();e=t(e),r&&"url"===r.actionType?!1===r.blank?FlowRouter.go(e):window.open(e):r&&e&&r.target?window.open(e,r.target):/^https?:\/\//.test(e)?window.location.replace(e):FlowRouter.go(e)},requestAdaptor:e=>(e.url&&!/^http[s]?:\/\//i.test(e.url)?(Meteor.isCordova&&(e.url=Meteor.absoluteUrl(e.url)),e.headers||(e.headers={}),!e.headers.Authorization&&Builder.settings.context&&Builder.settings.context.tenantId&&Builder.settings.context.authToken&&(e.headers.Authorization="Bearer ".concat(Builder.settings.context.tenantId,",").concat(Builder.settings.context.authToken))):e.url&&Meteor.isCordova&&Builder.settings.context&&Builder.settings.context.rootUrl&&e.url.startsWith(Builder.settings.context.rootUrl)&&Meteor.isCordova&&(e.headers||(e.headers={}),!e.headers.Authorization&&Builder.settings.context&&Builder.settings.context.tenantId&&Builder.settings.context.authToken&&(e.headers.Authorization="Bearer ".concat(Builder.settings.context.tenantId,",").concat(Builder.settings.context.authToken))),console.log("env.requestAdaptor=action==",e),e)});Template.amis_action.helpers({objectName:()=>{var e=Template.instance().data;return e.button.object||e.button.object_name},name:()=>{var e;return Template.instance().data.button.name},buttonClassName:()=>{var e;return Template.instance().data.buttonClassName}}),Template.amis_action.onRendered(()=>{var e=Template.instance().data,t=e.button,o=e.buttonClassName,a=e.inMore,n=e.data,i=e.env,s=".steedos-button-"+(t.object||e.button.object_name)+"-"+t.name;const c=()=>{var e=Creator.USER_CONTEXT?Creator.USER_CONTEXT.user.language:null;return e?e="cn"===(e="zh"===(e="en"===(e=e.replace("_","-"))?"en-US":e)?"zh-CN":e)?"zh-CN":e:"zh-CN"};Promise.all([waitForThing(window,"amis")]).then(()=>{var e=amisRequire("amis/embed"),o=t.amis_schema?_.isString(t.amis_schema)?JSON.parse(t.amis_schema):t.amis_schema:{type:"service",bodyClassName:"p-0",body:[{type:"button",label:t.label}],regions:["body"]};const a=__meteor_runtime_config__.ROOT_URL,l=lodash.defaultsDeep({},{data:n},{data:{app_id:n.appId,object_name:n.objectName,record_id:n.recordId,formFactor:Steedos.isMobile()?"SMALL":"LARGE",context:{rootUrl:Meteor.isCordova?a.endsWith("/")?a.substr(0,a.length-1):a:"",tenantId:Creator.USER_CONTEXT.spaceId,userId:Creator.USER_CONTEXT.userId,authToken:Creator.USER_CONTEXT.user.authToken,user:Creator.USER_CONTEXT.user},global:{userId:Creator.USER_CONTEXT.userId,spaceId:Creator.USER_CONTEXT.spaceId,user:Creator.USER_CONTEXT.user,now:new Date},scopeId:o.name||o.id,$scopeId:o.name||o.id}});return o=lodash.defaultsDeep(l,o),e.embed(s,o,{locale:c()},Object.assign(r(),i))})})}},layout:{"template.layout.js":function e(){Template.__checkName("creatorLayout"),Template.creatorLayout=new Template("Template.creatorLayout",(function(){var e=this;return Blaze.If((function(){return Spacebars.call(e.lookup("isloading"))}),(function(){return"\n\t"}),(function(){return["\n\t\t",HTML.DIV({class:"steedos skin-blue-light creator h-full flex flex-col relative overflow-hidden"},"\n\t\t\t\n\n\t\t\t",HTML.HEADER({id:"header",class:"steedos-global-header-root flex-none"}),"\n\n\t\t\t\t\n\t\t\t",HTML.DIV({id:"main",class:function(){return["creator-content-wrapper ",Blaze.If((function(){return Spacebars.call(e.lookup("split"))}),(function(){return"split"}))]}},"\n\n\n\n\t\t\t\t",HTML.Comment(' {{#if split}}\n\t\t\t\t\t
\n\t\t\t\t\t\t{{> Template.dynamic template="creatorSidebar"}}\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t{{> Template.dynamic template=main}}\n\t\t\t\t\t
\n\t\t\t\t{{else}} '),"\n\t\t\t\t\t",Blaze._TemplateWith((function(){return{template:Spacebars.call(e.lookup("main"))}}),(function(){return Spacebars.include((function(){return Spacebars.call(Template.__dynamic)}))})),"\n\t\t\t\t",HTML.Comment(" {{/if}} "),"\n\t\t\t"),"\n\t\t\t",HTML.FOOTER({id:"footer",class:"steedos-global-footer-root flex-none"}),"\n\t\t"),"\n",HTML.Comment(' \n\t\t
\n\t\t\t{{> status}}\n\t\t
'),"\n\t\t"]}))}))},"layout.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},r,o;Template.creatorLayout.helpers(Creator.helpers),Template.creatorLayout.helpers({isloading:function(){return Creator.isloading()},collection:function(){return Session.get("action_collection")},fields:function(){return Session.get("action_fields")},collectionName:function(){return Session.get("action_collection_name")},doc:function(){return Session.get("action_record_id")},saveAndInsert:function(){var e,t,r,o;return!!(e=Session.get("action_save_and_insert"))&&(r=(t=Session.get("action_collection")).replace(/Creator.Collections./,""),null!=(o=Creator.getPermissions(r))?o.allowCreate:void 0)},split:function(){var e,t,r;return!(!(e=Creator.getApp())||"admin"!==e._id)&&(r=/\/app\/\w+\/search\//,t=Session.get("router-path"),!r.test(t))},object_name:function(){return Session.get("object_name")},recordId:function(){return Session.get("recordId")},title:function(){return"编辑"},triggerLabel:function(){return"编辑"},onAddFinish:function(){return function(e){var t,r,o,a,n;return a=e[0],n="/app/"+(t=Session.get("app_id"))+"/"+(r=Session.get("object_name"))+"/view/"+(o=a._id),FlowRouter.go(n),!0}},onEditFinish:function(){return function(){return setTimeout((function(){return FlowRouter.reload()}),1),!0}}}),Template.creatorLayout.onRendered((function(){var e;return e=Session.get("pageApiName")||Session.get("object_name")||Session.get("tab_name"),this.autorun((function(){return Steedos.Page.Header.render(Session.get("app_id"),e)})),this.autorun((function(){return Steedos.Page.Footer.render(Session.get("app_id"),e)})),this.autorun((function(){var e,t;if(t=Session.get("pageApiName")||Session.get("object_name")||Session.get("tab_name"),window.SteedosUI&&(e=SteedosUI.refs.globalHeader))return Meteor.setTimeout((function(){var t;try{return e.updateProps({location:FlowRouter.current()},(function(){return console.log("amisScope.updateProps callback.......")}))}catch(r){t=r}}),100)})),this.autorun((function(){var e,t;if(t=Session.get("pageApiName")||Session.get("object_name")||Session.get("tab_name"),window.SteedosUI&&(e=SteedosUI.refs.globalFooter))return Meteor.setTimeout((function(){var t;try{return e.updateProps({location:FlowRouter.current()},(function(){return console.log("amisScope.updateProps callback.......")}))}catch(r){t=r}}),100)}))})),r=function(){var e;return"calendar"===(null!=(e=Creator.getListView(Session.get("object_name",Session.get("list_view_id"))))?e.type:void 0)},AutoForm.hooks({creatorAddForm:{onSuccess:function(e,t){var o,a,n,i;if($("#afModal").modal("hide"),"/app/:app_id/:object_name/calendar/"!==FlowRouter._current.route.path&&!r())return"post"===t.type?(i="/app/"+(o=Session.get("app_id"))+"/"+(a=t.object_name)+"/view/"+(n=t._id),FlowRouter.go(i)):void 0}}},!1),AutoForm.hooks({creatorEditForm:{onSuccess:function(e,t){var o,a,n,i,s,c;if($("#afModal").modal("hide"),!r())return"post"===t.type&&(c="/app/"+(o=Session.get("app_id"))+"/"+(a=t.object_name)+"/view/"+(s=t._id),FlowRouter.go(c)),this.docId&&t.object_name?(i=Creator.getObjectUrl(t.object_name,this.docId),n=Creator.getObjectRecordName(this.updateDoc.$set,t.object_name),Creator.updateTempNavLabel(t.object_name,i,n)):void 0}}},!1),AutoForm.hooks({creatorCellEditForm:{onSuccess:function(e,t){var r,o;if($("#afModal").modal("hide"),this.docId&&t.object_name)return o=Creator.getObjectUrl(t.object_name,this.docId),r=Creator.getObjectRecordName(this.updateDoc.$set,t.object_name),Creator.updateTempNavLabel(t.object_name,o,r)}}},!1),o=function(e,t){return FlowRouter.current().route.path.endsWith("/:record_id")?FlowRouter.reload():window.refreshGrid()},AutoForm.hooks({creatorAddRelatedForm:{onSuccess:o}},!1)},"template.loading.js":function e(){Template.__checkName("creatorLoading"),Template.creatorLoading=new Template("Template.creatorLoading",(function(){var e=this;return HTML.Raw('
\n
\n Loading\n
\n
\n
\n
')}))},"template.empty_layout.js":function e(){Template.__checkName("empty_layout"),Template.empty_layout=new Template("Template.empty_layout",(function(){var e=this;return Blaze._TemplateWith((function(){return{template:Spacebars.call(e.lookup("main"))}}),(function(){return Spacebars.include((function(){return Spacebars.call(Template.__dynamic)}))}))}))}},mobile:{"template.admin.js":function e(){Template.__checkName("adminMenu"),Template.adminMenu=new Template("Template.adminMenu",(function(){var e=this;return HTML.DIV({class:"admin-menu mobile-template-container",id:"admin_menu"},"\n\n ",HTML.DIV({class:"admin-menu-content mobile-template-content"},"\n\t\t\t",HTML.DIV({class:"weui-panel weui-panel_access user-info"},"\n\t\t\t\t",HTML.A({class:"weui-media-box weui-media-box_appmsg"},"\n\t\t\t\t\t",HTML.DIV({class:"weui-media-box__hd",style:function(){return["background: url(",Spacebars.mustache(e.lookup("avatarURL")),")"]}},"\n\t\t\t\t\t\t",HTML.Raw('\x3c!-- --\x3e'),"\n\t\t\t\t\t"),"\n\t\t\t\t\t",HTML.DIV({class:"weui-media-box__bd"},"\n\t\t\t\t\t\t",HTML.H4({class:"weui-media-box__title"},Blaze.View("lookup:name",(function(){return Spacebars.mustache(e.lookup("name"))}))),"\n\t\t\t\t\t\t",HTML.P({class:"weui-media-box__desc"},"\n\t\t\t\t\t\t\t",Blaze.View("lookup:_",(function(){return Spacebars.mustache(e.lookup("_"),"Company")})),":",Blaze.View("lookup:spaceName",(function(){return Spacebars.mustache(e.lookup("spaceName"))})),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"),"\n\t\t\t\t"),"\n\t\t\t"),"\n\n\t\t\t",HTML.DIV({class:"weui-panel"},"\n\t\t\t\t",HTML.DIV({class:"weui-panel__bd"},"\n\t\t\t\t\t",HTML.DIV({class:"weui-media-box weui-media-box_small-appmsg"},"\n\t\t\t\t\t\t",HTML.DIV({class:"weui-cells"},"\n\t\t\t\t\t\t\t",HTML.A({class:"weui-cell weui-cell_access btn-switch-space"},"\n\t\t\t\t\t\t\t\t",HTML.DIV({class:"weui-cell__bd weui-cell_primary"},"\n\t\t\t\t\t\t\t\t\t",HTML.P(Blaze.View("lookup:_",(function(){return Spacebars.mustache(e.lookup("_"),"Switch Company")}))),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t",HTML.SPAN({class:"space-name"},Blaze.View("lookup:spaceName",(function(){return Spacebars.mustache(e.lookup("spaceName"))}))),"\n\t\t\t\t\t\t\t\t",HTML.Raw(''),"\n\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t"),"\n\t\t\t\t\t"),"\n\n\n\n\t\t\t\t\t",HTML.DIV({class:"weui-media-box weui-media-box_small-appmsg"},"\n\t\t\t\t\t\t",HTML.DIV({class:"weui-cells"},"\n\t\t\t\t\t\t\t",HTML.A({class:"weui-cell weui-cell_access btn-change-password"},"\n\t\t\t\t\t\t\t\t",HTML.DIV({class:"weui-cell__bd weui-cell_primary"},"\n\t\t\t\t\t\t\t\t\t",HTML.P(Blaze.View("lookup:_",(function(){return Spacebars.mustache(e.lookup("_"),"Change Password")}))),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t",HTML.Raw(''),"\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"),"\n\t\t\t"),"\n\n ",HTML.DIV({class:"weui-panel"},"\n\t\t\t\t",HTML.DIV({class:"weui-panel__bd"},"\n\t\t\t\t\t",HTML.DIV({class:"weui-media-box weui-media-box_small-appmsg"},"\n\t\t\t\t\t\t",HTML.DIV({class:"weui-cells"},"\n\t\t\t\t\t\t\t",HTML.A({class:"weui-cell weui-cell_access log-out steedos-logout"},"\n\t\t\t\t\t\t\t\t",HTML.DIV({class:"weui-cell__bd weui-cell_primary"},"\n\t\t\t\t\t\t\t\t\t",HTML.P(Blaze.View("lookup:_",(function(){return Spacebars.mustache(e.lookup("_"),"Logout")}))),"\n\t\t\t\t\t\t\t\t"),"\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"),"\n\t\t\t"),"\n "),"\n ")}))},"admin.coffee":function e(){var r=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Template.adminMenu.helpers({avatarURL:function(e,t,r,o){var a,n;return n=Meteor.userId(),(e=null!=(a=Creator.getCollection("users").findOne({_id:n}))?a.avatar:void 0)?Steedos.absoluteUrl("avatar/"+Meteor.userId()+"?avatar="+e):Creator.getRelativeUrl("/images/default-avatar.png")},name:function(){var e;return null!=(e=Creator.getCollection("users").findOne())?e.name:void 0},logoutUrL:function(){return Creator.getRelativeUrl("/accounts/a/#/logout")},spaceName:function(){var e;return Session.get("spaceId")&&(e=db.spaces.findOne(Session.get("spaceId")))?e.name:t("none_space_selected_title")}}),Template.adminMenu.events({"click .steedos-logout":function(){return Steedos.logout()},"click .admin-menu-back":function(e,t){var r;return r=urlQuery[urlQuery.length-2],urlQuery.pop(),t.$("#admin_menu").animateCss("fadeOutRight",(function(){return Blaze.remove(t.view),r?FlowRouter.go(r):FlowRouter.go("/app")}))},"click .btn-switch-space":function(e,t){return FlowRouter.go("/user_settings/switchspace")},"click .btn-change-password":function(e,t){return Modal.show("reset_password_modal")},"click .btn-change-avatar":function(e,t){return t.$("#mobile-avator-upload").click()},"change #mobile-avator-upload":function(e,r){var o;if(o=e.target.files[0])return $("body").addClass("loading"),db.avatars.insert(o,(function(e,r){return e?(console.error(e),toastr.error(t(e.reason)),$(document.body).removeClass("loading")):setTimeout((function(){return Meteor.call("updateUserAvatar",r._id,(function(e,r){return(null!=r?r.error:void 0)?($(document.body).removeClass("loading"),toastr.error(t(r.message))):$(document.body).removeClass("loading")}))}),3e3)}))}})},"template.switch_space.js":function e(){Template.__checkName("switchSpace"),Template.switchSpace=new Template("Template.switchSpace",(function(){var e=this;return HTML.DIV({class:"switch-space mobile-template-container",id:"switch_space"},"\n\t\t\n\t\t",HTML.DIV({class:"switch-space-content mobile-template-content"},"\n\t\t\t",HTML.DIV({class:"weui-panel"},"\n\t\t\t\t",HTML.DIV({class:"weui-panel__bd"},"\n\t\t\t\t\t",HTML.DIV({class:"weui-media-box weui-media-box_small-appmsg"},"\n\t\t\t\t\t\t",HTML.DIV({class:"weui-cells"},"\n\t\t\t\t\t\t\t",Blaze.Each((function(){return Spacebars.call(e.lookup("spaces"))}),(function(){return["\n\t\t\t\t\t\t\t",HTML.A({class:"weui-cell weui-cell_access switchSpace"},"\n\t\t\t\t\t\t\t\t",HTML.DIV({class:"weui-cell__bd weui-cell_primary"},"\n\t\t\t\t\t\t\t\t\t",HTML.P(Blaze.View("lookup:name",(function(){return Spacebars.mustache(e.lookup("name"))}))),"\n\t\t\t\t\t\t\t\t"),"\n\t\t\t\t\t\t\t\t",Blaze.If((function(){return Spacebars.dataMustache(e.lookup("current_space"),e.lookup("_id"))}),(function(){return["\n\t\t\t\t\t\t\t\t\t",HTML.SPAN({class:"weui-icon-success-no-circle"}),"\n\t\t\t\t\t\t\t\t"]})),"\n\t\t\t\t\t\t\t"),"\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"),"\n\t\t\t"),"\n\t\t"),"\n\t")}))},"switch_space.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};Template.switchSpace.helpers({spaces:function(){return db.spaces.find()},current_space:function(e){return e===Session.get("spaceId")}}),Template.switchSpace.events({"click .switchSpace":function(e,t){return Steedos.setSpaceId(this._id),FlowRouter.go("/app")},"click .switch-space-back":function(e,t){var r;return r=urlQuery[urlQuery.length-2],urlQuery.pop(),t.$("#switch_space").animateCss("fadeOutRight",(function(){return Blaze.remove(t.view),r?FlowRouter.go(r):FlowRouter.go("/app")}))}})}},"core.coffee":function e(){var r=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},o;Creator.Pages={},o=["owner","company_id","company_ids","locked"],Steedos.addPage=function(e,t){if(e)return Creator.Pages[e]=t},Creator.getLayout=function(e){return e||(e=Session.get("app_id")),"steedos"===e?"steedosLayout":"creatorLayout"},Creator.createObject=function(e,t){var r,o;return o=Creator.getObject(e),r="Creator.Collections."+e,Session.set("action_collection",r),Session.set("action_save_and_insert",!0),Session.set("action_collection_name",o.label),Session.set("action_object_name",e),Session.set("action_fields",void 0),Session.set("cmDoc",t),Meteor.defer((function(){return $(".creator-add").click()}))},Meteor.isClient&&(Creator.TabularSelectedIds={},Meteor.autorun((function(){var e,t;if(e=Session.get("list_view_id"),t=Session.get("object_name"))return Creator.TabularSelectedIds[t]=[]})),Creator.remainCheckboxState=function(e){var t,r,o,a,n,i,s;if((t=e.find(".select-all")).length&&(a=(o=null!=(n=t[0])?n.dataset:void 0).objectName,i=Creator.TabularSelectedIds[a]))return(r=e.find(".select-one")).each((function(e,t){var r;return r=i.indexOf(t.dataset.id)>-1,$(t).prop("checked",r)})),(s=i.length)>0&&r.length!==s?t.prop("indeterminate",!0):(t.prop("indeterminate",!1),0===s?t.prop("checked",!1):s===r.length?t.prop("checked",!0):void 0)},Creator.isListViewFilterEditable=function(e){return!e.shared||e.shared&&e.owner===Steedos.userId()},Creator.getODataFilter=function(e,t,r){var o,a,n,i,s,c,l,u,d,p,f,m,g;if(g=Meteor.userId(),m=Session.get("spaceId"),a=Creator.Collections.object_listviews.findOne(e))(l=Creator.isListViewFilterEditable(a))||((o={}).filter_scope=a.filter_scope,o.filters=a.filters);else if(o={},m&&g){if(!(u=Creator.getListView(t,e)))return["_id","=",-1];o.filter_scope=u.filter_scope,o.filters=u.filters}if(Creator.isCloudAdminSpace(m)&&_.include(["users","space_users","spaces"],t)&&delete o.filters,o&&(r?(o.filter_scope&&(r.filter_scope=o.filter_scope),_.isFunction(r.filters)||(null!=(d=r.filters)?d.length:void 0)?(_.isFunction(o.filters)||(null!=(p=o.filters)?p.length:void 0))&&(r.filters=[[r.filters,"and",o.filters]]):r.filters=o.filters):r=o),r||(r={}),n=r.filter_logic,i=r.filter_scope,s=r.filters,f=[],_.isFunction(s)&&(s=s()),a?n?(c=Creator.formatLogicFiltersToDev(s,n),f.length?f.push("and",c):f.push(c)):s&&s.length>0&&(f.length>0&&f.push("and"),(s=Creator.formatFiltersToDev(s,t))&&s.length>0&&(s=[s]),_.each(s,(function(e){return f.push(e)}))):m&&g&&("users"!==t||Creator.isCloudAdminSpace(m)||f.push(["_id","=",g]),s&&(s=Creator.formatFiltersToDev(s,t))&&s.length>0&&(s=[s],f.length>0&&f.push("and"),_.each(s,(function(e){if("spaces"!==t||e.length>0&&"_id"!==e[0])return f.push(e)})))),"mine"===i&&(f.length>0&&f.push("and"),f.push(["owner","=",g])),0!==f.length)return f},Creator.getODataRelatedFilter=function(e,t,r,o,a){var n,i,s,c,l,u,d,p,f,m,g,h,v,b,w,S,C;if(r&&(S=Steedos.spaceId(),C=Meteor.userId(),v=a?[a]:Creator.getRelatedList(e,r),h="",u="",w=[],n=function(e){return w.length>0&&w.push("and"),w.push(e)},_.each(v,(function(e){if(e.object_name===t)return e.filtersFunction?u=e.filtersFunction:h=e.related_field_name})),h||u)){if(h=h.replace(/\./g,"/"),o&&(i=Creator.getListView(t,o))){if(s=i.filter_logic,c=i.filter_scope,l=i.filters,u)return l=u(Creator.odata.get(e,r));s?(d=Creator.formatLogicFiltersToDev(l,s),n(d)):l&&l.length>0&&(l=_.map(l,(function(e){return _.isObject(e)&&!_.isArray(e)?Meteor.isClient&&_.isString(null!=e?e._value:void 0)?[e.field,e.operation,Creator.eval("("+e._value+")")()]:[e.field,e.operation,e.value]:e})),(l=Creator.formatFiltersToDev(l,t))&&l.length>0&&(l=[l]),_.each(l,(function(e){return n(e)})))}if("cfs.files.filerecord"===t&&n(["metadata/space","=",S]),m=Creator.getObject(t),p=t===e&&(null!=m?m.enable_tree:void 0),"cms_files"===t?(n(["parent/o","=",e]),n(["parent/ids","=",r])):"objects"===e?n([h,"=",r]):p||((b=null!=m?m.fields:void 0)&&(g=b[h]),g&&g.reference_to_field&&(f=Creator.odata.get(e,r,g.reference_to_field),"permission_fields"===t&&"object_fields"===e&&n(["object_name","=",f.object]),f&&f[g.reference_to_field]&&(r=f[g.reference_to_field])),!g||"master_detail"!==g.type&&"lookup"!==g.type?g&&"grid"===g.type?(n([h+".o","=",e]),n([h+".ids","=",r])):n([h,"=",r]):_.isFunction(g.reference_to)?_.isArray(g.reference_to())?n([h+".ids","=",r]):n([h,"=",r]):_.isArray(g.reference_to)?n([h+".ids","=",r]):n([h,"=",r])),"mine"===c&&n(["owner","=",C]),0!==w.length)return w}},Creator.getJsReportUrlQuery=function(){var e,t,r;return r="?space_id="+Steedos.getSpaceId(),(t=Tracker.nonreactive((function(){return Session.get("filter_items")})))&&(r+="&user_filters="+(e=encodeURI(JSON.stringify(t)))),r},Creator.getJsReportViewUrl=function(e){var t;return t=Creator.getRelativeUrl("/plugins/jsreport/web/viewer_db/"+e),t+=Creator.getJsReportUrlQuery()},Creator.getJsReportExcelUrl=function(e){var t;return t=Creator.getRelativeUrl("/plugins/jsreport/api/report_db/"+e+"/excel"),t+=Creator.getJsReportUrlQuery()},Creator.getJsReportPdfUrl=function(e){var t;return t=Creator.getRelativeUrl("/plugins/jsreport/api/report_db/"+e+"/pdf"),t+=Creator.getJsReportUrlQuery()},Creator.getStimulsoftReportViewUrl=function(e){var t;return t=Creator.getRelativeUrl("/plugins/stimulsoft/web/viewer_db/"+e),t+=Creator.getJsReportUrlQuery()},Creator.getStimulsoftReportDesignerUrl=function(e){var t;return t=Creator.getRelativeUrl("/plugins/stimulsoft/web/designer_db/"+e),t+=Creator.getJsReportUrlQuery()},Creator.objectOdataSelectFields=function(e){var t,r;return t=e.fields,r=(r=_.keys(t)).filter((function(e){return e.indexOf(".")<0})),e&&["default","meteor"].indexOf(e.database_name||"default")>-1&&(r=_.union(r.concat(o))),r.join(",")},Creator.objectOdataExpandFields=function(e,t){var r,o;return r=[],o=e.fields,t||(t=_.keys(o)),_.each(t,(function(e){var t,a,n;if(("master_detail"===(null!=(a=o[e])?a.type:void 0)||"lookup"===(null!=(n=o[e])?n.type:void 0))&&(o[e].reference_to?(t=o[e].reference_to,_.isFunction(t)&&(t=t())):_.isFunction(o[e].optionsFunction)&&(t=o[e].optionsFunction({}).getProperty("value")),_.isArray(t)||(t=[t]),t=_.map(t,(function(e){var t,r;return t=(null!=(r=Creator.getObject(e))?r.NAME_FIELD_KEY:void 0)||"name"})),t=_.compact(t),(t=(t=_.uniq(t)).join(","))&&e.indexOf("$")<0))return e.indexOf(".")<0?r.push(e):r.push(e.replace(".","/"))})),r.join(",")},Creator.relatedObjectFileUploadHandler=function(e,r){var o,a,n,i,s,c,l,u,d,p;for(u=null!=(o=e.currentTarget.dataset)?o.parent:void 0,s=e.currentTarget.files,c=0,d=Session.get("record_id"),l=Session.get("object_name"),p=Session.get("spaceId");c0&&(t=!0),!t})),t},Creator.pushCurrentPathToUrlQuery=function(){var e;if((e=FlowRouter.current().path)!==urlQuery[urlQuery.length-1])return urlQuery.push(e)},Creator.getStandardQuery=function(e,t){var r,o,a,n,i,s;if(o=Creator.getObject(e).fields,t&&t.query&&_.size(t.query)&&t.object_name===e)return a=t.object_name,i=t.query,s=[],t.is_mini?_.each(i,(function(e,t){var r,n,i,c;if(o[t])if(r=Creator.getFieldDataType(o,t),["currency","number"].includes(r)){if(!_.isString(e))return s.push([t,"=",e]);if(c=e.trim().split(" "),n=[],c.forEach((function(e){var r,o;try{if(o=Number(e),_.isNumber(o)&&!_.isNaN(o))return n.push([t,"=",o])}catch(a){return r=a,console.error(r)}})),n.length>0)return s.push(Creator.formatFiltersToDev(n,a,{is_logic_or:!1}))}else if(["text","textarea","html","select","autonumber","url","email"].includes(r))if(_.isString(e)){if(c=e.trim().split(" "),i=[],c.forEach((function(e){return e=encodeURIComponent(Creator.convertSpecialCharacter(e)),"select"===r&&o[t].multiple?i.push([t,"=",e]):i.push([t,"contains",e])})),i.length>0)return s.push(Creator.formatFiltersToDev(i,a,{is_logic_or:!1}))}else if(_.isArray(e))return s.push([t,"=",e])})):_.each(i,(function(e,t){var r,n,i,c,l,u;if(o[t]){if(n=Creator.getFieldDataType(o,t),["date","datetime","time","currency","number"].includes(n))return s.push([t,">=",e]);if(["text","textarea","html"].includes(n)){if(_.isString(e)){if(u=e.trim().split(" "),l=[],u.forEach((function(e){return e=encodeURIComponent(Creator.convertSpecialCharacter(e)),l.push([t,"contains",e])})),l.length>0)return s.push(Creator.formatFiltersToDev(l,a,{is_logic_or:!1}))}else if(_.isArray(e))return s.push([t,"=",e])}else{if(["boolean"].includes(n))return s.push([t,"=",JSON.parse(e)]);if(!["lookup","master_detail"].includes(n))return s.push([t,"=",e]);if(i=null!=(r=o[t])?r.reference_to:void 0,_.isFunction(i)&&(i=i()),!_.isArray(i))return s.push([t,"=",e]);if((null!=e?e.ids:void 0)&&s.push({field:t+".ids",operation:"=",value:null!=e?e.ids:void 0}),null!=e?e.o:void 0)return c=Creator.getObject(null!=e?e.o:void 0),s.push({field:t+".o",operation:"=",value:c._collection_name})}}else if(t=t.replace(/(_endLine)$/,""),n=Creator.getFieldDataType(o,t),o[t]&&["date","datetime","time","currency","number"].includes(n))return s.push([t,"<=",e])})),n={is_logic_or:r=!!t.is_mini},Creator.formatFiltersToDev(s,a,n);delete Session.keys.standard_query},Creator.getSafeObjectUrl=function(e,t,r){var o;return _.isString(e)?(o="users"===e?Creator.getObject("space_users"):Creator.getObject(e)).permissions.get().allowRead?Creator.getObjectUrl(e,t,r):void 0:""},Creator.formatFileSize=function(e){var t,r;return r="KB",(t=e/1024)>1024&&(t/=1024,r="MB"),t>1024&&(t/=1024,r="GB"),t.toFixed(2)+r},Creator.getTableCellData=function(e){var r,o,a,n,i,s,c,l,u,d,p,f,m,g,h,v,b,w,S,C,y,j,T,R;if(d=[],R=e.val,g=e.object_name,y=(j=Creator.getObject(g)).NAME_FIELD_KEY,"organizations"===g&&(y="name"),o=e.field){if(a=o.type,"formula"===o.type)a=o.data_type;else if("select"===o.type&&o.data_type&&"text"!==o.data_type)a=o.data_type;else if("summary"===o.type)if("count"===o.summary_type)a="number";else{if(!(C=Creator.getObject(o.summary_object)))throw new Meteor.Error(500,"The summary_object '"+o.summary_object+"' is not found for the field '"+o.name+"'");if(!(S=C.fields[o.summary_field]))throw new Meteor.Error(500,"The summary_field '"+o.summary_field+"' is not found for the field '"+o.name+"'");"formula"!==(a=S.type)&&"summary"!==a||(a=S.data_type),_.isNumber(o.scale)||(r=function(e){var t,o;return _.isNumber(e.scale)?e.scale:"summary"===e.type&&(o=Creator.getObject(e.summary_object))?(t=o.fields[e.summary_field])?r(t):null:void 0},o.scale=r(S))}return v=null!=(h=e.field)?h.reference_to:void 0,_.isFunction(v)&&(v=v()),"grid"===a?d.push({isTable:!0}):"location"===a?d.push({value:(null!=R?R.address:void 0)||"",id:e._id}):"lookup"!==a&&"master_detail"!==a||_.isEmpty(R)?"image"===a?"string"==typeof R?d.push({value:R,id:e._id,isImage:!0,baseUrl:Creator.getRelativeUrl("/api/files/images")}):d.push({value:R,id:e._id,isImages:!0,baseUrl:Creator.getRelativeUrl("/api/files/images")}):"avatar"===a?"string"==typeof R?d.push({value:R,id:e._id,isImage:!0,baseUrl:Creator.getRelativeUrl("/api/files/avatars")}):d.push({value:R,id:e._id,isImages:!0,baseUrl:Creator.getRelativeUrl("/api/files/avatars")}):"code"===a?(R=R?"...":"",d.push({value:R,id:e._id})):"password"===a?(R=R?"******":"",d.push({value:R,id:e._id})):"url"===a?((null!=(f=R)?f.startsWith("http"):void 0)||(f=Steedos.absoluteUrl(encodeURI(f))),d.push({value:R,href:f,id:e._id,isUrl:!0})):"email"===a?d.push({value:R,href:f,id:e._id,isEmail:!0}):"boolean"===a||"toggle"===a?(R=e.val?t("YES"):t("NO"),d.push({value:R,checked:e.val,id:e._id,isBoolean:!0})):"select"===a?(s=o.allOptions||o.options,u=e.doc||{},c=e.record_val,_.isFunction(o.options)&&(s=o.options(c||u)),_.isFunction(o.optionsFunction)&&(s=o.optionsFunction(c||u)),w=e.val,_.isArray(w)||(w=[w]),m=[],_.each(s,(function(e){if(_.indexOf(w,e.value)>-1)return m.push({label:e.label,value:e.value})})),R=(R=m.map((function(e){return e.label}))).join(","),d.push({value:R,items:m,id:e._id,isSelects:!0})):(R&&["datetime","date","time"].indexOf(a)>=0?"odata"===e.agreement?"datetime"===a?"string"==typeof e.val&&/\d+Z$/.test(e.val)?R=moment(e.val).format("YYYY-MM-DD H:mm"):(T=moment().utcOffset()/60,R=moment(e.val).add(T,"hours").format("YYYY-MM-DD H:mm")):"date"===a&&(R="string"==typeof e.val&&/\d+Z$/.test(e.val)?moment.utc(e.val).format("YYYY-MM-DD"):moment(e.val).format("YYYY-MM-DD")):"datetime"===a?R=moment(e.val).format("YYYY-MM-DD H:mm"):"date"===a?R=moment.utc(e.val).format("YYYY-MM-DD"):"time"===a&&(R=moment.utc(e.val).format("HH:mm")):null===e.val?R="":"lookup"===a?_.isFunction(o.optionsFunction)&&(u=e.doc||{},(l=R)&&(_.isArray(l)||(l=[l]),(b=_.filter(o.optionsFunction(u),(function(e){return l.indexOf(e.value)>-1})))&&(R=b.getProperty("label")))):"filesize"===a?R=Creator.formatFileSize(R):["number","currency","percent"].indexOf(a)>-1&&_.isNumber(R)?(p=0,p=_.isNumber(o.scale)?o.scale:"currency"===a?2:0,"percent"===a&&(R*=100),R=Steedos.numberToString(R,p),"percent"===a&&(R+="%")):"markdown"===a?_.isEmpty(R)||(R=Spacebars.SafeString(marked(R))):"html"===a?_.isEmpty(R)||(R=Spacebars.SafeString(R)):"textarea"===a&&R&&(R=(R=R.replace(/\n/g,"\n
")).replace(/ /g," ")),"record_details"!==e.parent_view&&e.field_name===y&&(f=Creator.getObjectUrl(e.object_name,e._id)),d.push({value:R,href:f,id:e._id,type:a})):_.isFunction(o.optionsFunction)&&"company"!==v?(u=e.doc||{},c=e.record_val,(l=R)&&(l=_.isArray(l)?l.map((function(e){return _.isObject(e)?e._id:e})):_.isObject(l)?[l._id]:[l],i=o.optionsFunction(c||u),(b=_.filter(i,(function(e){return l.indexOf(null!=e?e.value:void 0)>-1})))&&(R&&_.isArray(R)&&_.isArray(b)&&(b=Creator.getOrderlySetByIds(b,R,"value")),R=b.getProperty("label"))),v?"objects"===v?_.each(b,(function(t){var r,o,a;return a=t.label,(null!=(r=Creator.getObject(t.value))?r._id:void 0)?(o=Creator.getSafeObjectUrl(v,r._id),d.push({reference_to:v,rid:a,value:a,id:e._id,href:o})):d.push({value:R,id:e._id})})):(n=e.val,_.isArray(n)||(n=n?[n]:[]),_.each(n,(function(t){var r,o,a;return _.isString(t)?(b=_.filter(i,(function(e){return t===(null!=e?e.value:void 0)})),d.push({value:b.getProperty("label"),id:e._id})):(v=t["reference_to._o"]||v,o=t._id,a=t._NAME_FIELD_VALUE,r=Creator.getSafeObjectUrl(v,o),d.push({reference_to:v,rid:o,value:a,href:r,id:e._id}))}))):d.push({value:R,id:e._id})):(_.isArray(R)||(R=R?[R]:[]),_.each(R,(function(t){var r,o,a;if(t)return v=t["reference_to._o"]||v,o=t._id,a=t._NAME_FIELD_VALUE,_.isString(t)&&(o=t,a=t),r=Creator.getSafeObjectUrl(v,o),d.push({reference_to:v,rid:o,value:a,href:r,id:e._id})}))),d}},Creator.openSafeObjectUrl=function(e,t){var r;return Steedos.isMobile()||(r=Creator.getSafeObjectUrl(e,t,"-"))&&window.open(r,"_blank","width=800, height=600, left=50, top= 50, toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes"),"undefined"!=typeof event&&null!==event&&event.stopPropagation(),"undefined"!=typeof event&&null!==event&&event.preventDefault(),!1},Creator.getAppLabel=function(e){return e||(e=Creator.getApp()),e?e.label?t(e.label):t(e.name):""},Creator.measureWidth=_.memoize((function(e,t,r){var o,a,n,i;return(o=arguments.callee.canvas)||(o=document.createElement("canvas"),(n=document.createDocumentFragment()).appendChild(o),arguments.callee.canvas=o),(a=o.getContext("2d")).font=t,i=a.measureText(e).width,r&&i>r?r:i})),Creator.showPreviewButton=function(e){var t,r,o,a,n;return!!((null!=(n=null!=(t=Meteor.settings)&&null!=(r=t.public)?r.webservices:void 0)&&null!=(o=n.officeOnline)?o.url:void 0)&&Steedos.isOfficeFile(e)||(null!=n&&null!=(a=n.pdfOnline)?a.url:void 0)&&Steedos.isPdfFile(e))},Creator.officeOnlinePreview=function(e,t){var r,o,a,n,i,s,c,l,u,d,p,f,m,_,g,h;return a=null!=(s=Meteor.settings)&&null!=(c=s.public)&&null!=(l=c.webservices)&&null!=(u=l.officeOnline)?u.url:void 0,i=null!=(d=Meteor.settings)&&null!=(p=d.public)&&null!=(f=p.webservices)&&null!=(m=f.pdfOnline)?m.url:void 0,a&&""!==a||i&&""!==i?(h=Meteor.userId(),_=Steedos.spaceId(),r={authToken:o=Accounts._storedLoginToken()},e=e+"?token="+(g=window.btoa(JSON.stringify(r))),Steedos.isPdfFile(t)?(n=e,i&&""!==i&&(n=i+encodeURIComponent(e)),Steedos.openWindow(n)):(n=a+encodeURIComponent(e),Steedos.openWindow(n))):(toastr.error(TAPi18n.__("creator_office_online_web_url_required")),!1)},Creator.isImageAttachment=function(e){var t,r;return!(e.split(".").length<2)&&(t=e.split(".").pop().toLowerCase(),-1!==(r=["png","jpg","jpeg","bmp","gif","webp","psd","svg","tiff"]).indexOf(t))},Creator.isHtmlAttachment=function(e){var t,r;return!(e.split(".").length<2)&&(t=e.split(".").pop().toLowerCase(),-1!==(r=["html","htm"]).indexOf(t))}),Meteor.startup((function(){return $(document).on("click",(function(e){return $(e.target).closest(".slds-table td").length<1?$(".slds-table").addClass("slds-no-cell-focus"):$(".slds-table").removeClass("slds-no-cell-focus")})),$(window).resize((function(){if($(".list-table-container table.dataTable").length)return $(".list-table-container table.dataTable thead th").each((function(){var e;return e=$(this).outerWidth(),$(".slds-th__action",this).css("width",e+"px")}))})),$(document).keydown((function(e){if("13"===e.keyCode||"Enter"===e.key){if($(".modal").length>1)return;if("TEXTAREA"!==e.target.tagName||$(e.target).closest("div").hasClass("bootstrap-tagsinput")){if("update"===Session.get("cmOperation"))return e.preventDefault(),e.stopPropagation(),$(".creator-auotform-modals .btn-update").click();if("insert"===Session.get("cmOperation"))return e.preventDefault(),e.stopPropagation(),$(".creator-auotform-modals .btn-insert").click()}}}))}))},"colors.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},r,o,a,n,i;n="border-radius: 10px;padding: 1px 6px;display: inline-block;",i=function(e){return 3===(e=e.slice(1)).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),{r:Number.parseInt(e.slice(0,2),16),g:Number.parseInt(e.slice(2,4),16),b:Number.parseInt(e.slice(4,6),16)}},a=function(e,t,r){var o,a,n,s;return.299*(n=(s=i(e)).r)+.587*(a=s.g)+.114*(o=s.b)>186?r:t},o=function(e,t,r){var o,a,n,s,c,l,u;return(o=.2126*(n=(u=[(c=(l=i(e)).r)/255,(s=l.g)/255,(a=l.b)/255]).map((function(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})))[0]+.7152*n[1]+.0722*n[2])>.179?r:t},r=function(e){var t,r;return r=[],t=e.fields,_.each(t,(function(t,a){var i;if(i=t.options,_.isFunction(i)&&(i=i({})),"select"===t.type&&(null!=i?i.length:void 0))return _.each(i,(function(t){var i,s;if(t.color)return i=t.color,/^#/.test(i)||(i="#"+i),s=o(i,"#fff","#333"),r.push(".creator-cell-color-"+e.name+"-"+a+"-"+t.value+"{"+n+"background:"+i+";color:"+s+";}")}))})),r},Creator.appendObjectFieldsColorStyles=function(){var e,t;return $("#object_fields_color_styles").remove(),t=[],_.each(Creator.Objects,(function(e){return t=_.union(t,r(e))})),t.push(".creator-cell-multiple-color{\n\tmargin-right:1px;\n}\n@media (max-width:767px) {\n\t.creator-cell-multiple-color{\n\t\tmargin-right:4px;\n\t}\n}"),e=$('"),$("head").append(e)}},"temp_navs.coffee":function e(){var r=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},o,a,n,i,s,c,l,u,d,p;s=!1,a=function(){var e;if(e=sessionStorage.getItem("temp_navs"))return e.split(",").map((function(e){var t;return{name:(t=e.split(":"))[0],url:t[1],label:t[2],is_temp:!0}}))},n=function(e,t,r){return sessionStorage.getItem("temp_navs_id")},d=function(e){return sessionStorage.setItem("temp_navs_id",e)},p=function(e){var t,r;return e||(e=[]),t=(r=e.map((function(e){var t;return t=e.name,e.url&&(t+=":"+e.url),e.label&&(t+=":"+e.label),t}))).join(","),sessionStorage.setItem("temp_navs",t)},c=[],o=function(e,t){var r;return r=t||Creator.getObjectUrl(e),c.push(r)},u=function(e,t){var r,o;if(o=t||Creator.getObjectUrl(e),(r=c.indexOf(o))>-1)return c.splice(r,1)},i=function(e,t){var r,o,a,n,i,s;for(r=t||Creator.getObjectUrl(e),o=2,s=6,i=!1;!i&&o<8&&!((a=urlQuery.length-o)<0);)n=urlQuery[a],__meteor_runtime_config__.ROOT_URL_PATH_PREFIX+n!==r?(i=n&&c.indexOf(__meteor_runtime_config__.ROOT_URL_PATH_PREFIX+n)<0,o++):o++;return i?n:null},l=function(e,t,r,a){var n,s,c,l,u,d,p,f,m;return n=Session.get("object_name"),s=Session.get("record_id"),t?(l=(c=Creator.getObjectUrl(n,s))===t)||(l=FlowRouter.current().path===t):l=n===e,l?(d=i(e,t),o(e,t),d?(FlowRouter.go(d),urlQuery.pop(),urlQuery.pop()):((f=r[a])||(f=r[a-1]),f?(m=f.url?f.url:Creator.getObjectUrl(f.name),FlowRouter.redirect(m)):(u=(p=Creator.getAppMenus())[p.length-1],FlowRouter.redirect(u.path)))):o(e,t)},Creator.getTempNavs=function(){var e;return(e=Session.get("temp_navs"))||(e=a())&&Session.set("temp_navs",e),e},Creator.getTempNavsId=function(){var e;return(e=Session.get("temp_navs_id"))||(e=n())&&Session.set("temp_navs_id",e),e},Creator.createTempNav=function(e,t,r){var o,a;if(t||!(["users","cms_files","cfs.files.filerecord"].indexOf(e)>-1))return(a=Creator.getTempNavs())||(a=[]),(o=a.find((function(r){return t?r.name===e&&r.url===t:r.name===e})))?void 0:(a.push({name:e,url:t,label:r,is_temp:!0}),Session.set("temp_navs",a),p(a),u(e,t))},Creator.updateTempNavLabel=function(e,t,r){var o,a;if(t&&r)return(a=Creator.getTempNavs())||(a=[]),(o=a.find((function(r){return r.name===e&&r.url===t})))?(o.label=r,Session.set("temp_navs",a),p(a)):void 0},Creator.removeTempNavItem=function(e,t){var r,o,a;if((a=Session.get("temp_navs"))&&(o=null,r=a.filter((function(r,a){var n;return(n=t?r.name===e&&r.url===t:r.name===e)&&(o=a),!n})),_.isNumber(o)))return s=!0,l(e,t,r,o),Meteor.defer((function(){return Session.set("temp_navs",r),p(r),s=!1})),!0},Creator.resetTempNavsIfNeeded=function(){var e,t,r;if((t=(r=Creator.getTempNavsId())!==(e=Meteor.userId()+":"+Steedos.spaceId()+":"+Session.get("app_id")))&&(Session.set("temp_navs",null),p(null),c.length=0),t||!Session.get("temp_navs_id"))return Session.set("temp_navs_id",e),d(e)},Meteor.startup((function(){if(!Steedos.isMobile())return Tracker.autorun((function(){var e,t;if(Creator.bootstrapLoaded.get()&&(t=Session.get("spaceId"),e=Session.get("app_id"),t&&e))return Creator.resetTempNavsIfNeeded()})),Tracker.autorun((function(e){var r,o,a,n,i,c,l,u,d,p,f,m,g,h,v;if(u=Session.get("object_name"),h=Session.get("tab_name"),p=Session.get("record_id"),i=Creator.getAppMenus(),u&&i&&i.length&&(f=Session.get("record_name"),n=_.pluck(i,"id"),o=Session.get("temp_navs_force_create"),(null!=n?n.indexOf(u||h):void 0)<0||o)){if(o&&s)return void Session.set("temp_navs_force_create",!1);if(!(l=Creator.getObject(u)))return;if(p){if(!(d=Creator.getObjectRecord()))return;if(v=Creator.getObjectUrl(u,p),o&&(r=urlQuery[urlQuery.length-3])&&(g=new RegExp(r+"$")).test(v))return void Session.set("temp_navs_force_create",!1);a=f||("cfs.files.filerecord"===u?t("cfs_files_filerecord__object")+"-"+(null!=d&&null!=(m=d.original)?m.name:void 0):d[c=l.NAME_FIELD_KEY||"name"]),Creator.createTempNav(u,v,a)}else Creator.createTempNav(u);if(o)return Session.set("temp_navs_force_create",!1)}}))}))},"router.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{},r,o,a,n;this.urlQuery=new Array,o=function(e,t){var r,o;Meteor.userId()&&(Creator.pushCurrentPathToUrlQuery(),"-"!==(r=e.params.app_id)&&r&&Session.get("app_id")!==r?Session.set("app_id",r):"-"!==r||Session.get("app_id")||(o=Steedos.getFirstApp(),Session.set("app_id",o.id)))},n=function(e,t){var r,o,a,n;if(o=Tracker.nonreactive((function(){return Session.get("object_name")})),a=Tracker.nonreactive((function(){return Session.get("record_id")})),r=e.params.object_name,n=e.params.record_id,Session.set("object_name",r),Session.set("tab_name",null),Session.set("pageApiName",null),Session.set("record_id",n),Session.set("record_name",null),n&&(o&&o!==r||a&&n!==a))return Session.set("temp_navs_force_create",!0)},r=function(e,t){var r;if("admin"===(r=e.params.app_id)&&Steedos.isMobile())return t("/user_settings"),urlQuery.pop()},FlowRouter.route("/app",{triggersEnter:[o],action:function(e,t){return BlazeLayout.render(Creator.getLayout(),{main:"creator_app_home"})}}),FlowRouter.route("/app/menu",{triggersEnter:[o],action:function(e,t){var r;return r="app_object_menu",Session.set("hidden_header",!0),BlazeLayout.render(Creator.getLayout(),{main:r})},triggersExit:[function(e,t){if(Steedos.isMobile())return Session.set("hidden_header",void 0)}]}),FlowRouter.route("/app/:app_id",{triggersEnter:[o],action:function(e,t){var r,o,a;return"-"!==(o=FlowRouter.getParam("app_id"))&&(Session.set("object_name",null),Session.set("record_id",null),Session.set("app_id",o)),Session.set("admin_template_name",null),a=(r=Creator.getApp(o))&&r.is_use_iframe?"creator_app_iframe":"creator_app_home",BlazeLayout.render(Creator.getLayout(),{main:a})}}),FlowRouter.route("/app/:app_id/page/:page_id",{triggersEnter:[o],action:function(e,t){var r,o;return console.log("params",e),r=FlowRouter.getParam("app_id"),o=null!=e?e.page_id:void 0,Session.set("pageApiName",o),Session.set("object_name",null),BlazeLayout.render(Creator.getLayout(),{main:"page_template",regions:{appId:r,pageId:o}})},triggersExit:[function(e,t){return Session.set("pageApiName",null)}]}),FlowRouter.route("/page/:page_id/",{action:function(e,t){return BlazeLayout.render(Creator.getLayout(),{main:"page"})}}),FlowRouter.route("/app/:app_id/tab_iframe/:tab_id",{triggersEnter:[o],action:function(e,t){var r;return r=FlowRouter.getParam("tab_id"),Session.set("tab_name",r),Session.set("object_name",null),BlazeLayout.render(Creator.getLayout(),{main:"page_iframe",regions:{params:e,queryParams:t}})},triggersExit:[function(e,t){return Session.set("tab_name",null)}]}),(a=FlowRouter.group({prefix:"/app/:app_id/:object_name",name:"objectRoutes",triggersEnter:[o,n]})).route("/",{triggersEnter:[function(e,t){var r,o,a,n,i;return n=e.params.object_name,o=(null!=(a=window.getFirstListView(n))?a.name:void 0)||(null!=a?a._id:void 0),t(i="/app/"+(r=e.params.app_id)+"/"+n+"/grid/"+o)}],action:function(e,t){return BlazeLayout.render(Creator.getLayout(),{main:"object_home"})}}),a.route("/:record_id/:related_object_name/grid",{action:function(e,t){var r,o,a,n,i,s,c,l;return o={app_id:r=Session.get("app_id"),object_name:n=FlowRouter.getParam("object_name"),record_id:s=FlowRouter.getParam("record_id"),related_object_name:l=FlowRouter.getParam("related_object_name")},Session.set("related_object_name",l),a="related_object_list",(i=Steedos.Page.getPage("related_list",r,l))&&(a="page_related_list_view",c={page:i,appId:Session.get("app_id"),objectName:n,recordId:s,relatedObjectName:l,__timestamp:(new Date).getTime()}),Meteor.setTimeout((function(){return BlazeLayout.render(Creator.getLayout(),{main:a,regions:c})}),10)}}),a.route("/view/:record_id",{action:function(e,t){var r,o,a,n,i,s,c;return t["X-Space-Id"]&&Steedos.setSpaceId(t["X-Space-Id"]),o={app_id:r=FlowRouter.getParam("app_id"),object_name:n=FlowRouter.getParam("object_name"),record_id:s=FlowRouter.getParam("record_id")},ObjectRecent.insert(n,s),Session.set("detail_info_visible",!0),a="creator_view",(i=Steedos.Page.getPage("record",Session.get("app_id"),n,s))&&(a="page_object",c=window._.defaultsDeep({display:Steedos.Page.getDisplay(n)},FlowRouter.current().queryParams,{page:i,appId:Session.get("app_id"),recordId:s,objectName:n,pageType:"record",__timestamp:(new Date).getTime()})),Meteor.setTimeout((function(){return BlazeLayout.render(Creator.getLayout(),{main:a,regions:c})}),10)},triggersExit:[function(e,t){var r,o,a,n;if(Session.get("instance_change")&&("instances"===(null!=(r=e.params)?r.object_name:void 0)&&"draft"===(null!=(o=e.queryParams)?o.side_listview_id:void 0)||"instance_tasks"===(null!=(a=e.params)?a.object_name:void 0)&&"inbox"===(null!=(n=e.queryParams)?n.side_listview_id:void 0)))return InstanceManager.saveIns(!1)}]}),a.route("/grid/:list_view_id",{action:function(e,t){var r,o,a,n,i;return Session.set("record_id",null),Session.get("object_name")===FlowRouter.getParam("object_name")&&Session.get("list_view_id")===FlowRouter.getParam("list_view_id")||(Session.set("filter_target",null),Session.set("filter_items",null)),Session.get("object_name")!==FlowRouter.getParam("object_name")&&Session.set("list_view_id",null),"true"===(null!=t?t.hidden_header:void 0)&&Session.set("hidden_header",!0),"-"!==(r=FlowRouter.getParam("app_id"))&&Session.set("app_id",r),a=FlowRouter.getParam("object_name"),Session.set("object_name",a),Session.set("list_view_id",FlowRouter.getParam("list_view_id")),Session.set("list_view_visible",!1),Tracker.afterFlush((function(){return Session.set("list_view_visible",!0)})),(n=Steedos.Page.getPage("list",Session.get("app_id"),a))&&(o="page_object",i=window._.defaultsDeep({display:Steedos.Page.getDisplay(a)},FlowRouter.current().queryParams,{page:n,appId:Session.get("app_id"),objectName:a,listViewId:Session.get("list_view_id"),pageType:"list",__timestamp:(new Date).getTime()})),BlazeLayout.render(Creator.getLayout(),{main:o,regions:i})}}),FlowRouter.notFound={action:function(e,t){var r;try{throw new Error("404 not found:"+window.location.href)}catch(o){r=o,console.log(r,window.location.href)}return BlazeLayout.render("empty_layout",{main:"notFound"})}}},"tenant.coffee":function e(){var t=__coffeescriptShare="object"==typeof __coffeescriptShare?__coffeescriptShare:{};$.getJSON("/accounts/settings",(function(e){if(null!=e?e.tenant:void 0)return Session.set("tenant_settings",e.tenant)}))},"animate.js":function e(){$.fn.extend({animateCss:function(e,t){var r=function(e){var t={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(var r in t)if(void 0!==e.style[r])return t[r]}(document.createElement("div"));return this.addClass("animated "+e).one(r,(function(){$(this).removeClass("animated "+e),"function"==typeof t&&t()})),this}})},"colResizable-1.6.js":function e(){!function(e){var t=e(document),r=e("head"),o=null,a={},n=0,i="id",s="px",c="JColResizer",l="JCLRFlex",u=parseInt,d=Math,p=navigator.userAgent.indexOf("Trident/4.0")>0,f;try{f=sessionStorage}catch(T){}r.append("");var m=function(t,o){var s=e(t);if(s.opt=o,s.mode=o.resizeMode,s.dc=s.opt.disabledColumns,s.opt.disable)return _(s);var l=s.id=s.attr(i)||c+n++;s.p=s.opt.postbackSafe,!s.is("table")||a[l]&&!s.opt.partialRefresh&&s.prev(".JCLRgrips").length>0||("col-resize"!==s.opt.hoverCursor&&r.append(""),s.addClass(c).attr(i,l).before('
'),s.g=[],s.c=[],s.w=s.width(),s.gc=s.prev(),s.f=s.opt.fixed,o.marginLeft&&s.gc.css("marginLeft",o.marginLeft),o.marginRight&&s.gc.css("marginRight",o.marginRight),s.cs=u(p?t.cellSpacing||t.currentStyle.borderSpacing:s.css("border-spacing"))||2,s.b=u(p?t.border||t.currentStyle.borderLeftWidth:s.css("border-left-width"))||1,a[l]=s,g(s))},_=function(e){var t=e.attr(i),e;(e=a[t])&&e.is("table")&&(e.removeClass(c+" "+l).gc.remove(),delete a[t])},g=function(t){var r=t.find(">thead>tr:first>th,>thead>tr:first>td");r.length||(r=t.find(">tbody>tr:first>th,>tr:first>th,>tbody>tr:first>td, >tr:first>td")),r=r.filter(":visible"),t.cg=t.find("col"),t.ln=r.length,t.p&&f&&f[t.id]&&h(t,r),r.each((function(r){var o=e(this),a=-1!=t.dc.indexOf(r),n=e(t.gc.append('
')[0].lastChild);n.append(a?"":t.opt.gripInnerHtml).append('
'),r==t.ln-1&&(n.addClass("JCLRLastGrip"),t.f&&n.html("")),n.bind("touchstart mousedown",y),a?n.addClass("JCLRdisabledGrip"):n.removeClass("JCLRdisabledGrip").bind("touchstart mousedown",y),n.t=t,n.i=r,n.c=o,o.w=o.width(),t.g.push(n),t.c.push(o),o.width(o.w).removeAttr("width"),n.data(c,{i:r,t:t.attr(i),last:r==t.ln-1})})),t.cg.removeAttr("width"),t.find("td, th").not(r).not("table th, table td").each((function(){e(this).removeAttr("width")})),t.f||t.removeAttr("width").addClass(l),v(t)},h=function(e,t){var r,o=0,a=0,n=[],i;if(t){if(e.cg.removeAttr("width"),e.opt.flush)return void(f[e.id]="");for(i=(r=f[e.id].split(";"))[e.ln+1],!e.f&&i&&(e.width(i*=1),e.opt.overflow&&(e.css("min-width",i+s),e.w=i));a*{cursor:"+s.opt.dragCursor+"!important}"),l.addClass(s.opt.draggingClass),o=l,s.c[i.i].l)for(var d=0,p;dn;n++)for(s in r[n])o=r[n][s],r[n].hasOwnProperty(s)&&void 0!==o&&(t[s]=e.isPlainObject(o)?e.isPlainObject(t[s])?e.widget.extend({},t[s],o):e.widget.extend({},o):o);return t},e.widget.bridge=function(t,s){var o=s.prototype.widgetFullName||t;e.fn[t]=function(r){var n="string"==typeof r,a=i.call(arguments,1),l=this;return n?this.length||"instance"!==r?this.each((function(){var i,s=e.data(this,o);return"instance"===r?(l=s,!1):s?e.isFunction(s[r])&&"_"!==r.charAt(0)?(i=s[r].apply(s,a))!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0:e.error("no such method '"+r+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+r+"'")})):l=void 0:(a.length&&(r=e.widget.extend.apply(null,[r].concat(a))),this.each((function(){var t=e.data(this,o);t?(t.option(r||{}),t._init&&t._init()):e.data(this,o,new s(r,this))}))),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=t++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,(function(e,i){t._removeClass(i,e)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,o,r,n=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(n={},s=t.split("."),t=s.shift(),s.length){for(o=n[t]=e.widget.extend({},this.options[t]),r=0;s.length-1>r;r++)o[s[r]]=o[s[r]]||{},o=o[s[r]];if(t=s.pop(),1===arguments.length)return void 0===o[t]?null:o[t];o[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];n[t]=i}return this._setOptions(n),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var i,s,o;for(i in t)o=this.classesElementLookup[i],t[i]!==this.options.classes[i]&&o&&o.length&&(s=e(o.get()),this._removeClass(o,i),s.addClass(this._classes({element:s,keys:i,classes:t,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){function i(i,r){var n,a;for(a=0;i.length>a;a++)n=o.classesElementLookup[i[a]]||e(),n=t.add?e(e.unique(n.get().concat(t.element.get()))):e(n.not(t.element).get()),o.classesElementLookup[i[a]]=n,s.push(i[a]),r&&t.classes[i[a]]&&s.push(t.classes[i[a]])}var s=[],o=this;return t=e.extend({element:this.element,classes:this.options.classes||{}},t),this._on(t.element,{remove:"_untrackClassesElement"}),t.keys&&i(t.keys.match(/\S+/g)||[],!0),t.extra&&i(t.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(t){var i=this;e.each(i.classesElementLookup,(function(s,o){-1!==e.inArray(t.target,o)&&(i.classesElementLookup[s]=e(o.not(t.target).get()))}))},_removeClass:function(e,t,i){return this._toggleClass(e,t,i,!1)},_addClass:function(e,t,i){return this._toggleClass(e,t,i,!0)},_toggleClass:function(e,t,i,s){s="boolean"==typeof s?s:i;var o="string"==typeof e||null===e,r={extra:o?t:i,keys:o?e:t,element:o?this.element:e,add:s};return r.element.toggleClass(this._classes(r),s),this},_on:function(t,i,s){var o,r=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=o=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,o=this.widget()),e.each(s,(function(s,n){function a(){return t||!0!==r.options.disabled&&!e(this).hasClass("ui-state-disabled")?("string"==typeof n?r[n]:n).apply(r,arguments):void 0}"string"!=typeof n&&(a.guid=n.guid=n.guid||a.guid||e.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+r.eventNamespace,c=l[2];c?o.on(h,c,a):i.on(h,a)}))},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(i).off(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(e(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(e(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(e(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,i,s){var o,r,n=this.options[t];if(s=s||{},(i=e.Event(i)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],r=i.originalEvent)for(o in r)o in i||(i[o]=r[o]);return this.element.trigger(i,s),!(e.isFunction(n)&&!1===n.apply(this.element[0],[i].concat(s))||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},(function(t,i){e.Widget.prototype["_"+t]=function(s,o,r){"string"==typeof o&&(o={effect:o});var n,a=o?!0===o||"number"==typeof o?i:o.effect||i:t;"number"==typeof(o=o||{})&&(o={duration:o}),n=!e.isEmptyObject(o),o.complete=r,o.delay&&s.delay(o.delay),n&&e.effects&&e.effects.effect[a]?s[t](o):a!==t&&s[a]?s[a](o.duration,o.easing,r):s.queue((function(i){e(this)[t](),r&&r.call(s[0]),i()}))}})),e.widget,e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo((function(t){return function(i){return!!e.data(i,t)}})):function(t,i,s){return!!e.data(t,s[3])}}),e.fn.scrollParent=function(t){var i=this.css("position"),s="absolute"===i,o=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter((function(){var t=e(this);return(!s||"static"!==t.css("position"))&&o.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))})).eq(0);return"fixed"!==i&&r.length?r:e(this[0].ownerDocument||document)},e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var s=!1;e(document).on("mouseup",(function(){s=!1})),e.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,(function(e){return t._mouseDown(e)})).on("click."+this.widgetName,(function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0})),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!s){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,o=1===t.which,r=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&e(t.target).closest(this.options.cancel).length;return!(o&&!r&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){i.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),s=!0,!0))}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,s=!1,t.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),e.ui.plugin={add:function(t,i,s){var o,r=e.ui[t].prototype;for(o in s)r.plugins[o]=r.plugins[o]||[],r.plugins[o].push([i,s[o]])},call:function(e,t,i,s){var o,r=e.plugins[t];if(r&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(o=0;r.length>o;o++)e.options[r[o][0]]&&r[o][1].apply(e.element,i)}},e.ui.safeActiveElement=function(e){var t;try{t=e.activeElement}catch(i){t=e.body}return t||(t=e.body),t.nodeName||(t=e.body),t},e.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&e(t).trigger("blur")},e.widget("ui.draggable",e.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?void(this.destroyOnClear=!0):(this._removeHandleClassName(),void this._mouseDestroy())},_mouseCapture:function(t){var i=this.options;return!(this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map((function(){var t=e(this);return e("
").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=e.ui.safeActiveElement(this.document[0]),s;e(t.target).closest(i).length||e.ui.safeBlur(i)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter((function(){return"fixed"===e(this).css("position")})).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(!1===this._trigger("drag",t,s))return this._mouseUp(new e.Event("mouseup",t)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||!0===this.options.revert||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),(function(){!1!==i._trigger("stop",t)&&i._clear()})):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new e.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!e(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper),o=s?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return o.parents("body").length||o.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&o[0]===this.element[0]&&this._setPositionRelative(),o[0]===this.element[0]||/(fixed|absolute)/.test(o.css("position"))||o.css("position","absolute"),o},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,o=this.options,r=this.document[0];return this.relativeContainer=null,o.containment?"window"===o.containment?void(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===o.containment?void(this.containment=[0,0,e(r).width()-this.helperProportions.width-this.margins.left,(e(r).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):o.containment.constructor===Array?void(this.containment=o.containment):("parent"===o.containment&&(o.containment=this.helper[0].parentNode),void((s=(i=e(o.containment))[0])&&(t=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i))):void(this.containment=null)},_convertPositionTo:function(e,t){t||(t=this.position);var i="absolute"===e?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(e,t){var i,s,o,r,n=this.options,a=this._isRootNode(this.scrollParent[0]),l=e.pageX,h=e.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.lefti[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),n.grid&&(o=n.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/n.grid[1])*n.grid[1]:this.originalPageY,h=i?o-this.offset.click.top>=i[1]||o-this.offset.click.top>i[3]?o:o-this.offset.click.top>=i[1]?o-n.grid[1]:o+n.grid[1]:o,r=n.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/n.grid[0])*n.grid[0]:this.originalPageX,l=i?r-this.offset.click.left>=i[0]||r-this.offset.click.left>i[2]?r:r-this.offset.click.left>=i[0]?r-n.grid[0]:r+n.grid[0]:r),"y"===n.axis&&(l=this.originalPageX),"x"===n.axis&&(h=this.originalPageY)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,s){var o=e.extend({},i,{item:s.element});s.sortables=[],e(s.options.connectToSortable).each((function(){var i=e(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,o))}))},stop:function(t,i,s){var o=e.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,e.each(s.sortables,(function(){var e=this;e.isOver?(e.isOver=0,s.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,o))}))},drag:function(t,i,s){e.each(s.sortables,(function(){var o=!1,r=this;r.positionAbs=s.positionAbs,r.helperProportions=s.helperProportions,r.offset.click=s.offset.click,r._intersectsWith(r.containerCache)&&(o=!0,e.each(s.sortables,(function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==r&&this._intersectsWith(this.containerCache)&&e.contains(r.element[0],this.element[0])&&(o=!1),o}))),o?(r.isOver||(r.isOver=1,s._parent=i.helper.parent(),r.currentItem=i.helper.appendTo(r.element).data("ui-sortable-item",!0),r.options._helper=r.options.helper,r.options.helper=function(){return i.helper[0]},t.target=r.currentItem[0],r._mouseCapture(t,!0),r._mouseStart(t,!0,!0),r.offset.click.top=s.offset.click.top,r.offset.click.left=s.offset.click.left,r.offset.parent.left-=s.offset.parent.left-r.offset.parent.left,r.offset.parent.top-=s.offset.parent.top-r.offset.parent.top,s._trigger("toSortable",t),s.dropped=r.element,e.each(s.sortables,(function(){this.refreshPositions()})),s.currentItem=s.element,r.fromOutside=s),r.currentItem&&(r._mouseDrag(t),i.position=r.position)):r.isOver&&(r.isOver=0,r.cancelHelperRemoval=!0,r.options._revert=r.options.revert,r.options.revert=!1,r._trigger("out",t,r._uiHash(r)),r._mouseStop(t,!0),r.options.revert=r.options._revert,r.options.helper=r.options._helper,r.placeholder&&r.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(t),i.position=s._generatePosition(t,!0),s._trigger("fromSortable",t),s.dropped=!1,e.each(s.sortables,(function(){this.refreshPositions()})))}))}}),e.ui.plugin.add("draggable","cursor",{start:function(t,i,s){var o=e("body"),r=s.options;o.css("cursor")&&(r._cursor=o.css("cursor")),o.css("cursor",r.cursor)},stop:function(t,i,s){var o=s.options;o._cursor&&e("body").css("cursor",o._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i,s){var o=e(i.helper),r=s.options;o.css("opacity")&&(r._opacity=o.css("opacity")),o.css("opacity",r.opacity)},stop:function(t,i,s){var o=s.options;o._opacity&&e(i.helper).css("opacity",o._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,s){var o=s.options,r=!1,n=s.scrollParentNotHidden[0],a=s.document[0];n!==a&&"HTML"!==n.tagName?(o.axis&&"x"===o.axis||(s.overflowOffset.top+n.offsetHeight-t.pageY=0;p--)h=(l=s.snapElements[p].left-s.margins.left)+s.snapElements[p].width,u=(c=s.snapElements[p].top-s.margins.top)+s.snapElements[p].height,l-m>v||g>h+m||c-m>b||_>u+m||!e.contains(s.snapElements[p].item.ownerDocument,s.snapElements[p].item)?(s.snapElements[p].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[p].item})),s.snapElements[p].snapping=!1):("inner"!==f.snapMode&&(o=m>=Math.abs(c-b),r=m>=Math.abs(u-_),n=m>=Math.abs(l-v),a=m>=Math.abs(h-g),o&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),r&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),n&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left)),d=o||r||n||a,"outer"!==f.snapMode&&(o=m>=Math.abs(c-_),r=m>=Math.abs(u-b),n=m>=Math.abs(l-g),a=m>=Math.abs(h-v),o&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),r&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),n&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left)),!s.snapElements[p].snapping&&(o||r||n||a||d)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[p].item})),s.snapElements[p].snapping=o||r||n||a||d)}}),e.ui.plugin.add("draggable","stack",{start:function(t,i,s){var o,r=s.options,n=e.makeArray(e(r.stack)).sort((function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)}));n.length&&(o=parseInt(e(n[0]).css("zIndex"),10)||0,e(n).each((function(t){e(this).css("zIndex",o+t)})),this.css("zIndex",o+n.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i,s){var o=e(i.helper),r=s.options;o.css("zIndex")&&(r._zIndex=o.css("zIndex")),o.css("zIndex",r.zIndex)},stop:function(t,i,s){var o=s.options;o._zIndex&&e(i.helper).css("zIndex",o._zIndex)}}),e.ui.draggable,e.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(s)?s:function(e){return e.is(s)},this.proportions=function(){return arguments.length?void(t=arguments[0]):t||(t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight})},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;e.length>t;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,i){if("accept"===t)this.accept=e.isFunction(i)?i:function(e){return e.is(i)};else if("scope"===t){var s=e.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=e.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,r=!1;return!(!s||(s.currentItem||s.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each((function(){var i=e(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&o(s,e.extend(i,{offset:i.element.offset()}),i.options.tolerance,t)?(r=!0,!1):void 0})),!r&&(!!this.accept.call(this.element[0],s.currentItem||s.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",t,this.ui(s)),this.element)))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var o=e.ui.intersect=function(){function e(e,t,i){return e>=t&&t+i>e}return function(t,i,s,o){if(!i.offset)return!1;var r=(t.positionAbs||t.position.absolute).left+t.margins.left,n=(t.positionAbs||t.position.absolute).top+t.margins.top,a=r+t.helperProportions.width,l=n+t.helperProportions.height,h=i.offset.left,c=i.offset.top,u=h+i.proportions().width,p=c+i.proportions().height;switch(s){case"fit":return r>=h&&u>=a&&n>=c&&p>=l;case"intersect":return r+t.helperProportions.width/2>h&&u>a-t.helperProportions.width/2&&n+t.helperProportions.height/2>c&&p>l-t.helperProportions.height/2;case"pointer":return e(o.pageY,c,i.proportions().height)&&e(o.pageX,h,i.proportions().width);case"touch":return(n>=c&&p>=n||l>=c&&p>=l||c>n&&l>p)&&(r>=h&&u>=r||a>=h&&u>=a||h>r&&a>u);default:return!1}}}();e.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,i){var s,o,r=e.ui.ddmanager.droppables[t.options.scope]||[],n=i?i.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;r.length>s;s++)if(!(r[s].options.disabled||t&&!r[s].accept.call(r[s].element[0],t.currentItem||t.element))){for(o=0;a.length>o;o++)if(a[o]===r[s].element[0]){r[s].proportions().height=0;continue e}r[s].visible="none"!==r[s].element.css("display"),r[s].visible&&("mousedown"===n&&r[s]._activate.call(r[s],i),r[s].offset=r[s].element.offset(),r[s].proportions({width:r[s].element[0].offsetWidth,height:r[s].element[0].offsetHeight}))}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),(function(){this.options&&(!this.options.disabled&&this.visible&&o(t,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))})),s},dragStart:function(t,i){t.element.parentsUntil("body").on("scroll.droppable",(function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}))},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],(function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,r,n,a=o(t,this,this.options.tolerance,i),l=!a&&this.isover?"isout":a&&!this.isover?"isover":null;l&&(this.options.greedy&&(r=this.options.scope,(n=this.element.parents(":data(ui-droppable)").filter((function(){return e(this).droppable("instance").options.scope===r}))).length&&((s=e(n[0]).droppable("instance")).greedyChild="isover"===l)),s&&"isover"===l&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[l]=!0,this["isout"===l?"isover":"isout"]=!1,this["isover"===l?"_over":"_out"].call(this,i),s&&"isout"===l&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}}))},dragStop:function(t,i){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}},!1!==e.uiBackCompat&&e.widget("ui.droppable",e.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),e.ui.droppable,e.widget("ui.selectable",e.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t.elementPos=e(t.element[0]).offset(),t.selectees=e(t.options.filter,t.element[0]),t._addClass(t.selectees,"ui-selectee"),t.selectees.each((function(){var i=e(this),s=i.offset(),o={left:s.left-t.elementPos.left,top:s.top-t.elementPos.top};e.data(this,"selectable-item",{element:this,$element:i,left:o.left,top:o.top,right:o.left+i.outerWidth(),bottom:o.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})}))},this.refresh(),this._mouseInit(),this.helper=e("
"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(t){var i=this,s=this.options;this.opos=[t.pageX,t.pageY],this.elementPos=e(this.element[0]).offset(),this.options.disabled||(this.selectees=e(s.filter,this.element[0]),this._trigger("start",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each((function(){var s=e.data(this,"selectable-item");s.startselected=!0,t.metaKey||t.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",t,{unselecting:s.element}))})),e(t.target).parents().addBack().each((function(){var s,o=e.data(this,"selectable-item");return o?(s=!t.metaKey&&!t.ctrlKey||!o.$element.hasClass("ui-selected"),i._removeClass(o.$element,s?"ui-unselecting":"ui-selected")._addClass(o.$element,s?"ui-selecting":"ui-unselecting"),o.unselecting=!s,o.selecting=s,o.selected=s,s?i._trigger("selecting",t,{selecting:o.element}):i._trigger("unselecting",t,{unselecting:o.element}),!1):void 0})))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,s=this,o=this.options,r=this.opos[0],n=this.opos[1],a=t.pageX,l=t.pageY;return r>a&&(i=a,a=r,r=i),n>l&&(i=l,l=n,n=i),this.helper.css({left:r,top:n,width:a-r,height:l-n}),this.selectees.each((function(){var i=e.data(this,"selectable-item"),h=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===o.tolerance?h=!(c.left>a||r>c.right||c.top>l||n>c.bottom):"fit"===o.tolerance&&(h=c.left>r&&a>c.right&&c.top>n&&l>c.bottom),h?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",t,{unselecting:i.element})))))})),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each((function(){var s=e.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})})),e(".ui-selecting",this.element[0]).each((function(){var s=e.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})})),this._trigger("stop",t),this.helper.remove(),!1}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return e>=t&&t+i>e},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),e.each(this.items,(function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")}))},_destroy:function(){this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var s=null,o=!1,r=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),e(t.target).parents().each((function(){return e.data(this,r.widgetName+"-item")===r?(s=e(this),!1):void 0})),e.data(t.target,r.widgetName+"-item")===r&&(s=e(t.target)),!!s&&(!(this.options.handle&&!i&&(e(this.options.handle,s).find("*").addBack().each((function(){this===t.target&&(o=!0)})),!o))&&(this.currentItem=s,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,i,s){var o,r,n=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),n.containment&&this._setContainment(),n.cursor&&"auto"!==n.cursor&&(r=this.document.find("body"),this.storedCursor=r.css("cursor"),r.css("cursor",n.cursor),this.storedStylesheet=e("").appendTo(r)),n.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",n.opacity)),n.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",n.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,s,o,r,n=this.options,a=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY=0;i--)if(o=(s=this.items[i]).item[0],(r=this._intersectsWithPointer(s))&&s.instance===this.currentContainer&&o!==this.currentItem[0]&&this.placeholder[1===r?"next":"prev"]()[0]!==o&&!e.contains(this.placeholder[0],o)&&("semi-dynamic"!==this.options.type||!e.contains(this.element[0],o))){if(this.direction=1===r?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var s=this,o=this.placeholder.offset(),r=this.options.axis,n={};r&&"x"!==r||(n.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),r&&"y"!==r||(n.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(n,parseInt(this.options.revert,10)||500,(function(){s._clear(t)}))}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new e.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},e(i).each((function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&s.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))})),!s.length&&t.key&&s.push(t.key+"="),s.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},i.each((function(){s.push(e(t.item||this).attr(t.attribute||"id")||"")})),s},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,s=this.positionAbs.top,o=s+this.helperProportions.height,r=e.left,n=r+e.width,a=e.top,l=a+e.height,h=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+h>a&&l>s+h,p="y"===this.options.axis||t+c>r&&n>t+c,d=u&&p;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?d:t+this.helperProportions.width/2>r&&n>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>a&&l>o-this.helperProportions.height/2},_intersectsWithPointer:function(e){var t,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),o="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),r;return!!(s&&o)&&(t=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===t?2:1:t&&("down"===t?2:1))},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&i||"left"===o&&!i:s&&("down"===s&&t||"up"===s&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){a.push(this)}var s,o,r,n,a=[],l=[],h=this._connectWith();if(h&&t)for(s=h.length-1;s>=0;s--)for(o=(r=e(h[s],this.document[0])).length-1;o>=0;o--)(n=e.data(r[o],this.widgetFullName))&&n!==this&&!n.options.disabled&&l.push([e.isFunction(n.options.items)?n.options.items.call(n.element):e(n.options.items,n.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),n]);for(l.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=l.length-1;s>=0;s--)l[s][0].each(i);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,(function(e){for(var i=0;t.length>i;i++)if(t[i]===e.item[0])return!1;return!0}))},_refreshItems:function(t){this.items=[],this.containers=[this];var i,s,o,r,n,a,l,h,c=this.items,u=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],p=this._connectWith();if(p&&this.ready)for(i=p.length-1;i>=0;i--)for(s=(o=e(p[i],this.document[0])).length-1;s>=0;s--)(r=e.data(o[s],this.widgetFullName))&&r!==this&&!r.options.disabled&&(u.push([e.isFunction(r.options.items)?r.options.items.call(r.element[0],t,{item:this.currentItem}):e(r.options.items,r.element),r]),this.containers.push(r));for(i=u.length-1;i>=0;i--)for(n=u[i][1],s=0,h=(a=u[i][0]).length;h>s;s++)(l=e(a[s])).data(this.widgetName+"-item",n),c.push({item:l,instance:n,width:0,height:0,left:0,top:0})},refreshPositions:function(t){var i,s,o,r;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),i=this.items.length-1;i>=0;i--)(s=this.items[i]).instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?e(this.options.toleranceElement,s.item):s.item,t||(s.width=o.outerWidth(),s.height=o.outerHeight()),r=o.offset(),s.left=r.left,s.top=r.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)r=this.containers[i].element.offset(),this.containers[i].containerCache.left=r.left,this.containers[i].containerCache.top=r.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){var i,s=(t=t||this).options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=t.currentItem[0].nodeName.toLowerCase(),o=e("<"+s+">",t.document[0]);return t._addClass(o,"ui-sortable-placeholder",i||t.currentItem[0].className)._removeClass(o,"ui-sortable-helper"),"tbody"===s?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("",t.document[0]).appendTo(o)):"tr"===s?t._createTrPlaceholder(t.currentItem,o):"img"===s&&o.attr("src",t.currentItem.attr("src")),i||o.css("visibility","hidden"),o},update:function(e,o){(!i||s.forcePlaceholderSize)&&(o.height()||o.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(s.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),s.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,i){var s=this;t.children().each((function(){e(" ",s.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)}))},_contactContainers:function(t){var i,s,o,r,n,a,l,h,c,u,p=null,d=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(p&&e.contains(this.containers[i].element[0],p.element[0]))continue;p=this.containers[i],d=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(p)if(1===this.containers.length)this.containers[d].containerCache.over||(this.containers[d]._trigger("over",t,this._uiHash(this)),this.containers[d].containerCache.over=1);else{for(o=1e4,r=null,n=(c=p.floating||this._isFloating(this.currentItem))?"left":"top",a=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)e.contains(this.containers[d].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(l=this.items[s].item.offset()[n],h=!1,t[u]-l>this.items[s][a]/2&&(h=!0),o>Math.abs(t[u]-l)&&(o=Math.abs(t[u]-l),r=this.items[s],this.direction=h?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[d])return void(this.currentContainer.containerCache.over||(this.containers[d]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));r?this._rearrange(t,r,null,!0):this._rearrange(t,null,this.containers[d].element,!0),this._trigger("change",t,this._uiHash()),this.containers[d]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[d],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",t,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),("document"===o.containment||"window"===o.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===o.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===o.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(t=e(o.containment)[0],i=e(o.containment).offset(),s="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(o[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:o.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:o.scrollLeft())*s}},_generatePosition:function(t){var i,s,o=this.options,r=t.pageX,n=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.leftthis.containment[2]&&(r=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(n=this.containment[3]+this.offset.click.top)),o.grid&&(i=this.originalPageY+Math.round((n-this.originalPageY)/o.grid[1])*o.grid[1],n=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-o.grid[1]:i+o.grid[1]:i,s=this.originalPageX+Math.round((r-this.originalPageX)/o.grid[0])*o.grid[0],r=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-o.grid[0]:s+o.grid[0]:s)),{top:n-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:r-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,i,s){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay((function(){o===this.counter&&this.refreshPositions(!s)}))},_clear:function(e,t){function i(e,t,i){return function(s){i._trigger(e,s,t._uiHash(t))}}this.reverting=!1;var s,o=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&o.push((function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||o.push((function(e){this._trigger("update",e,this._uiHash())})),this!==this.currentContainer&&(t||(o.push((function(e){this._trigger("remove",e,this._uiHash())})),o.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),o.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)t||o.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(o.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(s=0;o.length>s;s++)o[s].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===e.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}})}))}},client:{"template.form-builder.js":function e(){s.__checkName("formBuilder"),s.formBuilder=new s("Template.formBuilder",(function(){var e=this;return u.Raw('
\n\t\t\n\t\t
\n\t\t\t
\n\t\t
\n\t
')}))},"form-builder.coffee":function t(i,o,t){var r=p="object"==typeof p?p:{};s.formBuilder.onRendered((function(){var i,s,o,r;return o=(s=this.data.form).current.fields,i=Creator.formBuilder.transformFormFieldsIn(o),r=Creator.formBuilder.optionsForFormFields(),t.dynamicImport("formBuilder").then((function(){var t,s;return(s=$("#fb-editor").formBuilder(r)).promise.then((function(t){return t.actions.setData(i),e.setTimeout((function(){return t.actions.setData(i)}),100)})),window.fb=s,t={},e.defer((function(){return Creator.formBuilder.stickyControls()}))}))})),s.formBuilder.events({"click .fb-table .fld-required,.fb-section .fld-required":function(t,i){return t.preventDefault(),t.stopPropagation(),e.defer((function(){return $(t.target).prop("checked",!t.target.checked),t.target.checked?$("#"+t.target.id.replace("required-","")+" .required-asterisk").css("display","inline"):$("#"+t.target.id.replace("required-","")+" .required-asterisk").css("display","none")}))},"change .prev-holder .form-control":function(e,t){if($(e.target.parentElement.parentElement).hasClass("prev-holder"))return $("[name='default_value']",e.target.parentElement.parentElement.parentElement).val(e.target.value)}})}},"core.coffee":function e(){var t=p="object"==typeof p?p:{};Creator.formBuilder={}},lib:{"utils.coffee":function e(){var t=p="object"==typeof p?p:{},i,s,r,n,a;Creator.formBuilder.utils={},Creator.formBuilder.utils.attrString=function(e){var t;return t=[],o.each(e,(function(e,i){if(a(i))return t.push(Object.values(r(i,e)).join(""))})),t.join(" ")},a=function(e){var t;return!(t=["values","enableOther","other","label","subtype"]).includes(e)},r=function(e,t){var s;return e=n(e),t&&(o.isArray(t)?s=i(t.join(" ")):("boolean"==typeof t&&(t=t.toString()),s=i(t.trim()))),{name:e,value:t=t?"='"+s+"'":""}},n=function(e){var t;return(t={className:"class"})[e]||s(e)},s=function(e){return(e=(e=e.replace(/[^\w\s\-]/gi,"")).replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))).replace(/\s/g,"-").replace(/^-+/g,"")},i=function(e){var t,i;return t={'"':""","&":"&","<":"<",">":">"},i=function(e){return t[e]||e},o.isString(e)?e.replace(/["&<>]/g,i):e}},"transform.coffee":function e(){var t=p="object"==typeof p?p:{},i,s,r;r=function(e){var t,i,s;return i=e.options.split("\n"),s=[],t=o.isString(e.default_value)?e.default_value.split(","):[],o.each(i,(function(e){return o.contains(t,e)?s.push({label:e,value:e,selected:!0}):s.push({label:e,value:e})})),s},s=["_id","code","label","type","name","description","fields","is_wide","is_required"],i=["_id","code","label","type","name","description","fields","is_wide"],Creator.formBuilder.transformFormFieldsIn=function(e){var t;return t=[],o.each(e,(function(e){var i;switch((i=o.extend({label:e.name||e.code,className:"form-control",value:e.default_value,required:e.is_required},e)).code?i.name=i.code:i.code=i.name,e.type){case"input":return i.type="text",e.is_textarea&&(i.type="textarea"),t.push(i);case"number":return o.isNumber(i.digits)&&(i.digits=i.digits.toString()),i.type="number",t.push(i);case"date":return i.type="dateNew",t.push(i);case"dateTime":return i.type="dateTime",t.push(i);case"checkbox":return i.type="checkboxBoolean",delete i.className,t.push(i);case"email":return i.type="email",t.push(i);case"url":return i.type="url",t.push(i);case"password":return i.type="password",t.push(i);case"select":return i.type="select",i.values=r(e),delete i.options,t.push(i);case"user":return i.type="user",t.push(i);case"group":return i.type="group",t.push(i);case"radio":return i.type="radio-group",i.values=r(e),delete i.options,delete i.className,t.push(i);case"multiSelect":return i.type="checkbox-group",i.values=r(e),delete i.options,delete i.className,t.push(i);case"table":return i.type="table",i.fields=JSON.stringify(i.fields),delete i.className,t.push(i);case"section":return i.type="section",i.fields=JSON.stringify(i.fields),delete i.className,t.push(i);case"odata":return i.type="odata",t.push(i);case"html":return i.type="html",t.push(i);default:return console.log(e.code,e.name,e.type)}})),t},Creator.formBuilder.transformFormFieldsOut=function(e){var t;return t=[],o.each(e,(function(e){var r,n,a,l;switch(r=e.name,e.name=e.label,e.is_required=e.required,delete e.label,delete e.className,delete e.required,delete e.value,o.isEmpty(e._id)&&(e._id=db.forms._makeNewID()),e.is_multiselect=e.is_multiselect||!1,e.is_searchable=e.is_searchable||!1,e.is_list_display=e.is_list_display||!1,e.is_wide=e.is_wide||!1,o.isArray(e.values)&&e.values.length>0&&(e.options=o.pluck(e.values,"label").join("\n"),["radio-group","select"].includes(e.type)&&(e.default_value=null!=(n=o.find(e.values,(function(e){return e.selected})))?n.label:void 0),["checkbox-group"].includes(e.type)&&(e.default_value=o.pluck(o.filter(e.values,(function(e){return e.selected})),"label").join(","))),delete e.values,e.type){case"table":o.each(o.keys(e),(function(t){if(!o.include(s,t))return delete e[t]})),e.is_wide=!0,e.fields=Creator.formBuilder.transformFormFieldsOut(null!=(a=$("#"+r+"-preview").data("formBuilder"))?a.actions.getData():void 0);break;case"section":o.each(o.keys(e),(function(t){if(!o.include(i,t))return delete e[t]})),e.is_wide=!0,e.fields=Creator.formBuilder.transformFormFieldsOut(null!=(l=$("#"+r+"-preview").data("formBuilder"))?l.actions.getData():void 0);break;case"textarea":e.type="input",e.is_textarea=!0;break;case"text":e.type="input";break;case"checkboxBoolean":e.type="checkbox";break;case"checkbox-group":e.type="multiSelect";break;case"radio-group":e.type="radio";break;case"number":e.digits=parseInt(e.digits);break;case"dateNew":e.type="date"}return t.push(e)})),t},Creator.formBuilder.validateForm=function(e){},Creator.formBuilder.getFieldsCode=function(e){var t,i;return t=(t=[]).concat(o.pluck(e,"code")),i=o.filter(e,(function(e){return["table","section"].includes(e.type)})),o.each(i,(function(e){return t=t.concat(Creator.formBuilder.getFieldsCode(e.fields))})),t}},"validate.coffee":function t(){var i=p="object"==typeof p?p:{},s,r,n,a,l,h;Creator.formBuilder.validateFormFields=function(t){var i,s;return i=Creator.formBuilder.getFieldsCode(t),s=!0,o.each(t,(function(r){var n,a;try{if(!r.code)throw new e.Error("500","请填写"+r.name+"的字段名");if(o.filter(i,(function(e){return e===r.code})).length>1)throw new e.Error("500",r.name+"字段名重复");return n=["table","section"].includes(r.type)?Creator.formBuilder.validateFormFields(r.fields):Creator.formBuilder.validateForFmield(r,t),s=n&&s}catch(l){return a=l,console.error("validateFormFields",a),s=!1,toastr.error(a.reason)}})),s},Creator.formBuilder.validateForFmield=function(e,t){switch(e.type){case"email":r(e);break;case"select":case"multiSelect":case"radio":l(e);break;case"table":h(e);break;case"odata":a(e)}return n(e,t)},a=function(t){if(o.isEmpty(t.url))throw new e.Error("500","请填写"+t.name+"的Odata API");if(o.isEmpty(t.search_field))throw new e.Error("500","请填写"+t.name+"的可搜索字段");if(o.isEmpty(t.formula))throw new e.Error("500","请填写"+t.name+"的公式")},l=function(t){if(!o.isString(t.options)||!t.options)throw new e.Error("500",t.name+"未设置选择项")},r=function(t){var i;if(t.default_value&&!(i=/^(\w)+(\.\w+)*@(\w)+((\.\w+)+)$/).test(t.default_value))throw new e.Error("500",t.name+"默认值不符合邮件地址的规则")},h=function(t){if(!o.isArray(t.fields)||0===t.fields.length)throw new e.Error("500",t.name+"未设置列表字段")},n=function(t,i){var r,n,a,l,h,c,u,p,d,f,m,g,v,_,b,y,w;if(!t.formula||!i||""===t.formula.trim())return!0;for(h=new Array,c=new Array,d=i.length-1;d>=0;)(r=i[d]).formula&&""!==r.formula.trim()&&(h.push(r),c.push(r.code)),d--;for(w=t.code,l=t.formula.trim(),u=new Array,m=c.length-1;m>=0;)if(1!==(b=l.split(c[m])).length){for(y=l,g=b.length-2;g>=0;)a=y.search(c[m]),_=y.charAt(a-1),n=y.charAt(a+c[m].length),y=y.slice(a+c[m].length-1),null===_.match(/\w/)&&null===n.match(/\w/)&&c[m]!==w&&u.push(c[m]),g--;m--}else m--;for(u=o.uniq(u),p=new Array,v=h.length-1;v>=0;)o.contains(u,h[v].code)&&p.push(h[v]),v--;if(!1===(f=s(c,p,h,w)))throw new e.Error(500,t.name+"公式循环引用");return f},s=function(e,t,i,r){var n,a,l,h,c,u,p,d,f,m,g,v,_;for(p=t.length-1;p>=0;)if(null!==t[p].formula&&null!==t[p].code){for(c=t[p].formula.trim(),l=t[p].code,h=new Array,d=e.length-1;d>=0;)if(1!==(v=c.split(e[d])).length){for(_=c,f=v.length-2;f>=0;)a=_.search(e[d]),g=_.charAt(a-1),n=_.charAt(a+e[d].length),_=_.slice(a+e[d].length-1),null===g.match(/\w/)&&null===n.match(/\w/)&&h.push(e[d]),f--;d--}else d--;if((h=o.uniq(h)).length>0){if(o.contains(h,r))return!1;for(i=o.filter(i,(function(e){return e.code!==t[p].code})),u=new Array,m=i.length-1;m>=0;)o.contains(h,i[m].code)&&u.push(i[m]),m--;return s(e,u,i,r)}p--}else p--;return!0}},"options.coffee":function t(i){var r=p="object"==typeof p?p:{},n,l,h,c,u,d,f,m,g,v,_,b,y,w,P,C,x,k,I;m=["autocomplete","paragraph","header","select","checkbox-group","radio-group","checkbox","text","file","date","number","textarea","dateTime","dateNew","checkboxBoolean","email","url","password","user","group","table","section","odata","html"],f=["button","file","paragraph","autocomplete","hidden","date","header"],u=["clear","data","save"],d=["description","maxlength","placeholder","access","value","min","max","step","inline","other","toggle","rows","subtype","multiple","name"],c=["text","textarea","number","dateNew","dateTime","date","checkboxBoolean","email","url","password","select","user","group","radio-group","checkbox-group","odata","html","table","section"],n={_id:{label:"唯一键",readonly:"readonly"},default_value:{label:"默认值",type:"text",value:""},is_wide:{label:"宽字段",type:"checkbox",value:!1},is_list_display:{label:"列表显示",type:"checkbox",value:!1},is_searchable:{label:"内容可搜",type:"checkbox",value:!1}},h={code:{label:"字段名",type:"text",required:"true",value:""},label:{type:"text",value:""},description:{label:"描述",type:"textarea",value:""}},g={formula:{label:"公式",type:"textarea",value:""}},v={formula:{label:"公式",type:"textarea",required:"true",value:""}},_={is_multiselect:{label:"多选",value:!1,type:"checkbox"}},b={options:{label:"选项",type:"textarea",placeholder:"选项1\r选项2\r选项3"}},x=function(){var e,t;return e=i("clone"),t={},o.each(m,(function(i){var s,r;switch(i){case"select":case"radio-group":case"checkbox-group":return t[i]=o.extend({},h,o.pick(n,"_id","is_wide","is_list_display","is_searchable"));case"text":return t[i]=o.extend({},h,b,n,g);case"textarea":return(r=e(n)).default_value.type="textarea",t[i]=o.extend({},h,b,r,g);case"number":return t[i]=o.extend({},h,{digits:{label:"小数位数",type:"number",min:"0",value:0}},n,g);case"password":return t[i]=o.extend({},h,o.pick(n,"_id","is_wide"));case"dateNew":case"dateTime":case"checkboxBoolean":case"email":case"url":return t[i]=o.extend({},h,n);case"user":case"group":return t[i]=o.extend({},h,_,n);case"table":case"section":return t[i]=o.extend({},h,{_id:{label:"唯一键",readonly:"readonly"},fields:{label:"字段"}});case"odata":return t[i]=o.extend({},h,{url:{label:"Odata API",type:"textarea",required:"true",value:""},detail_url:{label:"详细页面URL",type:"textarea",placeholder:"必须包含{_id}标识,示例:https://cn.steedos.com/app/-/contracts/view/{_id}",value:""},filters:{label:"过滤条件",type:"textarea",value:""},search_field:{label:"可搜索字段",type:"input",placeholder:"多个请用英文逗号(,)分隔",required:"true",value:""}},o.pick(n,"_id","is_wide","is_list_display"),_,v);case"html":return(s=e(o.pick(n,"_id","default_value","is_wide"))).default_value.type="textarea",t[i]=o.extend({},h,s);default:return t[i]=o.extend({},h,n,g)}})),t},w=function(e,t){var i,s;for(s=1,i=t;e.includes(i);)i=t+s,s++;return i},y=1,l={onadd:function(e){var t;return e.contentEditable="true",t=e.id,"checkboxBoolean"===e.type&&$(e.querySelector('[name="default_value"]')).removeClass("form-control").prop("type","checkbox"),$("#default_value-"+t).length>0&&$("#"+t+" .prev-holder .form-control").val($("#default_value-"+t).val()),$("input[type='textarea']",e).each((function(e,t){var i,s,o,r,n,a,l,h;return s=$(t).attr("id"),o=$(t).attr("name"),i=$(t).attr("class"),a=$(t).attr("title"),r=$(t).attr("placeholder")||"",l=$(t).attr("value")||"",n=$(t).attr("rows")||3,h=$(""),$(t).parent().append(h),$(t).remove()})),$("input[type='checkbox']",e).each((function(e,t){if("true"===$(t).val())return $(t).attr("checked",!0)}))},onclone:function(t){var i,s,o,r;return o=Creator.formBuilder.transformFormFieldsOut(fb.actions.getData()),s=Creator.formBuilder.getFieldsCode(o)||[],i=w(s,t.querySelector(".field-label").innerText),t.querySelector('[name="code"]').value=i,t.querySelector('[name="label"]').value=i,t.querySelector(".field-label").innerText=i,r=t.id,e.setTimeout((function(){if($("#"+r).parent().parent().parent().parent().hasClass("fb-table")||$("#"+r).parent().parent().parent().parent().hasClass("fb-section"))return 2===y?($("#"+r).remove(),y=1):y++}),1)}},k=function(){var e;return e={},o.each(m,(function(t){return e[t]=l})),e},C=function(){return[{label:"日期",attrs:{type:"dateNew"},icon:"📆"},{label:"日期-时间",attrs:{type:"dateTime"},icon:"🕛"},{label:"勾选框",attrs:{type:"checkboxBoolean"},icon:"☑️"},{label:"邮件",attrs:{type:"email"},icon:"📧"},{label:"网址",attrs:{type:"url"},icon:"🌏"},{label:"密码",attrs:{type:"password"},icon:"🔑"},{label:"选择用户",attrs:{type:"user"},icon:"👤"},{label:"选择部门",attrs:{type:"group"},icon:"👬"},{label:"表格",attrs:{type:"table"},icon:"T"},{label:"分组",attrs:{type:"section"},icon:"S"},{label:"Odata",attrs:{type:"odata"},icon:"OD"},{label:"HTML",attrs:{type:"html"},icon:"H"}]},I=function(e){return $(e.target.parentElement.parentElement).data("fields",$("#"+e.data.fid).data("formBuilder").actions.getData())},P=function(){return{dateNew:function(e){return e.className||(e.className="form-control"),{field:""}},dateTime:function(e){return e.className||(e.className="form-control"),{field:""}},checkboxBoolean:function(e){return e.value&&(e.checked=e.value),{field:""}},email:function(e){return e.className||(e.className="form-control"),{field:""}},url:function(e){return e.className||(e.className="form-control"),{field:""}},password:function(e){return e.className||(e.className="form-control"),{field:""}},user:function(e){return e.className||(e.className="form-control"),{field:""}},group:function(e){return e.className||(e.className="form-control"),{field:""}},table:function(t){return delete t.className,{field:"
",onRender:function(){var i;return(i=$(".field-actions",$("#"+t.name).parent().parent().parent())).off("click",".toggle-form",I),i.on("click",".toggle-form",{fid:t.name},I),e.setTimeout((function(){var i,s,r;if(i=$("#"+t.name).parent().parent().parent().data("fields"),s=$("#"+t.name).formBuilder(Creator.formBuilder.optionsForFormFields(!0)),e.defer((function(){return Creator.formBuilder.stickyControls($("#"+t.name))})),t.fields&&(r=Creator.formBuilder.transformFormFieldsIn(JSON.parse(t.fields))),o.isEmpty(i)||(r=i),!o.isEmpty(r))return s.promise.then((function(t){return t.actions.setData(r),e.setTimeout((function(){return t.actions.setData(r)}),100)}))}),100)}}},section:function(t){return delete t.className,{field:"
",onRender:function(){var i;return(i=$(".field-actions",$("#"+t.name).parent().parent().parent())).off("click",".toggle-form",I),i.on("click",".toggle-form",{fid:t.name},I),e.setTimeout((function(){var i,s,r;if(i=$("#"+t.name).parent().parent().parent().data("fields"),s=$("#"+t.name).formBuilder(Creator.formBuilder.optionsForFormFields(!0)),e.defer((function(){return Creator.formBuilder.stickyControls($("#"+t.name))})),t.fields&&(r=Creator.formBuilder.transformFormFieldsIn(JSON.parse(t.fields))),o.isEmpty(i)||(r=i),!o.isEmpty(r))return s.promise.then((function(t){return t.actions.setData(r),e.setTimeout((function(){return t.actions.setData(r)}),100)}))}),100)}}},odata:function(e){return e.className||(e.className="form-control"),{field:"
"}},html:function(e){return e.className||(e.className="form-control"),{field:""),$(t).parent().append(h),$(t).remove()})),$("input[type='checkbox']",e).each((function(e,t){if("true"===$(t).val())return $(t).attr("checked",!0)}))},onclone:function(t){var i,s,o,r;return o=Creator.formBuilder.transformFormFieldsOut(fb.actions.getData()),s=Creator.formBuilder.getFieldsCode(o)||[],i=w(s,t.querySelector(".field-label").innerText),t.querySelector('[name="code"]').value=i,t.querySelector('[name="label"]').value=i,t.querySelector(".field-label").innerText=i,r=t.id,e.setTimeout((function(){if($("#"+r).parent().parent().parent().parent().hasClass("fb-table")||$("#"+r).parent().parent().parent().parent().hasClass("fb-section"))return 2===y?($("#"+r).remove(),y=1):y++}),1)}},k=function(){var e;return e={},o.each(m,(function(t){return e[t]=l})),e},C=function(){return[{label:"日期",attrs:{type:"dateNew"},icon:"📆"},{label:"日期-时间",attrs:{type:"dateTime"},icon:"🕛"},{label:"勾选框",attrs:{type:"checkboxBoolean"},icon:"☑️"},{label:"邮件",attrs:{type:"email"},icon:"📧"},{label:"网址",attrs:{type:"url"},icon:"🌏"},{label:"密码",attrs:{type:"password"},icon:"🔑"},{label:"选择用户",attrs:{type:"user"},icon:"👤"},{label:"选择部门",attrs:{type:"group"},icon:"👬"},{label:"表格",attrs:{type:"table"},icon:"T"},{label:"分组",attrs:{type:"section"},icon:"S"},{label:"Odata",attrs:{type:"odata"},icon:"OD"},{label:"HTML",attrs:{type:"html"},icon:"H"}]},I=function(e){return $(e.target.parentElement.parentElement).data("fields",$("#"+e.data.fid).data("formBuilder").actions.getData())},P=function(){return{dateNew:function(e){return e.className||(e.className="form-control"),{field:""}},dateTime:function(e){return e.className||(e.className="form-control"),{field:""}},checkboxBoolean:function(e){return e.value&&(e.checked=e.value),{field:""}},email:function(e){return e.className||(e.className="form-control"),{field:""}},url:function(e){return e.className||(e.className="form-control"),{field:""}},password:function(e){return e.className||(e.className="form-control"),{field:""}},user:function(e){return e.className||(e.className="form-control"),{field:""}},group:function(e){return e.className||(e.className="form-control"),{field:""}},table:function(t){return delete t.className,{field:"
",onRender:function(){var i;return(i=$(".field-actions",$("#"+t.name).parent().parent().parent())).off("click",".toggle-form",I),i.on("click",".toggle-form",{fid:t.name},I),e.setTimeout((function(){var i,s,r;if(i=$("#"+t.name).parent().parent().parent().data("fields"),s=$("#"+t.name).formBuilder(Creator.formBuilder.optionsForFormFields(!0)),e.defer((function(){return Creator.formBuilder.stickyControls($("#"+t.name))})),t.fields&&(r=Creator.formBuilder.transformFormFieldsIn(JSON.parse(t.fields))),o.isEmpty(i)||(r=i),!o.isEmpty(r))return s.promise.then((function(t){return t.actions.setData(r),e.setTimeout((function(){return t.actions.setData(r)}),100)}))}),100)}}},section:function(t){return delete t.className,{field:"
",onRender:function(){var i;return(i=$(".field-actions",$("#"+t.name).parent().parent().parent())).off("click",".toggle-form",I),i.on("click",".toggle-form",{fid:t.name},I),e.setTimeout((function(){var i,s,r;if(i=$("#"+t.name).parent().parent().parent().data("fields"),s=$("#"+t.name).formBuilder(Creator.formBuilder.optionsForFormFields(!0)),e.defer((function(){return Creator.formBuilder.stickyControls($("#"+t.name))})),t.fields&&(r=Creator.formBuilder.transformFormFieldsIn(JSON.parse(t.fields))),o.isEmpty(i)||(r=i),!o.isEmpty(r))return s.promise.then((function(t){return t.actions.setData(r),e.setTimeout((function(){return t.actions.setData(r)}),100)}))}),100)}}},odata:function(e){return e.className||(e.className="form-control"),{field:"
"}},html:function(e){return e.className||(e.className="form-control"),{field:""),$(t).parent().append(h),$(t).remove()})),$("input[type='checkbox']",e).each((function(e,t){if("true"===$(t).val())return $(t).attr("checked",!0)}))},onclone:function(t){var i,s,o,r;return o=Creator.formBuilder.transformFormFieldsOut(fb.actions.getData()),s=Creator.formBuilder.getFieldsCode(o)||[],i=w(s,t.querySelector(".field-label").innerText),t.querySelector('[name="code"]').value=i,t.querySelector('[name="label"]').value=i,t.querySelector(".field-label").innerText=i,r=t.id,e.setTimeout((function(){if($("#"+r).parent().parent().parent().parent().hasClass("fb-table")||$("#"+r).parent().parent().parent().parent().hasClass("fb-section"))return 2===y?($("#"+r).remove(),y=1):y++}),1)}},k=function(){var e;return e={},o.each(m,(function(t){return e[t]=l})),e},C=function(){return[{label:"日期",attrs:{type:"dateNew"},icon:"📆"},{label:"日期-时间",attrs:{type:"dateTime"},icon:"🕛"},{label:"勾选框",attrs:{type:"checkboxBoolean"},icon:"☑️"},{label:"邮件",attrs:{type:"email"},icon:"📧"},{label:"网址",attrs:{type:"url"},icon:"🌏"},{label:"密码",attrs:{type:"password"},icon:"🔑"},{label:"选择用户",attrs:{type:"user"},icon:"👤"},{label:"选择部门",attrs:{type:"group"},icon:"👬"},{label:"表格",attrs:{type:"table"},icon:"T"},{label:"分组",attrs:{type:"section"},icon:"S"},{label:"Odata",attrs:{type:"odata"},icon:"OD"},{label:"HTML",attrs:{type:"html"},icon:"H"}]},I=function(e){return $(e.target.parentElement.parentElement).data("fields",$("#"+e.data.fid).data("formBuilder").actions.getData())},P=function(){return{dateNew:function(e){return e.className||(e.className="form-control"),{field:""}},dateTime:function(e){return e.className||(e.className="form-control"),{field:""}},checkboxBoolean:function(e){return e.value&&(e.checked=e.value),{field:""}},email:function(e){return e.className||(e.className="form-control"),{field:""}},url:function(e){return e.className||(e.className="form-control"),{field:""}},password:function(e){return e.className||(e.className="form-control"),{field:""}},user:function(e){return e.className||(e.className="form-control"),{field:""}},group:function(e){return e.className||(e.className="form-control"),{field:""}},table:function(t){return delete t.className,{field:"
",onRender:function(){var i;return(i=$(".field-actions",$("#"+t.name).parent().parent().parent())).off("click",".toggle-form",I),i.on("click",".toggle-form",{fid:t.name},I),e.setTimeout((function(){var i,s,r;if(i=$("#"+t.name).parent().parent().parent().data("fields"),s=$("#"+t.name).formBuilder(Creator.formBuilder.optionsForFormFields(!0)),e.defer((function(){return Creator.formBuilder.stickyControls($("#"+t.name))})),t.fields&&(r=Creator.formBuilder.transformFormFieldsIn(JSON.parse(t.fields))),o.isEmpty(i)||(r=i),!o.isEmpty(r))return s.promise.then((function(t){return t.actions.setData(r),e.setTimeout((function(){return t.actions.setData(r)}),100)}))}),100)}}},section:function(t){return delete t.className,{field:"
",onRender:function(){var i;return(i=$(".field-actions",$("#"+t.name).parent().parent().parent())).off("click",".toggle-form",I),i.on("click",".toggle-form",{fid:t.name},I),e.setTimeout((function(){var i,s,r;if(i=$("#"+t.name).parent().parent().parent().data("fields"),s=$("#"+t.name).formBuilder(Creator.formBuilder.optionsForFormFields(!0)),e.defer((function(){return Creator.formBuilder.stickyControls($("#"+t.name))})),t.fields&&(r=Creator.formBuilder.transformFormFieldsIn(JSON.parse(t.fields))),o.isEmpty(i)||(r=i),!o.isEmpty(r))return s.promise.then((function(t){return t.actions.setData(r),e.setTimeout((function(){return t.actions.setData(r)}),100)}))}),100)}}},odata:function(e){return e.className||(e.className="form-control"),{field:"
"}},html:function(e){return e.className||(e.className="form-control"),{field:""),$(t).parent().append(h),$(t).remove()})),$("input[type='checkbox']",e).each((function(e,t){if("true"===$(t).val())return $(t).attr("checked",!0)}))},onclone:function(t){var i,s,o,r;return o=Creator.formBuilder.transformFormFieldsOut(fb.actions.getData()),s=Creator.formBuilder.getFieldsCode(o)||[],i=w(s,t.querySelector(".field-label").innerText),t.querySelector('[name="code"]').value=i,t.querySelector('[name="label"]').value=i,t.querySelector(".field-label").innerText=i,r=t.id,e.setTimeout((function(){if($("#"+r).parent().parent().parent().parent().hasClass("fb-table")||$("#"+r).parent().parent().parent().parent().hasClass("fb-section"))return 2===y?($("#"+r).remove(),y=1):y++}),1)}},k=function(){var e;return e={},o.each(m,(function(t){return e[t]=l})),e},C=function(){return[{label:"日期",attrs:{type:"dateNew"},icon:"📆"},{label:"日期-时间",attrs:{type:"dateTime"},icon:"🕛"},{label:"勾选框",attrs:{type:"checkboxBoolean"},icon:"☑️"},{label:"邮件",attrs:{type:"email"},icon:"📧"},{label:"网址",attrs:{type:"url"},icon:"🌏"},{label:"密码",attrs:{type:"password"},icon:"🔑"},{label:"选择用户",attrs:{type:"user"},icon:"👤"},{label:"选择部门",attrs:{type:"group"},icon:"👬"},{label:"表格",attrs:{type:"table"},icon:"T"},{label:"分组",attrs:{type:"section"},icon:"S"},{label:"Odata",attrs:{type:"odata"},icon:"OD"},{label:"HTML",attrs:{type:"html"},icon:"H"}]},I=function(e){return $(e.target.parentElement.parentElement).data("fields",$("#"+e.data.fid).data("formBuilder").actions.getData())},P=function(){return{dateNew:function(e){return e.className||(e.className="form-control"),{field:""}},dateTime:function(e){return e.className||(e.className="form-control"),{field:""}},checkboxBoolean:function(e){return e.value&&(e.checked=e.value),{field:""}},email:function(e){return e.className||(e.className="form-control"),{field:""}},url:function(e){return e.className||(e.className="form-control"),{field:""}},password:function(e){return e.className||(e.className="form-control"),{field:""}},user:function(e){return e.className||(e.className="form-control"),{field:""}},group:function(e){return e.className||(e.className="form-control"),{field:""}},table:function(t){return delete t.className,{field:"
",onRender:function(){var i;return(i=$(".field-actions",$("#"+t.name).parent().parent().parent())).off("click",".toggle-form",I),i.on("click",".toggle-form",{fid:t.name},I),e.setTimeout((function(){var i,s,r;if(i=$("#"+t.name).parent().parent().parent().data("fields"),s=$("#"+t.name).formBuilder(Creator.formBuilder.optionsForFormFields(!0)),e.defer((function(){return Creator.formBuilder.stickyControls($("#"+t.name))})),t.fields&&(r=Creator.formBuilder.transformFormFieldsIn(JSON.parse(t.fields))),o.isEmpty(i)||(r=i),!o.isEmpty(r))return s.promise.then((function(t){return t.actions.setData(r),e.setTimeout((function(){return t.actions.setData(r)}),100)}))}),100)}}},section:function(t){return delete t.className,{field:"
",onRender:function(){var i;return(i=$(".field-actions",$("#"+t.name).parent().parent().parent())).off("click",".toggle-form",I),i.on("click",".toggle-form",{fid:t.name},I),e.setTimeout((function(){var i,s,r;if(i=$("#"+t.name).parent().parent().parent().data("fields"),s=$("#"+t.name).formBuilder(Creator.formBuilder.optionsForFormFields(!0)),e.defer((function(){return Creator.formBuilder.stickyControls($("#"+t.name))})),t.fields&&(r=Creator.formBuilder.transformFormFieldsIn(JSON.parse(t.fields))),o.isEmpty(i)||(r=i),!o.isEmpty(r))return s.promise.then((function(t){return t.actions.setData(r),e.setTimeout((function(){return t.actions.setData(r)}),100)}))}),100)}}},odata:function(e){return e.className||(e.className="form-control"),{field:"
"}},html:function(e){return e.className||(e.className="form-control"),{field:""),$(t).parent().append(c),$(t).remove()})),$("input[type='checkbox']",e).each((function(e,t){if("true"===$(t).val())return $(t).attr("checked",!0)}))},onclone:function(t){var i,s,o,r;return o=Creator.formBuilder.transformFormFieldsOut(fb.actions.getData()),s=Creator.formBuilder.getFieldsCode(o)||[],i=w(s,t.querySelector(".field-label").innerText),t.querySelector('[name="code"]').value=i,t.querySelector('[name="label"]').value=i,t.querySelector(".field-label").innerText=i,r=t.id,e.setTimeout((function(){if($("#"+r).parent().parent().parent().parent().hasClass("fb-table")||$("#"+r).parent().parent().parent().parent().hasClass("fb-section"))return 2===y?($("#"+r).remove(),y=1):y++}),1)}},k=function(){var e;return e={},o.each(f,(function(t){return e[t]=a})),e},C=function(){return[{label:"日期",attrs:{type:"dateNew"},icon:"📆"},{label:"日期-时间",attrs:{type:"dateTime"},icon:"🕛"},{label:"勾选框",attrs:{type:"checkboxBoolean"},icon:"☑️"},{label:"邮件",attrs:{type:"email"},icon:"📧"},{label:"网址",attrs:{type:"url"},icon:"🌏"},{label:"密码",attrs:{type:"password"},icon:"🔑"},{label:"选择用户",attrs:{type:"user"},icon:"👤"},{label:"选择部门",attrs:{type:"group"},icon:"👬"},{label:"表格",attrs:{type:"table"},icon:"T"},{label:"分组",attrs:{type:"section"},icon:"S"},{label:"Odata",attrs:{type:"odata"},icon:"OD"},{label:"HTML",attrs:{type:"html"},icon:"H"}]},I=function(e){return $(e.target.parentElement.parentElement).data("fields",$("#"+e.data.fid).data("formBuilder").actions.getData())},P=function(){return{dateNew:function(e){return e.className||(e.className="form-control"),{field:""}},dateTime:function(e){return e.className||(e.className="form-control"),{field:""}},checkboxBoolean:function(e){return e.value&&(e.checked=e.value),{field:""}},email:function(e){return e.className||(e.className="form-control"),{field:""}},url:function(e){return e.className||(e.className="form-control"),{field:""}},password:function(e){return e.className||(e.className="form-control"),{field:""}},user:function(e){return e.className||(e.className="form-control"),{field:""}},group:function(e){return e.className||(e.className="form-control"),{field:""}},table:function(t){return delete t.className,{field:"
",onRender:function(){var i;return(i=$(".field-actions",$("#"+t.name).parent().parent().parent())).off("click",".toggle-form",I),i.on("click",".toggle-form",{fid:t.name},I),e.setTimeout((function(){var i,s,r;if(i=$("#"+t.name).parent().parent().parent().data("fields"),s=$("#"+t.name).formBuilder(Creator.formBuilder.optionsForFormFields(!0)),e.defer((function(){return Creator.formBuilder.stickyControls($("#"+t.name))})),t.fields&&(r=Creator.formBuilder.transformFormFieldsIn(JSON.parse(t.fields))),o.isEmpty(i)||(r=i),!o.isEmpty(r))return s.promise.then((function(t){return t.actions.setData(r),e.setTimeout((function(){return t.actions.setData(r)}),100)}))}),100)}}},section:function(t){return delete t.className,{field:"
",onRender:function(){var i;return(i=$(".field-actions",$("#"+t.name).parent().parent().parent())).off("click",".toggle-form",I),i.on("click",".toggle-form",{fid:t.name},I),e.setTimeout((function(){var i,s,r;if(i=$("#"+t.name).parent().parent().parent().data("fields"),s=$("#"+t.name).formBuilder(Creator.formBuilder.optionsForFormFields(!0)),e.defer((function(){return Creator.formBuilder.stickyControls($("#"+t.name))})),t.fields&&(r=Creator.formBuilder.transformFormFieldsIn(JSON.parse(t.fields))),o.isEmpty(i)||(r=i),!o.isEmpty(r))return s.promise.then((function(t){return t.actions.setData(r),e.setTimeout((function(){return t.actions.setData(r)}),100)}))}),100)}}},odata:function(e){return e.className||(e.className="form-control"),{field:"
"}},html:function(e){return e.className||(e.className="form-control"),{field:""),$(t).parent().append(c),$(t).remove()})),$("input[type='checkbox']",e).each((function(e,t){if("true"===$(t).val())return $(t).attr("checked",!0)}))},onclone:function(t){var i,s,o,r;return o=Creator.formBuilder.transformFormFieldsOut(fb.actions.getData()),s=Creator.formBuilder.getFieldsCode(o)||[],i=w(s,t.querySelector(".field-label").innerText),t.querySelector('[name="code"]').value=i,t.querySelector('[name="label"]').value=i,t.querySelector(".field-label").innerText=i,r=t.id,e.setTimeout((function(){if($("#"+r).parent().parent().parent().parent().hasClass("fb-table")||$("#"+r).parent().parent().parent().parent().hasClass("fb-section"))return 2===y?($("#"+r).remove(),y=1):y++}),1)}},k=function(){var e;return e={},o.each(f,(function(t){return e[t]=a})),e},C=function(){return[{label:"日期",attrs:{type:"dateNew"},icon:"📆"},{label:"日期-时间",attrs:{type:"dateTime"},icon:"🕛"},{label:"勾选框",attrs:{type:"checkboxBoolean"},icon:"☑️"},{label:"邮件",attrs:{type:"email"},icon:"📧"},{label:"网址",attrs:{type:"url"},icon:"🌏"},{label:"密码",attrs:{type:"password"},icon:"🔑"},{label:"选择用户",attrs:{type:"user"},icon:"👤"},{label:"选择部门",attrs:{type:"group"},icon:"👬"},{label:"表格",attrs:{type:"table"},icon:"T"},{label:"分组",attrs:{type:"section"},icon:"S"},{label:"Odata",attrs:{type:"odata"},icon:"OD"},{label:"HTML",attrs:{type:"html"},icon:"H"}]},I=function(e){return $(e.target.parentElement.parentElement).data("fields",$("#"+e.data.fid).data("formBuilder").actions.getData())},P=function(){return{dateNew:function(e){return e.className||(e.className="form-control"),{field:""}},dateTime:function(e){return e.className||(e.className="form-control"),{field:""}},checkboxBoolean:function(e){return e.value&&(e.checked=e.value),{field:""}},email:function(e){return e.className||(e.className="form-control"),{field:""}},url:function(e){return e.className||(e.className="form-control"),{field:""}},password:function(e){return e.className||(e.className="form-control"),{field:""}},user:function(e){return e.className||(e.className="form-control"),{field:""}},group:function(e){return e.className||(e.className="form-control"),{field:""}},table:function(t){return delete t.className,{field:"
",onRender:function(){var i;return(i=$(".field-actions",$("#"+t.name).parent().parent().parent())).off("click",".toggle-form",I),i.on("click",".toggle-form",{fid:t.name},I),e.setTimeout((function(){var i,s,r;if(i=$("#"+t.name).parent().parent().parent().data("fields"),s=$("#"+t.name).formBuilder(Creator.formBuilder.optionsForFormFields(!0)),e.defer((function(){return Creator.formBuilder.stickyControls($("#"+t.name))})),t.fields&&(r=Creator.formBuilder.transformFormFieldsIn(JSON.parse(t.fields))),o.isEmpty(i)||(r=i),!o.isEmpty(r))return s.promise.then((function(t){return t.actions.setData(r),e.setTimeout((function(){return t.actions.setData(r)}),100)}))}),100)}}},section:function(t){return delete t.className,{field:"
",onRender:function(){var i;return(i=$(".field-actions",$("#"+t.name).parent().parent().parent())).off("click",".toggle-form",I),i.on("click",".toggle-form",{fid:t.name},I),e.setTimeout((function(){var i,s,r;if(i=$("#"+t.name).parent().parent().parent().data("fields"),s=$("#"+t.name).formBuilder(Creator.formBuilder.optionsForFormFields(!0)),e.defer((function(){return Creator.formBuilder.stickyControls($("#"+t.name))})),t.fields&&(r=Creator.formBuilder.transformFormFieldsIn(JSON.parse(t.fields))),o.isEmpty(i)||(r=i),!o.isEmpty(r))return s.promise.then((function(t){return t.actions.setData(r),e.setTimeout((function(){return t.actions.setData(r)}),100)}))}),100)}}},odata:function(e){return e.className||(e.className="form-control"),{field:"
"}},html:function(e){return e.className||(e.className="form-control"),{field:"