diff --git a/.vscode/launch.json b/.vscode/launch.json
index 8843b2d0..c96687dd 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -10,7 +10,8 @@
"name": "Build Assets (test collateral)",
"program": "${workspaceFolder}/project-explorer/build-assets.js",
"args": [
- "--path=${workspaceFolder}/test/collateral"
+ "--appSettingPath=${workspaceFolder}/test/collateral/project-without-source",
+ "--formPath=${workspaceFolder}/test/collateral"
]
},
{
diff --git a/all-chts-bundle.js b/all-chts-bundle.js
index e8f4a1cd..bd959233 100644
--- a/all-chts-bundle.js
+++ b/all-chts-bundle.js
@@ -37,4 +37,14 @@ module.exports = {
Lineage: require('cht-core-3-12/shared-libs/lineage'),
ChtScriptApi: require('cht-core-3-12/shared-libs/cht-script-api'),
},
+ '3.13': {
+ ddocs: require('./build/cht-core-3-13-ddocs.json'),
+ RegistrationUtils: require('cht-core-3-13/shared-libs/registration-utils'),
+ CalendarInterval: require('cht-core-3-13/shared-libs/calendar-interval'),
+ RulesEngineCore: require('cht-core-3-13/shared-libs/rules-engine'),
+ RulesEmitter: require('cht-core-3-13/shared-libs/rules-engine/src/rules-emitter'),
+ nootils: require('cht-core-3-13/shared-libs/rules-engine/node_modules/medic-nootils'),
+ Lineage: require('cht-core-3-13/shared-libs/lineage'),
+ ChtScriptApi: require('cht-core-3-13/shared-libs/cht-script-api'),
+ },
};
diff --git a/build.sh b/build.sh
index 28373360..ff53b14b 100755
--- a/build.sh
+++ b/build.sh
@@ -13,7 +13,7 @@ trap exit_on_error EXIT
npm ci
rm -Rf dist build
rm -Rf node_modules/enketo-core/node_modules/
-patch -f node_modules/enketo-core/src/js/Form.js < node_modules/cht-core-3-11/webapp/patches/enketo-inputs-always-relevant.patch
+patch -f node_modules/enketo-core/src/js/Form.js < node_modules/cht-core-3-13/webapp/patches/enketo-inputs-always-relevant.patch
patch -f node_modules/enketo-core/src/js/page.js < patches/enketo-handle-no-active-pages.patch
node ./compile-ddocs.js
diff --git a/dist/all-chts-bundle.dev.js b/dist/all-chts-bundle.dev.js
index 59175887..36282e9f 100644
--- a/dist/all-chts-bundle.dev.js
+++ b/dist/all-chts-bundle.dev.js
@@ -46,6 +46,16 @@ module.exports = {
Lineage: __webpack_require__(/*! cht-core-3-12/shared-libs/lineage */ "./node_modules/cht-core-3-12/shared-libs/lineage/src/index.js"),
ChtScriptApi: __webpack_require__(/*! cht-core-3-12/shared-libs/cht-script-api */ "./node_modules/cht-core-3-12/shared-libs/cht-script-api/src/index.js"),
},
+ '3.13': {
+ ddocs: __webpack_require__(/*! ./build/cht-core-3-13-ddocs.json */ "./build/cht-core-3-13-ddocs.json"),
+ RegistrationUtils: __webpack_require__(/*! cht-core-3-13/shared-libs/registration-utils */ "./node_modules/cht-core-3-13/shared-libs/registration-utils/src/index.js"),
+ CalendarInterval: __webpack_require__(/*! cht-core-3-13/shared-libs/calendar-interval */ "./node_modules/cht-core-3-13/shared-libs/calendar-interval/src/index.js"),
+ RulesEngineCore: __webpack_require__(/*! cht-core-3-13/shared-libs/rules-engine */ "./node_modules/cht-core-3-13/shared-libs/rules-engine/src/index.js"),
+ RulesEmitter: __webpack_require__(/*! cht-core-3-13/shared-libs/rules-engine/src/rules-emitter */ "./node_modules/cht-core-3-13/shared-libs/rules-engine/src/rules-emitter.js"),
+ nootils: __webpack_require__(/*! cht-core-3-13/shared-libs/rules-engine/node_modules/medic-nootils */ "./node_modules/cht-core-3-13/shared-libs/rules-engine/node_modules/medic-nootils/src/nootils.js"),
+ Lineage: __webpack_require__(/*! cht-core-3-13/shared-libs/lineage */ "./node_modules/cht-core-3-13/shared-libs/lineage/src/index.js"),
+ ChtScriptApi: __webpack_require__(/*! cht-core-3-13/shared-libs/cht-script-api */ "./node_modules/cht-core-3-13/shared-libs/cht-script-api/src/index.js"),
+ },
};
@@ -58,7 +68,7 @@ module.exports = {
/***/ ((module) => {
"use strict";
-module.exports = JSON.parse('[{"_id":"_design/medic-client","validate_doc_update":"function(newDoc, oldDoc, userCtx) {\\n /*\\n LOCAL DOCUMENT VALIDATION\\n\\n This is for validating document structure, irrespective of authority, so it\\n can be run both on couchdb and pouchdb (where you are technically admin).\\n\\n For validations around authority check lib/validate_doc_update.js, which is\\n only run on the server.\\n */\\n\\n var _err = function(msg) {\\n throw({ forbidden: msg });\\n };\\n\\n /**\\n * Ensure that type=\'form\' documents are created with correctly formatted _id\\n * property.\\n */\\n var validateForm = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var form_id = id_parts.slice(1).join(\':\');\\n if (prefix !== \'form\') {\\n _err(\'_id property must be prefixed with \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (!form_id) {\\n _err(\'_id property must define a value after \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id property must be lower case. e.g. \\"form:registration\\"\');\\n }\\n };\\n\\n var validateUserSettings = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var username = id_parts.slice(1).join(\':\');\\n var idExample = \' e.g. \\"org.couchdb.user:sally\\"\';\\n if (prefix !== \'org.couchdb.user\') {\\n _err(\'_id must be prefixed with \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (!username) {\\n _err(\'_id must define a value after \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id must be lower case.\' + idExample);\\n }\\n if (typeof newDoc.name === \'undefined\' || newDoc.name !== username) {\\n _err(\'name property must be equivalent to username.\' + idExample);\\n }\\n if (newDoc.name.toLowerCase() !== username.toLowerCase()) {\\n _err(\'name must be equivalent to username\');\\n }\\n if (typeof newDoc.known !== \'undefined\' && typeof newDoc.known !== \'boolean\') {\\n _err(\'known is not a boolean.\');\\n }\\n if (typeof newDoc.roles !== \'object\') {\\n _err(\'roles is a required array\');\\n }\\n };\\n\\n if (userCtx.facility_id === newDoc._id) {\\n _err(\'You are not authorized to edit your own place\');\\n }\\n if (newDoc.type === \'form\') {\\n validateForm(newDoc);\\n }\\n if (newDoc.type === \'user-settings\') {\\n validateUserSettings(newDoc);\\n }\\n\\n log(\\n \'medic-client validate_doc_update passed for User \\"\' + userCtx.name +\\n \'\\" changing document \\"\' + newDoc._id + \'\\"\'\\n );\\n}","views":{"contacts_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], order);\\n });\\n }\\n}"},"contacts_by_last_visited":{"map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n if (typeof date !== \'number\' || isNaN(date)) {\\n date = 0;\\n }\\n // Is a visit report about a family\\n emit(doc.fields.visited_contact_uuid, date);\\n } else if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n // Is a contact type\\n emit(doc._id, 0);\\n }\\n}","reduce":"_stats"},"contacts_by_parent":{"map":"function(doc) {\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n var parentId = doc.parent && doc.parent._id;\\n var type = doc.type === \'contact\' ? doc.contact_type : doc.type;\\n if (parentId) {\\n emit([parentId, type]);\\n }\\n }\\n}"},"contacts_by_phone":{"map":"function(doc) {\\n if (doc.phone) {\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n if (types.indexOf(doc.type) !== -1) {\\n emit(doc.phone);\\n }\\n }\\n}"},"contacts_by_place":{"map":"function(doc) {\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n if (idx !== -1) {\\n var place = doc.parent;\\n var order = idx + \' \' + (doc.name && doc.name.toLowerCase());\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], order);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"contacts_by_reference":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'national_office\' ||\\n doc.type === \'person\') {\\n\\n var emitReference = function(prefix, key) {\\n if (tombstone) {\\n prefix = \'tombstone-\' + prefix;\\n }\\n emit([ prefix, String(key) ], doc.reported_date);\\n };\\n\\n if (doc.place_id) {\\n emitReference(\'shortcode\', doc.place_id);\\n }\\n if (doc.patient_id) {\\n emitReference(\'shortcode\', doc.patient_id);\\n }\\n if (doc.simprints_id) {\\n emitReference(\'simprints\', doc.simprints_id);\\n }\\n if (doc.rc_code) {\\n // need String because rewriter wraps everything in quotes\\n // keep refid case-insenstive since data is usually coming from SMS\\n emitReference(\'external\', String(doc.rc_code).toUpperCase());\\n }\\n }\\n}"},"contacts_by_type":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (tombstone) {\\n type = \'tombstone-\' + type;\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n emit([ type ], order);\\n }\\n}"},"contacts_by_type_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(type, key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([ type, key ], value);\\n }\\n };\\n\\n var emitField = function(type, key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(type, word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(type, key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(type, key, doc[key], order);\\n });\\n }\\n}"},"data_records_by_type":{"map":"function(doc) {\\n if (doc.type === \'data_record\') {\\n emit(doc.form ? \'report\' : \'message\');\\n }\\n}","reduce":"_count"},"doc_by_type":{"map":"function(doc) {\\n if (doc.type === \'translations\') {\\n emit([ \'translations\', doc.enabled ], {\\n code: doc.code,\\n name: doc.name\\n });\\n return;\\n }\\n emit([ doc.type ]);\\n}"},"docs_by_id_lineage":{"map":"function(doc) {\\n\\n var emitLineage = function(contact, depth) {\\n while (contact && contact._id) {\\n emit([ doc._id, depth++ ], { _id: contact._id });\\n contact = contact.parent;\\n }\\n };\\n\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n\\n if (types.indexOf(doc.type) !== -1) {\\n // contact\\n emitLineage(doc, 0);\\n } else if (doc.type === \'data_record\' && doc.form) {\\n // report\\n emit([ doc._id, 0 ]);\\n emitLineage(doc.contact, 1);\\n }\\n}"},"messages_by_contact_date":{"map":"function(doc) {\\n\\n var emitMessage = function(doc, contact, phone) {\\n var id = (contact && contact._id) || phone || doc._id;\\n emit([ id, doc.reported_date ], {\\n id: doc._id,\\n date: doc.reported_date,\\n contact: contact && contact._id\\n });\\n };\\n\\n if (doc.type === \'data_record\' && !doc.form) {\\n if (doc.kujua_message && doc.tasks) {\\n // outgoing\\n doc.tasks.forEach(function(task) {\\n var message = task.messages && task.messages[0];\\n if(message) {\\n emitMessage(doc, message.contact, message.to);\\n }\\n });\\n } else if (doc.sms_message) {\\n // incoming\\n emitMessage(doc, doc.contact, doc.from);\\n }\\n }\\n}","reduce":"function(key, values) {\\n var latest = { date: 0 };\\n values.forEach(function(value) {\\n if (value.date > latest.date) {\\n latest = value;\\n }\\n });\\n return latest;\\n}"},"registered_patients":{"map":"// NB: This returns *registrations* for patients. If patients are created by\\n// means other then sending in a registration report (eg created in the UI)\\n// they will not show up in this view.\\n//\\n// For a view with all patients by their shortcode, use:\\n// medic/patient_by_patient_shortcode_id\\nfunction(doc) {\\n var patientId = doc.patient_id || (doc.fields && doc.fields.patient_id);\\n if (doc.form &&\\n doc.type === \'data_record\' &&\\n (!doc.errors || doc.errors.length === 0) &&\\n patientId) {\\n emit(String(patientId));\\n }\\n}"},"reports_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.reported_date], doc.reported_date);\\n }\\n}"},"reports_by_form_year_month_places":{"map":"// data record must adhere to property name of `month`\\nfunction(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.year &&\\n doc.fields.month) {\\n var year = parseInt(doc.fields.year, 10);\\n var month = parseInt(doc.fields.month, 10);\\n var clinic = doc.contact && doc.contact.parent;\\n var healthCenter = clinic && clinic.parent;\\n var district = healthCenter && healthCenter.parent;\\n emit(\\n [ doc.form, year, month ],\\n {\\n isValid: (doc.errors && doc.errors.length === 0),\\n clinicId: clinic && clinic._id,\\n healthCenterId: healthCenter && healthCenter._id,\\n districtId: district && district._id,\\n month: month\\n }\\n );\\n }\\n}"},"reports_by_form_year_week_places":{"map":"// data record must adhere to property name of `week` or `week_number`\\nfunction(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.year &&\\n (doc.fields.week || doc.fields.week_number)) {\\n var year = parseInt(doc.fields.year, 10);\\n var week = parseInt(doc.fields.week || doc.fields.week_number, 10);\\n var clinic = doc.contact && doc.contact.parent;\\n var healthCenter = clinic && clinic.parent;\\n var district = healthCenter && healthCenter.parent;\\n emit(\\n [ doc.form, year, week ],\\n {\\n isValid: (doc.errors && doc.errors.length === 0),\\n clinicId: clinic && clinic._id,\\n healthCenterId: healthCenter && healthCenter._id,\\n districtId: district && district._id,\\n weekNumber: week\\n }\\n );\\n }\\n}"},"reports_by_form":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.form], doc.reported_date);\\n }\\n}","reduce":"function() {\\n return true;\\n}"},"reports_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'content\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, reportedDate) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, reportedDate);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, reportedDate);\\n }\\n };\\n\\n if (doc.type === \'data_record\' && doc.form) {\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], doc.reported_date);\\n });\\n if (doc.fields) {\\n Object.keys(doc.fields).forEach(function(key) {\\n emitField(key, doc.fields[key], doc.reported_date);\\n });\\n }\\n if (doc.contact && doc.contact._id) {\\n emitMaybe(\'contact:\' + doc.contact._id.toLowerCase(), doc.reported_date);\\n }\\n }\\n}"},"reports_by_place":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var place = doc.contact && doc.contact.parent;\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], doc.reported_date);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"reports_by_subject":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var emitField = function(obj, field) {\\n if (obj[field]) {\\n emit(obj[field], doc.reported_date);\\n }\\n };\\n\\n emitField(doc, \'patient_id\');\\n emitField(doc, \'place_id\');\\n emitField(doc, \'case_id\');\\n\\n if (doc.fields) {\\n emitField(doc.fields, \'patient_id\');\\n emitField(doc.fields, \'place_id\');\\n emitField(doc.fields, \'case_id\');\\n emitField(doc.fields, \'patient_uuid\');\\n emitField(doc.fields, \'place_uuid\');\\n }\\n }\\n}"},"reports_by_validity":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([!doc.errors || doc.errors.length === 0], doc.reported_date);\\n }\\n}"},"reports_by_verification":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.verified], doc.reported_date);\\n }\\n}"},"tasks_by_contact":{"map":"function(doc) {\\n if (doc.type === \'task\') {\\n var isTerminalState = [\'Cancelled\', \'Completed\', \'Failed\'].indexOf(doc.state) >= 0;\\n if (!isTerminalState) {\\n emit(\'owner-\' + (doc.owner || \'_unassigned\'));\\n }\\n\\n if (doc.requester) {\\n emit(\'requester-\' + doc.requester);\\n }\\n }\\n}"},"total_clinics_by_facility":{"map":"function(doc) {\\n var districtId = doc.parent && doc.parent.parent && doc.parent.parent._id;\\n if (doc.type === \'clinic\' || (doc.type === \'contact\' && districtId)) {\\n var healthCenterId = doc.parent && doc.parent._id;\\n emit([ districtId, healthCenterId, doc._id, 0 ]);\\n if (doc.contact && doc.contact._id) {\\n emit([ districtId, healthCenterId, doc._id, 1 ], { _id: doc.contact._id });\\n }\\n var index = 2;\\n var parent = doc.parent;\\n while(parent) {\\n if (parent._id) {\\n emit([ districtId, healthCenterId, doc._id, index++ ], { _id: parent._id });\\n }\\n parent = parent.parent;\\n }\\n }\\n}"},"visits_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var visited_date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n\\n // Is a visit report about a family\\n emit(visited_date, doc.fields.visited_contact_uuid);\\n }\\n}"}}}]');
+module.exports = JSON.parse('[{"validate_doc_update":"function(newDoc, oldDoc, userCtx) {\\n /*\\n LOCAL DOCUMENT VALIDATION\\n\\n This is for validating document structure, irrespective of authority, so it\\n can be run both on couchdb and pouchdb (where you are technically admin).\\n\\n For validations around authority check lib/validate_doc_update.js, which is\\n only run on the server.\\n */\\n\\n var _err = function(msg) {\\n throw({ forbidden: msg });\\n };\\n\\n /**\\n * Ensure that type=\'form\' documents are created with correctly formatted _id\\n * property.\\n */\\n var validateForm = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var form_id = id_parts.slice(1).join(\':\');\\n if (prefix !== \'form\') {\\n _err(\'_id property must be prefixed with \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (!form_id) {\\n _err(\'_id property must define a value after \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id property must be lower case. e.g. \\"form:registration\\"\');\\n }\\n };\\n\\n var validateUserSettings = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var username = id_parts.slice(1).join(\':\');\\n var idExample = \' e.g. \\"org.couchdb.user:sally\\"\';\\n if (prefix !== \'org.couchdb.user\') {\\n _err(\'_id must be prefixed with \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (!username) {\\n _err(\'_id must define a value after \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id must be lower case.\' + idExample);\\n }\\n if (typeof newDoc.name === \'undefined\' || newDoc.name !== username) {\\n _err(\'name property must be equivalent to username.\' + idExample);\\n }\\n if (newDoc.name.toLowerCase() !== username.toLowerCase()) {\\n _err(\'name must be equivalent to username\');\\n }\\n if (typeof newDoc.known !== \'undefined\' && typeof newDoc.known !== \'boolean\') {\\n _err(\'known is not a boolean.\');\\n }\\n if (typeof newDoc.roles !== \'object\') {\\n _err(\'roles is a required array\');\\n }\\n };\\n\\n if (userCtx.facility_id === newDoc._id) {\\n _err(\'You are not authorized to edit your own place\');\\n }\\n if (newDoc.type === \'form\') {\\n validateForm(newDoc);\\n }\\n if (newDoc.type === \'user-settings\') {\\n validateUserSettings(newDoc);\\n }\\n\\n log(\\n \'medic-client validate_doc_update passed for User \\"\' + userCtx.name +\\n \'\\" changing document \\"\' + newDoc._id + \'\\"\'\\n );\\n}","_id":"_design/medic-client","views":{"contacts_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], order);\\n });\\n }\\n}"},"contacts_by_last_visited":{"reduce":"_stats","map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n if (typeof date !== \'number\' || isNaN(date)) {\\n date = 0;\\n }\\n // Is a visit report about a family\\n emit(doc.fields.visited_contact_uuid, date);\\n } else if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n // Is a contact type\\n emit(doc._id, 0);\\n }\\n}"},"contacts_by_parent":{"map":"function(doc) {\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n var parentId = doc.parent && doc.parent._id;\\n var type = doc.type === \'contact\' ? doc.contact_type : doc.type;\\n if (parentId) {\\n emit([parentId, type]);\\n }\\n }\\n}"},"contacts_by_reference":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'national_office\' ||\\n doc.type === \'person\') {\\n\\n var emitReference = function(prefix, key) {\\n if (tombstone) {\\n prefix = \'tombstone-\' + prefix;\\n }\\n emit([ prefix, String(key) ], doc.reported_date);\\n };\\n\\n if (doc.place_id) {\\n emitReference(\'shortcode\', doc.place_id);\\n }\\n if (doc.patient_id) {\\n emitReference(\'shortcode\', doc.patient_id);\\n }\\n if (doc.simprints_id) {\\n emitReference(\'simprints\', doc.simprints_id);\\n }\\n if (doc.rc_code) {\\n // need String because rewriter wraps everything in quotes\\n // keep refid case-insenstive since data is usually coming from SMS\\n emitReference(\'external\', String(doc.rc_code).toUpperCase());\\n }\\n }\\n}"},"contacts_by_place":{"map":"function(doc) {\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n if (idx !== -1) {\\n var place = doc.parent;\\n var order = idx + \' \' + (doc.name && doc.name.toLowerCase());\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], order);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"contacts_by_phone":{"map":"function(doc) {\\n if (doc.phone) {\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n if (types.indexOf(doc.type) !== -1) {\\n emit(doc.phone);\\n }\\n }\\n}"},"data_records_by_type":{"map":"function(doc) {\\n if (doc.type === \'data_record\') {\\n emit(doc.form ? \'report\' : \'message\');\\n }\\n}","reduce":"_count"},"contacts_by_type_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(type, key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([ type, key ], value);\\n }\\n };\\n\\n var emitField = function(type, key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(type, word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(type, key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(type, key, doc[key], order);\\n });\\n }\\n}"},"contacts_by_type":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (tombstone) {\\n type = \'tombstone-\' + type;\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n emit([ type ], order);\\n }\\n}"},"doc_by_type":{"map":"function(doc) {\\n if (doc.type === \'translations\') {\\n emit([ \'translations\', doc.enabled ], {\\n code: doc.code,\\n name: doc.name\\n });\\n return;\\n }\\n emit([ doc.type ]);\\n}"},"messages_by_contact_date":{"map":"function(doc) {\\n\\n var emitMessage = function(doc, contact, phone) {\\n var id = (contact && contact._id) || phone || doc._id;\\n emit([ id, doc.reported_date ], {\\n id: doc._id,\\n date: doc.reported_date,\\n contact: contact && contact._id\\n });\\n };\\n\\n if (doc.type === \'data_record\' && !doc.form) {\\n if (doc.kujua_message && doc.tasks) {\\n // outgoing\\n doc.tasks.forEach(function(task) {\\n var message = task.messages && task.messages[0];\\n if(message) {\\n emitMessage(doc, message.contact, message.to);\\n }\\n });\\n } else if (doc.sms_message) {\\n // incoming\\n emitMessage(doc, doc.contact, doc.from);\\n }\\n }\\n}","reduce":"function(key, values) {\\n var latest = { date: 0 };\\n values.forEach(function(value) {\\n if (value.date > latest.date) {\\n latest = value;\\n }\\n });\\n return latest;\\n}"},"reports_by_form":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.form], doc.reported_date);\\n }\\n}","reduce":"function() {\\n return true;\\n}"},"docs_by_id_lineage":{"map":"function(doc) {\\n\\n var emitLineage = function(contact, depth) {\\n while (contact && contact._id) {\\n emit([ doc._id, depth++ ], { _id: contact._id });\\n contact = contact.parent;\\n }\\n };\\n\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n\\n if (types.indexOf(doc.type) !== -1) {\\n // contact\\n emitLineage(doc, 0);\\n } else if (doc.type === \'data_record\' && doc.form) {\\n // report\\n emit([ doc._id, 0 ]);\\n emitLineage(doc.contact, 1);\\n }\\n}"},"reports_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.reported_date], doc.reported_date);\\n }\\n}"},"registered_patients":{"map":"// NB: This returns *registrations* for contacts. If contacts are created by\\n// means other then sending in a registration report (eg created in the UI)\\n// they will not show up in this view.\\n//\\n// For a view with all patients by their shortcode, use:\\n// medic/docs_by_shortcode\\nfunction(doc) {\\n var patientId = doc.patient_id || (doc.fields && doc.fields.patient_id);\\n var placeId = doc.place_id || (doc.fields && doc.fields.place_id);\\n\\n if (!doc.form || doc.type !== \'data_record\' || (doc.errors && doc.errors.length)) {\\n return;\\n }\\n\\n if (patientId) {\\n emit(String(patientId));\\n }\\n\\n if (placeId) {\\n emit(String(placeId));\\n }\\n}"},"reports_by_validity":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([!doc.errors || doc.errors.length === 0], doc.reported_date);\\n }\\n}"},"reports_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'content\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, reportedDate) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, reportedDate);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, reportedDate);\\n }\\n };\\n\\n if (doc.type === \'data_record\' && doc.form) {\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], doc.reported_date);\\n });\\n if (doc.fields) {\\n Object.keys(doc.fields).forEach(function(key) {\\n emitField(key, doc.fields[key], doc.reported_date);\\n });\\n }\\n if (doc.contact && doc.contact._id) {\\n emitMaybe(\'contact:\' + doc.contact._id.toLowerCase(), doc.reported_date);\\n }\\n }\\n}"},"reports_by_place":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var place = doc.contact && doc.contact.parent;\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], doc.reported_date);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"reports_by_subject":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var emitField = function(obj, field) {\\n if (obj[field]) {\\n emit(obj[field], doc.reported_date);\\n }\\n };\\n\\n emitField(doc, \'patient_id\');\\n emitField(doc, \'place_id\');\\n emitField(doc, \'case_id\');\\n\\n if (doc.fields) {\\n emitField(doc.fields, \'patient_id\');\\n emitField(doc.fields, \'place_id\');\\n emitField(doc.fields, \'case_id\');\\n emitField(doc.fields, \'patient_uuid\');\\n emitField(doc.fields, \'place_uuid\');\\n }\\n }\\n}"},"reports_by_verification":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.verified], doc.reported_date);\\n }\\n}"},"total_clinics_by_facility":{"map":"function(doc) {\\n var districtId = doc.parent && doc.parent.parent && doc.parent.parent._id;\\n if (doc.type === \'clinic\' || (doc.type === \'contact\' && districtId)) {\\n var healthCenterId = doc.parent && doc.parent._id;\\n emit([ districtId, healthCenterId, doc._id, 0 ]);\\n if (doc.contact && doc.contact._id) {\\n emit([ districtId, healthCenterId, doc._id, 1 ], { _id: doc.contact._id });\\n }\\n var index = 2;\\n var parent = doc.parent;\\n while(parent) {\\n if (parent._id) {\\n emit([ districtId, healthCenterId, doc._id, index++ ], { _id: parent._id });\\n }\\n parent = parent.parent;\\n }\\n }\\n}"},"tasks_by_contact":{"map":"function(doc) {\\n if (doc.type === \'task\') {\\n var isTerminalState = [\'Cancelled\', \'Completed\', \'Failed\'].indexOf(doc.state) >= 0;\\n if (!isTerminalState) {\\n emit(\'owner-\' + (doc.owner || \'_unassigned\'));\\n }\\n\\n if (doc.requester) {\\n emit(\'requester-\' + doc.requester);\\n }\\n }\\n}"},"visits_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var visited_date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n\\n // Is a visit report about a family\\n emit(visited_date, doc.fields.visited_contact_uuid);\\n emit([doc.fields.visited_contact_uuid, visited_date]);\\n }\\n}"}}}]');
/***/ }),
@@ -69,7 +79,7 @@ module.exports = JSON.parse('[{"_id":"_design/medic-client","validate_doc_update
/***/ ((module) => {
"use strict";
-module.exports = JSON.parse('[{"_id":"_design/medic-client","views":{"contacts_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], order);\\n });\\n }\\n}"},"contacts_by_last_visited":{"map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n if (typeof date !== \'number\' || isNaN(date)) {\\n date = 0;\\n }\\n // Is a visit report about a family\\n emit(doc.fields.visited_contact_uuid, date);\\n } else if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n // Is a contact type\\n emit(doc._id, 0);\\n }\\n}","reduce":"_stats"},"contacts_by_parent":{"map":"function(doc) {\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n var parentId = doc.parent && doc.parent._id;\\n var type = doc.type === \'contact\' ? doc.contact_type : doc.type;\\n if (parentId) {\\n emit([parentId, type]);\\n }\\n }\\n}"},"contacts_by_phone":{"map":"function(doc) {\\n if (doc.phone) {\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n if (types.indexOf(doc.type) !== -1) {\\n emit(doc.phone);\\n }\\n }\\n}"},"contacts_by_place":{"map":"function(doc) {\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n if (idx !== -1) {\\n var place = doc.parent;\\n var order = idx + \' \' + (doc.name && doc.name.toLowerCase());\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], order);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"contacts_by_reference":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'national_office\' ||\\n doc.type === \'person\') {\\n\\n var emitReference = function(prefix, key) {\\n if (tombstone) {\\n prefix = \'tombstone-\' + prefix;\\n }\\n emit([ prefix, String(key) ], doc.reported_date);\\n };\\n\\n if (doc.place_id) {\\n emitReference(\'shortcode\', doc.place_id);\\n }\\n if (doc.patient_id) {\\n emitReference(\'shortcode\', doc.patient_id);\\n }\\n if (doc.simprints_id) {\\n emitReference(\'simprints\', doc.simprints_id);\\n }\\n if (doc.rc_code) {\\n // need String because rewriter wraps everything in quotes\\n // keep refid case-insenstive since data is usually coming from SMS\\n emitReference(\'external\', String(doc.rc_code).toUpperCase());\\n }\\n }\\n}"},"contacts_by_type_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(type, key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([ type, key ], value);\\n }\\n };\\n\\n var emitField = function(type, key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(type, word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(type, key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(type, key, doc[key], order);\\n });\\n }\\n}"},"contacts_by_type":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (tombstone) {\\n type = \'tombstone-\' + type;\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n emit([ type ], order);\\n }\\n}"},"data_records_by_type":{"map":"function(doc) {\\n if (doc.type === \'data_record\') {\\n emit(doc.form ? \'report\' : \'message\');\\n }\\n}","reduce":"_count"},"doc_by_type":{"map":"function(doc) {\\n if (doc.type === \'translations\') {\\n emit([ \'translations\', doc.enabled ], {\\n code: doc.code,\\n name: doc.name\\n });\\n return;\\n }\\n emit([ doc.type ]);\\n}"},"docs_by_id_lineage":{"map":"function(doc) {\\n\\n var emitLineage = function(contact, depth) {\\n while (contact && contact._id) {\\n emit([ doc._id, depth++ ], { _id: contact._id });\\n contact = contact.parent;\\n }\\n };\\n\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n\\n if (types.indexOf(doc.type) !== -1) {\\n // contact\\n emitLineage(doc, 0);\\n } else if (doc.type === \'data_record\' && doc.form) {\\n // report\\n emit([ doc._id, 0 ]);\\n emitLineage(doc.contact, 1);\\n }\\n}"},"messages_by_contact_date":{"map":"function(doc) {\\n\\n var emitMessage = function(doc, contact, phone) {\\n var id = (contact && contact._id) || phone || doc._id;\\n emit([ id, doc.reported_date ], {\\n id: doc._id,\\n date: doc.reported_date,\\n contact: contact && contact._id\\n });\\n };\\n\\n if (doc.type === \'data_record\' && !doc.form) {\\n if (doc.kujua_message && doc.tasks) {\\n // outgoing\\n doc.tasks.forEach(function(task) {\\n var message = task.messages && task.messages[0];\\n if(message) {\\n emitMessage(doc, message.contact, message.to);\\n }\\n });\\n } else if (doc.sms_message) {\\n // incoming\\n emitMessage(doc, doc.contact, doc.from);\\n }\\n }\\n}","reduce":"function(key, values) {\\n var latest = { date: 0 };\\n values.forEach(function(value) {\\n if (value.date > latest.date) {\\n latest = value;\\n }\\n });\\n return latest;\\n}"},"registered_patients":{"map":"// NB: This returns *registrations* for contacts. If contacts are created by\\n// means other then sending in a registration report (eg created in the UI)\\n// they will not show up in this view.\\n//\\n// For a view with all patients by their shortcode, use:\\n// medic/docs_by_shortcode\\nfunction(doc) {\\n var patientId = doc.patient_id || (doc.fields && doc.fields.patient_id);\\n var placeId = doc.place_id || (doc.fields && doc.fields.place_id);\\n\\n if (!doc.form || doc.type !== \'data_record\' || (doc.errors && doc.errors.length)) {\\n return;\\n }\\n\\n if (patientId) {\\n emit(String(patientId));\\n }\\n\\n if (placeId) {\\n emit(String(placeId));\\n }\\n}"},"reports_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.reported_date], doc.reported_date);\\n }\\n}"},"reports_by_form":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.form], doc.reported_date);\\n }\\n}","reduce":"function() {\\n return true;\\n}"},"reports_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'content\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, reportedDate) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, reportedDate);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, reportedDate);\\n }\\n };\\n\\n if (doc.type === \'data_record\' && doc.form) {\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], doc.reported_date);\\n });\\n if (doc.fields) {\\n Object.keys(doc.fields).forEach(function(key) {\\n emitField(key, doc.fields[key], doc.reported_date);\\n });\\n }\\n if (doc.contact && doc.contact._id) {\\n emitMaybe(\'contact:\' + doc.contact._id.toLowerCase(), doc.reported_date);\\n }\\n }\\n}"},"reports_by_place":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var place = doc.contact && doc.contact.parent;\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], doc.reported_date);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"reports_by_subject":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var emitField = function(obj, field) {\\n if (obj[field]) {\\n emit(obj[field], doc.reported_date);\\n }\\n };\\n\\n emitField(doc, \'patient_id\');\\n emitField(doc, \'place_id\');\\n emitField(doc, \'case_id\');\\n\\n if (doc.fields) {\\n emitField(doc.fields, \'patient_id\');\\n emitField(doc.fields, \'place_id\');\\n emitField(doc.fields, \'case_id\');\\n emitField(doc.fields, \'patient_uuid\');\\n emitField(doc.fields, \'place_uuid\');\\n }\\n }\\n}"},"reports_by_validity":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([!doc.errors || doc.errors.length === 0], doc.reported_date);\\n }\\n}"},"reports_by_verification":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.verified], doc.reported_date);\\n }\\n}"},"tasks_by_contact":{"map":"function(doc) {\\n if (doc.type === \'task\') {\\n var isTerminalState = [\'Cancelled\', \'Completed\', \'Failed\'].indexOf(doc.state) >= 0;\\n if (!isTerminalState) {\\n emit(\'owner-\' + (doc.owner || \'_unassigned\'));\\n }\\n\\n if (doc.requester) {\\n emit(\'requester-\' + doc.requester);\\n }\\n }\\n}"},"total_clinics_by_facility":{"map":"function(doc) {\\n var districtId = doc.parent && doc.parent.parent && doc.parent.parent._id;\\n if (doc.type === \'clinic\' || (doc.type === \'contact\' && districtId)) {\\n var healthCenterId = doc.parent && doc.parent._id;\\n emit([ districtId, healthCenterId, doc._id, 0 ]);\\n if (doc.contact && doc.contact._id) {\\n emit([ districtId, healthCenterId, doc._id, 1 ], { _id: doc.contact._id });\\n }\\n var index = 2;\\n var parent = doc.parent;\\n while(parent) {\\n if (parent._id) {\\n emit([ districtId, healthCenterId, doc._id, index++ ], { _id: parent._id });\\n }\\n parent = parent.parent;\\n }\\n }\\n}"},"visits_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var visited_date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n\\n // Is a visit report about a family\\n emit(visited_date, doc.fields.visited_contact_uuid);\\n }\\n}"}},"validate_doc_update":"function(newDoc, oldDoc, userCtx) {\\n /*\\n LOCAL DOCUMENT VALIDATION\\n\\n This is for validating document structure, irrespective of authority, so it\\n can be run both on couchdb and pouchdb (where you are technically admin).\\n\\n For validations around authority check lib/validate_doc_update.js, which is\\n only run on the server.\\n */\\n\\n var _err = function(msg) {\\n throw({ forbidden: msg });\\n };\\n\\n /**\\n * Ensure that type=\'form\' documents are created with correctly formatted _id\\n * property.\\n */\\n var validateForm = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var form_id = id_parts.slice(1).join(\':\');\\n if (prefix !== \'form\') {\\n _err(\'_id property must be prefixed with \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (!form_id) {\\n _err(\'_id property must define a value after \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id property must be lower case. e.g. \\"form:registration\\"\');\\n }\\n };\\n\\n var validateUserSettings = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var username = id_parts.slice(1).join(\':\');\\n var idExample = \' e.g. \\"org.couchdb.user:sally\\"\';\\n if (prefix !== \'org.couchdb.user\') {\\n _err(\'_id must be prefixed with \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (!username) {\\n _err(\'_id must define a value after \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id must be lower case.\' + idExample);\\n }\\n if (typeof newDoc.name === \'undefined\' || newDoc.name !== username) {\\n _err(\'name property must be equivalent to username.\' + idExample);\\n }\\n if (newDoc.name.toLowerCase() !== username.toLowerCase()) {\\n _err(\'name must be equivalent to username\');\\n }\\n if (typeof newDoc.known !== \'undefined\' && typeof newDoc.known !== \'boolean\') {\\n _err(\'known is not a boolean.\');\\n }\\n if (typeof newDoc.roles !== \'object\') {\\n _err(\'roles is a required array\');\\n }\\n };\\n\\n if (userCtx.facility_id === newDoc._id) {\\n _err(\'You are not authorized to edit your own place\');\\n }\\n if (newDoc.type === \'form\') {\\n validateForm(newDoc);\\n }\\n if (newDoc.type === \'user-settings\') {\\n validateUserSettings(newDoc);\\n }\\n\\n log(\\n \'medic-client validate_doc_update passed for User \\"\' + userCtx.name +\\n \'\\" changing document \\"\' + newDoc._id + \'\\"\'\\n );\\n}"}]');
+module.exports = JSON.parse('[{"_id":"_design/medic-client","validate_doc_update":"function(newDoc, oldDoc, userCtx) {\\n /*\\n LOCAL DOCUMENT VALIDATION\\n\\n This is for validating document structure, irrespective of authority, so it\\n can be run both on couchdb and pouchdb (where you are technically admin).\\n\\n For validations around authority check lib/validate_doc_update.js, which is\\n only run on the server.\\n */\\n\\n var _err = function(msg) {\\n throw({ forbidden: msg });\\n };\\n\\n /**\\n * Ensure that type=\'form\' documents are created with correctly formatted _id\\n * property.\\n */\\n var validateForm = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var form_id = id_parts.slice(1).join(\':\');\\n if (prefix !== \'form\') {\\n _err(\'_id property must be prefixed with \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (!form_id) {\\n _err(\'_id property must define a value after \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id property must be lower case. e.g. \\"form:registration\\"\');\\n }\\n };\\n\\n var validateUserSettings = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var username = id_parts.slice(1).join(\':\');\\n var idExample = \' e.g. \\"org.couchdb.user:sally\\"\';\\n if (prefix !== \'org.couchdb.user\') {\\n _err(\'_id must be prefixed with \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (!username) {\\n _err(\'_id must define a value after \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id must be lower case.\' + idExample);\\n }\\n if (typeof newDoc.name === \'undefined\' || newDoc.name !== username) {\\n _err(\'name property must be equivalent to username.\' + idExample);\\n }\\n if (newDoc.name.toLowerCase() !== username.toLowerCase()) {\\n _err(\'name must be equivalent to username\');\\n }\\n if (typeof newDoc.known !== \'undefined\' && typeof newDoc.known !== \'boolean\') {\\n _err(\'known is not a boolean.\');\\n }\\n if (typeof newDoc.roles !== \'object\') {\\n _err(\'roles is a required array\');\\n }\\n };\\n\\n if (userCtx.facility_id === newDoc._id) {\\n _err(\'You are not authorized to edit your own place\');\\n }\\n if (newDoc.type === \'form\') {\\n validateForm(newDoc);\\n }\\n if (newDoc.type === \'user-settings\') {\\n validateUserSettings(newDoc);\\n }\\n\\n log(\\n \'medic-client validate_doc_update passed for User \\"\' + userCtx.name +\\n \'\\" changing document \\"\' + newDoc._id + \'\\"\'\\n );\\n}","views":{"contacts_by_parent":{"map":"function(doc) {\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n var parentId = doc.parent && doc.parent._id;\\n var type = doc.type === \'contact\' ? doc.contact_type : doc.type;\\n if (parentId) {\\n emit([parentId, type]);\\n }\\n }\\n}"},"contacts_by_last_visited":{"reduce":"_stats","map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n if (typeof date !== \'number\' || isNaN(date)) {\\n date = 0;\\n }\\n // Is a visit report about a family\\n emit(doc.fields.visited_contact_uuid, date);\\n } else if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n // Is a contact type\\n emit(doc._id, 0);\\n }\\n}"},"contacts_by_reference":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'national_office\' ||\\n doc.type === \'person\') {\\n\\n var emitReference = function(prefix, key) {\\n if (tombstone) {\\n prefix = \'tombstone-\' + prefix;\\n }\\n emit([ prefix, String(key) ], doc.reported_date);\\n };\\n\\n if (doc.place_id) {\\n emitReference(\'shortcode\', doc.place_id);\\n }\\n if (doc.patient_id) {\\n emitReference(\'shortcode\', doc.patient_id);\\n }\\n if (doc.simprints_id) {\\n emitReference(\'simprints\', doc.simprints_id);\\n }\\n if (doc.rc_code) {\\n // need String because rewriter wraps everything in quotes\\n // keep refid case-insenstive since data is usually coming from SMS\\n emitReference(\'external\', String(doc.rc_code).toUpperCase());\\n }\\n }\\n}"},"contacts_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], order);\\n });\\n }\\n}"},"data_records_by_type":{"reduce":"_count","map":"function(doc) {\\n if (doc.type === \'data_record\') {\\n emit(doc.form ? \'report\' : \'message\');\\n }\\n}"},"contacts_by_phone":{"map":"function(doc) {\\n if (doc.phone) {\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n if (types.indexOf(doc.type) !== -1) {\\n emit(doc.phone);\\n }\\n }\\n}"},"contacts_by_type_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(type, key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([ type, key ], value);\\n }\\n };\\n\\n var emitField = function(type, key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(type, word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(type, key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(type, key, doc[key], order);\\n });\\n }\\n}"},"contacts_by_place":{"map":"function(doc) {\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n if (idx !== -1) {\\n var place = doc.parent;\\n var order = idx + \' \' + (doc.name && doc.name.toLowerCase());\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], order);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"doc_by_type":{"map":"function(doc) {\\n if (doc.type === \'translations\') {\\n emit([ \'translations\', doc.enabled ], {\\n code: doc.code,\\n name: doc.name\\n });\\n return;\\n }\\n emit([ doc.type ]);\\n}"},"contacts_by_type":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (tombstone) {\\n type = \'tombstone-\' + type;\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n emit([ type ], order);\\n }\\n}"},"messages_by_contact_date":{"map":"function(doc) {\\n\\n var emitMessage = function(doc, contact, phone) {\\n var id = (contact && contact._id) || phone || doc._id;\\n emit([ id, doc.reported_date ], {\\n id: doc._id,\\n date: doc.reported_date,\\n contact: contact && contact._id\\n });\\n };\\n\\n if (doc.type === \'data_record\' && !doc.form) {\\n if (doc.kujua_message && doc.tasks) {\\n // outgoing\\n doc.tasks.forEach(function(task) {\\n var message = task.messages && task.messages[0];\\n if(message) {\\n emitMessage(doc, message.contact, message.to);\\n }\\n });\\n } else if (doc.sms_message) {\\n // incoming\\n emitMessage(doc, doc.contact, doc.from);\\n }\\n }\\n}","reduce":"function(key, values) {\\n var latest = { date: 0 };\\n values.forEach(function(value) {\\n if (value.date > latest.date) {\\n latest = value;\\n }\\n });\\n return latest;\\n}"},"docs_by_id_lineage":{"map":"function(doc) {\\n\\n var emitLineage = function(contact, depth) {\\n while (contact && contact._id) {\\n emit([ doc._id, depth++ ], { _id: contact._id });\\n contact = contact.parent;\\n }\\n };\\n\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n\\n if (types.indexOf(doc.type) !== -1) {\\n // contact\\n emitLineage(doc, 0);\\n } else if (doc.type === \'data_record\' && doc.form) {\\n // report\\n emit([ doc._id, 0 ]);\\n emitLineage(doc.contact, 1);\\n }\\n}"},"reports_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.reported_date], doc.reported_date);\\n }\\n}"},"registered_patients":{"map":"// NB: This returns *registrations* for contacts. If contacts are created by\\n// means other then sending in a registration report (eg created in the UI)\\n// they will not show up in this view.\\n//\\n// For a view with all patients by their shortcode, use:\\n// medic/docs_by_shortcode\\nfunction(doc) {\\n var patientId = doc.patient_id || (doc.fields && doc.fields.patient_id);\\n var placeId = doc.place_id || (doc.fields && doc.fields.place_id);\\n\\n if (!doc.form || doc.type !== \'data_record\' || (doc.errors && doc.errors.length)) {\\n return;\\n }\\n\\n if (patientId) {\\n emit(String(patientId));\\n }\\n\\n if (placeId) {\\n emit(String(placeId));\\n }\\n}"},"reports_by_form":{"reduce":"function() {\\n return true;\\n}","map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.form], doc.reported_date);\\n }\\n}"},"reports_by_place":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var place = doc.contact && doc.contact.parent;\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], doc.reported_date);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"reports_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'content\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, reportedDate) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, reportedDate);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, reportedDate);\\n }\\n };\\n\\n if (doc.type === \'data_record\' && doc.form) {\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], doc.reported_date);\\n });\\n if (doc.fields) {\\n Object.keys(doc.fields).forEach(function(key) {\\n emitField(key, doc.fields[key], doc.reported_date);\\n });\\n }\\n if (doc.contact && doc.contact._id) {\\n emitMaybe(\'contact:\' + doc.contact._id.toLowerCase(), doc.reported_date);\\n }\\n }\\n}"},"reports_by_validity":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([!doc.errors || doc.errors.length === 0], doc.reported_date);\\n }\\n}"},"tasks_by_contact":{"map":"function(doc) {\\n if (doc.type === \'task\') {\\n var isTerminalState = [\'Cancelled\', \'Completed\', \'Failed\'].indexOf(doc.state) >= 0;\\n if (!isTerminalState) {\\n emit(\'owner-\' + (doc.owner || \'_unassigned\'));\\n }\\n\\n if (doc.requester) {\\n emit(\'requester-\' + doc.requester);\\n }\\n }\\n}"},"reports_by_subject":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var emitField = function(obj, field) {\\n if (obj[field]) {\\n emit(obj[field], doc.reported_date);\\n }\\n };\\n\\n emitField(doc, \'patient_id\');\\n emitField(doc, \'place_id\');\\n emitField(doc, \'case_id\');\\n\\n if (doc.fields) {\\n emitField(doc.fields, \'patient_id\');\\n emitField(doc.fields, \'place_id\');\\n emitField(doc.fields, \'case_id\');\\n emitField(doc.fields, \'patient_uuid\');\\n emitField(doc.fields, \'place_uuid\');\\n }\\n }\\n}"},"reports_by_verification":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.verified], doc.reported_date);\\n }\\n}"},"total_clinics_by_facility":{"map":"function(doc) {\\n var districtId = doc.parent && doc.parent.parent && doc.parent.parent._id;\\n if (doc.type === \'clinic\' || (doc.type === \'contact\' && districtId)) {\\n var healthCenterId = doc.parent && doc.parent._id;\\n emit([ districtId, healthCenterId, doc._id, 0 ]);\\n if (doc.contact && doc.contact._id) {\\n emit([ districtId, healthCenterId, doc._id, 1 ], { _id: doc.contact._id });\\n }\\n var index = 2;\\n var parent = doc.parent;\\n while(parent) {\\n if (parent._id) {\\n emit([ districtId, healthCenterId, doc._id, index++ ], { _id: parent._id });\\n }\\n parent = parent.parent;\\n }\\n }\\n}"},"visits_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var visited_date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n\\n // Is a visit report about a family\\n emit(visited_date, doc.fields.visited_contact_uuid);\\n }\\n}"}}}]');
/***/ }),
@@ -80,7 +90,18 @@ module.exports = JSON.parse('[{"_id":"_design/medic-client","views":{"contacts_b
/***/ ((module) => {
"use strict";
-module.exports = JSON.parse('[{"_id":"_design/medic-client","validate_doc_update":"function(newDoc, oldDoc, userCtx) {\\n /*\\n LOCAL DOCUMENT VALIDATION\\n\\n This is for validating document structure, irrespective of authority, so it\\n can be run both on couchdb and pouchdb (where you are technically admin).\\n\\n For validations around authority check lib/validate_doc_update.js, which is\\n only run on the server.\\n */\\n\\n var _err = function(msg) {\\n throw({ forbidden: msg });\\n };\\n\\n /**\\n * Ensure that type=\'form\' documents are created with correctly formatted _id\\n * property.\\n */\\n var validateForm = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var form_id = id_parts.slice(1).join(\':\');\\n if (prefix !== \'form\') {\\n _err(\'_id property must be prefixed with \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (!form_id) {\\n _err(\'_id property must define a value after \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id property must be lower case. e.g. \\"form:registration\\"\');\\n }\\n };\\n\\n var validateUserSettings = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var username = id_parts.slice(1).join(\':\');\\n var idExample = \' e.g. \\"org.couchdb.user:sally\\"\';\\n if (prefix !== \'org.couchdb.user\') {\\n _err(\'_id must be prefixed with \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (!username) {\\n _err(\'_id must define a value after \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id must be lower case.\' + idExample);\\n }\\n if (typeof newDoc.name === \'undefined\' || newDoc.name !== username) {\\n _err(\'name property must be equivalent to username.\' + idExample);\\n }\\n if (newDoc.name.toLowerCase() !== username.toLowerCase()) {\\n _err(\'name must be equivalent to username\');\\n }\\n if (typeof newDoc.known !== \'undefined\' && typeof newDoc.known !== \'boolean\') {\\n _err(\'known is not a boolean.\');\\n }\\n if (typeof newDoc.roles !== \'object\') {\\n _err(\'roles is a required array\');\\n }\\n };\\n\\n if (userCtx.facility_id === newDoc._id) {\\n _err(\'You are not authorized to edit your own place\');\\n }\\n if (newDoc.type === \'form\') {\\n validateForm(newDoc);\\n }\\n if (newDoc.type === \'user-settings\') {\\n validateUserSettings(newDoc);\\n }\\n\\n log(\\n \'medic-client validate_doc_update passed for User \\"\' + userCtx.name +\\n \'\\" changing document \\"\' + newDoc._id + \'\\"\'\\n );\\n}","views":{"contacts_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], order);\\n });\\n }\\n}"},"contacts_by_last_visited":{"map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n if (typeof date !== \'number\' || isNaN(date)) {\\n date = 0;\\n }\\n // Is a visit report about a family\\n emit(doc.fields.visited_contact_uuid, date);\\n } else if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n // Is a contact type\\n emit(doc._id, 0);\\n }\\n}","reduce":"_stats"},"contacts_by_parent":{"map":"function(doc) {\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n var parentId = doc.parent && doc.parent._id;\\n var type = doc.type === \'contact\' ? doc.contact_type : doc.type;\\n if (parentId) {\\n emit([parentId, type]);\\n }\\n }\\n}"},"contacts_by_phone":{"map":"function(doc) {\\n if (doc.phone) {\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n if (types.indexOf(doc.type) !== -1) {\\n emit(doc.phone);\\n }\\n }\\n}"},"contacts_by_place":{"map":"function(doc) {\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n if (idx !== -1) {\\n var place = doc.parent;\\n var order = idx + \' \' + (doc.name && doc.name.toLowerCase());\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], order);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"contacts_by_reference":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'national_office\' ||\\n doc.type === \'person\') {\\n\\n var emitReference = function(prefix, key) {\\n if (tombstone) {\\n prefix = \'tombstone-\' + prefix;\\n }\\n emit([ prefix, String(key) ], doc.reported_date);\\n };\\n\\n if (doc.place_id) {\\n emitReference(\'shortcode\', doc.place_id);\\n }\\n if (doc.patient_id) {\\n emitReference(\'shortcode\', doc.patient_id);\\n }\\n if (doc.simprints_id) {\\n emitReference(\'simprints\', doc.simprints_id);\\n }\\n if (doc.rc_code) {\\n // need String because rewriter wraps everything in quotes\\n // keep refid case-insenstive since data is usually coming from SMS\\n emitReference(\'external\', String(doc.rc_code).toUpperCase());\\n }\\n }\\n}"},"contacts_by_type_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(type, key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([ type, key ], value);\\n }\\n };\\n\\n var emitField = function(type, key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(type, word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(type, key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(type, key, doc[key], order);\\n });\\n }\\n}"},"contacts_by_type":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (tombstone) {\\n type = \'tombstone-\' + type;\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n emit([ type ], order);\\n }\\n}"},"data_records_by_type":{"reduce":"_count","map":"function(doc) {\\n if (doc.type === \'data_record\') {\\n emit(doc.form ? \'report\' : \'message\');\\n }\\n}"},"doc_by_type":{"map":"function(doc) {\\n if (doc.type === \'translations\') {\\n emit([ \'translations\', doc.enabled ], {\\n code: doc.code,\\n name: doc.name\\n });\\n return;\\n }\\n emit([ doc.type ]);\\n}"},"messages_by_contact_date":{"map":"function(doc) {\\n\\n var emitMessage = function(doc, contact, phone) {\\n var id = (contact && contact._id) || phone || doc._id;\\n emit([ id, doc.reported_date ], {\\n id: doc._id,\\n date: doc.reported_date,\\n contact: contact && contact._id\\n });\\n };\\n\\n if (doc.type === \'data_record\' && !doc.form) {\\n if (doc.kujua_message && doc.tasks) {\\n // outgoing\\n doc.tasks.forEach(function(task) {\\n var message = task.messages && task.messages[0];\\n if(message) {\\n emitMessage(doc, message.contact, message.to);\\n }\\n });\\n } else if (doc.sms_message) {\\n // incoming\\n emitMessage(doc, doc.contact, doc.from);\\n }\\n }\\n}","reduce":"function(key, values) {\\n var latest = { date: 0 };\\n values.forEach(function(value) {\\n if (value.date > latest.date) {\\n latest = value;\\n }\\n });\\n return latest;\\n}"},"docs_by_id_lineage":{"map":"function(doc) {\\n\\n var emitLineage = function(contact, depth) {\\n while (contact && contact._id) {\\n emit([ doc._id, depth++ ], { _id: contact._id });\\n contact = contact.parent;\\n }\\n };\\n\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n\\n if (types.indexOf(doc.type) !== -1) {\\n // contact\\n emitLineage(doc, 0);\\n } else if (doc.type === \'data_record\' && doc.form) {\\n // report\\n emit([ doc._id, 0 ]);\\n emitLineage(doc.contact, 1);\\n }\\n}"},"reports_by_form":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.form], doc.reported_date);\\n }\\n}","reduce":"function() {\\n return true;\\n}"},"registered_patients":{"map":"// NB: This returns *registrations* for contacts. If contacts are created by\\n// means other then sending in a registration report (eg created in the UI)\\n// they will not show up in this view.\\n//\\n// For a view with all patients by their shortcode, use:\\n// medic/docs_by_shortcode\\nfunction(doc) {\\n var patientId = doc.patient_id || (doc.fields && doc.fields.patient_id);\\n var placeId = doc.place_id || (doc.fields && doc.fields.place_id);\\n\\n if (!doc.form || doc.type !== \'data_record\' || (doc.errors && doc.errors.length)) {\\n return;\\n }\\n\\n if (patientId) {\\n emit(String(patientId));\\n }\\n\\n if (placeId) {\\n emit(String(placeId));\\n }\\n}"},"reports_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.reported_date], doc.reported_date);\\n }\\n}"},"reports_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'content\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, reportedDate) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, reportedDate);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, reportedDate);\\n }\\n };\\n\\n if (doc.type === \'data_record\' && doc.form) {\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], doc.reported_date);\\n });\\n if (doc.fields) {\\n Object.keys(doc.fields).forEach(function(key) {\\n emitField(key, doc.fields[key], doc.reported_date);\\n });\\n }\\n if (doc.contact && doc.contact._id) {\\n emitMaybe(\'contact:\' + doc.contact._id.toLowerCase(), doc.reported_date);\\n }\\n }\\n}"},"reports_by_place":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var place = doc.contact && doc.contact.parent;\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], doc.reported_date);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"reports_by_subject":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var emitField = function(obj, field) {\\n if (obj[field]) {\\n emit(obj[field], doc.reported_date);\\n }\\n };\\n\\n emitField(doc, \'patient_id\');\\n emitField(doc, \'place_id\');\\n emitField(doc, \'case_id\');\\n\\n if (doc.fields) {\\n emitField(doc.fields, \'patient_id\');\\n emitField(doc.fields, \'place_id\');\\n emitField(doc.fields, \'case_id\');\\n emitField(doc.fields, \'patient_uuid\');\\n emitField(doc.fields, \'place_uuid\');\\n }\\n }\\n}"},"reports_by_validity":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([!doc.errors || doc.errors.length === 0], doc.reported_date);\\n }\\n}"},"reports_by_verification":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.verified], doc.reported_date);\\n }\\n}"},"tasks_by_contact":{"map":"function(doc) {\\n if (doc.type === \'task\') {\\n var isTerminalState = [\'Cancelled\', \'Completed\', \'Failed\'].indexOf(doc.state) >= 0;\\n if (!isTerminalState) {\\n emit(\'owner-\' + (doc.owner || \'_unassigned\'));\\n }\\n\\n if (doc.requester) {\\n emit(\'requester-\' + doc.requester);\\n }\\n }\\n}"},"total_clinics_by_facility":{"map":"function(doc) {\\n var districtId = doc.parent && doc.parent.parent && doc.parent.parent._id;\\n if (doc.type === \'clinic\' || (doc.type === \'contact\' && districtId)) {\\n var healthCenterId = doc.parent && doc.parent._id;\\n emit([ districtId, healthCenterId, doc._id, 0 ]);\\n if (doc.contact && doc.contact._id) {\\n emit([ districtId, healthCenterId, doc._id, 1 ], { _id: doc.contact._id });\\n }\\n var index = 2;\\n var parent = doc.parent;\\n while(parent) {\\n if (parent._id) {\\n emit([ districtId, healthCenterId, doc._id, index++ ], { _id: parent._id });\\n }\\n parent = parent.parent;\\n }\\n }\\n}"},"visits_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var visited_date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n\\n // Is a visit report about a family\\n emit(visited_date, doc.fields.visited_contact_uuid);\\n emit([doc.fields.visited_contact_uuid, visited_date]);\\n }\\n}"}}}]');
+module.exports = JSON.parse('[{"validate_doc_update":"function(newDoc, oldDoc, userCtx) {\\n /*\\n LOCAL DOCUMENT VALIDATION\\n\\n This is for validating document structure, irrespective of authority, so it\\n can be run both on couchdb and pouchdb (where you are technically admin).\\n\\n For validations around authority check lib/validate_doc_update.js, which is\\n only run on the server.\\n */\\n\\n var _err = function(msg) {\\n throw({ forbidden: msg });\\n };\\n\\n /**\\n * Ensure that type=\'form\' documents are created with correctly formatted _id\\n * property.\\n */\\n var validateForm = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var form_id = id_parts.slice(1).join(\':\');\\n if (prefix !== \'form\') {\\n _err(\'_id property must be prefixed with \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (!form_id) {\\n _err(\'_id property must define a value after \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id property must be lower case. e.g. \\"form:registration\\"\');\\n }\\n };\\n\\n var validateUserSettings = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var username = id_parts.slice(1).join(\':\');\\n var idExample = \' e.g. \\"org.couchdb.user:sally\\"\';\\n if (prefix !== \'org.couchdb.user\') {\\n _err(\'_id must be prefixed with \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (!username) {\\n _err(\'_id must define a value after \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id must be lower case.\' + idExample);\\n }\\n if (typeof newDoc.name === \'undefined\' || newDoc.name !== username) {\\n _err(\'name property must be equivalent to username.\' + idExample);\\n }\\n if (newDoc.name.toLowerCase() !== username.toLowerCase()) {\\n _err(\'name must be equivalent to username\');\\n }\\n if (typeof newDoc.known !== \'undefined\' && typeof newDoc.known !== \'boolean\') {\\n _err(\'known is not a boolean.\');\\n }\\n if (typeof newDoc.roles !== \'object\') {\\n _err(\'roles is a required array\');\\n }\\n };\\n\\n if (userCtx.facility_id === newDoc._id) {\\n _err(\'You are not authorized to edit your own place\');\\n }\\n if (newDoc.type === \'form\') {\\n validateForm(newDoc);\\n }\\n if (newDoc.type === \'user-settings\') {\\n validateUserSettings(newDoc);\\n }\\n\\n log(\\n \'medic-client validate_doc_update passed for User \\"\' + userCtx.name +\\n \'\\" changing document \\"\' + newDoc._id + \'\\"\'\\n );\\n}","_id":"_design/medic-client","views":{"contacts_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], order);\\n });\\n }\\n}"},"contacts_by_last_visited":{"map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n if (typeof date !== \'number\' || isNaN(date)) {\\n date = 0;\\n }\\n // Is a visit report about a family\\n emit(doc.fields.visited_contact_uuid, date);\\n } else if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n // Is a contact type\\n emit(doc._id, 0);\\n }\\n}","reduce":"_stats"},"contacts_by_parent":{"map":"function(doc) {\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n var parentId = doc.parent && doc.parent._id;\\n var type = doc.type === \'contact\' ? doc.contact_type : doc.type;\\n if (parentId) {\\n emit([parentId, type]);\\n }\\n }\\n}"},"contacts_by_phone":{"map":"function(doc) {\\n if (doc.phone) {\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n if (types.indexOf(doc.type) !== -1) {\\n emit(doc.phone);\\n }\\n }\\n}"},"contacts_by_type_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(type, key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([ type, key ], value);\\n }\\n };\\n\\n var emitField = function(type, key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(type, word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(type, key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(type, key, doc[key], order);\\n });\\n }\\n}"},"contacts_by_place":{"map":"function(doc) {\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n if (idx !== -1) {\\n var place = doc.parent;\\n var order = idx + \' \' + (doc.name && doc.name.toLowerCase());\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], order);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"data_records_by_type":{"reduce":"_count","map":"function(doc) {\\n if (doc.type === \'data_record\') {\\n emit(doc.form ? \'report\' : \'message\');\\n }\\n}"},"contacts_by_reference":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'national_office\' ||\\n doc.type === \'person\') {\\n\\n var emitReference = function(prefix, key) {\\n if (tombstone) {\\n prefix = \'tombstone-\' + prefix;\\n }\\n emit([ prefix, String(key) ], doc.reported_date);\\n };\\n\\n if (doc.place_id) {\\n emitReference(\'shortcode\', doc.place_id);\\n }\\n if (doc.patient_id) {\\n emitReference(\'shortcode\', doc.patient_id);\\n }\\n if (doc.simprints_id) {\\n emitReference(\'simprints\', doc.simprints_id);\\n }\\n if (doc.rc_code) {\\n // need String because rewriter wraps everything in quotes\\n // keep refid case-insenstive since data is usually coming from SMS\\n emitReference(\'external\', String(doc.rc_code).toUpperCase());\\n }\\n }\\n}"},"contacts_by_type":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (tombstone) {\\n type = \'tombstone-\' + type;\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n emit([ type ], order);\\n }\\n}"},"messages_by_contact_date":{"map":"function(doc) {\\n\\n var emitMessage = function(doc, contact, phone) {\\n var id = (contact && contact._id) || phone || doc._id;\\n emit([ id, doc.reported_date ], {\\n id: doc._id,\\n date: doc.reported_date,\\n contact: contact && contact._id\\n });\\n };\\n\\n if (doc.type === \'data_record\' && !doc.form) {\\n if (doc.kujua_message && doc.tasks) {\\n // outgoing\\n doc.tasks.forEach(function(task) {\\n var message = task.messages && task.messages[0];\\n if(message) {\\n emitMessage(doc, message.contact, message.to);\\n }\\n });\\n } else if (doc.sms_message) {\\n // incoming\\n emitMessage(doc, doc.contact, doc.from);\\n }\\n }\\n}","reduce":"function(key, values) {\\n var latest = { date: 0 };\\n values.forEach(function(value) {\\n if (value.date > latest.date) {\\n latest = value;\\n }\\n });\\n return latest;\\n}"},"docs_by_id_lineage":{"map":"function(doc) {\\n\\n var emitLineage = function(contact, depth) {\\n while (contact && contact._id) {\\n emit([ doc._id, depth++ ], { _id: contact._id });\\n contact = contact.parent;\\n }\\n };\\n\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n\\n if (types.indexOf(doc.type) !== -1) {\\n // contact\\n emitLineage(doc, 0);\\n } else if (doc.type === \'data_record\' && doc.form) {\\n // report\\n emit([ doc._id, 0 ]);\\n emitLineage(doc.contact, 1);\\n }\\n}"},"reports_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.reported_date], doc.reported_date);\\n }\\n}"},"doc_by_type":{"map":"function(doc) {\\n if (doc.type === \'translations\') {\\n emit([ \'translations\', doc.enabled ], {\\n code: doc.code,\\n name: doc.name\\n });\\n return;\\n }\\n emit([ doc.type ]);\\n}"},"registered_patients":{"map":"// NB: This returns *registrations* for contacts. If contacts are created by\\n// means other then sending in a registration report (eg created in the UI)\\n// they will not show up in this view.\\n//\\n// For a view with all patients by their shortcode, use:\\n// medic/docs_by_shortcode\\nfunction(doc) {\\n var patientId = doc.patient_id || (doc.fields && doc.fields.patient_id);\\n var placeId = doc.place_id || (doc.fields && doc.fields.place_id);\\n\\n if (!doc.form || doc.type !== \'data_record\' || (doc.errors && doc.errors.length)) {\\n return;\\n }\\n\\n if (patientId) {\\n emit(String(patientId));\\n }\\n\\n if (placeId) {\\n emit(String(placeId));\\n }\\n}"},"reports_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'content\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, reportedDate) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, reportedDate);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, reportedDate);\\n }\\n };\\n\\n if (doc.type === \'data_record\' && doc.form) {\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], doc.reported_date);\\n });\\n if (doc.fields) {\\n Object.keys(doc.fields).forEach(function(key) {\\n emitField(key, doc.fields[key], doc.reported_date);\\n });\\n }\\n if (doc.contact && doc.contact._id) {\\n emitMaybe(\'contact:\' + doc.contact._id.toLowerCase(), doc.reported_date);\\n }\\n }\\n}"},"reports_by_validity":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([!doc.errors || doc.errors.length === 0], doc.reported_date);\\n }\\n}"},"reports_by_form":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.form], doc.reported_date);\\n }\\n}","reduce":"function() {\\n return true;\\n}"},"reports_by_place":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var place = doc.contact && doc.contact.parent;\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], doc.reported_date);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"reports_by_subject":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var emitField = function(obj, field) {\\n if (obj[field]) {\\n emit(obj[field], doc.reported_date);\\n }\\n };\\n\\n emitField(doc, \'patient_id\');\\n emitField(doc, \'place_id\');\\n emitField(doc, \'case_id\');\\n\\n if (doc.fields) {\\n emitField(doc.fields, \'patient_id\');\\n emitField(doc.fields, \'place_id\');\\n emitField(doc.fields, \'case_id\');\\n emitField(doc.fields, \'patient_uuid\');\\n emitField(doc.fields, \'place_uuid\');\\n }\\n }\\n}"},"reports_by_verification":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.verified], doc.reported_date);\\n }\\n}"},"visits_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var visited_date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n\\n // Is a visit report about a family\\n emit(visited_date, doc.fields.visited_contact_uuid);\\n emit([doc.fields.visited_contact_uuid, visited_date]);\\n }\\n}"},"tasks_by_contact":{"map":"function(doc) {\\n if (doc.type === \'task\') {\\n var isTerminalState = [\'Cancelled\', \'Completed\', \'Failed\'].indexOf(doc.state) >= 0;\\n if (!isTerminalState) {\\n emit(\'owner-\' + (doc.owner || \'_unassigned\'));\\n }\\n\\n if (doc.requester) {\\n emit(\'requester-\' + doc.requester);\\n }\\n }\\n}"},"total_clinics_by_facility":{"map":"function(doc) {\\n var districtId = doc.parent && doc.parent.parent && doc.parent.parent._id;\\n if (doc.type === \'clinic\' || (doc.type === \'contact\' && districtId)) {\\n var healthCenterId = doc.parent && doc.parent._id;\\n emit([ districtId, healthCenterId, doc._id, 0 ]);\\n if (doc.contact && doc.contact._id) {\\n emit([ districtId, healthCenterId, doc._id, 1 ], { _id: doc.contact._id });\\n }\\n var index = 2;\\n var parent = doc.parent;\\n while(parent) {\\n if (parent._id) {\\n emit([ districtId, healthCenterId, doc._id, index++ ], { _id: parent._id });\\n }\\n parent = parent.parent;\\n }\\n }\\n}"}}}]');
+
+/***/ }),
+
+/***/ "./build/cht-core-3-13-ddocs.json":
+/*!****************************************!*\
+ !*** ./build/cht-core-3-13-ddocs.json ***!
+ \****************************************/
+/***/ ((module) => {
+
+"use strict";
+module.exports = JSON.parse('[{"validate_doc_update":"function(newDoc, oldDoc, userCtx) {\\n /*\\n LOCAL DOCUMENT VALIDATION\\n\\n This is for validating document structure, irrespective of authority, so it\\n can be run both on couchdb and pouchdb (where you are technically admin).\\n\\n For validations around authority check lib/validate_doc_update.js, which is\\n only run on the server.\\n */\\n\\n var _err = function(msg) {\\n throw({ forbidden: msg });\\n };\\n\\n /**\\n * Ensure that type=\'form\' documents are created with correctly formatted _id\\n * property.\\n */\\n var validateForm = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var form_id = id_parts.slice(1).join(\':\');\\n if (prefix !== \'form\') {\\n _err(\'_id property must be prefixed with \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (!form_id) {\\n _err(\'_id property must define a value after \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id property must be lower case. e.g. \\"form:registration\\"\');\\n }\\n };\\n\\n var validateUserSettings = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var username = id_parts.slice(1).join(\':\');\\n var idExample = \' e.g. \\"org.couchdb.user:sally\\"\';\\n if (prefix !== \'org.couchdb.user\') {\\n _err(\'_id must be prefixed with \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (!username) {\\n _err(\'_id must define a value after \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id must be lower case.\' + idExample);\\n }\\n if (typeof newDoc.name === \'undefined\' || newDoc.name !== username) {\\n _err(\'name property must be equivalent to username.\' + idExample);\\n }\\n if (newDoc.name.toLowerCase() !== username.toLowerCase()) {\\n _err(\'name must be equivalent to username\');\\n }\\n if (typeof newDoc.known !== \'undefined\' && typeof newDoc.known !== \'boolean\') {\\n _err(\'known is not a boolean.\');\\n }\\n if (typeof newDoc.roles !== \'object\') {\\n _err(\'roles is a required array\');\\n }\\n };\\n\\n if (userCtx.facility_id === newDoc._id) {\\n _err(\'You are not authorized to edit your own place\');\\n }\\n if (newDoc.type === \'form\') {\\n validateForm(newDoc);\\n }\\n if (newDoc.type === \'user-settings\') {\\n validateUserSettings(newDoc);\\n }\\n\\n log(\\n \'medic-client validate_doc_update passed for User \\"\' + userCtx.name +\\n \'\\" changing document \\"\' + newDoc._id + \'\\"\'\\n );\\n}","_id":"_design/medic-client","views":{"contacts_by_last_visited":{"map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n if (typeof date !== \'number\' || isNaN(date)) {\\n date = 0;\\n }\\n // Is a visit report about a family\\n emit(doc.fields.visited_contact_uuid, date);\\n } else if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n // Is a contact type\\n emit(doc._id, 0);\\n }\\n}","reduce":"_stats"},"contacts_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], order);\\n });\\n }\\n}"},"contacts_by_parent":{"map":"function(doc) {\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n var parentId = doc.parent && doc.parent._id;\\n var type = doc.type === \'contact\' ? doc.contact_type : doc.type;\\n if (parentId) {\\n emit([parentId, type]);\\n }\\n }\\n}"},"contacts_by_place":{"map":"function(doc) {\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n if (idx !== -1) {\\n var place = doc.parent;\\n var order = idx + \' \' + (doc.name && doc.name.toLowerCase());\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], order);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"contacts_by_reference":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'national_office\' ||\\n doc.type === \'person\') {\\n\\n var emitReference = function(prefix, key) {\\n if (tombstone) {\\n prefix = \'tombstone-\' + prefix;\\n }\\n emit([ prefix, String(key) ], doc.reported_date);\\n };\\n\\n if (doc.place_id) {\\n emitReference(\'shortcode\', doc.place_id);\\n }\\n if (doc.patient_id) {\\n emitReference(\'shortcode\', doc.patient_id);\\n }\\n if (doc.simprints_id) {\\n emitReference(\'simprints\', doc.simprints_id);\\n }\\n if (doc.rc_code) {\\n // need String because rewriter wraps everything in quotes\\n // keep refid case-insenstive since data is usually coming from SMS\\n emitReference(\'external\', String(doc.rc_code).toUpperCase());\\n }\\n }\\n}"},"contacts_by_phone":{"map":"function(doc) {\\n if (doc.phone) {\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n if (types.indexOf(doc.type) !== -1) {\\n emit(doc.phone);\\n }\\n }\\n}"},"data_records_by_type":{"map":"function(doc) {\\n if (doc.type === \'data_record\') {\\n emit(doc.form ? \'report\' : \'message\');\\n }\\n}","reduce":"_count"},"contacts_by_type_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(type, key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([ type, key ], value);\\n }\\n };\\n\\n var emitField = function(type, key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(type, word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(type, key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(type, key, doc[key], order);\\n });\\n }\\n}"},"contacts_by_type":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (tombstone) {\\n type = \'tombstone-\' + type;\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n emit([ type ], order);\\n }\\n}"},"messages_by_contact_date":{"map":"function(doc) {\\n\\n var emitMessage = function(doc, contact, phone) {\\n var id = (contact && contact._id) || phone || doc._id;\\n emit([ id, doc.reported_date ], {\\n id: doc._id,\\n date: doc.reported_date,\\n contact: contact && contact._id\\n });\\n };\\n\\n if (doc.type === \'data_record\' && !doc.form) {\\n if (doc.kujua_message && doc.tasks) {\\n // outgoing\\n doc.tasks.forEach(function(task) {\\n var message = task.messages && task.messages[0];\\n if(message) {\\n emitMessage(doc, message.contact, message.to);\\n }\\n });\\n } else if (doc.sms_message) {\\n // incoming\\n emitMessage(doc, doc.contact, doc.from);\\n }\\n }\\n}","reduce":"function(key, values) {\\n var latest = { date: 0 };\\n values.forEach(function(value) {\\n if (value.date > latest.date) {\\n latest = value;\\n }\\n });\\n return latest;\\n}"},"doc_by_type":{"map":"function(doc) {\\n if (doc.type === \'translations\') {\\n emit([ \'translations\', doc.enabled ], {\\n code: doc.code,\\n name: doc.name\\n });\\n return;\\n }\\n emit([ doc.type ]);\\n}"},"docs_by_id_lineage":{"map":"function(doc) {\\n\\n var emitLineage = function(contact, depth) {\\n while (contact && contact._id) {\\n emit([ doc._id, depth++ ], { _id: contact._id });\\n contact = contact.parent;\\n }\\n };\\n\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n\\n if (types.indexOf(doc.type) !== -1) {\\n // contact\\n emitLineage(doc, 0);\\n } else if (doc.type === \'data_record\' && doc.form) {\\n // report\\n emit([ doc._id, 0 ]);\\n emitLineage(doc.contact, 1);\\n }\\n}"},"reports_by_form":{"reduce":"function() {\\n return true;\\n}","map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.form], doc.reported_date);\\n }\\n}"},"registered_patients":{"map":"// NB: This returns *registrations* for contacts. If contacts are created by\\n// means other then sending in a registration report (eg created in the UI)\\n// they will not show up in this view.\\n//\\n// For a view with all patients by their shortcode, use:\\n// medic/docs_by_shortcode\\nfunction(doc) {\\n var patientId = doc.patient_id || (doc.fields && doc.fields.patient_id);\\n var placeId = doc.place_id || (doc.fields && doc.fields.place_id);\\n\\n if (!doc.form || doc.type !== \'data_record\' || (doc.errors && doc.errors.length)) {\\n return;\\n }\\n\\n if (patientId) {\\n emit(String(patientId));\\n }\\n\\n if (placeId) {\\n emit(String(placeId));\\n }\\n}"},"reports_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.reported_date], doc.reported_date);\\n }\\n}"},"reports_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'content\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, reportedDate) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, reportedDate);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, reportedDate);\\n }\\n };\\n\\n if (doc.type === \'data_record\' && doc.form) {\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], doc.reported_date);\\n });\\n if (doc.fields) {\\n Object.keys(doc.fields).forEach(function(key) {\\n emitField(key, doc.fields[key], doc.reported_date);\\n });\\n }\\n if (doc.contact && doc.contact._id) {\\n emitMaybe(\'contact:\' + doc.contact._id.toLowerCase(), doc.reported_date);\\n }\\n }\\n}"},"reports_by_subject":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var emitField = function(obj, field) {\\n if (obj[field]) {\\n emit(obj[field], doc.reported_date);\\n }\\n };\\n\\n emitField(doc, \'patient_id\');\\n emitField(doc, \'place_id\');\\n emitField(doc, \'case_id\');\\n\\n if (doc.fields) {\\n emitField(doc.fields, \'patient_id\');\\n emitField(doc.fields, \'place_id\');\\n emitField(doc.fields, \'case_id\');\\n emitField(doc.fields, \'patient_uuid\');\\n emitField(doc.fields, \'place_uuid\');\\n }\\n }\\n}"},"reports_by_place":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var place = doc.contact && doc.contact.parent;\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], doc.reported_date);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"reports_by_verification":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.verified], doc.reported_date);\\n }\\n}"},"reports_by_validity":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([!doc.errors || doc.errors.length === 0], doc.reported_date);\\n }\\n}"},"tasks_by_contact":{"map":"function(doc) {\\n if (doc.type === \'task\') {\\n var isTerminalState = [\'Cancelled\', \'Completed\', \'Failed\'].indexOf(doc.state) >= 0;\\n var owner = (doc.owner || \'_unassigned\');\\n\\n if (!isTerminalState) {\\n emit(\'owner-\' + owner);\\n }\\n\\n if (doc.requester) {\\n emit(\'requester-\' + doc.requester);\\n }\\n\\n emit([\'owner\', \'all\', owner], { state: doc.state });\\n }\\n}"},"total_clinics_by_facility":{"map":"function(doc) {\\n var districtId = doc.parent && doc.parent.parent && doc.parent.parent._id;\\n if (doc.type === \'clinic\' || (doc.type === \'contact\' && districtId)) {\\n var healthCenterId = doc.parent && doc.parent._id;\\n emit([ districtId, healthCenterId, doc._id, 0 ]);\\n if (doc.contact && doc.contact._id) {\\n emit([ districtId, healthCenterId, doc._id, 1 ], { _id: doc.contact._id });\\n }\\n var index = 2;\\n var parent = doc.parent;\\n while(parent) {\\n if (parent._id) {\\n emit([ districtId, healthCenterId, doc._id, index++ ], { _id: parent._id });\\n }\\n parent = parent.parent;\\n }\\n }\\n}"},"visits_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var visited_date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n\\n // Is a visit report about a family\\n emit(visited_date, doc.fields.visited_contact_uuid);\\n emit([doc.fields.visited_contact_uuid, visited_date]);\\n }\\n}"}}}]');
/***/ }),
@@ -91,42195 +112,47074 @@ module.exports = JSON.parse('[{"_id":"_design/medic-client","validate_doc_update
/***/ ((module) => {
"use strict";
-module.exports = JSON.parse('[{"validate_doc_update":"function(newDoc, oldDoc, userCtx) {\\n /*\\n LOCAL DOCUMENT VALIDATION\\n\\n This is for validating document structure, irrespective of authority, so it\\n can be run both on couchdb and pouchdb (where you are technically admin).\\n\\n For validations around authority check lib/validate_doc_update.js, which is\\n only run on the server.\\n */\\n\\n var _err = function(msg) {\\n throw({ forbidden: msg });\\n };\\n\\n /**\\n * Ensure that type=\'form\' documents are created with correctly formatted _id\\n * property.\\n */\\n var validateForm = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var form_id = id_parts.slice(1).join(\':\');\\n if (prefix !== \'form\') {\\n _err(\'_id property must be prefixed with \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (!form_id) {\\n _err(\'_id property must define a value after \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id property must be lower case. e.g. \\"form:registration\\"\');\\n }\\n };\\n\\n var validateUserSettings = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var username = id_parts.slice(1).join(\':\');\\n var idExample = \' e.g. \\"org.couchdb.user:sally\\"\';\\n if (prefix !== \'org.couchdb.user\') {\\n _err(\'_id must be prefixed with \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (!username) {\\n _err(\'_id must define a value after \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id must be lower case.\' + idExample);\\n }\\n if (typeof newDoc.name === \'undefined\' || newDoc.name !== username) {\\n _err(\'name property must be equivalent to username.\' + idExample);\\n }\\n if (newDoc.name.toLowerCase() !== username.toLowerCase()) {\\n _err(\'name must be equivalent to username\');\\n }\\n if (typeof newDoc.known !== \'undefined\' && typeof newDoc.known !== \'boolean\') {\\n _err(\'known is not a boolean.\');\\n }\\n if (typeof newDoc.roles !== \'object\') {\\n _err(\'roles is a required array\');\\n }\\n };\\n\\n if (userCtx.facility_id === newDoc._id) {\\n _err(\'You are not authorized to edit your own place\');\\n }\\n if (newDoc.type === \'form\') {\\n validateForm(newDoc);\\n }\\n if (newDoc.type === \'user-settings\') {\\n validateUserSettings(newDoc);\\n }\\n\\n log(\\n \'medic-client validate_doc_update passed for User \\"\' + userCtx.name +\\n \'\\" changing document \\"\' + newDoc._id + \'\\"\'\\n );\\n}","_id":"_design/medic-client","views":{"contacts_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], order);\\n });\\n }\\n}"},"contacts_by_last_visited":{"map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n if (typeof date !== \'number\' || isNaN(date)) {\\n date = 0;\\n }\\n // Is a visit report about a family\\n emit(doc.fields.visited_contact_uuid, date);\\n } else if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n // Is a contact type\\n emit(doc._id, 0);\\n }\\n}","reduce":"_stats"},"contacts_by_parent":{"map":"function(doc) {\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n var parentId = doc.parent && doc.parent._id;\\n if (parentId) {\\n emit([parentId, doc.contact_type || doc.type]);\\n }\\n }\\n}"},"contacts_by_phone":{"map":"function(doc) {\\n if (doc.phone) {\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n if (types.indexOf(doc.type) !== -1) {\\n emit(doc.phone);\\n }\\n }\\n}"},"contacts_by_place":{"map":"function(doc) {\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n if (idx !== -1) {\\n var place = doc.parent;\\n var order = idx + \' \' + (doc.name && doc.name.toLowerCase());\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], order);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"contacts_by_reference":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'national_office\' ||\\n doc.type === \'person\') {\\n\\n var emitReference = function(prefix, key) {\\n if (tombstone) {\\n prefix = \'tombstone-\' + prefix;\\n }\\n emit([ prefix, String(key) ], doc.reported_date);\\n };\\n\\n if (doc.place_id) {\\n emitReference(\'shortcode\', doc.place_id);\\n }\\n if (doc.patient_id) {\\n emitReference(\'shortcode\', doc.patient_id);\\n }\\n if (doc.simprints_id) {\\n emitReference(\'simprints\', doc.simprints_id);\\n }\\n if (doc.rc_code) {\\n // need String because rewriter wraps everything in quotes\\n // keep refid case-insenstive since data is usually coming from SMS\\n emitReference(\'external\', String(doc.rc_code).toUpperCase());\\n }\\n }\\n}"},"contacts_by_type_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(type, key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([ type, key ], value);\\n }\\n };\\n\\n var emitField = function(type, key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(type, word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(type, key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(type, key, doc[key], order);\\n });\\n }\\n}"},"contacts_by_type":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (tombstone) {\\n type = \'tombstone-\' + type;\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n emit([ type ], order);\\n }\\n}"},"data_records_by_type":{"map":"function(doc) {\\n if (doc.type === \'data_record\') {\\n emit(doc.form ? \'report\' : \'message\');\\n }\\n}","reduce":"_count"},"doc_by_type":{"map":"function(doc) {\\n if (doc.type === \'translations\') {\\n emit([ \'translations\', doc.enabled ], {\\n code: doc.code,\\n name: doc.name\\n });\\n return;\\n }\\n emit([ doc.type ]);\\n}"},"docs_by_id_lineage":{"map":"function(doc) {\\n\\n var emitLineage = function(contact, depth) {\\n while (contact && contact._id) {\\n emit([ doc._id, depth++ ], { _id: contact._id });\\n contact = contact.parent;\\n }\\n };\\n\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n\\n if (types.indexOf(doc.type) !== -1) {\\n // contact\\n emitLineage(doc, 0);\\n } else if (doc.type === \'data_record\' && doc.form) {\\n // report\\n emit([ doc._id, 0 ]);\\n emitLineage(doc.contact, 1);\\n }\\n}"},"messages_by_contact_date":{"map":"function(doc) {\\n\\n var emitMessage = function(doc, contact, phone) {\\n var id = (contact && contact._id) || phone || doc._id;\\n emit([ id, doc.reported_date ], {\\n id: doc._id,\\n date: doc.reported_date,\\n contact: contact && contact._id\\n });\\n };\\n\\n if (doc.type === \'data_record\' && !doc.form) {\\n if (doc.kujua_message && doc.tasks) {\\n // outgoing\\n doc.tasks.forEach(function(task) {\\n var message = task.messages && task.messages[0];\\n if(message) {\\n emitMessage(doc, message.contact, message.to);\\n }\\n });\\n } else if (doc.sms_message) {\\n // incoming\\n emitMessage(doc, doc.contact, doc.from);\\n }\\n }\\n}","reduce":"function(key, values) {\\n var latest = { date: 0 };\\n values.forEach(function(value) {\\n if (value.date > latest.date) {\\n latest = value;\\n }\\n });\\n return latest;\\n}"},"registered_patients":{"map":"// NB: This returns *registrations* for patients. If patients are created by\\n// means other then sending in a registration report (eg created in the UI)\\n// they will not show up in this view.\\n//\\n// For a view with all patients by their shortcode, use:\\n// medic/patient_by_patient_shortcode_id\\nfunction(doc) {\\n var patientId = doc.patient_id || (doc.fields && doc.fields.patient_id);\\n if (doc.form &&\\n doc.type === \'data_record\' &&\\n (!doc.errors || doc.errors.length === 0) &&\\n patientId) {\\n emit(String(patientId));\\n }\\n}"},"reports_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.reported_date], doc.reported_date);\\n }\\n}"},"reports_by_form_year_month_places":{"map":"// data record must adhere to property name of `month`\\nfunction(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.year &&\\n doc.fields.month) {\\n var year = parseInt(doc.fields.year, 10);\\n var month = parseInt(doc.fields.month, 10);\\n var clinic = doc.contact && doc.contact.parent;\\n var healthCenter = clinic && clinic.parent;\\n var district = healthCenter && healthCenter.parent;\\n emit(\\n [ doc.form, year, month ],\\n {\\n isValid: (doc.errors && doc.errors.length === 0),\\n clinicId: clinic && clinic._id,\\n healthCenterId: healthCenter && healthCenter._id,\\n districtId: district && district._id,\\n month: month\\n }\\n );\\n }\\n}"},"reports_by_form_year_week_places":{"map":"// data record must adhere to property name of `week` or `week_number`\\nfunction(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.year &&\\n (doc.fields.week || doc.fields.week_number)) {\\n var year = parseInt(doc.fields.year, 10);\\n var week = parseInt(doc.fields.week || doc.fields.week_number, 10);\\n var clinic = doc.contact && doc.contact.parent;\\n var healthCenter = clinic && clinic.parent;\\n var district = healthCenter && healthCenter.parent;\\n emit(\\n [ doc.form, year, week ],\\n {\\n isValid: (doc.errors && doc.errors.length === 0),\\n clinicId: clinic && clinic._id,\\n healthCenterId: healthCenter && healthCenter._id,\\n districtId: district && district._id,\\n weekNumber: week\\n }\\n );\\n }\\n}"},"reports_by_form":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.form], doc.reported_date);\\n }\\n}","reduce":"function() {\\n return true;\\n}"},"reports_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'content\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, reportedDate) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, reportedDate);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, reportedDate);\\n }\\n };\\n\\n if (doc.type === \'data_record\' && doc.form) {\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], doc.reported_date);\\n });\\n if (doc.fields) {\\n Object.keys(doc.fields).forEach(function(key) {\\n emitField(key, doc.fields[key], doc.reported_date);\\n });\\n }\\n if (doc.contact && doc.contact._id) {\\n emitMaybe(\'contact:\' + doc.contact._id.toLowerCase(), doc.reported_date);\\n }\\n }\\n}"},"reports_by_place":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var place = doc.contact && doc.contact.parent;\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], doc.reported_date);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"reports_by_subject":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var emitField = function(obj, field) {\\n if (obj[field]) {\\n emit(obj[field], doc.reported_date);\\n }\\n };\\n\\n emitField(doc, \'patient_id\');\\n emitField(doc, \'place_id\');\\n emitField(doc, \'case_id\');\\n\\n if (doc.fields) {\\n emitField(doc.fields, \'patient_id\');\\n emitField(doc.fields, \'place_id\');\\n emitField(doc.fields, \'case_id\');\\n emitField(doc.fields, \'patient_uuid\');\\n emitField(doc.fields, \'place_uuid\');\\n }\\n }\\n}"},"reports_by_validity":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([!doc.errors || doc.errors.length === 0], doc.reported_date);\\n }\\n}"},"reports_by_verification":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.verified], doc.reported_date);\\n }\\n}"},"tasks_by_contact":{"map":"function(doc) {\\n if (doc.type === \'task\') {\\n var isTerminalState = [\'Cancelled\', \'Completed\', \'Failed\'].indexOf(doc.state) >= 0;\\n if (!isTerminalState) {\\n emit(\'owner-\' + (doc.owner || \'_unassigned\'));\\n }\\n\\n if (doc.requester) {\\n emit(\'requester-\' + doc.requester);\\n }\\n }\\n}"},"total_clinics_by_facility":{"map":"function(doc) {\\n var districtId = doc.parent && doc.parent.parent && doc.parent.parent._id;\\n if (doc.type === \'clinic\' || (doc.type === \'contact\' && districtId)) {\\n var healthCenterId = doc.parent && doc.parent._id;\\n emit([ districtId, healthCenterId, doc._id, 0 ]);\\n if (doc.contact && doc.contact._id) {\\n emit([ districtId, healthCenterId, doc._id, 1 ], { _id: doc.contact._id });\\n }\\n var index = 2;\\n var parent = doc.parent;\\n while(parent) {\\n if (parent._id) {\\n emit([ districtId, healthCenterId, doc._id, index++ ], { _id: parent._id });\\n }\\n parent = parent.parent;\\n }\\n }\\n}"},"visits_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var visited_date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n\\n // Is a visit report about a family\\n emit(visited_date, doc.fields.visited_contact_uuid);\\n }\\n}"}}}]');
+module.exports = JSON.parse('[{"validate_doc_update":"function(newDoc, oldDoc, userCtx) {\\n /*\\n LOCAL DOCUMENT VALIDATION\\n\\n This is for validating document structure, irrespective of authority, so it\\n can be run both on couchdb and pouchdb (where you are technically admin).\\n\\n For validations around authority check lib/validate_doc_update.js, which is\\n only run on the server.\\n */\\n\\n var _err = function(msg) {\\n throw({ forbidden: msg });\\n };\\n\\n /**\\n * Ensure that type=\'form\' documents are created with correctly formatted _id\\n * property.\\n */\\n var validateForm = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var form_id = id_parts.slice(1).join(\':\');\\n if (prefix !== \'form\') {\\n _err(\'_id property must be prefixed with \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (!form_id) {\\n _err(\'_id property must define a value after \\"form:\\". e.g. \\"form:registration\\"\');\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id property must be lower case. e.g. \\"form:registration\\"\');\\n }\\n };\\n\\n var validateUserSettings = function(newDoc) {\\n var id_parts = newDoc._id.split(\':\');\\n var prefix = id_parts[0];\\n var username = id_parts.slice(1).join(\':\');\\n var idExample = \' e.g. \\"org.couchdb.user:sally\\"\';\\n if (prefix !== \'org.couchdb.user\') {\\n _err(\'_id must be prefixed with \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (!username) {\\n _err(\'_id must define a value after \\"org.couchdb.user:\\".\' + idExample);\\n }\\n if (newDoc._id !== newDoc._id.toLowerCase()) {\\n _err(\'_id must be lower case.\' + idExample);\\n }\\n if (typeof newDoc.name === \'undefined\' || newDoc.name !== username) {\\n _err(\'name property must be equivalent to username.\' + idExample);\\n }\\n if (newDoc.name.toLowerCase() !== username.toLowerCase()) {\\n _err(\'name must be equivalent to username\');\\n }\\n if (typeof newDoc.known !== \'undefined\' && typeof newDoc.known !== \'boolean\') {\\n _err(\'known is not a boolean.\');\\n }\\n if (typeof newDoc.roles !== \'object\') {\\n _err(\'roles is a required array\');\\n }\\n };\\n\\n if (userCtx.facility_id === newDoc._id) {\\n _err(\'You are not authorized to edit your own place\');\\n }\\n if (newDoc.type === \'form\') {\\n validateForm(newDoc);\\n }\\n if (newDoc.type === \'user-settings\') {\\n validateUserSettings(newDoc);\\n }\\n\\n log(\\n \'medic-client validate_doc_update passed for User \\"\' + userCtx.name +\\n \'\\" changing document \\"\' + newDoc._id + \'\\"\'\\n );\\n}","_id":"_design/medic-client","views":{"contacts_by_last_visited":{"map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n if (typeof date !== \'number\' || isNaN(date)) {\\n date = 0;\\n }\\n // Is a visit report about a family\\n emit(doc.fields.visited_contact_uuid, date);\\n } else if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n // Is a contact type\\n emit(doc._id, 0);\\n }\\n}","reduce":"_stats"},"contacts_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], order);\\n });\\n }\\n}"},"contacts_by_parent":{"map":"function(doc) {\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'person\') {\\n var parentId = doc.parent && doc.parent._id;\\n if (parentId) {\\n emit([parentId, doc.contact_type || doc.type]);\\n }\\n }\\n}"},"contacts_by_reference":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n\\n if (doc.type === \'contact\' ||\\n doc.type === \'clinic\' ||\\n doc.type === \'health_center\' ||\\n doc.type === \'district_hospital\' ||\\n doc.type === \'national_office\' ||\\n doc.type === \'person\') {\\n\\n var emitReference = function(prefix, key) {\\n if (tombstone) {\\n prefix = \'tombstone-\' + prefix;\\n }\\n emit([ prefix, String(key) ], doc.reported_date);\\n };\\n\\n if (doc.place_id) {\\n emitReference(\'shortcode\', doc.place_id);\\n }\\n if (doc.patient_id) {\\n emitReference(\'shortcode\', doc.patient_id);\\n }\\n if (doc.simprints_id) {\\n emitReference(\'simprints\', doc.simprints_id);\\n }\\n if (doc.rc_code) {\\n // need String because rewriter wraps everything in quotes\\n // keep refid case-insenstive since data is usually coming from SMS\\n emitReference(\'external\', String(doc.rc_code).toUpperCase());\\n }\\n }\\n}"},"contacts_by_type_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'geolocation\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(type, key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([ type, key ], value);\\n }\\n };\\n\\n var emitField = function(type, key, value, order) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(type, word, order);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(type, key + \':\' + value, order);\\n }\\n };\\n\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n Object.keys(doc).forEach(function(key) {\\n emitField(type, key, doc[key], order);\\n });\\n }\\n}"},"contacts_by_place":{"map":"function(doc) {\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n if (doc.type === \'contact\') {\\n idx = types.indexOf(doc.contact_type);\\n if (idx === -1) {\\n idx = doc.contact_type;\\n }\\n } else {\\n idx = types.indexOf(doc.type);\\n }\\n if (idx !== -1) {\\n var place = doc.parent;\\n var order = idx + \' \' + (doc.name && doc.name.toLowerCase());\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], order);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"data_records_by_type":{"reduce":"_count","map":"function(doc) {\\n if (doc.type === \'data_record\') {\\n emit(doc.form ? \'report\' : \'message\');\\n }\\n}"},"contacts_by_phone":{"map":"function(doc) {\\n if (doc.phone) {\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n if (types.indexOf(doc.type) !== -1) {\\n emit(doc.phone);\\n }\\n }\\n}"},"contacts_by_type":{"map":"function(doc) {\\n var tombstone = false;\\n if (doc.type === \'tombstone\' && doc.tombstone) {\\n tombstone = true;\\n doc = doc.tombstone;\\n }\\n var types = [ \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n var idx;\\n var type;\\n if (doc.type === \'contact\') {\\n type = doc.contact_type;\\n idx = types.indexOf(type);\\n if (idx === -1) {\\n idx = type;\\n }\\n } else {\\n type = doc.type;\\n idx = types.indexOf(type);\\n }\\n if (tombstone) {\\n type = \'tombstone-\' + type;\\n }\\n if (idx !== -1) {\\n var dead = !!doc.date_of_death;\\n var muted = !!doc.muted;\\n var order = dead + \' \' + muted + \' \' + idx + \' \' + (doc.name && doc.name.toLowerCase());\\n emit([ type ], order);\\n }\\n}"},"doc_by_type":{"map":"function(doc) {\\n if (doc.type === \'translations\') {\\n emit([ \'translations\', doc.enabled ], {\\n code: doc.code,\\n name: doc.name\\n });\\n return;\\n }\\n emit([ doc.type ]);\\n}"},"messages_by_contact_date":{"map":"function(doc) {\\n\\n var emitMessage = function(doc, contact, phone) {\\n var id = (contact && contact._id) || phone || doc._id;\\n emit([ id, doc.reported_date ], {\\n id: doc._id,\\n date: doc.reported_date,\\n contact: contact && contact._id\\n });\\n };\\n\\n if (doc.type === \'data_record\' && !doc.form) {\\n if (doc.kujua_message && doc.tasks) {\\n // outgoing\\n doc.tasks.forEach(function(task) {\\n var message = task.messages && task.messages[0];\\n if(message) {\\n emitMessage(doc, message.contact, message.to);\\n }\\n });\\n } else if (doc.sms_message) {\\n // incoming\\n emitMessage(doc, doc.contact, doc.from);\\n }\\n }\\n}","reduce":"function(key, values) {\\n var latest = { date: 0 };\\n values.forEach(function(value) {\\n if (value.date > latest.date) {\\n latest = value;\\n }\\n });\\n return latest;\\n}"},"docs_by_id_lineage":{"map":"function(doc) {\\n\\n var emitLineage = function(contact, depth) {\\n while (contact && contact._id) {\\n emit([ doc._id, depth++ ], { _id: contact._id });\\n contact = contact.parent;\\n }\\n };\\n\\n var types = [ \'contact\', \'district_hospital\', \'health_center\', \'clinic\', \'person\' ];\\n\\n if (types.indexOf(doc.type) !== -1) {\\n // contact\\n emitLineage(doc, 0);\\n } else if (doc.type === \'data_record\' && doc.form) {\\n // report\\n emit([ doc._id, 0 ]);\\n emitLineage(doc.contact, 1);\\n }\\n}"},"reports_by_form_year_month_places":{"map":"// data record must adhere to property name of `month`\\nfunction(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.year &&\\n doc.fields.month) {\\n var year = parseInt(doc.fields.year, 10);\\n var month = parseInt(doc.fields.month, 10);\\n var clinic = doc.contact && doc.contact.parent;\\n var healthCenter = clinic && clinic.parent;\\n var district = healthCenter && healthCenter.parent;\\n emit(\\n [ doc.form, year, month ],\\n {\\n isValid: (doc.errors && doc.errors.length === 0),\\n clinicId: clinic && clinic._id,\\n healthCenterId: healthCenter && healthCenter._id,\\n districtId: district && district._id,\\n month: month\\n }\\n );\\n }\\n}"},"registered_patients":{"map":"// NB: This returns *registrations* for patients. If patients are created by\\n// means other then sending in a registration report (eg created in the UI)\\n// they will not show up in this view.\\n//\\n// For a view with all patients by their shortcode, use:\\n// medic/patient_by_patient_shortcode_id\\nfunction(doc) {\\n var patientId = doc.patient_id || (doc.fields && doc.fields.patient_id);\\n if (doc.form &&\\n doc.type === \'data_record\' &&\\n (!doc.errors || doc.errors.length === 0) &&\\n patientId) {\\n emit(String(patientId));\\n }\\n}"},"reports_by_form_year_week_places":{"map":"// data record must adhere to property name of `week` or `week_number`\\nfunction(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.year &&\\n (doc.fields.week || doc.fields.week_number)) {\\n var year = parseInt(doc.fields.year, 10);\\n var week = parseInt(doc.fields.week || doc.fields.week_number, 10);\\n var clinic = doc.contact && doc.contact.parent;\\n var healthCenter = clinic && clinic.parent;\\n var district = healthCenter && healthCenter.parent;\\n emit(\\n [ doc.form, year, week ],\\n {\\n isValid: (doc.errors && doc.errors.length === 0),\\n clinicId: clinic && clinic._id,\\n healthCenterId: healthCenter && healthCenter._id,\\n districtId: district && district._id,\\n weekNumber: week\\n }\\n );\\n }\\n}"},"reports_by_form":{"reduce":"function() {\\n return true;\\n}","map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.form], doc.reported_date);\\n }\\n}"},"reports_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.reported_date], doc.reported_date);\\n }\\n}"},"reports_by_place":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var place = doc.contact && doc.contact.parent;\\n while (place) {\\n if (place._id) {\\n emit([ place._id ], doc.reported_date);\\n }\\n place = place.parent;\\n }\\n }\\n}"},"reports_by_freetext":{"map":"function(doc) {\\n var skip = [ \'_id\', \'_rev\', \'type\', \'refid\', \'content\' ];\\n\\n var usedKeys = [];\\n var emitMaybe = function(key, value) {\\n if (usedKeys.indexOf(key) === -1 && // Not already used\\n key.length > 2 // Not too short\\n ) {\\n usedKeys.push(key);\\n emit([key], value);\\n }\\n };\\n\\n var emitField = function(key, value, reportedDate) {\\n if (!key || !value) {\\n return;\\n }\\n key = key.toLowerCase();\\n if (skip.indexOf(key) !== -1 || /_date$/.test(key)) {\\n return;\\n }\\n if (typeof value === \'string\') {\\n value = value.toLowerCase();\\n value.split(/\\\\s+/).forEach(function(word) {\\n emitMaybe(word, reportedDate);\\n });\\n }\\n if (typeof value === \'number\' || typeof value === \'string\') {\\n emitMaybe(key + \':\' + value, reportedDate);\\n }\\n };\\n\\n if (doc.type === \'data_record\' && doc.form) {\\n Object.keys(doc).forEach(function(key) {\\n emitField(key, doc[key], doc.reported_date);\\n });\\n if (doc.fields) {\\n Object.keys(doc.fields).forEach(function(key) {\\n emitField(key, doc.fields[key], doc.reported_date);\\n });\\n }\\n if (doc.contact && doc.contact._id) {\\n emitMaybe(\'contact:\' + doc.contact._id.toLowerCase(), doc.reported_date);\\n }\\n }\\n}"},"reports_by_subject":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n var emitField = function(obj, field) {\\n if (obj[field]) {\\n emit(obj[field], doc.reported_date);\\n }\\n };\\n\\n emitField(doc, \'patient_id\');\\n emitField(doc, \'place_id\');\\n emitField(doc, \'case_id\');\\n\\n if (doc.fields) {\\n emitField(doc.fields, \'patient_id\');\\n emitField(doc.fields, \'place_id\');\\n emitField(doc.fields, \'case_id\');\\n emitField(doc.fields, \'patient_uuid\');\\n emitField(doc.fields, \'place_uuid\');\\n }\\n }\\n}"},"reports_by_verification":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([doc.verified], doc.reported_date);\\n }\\n}"},"tasks_by_contact":{"map":"function(doc) {\\n if (doc.type === \'task\') {\\n var isTerminalState = [\'Cancelled\', \'Completed\', \'Failed\'].indexOf(doc.state) >= 0;\\n if (!isTerminalState) {\\n emit(\'owner-\' + (doc.owner || \'_unassigned\'));\\n }\\n\\n if (doc.requester) {\\n emit(\'requester-\' + doc.requester);\\n }\\n }\\n}"},"reports_by_validity":{"map":"function(doc) {\\n if (doc.type === \'data_record\' && doc.form) {\\n emit([!doc.errors || doc.errors.length === 0], doc.reported_date);\\n }\\n}"},"total_clinics_by_facility":{"map":"function(doc) {\\n var districtId = doc.parent && doc.parent.parent && doc.parent.parent._id;\\n if (doc.type === \'clinic\' || (doc.type === \'contact\' && districtId)) {\\n var healthCenterId = doc.parent && doc.parent._id;\\n emit([ districtId, healthCenterId, doc._id, 0 ]);\\n if (doc.contact && doc.contact._id) {\\n emit([ districtId, healthCenterId, doc._id, 1 ], { _id: doc.contact._id });\\n }\\n var index = 2;\\n var parent = doc.parent;\\n while(parent) {\\n if (parent._id) {\\n emit([ districtId, healthCenterId, doc._id, index++ ], { _id: parent._id });\\n }\\n parent = parent.parent;\\n }\\n }\\n}"},"visits_by_date":{"map":"function(doc) {\\n if (doc.type === \'data_record\' &&\\n doc.form &&\\n doc.fields &&\\n doc.fields.visited_contact_uuid) {\\n\\n var visited_date = doc.fields.visited_date ? Date.parse(doc.fields.visited_date) : doc.reported_date;\\n\\n // Is a visit report about a family\\n emit(visited_date, doc.fields.visited_contact_uuid);\\n }\\n}"}}}]');
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/af.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/af.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/src/index.js":
+/*!*******************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/src/index.js ***!
+ \*******************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Afrikaans [af]
-//! author : Werner Mollentze : https://github.com/wernerm
+const moment = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+const normalizeStartDate = (intervalStartDate) => {
+ intervalStartDate = parseInt(intervalStartDate);
- //! moment.js locale configuration
+ if (isNaN(intervalStartDate) || intervalStartDate <= 0 || intervalStartDate > 31) {
+ intervalStartDate = 1;
+ }
- var af = moment.defineLocale('af', {
- months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(
- '_'
- ),
- monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
- weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(
- '_'
- ),
- weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
- weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
- meridiemParse: /vm|nm/i,
- isPM: function (input) {
- return /^nm$/i.test(input);
- },
- meridiem: function (hours, minutes, isLower) {
- if (hours < 12) {
- return isLower ? 'vm' : 'VM';
- } else {
- return isLower ? 'nm' : 'NM';
- }
- },
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Vandag om] LT',
- nextDay: '[Môre om] LT',
- nextWeek: 'dddd [om] LT',
- lastDay: '[Gister om] LT',
- lastWeek: '[Laas] dddd [om] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'oor %s',
- past: '%s gelede',
- s: "'n paar sekondes",
- ss: '%d sekondes',
- m: "'n minuut",
- mm: '%d minute',
- h: "'n uur",
- hh: '%d ure',
- d: "'n dag",
- dd: '%d dae',
- M: "'n maand",
- MM: '%d maande',
- y: "'n jaar",
- yy: '%d jaar',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
- ordinal: function (number) {
- return (
- number +
- (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
- ); // Thanks to Joris Röling : https://github.com/jjupiter
- },
- week: {
- dow: 1, // Maandag is die eerste dag van die week.
- doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
- },
- });
+ return intervalStartDate;
+};
- return af;
+const getMinimumStartDate = (intervalStartDate, relativeDate) => {
+ return moment
+ .min(
+ relativeDate.clone().subtract(1, 'month').date(intervalStartDate).startOf('day'),
+ relativeDate.clone().startOf('month')
+ )
+ .valueOf();
+};
-})));
+const getMinimumEndDate = (intervalStartDate, nextMonth, relativeDate) => {
+ return moment
+ .min(
+ relativeDate.clone().add(nextMonth ? 1 : 0, 'month').date(intervalStartDate - 1).endOf('day'),
+ relativeDate.clone().add(nextMonth ? 1 : 0, 'month').endOf('month')
+ )
+ .valueOf();
+};
+const getInterval = (intervalStartDate, referenceDate = moment()) => {
+ intervalStartDate = normalizeStartDate(intervalStartDate);
+ if (intervalStartDate === 1) {
+ return {
+ start: referenceDate.startOf('month').valueOf(),
+ end: referenceDate.endOf('month').valueOf()
+ };
+ }
-/***/ }),
+ if (intervalStartDate <= referenceDate.date()) {
+ return {
+ start: referenceDate.date(intervalStartDate).startOf('day').valueOf(),
+ end: getMinimumEndDate(intervalStartDate, true, referenceDate)
+ };
+ }
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-dz.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-dz.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ return {
+ start: getMinimumStartDate(intervalStartDate, referenceDate),
+ end: getMinimumEndDate(intervalStartDate, false, referenceDate)
+ };
+};
-//! moment.js locale configuration
-//! locale : Arabic (Algeria) [ar-dz]
-//! author : Amine Roukh: https://github.com/Amine27
-//! author : Abdel Said: https://github.com/abdelsaid
-//! author : Ahmed Elkhatib
-//! author : forabi https://github.com/forabi
-//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem
+module.exports = {
+ // Returns the timestamps of the start and end of the current calendar interval
+ // @param {Number} [intervalStartDate=1] - day of month when interval starts (1 - 31)
+ //
+ // if `intervalStartDate` exceeds month's day count, the start/end of following/current month is returned
+ // f.e. `intervalStartDate` === 31 would generate next intervals :
+ // [12-31 -> 01-30], [01-31 -> 02-[28|29]], [03-01 -> 03-30], [03-31 -> 04-30], [05-01 -> 05-30], [05-31 - 06-30]
+ getCurrent: (intervalStartDate) => getInterval(intervalStartDate),
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ /**
+ * Returns the timestamps of the start and end of the a calendar interval that contains a reference date
+ * @param {Number} [intervalStartDate=1] - day of month when interval starts (1 - 31)
+ * @param {Number} timestamp - the reference date the interval should include
+ * @returns { start: number, end: number } - timestamps that define the calendar interval
+ */
+ getInterval: (intervalStartDate, timestamp) => getInterval(intervalStartDate, moment(timestamp)),
+};
- //! moment.js locale configuration
- var pluralForm = function (n) {
- return n === 0
- ? 0
- : n === 1
- ? 1
- : n === 2
- ? 2
- : n % 100 >= 3 && n % 100 <= 10
- ? 3
- : n % 100 >= 11
- ? 4
- : 5;
- },
- plurals = {
- s: [
- 'أقل من ثانية',
- 'ثانية واحدة',
- ['ثانيتان', 'ثانيتين'],
- '%d ثوان',
- '%d ثانية',
- '%d ثانية',
- ],
- m: [
- 'أقل من دقيقة',
- 'دقيقة واحدة',
- ['دقيقتان', 'دقيقتين'],
- '%d دقائق',
- '%d دقيقة',
- '%d دقيقة',
- ],
- h: [
- 'أقل من ساعة',
- 'ساعة واحدة',
- ['ساعتان', 'ساعتين'],
- '%d ساعات',
- '%d ساعة',
- '%d ساعة',
- ],
- d: [
- 'أقل من يوم',
- 'يوم واحد',
- ['يومان', 'يومين'],
- '%d أيام',
- '%d يومًا',
- '%d يوم',
- ],
- M: [
- 'أقل من شهر',
- 'شهر واحد',
- ['شهران', 'شهرين'],
- '%d أشهر',
- '%d شهرا',
- '%d شهر',
- ],
- y: [
- 'أقل من عام',
- 'عام واحد',
- ['عامان', 'عامين'],
- '%d أعوام',
- '%d عامًا',
- '%d عام',
- ],
- },
- pluralize = function (u) {
- return function (number, withoutSuffix, string, isFuture) {
- var f = pluralForm(number),
- str = plurals[u][pluralForm(number)];
- if (f === 2) {
- str = str[withoutSuffix ? 0 : 1];
- }
- return str.replace(/%d/i, number);
- };
- },
- months = [
- 'جانفي',
- 'فيفري',
- 'مارس',
- 'أفريل',
- 'ماي',
- 'جوان',
- 'جويلية',
- 'أوت',
- 'سبتمبر',
- 'أكتوبر',
- 'نوفمبر',
- 'ديسمبر',
- ];
+/***/ }),
- var arDz = moment.defineLocale('ar-dz', {
- months: months,
- monthsShort: months,
- weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'D/\u200FM/\u200FYYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- meridiemParse: /ص|م/,
- isPM: function (input) {
- return 'م' === input;
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 12) {
- return 'ص';
- } else {
- return 'م';
- }
- },
- calendar: {
- sameDay: '[اليوم عند الساعة] LT',
- nextDay: '[غدًا عند الساعة] LT',
- nextWeek: 'dddd [عند الساعة] LT',
- lastDay: '[أمس عند الساعة] LT',
- lastWeek: 'dddd [عند الساعة] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'بعد %s',
- past: 'منذ %s',
- s: pluralize('s'),
- ss: pluralize('s'),
- m: pluralize('m'),
- mm: pluralize('m'),
- h: pluralize('h'),
- hh: pluralize('h'),
- d: pluralize('d'),
- dd: pluralize('d'),
- M: pluralize('M'),
- MM: pluralize('M'),
- y: pluralize('y'),
- yy: pluralize('y'),
- },
- postformat: function (string) {
- return string.replace(/,/g, '،');
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/lineage/src/hydration.js":
+/*!*************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/lineage/src/hydration.js ***!
+ \*************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- return arDz;
+const _ = __webpack_require__(/*! lodash/core */ "./node_modules/lodash/core.js");
+_.uniq = __webpack_require__(/*! lodash/uniq */ "./node_modules/lodash/uniq.js");
+const utils = __webpack_require__(/*! ./utils */ "./node_modules/cht-core-3-10/shared-libs/lineage/src/utils.js");
-})));
+const deepCopy = obj => JSON.parse(JSON.stringify(obj));
+const selfAndParents = function(self) {
+ const parents = [];
+ let current = self;
+ while (current) {
+ if (parents.includes(current)) {
+ return parents;
+ }
-/***/ }),
+ parents.push(current);
+ current = current.parent;
+ }
+ return parents;
+};
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-kw.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-kw.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+const extractParentIds = current => selfAndParents(current)
+ .map(parent => parent._id)
+ .filter(id => id);
-//! moment.js locale configuration
-//! locale : Arabic (Kuwait) [ar-kw]
-//! author : Nusret Parlak: https://github.com/nusretparlak
+const getContactById = (contacts, id) => id && contacts.find(contact => contact && contact._id === id);
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+const getContactIds = (contacts) => {
+ const ids = [];
+ contacts.forEach(doc => {
+ if (!doc) {
+ return;
+ }
- //! moment.js locale configuration
+ const id = utils.getId(doc.contact);
+ id && ids.push(id);
- var arKw = moment.defineLocale('ar-kw', {
- months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
- '_'
- ),
- monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
- '_'
- ),
- weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[اليوم على الساعة] LT',
- nextDay: '[غدا على الساعة] LT',
- nextWeek: 'dddd [على الساعة] LT',
- lastDay: '[أمس على الساعة] LT',
- lastWeek: 'dddd [على الساعة] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'في %s',
- past: 'منذ %s',
- s: 'ثوان',
- ss: '%d ثانية',
- m: 'دقيقة',
- mm: '%d دقائق',
- h: 'ساعة',
- hh: '%d ساعات',
- d: 'يوم',
- dd: '%d أيام',
- M: 'شهر',
- MM: '%d أشهر',
- y: 'سنة',
- yy: '%d سنوات',
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 12, // The week that contains Jan 12th is the first week of the year.
- },
+ if (!utils.validLinkedDocs(doc)) {
+ return;
+ }
+ Object.keys(doc.linked_docs).forEach(key => {
+ const id = utils.getId(doc.linked_docs[key]);
+ id && ids.push(id);
});
+ });
- return arKw;
+ return _.uniq(ids);
+};
-})));
+module.exports = function(Promise, DB) {
+ const fillParentsInDocs = function(doc, lineage) {
+ if (!doc || !lineage.length) {
+ return doc;
+ }
+ // Parent hierarchy starts at the contact for data_records
+ let currentParent;
+ if (utils.isReport(doc)) {
+ currentParent = doc.contact = lineage.shift() || doc.contact;
+ } else {
+ // It's a contact
+ currentParent = doc;
+ }
-/***/ }),
+ const parentIds = extractParentIds(currentParent.parent);
+ lineage.forEach(function(l, i) {
+ currentParent.parent = l ? deepCopy(l) : { _id: parentIds[i] };
+ currentParent = currentParent.parent;
+ });
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-ly.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-ly.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ return doc;
+ };
-//! moment.js locale configuration
-//! locale : Arabic (Lybia) [ar-ly]
-//! author : Ali Hmer: https://github.com/kikoanis
+ const fillContactsInDocs = function(docs, contacts) {
+ if (!contacts || !contacts.length) {
+ return;
+ }
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ docs.forEach(function(doc) {
+ if (!doc) {
+ return;
+ }
+ const id = utils.getId(doc.contact);
+ const contactDoc = getContactById(contacts, id);
+ if (contactDoc) {
+ doc.contact = deepCopy(contactDoc);
+ }
- //! moment.js locale configuration
+ if (!utils.validLinkedDocs(doc)) {
+ return;
+ }
- var symbolMap = {
- '1': '1',
- '2': '2',
- '3': '3',
- '4': '4',
- '5': '5',
- '6': '6',
- '7': '7',
- '8': '8',
- '9': '9',
- '0': '0',
- },
- pluralForm = function (n) {
- return n === 0
- ? 0
- : n === 1
- ? 1
- : n === 2
- ? 2
- : n % 100 >= 3 && n % 100 <= 10
- ? 3
- : n % 100 >= 11
- ? 4
- : 5;
- },
- plurals = {
- s: [
- 'أقل من ثانية',
- 'ثانية واحدة',
- ['ثانيتان', 'ثانيتين'],
- '%d ثوان',
- '%d ثانية',
- '%d ثانية',
- ],
- m: [
- 'أقل من دقيقة',
- 'دقيقة واحدة',
- ['دقيقتان', 'دقيقتين'],
- '%d دقائق',
- '%d دقيقة',
- '%d دقيقة',
- ],
- h: [
- 'أقل من ساعة',
- 'ساعة واحدة',
- ['ساعتان', 'ساعتين'],
- '%d ساعات',
- '%d ساعة',
- '%d ساعة',
- ],
- d: [
- 'أقل من يوم',
- 'يوم واحد',
- ['يومان', 'يومين'],
- '%d أيام',
- '%d يومًا',
- '%d يوم',
- ],
- M: [
- 'أقل من شهر',
- 'شهر واحد',
- ['شهران', 'شهرين'],
- '%d أشهر',
- '%d شهرا',
- '%d شهر',
- ],
- y: [
- 'أقل من عام',
- 'عام واحد',
- ['عامان', 'عامين'],
- '%d أعوام',
- '%d عامًا',
- '%d عام',
- ],
- },
- pluralize = function (u) {
- return function (number, withoutSuffix, string, isFuture) {
- var f = pluralForm(number),
- str = plurals[u][pluralForm(number)];
- if (f === 2) {
- str = str[withoutSuffix ? 0 : 1];
- }
- return str.replace(/%d/i, number);
- };
- },
- months = [
- 'يناير',
- 'فبراير',
- 'مارس',
- 'أبريل',
- 'مايو',
- 'يونيو',
- 'يوليو',
- 'أغسطس',
- 'سبتمبر',
- 'أكتوبر',
- 'نوفمبر',
- 'ديسمبر',
- ];
+ Object.keys(doc.linked_docs).forEach(key => {
+ const id = utils.getId(doc.linked_docs[key]);
+ const contactDoc = getContactById(contacts, id);
+ if (contactDoc) {
+ doc.linked_docs[key] = deepCopy(contactDoc);
+ }
+ });
+ });
+ };
- var arLy = moment.defineLocale('ar-ly', {
- months: months,
- monthsShort: months,
- weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'D/\u200FM/\u200FYYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- meridiemParse: /ص|م/,
- isPM: function (input) {
- return 'م' === input;
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 12) {
- return 'ص';
- } else {
- return 'م';
- }
- },
- calendar: {
- sameDay: '[اليوم عند الساعة] LT',
- nextDay: '[غدًا عند الساعة] LT',
- nextWeek: 'dddd [عند الساعة] LT',
- lastDay: '[أمس عند الساعة] LT',
- lastWeek: 'dddd [عند الساعة] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'بعد %s',
- past: 'منذ %s',
- s: pluralize('s'),
- ss: pluralize('s'),
- m: pluralize('m'),
- mm: pluralize('m'),
- h: pluralize('h'),
- hh: pluralize('h'),
- d: pluralize('d'),
- dd: pluralize('d'),
- M: pluralize('M'),
- MM: pluralize('M'),
- y: pluralize('y'),
- yy: pluralize('y'),
- },
- preparse: function (string) {
- return string.replace(/،/g, ',');
- },
- postformat: function (string) {
- return string
- .replace(/\d/g, function (match) {
- return symbolMap[match];
- })
- .replace(/,/g, '،');
- },
- week: {
- dow: 6, // Saturday is the first day of the week.
- doy: 12, // The week that contains Jan 12th is the first week of the year.
- },
+ const fetchContacts = function(lineage) {
+ const contactIds = getContactIds(lineage);
+
+ // Only fetch docs that are new to us
+ const lineageContacts = [];
+ const contactsToFetch = [];
+ contactIds.forEach(function(id) {
+ const contact = getContactById(lineage, id);
+ if (contact) {
+ lineageContacts.push(deepCopy(contact));
+ } else {
+ contactsToFetch.push(id);
+ }
});
- return arLy;
+ return fetchDocs(contactsToFetch)
+ .then(function(fetchedContacts) {
+ return lineageContacts.concat(fetchedContacts);
+ });
+ };
-})));
+ const mergeLineagesIntoDoc = function(lineage, contacts, patientLineage, placeLineage) {
+ const doc = lineage.shift();
+ fillParentsInDocs(doc, lineage);
+ if (patientLineage && patientLineage.length) {
+ const patientDoc = patientLineage.shift();
+ fillParentsInDocs(patientDoc, patientLineage);
+ doc.patient = patientDoc;
+ }
-/***/ }),
+ if (placeLineage && placeLineage.length) {
+ const placeDoc = placeLineage.shift();
+ fillParentsInDocs(placeDoc, placeLineage);
+ doc.place = placeDoc;
+ }
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-ma.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-ma.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ return doc;
+ };
-//! moment.js locale configuration
-//! locale : Arabic (Morocco) [ar-ma]
-//! author : ElFadili Yassine : https://github.com/ElFadiliY
-//! author : Abdel Said : https://github.com/abdelsaid
+ /*
+ * @returns {Object} subjectMaps
+ * @returns {Map} subjectMaps.patientUuids - map with [k, v] pairs of [recordUuid, patientUuid]
+ * @returns {Map} subjectMaps.placeUuids - map with [k, v] pairs of [recordUuid, placeUuid]
+ */
+ const fetchSubjectsUuids = (records) => {
+ const shortcodes = [];
+ const recordToPlaceUuidMap = new Map();
+ const recordToPatientUuidMap = new Map();
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ records.forEach(record => {
+ if (!utils.isReport(record)) {
+ return;
+ }
- //! moment.js locale configuration
+ const patientId = utils.getPatientId(record);
+ const placeId = utils.getPlaceId(record);
+ recordToPatientUuidMap.set(record._id, patientId);
+ recordToPlaceUuidMap.set(record._id, placeId);
- var arMa = moment.defineLocale('ar-ma', {
- months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
- '_'
- ),
- monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(
- '_'
- ),
- weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[اليوم على الساعة] LT',
- nextDay: '[غدا على الساعة] LT',
- nextWeek: 'dddd [على الساعة] LT',
- lastDay: '[أمس على الساعة] LT',
- lastWeek: 'dddd [على الساعة] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'في %s',
- past: 'منذ %s',
- s: 'ثوان',
- ss: '%d ثانية',
- m: 'دقيقة',
- mm: '%d دقائق',
- h: 'ساعة',
- hh: '%d ساعات',
- d: 'يوم',
- dd: '%d أيام',
- M: 'شهر',
- MM: '%d أشهر',
- y: 'سنة',
- yy: '%d سنوات',
- },
- week: {
- dow: 6, // Saturday is the first day of the week.
- doy: 12, // The week that contains Jan 12th is the first week of the year.
- },
+ shortcodes.push(patientId, placeId);
});
- return arMa;
+ if (!shortcodes.some(shortcode => shortcode)) {
+ return Promise.resolve({ patientUuids: recordToPatientUuidMap, placeUuids: recordToPlaceUuidMap });
+ }
-})));
+ return contactUuidByShortcode(shortcodes).then(shortcodeToUuidMap => {
+ records.forEach(record => {
+ const patientShortcode = recordToPatientUuidMap.get(record._id);
+ recordToPatientUuidMap.set(record._id, shortcodeToUuidMap.get(patientShortcode));
+ const placeShortcode = recordToPlaceUuidMap.get(record._id);
+ recordToPlaceUuidMap.set(record._id, shortcodeToUuidMap.get(placeShortcode));
+ });
-/***/ }),
+ return { patientUuids: recordToPatientUuidMap, placeUuids: recordToPlaceUuidMap };
+ });
+ };
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-sa.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-sa.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ /*
+ * @returns {Object} lineages
+ * @returns {Array} lineages.patientLineage
+ * @returns {Array} lineages.placeLineage
+ */
+ const fetchSubjectLineage = (record) => {
+ if (!utils.isReport(record)) {
+ return Promise.resolve({ patientLineage: [], placeLineage: [] });
+ }
-//! moment.js locale configuration
-//! locale : Arabic (Saudi Arabia) [ar-sa]
-//! author : Suhail Alkowaileet : https://github.com/xsoh
+ const patientId = utils.getPatientId(record);
+ const placeId = utils.getPlaceId(record);
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ if (!patientId && !placeId) {
+ return Promise.resolve({ patientLineage: [], placeLineage: [] });
+ }
- //! moment.js locale configuration
+ return contactUuidByShortcode([patientId, placeId]).then((shortcodeToUuidMap) => {
+ const patientUuid = shortcodeToUuidMap.get(patientId);
+ const placeUuid = shortcodeToUuidMap.get(placeId);
- var symbolMap = {
- '1': '١',
- '2': '٢',
- '3': '٣',
- '4': '٤',
- '5': '٥',
- '6': '٦',
- '7': '٧',
- '8': '٨',
- '9': '٩',
- '0': '٠',
- },
- numberMap = {
- '١': '1',
- '٢': '2',
- '٣': '3',
- '٤': '4',
- '٥': '5',
- '٦': '6',
- '٧': '7',
- '٨': '8',
- '٩': '9',
- '٠': '0',
- };
+ return fetchLineageByIds([patientUuid, placeUuid]).then((lineages) => {
+ const patientLineage = lineages.find(lineage => lineage[0]._id === patientUuid) || [];
+ const placeLineage = lineages.find(lineage => lineage[0]._id === placeUuid) || [];
- var arSa = moment.defineLocale('ar-sa', {
- months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
- '_'
- ),
- monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
- '_'
- ),
- weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- meridiemParse: /ص|م/,
- isPM: function (input) {
- return 'م' === input;
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 12) {
- return 'ص';
- } else {
- return 'م';
- }
- },
- calendar: {
- sameDay: '[اليوم على الساعة] LT',
- nextDay: '[غدا على الساعة] LT',
- nextWeek: 'dddd [على الساعة] LT',
- lastDay: '[أمس على الساعة] LT',
- lastWeek: 'dddd [على الساعة] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'في %s',
- past: 'منذ %s',
- s: 'ثوان',
- ss: '%d ثانية',
- m: 'دقيقة',
- mm: '%d دقائق',
- h: 'ساعة',
- hh: '%d ساعات',
- d: 'يوم',
- dd: '%d أيام',
- M: 'شهر',
- MM: '%d أشهر',
- y: 'سنة',
- yy: '%d سنوات',
- },
- preparse: function (string) {
- return string
- .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
- return numberMap[match];
- })
- .replace(/،/g, ',');
- },
- postformat: function (string) {
- return string
- .replace(/\d/g, function (match) {
- return symbolMap[match];
- })
- .replace(/,/g, '،');
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6, // The week that contains Jan 6th is the first week of the year.
- },
+ return { patientLineage, placeLineage };
+ });
});
+ };
- return arSa;
-
-})));
-
-
-/***/ }),
-
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-tn.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-tn.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ /*
+ * @returns {Map} map with [k, v] pairs of [shortcode, uuid]
+ */
+ const contactUuidByShortcode = function(shortcodes) {
+ const keys = shortcodes
+ .filter(shortcode => shortcode)
+ .map(shortcode => [ 'shortcode', shortcode ]);
-//! moment.js locale configuration
-//! locale : Arabic (Tunisia) [ar-tn]
-//! author : Nader Toukabri : https://github.com/naderio
+ return DB.query('medic-client/contacts_by_reference', { keys })
+ .then(function(results) {
+ const findIdWithKey = key => {
+ const matchingRow = results.rows.find(row => row.key[1] === key);
+ return matchingRow && matchingRow.id;
+ };
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ return new Map(shortcodes.map(shortcode => ([ shortcode, findIdWithKey(shortcode) || shortcode, ])));
+ });
+ };
- //! moment.js locale configuration
+ const fetchLineageById = function(id) {
+ const options = {
+ startkey: [id],
+ endkey: [id, {}],
+ include_docs: true
+ };
+ return DB.query('medic-client/docs_by_id_lineage', options)
+ .then(function(result) {
+ return result.rows.map(function(row) {
+ return row.doc;
+ });
+ });
+ };
- var arTn = moment.defineLocale('ar-tn', {
- months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
- '_'
- ),
- monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(
- '_'
- ),
- weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[اليوم على الساعة] LT',
- nextDay: '[غدا على الساعة] LT',
- nextWeek: 'dddd [على الساعة] LT',
- lastDay: '[أمس على الساعة] LT',
- lastWeek: 'dddd [على الساعة] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'في %s',
- past: 'منذ %s',
- s: 'ثوان',
- ss: '%d ثانية',
- m: 'دقيقة',
- mm: '%d دقائق',
- h: 'ساعة',
- hh: '%d ساعات',
- d: 'يوم',
- dd: '%d أيام',
- M: 'شهر',
- MM: '%d أشهر',
- y: 'سنة',
- yy: '%d سنوات',
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
+ const fetchLineageByIds = function(ids) {
+ return fetchDocs(ids).then(function(docs) {
+ return hydrateDocs(docs).then(function(hydratedDocs) {
+ // Returning a list of docs just like fetchLineageById
+ const docsList = [];
+ hydratedDocs.forEach(function(hdoc) {
+ const docLineage = selfAndParents(hdoc);
+ docsList.push(docLineage);
+ });
+ return docsList;
+ });
});
+ };
- return arTn;
+ const fetchDoc = function(id) {
+ return DB.get(id)
+ .catch(function(err) {
+ if (err.status === 404) {
+ err.statusCode = 404;
+ }
+ throw err;
+ });
+ };
-})));
+ const fetchHydratedDoc = function(id, options = {}, callback) {
+ let lineage;
+ let patientLineage;
+ let placeLineage;
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ }
+ _.defaults(options, {
+ throwWhenMissingLineage: false,
+ });
-/***/ }),
+ return fetchLineageById(id)
+ .then(function(result) {
+ lineage = result;
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ if (lineage.length === 0) {
+ if (options.throwWhenMissingLineage) {
+ const err = new Error(`Document not found: ${id}`);
+ err.code = 404;
+ throw err;
+ } else {
+ // Not a doc that has lineage, just do a normal fetch.
+ return fetchDoc(id);
+ }
+ }
-//! moment.js locale configuration
-//! locale : Arabic [ar]
-//! author : Abdel Said: https://github.com/abdelsaid
-//! author : Ahmed Elkhatib
-//! author : forabi https://github.com/forabi
+ return fetchSubjectLineage(lineage[0])
+ .then((lineages = {}) => {
+ patientLineage = lineages.patientLineage;
+ placeLineage = lineages.placeLineage;
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ return fetchContacts(lineage.concat(patientLineage, placeLineage));
+ })
+ .then(function(contacts) {
+ fillContactsInDocs(lineage, contacts);
+ fillContactsInDocs(patientLineage, contacts);
+ fillContactsInDocs(placeLineage, contacts);
+ return mergeLineagesIntoDoc(lineage, contacts, patientLineage, placeLineage);
+ });
+ })
+ .then(function(result) {
+ if (callback) {
+ callback(null, result);
+ }
+ return result;
+ })
+ .catch(function(err) {
+ if (callback) {
+ callback(err);
+ } else {
+ throw err;
+ }
+ });
+ };
- //! moment.js locale configuration
+ // for data_records, include the first-level contact.
+ const collectParentIds = function(docs) {
+ const ids = [];
+ docs.forEach(function(doc) {
+ let parent = doc.parent;
+ if (utils.isReport(doc)) {
+ const contactId = utils.getId(doc.contact);
+ if (!contactId) {
+ return;
+ }
+ ids.push(contactId);
+ parent = doc.contact;
+ }
- var symbolMap = {
- '1': '١',
- '2': '٢',
- '3': '٣',
- '4': '٤',
- '5': '٥',
- '6': '٦',
- '7': '٧',
- '8': '٨',
- '9': '٩',
- '0': '٠',
- },
- numberMap = {
- '١': '1',
- '٢': '2',
- '٣': '3',
- '٤': '4',
- '٥': '5',
- '٦': '6',
- '٧': '7',
- '٨': '8',
- '٩': '9',
- '٠': '0',
- },
- pluralForm = function (n) {
- return n === 0
- ? 0
- : n === 1
- ? 1
- : n === 2
- ? 2
- : n % 100 >= 3 && n % 100 <= 10
- ? 3
- : n % 100 >= 11
- ? 4
- : 5;
- },
- plurals = {
- s: [
- 'أقل من ثانية',
- 'ثانية واحدة',
- ['ثانيتان', 'ثانيتين'],
- '%d ثوان',
- '%d ثانية',
- '%d ثانية',
- ],
- m: [
- 'أقل من دقيقة',
- 'دقيقة واحدة',
- ['دقيقتان', 'دقيقتين'],
- '%d دقائق',
- '%d دقيقة',
- '%d دقيقة',
- ],
- h: [
- 'أقل من ساعة',
- 'ساعة واحدة',
- ['ساعتان', 'ساعتين'],
- '%d ساعات',
- '%d ساعة',
- '%d ساعة',
- ],
- d: [
- 'أقل من يوم',
- 'يوم واحد',
- ['يومان', 'يومين'],
- '%d أيام',
- '%d يومًا',
- '%d يوم',
- ],
- M: [
- 'أقل من شهر',
- 'شهر واحد',
- ['شهران', 'شهرين'],
- '%d أشهر',
- '%d شهرا',
- '%d شهر',
- ],
- y: [
- 'أقل من عام',
- 'عام واحد',
- ['عامان', 'عامين'],
- '%d أعوام',
- '%d عامًا',
- '%d عام',
- ],
- },
- pluralize = function (u) {
- return function (number, withoutSuffix, string, isFuture) {
- var f = pluralForm(number),
- str = plurals[u][pluralForm(number)];
- if (f === 2) {
- str = str[withoutSuffix ? 0 : 1];
- }
- return str.replace(/%d/i, number);
- };
- },
- months = [
- 'يناير',
- 'فبراير',
- 'مارس',
- 'أبريل',
- 'مايو',
- 'يونيو',
- 'يوليو',
- 'أغسطس',
- 'سبتمبر',
- 'أكتوبر',
- 'نوفمبر',
- 'ديسمبر',
- ];
+ ids.push(...extractParentIds(parent));
+ });
+ return _.uniq(ids);
+ };
- var ar = moment.defineLocale('ar', {
- months: months,
- monthsShort: months,
- weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'D/\u200FM/\u200FYYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- meridiemParse: /ص|م/,
- isPM: function (input) {
- return 'م' === input;
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 12) {
- return 'ص';
- } else {
- return 'م';
- }
- },
- calendar: {
- sameDay: '[اليوم عند الساعة] LT',
- nextDay: '[غدًا عند الساعة] LT',
- nextWeek: 'dddd [عند الساعة] LT',
- lastDay: '[أمس عند الساعة] LT',
- lastWeek: 'dddd [عند الساعة] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'بعد %s',
- past: 'منذ %s',
- s: pluralize('s'),
- ss: pluralize('s'),
- m: pluralize('m'),
- mm: pluralize('m'),
- h: pluralize('h'),
- hh: pluralize('h'),
- d: pluralize('d'),
- dd: pluralize('d'),
- M: pluralize('M'),
- MM: pluralize('M'),
- y: pluralize('y'),
- yy: pluralize('y'),
- },
- preparse: function (string) {
- return string
- .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
- return numberMap[match];
- })
- .replace(/،/g, ',');
- },
- postformat: function (string) {
- return string
- .replace(/\d/g, function (match) {
- return symbolMap[match];
- })
- .replace(/,/g, '،');
- },
- week: {
- dow: 6, // Saturday is the first day of the week.
- doy: 12, // The week that contains Jan 12th is the first week of the year.
- },
+ // for data_records, doesn't include the first-level contact (it counts as a parent).
+ const collectLeafContactIds = function(partiallyHydratedDocs) {
+ const ids = [];
+ partiallyHydratedDocs.forEach(function(doc) {
+ const startLineageFrom = utils.isReport(doc) ? doc.contact : doc;
+ ids.push(...getContactIds(selfAndParents(startLineageFrom)));
});
- return ar;
+ return _.uniq(ids);
+ };
-})));
+ const fetchDocs = function(ids) {
+ if (!ids || !ids.length) {
+ return Promise.resolve([]);
+ }
+ const keys = _.uniq(ids.filter(id => id));
+ if (keys.length === 0) {
+ return Promise.resolve([]);
+ }
+ return DB.allDocs({ keys, include_docs: true })
+ .then(function(results) {
+ return results.rows
+ .map(function(row) {
+ return row.doc;
+ })
+ .filter(function(doc) {
+ return !!doc;
+ });
+ });
+ };
-/***/ }),
+ const hydrateDocs = function(docs) {
+ if (!docs.length) {
+ return Promise.resolve([]);
+ }
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/az.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/az.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ const hydratedDocs = deepCopy(docs); // a copy of the original docs which we will incrementally hydrate and return
+ const knownDocs = [...hydratedDocs]; // an array of all documents which we have fetched
-//! moment.js locale configuration
-//! locale : Azerbaijani [az]
-//! author : topchiyev : https://github.com/topchiyev
+ let patientUuids; // a map of [k, v] pairs with [hydratedDocUuid, patientUuid]
+ let placeUuids; // a map of [k, v] pairs with [hydratedDocUuid, placeUuid]
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ return fetchSubjectsUuids(hydratedDocs)
+ .then((subjectMaps) => {
+ placeUuids = subjectMaps.placeUuids;
+ patientUuids = subjectMaps.patientUuids;
- //! moment.js locale configuration
+ return fetchDocs([...placeUuids.values(), ...patientUuids.values()]);
+ })
+ .then(subjects => {
+ knownDocs.push(...subjects);
- var suffixes = {
- 1: '-inci',
- 5: '-inci',
- 8: '-inci',
- 70: '-inci',
- 80: '-inci',
- 2: '-nci',
- 7: '-nci',
- 20: '-nci',
- 50: '-nci',
- 3: '-üncü',
- 4: '-üncü',
- 100: '-üncü',
- 6: '-ncı',
- 9: '-uncu',
- 10: '-uncu',
- 30: '-uncu',
- 60: '-ıncı',
- 90: '-ıncı',
- };
+ const firstRoundIdsToFetch = _.uniq([
+ ...collectParentIds(hydratedDocs),
+ ...collectLeafContactIds(hydratedDocs),
- var az = moment.defineLocale('az', {
- months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(
- '_'
- ),
- monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
- weekdays: 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(
- '_'
- ),
- weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
- weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[bugün saat] LT',
- nextDay: '[sabah saat] LT',
- nextWeek: '[gələn həftə] dddd [saat] LT',
- lastDay: '[dünən] LT',
- lastWeek: '[keçən həftə] dddd [saat] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s sonra',
- past: '%s əvvəl',
- s: 'birneçə saniyə',
- ss: '%d saniyə',
- m: 'bir dəqiqə',
- mm: '%d dəqiqə',
- h: 'bir saat',
- hh: '%d saat',
- d: 'bir gün',
- dd: '%d gün',
- M: 'bir ay',
- MM: '%d ay',
- y: 'bir il',
- yy: '%d il',
- },
- meridiemParse: /gecə|səhər|gündüz|axşam/,
- isPM: function (input) {
- return /^(gündüz|axşam)$/.test(input);
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 4) {
- return 'gecə';
- } else if (hour < 12) {
- return 'səhər';
- } else if (hour < 17) {
- return 'gündüz';
- } else {
- return 'axşam';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
- ordinal: function (number) {
- if (number === 0) {
- // special case for zero
- return number + '-ıncı';
- }
- var a = number % 10,
- b = (number % 100) - a,
- c = number >= 100 ? 100 : null;
- return number + (suffixes[a] || suffixes[b] || suffixes[c]);
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+ ...collectParentIds(subjects),
+ ...collectLeafContactIds(subjects),
+ ]);
- return az;
+ return fetchDocs(firstRoundIdsToFetch);
+ })
+ .then(function(firstRoundFetched) {
+ knownDocs.push(...firstRoundFetched);
+ const secondRoundIdsToFetch = collectLeafContactIds(firstRoundFetched)
+ .filter(id => !knownDocs.some(doc => doc._id === id));
+ return fetchDocs(secondRoundIdsToFetch);
+ })
+ .then(function(secondRoundFetched) {
+ knownDocs.push(...secondRoundFetched);
-})));
+ fillContactsInDocs(knownDocs, knownDocs);
+ hydratedDocs.forEach((doc) => {
+ const reconstructLineage = (docWithLineage, parents) => {
+ const parentIds = extractParentIds(docWithLineage);
+ return parentIds.map(id => {
+ // how can we use hashmaps?
+ return getContactById(parents, id);
+ });
+ };
+ const isReport = utils.isReport(doc);
+ const findParentsFor = isReport ? doc.contact : doc;
+ const lineage = reconstructLineage(findParentsFor, knownDocs);
-/***/ }),
+ if (isReport) {
+ lineage.unshift(doc);
+ }
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/be.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/be.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ const patientDoc = getContactById(knownDocs, patientUuids.get(doc._id));
+ const patientLineage = reconstructLineage(patientDoc, knownDocs);
-//! moment.js locale configuration
-//! locale : Belarusian [be]
-//! author : Dmitry Demidov : https://github.com/demidov91
-//! author: Praleska: http://praleska.pro/
-//! Author : Menelion Elensúle : https://github.com/Oire
+ const placeDoc = getContactById(knownDocs, placeUuids.get(doc._id));
+ const placeLineage = reconstructLineage(placeDoc, knownDocs);
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ mergeLineagesIntoDoc(lineage, knownDocs, patientLineage, placeLineage);
+ });
- //! moment.js locale configuration
+ return hydratedDocs;
+ });
+ };
- function plural(word, num) {
- var forms = word.split('_');
- return num % 10 === 1 && num % 100 !== 11
- ? forms[0]
- : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
- ? forms[1]
- : forms[2];
- }
- function relativeTimeWithPlural(number, withoutSuffix, key) {
- var format = {
- ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
- mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
- hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
- dd: 'дзень_дні_дзён',
- MM: 'месяц_месяцы_месяцаў',
- yy: 'год_гады_гадоў',
- };
- if (key === 'm') {
- return withoutSuffix ? 'хвіліна' : 'хвіліну';
- } else if (key === 'h') {
- return withoutSuffix ? 'гадзіна' : 'гадзіну';
- } else {
- return number + ' ' + plural(format[key], +number);
- }
+ const fetchHydratedDocs = docIds => {
+ if (!Array.isArray(docIds)) {
+ return Promise.reject(new Error('Invalid parameter: "docIds" must be an array'));
}
- var be = moment.defineLocale('be', {
- months: {
- format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(
- '_'
- ),
- standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(
- '_'
- ),
- },
- monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split(
- '_'
- ),
- weekdays: {
- format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(
- '_'
- ),
- standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(
- '_'
- ),
- isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/,
- },
- weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
- weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY г.',
- LLL: 'D MMMM YYYY г., HH:mm',
- LLLL: 'dddd, D MMMM YYYY г., HH:mm',
- },
- calendar: {
- sameDay: '[Сёння ў] LT',
- nextDay: '[Заўтра ў] LT',
- lastDay: '[Учора ў] LT',
- nextWeek: function () {
- return '[У] dddd [ў] LT';
- },
- lastWeek: function () {
- switch (this.day()) {
- case 0:
- case 3:
- case 5:
- case 6:
- return '[У мінулую] dddd [ў] LT';
- case 1:
- case 2:
- case 4:
- return '[У мінулы] dddd [ў] LT';
- }
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'праз %s',
- past: '%s таму',
- s: 'некалькі секунд',
- m: relativeTimeWithPlural,
- mm: relativeTimeWithPlural,
- h: relativeTimeWithPlural,
- hh: relativeTimeWithPlural,
- d: 'дзень',
- dd: relativeTimeWithPlural,
- M: 'месяц',
- MM: relativeTimeWithPlural,
- y: 'год',
- yy: relativeTimeWithPlural,
- },
- meridiemParse: /ночы|раніцы|дня|вечара/,
- isPM: function (input) {
- return /^(дня|вечара)$/.test(input);
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 4) {
- return 'ночы';
- } else if (hour < 12) {
- return 'раніцы';
- } else if (hour < 17) {
- return 'дня';
- } else {
- return 'вечара';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
- ordinal: function (number, period) {
- switch (period) {
- case 'M':
- case 'd':
- case 'DDD':
- case 'w':
- case 'W':
- return (number % 10 === 2 || number % 10 === 3) &&
- number % 100 !== 12 &&
- number % 100 !== 13
- ? number + '-і'
- : number + '-ы';
- case 'D':
- return number + '-га';
- default:
- return number;
- }
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+ if (!docIds.length) {
+ return Promise.resolve([]);
+ }
- return be;
+ if (docIds.length === 1) {
+ return fetchHydratedDoc(docIds[0])
+ .then(doc => [doc])
+ .catch(err => {
+ if (err.status === 404) {
+ return [];
+ }
-})));
+ throw err;
+ });
+ }
+ return DB
+ .allDocs({ keys: docIds, include_docs: true })
+ .then(result => {
+ const docs = result.rows.map(row => row.doc).filter(doc => doc);
+ return hydrateDocs(docs);
+ });
+ };
-/***/ }),
+ return {
+ /**
+ * Given a doc id get a doc and all parents, contact (and parents) and patient (and parents) and place (and parents)
+ * @param {String} id The id of the doc to fetch and hydrate
+ * @param {Object} [options] Options for the behavior of the hydration
+ * @param {Boolean} [options.throwWhenMissingLineage=false] When true, throw if the doc has nothing to hydrate.
+ * When false, does a best effort to return the document regardless of content.
+ * @returns {Promise} A promise to return the hydrated doc.
+ */
+ fetchHydratedDoc: (id, options, callback) => fetchHydratedDoc(id, options, callback),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bg.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bg.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ /**
+ * Given an array of ids, returns hydrated versions of every requested doc (using hydrateDocs or fetchHydratedDoc)
+ * If a doc is not found, it's simply excluded from the results list
+ * @param {Object[]} docs The array of docs to hydrate
+ * @returns {Promise} A promise to return the hydrated docs
+ */
+ fetchHydratedDocs: docIds => fetchHydratedDocs(docIds),
-//! moment.js locale configuration
-//! locale : Bulgarian [bg]
-//! author : Krasen Borisov : https://github.com/kraz
+ /**
+ * Given an array of docs bind the parents, contact (and parents) and patient (and parents) and place (and parents)
+ * @param {Object[]} docs The array of docs to hydrate
+ * @returns {Promise}
+ */
+ hydrateDocs: docs => hydrateDocs(docs),
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ fetchLineageById,
+ fetchLineageByIds,
+ fillContactsInDocs,
+ fillParentsInDocs,
+ fetchContacts,
+ };
+};
- //! moment.js locale configuration
- var bg = moment.defineLocale('bg', {
- months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(
- '_'
- ),
- monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
- weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(
- '_'
- ),
- weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
- weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'D.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY H:mm',
- LLLL: 'dddd, D MMMM YYYY H:mm',
- },
- calendar: {
- sameDay: '[Днес в] LT',
- nextDay: '[Утре в] LT',
- nextWeek: 'dddd [в] LT',
- lastDay: '[Вчера в] LT',
- lastWeek: function () {
- switch (this.day()) {
- case 0:
- case 3:
- case 6:
- return '[Миналата] dddd [в] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[Миналия] dddd [в] LT';
- }
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'след %s',
- past: 'преди %s',
- s: 'няколко секунди',
- ss: '%d секунди',
- m: 'минута',
- mm: '%d минути',
- h: 'час',
- hh: '%d часа',
- d: 'ден',
- dd: '%d дена',
- M: 'месец',
- MM: '%d месеца',
- y: 'година',
- yy: '%d години',
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
- ordinal: function (number) {
- var lastDigit = number % 10,
- last2Digits = number % 100;
- if (number === 0) {
- return number + '-ев';
- } else if (last2Digits === 0) {
- return number + '-ен';
- } else if (last2Digits > 10 && last2Digits < 20) {
- return number + '-ти';
- } else if (lastDigit === 1) {
- return number + '-ви';
- } else if (lastDigit === 2) {
- return number + '-ри';
- } else if (lastDigit === 7 || lastDigit === 8) {
- return number + '-ми';
- } else {
- return number + '-ти';
- }
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+/***/ }),
- return bg;
+/***/ "./node_modules/cht-core-3-10/shared-libs/lineage/src/index.js":
+/*!*********************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/lineage/src/index.js ***!
+ \*********************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-})));
+/**
+ * @module lineage
+ */
+module.exports = (Promise, DB) => Object.assign(
+ {},
+ __webpack_require__(/*! ./hydration */ "./node_modules/cht-core-3-10/shared-libs/lineage/src/hydration.js")(Promise, DB),
+ __webpack_require__(/*! ./minify */ "./node_modules/cht-core-3-10/shared-libs/lineage/src/minify.js")
+);
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bm.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bm.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/lineage/src/minify.js":
+/*!**********************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/lineage/src/minify.js ***!
+ \**********************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Bambara [bm]
-//! author : Estelle Comment : https://github.com/estellecomment
+const utils = __webpack_require__(/*! ./utils */ "./node_modules/cht-core-3-10/shared-libs/lineage/src/utils.js");
+const RECURSION_LIMIT = 50;
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+// Minifies things you would attach to another doc:
+// doc.parent = minify(doc.parent)
+// Not:
+// minify(doc)
+function minifyLineage(parent) {
+ if (!parent || !parent._id) {
+ return parent;
+ }
- //! moment.js locale configuration
+ const docId = parent._id;
+ const result = { _id: parent._id };
+ let minified = result;
+ for (let guard = RECURSION_LIMIT; parent.parent && parent.parent._id; --guard) {
+ if (guard === 0) {
+ throw Error(`Could not minify ${docId}, possible parent recursion.`);
+ }
- var bm = moment.defineLocale('bm', {
- months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(
- '_'
- ),
- monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),
- weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),
- weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),
- weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'MMMM [tile] D [san] YYYY',
- LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
- LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
- },
- calendar: {
- sameDay: '[Bi lɛrɛ] LT',
- nextDay: '[Sini lɛrɛ] LT',
- nextWeek: 'dddd [don lɛrɛ] LT',
- lastDay: '[Kunu lɛrɛ] LT',
- lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s kɔnɔ',
- past: 'a bɛ %s bɔ',
- s: 'sanga dama dama',
- ss: 'sekondi %d',
- m: 'miniti kelen',
- mm: 'miniti %d',
- h: 'lɛrɛ kelen',
- hh: 'lɛrɛ %d',
- d: 'tile kelen',
- dd: 'tile %d',
- M: 'kalo kelen',
- MM: 'kalo %d',
- y: 'san kelen',
- yy: 'san %d',
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+ minified.parent = { _id: parent.parent._id };
+ minified = minified.parent;
+ parent = parent.parent;
+ }
- return bm;
+ return result;
+}
-})));
+/**
+ * Remove all hyrdrated items and leave just the ids
+ * @param {Object} doc The doc to minify
+ */
+function minify(doc) {
+ if (!doc) {
+ return;
+ }
+ if (doc.parent) {
+ doc.parent = minifyLineage(doc.parent);
+ }
+ if (doc.contact && doc.contact._id) {
+ const miniContact = { _id: doc.contact._id };
+ if (doc.contact.parent) {
+ miniContact.parent = minifyLineage(doc.contact.parent);
+ }
+ doc.contact = miniContact;
+ }
+ if (doc.type === 'data_record') {
+ delete doc.patient;
+ delete doc.place;
+ }
+
+ if (utils.validLinkedDocs(doc)) {
+ Object.keys(doc.linked_docs).forEach(key => {
+ doc.linked_docs[key] = utils.getId(doc.linked_docs[key]);
+ });
+ }
+}
+
+module.exports = {
+ minify,
+ minifyLineage,
+};
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bn.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bn.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/lineage/src/utils.js":
+/*!*********************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/lineage/src/utils.js ***!
+ \*********************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Bengali [bn]
-//! author : Kaushik Gandhi : https://github.com/kaushikgandhi
+const contactTypeUtils = __webpack_require__(/*! @medic/contact-types-utils */ "./node_modules/cht-core-3-13/shared-libs/contact-types-utils/src/index.js");
+const _ = __webpack_require__(/*! lodash/core */ "./node_modules/lodash/core.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+const isContact = doc => {
+ if (!doc) {
+ return;
+ }
- //! moment.js locale configuration
+ return doc.type === 'contact' || contactTypeUtils.HARDCODED_TYPES.includes(doc.type);
+};
- var symbolMap = {
- '1': '১',
- '2': '২',
- '3': '৩',
- '4': '৪',
- '5': '৫',
- '6': '৬',
- '7': '৭',
- '8': '৮',
- '9': '৯',
- '0': '০',
- },
- numberMap = {
- '১': '1',
- '২': '2',
- '৩': '3',
- '৪': '4',
- '৫': '5',
- '৬': '6',
- '৭': '7',
- '৮': '8',
- '৯': '9',
- '০': '0',
- };
+const getId = (item) => item && (typeof item === 'string' ? item : item._id);
- var bn = moment.defineLocale('bn', {
- months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(
- '_'
- ),
- monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(
- '_'
- ),
- weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(
- '_'
- ),
- weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
- weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),
- longDateFormat: {
- LT: 'A h:mm সময়',
- LTS: 'A h:mm:ss সময়',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm সময়',
- LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',
- },
- calendar: {
- sameDay: '[আজ] LT',
- nextDay: '[আগামীকাল] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[গতকাল] LT',
- lastWeek: '[গত] dddd, LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s পরে',
- past: '%s আগে',
- s: 'কয়েক সেকেন্ড',
- ss: '%d সেকেন্ড',
- m: 'এক মিনিট',
- mm: '%d মিনিট',
- h: 'এক ঘন্টা',
- hh: '%d ঘন্টা',
- d: 'এক দিন',
- dd: '%d দিন',
- M: 'এক মাস',
- MM: '%d মাস',
- y: 'এক বছর',
- yy: '%d বছর',
- },
- preparse: function (string) {
- return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function (string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (
- (meridiem === 'রাত' && hour >= 4) ||
- (meridiem === 'দুপুর' && hour < 5) ||
- meridiem === 'বিকাল'
- ) {
- return hour + 12;
- } else {
- return hour;
- }
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 4) {
- return 'রাত';
- } else if (hour < 10) {
- return 'সকাল';
- } else if (hour < 17) {
- return 'দুপুর';
- } else if (hour < 20) {
- return 'বিকাল';
- } else {
- return 'রাত';
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6, // The week that contains Jan 6th is the first week of the year.
- },
- });
+// don't process linked docs for non-contact types
+// linked_docs property should be a key-value object
+const validLinkedDocs = doc => {
+ return isContact(doc) && _.isObject(doc.linked_docs) && !_.isArray(doc.linked_docs);
+};
- return bn;
+const isReport = (doc) => doc.type === 'data_record';
+const getPatientId = (doc) => (doc.fields && (doc.fields.patient_id || doc.fields.patient_uuid)) || doc.patient_id;
+const getPlaceId = (doc) => (doc.fields && doc.fields.place_id) || doc.place_id;
-})));
+
+module.exports = {
+ getId,
+ validLinkedDocs,
+ isReport,
+ getPatientId,
+ getPlaceId,
+};
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bo.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bo.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/src/index.js":
+/*!********************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/src/index.js ***!
+ \********************************************************************************/
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Tibetan [bo]
-//! author : Thupten N. Chakrishar : https://github.com/vajradog
+const uniq = __webpack_require__(/*! lodash/uniq */ "./node_modules/lodash/uniq.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+const formCodeMatches = (conf, form) => {
+ return (new RegExp('^[^a-z]*' + conf + '[^a-z]*$', 'i')).test(form);
+};
- //! moment.js locale configuration
+// Returns whether `doc` is a valid registration against a configuration
+// This is done by checks roughly similar to the `registration` transition filter function
+// Serves as a replacement for checking for `transitions` metadata within the doc itself
+exports.isValidRegistration = (doc, settings) => {
+ if (!doc ||
+ (doc.errors && doc.errors.length) ||
+ !settings ||
+ !settings.registrations ||
+ doc.type !== 'data_record' ||
+ !doc.form) {
+ return false;
+ }
- var symbolMap = {
- '1': '༡',
- '2': '༢',
- '3': '༣',
- '4': '༤',
- '5': '༥',
- '6': '༦',
- '7': '༧',
- '8': '༨',
- '9': '༩',
- '0': '༠',
- },
- numberMap = {
- '༡': '1',
- '༢': '2',
- '༣': '3',
- '༤': '4',
- '༥': '5',
- '༦': '6',
- '༧': '7',
- '༨': '8',
- '༩': '9',
- '༠': '0',
- };
+ // Registration transition should be configured for this form
+ const registrationConfiguration = settings.registrations.find((conf) => {
+ return conf &&
+ conf.form &&
+ formCodeMatches(conf.form, doc.form);
+ });
+ if (!registrationConfiguration) {
+ return false;
+ }
- var bo = moment.defineLocale('bo', {
- months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(
- '_'
- ),
- monthsShort: 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(
- '_'
- ),
- monthsShortRegex: /^(ཟླ་\d{1,2})/,
- monthsParseExact: true,
- weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(
- '_'
- ),
- weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(
- '_'
- ),
- weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),
- longDateFormat: {
- LT: 'A h:mm',
- LTS: 'A h:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm',
- LLLL: 'dddd, D MMMM YYYY, A h:mm',
- },
- calendar: {
- sameDay: '[དི་རིང] LT',
- nextDay: '[སང་ཉིན] LT',
- nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',
- lastDay: '[ཁ་སང] LT',
- lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s ལ་',
- past: '%s སྔན་ལ',
- s: 'ལམ་སང',
- ss: '%d སྐར་ཆ།',
- m: 'སྐར་མ་གཅིག',
- mm: '%d སྐར་མ',
- h: 'ཆུ་ཚོད་གཅིག',
- hh: '%d ཆུ་ཚོད',
- d: 'ཉིན་གཅིག',
- dd: '%d ཉིན་',
- M: 'ཟླ་བ་གཅིག',
- MM: '%d ཟླ་བ',
- y: 'ལོ་གཅིག',
- yy: '%d ལོ',
- },
- preparse: function (string) {
- return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function (string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (
- (meridiem === 'མཚན་མོ' && hour >= 4) ||
- (meridiem === 'ཉིན་གུང' && hour < 5) ||
- meridiem === 'དགོང་དག'
- ) {
- return hour + 12;
- } else {
- return hour;
- }
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 4) {
- return 'མཚན་མོ';
- } else if (hour < 10) {
- return 'ཞོགས་ཀས';
- } else if (hour < 17) {
- return 'ཉིན་གུང';
- } else if (hour < 20) {
- return 'དགོང་དག';
- } else {
- return 'མཚན་མོ';
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6, // The week that contains Jan 6th is the first week of the year.
- },
- });
+ if (doc.content_type === 'xml') {
+ return true;
+ }
- return bo;
+ // SMS forms need to be configured
+ const form = settings.forms && settings.forms[doc.form];
+ if (!form) {
+ return false;
+ }
-})));
+ // Require a known submitter or the form to be public.
+ return Boolean(form.public_form || doc.contact);
+};
+exports._formCodeMatches = formCodeMatches;
-/***/ }),
+const CONTACT_SUBJECT_PROPERTIES = ['_id', 'patient_id', 'place_id'];
+const REPORT_SUBJECT_PROPERTIES = ['patient_id', 'patient_uuid', 'place_id', 'place_uuid'];
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/br.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/br.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+exports.getSubjectIds = (doc) => {
+ const subjectIds = [];
-//! moment.js locale configuration
-//! locale : Breton [br]
-//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
+ if (!doc) {
+ return subjectIds;
+ }
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ if (doc.type === 'data_record') {
+ REPORT_SUBJECT_PROPERTIES.forEach(prop => {
+ if (doc[prop]) {
+ subjectIds.push(doc[prop]);
+ }
+ if (doc.fields && doc.fields[prop]) {
+ subjectIds.push(doc.fields[prop]);
+ }
+ });
+ } else {
+ CONTACT_SUBJECT_PROPERTIES.forEach(prop => {
+ if (doc[prop]) {
+ subjectIds.push(doc[prop]);
+ }
+ });
+ }
- //! moment.js locale configuration
+ return uniq(subjectIds);
+};
- function relativeTimeWithMutation(number, withoutSuffix, key) {
- var format = {
- mm: 'munutenn',
- MM: 'miz',
- dd: 'devezh',
- };
- return number + ' ' + mutation(format[key], number);
- }
- function specialMutationForYears(number) {
- switch (lastNumber(number)) {
- case 1:
- case 3:
- case 4:
- case 5:
- case 9:
- return number + ' bloaz';
- default:
- return number + ' vloaz';
- }
- }
- function lastNumber(number) {
- if (number > 9) {
- return lastNumber(number % 10);
- }
- return number;
+exports.getSubjectId = report => {
+ if (!report) {
+ return false;
+ }
+ for (const prop of REPORT_SUBJECT_PROPERTIES) {
+ if (report[prop]) {
+ return report[prop];
}
- function mutation(text, number) {
- if (number === 2) {
- return softMutation(text);
- }
- return text;
+ if (report.fields && report.fields[prop]) {
+ return report.fields[prop];
}
- function softMutation(text) {
- var mutationTable = {
- m: 'v',
- b: 'v',
- d: 'z',
- };
- if (mutationTable[text.charAt(0)] === undefined) {
- return text;
+ }
+};
+
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/arguments-extended/index.js":
+/*!******************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/arguments-extended/index.js ***!
+ \******************************************************************************************************/
+/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
+
+(function () {
+ "use strict";
+
+ function defineArgumentsExtended(extended, is) {
+
+ var pSlice = Array.prototype.slice,
+ isArguments = is.isArguments;
+
+ function argsToArray(args, slice) {
+ var i = -1, j = 0, l = args.length, ret = [];
+ slice = slice || 0;
+ i += slice;
+ while (++i < l) {
+ ret[j++] = args[i];
+ }
+ return ret;
}
- return mutationTable[text.charAt(0)] + text.substring(1);
- }
- var monthsParse = [
- /^gen/i,
- /^c[ʼ\']hwe/i,
- /^meu/i,
- /^ebr/i,
- /^mae/i,
- /^(mez|eve)/i,
- /^gou/i,
- /^eos/i,
- /^gwe/i,
- /^her/i,
- /^du/i,
- /^ker/i,
- ],
- monthsRegex = /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
- monthsStrictRegex = /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,
- monthsShortStrictRegex = /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,
- fullWeekdaysParse = [
- /^sul/i,
- /^lun/i,
- /^meurzh/i,
- /^merc[ʼ\']her/i,
- /^yaou/i,
- /^gwener/i,
- /^sadorn/i,
- ],
- shortWeekdaysParse = [
- /^Sul/i,
- /^Lun/i,
- /^Meu/i,
- /^Mer/i,
- /^Yao/i,
- /^Gwe/i,
- /^Sad/i,
- ],
- minWeekdaysParse = [
- /^Su/i,
- /^Lu/i,
- /^Me([^r]|$)/i,
- /^Mer/i,
- /^Ya/i,
- /^Gw/i,
- /^Sa/i,
- ];
- var br = moment.defineLocale('br', {
- months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(
- '_'
- ),
- monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
- weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),
- weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
- weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
- weekdaysParse: minWeekdaysParse,
- fullWeekdaysParse: fullWeekdaysParse,
- shortWeekdaysParse: shortWeekdaysParse,
- minWeekdaysParse: minWeekdaysParse,
+ return extended
+ .define(isArguments, {
+ toArray: argsToArray
+ })
+ .expose({
+ argsToArray: argsToArray
+ });
+ }
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- monthsStrictRegex: monthsStrictRegex,
- monthsShortStrictRegex: monthsShortStrictRegex,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
+ if (true) {
+ if ( true && module.exports) {
+ module.exports = defineArgumentsExtended(__webpack_require__(/*! extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extended/index.js"), __webpack_require__(/*! is-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/is-extended/index.js"));
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [a viz] MMMM YYYY',
- LLL: 'D [a viz] MMMM YYYY HH:mm',
- LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Hiziv da] LT',
- nextDay: '[Warcʼhoazh da] LT',
- nextWeek: 'dddd [da] LT',
- lastDay: '[Decʼh da] LT',
- lastWeek: 'dddd [paset da] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'a-benn %s',
- past: '%s ʼzo',
- s: 'un nebeud segondennoù',
- ss: '%d eilenn',
- m: 'ur vunutenn',
- mm: relativeTimeWithMutation,
- h: 'un eur',
- hh: '%d eur',
- d: 'un devezh',
- dd: relativeTimeWithMutation,
- M: 'ur miz',
- MM: relativeTimeWithMutation,
- y: 'ur bloaz',
- yy: specialMutationForYears,
- },
- dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
- ordinal: function (number) {
- var output = number === 1 ? 'añ' : 'vet';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn
- isPM: function (token) {
- return token === 'g.m.';
- },
- meridiem: function (hour, minute, isLower) {
- return hour < 12 ? 'a.m.' : 'g.m.';
- },
- });
+ }
+ } else {}
- return br;
+}).call(this);
-})));
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bs.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bs.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/array-extended/index.js":
+/*!**************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/array-extended/index.js ***!
+ \**************************************************************************************************/
+/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
-//! moment.js locale configuration
-//! locale : Bosnian [bs]
-//! author : Nedim Cholich : https://github.com/frontyard
-//! based on (hr) translation by Bojan Marković
+(function () {
+ "use strict";
+ /*global define*/
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ function defineArray(extended, is, args) {
- //! moment.js locale configuration
+ var isString = is.isString,
+ isArray = Array.isArray || is.isArray,
+ isDate = is.isDate,
+ floor = Math.floor,
+ abs = Math.abs,
+ mathMax = Math.max,
+ mathMin = Math.min,
+ arrayProto = Array.prototype,
+ arrayIndexOf = arrayProto.indexOf,
+ arrayForEach = arrayProto.forEach,
+ arrayMap = arrayProto.map,
+ arrayReduce = arrayProto.reduce,
+ arrayReduceRight = arrayProto.reduceRight,
+ arrayFilter = arrayProto.filter,
+ arrayEvery = arrayProto.every,
+ arraySome = arrayProto.some,
+ argsToArray = args.argsToArray;
- function translate(number, withoutSuffix, key) {
- var result = number + ' ';
- switch (key) {
- case 'ss':
- if (number === 1) {
- result += 'sekunda';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'sekunde';
- } else {
- result += 'sekundi';
- }
- return result;
- case 'm':
- return withoutSuffix ? 'jedna minuta' : 'jedne minute';
- case 'mm':
- if (number === 1) {
- result += 'minuta';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'minute';
- } else {
- result += 'minuta';
- }
- return result;
- case 'h':
- return withoutSuffix ? 'jedan sat' : 'jednog sata';
- case 'hh':
- if (number === 1) {
- result += 'sat';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'sata';
- } else {
- result += 'sati';
- }
- return result;
- case 'dd':
- if (number === 1) {
- result += 'dan';
- } else {
- result += 'dana';
- }
- return result;
- case 'MM':
- if (number === 1) {
- result += 'mjesec';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'mjeseca';
- } else {
- result += 'mjeseci';
- }
- return result;
- case 'yy':
- if (number === 1) {
- result += 'godina';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'godine';
- } else {
- result += 'godina';
+
+ function cross(num, cros) {
+ return reduceRight(cros, function (a, b) {
+ if (!isArray(b)) {
+ b = [b];
}
- return result;
+ b.unshift(num);
+ a.unshift(b);
+ return a;
+ }, []);
}
- }
- var bs = moment.defineLocale('bs', {
- months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(
- '_'
- ),
- monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
- '_'
- ),
- weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
- weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd, D. MMMM YYYY H:mm',
- },
- calendar: {
- sameDay: '[danas u] LT',
- nextDay: '[sutra u] LT',
- nextWeek: function () {
- switch (this.day()) {
- case 0:
- return '[u] [nedjelju] [u] LT';
- case 3:
- return '[u] [srijedu] [u] LT';
- case 6:
- return '[u] [subotu] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[u] dddd [u] LT';
- }
- },
- lastDay: '[jučer u] LT',
- lastWeek: function () {
- switch (this.day()) {
- case 0:
- case 3:
- return '[prošlu] dddd [u] LT';
- case 6:
- return '[prošle] [subote] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[prošli] dddd [u] LT';
+ function permute(num, cross, length) {
+ var ret = [];
+ for (var i = 0; i < cross.length; i++) {
+ ret.push([num].concat(rotate(cross, i)).slice(0, length));
+ }
+ return ret;
+ }
+
+
+ function intersection(a, b) {
+ var ret = [], aOne, i = -1, l;
+ l = a.length;
+ while (++i < l) {
+ aOne = a[i];
+ if (indexOf(b, aOne) !== -1) {
+ ret.push(aOne);
}
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'za %s',
- past: 'prije %s',
- s: 'par sekundi',
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: 'dan',
- dd: translate,
- M: 'mjesec',
- MM: translate,
- y: 'godinu',
- yy: translate,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+ }
+ return ret;
+ }
- return bs;
-})));
+ var _sort = (function () {
+ var isAll = function (arr, test) {
+ return every(arr, test);
+ };
-/***/ }),
+ var defaultCmp = function (a, b) {
+ return a - b;
+ };
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ca.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ca.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ var dateSort = function (a, b) {
+ return a.getTime() - b.getTime();
+ };
-//! moment.js locale configuration
-//! locale : Catalan [ca]
-//! author : Juan G. Hurtado : https://github.com/juanghurtado
+ return function _sort(arr, property) {
+ var ret = [];
+ if (isArray(arr)) {
+ ret = arr.slice();
+ if (property) {
+ if (typeof property === "function") {
+ ret.sort(property);
+ } else {
+ ret.sort(function (a, b) {
+ var aProp = a[property], bProp = b[property];
+ if (isString(aProp) && isString(bProp)) {
+ return aProp > bProp ? 1 : aProp < bProp ? -1 : 0;
+ } else if (isDate(aProp) && isDate(bProp)) {
+ return aProp.getTime() - bProp.getTime();
+ } else {
+ return aProp - bProp;
+ }
+ });
+ }
+ } else {
+ if (isAll(ret, isString)) {
+ ret.sort();
+ } else if (isAll(ret, isDate)) {
+ ret.sort(dateSort);
+ } else {
+ ret.sort(defaultCmp);
+ }
+ }
+ }
+ return ret;
+ };
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ })();
- //! moment.js locale configuration
+ function indexOf(arr, searchElement, from) {
+ var index = (from || 0) - 1,
+ length = arr.length;
+ while (++index < length) {
+ if (arr[index] === searchElement) {
+ return index;
+ }
+ }
+ return -1;
+ }
- var ca = moment.defineLocale('ca', {
- months: {
- standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(
- '_'
- ),
- format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split(
- '_'
- ),
- isFormat: /D[oD]?(\s)+MMMM/,
- },
- monthsShort: 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(
- '_'
- ),
- weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
- weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM [de] YYYY',
- ll: 'D MMM YYYY',
- LLL: 'D MMMM [de] YYYY [a les] H:mm',
- lll: 'D MMM YYYY, H:mm',
- LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',
- llll: 'ddd D MMM YYYY, H:mm',
- },
- calendar: {
- sameDay: function () {
- return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
- },
- nextDay: function () {
- return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
- },
- nextWeek: function () {
- return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
- },
- lastDay: function () {
- return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';
- },
- lastWeek: function () {
- return (
- '[el] dddd [passat a ' +
- (this.hours() !== 1 ? 'les' : 'la') +
- '] LT'
- );
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: "d'aquí %s",
- past: 'fa %s',
- s: 'uns segons',
- ss: '%d segons',
- m: 'un minut',
- mm: '%d minuts',
- h: 'una hora',
- hh: '%d hores',
- d: 'un dia',
- dd: '%d dies',
- M: 'un mes',
- MM: '%d mesos',
- y: 'un any',
- yy: '%d anys',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
- ordinal: function (number, period) {
- var output =
- number === 1
- ? 'r'
- : number === 2
- ? 'n'
- : number === 3
- ? 'r'
- : number === 4
- ? 't'
- : 'è';
- if (period === 'w' || period === 'W') {
- output = 'a';
+ function lastIndexOf(arr, searchElement, from) {
+ if (!isArray(arr)) {
+ throw new TypeError();
}
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
- return ca;
+ var t = Object(arr);
+ var len = t.length >>> 0;
+ if (len === 0) {
+ return -1;
+ }
-})));
+ var n = len;
+ if (arguments.length > 2) {
+ n = Number(arguments[2]);
+ if (n !== n) {
+ n = 0;
+ } else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) {
+ n = (n > 0 || -1) * floor(abs(n));
+ }
+ }
+ var k = n >= 0 ? mathMin(n, len - 1) : len - abs(n);
-/***/ }),
+ for (; k >= 0; k--) {
+ if (k in t && t[k] === searchElement) {
+ return k;
+ }
+ }
+ return -1;
+ }
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/cs.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/cs.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ function filter(arr, iterator, scope) {
+ if (arr && arrayFilter && arrayFilter === arr.filter) {
+ return arr.filter(iterator, scope);
+ }
+ if (!isArray(arr) || typeof iterator !== "function") {
+ throw new TypeError();
+ }
-//! moment.js locale configuration
-//! locale : Czech [cs]
-//! author : petrbela : https://github.com/petrbela
+ var t = Object(arr);
+ var len = t.length >>> 0;
+ var res = [];
+ for (var i = 0; i < len; i++) {
+ if (i in t) {
+ var val = t[i]; // in case fun mutates this
+ if (iterator.call(scope, val, i, t)) {
+ res.push(val);
+ }
+ }
+ }
+ return res;
+ }
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ function forEach(arr, iterator, scope) {
+ if (!isArray(arr) || typeof iterator !== "function") {
+ throw new TypeError();
+ }
+ if (arr && arrayForEach && arrayForEach === arr.forEach) {
+ arr.forEach(iterator, scope);
+ return arr;
+ }
+ for (var i = 0, len = arr.length; i < len; ++i) {
+ iterator.call(scope || arr, arr[i], i, arr);
+ }
- //! moment.js locale configuration
+ return arr;
+ }
- var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(
- '_'
- ),
- monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),
- monthsParse = [
- /^led/i,
- /^úno/i,
- /^bře/i,
- /^dub/i,
- /^kvě/i,
- /^(čvn|červen$|června)/i,
- /^(čvc|červenec|července)/i,
- /^srp/i,
- /^zář/i,
- /^říj/i,
- /^lis/i,
- /^pro/i,
- ],
- // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
- // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
- monthsRegex = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;
+ function every(arr, iterator, scope) {
+ if (arr && arrayEvery && arrayEvery === arr.every) {
+ return arr.every(iterator, scope);
+ }
+ if (!isArray(arr) || typeof iterator !== "function") {
+ throw new TypeError();
+ }
+ var t = Object(arr);
+ var len = t.length >>> 0;
+ for (var i = 0; i < len; i++) {
+ if (i in t && !iterator.call(scope, t[i], i, t)) {
+ return false;
+ }
+ }
+ return true;
+ }
- function plural(n) {
- return n > 1 && n < 5 && ~~(n / 10) !== 1;
- }
- function translate(number, withoutSuffix, key, isFuture) {
- var result = number + ' ';
- switch (key) {
- case 's': // a few seconds / in a few seconds / a few seconds ago
- return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';
- case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'sekundy' : 'sekund');
- } else {
- return result + 'sekundami';
+ function some(arr, iterator, scope) {
+ if (arr && arraySome && arraySome === arr.some) {
+ return arr.some(iterator, scope);
+ }
+ if (!isArray(arr) || typeof iterator !== "function") {
+ throw new TypeError();
+ }
+ var t = Object(arr);
+ var len = t.length >>> 0;
+ for (var i = 0; i < len; i++) {
+ if (i in t && iterator.call(scope, t[i], i, t)) {
+ return true;
}
- case 'm': // a minute / in a minute / a minute ago
- return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';
- case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'minuty' : 'minut');
- } else {
- return result + 'minutami';
+ }
+ return false;
+ }
+
+ function map(arr, iterator, scope) {
+ if (arr && arrayMap && arrayMap === arr.map) {
+ return arr.map(iterator, scope);
+ }
+ if (!isArray(arr) || typeof iterator !== "function") {
+ throw new TypeError();
+ }
+
+ var t = Object(arr);
+ var len = t.length >>> 0;
+ var res = [];
+ for (var i = 0; i < len; i++) {
+ if (i in t) {
+ res.push(iterator.call(scope, t[i], i, t));
}
- case 'h': // an hour / in an hour / an hour ago
- return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
- case 'hh': // 9 hours / in 9 hours / 9 hours ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'hodiny' : 'hodin');
- } else {
- return result + 'hodinami';
+ }
+ return res;
+ }
+
+ function reduce(arr, accumulator, curr) {
+ var initial = arguments.length > 2;
+ if (arr && arrayReduce && arrayReduce === arr.reduce) {
+ return initial ? arr.reduce(accumulator, curr) : arr.reduce(accumulator);
+ }
+ if (!isArray(arr) || typeof accumulator !== "function") {
+ throw new TypeError();
+ }
+ var i = 0, l = arr.length >> 0;
+ if (arguments.length < 3) {
+ if (l === 0) {
+ throw new TypeError("Array length is 0 and no second argument");
}
- case 'd': // a day / in a day / a day ago
- return withoutSuffix || isFuture ? 'den' : 'dnem';
- case 'dd': // 9 days / in 9 days / 9 days ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'dny' : 'dní');
- } else {
- return result + 'dny';
+ curr = arr[0];
+ i = 1; // start accumulating at the second element
+ } else {
+ curr = arguments[2];
+ }
+ while (i < l) {
+ if (i in arr) {
+ curr = accumulator.call(undefined, curr, arr[i], i, arr);
}
- case 'M': // a month / in a month / a month ago
- return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';
- case 'MM': // 9 months / in 9 months / 9 months ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'měsíce' : 'měsíců');
- } else {
- return result + 'měsíci';
+ ++i;
+ }
+ return curr;
+ }
+
+ function reduceRight(arr, accumulator, curr) {
+ var initial = arguments.length > 2;
+ if (arr && arrayReduceRight && arrayReduceRight === arr.reduceRight) {
+ return initial ? arr.reduceRight(accumulator, curr) : arr.reduceRight(accumulator);
+ }
+ if (!isArray(arr) || typeof accumulator !== "function") {
+ throw new TypeError();
+ }
+
+ var t = Object(arr);
+ var len = t.length >>> 0;
+
+ // no value to return if no initial value, empty array
+ if (len === 0 && arguments.length === 2) {
+ throw new TypeError();
+ }
+
+ var k = len - 1;
+ if (arguments.length >= 3) {
+ curr = arguments[2];
+ } else {
+ do {
+ if (k in arr) {
+ curr = arr[k--];
+ break;
+ }
}
- case 'y': // a year / in a year / a year ago
- return withoutSuffix || isFuture ? 'rok' : 'rokem';
- case 'yy': // 9 years / in 9 years / 9 years ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'roky' : 'let');
- } else {
- return result + 'lety';
+ while (true);
+ }
+ while (k >= 0) {
+ if (k in t) {
+ curr = accumulator.call(undefined, curr, t[k], k, t);
}
+ k--;
+ }
+ return curr;
}
- }
- var cs = moment.defineLocale('cs', {
- months: months,
- monthsShort: monthsShort,
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.
- // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.
- monthsStrictRegex: /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,
- monthsShortStrictRegex: /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
- weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
- weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd D. MMMM YYYY H:mm',
- l: 'D. M. YYYY',
- },
- calendar: {
- sameDay: '[dnes v] LT',
- nextDay: '[zítra v] LT',
- nextWeek: function () {
- switch (this.day()) {
- case 0:
- return '[v neděli v] LT';
- case 1:
- case 2:
- return '[v] dddd [v] LT';
- case 3:
- return '[ve středu v] LT';
- case 4:
- return '[ve čtvrtek v] LT';
- case 5:
- return '[v pátek v] LT';
- case 6:
- return '[v sobotu v] LT';
+
+ function toArray(o) {
+ var ret = [];
+ if (o !== null) {
+ var args = argsToArray(arguments);
+ if (args.length === 1) {
+ if (isArray(o)) {
+ ret = o;
+ } else if (is.isHash(o)) {
+ for (var i in o) {
+ if (o.hasOwnProperty(i)) {
+ ret.push([i, o[i]]);
+ }
+ }
+ } else {
+ ret.push(o);
+ }
+ } else {
+ forEach(args, function (a) {
+ ret = ret.concat(toArray(a));
+ });
}
- },
- lastDay: '[včera v] LT',
- lastWeek: function () {
- switch (this.day()) {
- case 0:
- return '[minulou neděli v] LT';
- case 1:
- case 2:
- return '[minulé] dddd [v] LT';
- case 3:
- return '[minulou středu v] LT';
- case 4:
- case 5:
- return '[minulý] dddd [v] LT';
- case 6:
- return '[minulou sobotu v] LT';
+ }
+ return ret;
+ }
+
+ function sum(array) {
+ array = array || [];
+ if (array.length) {
+ return reduce(array, function (a, b) {
+ return a + b;
+ });
+ } else {
+ return 0;
+ }
+ }
+
+ function avg(arr) {
+ arr = arr || [];
+ if (arr.length) {
+ var total = sum(arr);
+ if (is.isNumber(total)) {
+ return total / arr.length;
+ } else {
+ throw new Error("Cannot average an array of non numbers.");
}
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'za %s',
- past: 'před %s',
- s: translate,
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: translate,
- dd: translate,
- M: translate,
- MM: translate,
- y: translate,
- yy: translate,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+ } else {
+ return 0;
+ }
+ }
- return cs;
+ function sort(arr, cmp) {
+ return _sort(arr, cmp);
+ }
-})));
+ function min(arr, cmp) {
+ return _sort(arr, cmp)[0];
+ }
+ function max(arr, cmp) {
+ return _sort(arr, cmp)[arr.length - 1];
+ }
-/***/ }),
+ function difference(arr1) {
+ var ret = arr1, args = flatten(argsToArray(arguments, 1));
+ if (isArray(arr1)) {
+ ret = filter(arr1, function (a) {
+ return indexOf(args, a) === -1;
+ });
+ }
+ return ret;
+ }
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/cv.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/cv.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ function removeDuplicates(arr) {
+ var ret = [], i = -1, l, retLength = 0;
+ if (arr) {
+ l = arr.length;
+ while (++i < l) {
+ var item = arr[i];
+ if (indexOf(ret, item) === -1) {
+ ret[retLength++] = item;
+ }
+ }
+ }
+ return ret;
+ }
-//! moment.js locale configuration
-//! locale : Chuvash [cv]
-//! author : Anatoly Mironov : https://github.com/mirontoli
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ function unique(arr) {
+ return removeDuplicates(arr);
+ }
- //! moment.js locale configuration
- var cv = moment.defineLocale('cv', {
- months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(
- '_'
- ),
- monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
- weekdays: 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(
- '_'
- ),
- weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
- weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD-MM-YYYY',
- LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
- LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
- LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
- },
- calendar: {
- sameDay: '[Паян] LT [сехетре]',
- nextDay: '[Ыран] LT [сехетре]',
- lastDay: '[Ӗнер] LT [сехетре]',
- nextWeek: '[Ҫитес] dddd LT [сехетре]',
- lastWeek: '[Иртнӗ] dddd LT [сехетре]',
- sameElse: 'L',
- },
- relativeTime: {
- future: function (output) {
- var affix = /сехет$/i.exec(output)
- ? 'рен'
- : /ҫул$/i.exec(output)
- ? 'тан'
- : 'ран';
- return output + affix;
- },
- past: '%s каялла',
- s: 'пӗр-ик ҫеккунт',
- ss: '%d ҫеккунт',
- m: 'пӗр минут',
- mm: '%d минут',
- h: 'пӗр сехет',
- hh: '%d сехет',
- d: 'пӗр кун',
- dd: '%d кун',
- M: 'пӗр уйӑх',
- MM: '%d уйӑх',
- y: 'пӗр ҫул',
- yy: '%d ҫул',
- },
- dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
- ordinal: '%d-мӗш',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+ function rotate(arr, numberOfTimes) {
+ var ret = arr.slice();
+ if (typeof numberOfTimes !== "number") {
+ numberOfTimes = 1;
+ }
+ if (numberOfTimes && isArray(arr)) {
+ if (numberOfTimes > 0) {
+ ret.push(ret.shift());
+ numberOfTimes--;
+ } else {
+ ret.unshift(ret.pop());
+ numberOfTimes++;
+ }
+ return rotate(ret, numberOfTimes);
+ } else {
+ return ret;
+ }
+ }
- return cv;
+ function permutations(arr, length) {
+ var ret = [];
+ if (isArray(arr)) {
+ var copy = arr.slice(0);
+ if (typeof length !== "number") {
+ length = arr.length;
+ }
+ if (!length) {
+ ret = [
+ []
+ ];
+ } else if (length <= arr.length) {
+ ret = reduce(arr, function (a, b, i) {
+ var ret;
+ if (length > 1) {
+ ret = permute(b, rotate(copy, i).slice(1), length);
+ } else {
+ ret = [
+ [b]
+ ];
+ }
+ return a.concat(ret);
+ }, []);
+ }
+ }
+ return ret;
+ }
-})));
+ function zip() {
+ var ret = [];
+ var arrs = argsToArray(arguments);
+ if (arrs.length > 1) {
+ var arr1 = arrs.shift();
+ if (isArray(arr1)) {
+ ret = reduce(arr1, function (a, b, i) {
+ var curr = [b];
+ for (var j = 0; j < arrs.length; j++) {
+ var currArr = arrs[j];
+ if (isArray(currArr) && !is.isUndefined(currArr[i])) {
+ curr.push(currArr[i]);
+ } else {
+ curr.push(null);
+ }
+ }
+ a.push(curr);
+ return a;
+ }, []);
+ }
+ }
+ return ret;
+ }
+ function transpose(arr) {
+ var ret = [];
+ if (isArray(arr) && arr.length) {
+ var last;
+ forEach(arr, function (a) {
+ if (isArray(a) && (!last || a.length === last.length)) {
+ forEach(a, function (b, i) {
+ if (!ret[i]) {
+ ret[i] = [];
+ }
+ ret[i].push(b);
+ });
+ last = a;
+ }
+ });
+ }
+ return ret;
+ }
-/***/ }),
+ function valuesAt(arr, indexes) {
+ var ret = [];
+ indexes = argsToArray(arguments);
+ arr = indexes.shift();
+ if (isArray(arr) && indexes.length) {
+ for (var i = 0, l = indexes.length; i < l; i++) {
+ ret.push(arr[indexes[i]] || null);
+ }
+ }
+ return ret;
+ }
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/cy.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/cy.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ function union() {
+ var ret = [];
+ var arrs = argsToArray(arguments);
+ if (arrs.length > 1) {
+ for (var i = 0, l = arrs.length; i < l; i++) {
+ ret = ret.concat(arrs[i]);
+ }
+ ret = removeDuplicates(ret);
+ }
+ return ret;
+ }
-//! moment.js locale configuration
-//! locale : Welsh [cy]
-//! author : Robert Allen : https://github.com/robgallen
-//! author : https://github.com/ryangreaves
+ function intersect() {
+ var collect = [], sets, i = -1 , l;
+ if (arguments.length > 1) {
+ //assume we are intersections all the lists in the array
+ sets = argsToArray(arguments);
+ } else {
+ sets = arguments[0];
+ }
+ if (isArray(sets)) {
+ collect = sets[0];
+ i = 0;
+ l = sets.length;
+ while (++i < l) {
+ collect = intersection(collect, sets[i]);
+ }
+ }
+ return removeDuplicates(collect);
+ }
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ function powerSet(arr) {
+ var ret = [];
+ if (isArray(arr) && arr.length) {
+ ret = reduce(arr, function (a, b) {
+ var ret = map(a, function (c) {
+ return c.concat(b);
+ });
+ return a.concat(ret);
+ }, [
+ []
+ ]);
+ }
+ return ret;
+ }
- //! moment.js locale configuration
+ function cartesian(a, b) {
+ var ret = [];
+ if (isArray(a) && isArray(b) && a.length && b.length) {
+ ret = cross(a[0], b).concat(cartesian(a.slice(1), b));
+ }
+ return ret;
+ }
- var cy = moment.defineLocale('cy', {
- months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(
- '_'
- ),
- monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(
- '_'
- ),
- weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(
- '_'
- ),
- weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
- weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
- weekdaysParseExact: true,
- // time formats are the same as en-gb
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Heddiw am] LT',
- nextDay: '[Yfory am] LT',
- nextWeek: 'dddd [am] LT',
- lastDay: '[Ddoe am] LT',
- lastWeek: 'dddd [diwethaf am] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'mewn %s',
- past: '%s yn ôl',
- s: 'ychydig eiliadau',
- ss: '%d eiliad',
- m: 'munud',
- mm: '%d munud',
- h: 'awr',
- hh: '%d awr',
- d: 'diwrnod',
- dd: '%d diwrnod',
- M: 'mis',
- MM: '%d mis',
- y: 'blwyddyn',
- yy: '%d flynedd',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
- // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
- ordinal: function (number) {
- var b = number,
- output = '',
- lookup = [
- '',
- 'af',
- 'il',
- 'ydd',
- 'ydd',
- 'ed',
- 'ed',
- 'ed',
- 'fed',
- 'fed',
- 'fed', // 1af to 10fed
- 'eg',
- 'fed',
- 'eg',
- 'eg',
- 'fed',
- 'eg',
- 'eg',
- 'fed',
- 'eg',
- 'fed', // 11eg to 20fed
- ];
- if (b > 20) {
- if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
- output = 'fed'; // not 30ain, 70ain or 90ain
- } else {
- output = 'ain';
- }
- } else if (b > 0) {
- output = lookup[b];
+ function compact(arr) {
+ var ret = [];
+ if (isArray(arr) && arr.length) {
+ ret = filter(arr, function (item) {
+ return !is.isUndefinedOrNull(item);
+ });
}
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+ return ret;
+ }
- return cy;
+ function multiply(arr, times) {
+ times = is.isNumber(times) ? times : 1;
+ if (!times) {
+ //make sure times is greater than zero if it is zero then dont multiply it
+ times = 1;
+ }
+ arr = toArray(arr || []);
+ var ret = [], i = 0;
+ while (++i <= times) {
+ ret = ret.concat(arr);
+ }
+ return ret;
+ }
-})));
+ function flatten(arr) {
+ var set;
+ var args = argsToArray(arguments);
+ if (args.length > 1) {
+ //assume we are intersections all the lists in the array
+ set = args;
+ } else {
+ set = toArray(arr);
+ }
+ return reduce(set, function (a, b) {
+ return a.concat(b);
+ }, []);
+ }
+
+ function pluck(arr, prop) {
+ prop = prop.split(".");
+ var result = arr.slice(0);
+ forEach(prop, function (prop) {
+ var exec = prop.match(/(\w+)\(\)$/);
+ result = map(result, function (item) {
+ return exec ? item[exec[1]]() : item[prop];
+ });
+ });
+ return result;
+ }
+ function invoke(arr, func, args) {
+ args = argsToArray(arguments, 2);
+ return map(arr, function (item) {
+ var exec = isString(func) ? item[func] : func;
+ return exec.apply(item, args);
+ });
+ }
-/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/da.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/da.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ var array = {
+ toArray: toArray,
+ sum: sum,
+ avg: avg,
+ sort: sort,
+ min: min,
+ max: max,
+ difference: difference,
+ removeDuplicates: removeDuplicates,
+ unique: unique,
+ rotate: rotate,
+ permutations: permutations,
+ zip: zip,
+ transpose: transpose,
+ valuesAt: valuesAt,
+ union: union,
+ intersect: intersect,
+ powerSet: powerSet,
+ cartesian: cartesian,
+ compact: compact,
+ multiply: multiply,
+ flatten: flatten,
+ pluck: pluck,
+ invoke: invoke,
+ forEach: forEach,
+ map: map,
+ filter: filter,
+ reduce: reduce,
+ reduceRight: reduceRight,
+ some: some,
+ every: every,
+ indexOf: indexOf,
+ lastIndexOf: lastIndexOf
+ };
-//! moment.js locale configuration
-//! locale : Danish [da]
-//! author : Ulrik Nielsen : https://github.com/mrbase
+ return extended.define(isArray, array).expose(array);
+ }
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ if (true) {
+ if ( true && module.exports) {
+ module.exports = defineArray(__webpack_require__(/*! extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extended/index.js"), __webpack_require__(/*! is-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/is-extended/index.js"), __webpack_require__(/*! arguments-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/arguments-extended/index.js"));
+ }
+ } else {}
- //! moment.js locale configuration
+}).call(this);
- var da = moment.defineLocale('da', {
- months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(
- '_'
- ),
- monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
- weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
- weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),
- weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY HH:mm',
- LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',
- },
- calendar: {
- sameDay: '[i dag kl.] LT',
- nextDay: '[i morgen kl.] LT',
- nextWeek: 'på dddd [kl.] LT',
- lastDay: '[i går kl.] LT',
- lastWeek: '[i] dddd[s kl.] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'om %s',
- past: '%s siden',
- s: 'få sekunder',
- ss: '%d sekunder',
- m: 'et minut',
- mm: '%d minutter',
- h: 'en time',
- hh: '%d timer',
- d: 'en dag',
- dd: '%d dage',
- M: 'en måned',
- MM: '%d måneder',
- y: 'et år',
- yy: '%d år',
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
- return da;
-})));
-/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/de-at.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/de-at.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
-//! moment.js locale configuration
-//! locale : German (Austria) [de-at]
-//! author : lluchs : https://github.com/lluchs
-//! author: Menelion Elensúle: https://github.com/Oire
-//! author : Martin Groller : https://github.com/MadMG
-//! author : Mikolaj Dadela : https://github.com/mik01aj
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/***/ }),
- //! moment.js locale configuration
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/charenc/charenc.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/charenc/charenc.js ***!
+ \*********************************************************************************************/
+/***/ ((module) => {
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var format = {
- m: ['eine Minute', 'einer Minute'],
- h: ['eine Stunde', 'einer Stunde'],
- d: ['ein Tag', 'einem Tag'],
- dd: [number + ' Tage', number + ' Tagen'],
- M: ['ein Monat', 'einem Monat'],
- MM: [number + ' Monate', number + ' Monaten'],
- y: ['ein Jahr', 'einem Jahr'],
- yy: [number + ' Jahre', number + ' Jahren'],
- };
- return withoutSuffix ? format[key][0] : format[key][1];
+var charenc = {
+ // UTF-8 encoding
+ utf8: {
+ // Convert a string to a byte array
+ stringToBytes: function(str) {
+ return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
+ },
+
+ // Convert a byte array to a string
+ bytesToString: function(bytes) {
+ return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
}
+ },
- var deAt = moment.defineLocale('de-at', {
- months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
- '_'
- ),
- monthsShort: 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
- '_'
- ),
- weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
- weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY HH:mm',
- LLLL: 'dddd, D. MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[heute um] LT [Uhr]',
- sameElse: 'L',
- nextDay: '[morgen um] LT [Uhr]',
- nextWeek: 'dddd [um] LT [Uhr]',
- lastDay: '[gestern um] LT [Uhr]',
- lastWeek: '[letzten] dddd [um] LT [Uhr]',
- },
- relativeTime: {
- future: 'in %s',
- past: 'vor %s',
- s: 'ein paar Sekunden',
- ss: '%d Sekunden',
- m: processRelativeTime,
- mm: '%d Minuten',
- h: processRelativeTime,
- hh: '%d Stunden',
- d: processRelativeTime,
- dd: processRelativeTime,
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+ // Binary encoding
+ bin: {
+ // Convert a string to a byte array
+ stringToBytes: function(str) {
+ for (var bytes = [], i = 0; i < str.length; i++)
+ bytes.push(str.charCodeAt(i) & 0xFF);
+ return bytes;
+ },
- return deAt;
+ // Convert a byte array to a string
+ bytesToString: function(bytes) {
+ for (var str = [], i = 0; i < bytes.length; i++)
+ str.push(String.fromCharCode(bytes[i]));
+ return str.join('');
+ }
+ }
+};
-})));
+module.exports = charenc;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/de-ch.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/de-ch.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
-
-//! moment.js locale configuration
-//! locale : German (Switzerland) [de-ch]
-//! author : sschueller : https://github.com/sschueller
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/crypt/crypt.js":
+/*!*****************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/crypt/crypt.js ***!
+ \*****************************************************************************************/
+/***/ ((module) => {
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+(function() {
+ var base64map
+ = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
- //! moment.js locale configuration
+ crypt = {
+ // Bit-wise rotation left
+ rotl: function(n, b) {
+ return (n << b) | (n >>> (32 - b));
+ },
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var format = {
- m: ['eine Minute', 'einer Minute'],
- h: ['eine Stunde', 'einer Stunde'],
- d: ['ein Tag', 'einem Tag'],
- dd: [number + ' Tage', number + ' Tagen'],
- M: ['ein Monat', 'einem Monat'],
- MM: [number + ' Monate', number + ' Monaten'],
- y: ['ein Jahr', 'einem Jahr'],
- yy: [number + ' Jahre', number + ' Jahren'],
- };
- return withoutSuffix ? format[key][0] : format[key][1];
- }
+ // Bit-wise rotation right
+ rotr: function(n, b) {
+ return (n << (32 - b)) | (n >>> b);
+ },
- var deCh = moment.defineLocale('de-ch', {
- months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
- '_'
- ),
- monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
- '_'
- ),
- weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
- weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY HH:mm',
- LLLL: 'dddd, D. MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[heute um] LT [Uhr]',
- sameElse: 'L',
- nextDay: '[morgen um] LT [Uhr]',
- nextWeek: 'dddd [um] LT [Uhr]',
- lastDay: '[gestern um] LT [Uhr]',
- lastWeek: '[letzten] dddd [um] LT [Uhr]',
- },
- relativeTime: {
- future: 'in %s',
- past: 'vor %s',
- s: 'ein paar Sekunden',
- ss: '%d Sekunden',
- m: processRelativeTime,
- mm: '%d Minuten',
- h: processRelativeTime,
- hh: '%d Stunden',
- d: processRelativeTime,
- dd: processRelativeTime,
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+ // Swap big-endian to little-endian and vice versa
+ endian: function(n) {
+ // If number given, swap endian
+ if (n.constructor == Number) {
+ return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;
+ }
- return deCh;
+ // Else, assume array and swap all items
+ for (var i = 0; i < n.length; i++)
+ n[i] = crypt.endian(n[i]);
+ return n;
+ },
-})));
+ // Generate an array of any length of random bytes
+ randomBytes: function(n) {
+ for (var bytes = []; n > 0; n--)
+ bytes.push(Math.floor(Math.random() * 256));
+ return bytes;
+ },
+ // Convert a byte array to big-endian 32-bit words
+ bytesToWords: function(bytes) {
+ for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
+ words[b >>> 5] |= bytes[i] << (24 - b % 32);
+ return words;
+ },
-/***/ }),
+ // Convert big-endian 32-bit words to a byte array
+ wordsToBytes: function(words) {
+ for (var bytes = [], b = 0; b < words.length * 32; b += 8)
+ bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
+ return bytes;
+ },
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/de.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/de.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ // Convert a byte array to a hex string
+ bytesToHex: function(bytes) {
+ for (var hex = [], i = 0; i < bytes.length; i++) {
+ hex.push((bytes[i] >>> 4).toString(16));
+ hex.push((bytes[i] & 0xF).toString(16));
+ }
+ return hex.join('');
+ },
-//! moment.js locale configuration
-//! locale : German [de]
-//! author : lluchs : https://github.com/lluchs
-//! author: Menelion Elensúle: https://github.com/Oire
-//! author : Mikolaj Dadela : https://github.com/mik01aj
+ // Convert a hex string to a byte array
+ hexToBytes: function(hex) {
+ for (var bytes = [], c = 0; c < hex.length; c += 2)
+ bytes.push(parseInt(hex.substr(c, 2), 16));
+ return bytes;
+ },
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ // Convert a byte array to a base-64 string
+ bytesToBase64: function(bytes) {
+ for (var base64 = [], i = 0; i < bytes.length; i += 3) {
+ var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
+ for (var j = 0; j < 4; j++)
+ if (i * 8 + j * 6 <= bytes.length * 8)
+ base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));
+ else
+ base64.push('=');
+ }
+ return base64.join('');
+ },
- //! moment.js locale configuration
+ // Convert a base-64 string to a byte array
+ base64ToBytes: function(base64) {
+ // Remove non-base-64 characters
+ base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var format = {
- m: ['eine Minute', 'einer Minute'],
- h: ['eine Stunde', 'einer Stunde'],
- d: ['ein Tag', 'einem Tag'],
- dd: [number + ' Tage', number + ' Tagen'],
- M: ['ein Monat', 'einem Monat'],
- MM: [number + ' Monate', number + ' Monaten'],
- y: ['ein Jahr', 'einem Jahr'],
- yy: [number + ' Jahre', number + ' Jahren'],
- };
- return withoutSuffix ? format[key][0] : format[key][1];
+ for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
+ imod4 = ++i % 4) {
+ if (imod4 == 0) continue;
+ bytes.push(((base64map.indexOf(base64.charAt(i - 1))
+ & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
+ | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
+ }
+ return bytes;
}
+ };
- var de = moment.defineLocale('de', {
- months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
- '_'
- ),
- monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
- '_'
- ),
- weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
- weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY HH:mm',
- LLLL: 'dddd, D. MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[heute um] LT [Uhr]',
- sameElse: 'L',
- nextDay: '[morgen um] LT [Uhr]',
- nextWeek: 'dddd [um] LT [Uhr]',
- lastDay: '[gestern um] LT [Uhr]',
- lastWeek: '[letzten] dddd [um] LT [Uhr]',
- },
- relativeTime: {
- future: 'in %s',
- past: 'vor %s',
- s: 'ein paar Sekunden',
- ss: '%d Sekunden',
- m: processRelativeTime,
- mm: '%d Minuten',
- h: processRelativeTime,
- hh: '%d Stunden',
- d: processRelativeTime,
- dd: processRelativeTime,
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
-
- return de;
-
-})));
+ module.exports = crypt;
+})();
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/dv.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/dv.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/date-extended/index.js":
+/*!*************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/date-extended/index.js ***!
+ \*************************************************************************************************/
+/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
-//! moment.js locale configuration
-//! locale : Maldivian [dv]
-//! author : Jawish Hameed : https://github.com/jawish
+(function () {
+ "use strict";
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ function defineDate(extended, is, array) {
- //! moment.js locale configuration
+ function _pad(string, length, ch, end) {
+ string = "" + string; //check for numbers
+ ch = ch || " ";
+ var strLen = string.length;
+ while (strLen < length) {
+ if (end) {
+ string += ch;
+ } else {
+ string = ch + string;
+ }
+ strLen++;
+ }
+ return string;
+ }
- var months = [
- 'ޖެނުއަރީ',
- 'ފެބްރުއަރީ',
- 'މާރިޗު',
- 'އޭޕްރީލު',
- 'މޭ',
- 'ޖޫން',
- 'ޖުލައި',
- 'އޯގަސްޓު',
- 'ސެޕްޓެމްބަރު',
- 'އޮކްޓޯބަރު',
- 'ނޮވެމްބަރު',
- 'ޑިސެމްބަރު',
- ],
- weekdays = [
- 'އާދިއްތަ',
- 'ހޯމަ',
- 'އަންގާރަ',
- 'ބުދަ',
- 'ބުރާސްފަތި',
- 'ހުކުރު',
- 'ހޮނިހިރު',
- ];
-
- var dv = moment.defineLocale('dv', {
- months: months,
- monthsShort: months,
- weekdays: weekdays,
- weekdaysShort: weekdays,
- weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'D/M/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- meridiemParse: /މކ|މފ/,
- isPM: function (input) {
- return 'މފ' === input;
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 12) {
- return 'މކ';
+ function _truncate(string, length, end) {
+ var ret = string;
+ if (is.isString(ret)) {
+ if (string.length > length) {
+ if (end) {
+ var l = string.length;
+ ret = string.substring(l - length, l);
+ } else {
+ ret = string.substring(0, length);
+ }
+ }
} else {
- return 'މފ';
+ ret = _truncate("" + ret, length);
}
- },
- calendar: {
- sameDay: '[މިއަދު] LT',
- nextDay: '[މާދަމާ] LT',
- nextWeek: 'dddd LT',
- lastDay: '[އިއްޔެ] LT',
- lastWeek: '[ފާއިތުވި] dddd LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'ތެރޭގައި %s',
- past: 'ކުރިން %s',
- s: 'ސިކުންތުކޮޅެއް',
- ss: 'd% ސިކުންތު',
- m: 'މިނިޓެއް',
- mm: 'މިނިޓު %d',
- h: 'ގަޑިއިރެއް',
- hh: 'ގަޑިއިރު %d',
- d: 'ދުވަހެއް',
- dd: 'ދުވަސް %d',
- M: 'މަހެއް',
- MM: 'މަސް %d',
- y: 'އަހަރެއް',
- yy: 'އަހަރު %d',
- },
- preparse: function (string) {
- return string.replace(/،/g, ',');
- },
- postformat: function (string) {
- return string.replace(/,/g, '،');
- },
- week: {
- dow: 7, // Sunday is the first day of the week.
- doy: 12, // The week that contains Jan 12th is the first week of the year.
- },
- });
-
- return dv;
-
-})));
-
-
-/***/ }),
-
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/el.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/el.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
-
-//! moment.js locale configuration
-//! locale : Greek [el]
-//! author : Aggelos Karalias : https://github.com/mehiel
-
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
-
- //! moment.js locale configuration
-
- function isFunction(input) {
- return (
- (typeof Function !== 'undefined' && input instanceof Function) ||
- Object.prototype.toString.call(input) === '[object Function]'
- );
- }
+ return ret;
+ }
- var el = moment.defineLocale('el', {
- monthsNominativeEl: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(
- '_'
- ),
- monthsGenitiveEl: 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(
- '_'
- ),
- months: function (momentToFormat, format) {
- if (!momentToFormat) {
- return this._monthsNominativeEl;
- } else if (
- typeof format === 'string' &&
- /D/.test(format.substring(0, format.indexOf('MMMM')))
- ) {
- // if there is a day number before 'MMMM'
- return this._monthsGenitiveEl[momentToFormat.month()];
- } else {
- return this._monthsNominativeEl[momentToFormat.month()];
- }
- },
- monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
- weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(
- '_'
- ),
- weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
- weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
- meridiem: function (hours, minutes, isLower) {
- if (hours > 11) {
- return isLower ? 'μμ' : 'ΜΜ';
- } else {
- return isLower ? 'πμ' : 'ΠΜ';
+ function every(arr, iterator, scope) {
+ if (!is.isArray(arr) || typeof iterator !== "function") {
+ throw new TypeError();
}
- },
- isPM: function (input) {
- return (input + '').toLowerCase()[0] === 'μ';
- },
- meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY h:mm A',
- LLLL: 'dddd, D MMMM YYYY h:mm A',
- },
- calendarEl: {
- sameDay: '[Σήμερα {}] LT',
- nextDay: '[Αύριο {}] LT',
- nextWeek: 'dddd [{}] LT',
- lastDay: '[Χθες {}] LT',
- lastWeek: function () {
- switch (this.day()) {
- case 6:
- return '[το προηγούμενο] dddd [{}] LT';
- default:
- return '[την προηγούμενη] dddd [{}] LT';
+ var t = Object(arr);
+ var len = t.length >>> 0;
+ for (var i = 0; i < len; i++) {
+ if (i in t && !iterator.call(scope, t[i], i, t)) {
+ return false;
}
- },
- sameElse: 'L',
- },
- calendar: function (key, mom) {
- var output = this._calendarEl[key],
- hours = mom && mom.hours();
- if (isFunction(output)) {
- output = output.apply(mom);
}
- return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');
- },
- relativeTime: {
- future: 'σε %s',
- past: '%s πριν',
- s: 'λίγα δευτερόλεπτα',
- ss: '%d δευτερόλεπτα',
- m: 'ένα λεπτό',
- mm: '%d λεπτά',
- h: 'μία ώρα',
- hh: '%d ώρες',
- d: 'μία μέρα',
- dd: '%d μέρες',
- M: 'ένας μήνας',
- MM: '%d μήνες',
- y: 'ένας χρόνος',
- yy: '%d χρόνια',
- },
- dayOfMonthOrdinalParse: /\d{1,2}η/,
- ordinal: '%dη',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4st is the first week of the year.
- },
- });
-
- return el;
-
-})));
-
-
-/***/ }),
-
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-au.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-au.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
-
-//! moment.js locale configuration
-//! locale : English (Australia) [en-au]
-//! author : Jared Morse : https://github.com/jarcoal
+ return true;
+ }
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
- //! moment.js locale configuration
+ var transforms = (function () {
+ var floor = Math.floor, round = Math.round;
- var enAu = moment.defineLocale('en-au', {
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'
- ),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'
- ),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY h:mm A',
- LLLL: 'dddd, D MMMM YYYY h:mm A',
- },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function (number) {
- var b = number % 10,
- output =
- ~~((number % 100) / 10) === 1
- ? 'th'
- : b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
- return number + output;
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+ var addMap = {
+ day: function addDay(date, amount) {
+ return [amount, "Date", false];
+ },
+ weekday: function addWeekday(date, amount) {
+ // Divide the increment time span into weekspans plus leftover days
+ // e.g., 8 days is one 5-day weekspan / and two leftover days
+ // Can't have zero leftover days, so numbers divisible by 5 get
+ // a days value of 5, and the remaining days make up the number of weeks
+ var days, weeks, mod = amount % 5, strt = date.getDay(), adj = 0;
+ if (!mod) {
+ days = (amount > 0) ? 5 : -5;
+ weeks = (amount > 0) ? ((amount - 5) / 5) : ((amount + 5) / 5);
+ } else {
+ days = mod;
+ weeks = parseInt(amount / 5, 10);
+ }
+ if (strt === 6 && amount > 0) {
+ adj = 1;
+ } else if (strt === 0 && amount < 0) {
+ // Orig date is Sun / negative increment
+ // Jump back over Sat
+ adj = -1;
+ }
+ // Get weekday val for the new date
+ var trgt = strt + days;
+ // New date is on Sat or Sun
+ if (trgt === 0 || trgt === 6) {
+ adj = (amount > 0) ? 2 : -2;
+ }
+ // Increment by number of weeks plus leftover days plus
+ // weekend adjustments
+ return [(7 * weeks) + days + adj, "Date", false];
+ },
+ year: function addYear(date, amount) {
+ return [amount, "FullYear", true];
+ },
+ week: function addWeek(date, amount) {
+ return [amount * 7, "Date", false];
+ },
+ quarter: function addYear(date, amount) {
+ return [amount * 3, "Month", true];
+ },
+ month: function addYear(date, amount) {
+ return [amount, "Month", true];
+ }
+ };
- return enAu;
+ function addTransform(interval, date, amount) {
+ interval = interval.replace(/s$/, "");
+ if (addMap.hasOwnProperty(interval)) {
+ return addMap[interval](date, amount);
+ }
+ return [amount, "UTC" + interval.charAt(0).toUpperCase() + interval.substring(1) + "s", false];
+ }
-})));
+ var differenceMap = {
+ "quarter": function quarterDifference(date1, date2, utc) {
+ var yearDiff = date2.getFullYear() - date1.getFullYear();
+ var m1 = date1[utc ? "getUTCMonth" : "getMonth"]();
+ var m2 = date2[utc ? "getUTCMonth" : "getMonth"]();
+ // Figure out which quarter the months are in
+ var q1 = floor(m1 / 3) + 1;
+ var q2 = floor(m2 / 3) + 1;
+ // Add quarters for any year difference between the dates
+ q2 += (yearDiff * 4);
+ return q2 - q1;
+ },
-/***/ }),
+ "weekday": function weekdayDifference(date1, date2, utc) {
+ var days = differenceTransform("day", date1, date2, utc), weeks;
+ var mod = days % 7;
+ // Even number of weeks
+ if (mod === 0) {
+ days = differenceTransform("week", date1, date2, utc) * 5;
+ } else {
+ // Weeks plus spare change (< 7 days)
+ var adj = 0, aDay = date1[utc ? "getUTCDay" : "getDay"](), bDay = date2[utc ? "getUTCDay" : "getDay"]();
+ weeks = parseInt(days / 7, 10);
+ // Mark the date advanced by the number of
+ // round weeks (may be zero)
+ var dtMark = new Date(+date1);
+ dtMark.setDate(dtMark[utc ? "getUTCDate" : "getDate"]() + (weeks * 7));
+ var dayMark = dtMark[utc ? "getUTCDay" : "getDay"]();
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-ca.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-ca.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ // Spare change days -- 6 or less
+ if (days > 0) {
+ if (aDay === 6 || bDay === 6) {
+ adj = -1;
+ } else if (aDay === 0) {
+ adj = 0;
+ } else if (bDay === 0 || (dayMark + mod) > 5) {
+ adj = -2;
+ }
+ } else if (days < 0) {
+ if (aDay === 6) {
+ adj = 0;
+ } else if (aDay === 0 || bDay === 0) {
+ adj = 1;
+ } else if (bDay === 6 || (dayMark + mod) < 0) {
+ adj = 2;
+ }
+ }
+ days += adj;
+ days -= (weeks * 2);
+ }
+ return days;
+ },
+ year: function (date1, date2) {
+ return date2.getFullYear() - date1.getFullYear();
+ },
+ month: function (date1, date2, utc) {
+ var m1 = date1[utc ? "getUTCMonth" : "getMonth"]();
+ var m2 = date2[utc ? "getUTCMonth" : "getMonth"]();
+ return (m2 - m1) + ((date2.getFullYear() - date1.getFullYear()) * 12);
+ },
+ week: function (date1, date2, utc) {
+ return round(differenceTransform("day", date1, date2, utc) / 7);
+ },
+ day: function (date1, date2) {
+ return 1.1574074074074074e-8 * (date2.getTime() - date1.getTime());
+ },
+ hour: function (date1, date2) {
+ return 2.7777777777777776e-7 * (date2.getTime() - date1.getTime());
+ },
+ minute: function (date1, date2) {
+ return 0.000016666666666666667 * (date2.getTime() - date1.getTime());
+ },
+ second: function (date1, date2) {
+ return 0.001 * (date2.getTime() - date1.getTime());
+ },
+ millisecond: function (date1, date2) {
+ return date2.getTime() - date1.getTime();
+ }
+ };
-//! moment.js locale configuration
-//! locale : English (Canada) [en-ca]
-//! author : Jonathan Abourbih : https://github.com/jonbca
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ function differenceTransform(interval, date1, date2, utc) {
+ interval = interval.replace(/s$/, "");
+ return round(differenceMap[interval](date1, date2, utc));
+ }
- //! moment.js locale configuration
- var enCa = moment.defineLocale('en-ca', {
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'
- ),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'
- ),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'YYYY-MM-DD',
- LL: 'MMMM D, YYYY',
- LLL: 'MMMM D, YYYY h:mm A',
- LLLL: 'dddd, MMMM D, YYYY h:mm A',
- },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function (number) {
- var b = number % 10,
- output =
- ~~((number % 100) / 10) === 1
- ? 'th'
- : b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
- return number + output;
- },
- });
+ return {
+ addTransform: addTransform,
+ differenceTransform: differenceTransform
+ };
+ }()),
+ addTransform = transforms.addTransform,
+ differenceTransform = transforms.differenceTransform;
- return enCa;
-})));
+ /**
+ * @ignore
+ * Based on DOJO Date Implementation
+ *
+ * Dojo is available under *either* the terms of the modified BSD license *or* the
+ * Academic Free License version 2.1. As a recipient of Dojo, you may choose which
+ * license to receive this code under (except as noted in per-module LICENSE
+ * files). Some modules may not be the copyright of the Dojo Foundation. These
+ * modules contain explicit declarations of copyright in both the LICENSE files in
+ * the directories in which they reside and in the code itself. No external
+ * contributions are allowed under licenses which are fundamentally incompatible
+ * with the AFL or BSD licenses that Dojo is distributed under.
+ *
+ */
+ var floor = Math.floor, round = Math.round, min = Math.min, pow = Math.pow, ceil = Math.ceil, abs = Math.abs;
+ var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
+ var monthAbbr = ["Jan.", "Feb.", "Mar.", "Apr.", "May.", "Jun.", "Jul.", "Aug.", "Sep.", "Oct.", "Nov.", "Dec."];
+ var dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
+ var dayAbbr = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
+ var eraNames = ["Before Christ", "Anno Domini"];
+ var eraAbbr = ["BC", "AD"];
-/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-gb.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-gb.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ function getDayOfYear(/*Date*/dateObject, utc) {
+ // summary: gets the day of the year as represented by dateObject
+ return date.difference(new Date(dateObject.getFullYear(), 0, 1, dateObject.getHours()), dateObject, null, utc) + 1; // Number
+ }
-//! moment.js locale configuration
-//! locale : English (United Kingdom) [en-gb]
-//! author : Chris Gedrim : https://github.com/chrisgedrim
+ function getWeekOfYear(/*Date*/dateObject, /*Number*/firstDayOfWeek, utc) {
+ firstDayOfWeek = firstDayOfWeek || 0;
+ var fullYear = dateObject[utc ? "getUTCFullYear" : "getFullYear"]();
+ var firstDayOfYear = new Date(fullYear, 0, 1).getDay(),
+ adj = (firstDayOfYear - firstDayOfWeek + 7) % 7,
+ week = floor((getDayOfYear(dateObject) + adj - 1) / 7);
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ // if year starts on the specified day, start counting weeks at 1
+ if (firstDayOfYear === firstDayOfWeek) {
+ week++;
+ }
- //! moment.js locale configuration
+ return week; // Number
+ }
- var enGb = moment.defineLocale('en-gb', {
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'
- ),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'
- ),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function (number) {
- var b = number % 10,
- output =
- ~~((number % 100) / 10) === 1
- ? 'th'
- : b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+ function getTimezoneName(/*Date*/dateObject) {
+ var str = dateObject.toString();
+ var tz = '';
+ var pos = str.indexOf('(');
+ if (pos > -1) {
+ tz = str.substring(++pos, str.indexOf(')'));
+ }
+ return tz; // String
+ }
- return enGb;
-})));
+ function buildDateEXP(pattern, tokens) {
+ return pattern.replace(/([a-z])\1*/ig,function (match) {
+ // Build a simple regexp. Avoid captures, which would ruin the tokens list
+ var s,
+ c = match.charAt(0),
+ l = match.length,
+ p2 = '0?',
+ p3 = '0{0,2}';
+ if (c === 'y') {
+ s = '\\d{2,4}';
+ } else if (c === "M") {
+ s = (l > 2) ? '\\S+?' : '1[0-2]|' + p2 + '[1-9]';
+ } else if (c === "D") {
+ s = '[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|' + p3 + '[1-9][0-9]|' + p2 + '[1-9]';
+ } else if (c === "d") {
+ s = '3[01]|[12]\\d|' + p2 + '[1-9]';
+ } else if (c === "w") {
+ s = '[1-4][0-9]|5[0-3]|' + p2 + '[1-9]';
+ } else if (c === "E") {
+ s = '\\S+';
+ } else if (c === "h") {
+ s = '1[0-2]|' + p2 + '[1-9]';
+ } else if (c === "K") {
+ s = '1[01]|' + p2 + '\\d';
+ } else if (c === "H") {
+ s = '1\\d|2[0-3]|' + p2 + '\\d';
+ } else if (c === "k") {
+ s = '1\\d|2[0-4]|' + p2 + '[1-9]';
+ } else if (c === "m" || c === "s") {
+ s = '[0-5]\\d';
+ } else if (c === "S") {
+ s = '\\d{' + l + '}';
+ } else if (c === "a") {
+ var am = 'AM', pm = 'PM';
+ s = am + '|' + pm;
+ if (am !== am.toLowerCase()) {
+ s += '|' + am.toLowerCase();
+ }
+ if (pm !== pm.toLowerCase()) {
+ s += '|' + pm.toLowerCase();
+ }
+ s = s.replace(/\./g, "\\.");
+ } else if (c === 'v' || c === 'z' || c === 'Z' || c === 'G' || c === 'q' || c === 'Q') {
+ s = ".*";
+ } else {
+ s = c === " " ? "\\s*" : c + "*";
+ }
+ if (tokens) {
+ tokens.push(match);
+ }
+ return "(" + s + ")"; // add capture
+ }).replace(/[\xa0 ]/g, "[\\s\\xa0]"); // normalize whitespace. Need explicit handling of \xa0 for IE.
+ }
-/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-ie.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-ie.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ /**
+ * @namespace Utilities for Dates
+ */
+ var date = {
-//! moment.js locale configuration
-//! locale : English (Ireland) [en-ie]
-//! author : Chris Cartlidge : https://github.com/chriscartlidge
+ /**@lends date*/
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ /**
+ * Returns the number of days in the month of a date
+ *
+ * @example
+ *
+ * dateExtender.getDaysInMonth(new Date(2006, 1, 1)); //28
+ * dateExtender.getDaysInMonth(new Date(2004, 1, 1)); //29
+ * dateExtender.getDaysInMonth(new Date(2006, 2, 1)); //31
+ * dateExtender.getDaysInMonth(new Date(2006, 3, 1)); //30
+ * dateExtender.getDaysInMonth(new Date(2006, 4, 1)); //31
+ * dateExtender.getDaysInMonth(new Date(2006, 5, 1)); //30
+ * dateExtender.getDaysInMonth(new Date(2006, 6, 1)); //31
+ * @param {Date} dateObject the date containing the month
+ * @return {Number} the number of days in the month
+ */
+ getDaysInMonth: function (/*Date*/dateObject) {
+ // summary:
+ // Returns the number of days in the month used by dateObject
+ var month = dateObject.getMonth();
+ var days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
+ if (month === 1 && date.isLeapYear(dateObject)) {
+ return 29;
+ } // Number
+ return days[month]; // Number
+ },
- //! moment.js locale configuration
+ /**
+ * Determines if a date is a leap year
+ *
+ * @example
+ *
+ * dateExtender.isLeapYear(new Date(1600, 0, 1)); //true
+ * dateExtender.isLeapYear(new Date(2004, 0, 1)); //true
+ * dateExtender.isLeapYear(new Date(2000, 0, 1)); //true
+ * dateExtender.isLeapYear(new Date(2006, 0, 1)); //false
+ * dateExtender.isLeapYear(new Date(1900, 0, 1)); //false
+ * dateExtender.isLeapYear(new Date(1800, 0, 1)); //false
+ * dateExtender.isLeapYear(new Date(1700, 0, 1)); //false
+ *
+ * @param {Date} dateObject
+ * @returns {Boolean} true if it is a leap year false otherwise
+ */
+ isLeapYear: function (/*Date*/dateObject, utc) {
+ var year = dateObject[utc ? "getUTCFullYear" : "getFullYear"]();
+ return (year % 400 === 0) || (year % 4 === 0 && year % 100 !== 0);
- var enIe = moment.defineLocale('en-ie', {
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'
- ),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'
- ),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function (number) {
- var b = number % 10,
- output =
- ~~((number % 100) / 10) === 1
- ? 'th'
- : b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+ },
- return enIe;
+ /**
+ * Determines if a date is on a weekend
+ *
+ * @example
+ *
+ * var thursday = new Date(2006, 8, 21);
+ * var saturday = new Date(2006, 8, 23);
+ * var sunday = new Date(2006, 8, 24);
+ * var monday = new Date(2006, 8, 25);
+ * dateExtender.isWeekend(thursday)); //false
+ * dateExtender.isWeekend(saturday); //true
+ * dateExtender.isWeekend(sunday); //true
+ * dateExtender.isWeekend(monday)); //false
+ *
+ * @param {Date} dateObject the date to test
+ *
+ * @returns {Boolean} true if the date is a weekend
+ */
+ isWeekend: function (/*Date?*/dateObject, utc) {
+ // summary:
+ // Determines if the date falls on a weekend, according to local custom.
+ var day = (dateObject || new Date())[utc ? "getUTCDay" : "getDay"]();
+ return day === 0 || day === 6;
+ },
-})));
+ /**
+ * Get the timezone of a date
+ *
+ * @example
+ * //just setting the strLocal to simulate the toString() of a date
+ * dt.str = 'Sun Sep 17 2006 22:25:51 GMT-0500 (CDT)';
+ * //just setting the strLocal to simulate the locale
+ * dt.strLocale = 'Sun 17 Sep 2006 10:25:51 PM CDT';
+ * dateExtender.getTimezoneName(dt); //'CDT'
+ * dt.str = 'Sun Sep 17 2006 22:57:18 GMT-0500 (CDT)';
+ * dt.strLocale = 'Sun Sep 17 22:57:18 2006';
+ * dateExtender.getTimezoneName(dt); //'CDT'
+ * @param dateObject the date to get the timezone from
+ *
+ * @returns {String} the timezone of the date
+ */
+ getTimezoneName: getTimezoneName,
+ /**
+ * Compares two dates
+ *
+ * @example
+ *
+ * var d1 = new Date();
+ * d1.setHours(0);
+ * dateExtender.compare(d1, d1); // 0
+ *
+ * var d1 = new Date();
+ * d1.setHours(0);
+ * var d2 = new Date();
+ * d2.setFullYear(2005);
+ * d2.setHours(12);
+ * dateExtender.compare(d1, d2, "date"); // 1
+ * dateExtender.compare(d1, d2, "datetime"); // 1
+ *
+ * var d1 = new Date();
+ * d1.setHours(0);
+ * var d2 = new Date();
+ * d2.setFullYear(2005);
+ * d2.setHours(12);
+ * dateExtender.compare(d2, d1, "date"); // -1
+ * dateExtender.compare(d1, d2, "time"); //-1
+ *
+ * @param {Date|String} date1 the date to comapare
+ * @param {Date|String} [date2=new Date()] the date to compare date1 againse
+ * @param {"date"|"time"|"datetime"} portion compares the portion specified
+ *
+ * @returns -1 if date1 is < date2 0 if date1 === date2 1 if date1 > date2
+ */
+ compare: function (/*Date*/date1, /*Date*/date2, /*String*/portion) {
+ date1 = new Date(+date1);
+ date2 = new Date(+(date2 || new Date()));
-/***/ }),
+ if (portion === "date") {
+ // Ignore times and compare dates.
+ date1.setHours(0, 0, 0, 0);
+ date2.setHours(0, 0, 0, 0);
+ } else if (portion === "time") {
+ // Ignore dates and compare times.
+ date1.setFullYear(0, 0, 0);
+ date2.setFullYear(0, 0, 0);
+ }
+ return date1 > date2 ? 1 : date1 < date2 ? -1 : 0;
+ },
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-il.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-il.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
-//! moment.js locale configuration
-//! locale : English (Israel) [en-il]
-//! author : Chris Gedrim : https://github.com/chrisgedrim
+ /**
+ * Adds a specified interval and amount to a date
+ *
+ * @example
+ * var dtA = new Date(2005, 11, 27);
+ * dateExtender.add(dtA, "year", 1); //new Date(2006, 11, 27);
+ * dateExtender.add(dtA, "years", 1); //new Date(2006, 11, 27);
+ *
+ * dtA = new Date(2000, 0, 1);
+ * dateExtender.add(dtA, "quarter", 1); //new Date(2000, 3, 1);
+ * dateExtender.add(dtA, "quarters", 1); //new Date(2000, 3, 1);
+ *
+ * dtA = new Date(2000, 0, 1);
+ * dateExtender.add(dtA, "month", 1); //new Date(2000, 1, 1);
+ * dateExtender.add(dtA, "months", 1); //new Date(2000, 1, 1);
+ *
+ * dtA = new Date(2000, 0, 31);
+ * dateExtender.add(dtA, "month", 1); //new Date(2000, 1, 29);
+ * dateExtender.add(dtA, "months", 1); //new Date(2000, 1, 29);
+ *
+ * dtA = new Date(2000, 0, 1);
+ * dateExtender.add(dtA, "week", 1); //new Date(2000, 0, 8);
+ * dateExtender.add(dtA, "weeks", 1); //new Date(2000, 0, 8);
+ *
+ * dtA = new Date(2000, 0, 1);
+ * dateExtender.add(dtA, "day", 1); //new Date(2000, 0, 2);
+ *
+ * dtA = new Date(2000, 0, 1);
+ * dateExtender.add(dtA, "weekday", 1); //new Date(2000, 0, 3);
+ *
+ * dtA = new Date(2000, 0, 1, 11);
+ * dateExtender.add(dtA, "hour", 1); //new Date(2000, 0, 1, 12);
+ *
+ * dtA = new Date(2000, 11, 31, 23, 59);
+ * dateExtender.add(dtA, "minute", 1); //new Date(2001, 0, 1, 0, 0);
+ *
+ * dtA = new Date(2000, 11, 31, 23, 59, 59);
+ * dateExtender.add(dtA, "second", 1); //new Date(2001, 0, 1, 0, 0, 0);
+ *
+ * dtA = new Date(2000, 11, 31, 23, 59, 59, 999);
+ * dateExtender.add(dtA, "millisecond", 1); //new Date(2001, 0, 1, 0, 0, 0, 0);
+ *
+ * @param {Date} date
+ * @param {String} interval the interval to add
+ *
+ * - day | days
+ * - weekday | weekdays
+ * - year | years
+ * - week | weeks
+ * - quarter | quarters
+ * - months | months
+ * - hour | hours
+ * - minute | minutes
+ * - second | seconds
+ * - millisecond | milliseconds
+ *
+ * @param {Number} [amount=0] the amount to add
+ */
+ add: function (/*Date*/date, /*String*/interval, /*int*/amount) {
+ var res = addTransform(interval, date, amount || 0);
+ amount = res[0];
+ var property = res[1];
+ var sum = new Date(+date);
+ var fixOvershoot = res[2];
+ if (property) {
+ sum["set" + property](sum["get" + property]() + amount);
+ }
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ if (fixOvershoot && (sum.getDate() < date.getDate())) {
+ sum.setDate(0);
+ }
- //! moment.js locale configuration
+ return sum; // Date
+ },
- var enIl = moment.defineLocale('en-il', {
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'
- ),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'
- ),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function (number) {
- var b = number % 10,
- output =
- ~~((number % 100) / 10) === 1
- ? 'th'
- : b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
- return number + output;
- },
- });
+ /**
+ * Finds the difference between two dates based on the specified interval
+ *
+ * @example
+ *
+ * var dtA, dtB;
+ *
+ * dtA = new Date(2005, 11, 27);
+ * dtB = new Date(2006, 11, 27);
+ * dateExtender.difference(dtA, dtB, "year"); //1
+ *
+ * dtA = new Date(2000, 1, 29);
+ * dtB = new Date(2001, 2, 1);
+ * dateExtender.difference(dtA, dtB, "quarter"); //4
+ * dateExtender.difference(dtA, dtB, "month"); //13
+ *
+ * dtA = new Date(2000, 1, 1);
+ * dtB = new Date(2000, 1, 8);
+ * dateExtender.difference(dtA, dtB, "week"); //1
+ *
+ * dtA = new Date(2000, 1, 29);
+ * dtB = new Date(2000, 2, 1);
+ * dateExtender.difference(dtA, dtB, "day"); //1
+ *
+ * dtA = new Date(2006, 7, 3);
+ * dtB = new Date(2006, 7, 11);
+ * dateExtender.difference(dtA, dtB, "weekday"); //6
+ *
+ * dtA = new Date(2000, 11, 31, 23);
+ * dtB = new Date(2001, 0, 1, 0);
+ * dateExtender.difference(dtA, dtB, "hour"); //1
+ *
+ * dtA = new Date(2000, 11, 31, 23, 59);
+ * dtB = new Date(2001, 0, 1, 0, 0);
+ * dateExtender.difference(dtA, dtB, "minute"); //1
+ *
+ * dtA = new Date(2000, 11, 31, 23, 59, 59);
+ * dtB = new Date(2001, 0, 1, 0, 0, 0);
+ * dateExtender.difference(dtA, dtB, "second"); //1
+ *
+ * dtA = new Date(2000, 11, 31, 23, 59, 59, 999);
+ * dtB = new Date(2001, 0, 1, 0, 0, 0, 0);
+ * dateExtender.difference(dtA, dtB, "millisecond"); //1
+ *
+ *
+ * @param {Date} date1
+ * @param {Date} [date2 = new Date()]
+ * @param {String} [interval = "day"] the intercal to find the difference of.
+ *
+ * - day | days
+ * - weekday | weekdays
+ * - year | years
+ * - week | weeks
+ * - quarter | quarters
+ * - months | months
+ * - hour | hours
+ * - minute | minutes
+ * - second | seconds
+ * - millisecond | milliseconds
+ *
+ */
+ difference: function (/*Date*/date1, /*Date?*/date2, /*String*/interval, utc) {
+ date2 = date2 || new Date();
+ interval = interval || "day";
+ return differenceTransform(interval, date1, date2, utc);
+ },
+
+ /**
+ * Formats a date to the specidifed format string
+ *
+ * @example
+ *
+ * var date = new Date(2006, 7, 11, 0, 55, 12, 345);
+ * dateExtender.format(date, "EEEE, MMMM dd, yyyy"); //"Friday, August 11, 2006"
+ * dateExtender.format(date, "M/dd/yy"); //"8/11/06"
+ * dateExtender.format(date, "E"); //"6"
+ * dateExtender.format(date, "h:m a"); //"12:55 AM"
+ * dateExtender.format(date, 'h:m:s'); //"12:55:12"
+ * dateExtender.format(date, 'h:m:s.SS'); //"12:55:12.35"
+ * dateExtender.format(date, 'k:m:s.SS'); //"24:55:12.35"
+ * dateExtender.format(date, 'H:m:s.SS'); //"0:55:12.35"
+ * dateExtender.format(date, "ddMMyyyy"); //"11082006"
+ *
+ * @param date the date to format
+ * @param {String} format the format of the date composed of the following options
+ *
+ * - G Era designator Text AD
+ * - y Year Year 1996; 96
+ * - M Month in year Month July; Jul; 07
+ * - w Week in year Number 27
+ * - W Week in month Number 2
+ * - D Day in year Number 189
+ * - d Day in month Number 10
+ * - E Day in week Text Tuesday; Tue
+ * - a Am/pm marker Text PM
+ * - H Hour in day (0-23) Number 0
+ * - k Hour in day (1-24) Number 24
+ * - K Hour in am/pm (0-11) Number 0
+ * - h Hour in am/pm (1-12) Number 12
+ * - m Minute in hour Number 30
+ * - s Second in minute Number 55
+ * - S Millisecond Number 978
+ * - z Time zone General time zone Pacific Standard Time; PST; GMT-08:00
+ * - Z Time zone RFC 822 time zone -0800
+ *
+ */
+ format: function (date, format, utc) {
+ utc = utc || false;
+ var fullYear, month, day, d, hour, minute, second, millisecond;
+ if (utc) {
+ fullYear = date.getUTCFullYear();
+ month = date.getUTCMonth();
+ day = date.getUTCDay();
+ d = date.getUTCDate();
+ hour = date.getUTCHours();
+ minute = date.getUTCMinutes();
+ second = date.getUTCSeconds();
+ millisecond = date.getUTCMilliseconds();
+ } else {
+ fullYear = date.getFullYear();
+ month = date.getMonth();
+ d = date.getDate();
+ day = date.getDay();
+ hour = date.getHours();
+ minute = date.getMinutes();
+ second = date.getSeconds();
+ millisecond = date.getMilliseconds();
+ }
+ return format.replace(/([A-Za-z])\1*/g, function (match) {
+ var s, pad,
+ c = match.charAt(0),
+ l = match.length;
+ if (c === 'd') {
+ s = "" + d;
+ pad = true;
+ } else if (c === "H" && !s) {
+ s = "" + hour;
+ pad = true;
+ } else if (c === 'm' && !s) {
+ s = "" + minute;
+ pad = true;
+ } else if (c === 's') {
+ if (!s) {
+ s = "" + second;
+ }
+ pad = true;
+ } else if (c === "G") {
+ s = ((l < 4) ? eraAbbr : eraNames)[fullYear < 0 ? 0 : 1];
+ } else if (c === "y") {
+ s = fullYear;
+ if (l > 1) {
+ if (l === 2) {
+ s = _truncate("" + s, 2, true);
+ } else {
+ pad = true;
+ }
+ }
+ } else if (c.toUpperCase() === "Q") {
+ s = ceil((month + 1) / 3);
+ pad = true;
+ } else if (c === "M") {
+ if (l < 3) {
+ s = month + 1;
+ pad = true;
+ } else {
+ s = (l === 3 ? monthAbbr : monthNames)[month];
+ }
+ } else if (c === "w") {
+ s = getWeekOfYear(date, 0, utc);
+ pad = true;
+ } else if (c === "D") {
+ s = getDayOfYear(date, utc);
+ pad = true;
+ } else if (c === "E") {
+ if (l < 3) {
+ s = day + 1;
+ pad = true;
+ } else {
+ s = (l === -3 ? dayAbbr : dayNames)[day];
+ }
+ } else if (c === 'a') {
+ s = (hour < 12) ? 'AM' : 'PM';
+ } else if (c === "h") {
+ s = (hour % 12) || 12;
+ pad = true;
+ } else if (c === "K") {
+ s = (hour % 12);
+ pad = true;
+ } else if (c === "k") {
+ s = hour || 24;
+ pad = true;
+ } else if (c === "S") {
+ s = round(millisecond * pow(10, l - 3));
+ pad = true;
+ } else if (c === "z" || c === "v" || c === "Z") {
+ s = getTimezoneName(date);
+ if ((c === "z" || c === "v") && !s) {
+ l = 4;
+ }
+ if (!s || c === "Z") {
+ var offset = date.getTimezoneOffset();
+ var tz = [
+ (offset >= 0 ? "-" : "+"),
+ _pad(floor(abs(offset) / 60), 2, "0"),
+ _pad(abs(offset) % 60, 2, "0")
+ ];
+ if (l === 4) {
+ tz.splice(0, 0, "GMT");
+ tz.splice(3, 0, ":");
+ }
+ s = tz.join("");
+ }
+ } else {
+ s = match;
+ }
+ if (pad) {
+ s = _pad(s, l, '0');
+ }
+ return s;
+ });
+ }
+
+ };
+
+ var numberDate = {};
+
+ function addInterval(interval) {
+ numberDate[interval + "sFromNow"] = function (val) {
+ return date.add(new Date(), interval, val);
+ };
+ numberDate[interval + "sAgo"] = function (val) {
+ return date.add(new Date(), interval, -val);
+ };
+ }
+
+ var intervals = ["year", "month", "day", "hour", "minute", "second"];
+ for (var i = 0, l = intervals.length; i < l; i++) {
+ addInterval(intervals[i]);
+ }
+
+ var stringDate = {
+
+ parseDate: function (dateStr, format) {
+ if (!format) {
+ throw new Error('format required when calling dateExtender.parse');
+ }
+ var tokens = [], regexp = buildDateEXP(format, tokens),
+ re = new RegExp("^" + regexp + "$", "i"),
+ match = re.exec(dateStr);
+ if (!match) {
+ return null;
+ } // null
+ var result = [1970, 0, 1, 0, 0, 0, 0], // will get converted to a Date at the end
+ amPm = "",
+ valid = every(match, function (v, i) {
+ if (i) {
+ var token = tokens[i - 1];
+ var l = token.length, type = token.charAt(0);
+ if (type === 'y') {
+ if (v < 100) {
+ v = parseInt(v, 10);
+ //choose century to apply, according to a sliding window
+ //of 80 years before and 20 years after present year
+ var year = '' + new Date().getFullYear(),
+ century = year.substring(0, 2) * 100,
+ cutoff = min(year.substring(2, 4) + 20, 99);
+ result[0] = (v < cutoff) ? century + v : century - 100 + v;
+ } else {
+ result[0] = v;
+ }
+ } else if (type === "M") {
+ if (l > 2) {
+ var months = monthNames, j, k;
+ if (l === 3) {
+ months = monthAbbr;
+ }
+ //Tolerate abbreviating period in month part
+ //Case-insensitive comparison
+ v = v.replace(".", "").toLowerCase();
+ var contains = false;
+ for (j = 0, k = months.length; j < k && !contains; j++) {
+ var s = months[j].replace(".", "").toLocaleLowerCase();
+ if (s === v) {
+ v = j;
+ contains = true;
+ }
+ }
+ if (!contains) {
+ return false;
+ }
+ } else {
+ v--;
+ }
+ result[1] = v;
+ } else if (type === "E" || type === "e") {
+ var days = dayNames;
+ if (l === 3) {
+ days = dayAbbr;
+ }
+ //Case-insensitive comparison
+ v = v.toLowerCase();
+ days = array.map(days, function (d) {
+ return d.toLowerCase();
+ });
+ var d = array.indexOf(days, v);
+ if (d === -1) {
+ v = parseInt(v, 10);
+ if (isNaN(v) || v > days.length) {
+ return false;
+ }
+ } else {
+ v = d;
+ }
+ } else if (type === 'D' || type === "d") {
+ if (type === "D") {
+ result[1] = 0;
+ }
+ result[2] = v;
+ } else if (type === "a") {
+ var am = "am";
+ var pm = "pm";
+ var period = /\./g;
+ v = v.replace(period, '').toLowerCase();
+ // we might not have seen the hours field yet, so store the state and apply hour change later
+ amPm = (v === pm) ? 'p' : (v === am) ? 'a' : '';
+ } else if (type === "k" || type === "h" || type === "H" || type === "K") {
+ if (type === "k" && (+v) === 24) {
+ v = 0;
+ }
+ result[3] = v;
+ } else if (type === "m") {
+ result[4] = v;
+ } else if (type === "s") {
+ result[5] = v;
+ } else if (type === "S") {
+ result[6] = v;
+ }
+ }
+ return true;
+ });
+ if (valid) {
+ var hours = +result[3];
+ //account for am/pm
+ if (amPm === 'p' && hours < 12) {
+ result[3] = hours + 12; //e.g., 3pm -> 15
+ } else if (amPm === 'a' && hours === 12) {
+ result[3] = 0; //12am -> 0
+ }
+ var dateObject = new Date(result[0], result[1], result[2], result[3], result[4], result[5], result[6]); // Date
+ var dateToken = (array.indexOf(tokens, 'd') !== -1),
+ monthToken = (array.indexOf(tokens, 'M') !== -1),
+ month = result[1],
+ day = result[2],
+ dateMonth = dateObject.getMonth(),
+ dateDay = dateObject.getDate();
+ if ((monthToken && dateMonth > month) || (dateToken && dateDay > day)) {
+ return null;
+ }
+ return dateObject; // Date
+ } else {
+ return null;
+ }
+ }
+ };
+
+
+ var ret = extended.define(is.isDate, date).define(is.isString, stringDate).define(is.isNumber, numberDate);
+ for (i in date) {
+ if (date.hasOwnProperty(i)) {
+ ret[i] = date[i];
+ }
+ }
+
+ for (i in stringDate) {
+ if (stringDate.hasOwnProperty(i)) {
+ ret[i] = stringDate[i];
+ }
+ }
+ for (i in numberDate) {
+ if (numberDate.hasOwnProperty(i)) {
+ ret[i] = numberDate[i];
+ }
+ }
+ return ret;
+ }
+
+ if (true) {
+ if ( true && module.exports) {
+ module.exports = defineDate(__webpack_require__(/*! extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extended/index.js"), __webpack_require__(/*! is-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/is-extended/index.js"), __webpack_require__(/*! array-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/array-extended/index.js"));
+
+ }
+ } else {}
+
+}).call(this);
+
+
+
+
+
+
+
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/declare.js/declare.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/declare.js/declare.js ***!
+ \************************************************************************************************/
+/***/ ((module) => {
+
+(function () {
+
+ /**
+ * @projectName declare
+ * @github http://github.com/doug-martin/declare.js
+ * @header
+ *
+ * Declare is a library designed to allow writing object oriented code the same way in both the browser and node.js.
+ *
+ * ##Installation
+ *
+ * `npm install declare.js`
+ *
+ * Or [download the source](https://raw.github.com/doug-martin/declare.js/master/declare.js) ([minified](https://raw.github.com/doug-martin/declare.js/master/declare-min.js))
+ *
+ * ###Requirejs
+ *
+ * To use with requirejs place the `declare` source in the root scripts directory
+ *
+ * ```
+ *
+ * define(["declare"], function(declare){
+ * return declare({
+ * instance : {
+ * hello : function(){
+ * return "world";
+ * }
+ * }
+ * });
+ * });
+ *
+ * ```
+ *
+ *
+ * ##Usage
+ *
+ * declare.js provides
+ *
+ * Class methods
+ *
+ * * `as(module | object, name)` : exports the object to module or the object with the name
+ * * `mixin(mixin)` : mixes in an object but does not inherit directly from the object. **Note** this does not return a new class but changes the original class.
+ * * `extend(proto)` : extend a class with the given properties. A shortcut to `declare(Super, {})`;
+ *
+ * Instance methods
+ *
+ * * `_super(arguments)`: calls the super of the current method, you can pass in either the argments object or an array with arguments you want passed to super
+ * * `_getSuper()`: returns a this methods direct super.
+ * * `_static` : use to reference class properties and methods.
+ * * `get(prop)` : gets a property invoking the getter if it exists otherwise it just returns the named property on the object.
+ * * `set(prop, val)` : sets a property invoking the setter if it exists otherwise it just sets the named property on the object.
+ *
+ *
+ * ###Declaring a new Class
+ *
+ * Creating a new class with declare is easy!
+ *
+ * ```
+ *
+ * var Mammal = declare({
+ * //define your instance methods and properties
+ * instance : {
+ *
+ * //will be called whenever a new instance is created
+ * constructor: function(options) {
+ * options = options || {};
+ * this._super(arguments);
+ * this._type = options.type || "mammal";
+ * },
+ *
+ * speak : function() {
+ * return "A mammal of type " + this._type + " sounds like";
+ * },
+ *
+ * //Define your getters
+ * getters : {
+ *
+ * //can be accessed by using the get method. (mammal.get("type"))
+ * type : function() {
+ * return this._type;
+ * }
+ * },
+ *
+ * //Define your setters
+ * setters : {
+ *
+ * //can be accessed by using the set method. (mammal.set("type", "mammalType"))
+ * type : function(t) {
+ * this._type = t;
+ * }
+ * }
+ * },
+ *
+ * //Define your static methods
+ * static : {
+ *
+ * //Mammal.soundOff(); //"Im a mammal!!"
+ * soundOff : function() {
+ * return "Im a mammal!!";
+ * }
+ * }
+ * });
+ *
+ *
+ * ```
+ *
+ * You can use Mammal just like you would any other class.
+ *
+ * ```
+ * Mammal.soundOff("Im a mammal!!");
+ *
+ * var myMammal = new Mammal({type : "mymammal"});
+ * myMammal.speak(); // "A mammal of type mymammal sounds like"
+ * myMammal.get("type"); //"mymammal"
+ * myMammal.set("type", "mammal");
+ * myMammal.get("type"); //"mammal"
+ *
+ *
+ * ```
+ *
+ * ###Extending a class
+ *
+ * If you want to just extend a single class use the .extend method.
+ *
+ * ```
+ *
+ * var Wolf = Mammal.extend({
+ *
+ * //define your instance method
+ * instance: {
+ *
+ * //You can override super constructors just be sure to call `_super`
+ * constructor: function(options) {
+ * options = options || {};
+ * this._super(arguments); //call our super constructor.
+ * this._sound = "growl";
+ * this._color = options.color || "grey";
+ * },
+ *
+ * //override Mammals `speak` method by appending our own data to it.
+ * speak : function() {
+ * return this._super(arguments) + " a " + this._sound;
+ * },
+ *
+ * //add new getters for sound and color
+ * getters : {
+ *
+ * //new Wolf().get("type")
+ * //notice color is read only as we did not define a setter
+ * color : function() {
+ * return this._color;
+ * },
+ *
+ * //new Wolf().get("sound")
+ * sound : function() {
+ * return this._sound;
+ * }
+ * },
+ *
+ * setters : {
+ *
+ * //new Wolf().set("sound", "howl")
+ * sound : function(s) {
+ * this._sound = s;
+ * }
+ * }
+ *
+ * },
+ *
+ * static : {
+ *
+ * //You can override super static methods also! And you can still use _super
+ * soundOff : function() {
+ * //You can even call super in your statics!!!
+ * //should return "I'm a mammal!! that growls"
+ * return this._super(arguments) + " that growls";
+ * }
+ * }
+ * });
+ *
+ * Wolf.soundOff(); //Im a mammal!! that growls
+ *
+ * var myWolf = new Wolf();
+ * myWolf instanceof Mammal //true
+ * myWolf instanceof Wolf //true
+ *
+ * ```
+ *
+ * You can also extend a class by using the declare method and just pass in the super class.
+ *
+ * ```
+ * //Typical hierarchical inheritance
+ * // Mammal->Wolf->Dog
+ * var Dog = declare(Wolf, {
+ * instance: {
+ * constructor: function(options) {
+ * options = options || {};
+ * this._super(arguments);
+ * //override Wolfs initialization of sound to woof.
+ * this._sound = "woof";
+ *
+ * },
+ *
+ * speak : function() {
+ * //Should return "A mammal of type mammal sounds like a growl thats domesticated"
+ * return this._super(arguments) + " thats domesticated";
+ * }
+ * },
+ *
+ * static : {
+ * soundOff : function() {
+ * //should return "I'm a mammal!! that growls but now barks"
+ * return this._super(arguments) + " but now barks";
+ * }
+ * }
+ * });
+ *
+ * Dog.soundOff(); //Im a mammal!! that growls but now barks
+ *
+ * var myDog = new Dog();
+ * myDog instanceof Mammal //true
+ * myDog instanceof Wolf //true
+ * myDog instanceof Dog //true
+ *
+ *
+ * //Notice you still get the extend method.
+ *
+ * // Mammal->Wolf->Dog->Breed
+ * var Breed = Dog.extend({
+ * instance: {
+ *
+ * //initialize outside of constructor
+ * _pitch : "high",
+ *
+ * constructor: function(options) {
+ * options = options || {};
+ * this._super(arguments);
+ * this.breed = options.breed || "lab";
+ * },
+ *
+ * speak : function() {
+ * //Should return "A mammal of type mammal sounds like a
+ * //growl thats domesticated with a high pitch!"
+ * return this._super(arguments) + " with a " + this._pitch + " pitch!";
+ * },
+ *
+ * getters : {
+ * pitch : function() {
+ * return this._pitch;
+ * }
+ * }
+ * },
+ *
+ * static : {
+ * soundOff : function() {
+ * //should return "I'M A MAMMAL!! THAT GROWLS BUT NOW BARKS!"
+ * return this._super(arguments).toUpperCase() + "!";
+ * }
+ * }
+ * });
+ *
+ *
+ * Breed.soundOff()//"IM A MAMMAL!! THAT GROWLS BUT NOW BARKS!"
+ *
+ * var myBreed = new Breed({color : "gold", type : "lab"}),
+ * myBreed instanceof Dog //true
+ * myBreed instanceof Wolf //true
+ * myBreed instanceof Mammal //true
+ * myBreed.speak() //"A mammal of type lab sounds like a woof thats domesticated with a high pitch!"
+ * myBreed.get("type") //"lab"
+ * myBreed.get("color") //"gold"
+ * myBreed.get("sound")" //"woof"
+ * ```
+ *
+ * ###Multiple Inheritance / Mixins
+ *
+ * declare also allows the use of multiple super classes.
+ * This is useful if you have generic classes that provide functionality but shouldnt be used on their own.
+ *
+ * Lets declare a mixin that allows us to watch for property changes.
+ *
+ * ```
+ * //Notice that we set up the functions outside of declare because we can reuse them
+ *
+ * function _set(prop, val) {
+ * //get the old value
+ * var oldVal = this.get(prop);
+ * //call super to actually set the property
+ * var ret = this._super(arguments);
+ * //call our handlers
+ * this.__callHandlers(prop, oldVal, val);
+ * return ret;
+ * }
+ *
+ * function _callHandlers(prop, oldVal, newVal) {
+ * //get our handlers for the property
+ * var handlers = this.__watchers[prop], l;
+ * //if the handlers exist and their length does not equal 0 then we call loop through them
+ * if (handlers && (l = handlers.length) !== 0) {
+ * for (var i = 0; i < l; i++) {
+ * //call the handler
+ * handlers[i].call(null, prop, oldVal, newVal);
+ * }
+ * }
+ * }
+ *
+ *
+ * //the watch function
+ * function _watch(prop, handler) {
+ * if ("function" !== typeof handler) {
+ * //if its not a function then its an invalid handler
+ * throw new TypeError("Invalid handler.");
+ * }
+ * if (!this.__watchers[prop]) {
+ * //create the watchers if it doesnt exist
+ * this.__watchers[prop] = [handler];
+ * } else {
+ * //otherwise just add it to the handlers array
+ * this.__watchers[prop].push(handler);
+ * }
+ * }
+ *
+ * function _unwatch(prop, handler) {
+ * if ("function" !== typeof handler) {
+ * throw new TypeError("Invalid handler.");
+ * }
+ * var handlers = this.__watchers[prop], index;
+ * if (handlers && (index = handlers.indexOf(handler)) !== -1) {
+ * //remove the handler if it is found
+ * handlers.splice(index, 1);
+ * }
+ * }
+ *
+ * declare({
+ * instance:{
+ * constructor:function () {
+ * this._super(arguments);
+ * //set up our watchers
+ * this.__watchers = {};
+ * },
+ *
+ * //override the default set function so we can watch values
+ * "set":_set,
+ * //set up our callhandlers function
+ * __callHandlers:_callHandlers,
+ * //add the watch function
+ * watch:_watch,
+ * //add the unwatch function
+ * unwatch:_unwatch
+ * },
+ *
+ * "static":{
+ *
+ * init:function () {
+ * this._super(arguments);
+ * this.__watchers = {};
+ * },
+ * //override the default set function so we can watch values
+ * "set":_set,
+ * //set our callHandlers function
+ * __callHandlers:_callHandlers,
+ * //add the watch
+ * watch:_watch,
+ * //add the unwatch function
+ * unwatch:_unwatch
+ * }
+ * })
+ *
+ * ```
+ *
+ * Now lets use the mixin
+ *
+ * ```
+ * var WatchDog = declare([Dog, WatchMixin]);
+ *
+ * var watchDog = new WatchDog();
+ * //create our handler
+ * function watch(id, oldVal, newVal) {
+ * console.log("watchdog's %s was %s, now %s", id, oldVal, newVal);
+ * }
+ *
+ * //watch for property changes
+ * watchDog.watch("type", watch);
+ * watchDog.watch("color", watch);
+ * watchDog.watch("sound", watch);
+ *
+ * //now set the properties each handler will be called
+ * watchDog.set("type", "newDog");
+ * watchDog.set("color", "newColor");
+ * watchDog.set("sound", "newSound");
+ *
+ *
+ * //unwatch the property changes
+ * watchDog.unwatch("type", watch);
+ * watchDog.unwatch("color", watch);
+ * watchDog.unwatch("sound", watch);
+ *
+ * //no handlers will be called this time
+ * watchDog.set("type", "newDog");
+ * watchDog.set("color", "newColor");
+ * watchDog.set("sound", "newSound");
+ *
+ *
+ * ```
+ *
+ * ###Accessing static methods and properties witin an instance.
+ *
+ * To access static properties on an instance use the `_static` property which is a reference to your constructor.
+ *
+ * For example if your in your constructor and you want to have configurable default values.
+ *
+ * ```
+ * consturctor : function constructor(opts){
+ * this.opts = opts || {};
+ * this._type = opts.type || this._static.DEFAULT_TYPE;
+ * }
+ * ```
+ *
+ *
+ *
+ * ###Creating a new instance of within an instance.
+ *
+ * Often times you want to create a new instance of an object within an instance. If your subclassed however you cannot return a new instance of the parent class as it will not be the right sub class. `declare` provides a way around this by setting the `_static` property on each isntance of the class.
+ *
+ * Lets add a reproduce method `Mammal`
+ *
+ * ```
+ * reproduce : function(options){
+ * return new this._static(options);
+ * }
+ * ```
+ *
+ * Now in each subclass you can call reproduce and get the proper type.
+ *
+ * ```
+ * var myDog = new Dog();
+ * var myDogsChild = myDog.reproduce();
+ *
+ * myDogsChild instanceof Dog; //true
+ * ```
+ *
+ * ###Using the `as`
+ *
+ * `declare` also provides an `as` method which allows you to add your class to an object or if your using node.js you can pass in `module` and the class will be exported as the module.
+ *
+ * ```
+ * var animals = {};
+ *
+ * Mammal.as(animals, "Dog");
+ * Wolf.as(animals, "Wolf");
+ * Dog.as(animals, "Dog");
+ * Breed.as(animals, "Breed");
+ *
+ * var myDog = new animals.Dog();
+ *
+ * ```
+ *
+ * Or in node
+ *
+ * ```
+ * Mammal.as(exports, "Dog");
+ * Wolf.as(exports, "Wolf");
+ * Dog.as(exports, "Dog");
+ * Breed.as(exports, "Breed");
+ *
+ * ```
+ *
+ * To export a class as the `module` in node
+ *
+ * ```
+ * Mammal.as(module);
+ * ```
+ *
+ *
+ */
+ function createDeclared() {
+ var arraySlice = Array.prototype.slice, classCounter = 0, Base, forceNew = new Function();
+
+ var SUPER_REGEXP = /(super)/g;
+
+ function argsToArray(args, slice) {
+ slice = slice || 0;
+ return arraySlice.call(args, slice);
+ }
+
+ function isArray(obj) {
+ return Object.prototype.toString.call(obj) === "[object Array]";
+ }
+
+ function isObject(obj) {
+ var undef;
+ return obj !== null && obj !== undef && typeof obj === "object";
+ }
+
+ function isHash(obj) {
+ var ret = isObject(obj);
+ return ret && obj.constructor === Object;
+ }
+
+ var isArguments = function _isArguments(object) {
+ return Object.prototype.toString.call(object) === '[object Arguments]';
+ };
+
+ if (!isArguments(arguments)) {
+ isArguments = function _isArguments(obj) {
+ return !!(obj && obj.hasOwnProperty("callee"));
+ };
+ }
+
+ function indexOf(arr, item) {
+ if (arr && arr.length) {
+ for (var i = 0, l = arr.length; i < l; i++) {
+ if (arr[i] === item) {
+ return i;
+ }
+ }
+ }
+ return -1;
+ }
+
+ function merge(target, source, exclude) {
+ var name, s;
+ for (name in source) {
+ if (source.hasOwnProperty(name) && indexOf(exclude, name) === -1) {
+ s = source[name];
+ if (!(name in target) || (target[name] !== s)) {
+ target[name] = s;
+ }
+ }
+ }
+ return target;
+ }
+
+ function callSuper(args, a) {
+ var meta = this.__meta,
+ supers = meta.supers,
+ l = supers.length, superMeta = meta.superMeta, pos = superMeta.pos;
+ if (l > pos) {
+ args = !args ? [] : (!isArguments(args) && !isArray(args)) ? [args] : args;
+ var name = superMeta.name, f = superMeta.f, m;
+ do {
+ m = supers[pos][name];
+ if ("function" === typeof m && (m = m._f || m) !== f) {
+ superMeta.pos = 1 + pos;
+ return m.apply(this, args);
+ }
+ } while (l > ++pos);
+ }
+
+ return null;
+ }
+
+ function getSuper() {
+ var meta = this.__meta,
+ supers = meta.supers,
+ l = supers.length, superMeta = meta.superMeta, pos = superMeta.pos;
+ if (l > pos) {
+ var name = superMeta.name, f = superMeta.f, m;
+ do {
+ m = supers[pos][name];
+ if ("function" === typeof m && (m = m._f || m) !== f) {
+ superMeta.pos = 1 + pos;
+ return m.bind(this);
+ }
+ } while (l > ++pos);
+ }
+ return null;
+ }
+
+ function getter(name) {
+ var getters = this.__getters__;
+ if (getters.hasOwnProperty(name)) {
+ return getters[name].apply(this);
+ } else {
+ return this[name];
+ }
+ }
+
+ function setter(name, val) {
+ var setters = this.__setters__;
+ if (isHash(name)) {
+ for (var i in name) {
+ var prop = name[i];
+ if (setters.hasOwnProperty(i)) {
+ setters[name].call(this, prop);
+ } else {
+ this[i] = prop;
+ }
+ }
+ } else {
+ if (setters.hasOwnProperty(name)) {
+ return setters[name].apply(this, argsToArray(arguments, 1));
+ } else {
+ return this[name] = val;
+ }
+ }
+ }
+
+
+ function defaultFunction() {
+ var meta = this.__meta || {},
+ supers = meta.supers,
+ l = supers.length, superMeta = meta.superMeta, pos = superMeta.pos;
+ if (l > pos) {
+ var name = superMeta.name, f = superMeta.f, m;
+ do {
+ m = supers[pos][name];
+ if ("function" === typeof m && (m = m._f || m) !== f) {
+ superMeta.pos = 1 + pos;
+ return m.apply(this, arguments);
+ }
+ } while (l > ++pos);
+ }
+ return null;
+ }
+
+
+ function functionWrapper(f, name) {
+ if (f.toString().match(SUPER_REGEXP)) {
+ var wrapper = function wrapper() {
+ var ret, meta = this.__meta || {};
+ var orig = meta.superMeta;
+ meta.superMeta = {f: f, pos: 0, name: name};
+ switch (arguments.length) {
+ case 0:
+ ret = f.call(this);
+ break;
+ case 1:
+ ret = f.call(this, arguments[0]);
+ break;
+ case 2:
+ ret = f.call(this, arguments[0], arguments[1]);
+ break;
+
+ case 3:
+ ret = f.call(this, arguments[0], arguments[1], arguments[2]);
+ break;
+ default:
+ ret = f.apply(this, arguments);
+ }
+ meta.superMeta = orig;
+ return ret;
+ };
+ wrapper._f = f;
+ return wrapper;
+ } else {
+ f._f = f;
+ return f;
+ }
+ }
+
+ function defineMixinProps(child, proto) {
+
+ var operations = proto.setters || {}, __setters = child.__setters__, __getters = child.__getters__;
+ for (var i in operations) {
+ if (!__setters.hasOwnProperty(i)) { //make sure that the setter isnt already there
+ __setters[i] = operations[i];
+ }
+ }
+ operations = proto.getters || {};
+ for (i in operations) {
+ if (!__getters.hasOwnProperty(i)) { //make sure that the setter isnt already there
+ __getters[i] = operations[i];
+ }
+ }
+ for (var j in proto) {
+ if (j !== "getters" && j !== "setters") {
+ var p = proto[j];
+ if ("function" === typeof p) {
+ if (!child.hasOwnProperty(j)) {
+ child[j] = functionWrapper(defaultFunction, j);
+ }
+ } else {
+ child[j] = p;
+ }
+ }
+ }
+ }
+
+ function mixin() {
+ var args = argsToArray(arguments), l = args.length;
+ var child = this.prototype;
+ var childMeta = child.__meta, thisMeta = this.__meta, bases = child.__meta.bases, staticBases = bases.slice(),
+ staticSupers = thisMeta.supers || [], supers = childMeta.supers || [];
+ for (var i = 0; i < l; i++) {
+ var m = args[i], mProto = m.prototype;
+ var protoMeta = mProto.__meta, meta = m.__meta;
+ !protoMeta && (protoMeta = (mProto.__meta = {proto: mProto || {}}));
+ !meta && (meta = (m.__meta = {proto: m.__proto__ || {}}));
+ defineMixinProps(child, protoMeta.proto || {});
+ defineMixinProps(this, meta.proto || {});
+ //copy the bases for static,
+
+ mixinSupers(m.prototype, supers, bases);
+ mixinSupers(m, staticSupers, staticBases);
+ }
+ return this;
+ }
+
+ function mixinSupers(sup, arr, bases) {
+ var meta = sup.__meta;
+ !meta && (meta = (sup.__meta = {}));
+ var unique = sup.__meta.unique;
+ !unique && (meta.unique = "declare" + ++classCounter);
+ //check it we already have this super mixed into our prototype chain
+ //if true then we have already looped their supers!
+ if (indexOf(bases, unique) === -1) {
+ //add their id to our bases
+ bases.push(unique);
+ var supers = sup.__meta.supers || [], i = supers.length - 1 || 0;
+ while (i >= 0) {
+ mixinSupers(supers[i--], arr, bases);
+ }
+ arr.unshift(sup);
+ }
+ }
+
+ function defineProps(child, proto) {
+ var operations = proto.setters,
+ __setters = child.__setters__,
+ __getters = child.__getters__;
+ if (operations) {
+ for (var i in operations) {
+ __setters[i] = operations[i];
+ }
+ }
+ operations = proto.getters || {};
+ if (operations) {
+ for (i in operations) {
+ __getters[i] = operations[i];
+ }
+ }
+ for (i in proto) {
+ if (i != "getters" && i != "setters") {
+ var f = proto[i];
+ if ("function" === typeof f) {
+ var meta = f.__meta || {};
+ if (!meta.isConstructor) {
+ child[i] = functionWrapper(f, i);
+ } else {
+ child[i] = f;
+ }
+ } else {
+ child[i] = f;
+ }
+ }
+ }
+
+ }
+
+ function _export(obj, name) {
+ if (obj && name) {
+ obj[name] = this;
+ } else {
+ obj.exports = obj = this;
+ }
+ return this;
+ }
+
+ function extend(proto) {
+ return declare(this, proto);
+ }
+
+ function getNew(ctor) {
+ // create object with correct prototype using a do-nothing
+ // constructor
+ forceNew.prototype = ctor.prototype;
+ var t = new forceNew();
+ forceNew.prototype = null; // clean up
+ return t;
+ }
+
+
+ function __declare(child, sup, proto) {
+ var childProto = {}, supers = [];
+ var unique = "declare" + ++classCounter, bases = [], staticBases = [];
+ var instanceSupers = [], staticSupers = [];
+ var meta = {
+ supers: instanceSupers,
+ unique: unique,
+ bases: bases,
+ superMeta: {
+ f: null,
+ pos: 0,
+ name: null
+ }
+ };
+ var childMeta = {
+ supers: staticSupers,
+ unique: unique,
+ bases: staticBases,
+ isConstructor: true,
+ superMeta: {
+ f: null,
+ pos: 0,
+ name: null
+ }
+ };
+
+ if (isHash(sup) && !proto) {
+ proto = sup;
+ sup = Base;
+ }
+
+ if ("function" === typeof sup || isArray(sup)) {
+ supers = isArray(sup) ? sup : [sup];
+ sup = supers.shift();
+ child.__meta = childMeta;
+ childProto = getNew(sup);
+ childProto.__meta = meta;
+ childProto.__getters__ = merge({}, childProto.__getters__ || {});
+ childProto.__setters__ = merge({}, childProto.__setters__ || {});
+ child.__getters__ = merge({}, child.__getters__ || {});
+ child.__setters__ = merge({}, child.__setters__ || {});
+ mixinSupers(sup.prototype, instanceSupers, bases);
+ mixinSupers(sup, staticSupers, staticBases);
+ } else {
+ child.__meta = childMeta;
+ childProto.__meta = meta;
+ childProto.__getters__ = childProto.__getters__ || {};
+ childProto.__setters__ = childProto.__setters__ || {};
+ child.__getters__ = child.__getters__ || {};
+ child.__setters__ = child.__setters__ || {};
+ }
+ child.prototype = childProto;
+ if (proto) {
+ var instance = meta.proto = proto.instance || {};
+ var stat = childMeta.proto = proto.static || {};
+ stat.init = stat.init || defaultFunction;
+ defineProps(childProto, instance);
+ defineProps(child, stat);
+ if (!instance.hasOwnProperty("constructor")) {
+ childProto.constructor = instance.constructor = functionWrapper(defaultFunction, "constructor");
+ } else {
+ childProto.constructor = functionWrapper(instance.constructor, "constructor");
+ }
+ } else {
+ meta.proto = {};
+ childMeta.proto = {};
+ child.init = functionWrapper(defaultFunction, "init");
+ childProto.constructor = functionWrapper(defaultFunction, "constructor");
+ }
+ if (supers.length) {
+ mixin.apply(child, supers);
+ }
+ if (sup) {
+ //do this so we mixin our super methods directly but do not ov
+ merge(child, merge(merge({}, sup), child));
+ }
+ childProto._super = child._super = callSuper;
+ childProto._getSuper = child._getSuper = getSuper;
+ childProto._static = child;
+ }
+
+ function declare(sup, proto) {
+ function declared() {
+ switch (arguments.length) {
+ case 0:
+ this.constructor.call(this);
+ break;
+ case 1:
+ this.constructor.call(this, arguments[0]);
+ break;
+ case 2:
+ this.constructor.call(this, arguments[0], arguments[1]);
+ break;
+ case 3:
+ this.constructor.call(this, arguments[0], arguments[1], arguments[2]);
+ break;
+ default:
+ this.constructor.apply(this, arguments);
+ }
+ }
+
+ __declare(declared, sup, proto);
+ return declared.init() || declared;
+ }
+
+ function singleton(sup, proto) {
+ var retInstance;
+
+ function declaredSingleton() {
+ if (!retInstance) {
+ this.constructor.apply(this, arguments);
+ retInstance = this;
+ }
+ return retInstance;
+ }
+
+ __declare(declaredSingleton, sup, proto);
+ return declaredSingleton.init() || declaredSingleton;
+ }
+
+ Base = declare({
+ instance: {
+ "get": getter,
+ "set": setter
+ },
+
+ "static": {
+ "get": getter,
+ "set": setter,
+ mixin: mixin,
+ extend: extend,
+ as: _export
+ }
+ });
+
+ declare.singleton = singleton;
+ return declare;
+ }
+
+ if (true) {
+ if ( true && module.exports) {
+ module.exports = createDeclared();
+ }
+ } else {}
+}());
+
+
+
+
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/declare.js/index.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/declare.js/index.js ***!
+ \**********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+module.exports = __webpack_require__(/*! ./declare.js */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/declare.js/declare.js");
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extended/index.js":
+/*!********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extended/index.js ***!
+ \********************************************************************************************/
+/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
+
+(function () {
+ "use strict";
+ /*global extender is, dateExtended*/
+
+ function defineExtended(extender) {
+
+
+ var merge = (function merger() {
+ function _merge(target, source) {
+ var name, s;
+ for (name in source) {
+ if (source.hasOwnProperty(name)) {
+ s = source[name];
+ if (!(name in target) || (target[name] !== s)) {
+ target[name] = s;
+ }
+ }
+ }
+ return target;
+ }
+
+ return function merge(obj) {
+ if (!obj) {
+ obj = {};
+ }
+ for (var i = 1, l = arguments.length; i < l; i++) {
+ _merge(obj, arguments[i]);
+ }
+ return obj; // Object
+ };
+ }());
+
+ function getExtended() {
+
+ var loaded = {};
+
+
+ //getInitial instance;
+ var extended = extender.define();
+ extended.expose({
+ register: function register(alias, extendWith) {
+ if (!extendWith) {
+ extendWith = alias;
+ alias = null;
+ }
+ var type = typeof extendWith;
+ if (alias) {
+ extended[alias] = extendWith;
+ } else if (extendWith && type === "function") {
+ extended.extend(extendWith);
+ } else if (type === "object") {
+ extended.expose(extendWith);
+ } else {
+ throw new TypeError("extended.register must be called with an extender function");
+ }
+ return extended;
+ },
+
+ define: function () {
+ return extender.define.apply(extender, arguments);
+ }
+ });
+
+ return extended;
+ }
+
+ function extended() {
+ return getExtended();
+ }
+
+ extended.define = function define() {
+ return extender.define.apply(extender, arguments);
+ };
+
+ return extended;
+ }
+
+ if (true) {
+ if ( true && module.exports) {
+ module.exports = defineExtended(__webpack_require__(/*! extender */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extender/index.js"));
+
+ }
+ } else {}
+
+}).call(this);
+
+
+
+
+
+
+
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extender/extender.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extender/extender.js ***!
+ \***********************************************************************************************/
+/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
+
+(function () {
+ /*jshint strict:false*/
+
+
+ /**
+ *
+ * @projectName extender
+ * @github http://github.com/doug-martin/extender
+ * @header
+ * [![build status](https://secure.travis-ci.org/doug-martin/extender.png)](http://travis-ci.org/doug-martin/extender)
+ * # Extender
+ *
+ * `extender` is a library that helps in making chainable APIs, by creating a function that accepts different values and returns an object decorated with functions based on the type.
+ *
+ * ## Why Is Extender Different?
+ *
+ * Extender is different than normal chaining because is does more than return `this`. It decorates your values in a type safe manner.
+ *
+ * For example if you return an array from a string based method then the returned value will be decorated with array methods and not the string methods. This allow you as the developer to focus on your API and not worrying about how to properly build and connect your API.
+ *
+ *
+ * ## Installation
+ *
+ * ```
+ * npm install extender
+ * ```
+ *
+ * Or [download the source](https://raw.github.com/doug-martin/extender/master/extender.js) ([minified](https://raw.github.com/doug-martin/extender/master/extender-min.js))
+ *
+ * **Note** `extender` depends on [`declare.js`](http://doug-martin.github.com/declare.js/).
+ *
+ * ### Requirejs
+ *
+ * To use with requirejs place the `extend` source in the root scripts directory
+ *
+ * ```javascript
+ *
+ * define(["extender"], function(extender){
+ * });
+ *
+ * ```
+ *
+ *
+ * ## Usage
+ *
+ * **`extender.define(tester, decorations)`**
+ *
+ * To create your own extender call the `extender.define` function.
+ *
+ * This function accepts an optional tester which is used to determine a value should be decorated with the specified `decorations`
+ *
+ * ```javascript
+ * function isString(obj) {
+ * return !isUndefinedOrNull(obj) && (typeof obj === "string" || obj instanceof String);
+ * }
+ *
+ *
+ * var myExtender = extender.define(isString, {
+ * multiply: function (str, times) {
+ * var ret = str;
+ * for (var i = 1; i < times; i++) {
+ * ret += str;
+ * }
+ * return ret;
+ * },
+ * toArray: function (str, delim) {
+ * delim = delim || "";
+ * return str.split(delim);
+ * }
+ * });
+ *
+ * myExtender("hello").multiply(2).value(); //hellohello
+ *
+ * ```
+ *
+ * If you do not specify a tester function and just pass in an object of `functions` then all values passed in will be decorated with methods.
+ *
+ * ```javascript
+ *
+ * function isUndefined(obj) {
+ * var undef;
+ * return obj === undef;
+ * }
+ *
+ * function isUndefinedOrNull(obj) {
+ * var undef;
+ * return obj === undef || obj === null;
+ * }
+ *
+ * function isArray(obj) {
+ * return Object.prototype.toString.call(obj) === "[object Array]";
+ * }
+ *
+ * function isBoolean(obj) {
+ * var undef, type = typeof obj;
+ * return !isUndefinedOrNull(obj) && type === "boolean" || type === "Boolean";
+ * }
+ *
+ * function isString(obj) {
+ * return !isUndefinedOrNull(obj) && (typeof obj === "string" || obj instanceof String);
+ * }
+ *
+ * var myExtender = extender.define({
+ * isUndefined : isUndefined,
+ * isUndefinedOrNull : isUndefinedOrNull,
+ * isArray : isArray,
+ * isBoolean : isBoolean,
+ * isString : isString
+ * });
+ *
+ * ```
+ *
+ * To use
+ *
+ * ```
+ * var undef;
+ * myExtender("hello").isUndefined().value(); //false
+ * myExtender(undef).isUndefined().value(); //true
+ * ```
+ *
+ * You can also chain extenders so that they accept multiple types and decorates accordingly.
+ *
+ * ```javascript
+ * myExtender
+ * .define(isArray, {
+ * pluck: function (arr, m) {
+ * var ret = [];
+ * for (var i = 0, l = arr.length; i < l; i++) {
+ * ret.push(arr[i][m]);
+ * }
+ * return ret;
+ * }
+ * })
+ * .define(isBoolean, {
+ * invert: function (val) {
+ * return !val;
+ * }
+ * });
+ *
+ * myExtender([{a: "a"},{a: "b"},{a: "c"}]).pluck("a").value(); //["a", "b", "c"]
+ * myExtender("I love javascript!").toArray(/\s+/).pluck("0"); //["I", "l", "j"]
+ *
+ * ```
+ *
+ * Notice that we reuse the same extender as defined above.
+ *
+ * **Return Values**
+ *
+ * When creating an extender if you return a value from one of the decoration functions then that value will also be decorated. If you do not return any values then the extender will be returned.
+ *
+ * **Default decoration methods**
+ *
+ * By default every value passed into an extender is decorated with the following methods.
+ *
+ * * `value` : The value this extender represents.
+ * * `eq(otherValue)` : Tests strict equality of the currently represented value to the `otherValue`
+ * * `neq(oterValue)` : Tests strict inequality of the currently represented value.
+ * * `print` : logs the current value to the console.
+ *
+ * **Extender initialization**
+ *
+ * When creating an extender you can also specify a constructor which will be invoked with the current value.
+ *
+ * ```javascript
+ * myExtender.define(isString, {
+ * constructor : function(val){
+ * //set our value to the string trimmed
+ * this._value = val.trimRight().trimLeft();
+ * }
+ * });
+ * ```
+ *
+ * **`noWrap`**
+ *
+ * `extender` also allows you to specify methods that should not have the value wrapped providing a cleaner exit function other than `value()`.
+ *
+ * For example suppose you have an API that allows you to build a validator, rather than forcing the user to invoke the `value` method you could add a method called `validator` which makes more syntactic sense.
+ *
+ * ```
+ *
+ * var myValidator = extender.define({
+ * //chainable validation methods
+ * //...
+ * //end chainable validation methods
+ *
+ * noWrap : {
+ * validator : function(){
+ * //return your validator
+ * }
+ * }
+ * });
+ *
+ * myValidator().isNotNull().isEmailAddress().validator(); //now you dont need to call .value()
+ *
+ *
+ * ```
+ * **`extender.extend(extendr)`**
+ *
+ * You may also compose extenders through the use of `extender.extend(extender)`, which will return an entirely new extender that is the composition of extenders.
+ *
+ * Suppose you have the following two extenders.
+ *
+ * ```javascript
+ * var myExtender = extender
+ * .define({
+ * isFunction: is.function,
+ * isNumber: is.number,
+ * isString: is.string,
+ * isDate: is.date,
+ * isArray: is.array,
+ * isBoolean: is.boolean,
+ * isUndefined: is.undefined,
+ * isDefined: is.defined,
+ * isUndefinedOrNull: is.undefinedOrNull,
+ * isNull: is.null,
+ * isArguments: is.arguments,
+ * isInstanceOf: is.instanceOf,
+ * isRegExp: is.regExp
+ * });
+ * var myExtender2 = extender.define(is.array, {
+ * pluck: function (arr, m) {
+ * var ret = [];
+ * for (var i = 0, l = arr.length; i < l; i++) {
+ * ret.push(arr[i][m]);
+ * }
+ * return ret;
+ * },
+ *
+ * noWrap: {
+ * pluckPlain: function (arr, m) {
+ * var ret = [];
+ * for (var i = 0, l = arr.length; i < l; i++) {
+ * ret.push(arr[i][m]);
+ * }
+ * return ret;
+ * }
+ * }
+ * });
+ *
+ *
+ * ```
+ *
+ * And you do not want to alter either of them but instead what to create a third that is the union of the two.
+ *
+ *
+ * ```javascript
+ * var composed = extender.extend(myExtender).extend(myExtender2);
+ * ```
+ * So now you can use the new extender with the joined functionality if `myExtender` and `myExtender2`.
+ *
+ * ```javascript
+ * var extended = composed([
+ * {a: "a"},
+ * {a: "b"},
+ * {a: "c"}
+ * ]);
+ * extended.isArray().value(); //true
+ * extended.pluck("a").value(); // ["a", "b", "c"]);
+ *
+ * ```
+ *
+ * **Note** `myExtender` and `myExtender2` will **NOT** be altered.
+ *
+ * **`extender.expose(methods)`**
+ *
+ * The `expose` method allows you to add methods to your extender that are not wrapped or automatically chained by exposing them on the extender directly.
+ *
+ * ```
+ * var isMethods = {
+ * isFunction: is.function,
+ * isNumber: is.number,
+ * isString: is.string,
+ * isDate: is.date,
+ * isArray: is.array,
+ * isBoolean: is.boolean,
+ * isUndefined: is.undefined,
+ * isDefined: is.defined,
+ * isUndefinedOrNull: is.undefinedOrNull,
+ * isNull: is.null,
+ * isArguments: is.arguments,
+ * isInstanceOf: is.instanceOf,
+ * isRegExp: is.regExp
+ * };
+ *
+ * var myExtender = extender.define(isMethods).expose(isMethods);
+ *
+ * myExtender.isArray([]); //true
+ * myExtender([]).isArray([]).value(); //true
+ *
+ * ```
+ *
+ *
+ * **Using `instanceof`**
+ *
+ * When using extenders you can test if a value is an `instanceof` of an extender by using the instanceof operator.
+ *
+ * ```javascript
+ * var str = myExtender("hello");
+ *
+ * str instanceof myExtender; //true
+ * ```
+ *
+ * ## Examples
+ *
+ * To see more examples click [here](https://github.com/doug-martin/extender/tree/master/examples)
+ */
+ function defineExtender(declare) {
+
+
+ var slice = Array.prototype.slice, undef;
+
+ function indexOf(arr, item) {
+ if (arr && arr.length) {
+ for (var i = 0, l = arr.length; i < l; i++) {
+ if (arr[i] === item) {
+ return i;
+ }
+ }
+ }
+ return -1;
+ }
+
+ function isArray(obj) {
+ return Object.prototype.toString.call(obj) === "[object Array]";
+ }
+
+ var merge = (function merger() {
+ function _merge(target, source, exclude) {
+ var name, s;
+ for (name in source) {
+ if (source.hasOwnProperty(name) && indexOf(exclude, name) === -1) {
+ s = source[name];
+ if (!(name in target) || (target[name] !== s)) {
+ target[name] = s;
+ }
+ }
+ }
+ return target;
+ }
+
+ return function merge(obj) {
+ if (!obj) {
+ obj = {};
+ }
+ var l = arguments.length;
+ var exclude = arguments[arguments.length - 1];
+ if (isArray(exclude)) {
+ l--;
+ } else {
+ exclude = [];
+ }
+ for (var i = 1; i < l; i++) {
+ _merge(obj, arguments[i], exclude);
+ }
+ return obj; // Object
+ };
+ }());
+
+
+ function extender(supers) {
+ supers = supers || [];
+ var Base = declare({
+ instance: {
+ constructor: function (value) {
+ this._value = value;
+ },
+
+ value: function () {
+ return this._value;
+ },
+
+ eq: function eq(val) {
+ return this["__extender__"](this._value === val);
+ },
+
+ neq: function neq(other) {
+ return this["__extender__"](this._value !== other);
+ },
+ print: function () {
+ console.log(this._value);
+ return this;
+ }
+ }
+ }), defined = [];
+
+ function addMethod(proto, name, func) {
+ if ("function" !== typeof func) {
+ throw new TypeError("when extending type you must provide a function");
+ }
+ var extendedMethod;
+ if (name === "constructor") {
+ extendedMethod = function () {
+ this._super(arguments);
+ func.apply(this, arguments);
+ };
+ } else {
+ extendedMethod = function extendedMethod() {
+ var args = slice.call(arguments);
+ args.unshift(this._value);
+ var ret = func.apply(this, args);
+ return ret !== undef ? this["__extender__"](ret) : this;
+ };
+ }
+ proto[name] = extendedMethod;
+ }
+
+ function addNoWrapMethod(proto, name, func) {
+ if ("function" !== typeof func) {
+ throw new TypeError("when extending type you must provide a function");
+ }
+ var extendedMethod;
+ if (name === "constructor") {
+ extendedMethod = function () {
+ this._super(arguments);
+ func.apply(this, arguments);
+ };
+ } else {
+ extendedMethod = function extendedMethod() {
+ var args = slice.call(arguments);
+ args.unshift(this._value);
+ return func.apply(this, args);
+ };
+ }
+ proto[name] = extendedMethod;
+ }
+
+ function decorateProto(proto, decoration, nowrap) {
+ for (var i in decoration) {
+ if (decoration.hasOwnProperty(i)) {
+ if (i !== "getters" && i !== "setters") {
+ if (i === "noWrap") {
+ decorateProto(proto, decoration[i], true);
+ } else if (nowrap) {
+ addNoWrapMethod(proto, i, decoration[i]);
+ } else {
+ addMethod(proto, i, decoration[i]);
+ }
+ } else {
+ proto[i] = decoration[i];
+ }
+ }
+ }
+ }
+
+ function _extender(obj) {
+ var ret = obj, i, l;
+ if (!(obj instanceof Base)) {
+ var OurBase = Base;
+ for (i = 0, l = defined.length; i < l; i++) {
+ var definer = defined[i];
+ if (definer[0](obj)) {
+ OurBase = OurBase.extend({instance: definer[1]});
+ }
+ }
+ ret = new OurBase(obj);
+ ret["__extender__"] = _extender;
+ }
+ return ret;
+ }
+
+ function always() {
+ return true;
+ }
+
+ function define(tester, decorate) {
+ if (arguments.length) {
+ if (typeof tester === "object") {
+ decorate = tester;
+ tester = always;
+ }
+ decorate = decorate || {};
+ var proto = {};
+ decorateProto(proto, decorate);
+ //handle browsers like which skip over the constructor while looping
+ if (!proto.hasOwnProperty("constructor")) {
+ if (decorate.hasOwnProperty("constructor")) {
+ addMethod(proto, "constructor", decorate.constructor);
+ } else {
+ proto.constructor = function () {
+ this._super(arguments);
+ };
+ }
+ }
+ defined.push([tester, proto]);
+ }
+ return _extender;
+ }
+
+ function extend(supr) {
+ if (supr && supr.hasOwnProperty("__defined__")) {
+ _extender["__defined__"] = defined = defined.concat(supr["__defined__"]);
+ }
+ merge(_extender, supr, ["define", "extend", "expose", "__defined__"]);
+ return _extender;
+ }
+
+ _extender.define = define;
+ _extender.extend = extend;
+ _extender.expose = function expose() {
+ var methods;
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ methods = arguments[i];
+ if (typeof methods === "object") {
+ merge(_extender, methods, ["define", "extend", "expose", "__defined__"]);
+ }
+ }
+ return _extender;
+ };
+ _extender["__defined__"] = defined;
+
+
+ return _extender;
+ }
+
+ return {
+ define: function () {
+ return extender().define.apply(extender, arguments);
+ },
+
+ extend: function (supr) {
+ return extender().define().extend(supr);
+ }
+ };
+
+ }
+
+ if (true) {
+ if ( true && module.exports) {
+ module.exports = defineExtender(__webpack_require__(/*! declare.js */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/declare.js/index.js"));
+
+ }
+ } else {}
+
+}).call(this);
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extender/index.js":
+/*!********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extender/index.js ***!
+ \********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+module.exports = __webpack_require__(/*! ./extender.js */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extender/extender.js");
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/function-extended/index.js":
+/*!*****************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/function-extended/index.js ***!
+ \*****************************************************************************************************/
+/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
+
+(function () {
+ "use strict";
+
+ function defineFunction(extended, is, args) {
+
+ var isArray = is.isArray,
+ isObject = is.isObject,
+ isString = is.isString,
+ isFunction = is.isFunction,
+ argsToArray = args.argsToArray;
+
+ function spreadArgs(f, args, scope) {
+ var ret;
+ switch ((args || []).length) {
+ case 0:
+ ret = f.call(scope);
+ break;
+ case 1:
+ ret = f.call(scope, args[0]);
+ break;
+ case 2:
+ ret = f.call(scope, args[0], args[1]);
+ break;
+ case 3:
+ ret = f.call(scope, args[0], args[1], args[2]);
+ break;
+ default:
+ ret = f.apply(scope, args);
+ }
+ return ret;
+ }
+
+ function hitch(scope, method, args) {
+ args = argsToArray(arguments, 2);
+ if ((isString(method) && !(method in scope))) {
+ throw new Error(method + " property not defined in scope");
+ } else if (!isString(method) && !isFunction(method)) {
+ throw new Error(method + " is not a function");
+ }
+ if (isString(method)) {
+ return function () {
+ var func = scope[method];
+ if (isFunction(func)) {
+ return spreadArgs(func, args.concat(argsToArray(arguments)), scope);
+ } else {
+ return func;
+ }
+ };
+ } else {
+ if (args.length) {
+ return function () {
+ return spreadArgs(method, args.concat(argsToArray(arguments)), scope);
+ };
+ } else {
+
+ return function () {
+ return spreadArgs(method, arguments, scope);
+ };
+ }
+ }
+ }
+
+
+ function applyFirst(method, args) {
+ args = argsToArray(arguments, 1);
+ if (!isString(method) && !isFunction(method)) {
+ throw new Error(method + " must be the name of a property or function to execute");
+ }
+ if (isString(method)) {
+ return function () {
+ var scopeArgs = argsToArray(arguments), scope = scopeArgs.shift();
+ var func = scope[method];
+ if (isFunction(func)) {
+ scopeArgs = args.concat(scopeArgs);
+ return spreadArgs(func, scopeArgs, scope);
+ } else {
+ return func;
+ }
+ };
+ } else {
+ return function () {
+ var scopeArgs = argsToArray(arguments), scope = scopeArgs.shift();
+ scopeArgs = args.concat(scopeArgs);
+ return spreadArgs(method, scopeArgs, scope);
+ };
+ }
+ }
+
+
+ function hitchIgnore(scope, method, args) {
+ args = argsToArray(arguments, 2);
+ if ((isString(method) && !(method in scope))) {
+ throw new Error(method + " property not defined in scope");
+ } else if (!isString(method) && !isFunction(method)) {
+ throw new Error(method + " is not a function");
+ }
+ if (isString(method)) {
+ return function () {
+ var func = scope[method];
+ if (isFunction(func)) {
+ return spreadArgs(func, args, scope);
+ } else {
+ return func;
+ }
+ };
+ } else {
+ return function () {
+ return spreadArgs(method, args, scope);
+ };
+ }
+ }
+
+
+ function hitchAll(scope) {
+ var funcs = argsToArray(arguments, 1);
+ if (!isObject(scope) && !isFunction(scope)) {
+ throw new TypeError("scope must be an object");
+ }
+ if (funcs.length === 1 && isArray(funcs[0])) {
+ funcs = funcs[0];
+ }
+ if (!funcs.length) {
+ funcs = [];
+ for (var k in scope) {
+ if (scope.hasOwnProperty(k) && isFunction(scope[k])) {
+ funcs.push(k);
+ }
+ }
+ }
+ for (var i = 0, l = funcs.length; i < l; i++) {
+ scope[funcs[i]] = hitch(scope, scope[funcs[i]]);
+ }
+ return scope;
+ }
+
+
+ function partial(method, args) {
+ args = argsToArray(arguments, 1);
+ if (!isString(method) && !isFunction(method)) {
+ throw new Error(method + " must be the name of a property or function to execute");
+ }
+ if (isString(method)) {
+ return function () {
+ var func = this[method];
+ if (isFunction(func)) {
+ var scopeArgs = args.concat(argsToArray(arguments));
+ return spreadArgs(func, scopeArgs, this);
+ } else {
+ return func;
+ }
+ };
+ } else {
+ return function () {
+ var scopeArgs = args.concat(argsToArray(arguments));
+ return spreadArgs(method, scopeArgs, this);
+ };
+ }
+ }
+
+ function curryFunc(f, execute) {
+ return function () {
+ var args = argsToArray(arguments);
+ return execute ? spreadArgs(f, arguments, this) : function () {
+ return spreadArgs(f, args.concat(argsToArray(arguments)), this);
+ };
+ };
+ }
+
+
+ function curry(depth, cb, scope) {
+ var f;
+ if (scope) {
+ f = hitch(scope, cb);
+ } else {
+ f = cb;
+ }
+ if (depth) {
+ var len = depth - 1;
+ for (var i = len; i >= 0; i--) {
+ f = curryFunc(f, i === len);
+ }
+ }
+ return f;
+ }
+
+ return extended
+ .define(isObject, {
+ bind: hitch,
+ bindAll: hitchAll,
+ bindIgnore: hitchIgnore,
+ curry: function (scope, depth, fn) {
+ return curry(depth, fn, scope);
+ }
+ })
+ .define(isFunction, {
+ bind: function (fn, obj) {
+ return spreadArgs(hitch, [obj, fn].concat(argsToArray(arguments, 2)), this);
+ },
+ bindIgnore: function (fn, obj) {
+ return spreadArgs(hitchIgnore, [obj, fn].concat(argsToArray(arguments, 2)), this);
+ },
+ partial: partial,
+ applyFirst: applyFirst,
+ curry: function (fn, num, scope) {
+ return curry(num, fn, scope);
+ },
+ noWrap: {
+ f: function () {
+ return this.value();
+ }
+ }
+ })
+ .define(isString, {
+ bind: function (str, scope) {
+ return hitch(scope, str);
+ },
+ bindIgnore: function (str, scope) {
+ return hitchIgnore(scope, str);
+ },
+ partial: partial,
+ applyFirst: applyFirst,
+ curry: function (fn, depth, scope) {
+ return curry(depth, fn, scope);
+ }
+ })
+ .expose({
+ bind: hitch,
+ bindAll: hitchAll,
+ bindIgnore: hitchIgnore,
+ partial: partial,
+ applyFirst: applyFirst,
+ curry: curry
+ });
+
+ }
+
+ if (true) {
+ if ( true && module.exports) {
+ module.exports = defineFunction(__webpack_require__(/*! extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extended/index.js"), __webpack_require__(/*! is-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/is-extended/index.js"), __webpack_require__(/*! arguments-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/arguments-extended/index.js"));
+
+ }
+ } else {}
+
+}).call(this);
+
+
+
+
+
+
+
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/ht/index.js":
+/*!**************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/ht/index.js ***!
+ \**************************************************************************************/
+/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
+
+(function () {
+ "use strict";
+
+ function defineHt(_) {
+
+
+ var hashFunction = function (key) {
+ if (typeof key === "string") {
+ return key;
+ } else if (typeof key === "object") {
+ return key.hashCode ? key.hashCode() : "" + key;
+ } else {
+ return "" + key;
+ }
+ };
+
+ var Bucket = _.declare({
+
+ instance: {
+
+ constructor: function () {
+ this.__entries = [];
+ this.__keys = [];
+ this.__values = [];
+ },
+
+ pushValue: function (key, value) {
+ this.__keys.push(key);
+ this.__values.push(value);
+ this.__entries.push({key: key, value: value});
+ return value;
+ },
+
+ remove: function (key) {
+ var ret = null, map = this.__entries, val, keys = this.__keys, vals = this.__values;
+ var i = map.length - 1;
+ for (; i >= 0; i--) {
+ if (!!(val = map[i]) && val.key === key) {
+ map.splice(i, 1);
+ keys.splice(i, 1);
+ vals.splice(i, 1);
+ return val.value;
+ }
+ }
+ return ret;
+ },
+
+ "set": function (key, value) {
+ var ret = null, map = this.__entries, vals = this.__values;
+ var i = map.length - 1;
+ for (; i >= 0; i--) {
+ var val = map[i];
+ if (val && key === val.key) {
+ vals[i] = value;
+ val.value = value;
+ ret = value;
+ break;
+ }
+ }
+ if (!ret) {
+ map.push({key: key, value: value});
+ }
+ return ret;
+ },
+
+ find: function (key) {
+ var ret = null, map = this.__entries, val;
+ var i = map.length - 1;
+ for (; i >= 0; i--) {
+ val = map[i];
+ if (val && key === val.key) {
+ ret = val.value;
+ break;
+ }
+ }
+ return ret;
+ },
+
+ getEntrySet: function () {
+ return this.__entries;
+ },
+
+ getKeys: function () {
+ return this.__keys;
+ },
+
+ getValues: function (arr) {
+ return this.__values;
+ }
+ }
+ });
+
+ return _.declare({
+
+ instance: {
+
+ constructor: function () {
+ this.__map = {};
+ },
+
+ entrySet: function () {
+ var ret = [], map = this.__map;
+ for (var i in map) {
+ if (map.hasOwnProperty(i)) {
+ ret = ret.concat(map[i].getEntrySet());
+ }
+ }
+ return ret;
+ },
+
+ put: function (key, value) {
+ var hash = hashFunction(key);
+ var bucket = null;
+ if (!(bucket = this.__map[hash])) {
+ bucket = (this.__map[hash] = new Bucket());
+ }
+ bucket.pushValue(key, value);
+ return value;
+ },
+
+ remove: function (key) {
+ var hash = hashFunction(key), ret = null;
+ var bucket = this.__map[hash];
+ if (bucket) {
+ ret = bucket.remove(key);
+ }
+ return ret;
+ },
+
+ "get": function (key) {
+ var hash = hashFunction(key), ret = null, bucket;
+ if (!!(bucket = this.__map[hash])) {
+ ret = bucket.find(key);
+ }
+ return ret;
+ },
+
+ "set": function (key, value) {
+ var hash = hashFunction(key), ret = null, bucket = null, map = this.__map;
+ if (!!(bucket = map[hash])) {
+ ret = bucket.set(key, value);
+ } else {
+ ret = (map[hash] = new Bucket()).pushValue(key, value);
+ }
+ return ret;
+ },
+
+ contains: function (key) {
+ var hash = hashFunction(key), ret = false, bucket = null;
+ if (!!(bucket = this.__map[hash])) {
+ ret = !!(bucket.find(key));
+ }
+ return ret;
+ },
+
+ concat: function (hashTable) {
+ if (hashTable instanceof this._static) {
+ var ret = new this._static();
+ var otherEntrySet = hashTable.entrySet().concat(this.entrySet());
+ for (var i = otherEntrySet.length - 1; i >= 0; i--) {
+ var e = otherEntrySet[i];
+ ret.put(e.key, e.value);
+ }
+ return ret;
+ } else {
+ throw new TypeError("When joining hashtables the joining arg must be a HashTable");
+ }
+ },
+
+ filter: function (cb, scope) {
+ var es = this.entrySet(), ret = new this._static();
+ es = _.filter(es, cb, scope);
+ for (var i = es.length - 1; i >= 0; i--) {
+ var e = es[i];
+ ret.put(e.key, e.value);
+ }
+ return ret;
+ },
+
+ forEach: function (cb, scope) {
+ var es = this.entrySet();
+ _.forEach(es, cb, scope);
+ },
+
+ every: function (cb, scope) {
+ var es = this.entrySet();
+ return _.every(es, cb, scope);
+ },
+
+ map: function (cb, scope) {
+ var es = this.entrySet();
+ return _.map(es, cb, scope);
+ },
+
+ some: function (cb, scope) {
+ var es = this.entrySet();
+ return _.some(es, cb, scope);
+ },
+
+ reduce: function (cb, scope) {
+ var es = this.entrySet();
+ return _.reduce(es, cb, scope);
+ },
+
+ reduceRight: function (cb, scope) {
+ var es = this.entrySet();
+ return _.reduceRight(es, cb, scope);
+ },
+
+ clear: function () {
+ this.__map = {};
+ },
+
+ keys: function () {
+ var ret = [], map = this.__map;
+ for (var i in map) {
+ //if (map.hasOwnProperty(i)) {
+ ret = ret.concat(map[i].getKeys());
+ //}
+ }
+ return ret;
+ },
+
+ values: function () {
+ var ret = [], map = this.__map;
+ for (var i in map) {
+ //if (map.hasOwnProperty(i)) {
+ ret = ret.concat(map[i].getValues());
+ //}
+ }
+ return ret;
+ },
+
+ isEmpty: function () {
+ return this.keys().length === 0;
+ }
+ }
+
+ });
+
+
+ }
+
+ if (true) {
+ if ( true && module.exports) {
+ module.exports = defineHt(__webpack_require__(/*! extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extended/index.js")().register("declare", __webpack_require__(/*! declare.js */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/declare.js/index.js")).register(__webpack_require__(/*! is-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/is-extended/index.js")).register(__webpack_require__(/*! array-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/array-extended/index.js")));
+
+ }
+ } else {}
+
+}).call(this);
+
+
+
+
+
+
+
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/is-buffer/index.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/is-buffer/index.js ***!
+ \*********************************************************************************************/
+/***/ ((module) => {
+
+/*!
+ * Determine if an object is a Buffer
+ *
+ * @author Feross Aboukhadijeh
+ * @license MIT
+ */
+
+// The _isBuffer check is for Safari 5-7 support, because it's missing
+// Object.prototype.constructor. Remove this eventually
+module.exports = function (obj) {
+ return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
+}
+
+function isBuffer (obj) {
+ return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
+}
+
+// For Node v0.10 support. Remove this eventually.
+function isSlowBuffer (obj) {
+ return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
+}
+
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/is-extended/index.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/is-extended/index.js ***!
+ \***********************************************************************************************/
+/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
+
+(function () {
+ "use strict";
+
+ function defineIsa(extended) {
+
+ var pSlice = Array.prototype.slice;
+
+ var hasOwn = Object.prototype.hasOwnProperty;
+ var toStr = Object.prototype.toString;
+
+ function argsToArray(args, slice) {
+ var i = -1, j = 0, l = args.length, ret = [];
+ slice = slice || 0;
+ i += slice;
+ while (++i < l) {
+ ret[j++] = args[i];
+ }
+ return ret;
+ }
+
+ function keys(obj) {
+ var ret = [];
+ for (var i in obj) {
+ if (hasOwn.call(obj, i)) {
+ ret.push(i);
+ }
+ }
+ return ret;
+ }
+
+ //taken from node js assert.js
+ //https://github.com/joyent/node/blob/master/lib/assert.js
+ function deepEqual(actual, expected) {
+ // 7.1. All identical values are equivalent, as determined by ===.
+ if (actual === expected) {
+ return true;
+
+ } else if (typeof Buffer !== "undefined" && Buffer.isBuffer(actual) && Buffer.isBuffer(expected)) {
+ if (actual.length !== expected.length) {
+ return false;
+ }
+ for (var i = 0; i < actual.length; i++) {
+ if (actual[i] !== expected[i]) {
+ return false;
+ }
+ }
+ return true;
+
+ // 7.2. If the expected value is a Date object, the actual value is
+ // equivalent if it is also a Date object that refers to the same time.
+ } else if (isDate(actual) && isDate(expected)) {
+ return actual.getTime() === expected.getTime();
+
+ // 7.3 If the expected value is a RegExp object, the actual value is
+ // equivalent if it is also a RegExp object with the same source and
+ // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).
+ } else if (isRegExp(actual) && isRegExp(expected)) {
+ return actual.source === expected.source &&
+ actual.global === expected.global &&
+ actual.multiline === expected.multiline &&
+ actual.lastIndex === expected.lastIndex &&
+ actual.ignoreCase === expected.ignoreCase;
+
+ // 7.4. Other pairs that do not both pass typeof value == 'object',
+ // equivalence is determined by ==.
+ } else if (isString(actual) && isString(expected) && actual !== expected) {
+ return false;
+ } else if (typeof actual !== 'object' && typeof expected !== 'object') {
+ return actual === expected;
+
+ // 7.5 For all other Object pairs, including Array objects, equivalence is
+ // determined by having the same number of owned properties (as verified
+ // with Object.prototype.hasOwnProperty.call), the same set of keys
+ // (although not necessarily the same order), equivalent values for every
+ // corresponding key, and an identical 'prototype' property. Note: this
+ // accounts for both named and indexed properties on Arrays.
+ } else {
+ return objEquiv(actual, expected);
+ }
+ }
+
+
+ function objEquiv(a, b) {
+ var key;
+ if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) {
+ return false;
+ }
+ // an identical 'prototype' property.
+ if (a.prototype !== b.prototype) {
+ return false;
+ }
+ //~~~I've managed to break Object.keys through screwy arguments passing.
+ // Converting to array solves the problem.
+ if (isArguments(a)) {
+ if (!isArguments(b)) {
+ return false;
+ }
+ a = pSlice.call(a);
+ b = pSlice.call(b);
+ return deepEqual(a, b);
+ }
+ try {
+ var ka = keys(a),
+ kb = keys(b),
+ i;
+ // having the same number of owned properties (keys incorporates
+ // hasOwnProperty)
+ if (ka.length !== kb.length) {
+ return false;
+ }
+ //the same set of keys (although not necessarily the same order),
+ ka.sort();
+ kb.sort();
+ //~~~cheap key test
+ for (i = ka.length - 1; i >= 0; i--) {
+ if (ka[i] !== kb[i]) {
+ return false;
+ }
+ }
+ //equivalent values for every corresponding key, and
+ //~~~possibly expensive deep test
+ for (i = ka.length - 1; i >= 0; i--) {
+ key = ka[i];
+ if (!deepEqual(a[key], b[key])) {
+ return false;
+ }
+ }
+ } catch (e) {//happens when one is a string literal and the other isn't
+ return false;
+ }
+ return true;
+ }
+
+
+ var isFunction = function (obj) {
+ return toStr.call(obj) === '[object Function]';
+ };
+
+ //ie hack
+ if ("undefined" !== typeof window && !isFunction(window.alert)) {
+ (function (alert) {
+ isFunction = function (obj) {
+ return toStr.call(obj) === '[object Function]' || obj === alert;
+ };
+ }(window.alert));
+ }
+
+ function isObject(obj) {
+ var undef;
+ return obj !== null && typeof obj === "object";
+ }
+
+ function isHash(obj) {
+ var ret = isObject(obj);
+ return ret && obj.constructor === Object && !obj.nodeType && !obj.setInterval;
+ }
+
+ function isEmpty(object) {
+ if (isArguments(object)) {
+ return object.length === 0;
+ } else if (isObject(object)) {
+ return keys(object).length === 0;
+ } else if (isString(object) || isArray(object)) {
+ return object.length === 0;
+ }
+ return true;
+ }
+
+ function isBoolean(obj) {
+ return obj === true || obj === false || toStr.call(obj) === "[object Boolean]";
+ }
+
+ function isUndefined(obj) {
+ return typeof obj === 'undefined';
+ }
+
+ function isDefined(obj) {
+ return !isUndefined(obj);
+ }
+
+ function isUndefinedOrNull(obj) {
+ return isUndefined(obj) || isNull(obj);
+ }
+
+ function isNull(obj) {
+ return obj === null;
+ }
+
+
+ var isArguments = function _isArguments(object) {
+ return toStr.call(object) === '[object Arguments]';
+ };
+
+ if (!isArguments(arguments)) {
+ isArguments = function _isArguments(obj) {
+ return !!(obj && hasOwn.call(obj, "callee"));
+ };
+ }
+
+
+ function isInstanceOf(obj, clazz) {
+ if (isFunction(clazz)) {
+ return obj instanceof clazz;
+ } else {
+ return false;
+ }
+ }
+
+ function isRegExp(obj) {
+ return toStr.call(obj) === '[object RegExp]';
+ }
+
+ var isArray = Array.isArray || function isArray(obj) {
+ return toStr.call(obj) === "[object Array]";
+ };
+
+ function isDate(obj) {
+ return toStr.call(obj) === '[object Date]';
+ }
+
+ function isString(obj) {
+ return toStr.call(obj) === '[object String]';
+ }
+
+ function isNumber(obj) {
+ return toStr.call(obj) === '[object Number]';
+ }
+
+ function isTrue(obj) {
+ return obj === true;
+ }
+
+ function isFalse(obj) {
+ return obj === false;
+ }
+
+ function isNotNull(obj) {
+ return !isNull(obj);
+ }
+
+ function isEq(obj, obj2) {
+ /*jshint eqeqeq:false*/
+ return obj == obj2;
+ }
+
+ function isNeq(obj, obj2) {
+ /*jshint eqeqeq:false*/
+ return obj != obj2;
+ }
+
+ function isSeq(obj, obj2) {
+ return obj === obj2;
+ }
+
+ function isSneq(obj, obj2) {
+ return obj !== obj2;
+ }
+
+ function isIn(obj, arr) {
+ if ((isArray(arr) && Array.prototype.indexOf) || isString(arr)) {
+ return arr.indexOf(obj) > -1;
+ } else if (isArray(arr)) {
+ for (var i = 0, l = arr.length; i < l; i++) {
+ if (isEq(obj, arr[i])) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ function isNotIn(obj, arr) {
+ return !isIn(obj, arr);
+ }
+
+ function isLt(obj, obj2) {
+ return obj < obj2;
+ }
- return enIl;
+ function isLte(obj, obj2) {
+ return obj <= obj2;
+ }
-})));
+ function isGt(obj, obj2) {
+ return obj > obj2;
+ }
+ function isGte(obj, obj2) {
+ return obj >= obj2;
+ }
-/***/ }),
+ function isLike(obj, reg) {
+ if (isString(reg)) {
+ return ("" + obj).match(reg) !== null;
+ } else if (isRegExp(reg)) {
+ return reg.test(obj);
+ }
+ return false;
+ }
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-in.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-in.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ function isNotLike(obj, reg) {
+ return !isLike(obj, reg);
+ }
-//! moment.js locale configuration
-//! locale : English (India) [en-in]
-//! author : Jatin Agrawal : https://github.com/jatinag22
+ function contains(arr, obj) {
+ return isIn(obj, arr);
+ }
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ function notContains(arr, obj) {
+ return !isIn(obj, arr);
+ }
- //! moment.js locale configuration
+ function containsAt(arr, obj, index) {
+ if (isArray(arr) && arr.length > index) {
+ return isEq(arr[index], obj);
+ }
+ return false;
+ }
- var enIn = moment.defineLocale('en-in', {
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'
- ),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'
- ),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY h:mm A',
- LLLL: 'dddd, D MMMM YYYY h:mm A',
- },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function (number) {
- var b = number % 10,
- output =
- ~~((number % 100) / 10) === 1
- ? 'th'
- : b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
- return number + output;
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6, // The week that contains Jan 1st is the first week of the year.
- },
- });
+ function notContainsAt(arr, obj, index) {
+ if (isArray(arr)) {
+ return !isEq(arr[index], obj);
+ }
+ return false;
+ }
- return enIn;
+ function has(obj, prop) {
+ return hasOwn.call(obj, prop);
+ }
-})));
+ function notHas(obj, prop) {
+ return !has(obj, prop);
+ }
+ function length(obj, l) {
+ if (has(obj, "length")) {
+ return obj.length === l;
+ }
+ return false;
+ }
-/***/ }),
+ function notLength(obj, l) {
+ if (has(obj, "length")) {
+ return obj.length !== l;
+ }
+ return false;
+ }
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-nz.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-nz.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ var isa = {
+ isFunction: isFunction,
+ isObject: isObject,
+ isEmpty: isEmpty,
+ isHash: isHash,
+ isNumber: isNumber,
+ isString: isString,
+ isDate: isDate,
+ isArray: isArray,
+ isBoolean: isBoolean,
+ isUndefined: isUndefined,
+ isDefined: isDefined,
+ isUndefinedOrNull: isUndefinedOrNull,
+ isNull: isNull,
+ isArguments: isArguments,
+ instanceOf: isInstanceOf,
+ isRegExp: isRegExp,
+ deepEqual: deepEqual,
+ isTrue: isTrue,
+ isFalse: isFalse,
+ isNotNull: isNotNull,
+ isEq: isEq,
+ isNeq: isNeq,
+ isSeq: isSeq,
+ isSneq: isSneq,
+ isIn: isIn,
+ isNotIn: isNotIn,
+ isLt: isLt,
+ isLte: isLte,
+ isGt: isGt,
+ isGte: isGte,
+ isLike: isLike,
+ isNotLike: isNotLike,
+ contains: contains,
+ notContains: notContains,
+ has: has,
+ notHas: notHas,
+ isLength: length,
+ isNotLength: notLength,
+ containsAt: containsAt,
+ notContainsAt: notContainsAt
+ };
-//! moment.js locale configuration
-//! locale : English (New Zealand) [en-nz]
-//! author : Luke McGregor : https://github.com/lukemcgregor
+ var tester = {
+ constructor: function () {
+ this._testers = [];
+ },
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ noWrap: {
+ tester: function () {
+ var testers = this._testers;
+ return function tester(value) {
+ var isa = false;
+ for (var i = 0, l = testers.length; i < l && !isa; i++) {
+ isa = testers[i](value);
+ }
+ return isa;
+ };
+ }
+ }
+ };
- //! moment.js locale configuration
+ var switcher = {
+ constructor: function () {
+ this._cases = [];
+ this.__default = null;
+ },
- var enNz = moment.defineLocale('en-nz', {
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'
- ),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'
- ),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY h:mm A',
- LLLL: 'dddd, D MMMM YYYY h:mm A',
- },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function (number) {
- var b = number % 10,
- output =
- ~~((number % 100) / 10) === 1
- ? 'th'
- : b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+ def: function (val, fn) {
+ this.__default = fn;
+ },
- return enNz;
+ noWrap: {
+ switcher: function () {
+ var testers = this._cases, __default = this.__default;
+ return function tester() {
+ var handled = false, args = argsToArray(arguments), caseRet;
+ for (var i = 0, l = testers.length; i < l && !handled; i++) {
+ caseRet = testers[i](args);
+ if (caseRet.length > 1) {
+ if (caseRet[1] || caseRet[0]) {
+ return caseRet[1];
+ }
+ }
+ }
+ if (!handled && __default) {
+ return __default.apply(this, args);
+ }
+ };
+ }
+ }
+ };
+
+ function addToTester(func) {
+ tester[func] = function isaTester() {
+ this._testers.push(isa[func]);
+ };
+ }
+
+ function addToSwitcher(func) {
+ switcher[func] = function isaTester() {
+ var args = argsToArray(arguments, 1), isFunc = isa[func], handler, doBreak = true;
+ if (args.length <= isFunc.length - 1) {
+ throw new TypeError("A handler must be defined when calling using switch");
+ } else {
+ handler = args.pop();
+ if (isBoolean(handler)) {
+ doBreak = handler;
+ handler = args.pop();
+ }
+ }
+ if (!isFunction(handler)) {
+ throw new TypeError("handler must be defined");
+ }
+ this._cases.push(function (testArgs) {
+ if (isFunc.apply(isa, testArgs.concat(args))) {
+ return [doBreak, handler.apply(this, testArgs)];
+ }
+ return [false];
+ });
+ };
+ }
+
+ for (var i in isa) {
+ if (hasOwn.call(isa, i)) {
+ addToSwitcher(i);
+ addToTester(i);
+ }
+ }
+
+ var is = extended.define(isa).expose(isa);
+ is.tester = extended.define(tester);
+ is.switcher = extended.define(switcher);
+ return is;
+
+ }
+
+ if (true) {
+ if ( true && module.exports) {
+ module.exports = defineIsa(__webpack_require__(/*! extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extended/index.js"));
+
+ }
+ } else {}
+
+}).call(this);
-})));
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-sg.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-sg.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/leafy/index.js":
+/*!*****************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/leafy/index.js ***!
+ \*****************************************************************************************/
+/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
-//! moment.js locale configuration
-//! locale : English (Singapore) [en-sg]
-//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension
+(function () {
+ "use strict";
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ function defineLeafy(_) {
- //! moment.js locale configuration
+ function compare(a, b) {
+ var ret = 0;
+ if (a > b) {
+ return 1;
+ } else if (a < b) {
+ return -1;
+ } else if (!b) {
+ return 1;
+ }
+ return ret;
+ }
+
+ var multiply = _.multiply;
+
+ var Tree = _.declare({
+
+ instance: {
+
+ /**
+ * Prints a node
+ * @param node node to print
+ * @param level the current level the node is at, Used for formatting
+ */
+ __printNode: function (node, level) {
+ //console.log(level);
+ var str = [];
+ if (_.isUndefinedOrNull(node)) {
+ str.push(multiply('\t', level));
+ str.push("~");
+ console.log(str.join(""));
+ } else {
+ this.__printNode(node.right, level + 1);
+ str.push(multiply('\t', level));
+ str.push(node.data + "\n");
+ console.log(str.join(""));
+ this.__printNode(node.left, level + 1);
+ }
+ },
+
+ constructor: function (options) {
+ options = options || {};
+ this.compare = options.compare || compare;
+ this.__root = null;
+ },
+
+ insert: function () {
+ throw new Error("Not Implemented");
+ },
+
+ remove: function () {
+ throw new Error("Not Implemented");
+ },
+
+ clear: function () {
+ this.__root = null;
+ },
+
+ isEmpty: function () {
+ return !(this.__root);
+ },
+
+ traverseWithCondition: function (node, order, callback) {
+ var cont = true;
+ if (node) {
+ order = order || Tree.PRE_ORDER;
+ if (order === Tree.PRE_ORDER) {
+ cont = callback(node.data);
+ if (cont) {
+ cont = this.traverseWithCondition(node.left, order, callback);
+ if (cont) {
+ cont = this.traverseWithCondition(node.right, order, callback);
+ }
+
+ }
+ } else if (order === Tree.IN_ORDER) {
+ cont = this.traverseWithCondition(node.left, order, callback);
+ if (cont) {
+ cont = callback(node.data);
+ if (cont) {
+ cont = this.traverseWithCondition(node.right, order, callback);
+ }
+ }
+ } else if (order === Tree.POST_ORDER) {
+ cont = this.traverseWithCondition(node.left, order, callback);
+ if (cont) {
+ if (cont) {
+ cont = this.traverseWithCondition(node.right, order, callback);
+ }
+ if (cont) {
+ cont = callback(node.data);
+ }
+ }
+ } else if (order === Tree.REVERSE_ORDER) {
+ cont = this.traverseWithCondition(node.right, order, callback);
+ if (cont) {
+ cont = callback(node.data);
+ if (cont) {
+ cont = this.traverseWithCondition(node.left, order, callback);
+ }
+ }
+ }
+ }
+ return cont;
+ },
+
+ traverse: function (node, order, callback) {
+ if (node) {
+ order = order || Tree.PRE_ORDER;
+ if (order === Tree.PRE_ORDER) {
+ callback(node.data);
+ this.traverse(node.left, order, callback);
+ this.traverse(node.right, order, callback);
+ } else if (order === Tree.IN_ORDER) {
+ this.traverse(node.left, order, callback);
+ callback(node.data);
+ this.traverse(node.right, order, callback);
+ } else if (order === Tree.POST_ORDER) {
+ this.traverse(node.left, order, callback);
+ this.traverse(node.right, order, callback);
+ callback(node.data);
+ } else if (order === Tree.REVERSE_ORDER) {
+ this.traverse(node.right, order, callback);
+ callback(node.data);
+ this.traverse(node.left, order, callback);
+
+ }
+ }
+ },
+
+ forEach: function (cb, scope, order) {
+ if (typeof cb !== "function") {
+ throw new TypeError();
+ }
+ order = order || Tree.IN_ORDER;
+ scope = scope || this;
+ this.traverse(this.__root, order, function (node) {
+ cb.call(scope, node, this);
+ });
+ },
+
+ map: function (cb, scope, order) {
+ if (typeof cb !== "function") {
+ throw new TypeError();
+ }
+
+ order = order || Tree.IN_ORDER;
+ scope = scope || this;
+ var ret = new this._static();
+ this.traverse(this.__root, order, function (node) {
+ ret.insert(cb.call(scope, node, this));
+ });
+ return ret;
+ },
+
+ filter: function (cb, scope, order) {
+ if (typeof cb !== "function") {
+ throw new TypeError();
+ }
+
+ order = order || Tree.IN_ORDER;
+ scope = scope || this;
+ var ret = new this._static();
+ this.traverse(this.__root, order, function (node) {
+ if (cb.call(scope, node, this)) {
+ ret.insert(node);
+ }
+ });
+ return ret;
+ },
+
+ reduce: function (fun, accumulator, order) {
+ var arr = this.toArray(order);
+ var args = [arr, fun];
+ if (!_.isUndefinedOrNull(accumulator)) {
+ args.push(accumulator);
+ }
+ return _.reduce.apply(_, args);
+ },
+
+ reduceRight: function (fun, accumulator, order) {
+ var arr = this.toArray(order);
+ var args = [arr, fun];
+ if (!_.isUndefinedOrNull(accumulator)) {
+ args.push(accumulator);
+ }
+ return _.reduceRight.apply(_, args);
+ },
+
+ every: function (cb, scope, order) {
+ if (typeof cb !== "function") {
+ throw new TypeError();
+ }
+ order = order || Tree.IN_ORDER;
+ scope = scope || this;
+ var ret = false;
+ this.traverseWithCondition(this.__root, order, function (node) {
+ ret = cb.call(scope, node, this);
+ return ret;
+ });
+ return ret;
+ },
+
+ some: function (cb, scope, order) {
+ if (typeof cb !== "function") {
+ throw new TypeError();
+ }
+
+ order = order || Tree.IN_ORDER;
+ scope = scope || this;
+ var ret;
+ this.traverseWithCondition(this.__root, order, function (node) {
+ ret = cb.call(scope, node, this);
+ return !ret;
+ });
+ return ret;
+ },
+
+ toArray: function (order) {
+ order = order || Tree.IN_ORDER;
+ var arr = [];
+ this.traverse(this.__root, order, function (node) {
+ arr.push(node);
+ });
+ return arr;
+ },
+
+ contains: function (value) {
+ var ret = false;
+ var root = this.__root;
+ while (root !== null) {
+ var cmp = this.compare(value, root.data);
+ if (cmp) {
+ root = root[(cmp === -1) ? "left" : "right"];
+ } else {
+ ret = true;
+ root = null;
+ }
+ }
+ return ret;
+ },
+
+ find: function (value) {
+ var ret;
+ var root = this.__root;
+ while (root) {
+ var cmp = this.compare(value, root.data);
+ if (cmp) {
+ root = root[(cmp === -1) ? "left" : "right"];
+ } else {
+ ret = root.data;
+ break;
+ }
+ }
+ return ret;
+ },
+
+ findLessThan: function (value, exclusive) {
+ //find a better way!!!!
+ var ret = [], compare = this.compare;
+ this.traverseWithCondition(this.__root, Tree.IN_ORDER, function (v) {
+ var cmp = compare(value, v);
+ if ((!exclusive && cmp === 0) || cmp === 1) {
+ ret.push(v);
+ return true;
+ } else {
+ return false;
+ }
+ });
+ return ret;
+ },
+
+ findGreaterThan: function (value, exclusive) {
+ //find a better way!!!!
+ var ret = [], compare = this.compare;
+ this.traverse(this.__root, Tree.REVERSE_ORDER, function (v) {
+ var cmp = compare(value, v);
+ if ((!exclusive && cmp === 0) || cmp === -1) {
+ ret.push(v);
+ return true;
+ } else {
+ return false;
+ }
+ });
+ return ret;
+ },
+
+ print: function () {
+ this.__printNode(this.__root, 0);
+ }
+ },
+
+ "static": {
+ PRE_ORDER: "pre_order",
+ IN_ORDER: "in_order",
+ POST_ORDER: "post_order",
+ REVERSE_ORDER: "reverse_order"
+ }
+ });
+
+ var AVLTree = (function () {
+ var abs = Math.abs;
+
+
+ var makeNode = function (data) {
+ return {
+ data: data,
+ balance: 0,
+ left: null,
+ right: null
+ };
+ };
+
+ var rotateSingle = function (root, dir, otherDir) {
+ var save = root[otherDir];
+ root[otherDir] = save[dir];
+ save[dir] = root;
+ return save;
+ };
+
+
+ var rotateDouble = function (root, dir, otherDir) {
+ root[otherDir] = rotateSingle(root[otherDir], otherDir, dir);
+ return rotateSingle(root, dir, otherDir);
+ };
+
+ var adjustBalance = function (root, dir, bal) {
+ var otherDir = dir === "left" ? "right" : "left";
+ var n = root[dir], nn = n[otherDir];
+ if (nn.balance === 0) {
+ root.balance = n.balance = 0;
+ } else if (nn.balance === bal) {
+ root.balance = -bal;
+ n.balance = 0;
+ } else { /* nn.balance == -bal */
+ root.balance = 0;
+ n.balance = bal;
+ }
+ nn.balance = 0;
+ };
+
+ var insertAdjustBalance = function (root, dir) {
+ var otherDir = dir === "left" ? "right" : "left";
+
+ var n = root[dir];
+ var bal = dir === "right" ? -1 : +1;
+
+ if (n.balance === bal) {
+ root.balance = n.balance = 0;
+ root = rotateSingle(root, otherDir, dir);
+ } else {
+ adjustBalance(root, dir, bal);
+ root = rotateDouble(root, otherDir, dir);
+ }
+
+ return root;
+
+ };
+
+ var removeAdjustBalance = function (root, dir, done) {
+ var otherDir = dir === "left" ? "right" : "left";
+ var n = root[otherDir];
+ var bal = dir === "right" ? -1 : 1;
+ if (n.balance === -bal) {
+ root.balance = n.balance = 0;
+ root = rotateSingle(root, dir, otherDir);
+ } else if (n.balance === bal) {
+ adjustBalance(root, otherDir, -bal);
+ root = rotateDouble(root, dir, otherDir);
+ } else { /* n.balance == 0 */
+ root.balance = -bal;
+ n.balance = bal;
+ root = rotateSingle(root, dir, otherDir);
+ done.done = true;
+ }
+ return root;
+ };
+
+ function insert(tree, data, cmp) {
+ /* Empty tree case */
+ var root = tree.__root;
+ if (root === null || root === undefined) {
+ tree.__root = makeNode(data);
+ } else {
+ var it = root, upd = [], up = [], top = 0, dir;
+ while (true) {
+ dir = upd[top] = cmp(data, it.data) === -1 ? "left" : "right";
+ up[top++] = it;
+ if (!it[dir]) {
+ it[dir] = makeNode(data);
+ break;
+ }
+ it = it[dir];
+ }
+ if (!it[dir]) {
+ return null;
+ }
+ while (--top >= 0) {
+ up[top].balance += upd[top] === "right" ? -1 : 1;
+ if (up[top].balance === 0) {
+ break;
+ } else if (abs(up[top].balance) > 1) {
+ up[top] = insertAdjustBalance(up[top], upd[top]);
+ if (top !== 0) {
+ up[top - 1][upd[top - 1]] = up[top];
+ } else {
+ tree.__root = up[0];
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ function remove(tree, data, cmp) {
+ var root = tree.__root;
+ if (root !== null && root !== undefined) {
+ var it = root, top = 0, up = [], upd = [], done = {done: false}, dir, compare;
+ while (true) {
+ if (!it) {
+ return;
+ } else if ((compare = cmp(data, it.data)) === 0) {
+ break;
+ }
+ dir = upd[top] = compare === -1 ? "left" : "right";
+ up[top++] = it;
+ it = it[dir];
+ }
+ var l = it.left, r = it.right;
+ if (!l || !r) {
+ dir = !l ? "right" : "left";
+ if (top !== 0) {
+ up[top - 1][upd[top - 1]] = it[dir];
+ } else {
+ tree.__root = it[dir];
+ }
+ } else {
+ var heir = l;
+ upd[top] = "left";
+ up[top++] = it;
+ while (heir.right) {
+ upd[top] = "right";
+ up[top++] = heir;
+ heir = heir.right;
+ }
+ it.data = heir.data;
+ up[top - 1][up[top - 1] === it ? "left" : "right"] = heir.left;
+ }
+ while (--top >= 0 && !done.done) {
+ up[top].balance += upd[top] === "left" ? -1 : +1;
+ if (abs(up[top].balance) === 1) {
+ break;
+ } else if (abs(up[top].balance) > 1) {
+ up[top] = removeAdjustBalance(up[top], upd[top], done);
+ if (top !== 0) {
+ up[top - 1][upd[top - 1]] = up[top];
+ } else {
+ tree.__root = up[0];
+ }
+ }
+ }
+ }
+ }
+
+
+ return Tree.extend({
+ instance: {
+
+ insert: function (data) {
+ insert(this, data, this.compare);
+ },
+
+
+ remove: function (data) {
+ remove(this, data, this.compare);
+ },
+
+ __printNode: function (node, level) {
+ var str = [];
+ if (!node) {
+ str.push(multiply('\t', level));
+ str.push("~");
+ console.log(str.join(""));
+ } else {
+ this.__printNode(node.right, level + 1);
+ str.push(multiply('\t', level));
+ str.push(node.data + ":" + node.balance + "\n");
+ console.log(str.join(""));
+ this.__printNode(node.left, level + 1);
+ }
+ }
+
+ }
+ });
+ }());
+
+ var AnderssonTree = (function () {
+
+ var nil = {level: 0, data: null};
+
+ function makeNode(data, level) {
+ return {
+ data: data,
+ level: level,
+ left: nil,
+ right: nil
+ };
+ }
+
+ function skew(root) {
+ if (root.level !== 0 && root.left.level === root.level) {
+ var save = root.left;
+ root.left = save.right;
+ save.right = root;
+ root = save;
+ }
+ return root;
+ }
+
+ function split(root) {
+ if (root.level !== 0 && root.right.right.level === root.level) {
+ var save = root.right;
+ root.right = save.left;
+ save.left = root;
+ root = save;
+ root.level++;
+ }
+ return root;
+ }
+
+ function insert(root, data, compare) {
+ if (root === nil) {
+ root = makeNode(data, 1);
+ }
+ else {
+ var dir = compare(data, root.data) === -1 ? "left" : "right";
+ root[dir] = insert(root[dir], data, compare);
+ root = skew(root);
+ root = split(root);
+ }
+ return root;
+ }
+
+ var remove = function (root, data, compare) {
+ var rLeft, rRight;
+ if (root !== nil) {
+ var cmp = compare(data, root.data);
+ if (cmp === 0) {
+ rLeft = root.left, rRight = root.right;
+ if (rLeft !== nil && rRight !== nil) {
+ var heir = rLeft;
+ while (heir.right !== nil) {
+ heir = heir.right;
+ }
+ root.data = heir.data;
+ root.left = remove(rLeft, heir.data, compare);
+ } else {
+ root = root[rLeft === nil ? "right" : "left"];
+ }
+ } else {
+ var dir = cmp === -1 ? "left" : "right";
+ root[dir] = remove(root[dir], data, compare);
+ }
+ }
+ if (root !== nil) {
+ var rLevel = root.level;
+ var rLeftLevel = root.left.level, rRightLevel = root.right.level;
+ if (rLeftLevel < rLevel - 1 || rRightLevel < rLevel - 1) {
+ if (rRightLevel > --root.level) {
+ root.right.level = root.level;
+ }
+ root = skew(root);
+ root = split(root);
+ }
+ }
+ return root;
+ };
+
+ return Tree.extend({
+
+ instance: {
+
+ isEmpty: function () {
+ return this.__root === nil || this._super(arguments);
+ },
+
+ insert: function (data) {
+ if (!this.__root) {
+ this.__root = nil;
+ }
+ this.__root = insert(this.__root, data, this.compare);
+ },
+
+ remove: function (data) {
+ this.__root = remove(this.__root, data, this.compare);
+ },
- var enSg = moment.defineLocale('en-sg', {
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'
- ),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'
- ),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function (number) {
- var b = number % 10,
- output =
- ~~((number % 100) / 10) === 1
- ? 'th'
- : b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
- return enSg;
+ traverseWithCondition: function (node) {
+ var cont = true;
+ if (node !== nil) {
+ return this._super(arguments);
+ }
+ return cont;
+ },
-})));
+ traverse: function (node) {
+ if (node !== nil) {
+ this._super(arguments);
+ }
+ },
-/***/ }),
+ contains: function () {
+ if (this.__root !== nil) {
+ return this._super(arguments);
+ }
+ return false;
+ },
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/eo.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/eo.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ __printNode: function (node, level) {
+ var str = [];
+ if (!node || !node.data) {
+ str.push(multiply('\t', level));
+ str.push("~");
+ console.log(str.join(""));
+ } else {
+ this.__printNode(node.right, level + 1);
+ str.push(multiply('\t', level));
+ str.push(node.data + ":" + node.level + "\n");
+ console.log(str.join(""));
+ this.__printNode(node.left, level + 1);
+ }
+ }
-//! moment.js locale configuration
-//! locale : Esperanto [eo]
-//! author : Colin Dean : https://github.com/colindean
-//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia
-//! comment : miestasmia corrected the translation by colindean
-//! comment : Vivakvo corrected the translation by colindean and miestasmia
+ }
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ });
+ }());
- //! moment.js locale configuration
+ var BinaryTree = Tree.extend({
+ instance: {
+ insert: function (data) {
+ if (!this.__root) {
+ this.__root = {
+ data: data,
+ parent: null,
+ left: null,
+ right: null
+ };
+ return this.__root;
+ }
+ var compare = this.compare;
+ var root = this.__root;
+ while (root !== null) {
+ var cmp = compare(data, root.data);
+ if (cmp) {
+ var leaf = (cmp === -1) ? "left" : "right";
+ var next = root[leaf];
+ if (!next) {
+ return (root[leaf] = {data: data, parent: root, left: null, right: null});
+ } else {
+ root = next;
+ }
+ } else {
+ return;
+ }
+ }
+ },
- var eo = moment.defineLocale('eo', {
- months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(
- '_'
- ),
- monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),
- weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
- weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
- weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: '[la] D[-an de] MMMM, YYYY',
- LLL: '[la] D[-an de] MMMM, YYYY HH:mm',
- LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',
- llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',
- },
- meridiemParse: /[ap]\.t\.m/i,
- isPM: function (input) {
- return input.charAt(0).toLowerCase() === 'p';
- },
- meridiem: function (hours, minutes, isLower) {
- if (hours > 11) {
- return isLower ? 'p.t.m.' : 'P.T.M.';
- } else {
- return isLower ? 'a.t.m.' : 'A.T.M.';
+ remove: function (data) {
+ if (this.__root !== null) {
+ var head = {right: this.__root}, it = head;
+ var p, f = null;
+ var dir = "right";
+ while (it[dir] !== null) {
+ p = it;
+ it = it[dir];
+ var cmp = this.compare(data, it.data);
+ if (!cmp) {
+ f = it;
+ }
+ dir = (cmp === -1 ? "left" : "right");
+ }
+ if (f !== null) {
+ f.data = it.data;
+ p[p.right === it ? "right" : "left"] = it[it.left === null ? "right" : "left"];
+ }
+ this.__root = head.right;
+ }
+
+ }
}
- },
- calendar: {
- sameDay: '[Hodiaŭ je] LT',
- nextDay: '[Morgaŭ je] LT',
- nextWeek: 'dddd[n je] LT',
- lastDay: '[Hieraŭ je] LT',
- lastWeek: '[pasintan] dddd[n je] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'post %s',
- past: 'antaŭ %s',
- s: 'kelkaj sekundoj',
- ss: '%d sekundoj',
- m: 'unu minuto',
- mm: '%d minutoj',
- h: 'unu horo',
- hh: '%d horoj',
- d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo
- dd: '%d tagoj',
- M: 'unu monato',
- MM: '%d monatoj',
- y: 'unu jaro',
- yy: '%d jaroj',
- },
- dayOfMonthOrdinalParse: /\d{1,2}a/,
- ordinal: '%da',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+ });
- return eo;
+ var RedBlackTree = (function () {
+ var RED = "RED", BLACK = "BLACK";
-})));
+ var isRed = function (node) {
+ return node !== null && node.red;
+ };
+ var makeNode = function (data) {
+ return {
+ data: data,
+ red: true,
+ left: null,
+ right: null
+ };
+ };
-/***/ }),
+ var insert = function (root, data, compare) {
+ if (!root) {
+ return makeNode(data);
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/es-do.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/es-do.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ } else {
+ var cmp = compare(data, root.data);
+ if (cmp) {
+ var dir = cmp === -1 ? "left" : "right";
+ var otherDir = dir === "left" ? "right" : "left";
+ root[dir] = insert(root[dir], data, compare);
+ var node = root[dir];
-//! moment.js locale configuration
-//! locale : Spanish (Dominican Republic) [es-do]
+ if (isRed(node)) {
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ var sibling = root[otherDir];
+ if (isRed(sibling)) {
+ /* Case 1 */
+ root.red = true;
+ node.red = false;
+ sibling.red = false;
+ } else {
- //! moment.js locale configuration
+ if (isRed(node[dir])) {
- var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
- '_'
- ),
- monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
- monthsParse = [
- /^ene/i,
- /^feb/i,
- /^mar/i,
- /^abr/i,
- /^may/i,
- /^jun/i,
- /^jul/i,
- /^ago/i,
- /^sep/i,
- /^oct/i,
- /^nov/i,
- /^dic/i,
- ],
- monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
+ root = rotateSingle(root, otherDir);
+ } else if (isRed(node[otherDir])) {
- var esDo = moment.defineLocale('es-do', {
- months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
- '_'
- ),
- monthsShort: function (m, format) {
- if (!m) {
- return monthsShortDot;
- } else if (/-MMM-/.test(format)) {
- return monthsShort[m.month()];
- } else {
- return monthsShortDot[m.month()];
- }
- },
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
- monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY h:mm A',
- LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
- },
- calendar: {
- sameDay: function () {
- return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- nextDay: function () {
- return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- nextWeek: function () {
- return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- lastDay: function () {
- return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- lastWeek: function () {
- return (
- '[el] dddd [pasado a la' +
- (this.hours() !== 1 ? 's' : '') +
- '] LT'
- );
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'en %s',
- past: 'hace %s',
- s: 'unos segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'una hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- M: 'un mes',
- MM: '%d meses',
- y: 'un año',
- yy: '%d años',
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+ root = rotateDouble(root, otherDir);
+ }
+ }
- return esDo;
+ }
+ }
+ }
+ return root;
+ };
-})));
+ var rotateSingle = function (root, dir) {
+ var otherDir = dir === "left" ? "right" : "left";
+ var save = root[otherDir];
+ root[otherDir] = save[dir];
+ save[dir] = root;
+ root.red = true;
+ save.red = false;
+ return save;
+ };
+ var rotateDouble = function (root, dir) {
+ var otherDir = dir === "left" ? "right" : "left";
+ root[otherDir] = rotateSingle(root[otherDir], otherDir);
+ return rotateSingle(root, dir);
+ };
-/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/es-us.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/es-us.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ var remove = function (root, data, done, compare) {
+ if (!root) {
+ done.done = true;
+ } else {
+ var dir;
+ if (compare(data, root.data) === 0) {
+ if (!root.left || !root.right) {
+ var save = root[!root.left ? "right" : "left"];
+ /* Case 0 */
+ if (isRed(root)) {
+ done.done = true;
+ } else if (isRed(save)) {
+ save.red = false;
+ done.done = true;
+ }
+ return save;
+ }
+ else {
+ var heir = root.right, p;
+ while (heir.left !== null) {
+ p = heir;
+ heir = heir.left;
+ }
+ if (p) {
+ p.left = null;
+ }
+ root.data = heir.data;
+ data = heir.data;
+ }
+ }
+ dir = compare(data, root.data) === -1 ? "left" : "right";
+ root[dir] = remove(root[dir], data, done, compare);
+ if (!done.done) {
+ root = removeBalance(root, dir, done);
+ }
+ }
+ return root;
+ };
-//! moment.js locale configuration
-//! locale : Spanish (United States) [es-us]
-//! author : bustta : https://github.com/bustta
-//! author : chrisrodz : https://github.com/chrisrodz
+ var removeBalance = function (root, dir, done) {
+ var notDir = dir === "left" ? "right" : "left";
+ var p = root, s = p[notDir];
+ if (isRed(s)) {
+ root = rotateSingle(root, dir);
+ s = p[notDir];
+ }
+ if (s !== null) {
+ if (!isRed(s.left) && !isRed(s.right)) {
+ if (isRed(p)) {
+ done.done = true;
+ }
+ p.red = 0;
+ s.red = 1;
+ } else {
+ var save = p.red, newRoot = ( root === p );
+ p = (isRed(s[notDir]) ? rotateSingle : rotateDouble)(p, dir);
+ p.red = save;
+ p.left.red = p.right.red = 0;
+ if (newRoot) {
+ root = p;
+ } else {
+ root[dir] = p;
+ }
+ done.done = true;
+ }
+ }
+ return root;
+ };
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ return Tree.extend({
+ instance: {
+ insert: function (data) {
+ this.__root = insert(this.__root, data, this.compare);
+ this.__root.red = false;
+ },
- //! moment.js locale configuration
+ remove: function (data) {
+ var done = {done: false};
+ var root = remove(this.__root, data, done, this.compare);
+ if (root !== null) {
+ root.red = 0;
+ }
+ this.__root = root;
+ return data;
+ },
- var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
- '_'
- ),
- monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
- monthsParse = [
- /^ene/i,
- /^feb/i,
- /^mar/i,
- /^abr/i,
- /^may/i,
- /^jun/i,
- /^jul/i,
- /^ago/i,
- /^sep/i,
- /^oct/i,
- /^nov/i,
- /^dic/i,
- ],
- monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
- var esUs = moment.defineLocale('es-us', {
- months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
- '_'
- ),
- monthsShort: function (m, format) {
- if (!m) {
- return monthsShortDot;
- } else if (/-MMM-/.test(format)) {
- return monthsShort[m.month()];
- } else {
- return monthsShortDot[m.month()];
- }
- },
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
- monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'MM/DD/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY h:mm A',
- LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',
- },
- calendar: {
- sameDay: function () {
- return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- nextDay: function () {
- return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- nextWeek: function () {
- return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- lastDay: function () {
- return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- lastWeek: function () {
- return (
- '[el] dddd [pasado a la' +
- (this.hours() !== 1 ? 's' : '') +
- '] LT'
- );
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'en %s',
- past: 'hace %s',
- s: 'unos segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'una hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- M: 'un mes',
- MM: '%d meses',
- y: 'un año',
- yy: '%d años',
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6, // The week that contains Jan 6th is the first week of the year.
- },
- });
+ __printNode: function (node, level) {
+ var str = [];
+ if (!node) {
+ str.push(multiply('\t', level));
+ str.push("~");
+ console.log(str.join(""));
+ } else {
+ this.__printNode(node.right, level + 1);
+ str.push(multiply('\t', level));
+ str.push((node.red ? RED : BLACK) + ":" + node.data + "\n");
+ console.log(str.join(""));
+ this.__printNode(node.left, level + 1);
+ }
+ }
- return esUs;
+ }
+ });
-})));
+ }());
-/***/ }),
+ return {
+ Tree: Tree,
+ AVLTree: AVLTree,
+ AnderssonTree: AnderssonTree,
+ BinaryTree: BinaryTree,
+ RedBlackTree: RedBlackTree,
+ IN_ORDER: Tree.IN_ORDER,
+ PRE_ORDER: Tree.PRE_ORDER,
+ POST_ORDER: Tree.POST_ORDER,
+ REVERSE_ORDER: Tree.REVERSE_ORDER
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/es.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/es.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ };
+ }
-//! moment.js locale configuration
-//! locale : Spanish [es]
-//! author : Julio Napurí : https://github.com/julionc
+ if (true) {
+ if ( true && module.exports) {
+ module.exports = defineLeafy(__webpack_require__(/*! extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extended/index.js")()
+ .register("declare", __webpack_require__(/*! declare.js */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/declare.js/index.js"))
+ .register(__webpack_require__(/*! is-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/is-extended/index.js"))
+ .register(__webpack_require__(/*! array-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/array-extended/index.js"))
+ .register(__webpack_require__(/*! string-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/string-extended/index.js"))
+ );
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ }
+ } else {}
- //! moment.js locale configuration
+}).call(this);
- var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(
- '_'
- ),
- monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
- monthsParse = [
- /^ene/i,
- /^feb/i,
- /^mar/i,
- /^abr/i,
- /^may/i,
- /^jun/i,
- /^jul/i,
- /^ago/i,
- /^sep/i,
- /^oct/i,
- /^nov/i,
- /^dic/i,
- ],
- monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
- var es = moment.defineLocale('es', {
- months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(
- '_'
- ),
- monthsShort: function (m, format) {
- if (!m) {
- return monthsShortDot;
- } else if (/-MMM-/.test(format)) {
- return monthsShort[m.month()];
- } else {
- return monthsShortDot[m.month()];
- }
- },
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
- monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY H:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
- },
- calendar: {
- sameDay: function () {
- return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- nextDay: function () {
- return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- nextWeek: function () {
- return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- lastDay: function () {
- return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';
- },
- lastWeek: function () {
- return (
- '[el] dddd [pasado a la' +
- (this.hours() !== 1 ? 's' : '') +
- '] LT'
- );
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'en %s',
- past: 'hace %s',
- s: 'unos segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'una hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- M: 'un mes',
- MM: '%d meses',
- y: 'un año',
- yy: '%d años',
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- invalidDate: 'Fecha invalida',
- });
- return es;
-})));
-/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/et.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/et.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
-//! moment.js locale configuration
-//! locale : Estonian [et]
-//! author : Henry Kehlmann : https://github.com/madhenry
-//! improvements : Illimar Tambek : https://github.com/ragulka
+/***/ }),
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_DataView.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_DataView.js ***!
+ \**********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- //! moment.js locale configuration
+var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getNative.js"),
+ root = __webpack_require__(/*! ./_root */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_root.js");
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var format = {
- s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
- ss: [number + 'sekundi', number + 'sekundit'],
- m: ['ühe minuti', 'üks minut'],
- mm: [number + ' minuti', number + ' minutit'],
- h: ['ühe tunni', 'tund aega', 'üks tund'],
- hh: [number + ' tunni', number + ' tundi'],
- d: ['ühe päeva', 'üks päev'],
- M: ['kuu aja', 'kuu aega', 'üks kuu'],
- MM: [number + ' kuu', number + ' kuud'],
- y: ['ühe aasta', 'aasta', 'üks aasta'],
- yy: [number + ' aasta', number + ' aastat'],
- };
- if (withoutSuffix) {
- return format[key][2] ? format[key][2] : format[key][1];
- }
- return isFuture ? format[key][0] : format[key][1];
- }
+/* Built-in method references that are verified to be native. */
+var DataView = getNative(root, 'DataView');
- var et = moment.defineLocale('et', {
- months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(
- '_'
- ),
- monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split(
- '_'
- ),
- weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(
- '_'
- ),
- weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
- weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd, D. MMMM YYYY H:mm',
- },
- calendar: {
- sameDay: '[Täna,] LT',
- nextDay: '[Homme,] LT',
- nextWeek: '[Järgmine] dddd LT',
- lastDay: '[Eile,] LT',
- lastWeek: '[Eelmine] dddd LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s pärast',
- past: '%s tagasi',
- s: processRelativeTime,
- ss: processRelativeTime,
- m: processRelativeTime,
- mm: processRelativeTime,
- h: processRelativeTime,
- hh: processRelativeTime,
- d: processRelativeTime,
- dd: '%d päeva',
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+module.exports = DataView;
- return et;
-})));
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Hash.js":
+/*!******************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Hash.js ***!
+ \******************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+var hashClear = __webpack_require__(/*! ./_hashClear */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hashClear.js"),
+ hashDelete = __webpack_require__(/*! ./_hashDelete */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hashDelete.js"),
+ hashGet = __webpack_require__(/*! ./_hashGet */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hashGet.js"),
+ hashHas = __webpack_require__(/*! ./_hashHas */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hashHas.js"),
+ hashSet = __webpack_require__(/*! ./_hashSet */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hashSet.js");
-/***/ }),
+/**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function Hash(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/eu.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/eu.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
-//! moment.js locale configuration
-//! locale : Basque [eu]
-//! author : Eneko Illarramendi : https://github.com/eillarra
+// Add methods to `Hash`.
+Hash.prototype.clear = hashClear;
+Hash.prototype['delete'] = hashDelete;
+Hash.prototype.get = hashGet;
+Hash.prototype.has = hashHas;
+Hash.prototype.set = hashSet;
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+module.exports = Hash;
- //! moment.js locale configuration
- var eu = moment.defineLocale('eu', {
- months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(
- '_'
- ),
- monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(
- '_'
- ),
- weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),
- weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'YYYY[ko] MMMM[ren] D[a]',
- LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',
- LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
- l: 'YYYY-M-D',
- ll: 'YYYY[ko] MMM D[a]',
- lll: 'YYYY[ko] MMM D[a] HH:mm',
- llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',
- },
- calendar: {
- sameDay: '[gaur] LT[etan]',
- nextDay: '[bihar] LT[etan]',
- nextWeek: 'dddd LT[etan]',
- lastDay: '[atzo] LT[etan]',
- lastWeek: '[aurreko] dddd LT[etan]',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s barru',
- past: 'duela %s',
- s: 'segundo batzuk',
- ss: '%d segundo',
- m: 'minutu bat',
- mm: '%d minutu',
- h: 'ordu bat',
- hh: '%d ordu',
- d: 'egun bat',
- dd: '%d egun',
- M: 'hilabete bat',
- MM: '%d hilabete',
- y: 'urte bat',
- yy: '%d urte',
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+/***/ }),
- return eu;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_ListCache.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_ListCache.js ***!
+ \***********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-})));
+var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_listCacheClear.js"),
+ listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_listCacheDelete.js"),
+ listCacheGet = __webpack_require__(/*! ./_listCacheGet */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_listCacheGet.js"),
+ listCacheHas = __webpack_require__(/*! ./_listCacheHas */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_listCacheHas.js"),
+ listCacheSet = __webpack_require__(/*! ./_listCacheSet */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_listCacheSet.js");
+/**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function ListCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
-/***/ }),
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fa.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fa.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+// Add methods to `ListCache`.
+ListCache.prototype.clear = listCacheClear;
+ListCache.prototype['delete'] = listCacheDelete;
+ListCache.prototype.get = listCacheGet;
+ListCache.prototype.has = listCacheHas;
+ListCache.prototype.set = listCacheSet;
-//! moment.js locale configuration
-//! locale : Persian [fa]
-//! author : Ebrahim Byagowi : https://github.com/ebraminio
+module.exports = ListCache;
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
- //! moment.js locale configuration
+/***/ }),
- var symbolMap = {
- '1': '۱',
- '2': '۲',
- '3': '۳',
- '4': '۴',
- '5': '۵',
- '6': '۶',
- '7': '۷',
- '8': '۸',
- '9': '۹',
- '0': '۰',
- },
- numberMap = {
- '۱': '1',
- '۲': '2',
- '۳': '3',
- '۴': '4',
- '۵': '5',
- '۶': '6',
- '۷': '7',
- '۸': '8',
- '۹': '9',
- '۰': '0',
- };
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Map.js":
+/*!*****************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Map.js ***!
+ \*****************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- var fa = moment.defineLocale('fa', {
- months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
- '_'
- ),
- monthsShort: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(
- '_'
- ),
- weekdays: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
- '_'
- ),
- weekdaysShort: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split(
- '_'
- ),
- weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- meridiemParse: /قبل از ظهر|بعد از ظهر/,
- isPM: function (input) {
- return /بعد از ظهر/.test(input);
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 12) {
- return 'قبل از ظهر';
- } else {
- return 'بعد از ظهر';
- }
- },
- calendar: {
- sameDay: '[امروز ساعت] LT',
- nextDay: '[فردا ساعت] LT',
- nextWeek: 'dddd [ساعت] LT',
- lastDay: '[دیروز ساعت] LT',
- lastWeek: 'dddd [پیش] [ساعت] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'در %s',
- past: '%s پیش',
- s: 'چند ثانیه',
- ss: '%d ثانیه',
- m: 'یک دقیقه',
- mm: '%d دقیقه',
- h: 'یک ساعت',
- hh: '%d ساعت',
- d: 'یک روز',
- dd: '%d روز',
- M: 'یک ماه',
- MM: '%d ماه',
- y: 'یک سال',
- yy: '%d سال',
- },
- preparse: function (string) {
- return string
- .replace(/[۰-۹]/g, function (match) {
- return numberMap[match];
- })
- .replace(/،/g, ',');
- },
- postformat: function (string) {
- return string
- .replace(/\d/g, function (match) {
- return symbolMap[match];
- })
- .replace(/,/g, '،');
- },
- dayOfMonthOrdinalParse: /\d{1,2}م/,
- ordinal: '%dم',
- week: {
- dow: 6, // Saturday is the first day of the week.
- doy: 12, // The week that contains Jan 12th is the first week of the year.
- },
- });
+var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getNative.js"),
+ root = __webpack_require__(/*! ./_root */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_root.js");
- return fa;
+/* Built-in method references that are verified to be native. */
+var Map = getNative(root, 'Map');
-})));
+module.exports = Map;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fi.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fi.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_MapCache.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_MapCache.js ***!
+ \**********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Finnish [fi]
-//! author : Tarmo Aidantausta : https://github.com/bleadof
+var mapCacheClear = __webpack_require__(/*! ./_mapCacheClear */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapCacheClear.js"),
+ mapCacheDelete = __webpack_require__(/*! ./_mapCacheDelete */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapCacheDelete.js"),
+ mapCacheGet = __webpack_require__(/*! ./_mapCacheGet */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapCacheGet.js"),
+ mapCacheHas = __webpack_require__(/*! ./_mapCacheHas */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapCacheHas.js"),
+ mapCacheSet = __webpack_require__(/*! ./_mapCacheSet */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapCacheSet.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function MapCache(entries) {
+ var index = -1,
+ length = entries == null ? 0 : entries.length;
- //! moment.js locale configuration
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
- var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(
- ' '
- ),
- numbersFuture = [
- 'nolla',
- 'yhden',
- 'kahden',
- 'kolmen',
- 'neljän',
- 'viiden',
- 'kuuden',
- numbersPast[7],
- numbersPast[8],
- numbersPast[9],
- ];
- function translate(number, withoutSuffix, key, isFuture) {
- var result = '';
- switch (key) {
- case 's':
- return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
- case 'ss':
- return isFuture ? 'sekunnin' : 'sekuntia';
- case 'm':
- return isFuture ? 'minuutin' : 'minuutti';
- case 'mm':
- result = isFuture ? 'minuutin' : 'minuuttia';
- break;
- case 'h':
- return isFuture ? 'tunnin' : 'tunti';
- case 'hh':
- result = isFuture ? 'tunnin' : 'tuntia';
- break;
- case 'd':
- return isFuture ? 'päivän' : 'päivä';
- case 'dd':
- result = isFuture ? 'päivän' : 'päivää';
- break;
- case 'M':
- return isFuture ? 'kuukauden' : 'kuukausi';
- case 'MM':
- result = isFuture ? 'kuukauden' : 'kuukautta';
- break;
- case 'y':
- return isFuture ? 'vuoden' : 'vuosi';
- case 'yy':
- result = isFuture ? 'vuoden' : 'vuotta';
- break;
- }
- result = verbalNumber(number, isFuture) + ' ' + result;
- return result;
- }
- function verbalNumber(number, isFuture) {
- return number < 10
- ? isFuture
- ? numbersFuture[number]
- : numbersPast[number]
- : number;
- }
+// Add methods to `MapCache`.
+MapCache.prototype.clear = mapCacheClear;
+MapCache.prototype['delete'] = mapCacheDelete;
+MapCache.prototype.get = mapCacheGet;
+MapCache.prototype.has = mapCacheHas;
+MapCache.prototype.set = mapCacheSet;
- var fi = moment.defineLocale('fi', {
- months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(
- '_'
- ),
- monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(
- '_'
- ),
- weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(
- '_'
- ),
- weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
- weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
- longDateFormat: {
- LT: 'HH.mm',
- LTS: 'HH.mm.ss',
- L: 'DD.MM.YYYY',
- LL: 'Do MMMM[ta] YYYY',
- LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
- LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
- l: 'D.M.YYYY',
- ll: 'Do MMM YYYY',
- lll: 'Do MMM YYYY, [klo] HH.mm',
- llll: 'ddd, Do MMM YYYY, [klo] HH.mm',
- },
- calendar: {
- sameDay: '[tänään] [klo] LT',
- nextDay: '[huomenna] [klo] LT',
- nextWeek: 'dddd [klo] LT',
- lastDay: '[eilen] [klo] LT',
- lastWeek: '[viime] dddd[na] [klo] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s päästä',
- past: '%s sitten',
- s: translate,
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: translate,
- dd: translate,
- M: translate,
- MM: translate,
- y: translate,
- yy: translate,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+module.exports = MapCache;
- return fi;
-})));
+/***/ }),
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Promise.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Promise.js ***!
+ \*********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-/***/ }),
+var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getNative.js"),
+ root = __webpack_require__(/*! ./_root */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_root.js");
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fil.js":
-/*!****************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fil.js ***!
- \****************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/* Built-in method references that are verified to be native. */
+var Promise = getNative(root, 'Promise');
-//! moment.js locale configuration
-//! locale : Filipino [fil]
-//! author : Dan Hagman : https://github.com/hagmandan
-//! author : Matthew Co : https://github.com/matthewdeeco
+module.exports = Promise;
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
- //! moment.js locale configuration
+/***/ }),
- var fil = moment.defineLocale('fil', {
- months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
- '_'
- ),
- monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
- weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
- '_'
- ),
- weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
- weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'MM/D/YYYY',
- LL: 'MMMM D, YYYY',
- LLL: 'MMMM D, YYYY HH:mm',
- LLLL: 'dddd, MMMM DD, YYYY HH:mm',
- },
- calendar: {
- sameDay: 'LT [ngayong araw]',
- nextDay: '[Bukas ng] LT',
- nextWeek: 'LT [sa susunod na] dddd',
- lastDay: 'LT [kahapon]',
- lastWeek: 'LT [noong nakaraang] dddd',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'sa loob ng %s',
- past: '%s ang nakalipas',
- s: 'ilang segundo',
- ss: '%d segundo',
- m: 'isang minuto',
- mm: '%d minuto',
- h: 'isang oras',
- hh: '%d oras',
- d: 'isang araw',
- dd: '%d araw',
- M: 'isang buwan',
- MM: '%d buwan',
- y: 'isang taon',
- yy: '%d taon',
- },
- dayOfMonthOrdinalParse: /\d{1,2}/,
- ordinal: function (number) {
- return number;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Set.js":
+/*!*****************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Set.js ***!
+ \*****************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- return fil;
+var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getNative.js"),
+ root = __webpack_require__(/*! ./_root */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_root.js");
-})));
+/* Built-in method references that are verified to be native. */
+var Set = getNative(root, 'Set');
+
+module.exports = Set;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fo.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fo.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_SetCache.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_SetCache.js ***!
+ \**********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Faroese [fo]
-//! author : Ragnar Johannesen : https://github.com/ragnar123
-//! author : Kristian Sakarisson : https://github.com/sakarisson
+var MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_MapCache.js"),
+ setCacheAdd = __webpack_require__(/*! ./_setCacheAdd */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_setCacheAdd.js"),
+ setCacheHas = __webpack_require__(/*! ./_setCacheHas */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_setCacheHas.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+function SetCache(values) {
+ var index = -1,
+ length = values == null ? 0 : values.length;
- //! moment.js locale configuration
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.add(values[index]);
+ }
+}
- var fo = moment.defineLocale('fo', {
- months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(
- '_'
- ),
- monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
- weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(
- '_'
- ),
- weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
- weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D. MMMM, YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Í dag kl.] LT',
- nextDay: '[Í morgin kl.] LT',
- nextWeek: 'dddd [kl.] LT',
- lastDay: '[Í gjár kl.] LT',
- lastWeek: '[síðstu] dddd [kl] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'um %s',
- past: '%s síðani',
- s: 'fá sekund',
- ss: '%d sekundir',
- m: 'ein minuttur',
- mm: '%d minuttir',
- h: 'ein tími',
- hh: '%d tímar',
- d: 'ein dagur',
- dd: '%d dagar',
- M: 'ein mánaður',
- MM: '%d mánaðir',
- y: 'eitt ár',
- yy: '%d ár',
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+// Add methods to `SetCache`.
+SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+SetCache.prototype.has = setCacheHas;
- return fo;
+module.exports = SetCache;
-})));
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Stack.js":
+/*!*******************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Stack.js ***!
+ \*******************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_ListCache.js"),
+ stackClear = __webpack_require__(/*! ./_stackClear */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stackClear.js"),
+ stackDelete = __webpack_require__(/*! ./_stackDelete */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stackDelete.js"),
+ stackGet = __webpack_require__(/*! ./_stackGet */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stackGet.js"),
+ stackHas = __webpack_require__(/*! ./_stackHas */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stackHas.js"),
+ stackSet = __webpack_require__(/*! ./_stackSet */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stackSet.js");
+
+/**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function Stack(entries) {
+ var data = this.__data__ = new ListCache(entries);
+ this.size = data.size;
+}
+
+// Add methods to `Stack`.
+Stack.prototype.clear = stackClear;
+Stack.prototype['delete'] = stackDelete;
+Stack.prototype.get = stackGet;
+Stack.prototype.has = stackHas;
+Stack.prototype.set = stackSet;
+
+module.exports = Stack;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fr-ca.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fr-ca.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Symbol.js":
+/*!********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Symbol.js ***!
+ \********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : French (Canada) [fr-ca]
-//! author : Jonathan Abourbih : https://github.com/jonbca
+var root = __webpack_require__(/*! ./_root */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_root.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Built-in value references. */
+var Symbol = root.Symbol;
- //! moment.js locale configuration
+module.exports = Symbol;
- var frCa = moment.defineLocale('fr-ca', {
- months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
- '_'
- ),
- monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
- weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
- weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Aujourd’hui à] LT',
- nextDay: '[Demain à] LT',
- nextWeek: 'dddd [à] LT',
- lastDay: '[Hier à] LT',
- lastWeek: 'dddd [dernier à] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'dans %s',
- past: 'il y a %s',
- s: 'quelques secondes',
- ss: '%d secondes',
- m: 'une minute',
- mm: '%d minutes',
- h: 'une heure',
- hh: '%d heures',
- d: 'un jour',
- dd: '%d jours',
- M: 'un mois',
- MM: '%d mois',
- y: 'un an',
- yy: '%d ans',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
- ordinal: function (number, period) {
- switch (period) {
- // Words with masculine grammatical gender: mois, trimestre, jour
- default:
- case 'M':
- case 'Q':
- case 'D':
- case 'DDD':
- case 'd':
- return number + (number === 1 ? 'er' : 'e');
- // Words with feminine grammatical gender: semaine
- case 'w':
- case 'W':
- return number + (number === 1 ? 're' : 'e');
- }
- },
- });
+/***/ }),
- return frCa;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Uint8Array.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Uint8Array.js ***!
+ \************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-})));
+var root = __webpack_require__(/*! ./_root */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_root.js");
+
+/** Built-in value references. */
+var Uint8Array = root.Uint8Array;
+
+module.exports = Uint8Array;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fr-ch.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fr-ch.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_WeakMap.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_WeakMap.js ***!
+ \*********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : French (Switzerland) [fr-ch]
-//! author : Gaspard Bucher : https://github.com/gaspard
+var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getNative.js"),
+ root = __webpack_require__(/*! ./_root */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_root.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/* Built-in method references that are verified to be native. */
+var WeakMap = getNative(root, 'WeakMap');
- //! moment.js locale configuration
+module.exports = WeakMap;
- var frCh = moment.defineLocale('fr-ch', {
- months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
- '_'
- ),
- monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
- weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
- weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Aujourd’hui à] LT',
- nextDay: '[Demain à] LT',
- nextWeek: 'dddd [à] LT',
- lastDay: '[Hier à] LT',
- lastWeek: 'dddd [dernier à] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'dans %s',
- past: 'il y a %s',
- s: 'quelques secondes',
- ss: '%d secondes',
- m: 'une minute',
- mm: '%d minutes',
- h: 'une heure',
- hh: '%d heures',
- d: 'un jour',
- dd: '%d jours',
- M: 'un mois',
- MM: '%d mois',
- y: 'un an',
- yy: '%d ans',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
- ordinal: function (number, period) {
- switch (period) {
- // Words with masculine grammatical gender: mois, trimestre, jour
- default:
- case 'M':
- case 'Q':
- case 'D':
- case 'DDD':
- case 'd':
- return number + (number === 1 ? 'er' : 'e');
- // Words with feminine grammatical gender: semaine
- case 'w':
- case 'W':
- return number + (number === 1 ? 're' : 'e');
- }
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/***/ }),
- return frCh;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayFilter.js":
+/*!*************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayFilter.js ***!
+ \*************************************************************************************************/
+/***/ ((module) => {
-})));
+/**
+ * A specialized version of `_.filter` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+}
+
+module.exports = arrayFilter;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fr.js":
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayIncludes.js":
/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fr.js ***!
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayIncludes.js ***!
\***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : French [fr]
-//! author : John Fischer : https://github.com/jfroffice
+var baseIndexOf = __webpack_require__(/*! ./_baseIndexOf */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIndexOf.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * A specialized version of `_.includes` for arrays without support for
+ * specifying an index to search from.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+function arrayIncludes(array, value) {
+ var length = array == null ? 0 : array.length;
+ return !!length && baseIndexOf(array, value, 0) > -1;
+}
- //! moment.js locale configuration
+module.exports = arrayIncludes;
- var fr = moment.defineLocale('fr', {
- months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
- '_'
- ),
- monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
- weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
- weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Aujourd’hui à] LT',
- nextDay: '[Demain à] LT',
- nextWeek: 'dddd [à] LT',
- lastDay: '[Hier à] LT',
- lastWeek: 'dddd [dernier à] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'dans %s',
- past: 'il y a %s',
- s: 'quelques secondes',
- ss: '%d secondes',
- m: 'une minute',
- mm: '%d minutes',
- h: 'une heure',
- hh: '%d heures',
- d: 'un jour',
- dd: '%d jours',
- M: 'un mois',
- MM: '%d mois',
- y: 'un an',
- yy: '%d ans',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
- ordinal: function (number, period) {
- switch (period) {
- // TODO: Return 'e' when day of month > 1. Move this case inside
- // block for masculine words below.
- // See https://github.com/moment/moment/issues/3375
- case 'D':
- return number + (number === 1 ? 'er' : '');
- // Words with masculine grammatical gender: mois, trimestre, jour
- default:
- case 'M':
- case 'Q':
- case 'DDD':
- case 'd':
- return number + (number === 1 ? 'er' : 'e');
+/***/ }),
- // Words with feminine grammatical gender: semaine
- case 'w':
- case 'W':
- return number + (number === 1 ? 're' : 'e');
- }
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayIncludesWith.js":
+/*!*******************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayIncludesWith.js ***!
+ \*******************************************************************************************************/
+/***/ ((module) => {
- return fr;
+/**
+ * This function is like `arrayIncludes` except that it accepts a comparator.
+ *
+ * @private
+ * @param {Array} [array] The array to inspect.
+ * @param {*} target The value to search for.
+ * @param {Function} comparator The comparator invoked per element.
+ * @returns {boolean} Returns `true` if `target` is found, else `false`.
+ */
+function arrayIncludesWith(array, value, comparator) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
-})));
+ while (++index < length) {
+ if (comparator(value, array[index])) {
+ return true;
+ }
+ }
+ return false;
+}
+
+module.exports = arrayIncludesWith;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fy.js":
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayLikeKeys.js":
/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fy.js ***!
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayLikeKeys.js ***!
\***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Frisian [fy]
-//! author : Robin van der Vliet : https://github.com/robin0van0der0v
+var baseTimes = __webpack_require__(/*! ./_baseTimes */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseTimes.js"),
+ isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArguments.js"),
+ isArray = __webpack_require__(/*! ./isArray */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArray.js"),
+ isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isBuffer.js"),
+ isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isIndex.js"),
+ isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isTypedArray.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
- //! moment.js locale configuration
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
- var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split(
- '_'
- ),
- monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split(
- '_'
- );
+/**
+ * Creates an array of the enumerable property names of the array-like `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
+ */
+function arrayLikeKeys(value, inherited) {
+ var isArr = isArray(value),
+ isArg = !isArr && isArguments(value),
+ isBuff = !isArr && !isArg && isBuffer(value),
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
+ skipIndexes = isArr || isArg || isBuff || isType,
+ result = skipIndexes ? baseTimes(value.length, String) : [],
+ length = result.length;
- var fy = moment.defineLocale('fy', {
- months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(
- '_'
- ),
- monthsShort: function (m, format) {
- if (!m) {
- return monthsShortWithDots;
- } else if (/-MMM-/.test(format)) {
- return monthsShortWithoutDots[m.month()];
- } else {
- return monthsShortWithDots[m.month()];
- }
- },
- monthsParseExact: true,
- weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(
- '_'
- ),
- weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),
- weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD-MM-YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[hjoed om] LT',
- nextDay: '[moarn om] LT',
- nextWeek: 'dddd [om] LT',
- lastDay: '[juster om] LT',
- lastWeek: '[ôfrûne] dddd [om] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'oer %s',
- past: '%s lyn',
- s: 'in pear sekonden',
- ss: '%d sekonden',
- m: 'ien minút',
- mm: '%d minuten',
- h: 'ien oere',
- hh: '%d oeren',
- d: 'ien dei',
- dd: '%d dagen',
- M: 'ien moanne',
- MM: '%d moannen',
- y: 'ien jier',
- yy: '%d jierren',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
- ordinal: function (number) {
- return (
- number +
- (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
- );
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+ for (var key in value) {
+ if ((inherited || hasOwnProperty.call(value, key)) &&
+ !(skipIndexes && (
+ // Safari 9 has enumerable `arguments.length` in strict mode.
+ key == 'length' ||
+ // Node.js 0.10 has enumerable non-index properties on buffers.
+ (isBuff && (key == 'offset' || key == 'parent')) ||
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
+ // Skip index properties.
+ isIndex(key, length)
+ ))) {
+ result.push(key);
+ }
+ }
+ return result;
+}
- return fy;
+module.exports = arrayLikeKeys;
-})));
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayMap.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayMap.js ***!
+ \**********************************************************************************************/
+/***/ ((module) => {
+
+/**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+}
+
+module.exports = arrayMap;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ga.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ga.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayPush.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayPush.js ***!
+ \***********************************************************************************************/
+/***/ ((module) => {
-//! moment.js locale configuration
-//! locale : Irish or Irish Gaelic [ga]
-//! author : André Silva : https://github.com/askpt
+/**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+}
- //! moment.js locale configuration
+module.exports = arrayPush;
- var months = [
- 'Eanáir',
- 'Feabhra',
- 'Márta',
- 'Aibreán',
- 'Bealtaine',
- 'Meitheamh',
- 'Iúil',
- 'Lúnasa',
- 'Meán Fómhair',
- 'Deireadh Fómhair',
- 'Samhain',
- 'Nollaig',
- ],
- monthsShort = [
- 'Ean',
- 'Feabh',
- 'Márt',
- 'Aib',
- 'Beal',
- 'Meith',
- 'Iúil',
- 'Lún',
- 'M.F.',
- 'D.F.',
- 'Samh',
- 'Noll',
- ],
- weekdays = [
- 'Dé Domhnaigh',
- 'Dé Luain',
- 'Dé Máirt',
- 'Dé Céadaoin',
- 'Déardaoin',
- 'Dé hAoine',
- 'Dé Sathairn',
- ],
- weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],
- weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];
- var ga = moment.defineLocale('ga', {
- months: months,
- monthsShort: monthsShort,
- monthsParseExact: true,
- weekdays: weekdays,
- weekdaysShort: weekdaysShort,
- weekdaysMin: weekdaysMin,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Inniu ag] LT',
- nextDay: '[Amárach ag] LT',
- nextWeek: 'dddd [ag] LT',
- lastDay: '[Inné ag] LT',
- lastWeek: 'dddd [seo caite] [ag] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'i %s',
- past: '%s ó shin',
- s: 'cúpla soicind',
- ss: '%d soicind',
- m: 'nóiméad',
- mm: '%d nóiméad',
- h: 'uair an chloig',
- hh: '%d uair an chloig',
- d: 'lá',
- dd: '%d lá',
- M: 'mí',
- MM: '%d míonna',
- y: 'bliain',
- yy: '%d bliain',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
- ordinal: function (number) {
- var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arraySome.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arraySome.js ***!
+ \***********************************************************************************************/
+/***/ ((module) => {
+
+/**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+function arraySome(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+}
- return ga;
+module.exports = arraySome;
-})));
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_assocIndexOf.js":
+/*!**************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_assocIndexOf.js ***!
+ \**************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var eq = __webpack_require__(/*! ./eq */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/eq.js");
+
+/**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+}
+
+module.exports = assocIndexOf;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gd.js":
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseFindIndex.js":
/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gd.js ***!
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseFindIndex.js ***!
\***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ ((module) => {
-//! moment.js locale configuration
-//! locale : Scottish Gaelic [gd]
-//! author : Jon Ashdown : https://github.com/jonashdown
+/**
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without
+ * support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} predicate The function invoked per iteration.
+ * @param {number} fromIndex The index to search from.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseFindIndex(array, predicate, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 1 : -1);
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+}
- //! moment.js locale configuration
+module.exports = baseFindIndex;
- var months = [
- 'Am Faoilleach',
- 'An Gearran',
- 'Am Màrt',
- 'An Giblean',
- 'An Cèitean',
- 'An t-Ògmhios',
- 'An t-Iuchar',
- 'An Lùnastal',
- 'An t-Sultain',
- 'An Dàmhair',
- 'An t-Samhain',
- 'An Dùbhlachd',
- ],
- monthsShort = [
- 'Faoi',
- 'Gear',
- 'Màrt',
- 'Gibl',
- 'Cèit',
- 'Ògmh',
- 'Iuch',
- 'Lùn',
- 'Sult',
- 'Dàmh',
- 'Samh',
- 'Dùbh',
- ],
- weekdays = [
- 'Didòmhnaich',
- 'Diluain',
- 'Dimàirt',
- 'Diciadain',
- 'Diardaoin',
- 'Dihaoine',
- 'Disathairne',
- ],
- weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],
- weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];
- var gd = moment.defineLocale('gd', {
- months: months,
- monthsShort: monthsShort,
- monthsParseExact: true,
- weekdays: weekdays,
- weekdaysShort: weekdaysShort,
- weekdaysMin: weekdaysMin,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[An-diugh aig] LT',
- nextDay: '[A-màireach aig] LT',
- nextWeek: 'dddd [aig] LT',
- lastDay: '[An-dè aig] LT',
- lastWeek: 'dddd [seo chaidh] [aig] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'ann an %s',
- past: 'bho chionn %s',
- s: 'beagan diogan',
- ss: '%d diogan',
- m: 'mionaid',
- mm: '%d mionaidean',
- h: 'uair',
- hh: '%d uairean',
- d: 'latha',
- dd: '%d latha',
- M: 'mìos',
- MM: '%d mìosan',
- y: 'bliadhna',
- yy: '%d bliadhna',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/,
- ordinal: function (number) {
- var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/***/ }),
- return gd;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseGet.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseGet.js ***!
+ \*********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-})));
+var castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_castPath.js"),
+ toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_toKey.js");
+
+/**
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
+ */
+function baseGet(object, path) {
+ path = castPath(path, object);
+
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[toKey(path[index++])];
+ }
+ return (index && index == length) ? object : undefined;
+}
+
+module.exports = baseGet;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gl.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gl.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseGetAllKeys.js":
+/*!****************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseGetAllKeys.js ***!
+ \****************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Galician [gl]
-//! author : Juan G. Hurtado : https://github.com/juanghurtado
+var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayPush.js"),
+ isArray = __webpack_require__(/*! ./isArray */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArray.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
+}
- //! moment.js locale configuration
+module.exports = baseGetAllKeys;
- var gl = moment.defineLocale('gl', {
- months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(
- '_'
- ),
- monthsShort: 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY H:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',
- },
- calendar: {
- sameDay: function () {
- return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
- },
- nextDay: function () {
- return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';
- },
- nextWeek: function () {
- return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';
- },
- lastDay: function () {
- return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';
- },
- lastWeek: function () {
- return (
- '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'
- );
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: function (str) {
- if (str.indexOf('un') === 0) {
- return 'n' + str;
- }
- return 'en ' + str;
- },
- past: 'hai %s',
- s: 'uns segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'unha hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- M: 'un mes',
- MM: '%d meses',
- y: 'un ano',
- yy: '%d anos',
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
- return gl;
+/***/ }),
-})));
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseGetTag.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseGetTag.js ***!
+ \************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Symbol.js"),
+ getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getRawTag.js"),
+ objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_objectToString.js");
+
+/** `Object#toString` result references. */
+var nullTag = '[object Null]',
+ undefinedTag = '[object Undefined]';
+
+/** Built-in value references. */
+var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+/**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+function baseGetTag(value) {
+ if (value == null) {
+ return value === undefined ? undefinedTag : nullTag;
+ }
+ return (symToStringTag && symToStringTag in Object(value))
+ ? getRawTag(value)
+ : objectToString(value);
+}
+
+module.exports = baseGetTag;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gom-deva.js":
-/*!*********************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gom-deva.js ***!
- \*********************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseHasIn.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseHasIn.js ***!
+ \***********************************************************************************************/
+/***/ ((module) => {
-//! moment.js locale configuration
-//! locale : Konkani Devanagari script [gom-deva]
-//! author : The Discoverer : https://github.com/WikiDiscoverer
+/**
+ * The base implementation of `_.hasIn` without support for deep paths.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
+ */
+function baseHasIn(object, key) {
+ return object != null && key in Object(object);
+}
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+module.exports = baseHasIn;
- //! moment.js locale configuration
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var format = {
- s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],
- ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],
- m: ['एका मिणटान', 'एक मिनूट'],
- mm: [number + ' मिणटांनी', number + ' मिणटां'],
- h: ['एका वरान', 'एक वर'],
- hh: [number + ' वरांनी', number + ' वरां'],
- d: ['एका दिसान', 'एक दीस'],
- dd: [number + ' दिसांनी', number + ' दीस'],
- M: ['एका म्हयन्यान', 'एक म्हयनो'],
- MM: [number + ' म्हयन्यानी', number + ' म्हयने'],
- y: ['एका वर्सान', 'एक वर्स'],
- yy: [number + ' वर्सांनी', number + ' वर्सां'],
- };
- return isFuture ? format[key][0] : format[key][1];
- }
+/***/ }),
- var gomDeva = moment.defineLocale('gom-deva', {
- months: {
- standalone: 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
- '_'
- ),
- format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(
- '_'
- ),
- isFormat: /MMMM(\s)+D[oD]?/,
- },
- monthsShort: 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),
- weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),
- weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'A h:mm [वाजतां]',
- LTS: 'A h:mm:ss [वाजतां]',
- L: 'DD-MM-YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY A h:mm [वाजतां]',
- LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',
- llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',
- },
- calendar: {
- sameDay: '[आयज] LT',
- nextDay: '[फाल्यां] LT',
- nextWeek: '[फुडलो] dddd[,] LT',
- lastDay: '[काल] LT',
- lastWeek: '[फाटलो] dddd[,] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s',
- past: '%s आदीं',
- s: processRelativeTime,
- ss: processRelativeTime,
- m: processRelativeTime,
- mm: processRelativeTime,
- h: processRelativeTime,
- hh: processRelativeTime,
- d: processRelativeTime,
- dd: processRelativeTime,
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime,
- },
- dayOfMonthOrdinalParse: /\d{1,2}(वेर)/,
- ordinal: function (number, period) {
- switch (period) {
- // the ordinal 'वेर' only applies to day of the month
- case 'D':
- return number + 'वेर';
- default:
- case 'M':
- case 'Q':
- case 'DDD':
- case 'd':
- case 'w':
- case 'W':
- return number;
- }
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'राती') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'सकाळीं') {
- return hour;
- } else if (meridiem === 'दनपारां') {
- return hour > 12 ? hour : hour + 12;
- } else if (meridiem === 'सांजे') {
- return hour + 12;
- }
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 4) {
- return 'राती';
- } else if (hour < 12) {
- return 'सकाळीं';
- } else if (hour < 16) {
- return 'दनपारां';
- } else if (hour < 20) {
- return 'सांजे';
- } else {
- return 'राती';
- }
- },
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIndexOf.js":
+/*!*************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIndexOf.js ***!
+ \*************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- return gomDeva;
+var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseFindIndex.js"),
+ baseIsNaN = __webpack_require__(/*! ./_baseIsNaN */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsNaN.js"),
+ strictIndexOf = __webpack_require__(/*! ./_strictIndexOf */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_strictIndexOf.js");
-})));
+/**
+ * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function baseIndexOf(array, value, fromIndex) {
+ return value === value
+ ? strictIndexOf(array, value, fromIndex)
+ : baseFindIndex(array, baseIsNaN, fromIndex);
+}
+
+module.exports = baseIndexOf;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gom-latn.js":
-/*!*********************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gom-latn.js ***!
- \*********************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsArguments.js":
+/*!*****************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsArguments.js ***!
+ \*****************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Konkani Latin script [gom-latn]
-//! author : The Discoverer : https://github.com/WikiDiscoverer
+var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseGetTag.js"),
+ isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isObjectLike.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]';
- //! moment.js locale configuration
+/**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+function baseIsArguments(value) {
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
+}
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var format = {
- s: ['thoddea sekondamni', 'thodde sekond'],
- ss: [number + ' sekondamni', number + ' sekond'],
- m: ['eka mintan', 'ek minut'],
- mm: [number + ' mintamni', number + ' mintam'],
- h: ['eka voran', 'ek vor'],
- hh: [number + ' voramni', number + ' voram'],
- d: ['eka disan', 'ek dis'],
- dd: [number + ' disamni', number + ' dis'],
- M: ['eka mhoinean', 'ek mhoino'],
- MM: [number + ' mhoineamni', number + ' mhoine'],
- y: ['eka vorsan', 'ek voros'],
- yy: [number + ' vorsamni', number + ' vorsam'],
- };
- return isFuture ? format[key][0] : format[key][1];
- }
+module.exports = baseIsArguments;
- var gomLatn = moment.defineLocale('gom-latn', {
- months: {
- standalone: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(
- '_'
- ),
- format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(
- '_'
- ),
- isFormat: /MMMM(\s)+D[oD]?/,
- },
- monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'),
- weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
- weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'A h:mm [vazta]',
- LTS: 'A h:mm:ss [vazta]',
- L: 'DD-MM-YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY A h:mm [vazta]',
- LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',
- llll: 'ddd, D MMM YYYY, A h:mm [vazta]',
- },
- calendar: {
- sameDay: '[Aiz] LT',
- nextDay: '[Faleam] LT',
- nextWeek: '[Fuddlo] dddd[,] LT',
- lastDay: '[Kal] LT',
- lastWeek: '[Fattlo] dddd[,] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s',
- past: '%s adim',
- s: processRelativeTime,
- ss: processRelativeTime,
- m: processRelativeTime,
- mm: processRelativeTime,
- h: processRelativeTime,
- hh: processRelativeTime,
- d: processRelativeTime,
- dd: processRelativeTime,
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime,
- },
- dayOfMonthOrdinalParse: /\d{1,2}(er)/,
- ordinal: function (number, period) {
- switch (period) {
- // the ordinal 'er' only applies to day of the month
- case 'D':
- return number + 'er';
- default:
- case 'M':
- case 'Q':
- case 'DDD':
- case 'd':
- case 'w':
- case 'W':
- return number;
- }
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- meridiemParse: /rati|sokallim|donparam|sanje/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'rati') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'sokallim') {
- return hour;
- } else if (meridiem === 'donparam') {
- return hour > 12 ? hour : hour + 12;
- } else if (meridiem === 'sanje') {
- return hour + 12;
- }
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 4) {
- return 'rati';
- } else if (hour < 12) {
- return 'sokallim';
- } else if (hour < 16) {
- return 'donparam';
- } else if (hour < 20) {
- return 'sanje';
- } else {
- return 'rati';
- }
- },
- });
- return gomLatn;
+/***/ }),
-})));
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsEqual.js":
+/*!*************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsEqual.js ***!
+ \*************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var baseIsEqualDeep = __webpack_require__(/*! ./_baseIsEqualDeep */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsEqualDeep.js"),
+ isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isObjectLike.js");
+
+/**
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+function baseIsEqual(value, other, bitmask, customizer, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
+}
+
+module.exports = baseIsEqual;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gu.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gu.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsEqualDeep.js":
+/*!*****************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsEqualDeep.js ***!
+ \*****************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Gujarati [gu]
-//! author : Kaushik Thanki : https://github.com/Kaushik1987
+var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Stack.js"),
+ equalArrays = __webpack_require__(/*! ./_equalArrays */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_equalArrays.js"),
+ equalByTag = __webpack_require__(/*! ./_equalByTag */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_equalByTag.js"),
+ equalObjects = __webpack_require__(/*! ./_equalObjects */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_equalObjects.js"),
+ getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getTag.js"),
+ isArray = __webpack_require__(/*! ./isArray */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArray.js"),
+ isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isBuffer.js"),
+ isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isTypedArray.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1;
- //! moment.js locale configuration
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ objectTag = '[object Object]';
- var symbolMap = {
- '1': '૧',
- '2': '૨',
- '3': '૩',
- '4': '૪',
- '5': '૫',
- '6': '૬',
- '7': '૭',
- '8': '૮',
- '9': '૯',
- '0': '૦',
- },
- numberMap = {
- '૧': '1',
- '૨': '2',
- '૩': '3',
- '૪': '4',
- '૫': '5',
- '૬': '6',
- '૭': '7',
- '૮': '8',
- '૯': '9',
- '૦': '0',
- };
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
- var gu = moment.defineLocale('gu', {
- months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(
- '_'
- ),
- monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(
- '_'
- ),
- weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
- weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
- longDateFormat: {
- LT: 'A h:mm વાગ્યે',
- LTS: 'A h:mm:ss વાગ્યે',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
- LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',
- },
- calendar: {
- sameDay: '[આજ] LT',
- nextDay: '[કાલે] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[ગઇકાલે] LT',
- lastWeek: '[પાછલા] dddd, LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s મા',
- past: '%s પેહલા',
- s: 'અમુક પળો',
- ss: '%d સેકંડ',
- m: 'એક મિનિટ',
- mm: '%d મિનિટ',
- h: 'એક કલાક',
- hh: '%d કલાક',
- d: 'એક દિવસ',
- dd: '%d દિવસ',
- M: 'એક મહિનો',
- MM: '%d મહિનો',
- y: 'એક વર્ષ',
- yy: '%d વર્ષ',
- },
- preparse: function (string) {
- return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function (string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- // Gujarati notation for meridiems are quite fuzzy in practice. While there exists
- // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
- meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'રાત') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'સવાર') {
- return hour;
- } else if (meridiem === 'બપોર') {
- return hour >= 10 ? hour : hour + 12;
- } else if (meridiem === 'સાંજ') {
- return hour + 12;
- }
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 4) {
- return 'રાત';
- } else if (hour < 10) {
- return 'સવાર';
- } else if (hour < 17) {
- return 'બપોર';
- } else if (hour < 20) {
- return 'સાંજ';
- } else {
- return 'રાત';
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6, // The week that contains Jan 6th is the first week of the year.
- },
- });
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
- return gu;
+/**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = objIsArr ? arrayTag : getTag(object),
+ othTag = othIsArr ? arrayTag : getTag(other);
-})));
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
+
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && isBuffer(object)) {
+ if (!isBuffer(other)) {
+ return false;
+ }
+ objIsArr = true;
+ objIsObj = false;
+ }
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new Stack);
+ return (objIsArr || isTypedArray(object))
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
+ }
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ stack || (stack = new Stack);
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stack || (stack = new Stack);
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
+}
+
+module.exports = baseIsEqualDeep;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/he.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/he.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsMatch.js":
+/*!*************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsMatch.js ***!
+ \*************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Hebrew [he]
-//! author : Tomer Cohen : https://github.com/tomer
-//! author : Moshe Simantov : https://github.com/DevelopmentIL
-//! author : Tal Ater : https://github.com/TalAter
+var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Stack.js"),
+ baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsEqual.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
- //! moment.js locale configuration
+/**
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Array} matchData The property names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+function baseIsMatch(object, source, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
- var he = moment.defineLocale('he', {
- months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(
- '_'
- ),
- monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split(
- '_'
- ),
- weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
- weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
- weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [ב]MMMM YYYY',
- LLL: 'D [ב]MMMM YYYY HH:mm',
- LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
- l: 'D/M/YYYY',
- ll: 'D MMM YYYY',
- lll: 'D MMM YYYY HH:mm',
- llll: 'ddd, D MMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[היום ב־]LT',
- nextDay: '[מחר ב־]LT',
- nextWeek: 'dddd [בשעה] LT',
- lastDay: '[אתמול ב־]LT',
- lastWeek: '[ביום] dddd [האחרון בשעה] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'בעוד %s',
- past: 'לפני %s',
- s: 'מספר שניות',
- ss: '%d שניות',
- m: 'דקה',
- mm: '%d דקות',
- h: 'שעה',
- hh: function (number) {
- if (number === 2) {
- return 'שעתיים';
- }
- return number + ' שעות';
- },
- d: 'יום',
- dd: function (number) {
- if (number === 2) {
- return 'יומיים';
- }
- return number + ' ימים';
- },
- M: 'חודש',
- MM: function (number) {
- if (number === 2) {
- return 'חודשיים';
- }
- return number + ' חודשים';
- },
- y: 'שנה',
- yy: function (number) {
- if (number === 2) {
- return 'שנתיים';
- } else if (number % 10 === 0 && number !== 10) {
- return number + ' שנה';
- }
- return number + ' שנים';
- },
- },
- meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
- isPM: function (input) {
- return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 5) {
- return 'לפנות בוקר';
- } else if (hour < 10) {
- return 'בבוקר';
- } else if (hour < 12) {
- return isLower ? 'לפנה"צ' : 'לפני הצהריים';
- } else if (hour < 18) {
- return isLower ? 'אחה"צ' : 'אחרי הצהריים';
- } else {
- return 'בערב';
- }
- },
- });
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
- return he;
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var stack = new Stack;
+ if (customizer) {
+ var result = customizer(objValue, srcValue, key, object, source, stack);
+ }
+ if (!(result === undefined
+ ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
+ : result
+ )) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
-})));
+module.exports = baseIsMatch;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/hi.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/hi.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsNaN.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsNaN.js ***!
+ \***********************************************************************************************/
+/***/ ((module) => {
-//! moment.js locale configuration
-//! locale : Hindi [hi]
-//! author : Mayank Singhal : https://github.com/mayanksinghal
+/**
+ * The base implementation of `_.isNaN` without support for number objects.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
+ */
+function baseIsNaN(value) {
+ return value !== value;
+}
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+module.exports = baseIsNaN;
- //! moment.js locale configuration
- var symbolMap = {
- '1': '१',
- '2': '२',
- '3': '३',
- '4': '४',
- '5': '५',
- '6': '६',
- '7': '७',
- '8': '८',
- '9': '९',
- '0': '०',
- },
- numberMap = {
- '१': '1',
- '२': '2',
- '३': '3',
- '४': '4',
- '५': '5',
- '६': '6',
- '७': '7',
- '८': '8',
- '९': '9',
- '०': '0',
- };
+/***/ }),
- var hi = moment.defineLocale('hi', {
- months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(
- '_'
- ),
- monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
- weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
- weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
- longDateFormat: {
- LT: 'A h:mm बजे',
- LTS: 'A h:mm:ss बजे',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm बजे',
- LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',
- },
- calendar: {
- sameDay: '[आज] LT',
- nextDay: '[कल] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[कल] LT',
- lastWeek: '[पिछले] dddd, LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s में',
- past: '%s पहले',
- s: 'कुछ ही क्षण',
- ss: '%d सेकंड',
- m: 'एक मिनट',
- mm: '%d मिनट',
- h: 'एक घंटा',
- hh: '%d घंटे',
- d: 'एक दिन',
- dd: '%d दिन',
- M: 'एक महीने',
- MM: '%d महीने',
- y: 'एक वर्ष',
- yy: '%d वर्ष',
- },
- preparse: function (string) {
- return string.replace(/[१२३४५६७८९०]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function (string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- // Hindi notation for meridiems are quite fuzzy in practice. While there exists
- // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
- meridiemParse: /रात|सुबह|दोपहर|शाम/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'रात') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'सुबह') {
- return hour;
- } else if (meridiem === 'दोपहर') {
- return hour >= 10 ? hour : hour + 12;
- } else if (meridiem === 'शाम') {
- return hour + 12;
- }
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 4) {
- return 'रात';
- } else if (hour < 10) {
- return 'सुबह';
- } else if (hour < 17) {
- return 'दोपहर';
- } else if (hour < 20) {
- return 'शाम';
- } else {
- return 'रात';
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6, // The week that contains Jan 6th is the first week of the year.
- },
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsNative.js":
+/*!**************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsNative.js ***!
+ \**************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- return hi;
+var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isFunction.js"),
+ isMasked = __webpack_require__(/*! ./_isMasked */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isMasked.js"),
+ isObject = __webpack_require__(/*! ./isObject */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isObject.js"),
+ toSource = __webpack_require__(/*! ./_toSource */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_toSource.js");
-})));
+/**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+/** Used to detect host constructors (Safari). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
-/***/ }),
+/** Used for built-in method references. */
+var funcProto = Function.prototype,
+ objectProto = Object.prototype;
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/hr.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/hr.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
-//! moment.js locale configuration
-//! locale : Croatian [hr]
-//! author : Bojan Marković : https://github.com/bmarkovic
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
- //! moment.js locale configuration
+/**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+}
- function translate(number, withoutSuffix, key) {
- var result = number + ' ';
- switch (key) {
- case 'ss':
- if (number === 1) {
- result += 'sekunda';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'sekunde';
- } else {
- result += 'sekundi';
- }
- return result;
- case 'm':
- return withoutSuffix ? 'jedna minuta' : 'jedne minute';
- case 'mm':
- if (number === 1) {
- result += 'minuta';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'minute';
- } else {
- result += 'minuta';
- }
- return result;
- case 'h':
- return withoutSuffix ? 'jedan sat' : 'jednog sata';
- case 'hh':
- if (number === 1) {
- result += 'sat';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'sata';
- } else {
- result += 'sati';
- }
- return result;
- case 'dd':
- if (number === 1) {
- result += 'dan';
- } else {
- result += 'dana';
- }
- return result;
- case 'MM':
- if (number === 1) {
- result += 'mjesec';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'mjeseca';
- } else {
- result += 'mjeseci';
- }
- return result;
- case 'yy':
- if (number === 1) {
- result += 'godina';
- } else if (number === 2 || number === 3 || number === 4) {
- result += 'godine';
- } else {
- result += 'godina';
- }
- return result;
- }
- }
+module.exports = baseIsNative;
- var hr = moment.defineLocale('hr', {
- months: {
- format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(
- '_'
- ),
- standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(
- '_'
- ),
- },
- monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
- '_'
- ),
- weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
- weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'Do MMMM YYYY',
- LLL: 'Do MMMM YYYY H:mm',
- LLLL: 'dddd, Do MMMM YYYY H:mm',
- },
- calendar: {
- sameDay: '[danas u] LT',
- nextDay: '[sutra u] LT',
- nextWeek: function () {
- switch (this.day()) {
- case 0:
- return '[u] [nedjelju] [u] LT';
- case 3:
- return '[u] [srijedu] [u] LT';
- case 6:
- return '[u] [subotu] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[u] dddd [u] LT';
- }
- },
- lastDay: '[jučer u] LT',
- lastWeek: function () {
- switch (this.day()) {
- case 0:
- return '[prošlu] [nedjelju] [u] LT';
- case 3:
- return '[prošlu] [srijedu] [u] LT';
- case 6:
- return '[prošle] [subote] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[prošli] dddd [u] LT';
- }
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'za %s',
- past: 'prije %s',
- s: 'par sekundi',
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: 'dan',
- dd: translate,
- M: 'mjesec',
- MM: translate,
- y: 'godinu',
- yy: translate,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
- return hr;
+/***/ }),
-})));
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsTypedArray.js":
+/*!******************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsTypedArray.js ***!
+ \******************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseGetTag.js"),
+ isLength = __webpack_require__(/*! ./isLength */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isLength.js"),
+ isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isObjectLike.js");
-/***/ }),
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ weakMapTag = '[object WeakMap]';
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/hu.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/hu.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
-//! moment.js locale configuration
-//! locale : Hungarian [hu]
-//! author : Adam Brunner : https://github.com/adambrunner
+/** Used to identify `toStringTag` values of typed arrays. */
+var typedArrayTags = {};
+typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+typedArrayTags[uint32Tag] = true;
+typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+typedArrayTags[setTag] = typedArrayTags[stringTag] =
+typedArrayTags[weakMapTag] = false;
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ */
+function baseIsTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
+}
- //! moment.js locale configuration
+module.exports = baseIsTypedArray;
- var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(
- ' '
- );
- function translate(number, withoutSuffix, key, isFuture) {
- var num = number;
- switch (key) {
- case 's':
- return isFuture || withoutSuffix
- ? 'néhány másodperc'
- : 'néhány másodperce';
- case 'ss':
- return num + (isFuture || withoutSuffix)
- ? ' másodperc'
- : ' másodperce';
- case 'm':
- return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
- case 'mm':
- return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
- case 'h':
- return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
- case 'hh':
- return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
- case 'd':
- return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
- case 'dd':
- return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
- case 'M':
- return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
- case 'MM':
- return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
- case 'y':
- return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
- case 'yy':
- return num + (isFuture || withoutSuffix ? ' év' : ' éve');
- }
- return '';
- }
- function week(isFuture) {
- return (
- (isFuture ? '' : '[múlt] ') +
- '[' +
- weekEndings[this.day()] +
- '] LT[-kor]'
- );
- }
- var hu = moment.defineLocale('hu', {
- months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(
- '_'
- ),
- monthsShort: 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split(
- '_'
- ),
- weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
- weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
- weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'YYYY.MM.DD.',
- LL: 'YYYY. MMMM D.',
- LLL: 'YYYY. MMMM D. H:mm',
- LLLL: 'YYYY. MMMM D., dddd H:mm',
- },
- meridiemParse: /de|du/i,
- isPM: function (input) {
- return input.charAt(1).toLowerCase() === 'u';
- },
- meridiem: function (hours, minutes, isLower) {
- if (hours < 12) {
- return isLower === true ? 'de' : 'DE';
- } else {
- return isLower === true ? 'du' : 'DU';
- }
- },
- calendar: {
- sameDay: '[ma] LT[-kor]',
- nextDay: '[holnap] LT[-kor]',
- nextWeek: function () {
- return week.call(this, true);
- },
- lastDay: '[tegnap] LT[-kor]',
- lastWeek: function () {
- return week.call(this, false);
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s múlva',
- past: '%s',
- s: translate,
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: translate,
- dd: translate,
- M: translate,
- MM: translate,
- y: translate,
- yy: translate,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/***/ }),
- return hu;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIteratee.js":
+/*!**************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIteratee.js ***!
+ \**************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-})));
+var baseMatches = __webpack_require__(/*! ./_baseMatches */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseMatches.js"),
+ baseMatchesProperty = __webpack_require__(/*! ./_baseMatchesProperty */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseMatchesProperty.js"),
+ identity = __webpack_require__(/*! ./identity */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/identity.js"),
+ isArray = __webpack_require__(/*! ./isArray */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArray.js"),
+ property = __webpack_require__(/*! ./property */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/property.js");
+/**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+function baseIteratee(value) {
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+ if (typeof value == 'function') {
+ return value;
+ }
+ if (value == null) {
+ return identity;
+ }
+ if (typeof value == 'object') {
+ return isArray(value)
+ ? baseMatchesProperty(value[0], value[1])
+ : baseMatches(value);
+ }
+ return property(value);
+}
-/***/ }),
+module.exports = baseIteratee;
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/hy-am.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/hy-am.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
-//! moment.js locale configuration
-//! locale : Armenian [hy-am]
-//! author : Armendarabyan : https://github.com/armendarabyan
+/***/ }),
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseKeys.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseKeys.js ***!
+ \**********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- //! moment.js locale configuration
+var isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isPrototype.js"),
+ nativeKeys = __webpack_require__(/*! ./_nativeKeys */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_nativeKeys.js");
- var hyAm = moment.defineLocale('hy-am', {
- months: {
- format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(
- '_'
- ),
- standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(
- '_'
- ),
- },
- monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
- weekdays: 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(
- '_'
- ),
- weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
- weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY թ.',
- LLL: 'D MMMM YYYY թ., HH:mm',
- LLLL: 'dddd, D MMMM YYYY թ., HH:mm',
- },
- calendar: {
- sameDay: '[այսօր] LT',
- nextDay: '[վաղը] LT',
- lastDay: '[երեկ] LT',
- nextWeek: function () {
- return 'dddd [օրը ժամը] LT';
- },
- lastWeek: function () {
- return '[անցած] dddd [օրը ժամը] LT';
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s հետո',
- past: '%s առաջ',
- s: 'մի քանի վայրկյան',
- ss: '%d վայրկյան',
- m: 'րոպե',
- mm: '%d րոպե',
- h: 'ժամ',
- hh: '%d ժամ',
- d: 'օր',
- dd: '%d օր',
- M: 'ամիս',
- MM: '%d ամիս',
- y: 'տարի',
- yy: '%d տարի',
- },
- meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
- isPM: function (input) {
- return /^(ցերեկվա|երեկոյան)$/.test(input);
- },
- meridiem: function (hour) {
- if (hour < 4) {
- return 'գիշերվա';
- } else if (hour < 12) {
- return 'առավոտվա';
- } else if (hour < 17) {
- return 'ցերեկվա';
- } else {
- return 'երեկոյան';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
- ordinal: function (number, period) {
- switch (period) {
- case 'DDD':
- case 'w':
- case 'W':
- case 'DDDo':
- if (number === 1) {
- return number + '-ին';
- }
- return number + '-րդ';
- default:
- return number;
- }
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
- return hyAm;
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
-})));
+/**
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function baseKeys(object) {
+ if (!isPrototype(object)) {
+ return nativeKeys(object);
+ }
+ var result = [];
+ for (var key in Object(object)) {
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+}
+module.exports = baseKeys;
-/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/id.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/id.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ }),
-//! moment.js locale configuration
-//! locale : Indonesian [id]
-//! author : Mohammad Satrio Utomo : https://github.com/tyok
-//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseMatches.js":
+/*!*************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseMatches.js ***!
+ \*************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+var baseIsMatch = __webpack_require__(/*! ./_baseIsMatch */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsMatch.js"),
+ getMatchData = __webpack_require__(/*! ./_getMatchData */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getMatchData.js"),
+ matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_matchesStrictComparable.js");
- //! moment.js locale configuration
+/**
+ * The base implementation of `_.matches` which doesn't clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
+ }
+ return function(object) {
+ return object === source || baseIsMatch(object, source, matchData);
+ };
+}
- var id = moment.defineLocale('id', {
- months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(
- '_'
- ),
- monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),
- weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
- weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
- weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
- longDateFormat: {
- LT: 'HH.mm',
- LTS: 'HH.mm.ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY [pukul] HH.mm',
- LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
- },
- meridiemParse: /pagi|siang|sore|malam/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'pagi') {
- return hour;
- } else if (meridiem === 'siang') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === 'sore' || meridiem === 'malam') {
- return hour + 12;
- }
- },
- meridiem: function (hours, minutes, isLower) {
- if (hours < 11) {
- return 'pagi';
- } else if (hours < 15) {
- return 'siang';
- } else if (hours < 19) {
- return 'sore';
- } else {
- return 'malam';
- }
- },
- calendar: {
- sameDay: '[Hari ini pukul] LT',
- nextDay: '[Besok pukul] LT',
- nextWeek: 'dddd [pukul] LT',
- lastDay: '[Kemarin pukul] LT',
- lastWeek: 'dddd [lalu pukul] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'dalam %s',
- past: '%s yang lalu',
- s: 'beberapa detik',
- ss: '%d detik',
- m: 'semenit',
- mm: '%d menit',
- h: 'sejam',
- hh: '%d jam',
- d: 'sehari',
- dd: '%d hari',
- M: 'sebulan',
- MM: '%d bulan',
- y: 'setahun',
- yy: '%d tahun',
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6, // The week that contains Jan 6th is the first week of the year.
- },
- });
+module.exports = baseMatches;
- return id;
-})));
+/***/ }),
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseMatchesProperty.js":
+/*!*********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseMatchesProperty.js ***!
+ \*********************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-/***/ }),
+var baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsEqual.js"),
+ get = __webpack_require__(/*! ./get */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/get.js"),
+ hasIn = __webpack_require__(/*! ./hasIn */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/hasIn.js"),
+ isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isKey.js"),
+ isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isStrictComparable.js"),
+ matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_matchesStrictComparable.js"),
+ toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_toKey.js");
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/is.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/is.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
-//! moment.js locale configuration
-//! locale : Icelandic [is]
-//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
+/**
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function baseMatchesProperty(path, srcValue) {
+ if (isKey(path) && isStrictComparable(srcValue)) {
+ return matchesStrictComparable(toKey(path), srcValue);
+ }
+ return function(object) {
+ var objValue = get(object, path);
+ return (objValue === undefined && objValue === srcValue)
+ ? hasIn(object, path)
+ : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
+ };
+}
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+module.exports = baseMatchesProperty;
- //! moment.js locale configuration
- function plural(n) {
- if (n % 100 === 11) {
- return true;
- } else if (n % 10 === 1) {
- return false;
- }
- return true;
- }
- function translate(number, withoutSuffix, key, isFuture) {
- var result = number + ' ';
- switch (key) {
- case 's':
- return withoutSuffix || isFuture
- ? 'nokkrar sekúndur'
- : 'nokkrum sekúndum';
- case 'ss':
- if (plural(number)) {
- return (
- result +
- (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')
- );
- }
- return result + 'sekúnda';
- case 'm':
- return withoutSuffix ? 'mínúta' : 'mínútu';
- case 'mm':
- if (plural(number)) {
- return (
- result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')
- );
- } else if (withoutSuffix) {
- return result + 'mínúta';
- }
- return result + 'mínútu';
- case 'hh':
- if (plural(number)) {
- return (
- result +
- (withoutSuffix || isFuture
- ? 'klukkustundir'
- : 'klukkustundum')
- );
- }
- return result + 'klukkustund';
- case 'd':
- if (withoutSuffix) {
- return 'dagur';
- }
- return isFuture ? 'dag' : 'degi';
- case 'dd':
- if (plural(number)) {
- if (withoutSuffix) {
- return result + 'dagar';
- }
- return result + (isFuture ? 'daga' : 'dögum');
- } else if (withoutSuffix) {
- return result + 'dagur';
- }
- return result + (isFuture ? 'dag' : 'degi');
- case 'M':
- if (withoutSuffix) {
- return 'mánuður';
- }
- return isFuture ? 'mánuð' : 'mánuði';
- case 'MM':
- if (plural(number)) {
- if (withoutSuffix) {
- return result + 'mánuðir';
- }
- return result + (isFuture ? 'mánuði' : 'mánuðum');
- } else if (withoutSuffix) {
- return result + 'mánuður';
- }
- return result + (isFuture ? 'mánuð' : 'mánuði');
- case 'y':
- return withoutSuffix || isFuture ? 'ár' : 'ári';
- case 'yy':
- if (plural(number)) {
- return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
- }
- return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
- }
- }
+/***/ }),
- var is = moment.defineLocale('is', {
- months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(
- '_'
- ),
- monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
- weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(
- '_'
- ),
- weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
- weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY [kl.] H:mm',
- LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',
- },
- calendar: {
- sameDay: '[í dag kl.] LT',
- nextDay: '[á morgun kl.] LT',
- nextWeek: 'dddd [kl.] LT',
- lastDay: '[í gær kl.] LT',
- lastWeek: '[síðasta] dddd [kl.] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'eftir %s',
- past: 'fyrir %s síðan',
- s: translate,
- ss: translate,
- m: translate,
- mm: translate,
- h: 'klukkustund',
- hh: translate,
- d: translate,
- dd: translate,
- M: translate,
- MM: translate,
- y: translate,
- yy: translate,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseProperty.js":
+/*!**************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseProperty.js ***!
+ \**************************************************************************************************/
+/***/ ((module) => {
- return is;
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
-})));
+module.exports = baseProperty;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/it-ch.js":
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_basePropertyDeep.js":
/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/it-ch.js ***!
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_basePropertyDeep.js ***!
\******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Italian (Switzerland) [it-ch]
-//! author : xfh : https://github.com/xfh
+var baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseGet.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ */
+function basePropertyDeep(path) {
+ return function(object) {
+ return baseGet(object, path);
+ };
+}
- //! moment.js locale configuration
+module.exports = basePropertyDeep;
- var itCh = moment.defineLocale('it-ch', {
- months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
- '_'
- ),
- monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
- weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
- '_'
- ),
- weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
- weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Oggi alle] LT',
- nextDay: '[Domani alle] LT',
- nextWeek: 'dddd [alle] LT',
- lastDay: '[Ieri alle] LT',
- lastWeek: function () {
- switch (this.day()) {
- case 0:
- return '[la scorsa] dddd [alle] LT';
- default:
- return '[lo scorso] dddd [alle] LT';
- }
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: function (s) {
- return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;
- },
- past: '%s fa',
- s: 'alcuni secondi',
- ss: '%d secondi',
- m: 'un minuto',
- mm: '%d minuti',
- h: "un'ora",
- hh: '%d ore',
- d: 'un giorno',
- dd: '%d giorni',
- M: 'un mese',
- MM: '%d mesi',
- y: 'un anno',
- yy: '%d anni',
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
- return itCh;
+/***/ }),
-})));
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseTimes.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseTimes.js ***!
+ \***********************************************************************************************/
+/***/ ((module) => {
+
+/**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
+
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+}
+
+module.exports = baseTimes;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/it.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/it.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseToString.js":
+/*!**************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseToString.js ***!
+ \**************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Italian [it]
-//! author : Lorenzo : https://github.com/aliem
-//! author: Mattia Larentis: https://github.com/nostalgiaz
-//! author: Marco : https://github.com/Manfre98
+var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Symbol.js"),
+ arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayMap.js"),
+ isArray = __webpack_require__(/*! ./isArray */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArray.js"),
+ isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isSymbol.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
- //! moment.js locale configuration
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
- var it = moment.defineLocale('it', {
- months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(
- '_'
- ),
- monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
- weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(
- '_'
- ),
- weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
- weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: function () {
- return (
- '[Oggi a' +
- (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
- ']LT'
- );
- },
- nextDay: function () {
- return (
- '[Domani a' +
- (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
- ']LT'
- );
- },
- nextWeek: function () {
- return (
- 'dddd [a' +
- (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
- ']LT'
- );
- },
- lastDay: function () {
- return (
- '[Ieri a' +
- (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") +
- ']LT'
- );
- },
- lastWeek: function () {
- switch (this.day()) {
- case 0:
- return (
- '[La scorsa] dddd [a' +
- (this.hours() > 1
- ? 'lle '
- : this.hours() === 0
- ? ' '
- : "ll'") +
- ']LT'
- );
- default:
- return (
- '[Lo scorso] dddd [a' +
- (this.hours() > 1
- ? 'lle '
- : this.hours() === 0
- ? ' '
- : "ll'") +
- ']LT'
- );
- }
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: function (s) {
- return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;
- },
- past: '%s fa',
- s: 'alcuni secondi',
- ss: '%d secondi',
- m: 'un minuto',
- mm: '%d minuti',
- h: "un'ora",
- hh: '%d ore',
- d: 'un giorno',
- dd: '%d giorni',
- M: 'un mese',
- MM: '%d mesi',
- y: 'un anno',
- yy: '%d anni',
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/**
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
+ }
+ if (isArray(value)) {
+ // Recursively convert values (susceptible to call stack limits).
+ return arrayMap(value, baseToString) + '';
+ }
+ if (isSymbol(value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
- return it;
+module.exports = baseToString;
-})));
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseUnary.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseUnary.js ***!
+ \***********************************************************************************************/
+/***/ ((module) => {
+
+/**
+ * The base implementation of `_.unary` without support for storing metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ */
+function baseUnary(func) {
+ return function(value) {
+ return func(value);
+ };
+}
+
+module.exports = baseUnary;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ja.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ja.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseUniq.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseUniq.js ***!
+ \**********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Japanese [ja]
-//! author : LI Long : https://github.com/baryon
+var SetCache = __webpack_require__(/*! ./_SetCache */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_SetCache.js"),
+ arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayIncludes.js"),
+ arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayIncludesWith.js"),
+ cacheHas = __webpack_require__(/*! ./_cacheHas */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_cacheHas.js"),
+ createSet = __webpack_require__(/*! ./_createSet */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_createSet.js"),
+ setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_setToArray.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
- //! moment.js locale configuration
+/**
+ * The base implementation of `_.uniqBy` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee] The iteratee invoked per element.
+ * @param {Function} [comparator] The comparator invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ */
+function baseUniq(array, iteratee, comparator) {
+ var index = -1,
+ includes = arrayIncludes,
+ length = array.length,
+ isCommon = true,
+ result = [],
+ seen = result;
- var ja = moment.defineLocale('ja', {
- eras: [
- {
- since: '2019-05-01',
- offset: 1,
- name: '令和',
- narrow: '㋿',
- abbr: 'R',
- },
- {
- since: '1989-01-08',
- until: '2019-04-30',
- offset: 1,
- name: '平成',
- narrow: '㍻',
- abbr: 'H',
- },
- {
- since: '1926-12-25',
- until: '1989-01-07',
- offset: 1,
- name: '昭和',
- narrow: '㍼',
- abbr: 'S',
- },
- {
- since: '1912-07-30',
- until: '1926-12-24',
- offset: 1,
- name: '大正',
- narrow: '㍽',
- abbr: 'T',
- },
- {
- since: '1873-01-01',
- until: '1912-07-29',
- offset: 6,
- name: '明治',
- narrow: '㍾',
- abbr: 'M',
- },
- {
- since: '0001-01-01',
- until: '1873-12-31',
- offset: 1,
- name: '西暦',
- narrow: 'AD',
- abbr: 'AD',
- },
- {
- since: '0000-12-31',
- until: -Infinity,
- offset: 1,
- name: '紀元前',
- narrow: 'BC',
- abbr: 'BC',
- },
- ],
- eraYearOrdinalRegex: /(元|\d+)年/,
- eraYearOrdinalParse: function (input, match) {
- return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);
- },
- months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
- monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
- '_'
- ),
- weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
- weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
- weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY/MM/DD',
- LL: 'YYYY年M月D日',
- LLL: 'YYYY年M月D日 HH:mm',
- LLLL: 'YYYY年M月D日 dddd HH:mm',
- l: 'YYYY/MM/DD',
- ll: 'YYYY年M月D日',
- lll: 'YYYY年M月D日 HH:mm',
- llll: 'YYYY年M月D日(ddd) HH:mm',
- },
- meridiemParse: /午前|午後/i,
- isPM: function (input) {
- return input === '午後';
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 12) {
- return '午前';
- } else {
- return '午後';
- }
- },
- calendar: {
- sameDay: '[今日] LT',
- nextDay: '[明日] LT',
- nextWeek: function (now) {
- if (now.week() !== this.week()) {
- return '[来週]dddd LT';
- } else {
- return 'dddd LT';
- }
- },
- lastDay: '[昨日] LT',
- lastWeek: function (now) {
- if (this.week() !== now.week()) {
- return '[先週]dddd LT';
- } else {
- return 'dddd LT';
- }
- },
- sameElse: 'L',
- },
- dayOfMonthOrdinalParse: /\d{1,2}日/,
- ordinal: function (number, period) {
- switch (period) {
- case 'y':
- return number === 1 ? '元年' : number + '年';
- case 'd':
- case 'D':
- case 'DDD':
- return number + '日';
- default:
- return number;
- }
- },
- relativeTime: {
- future: '%s後',
- past: '%s前',
- s: '数秒',
- ss: '%d秒',
- m: '1分',
- mm: '%d分',
- h: '1時間',
- hh: '%d時間',
- d: '1日',
- dd: '%d日',
- M: '1ヶ月',
- MM: '%dヶ月',
- y: '1年',
- yy: '%d年',
- },
- });
+ if (comparator) {
+ isCommon = false;
+ includes = arrayIncludesWith;
+ }
+ else if (length >= LARGE_ARRAY_SIZE) {
+ var set = iteratee ? null : createSet(array);
+ if (set) {
+ return setToArray(set);
+ }
+ isCommon = false;
+ includes = cacheHas;
+ seen = new SetCache;
+ }
+ else {
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value) : value;
- return ja;
+ value = (comparator || value !== 0) ? value : 0;
+ if (isCommon && computed === computed) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ else if (!includes(seen, computed, comparator)) {
+ if (seen !== result) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+}
-})));
+module.exports = baseUniq;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/jv.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/jv.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_cacheHas.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_cacheHas.js ***!
+ \**********************************************************************************************/
+/***/ ((module) => {
-//! moment.js locale configuration
-//! locale : Javanese [jv]
-//! author : Rony Lantip : https://github.com/lantip
-//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa
+/**
+ * Checks if a `cache` value for `key` exists.
+ *
+ * @private
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function cacheHas(cache, key) {
+ return cache.has(key);
+}
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+module.exports = cacheHas;
- //! moment.js locale configuration
- var jv = moment.defineLocale('jv', {
- months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(
- '_'
- ),
- monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
- weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
- weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
- weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
- longDateFormat: {
- LT: 'HH.mm',
- LTS: 'HH.mm.ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY [pukul] HH.mm',
- LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
- },
- meridiemParse: /enjing|siyang|sonten|ndalu/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'enjing') {
- return hour;
- } else if (meridiem === 'siyang') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === 'sonten' || meridiem === 'ndalu') {
- return hour + 12;
- }
- },
- meridiem: function (hours, minutes, isLower) {
- if (hours < 11) {
- return 'enjing';
- } else if (hours < 15) {
- return 'siyang';
- } else if (hours < 19) {
- return 'sonten';
- } else {
- return 'ndalu';
- }
- },
- calendar: {
- sameDay: '[Dinten puniko pukul] LT',
- nextDay: '[Mbenjang pukul] LT',
- nextWeek: 'dddd [pukul] LT',
- lastDay: '[Kala wingi pukul] LT',
- lastWeek: 'dddd [kepengker pukul] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'wonten ing %s',
- past: '%s ingkang kepengker',
- s: 'sawetawis detik',
- ss: '%d detik',
- m: 'setunggal menit',
- mm: '%d menit',
- h: 'setunggal jam',
- hh: '%d jam',
- d: 'sedinten',
- dd: '%d dinten',
- M: 'sewulan',
- MM: '%d wulan',
- y: 'setaun',
- yy: '%d taun',
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+/***/ }),
- return jv;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_castPath.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_castPath.js ***!
+ \**********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-})));
+var isArray = __webpack_require__(/*! ./isArray */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArray.js"),
+ isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isKey.js"),
+ stringToPath = __webpack_require__(/*! ./_stringToPath */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stringToPath.js"),
+ toString = __webpack_require__(/*! ./toString */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/toString.js");
+
+/**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {Array} Returns the cast property path array.
+ */
+function castPath(value, object) {
+ if (isArray(value)) {
+ return value;
+ }
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
+}
+
+module.exports = castPath;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ka.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ka.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_coreJsData.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_coreJsData.js ***!
+ \************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Georgian [ka]
-//! author : Irakli Janiashvili : https://github.com/IrakliJani
+var root = __webpack_require__(/*! ./_root */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_root.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used to detect overreaching core-js shims. */
+var coreJsData = root['__core-js_shared__'];
- //! moment.js locale configuration
+module.exports = coreJsData;
- var ka = moment.defineLocale('ka', {
- months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(
- '_'
- ),
- monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
- weekdays: {
- standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(
- '_'
- ),
- format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(
- '_'
- ),
- isFormat: /(წინა|შემდეგ)/,
- },
- weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
- weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[დღეს] LT[-ზე]',
- nextDay: '[ხვალ] LT[-ზე]',
- lastDay: '[გუშინ] LT[-ზე]',
- nextWeek: '[შემდეგ] dddd LT[-ზე]',
- lastWeek: '[წინა] dddd LT-ზე',
- sameElse: 'L',
- },
- relativeTime: {
- future: function (s) {
- return s.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/, function (
- $0,
- $1,
- $2
- ) {
- return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';
- });
- },
- past: function (s) {
- if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {
- return s.replace(/(ი|ე)$/, 'ის წინ');
- }
- if (/წელი/.test(s)) {
- return s.replace(/წელი$/, 'წლის წინ');
- }
- return s;
- },
- s: 'რამდენიმე წამი',
- ss: '%d წამი',
- m: 'წუთი',
- mm: '%d წუთი',
- h: 'საათი',
- hh: '%d საათი',
- d: 'დღე',
- dd: '%d დღე',
- M: 'თვე',
- MM: '%d თვე',
- y: 'წელი',
- yy: '%d წელი',
- },
- dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
- ordinal: function (number) {
- if (number === 0) {
- return number;
- }
- if (number === 1) {
- return number + '-ლი';
- }
- if (
- number < 20 ||
- (number <= 100 && number % 20 === 0) ||
- number % 100 === 0
- ) {
- return 'მე-' + number;
- }
- return number + '-ე';
- },
- week: {
- dow: 1,
- doy: 7,
- },
- });
- return ka;
+/***/ }),
-})));
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_createSet.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_createSet.js ***!
+ \***********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var Set = __webpack_require__(/*! ./_Set */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Set.js"),
+ noop = __webpack_require__(/*! ./noop */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/noop.js"),
+ setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_setToArray.js");
+
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
+/**
+ * Creates a set object of `values`.
+ *
+ * @private
+ * @param {Array} values The values to add to the set.
+ * @returns {Object} Returns the new set.
+ */
+var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
+ return new Set(values);
+};
+
+module.exports = createSet;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/kk.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/kk.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_equalArrays.js":
+/*!*************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_equalArrays.js ***!
+ \*************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Kazakh [kk]
-//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan
+var SetCache = __webpack_require__(/*! ./_SetCache */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_SetCache.js"),
+ arraySome = __webpack_require__(/*! ./_arraySome */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arraySome.js"),
+ cacheHas = __webpack_require__(/*! ./_cacheHas */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_cacheHas.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
- //! moment.js locale configuration
+/**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
- var suffixes = {
- 0: '-ші',
- 1: '-ші',
- 2: '-ші',
- 3: '-ші',
- 4: '-ші',
- 5: '-ші',
- 6: '-шы',
- 7: '-ші',
- 8: '-ші',
- 9: '-шы',
- 10: '-шы',
- 20: '-шы',
- 30: '-шы',
- 40: '-шы',
- 50: '-ші',
- 60: '-шы',
- 70: '-ші',
- 80: '-ші',
- 90: '-шы',
- 100: '-ші',
- };
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(array);
+ if (stacked && stack.get(other)) {
+ return stacked == other;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
- var kk = moment.defineLocale('kk', {
- months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(
- '_'
- ),
- monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),
- weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(
- '_'
- ),
- weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),
- weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Бүгін сағат] LT',
- nextDay: '[Ертең сағат] LT',
- nextWeek: 'dddd [сағат] LT',
- lastDay: '[Кеше сағат] LT',
- lastWeek: '[Өткен аптаның] dddd [сағат] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s ішінде',
- past: '%s бұрын',
- s: 'бірнеше секунд',
- ss: '%d секунд',
- m: 'бір минут',
- mm: '%d минут',
- h: 'бір сағат',
- hh: '%d сағат',
- d: 'бір күн',
- dd: '%d күн',
- M: 'бір ай',
- MM: '%d ай',
- y: 'бір жыл',
- yy: '%d жыл',
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
- ordinal: function (number) {
- var a = number % 10,
- b = number >= 100 ? 100 : null;
- return number + (suffixes[number] || suffixes[a] || suffixes[b]);
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+ stack.set(array, other);
+ stack.set(other, array);
- return kk;
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
-})));
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!arraySome(other, function(othValue, othIndex) {
+ if (!cacheHas(seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ stack['delete'](array);
+ stack['delete'](other);
+ return result;
+}
+
+module.exports = equalArrays;
+
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_equalByTag.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_equalByTag.js ***!
+ \************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Symbol.js"),
+ Uint8Array = __webpack_require__(/*! ./_Uint8Array */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Uint8Array.js"),
+ eq = __webpack_require__(/*! ./eq */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/eq.js"),
+ equalArrays = __webpack_require__(/*! ./_equalArrays */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_equalArrays.js"),
+ mapToArray = __webpack_require__(/*! ./_mapToArray */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapToArray.js"),
+ setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_setToArray.js");
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]';
+
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
+
+/**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+ switch (tag) {
+ case dataViewTag:
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
+ }
+ object = object.buffer;
+ other = other.buffer;
+
+ case arrayBufferTag:
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
+ return false;
+ }
+ return true;
+
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return eq(+object, +other);
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
-/***/ }),
+ case mapTag:
+ var convert = mapToArray;
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/km.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/km.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ case setTag:
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
+ convert || (convert = setToArray);
-//! moment.js locale configuration
-//! locale : Cambodian [km]
-//! author : Kruy Vanna : https://github.com/kruyvanna
+ if (object.size != other.size && !isPartial) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
+ }
+ bitmask |= COMPARE_UNORDERED_FLAG;
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ // Recursively compare objects (susceptible to call stack limits).
+ stack.set(object, other);
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
+ stack['delete'](object);
+ return result;
- //! moment.js locale configuration
+ case symbolTag:
+ if (symbolValueOf) {
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
+ }
+ }
+ return false;
+}
- var symbolMap = {
- '1': '១',
- '2': '២',
- '3': '៣',
- '4': '៤',
- '5': '៥',
- '6': '៦',
- '7': '៧',
- '8': '៨',
- '9': '៩',
- '0': '០',
- },
- numberMap = {
- '១': '1',
- '២': '2',
- '៣': '3',
- '៤': '4',
- '៥': '5',
- '៦': '6',
- '៧': '7',
- '៨': '8',
- '៩': '9',
- '០': '0',
- };
+module.exports = equalByTag;
- var km = moment.defineLocale('km', {
- months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
- '_'
- ),
- monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(
- '_'
- ),
- weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
- weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
- weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- meridiemParse: /ព្រឹក|ល្ងាច/,
- isPM: function (input) {
- return input === 'ល្ងាច';
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 12) {
- return 'ព្រឹក';
- } else {
- return 'ល្ងាច';
- }
- },
- calendar: {
- sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
- nextDay: '[ស្អែក ម៉ោង] LT',
- nextWeek: 'dddd [ម៉ោង] LT',
- lastDay: '[ម្សិលមិញ ម៉ោង] LT',
- lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%sទៀត',
- past: '%sមុន',
- s: 'ប៉ុន្មានវិនាទី',
- ss: '%d វិនាទី',
- m: 'មួយនាទី',
- mm: '%d នាទី',
- h: 'មួយម៉ោង',
- hh: '%d ម៉ោង',
- d: 'មួយថ្ងៃ',
- dd: '%d ថ្ងៃ',
- M: 'មួយខែ',
- MM: '%d ខែ',
- y: 'មួយឆ្នាំ',
- yy: '%d ឆ្នាំ',
- },
- dayOfMonthOrdinalParse: /ទី\d{1,2}/,
- ordinal: 'ទី%d',
- preparse: function (string) {
- return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function (string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
- return km;
+/***/ }),
-})));
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_equalObjects.js":
+/*!**************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_equalObjects.js ***!
+ \**************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+var getAllKeys = __webpack_require__(/*! ./_getAllKeys */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getAllKeys.js");
-/***/ }),
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1;
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/kn.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/kn.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
-//! moment.js locale configuration
-//! locale : Kannada [kn]
-//! author : Rajeev Naik : https://github.com/rajeevnaikte
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = getAllKeys(object),
+ objLength = objProps.length,
+ othProps = getAllKeys(other),
+ othLength = othProps.length;
- //! moment.js locale configuration
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked && stack.get(other)) {
+ return stacked == other;
+ }
+ var result = true;
+ stack.set(object, other);
+ stack.set(other, object);
- var symbolMap = {
- '1': '೧',
- '2': '೨',
- '3': '೩',
- '4': '೪',
- '5': '೫',
- '6': '೬',
- '7': '೭',
- '8': '೮',
- '9': '೯',
- '0': '೦',
- },
- numberMap = {
- '೧': '1',
- '೨': '2',
- '೩': '3',
- '೪': '4',
- '೫': '5',
- '೬': '6',
- '೭': '7',
- '೮': '8',
- '೯': '9',
- '೦': '0',
- };
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
- var kn = moment.defineLocale('kn', {
- months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(
- '_'
- ),
- monthsShort: 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(
- '_'
- ),
- weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
- weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
- longDateFormat: {
- LT: 'A h:mm',
- LTS: 'A h:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm',
- LLLL: 'dddd, D MMMM YYYY, A h:mm',
- },
- calendar: {
- sameDay: '[ಇಂದು] LT',
- nextDay: '[ನಾಳೆ] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[ನಿನ್ನೆ] LT',
- lastWeek: '[ಕೊನೆಯ] dddd, LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s ನಂತರ',
- past: '%s ಹಿಂದೆ',
- s: 'ಕೆಲವು ಕ್ಷಣಗಳು',
- ss: '%d ಸೆಕೆಂಡುಗಳು',
- m: 'ಒಂದು ನಿಮಿಷ',
- mm: '%d ನಿಮಿಷ',
- h: 'ಒಂದು ಗಂಟೆ',
- hh: '%d ಗಂಟೆ',
- d: 'ಒಂದು ದಿನ',
- dd: '%d ದಿನ',
- M: 'ಒಂದು ತಿಂಗಳು',
- MM: '%d ತಿಂಗಳು',
- y: 'ಒಂದು ವರ್ಷ',
- yy: '%d ವರ್ಷ',
- },
- preparse: function (string) {
- return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function (string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'ರಾತ್ರಿ') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
- return hour;
- } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
- return hour >= 10 ? hour : hour + 12;
- } else if (meridiem === 'ಸಂಜೆ') {
- return hour + 12;
- }
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 4) {
- return 'ರಾತ್ರಿ';
- } else if (hour < 10) {
- return 'ಬೆಳಿಗ್ಗೆ';
- } else if (hour < 17) {
- return 'ಮಧ್ಯಾಹ್ನ';
- } else if (hour < 20) {
- return 'ಸಂಜೆ';
- } else {
- return 'ರಾತ್ರಿ';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
- ordinal: function (number) {
- return number + 'ನೇ';
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6, // The week that contains Jan 6th is the first week of the year.
- },
- });
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
- return kn;
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
+ }
+ }
+ stack['delete'](object);
+ stack['delete'](other);
+ return result;
+}
-})));
+module.exports = equalObjects;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ko.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ko.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_freeGlobal.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_freeGlobal.js ***!
+ \************************************************************************************************/
+/***/ ((module) => {
-//! moment.js locale configuration
-//! locale : Korean [ko]
-//! author : Kyungwook, Park : https://github.com/kyungw00k
-//! author : Jeeeyul Lee
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+module.exports = freeGlobal;
- //! moment.js locale configuration
- var ko = moment.defineLocale('ko', {
- months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
- monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(
- '_'
- ),
- weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
- weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
- weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
- longDateFormat: {
- LT: 'A h:mm',
- LTS: 'A h:mm:ss',
- L: 'YYYY.MM.DD.',
- LL: 'YYYY년 MMMM D일',
- LLL: 'YYYY년 MMMM D일 A h:mm',
- LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
- l: 'YYYY.MM.DD.',
- ll: 'YYYY년 MMMM D일',
- lll: 'YYYY년 MMMM D일 A h:mm',
- llll: 'YYYY년 MMMM D일 dddd A h:mm',
- },
- calendar: {
- sameDay: '오늘 LT',
- nextDay: '내일 LT',
- nextWeek: 'dddd LT',
- lastDay: '어제 LT',
- lastWeek: '지난주 dddd LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s 후',
- past: '%s 전',
- s: '몇 초',
- ss: '%d초',
- m: '1분',
- mm: '%d분',
- h: '한 시간',
- hh: '%d시간',
- d: '하루',
- dd: '%d일',
- M: '한 달',
- MM: '%d달',
- y: '일 년',
- yy: '%d년',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
- ordinal: function (number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return number + '일';
- case 'M':
- return number + '월';
- case 'w':
- case 'W':
- return number + '주';
- default:
- return number;
- }
- },
- meridiemParse: /오전|오후/,
- isPM: function (token) {
- return token === '오후';
- },
- meridiem: function (hour, minute, isUpper) {
- return hour < 12 ? '오전' : '오후';
- },
- });
+/***/ }),
- return ko;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getAllKeys.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getAllKeys.js ***!
+ \************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-})));
+var baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseGetAllKeys.js"),
+ getSymbols = __webpack_require__(/*! ./_getSymbols */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getSymbols.js"),
+ keys = __webpack_require__(/*! ./keys */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/keys.js");
+
+/**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function getAllKeys(object) {
+ return baseGetAllKeys(object, keys, getSymbols);
+}
+
+module.exports = getAllKeys;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ku.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ku.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getMapData.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getMapData.js ***!
+ \************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Kurdish [ku]
-//! author : Shahram Mebashar : https://github.com/ShahramMebashar
+var isKeyable = __webpack_require__(/*! ./_isKeyable */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isKeyable.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+}
- //! moment.js locale configuration
+module.exports = getMapData;
- var symbolMap = {
- '1': '١',
- '2': '٢',
- '3': '٣',
- '4': '٤',
- '5': '٥',
- '6': '٦',
- '7': '٧',
- '8': '٨',
- '9': '٩',
- '0': '٠',
- },
- numberMap = {
- '١': '1',
- '٢': '2',
- '٣': '3',
- '٤': '4',
- '٥': '5',
- '٦': '6',
- '٧': '7',
- '٨': '8',
- '٩': '9',
- '٠': '0',
- },
- months = [
- 'کانونی دووەم',
- 'شوبات',
- 'ئازار',
- 'نیسان',
- 'ئایار',
- 'حوزەیران',
- 'تەمموز',
- 'ئاب',
- 'ئەیلوول',
- 'تشرینی یەكەم',
- 'تشرینی دووەم',
- 'كانونی یەکەم',
- ];
- var ku = moment.defineLocale('ku', {
- months: months,
- monthsShort: months,
- weekdays: 'یهكشهممه_دووشهممه_سێشهممه_چوارشهممه_پێنجشهممه_ههینی_شهممه'.split(
- '_'
- ),
- weekdaysShort: 'یهكشهم_دووشهم_سێشهم_چوارشهم_پێنجشهم_ههینی_شهممه'.split(
- '_'
- ),
- weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- meridiemParse: /ئێواره|بهیانی/,
- isPM: function (input) {
- return /ئێواره/.test(input);
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 12) {
- return 'بهیانی';
- } else {
- return 'ئێواره';
- }
- },
- calendar: {
- sameDay: '[ئهمرۆ كاتژمێر] LT',
- nextDay: '[بهیانی كاتژمێر] LT',
- nextWeek: 'dddd [كاتژمێر] LT',
- lastDay: '[دوێنێ كاتژمێر] LT',
- lastWeek: 'dddd [كاتژمێر] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'له %s',
- past: '%s',
- s: 'چهند چركهیهك',
- ss: 'چركه %d',
- m: 'یهك خولهك',
- mm: '%d خولهك',
- h: 'یهك كاتژمێر',
- hh: '%d كاتژمێر',
- d: 'یهك ڕۆژ',
- dd: '%d ڕۆژ',
- M: 'یهك مانگ',
- MM: '%d مانگ',
- y: 'یهك ساڵ',
- yy: '%d ساڵ',
- },
- preparse: function (string) {
- return string
- .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
- return numberMap[match];
- })
- .replace(/،/g, ',');
- },
- postformat: function (string) {
- return string
- .replace(/\d/g, function (match) {
- return symbolMap[match];
- })
- .replace(/,/g, '،');
- },
- week: {
- dow: 6, // Saturday is the first day of the week.
- doy: 12, // The week that contains Jan 12th is the first week of the year.
- },
- });
+/***/ }),
- return ku;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getMatchData.js":
+/*!**************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getMatchData.js ***!
+ \**************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-})));
+var isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isStrictComparable.js"),
+ keys = __webpack_require__(/*! ./keys */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/keys.js");
+/**
+ * Gets the property names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+function getMatchData(object) {
+ var result = keys(object),
+ length = result.length;
-/***/ }),
+ while (length--) {
+ var key = result[length],
+ value = object[key];
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ky.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ky.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ result[length] = [key, value, isStrictComparable(value)];
+ }
+ return result;
+}
-//! moment.js locale configuration
-//! locale : Kyrgyz [ky]
-//! author : Chyngyz Arystan uulu : https://github.com/chyngyz
+module.exports = getMatchData;
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
- //! moment.js locale configuration
+/***/ }),
- var suffixes = {
- 0: '-чү',
- 1: '-чи',
- 2: '-чи',
- 3: '-чү',
- 4: '-чү',
- 5: '-чи',
- 6: '-чы',
- 7: '-чи',
- 8: '-чи',
- 9: '-чу',
- 10: '-чу',
- 20: '-чы',
- 30: '-чу',
- 40: '-чы',
- 50: '-чү',
- 60: '-чы',
- 70: '-чи',
- 80: '-чи',
- 90: '-чу',
- 100: '-чү',
- };
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getNative.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getNative.js ***!
+ \***********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- var ky = moment.defineLocale('ky', {
- months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
- '_'
- ),
- monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(
- '_'
- ),
- weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(
- '_'
- ),
- weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),
- weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Бүгүн саат] LT',
- nextDay: '[Эртең саат] LT',
- nextWeek: 'dddd [саат] LT',
- lastDay: '[Кечээ саат] LT',
- lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s ичинде',
- past: '%s мурун',
- s: 'бирнече секунд',
- ss: '%d секунд',
- m: 'бир мүнөт',
- mm: '%d мүнөт',
- h: 'бир саат',
- hh: '%d саат',
- d: 'бир күн',
- dd: '%d күн',
- M: 'бир ай',
- MM: '%d ай',
- y: 'бир жыл',
- yy: '%d жыл',
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
- ordinal: function (number) {
- var a = number % 10,
- b = number >= 100 ? 100 : null;
- return number + (suffixes[number] || suffixes[a] || suffixes[b]);
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+var baseIsNative = __webpack_require__(/*! ./_baseIsNative */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsNative.js"),
+ getValue = __webpack_require__(/*! ./_getValue */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getValue.js");
- return ky;
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+}
-})));
+module.exports = getNative;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/lb.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/lb.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getRawTag.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getRawTag.js ***!
+ \***********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Luxembourgish [lb]
-//! author : mweimerskirch : https://github.com/mweimerskirch
-//! author : David Raison : https://github.com/kwisatz
+var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Symbol.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
- //! moment.js locale configuration
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var format = {
- m: ['eng Minutt', 'enger Minutt'],
- h: ['eng Stonn', 'enger Stonn'],
- d: ['een Dag', 'engem Dag'],
- M: ['ee Mount', 'engem Mount'],
- y: ['ee Joer', 'engem Joer'],
- };
- return withoutSuffix ? format[key][0] : format[key][1];
- }
- function processFutureTime(string) {
- var number = string.substr(0, string.indexOf(' '));
- if (eifelerRegelAppliesToNumber(number)) {
- return 'a ' + string;
- }
- return 'an ' + string;
- }
- function processPastTime(string) {
- var number = string.substr(0, string.indexOf(' '));
- if (eifelerRegelAppliesToNumber(number)) {
- return 'viru ' + string;
- }
- return 'virun ' + string;
- }
- /**
- * Returns true if the word before the given number loses the '-n' ending.
- * e.g. 'an 10 Deeg' but 'a 5 Deeg'
- *
- * @param number {integer}
- * @returns {boolean}
- */
- function eifelerRegelAppliesToNumber(number) {
- number = parseInt(number, 10);
- if (isNaN(number)) {
- return false;
- }
- if (number < 0) {
- // Negative Number --> always true
- return true;
- } else if (number < 10) {
- // Only 1 digit
- if (4 <= number && number <= 7) {
- return true;
- }
- return false;
- } else if (number < 100) {
- // 2 digits
- var lastDigit = number % 10,
- firstDigit = number / 10;
- if (lastDigit === 0) {
- return eifelerRegelAppliesToNumber(firstDigit);
- }
- return eifelerRegelAppliesToNumber(lastDigit);
- } else if (number < 10000) {
- // 3 or 4 digits --> recursively check first digit
- while (number >= 10) {
- number = number / 10;
- }
- return eifelerRegelAppliesToNumber(number);
- } else {
- // Anything larger than 4 digits: recursively check first n-3 digits
- number = number / 1000;
- return eifelerRegelAppliesToNumber(number);
- }
- }
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
- var lb = moment.defineLocale('lb', {
- months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(
- '_'
- ),
- monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(
- '_'
- ),
- weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
- weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm [Auer]',
- LTS: 'H:mm:ss [Auer]',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm [Auer]',
- LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',
- },
- calendar: {
- sameDay: '[Haut um] LT',
- sameElse: 'L',
- nextDay: '[Muer um] LT',
- nextWeek: 'dddd [um] LT',
- lastDay: '[Gëschter um] LT',
- lastWeek: function () {
- // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
- switch (this.day()) {
- case 2:
- case 4:
- return '[Leschten] dddd [um] LT';
- default:
- return '[Leschte] dddd [um] LT';
- }
- },
- },
- relativeTime: {
- future: processFutureTime,
- past: processPastTime,
- s: 'e puer Sekonnen',
- ss: '%d Sekonnen',
- m: processRelativeTime,
- mm: '%d Minutten',
- h: processRelativeTime,
- hh: '%d Stonnen',
- d: processRelativeTime,
- dd: '%d Deeg',
- M: processRelativeTime,
- MM: '%d Méint',
- y: processRelativeTime,
- yy: '%d Joer',
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/** Built-in value references. */
+var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
- return lb;
+/**
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the raw `toStringTag`.
+ */
+function getRawTag(value) {
+ var isOwn = hasOwnProperty.call(value, symToStringTag),
+ tag = value[symToStringTag];
-})));
+ try {
+ value[symToStringTag] = undefined;
+ var unmasked = true;
+ } catch (e) {}
+
+ var result = nativeObjectToString.call(value);
+ if (unmasked) {
+ if (isOwn) {
+ value[symToStringTag] = tag;
+ } else {
+ delete value[symToStringTag];
+ }
+ }
+ return result;
+}
+
+module.exports = getRawTag;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/lo.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/lo.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getSymbols.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getSymbols.js ***!
+ \************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Lao [lo]
-//! author : Ryan Hart : https://github.com/ryanhart2
+var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayFilter.js"),
+ stubArray = __webpack_require__(/*! ./stubArray */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/stubArray.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
- //! moment.js locale configuration
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;
- var lo = moment.defineLocale('lo', {
- months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
- '_'
- ),
- monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(
- '_'
- ),
- weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
- weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
- weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'ວັນdddd D MMMM YYYY HH:mm',
- },
- meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
- isPM: function (input) {
- return input === 'ຕອນແລງ';
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 12) {
- return 'ຕອນເຊົ້າ';
- } else {
- return 'ຕອນແລງ';
- }
- },
- calendar: {
- sameDay: '[ມື້ນີ້ເວລາ] LT',
- nextDay: '[ມື້ອື່ນເວລາ] LT',
- nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',
- lastDay: '[ມື້ວານນີ້ເວລາ] LT',
- lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'ອີກ %s',
- past: '%sຜ່ານມາ',
- s: 'ບໍ່ເທົ່າໃດວິນາທີ',
- ss: '%d ວິນາທີ',
- m: '1 ນາທີ',
- mm: '%d ນາທີ',
- h: '1 ຊົ່ວໂມງ',
- hh: '%d ຊົ່ວໂມງ',
- d: '1 ມື້',
- dd: '%d ມື້',
- M: '1 ເດືອນ',
- MM: '%d ເດືອນ',
- y: '1 ປີ',
- yy: '%d ປີ',
- },
- dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
- ordinal: function (number) {
- return 'ທີ່' + number;
- },
- });
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeGetSymbols = Object.getOwnPropertySymbols;
- return lo;
+/**
+ * Creates an array of the own enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
+ if (object == null) {
+ return [];
+ }
+ object = Object(object);
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
+ return propertyIsEnumerable.call(object, symbol);
+ });
+};
-})));
+module.exports = getSymbols;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/lt.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/lt.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getTag.js":
+/*!********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getTag.js ***!
+ \********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Lithuanian [lt]
-//! author : Mindaugas Mozūras : https://github.com/mmozuras
+var DataView = __webpack_require__(/*! ./_DataView */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_DataView.js"),
+ Map = __webpack_require__(/*! ./_Map */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Map.js"),
+ Promise = __webpack_require__(/*! ./_Promise */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Promise.js"),
+ Set = __webpack_require__(/*! ./_Set */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Set.js"),
+ WeakMap = __webpack_require__(/*! ./_WeakMap */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_WeakMap.js"),
+ baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseGetTag.js"),
+ toSource = __webpack_require__(/*! ./_toSource */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_toSource.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ setTag = '[object Set]',
+ weakMapTag = '[object WeakMap]';
- //! moment.js locale configuration
+var dataViewTag = '[object DataView]';
- var units = {
- ss: 'sekundė_sekundžių_sekundes',
- m: 'minutė_minutės_minutę',
- mm: 'minutės_minučių_minutes',
- h: 'valanda_valandos_valandą',
- hh: 'valandos_valandų_valandas',
- d: 'diena_dienos_dieną',
- dd: 'dienos_dienų_dienas',
- M: 'mėnuo_mėnesio_mėnesį',
- MM: 'mėnesiai_mėnesių_mėnesius',
- y: 'metai_metų_metus',
- yy: 'metai_metų_metus',
- };
- function translateSeconds(number, withoutSuffix, key, isFuture) {
- if (withoutSuffix) {
- return 'kelios sekundės';
- } else {
- return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
- }
- }
- function translateSingular(number, withoutSuffix, key, isFuture) {
- return withoutSuffix
- ? forms(key)[0]
- : isFuture
- ? forms(key)[1]
- : forms(key)[2];
- }
- function special(number) {
- return number % 10 === 0 || (number > 10 && number < 20);
- }
- function forms(key) {
- return units[key].split('_');
- }
- function translate(number, withoutSuffix, key, isFuture) {
- var result = number + ' ';
- if (number === 1) {
- return (
- result + translateSingular(number, withoutSuffix, key[0], isFuture)
- );
- } else if (withoutSuffix) {
- return result + (special(number) ? forms(key)[1] : forms(key)[0]);
- } else {
- if (isFuture) {
- return result + forms(key)[1];
- } else {
- return result + (special(number) ? forms(key)[1] : forms(key)[2]);
- }
- }
- }
- var lt = moment.defineLocale('lt', {
- months: {
- format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(
- '_'
- ),
- standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(
- '_'
- ),
- isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,
- },
- monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
- weekdays: {
- format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(
- '_'
- ),
- standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(
- '_'
- ),
- isFormat: /dddd HH:mm/,
- },
- weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
- weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'YYYY [m.] MMMM D [d.]',
- LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
- LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
- l: 'YYYY-MM-DD',
- ll: 'YYYY [m.] MMMM D [d.]',
- lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
- llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',
- },
- calendar: {
- sameDay: '[Šiandien] LT',
- nextDay: '[Rytoj] LT',
- nextWeek: 'dddd LT',
- lastDay: '[Vakar] LT',
- lastWeek: '[Praėjusį] dddd LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'po %s',
- past: 'prieš %s',
- s: translateSeconds,
- ss: translate,
- m: translateSingular,
- mm: translate,
- h: translateSingular,
- hh: translate,
- d: translateSingular,
- dd: translate,
- M: translateSingular,
- MM: translate,
- y: translateSingular,
- yy: translate,
- },
- dayOfMonthOrdinalParse: /\d{1,2}-oji/,
- ordinal: function (number) {
- return number + '-oji';
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/** Used to detect maps, sets, and weakmaps. */
+var dataViewCtorString = toSource(DataView),
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
- return lt;
+/**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+var getTag = baseGetTag;
-})));
+// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
+if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = baseGetTag(value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? toSource(Ctor) : '';
+
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ }
+ return result;
+ };
+}
+
+module.exports = getTag;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/lv.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/lv.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getValue.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getValue.js ***!
+ \**********************************************************************************************/
+/***/ ((module) => {
-//! moment.js locale configuration
-//! locale : Latvian [lv]
-//! author : Kristaps Karlsons : https://github.com/skakri
-//! author : Jānis Elmeris : https://github.com/JanisE
+/**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+function getValue(object, key) {
+ return object == null ? undefined : object[key];
+}
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+module.exports = getValue;
- //! moment.js locale configuration
- var units = {
- ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),
- m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
- mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),
- h: 'stundas_stundām_stunda_stundas'.split('_'),
- hh: 'stundas_stundām_stunda_stundas'.split('_'),
- d: 'dienas_dienām_diena_dienas'.split('_'),
- dd: 'dienas_dienām_diena_dienas'.split('_'),
- M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
- MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
- y: 'gada_gadiem_gads_gadi'.split('_'),
- yy: 'gada_gadiem_gads_gadi'.split('_'),
- };
- /**
- * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
- */
- function format(forms, number, withoutSuffix) {
- if (withoutSuffix) {
- // E.g. "21 minūte", "3 minūtes".
- return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
- } else {
- // E.g. "21 minūtes" as in "pēc 21 minūtes".
- // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
- return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
- }
- }
- function relativeTimeWithPlural(number, withoutSuffix, key) {
- return number + ' ' + format(units[key], number, withoutSuffix);
- }
- function relativeTimeWithSingular(number, withoutSuffix, key) {
- return format(units[key], number, withoutSuffix);
- }
- function relativeSeconds(number, withoutSuffix) {
- return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
- }
+/***/ }),
- var lv = moment.defineLocale('lv', {
- months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(
- '_'
- ),
- monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
- weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(
- '_'
- ),
- weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),
- weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY.',
- LL: 'YYYY. [gada] D. MMMM',
- LLL: 'YYYY. [gada] D. MMMM, HH:mm',
- LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',
- },
- calendar: {
- sameDay: '[Šodien pulksten] LT',
- nextDay: '[Rīt pulksten] LT',
- nextWeek: 'dddd [pulksten] LT',
- lastDay: '[Vakar pulksten] LT',
- lastWeek: '[Pagājušā] dddd [pulksten] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'pēc %s',
- past: 'pirms %s',
- s: relativeSeconds,
- ss: relativeTimeWithPlural,
- m: relativeTimeWithSingular,
- mm: relativeTimeWithPlural,
- h: relativeTimeWithSingular,
- hh: relativeTimeWithPlural,
- d: relativeTimeWithSingular,
- dd: relativeTimeWithPlural,
- M: relativeTimeWithSingular,
- MM: relativeTimeWithPlural,
- y: relativeTimeWithSingular,
- yy: relativeTimeWithPlural,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hasPath.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hasPath.js ***!
+ \*********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- return lv;
+var castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_castPath.js"),
+ isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArguments.js"),
+ isArray = __webpack_require__(/*! ./isArray */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArray.js"),
+ isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isIndex.js"),
+ isLength = __webpack_require__(/*! ./isLength */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isLength.js"),
+ toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_toKey.js");
-})));
+/**
+ * Checks if `path` exists on `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @param {Function} hasFunc The function to check properties.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ */
+function hasPath(object, path, hasFunc) {
+ path = castPath(path, object);
+
+ var index = -1,
+ length = path.length,
+ result = false;
+
+ while (++index < length) {
+ var key = toKey(path[index]);
+ if (!(result = object != null && hasFunc(object, key))) {
+ break;
+ }
+ object = object[key];
+ }
+ if (result || ++index != length) {
+ return result;
+ }
+ length = object == null ? 0 : object.length;
+ return !!length && isLength(length) && isIndex(key, length) &&
+ (isArray(object) || isArguments(object));
+}
+
+module.exports = hasPath;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/me.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/me.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hashClear.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hashClear.js ***!
+ \***********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Montenegrin [me]
-//! author : Miodrag Nikač : https://github.com/miodragnikac
+var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_nativeCreate.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+ this.size = 0;
+}
- //! moment.js locale configuration
+module.exports = hashClear;
- var translator = {
- words: {
- //Different grammatical cases
- ss: ['sekund', 'sekunda', 'sekundi'],
- m: ['jedan minut', 'jednog minuta'],
- mm: ['minut', 'minuta', 'minuta'],
- h: ['jedan sat', 'jednog sata'],
- hh: ['sat', 'sata', 'sati'],
- dd: ['dan', 'dana', 'dana'],
- MM: ['mjesec', 'mjeseca', 'mjeseci'],
- yy: ['godina', 'godine', 'godina'],
- },
- correctGrammaticalCase: function (number, wordKey) {
- return number === 1
- ? wordKey[0]
- : number >= 2 && number <= 4
- ? wordKey[1]
- : wordKey[2];
- },
- translate: function (number, withoutSuffix, key) {
- var wordKey = translator.words[key];
- if (key.length === 1) {
- return withoutSuffix ? wordKey[0] : wordKey[1];
- } else {
- return (
- number +
- ' ' +
- translator.correctGrammaticalCase(number, wordKey)
- );
- }
- },
- };
- var me = moment.defineLocale('me', {
- months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
- '_'
- ),
- monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(
- '_'
- ),
- weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
- weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd, D. MMMM YYYY H:mm',
- },
- calendar: {
- sameDay: '[danas u] LT',
- nextDay: '[sjutra u] LT',
+/***/ }),
- nextWeek: function () {
- switch (this.day()) {
- case 0:
- return '[u] [nedjelju] [u] LT';
- case 3:
- return '[u] [srijedu] [u] LT';
- case 6:
- return '[u] [subotu] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[u] dddd [u] LT';
- }
- },
- lastDay: '[juče u] LT',
- lastWeek: function () {
- var lastWeekDays = [
- '[prošle] [nedjelje] [u] LT',
- '[prošlog] [ponedjeljka] [u] LT',
- '[prošlog] [utorka] [u] LT',
- '[prošle] [srijede] [u] LT',
- '[prošlog] [četvrtka] [u] LT',
- '[prošlog] [petka] [u] LT',
- '[prošle] [subote] [u] LT',
- ];
- return lastWeekDays[this.day()];
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'za %s',
- past: 'prije %s',
- s: 'nekoliko sekundi',
- ss: translator.translate,
- m: translator.translate,
- mm: translator.translate,
- h: translator.translate,
- hh: translator.translate,
- d: 'dan',
- dd: translator.translate,
- M: 'mjesec',
- MM: translator.translate,
- y: 'godinu',
- yy: translator.translate,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hashDelete.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hashDelete.js ***!
+ \************************************************************************************************/
+/***/ ((module) => {
- return me;
+/**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function hashDelete(key) {
+ var result = this.has(key) && delete this.__data__[key];
+ this.size -= result ? 1 : 0;
+ return result;
+}
-})));
+module.exports = hashDelete;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mi.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mi.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hashGet.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hashGet.js ***!
+ \*********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Maori [mi]
-//! author : John Corrigan : https://github.com/johnideal
+var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_nativeCreate.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
- //! moment.js locale configuration
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
- var mi = moment.defineLocale('mi', {
- months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(
- '_'
- ),
- monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(
- '_'
- ),
- monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
- monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
- monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
- monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
- weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
- weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
- weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY [i] HH:mm',
- LLLL: 'dddd, D MMMM YYYY [i] HH:mm',
- },
- calendar: {
- sameDay: '[i teie mahana, i] LT',
- nextDay: '[apopo i] LT',
- nextWeek: 'dddd [i] LT',
- lastDay: '[inanahi i] LT',
- lastWeek: 'dddd [whakamutunga i] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'i roto i %s',
- past: '%s i mua',
- s: 'te hēkona ruarua',
- ss: '%d hēkona',
- m: 'he meneti',
- mm: '%d meneti',
- h: 'te haora',
- hh: '%d haora',
- d: 'he ra',
- dd: '%d ra',
- M: 'he marama',
- MM: '%d marama',
- y: 'he tau',
- yy: '%d tau',
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
- return mi;
+/**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+}
-})));
+module.exports = hashGet;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mk.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mk.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
-
-//! moment.js locale configuration
-//! locale : Macedonian [mk]
-//! author : Borislav Mickov : https://github.com/B0k0
-//! author : Sashko Todorov : https://github.com/bkyceh
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hashHas.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hashHas.js ***!
+ \*********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_nativeCreate.js");
- //! moment.js locale configuration
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
- var mk = moment.defineLocale('mk', {
- months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(
- '_'
- ),
- monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
- weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(
- '_'
- ),
- weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
- weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'D.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY H:mm',
- LLLL: 'dddd, D MMMM YYYY H:mm',
- },
- calendar: {
- sameDay: '[Денес во] LT',
- nextDay: '[Утре во] LT',
- nextWeek: '[Во] dddd [во] LT',
- lastDay: '[Вчера во] LT',
- lastWeek: function () {
- switch (this.day()) {
- case 0:
- case 3:
- case 6:
- return '[Изминатата] dddd [во] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[Изминатиот] dddd [во] LT';
- }
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'за %s',
- past: 'пред %s',
- s: 'неколку секунди',
- ss: '%d секунди',
- m: 'една минута',
- mm: '%d минути',
- h: 'еден час',
- hh: '%d часа',
- d: 'еден ден',
- dd: '%d дена',
- M: 'еден месец',
- MM: '%d месеци',
- y: 'една година',
- yy: '%d години',
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
- ordinal: function (number) {
- var lastDigit = number % 10,
- last2Digits = number % 100;
- if (number === 0) {
- return number + '-ев';
- } else if (last2Digits === 0) {
- return number + '-ен';
- } else if (last2Digits > 10 && last2Digits < 20) {
- return number + '-ти';
- } else if (lastDigit === 1) {
- return number + '-ви';
- } else if (lastDigit === 2) {
- return number + '-ри';
- } else if (lastDigit === 7 || lastDigit === 8) {
- return number + '-ми';
- } else {
- return number + '-ти';
- }
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
- return mk;
+/**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
+}
-})));
+module.exports = hashHas;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ml.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ml.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hashSet.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hashSet.js ***!
+ \*********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Malayalam [ml]
-//! author : Floyd Pink : https://github.com/floydpink
+var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_nativeCreate.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
- //! moment.js locale configuration
+/**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+function hashSet(key, value) {
+ var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+}
- var ml = moment.defineLocale('ml', {
- months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(
- '_'
- ),
- monthsShort: 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(
- '_'
- ),
- weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
- weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
- longDateFormat: {
- LT: 'A h:mm -നു',
- LTS: 'A h:mm:ss -നു',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm -നു',
- LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',
- },
- calendar: {
- sameDay: '[ഇന്ന്] LT',
- nextDay: '[നാളെ] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[ഇന്നലെ] LT',
- lastWeek: '[കഴിഞ്ഞ] dddd, LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s കഴിഞ്ഞ്',
- past: '%s മുൻപ്',
- s: 'അൽപ നിമിഷങ്ങൾ',
- ss: '%d സെക്കൻഡ്',
- m: 'ഒരു മിനിറ്റ്',
- mm: '%d മിനിറ്റ്',
- h: 'ഒരു മണിക്കൂർ',
- hh: '%d മണിക്കൂർ',
- d: 'ഒരു ദിവസം',
- dd: '%d ദിവസം',
- M: 'ഒരു മാസം',
- MM: '%d മാസം',
- y: 'ഒരു വർഷം',
- yy: '%d വർഷം',
- },
- meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (
- (meridiem === 'രാത്രി' && hour >= 4) ||
- meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
- meridiem === 'വൈകുന്നേരം'
- ) {
- return hour + 12;
- } else {
- return hour;
- }
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 4) {
- return 'രാത്രി';
- } else if (hour < 12) {
- return 'രാവിലെ';
- } else if (hour < 17) {
- return 'ഉച്ച കഴിഞ്ഞ്';
- } else if (hour < 20) {
- return 'വൈകുന്നേരം';
- } else {
- return 'രാത്രി';
- }
- },
- });
+module.exports = hashSet;
- return ml;
-})));
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isIndex.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isIndex.js ***!
+ \*********************************************************************************************/
+/***/ ((module) => {
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/** Used to detect unsigned integer values. */
+var reIsUint = /^(?:0|[1-9]\d*)$/;
+
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ var type = typeof value;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+
+ return !!length &&
+ (type == 'number' ||
+ (type != 'symbol' && reIsUint.test(value))) &&
+ (value > -1 && value % 1 == 0 && value < length);
+}
+
+module.exports = isIndex;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mn.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mn.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isKey.js":
+/*!*******************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isKey.js ***!
+ \*******************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Mongolian [mn]
-//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7
+var isArray = __webpack_require__(/*! ./isArray */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArray.js"),
+ isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isSymbol.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used to match property names within property paths. */
+var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/;
- //! moment.js locale configuration
+/**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+function isKey(value, object) {
+ if (isArray(value)) {
+ return false;
+ }
+ var type = typeof value;
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
+ value == null || isSymbol(value)) {
+ return true;
+ }
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
+ (object != null && value in Object(object));
+}
- function translate(number, withoutSuffix, key, isFuture) {
- switch (key) {
- case 's':
- return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
- case 'ss':
- return number + (withoutSuffix ? ' секунд' : ' секундын');
- case 'm':
- case 'mm':
- return number + (withoutSuffix ? ' минут' : ' минутын');
- case 'h':
- case 'hh':
- return number + (withoutSuffix ? ' цаг' : ' цагийн');
- case 'd':
- case 'dd':
- return number + (withoutSuffix ? ' өдөр' : ' өдрийн');
- case 'M':
- case 'MM':
- return number + (withoutSuffix ? ' сар' : ' сарын');
- case 'y':
- case 'yy':
- return number + (withoutSuffix ? ' жил' : ' жилийн');
- default:
- return number;
- }
- }
+module.exports = isKey;
- var mn = moment.defineLocale('mn', {
- months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(
- '_'
- ),
- monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
- weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
- weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'YYYY оны MMMMын D',
- LLL: 'YYYY оны MMMMын D HH:mm',
- LLLL: 'dddd, YYYY оны MMMMын D HH:mm',
- },
- meridiemParse: /ҮӨ|ҮХ/i,
- isPM: function (input) {
- return input === 'ҮХ';
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 12) {
- return 'ҮӨ';
- } else {
- return 'ҮХ';
- }
- },
- calendar: {
- sameDay: '[Өнөөдөр] LT',
- nextDay: '[Маргааш] LT',
- nextWeek: '[Ирэх] dddd LT',
- lastDay: '[Өчигдөр] LT',
- lastWeek: '[Өнгөрсөн] dddd LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s дараа',
- past: '%s өмнө',
- s: translate,
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: translate,
- dd: translate,
- M: translate,
- MM: translate,
- y: translate,
- yy: translate,
- },
- dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
- ordinal: function (number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return number + ' өдөр';
- default:
- return number;
- }
- },
- });
- return mn;
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isKeyable.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isKeyable.js ***!
+ \***********************************************************************************************/
+/***/ ((module) => {
+
+/**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+}
-})));
+module.exports = isKeyable;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mr.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mr.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isMasked.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isMasked.js ***!
+ \**********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Marathi [mr]
-//! author : Harshad Kale : https://github.com/kalehv
-//! author : Vivek Athalye : https://github.com/vnathalye
+var coreJsData = __webpack_require__(/*! ./_coreJsData */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_coreJsData.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used to detect methods masquerading as native. */
+var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+}());
- //! moment.js locale configuration
+/**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+}
- var symbolMap = {
- '1': '१',
- '2': '२',
- '3': '३',
- '4': '४',
- '5': '५',
- '6': '६',
- '7': '७',
- '8': '८',
- '9': '९',
- '0': '०',
- },
- numberMap = {
- '१': '1',
- '२': '2',
- '३': '3',
- '४': '4',
- '५': '5',
- '६': '6',
- '७': '7',
- '८': '8',
- '९': '9',
- '०': '0',
- };
+module.exports = isMasked;
- function relativeTimeMr(number, withoutSuffix, string, isFuture) {
- var output = '';
- if (withoutSuffix) {
- switch (string) {
- case 's':
- output = 'काही सेकंद';
- break;
- case 'ss':
- output = '%d सेकंद';
- break;
- case 'm':
- output = 'एक मिनिट';
- break;
- case 'mm':
- output = '%d मिनिटे';
- break;
- case 'h':
- output = 'एक तास';
- break;
- case 'hh':
- output = '%d तास';
- break;
- case 'd':
- output = 'एक दिवस';
- break;
- case 'dd':
- output = '%d दिवस';
- break;
- case 'M':
- output = 'एक महिना';
- break;
- case 'MM':
- output = '%d महिने';
- break;
- case 'y':
- output = 'एक वर्ष';
- break;
- case 'yy':
- output = '%d वर्षे';
- break;
- }
- } else {
- switch (string) {
- case 's':
- output = 'काही सेकंदां';
- break;
- case 'ss':
- output = '%d सेकंदां';
- break;
- case 'm':
- output = 'एका मिनिटा';
- break;
- case 'mm':
- output = '%d मिनिटां';
- break;
- case 'h':
- output = 'एका तासा';
- break;
- case 'hh':
- output = '%d तासां';
- break;
- case 'd':
- output = 'एका दिवसा';
- break;
- case 'dd':
- output = '%d दिवसां';
- break;
- case 'M':
- output = 'एका महिन्या';
- break;
- case 'MM':
- output = '%d महिन्यां';
- break;
- case 'y':
- output = 'एका वर्षा';
- break;
- case 'yy':
- output = '%d वर्षां';
- break;
- }
- }
- return output.replace(/%d/i, number);
- }
- var mr = moment.defineLocale('mr', {
- months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
- '_'
- ),
- monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
- weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
- weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
- longDateFormat: {
- LT: 'A h:mm वाजता',
- LTS: 'A h:mm:ss वाजता',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm वाजता',
- LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',
- },
- calendar: {
- sameDay: '[आज] LT',
- nextDay: '[उद्या] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[काल] LT',
- lastWeek: '[मागील] dddd, LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%sमध्ये',
- past: '%sपूर्वी',
- s: relativeTimeMr,
- ss: relativeTimeMr,
- m: relativeTimeMr,
- mm: relativeTimeMr,
- h: relativeTimeMr,
- hh: relativeTimeMr,
- d: relativeTimeMr,
- dd: relativeTimeMr,
- M: relativeTimeMr,
- MM: relativeTimeMr,
- y: relativeTimeMr,
- yy: relativeTimeMr,
- },
- preparse: function (string) {
- return string.replace(/[१२३४५६७८९०]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function (string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {
- return hour;
- } else if (
- meridiem === 'दुपारी' ||
- meridiem === 'सायंकाळी' ||
- meridiem === 'रात्री'
- ) {
- return hour >= 12 ? hour : hour + 12;
- }
- },
- meridiem: function (hour, minute, isLower) {
- if (hour >= 0 && hour < 6) {
- return 'पहाटे';
- } else if (hour < 12) {
- return 'सकाळी';
- } else if (hour < 17) {
- return 'दुपारी';
- } else if (hour < 20) {
- return 'सायंकाळी';
- } else {
- return 'रात्री';
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6, // The week that contains Jan 6th is the first week of the year.
- },
- });
+/***/ }),
- return mr;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isPrototype.js":
+/*!*************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isPrototype.js ***!
+ \*************************************************************************************************/
+/***/ ((module) => {
-})));
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
+}
+
+module.exports = isPrototype;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ms-my.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ms-my.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isStrictComparable.js":
+/*!********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isStrictComparable.js ***!
+ \********************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Malay [ms-my]
-//! note : DEPRECATED, the correct one is [ms]
-//! author : Weldan Jamili : https://github.com/weldan
+var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isObject.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+function isStrictComparable(value) {
+ return value === value && !isObject(value);
+}
- //! moment.js locale configuration
+module.exports = isStrictComparable;
- var msMy = moment.defineLocale('ms-my', {
- months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
- '_'
- ),
- monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
- weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
- weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
- weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
- longDateFormat: {
- LT: 'HH.mm',
- LTS: 'HH.mm.ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY [pukul] HH.mm',
- LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
- },
- meridiemParse: /pagi|tengahari|petang|malam/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'pagi') {
- return hour;
- } else if (meridiem === 'tengahari') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === 'petang' || meridiem === 'malam') {
- return hour + 12;
- }
- },
- meridiem: function (hours, minutes, isLower) {
- if (hours < 11) {
- return 'pagi';
- } else if (hours < 15) {
- return 'tengahari';
- } else if (hours < 19) {
- return 'petang';
- } else {
- return 'malam';
- }
- },
- calendar: {
- sameDay: '[Hari ini pukul] LT',
- nextDay: '[Esok pukul] LT',
- nextWeek: 'dddd [pukul] LT',
- lastDay: '[Kelmarin pukul] LT',
- lastWeek: 'dddd [lepas pukul] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'dalam %s',
- past: '%s yang lepas',
- s: 'beberapa saat',
- ss: '%d saat',
- m: 'seminit',
- mm: '%d minit',
- h: 'sejam',
- hh: '%d jam',
- d: 'sehari',
- dd: '%d hari',
- M: 'sebulan',
- MM: '%d bulan',
- y: 'setahun',
- yy: '%d tahun',
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
- return msMy;
+/***/ }),
-})));
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_listCacheClear.js":
+/*!****************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_listCacheClear.js ***!
+ \****************************************************************************************************/
+/***/ ((module) => {
+
+/**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+function listCacheClear() {
+ this.__data__ = [];
+ this.size = 0;
+}
+
+module.exports = listCacheClear;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ms.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ms.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_listCacheDelete.js":
+/*!*****************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_listCacheDelete.js ***!
+ \*****************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Malay [ms]
-//! author : Weldan Jamili : https://github.com/weldan
+var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_assocIndexOf.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
- //! moment.js locale configuration
+/** Built-in value references. */
+var splice = arrayProto.splice;
- var ms = moment.defineLocale('ms', {
- months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(
- '_'
- ),
- monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
- weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
- weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
- weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
- longDateFormat: {
- LT: 'HH.mm',
- LTS: 'HH.mm.ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY [pukul] HH.mm',
- LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',
- },
- meridiemParse: /pagi|tengahari|petang|malam/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'pagi') {
- return hour;
- } else if (meridiem === 'tengahari') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === 'petang' || meridiem === 'malam') {
- return hour + 12;
- }
- },
- meridiem: function (hours, minutes, isLower) {
- if (hours < 11) {
- return 'pagi';
- } else if (hours < 15) {
- return 'tengahari';
- } else if (hours < 19) {
- return 'petang';
- } else {
- return 'malam';
- }
- },
- calendar: {
- sameDay: '[Hari ini pukul] LT',
- nextDay: '[Esok pukul] LT',
- nextWeek: 'dddd [pukul] LT',
- lastDay: '[Kelmarin pukul] LT',
- lastWeek: 'dddd [lepas pukul] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'dalam %s',
- past: '%s yang lepas',
- s: 'beberapa saat',
- ss: '%d saat',
- m: 'seminit',
- mm: '%d minit',
- h: 'sejam',
- hh: '%d jam',
- d: 'sehari',
- dd: '%d hari',
- M: 'sebulan',
- MM: '%d bulan',
- y: 'setahun',
- yy: '%d tahun',
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+/**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
- return ms;
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ --this.size;
+ return true;
+}
-})));
+module.exports = listCacheDelete;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mt.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mt.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_listCacheGet.js":
+/*!**************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_listCacheGet.js ***!
+ \**************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Maltese (Malta) [mt]
-//! author : Alessandro Maruccia : https://github.com/alesma
+var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_assocIndexOf.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
- //! moment.js locale configuration
+ return index < 0 ? undefined : data[index][1];
+}
- var mt = moment.defineLocale('mt', {
- months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(
- '_'
- ),
- monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),
- weekdays: 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(
- '_'
- ),
- weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),
- weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Illum fil-]LT',
- nextDay: '[Għada fil-]LT',
- nextWeek: 'dddd [fil-]LT',
- lastDay: '[Il-bieraħ fil-]LT',
- lastWeek: 'dddd [li għadda] [fil-]LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'f’ %s',
- past: '%s ilu',
- s: 'ftit sekondi',
- ss: '%d sekondi',
- m: 'minuta',
- mm: '%d minuti',
- h: 'siegħa',
- hh: '%d siegħat',
- d: 'ġurnata',
- dd: '%d ġranet',
- M: 'xahar',
- MM: '%d xhur',
- y: 'sena',
- yy: '%d sni',
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+module.exports = listCacheGet;
- return mt;
-})));
+/***/ }),
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_listCacheHas.js":
+/*!**************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_listCacheHas.js ***!
+ \**************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-/***/ }),
+var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_assocIndexOf.js");
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/my.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/my.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+}
-//! moment.js locale configuration
-//! locale : Burmese [my]
-//! author : Squar team, mysquar.com
-//! author : David Rossellat : https://github.com/gholadr
-//! author : Tin Aung Lin : https://github.com/thanyawzinmin
+module.exports = listCacheHas;
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
- //! moment.js locale configuration
+/***/ }),
- var symbolMap = {
- '1': '၁',
- '2': '၂',
- '3': '၃',
- '4': '၄',
- '5': '၅',
- '6': '၆',
- '7': '၇',
- '8': '၈',
- '9': '၉',
- '0': '၀',
- },
- numberMap = {
- '၁': '1',
- '၂': '2',
- '၃': '3',
- '၄': '4',
- '၅': '5',
- '၆': '6',
- '၇': '7',
- '၈': '8',
- '၉': '9',
- '၀': '0',
- };
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_listCacheSet.js":
+/*!**************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_listCacheSet.js ***!
+ \**************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- var my = moment.defineLocale('my', {
- months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(
- '_'
- ),
- monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
- weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(
- '_'
- ),
- weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
- weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
+var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_assocIndexOf.js");
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[ယနေ.] LT [မှာ]',
- nextDay: '[မနက်ဖြန်] LT [မှာ]',
- nextWeek: 'dddd LT [မှာ]',
- lastDay: '[မနေ.က] LT [မှာ]',
- lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'လာမည့် %s မှာ',
- past: 'လွန်ခဲ့သော %s က',
- s: 'စက္ကန်.အနည်းငယ်',
- ss: '%d စက္ကန့်',
- m: 'တစ်မိနစ်',
- mm: '%d မိနစ်',
- h: 'တစ်နာရီ',
- hh: '%d နာရီ',
- d: 'တစ်ရက်',
- dd: '%d ရက်',
- M: 'တစ်လ',
- MM: '%d လ',
- y: 'တစ်နှစ်',
- yy: '%d နှစ်',
- },
- preparse: function (string) {
- return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function (string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
- return my;
+ if (index < 0) {
+ ++this.size;
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+}
-})));
+module.exports = listCacheSet;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/nb.js":
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapCacheClear.js":
/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/nb.js ***!
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapCacheClear.js ***!
\***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Norwegian Bokmål [nb]
-//! authors : Espen Hovlandsdal : https://github.com/rexxars
-//! Sigurd Gartmann : https://github.com/sigurdga
-//! Stephen Ramthun : https://github.com/stephenramthun
+var Hash = __webpack_require__(/*! ./_Hash */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Hash.js"),
+ ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_ListCache.js"),
+ Map = __webpack_require__(/*! ./_Map */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Map.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+function mapCacheClear() {
+ this.size = 0;
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+}
- //! moment.js locale configuration
+module.exports = mapCacheClear;
- var nb = moment.defineLocale('nb', {
- months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
- '_'
- ),
- monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
- weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
- weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY [kl.] HH:mm',
- LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
- },
- calendar: {
- sameDay: '[i dag kl.] LT',
- nextDay: '[i morgen kl.] LT',
- nextWeek: 'dddd [kl.] LT',
- lastDay: '[i går kl.] LT',
- lastWeek: '[forrige] dddd [kl.] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'om %s',
- past: '%s siden',
- s: 'noen sekunder',
- ss: '%d sekunder',
- m: 'ett minutt',
- mm: '%d minutter',
- h: 'en time',
- hh: '%d timer',
- d: 'en dag',
- dd: '%d dager',
- M: 'en måned',
- MM: '%d måneder',
- y: 'ett år',
- yy: '%d år',
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
- return nb;
+/***/ }),
-})));
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapCacheDelete.js":
+/*!****************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapCacheDelete.js ***!
+ \****************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getMapData.js");
+
+/**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function mapCacheDelete(key) {
+ var result = getMapData(this, key)['delete'](key);
+ this.size -= result ? 1 : 0;
+ return result;
+}
+
+module.exports = mapCacheDelete;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ne.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ne.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapCacheGet.js":
+/*!*************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapCacheGet.js ***!
+ \*************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Nepalese [ne]
-//! author : suvash : https://github.com/suvash
+var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getMapData.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+}
- //! moment.js locale configuration
+module.exports = mapCacheGet;
- var symbolMap = {
- '1': '१',
- '2': '२',
- '3': '३',
- '4': '४',
- '5': '५',
- '6': '६',
- '7': '७',
- '8': '८',
- '9': '९',
- '0': '०',
- },
- numberMap = {
- '१': '1',
- '२': '2',
- '३': '3',
- '४': '4',
- '५': '5',
- '६': '6',
- '७': '7',
- '८': '8',
- '९': '9',
- '०': '0',
- };
- var ne = moment.defineLocale('ne', {
- months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(
- '_'
- ),
- monthsShort: 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(
- '_'
- ),
- weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
- weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'Aको h:mm बजे',
- LTS: 'Aको h:mm:ss बजे',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, Aको h:mm बजे',
- LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',
- },
- preparse: function (string) {
- return string.replace(/[१२३४५६७८९०]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function (string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'राति') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'बिहान') {
- return hour;
- } else if (meridiem === 'दिउँसो') {
- return hour >= 10 ? hour : hour + 12;
- } else if (meridiem === 'साँझ') {
- return hour + 12;
- }
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 3) {
- return 'राति';
- } else if (hour < 12) {
- return 'बिहान';
- } else if (hour < 16) {
- return 'दिउँसो';
- } else if (hour < 20) {
- return 'साँझ';
- } else {
- return 'राति';
- }
- },
- calendar: {
- sameDay: '[आज] LT',
- nextDay: '[भोलि] LT',
- nextWeek: '[आउँदो] dddd[,] LT',
- lastDay: '[हिजो] LT',
- lastWeek: '[गएको] dddd[,] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%sमा',
- past: '%s अगाडि',
- s: 'केही क्षण',
- ss: '%d सेकेण्ड',
- m: 'एक मिनेट',
- mm: '%d मिनेट',
- h: 'एक घण्टा',
- hh: '%d घण्टा',
- d: 'एक दिन',
- dd: '%d दिन',
- M: 'एक महिना',
- MM: '%d महिना',
- y: 'एक बर्ष',
- yy: '%d बर्ष',
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6, // The week that contains Jan 6th is the first week of the year.
- },
- });
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapCacheHas.js":
+/*!*************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapCacheHas.js ***!
+ \*************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getMapData.js");
+
+/**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+}
+
+module.exports = mapCacheHas;
+
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapCacheSet.js":
+/*!*************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapCacheSet.js ***!
+ \*************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getMapData.js");
+
+/**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+function mapCacheSet(key, value) {
+ var data = getMapData(this, key),
+ size = data.size;
- return ne;
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
+ return this;
+}
-})));
+module.exports = mapCacheSet;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/nl-be.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/nl-be.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
-
-//! moment.js locale configuration
-//! locale : Dutch (Belgium) [nl-be]
-//! author : Joris Röling : https://github.com/jorisroling
-//! author : Jacob Middag : https://github.com/middagj
-
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapToArray.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_mapToArray.js ***!
+ \************************************************************************************************/
+/***/ ((module) => {
- //! moment.js locale configuration
+/**
+ * Converts `map` to its key-value pairs.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the key-value pairs.
+ */
+function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
- var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split(
- '_'
- ),
- monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split(
- '_'
- ),
- monthsParse = [
- /^jan/i,
- /^feb/i,
- /^maart|mrt.?$/i,
- /^apr/i,
- /^mei$/i,
- /^jun[i.]?$/i,
- /^jul[i.]?$/i,
- /^aug/i,
- /^sep/i,
- /^okt/i,
- /^nov/i,
- /^dec/i,
- ],
- monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+}
- var nlBe = moment.defineLocale('nl-be', {
- months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
- '_'
- ),
- monthsShort: function (m, format) {
- if (!m) {
- return monthsShortWithDots;
- } else if (/-MMM-/.test(format)) {
- return monthsShortWithoutDots[m.month()];
- } else {
- return monthsShortWithDots[m.month()];
- }
- },
+module.exports = mapToArray;
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
- monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
+/***/ }),
- weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split(
- '_'
- ),
- weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
- weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[vandaag om] LT',
- nextDay: '[morgen om] LT',
- nextWeek: 'dddd [om] LT',
- lastDay: '[gisteren om] LT',
- lastWeek: '[afgelopen] dddd [om] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'over %s',
- past: '%s geleden',
- s: 'een paar seconden',
- ss: '%d seconden',
- m: 'één minuut',
- mm: '%d minuten',
- h: 'één uur',
- hh: '%d uur',
- d: 'één dag',
- dd: '%d dagen',
- M: 'één maand',
- MM: '%d maanden',
- y: 'één jaar',
- yy: '%d jaar',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
- ordinal: function (number) {
- return (
- number +
- (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
- );
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_matchesStrictComparable.js":
+/*!*************************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_matchesStrictComparable.js ***!
+ \*************************************************************************************************************/
+/***/ ((module) => {
- return nlBe;
+/**
+ * A specialized version of `matchesProperty` for source values suitable
+ * for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function matchesStrictComparable(key, srcValue) {
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === srcValue &&
+ (srcValue !== undefined || (key in Object(object)));
+ };
+}
-})));
+module.exports = matchesStrictComparable;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/nl.js":
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_memoizeCapped.js":
/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/nl.js ***!
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_memoizeCapped.js ***!
\***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Dutch [nl]
-//! author : Joris Röling : https://github.com/jorisroling
-//! author : Jacob Middag : https://github.com/middagj
+var memoize = __webpack_require__(/*! ./memoize */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/memoize.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used as the maximum memoize cache size. */
+var MAX_MEMOIZE_SIZE = 500;
- //! moment.js locale configuration
+/**
+ * A specialized version of `_.memoize` which clears the memoized function's
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
+ *
+ * @private
+ * @param {Function} func The function to have its output memoized.
+ * @returns {Function} Returns the new memoized function.
+ */
+function memoizeCapped(func) {
+ var result = memoize(func, function(key) {
+ if (cache.size === MAX_MEMOIZE_SIZE) {
+ cache.clear();
+ }
+ return key;
+ });
- var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split(
- '_'
- ),
- monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split(
- '_'
- ),
- monthsParse = [
- /^jan/i,
- /^feb/i,
- /^maart|mrt.?$/i,
- /^apr/i,
- /^mei$/i,
- /^jun[i.]?$/i,
- /^jul[i.]?$/i,
- /^aug/i,
- /^sep/i,
- /^okt/i,
- /^nov/i,
- /^dec/i,
- ],
- monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
+ var cache = result.cache;
+ return result;
+}
- var nl = moment.defineLocale('nl', {
- months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(
- '_'
- ),
- monthsShort: function (m, format) {
- if (!m) {
- return monthsShortWithDots;
- } else if (/-MMM-/.test(format)) {
- return monthsShortWithoutDots[m.month()];
- } else {
- return monthsShortWithDots[m.month()];
- }
- },
+module.exports = memoizeCapped;
- monthsRegex: monthsRegex,
- monthsShortRegex: monthsRegex,
- monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,
- monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
+/***/ }),
- weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split(
- '_'
- ),
- weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
- weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD-MM-YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[vandaag om] LT',
- nextDay: '[morgen om] LT',
- nextWeek: 'dddd [om] LT',
- lastDay: '[gisteren om] LT',
- lastWeek: '[afgelopen] dddd [om] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'over %s',
- past: '%s geleden',
- s: 'een paar seconden',
- ss: '%d seconden',
- m: 'één minuut',
- mm: '%d minuten',
- h: 'één uur',
- hh: '%d uur',
- d: 'één dag',
- dd: '%d dagen',
- M: 'één maand',
- MM: '%d maanden',
- y: 'één jaar',
- yy: '%d jaar',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
- ordinal: function (number) {
- return (
- number +
- (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')
- );
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_nativeCreate.js":
+/*!**************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_nativeCreate.js ***!
+ \**************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- return nl;
+var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_getNative.js");
-})));
+/* Built-in method references that are verified to be native. */
+var nativeCreate = getNative(Object, 'create');
+
+module.exports = nativeCreate;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/nn.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/nn.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_nativeKeys.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_nativeKeys.js ***!
+ \************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Nynorsk [nn]
-//! authors : https://github.com/mechuwind
-//! Stephen Ramthun : https://github.com/stephenramthun
+var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_overArg.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeKeys = overArg(Object.keys, Object);
- //! moment.js locale configuration
+module.exports = nativeKeys;
- var nn = moment.defineLocale('nn', {
- months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
- '_'
- ),
- monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
- weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),
- weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY [kl.] H:mm',
- LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
- },
- calendar: {
- sameDay: '[I dag klokka] LT',
- nextDay: '[I morgon klokka] LT',
- nextWeek: 'dddd [klokka] LT',
- lastDay: '[I går klokka] LT',
- lastWeek: '[Føregåande] dddd [klokka] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'om %s',
- past: '%s sidan',
- s: 'nokre sekund',
- ss: '%d sekund',
- m: 'eit minutt',
- mm: '%d minutt',
- h: 'ein time',
- hh: '%d timar',
- d: 'ein dag',
- dd: '%d dagar',
- M: 'ein månad',
- MM: '%d månader',
- y: 'eit år',
- yy: '%d år',
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
- return nn;
+/***/ }),
-})));
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_nodeUtil.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_nodeUtil.js ***!
+ \**********************************************************************************************/
+/***/ ((module, exports, __webpack_require__) => {
+
+/* module decorator */ module = __webpack_require__.nmd(module);
+var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_freeGlobal.js");
+
+/** Detect free variable `exports`. */
+var freeExports = true && exports && !exports.nodeType && exports;
+
+/** Detect free variable `module`. */
+var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;
+
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports = freeModule && freeModule.exports === freeExports;
+
+/** Detect free variable `process` from Node.js. */
+var freeProcess = moduleExports && freeGlobal.process;
+
+/** Used to access faster Node.js helpers. */
+var nodeUtil = (function() {
+ try {
+ // Use `util.types` for Node.js 10+.
+ var types = freeModule && freeModule.require && freeModule.require('util').types;
+
+ if (types) {
+ return types;
+ }
+
+ // Legacy `process.binding('util')` for Node.js < 10.
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
+ } catch (e) {}
+}());
+
+module.exports = nodeUtil;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/oc-lnc.js":
-/*!*******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/oc-lnc.js ***!
- \*******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_objectToString.js":
+/*!****************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_objectToString.js ***!
+ \****************************************************************************************************/
+/***/ ((module) => {
-//! moment.js locale configuration
-//! locale : Occitan, lengadocian dialecte [oc-lnc]
-//! author : Quentin PAGÈS : https://github.com/Quenty31
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var nativeObjectToString = objectProto.toString;
- //! moment.js locale configuration
+/**
+ * Converts `value` to a string using `Object.prototype.toString`.
+ *
+ * @private
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ */
+function objectToString(value) {
+ return nativeObjectToString.call(value);
+}
- var ocLnc = moment.defineLocale('oc-lnc', {
- months: {
- standalone: 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(
- '_'
- ),
- format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split(
- '_'
- ),
- isFormat: /D[oD]?(\s)+MMMM/,
- },
- monthsShort: 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(
- '_'
- ),
- weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),
- weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM [de] YYYY',
- ll: 'D MMM YYYY',
- LLL: 'D MMMM [de] YYYY [a] H:mm',
- lll: 'D MMM YYYY, H:mm',
- LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',
- llll: 'ddd D MMM YYYY, H:mm',
- },
- calendar: {
- sameDay: '[uèi a] LT',
- nextDay: '[deman a] LT',
- nextWeek: 'dddd [a] LT',
- lastDay: '[ièr a] LT',
- lastWeek: 'dddd [passat a] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: "d'aquí %s",
- past: 'fa %s',
- s: 'unas segondas',
- ss: '%d segondas',
- m: 'una minuta',
- mm: '%d minutas',
- h: 'una ora',
- hh: '%d oras',
- d: 'un jorn',
- dd: '%d jorns',
- M: 'un mes',
- MM: '%d meses',
- y: 'un an',
- yy: '%d ans',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
- ordinal: function (number, period) {
- var output =
- number === 1
- ? 'r'
- : number === 2
- ? 'n'
- : number === 3
- ? 'r'
- : number === 4
- ? 't'
- : 'è';
- if (period === 'w' || period === 'W') {
- output = 'a';
- }
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4,
- },
- });
+module.exports = objectToString;
- return ocLnc;
-})));
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_overArg.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_overArg.js ***!
+ \*********************************************************************************************/
+/***/ ((module) => {
+
+/**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+}
+
+module.exports = overArg;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/pa-in.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/pa-in.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_root.js":
+/*!******************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_root.js ***!
+ \******************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Punjabi (India) [pa-in]
-//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
+var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_freeGlobal.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
- //! moment.js locale configuration
+/** Used as a reference to the global object. */
+var root = freeGlobal || freeSelf || Function('return this')();
- var symbolMap = {
- '1': '੧',
- '2': '੨',
- '3': '੩',
- '4': '੪',
- '5': '੫',
- '6': '੬',
- '7': '੭',
- '8': '੮',
- '9': '੯',
- '0': '੦',
- },
- numberMap = {
- '੧': '1',
- '੨': '2',
- '੩': '3',
- '੪': '4',
- '੫': '5',
- '੬': '6',
- '੭': '7',
- '੮': '8',
- '੯': '9',
- '੦': '0',
- };
+module.exports = root;
- var paIn = moment.defineLocale('pa-in', {
- // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.
- months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
- '_'
- ),
- monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(
- '_'
- ),
- weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(
- '_'
- ),
- weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
- weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
- longDateFormat: {
- LT: 'A h:mm ਵਜੇ',
- LTS: 'A h:mm:ss ਵਜੇ',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',
- LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',
- },
- calendar: {
- sameDay: '[ਅਜ] LT',
- nextDay: '[ਕਲ] LT',
- nextWeek: '[ਅਗਲਾ] dddd, LT',
- lastDay: '[ਕਲ] LT',
- lastWeek: '[ਪਿਛਲੇ] dddd, LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s ਵਿੱਚ',
- past: '%s ਪਿਛਲੇ',
- s: 'ਕੁਝ ਸਕਿੰਟ',
- ss: '%d ਸਕਿੰਟ',
- m: 'ਇਕ ਮਿੰਟ',
- mm: '%d ਮਿੰਟ',
- h: 'ਇੱਕ ਘੰਟਾ',
- hh: '%d ਘੰਟੇ',
- d: 'ਇੱਕ ਦਿਨ',
- dd: '%d ਦਿਨ',
- M: 'ਇੱਕ ਮਹੀਨਾ',
- MM: '%d ਮਹੀਨੇ',
- y: 'ਇੱਕ ਸਾਲ',
- yy: '%d ਸਾਲ',
- },
- preparse: function (string) {
- return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function (string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
- // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
- meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'ਰਾਤ') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'ਸਵੇਰ') {
- return hour;
- } else if (meridiem === 'ਦੁਪਹਿਰ') {
- return hour >= 10 ? hour : hour + 12;
- } else if (meridiem === 'ਸ਼ਾਮ') {
- return hour + 12;
- }
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 4) {
- return 'ਰਾਤ';
- } else if (hour < 10) {
- return 'ਸਵੇਰ';
- } else if (hour < 17) {
- return 'ਦੁਪਹਿਰ';
- } else if (hour < 20) {
- return 'ਸ਼ਾਮ';
- } else {
- return 'ਰਾਤ';
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6, // The week that contains Jan 6th is the first week of the year.
- },
- });
- return paIn;
+/***/ }),
-})));
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_setCacheAdd.js":
+/*!*************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_setCacheAdd.js ***!
+ \*************************************************************************************************/
+/***/ ((module) => {
+
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+}
+
+module.exports = setCacheAdd;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/pl.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/pl.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_setCacheHas.js":
+/*!*************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_setCacheHas.js ***!
+ \*************************************************************************************************/
+/***/ ((module) => {
-//! moment.js locale configuration
-//! locale : Polish [pl]
-//! author : Rafal Hirsz : https://github.com/evoL
+/**
+ * Checks if `value` is in the array cache.
+ *
+ * @private
+ * @name has
+ * @memberOf SetCache
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
+ */
+function setCacheHas(value) {
+ return this.__data__.has(value);
+}
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+module.exports = setCacheHas;
- //! moment.js locale configuration
- var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(
- '_'
- ),
- monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(
- '_'
- );
- function plural(n) {
- return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;
- }
- function translate(number, withoutSuffix, key) {
- var result = number + ' ';
- switch (key) {
- case 'ss':
- return result + (plural(number) ? 'sekundy' : 'sekund');
- case 'm':
- return withoutSuffix ? 'minuta' : 'minutę';
- case 'mm':
- return result + (plural(number) ? 'minuty' : 'minut');
- case 'h':
- return withoutSuffix ? 'godzina' : 'godzinę';
- case 'hh':
- return result + (plural(number) ? 'godziny' : 'godzin');
- case 'MM':
- return result + (plural(number) ? 'miesiące' : 'miesięcy');
- case 'yy':
- return result + (plural(number) ? 'lata' : 'lat');
- }
- }
+/***/ }),
- var pl = moment.defineLocale('pl', {
- months: function (momentToFormat, format) {
- if (!momentToFormat) {
- return monthsNominative;
- } else if (format === '') {
- // Hack: if format empty we know this is used to generate
- // RegExp by moment. Give then back both valid forms of months
- // in RegExp ready format.
- return (
- '(' +
- monthsSubjective[momentToFormat.month()] +
- '|' +
- monthsNominative[momentToFormat.month()] +
- ')'
- );
- } else if (/D MMMM/.test(format)) {
- return monthsSubjective[momentToFormat.month()];
- } else {
- return monthsNominative[momentToFormat.month()];
- }
- },
- monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
- weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split(
- '_'
- ),
- weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
- weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Dziś o] LT',
- nextDay: '[Jutro o] LT',
- nextWeek: function () {
- switch (this.day()) {
- case 0:
- return '[W niedzielę o] LT';
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_setToArray.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_setToArray.js ***!
+ \************************************************************************************************/
+/***/ ((module) => {
- case 2:
- return '[We wtorek o] LT';
+/**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
- case 3:
- return '[W środę o] LT';
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+}
- case 6:
- return '[W sobotę o] LT';
+module.exports = setToArray;
- default:
- return '[W] dddd [o] LT';
- }
- },
- lastDay: '[Wczoraj o] LT',
- lastWeek: function () {
- switch (this.day()) {
- case 0:
- return '[W zeszłą niedzielę o] LT';
- case 3:
- return '[W zeszłą środę o] LT';
- case 6:
- return '[W zeszłą sobotę o] LT';
- default:
- return '[W zeszły] dddd [o] LT';
- }
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'za %s',
- past: '%s temu',
- s: 'kilka sekund',
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: '1 dzień',
- dd: '%d dni',
- M: 'miesiąc',
- MM: translate,
- y: 'rok',
- yy: translate,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
- return pl;
+/***/ }),
-})));
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stackClear.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stackClear.js ***!
+ \************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_ListCache.js");
+
+/**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+function stackClear() {
+ this.__data__ = new ListCache;
+ this.size = 0;
+}
+
+module.exports = stackClear;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/pt-br.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/pt-br.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stackDelete.js":
+/*!*************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stackDelete.js ***!
+ \*************************************************************************************************/
+/***/ ((module) => {
-//! moment.js locale configuration
-//! locale : Portuguese (Brazil) [pt-br]
-//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
+/**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function stackDelete(key) {
+ var data = this.__data__,
+ result = data['delete'](key);
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ this.size = data.size;
+ return result;
+}
- //! moment.js locale configuration
+module.exports = stackDelete;
- var ptBr = moment.defineLocale('pt-br', {
- months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
- '_'
- ),
- monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
- weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(
- '_'
- ),
- weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),
- weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',
- },
- calendar: {
- sameDay: '[Hoje às] LT',
- nextDay: '[Amanhã às] LT',
- nextWeek: 'dddd [às] LT',
- lastDay: '[Ontem às] LT',
- lastWeek: function () {
- return this.day() === 0 || this.day() === 6
- ? '[Último] dddd [às] LT' // Saturday + Sunday
- : '[Última] dddd [às] LT'; // Monday - Friday
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'em %s',
- past: 'há %s',
- s: 'poucos segundos',
- ss: '%d segundos',
- m: 'um minuto',
- mm: '%d minutos',
- h: 'uma hora',
- hh: '%d horas',
- d: 'um dia',
- dd: '%d dias',
- M: 'um mês',
- MM: '%d meses',
- y: 'um ano',
- yy: '%d anos',
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- });
- return ptBr;
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stackGet.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stackGet.js ***!
+ \**********************************************************************************************/
+/***/ ((module) => {
+
+/**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function stackGet(key) {
+ return this.__data__.get(key);
+}
+
+module.exports = stackGet;
+
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stackHas.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stackHas.js ***!
+ \**********************************************************************************************/
+/***/ ((module) => {
+
+/**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function stackHas(key) {
+ return this.__data__.has(key);
+}
-})));
+module.exports = stackHas;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/pt.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/pt.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
-
-//! moment.js locale configuration
-//! locale : Portuguese [pt]
-//! author : Jefferson : https://github.com/jalex79
-
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stackSet.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stackSet.js ***!
+ \**********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- //! moment.js locale configuration
+var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_ListCache.js"),
+ Map = __webpack_require__(/*! ./_Map */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_Map.js"),
+ MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_MapCache.js");
- var pt = moment.defineLocale('pt', {
- months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(
- '_'
- ),
- monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
- weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(
- '_'
- ),
- weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
- weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY HH:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Hoje às] LT',
- nextDay: '[Amanhã às] LT',
- nextWeek: 'dddd [às] LT',
- lastDay: '[Ontem às] LT',
- lastWeek: function () {
- return this.day() === 0 || this.day() === 6
- ? '[Último] dddd [às] LT' // Saturday + Sunday
- : '[Última] dddd [às] LT'; // Monday - Friday
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'em %s',
- past: 'há %s',
- s: 'segundos',
- ss: '%d segundos',
- m: 'um minuto',
- mm: '%d minutos',
- h: 'uma hora',
- hh: '%d horas',
- d: 'um dia',
- dd: '%d dias',
- M: 'um mês',
- MM: '%d meses',
- y: 'um ano',
- yy: '%d anos',
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
- return pt;
+/**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+function stackSet(key, value) {
+ var data = this.__data__;
+ if (data instanceof ListCache) {
+ var pairs = data.__data__;
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
+ pairs.push([key, value]);
+ this.size = ++data.size;
+ return this;
+ }
+ data = this.__data__ = new MapCache(pairs);
+ }
+ data.set(key, value);
+ this.size = data.size;
+ return this;
+}
-})));
+module.exports = stackSet;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ro.js":
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_strictIndexOf.js":
/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ro.js ***!
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_strictIndexOf.js ***!
\***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
-
-//! moment.js locale configuration
-//! locale : Romanian [ro]
-//! author : Vlad Gurdiga : https://github.com/gurdiga
-//! author : Valentin Agachi : https://github.com/avaly
-//! author : Emanuel Cepoi : https://github.com/cepem
-
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/***/ ((module) => {
- //! moment.js locale configuration
+/**
+ * A specialized version of `_.indexOf` which performs strict equality
+ * comparisons of values, i.e. `===`.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} value The value to search for.
+ * @param {number} fromIndex The index to search from.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function strictIndexOf(array, value, fromIndex) {
+ var index = fromIndex - 1,
+ length = array.length;
- function relativeTimeWithPlural(number, withoutSuffix, key) {
- var format = {
- ss: 'secunde',
- mm: 'minute',
- hh: 'ore',
- dd: 'zile',
- MM: 'luni',
- yy: 'ani',
- },
- separator = ' ';
- if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
- separator = ' de ';
- }
- return number + separator + format[key];
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
}
+ }
+ return -1;
+}
- var ro = moment.defineLocale('ro', {
- months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(
- '_'
- ),
- monthsShort: 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
- weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
- weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY H:mm',
- LLLL: 'dddd, D MMMM YYYY H:mm',
- },
- calendar: {
- sameDay: '[azi la] LT',
- nextDay: '[mâine la] LT',
- nextWeek: 'dddd [la] LT',
- lastDay: '[ieri la] LT',
- lastWeek: '[fosta] dddd [la] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'peste %s',
- past: '%s în urmă',
- s: 'câteva secunde',
- ss: relativeTimeWithPlural,
- m: 'un minut',
- mm: relativeTimeWithPlural,
- h: 'o oră',
- hh: relativeTimeWithPlural,
- d: 'o zi',
- dd: relativeTimeWithPlural,
- M: 'o lună',
- MM: relativeTimeWithPlural,
- y: 'un an',
- yy: relativeTimeWithPlural,
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
-
- return ro;
-
-})));
+module.exports = strictIndexOf;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ru.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ru.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stringToPath.js":
+/*!**************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_stringToPath.js ***!
+ \**************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Russian [ru]
-//! author : Viktorminator : https://github.com/Viktorminator
-//! author : Menelion Elensúle : https://github.com/Oire
-//! author : Коренберг Марк : https://github.com/socketpair
+var memoizeCapped = __webpack_require__(/*! ./_memoizeCapped */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_memoizeCapped.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used to match property names within property paths. */
+var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
- //! moment.js locale configuration
+/** Used to match backslashes in property paths. */
+var reEscapeChar = /\\(\\)?/g;
- function plural(word, num) {
- var forms = word.split('_');
- return num % 10 === 1 && num % 100 !== 11
- ? forms[0]
- : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
- ? forms[1]
- : forms[2];
- }
- function relativeTimeWithPlural(number, withoutSuffix, key) {
- var format = {
- ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
- mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
- hh: 'час_часа_часов',
- dd: 'день_дня_дней',
- MM: 'месяц_месяца_месяцев',
- yy: 'год_года_лет',
- };
- if (key === 'm') {
- return withoutSuffix ? 'минута' : 'минуту';
- } else {
- return number + ' ' + plural(format[key], +number);
- }
- }
- var monthsParse = [
- /^янв/i,
- /^фев/i,
- /^мар/i,
- /^апр/i,
- /^ма[йя]/i,
- /^июн/i,
- /^июл/i,
- /^авг/i,
- /^сен/i,
- /^окт/i,
- /^ноя/i,
- /^дек/i,
- ];
+/**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+var stringToPath = memoizeCapped(function(string) {
+ var result = [];
+ if (string.charCodeAt(0) === 46 /* . */) {
+ result.push('');
+ }
+ string.replace(rePropName, function(match, number, quote, subString) {
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+});
- // http://new.gramota.ru/spravka/rules/139-prop : § 103
- // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
- // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
- var ru = moment.defineLocale('ru', {
- months: {
- format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(
- '_'
- ),
- standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(
- '_'
- ),
- },
- monthsShort: {
- // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку?
- format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(
- '_'
- ),
- standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(
- '_'
- ),
- },
- weekdays: {
- standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(
- '_'
- ),
- format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(
- '_'
- ),
- isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,
- },
- weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
- weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
- monthsParse: monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
+module.exports = stringToPath;
- // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
- monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
- // копия предыдущего
- monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
+/***/ }),
- // полные названия с падежами
- monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_toKey.js":
+/*!*******************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_toKey.js ***!
+ \*******************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- // Выражение, которое соответствует только сокращённым формам
- monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY г.',
- LLL: 'D MMMM YYYY г., H:mm',
- LLLL: 'dddd, D MMMM YYYY г., H:mm',
- },
- calendar: {
- sameDay: '[Сегодня, в] LT',
- nextDay: '[Завтра, в] LT',
- lastDay: '[Вчера, в] LT',
- nextWeek: function (now) {
- if (now.week() !== this.week()) {
- switch (this.day()) {
- case 0:
- return '[В следующее] dddd, [в] LT';
- case 1:
- case 2:
- case 4:
- return '[В следующий] dddd, [в] LT';
- case 3:
- case 5:
- case 6:
- return '[В следующую] dddd, [в] LT';
- }
- } else {
- if (this.day() === 2) {
- return '[Во] dddd, [в] LT';
- } else {
- return '[В] dddd, [в] LT';
- }
- }
- },
- lastWeek: function (now) {
- if (now.week() !== this.week()) {
- switch (this.day()) {
- case 0:
- return '[В прошлое] dddd, [в] LT';
- case 1:
- case 2:
- case 4:
- return '[В прошлый] dddd, [в] LT';
- case 3:
- case 5:
- case 6:
- return '[В прошлую] dddd, [в] LT';
- }
- } else {
- if (this.day() === 2) {
- return '[Во] dddd, [в] LT';
- } else {
- return '[В] dddd, [в] LT';
- }
- }
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'через %s',
- past: '%s назад',
- s: 'несколько секунд',
- ss: relativeTimeWithPlural,
- m: relativeTimeWithPlural,
- mm: relativeTimeWithPlural,
- h: 'час',
- hh: relativeTimeWithPlural,
- d: 'день',
- dd: relativeTimeWithPlural,
- M: 'месяц',
- MM: relativeTimeWithPlural,
- y: 'год',
- yy: relativeTimeWithPlural,
- },
- meridiemParse: /ночи|утра|дня|вечера/i,
- isPM: function (input) {
- return /^(дня|вечера)$/.test(input);
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 4) {
- return 'ночи';
- } else if (hour < 12) {
- return 'утра';
- } else if (hour < 17) {
- return 'дня';
- } else {
- return 'вечера';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
- ordinal: function (number, period) {
- switch (period) {
- case 'M':
- case 'd':
- case 'DDD':
- return number + '-й';
- case 'D':
- return number + '-го';
- case 'w':
- case 'W':
- return number + '-я';
- default:
- return number;
- }
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+var isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isSymbol.js");
- return ru;
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
-})));
+/**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+function toKey(value) {
+ if (typeof value == 'string' || isSymbol(value)) {
+ return value;
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+}
+
+module.exports = toKey;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sd.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sd.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
-
-//! moment.js locale configuration
-//! locale : Sindhi [sd]
-//! author : Narain Sagar : https://github.com/narainsagar
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_toSource.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_toSource.js ***!
+ \**********************************************************************************************/
+/***/ ((module) => {
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used for built-in method references. */
+var funcProto = Function.prototype;
- //! moment.js locale configuration
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
- var months = [
- 'جنوري',
- 'فيبروري',
- 'مارچ',
- 'اپريل',
- 'مئي',
- 'جون',
- 'جولاءِ',
- 'آگسٽ',
- 'سيپٽمبر',
- 'آڪٽوبر',
- 'نومبر',
- 'ڊسمبر',
- ],
- days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];
+/**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to convert.
+ * @returns {string} Returns the source code.
+ */
+function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+}
- var sd = moment.defineLocale('sd', {
- months: months,
- monthsShort: months,
- weekdays: days,
- weekdaysShort: days,
- weekdaysMin: days,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd، D MMMM YYYY HH:mm',
- },
- meridiemParse: /صبح|شام/,
- isPM: function (input) {
- return 'شام' === input;
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 12) {
- return 'صبح';
- }
- return 'شام';
- },
- calendar: {
- sameDay: '[اڄ] LT',
- nextDay: '[سڀاڻي] LT',
- nextWeek: 'dddd [اڳين هفتي تي] LT',
- lastDay: '[ڪالهه] LT',
- lastWeek: '[گزريل هفتي] dddd [تي] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s پوء',
- past: '%s اڳ',
- s: 'چند سيڪنڊ',
- ss: '%d سيڪنڊ',
- m: 'هڪ منٽ',
- mm: '%d منٽ',
- h: 'هڪ ڪلاڪ',
- hh: '%d ڪلاڪ',
- d: 'هڪ ڏينهن',
- dd: '%d ڏينهن',
- M: 'هڪ مهينو',
- MM: '%d مهينا',
- y: 'هڪ سال',
- yy: '%d سال',
- },
- preparse: function (string) {
- return string.replace(/،/g, ',');
- },
- postformat: function (string) {
- return string.replace(/,/g, '،');
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+module.exports = toSource;
- return sd;
-})));
+/***/ }),
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/eq.js":
+/*!***************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/eq.js ***!
+ \***************************************************************************************/
+/***/ ((module) => {
-/***/ }),
+/**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+}
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/se.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/se.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+module.exports = eq;
-//! moment.js locale configuration
-//! locale : Northern Sami [se]
-//! authors : Bård Rolstad Henriksen : https://github.com/karamell
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/***/ }),
- //! moment.js locale configuration
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/get.js":
+/*!****************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/get.js ***!
+ \****************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- var se = moment.defineLocale('se', {
- months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(
- '_'
- ),
- monthsShort: 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split(
- '_'
- ),
- weekdays: 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(
- '_'
- ),
- weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
- weekdaysMin: 's_v_m_g_d_b_L'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'MMMM D. [b.] YYYY',
- LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',
- LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',
- },
- calendar: {
- sameDay: '[otne ti] LT',
- nextDay: '[ihttin ti] LT',
- nextWeek: 'dddd [ti] LT',
- lastDay: '[ikte ti] LT',
- lastWeek: '[ovddit] dddd [ti] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s geažes',
- past: 'maŋit %s',
- s: 'moadde sekunddat',
- ss: '%d sekunddat',
- m: 'okta minuhta',
- mm: '%d minuhtat',
- h: 'okta diimmu',
- hh: '%d diimmut',
- d: 'okta beaivi',
- dd: '%d beaivvit',
- M: 'okta mánnu',
- MM: '%d mánut',
- y: 'okta jahki',
- yy: '%d jagit',
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+var baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseGet.js");
- return se;
+/**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is returned in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, path);
+ return result === undefined ? defaultValue : result;
+}
-})));
+module.exports = get;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/si.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/si.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/hasIn.js":
+/*!******************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/hasIn.js ***!
+ \******************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Sinhalese [si]
-//! author : Sampath Sitinamaluwa : https://github.com/sampathsris
+var baseHasIn = __webpack_require__(/*! ./_baseHasIn */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseHasIn.js"),
+ hasPath = __webpack_require__(/*! ./_hasPath */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_hasPath.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * Checks if `path` is a direct or inherited property of `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.hasIn(object, 'a');
+ * // => true
+ *
+ * _.hasIn(object, 'a.b');
+ * // => true
+ *
+ * _.hasIn(object, ['a', 'b']);
+ * // => true
+ *
+ * _.hasIn(object, 'b');
+ * // => false
+ */
+function hasIn(object, path) {
+ return object != null && hasPath(object, path, baseHasIn);
+}
- //! moment.js locale configuration
+module.exports = hasIn;
- /*jshint -W100*/
- var si = moment.defineLocale('si', {
- months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(
- '_'
- ),
- monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(
- '_'
- ),
- weekdays: 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(
- '_'
- ),
- weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන'.split('_'),
- weekdaysMin: 'ඉ_ස_අ_බ_බ්ර_සි_සෙ'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'a h:mm',
- LTS: 'a h:mm:ss',
- L: 'YYYY/MM/DD',
- LL: 'YYYY MMMM D',
- LLL: 'YYYY MMMM D, a h:mm',
- LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',
- },
- calendar: {
- sameDay: '[අද] LT[ට]',
- nextDay: '[හෙට] LT[ට]',
- nextWeek: 'dddd LT[ට]',
- lastDay: '[ඊයේ] LT[ට]',
- lastWeek: '[පසුගිය] dddd LT[ට]',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%sකින්',
- past: '%sකට පෙර',
- s: 'තත්පර කිහිපය',
- ss: 'තත්පර %d',
- m: 'මිනිත්තුව',
- mm: 'මිනිත්තු %d',
- h: 'පැය',
- hh: 'පැය %d',
- d: 'දිනය',
- dd: 'දින %d',
- M: 'මාසය',
- MM: 'මාස %d',
- y: 'වසර',
- yy: 'වසර %d',
- },
- dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
- ordinal: function (number) {
- return number + ' වැනි';
- },
- meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
- isPM: function (input) {
- return input === 'ප.ව.' || input === 'පස් වරු';
- },
- meridiem: function (hours, minutes, isLower) {
- if (hours > 11) {
- return isLower ? 'ප.ව.' : 'පස් වරු';
- } else {
- return isLower ? 'පෙ.ව.' : 'පෙර වරු';
- }
- },
- });
- return si;
+/***/ }),
-})));
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/identity.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/identity.js ***!
+ \*********************************************************************************************/
+/***/ ((module) => {
+
+/**
+ * This method returns the first argument it receives.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ *
+ * console.log(_.identity(object) === object);
+ * // => true
+ */
+function identity(value) {
+ return value;
+}
+
+module.exports = identity;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sk.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sk.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArguments.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArguments.js ***!
+ \************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Slovak [sk]
-//! author : Martin Minka : https://github.com/k2s
-//! based on work of petrbela : https://github.com/petrbela
+var baseIsArguments = __webpack_require__(/*! ./_baseIsArguments */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsArguments.js"),
+ isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isObjectLike.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
- //! moment.js locale configuration
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
- var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(
- '_'
- ),
- monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
- function plural(n) {
- return n > 1 && n < 5;
- }
- function translate(number, withoutSuffix, key, isFuture) {
- var result = number + ' ';
- switch (key) {
- case 's': // a few seconds / in a few seconds / a few seconds ago
- return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';
- case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'sekundy' : 'sekúnd');
- } else {
- return result + 'sekundami';
- }
- case 'm': // a minute / in a minute / a minute ago
- return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';
- case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'minúty' : 'minút');
- } else {
- return result + 'minútami';
- }
- case 'h': // an hour / in an hour / an hour ago
- return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';
- case 'hh': // 9 hours / in 9 hours / 9 hours ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'hodiny' : 'hodín');
- } else {
- return result + 'hodinami';
- }
- case 'd': // a day / in a day / a day ago
- return withoutSuffix || isFuture ? 'deň' : 'dňom';
- case 'dd': // 9 days / in 9 days / 9 days ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'dni' : 'dní');
- } else {
- return result + 'dňami';
- }
- case 'M': // a month / in a month / a month ago
- return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';
- case 'MM': // 9 months / in 9 months / 9 months ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'mesiace' : 'mesiacov');
- } else {
- return result + 'mesiacmi';
- }
- case 'y': // a year / in a year / a year ago
- return withoutSuffix || isFuture ? 'rok' : 'rokom';
- case 'yy': // 9 years / in 9 years / 9 years ago
- if (withoutSuffix || isFuture) {
- return result + (plural(number) ? 'roky' : 'rokov');
- } else {
- return result + 'rokmi';
- }
- }
- }
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;
- var sk = moment.defineLocale('sk', {
- months: months,
- monthsShort: monthsShort,
- weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
- weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
- weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd D. MMMM YYYY H:mm',
- },
- calendar: {
- sameDay: '[dnes o] LT',
- nextDay: '[zajtra o] LT',
- nextWeek: function () {
- switch (this.day()) {
- case 0:
- return '[v nedeľu o] LT';
- case 1:
- case 2:
- return '[v] dddd [o] LT';
- case 3:
- return '[v stredu o] LT';
- case 4:
- return '[vo štvrtok o] LT';
- case 5:
- return '[v piatok o] LT';
- case 6:
- return '[v sobotu o] LT';
- }
- },
- lastDay: '[včera o] LT',
- lastWeek: function () {
- switch (this.day()) {
- case 0:
- return '[minulú nedeľu o] LT';
- case 1:
- case 2:
- return '[minulý] dddd [o] LT';
- case 3:
- return '[minulú stredu o] LT';
- case 4:
- case 5:
- return '[minulý] dddd [o] LT';
- case 6:
- return '[minulú sobotu o] LT';
- }
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'za %s',
- past: 'pred %s',
- s: translate,
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: translate,
- dd: translate,
- M: translate,
- MM: translate,
- y: translate,
- yy: translate,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee');
+};
- return sk;
+module.exports = isArguments;
-})));
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArray.js":
+/*!********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArray.js ***!
+ \********************************************************************************************/
+/***/ ((module) => {
+
+/**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+var isArray = Array.isArray;
+
+module.exports = isArray;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sl.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sl.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArrayLike.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArrayLike.js ***!
+ \************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Slovenian [sl]
-//! author : Robert Sedovšek : https://github.com/sedovsek
+var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isFunction.js"),
+ isLength = __webpack_require__(/*! ./isLength */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isLength.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+}
- //! moment.js locale configuration
+module.exports = isArrayLike;
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var result = number + ' ';
- switch (key) {
- case 's':
- return withoutSuffix || isFuture
- ? 'nekaj sekund'
- : 'nekaj sekundami';
- case 'ss':
- if (number === 1) {
- result += withoutSuffix ? 'sekundo' : 'sekundi';
- } else if (number === 2) {
- result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
- } else if (number < 5) {
- result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
- } else {
- result += 'sekund';
- }
- return result;
- case 'm':
- return withoutSuffix ? 'ena minuta' : 'eno minuto';
- case 'mm':
- if (number === 1) {
- result += withoutSuffix ? 'minuta' : 'minuto';
- } else if (number === 2) {
- result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
- } else if (number < 5) {
- result += withoutSuffix || isFuture ? 'minute' : 'minutami';
- } else {
- result += withoutSuffix || isFuture ? 'minut' : 'minutami';
- }
- return result;
- case 'h':
- return withoutSuffix ? 'ena ura' : 'eno uro';
- case 'hh':
- if (number === 1) {
- result += withoutSuffix ? 'ura' : 'uro';
- } else if (number === 2) {
- result += withoutSuffix || isFuture ? 'uri' : 'urama';
- } else if (number < 5) {
- result += withoutSuffix || isFuture ? 'ure' : 'urami';
- } else {
- result += withoutSuffix || isFuture ? 'ur' : 'urami';
- }
- return result;
- case 'd':
- return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
- case 'dd':
- if (number === 1) {
- result += withoutSuffix || isFuture ? 'dan' : 'dnem';
- } else if (number === 2) {
- result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
- } else {
- result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
- }
- return result;
- case 'M':
- return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
- case 'MM':
- if (number === 1) {
- result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
- } else if (number === 2) {
- result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
- } else if (number < 5) {
- result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
- } else {
- result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
- }
- return result;
- case 'y':
- return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
- case 'yy':
- if (number === 1) {
- result += withoutSuffix || isFuture ? 'leto' : 'letom';
- } else if (number === 2) {
- result += withoutSuffix || isFuture ? 'leti' : 'letoma';
- } else if (number < 5) {
- result += withoutSuffix || isFuture ? 'leta' : 'leti';
- } else {
- result += withoutSuffix || isFuture ? 'let' : 'leti';
- }
- return result;
- }
- }
- var sl = moment.defineLocale('sl', {
- months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(
- '_'
- ),
- monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
- weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
- weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD. MM. YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd, D. MMMM YYYY H:mm',
- },
- calendar: {
- sameDay: '[danes ob] LT',
- nextDay: '[jutri ob] LT',
+/***/ }),
- nextWeek: function () {
- switch (this.day()) {
- case 0:
- return '[v] [nedeljo] [ob] LT';
- case 3:
- return '[v] [sredo] [ob] LT';
- case 6:
- return '[v] [soboto] [ob] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[v] dddd [ob] LT';
- }
- },
- lastDay: '[včeraj ob] LT',
- lastWeek: function () {
- switch (this.day()) {
- case 0:
- return '[prejšnjo] [nedeljo] [ob] LT';
- case 3:
- return '[prejšnjo] [sredo] [ob] LT';
- case 6:
- return '[prejšnjo] [soboto] [ob] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[prejšnji] dddd [ob] LT';
- }
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'čez %s',
- past: 'pred %s',
- s: processRelativeTime,
- ss: processRelativeTime,
- m: processRelativeTime,
- mm: processRelativeTime,
- h: processRelativeTime,
- hh: processRelativeTime,
- d: processRelativeTime,
- dd: processRelativeTime,
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isBuffer.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isBuffer.js ***!
+ \*********************************************************************************************/
+/***/ ((module, exports, __webpack_require__) => {
- return sl;
+/* module decorator */ module = __webpack_require__.nmd(module);
+var root = __webpack_require__(/*! ./_root */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_root.js"),
+ stubFalse = __webpack_require__(/*! ./stubFalse */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/stubFalse.js");
-})));
+/** Detect free variable `exports`. */
+var freeExports = true && exports && !exports.nodeType && exports;
+
+/** Detect free variable `module`. */
+var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;
+
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports = freeModule && freeModule.exports === freeExports;
+
+/** Built-in value references. */
+var Buffer = moduleExports ? root.Buffer : undefined;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
+
+/**
+ * Checks if `value` is a buffer.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
+ * @example
+ *
+ * _.isBuffer(new Buffer(2));
+ * // => true
+ *
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
+ */
+var isBuffer = nativeIsBuffer || stubFalse;
+
+module.exports = isBuffer;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sq.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sq.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isFunction.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isFunction.js ***!
+ \***********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Albanian [sq]
-//! author : Flakërim Ismani : https://github.com/flakerimi
-//! author : Menelion Elensúle : https://github.com/Oire
-//! author : Oerd Cukalla : https://github.com/oerd
+var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseGetTag.js"),
+ isObject = __webpack_require__(/*! ./isObject */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isObject.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** `Object#toString` result references. */
+var asyncTag = '[object AsyncFunction]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ proxyTag = '[object Proxy]';
- //! moment.js locale configuration
+/**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+function isFunction(value) {
+ if (!isObject(value)) {
+ return false;
+ }
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
+ var tag = baseGetTag(value);
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
+}
- var sq = moment.defineLocale('sq', {
- months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(
- '_'
- ),
- monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
- weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(
- '_'
- ),
- weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
- weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),
- weekdaysParseExact: true,
- meridiemParse: /PD|MD/,
- isPM: function (input) {
- return input.charAt(0) === 'M';
- },
- meridiem: function (hours, minutes, isLower) {
- return hours < 12 ? 'PD' : 'MD';
- },
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Sot në] LT',
- nextDay: '[Nesër në] LT',
- nextWeek: 'dddd [në] LT',
- lastDay: '[Dje në] LT',
- lastWeek: 'dddd [e kaluar në] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'në %s',
- past: '%s më parë',
- s: 'disa sekonda',
- ss: '%d sekonda',
- m: 'një minutë',
- mm: '%d minuta',
- h: 'një orë',
- hh: '%d orë',
- d: 'një ditë',
- dd: '%d ditë',
- M: 'një muaj',
- MM: '%d muaj',
- y: 'një vit',
- yy: '%d vite',
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+module.exports = isFunction;
- return sq;
-})));
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isLength.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isLength.js ***!
+ \*********************************************************************************************/
+/***/ ((module) => {
+
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+module.exports = isLength;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sr-cyrl.js":
-/*!********************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sr-cyrl.js ***!
- \********************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isObject.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isObject.js ***!
+ \*********************************************************************************************/
+/***/ ((module) => {
-//! moment.js locale configuration
-//! locale : Serbian Cyrillic [sr-cyrl]
-//! author : Milan Janačković : https://github.com/milan-j
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return value != null && (type == 'object' || type == 'function');
+}
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+module.exports = isObject;
- //! moment.js locale configuration
- var translator = {
- words: {
- //Different grammatical cases
- ss: ['секунда', 'секунде', 'секунди'],
- m: ['један минут', 'једне минуте'],
- mm: ['минут', 'минуте', 'минута'],
- h: ['један сат', 'једног сата'],
- hh: ['сат', 'сата', 'сати'],
- dd: ['дан', 'дана', 'дана'],
- MM: ['месец', 'месеца', 'месеци'],
- yy: ['година', 'године', 'година'],
- },
- correctGrammaticalCase: function (number, wordKey) {
- return number === 1
- ? wordKey[0]
- : number >= 2 && number <= 4
- ? wordKey[1]
- : wordKey[2];
- },
- translate: function (number, withoutSuffix, key) {
- var wordKey = translator.words[key];
- if (key.length === 1) {
- return withoutSuffix ? wordKey[0] : wordKey[1];
- } else {
- return (
- number +
- ' ' +
- translator.correctGrammaticalCase(number, wordKey)
- );
- }
- },
- };
+/***/ }),
- var srCyrl = moment.defineLocale('sr-cyrl', {
- months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(
- '_'
- ),
- monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
- weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
- weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd, D. MMMM YYYY H:mm',
- },
- calendar: {
- sameDay: '[данас у] LT',
- nextDay: '[сутра у] LT',
- nextWeek: function () {
- switch (this.day()) {
- case 0:
- return '[у] [недељу] [у] LT';
- case 3:
- return '[у] [среду] [у] LT';
- case 6:
- return '[у] [суботу] [у] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[у] dddd [у] LT';
- }
- },
- lastDay: '[јуче у] LT',
- lastWeek: function () {
- var lastWeekDays = [
- '[прошле] [недеље] [у] LT',
- '[прошлог] [понедељка] [у] LT',
- '[прошлог] [уторка] [у] LT',
- '[прошле] [среде] [у] LT',
- '[прошлог] [четвртка] [у] LT',
- '[прошлог] [петка] [у] LT',
- '[прошле] [суботе] [у] LT',
- ];
- return lastWeekDays[this.day()];
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'за %s',
- past: 'пре %s',
- s: 'неколико секунди',
- ss: translator.translate,
- m: translator.translate,
- mm: translator.translate,
- h: translator.translate,
- hh: translator.translate,
- d: 'дан',
- dd: translator.translate,
- M: 'месец',
- MM: translator.translate,
- y: 'годину',
- yy: translator.translate,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isObjectLike.js":
+/*!*************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isObjectLike.js ***!
+ \*************************************************************************************************/
+/***/ ((module) => {
- return srCyrl;
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return value != null && typeof value == 'object';
+}
-})));
+module.exports = isObjectLike;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sr.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sr.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isSymbol.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isSymbol.js ***!
+ \*********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Serbian [sr]
-//! author : Milan Janačković : https://github.com/milan-j
+var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseGetTag.js"),
+ isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isObjectLike.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
- //! moment.js locale configuration
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
+}
- var translator = {
- words: {
- //Different grammatical cases
- ss: ['sekunda', 'sekunde', 'sekundi'],
- m: ['jedan minut', 'jedne minute'],
- mm: ['minut', 'minute', 'minuta'],
- h: ['jedan sat', 'jednog sata'],
- hh: ['sat', 'sata', 'sati'],
- dd: ['dan', 'dana', 'dana'],
- MM: ['mesec', 'meseca', 'meseci'],
- yy: ['godina', 'godine', 'godina'],
- },
- correctGrammaticalCase: function (number, wordKey) {
- return number === 1
- ? wordKey[0]
- : number >= 2 && number <= 4
- ? wordKey[1]
- : wordKey[2];
- },
- translate: function (number, withoutSuffix, key) {
- var wordKey = translator.words[key];
- if (key.length === 1) {
- return withoutSuffix ? wordKey[0] : wordKey[1];
- } else {
- return (
- number +
- ' ' +
- translator.correctGrammaticalCase(number, wordKey)
- );
- }
- },
- };
+module.exports = isSymbol;
- var sr = moment.defineLocale('sr', {
- months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(
- '_'
- ),
- monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(
- '_'
- ),
- weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
- weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd, D. MMMM YYYY H:mm',
- },
- calendar: {
- sameDay: '[danas u] LT',
- nextDay: '[sutra u] LT',
- nextWeek: function () {
- switch (this.day()) {
- case 0:
- return '[u] [nedelju] [u] LT';
- case 3:
- return '[u] [sredu] [u] LT';
- case 6:
- return '[u] [subotu] [u] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[u] dddd [u] LT';
- }
- },
- lastDay: '[juče u] LT',
- lastWeek: function () {
- var lastWeekDays = [
- '[prošle] [nedelje] [u] LT',
- '[prošlog] [ponedeljka] [u] LT',
- '[prošlog] [utorka] [u] LT',
- '[prošle] [srede] [u] LT',
- '[prošlog] [četvrtka] [u] LT',
- '[prošlog] [petka] [u] LT',
- '[prošle] [subote] [u] LT',
- ];
- return lastWeekDays[this.day()];
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'za %s',
- past: 'pre %s',
- s: 'nekoliko sekundi',
- ss: translator.translate,
- m: translator.translate,
- mm: translator.translate,
- h: translator.translate,
- hh: translator.translate,
- d: 'dan',
- dd: translator.translate,
- M: 'mesec',
- MM: translator.translate,
- y: 'godinu',
- yy: translator.translate,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
- return sr;
+/***/ }),
-})));
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isTypedArray.js":
+/*!*************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isTypedArray.js ***!
+ \*************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var baseIsTypedArray = __webpack_require__(/*! ./_baseIsTypedArray */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIsTypedArray.js"),
+ baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseUnary.js"),
+ nodeUtil = __webpack_require__(/*! ./_nodeUtil */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_nodeUtil.js");
+
+/* Node.js helper references. */
+var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+
+/**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
+
+module.exports = isTypedArray;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ss.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ss.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/keys.js":
+/*!*****************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/keys.js ***!
+ \*****************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : siSwati [ss]
-//! author : Nicolai Davies : https://github.com/nicolaidavies
+var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_arrayLikeKeys.js"),
+ baseKeys = __webpack_require__(/*! ./_baseKeys */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseKeys.js"),
+ isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/isArrayLike.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+function keys(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+}
- //! moment.js locale configuration
+module.exports = keys;
- var ss = moment.defineLocale('ss', {
- months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split(
- '_'
- ),
- monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
- weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(
- '_'
- ),
- weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
- weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY h:mm A',
- LLLL: 'dddd, D MMMM YYYY h:mm A',
- },
- calendar: {
- sameDay: '[Namuhla nga] LT',
- nextDay: '[Kusasa nga] LT',
- nextWeek: 'dddd [nga] LT',
- lastDay: '[Itolo nga] LT',
- lastWeek: 'dddd [leliphelile] [nga] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'nga %s',
- past: 'wenteka nga %s',
- s: 'emizuzwana lomcane',
- ss: '%d mzuzwana',
- m: 'umzuzu',
- mm: '%d emizuzu',
- h: 'lihora',
- hh: '%d emahora',
- d: 'lilanga',
- dd: '%d emalanga',
- M: 'inyanga',
- MM: '%d tinyanga',
- y: 'umnyaka',
- yy: '%d iminyaka',
- },
- meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
- meridiem: function (hours, minutes, isLower) {
- if (hours < 11) {
- return 'ekuseni';
- } else if (hours < 15) {
- return 'emini';
- } else if (hours < 19) {
- return 'entsambama';
- } else {
- return 'ebusuku';
- }
- },
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'ekuseni') {
- return hour;
- } else if (meridiem === 'emini') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
- if (hour === 0) {
- return 0;
- }
- return hour + 12;
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}/,
- ordinal: '%d',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
- return ss;
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/memoize.js":
+/*!********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/memoize.js ***!
+ \********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+var MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_MapCache.js");
+
+/** Error message constants. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/**
+ * Creates a function that memoizes the result of `func`. If `resolver` is
+ * provided, it determines the cache key for storing the result based on the
+ * arguments provided to the memoized function. By default, the first argument
+ * provided to the memoized function is used as the map cache key. The `func`
+ * is invoked with the `this` binding of the memoized function.
+ *
+ * **Note:** The cache is exposed as the `cache` property on the memoized
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
+ * constructor with one whose instances implement the
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to have its output memoized.
+ * @param {Function} [resolver] The function to resolve the cache key.
+ * @returns {Function} Returns the new memoized function.
+ * @example
+ *
+ * var object = { 'a': 1, 'b': 2 };
+ * var other = { 'c': 3, 'd': 4 };
+ *
+ * var values = _.memoize(_.values);
+ * values(object);
+ * // => [1, 2]
+ *
+ * values(other);
+ * // => [3, 4]
+ *
+ * object.a = 2;
+ * values(object);
+ * // => [1, 2]
+ *
+ * // Modify the result cache.
+ * values.cache.set(object, ['a', 'b']);
+ * values(object);
+ * // => ['a', 'b']
+ *
+ * // Replace `_.memoize.Cache`.
+ * _.memoize.Cache = WeakMap;
+ */
+function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result) || cache;
+ return result;
+ };
+ memoized.cache = new (memoize.Cache || MapCache);
+ return memoized;
+}
-})));
+// Expose `MapCache`.
+memoize.Cache = MapCache;
+
+module.exports = memoize;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sv.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sv.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/noop.js":
+/*!*****************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/noop.js ***!
+ \*****************************************************************************************/
+/***/ ((module) => {
-//! moment.js locale configuration
-//! locale : Swedish [sv]
-//! author : Jens Alm : https://github.com/ulmus
+/**
+ * This method returns `undefined`.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.3.0
+ * @category Util
+ * @example
+ *
+ * _.times(2, _.noop);
+ * // => [undefined, undefined]
+ */
+function noop() {
+ // No operation performed.
+}
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+module.exports = noop;
- //! moment.js locale configuration
- var sv = moment.defineLocale('sv', {
- months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
- '_'
- ),
- monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
- weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
- weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
- weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY [kl.] HH:mm',
- LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
- lll: 'D MMM YYYY HH:mm',
- llll: 'ddd D MMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Idag] LT',
- nextDay: '[Imorgon] LT',
- lastDay: '[Igår] LT',
- nextWeek: '[På] dddd LT',
- lastWeek: '[I] dddd[s] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'om %s',
- past: 'för %s sedan',
- s: 'några sekunder',
- ss: '%d sekunder',
- m: 'en minut',
- mm: '%d minuter',
- h: 'en timme',
- hh: '%d timmar',
- d: 'en dag',
- dd: '%d dagar',
- M: 'en månad',
- MM: '%d månader',
- y: 'ett år',
- yy: '%d år',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
- ordinal: function (number) {
- var b = number % 10,
- output =
- ~~((number % 100) / 10) === 1
- ? ':e'
- : b === 1
- ? ':a'
- : b === 2
- ? ':a'
- : b === 3
- ? ':e'
- : ':e';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+/***/ }),
- return sv;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/property.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/property.js ***!
+ \*********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-})));
+var baseProperty = __webpack_require__(/*! ./_baseProperty */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseProperty.js"),
+ basePropertyDeep = __webpack_require__(/*! ./_basePropertyDeep */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_basePropertyDeep.js"),
+ isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_isKey.js"),
+ toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_toKey.js");
+
+/**
+ * Creates a function that returns the value at `path` of a given object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': 2 } },
+ * { 'a': { 'b': 1 } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+ * // => [1, 2]
+ */
+function property(path) {
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
+}
+
+module.exports = property;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sw.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sw.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/stubArray.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/stubArray.js ***!
+ \**********************************************************************************************/
+/***/ ((module) => {
-//! moment.js locale configuration
-//! locale : Swahili [sw]
-//! author : Fahad Kassim : https://github.com/fadsel
+/**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+function stubArray() {
+ return [];
+}
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+module.exports = stubArray;
- //! moment.js locale configuration
- var sw = moment.defineLocale('sw', {
- months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(
- '_'
- ),
- monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
- weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(
- '_'
- ),
- weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
- weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[leo saa] LT',
- nextDay: '[kesho saa] LT',
- nextWeek: '[wiki ijayo] dddd [saat] LT',
- lastDay: '[jana] LT',
- lastWeek: '[wiki iliyopita] dddd [saat] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s baadaye',
- past: 'tokea %s',
- s: 'hivi punde',
- ss: 'sekunde %d',
- m: 'dakika moja',
- mm: 'dakika %d',
- h: 'saa limoja',
- hh: 'masaa %d',
- d: 'siku moja',
- dd: 'siku %d',
- M: 'mwezi mmoja',
- MM: 'miezi %d',
- y: 'mwaka mmoja',
- yy: 'miaka %d',
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+/***/ }),
- return sw;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/stubFalse.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/stubFalse.js ***!
+ \**********************************************************************************************/
+/***/ ((module) => {
-})));
+/**
+ * This method returns `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `false`.
+ * @example
+ *
+ * _.times(2, _.stubFalse);
+ * // => [false, false]
+ */
+function stubFalse() {
+ return false;
+}
+
+module.exports = stubFalse;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ta.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ta.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/toString.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/toString.js ***!
+ \*********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Tamil [ta]
-//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
+var baseToString = __webpack_require__(/*! ./_baseToString */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseToString.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+ return value == null ? '' : baseToString(value);
+}
- //! moment.js locale configuration
+module.exports = toString;
- var symbolMap = {
- '1': '௧',
- '2': '௨',
- '3': '௩',
- '4': '௪',
- '5': '௫',
- '6': '௬',
- '7': '௭',
- '8': '௮',
- '9': '௯',
- '0': '௦',
- },
- numberMap = {
- '௧': '1',
- '௨': '2',
- '௩': '3',
- '௪': '4',
- '௫': '5',
- '௬': '6',
- '௭': '7',
- '௮': '8',
- '௯': '9',
- '௦': '0',
- };
- var ta = moment.defineLocale('ta', {
- months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
- '_'
- ),
- monthsShort: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(
- '_'
- ),
- weekdays: 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(
- '_'
- ),
- weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(
- '_'
- ),
- weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, HH:mm',
- LLLL: 'dddd, D MMMM YYYY, HH:mm',
- },
- calendar: {
- sameDay: '[இன்று] LT',
- nextDay: '[நாளை] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[நேற்று] LT',
- lastWeek: '[கடந்த வாரம்] dddd, LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s இல்',
- past: '%s முன்',
- s: 'ஒரு சில விநாடிகள்',
- ss: '%d விநாடிகள்',
- m: 'ஒரு நிமிடம்',
- mm: '%d நிமிடங்கள்',
- h: 'ஒரு மணி நேரம்',
- hh: '%d மணி நேரம்',
- d: 'ஒரு நாள்',
- dd: '%d நாட்கள்',
- M: 'ஒரு மாதம்',
- MM: '%d மாதங்கள்',
- y: 'ஒரு வருடம்',
- yy: '%d ஆண்டுகள்',
- },
- dayOfMonthOrdinalParse: /\d{1,2}வது/,
- ordinal: function (number) {
- return number + 'வது';
- },
- preparse: function (string) {
- return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
- return numberMap[match];
- });
- },
- postformat: function (string) {
- return string.replace(/\d/g, function (match) {
- return symbolMap[match];
- });
- },
- // refer http://ta.wikipedia.org/s/1er1
- meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
- meridiem: function (hour, minute, isLower) {
- if (hour < 2) {
- return ' யாமம்';
- } else if (hour < 6) {
- return ' வைகறை'; // வைகறை
- } else if (hour < 10) {
- return ' காலை'; // காலை
- } else if (hour < 14) {
- return ' நண்பகல்'; // நண்பகல்
- } else if (hour < 18) {
- return ' எற்பாடு'; // எற்பாடு
- } else if (hour < 22) {
- return ' மாலை'; // மாலை
- } else {
- return ' யாமம்';
- }
- },
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'யாமம்') {
- return hour < 2 ? hour : hour + 12;
- } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
- return hour;
- } else if (meridiem === 'நண்பகல்') {
- return hour >= 10 ? hour : hour + 12;
- } else {
- return hour + 12;
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6, // The week that contains Jan 6th is the first week of the year.
- },
- });
+/***/ }),
- return ta;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/uniqBy.js":
+/*!*******************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/uniqBy.js ***!
+ \*******************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-})));
+var baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseIteratee.js"),
+ baseUniq = __webpack_require__(/*! ./_baseUniq */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/lodash/_baseUniq.js");
+
+/**
+ * This method is like `_.uniq` except that it accepts `iteratee` which is
+ * invoked for each element in `array` to generate the criterion by which
+ * uniqueness is computed. The order of result values is determined by the
+ * order they occur in the array. The iteratee is invoked with one argument:
+ * (value).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Array
+ * @param {Array} array The array to inspect.
+ * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
+ * @returns {Array} Returns the new duplicate free array.
+ * @example
+ *
+ * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
+ * // => [2.1, 1.2]
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
+ * // => [{ 'x': 1 }, { 'x': 2 }]
+ */
+function uniqBy(array, iteratee) {
+ return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];
+}
+
+module.exports = uniqBy;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/te.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/te.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/md5/md5.js":
+/*!*************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/md5/md5.js ***!
+ \*************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Telugu [te]
-//! author : Krishna Chaitanya Thota : https://github.com/kcthota
+(function(){
+ var crypt = __webpack_require__(/*! crypt */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/crypt/crypt.js"),
+ utf8 = __webpack_require__(/*! charenc */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/charenc/charenc.js").utf8,
+ isBuffer = __webpack_require__(/*! is-buffer */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/is-buffer/index.js"),
+ bin = __webpack_require__(/*! charenc */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/charenc/charenc.js").bin,
+
+ // The core
+ md5 = function (message, options) {
+ // Convert to byte array
+ if (message.constructor == String)
+ if (options && options.encoding === 'binary')
+ message = bin.stringToBytes(message);
+ else
+ message = utf8.stringToBytes(message);
+ else if (isBuffer(message))
+ message = Array.prototype.slice.call(message, 0);
+ else if (!Array.isArray(message) && message.constructor !== Uint8Array)
+ message = message.toString();
+ // else, assume byte array already
+
+ var m = crypt.bytesToWords(message),
+ l = message.length * 8,
+ a = 1732584193,
+ b = -271733879,
+ c = -1732584194,
+ d = 271733878;
+
+ // Swap endian
+ for (var i = 0; i < m.length; i++) {
+ m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |
+ ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;
+ }
+
+ // Padding
+ m[l >>> 5] |= 0x80 << (l % 32);
+ m[(((l + 64) >>> 9) << 4) + 14] = l;
+
+ // Method shortcuts
+ var FF = md5._ff,
+ GG = md5._gg,
+ HH = md5._hh,
+ II = md5._ii;
+
+ for (var i = 0; i < m.length; i += 16) {
+
+ var aa = a,
+ bb = b,
+ cc = c,
+ dd = d;
+
+ a = FF(a, b, c, d, m[i+ 0], 7, -680876936);
+ d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
+ c = FF(c, d, a, b, m[i+ 2], 17, 606105819);
+ b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
+ a = FF(a, b, c, d, m[i+ 4], 7, -176418897);
+ d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);
+ c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
+ b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
+ a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);
+ d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
+ c = FF(c, d, a, b, m[i+10], 17, -42063);
+ b = FF(b, c, d, a, m[i+11], 22, -1990404162);
+ a = FF(a, b, c, d, m[i+12], 7, 1804603682);
+ d = FF(d, a, b, c, m[i+13], 12, -40341101);
+ c = FF(c, d, a, b, m[i+14], 17, -1502002290);
+ b = FF(b, c, d, a, m[i+15], 22, 1236535329);
+
+ a = GG(a, b, c, d, m[i+ 1], 5, -165796510);
+ d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);
+ c = GG(c, d, a, b, m[i+11], 14, 643717713);
+ b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
+ a = GG(a, b, c, d, m[i+ 5], 5, -701558691);
+ d = GG(d, a, b, c, m[i+10], 9, 38016083);
+ c = GG(c, d, a, b, m[i+15], 14, -660478335);
+ b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
+ a = GG(a, b, c, d, m[i+ 9], 5, 568446438);
+ d = GG(d, a, b, c, m[i+14], 9, -1019803690);
+ c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
+ b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);
+ a = GG(a, b, c, d, m[i+13], 5, -1444681467);
+ d = GG(d, a, b, c, m[i+ 2], 9, -51403784);
+ c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);
+ b = GG(b, c, d, a, m[i+12], 20, -1926607734);
+
+ a = HH(a, b, c, d, m[i+ 5], 4, -378558);
+ d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
+ c = HH(c, d, a, b, m[i+11], 16, 1839030562);
+ b = HH(b, c, d, a, m[i+14], 23, -35309556);
+ a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);
+ d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);
+ c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
+ b = HH(b, c, d, a, m[i+10], 23, -1094730640);
+ a = HH(a, b, c, d, m[i+13], 4, 681279174);
+ d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
+ c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
+ b = HH(b, c, d, a, m[i+ 6], 23, 76029189);
+ a = HH(a, b, c, d, m[i+ 9], 4, -640364487);
+ d = HH(d, a, b, c, m[i+12], 11, -421815835);
+ c = HH(c, d, a, b, m[i+15], 16, 530742520);
+ b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
+
+ a = II(a, b, c, d, m[i+ 0], 6, -198630844);
+ d = II(d, a, b, c, m[i+ 7], 10, 1126891415);
+ c = II(c, d, a, b, m[i+14], 15, -1416354905);
+ b = II(b, c, d, a, m[i+ 5], 21, -57434055);
+ a = II(a, b, c, d, m[i+12], 6, 1700485571);
+ d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
+ c = II(c, d, a, b, m[i+10], 15, -1051523);
+ b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
+ a = II(a, b, c, d, m[i+ 8], 6, 1873313359);
+ d = II(d, a, b, c, m[i+15], 10, -30611744);
+ c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
+ b = II(b, c, d, a, m[i+13], 21, 1309151649);
+ a = II(a, b, c, d, m[i+ 4], 6, -145523070);
+ d = II(d, a, b, c, m[i+11], 10, -1120210379);
+ c = II(c, d, a, b, m[i+ 2], 15, 718787259);
+ b = II(b, c, d, a, m[i+ 9], 21, -343485551);
+
+ a = (a + aa) >>> 0;
+ b = (b + bb) >>> 0;
+ c = (c + cc) >>> 0;
+ d = (d + dd) >>> 0;
+ }
+
+ return crypt.endian([a, b, c, d]);
+ };
+
+ // Auxiliary functions
+ md5._ff = function (a, b, c, d, x, s, t) {
+ var n = a + (b & c | ~b & d) + (x >>> 0) + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ };
+ md5._gg = function (a, b, c, d, x, s, t) {
+ var n = a + (b & d | c & ~d) + (x >>> 0) + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ };
+ md5._hh = function (a, b, c, d, x, s, t) {
+ var n = a + (b ^ c ^ d) + (x >>> 0) + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ };
+ md5._ii = function (a, b, c, d, x, s, t) {
+ var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
+ return ((n << s) | (n >>> (32 - s))) + b;
+ };
+
+ // Package private blocksize
+ md5._blocksize = 16;
+ md5._digestsize = 16;
+
+ module.exports = function (message, options) {
+ if (message === undefined || message === null)
+ throw new Error('Illegal argument ' + message);
+
+ var digestbytes = crypt.wordsToBytes(md5(message, options));
+ return options && options.asBytes ? digestbytes :
+ options && options.asString ? bin.bytesToString(digestbytes) :
+ crypt.bytesToHex(digestbytes);
+ };
+
+})();
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
- //! moment.js locale configuration
+/***/ }),
- var te = moment.defineLocale('te', {
- months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(
- '_'
- ),
- monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(
- '_'
- ),
- weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
- weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
- longDateFormat: {
- LT: 'A h:mm',
- LTS: 'A h:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm',
- LLLL: 'dddd, D MMMM YYYY, A h:mm',
- },
- calendar: {
- sameDay: '[నేడు] LT',
- nextDay: '[రేపు] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[నిన్న] LT',
- lastWeek: '[గత] dddd, LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s లో',
- past: '%s క్రితం',
- s: 'కొన్ని క్షణాలు',
- ss: '%d సెకన్లు',
- m: 'ఒక నిమిషం',
- mm: '%d నిమిషాలు',
- h: 'ఒక గంట',
- hh: '%d గంటలు',
- d: 'ఒక రోజు',
- dd: '%d రోజులు',
- M: 'ఒక నెల',
- MM: '%d నెలలు',
- y: 'ఒక సంవత్సరం',
- yy: '%d సంవత్సరాలు',
- },
- dayOfMonthOrdinalParse: /\d{1,2}వ/,
- ordinal: '%dవ',
- meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'రాత్రి') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'ఉదయం') {
- return hour;
- } else if (meridiem === 'మధ్యాహ్నం') {
- return hour >= 10 ? hour : hour + 12;
- } else if (meridiem === 'సాయంత్రం') {
- return hour + 12;
- }
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 4) {
- return 'రాత్రి';
- } else if (hour < 10) {
- return 'ఉదయం';
- } else if (hour < 17) {
- return 'మధ్యాహ్నం';
- } else if (hour < 20) {
- return 'సాయంత్రం';
- } else {
- return 'రాత్రి';
- }
- },
- week: {
- dow: 0, // Sunday is the first day of the week.
- doy: 6, // The week that contains Jan 6th is the first week of the year.
- },
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/medic-nootils/src/nootils.js":
+/*!*******************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/medic-nootils/src/nootils.js ***!
+ \*******************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- return te;
+const _ = __webpack_require__(/*! underscore */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/underscore/underscore-node.cjs");
-})));
+const NO_LMP_DATE_MODIFIER = 4;
+module.exports = function(settings) {
+ const taskSchedules = settings && settings.tasks && settings.tasks.schedules;
+ const lib = {
+ /**
+ * @function
+ * In legacy versions, partner code is required to only emit tasks which are ready to be displayed to the user. Utils.isTimely is the mechanism used for this.
+ * With the rules-engine improvements in webapp 3.8, this responsibility shifts. Partner code should emit all tasks and the webapp's rules-engine decides what to display.
+ * To this end - Utils.isTimely becomes a pass-through in nootils@4.x
+ * @returns True
+ */
+ isTimely: () => true,
-/***/ }),
+ addDate: function(date, days) {
+ let result;
+ if (date) {
+ result = new Date(date.getTime());
+ } else {
+ result = lib.now();
+ }
+ result.setDate(result.getDate() + days);
+ result.setHours(0, 0, 0, 0);
+ return result;
+ },
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tet.js":
-/*!****************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tet.js ***!
- \****************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ getLmpDate: function(doc) {
+ const weeks = doc.fields.last_menstrual_period || NO_LMP_DATE_MODIFIER;
+ return lib.addDate(new Date(doc.reported_date), weeks * -7);
+ },
-//! moment.js locale configuration
-//! locale : Tetun Dili (East Timor) [tet]
-//! author : Joshua Brooks : https://github.com/joshbrooks
-//! author : Onorio De J. Afonso : https://github.com/marobo
-//! author : Sonia Simoes : https://github.com/soniasimoes
+ // TODO getSchedule() can be removed when tasks.json support is dropped
+ getSchedule: function(name) {
+ return _.findWhere(taskSchedules, { name: name });
+ },
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ getMostRecentTimestamp: function(reports, form, fields) {
+ const report = lib.getMostRecentReport(reports, form, fields);
+ return report && report.reported_date;
+ },
- //! moment.js locale configuration
+ getMostRecentReport: function(reports, form, fields) {
+ let result = null;
+ reports.forEach(function(report) {
+ if (report.form === form &&
+ !report.deleted &&
+ (!result || (report.reported_date > result.reported_date)) &&
+ (!fields || (report.fields && lib.fieldsMatch(report, fields)))) {
+ result = report;
+ }
+ });
+ return result;
+ },
- var tet = moment.defineLocale('tet', {
- months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(
- '_'
- ),
- monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
- weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),
- weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),
- weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Ohin iha] LT',
- nextDay: '[Aban iha] LT',
- nextWeek: 'dddd [iha] LT',
- lastDay: '[Horiseik iha] LT',
- lastWeek: 'dddd [semana kotuk] [iha] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'iha %s',
- past: '%s liuba',
- s: 'segundu balun',
- ss: 'segundu %d',
- m: 'minutu ida',
- mm: 'minutu %d',
- h: 'oras ida',
- hh: 'oras %d',
- d: 'loron ida',
- dd: 'loron %d',
- M: 'fulan ida',
- MM: 'fulan %d',
- y: 'tinan ida',
- yy: 'tinan %d',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal: function (number) {
- var b = number % 10,
- output =
- ~~((number % 100) / 10) === 1
- ? 'th'
- : b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+ isFormSubmittedInWindow: function(reports, form, start, end, count) {
+ let result = false;
+ reports.forEach(function(report) {
+ if (!result && report.form === form) {
+ if (report.reported_date >= start && report.reported_date <= end) {
+ if (!count ||
+ (count && report.fields && report.fields.follow_up_count > count)) {
+ result = true;
+ }
+ }
+ }
+ });
+ return result;
+ },
- return tet;
+ isFirstReportNewer: function(firstReport, secondReport) {
+ if (firstReport && firstReport.reported_date) {
+ if (secondReport && secondReport.reported_date) {
+ return firstReport.reported_date > secondReport.reported_date;
+ }
+ return true;
+ }
+ return null;
+ },
-})));
+ isDateValid: function(date) {
+ return !isNaN(date.getTime());
+ },
+
+ /**
+ * @function
+ * @name getField
+ *
+ * Gets the value of specified field path.
+ * @param {Object} report - The report object.
+ * @param {string} field - Period separated json path assuming report.fields as
+ * the root node e.g 'dob' (equivalent to report.fields.dob)
+ * or 'screening.test_result' equivalent to report.fields.screening.test_result
+ */
+ getField: function(report, field) {
+ return _.propertyOf(report.fields)(field.split('.'));
+ },
+
+ fieldsMatch: function(report, fieldValues) {
+ return Object.keys(fieldValues).every(function(field) {
+ return lib.getField(report, field) === fieldValues[field];
+ });
+ },
+
+ MS_IN_DAY: 24*60*60*1000, // 1 day in ms
+
+ now: function() { return new Date(); },
+ };
+
+ return lib;
+};
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tg.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tg.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/index.js":
+/*!*****************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/index.js ***!
+ \*****************************************************************************************/
+/***/ ((module, exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Tajik [tg]
-//! author : Orif N. Jr. : https://github.com/orif-jr
+module.exports = exports = __webpack_require__(/*! ./lib */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/index.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+/***/ }),
- //! moment.js locale configuration
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/agenda.js":
+/*!**********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/agenda.js ***!
+ \**********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- var suffixes = {
- 0: '-ум',
- 1: '-ум',
- 2: '-юм',
- 3: '-юм',
- 4: '-ум',
- 5: '-ум',
- 6: '-ум',
- 7: '-ум',
- 8: '-ум',
- 9: '-ум',
- 10: '-ум',
- 12: '-ум',
- 13: '-ум',
- 20: '-ум',
- 30: '-юм',
- 40: '-ум',
- 50: '-ум',
- 60: '-ум',
- 70: '-ум',
- 80: '-ум',
- 90: '-ум',
- 100: '-ум',
- };
+"use strict";
- var tg = moment.defineLocale('tg', {
- months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
- '_'
- ),
- monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
- weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(
- '_'
- ),
- weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),
- weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Имрӯз соати] LT',
- nextDay: '[Пагоҳ соати] LT',
- lastDay: '[Дирӯз соати] LT',
- nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',
- lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'баъди %s',
- past: '%s пеш',
- s: 'якчанд сония',
- m: 'як дақиқа',
- mm: '%d дақиқа',
- h: 'як соат',
- hh: '%d соат',
- d: 'як рӯз',
- dd: '%d рӯз',
- M: 'як моҳ',
- MM: '%d моҳ',
- y: 'як сол',
- yy: '%d сол',
- },
- meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'шаб') {
- return hour < 4 ? hour : hour + 12;
- } else if (meridiem === 'субҳ') {
- return hour;
- } else if (meridiem === 'рӯз') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === 'бегоҳ') {
- return hour + 12;
- }
+var extd = __webpack_require__(/*! ./extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ declare = extd.declare,
+ AVLTree = extd.AVLTree,
+ LinkedList = extd.LinkedList,
+ isPromise = extd.isPromiseLike,
+ EventEmitter = __webpack_require__(/*! events */ "events").EventEmitter;
+
+
+var FactHash = declare({
+ instance: {
+ constructor: function () {
+ this.memory = {};
+ this.memoryValues = new LinkedList();
},
- meridiem: function (hour, minute, isLower) {
- if (hour < 4) {
- return 'шаб';
- } else if (hour < 11) {
- return 'субҳ';
- } else if (hour < 16) {
- return 'рӯз';
- } else if (hour < 19) {
- return 'бегоҳ';
- } else {
- return 'шаб';
+
+ clear: function () {
+ this.memoryValues.clear();
+ this.memory = {};
+ },
+
+
+ remove: function (v) {
+ var hashCode = v.hashCode,
+ memory = this.memory,
+ ret = memory[hashCode];
+ if (ret) {
+ this.memoryValues.remove(ret);
+ delete memory[hashCode];
}
+ return ret;
},
- dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/,
- ordinal: function (number) {
- var a = number % 10,
- b = number >= 100 ? 100 : null;
- return number + (suffixes[number] || suffixes[a] || suffixes[b]);
+
+ insert: function (insert) {
+ var hashCode = insert.hashCode;
+ if (hashCode in this.memory) {
+ throw new Error("Activation already in agenda " + insert.rule.name + " agenda");
+ }
+ this.memoryValues.push((this.memory[hashCode] = insert));
+ }
+ }
+});
+
+
+var DEFAULT_AGENDA_GROUP = "main";
+module.exports = declare(EventEmitter, {
+
+ instance: {
+ constructor: function (flow, conflictResolution) {
+ this.agendaGroups = {};
+ this.agendaGroupStack = [DEFAULT_AGENDA_GROUP];
+ this.rules = {};
+ this.flow = flow;
+ this.comparator = conflictResolution;
+ this.setFocus(DEFAULT_AGENDA_GROUP).addAgendaGroup(DEFAULT_AGENDA_GROUP);
},
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 1th is the first week of the year.
+
+ addAgendaGroup: function (groupName) {
+ if (!extd.has(this.agendaGroups, groupName)) {
+ this.agendaGroups[groupName] = new AVLTree({compare: this.comparator});
+ }
},
- });
- return tg;
+ getAgendaGroup: function (groupName) {
+ return this.agendaGroups[groupName || DEFAULT_AGENDA_GROUP];
+ },
-})));
+ setFocus: function (agendaGroup) {
+ if (agendaGroup !== this.getFocused() && this.agendaGroups[agendaGroup]) {
+ this.agendaGroupStack.push(agendaGroup);
+ this.emit("focused", agendaGroup);
+ }
+ return this;
+ },
+ getFocused: function () {
+ var ags = this.agendaGroupStack;
+ return ags[ags.length - 1];
+ },
-/***/ }),
+ getFocusedAgenda: function () {
+ return this.agendaGroups[this.getFocused()];
+ },
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/th.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/th.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ register: function (node) {
+ var agendaGroup = node.rule.agendaGroup;
+ this.rules[node.name] = {tree: new AVLTree({compare: this.comparator}), factTable: new FactHash()};
+ if (agendaGroup) {
+ this.addAgendaGroup(agendaGroup);
+ }
+ },
-//! moment.js locale configuration
-//! locale : Thai [th]
-//! author : Kridsada Thanabulpong : https://github.com/sirn
+ isEmpty: function () {
+ var agendaGroupStack = this.agendaGroupStack, changed = false;
+ while (this.getFocusedAgenda().isEmpty() && this.getFocused() !== DEFAULT_AGENDA_GROUP) {
+ agendaGroupStack.pop();
+ changed = true;
+ }
+ if (changed) {
+ this.emit("focused", this.getFocused());
+ }
+ return this.getFocusedAgenda().isEmpty();
+ },
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ fireNext: function () {
+ var agendaGroupStack = this.agendaGroupStack, ret = false;
+ while (this.getFocusedAgenda().isEmpty() && this.getFocused() !== DEFAULT_AGENDA_GROUP) {
+ agendaGroupStack.pop();
+ }
+ if (!this.getFocusedAgenda().isEmpty()) {
+ var activation = this.pop();
+ this.emit("fire", activation.rule.name, activation.match.factHash);
+ var fired = activation.rule.fire(this.flow, activation.match);
+ if (isPromise(fired)) {
+ ret = fired.then(function () {
+ //return true if an activation fired
+ return true;
+ });
+ } else {
+ ret = true;
+ }
+ }
+ //return false if activation not fired
+ return ret;
+ },
- //! moment.js locale configuration
+ pop: function () {
+ var tree = this.getFocusedAgenda(), root = tree.__root;
+ while (root.right) {
+ root = root.right;
+ }
+ var v = root.data;
+ tree.remove(v);
+ var rule = this.rules[v.name];
+ rule.tree.remove(v);
+ rule.factTable.remove(v);
+ return v;
+ },
- var th = moment.defineLocale('th', {
- months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(
- '_'
- ),
- monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
- weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
- weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY เวลา H:mm',
- LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',
+ peek: function () {
+ var tree = this.getFocusedAgenda(), root = tree.__root;
+ while (root.right) {
+ root = root.right;
+ }
+ return root.data;
},
- meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
- isPM: function (input) {
- return input === 'หลังเที่ยง';
+
+ modify: function (node, context) {
+ this.retract(node, context);
+ this.insert(node, context);
},
- meridiem: function (hour, minute, isLower) {
- if (hour < 12) {
- return 'ก่อนเที่ยง';
- } else {
- return 'หลังเที่ยง';
+
+ retract: function (node, retract) {
+ var rule = this.rules[node.name];
+ retract.rule = node;
+ var activation = rule.factTable.remove(retract);
+ if (activation) {
+ this.getAgendaGroup(node.rule.agendaGroup).remove(activation);
+ rule.tree.remove(activation);
}
},
- calendar: {
- sameDay: '[วันนี้ เวลา] LT',
- nextDay: '[พรุ่งนี้ เวลา] LT',
- nextWeek: 'dddd[หน้า เวลา] LT',
- lastDay: '[เมื่อวานนี้ เวลา] LT',
- lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'อีก %s',
- past: '%sที่แล้ว',
- s: 'ไม่กี่วินาที',
- ss: '%d วินาที',
- m: '1 นาที',
- mm: '%d นาที',
- h: '1 ชั่วโมง',
- hh: '%d ชั่วโมง',
- d: '1 วัน',
- dd: '%d วัน',
- M: '1 เดือน',
- MM: '%d เดือน',
- y: '1 ปี',
- yy: '%d ปี',
+
+ insert: function (node, insert) {
+ var rule = this.rules[node.name], nodeRule = node.rule, agendaGroup = nodeRule.agendaGroup;
+ rule.tree.insert(insert);
+ this.getAgendaGroup(agendaGroup).insert(insert);
+ if (nodeRule.autoFocus) {
+ this.setFocus(agendaGroup);
+ }
+
+ rule.factTable.insert(insert);
},
- });
- return th;
+ dispose: function () {
+ for (var i in this.agendaGroups) {
+ this.agendaGroups[i].clear();
+ }
+ var rules = this.rules;
+ for (i in rules) {
+ if (i in rules) {
+ rules[i].tree.clear();
+ rules[i].factTable.clear();
-})));
+ }
+ }
+ this.rules = {};
+ }
+ }
+});
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tl-ph.js":
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/compile/common.js":
/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tl-ph.js ***!
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/compile/common.js ***!
\******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Tagalog (Philippines) [tl-ph]
-//! author : Dan Hagman : https://github.com/hagmandan
+"use strict";
+/*jshint evil:true*/
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+var extd = __webpack_require__(/*! ../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ forEach = extd.forEach,
+ isString = extd.isString;
- //! moment.js locale configuration
+exports.modifiers = ["assert", "modify", "retract", "emit", "halt", "focus", "getFacts"];
- var tlPh = moment.defineLocale('tl-ph', {
- months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(
- '_'
- ),
- monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
- weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(
- '_'
- ),
- weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
- weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'MM/D/YYYY',
- LL: 'MMMM D, YYYY',
- LLL: 'MMMM D, YYYY HH:mm',
- LLLL: 'dddd, MMMM DD, YYYY HH:mm',
- },
- calendar: {
- sameDay: 'LT [ngayong araw]',
- nextDay: '[Bukas ng] LT',
- nextWeek: 'LT [sa susunod na] dddd',
- lastDay: 'LT [kahapon]',
- lastWeek: 'LT [noong nakaraang] dddd',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'sa loob ng %s',
- past: '%s ang nakalipas',
- s: 'ilang segundo',
- ss: '%d segundo',
- m: 'isang minuto',
- mm: '%d minuto',
- h: 'isang oras',
- hh: '%d oras',
- d: 'isang araw',
- dd: '%d araw',
- M: 'isang buwan',
- MM: '%d buwan',
- y: 'isang taon',
- yy: '%d taon',
- },
- dayOfMonthOrdinalParse: /\d{1,2}/,
- ordinal: function (number) {
- return number;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
+var createFunction = function (body, defined, scope, scopeNames, definedNames) {
+ var declares = [];
+ forEach(definedNames, function (i) {
+ if (body.indexOf(i) !== -1) {
+ declares.push("var " + i + "= defined." + i + ";");
+ }
});
- return tlPh;
+ forEach(scopeNames, function (i) {
+ if (body.indexOf(i) !== -1) {
+ declares.push("var " + i + "= scope." + i + ";");
+ }
+ });
+ body = ["((function(){", declares.join(""), "\n\treturn ", body, "\n})())"].join("");
+ try {
+ return eval(body);
+ } catch (e) {
+ throw new Error("Invalid action : " + body + "\n" + e.message);
+ }
+};
-})));
+var createDefined = (function () {
+
+ var _createDefined = function (action, defined, scope) {
+ if (isString(action)) {
+ var declares = [];
+ extd(defined).keys().forEach(function (i) {
+ if (action.indexOf(i) !== -1) {
+ declares.push("var " + i + "= defined." + i + ";");
+ }
+ });
+
+ extd(scope).keys().forEach(function (i) {
+ if (action.indexOf(i) !== -1) {
+ declares.push("var " + i + "= function(){var prop = scope." + i + "; return __objToStr__.call(prop) === '[object Function]' ? prop.apply(void 0, arguments) : prop;};");
+ }
+ });
+ if (declares.length) {
+ declares.unshift("var __objToStr__ = Object.prototype.toString;");
+ }
+ action = [declares.join(""), "return ", action, ";"].join("");
+ action = new Function("defined", "scope", action)(defined, scope);
+ }
+ var ret = action.hasOwnProperty("constructor") && "function" === typeof action.constructor ? action.constructor : function (opts) {
+ opts = opts || {};
+ for (var i in opts) {
+ if (i in action) {
+ this[i] = opts[i];
+ }
+ }
+ };
+ var proto = ret.prototype;
+ for (var i in action) {
+ proto[i] = action[i];
+ }
+ return ret;
+
+ };
+
+ return function (options, defined, scope) {
+ return _createDefined(options.properties, defined, scope);
+ };
+})();
+exports.createFunction = createFunction;
+exports.createDefined = createDefined;
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tlh.js":
-/*!****************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tlh.js ***!
- \****************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/compile/index.js":
+/*!*****************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/compile/index.js ***!
+ \*****************************************************************************************************/
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Klingon [tlh]
-//! author : Dominika Kruk : https://github.com/amaranthrose
+"use strict";
+/*jshint evil:true*/
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+var extd = __webpack_require__(/*! ../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ parser = __webpack_require__(/*! ../parser */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/index.js"),
+ constraintMatcher = __webpack_require__(/*! ../constraintMatcher.js */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/constraintMatcher.js"),
+ indexOf = extd.indexOf,
+ forEach = extd.forEach,
+ removeDuplicates = extd.removeDuplicates,
+ map = extd.map,
+ obj = extd.hash,
+ keys = obj.keys,
+ merge = extd.merge,
+ rules = __webpack_require__(/*! ../rule */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/rule.js"),
+ common = __webpack_require__(/*! ./common */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/compile/common.js"),
+ modifiers = common.modifiers,
+ createDefined = common.createDefined,
+ createFunction = common.createFunction;
- //! moment.js locale configuration
- var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
+/**
+ * @private
+ * Parses an action from a rule definition
+ * @param {String} action the body of the action to execute
+ * @param {Array} identifiers array of identifiers collected
+ * @param {Object} defined an object of defined
+ * @param scope
+ * @return {Object}
+ */
+var parseAction = function (action, identifiers, defined, scope) {
+ var declares = [];
+ forEach(identifiers, function (i) {
+ if (action.indexOf(i) !== -1) {
+ declares.push("var " + i + "= facts." + i + ";");
+ }
+ });
+ extd(defined).keys().forEach(function (i) {
+ if (action.indexOf(i) !== -1) {
+ declares.push("var " + i + "= defined." + i + ";");
+ }
+ });
- function translateFuture(output) {
- var time = output;
- time =
- output.indexOf('jaj') !== -1
- ? time.slice(0, -3) + 'leS'
- : output.indexOf('jar') !== -1
- ? time.slice(0, -3) + 'waQ'
- : output.indexOf('DIS') !== -1
- ? time.slice(0, -3) + 'nem'
- : time + ' pIq';
- return time;
+ extd(scope).keys().forEach(function (i) {
+ if (action.indexOf(i) !== -1) {
+ declares.push("var " + i + "= scope." + i + ";");
+ }
+ });
+ extd(modifiers).forEach(function (i) {
+ if (action.indexOf(i) !== -1) {
+ declares.push("if(!" + i + "){ var " + i + "= flow." + i + ";}");
+ }
+ });
+ var params = ["facts", 'flow'];
+ if (/next\(.*\)/.test(action)) {
+ params.push("next");
}
-
- function translatePast(output) {
- var time = output;
- time =
- output.indexOf('jaj') !== -1
- ? time.slice(0, -3) + 'Hu’'
- : output.indexOf('jar') !== -1
- ? time.slice(0, -3) + 'wen'
- : output.indexOf('DIS') !== -1
- ? time.slice(0, -3) + 'ben'
- : time + ' ret';
- return time;
+ action = declares.join("") + action;
+ try {
+ return new Function("defined, scope", "return " + new Function(params.join(","), action).toString())(defined, scope);
+ } catch (e) {
+ throw new Error("Invalid action : " + action + "\n" + e.message);
}
+};
- function translate(number, withoutSuffix, string, isFuture) {
- var numberNoun = numberAsNoun(number);
- switch (string) {
- case 'ss':
- return numberNoun + ' lup';
- case 'mm':
- return numberNoun + ' tup';
- case 'hh':
- return numberNoun + ' rep';
- case 'dd':
- return numberNoun + ' jaj';
- case 'MM':
- return numberNoun + ' jar';
- case 'yy':
- return numberNoun + ' DIS';
+var createRuleFromObject = (function () {
+ var __resolveRule = function (rule, identifiers, conditions, defined, name) {
+ var condition = [], definedClass = rule[0], alias = rule[1], constraint = rule[2], refs = rule[3];
+ if (extd.isHash(constraint)) {
+ refs = constraint;
+ constraint = null;
+ }
+ if (definedClass && !!(definedClass = defined[definedClass])) {
+ condition.push(definedClass);
+ } else {
+ throw new Error("Invalid class " + rule[0] + " for rule " + name);
+ }
+ condition.push(alias, constraint, refs);
+ conditions.push(condition);
+ identifiers.push(alias);
+ if (constraint) {
+ forEach(constraintMatcher.getIdentifiers(parser.parseConstraint(constraint)), function (i) {
+ identifiers.push(i);
+ });
+ }
+ if (extd.isObject(refs)) {
+ for (var j in refs) {
+ var ident = refs[j];
+ if (indexOf(identifiers, ident) === -1) {
+ identifiers.push(ident);
+ }
+ }
+ }
+ };
+
+ function parseRule(rule, conditions, identifiers, defined, name) {
+ if (rule.length) {
+ var r0 = rule[0];
+ if (r0 === "not" || r0 === "exists") {
+ var temp = [];
+ rule.shift();
+ __resolveRule(rule, identifiers, temp, defined, name);
+ var cond = temp[0];
+ cond.unshift(r0);
+ conditions.push(cond);
+ } else if (r0 === "or") {
+ var conds = [r0];
+ rule.shift();
+ forEach(rule, function (cond) {
+ parseRule(cond, conds, identifiers, defined, name);
+ });
+ conditions.push(conds);
+ } else {
+ __resolveRule(rule, identifiers, conditions, defined, name);
+ identifiers = removeDuplicates(identifiers);
+ }
}
+
}
- function numberAsNoun(number) {
- var hundred = Math.floor((number % 1000) / 100),
- ten = Math.floor((number % 100) / 10),
- one = number % 10,
- word = '';
- if (hundred > 0) {
- word += numbersNouns[hundred] + 'vatlh';
+ return function (obj, defined, scope) {
+ var name = obj.name;
+ if (extd.isEmpty(obj)) {
+ throw new Error("Rule is empty");
}
- if (ten > 0) {
- word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';
+ var options = obj.options || {};
+ options.scope = scope;
+ var constraints = obj.constraints || [], l = constraints.length;
+ if (!l) {
+ constraints = ["true"];
}
- if (one > 0) {
- word += (word !== '' ? ' ' : '') + numbersNouns[one];
+ var action = obj.action;
+ if (extd.isUndefined(action)) {
+ throw new Error("No action was defined for rule " + name);
}
- return word === '' ? 'pagh' : word;
+ var conditions = [], identifiers = [];
+ forEach(constraints, function (rule) {
+ parseRule(rule, conditions, identifiers, defined, name);
+ });
+ return rules.createRule(name, options, conditions, parseAction(action, identifiers, defined, scope));
+ };
+})();
+
+exports.parse = function (src, file) {
+ //parse flow from file
+ return parser.parseRuleSet(src, file);
+
+};
+exports.compile = function (flowObj, options, cb, Container) {
+ if (extd.isFunction(options)) {
+ cb = options;
+ options = {};
+ } else {
+ options = options || {};
+ }
+ var name = flowObj.name || options.name;
+ //if !name throw an error
+ if (!name) {
+ throw new Error("Name must be present in JSON or options");
}
+ var flow = new Container(name);
+ var defined = merge({Array: Array, String: String, Number: Number, Boolean: Boolean, RegExp: RegExp, Date: Date, Object: Object}, options.define || {});
+ if (typeof Buffer !== "undefined") {
+ defined.Buffer = Buffer;
+ }
+ var scope = merge({console: console}, options.scope);
+ //add the anything added to the scope as a property
+ forEach(flowObj.scope, function (s) {
+ scope[s.name] = true;
+ });
+ //add any defined classes in the parsed flowObj to defined
+ forEach(flowObj.define, function (d) {
+ defined[d.name] = createDefined(d, defined, scope);
+ });
- var tlh = moment.defineLocale('tlh', {
- months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(
- '_'
- ),
- monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
- '_'
- ),
- weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
- '_'
- ),
- weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
- '_'
- ),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[DaHjaj] LT',
- nextDay: '[wa’leS] LT',
- nextWeek: 'LLL',
- lastDay: '[wa’Hu’] LT',
- lastWeek: 'LLL',
- sameElse: 'L',
- },
- relativeTime: {
- future: translateFuture,
- past: translatePast,
- s: 'puS lup',
- ss: translate,
- m: 'wa’ tup',
- mm: translate,
- h: 'wa’ rep',
- hh: translate,
- d: 'wa’ jaj',
- dd: translate,
- M: 'wa’ jar',
- MM: translate,
- y: 'wa’ DIS',
- yy: translate,
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
+ //expose any defined classes to the flow.
+ extd(defined).forEach(function (cls, name) {
+ flow.addDefined(name, cls);
});
- return tlh;
+ var scopeNames = extd(flowObj.scope).pluck("name").union(extd(scope).keys().value()).value();
+ var definedNames = map(keys(defined), function (s) {
+ return s;
+ });
+ forEach(flowObj.scope, function (s) {
+ scope[s.name] = createFunction(s.body, defined, scope, scopeNames, definedNames);
+ });
+ var rules = flowObj.rules;
+ if (rules.length) {
+ forEach(rules, function (rule) {
+ flow.__rules = flow.__rules.concat(createRuleFromObject(rule, defined, scope));
+ });
+ }
+ if (cb) {
+ cb.call(flow, flow);
+ }
+ return flow;
+};
+
+exports.transpile = __webpack_require__(/*! ./transpile */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/compile/transpile.js").transpile;
+
+
-})));
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tr.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tr.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/compile/transpile.js":
+/*!*********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/compile/transpile.js ***!
+ \*********************************************************************************************************/
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Turkish [tr]
-//! authors : Erhan Gundogan : https://github.com/erhangundogan,
-//! Burak Yiğit Kaya: https://github.com/BYK
+var extd = __webpack_require__(/*! ../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ forEach = extd.forEach,
+ indexOf = extd.indexOf,
+ merge = extd.merge,
+ isString = extd.isString,
+ modifiers = __webpack_require__(/*! ./common */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/compile/common.js").modifiers,
+ constraintMatcher = __webpack_require__(/*! ../constraintMatcher */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/constraintMatcher.js"),
+ parser = __webpack_require__(/*! ../parser */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/index.js");
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+function definedToJs(options) {
+ /*jshint evil:true*/
+ options = isString(options) ? new Function("return " + options + ";")() : options;
+ var ret = ["(function(){"], value;
- //! moment.js locale configuration
+ if (options.hasOwnProperty("constructor") && "function" === typeof options.constructor) {
+ ret.push("var Defined = " + options.constructor.toString() + ";");
+ } else {
+ ret.push("var Defined = function(opts){ for(var i in opts){if(opts.hasOwnProperty(i)){this[i] = opts[i];}}};");
+ }
+ ret.push("var proto = Defined.prototype;");
+ for (var key in options) {
+ if (options.hasOwnProperty(key)) {
+ value = options[key];
+ ret.push("proto." + key + " = " + (extd.isFunction(value) ? value.toString() : extd.format("%j", value)) + ";");
+ }
+ }
+ ret.push("return Defined;");
+ ret.push("}())");
+ return ret.join("");
- var suffixes = {
- 1: "'inci",
- 5: "'inci",
- 8: "'inci",
- 70: "'inci",
- 80: "'inci",
- 2: "'nci",
- 7: "'nci",
- 20: "'nci",
- 50: "'nci",
- 3: "'üncü",
- 4: "'üncü",
- 100: "'üncü",
- 6: "'ncı",
- 9: "'uncu",
- 10: "'uncu",
- 30: "'uncu",
- 60: "'ıncı",
- 90: "'ıncı",
- };
+}
- var tr = moment.defineLocale('tr', {
- months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(
- '_'
- ),
- monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
- weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(
- '_'
- ),
- weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
- weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
- meridiem: function (hours, minutes, isLower) {
- if (hours < 12) {
- return isLower ? 'öö' : 'ÖÖ';
- } else {
- return isLower ? 'ös' : 'ÖS';
+function actionToJs(action, identifiers, defined, scope) {
+ var declares = [], usedVars = {};
+ forEach(identifiers, function (i) {
+ if (action.indexOf(i) !== -1) {
+ usedVars[i] = true;
+ declares.push("var " + i + "= facts." + i + ";");
+ }
+ });
+ extd(defined).keys().forEach(function (i) {
+ if (action.indexOf(i) !== -1 && !usedVars[i]) {
+ usedVars[i] = true;
+ declares.push("var " + i + "= defined." + i + ";");
+ }
+ });
+
+ extd(scope).keys().forEach(function (i) {
+ if (action.indexOf(i) !== -1 && !usedVars[i]) {
+ usedVars[i] = true;
+ declares.push("var " + i + "= scope." + i + ";");
+ }
+ });
+ extd(modifiers).forEach(function (i) {
+ if (action.indexOf(i) !== -1 && !usedVars[i]) {
+ declares.push("var " + i + "= flow." + i + ";");
+ }
+ });
+ var params = ["facts", 'flow'];
+ if (/next\(.*\)/.test(action)) {
+ params.push("next");
+ }
+ action = declares.join("") + action;
+ try {
+ return ["function(", params.join(","), "){", action, "}"].join("");
+ } catch (e) {
+ throw new Error("Invalid action : " + action + "\n" + e.message);
+ }
+}
+
+function parseConstraintModifier(constraint, ret) {
+ if (constraint.length && extd.isString(constraint[0])) {
+ var modifier = constraint[0].match(" *(from)");
+ if (modifier) {
+ modifier = modifier[0];
+ switch (modifier) {
+ case "from":
+ ret.push(', "', constraint.shift(), '"');
+ break;
+ default:
+ throw new Error("Unrecognized modifier " + modifier);
}
- },
- meridiemParse: /öö|ÖÖ|ös|ÖS/,
- isPM: function (input) {
- return input === 'ös' || input === 'ÖS';
- },
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[bugün saat] LT',
- nextDay: '[yarın saat] LT',
- nextWeek: '[gelecek] dddd [saat] LT',
- lastDay: '[dün] LT',
- lastWeek: '[geçen] dddd [saat] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s sonra',
- past: '%s önce',
- s: 'birkaç saniye',
- ss: '%d saniye',
- m: 'bir dakika',
- mm: '%d dakika',
- h: 'bir saat',
- hh: '%d saat',
- d: 'bir gün',
- dd: '%d gün',
- M: 'bir ay',
- MM: '%d ay',
- y: 'bir yıl',
- yy: '%d yıl',
- },
- ordinal: function (number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'Do':
- case 'DD':
- return number;
- default:
- if (number === 0) {
- // special case for zero
- return number + "'ıncı";
- }
- var a = number % 10,
- b = (number % 100) - a,
- c = number >= 100 ? 100 : null;
- return number + (suffixes[a] || suffixes[b] || suffixes[c]);
+ }
+ }
+}
+
+function parseConstraintHash(constraint, ret, identifiers) {
+ if (constraint.length && extd.isHash(constraint[0])) {
+ //ret of options
+ var refs = constraint.shift();
+ extd(refs).values().forEach(function (ident) {
+ if (indexOf(identifiers, ident) === -1) {
+ identifiers.push(ident);
}
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
+ });
+ ret.push(',' + extd.format('%j', [refs]));
+ }
+}
+
+function constraintsToJs(constraint, identifiers) {
+ constraint = constraint.slice(0);
+ var ret = [];
+ if (constraint[0] === "or") {
+ ret.push('["' + constraint.shift() + '"');
+ ret.push(extd.map(constraint,function (c) {
+ return constraintsToJs(c, identifiers);
+ }).join(",") + "]");
+ return ret;
+ } else if (constraint[0] === "not" || constraint[0] === "exists") {
+ ret.push('"', constraint.shift(), '", ');
+ }
+ identifiers.push(constraint[1]);
+ ret.push(constraint[0], ', "' + constraint[1].replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + '"');
+ constraint.splice(0, 2);
+ if (constraint.length) {
+ //constraint
+ var c = constraint.shift();
+ if (extd.isString(c) && c) {
+ ret.push(',"' + c.replace(/\\/g, "\\\\").replace(/"/g, "\\\""), '"');
+ forEach(constraintMatcher.getIdentifiers(parser.parseConstraint(c)), function (i) {
+ identifiers.push(i);
+ });
+ } else {
+ ret.push(',"true"');
+ constraint.unshift(c);
+ }
+ }
+ parseConstraintModifier(constraint, ret);
+ parseConstraintHash(constraint, ret, identifiers);
+ return '[' + ret.join("") + ']';
+}
+
+exports.transpile = function (flowObj, options) {
+ options = options || {};
+ var ret = [];
+ ret.push("(function(){");
+ ret.push("return function(options){");
+ ret.push("options = options || {};");
+ ret.push("var bind = function(scope, fn){return function(){return fn.apply(scope, arguments);};}, defined = {Array: Array, String: String, Number: Number, Boolean: Boolean, RegExp: RegExp, Date: Date, Object: Object}, scope = options.scope || {};");
+ ret.push("var optDefined = options.defined || {}; for(var i in optDefined){defined[i] = optDefined[i];}");
+ var defined = merge({Array: Array, String: String, Number: Number, Boolean: Boolean, RegExp: RegExp, Date: Date, Object: Object}, options.define || {});
+ if (typeof Buffer !== "undefined") {
+ defined.Buffer = Buffer;
+ }
+ var scope = merge({console: console}, options.scope);
+ ret.push(["return nools.flow('", options.name, "', function(){"].join(""));
+ //add any defined classes in the parsed flowObj to defined
+ ret.push(extd(flowObj.define || []).map(function (defined) {
+ var name = defined.name;
+ defined[name] = {};
+ return ["var", name, "= defined." + name, "= this.addDefined('" + name + "',", definedToJs(defined.properties) + ");"].join(" ");
+ }).value().join("\n"));
+ ret.push(extd(flowObj.scope || []).map(function (s) {
+ var name = s.name;
+ scope[name] = {};
+ return ["var", name, "= scope." + name, "= ", s.body, ";"].join(" ");
+ }).value().join("\n"));
+ ret.push("scope.console = console;\n");
+
+
+ ret.push(extd(flowObj.rules || []).map(function (rule) {
+ var identifiers = [], ret = ["this.rule('", rule.name.replace(/'/g, "\\'"), "'"], options = extd.merge(rule.options || {}, {scope: "scope"});
+ ret.push(",", extd.format("%j", [options]).replace(/(:"scope")/, ":scope"));
+ if (rule.constraints && !extd.isEmpty(rule.constraints)) {
+ ret.push(", [");
+ ret.push(extd(rule.constraints).map(function (c) {
+ return constraintsToJs(c, identifiers);
+ }).value().join(","));
+ ret.push("]");
+ }
+ ret.push(",", actionToJs(rule.action, identifiers, defined, scope));
+ ret.push(");");
+ return ret.join("");
+ }).value().join(""));
+ ret.push("});");
+ ret.push("};");
+ ret.push("}());");
+ return ret.join("");
+};
+
+
+
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/conflict.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/conflict.js ***!
+ \************************************************************************************************/
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
+
+var map = __webpack_require__(/*! ./extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js").map;
+
+function salience(a, b) {
+ return a.rule.priority - b.rule.priority;
+}
+
+function bucketCounter(a, b) {
+ return a.counter - b.counter;
+}
+
+function factRecency(a, b) {
+ /*jshint noempty: false*/
+
+ var i = 0;
+ var aMatchRecency = a.match.recency,
+ bMatchRecency = b.match.recency, aLength = aMatchRecency.length - 1, bLength = bMatchRecency.length - 1;
+ while (aMatchRecency[i] === bMatchRecency[i] && i < aLength && i < bLength && i++) {
+ }
+ var ret = aMatchRecency[i] - bMatchRecency[i];
+ if (!ret) {
+ ret = aLength - bLength;
+ }
+ return ret;
+}
+
+function activationRecency(a, b) {
+ return a.recency - b.recency;
+}
+
+var strategies = {
+ salience: salience,
+ bucketCounter: bucketCounter,
+ factRecency: factRecency,
+ activationRecency: activationRecency
+};
+
+exports.strategies = strategies;
+exports.strategy = function (strats) {
+ strats = map(strats, function (s) {
+ return strategies[s];
});
+ var stratsLength = strats.length;
- return tr;
+ return function (a, b) {
+ var i = -1, ret = 0;
+ var equal = (a === b) || (a.name === b.name && a.hashCode === b.hashCode);
+ if (!equal) {
+ while (++i < stratsLength && !ret) {
+ ret = strats[i](a, b);
+ }
+ ret = ret > 0 ? 1 : -1;
+ }
+ return ret;
+ };
+};
-})));
+/***/ }),
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/constraint.js":
+/*!**************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/constraint.js ***!
+ \**************************************************************************************************/
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
-/***/ }),
+"use strict";
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tzl.js":
-/*!****************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tzl.js ***!
- \****************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
-//! moment.js locale configuration
-//! locale : Talossan [tzl]
-//! author : Robin van der Vliet : https://github.com/robin0van0der0v
-//! author : Iustì Canun
+var extd = __webpack_require__(/*! ./extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ deepEqual = extd.deepEqual,
+ merge = extd.merge,
+ instanceOf = extd.instanceOf,
+ filter = extd.filter,
+ declare = extd.declare,
+ constraintMatcher;
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+var id = 0;
+var Constraint = declare({
- //! moment.js locale configuration
+ type: null,
- // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
- // This is currently too difficult (maybe even impossible) to add.
- var tzl = moment.defineLocale('tzl', {
- months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(
- '_'
- ),
- monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
- weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
- weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
- weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
- longDateFormat: {
- LT: 'HH.mm',
- LTS: 'HH.mm.ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM [dallas] YYYY',
- LLL: 'D. MMMM [dallas] YYYY HH.mm',
- LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',
- },
- meridiemParse: /d\'o|d\'a/i,
- isPM: function (input) {
- return "d'o" === input.toLowerCase();
- },
- meridiem: function (hours, minutes, isLower) {
- if (hours > 11) {
- return isLower ? "d'o" : "D'O";
- } else {
- return isLower ? "d'a" : "D'A";
+ instance: {
+ constructor: function (constraint) {
+ if (!constraintMatcher) {
+ constraintMatcher = __webpack_require__(/*! ./constraintMatcher */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/constraintMatcher.js");
}
+ this.id = id++;
+ this.constraint = constraint;
+ extd.bindAll(this, ["assert"]);
},
- calendar: {
- sameDay: '[oxhi à] LT',
- nextDay: '[demà à] LT',
- nextWeek: 'dddd [à] LT',
- lastDay: '[ieiri à] LT',
- lastWeek: '[sür el] dddd [lasteu à] LT',
- sameElse: 'L',
+ "assert": function () {
+ throw new Error("not implemented");
},
- relativeTime: {
- future: 'osprei %s',
- past: 'ja%s',
- s: processRelativeTime,
- ss: processRelativeTime,
- m: processRelativeTime,
- mm: processRelativeTime,
- h: processRelativeTime,
- hh: processRelativeTime,
- d: processRelativeTime,
- dd: processRelativeTime,
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime,
+
+ getIndexableProperties: function () {
+ return [];
},
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
+
+ equal: function (constraint) {
+ return instanceOf(constraint, this._static) && this.get("alias") === constraint.get("alias") && extd.deepEqual(this.constraint, constraint.constraint);
},
- });
- function processRelativeTime(number, withoutSuffix, key, isFuture) {
- var format = {
- s: ['viensas secunds', "'iensas secunds"],
- ss: [number + ' secunds', '' + number + ' secunds'],
- m: ["'n míut", "'iens míut"],
- mm: [number + ' míuts', '' + number + ' míuts'],
- h: ["'n þora", "'iensa þora"],
- hh: [number + ' þoras', '' + number + ' þoras'],
- d: ["'n ziua", "'iensa ziua"],
- dd: [number + ' ziuas', '' + number + ' ziuas'],
- M: ["'n mes", "'iens mes"],
- MM: [number + ' mesen', '' + number + ' mesen'],
- y: ["'n ar", "'iens ar"],
- yy: [number + ' ars', '' + number + ' ars'],
- };
- return isFuture
- ? format[key][0]
- : withoutSuffix
- ? format[key][0]
- : format[key][1];
+ getters: {
+ variables: function () {
+ return [this.get("alias")];
+ }
+ }
+
+
}
+});
- return tzl;
+Constraint.extend({
+ instance: {
-})));
+ type: "object",
+ constructor: function (type) {
+ this._super([type]);
+ },
-/***/ }),
+ "assert": function (param) {
+ return param instanceof this.constraint || param.constructor === this.constraint;
+ },
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tzm-latn.js":
-/*!*********************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tzm-latn.js ***!
- \*********************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ equal: function (constraint) {
+ return instanceOf(constraint, this._static) && this.constraint === constraint.constraint;
+ }
+ }
+}).as(exports, "ObjectConstraint");
-//! moment.js locale configuration
-//! locale : Central Atlas Tamazight Latin [tzm-latn]
-//! author : Abdel Said : https://github.com/abdelsaid
+var EqualityConstraint = Constraint.extend({
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ instance: {
- //! moment.js locale configuration
+ type: "equality",
- var tzmLatn = moment.defineLocale('tzm-latn', {
- months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
- '_'
- ),
- monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(
- '_'
- ),
- weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
- weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
- weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[asdkh g] LT',
- nextDay: '[aska g] LT',
- nextWeek: 'dddd [g] LT',
- lastDay: '[assant g] LT',
- lastWeek: 'dddd [g] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'dadkh s yan %s',
- past: 'yan %s',
- s: 'imik',
- ss: '%d imik',
- m: 'minuḍ',
- mm: '%d minuḍ',
- h: 'saɛa',
- hh: '%d tassaɛin',
- d: 'ass',
- dd: '%d ossan',
- M: 'ayowr',
- MM: '%d iyyirn',
- y: 'asgas',
- yy: '%d isgasn',
+ constructor: function (constraint, options) {
+ this._super([constraint]);
+ options = options || {};
+ this.pattern = options.pattern;
+ this._matcher = constraintMatcher.getMatcher(constraint, options, true);
},
- week: {
- dow: 6, // Saturday is the first day of the week.
- doy: 12, // The week that contains Jan 12th is the first week of the year.
+
+ "assert": function (values) {
+ return this._matcher(values);
+ }
+ }
+}).as(exports, "EqualityConstraint");
+
+EqualityConstraint.extend({instance: {type: "inequality"}}).as(exports, "InequalityConstraint");
+EqualityConstraint.extend({instance: {type: "comparison"}}).as(exports, "ComparisonConstraint");
+
+Constraint.extend({
+
+ instance: {
+
+ type: "equality",
+
+ constructor: function () {
+ this._super([
+ [true]
+ ]);
},
- });
- return tzmLatn;
+ equal: function (constraint) {
+ return instanceOf(constraint, this._static) && this.get("alias") === constraint.get("alias");
+ },
-})));
+ "assert": function () {
+ return true;
+ }
+ }
+}).as(exports, "TrueConstraint");
-/***/ }),
+var ReferenceConstraint = Constraint.extend({
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tzm.js":
-/*!****************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tzm.js ***!
- \****************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ instance: {
-//! moment.js locale configuration
-//! locale : Central Atlas Tamazight [tzm]
-//! author : Abdel Said : https://github.com/abdelsaid
+ type: "reference",
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ constructor: function (constraint, options) {
+ this.cache = {};
+ this._super([constraint]);
+ options = options || {};
+ this.values = [];
+ this.pattern = options.pattern;
+ this._options = options;
+ this._matcher = constraintMatcher.getMatcher(constraint, options, false);
+ },
- //! moment.js locale configuration
+ "assert": function (fact, fh) {
+ try {
+ return this._matcher(fact, fh);
+ } catch (e) {
+ throw new Error("Error with evaluating pattern " + this.pattern + " " + e.message);
+ }
- var tzm = moment.defineLocale('tzm', {
- months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
- '_'
- ),
- monthsShort: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(
- '_'
- ),
- weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
- weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
- weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm',
},
- calendar: {
- sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
- nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
- nextWeek: 'dddd [ⴴ] LT',
- lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
- lastWeek: 'dddd [ⴴ] LT',
- sameElse: 'L',
+
+ merge: function (that) {
+ var ret = this;
+ if (that instanceof ReferenceConstraint) {
+ ret = new this._static([this.constraint, that.constraint, "and"], merge({}, this._options, this._options));
+ ret._alias = this._alias || that._alias;
+ ret.vars = this.vars.concat(that.vars);
+ }
+ return ret;
},
- relativeTime: {
- future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
- past: 'ⵢⴰⵏ %s',
- s: 'ⵉⵎⵉⴽ',
- ss: '%d ⵉⵎⵉⴽ',
- m: 'ⵎⵉⵏⵓⴺ',
- mm: '%d ⵎⵉⵏⵓⴺ',
- h: 'ⵙⴰⵄⴰ',
- hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
- d: 'ⴰⵙⵙ',
- dd: '%d oⵙⵙⴰⵏ',
- M: 'ⴰⵢoⵓⵔ',
- MM: '%d ⵉⵢⵢⵉⵔⵏ',
- y: 'ⴰⵙⴳⴰⵙ',
- yy: '%d ⵉⵙⴳⴰⵙⵏ',
+
+ equal: function (constraint) {
+ return instanceOf(constraint, this._static) && extd.deepEqual(this.constraint, constraint.constraint);
},
- week: {
- dow: 6, // Saturday is the first day of the week.
- doy: 12, // The week that contains Jan 12th is the first week of the year.
+
+
+ getters: {
+ variables: function () {
+ return this.vars;
+ },
+
+ alias: function () {
+ return this._alias;
+ }
},
- });
- return tzm;
+ setters: {
+ alias: function (alias) {
+ this._alias = alias;
+ this.vars = filter(constraintMatcher.getIdentifiers(this.constraint), function (v) {
+ return v !== alias;
+ });
+ }
+ }
+ }
-})));
+}).as(exports, "ReferenceConstraint");
-/***/ }),
+ReferenceConstraint.extend({
+ instance: {
+ type: "reference_equality",
+ op: "eq",
+ getIndexableProperties: function () {
+ return constraintMatcher.getIndexableProperties(this.constraint);
+ }
+ }
+}).as(exports, "ReferenceEqualityConstraint")
+ .extend({instance: {type: "reference_inequality", op: "neq"}}).as(exports, "ReferenceInequalityConstraint")
+ .extend({instance: {type: "reference_gt", op: "gt"}}).as(exports, "ReferenceGTConstraint")
+ .extend({instance: {type: "reference_gte", op: "gte"}}).as(exports, "ReferenceGTEConstraint")
+ .extend({instance: {type: "reference_lt", op: "lt"}}).as(exports, "ReferenceLTConstraint")
+ .extend({instance: {type: "reference_lte", op: "lte"}}).as(exports, "ReferenceLTEConstraint");
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ug-cn.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ug-cn.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
-//! moment.js language configuration
-//! locale : Uyghur (China) [ug-cn]
-//! author: boyaq : https://github.com/boyaq
+Constraint.extend({
+ instance: {
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ type: "hash",
- //! moment.js language configuration
+ constructor: function (hash) {
+ this._super([hash]);
+ },
- var ugCn = moment.defineLocale('ug-cn', {
- months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
- '_'
- ),
- monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(
- '_'
- ),
- weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(
- '_'
- ),
- weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
- weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',
- LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
- LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',
+ equal: function (constraint) {
+ return extd.instanceOf(constraint, this._static) && this.get("alias") === constraint.get("alias") && extd.deepEqual(this.constraint, constraint.constraint);
},
- meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (
- meridiem === 'يېرىم كېچە' ||
- meridiem === 'سەھەر' ||
- meridiem === 'چۈشتىن بۇرۇن'
- ) {
- return hour;
- } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {
- return hour + 12;
- } else {
- return hour >= 11 ? hour : hour + 12;
- }
+
+ "assert": function () {
+ return true;
},
- meridiem: function (hour, minute, isLower) {
- var hm = hour * 100 + minute;
- if (hm < 600) {
- return 'يېرىم كېچە';
- } else if (hm < 900) {
- return 'سەھەر';
- } else if (hm < 1130) {
- return 'چۈشتىن بۇرۇن';
- } else if (hm < 1230) {
- return 'چۈش';
- } else if (hm < 1800) {
- return 'چۈشتىن كېيىن';
- } else {
- return 'كەچ';
+
+ getters: {
+ variables: function () {
+ return this.constraint;
}
+ }
+
+ }
+}).as(exports, "HashConstraint");
+
+Constraint.extend({
+ instance: {
+ constructor: function (constraints, options) {
+ this.type = "from";
+ this.constraints = constraintMatcher.getSourceMatcher(constraints, (options || {}), true);
+ extd.bindAll(this, ["assert"]);
},
- calendar: {
- sameDay: '[بۈگۈن سائەت] LT',
- nextDay: '[ئەتە سائەت] LT',
- nextWeek: '[كېلەركى] dddd [سائەت] LT',
- lastDay: '[تۆنۈگۈن] LT',
- lastWeek: '[ئالدىنقى] dddd [سائەت] LT',
- sameElse: 'L',
+
+ equal: function (constraint) {
+ return instanceOf(constraint, this._static) && this.get("alias") === constraint.get("alias") && deepEqual(this.constraints, constraint.constraints);
},
- relativeTime: {
- future: '%s كېيىن',
- past: '%s بۇرۇن',
- s: 'نەچچە سېكونت',
- ss: '%d سېكونت',
- m: 'بىر مىنۇت',
- mm: '%d مىنۇت',
- h: 'بىر سائەت',
- hh: '%d سائەت',
- d: 'بىر كۈن',
- dd: '%d كۈن',
- M: 'بىر ئاي',
- MM: '%d ئاي',
- y: 'بىر يىل',
- yy: '%d يىل',
+
+ "assert": function (fact, fh) {
+ return this.constraints(fact, fh);
},
- dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,
- ordinal: function (number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return number + '-كۈنى';
- case 'w':
- case 'W':
- return number + '-ھەپتە';
- default:
- return number;
+ getters: {
+ variables: function () {
+ return this.constraint;
}
+ }
+
+ }
+}).as(exports, "FromConstraint");
+
+Constraint.extend({
+ instance: {
+ constructor: function (func, options) {
+ this.type = "custom";
+ this.fn = func;
+ this.options = options;
+ extd.bindAll(this, ["assert"]);
},
- preparse: function (string) {
- return string.replace(/،/g, ',');
- },
- postformat: function (string) {
- return string.replace(/,/g, '،');
- },
- week: {
- // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 1st is the first week of the year.
+
+ equal: function (constraint) {
+ return instanceOf(constraint, this._static) && this.fn === constraint.constraint;
},
- });
- return ugCn;
+ "assert": function (fact, fh) {
+ return this.fn(fact, fh);
+ }
+ }
+}).as(exports, "CustomConstraint");
+
-})));
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/uk.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/uk.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/constraintMatcher.js":
+/*!*********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/constraintMatcher.js ***!
+ \*********************************************************************************************************/
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Ukrainian [uk]
-//! author : zemlanin : https://github.com/zemlanin
-//! Author : Menelion Elensúle : https://github.com/Oire
+"use strict";
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
- //! moment.js locale configuration
+var extd = __webpack_require__(/*! ./extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ isArray = extd.isArray,
+ forEach = extd.forEach,
+ some = extd.some,
+ indexOf = extd.indexOf,
+ isNumber = extd.isNumber,
+ removeDups = extd.removeDuplicates,
+ atoms = __webpack_require__(/*! ./constraint */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/constraint.js");
- function plural(word, num) {
- var forms = word.split('_');
- return num % 10 === 1 && num % 100 !== 11
- ? forms[0]
- : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
- ? forms[1]
- : forms[2];
+function getProps(val) {
+ return extd(val).map(function mapper(val) {
+ return isArray(val) ? isArray(val[0]) ? getProps(val).value() : val.reverse().join(".") : val;
+ }).flatten().filter(function (v) {
+ return !!v;
+ });
+}
+
+var definedFuncs = {
+ indexOf: extd.indexOf,
+ now: function () {
+ return new Date();
+ },
+
+ Date: function (y, m, d, h, min, s, ms) {
+ var date = new Date();
+ if (isNumber(y)) {
+ date.setYear(y);
+ }
+ if (isNumber(m)) {
+ date.setMonth(m);
+ }
+ if (isNumber(d)) {
+ date.setDate(d);
+ }
+ if (isNumber(h)) {
+ date.setHours(h);
+ }
+ if (isNumber(min)) {
+ date.setMinutes(min);
+ }
+ if (isNumber(s)) {
+ date.setSeconds(s);
+ }
+ if (isNumber(ms)) {
+ date.setMilliseconds(ms);
+ }
+ return date;
+ },
+
+ lengthOf: function (arr, length) {
+ return arr.length === length;
+ },
+
+ isTrue: function (val) {
+ return val === true;
+ },
+
+ isFalse: function (val) {
+ return val === false;
+ },
+
+ isNotNull: function (actual) {
+ return actual !== null;
+ },
+
+ dateCmp: function (dt1, dt2) {
+ return extd.compare(dt1, dt2);
}
- function relativeTimeWithPlural(number, withoutSuffix, key) {
- var format = {
- ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
- mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
- hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
- dd: 'день_дні_днів',
- MM: 'місяць_місяці_місяців',
- yy: 'рік_роки_років',
- };
- if (key === 'm') {
- return withoutSuffix ? 'хвилина' : 'хвилину';
- } else if (key === 'h') {
- return withoutSuffix ? 'година' : 'годину';
+
+};
+
+forEach(["years", "days", "months", "hours", "minutes", "seconds"], function (k) {
+ definedFuncs[k + "FromNow"] = extd[k + "FromNow"];
+ definedFuncs[k + "Ago"] = extd[k + "Ago"];
+});
+
+
+forEach(["isArray", "isNumber", "isHash", "isObject", "isDate", "isBoolean", "isString", "isRegExp", "isNull", "isEmpty",
+ "isUndefined", "isDefined", "isUndefinedOrNull", "isPromiseLike", "isFunction", "deepEqual"], function (k) {
+ var m = extd[k];
+ definedFuncs[k] = function () {
+ return m.apply(extd, arguments);
+ };
+});
+
+
+var lang = {
+
+ equal: function (c1, c2) {
+ var ret = false;
+ if (c1 === c2) {
+ ret = true;
} else {
- return number + ' ' + plural(format[key], +number);
+ if (c1[2] === c2[2]) {
+ if (indexOf(["string", "number", "boolean", "regexp", "identifier", "null"], c1[2]) !== -1) {
+ ret = c1[0] === c2[0];
+ } else if (c1[2] === "unary" || c1[2] === "logicalNot") {
+ ret = this.equal(c1[0], c2[0]);
+ } else {
+ ret = this.equal(c1[0], c2[0]) && this.equal(c1[1], c2[1]);
+ }
+ }
}
- }
- function weekdaysCaseReplace(m, format) {
- var weekdays = {
- nominative: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(
- '_'
- ),
- accusative: 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(
- '_'
- ),
- genitive: 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(
- '_'
- ),
- },
- nounCase;
+ return ret;
+ },
- if (m === true) {
- return weekdays['nominative']
- .slice(1, 7)
- .concat(weekdays['nominative'].slice(0, 1));
+ __getProperties: function (rule) {
+ var ret = [];
+ if (rule) {
+ var rule2 = rule[2];
+ if (!rule2) {
+ return ret;
+ }
+ if (rule2 !== "prop" &&
+ rule2 !== "identifier" &&
+ rule2 !== "string" &&
+ rule2 !== "number" &&
+ rule2 !== "boolean" &&
+ rule2 !== "regexp" &&
+ rule2 !== "unary" &&
+ rule2 !== "unary") {
+ ret[0] = this.__getProperties(rule[0]);
+ ret[1] = this.__getProperties(rule[1]);
+ } else if (rule2 === "identifier") {
+ //at the bottom
+ ret = [rule[0]];
+ } else {
+ ret = lang.__getProperties(rule[1]).concat(lang.__getProperties(rule[0]));
+ }
}
- if (!m) {
- return weekdays['nominative'];
+ return ret;
+ },
+
+ getIndexableProperties: function (rule) {
+ if (rule[2] === "composite") {
+ return this.getIndexableProperties(rule[0]);
+ } else if (/^(\w+(\['[^']*'])*) *([!=]==?|[<>]=?) (\w+(\['[^']*'])*)$/.test(this.parse(rule))) {
+ return getProps(this.__getProperties(rule)).flatten().value();
+ } else {
+ return [];
}
+ },
- nounCase = /(\[[ВвУу]\]) ?dddd/.test(format)
- ? 'accusative'
- : /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format)
- ? 'genitive'
- : 'nominative';
- return weekdays[nounCase][m.day()];
- }
- function processHoursFunction(str) {
- return function () {
- return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
- };
- }
+ getIdentifiers: function (rule) {
+ var ret = [];
+ var rule2 = rule[2];
- var uk = moment.defineLocale('uk', {
- months: {
- format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(
- '_'
- ),
- standalone: 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(
- '_'
- ),
- },
- monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(
- '_'
- ),
- weekdays: weekdaysCaseReplace,
- weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
- weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY р.',
- LLL: 'D MMMM YYYY р., HH:mm',
- LLLL: 'dddd, D MMMM YYYY р., HH:mm',
- },
- calendar: {
- sameDay: processHoursFunction('[Сьогодні '),
- nextDay: processHoursFunction('[Завтра '),
- lastDay: processHoursFunction('[Вчора '),
- nextWeek: processHoursFunction('[У] dddd ['),
- lastWeek: function () {
- switch (this.day()) {
- case 0:
- case 3:
- case 5:
- case 6:
- return processHoursFunction('[Минулої] dddd [').call(this);
- case 1:
- case 2:
- case 4:
- return processHoursFunction('[Минулого] dddd [').call(this);
+ if (rule2 === "identifier") {
+ //its an identifier so stop
+ return [rule[0]];
+ } else if (rule2 === "function") {
+ ret = ret.concat(this.getIdentifiers(rule[0])).concat(this.getIdentifiers(rule[1]));
+ } else if (rule2 !== "string" &&
+ rule2 !== "number" &&
+ rule2 !== "boolean" &&
+ rule2 !== "regexp" &&
+ rule2 !== "unary" &&
+ rule2 !== "unary") {
+ //its an expression so keep going
+ if (rule2 === "prop") {
+ ret = ret.concat(this.getIdentifiers(rule[0]));
+ if (rule[1]) {
+ var propChain = rule[1];
+ //go through the member variables and collect any identifiers that may be in functions
+ while (isArray(propChain)) {
+ if (propChain[2] === "function") {
+ ret = ret.concat(this.getIdentifiers(propChain[1]));
+ break;
+ } else {
+ propChain = propChain[1];
+ }
+ }
}
- },
- sameElse: 'L',
- },
- relativeTime: {
- future: 'за %s',
- past: '%s тому',
- s: 'декілька секунд',
- ss: relativeTimeWithPlural,
- m: relativeTimeWithPlural,
- mm: relativeTimeWithPlural,
- h: 'годину',
- hh: relativeTimeWithPlural,
- d: 'день',
- dd: relativeTimeWithPlural,
- M: 'місяць',
- MM: relativeTimeWithPlural,
- y: 'рік',
- yy: relativeTimeWithPlural,
- },
- // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
- meridiemParse: /ночі|ранку|дня|вечора/,
- isPM: function (input) {
- return /^(дня|вечора)$/.test(input);
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 4) {
- return 'ночі';
- } else if (hour < 12) {
- return 'ранку';
- } else if (hour < 17) {
- return 'дня';
+
} else {
- return 'вечора';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
- ordinal: function (number, period) {
- switch (period) {
- case 'M':
- case 'd':
- case 'DDD':
- case 'w':
- case 'W':
- return number + '-й';
- case 'D':
- return number + '-го';
- default:
- return number;
+ if (rule[0]) {
+ ret = ret.concat(this.getIdentifiers(rule[0]));
+ }
+ if (rule[1]) {
+ ret = ret.concat(this.getIdentifiers(rule[1]));
+ }
}
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
-
- return uk;
+ }
+ //remove dups and return
+ return removeDups(ret);
+ },
-})));
+ toConstraints: function (rule, options) {
+ var ret = [],
+ alias = options.alias,
+ scope = options.scope || {};
+ var rule2 = rule[2];
-/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ur.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ur.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ if (rule2 === "and") {
+ ret = ret.concat(this.toConstraints(rule[0], options)).concat(this.toConstraints(rule[1], options));
+ } else if (
+ rule2 === "composite" ||
+ rule2 === "or" ||
+ rule2 === "lt" ||
+ rule2 === "gt" ||
+ rule2 === "lte" ||
+ rule2 === "gte" ||
+ rule2 === "like" ||
+ rule2 === "notLike" ||
+ rule2 === "eq" ||
+ rule2 === "neq" ||
+ rule2 === "seq" ||
+ rule2 === "sneq" ||
+ rule2 === "in" ||
+ rule2 === "notIn" ||
+ rule2 === "prop" ||
+ rule2 === "propLookup" ||
+ rule2 === "function" ||
+ rule2 === "logicalNot") {
+ var isReference = some(this.getIdentifiers(rule), function (i) {
+ return i !== alias && !(i in definedFuncs) && !(i in scope);
+ });
+ switch (rule2) {
+ case "eq":
+ ret.push(new atoms[isReference ? "ReferenceEqualityConstraint" : "EqualityConstraint"](rule, options));
+ break;
+ case "seq":
+ ret.push(new atoms[isReference ? "ReferenceEqualityConstraint" : "EqualityConstraint"](rule, options));
+ break;
+ case "neq":
+ ret.push(new atoms[isReference ? "ReferenceInequalityConstraint" : "InequalityConstraint"](rule, options));
+ break;
+ case "sneq":
+ ret.push(new atoms[isReference ? "ReferenceInequalityConstraint" : "InequalityConstraint"](rule, options));
+ break;
+ case "gt":
+ ret.push(new atoms[isReference ? "ReferenceGTConstraint" : "ComparisonConstraint"](rule, options));
+ break;
+ case "gte":
+ ret.push(new atoms[isReference ? "ReferenceGTEConstraint" : "ComparisonConstraint"](rule, options));
+ break;
+ case "lt":
+ ret.push(new atoms[isReference ? "ReferenceLTConstraint" : "ComparisonConstraint"](rule, options));
+ break;
+ case "lte":
+ ret.push(new atoms[isReference ? "ReferenceLTEConstraint" : "ComparisonConstraint"](rule, options));
+ break;
+ default:
+ ret.push(new atoms[isReference ? "ReferenceConstraint" : "ComparisonConstraint"](rule, options));
+ }
-//! moment.js locale configuration
-//! locale : Urdu [ur]
-//! author : Sawood Alam : https://github.com/ibnesayeed
-//! author : Zack : https://github.com/ZackVision
+ }
+ return ret;
+ },
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
- //! moment.js locale configuration
+ parse: function (rule) {
+ return this[rule[2]](rule[0], rule[1]);
+ },
- var months = [
- 'جنوری',
- 'فروری',
- 'مارچ',
- 'اپریل',
- 'مئی',
- 'جون',
- 'جولائی',
- 'اگست',
- 'ستمبر',
- 'اکتوبر',
- 'نومبر',
- 'دسمبر',
- ],
- days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];
+ composite: function (lhs) {
+ return this.parse(lhs);
+ },
- var ur = moment.defineLocale('ur', {
- months: months,
- monthsShort: months,
- weekdays: days,
- weekdaysShort: days,
- weekdaysMin: days,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd، D MMMM YYYY HH:mm',
- },
- meridiemParse: /صبح|شام/,
- isPM: function (input) {
- return 'شام' === input;
- },
- meridiem: function (hour, minute, isLower) {
- if (hour < 12) {
- return 'صبح';
- }
- return 'شام';
- },
- calendar: {
- sameDay: '[آج بوقت] LT',
- nextDay: '[کل بوقت] LT',
- nextWeek: 'dddd [بوقت] LT',
- lastDay: '[گذشتہ روز بوقت] LT',
- lastWeek: '[گذشتہ] dddd [بوقت] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s بعد',
- past: '%s قبل',
- s: 'چند سیکنڈ',
- ss: '%d سیکنڈ',
- m: 'ایک منٹ',
- mm: '%d منٹ',
- h: 'ایک گھنٹہ',
- hh: '%d گھنٹے',
- d: 'ایک دن',
- dd: '%d دن',
- M: 'ایک ماہ',
- MM: '%d ماہ',
- y: 'ایک سال',
- yy: '%d سال',
- },
- preparse: function (string) {
- return string.replace(/،/g, ',');
- },
- postformat: function (string) {
- return string.replace(/,/g, '،');
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+ and: function (lhs, rhs) {
+ return ["(", this.parse(lhs), "&&", this.parse(rhs), ")"].join(" ");
+ },
- return ur;
+ or: function (lhs, rhs) {
+ return ["(", this.parse(lhs), "||", this.parse(rhs), ")"].join(" ");
+ },
-})));
+ prop: function (name, prop) {
+ if (prop[2] === "function") {
+ return [this.parse(name), this.parse(prop)].join(".");
+ } else {
+ return [this.parse(name), "['", this.parse(prop), "']"].join("");
+ }
+ },
+ propLookup: function (name, prop) {
+ if (prop[2] === "function") {
+ return [this.parse(name), this.parse(prop)].join(".");
+ } else {
+ return [this.parse(name), "[", this.parse(prop), "]"].join("");
+ }
+ },
-/***/ }),
+ unary: function (lhs) {
+ return -1 * this.parse(lhs);
+ },
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/uz-latn.js":
-/*!********************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/uz-latn.js ***!
- \********************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ plus: function (lhs, rhs) {
+ return [this.parse(lhs), "+", this.parse(rhs)].join(" ");
+ },
+ minus: function (lhs, rhs) {
+ return [this.parse(lhs), "-", this.parse(rhs)].join(" ");
+ },
-//! moment.js locale configuration
-//! locale : Uzbek Latin [uz-latn]
-//! author : Rasulbek Mirzayev : github.com/Rasulbeeek
+ mult: function (lhs, rhs) {
+ return [this.parse(lhs), "*", this.parse(rhs)].join(" ");
+ },
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ div: function (lhs, rhs) {
+ return [this.parse(lhs), "/", this.parse(rhs)].join(" ");
+ },
- //! moment.js locale configuration
+ mod: function (lhs, rhs) {
+ return [this.parse(lhs), "%", this.parse(rhs)].join(" ");
+ },
- var uzLatn = moment.defineLocale('uz-latn', {
- months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(
- '_'
- ),
- monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
- weekdays: 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(
- '_'
- ),
- weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
- weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'D MMMM YYYY, dddd HH:mm',
- },
- calendar: {
- sameDay: '[Bugun soat] LT [da]',
- nextDay: '[Ertaga] LT [da]',
- nextWeek: 'dddd [kuni soat] LT [da]',
- lastDay: '[Kecha soat] LT [da]',
- lastWeek: "[O'tgan] dddd [kuni soat] LT [da]",
- sameElse: 'L',
- },
- relativeTime: {
- future: 'Yaqin %s ichida',
- past: 'Bir necha %s oldin',
- s: 'soniya',
- ss: '%d soniya',
- m: 'bir daqiqa',
- mm: '%d daqiqa',
- h: 'bir soat',
- hh: '%d soat',
- d: 'bir kun',
- dd: '%d kun',
- M: 'bir oy',
- MM: '%d oy',
- y: 'bir yil',
- yy: '%d yil',
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 7th is the first week of the year.
- },
- });
+ lt: function (lhs, rhs) {
+ return [this.parse(lhs), "<", this.parse(rhs)].join(" ");
+ },
+ gt: function (lhs, rhs) {
+ return [this.parse(lhs), ">", this.parse(rhs)].join(" ");
+ },
+ lte: function (lhs, rhs) {
+ return [this.parse(lhs), "<=", this.parse(rhs)].join(" ");
+ },
+ gte: function (lhs, rhs) {
+ return [this.parse(lhs), ">=", this.parse(rhs)].join(" ");
+ },
+ like: function (lhs, rhs) {
+ return [this.parse(rhs), ".test(", this.parse(lhs), ")"].join("");
+ },
+ notLike: function (lhs, rhs) {
+ return ["!", this.parse(rhs), ".test(", this.parse(lhs), ")"].join("");
+ },
+ eq: function (lhs, rhs) {
+ return [this.parse(lhs), "==", this.parse(rhs)].join(" ");
+ },
- return uzLatn;
+ seq: function (lhs, rhs) {
+ return [this.parse(lhs), "===", this.parse(rhs)].join(" ");
+ },
-})));
+ neq: function (lhs, rhs) {
+ return [this.parse(lhs), "!=", this.parse(rhs)].join(" ");
+ },
+ sneq: function (lhs, rhs) {
+ return [this.parse(lhs), "!==", this.parse(rhs)].join(" ");
+ },
-/***/ }),
+ "in": function (lhs, rhs) {
+ return ["(indexOf(", this.parse(rhs), ",", this.parse(lhs), ")) != -1"].join("");
+ },
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/uz.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/uz.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ "notIn": function (lhs, rhs) {
+ return ["(indexOf(", this.parse(rhs), ",", this.parse(lhs), ")) == -1"].join("");
+ },
-//! moment.js locale configuration
-//! locale : Uzbek [uz]
-//! author : Sardor Muminov : https://github.com/muminoff
+ "arguments": function (lhs, rhs) {
+ var ret = [];
+ if (lhs) {
+ ret.push(this.parse(lhs));
+ }
+ if (rhs) {
+ ret.push(this.parse(rhs));
+ }
+ return ret.join(",");
+ },
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ "array": function (lhs) {
+ var args = [];
+ if (lhs) {
+ args = this.parse(lhs);
+ if (isArray(args)) {
+ return args;
+ } else {
+ return ["[", args, "]"].join("");
+ }
+ }
+ return ["[", args.join(","), "]"].join("");
+ },
- //! moment.js locale configuration
+ "function": function (lhs, rhs) {
+ var args = this.parse(rhs);
+ return [this.parse(lhs), "(", args, ")"].join("");
+ },
- var uz = moment.defineLocale('uz', {
- months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(
- '_'
- ),
- monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
- weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
- weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
- weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'D MMMM YYYY, dddd HH:mm',
- },
- calendar: {
- sameDay: '[Бугун соат] LT [да]',
- nextDay: '[Эртага] LT [да]',
- nextWeek: 'dddd [куни соат] LT [да]',
- lastDay: '[Кеча соат] LT [да]',
- lastWeek: '[Утган] dddd [куни соат] LT [да]',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'Якин %s ичида',
- past: 'Бир неча %s олдин',
- s: 'фурсат',
- ss: '%d фурсат',
- m: 'бир дакика',
- mm: '%d дакика',
- h: 'бир соат',
- hh: '%d соат',
- d: 'бир кун',
- dd: '%d кун',
- M: 'бир ой',
- MM: '%d ой',
- y: 'бир йил',
- yy: '%d йил',
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 7, // The week that contains Jan 4th is the first week of the year.
- },
- });
+ "string": function (lhs) {
+ return "'" + lhs + "'";
+ },
- return uz;
+ "number": function (lhs) {
+ return lhs;
+ },
-})));
+ "boolean": function (lhs) {
+ return lhs;
+ },
+ regexp: function (lhs) {
+ return lhs;
+ },
-/***/ }),
+ identifier: function (lhs) {
+ return lhs;
+ },
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/vi.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/vi.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ "null": function () {
+ return "null";
+ },
-//! moment.js locale configuration
-//! locale : Vietnamese [vi]
-//! author : Bang Nguyen : https://github.com/bangnk
-//! author : Chien Kira : https://github.com/chienkira
+ logicalNot: function (lhs) {
+ return ["!(", this.parse(lhs), ")"].join("");
+ }
+};
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+var matcherCount = 0;
+var toJs = exports.toJs = function (rule, scope, alias, equality, wrap) {
+ /*jshint evil:true*/
+ var js = lang.parse(rule);
+ scope = scope || {};
+ var vars = lang.getIdentifiers(rule);
+ var closureVars = ["var indexOf = definedFuncs.indexOf; var hasOwnProperty = Object.prototype.hasOwnProperty;"], funcVars = [];
+ extd(vars).filter(function (v) {
+ var ret = ["var ", v, " = "];
+ if (definedFuncs.hasOwnProperty(v)) {
+ ret.push("definedFuncs['", v, "']");
+ } else if (scope.hasOwnProperty(v)) {
+ ret.push("scope['", v, "']");
+ } else {
+ return true;
+ }
+ ret.push(";");
+ closureVars.push(ret.join(""));
+ return false;
+ }).forEach(function (v) {
+ var ret = ["var ", v, " = "];
+ if (equality || v !== alias) {
+ ret.push("fact." + v);
+ } else if (v === alias) {
+ ret.push("hash.", v, "");
+ }
+ ret.push(";");
+ funcVars.push(ret.join(""));
+ });
+ var closureBody = closureVars.join("") + "return function matcher" + (matcherCount++) + (!equality ? "(fact, hash){" : "(fact){") + funcVars.join("") + " return " + (wrap ? wrap(js) : js) + ";}";
+ var f = new Function("definedFuncs, scope", closureBody)(definedFuncs, scope);
+ //console.log(f.toString());
+ return f;
+};
- //! moment.js locale configuration
+exports.getMatcher = function (rule, options, equality) {
+ options = options || {};
+ return toJs(rule, options.scope, options.alias, equality, function (src) {
+ return "!!(" + src + ")";
+ });
+};
- var vi = moment.defineLocale('vi', {
- months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(
- '_'
- ),
- monthsShort: 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(
- '_'
- ),
- weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
- weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
- weekdaysParseExact: true,
- meridiemParse: /sa|ch/i,
- isPM: function (input) {
- return /^ch$/i.test(input);
- },
- meridiem: function (hours, minutes, isLower) {
- if (hours < 12) {
- return isLower ? 'sa' : 'SA';
- } else {
- return isLower ? 'ch' : 'CH';
- }
- },
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM [năm] YYYY',
- LLL: 'D MMMM [năm] YYYY HH:mm',
- LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
- l: 'DD/M/YYYY',
- ll: 'D MMM YYYY',
- lll: 'D MMM YYYY HH:mm',
- llll: 'ddd, D MMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[Hôm nay lúc] LT',
- nextDay: '[Ngày mai lúc] LT',
- nextWeek: 'dddd [tuần tới lúc] LT',
- lastDay: '[Hôm qua lúc] LT',
- lastWeek: 'dddd [tuần trước lúc] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: '%s tới',
- past: '%s trước',
- s: 'vài giây',
- ss: '%d giây',
- m: 'một phút',
- mm: '%d phút',
- h: 'một giờ',
- hh: '%d giờ',
- d: 'một ngày',
- dd: '%d ngày',
- M: 'một tháng',
- MM: '%d tháng',
- y: 'một năm',
- yy: '%d năm',
- },
- dayOfMonthOrdinalParse: /\d{1,2}/,
- ordinal: function (number) {
- return number;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
+exports.getSourceMatcher = function (rule, options, equality) {
+ options = options || {};
+ return toJs(rule, options.scope, options.alias, equality, function (src) {
+ return src;
});
+};
- return vi;
+exports.toConstraints = function (constraint, options) {
+ if (typeof constraint === 'function') {
+ return [new atoms.CustomConstraint(constraint, options)];
+ }
+ //constraint.split("&&")
+ return lang.toConstraints(constraint, options);
+};
-})));
+exports.equal = function (c1, c2) {
+ return lang.equal(c1, c2);
+};
+exports.getIdentifiers = function (constraint) {
+ return lang.getIdentifiers(constraint);
+};
-/***/ }),
+exports.getIndexableProperties = function (constraint) {
+ return lang.getIndexableProperties(constraint);
+};
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/x-pseudo.js":
-/*!*********************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/x-pseudo.js ***!
- \*********************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ }),
-//! moment.js locale configuration
-//! locale : Pseudo [x-pseudo]
-//! author : Andrew Hood : https://github.com/andrewhood125
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/context.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/context.js ***!
+ \***********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+"use strict";
+/* module decorator */ module = __webpack_require__.nmd(module);
- //! moment.js locale configuration
+var extd = __webpack_require__(/*! ./extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ isBoolean = extd.isBoolean,
+ declare = extd.declare,
+ indexOf = extd.indexOf,
+ pPush = Array.prototype.push;
- var xPseudo = moment.defineLocale('x-pseudo', {
- months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(
- '_'
- ),
- monthsShort: 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(
- '_'
- ),
- monthsParseExact: true,
- weekdays: 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(
- '_'
- ),
- weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
- weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm',
- },
- calendar: {
- sameDay: '[T~ódá~ý át] LT',
- nextDay: '[T~ómó~rró~w át] LT',
- nextWeek: 'dddd [át] LT',
- lastDay: '[Ý~ést~érdá~ý át] LT',
- lastWeek: '[L~ást] dddd [át] LT',
- sameElse: 'L',
- },
- relativeTime: {
- future: 'í~ñ %s',
- past: '%s á~gó',
- s: 'á ~féw ~sécó~ñds',
- ss: '%d s~écóñ~ds',
- m: 'á ~míñ~úté',
- mm: '%d m~íñú~tés',
- h: 'á~ñ hó~úr',
- hh: '%d h~óúrs',
- d: 'á ~dáý',
- dd: '%d d~áýs',
- M: 'á ~móñ~th',
- MM: '%d m~óñt~hs',
- y: 'á ~ýéár',
- yy: '%d ý~éárs',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
- ordinal: function (number) {
- var b = number % 10,
- output =
- ~~((number % 100) / 10) === 1
- ? 'th'
- : b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
- return number + output;
- },
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
- },
- });
+function createContextHash(paths, hashCode) {
+ var ret = "",
+ i = -1,
+ l = paths.length;
+ while (++i < l) {
+ ret += paths[i].id + ":";
+ }
+ ret += hashCode;
+ return ret;
+}
- return xPseudo;
+function merge(h1, h2, aliases) {
+ var i = -1, l = aliases.length, alias;
+ while (++i < l) {
+ alias = aliases[i];
+ h1[alias] = h2[alias];
+ }
+}
-})));
+function unionRecency(arr, arr1, arr2) {
+ pPush.apply(arr, arr1);
+ var i = -1, l = arr2.length, val, j = arr.length;
+ while (++i < l) {
+ val = arr2[i];
+ if (indexOf(arr, val) === -1) {
+ arr[j++] = val;
+ }
+ }
+}
+var Match = declare({
+ instance: {
-/***/ }),
+ isMatch: true,
+ hashCode: "",
+ facts: null,
+ factIds: null,
+ factHash: null,
+ recency: null,
+ aliases: null,
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/yo.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/yo.js ***!
- \***************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+ constructor: function () {
+ this.facts = [];
+ this.factIds = [];
+ this.factHash = {};
+ this.recency = [];
+ this.aliases = [];
+ },
-//! moment.js locale configuration
-//! locale : Yoruba Nigeria [yo]
-//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe
+ addFact: function (assertable) {
+ pPush.call(this.facts, assertable);
+ pPush.call(this.recency, assertable.recency);
+ pPush.call(this.factIds, assertable.id);
+ this.hashCode = this.factIds.join(":");
+ return this;
+ },
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+ merge: function (mr) {
+ var ret = new Match();
+ ret.isMatch = mr.isMatch;
+ pPush.apply(ret.facts, this.facts);
+ pPush.apply(ret.facts, mr.facts);
+ pPush.apply(ret.aliases, this.aliases);
+ pPush.apply(ret.aliases, mr.aliases);
+ ret.hashCode = this.hashCode + ":" + mr.hashCode;
+ merge(ret.factHash, this.factHash, this.aliases);
+ merge(ret.factHash, mr.factHash, mr.aliases);
+ unionRecency(ret.recency, this.recency, mr.recency);
+ return ret;
+ }
+ }
+});
- //! moment.js locale configuration
+var Context = declare({
+ instance: {
+ match: null,
+ factHash: null,
+ aliases: null,
+ fact: null,
+ hashCode: null,
+ paths: null,
+ pathsHash: null,
- var yo = moment.defineLocale('yo', {
- months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(
- '_'
- ),
- monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
- weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
- weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
- weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY h:mm A',
- LLLL: 'dddd, D MMMM YYYY h:mm A',
+ constructor: function (fact, paths, mr) {
+ this.fact = fact;
+ if (mr) {
+ this.match = mr;
+ } else {
+ this.match = new Match().addFact(fact);
+ }
+ this.factHash = this.match.factHash;
+ this.aliases = this.match.aliases;
+ this.hashCode = this.match.hashCode;
+ if (paths) {
+ this.paths = paths;
+ this.pathsHash = createContextHash(paths, this.hashCode);
+ } else {
+ this.pathsHash = this.hashCode;
+ }
},
- calendar: {
- sameDay: '[Ònì ni] LT',
- nextDay: '[Ọ̀la ni] LT',
- nextWeek: "dddd [Ọsẹ̀ tón'bọ] [ni] LT",
- lastDay: '[Àna ni] LT',
- lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
- sameElse: 'L',
+
+ "set": function (key, value) {
+ this.factHash[key] = value;
+ this.aliases.push(key);
+ return this;
},
- relativeTime: {
- future: 'ní %s',
- past: '%s kọjá',
- s: 'ìsẹjú aayá die',
- ss: 'aayá %d',
- m: 'ìsẹjú kan',
- mm: 'ìsẹjú %d',
- h: 'wákati kan',
- hh: 'wákati %d',
- d: 'ọjọ́ kan',
- dd: 'ọjọ́ %d',
- M: 'osù kan',
- MM: 'osù %d',
- y: 'ọdún kan',
- yy: 'ọdún %d',
+
+ isMatch: function (isMatch) {
+ if (isBoolean(isMatch)) {
+ this.match.isMatch = isMatch;
+ } else {
+ return this.match.isMatch;
+ }
+ return this;
},
- dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/,
- ordinal: 'ọjọ́ %d',
- week: {
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
+
+ mergeMatch: function (merge) {
+ var match = this.match = this.match.merge(merge);
+ this.factHash = match.factHash;
+ this.hashCode = match.hashCode;
+ this.aliases = match.aliases;
+ return this;
},
- });
- return yo;
+ clone: function (fact, paths, match) {
+ return new Context(fact || this.fact, paths || this.path, match || this.match);
+ }
+ }
+}).as(module);
+
-})));
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/zh-cn.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/zh-cn.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/executionStrategy.js":
+/*!*********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/executionStrategy.js ***!
+ \*********************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Chinese (China) [zh-cn]
-//! author : suupic : https://github.com/suupic
-//! author : Zeno Zeng : https://github.com/zenozeng
-//! author : uu109 : https://github.com/uu109
+/* module decorator */ module = __webpack_require__.nmd(module);
+var extd = __webpack_require__(/*! ./extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ Promise = extd.Promise,
+ nextTick = __webpack_require__(/*! ./nextTick */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nextTick.js"),
+ isPromiseLike = extd.isPromiseLike;
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+Promise.extend({
+ instance: {
- //! moment.js locale configuration
+ looping: false,
- var zhCn = moment.defineLocale('zh-cn', {
- months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
- '_'
- ),
- monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
- '_'
- ),
- weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
- weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
- weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY/MM/DD',
- LL: 'YYYY年M月D日',
- LLL: 'YYYY年M月D日Ah点mm分',
- LLLL: 'YYYY年M月D日ddddAh点mm分',
- l: 'YYYY/M/D',
- ll: 'YYYY年M月D日',
- lll: 'YYYY年M月D日 HH:mm',
- llll: 'YYYY年M月D日dddd HH:mm',
+ constructor: function (flow, matchUntilHalt) {
+ this._super([]);
+ this.flow = flow;
+ this.agenda = flow.agenda;
+ this.rootNode = flow.rootNode;
+ this.matchUntilHalt = !!(matchUntilHalt);
+ extd.bindAll(this, ["onAlter", "callNext"]);
},
- meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
- return hour;
- } else if (meridiem === '下午' || meridiem === '晚上') {
- return hour + 12;
- } else {
- // '中午'
- return hour >= 11 ? hour : hour + 12;
+
+ halt: function () {
+ this.__halted = true;
+ if (!this.looping) {
+ this.callback();
}
},
- meridiem: function (hour, minute, isLower) {
- var hm = hour * 100 + minute;
- if (hm < 600) {
- return '凌晨';
- } else if (hm < 900) {
- return '早上';
- } else if (hm < 1130) {
- return '上午';
- } else if (hm < 1230) {
- return '中午';
- } else if (hm < 1800) {
- return '下午';
- } else {
- return '晚上';
+
+ onAlter: function () {
+ this.flowAltered = true;
+ if (!this.looping && this.matchUntilHalt && !this.__halted) {
+ this.callNext();
}
},
- calendar: {
- sameDay: '[今天]LT',
- nextDay: '[明天]LT',
- nextWeek: function (now) {
- if (now.week() !== this.week()) {
- return '[下]dddLT';
- } else {
- return '[本]dddLT';
- }
- },
- lastDay: '[昨天]LT',
- lastWeek: function (now) {
- if (this.week() !== now.week()) {
- return '[上]dddLT';
- } else {
- return '[本]dddLT';
+
+ setup: function () {
+ var flow = this.flow;
+ this.rootNode.resetCounter();
+ flow.on("assert", this.onAlter);
+ flow.on("modify", this.onAlter);
+ flow.on("retract", this.onAlter);
+ },
+
+ tearDown: function () {
+ var flow = this.flow;
+ flow.removeListener("assert", this.onAlter);
+ flow.removeListener("modify", this.onAlter);
+ flow.removeListener("retract", this.onAlter);
+ },
+
+ __handleAsyncNext: function (next) {
+ var self = this, agenda = self.agenda;
+ return next.then(function () {
+ self.looping = false;
+ if (!agenda.isEmpty()) {
+ if (self.flowAltered) {
+ self.rootNode.incrementCounter();
+ self.flowAltered = false;
+ }
+ if (!self.__halted) {
+ self.callNext();
+ } else {
+ self.callback();
+ }
+ } else if (!self.matchUntilHalt || self.__halted) {
+ self.callback();
}
- },
- sameElse: 'L',
+ self = null;
+ }, this.errback);
},
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
- ordinal: function (number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return number + '日';
- case 'M':
- return number + '月';
- case 'w':
- case 'W':
- return number + '周';
- default:
- return number;
+
+ __handleSyncNext: function (next) {
+ this.looping = false;
+ if (!this.agenda.isEmpty()) {
+ if (this.flowAltered) {
+ this.rootNode.incrementCounter();
+ this.flowAltered = false;
+ }
}
+ if (next && !this.__halted) {
+ nextTick(this.callNext);
+ } else if (!this.matchUntilHalt || this.__halted) {
+ this.callback();
+ }
+ return next;
},
- relativeTime: {
- future: '%s后',
- past: '%s前',
- s: '几秒',
- ss: '%d 秒',
- m: '1 分钟',
- mm: '%d 分钟',
- h: '1 小时',
- hh: '%d 小时',
- d: '1 天',
- dd: '%d 天',
- M: '1 个月',
- MM: '%d 个月',
- y: '1 年',
- yy: '%d 年',
- },
- week: {
- // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
- dow: 1, // Monday is the first day of the week.
- doy: 4, // The week that contains Jan 4th is the first week of the year.
+
+ callback: function () {
+ this.tearDown();
+ this._super(arguments);
},
- });
- return zhCn;
-})));
+ callNext: function () {
+ this.looping = true;
+ var next = this.agenda.fireNext();
+ return isPromiseLike(next) ? this.__handleAsyncNext(next) : this.__handleSyncNext(next);
+ },
+ execute: function () {
+ this.setup();
+ this.callNext();
+ return this;
+ }
+ }
+}).as(module);
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/zh-hk.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/zh-hk.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
-
-//! moment.js locale configuration
-//! locale : Chinese (Hong Kong) [zh-hk]
-//! author : Ben : https://github.com/ben-lin
-//! author : Chris Lam : https://github.com/hehachris
-//! author : Konstantin : https://github.com/skfd
-//! author : Anthony : https://github.com/anthonylau
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js ***!
+ \************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+var arr = __webpack_require__(/*! array-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/array-extended/index.js"),
+ unique = arr.unique,
+ indexOf = arr.indexOf,
+ map = arr.map,
+ pSlice = Array.prototype.slice,
+ pSplice = Array.prototype.splice;
- //! moment.js locale configuration
+function plucked(prop) {
+ var exec = prop.match(/(\w+)\(\)$/);
+ if (exec) {
+ prop = exec[1];
+ return function (item) {
+ return item[prop]();
+ };
+ } else {
+ return function (item) {
+ return item[prop];
+ };
+ }
+}
- var zhHk = moment.defineLocale('zh-hk', {
- months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
- '_'
- ),
- monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
- '_'
- ),
- weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
- weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
- weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY/MM/DD',
- LL: 'YYYY年M月D日',
- LLL: 'YYYY年M月D日 HH:mm',
- LLLL: 'YYYY年M月D日dddd HH:mm',
- l: 'YYYY/M/D',
- ll: 'YYYY年M月D日',
- lll: 'YYYY年M月D日 HH:mm',
- llll: 'YYYY年M月D日dddd HH:mm',
- },
- meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
- return hour;
- } else if (meridiem === '中午') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === '下午' || meridiem === '晚上') {
- return hour + 12;
- }
- },
- meridiem: function (hour, minute, isLower) {
- var hm = hour * 100 + minute;
- if (hm < 600) {
- return '凌晨';
- } else if (hm < 900) {
- return '早上';
- } else if (hm < 1200) {
- return '上午';
- } else if (hm === 1200) {
- return '中午';
- } else if (hm < 1800) {
- return '下午';
- } else {
- return '晚上';
+function plucker(prop) {
+ prop = prop.split(".");
+ if (prop.length === 1) {
+ return plucked(prop[0]);
+ } else {
+ var pluckers = map(prop, function (prop) {
+ return plucked(prop);
+ });
+ var l = pluckers.length;
+ return function (item) {
+ var i = -1, res = item;
+ while (++i < l) {
+ res = pluckers[i](res);
}
- },
- calendar: {
- sameDay: '[今天]LT',
- nextDay: '[明天]LT',
- nextWeek: '[下]ddddLT',
- lastDay: '[昨天]LT',
- lastWeek: '[上]ddddLT',
- sameElse: 'L',
- },
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
- ordinal: function (number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return number + '日';
- case 'M':
- return number + '月';
- case 'w':
- case 'W':
- return number + '週';
- default:
- return number;
+ return res;
+ };
+ }
+}
+
+function intersection(a, b) {
+ a = pSlice.call(a);
+ var aOne, i = -1, l;
+ l = a.length;
+ while (++i < l) {
+ aOne = a[i];
+ if (indexOf(b, aOne) === -1) {
+ pSplice.call(a, i--, 1);
+ l--;
+ }
+ }
+ return a;
+}
+
+function inPlaceIntersection(a, b) {
+ var aOne, i = -1, l;
+ l = a.length;
+ while (++i < l) {
+ aOne = a[i];
+ if (indexOf(b, aOne) === -1) {
+ pSplice.call(a, i--, 1);
+ l--;
+ }
+ }
+ return a;
+}
+
+function inPlaceDifference(a, b) {
+ var aOne, i = -1, l;
+ l = a.length;
+ while (++i < l) {
+ aOne = a[i];
+ if (indexOf(b, aOne) !== -1) {
+ pSplice.call(a, i--, 1);
+ l--;
+ }
+ }
+ return a;
+}
+
+function diffArr(arr1, arr2) {
+ var ret = [], i = -1, j, l2 = arr2.length, l1 = arr1.length, a, found;
+ if (l2 > l1) {
+ ret = arr1.slice();
+ while (++i < l2) {
+ a = arr2[i];
+ j = -1;
+ l1 = ret.length;
+ while (++j < l1) {
+ if (ret[j] === a) {
+ ret.splice(j, 1);
+ break;
+ }
}
- },
- relativeTime: {
- future: '%s後',
- past: '%s前',
- s: '幾秒',
- ss: '%d 秒',
- m: '1 分鐘',
- mm: '%d 分鐘',
- h: '1 小時',
- hh: '%d 小時',
- d: '1 天',
- dd: '%d 天',
- M: '1 個月',
- MM: '%d 個月',
- y: '1 年',
- yy: '%d 年',
- },
- });
+ }
+ } else {
+ while (++i < l1) {
+ a = arr1[i];
+ j = -1;
+ found = false;
+ while (++j < l2) {
+ if (arr2[j] === a) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ ret.push(a);
+ }
+ }
+ }
+ return ret;
+}
- return zhHk;
+function diffHash(h1, h2) {
+ var ret = {};
+ for (var i in h1) {
+ if (!hasOwnProperty.call(h2, i)) {
+ ret[i] = h1[i];
+ }
+ }
+ return ret;
+}
+
+
+function union(arr1, arr2) {
+ return unique(arr1.concat(arr2));
+}
+
+module.exports = __webpack_require__(/*! extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extended/index.js")()
+ .register(__webpack_require__(/*! date-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/date-extended/index.js"))
+ .register(arr)
+ .register(__webpack_require__(/*! object-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/object-extended/index.js"))
+ .register(__webpack_require__(/*! string-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/string-extended/index.js"))
+ .register(__webpack_require__(/*! promise-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/promise-extended/index.js"))
+ .register(__webpack_require__(/*! function-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/function-extended/index.js"))
+ .register(__webpack_require__(/*! is-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/is-extended/index.js"))
+ .register("intersection", intersection)
+ .register("inPlaceIntersection", inPlaceIntersection)
+ .register("inPlaceDifference", inPlaceDifference)
+ .register("diffArr", diffArr)
+ .register("diffHash", diffHash)
+ .register("unionArr", union)
+ .register("plucker", plucker)
+ .register("HashTable", __webpack_require__(/*! ht */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/ht/index.js"))
+ .register("declare", __webpack_require__(/*! declare.js */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/declare.js/index.js"))
+ .register(__webpack_require__(/*! leafy */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/leafy/index.js"))
+ .register("LinkedList", __webpack_require__(/*! ./linkedList */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/linkedList.js"));
-})));
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/zh-mo.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/zh-mo.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/flow.js":
+/*!********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/flow.js ***!
+ \********************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Chinese (Macau) [zh-mo]
-//! author : Ben : https://github.com/ben-lin
-//! author : Chris Lam : https://github.com/hehachris
-//! author : Tan Yuanhong : https://github.com/le0tan
+"use strict";
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+var extd = __webpack_require__(/*! ./extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ bind = extd.bind,
+ declare = extd.declare,
+ nodes = __webpack_require__(/*! ./nodes */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/index.js"),
+ EventEmitter = __webpack_require__(/*! events */ "events").EventEmitter,
+ wm = __webpack_require__(/*! ./workingMemory */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/workingMemory.js"),
+ WorkingMemory = wm.WorkingMemory,
+ ExecutionStragegy = __webpack_require__(/*! ./executionStrategy */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/executionStrategy.js"),
+ AgendaTree = __webpack_require__(/*! ./agenda */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/agenda.js");
- //! moment.js locale configuration
+module.exports = declare(EventEmitter, {
- var zhMo = moment.defineLocale('zh-mo', {
- months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
- '_'
- ),
- monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
- '_'
- ),
- weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
- weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
- weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'YYYY年M月D日',
- LLL: 'YYYY年M月D日 HH:mm',
- LLLL: 'YYYY年M月D日dddd HH:mm',
- l: 'D/M/YYYY',
- ll: 'YYYY年M月D日',
- lll: 'YYYY年M月D日 HH:mm',
- llll: 'YYYY年M月D日dddd HH:mm',
+ instance: {
+
+ name: null,
+
+ executionStrategy: null,
+
+ constructor: function (name, conflictResolutionStrategy) {
+ this.env = null;
+ this.name = name;
+ this.__rules = {};
+ this.conflictResolutionStrategy = conflictResolutionStrategy;
+ this.workingMemory = new WorkingMemory();
+ this.agenda = new AgendaTree(this, conflictResolutionStrategy);
+ this.agenda.on("fire", bind(this, "emit", "fire"));
+ this.agenda.on("focused", bind(this, "emit", "focused"));
+ this.rootNode = new nodes.RootNode(this.workingMemory, this.agenda);
+ extd.bindAll(this, "halt", "assert", "retract", "modify", "focus",
+ "emit", "getFacts", "getFact");
},
- meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
- return hour;
- } else if (meridiem === '中午') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === '下午' || meridiem === '晚上') {
- return hour + 12;
+
+ getFacts: function (Type) {
+ var ret;
+ if (Type) {
+ ret = this.workingMemory.getFactsByType(Type);
+ } else {
+ ret = this.workingMemory.getFacts();
}
+ return ret;
},
- meridiem: function (hour, minute, isLower) {
- var hm = hour * 100 + minute;
- if (hm < 600) {
- return '凌晨';
- } else if (hm < 900) {
- return '早上';
- } else if (hm < 1130) {
- return '上午';
- } else if (hm < 1230) {
- return '中午';
- } else if (hm < 1800) {
- return '下午';
+
+ getFact: function (Type) {
+ var ret;
+ if (Type) {
+ ret = this.workingMemory.getFactsByType(Type);
} else {
- return '晚上';
+ ret = this.workingMemory.getFacts();
}
+ return ret && ret[0];
},
- calendar: {
- sameDay: '[今天] LT',
- nextDay: '[明天] LT',
- nextWeek: '[下]dddd LT',
- lastDay: '[昨天] LT',
- lastWeek: '[上]dddd LT',
- sameElse: 'L',
+
+ focus: function (focused) {
+ this.agenda.setFocus(focused);
+ return this;
},
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
- ordinal: function (number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return number + '日';
- case 'M':
- return number + '月';
- case 'w':
- case 'W':
- return number + '週';
- default:
- return number;
+
+ halt: function () {
+ this.executionStrategy.halt();
+ return this;
+ },
+
+ dispose: function () {
+ this.workingMemory.dispose();
+ this.agenda.dispose();
+ this.rootNode.dispose();
+ },
+
+ assert: function (fact) {
+ this.rootNode.assertFact(this.workingMemory.assertFact(fact));
+ this.emit("assert", fact);
+ return fact;
+ },
+
+ // This method is called to remove an existing fact from working memory
+ retract: function (fact) {
+ //fact = this.workingMemory.getFact(fact);
+ this.rootNode.retractFact(this.workingMemory.retractFact(fact));
+ this.emit("retract", fact);
+ return fact;
+ },
+
+ // This method is called to alter an existing fact. It is essentially a
+ // retract followed by an assert.
+ modify: function (fact, cb) {
+ //fact = this.workingMemory.getFact(fact);
+ if ("function" === typeof cb) {
+ cb.call(fact, fact);
}
+ this.rootNode.modifyFact(this.workingMemory.modifyFact(fact));
+ this.emit("modify", fact);
+ return fact;
},
- relativeTime: {
- future: '%s內',
- past: '%s前',
- s: '幾秒',
- ss: '%d 秒',
- m: '1 分鐘',
- mm: '%d 分鐘',
- h: '1 小時',
- hh: '%d 小時',
- d: '1 天',
- dd: '%d 天',
- M: '1 個月',
- MM: '%d 個月',
- y: '1 年',
- yy: '%d 年',
+
+ print: function () {
+ this.rootNode.print();
},
- });
- return zhMo;
+ containsRule: function (name) {
+ return this.rootNode.containsRule(name);
+ },
-})));
+ rule: function (rule) {
+ this.rootNode.assertRule(rule);
+ },
+ matchUntilHalt: function (cb) {
+ return (this.executionStrategy = new ExecutionStragegy(this, true)).execute().classic(cb).promise();
+ },
+
+ match: function (cb) {
+ return (this.executionStrategy = new ExecutionStragegy(this)).execute().classic(cb).promise();
+ }
+
+ }
+});
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/zh-tw.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/zh-tw.js ***!
- \******************************************************************************************************/
-/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/flowContainer.js":
+/*!*****************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/flowContainer.js ***!
+ \*****************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-//! moment.js locale configuration
-//! locale : Chinese (Taiwan) [zh-tw]
-//! author : Ben : https://github.com/ben-lin
-//! author : Chris Lam : https://github.com/hehachris
+"use strict";
+/* module decorator */ module = __webpack_require__.nmd(module);
-;(function (global, factory) {
- true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js")) :
- 0
-}(this, (function (moment) { 'use strict';
+var extd = __webpack_require__(/*! ./extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ instanceOf = extd.instanceOf,
+ forEach = extd.forEach,
+ declare = extd.declare,
+ InitialFact = __webpack_require__(/*! ./pattern */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/pattern.js").InitialFact,
+ conflictStrategies = __webpack_require__(/*! ./conflict */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/conflict.js"),
+ conflictResolution = conflictStrategies.strategy(["salience", "activationRecency"]),
+ rule = __webpack_require__(/*! ./rule */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/rule.js"),
+ Flow = __webpack_require__(/*! ./flow */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/flow.js");
- //! moment.js locale configuration
+var flows = {};
+var FlowContainer = declare({
- var zhTw = moment.defineLocale('zh-tw', {
- months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
- '_'
- ),
- monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
- '_'
- ),
- weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
- weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),
- weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY/MM/DD',
- LL: 'YYYY年M月D日',
- LLL: 'YYYY年M月D日 HH:mm',
- LLLL: 'YYYY年M月D日dddd HH:mm',
- l: 'YYYY/M/D',
- ll: 'YYYY年M月D日',
- lll: 'YYYY年M月D日 HH:mm',
- llll: 'YYYY年M月D日dddd HH:mm',
- },
- meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
- return hour;
- } else if (meridiem === '中午') {
- return hour >= 11 ? hour : hour + 12;
- } else if (meridiem === '下午' || meridiem === '晚上') {
- return hour + 12;
+ instance: {
+
+ constructor: function (name, cb) {
+ this.name = name;
+ this.cb = cb;
+ this.__rules = [];
+ this.__defined = {};
+ this.conflictResolutionStrategy = conflictResolution;
+ if (cb) {
+ cb.call(this, this);
}
- },
- meridiem: function (hour, minute, isLower) {
- var hm = hour * 100 + minute;
- if (hm < 600) {
- return '凌晨';
- } else if (hm < 900) {
- return '早上';
- } else if (hm < 1130) {
- return '上午';
- } else if (hm < 1230) {
- return '中午';
- } else if (hm < 1800) {
- return '下午';
+ if (!flows.hasOwnProperty(name)) {
+ flows[name] = this;
} else {
- return '晚上';
+ throw new Error("Flow with " + name + " already defined");
}
},
- calendar: {
- sameDay: '[今天] LT',
- nextDay: '[明天] LT',
- nextWeek: '[下]dddd LT',
- lastDay: '[昨天] LT',
- lastWeek: '[上]dddd LT',
- sameElse: 'L',
+
+ conflictResolution: function (strategies) {
+ this.conflictResolutionStrategy = conflictStrategies.strategy(strategies);
+ return this;
},
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
- ordinal: function (number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return number + '日';
- case 'M':
- return number + '月';
- case 'w':
- case 'W':
- return number + '週';
- default:
- return number;
+
+ getDefined: function (name) {
+ var ret = this.__defined[name.toLowerCase()];
+ if (!ret) {
+ throw new Error(name + " flow class is not defined");
}
+ return ret;
},
- relativeTime: {
- future: '%s後',
- past: '%s前',
- s: '幾秒',
- ss: '%d 秒',
- m: '1 分鐘',
- mm: '%d 分鐘',
- h: '1 小時',
- hh: '%d 小時',
- d: '1 天',
- dd: '%d 天',
- M: '1 個月',
- MM: '%d 個月',
- y: '1 年',
- yy: '%d 年',
+
+ addDefined: function (name, cls) {
+ //normalize
+ this.__defined[name.toLowerCase()] = cls;
+ return cls;
},
- });
- return zhTw;
+ rule: function () {
+ this.__rules = this.__rules.concat(rule.createRule.apply(rule, arguments));
+ return this;
+ },
-})));
+ getSession: function () {
+ var flow = new Flow(this.name, this.conflictResolutionStrategy);
+ forEach(this.__rules, function (rule) {
+ flow.rule(rule);
+ });
+ flow.assert(new InitialFact());
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ flow.assert(arguments[i]);
+ }
+ return flow;
+ },
+ containsRule: function (name) {
+ return extd.some(this.__rules, function (rule) {
+ return rule.name === name;
+ });
+ }
-/***/ }),
+ },
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale sync recursive ^\\.\\/.*$":
-/*!************************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ sync ^\.\/.*$ ***!
- \************************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+ "static": {
+ getFlow: function (name) {
+ return flows[name];
+ },
-var map = {
- "./af": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/af.js",
- "./af.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/af.js",
- "./ar": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar.js",
- "./ar-dz": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-dz.js",
- "./ar-dz.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-dz.js",
- "./ar-kw": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-kw.js",
- "./ar-kw.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-kw.js",
- "./ar-ly": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-ly.js",
- "./ar-ly.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-ly.js",
- "./ar-ma": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-ma.js",
- "./ar-ma.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-ma.js",
- "./ar-sa": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-sa.js",
- "./ar-sa.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-sa.js",
- "./ar-tn": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-tn.js",
- "./ar-tn.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar-tn.js",
- "./ar.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ar.js",
- "./az": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/az.js",
- "./az.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/az.js",
- "./be": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/be.js",
- "./be.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/be.js",
- "./bg": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bg.js",
- "./bg.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bg.js",
- "./bm": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bm.js",
- "./bm.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bm.js",
- "./bn": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bn.js",
- "./bn.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bn.js",
- "./bo": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bo.js",
- "./bo.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bo.js",
- "./br": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/br.js",
- "./br.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/br.js",
- "./bs": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bs.js",
- "./bs.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/bs.js",
- "./ca": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ca.js",
- "./ca.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ca.js",
- "./cs": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/cs.js",
- "./cs.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/cs.js",
- "./cv": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/cv.js",
- "./cv.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/cv.js",
- "./cy": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/cy.js",
- "./cy.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/cy.js",
- "./da": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/da.js",
- "./da.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/da.js",
- "./de": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/de.js",
- "./de-at": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/de-at.js",
- "./de-at.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/de-at.js",
- "./de-ch": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/de-ch.js",
- "./de-ch.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/de-ch.js",
- "./de.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/de.js",
- "./dv": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/dv.js",
- "./dv.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/dv.js",
- "./el": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/el.js",
- "./el.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/el.js",
- "./en-au": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-au.js",
- "./en-au.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-au.js",
- "./en-ca": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-ca.js",
- "./en-ca.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-ca.js",
- "./en-gb": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-gb.js",
- "./en-gb.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-gb.js",
- "./en-ie": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-ie.js",
- "./en-ie.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-ie.js",
- "./en-il": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-il.js",
- "./en-il.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-il.js",
- "./en-in": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-in.js",
- "./en-in.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-in.js",
- "./en-nz": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-nz.js",
- "./en-nz.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-nz.js",
- "./en-sg": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-sg.js",
- "./en-sg.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/en-sg.js",
- "./eo": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/eo.js",
- "./eo.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/eo.js",
- "./es": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/es.js",
- "./es-do": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/es-do.js",
- "./es-do.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/es-do.js",
- "./es-us": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/es-us.js",
- "./es-us.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/es-us.js",
- "./es.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/es.js",
- "./et": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/et.js",
- "./et.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/et.js",
- "./eu": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/eu.js",
- "./eu.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/eu.js",
- "./fa": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fa.js",
- "./fa.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fa.js",
- "./fi": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fi.js",
- "./fi.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fi.js",
- "./fil": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fil.js",
- "./fil.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fil.js",
- "./fo": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fo.js",
- "./fo.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fo.js",
- "./fr": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fr.js",
- "./fr-ca": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fr-ca.js",
- "./fr-ca.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fr-ca.js",
- "./fr-ch": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fr-ch.js",
- "./fr-ch.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fr-ch.js",
- "./fr.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fr.js",
- "./fy": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fy.js",
- "./fy.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/fy.js",
- "./ga": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ga.js",
- "./ga.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ga.js",
- "./gd": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gd.js",
- "./gd.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gd.js",
- "./gl": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gl.js",
- "./gl.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gl.js",
- "./gom-deva": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gom-deva.js",
- "./gom-deva.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gom-deva.js",
- "./gom-latn": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gom-latn.js",
- "./gom-latn.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gom-latn.js",
- "./gu": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gu.js",
- "./gu.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/gu.js",
- "./he": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/he.js",
- "./he.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/he.js",
- "./hi": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/hi.js",
- "./hi.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/hi.js",
- "./hr": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/hr.js",
- "./hr.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/hr.js",
- "./hu": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/hu.js",
- "./hu.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/hu.js",
- "./hy-am": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/hy-am.js",
- "./hy-am.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/hy-am.js",
- "./id": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/id.js",
- "./id.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/id.js",
- "./is": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/is.js",
- "./is.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/is.js",
- "./it": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/it.js",
- "./it-ch": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/it-ch.js",
- "./it-ch.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/it-ch.js",
- "./it.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/it.js",
- "./ja": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ja.js",
- "./ja.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ja.js",
- "./jv": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/jv.js",
- "./jv.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/jv.js",
- "./ka": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ka.js",
- "./ka.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ka.js",
- "./kk": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/kk.js",
- "./kk.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/kk.js",
- "./km": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/km.js",
- "./km.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/km.js",
- "./kn": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/kn.js",
- "./kn.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/kn.js",
- "./ko": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ko.js",
- "./ko.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ko.js",
- "./ku": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ku.js",
- "./ku.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ku.js",
- "./ky": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ky.js",
- "./ky.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ky.js",
- "./lb": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/lb.js",
- "./lb.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/lb.js",
- "./lo": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/lo.js",
- "./lo.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/lo.js",
- "./lt": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/lt.js",
- "./lt.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/lt.js",
- "./lv": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/lv.js",
- "./lv.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/lv.js",
- "./me": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/me.js",
- "./me.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/me.js",
- "./mi": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mi.js",
- "./mi.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mi.js",
- "./mk": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mk.js",
- "./mk.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mk.js",
- "./ml": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ml.js",
- "./ml.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ml.js",
- "./mn": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mn.js",
- "./mn.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mn.js",
- "./mr": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mr.js",
- "./mr.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mr.js",
- "./ms": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ms.js",
- "./ms-my": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ms-my.js",
- "./ms-my.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ms-my.js",
- "./ms.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ms.js",
- "./mt": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mt.js",
- "./mt.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/mt.js",
- "./my": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/my.js",
- "./my.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/my.js",
- "./nb": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/nb.js",
- "./nb.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/nb.js",
- "./ne": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ne.js",
- "./ne.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ne.js",
- "./nl": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/nl.js",
- "./nl-be": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/nl-be.js",
- "./nl-be.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/nl-be.js",
- "./nl.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/nl.js",
- "./nn": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/nn.js",
- "./nn.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/nn.js",
- "./oc-lnc": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/oc-lnc.js",
- "./oc-lnc.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/oc-lnc.js",
- "./pa-in": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/pa-in.js",
- "./pa-in.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/pa-in.js",
- "./pl": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/pl.js",
- "./pl.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/pl.js",
- "./pt": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/pt.js",
- "./pt-br": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/pt-br.js",
- "./pt-br.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/pt-br.js",
- "./pt.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/pt.js",
- "./ro": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ro.js",
- "./ro.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ro.js",
- "./ru": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ru.js",
- "./ru.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ru.js",
- "./sd": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sd.js",
- "./sd.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sd.js",
- "./se": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/se.js",
- "./se.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/se.js",
- "./si": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/si.js",
- "./si.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/si.js",
- "./sk": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sk.js",
- "./sk.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sk.js",
- "./sl": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sl.js",
- "./sl.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sl.js",
- "./sq": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sq.js",
- "./sq.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sq.js",
- "./sr": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sr.js",
- "./sr-cyrl": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sr-cyrl.js",
- "./sr-cyrl.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sr-cyrl.js",
- "./sr.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sr.js",
- "./ss": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ss.js",
- "./ss.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ss.js",
- "./sv": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sv.js",
- "./sv.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sv.js",
- "./sw": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sw.js",
- "./sw.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/sw.js",
- "./ta": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ta.js",
- "./ta.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ta.js",
- "./te": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/te.js",
- "./te.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/te.js",
- "./tet": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tet.js",
- "./tet.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tet.js",
- "./tg": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tg.js",
- "./tg.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tg.js",
- "./th": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/th.js",
- "./th.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/th.js",
- "./tl-ph": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tl-ph.js",
- "./tl-ph.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tl-ph.js",
- "./tlh": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tlh.js",
- "./tlh.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tlh.js",
- "./tr": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tr.js",
- "./tr.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tr.js",
- "./tzl": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tzl.js",
- "./tzl.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tzl.js",
- "./tzm": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tzm.js",
- "./tzm-latn": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tzm-latn.js",
- "./tzm-latn.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tzm-latn.js",
- "./tzm.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/tzm.js",
- "./ug-cn": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ug-cn.js",
- "./ug-cn.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ug-cn.js",
- "./uk": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/uk.js",
- "./uk.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/uk.js",
- "./ur": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ur.js",
- "./ur.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/ur.js",
- "./uz": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/uz.js",
- "./uz-latn": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/uz-latn.js",
- "./uz-latn.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/uz-latn.js",
- "./uz.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/uz.js",
- "./vi": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/vi.js",
- "./vi.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/vi.js",
- "./x-pseudo": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/x-pseudo.js",
- "./x-pseudo.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/x-pseudo.js",
- "./yo": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/yo.js",
- "./yo.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/yo.js",
- "./zh-cn": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/zh-cn.js",
- "./zh-cn.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/zh-cn.js",
- "./zh-hk": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/zh-hk.js",
- "./zh-hk.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/zh-hk.js",
- "./zh-mo": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/zh-mo.js",
- "./zh-mo.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/zh-mo.js",
- "./zh-tw": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/zh-tw.js",
- "./zh-tw.js": "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale/zh-tw.js"
-};
+ hasFlow: function (name) {
+ return extd.has(flows, name);
+ },
+ deleteFlow: function (name) {
+ if (instanceOf(name, FlowContainer)) {
+ name = name.name;
+ }
+ delete flows[name];
+ return FlowContainer;
+ },
-function webpackContext(req) {
- var id = webpackContextResolve(req);
- return __webpack_require__(id);
-}
-function webpackContextResolve(req) {
- if(!__webpack_require__.o(map, req)) {
- var e = new Error("Cannot find module '" + req + "'");
- e.code = 'MODULE_NOT_FOUND';
- throw e;
- }
- return map[req];
-}
-webpackContext.keys = function webpackContextKeys() {
- return Object.keys(map);
-};
-webpackContext.resolve = webpackContextResolve;
-module.exports = webpackContext;
-webpackContext.id = "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale sync recursive ^\\.\\/.*$";
+ deleteFlows: function () {
+ for (var name in flows) {
+ if (name in flows) {
+ delete flows[name];
+ }
+ }
+ return FlowContainer;
+ },
-/***/ }),
+ create: function (name, cb) {
+ return new FlowContainer(name, cb);
+ }
+ }
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js":
-/*!************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js ***!
- \************************************************************************************************/
-/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
+}).as(module);
-/* module decorator */ module = __webpack_require__.nmd(module);
-//! moment.js
-//! version : 2.26.0
-//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
-//! license : MIT
-//! momentjs.com
+/***/ }),
-;(function (global, factory) {
- true ? module.exports = factory() :
- 0
-}(this, (function () { 'use strict';
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/index.js":
+/*!*********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/index.js ***!
+ \*********************************************************************************************/
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
- var hookCallback;
+"use strict";
+/**
+ *
+ * @projectName nools
+ * @github https://github.com/C2FO/nools
+ * @includeDoc [Examples] ../docs-md/examples.md
+ * @includeDoc [Change Log] ../history.md
+ * @header [../readme.md]
+ */
- function hooks() {
- return hookCallback.apply(null, arguments);
- }
- // This is done to register the method called with moment()
- // without creating circular dependencies.
- function setHookCallback(callback) {
- hookCallback = callback;
- }
+var extd = __webpack_require__(/*! ./extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ fs = __webpack_require__(/*! fs */ "fs"),
+ path = __webpack_require__(/*! path */ "path"),
+ compile = __webpack_require__(/*! ./compile */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/compile/index.js"),
+ FlowContainer = __webpack_require__(/*! ./flowContainer */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/flowContainer.js");
- function isArray(input) {
- return (
- input instanceof Array ||
- Object.prototype.toString.call(input) === '[object Array]'
- );
- }
+function isNoolsFile(file) {
+ return (/\.nools$/).test(file);
+}
- function isObject(input) {
- // IE8 will treat undefined and null as object if it wasn't for
- // input != null
- return (
- input != null &&
- Object.prototype.toString.call(input) === '[object Object]'
- );
+function parse(source) {
+ var ret;
+ if (isNoolsFile(source)) {
+ ret = compile.parse(fs.readFileSync(source, "utf8"), source);
+ } else {
+ ret = compile.parse(source);
}
+ return ret;
+}
- function hasOwnProp(a, b) {
- return Object.prototype.hasOwnProperty.call(a, b);
- }
+exports.Flow = FlowContainer;
- function isObjectEmpty(obj) {
- if (Object.getOwnPropertyNames) {
- return Object.getOwnPropertyNames(obj).length === 0;
- } else {
- var k;
- for (k in obj) {
- if (hasOwnProp(obj, k)) {
- return false;
- }
- }
- return true;
- }
- }
+exports.getFlow = FlowContainer.getFlow;
+exports.hasFlow = FlowContainer.hasFlow;
- function isUndefined(input) {
- return input === void 0;
- }
+exports.deleteFlow = function (name) {
+ FlowContainer.deleteFlow(name);
+ return this;
+};
- function isNumber(input) {
- return (
- typeof input === 'number' ||
- Object.prototype.toString.call(input) === '[object Number]'
- );
- }
+exports.deleteFlows = function () {
+ FlowContainer.deleteFlows();
+ return this;
+};
- function isDate(input) {
- return (
- input instanceof Date ||
- Object.prototype.toString.call(input) === '[object Date]'
- );
- }
+exports.flow = FlowContainer.create;
- function map(arr, fn) {
- var res = [],
- i;
- for (i = 0; i < arr.length; ++i) {
- res.push(fn(arr[i], i));
- }
- return res;
+exports.compile = function (file, options, cb) {
+ if (extd.isFunction(options)) {
+ cb = options;
+ options = {};
+ } else {
+ options = options || {};
}
-
- function extend(a, b) {
- for (var i in b) {
- if (hasOwnProp(b, i)) {
- a[i] = b[i];
- }
- }
-
- if (hasOwnProp(b, 'toString')) {
- a.toString = b.toString;
- }
-
- if (hasOwnProp(b, 'valueOf')) {
- a.valueOf = b.valueOf;
- }
-
- return a;
+ if (extd.isString(file)) {
+ options.name = options.name || (isNoolsFile(file) ? path.basename(file, path.extname(file)) : null);
+ file = parse(file);
}
-
- function createUTC(input, format, locale, strict) {
- return createLocalOrUTC(input, format, locale, strict, true).utc();
+ if (!options.name) {
+ throw new Error("Name required when compiling nools source");
}
+ return compile.compile(file, options, cb, FlowContainer);
+};
- function defaultParsingFlags() {
- // We need to deep clone this object.
- return {
- empty: false,
- unusedTokens: [],
- unusedInput: [],
- overflow: -2,
- charsLeftOver: 0,
- nullInput: false,
- invalidEra: null,
- invalidMonth: null,
- invalidFormat: false,
- userInvalidated: false,
- iso: false,
- parsedDateParts: [],
- era: null,
- meridiem: null,
- rfc2822: false,
- weekdayMismatch: false,
- };
+exports.transpile = function (file, options) {
+ options = options || {};
+ if (extd.isString(file)) {
+ options.name = options.name || (isNoolsFile(file) ? path.basename(file, path.extname(file)) : null);
+ file = parse(file);
}
+ return compile.transpile(file, options);
+};
- function getParsingFlags(m) {
- if (m._pf == null) {
- m._pf = defaultParsingFlags();
- }
- return m._pf;
- }
+exports.parse = parse;
- var some;
- if (Array.prototype.some) {
- some = Array.prototype.some;
- } else {
- some = function (fun) {
- var t = Object(this),
- len = t.length >>> 0,
- i;
+/***/ }),
- for (i = 0; i < len; i++) {
- if (i in t && fun.call(this, t[i], i, t)) {
- return true;
- }
- }
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/linkedList.js":
+/*!**************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/linkedList.js ***!
+ \**************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- return false;
- };
- }
+/* module decorator */ module = __webpack_require__.nmd(module);
+var declare = __webpack_require__(/*! declare.js */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/declare.js/index.js");
+declare({
- function isValid(m) {
- if (m._isValid == null) {
- var flags = getParsingFlags(m),
- parsedParts = some.call(flags.parsedDateParts, function (i) {
- return i != null;
- }),
- isNowValid =
- !isNaN(m._d.getTime()) &&
- flags.overflow < 0 &&
- !flags.empty &&
- !flags.invalidEra &&
- !flags.invalidMonth &&
- !flags.invalidWeekday &&
- !flags.weekdayMismatch &&
- !flags.nullInput &&
- !flags.invalidFormat &&
- !flags.userInvalidated &&
- (!flags.meridiem || (flags.meridiem && parsedParts));
+ instance: {
+ constructor: function () {
+ this.head = null;
+ this.tail = null;
+ this.length = null;
+ },
- if (m._strict) {
- isNowValid =
- isNowValid &&
- flags.charsLeftOver === 0 &&
- flags.unusedTokens.length === 0 &&
- flags.bigHour === undefined;
+ push: function (data) {
+ var tail = this.tail, head = this.head, node = {data: data, prev: tail, next: null};
+ if (tail) {
+ this.tail.next = node;
+ }
+ this.tail = node;
+ if (!head) {
+ this.head = node;
}
+ this.length++;
+ return node;
+ },
- if (Object.isFrozen == null || !Object.isFrozen(m)) {
- m._isValid = isNowValid;
+ remove: function (node) {
+ if (node.prev) {
+ node.prev.next = node.next;
} else {
- return isNowValid;
+ this.head = node.next;
}
- }
- return m._isValid;
- }
-
- function createInvalid(flags) {
- var m = createUTC(NaN);
- if (flags != null) {
- extend(getParsingFlags(m), flags);
- } else {
- getParsingFlags(m).userInvalidated = true;
- }
-
- return m;
- }
+ if (node.next) {
+ node.next.prev = node.prev;
+ } else {
+ this.tail = node.prev;
+ }
+ //node.data = node.prev = node.next = null;
+ this.length--;
+ },
- // Plugins that add properties should also add the key here (null value),
- // so we can properly clone ourselves.
- var momentProperties = (hooks.momentProperties = []),
- updateInProgress = false;
+ forEach: function (cb) {
+ var head = {next: this.head};
+ while ((head = head.next)) {
+ cb(head.data);
+ }
+ },
- function copyConfig(to, from) {
- var i, prop, val;
+ toArray: function () {
+ var head = {next: this.head}, ret = [];
+ while ((head = head.next)) {
+ ret.push(head);
+ }
+ return ret;
+ },
- if (!isUndefined(from._isAMomentObject)) {
- to._isAMomentObject = from._isAMomentObject;
- }
- if (!isUndefined(from._i)) {
- to._i = from._i;
- }
- if (!isUndefined(from._f)) {
- to._f = from._f;
- }
- if (!isUndefined(from._l)) {
- to._l = from._l;
- }
- if (!isUndefined(from._strict)) {
- to._strict = from._strict;
- }
- if (!isUndefined(from._tzm)) {
- to._tzm = from._tzm;
- }
- if (!isUndefined(from._isUTC)) {
- to._isUTC = from._isUTC;
- }
- if (!isUndefined(from._offset)) {
- to._offset = from._offset;
- }
- if (!isUndefined(from._pf)) {
- to._pf = getParsingFlags(from);
- }
- if (!isUndefined(from._locale)) {
- to._locale = from._locale;
- }
+ removeByData: function (data) {
+ var head = {next: this.head};
+ while ((head = head.next)) {
+ if (head.data === data) {
+ this.remove(head);
+ break;
+ }
+ }
+ },
- if (momentProperties.length > 0) {
- for (i = 0; i < momentProperties.length; i++) {
- prop = momentProperties[i];
- val = from[prop];
- if (!isUndefined(val)) {
- to[prop] = val;
+ getByData: function (data) {
+ var head = {next: this.head};
+ while ((head = head.next)) {
+ if (head.data === data) {
+ return head;
}
}
+ },
+
+ clear: function () {
+ this.head = this.tail = null;
+ this.length = 0;
}
- return to;
}
- // Moment prototype object
- function Moment(config) {
- copyConfig(this, config);
- this._d = new Date(config._d != null ? config._d.getTime() : NaN);
- if (!this.isValid()) {
- this._d = new Date(NaN);
- }
- // Prevent infinite loop in case updateOffset creates new moment
- // objects.
- if (updateInProgress === false) {
- updateInProgress = true;
- hooks.updateOffset(this);
- updateInProgress = false;
- }
- }
+}).as(module);
- function isMoment(obj) {
- return (
- obj instanceof Moment || (obj != null && obj._isAMomentObject != null)
- );
- }
- function warn(msg) {
- if (
- hooks.suppressDeprecationWarnings === false &&
- typeof console !== 'undefined' &&
- console.warn
- ) {
- console.warn('Deprecation warning: ' + msg);
- }
- }
+/***/ }),
- function deprecate(msg, fn) {
- var firstTime = true;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nextTick.js":
+/*!************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nextTick.js ***!
+ \************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- return extend(function () {
- if (hooks.deprecationHandler != null) {
- hooks.deprecationHandler(null, msg);
- }
- if (firstTime) {
- var args = [],
- arg,
- i,
- key;
- for (i = 0; i < arguments.length; i++) {
- arg = '';
- if (typeof arguments[i] === 'object') {
- arg += '\n[' + i + '] ';
- for (key in arguments[0]) {
- if (hasOwnProp(arguments[0], key)) {
- arg += key + ': ' + arguments[0][key] + ', ';
- }
- }
- arg = arg.slice(0, -2); // Remove trailing comma and space
- } else {
- arg = arguments[i];
- }
- args.push(arg);
- }
- warn(
- msg +
- '\nArguments: ' +
- Array.prototype.slice.call(args).join('') +
- '\n' +
- new Error().stack
- );
- firstTime = false;
- }
- return fn.apply(this, arguments);
- }, fn);
+/*global setImmediate, window, MessageChannel*/
+var extd = __webpack_require__(/*! ./extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js");
+var nextTick;
+if (typeof setImmediate === "function") {
+ // In IE10, or use https://github.com/NobleJS/setImmediate
+ if (typeof window !== "undefined") {
+ nextTick = extd.bind(window, setImmediate);
+ } else {
+ nextTick = setImmediate;
}
+} else if (typeof process !== "undefined") {
+ // node
+ nextTick = process.nextTick;
+} else if (typeof MessageChannel !== "undefined") {
+ // modern browsers
+ // http://www.nonblocking.io/2011/06/windownexttick.html
+ var channel = new MessageChannel();
+ // linked list of tasks (single, with head node)
+ var head = {}, tail = head;
+ channel.port1.onmessage = function () {
+ head = head.next;
+ var task = head.task;
+ delete head.task;
+ task();
+ };
+ nextTick = function (task) {
+ tail = tail.next = {task: task};
+ channel.port2.postMessage(0);
+ };
+} else {
+ // old browsers
+ nextTick = function (task) {
+ setTimeout(task, 0);
+ };
+}
- var deprecations = {};
+module.exports = nextTick;
- function deprecateSimple(name, msg) {
- if (hooks.deprecationHandler != null) {
- hooks.deprecationHandler(name, msg);
- }
- if (!deprecations[name]) {
- warn(msg);
- deprecations[name] = true;
- }
- }
+/***/ }),
- hooks.suppressDeprecationWarnings = false;
- hooks.deprecationHandler = null;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/adapterNode.js":
+/*!*********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/adapterNode.js ***!
+ \*********************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- function isFunction(input) {
- return (
- (typeof Function !== 'undefined' && input instanceof Function) ||
- Object.prototype.toString.call(input) === '[object Function]'
- );
- }
+/* module decorator */ module = __webpack_require__.nmd(module);
+var Node = __webpack_require__(/*! ./node */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/node.js"),
+ intersection = __webpack_require__(/*! ../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js").intersection;
- function set(config) {
- var prop, i;
- for (i in config) {
- if (hasOwnProp(config, i)) {
- prop = config[i];
- if (isFunction(prop)) {
- this[i] = prop;
- } else {
- this['_' + i] = prop;
- }
- }
- }
- this._config = config;
- // Lenient ordinal parsing accepts just a number in addition to
- // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
- // TODO: Remove "ordinalParse" fallback in next major release.
- this._dayOfMonthOrdinalParseLenient = new RegExp(
- (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
- '|' +
- /\d{1,2}/.source
- );
- }
+Node.extend({
+ instance: {
- function mergeConfigs(parentConfig, childConfig) {
- var res = extend({}, parentConfig),
- prop;
- for (prop in childConfig) {
- if (hasOwnProp(childConfig, prop)) {
- if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
- res[prop] = {};
- extend(res[prop], parentConfig[prop]);
- extend(res[prop], childConfig[prop]);
- } else if (childConfig[prop] != null) {
- res[prop] = childConfig[prop];
- } else {
- delete res[prop];
+ __propagatePaths: function (method, context) {
+ var entrySet = this.__entrySet, i = entrySet.length, entry, outNode, paths, continuingPaths;
+ while (--i > -1) {
+ entry = entrySet[i];
+ outNode = entry.key;
+ paths = entry.value;
+ if ((continuingPaths = intersection(paths, context.paths)).length) {
+ outNode[method](context.clone(null, continuingPaths, null));
}
}
- }
- for (prop in parentConfig) {
- if (
- hasOwnProp(parentConfig, prop) &&
- !hasOwnProp(childConfig, prop) &&
- isObject(parentConfig[prop])
- ) {
- // make sure changes to properties don't modify parent config
- res[prop] = extend({}, res[prop]);
+ },
+
+ __propagateNoPaths: function (method, context) {
+ var entrySet = this.__entrySet, i = entrySet.length;
+ while (--i > -1) {
+ entrySet[i].key[method](context);
}
- }
- return res;
- }
+ },
- function Locale(config) {
- if (config != null) {
- this.set(config);
+ __propagate: function (method, context) {
+ if (context.paths) {
+ this.__propagatePaths(method, context);
+ } else {
+ this.__propagateNoPaths(method, context);
+ }
}
}
+}).as(module);
- var keys;
+/***/ }),
- if (Object.keys) {
- keys = Object.keys;
- } else {
- keys = function (obj) {
- var i,
- res = [];
- for (i in obj) {
- if (hasOwnProp(obj, i)) {
- res.push(i);
- }
- }
- return res;
- };
- }
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/aliasNode.js":
+/*!*******************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/aliasNode.js ***!
+ \*******************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- var defaultCalendar = {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L',
- };
+/* module decorator */ module = __webpack_require__.nmd(module);
+var AlphaNode = __webpack_require__(/*! ./alphaNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/alphaNode.js");
- function calendar(key, mom, now) {
- var output = this._calendar[key] || this._calendar['sameElse'];
- return isFunction(output) ? output.call(mom, now) : output;
- }
+AlphaNode.extend({
+ instance: {
- function zeroFill(number, targetLength, forceSign) {
- var absNumber = '' + Math.abs(number),
- zerosToFill = targetLength - absNumber.length,
- sign = number >= 0;
- return (
- (sign ? (forceSign ? '+' : '') : '-') +
- Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
- absNumber
- );
- }
+ constructor: function () {
+ this._super(arguments);
+ this.alias = this.constraint.get("alias");
+ },
- var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
- localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
- formatFunctions = {},
- formatTokenFunctions = {};
+ toString: function () {
+ return "AliasNode" + this.__count;
+ },
- // token: 'M'
- // padded: ['MM', 2]
- // ordinal: 'Mo'
- // callback: function () { this.month() + 1 }
- function addFormatToken(token, padded, ordinal, callback) {
- var func = callback;
- if (typeof callback === 'string') {
- func = function () {
- return this[callback]();
- };
- }
- if (token) {
- formatTokenFunctions[token] = func;
- }
- if (padded) {
- formatTokenFunctions[padded[0]] = function () {
- return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
- };
- }
- if (ordinal) {
- formatTokenFunctions[ordinal] = function () {
- return this.localeData().ordinal(
- func.apply(this, arguments),
- token
- );
- };
+ assert: function (context) {
+ return this.__propagate("assert", context.set(this.alias, context.fact.object));
+ },
+
+ modify: function (context) {
+ return this.__propagate("modify", context.set(this.alias, context.fact.object));
+ },
+
+ retract: function (context) {
+ return this.__propagate("retract", context.set(this.alias, context.fact.object));
+ },
+
+ equal: function (other) {
+ return other instanceof this._static && this.alias === other.alias;
}
}
+}).as(module);
- function removeFormattingTokens(input) {
- if (input.match(/\[[\s\S]/)) {
- return input.replace(/^\[|\]$/g, '');
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/alphaNode.js":
+/*!*******************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/alphaNode.js ***!
+ \*******************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+/* module decorator */ module = __webpack_require__.nmd(module);
+
+var Node = __webpack_require__(/*! ./node */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/node.js");
+
+Node.extend({
+ instance: {
+ constructor: function (constraint) {
+ this._super([]);
+ this.constraint = constraint;
+ this.constraintAssert = this.constraint.assert;
+ },
+
+ toString: function () {
+ return "AlphaNode " + this.__count;
+ },
+
+ equal: function (constraint) {
+ return this.constraint.equal(constraint.constraint);
}
- return input.replace(/\\/g, '');
}
+}).as(module);
- function makeFormatFunction(format) {
- var array = format.match(formattingTokens),
- i,
- length;
+/***/ }),
- for (i = 0, length = array.length; i < length; i++) {
- if (formatTokenFunctions[array[i]]) {
- array[i] = formatTokenFunctions[array[i]];
- } else {
- array[i] = removeFormattingTokens(array[i]);
- }
- }
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/betaNode.js":
+/*!******************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/betaNode.js ***!
+ \******************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- return function (mom) {
- var output = '',
- i;
- for (i = 0; i < length; i++) {
- output += isFunction(array[i])
- ? array[i].call(mom, format)
- : array[i];
- }
- return output;
- };
- }
+/* module decorator */ module = __webpack_require__.nmd(module);
+var extd = __webpack_require__(/*! ../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ keys = extd.hash.keys,
+ Node = __webpack_require__(/*! ./node */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/node.js"),
+ LeftMemory = __webpack_require__(/*! ./misc/leftMemory */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/leftMemory.js"), RightMemory = __webpack_require__(/*! ./misc/rightMemory */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/rightMemory.js");
- // format date using native date object
- function formatMoment(m, format) {
- if (!m.isValid()) {
- return m.localeData().invalidDate();
- }
+Node.extend({
- format = expandFormat(format, m.localeData());
- formatFunctions[format] =
- formatFunctions[format] || makeFormatFunction(format);
+ instance: {
- return formatFunctions[format](m);
- }
+ nodeType: "BetaNode",
- function expandFormat(format, locale) {
- var i = 5;
+ constructor: function () {
+ this._super([]);
+ this.leftMemory = {};
+ this.rightMemory = {};
+ this.leftTuples = new LeftMemory();
+ this.rightTuples = new RightMemory();
+ },
- function replaceLongDateFormatTokens(input) {
- return locale.longDateFormat(input) || input;
- }
+ __propagate: function (method, context) {
+ var entrySet = this.__entrySet, i = entrySet.length, entry, outNode;
+ while (--i > -1) {
+ entry = entrySet[i];
+ outNode = entry.key;
+ outNode[method](context);
+ }
+ },
- localFormattingTokens.lastIndex = 0;
- while (i >= 0 && localFormattingTokens.test(format)) {
- format = format.replace(
- localFormattingTokens,
- replaceLongDateFormatTokens
- );
- localFormattingTokens.lastIndex = 0;
- i -= 1;
- }
+ dispose: function () {
+ this.leftMemory = {};
+ this.rightMemory = {};
+ this.leftTuples.clear();
+ this.rightTuples.clear();
+ },
- return format;
- }
+ disposeLeft: function (fact) {
+ this.leftMemory = {};
+ this.leftTuples.clear();
+ this.propagateDispose(fact);
+ },
- var defaultLongDateFormat = {
- LTS: 'h:mm:ss A',
- LT: 'h:mm A',
- L: 'MM/DD/YYYY',
- LL: 'MMMM D, YYYY',
- LLL: 'MMMM D, YYYY h:mm A',
- LLLL: 'dddd, MMMM D, YYYY h:mm A',
- };
+ disposeRight: function (fact) {
+ this.rightMemory = {};
+ this.rightTuples.clear();
+ this.propagateDispose(fact);
+ },
- function longDateFormat(key) {
- var format = this._longDateFormat[key],
- formatUpper = this._longDateFormat[key.toUpperCase()];
+ hashCode: function () {
+ return this.nodeType + " " + this.__count;
+ },
- if (format || !formatUpper) {
- return format;
- }
+ toString: function () {
+ return this.nodeType + " " + this.__count;
+ },
- this._longDateFormat[key] = formatUpper
- .match(formattingTokens)
- .map(function (tok) {
- if (
- tok === 'MMMM' ||
- tok === 'MM' ||
- tok === 'DD' ||
- tok === 'dddd'
- ) {
- return tok.slice(1);
- }
- return tok;
- })
- .join('');
+ retractLeft: function (context) {
+ context = this.removeFromLeftMemory(context).data;
+ var rightMatches = context.rightMatches,
+ hashCodes = keys(rightMatches),
+ i = -1,
+ l = hashCodes.length;
+ while (++i < l) {
+ this.__propagate("retract", rightMatches[hashCodes[i]].clone());
+ }
+ },
- return this._longDateFormat[key];
- }
+ retractRight: function (context) {
+ context = this.removeFromRightMemory(context).data;
+ var leftMatches = context.leftMatches,
+ hashCodes = keys(leftMatches),
+ i = -1,
+ l = hashCodes.length;
+ while (++i < l) {
+ this.__propagate("retract", leftMatches[hashCodes[i]].clone());
+ }
+ },
- var defaultInvalidDate = 'Invalid date';
+ assertLeft: function (context) {
+ this.__addToLeftMemory(context);
+ var rm = this.rightTuples.getRightMemory(context), i = -1, l = rm.length;
+ while (++i < l) {
+ this.propagateFromLeft(context, rm[i].data);
+ }
+ },
- function invalidDate() {
- return this._invalidDate;
- }
+ assertRight: function (context) {
+ this.__addToRightMemory(context);
+ var lm = this.leftTuples.getLeftMemory(context), i = -1, l = lm.length;
+ while (++i < l) {
+ this.propagateFromRight(context, lm[i].data);
+ }
+ },
- var defaultOrdinal = '%d',
- defaultDayOfMonthOrdinalParse = /\d{1,2}/;
+ modifyLeft: function (context) {
+ var previousContext = this.removeFromLeftMemory(context).data;
+ this.__addToLeftMemory(context);
+ var rm = this.rightTuples.getRightMemory(context), l = rm.length, i = -1, rightMatches;
+ if (!l) {
+ this.propagateRetractModifyFromLeft(previousContext);
+ } else {
+ rightMatches = previousContext.rightMatches;
+ while (++i < l) {
+ this.propagateAssertModifyFromLeft(context, rightMatches, rm[i].data);
+ }
- function ordinal(number) {
- return this._ordinal.replace('%d', number);
- }
+ }
+ },
- var defaultRelativeTime = {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- w: 'a week',
- ww: '%d weeks',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years',
- };
+ modifyRight: function (context) {
+ var previousContext = this.removeFromRightMemory(context).data;
+ this.__addToRightMemory(context);
+ var lm = this.leftTuples.getLeftMemory(context);
+ if (!lm.length) {
+ this.propagateRetractModifyFromRight(previousContext);
+ } else {
+ var leftMatches = previousContext.leftMatches, i = -1, l = lm.length;
+ while (++i < l) {
+ this.propagateAssertModifyFromRight(context, leftMatches, lm[i].data);
+ }
+ }
+ },
- function relativeTime(number, withoutSuffix, string, isFuture) {
- var output = this._relativeTime[string];
- return isFunction(output)
- ? output(number, withoutSuffix, string, isFuture)
- : output.replace(/%d/i, number);
- }
+ propagateFromLeft: function (context, rc) {
+ this.__propagate("assert", this.__addToMemoryMatches(rc, context, context.clone(null, null, context.match.merge(rc.match))));
+ },
- function pastFuture(diff, output) {
- var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
- return isFunction(format) ? format(output) : format.replace(/%s/i, output);
- }
+ propagateFromRight: function (context, lc) {
+ this.__propagate("assert", this.__addToMemoryMatches(context, lc, lc.clone(null, null, lc.match.merge(context.match))));
+ },
- var aliases = {};
+ propagateRetractModifyFromLeft: function (context) {
+ var rightMatches = context.rightMatches,
+ hashCodes = keys(rightMatches),
+ l = hashCodes.length,
+ i = -1;
+ while (++i < l) {
+ this.__propagate("retract", rightMatches[hashCodes[i]].clone());
+ }
+ },
- function addUnitAlias(unit, shorthand) {
- var lowerCase = unit.toLowerCase();
- aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
- }
+ propagateRetractModifyFromRight: function (context) {
+ var leftMatches = context.leftMatches,
+ hashCodes = keys(leftMatches),
+ l = hashCodes.length,
+ i = -1;
+ while (++i < l) {
+ this.__propagate("retract", leftMatches[hashCodes[i]].clone());
+ }
+ },
- function normalizeUnits(units) {
- return typeof units === 'string'
- ? aliases[units] || aliases[units.toLowerCase()]
- : undefined;
- }
+ propagateAssertModifyFromLeft: function (context, rightMatches, rm) {
+ var factId = rm.hashCode;
+ if (factId in rightMatches) {
+ this.__propagate("modify", this.__addToMemoryMatches(rm, context, context.clone(null, null, context.match.merge(rm.match))));
+ } else {
+ this.propagateFromLeft(context, rm);
+ }
+ },
- function normalizeObjectUnits(inputObject) {
- var normalizedInput = {},
- normalizedProp,
- prop;
+ propagateAssertModifyFromRight: function (context, leftMatches, lm) {
+ var factId = lm.hashCode;
+ if (factId in leftMatches) {
+ this.__propagate("modify", this.__addToMemoryMatches(context, lm, context.clone(null, null, lm.match.merge(context.match))));
+ } else {
+ this.propagateFromRight(context, lm);
+ }
+ },
- for (prop in inputObject) {
- if (hasOwnProp(inputObject, prop)) {
- normalizedProp = normalizeUnits(prop);
- if (normalizedProp) {
- normalizedInput[normalizedProp] = inputObject[prop];
+ removeFromRightMemory: function (context) {
+ var hashCode = context.hashCode, ret;
+ context = this.rightMemory[hashCode] || null;
+ var tuples = this.rightTuples;
+ if (context) {
+ var leftMemory = this.leftMemory;
+ ret = context.data;
+ var leftMatches = ret.leftMatches;
+ tuples.remove(context);
+ var hashCodes = keys(leftMatches), i = -1, l = hashCodes.length;
+ while (++i < l) {
+ delete leftMemory[hashCodes[i]].data.rightMatches[hashCode];
}
+ delete this.rightMemory[hashCode];
}
- }
+ return context;
+ },
- return normalizedInput;
- }
+ removeFromLeftMemory: function (context) {
+ var hashCode = context.hashCode;
+ context = this.leftMemory[hashCode] || null;
+ if (context) {
+ var rightMemory = this.rightMemory;
+ var rightMatches = context.data.rightMatches;
+ this.leftTuples.remove(context);
+ var hashCodes = keys(rightMatches), i = -1, l = hashCodes.length;
+ while (++i < l) {
+ delete rightMemory[hashCodes[i]].data.leftMatches[hashCode];
+ }
+ delete this.leftMemory[hashCode];
+ }
+ return context;
+ },
- var priorities = {};
+ getRightMemoryMatches: function (context) {
+ var lm = this.leftMemory[context.hashCode], ret = {};
+ if (lm) {
+ ret = lm.rightMatches;
+ }
+ return ret;
+ },
- function addUnitPriority(unit, priority) {
- priorities[unit] = priority;
- }
+ __addToMemoryMatches: function (rightContext, leftContext, createdContext) {
+ var rightFactId = rightContext.hashCode,
+ rm = this.rightMemory[rightFactId],
+ lm, leftFactId = leftContext.hashCode;
+ if (rm) {
+ rm = rm.data;
+ if (leftFactId in rm.leftMatches) {
+ throw new Error("Duplicate left fact entry");
+ }
+ rm.leftMatches[leftFactId] = createdContext;
+ }
+ lm = this.leftMemory[leftFactId];
+ if (lm) {
+ lm = lm.data;
+ if (rightFactId in lm.rightMatches) {
+ throw new Error("Duplicate right fact entry");
+ }
+ lm.rightMatches[rightFactId] = createdContext;
+ }
+ return createdContext;
+ },
- function getPrioritizedUnits(unitsObj) {
- var units = [],
- u;
- for (u in unitsObj) {
- if (hasOwnProp(unitsObj, u)) {
- units.push({ unit: u, priority: priorities[u] });
+ __addToRightMemory: function (context) {
+ var hashCode = context.hashCode, rm = this.rightMemory;
+ if (hashCode in rm) {
+ return false;
}
- }
- units.sort(function (a, b) {
- return a.priority - b.priority;
- });
- return units;
- }
+ rm[hashCode] = this.rightTuples.push(context);
+ context.leftMatches = {};
+ return true;
+ },
- function isLeapYear(year) {
- return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
- }
- function absFloor(number) {
- if (number < 0) {
- // -0 -> 0
- return Math.ceil(number) || 0;
- } else {
- return Math.floor(number);
+ __addToLeftMemory: function (context) {
+ var hashCode = context.hashCode, lm = this.leftMemory;
+ if (hashCode in lm) {
+ return false;
+ }
+ lm[hashCode] = this.leftTuples.push(context);
+ context.rightMatches = {};
+ return true;
}
}
- function toInt(argumentForCoercion) {
- var coercedNumber = +argumentForCoercion,
- value = 0;
+}).as(module);
- if (coercedNumber !== 0 && isFinite(coercedNumber)) {
- value = absFloor(coercedNumber);
- }
+/***/ }),
- return value;
- }
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/equalityNode.js":
+/*!**********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/equalityNode.js ***!
+ \**********************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- function makeGetSet(unit, keepTime) {
- return function (value) {
- if (value != null) {
- set$1(this, unit, value);
- hooks.updateOffset(this, keepTime);
- return this;
- } else {
- return get(this, unit);
+/* module decorator */ module = __webpack_require__.nmd(module);
+var AlphaNode = __webpack_require__(/*! ./alphaNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/alphaNode.js");
+
+AlphaNode.extend({
+ instance: {
+
+ constructor: function () {
+ this.memory = {};
+ this._super(arguments);
+ this.constraintAssert = this.constraint.assert;
+ },
+
+ assert: function (context) {
+ if ((this.memory[context.pathsHash] = this.constraintAssert(context.factHash))) {
+ this.__propagate("assert", context);
}
- };
- }
+ },
- function get(mom, unit) {
- return mom.isValid()
- ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
- : NaN;
- }
+ modify: function (context) {
+ var memory = this.memory,
+ hashCode = context.pathsHash,
+ wasMatch = memory[hashCode];
+ if ((memory[hashCode] = this.constraintAssert(context.factHash))) {
+ this.__propagate(wasMatch ? "modify" : "assert", context);
+ } else if (wasMatch) {
+ this.__propagate("retract", context);
+ }
+ },
- function set$1(mom, unit, value) {
- if (mom.isValid() && !isNaN(value)) {
- if (
- unit === 'FullYear' &&
- isLeapYear(mom.year()) &&
- mom.month() === 1 &&
- mom.date() === 29
- ) {
- value = toInt(value);
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
- value,
- mom.month(),
- daysInMonth(value, mom.month())
- );
- } else {
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
+ retract: function (context) {
+ var hashCode = context.pathsHash,
+ memory = this.memory;
+ if (memory[hashCode]) {
+ this.__propagate("retract", context);
}
+ delete memory[hashCode];
+ },
+
+ toString: function () {
+ return "EqualityNode" + this.__count;
}
}
+}).as(module);
- // MOMENTS
+/***/ }),
- function stringGet(units) {
- units = normalizeUnits(units);
- if (isFunction(this[units])) {
- return this[units]();
- }
- return this;
- }
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/existsFromNode.js":
+/*!************************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/existsFromNode.js ***!
+ \************************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- function stringSet(units, value) {
- if (typeof units === 'object') {
- units = normalizeObjectUnits(units);
- var prioritized = getPrioritizedUnits(units),
- i;
- for (i = 0; i < prioritized.length; i++) {
- this[prioritized[i].unit](units[prioritized[i].unit]);
+/* module decorator */ module = __webpack_require__.nmd(module);
+var FromNotNode = __webpack_require__(/*! ./fromNotNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/fromNotNode.js"),
+ extd = __webpack_require__(/*! ../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ Context = __webpack_require__(/*! ../context */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/context.js"),
+ isDefined = extd.isDefined,
+ isArray = extd.isArray;
+
+FromNotNode.extend({
+ instance: {
+
+ nodeType: "ExistsFromNode",
+
+ retractLeft: function (context) {
+ var ctx = this.removeFromLeftMemory(context);
+ if (ctx) {
+ ctx = ctx.data;
+ if (ctx.blocked) {
+ this.__propagate("retract", ctx.clone());
+ }
}
- } else {
- units = normalizeUnits(units);
- if (isFunction(this[units])) {
- return this[units](value);
+ },
+
+ __modify: function (context, leftContext) {
+ var leftContextBlocked = leftContext.blocked;
+ var fh = context.factHash, o = this.from(fh);
+ if (isArray(o)) {
+ for (var i = 0, l = o.length; i < l; i++) {
+ if (this.__isMatch(context, o[i], true)) {
+ context.blocked = true;
+ break;
+ }
+ }
+ } else if (isDefined(o)) {
+ context.blocked = this.__isMatch(context, o, true);
+ }
+ var newContextBlocked = context.blocked;
+ if (newContextBlocked) {
+ if (leftContextBlocked) {
+ this.__propagate("modify", context.clone());
+ } else {
+ this.__propagate("assert", context.clone());
+ }
+ } else if (leftContextBlocked) {
+ this.__propagate("retract", context.clone());
}
- }
- return this;
- }
- var match1 = /\d/, // 0 - 9
- match2 = /\d\d/, // 00 - 99
- match3 = /\d{3}/, // 000 - 999
- match4 = /\d{4}/, // 0000 - 9999
- match6 = /[+-]?\d{6}/, // -999999 - 999999
- match1to2 = /\d\d?/, // 0 - 99
- match3to4 = /\d\d\d\d?/, // 999 - 9999
- match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
- match1to3 = /\d{1,3}/, // 0 - 999
- match1to4 = /\d{1,4}/, // 0 - 9999
- match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
- matchUnsigned = /\d+/, // 0 - inf
- matchSigned = /[+-]?\d+/, // -inf - inf
- matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
- matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
- matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
- // any word (or two) characters or numbers including two/three word month in arabic.
- // includes scottish gaelic two word and hyphenated months
- matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
- regexes;
+ },
- regexes = {};
+ __findMatches: function (context) {
+ var fh = context.factHash, o = this.from(fh), isMatch = false;
+ if (isArray(o)) {
+ for (var i = 0, l = o.length; i < l; i++) {
+ if (this.__isMatch(context, o[i], true)) {
+ context.blocked = true;
+ this.__propagate("assert", context.clone());
+ return;
+ }
+ }
+ } else if (isDefined(o) && (this.__isMatch(context, o, true))) {
+ context.blocked = true;
+ this.__propagate("assert", context.clone());
+ }
+ return isMatch;
+ },
- function addRegexToken(token, regex, strictRegex) {
- regexes[token] = isFunction(regex)
- ? regex
- : function (isStrict, localeData) {
- return isStrict && strictRegex ? strictRegex : regex;
- };
- }
+ __isMatch: function (oc, o, add) {
+ var ret = false;
+ if (this.type(o)) {
+ var createdFact = this.workingMemory.getFactHandle(o);
+ var context = new Context(createdFact, null, null)
+ .mergeMatch(oc.match)
+ .set(this.alias, o);
+ if (add) {
+ var fm = this.fromMemory[createdFact.id];
+ if (!fm) {
+ fm = this.fromMemory[createdFact.id] = {};
+ }
+ fm[oc.hashCode] = oc;
+ }
+ var fh = context.factHash;
+ var eqConstraints = this.__equalityConstraints;
+ for (var i = 0, l = eqConstraints.length; i < l; i++) {
+ if (eqConstraints[i](fh)) {
+ ret = true;
+ } else {
+ ret = false;
+ break;
+ }
+ }
+ }
+ return ret;
+ },
- function getParseRegexForToken(token, config) {
- if (!hasOwnProp(regexes, token)) {
- return new RegExp(unescapeFormat(token));
+ assertLeft: function (context) {
+ this.__addToLeftMemory(context);
+ this.__findMatches(context);
}
- return regexes[token](config._strict, config._locale);
}
+}).as(module);
- // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
- function unescapeFormat(s) {
- return regexEscape(
- s
- .replace('\\', '')
- .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (
- matched,
- p1,
- p2,
- p3,
- p4
- ) {
- return p1 || p2 || p3 || p4;
- })
- );
- }
+/***/ }),
- function regexEscape(s) {
- return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
- }
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/existsNode.js":
+/*!********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/existsNode.js ***!
+ \********************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- var tokens = {};
+/* module decorator */ module = __webpack_require__.nmd(module);
+var NotNode = __webpack_require__(/*! ./notNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/notNode.js"),
+ LinkedList = __webpack_require__(/*! ../linkedList */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/linkedList.js");
- function addParseToken(token, callback) {
- var i,
- func = callback;
- if (typeof token === 'string') {
- token = [token];
- }
- if (isNumber(callback)) {
- func = function (input, array) {
- array[callback] = toInt(input);
- };
- }
- for (i = 0; i < token.length; i++) {
- tokens[token[i]] = func;
- }
- }
- function addWeekParseToken(token, callback) {
- addParseToken(token, function (input, array, config, token) {
- config._w = config._w || {};
- callback(input, config._w, config, token);
- });
- }
+NotNode.extend({
+ instance: {
- function addTimeToArrayFromToken(token, input, config) {
- if (input != null && hasOwnProp(tokens, token)) {
- tokens[token](input, config._a, config, token);
- }
- }
+ nodeType: "ExistsNode",
- var YEAR = 0,
- MONTH = 1,
- DATE = 2,
- HOUR = 3,
- MINUTE = 4,
- SECOND = 5,
- MILLISECOND = 6,
- WEEK = 7,
- WEEKDAY = 8;
+ blockedContext: function (leftContext, rightContext) {
+ leftContext.blocker = rightContext;
+ this.removeFromLeftMemory(leftContext);
+ this.addToLeftBlockedMemory(rightContext.blocking.push(leftContext));
+ this.__propagate("assert", this.__cloneContext(leftContext));
+ },
- function mod(n, x) {
- return ((n % x) + x) % x;
- }
+ notBlockedContext: function (leftContext, propagate) {
+ this.__addToLeftMemory(leftContext);
+ propagate && this.__propagate("retract", this.__cloneContext(leftContext));
+ },
- var indexOf;
+ propagateFromLeft: function (leftContext) {
+ this.notBlockedContext(leftContext, false);
+ },
- if (Array.prototype.indexOf) {
- indexOf = Array.prototype.indexOf;
- } else {
- indexOf = function (o) {
- // I know
- var i;
- for (i = 0; i < this.length; ++i) {
- if (this[i] === o) {
- return i;
+
+ retractLeft: function (context) {
+ var ctx;
+ if (!this.removeFromLeftMemory(context)) {
+ if ((ctx = this.removeFromLeftBlockedMemory(context))) {
+ this.__propagate("retract", this.__cloneContext(ctx.data));
+ } else {
+ throw new Error();
}
}
- return -1;
- };
- }
+ },
+
+ modifyLeft: function (context) {
+ var ctx = this.removeFromLeftMemory(context),
+ leftContext,
+ thisConstraint = this.constraint,
+ rightTuples = this.rightTuples,
+ l = rightTuples.length,
+ isBlocked = false,
+ node, rc, blocker;
+ if (!ctx) {
+ //blocked before
+ ctx = this.removeFromLeftBlockedMemory(context);
+ isBlocked = true;
+ }
+ if (ctx) {
+ leftContext = ctx.data;
+
+ if (leftContext && leftContext.blocker) {
+ //we were blocked before so only check nodes previous to our blocker
+ blocker = this.rightMemory[leftContext.blocker.hashCode];
+ }
+ if (blocker) {
+ if (thisConstraint.isMatch(context, rc = blocker.data)) {
+ //propogate as a modify or assert
+ this.__propagate(!isBlocked ? "assert" : "modify", this.__cloneContext(leftContext));
+ context.blocker = rc;
+ this.addToLeftBlockedMemory(rc.blocking.push(context));
+ context = null;
+ }
+ if (context) {
+ node = {next: blocker.next};
+ }
+ } else {
+ node = {next: rightTuples.head};
+ }
+ if (context && l) {
+ node = {next: rightTuples.head};
+ //we were propagated before
+ while ((node = node.next)) {
+ if (thisConstraint.isMatch(context, rc = node.data)) {
+ //we cant be proagated so retract previous
+
+ //we were asserted before so retract
+ this.__propagate(!isBlocked ? "assert" : "modify", this.__cloneContext(leftContext));
+
+ this.addToLeftBlockedMemory(rc.blocking.push(context));
+ context.blocker = rc;
+ context = null;
+ break;
+ }
+ }
+ }
+ if (context) {
+ //we can still be propogated
+ this.__addToLeftMemory(context);
+ if (isBlocked) {
+ //we were blocked so retract
+ this.__propagate("retract", this.__cloneContext(context));
+ }
+
+ }
+ } else {
+ throw new Error();
+ }
+
+ },
+
+ modifyRight: function (context) {
+ var ctx = this.removeFromRightMemory(context);
+ if (ctx) {
+ var rightContext = ctx.data,
+ leftTuples = this.leftTuples,
+ leftTuplesLength = leftTuples.length,
+ leftContext,
+ thisConstraint = this.constraint,
+ node,
+ blocking = rightContext.blocking;
+ this.__addToRightMemory(context);
+ context.blocking = new LinkedList();
+ if (leftTuplesLength || blocking.length) {
+ if (blocking.length) {
+ var rc;
+ //check old blocked contexts
+ //check if the same contexts blocked before are still blocked
+ var blockingNode = {next: blocking.head};
+ while ((blockingNode = blockingNode.next)) {
+ leftContext = blockingNode.data;
+ leftContext.blocker = null;
+ if (thisConstraint.isMatch(leftContext, context)) {
+ leftContext.blocker = context;
+ this.addToLeftBlockedMemory(context.blocking.push(leftContext));
+ this.__propagate("assert", this.__cloneContext(leftContext));
+ leftContext = null;
+ } else {
+ //we arent blocked anymore
+ leftContext.blocker = null;
+ node = ctx;
+ while ((node = node.next)) {
+ if (thisConstraint.isMatch(leftContext, rc = node.data)) {
+ leftContext.blocker = rc;
+ this.addToLeftBlockedMemory(rc.blocking.push(leftContext));
+ this.__propagate("assert", this.__cloneContext(leftContext));
+ leftContext = null;
+ break;
+ }
+ }
+ if (leftContext) {
+ this.__addToLeftMemory(leftContext);
+ }
+ }
+ }
+ }
+
+ if (leftTuplesLength) {
+ //check currently left tuples in memory
+ node = {next: leftTuples.head};
+ while ((node = node.next)) {
+ leftContext = node.data;
+ if (thisConstraint.isMatch(leftContext, context)) {
+ this.__propagate("assert", this.__cloneContext(leftContext));
+ this.removeFromLeftMemory(leftContext);
+ this.addToLeftBlockedMemory(context.blocking.push(leftContext));
+ leftContext.blocker = context;
+ }
+ }
+ }
+
+
+ }
+ } else {
+ throw new Error();
+ }
+
- function daysInMonth(year, month) {
- if (isNaN(year) || isNaN(month)) {
- return NaN;
}
- var modMonth = mod(month, 12);
- year += (month - modMonth) / 12;
- return modMonth === 1
- ? isLeapYear(year)
- ? 29
- : 28
- : 31 - ((modMonth % 7) % 2);
}
+}).as(module);
- // FORMATTING
-
- addFormatToken('M', ['MM', 2], 'Mo', function () {
- return this.month() + 1;
- });
+/***/ }),
- addFormatToken('MMM', 0, 0, function (format) {
- return this.localeData().monthsShort(this, format);
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/fromNode.js":
+/*!******************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/fromNode.js ***!
+ \******************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- addFormatToken('MMMM', 0, 0, function (format) {
- return this.localeData().months(this, format);
- });
+/* module decorator */ module = __webpack_require__.nmd(module);
+var JoinNode = __webpack_require__(/*! ./joinNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/joinNode.js"),
+ extd = __webpack_require__(/*! ../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ constraint = __webpack_require__(/*! ../constraint */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/constraint.js"),
+ EqualityConstraint = constraint.EqualityConstraint,
+ HashConstraint = constraint.HashConstraint,
+ ReferenceConstraint = constraint.ReferenceConstraint,
+ Context = __webpack_require__(/*! ../context */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/context.js"),
+ isDefined = extd.isDefined,
+ isEmpty = extd.isEmpty,
+ forEach = extd.forEach,
+ isArray = extd.isArray;
- // ALIASES
+var DEFAULT_MATCH = {
+ isMatch: function () {
+ return false;
+ }
+};
- addUnitAlias('month', 'M');
+JoinNode.extend({
+ instance: {
- // PRIORITY
+ nodeType: "FromNode",
- addUnitPriority('month', 8);
+ constructor: function (pattern, wm) {
+ this._super(arguments);
+ this.workingMemory = wm;
+ this.fromMemory = {};
+ this.pattern = pattern;
+ this.type = pattern.get("constraints")[0].assert;
+ this.alias = pattern.get("alias");
+ this.from = pattern.from.assert;
+ var eqConstraints = this.__equalityConstraints = [];
+ var vars = [];
+ forEach(this.constraints = this.pattern.get("constraints").slice(1), function (c) {
+ if (c instanceof EqualityConstraint || c instanceof ReferenceConstraint) {
+ eqConstraints.push(c.assert);
+ } else if (c instanceof HashConstraint) {
+ vars = vars.concat(c.get("variables"));
+ }
+ });
+ this.__variables = vars;
+ },
- // PARSING
+ __createMatches: function (context) {
+ var fh = context.factHash, o = this.from(fh);
+ if (isArray(o)) {
+ for (var i = 0, l = o.length; i < l; i++) {
+ this.__checkMatch(context, o[i], true);
+ }
+ } else if (isDefined(o)) {
+ this.__checkMatch(context, o, true);
+ }
+ },
- addRegexToken('M', match1to2);
- addRegexToken('MM', match1to2, match2);
- addRegexToken('MMM', function (isStrict, locale) {
- return locale.monthsShortRegex(isStrict);
- });
- addRegexToken('MMMM', function (isStrict, locale) {
- return locale.monthsRegex(isStrict);
- });
+ __checkMatch: function (context, o, propogate) {
+ var newContext;
+ if ((newContext = this.__createMatch(context, o)).isMatch() && propogate) {
+ this.__propagate("assert", newContext.clone());
+ }
+ return newContext;
+ },
- addParseToken(['M', 'MM'], function (input, array) {
- array[MONTH] = toInt(input) - 1;
- });
+ __createMatch: function (lc, o) {
+ if (this.type(o)) {
+ var createdFact = this.workingMemory.getFactHandle(o, true),
+ createdContext,
+ rc = new Context(createdFact, null, null)
+ .set(this.alias, o),
+ createdFactId = createdFact.id;
+ var fh = rc.factHash, lcFh = lc.factHash;
+ for (var key in lcFh) {
+ fh[key] = lcFh[key];
+ }
+ var eqConstraints = this.__equalityConstraints, vars = this.__variables, i = -1, l = eqConstraints.length;
+ while (++i < l) {
+ if (!eqConstraints[i](fh, fh)) {
+ createdContext = DEFAULT_MATCH;
+ break;
+ }
+ }
+ var fm = this.fromMemory[createdFactId];
+ if (!fm) {
+ fm = this.fromMemory[createdFactId] = {};
+ }
+ if (!createdContext) {
+ var prop;
+ i = -1;
+ l = vars.length;
+ while (++i < l) {
+ prop = vars[i];
+ fh[prop] = o[prop];
+ }
+ lc.fromMatches[createdFact.id] = createdContext = rc.clone(createdFact, null, lc.match.merge(rc.match));
+ }
+ fm[lc.hashCode] = [lc, createdContext];
+ return createdContext;
+ }
+ return DEFAULT_MATCH;
+ },
- addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
- var month = config._locale.monthsParse(input, token, config._strict);
- // if we didn't find a month name, mark the date as invalid.
- if (month != null) {
- array[MONTH] = month;
- } else {
- getParsingFlags(config).invalidMonth = input;
- }
- });
+ retractRight: function () {
+ throw new Error("Shouldnt have gotten here");
+ },
- // LOCALES
+ removeFromFromMemory: function (context) {
+ var factId = context.fact.id;
+ var fm = this.fromMemory[factId];
+ if (fm) {
+ var entry;
+ for (var i in fm) {
+ entry = fm[i];
+ if (entry[1] === context) {
+ delete fm[i];
+ if (isEmpty(fm)) {
+ delete this.fromMemory[factId];
+ }
+ break;
+ }
+ }
+ }
- var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
- '_'
- ),
- defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split(
- '_'
- ),
- MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
- defaultMonthsShortRegex = matchWord,
- defaultMonthsRegex = matchWord;
+ },
- function localeMonths(m, format) {
- if (!m) {
- return isArray(this._months)
- ? this._months
- : this._months['standalone'];
- }
- return isArray(this._months)
- ? this._months[m.month()]
- : this._months[
- (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
- ? 'format'
- : 'standalone'
- ][m.month()];
- }
+ retractLeft: function (context) {
+ var ctx = this.removeFromLeftMemory(context);
+ if (ctx) {
+ ctx = ctx.data;
+ var fromMatches = ctx.fromMatches;
+ for (var i in fromMatches) {
+ this.removeFromFromMemory(fromMatches[i]);
+ this.__propagate("retract", fromMatches[i].clone());
+ }
+ }
+ },
- function localeMonthsShort(m, format) {
- if (!m) {
- return isArray(this._monthsShort)
- ? this._monthsShort
- : this._monthsShort['standalone'];
- }
- return isArray(this._monthsShort)
- ? this._monthsShort[m.month()]
- : this._monthsShort[
- MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
- ][m.month()];
- }
+ modifyLeft: function (context) {
+ var ctx = this.removeFromLeftMemory(context), newContext, i, l, factId, fact;
+ if (ctx) {
+ this.__addToLeftMemory(context);
- function handleStrictParse(monthName, format, strict) {
- var i,
- ii,
- mom,
- llc = monthName.toLocaleLowerCase();
- if (!this._monthsParse) {
- // this is not used
- this._monthsParse = [];
- this._longMonthsParse = [];
- this._shortMonthsParse = [];
- for (i = 0; i < 12; ++i) {
- mom = createUTC([2000, i]);
- this._shortMonthsParse[i] = this.monthsShort(
- mom,
- ''
- ).toLocaleLowerCase();
- this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
- }
- }
+ var leftContext = ctx.data,
+ fromMatches = (context.fromMatches = {}),
+ rightMatches = leftContext.fromMatches,
+ o = this.from(context.factHash);
- if (strict) {
- if (format === 'MMM') {
- ii = indexOf.call(this._shortMonthsParse, llc);
- return ii !== -1 ? ii : null;
- } else {
- ii = indexOf.call(this._longMonthsParse, llc);
- return ii !== -1 ? ii : null;
- }
- } else {
- if (format === 'MMM') {
- ii = indexOf.call(this._shortMonthsParse, llc);
- if (ii !== -1) {
- return ii;
+ if (isArray(o)) {
+ for (i = 0, l = o.length; i < l; i++) {
+ newContext = this.__checkMatch(context, o[i], false);
+ if (newContext.isMatch()) {
+ factId = newContext.fact.id;
+ if (factId in rightMatches) {
+ this.__propagate("modify", newContext.clone());
+ } else {
+ this.__propagate("assert", newContext.clone());
+ }
+ }
+ }
+ } else if (isDefined(o)) {
+ newContext = this.__checkMatch(context, o, false);
+ if (newContext.isMatch()) {
+ factId = newContext.fact.id;
+ if (factId in rightMatches) {
+ this.__propagate("modify", newContext.clone());
+ } else {
+ this.__propagate("assert", newContext.clone());
+ }
+ }
+ }
+ for (i in rightMatches) {
+ if (!(i in fromMatches)) {
+ this.removeFromFromMemory(rightMatches[i]);
+ this.__propagate("retract", rightMatches[i].clone());
+ }
}
- ii = indexOf.call(this._longMonthsParse, llc);
- return ii !== -1 ? ii : null;
} else {
- ii = indexOf.call(this._longMonthsParse, llc);
- if (ii !== -1) {
- return ii;
+ this.assertLeft(context);
+ }
+ fact = context.fact;
+ factId = fact.id;
+ var fm = this.fromMemory[factId];
+ this.fromMemory[factId] = {};
+ if (fm) {
+ var lc, entry, cc, createdIsMatch, factObject = fact.object;
+ for (i in fm) {
+ entry = fm[i];
+ lc = entry[0];
+ cc = entry[1];
+ createdIsMatch = cc.isMatch();
+ if (lc.hashCode !== context.hashCode) {
+ newContext = this.__createMatch(lc, factObject, false);
+ if (createdIsMatch) {
+ this.__propagate("retract", cc.clone());
+ }
+ if (newContext.isMatch()) {
+ this.__propagate(createdIsMatch ? "modify" : "assert", newContext.clone());
+ }
+
+ }
}
- ii = indexOf.call(this._shortMonthsParse, llc);
- return ii !== -1 ? ii : null;
}
+ },
+
+ assertLeft: function (context) {
+ this.__addToLeftMemory(context);
+ context.fromMatches = {};
+ this.__createMatches(context);
+ },
+
+ assertRight: function () {
+ throw new Error("Shouldnt have gotten here");
}
+
}
+}).as(module);
- function localeMonthsParse(monthName, format, strict) {
- var i, mom, regex;
+/***/ }),
- if (this._monthsParseExact) {
- return handleStrictParse.call(this, monthName, format, strict);
- }
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/fromNotNode.js":
+/*!*********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/fromNotNode.js ***!
+ \*********************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- if (!this._monthsParse) {
- this._monthsParse = [];
- this._longMonthsParse = [];
- this._shortMonthsParse = [];
- }
+/* module decorator */ module = __webpack_require__.nmd(module);
+var JoinNode = __webpack_require__(/*! ./joinNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/joinNode.js"),
+ extd = __webpack_require__(/*! ../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ constraint = __webpack_require__(/*! ../constraint */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/constraint.js"),
+ EqualityConstraint = constraint.EqualityConstraint,
+ HashConstraint = constraint.HashConstraint,
+ ReferenceConstraint = constraint.ReferenceConstraint,
+ Context = __webpack_require__(/*! ../context */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/context.js"),
+ isDefined = extd.isDefined,
+ forEach = extd.forEach,
+ isArray = extd.isArray;
- // TODO: add sorting
- // Sorting makes sure if one month (or abbr) is a prefix of another
- // see sorting in computeMonthsParse
- for (i = 0; i < 12; i++) {
- // make the regex if we don't have it already
- mom = createUTC([2000, i]);
- if (strict && !this._longMonthsParse[i]) {
- this._longMonthsParse[i] = new RegExp(
- '^' + this.months(mom, '').replace('.', '') + '$',
- 'i'
- );
- this._shortMonthsParse[i] = new RegExp(
- '^' + this.monthsShort(mom, '').replace('.', '') + '$',
- 'i'
- );
- }
- if (!strict && !this._monthsParse[i]) {
- regex =
- '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
- this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
- }
- // test the regex
- if (
- strict &&
- format === 'MMMM' &&
- this._longMonthsParse[i].test(monthName)
- ) {
- return i;
- } else if (
- strict &&
- format === 'MMM' &&
- this._shortMonthsParse[i].test(monthName)
- ) {
- return i;
- } else if (!strict && this._monthsParse[i].test(monthName)) {
- return i;
- }
- }
- }
+JoinNode.extend({
+ instance: {
- // MOMENTS
+ nodeType: "FromNotNode",
- function setMonth(mom, value) {
- var dayOfMonth;
+ constructor: function (pattern, workingMemory) {
+ this._super(arguments);
+ this.workingMemory = workingMemory;
+ this.pattern = pattern;
+ this.type = pattern.get("constraints")[0].assert;
+ this.alias = pattern.get("alias");
+ this.from = pattern.from.assert;
+ this.fromMemory = {};
+ var eqConstraints = this.__equalityConstraints = [];
+ var vars = [];
+ forEach(this.constraints = this.pattern.get("constraints").slice(1), function (c) {
+ if (c instanceof EqualityConstraint || c instanceof ReferenceConstraint) {
+ eqConstraints.push(c.assert);
+ } else if (c instanceof HashConstraint) {
+ vars = vars.concat(c.get("variables"));
+ }
+ });
+ this.__variables = vars;
- if (!mom.isValid()) {
- // No op
- return mom;
- }
+ },
- if (typeof value === 'string') {
- if (/^\d+$/.test(value)) {
- value = toInt(value);
- } else {
- value = mom.localeData().monthsParse(value);
- // TODO: Another silent failure?
- if (!isNumber(value)) {
- return mom;
+ retractLeft: function (context) {
+ var ctx = this.removeFromLeftMemory(context);
+ if (ctx) {
+ ctx = ctx.data;
+ if (!ctx.blocked) {
+ this.__propagate("retract", ctx.clone());
}
}
- }
-
- dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
- return mom;
- }
+ },
- function getSetMonth(value) {
- if (value != null) {
- setMonth(this, value);
- hooks.updateOffset(this, true);
- return this;
- } else {
- return get(this, 'Month');
- }
- }
+ __modify: function (context, leftContext) {
+ var leftContextBlocked = leftContext.blocked;
+ var fh = context.factHash, o = this.from(fh);
+ if (isArray(o)) {
+ for (var i = 0, l = o.length; i < l; i++) {
+ if (this.__isMatch(context, o[i], true)) {
+ context.blocked = true;
+ break;
+ }
+ }
+ } else if (isDefined(o)) {
+ context.blocked = this.__isMatch(context, o, true);
+ }
+ var newContextBlocked = context.blocked;
+ if (!newContextBlocked) {
+ if (leftContextBlocked) {
+ this.__propagate("assert", context.clone());
+ } else {
+ this.__propagate("modify", context.clone());
+ }
+ } else if (!leftContextBlocked) {
+ this.__propagate("retract", leftContext.clone());
+ }
- function getDaysInMonth() {
- return daysInMonth(this.year(), this.month());
- }
+ },
- function monthsShortRegex(isStrict) {
- if (this._monthsParseExact) {
- if (!hasOwnProp(this, '_monthsRegex')) {
- computeMonthsParse.call(this);
- }
- if (isStrict) {
- return this._monthsShortStrictRegex;
+ modifyLeft: function (context) {
+ var ctx = this.removeFromLeftMemory(context);
+ if (ctx) {
+ this.__addToLeftMemory(context);
+ this.__modify(context, ctx.data);
} else {
- return this._monthsShortRegex;
+ throw new Error();
}
- } else {
- if (!hasOwnProp(this, '_monthsShortRegex')) {
- this._monthsShortRegex = defaultMonthsShortRegex;
+ var fm = this.fromMemory[context.fact.id];
+ this.fromMemory[context.fact.id] = {};
+ if (fm) {
+ for (var i in fm) {
+ // update any contexts associated with this fact
+ if (i !== context.hashCode) {
+ var lc = fm[i];
+ ctx = this.removeFromLeftMemory(lc);
+ if (ctx) {
+ lc = lc.clone();
+ lc.blocked = false;
+ this.__addToLeftMemory(lc);
+ this.__modify(lc, ctx.data);
+ }
+ }
+ }
}
- return this._monthsShortStrictRegex && isStrict
- ? this._monthsShortStrictRegex
- : this._monthsShortRegex;
- }
- }
+ },
- function monthsRegex(isStrict) {
- if (this._monthsParseExact) {
- if (!hasOwnProp(this, '_monthsRegex')) {
- computeMonthsParse.call(this);
- }
- if (isStrict) {
- return this._monthsStrictRegex;
- } else {
- return this._monthsRegex;
+ __findMatches: function (context) {
+ var fh = context.factHash, o = this.from(fh), isMatch = false;
+ if (isArray(o)) {
+ for (var i = 0, l = o.length; i < l; i++) {
+ if (this.__isMatch(context, o[i], true)) {
+ context.blocked = true;
+ return;
+ }
+ }
+ this.__propagate("assert", context.clone());
+ } else if (isDefined(o) && !(context.blocked = this.__isMatch(context, o, true))) {
+ this.__propagate("assert", context.clone());
}
- } else {
- if (!hasOwnProp(this, '_monthsRegex')) {
- this._monthsRegex = defaultMonthsRegex;
+ return isMatch;
+ },
+
+ __isMatch: function (oc, o, add) {
+ var ret = false;
+ if (this.type(o)) {
+ var createdFact = this.workingMemory.getFactHandle(o);
+ var context = new Context(createdFact, null)
+ .mergeMatch(oc.match)
+ .set(this.alias, o);
+ if (add) {
+ var fm = this.fromMemory[createdFact.id];
+ if (!fm) {
+ fm = this.fromMemory[createdFact.id] = {};
+ }
+ fm[oc.hashCode] = oc;
+ }
+ var fh = context.factHash;
+ var eqConstraints = this.__equalityConstraints;
+ for (var i = 0, l = eqConstraints.length; i < l; i++) {
+ if (eqConstraints[i](fh, fh)) {
+ ret = true;
+ } else {
+ ret = false;
+ break;
+ }
+ }
}
- return this._monthsStrictRegex && isStrict
- ? this._monthsStrictRegex
- : this._monthsRegex;
- }
- }
+ return ret;
+ },
- function computeMonthsParse() {
- function cmpLenRev(a, b) {
- return b.length - a.length;
- }
+ assertLeft: function (context) {
+ this.__addToLeftMemory(context);
+ this.__findMatches(context);
+ },
- var shortPieces = [],
- longPieces = [],
- mixedPieces = [],
- i,
- mom;
- for (i = 0; i < 12; i++) {
- // make the regex if we don't have it already
- mom = createUTC([2000, i]);
- shortPieces.push(this.monthsShort(mom, ''));
- longPieces.push(this.months(mom, ''));
- mixedPieces.push(this.months(mom, ''));
- mixedPieces.push(this.monthsShort(mom, ''));
- }
- // Sorting makes sure if one month (or abbr) is a prefix of another it
- // will match the longer piece.
- shortPieces.sort(cmpLenRev);
- longPieces.sort(cmpLenRev);
- mixedPieces.sort(cmpLenRev);
- for (i = 0; i < 12; i++) {
- shortPieces[i] = regexEscape(shortPieces[i]);
- longPieces[i] = regexEscape(longPieces[i]);
- }
- for (i = 0; i < 24; i++) {
- mixedPieces[i] = regexEscape(mixedPieces[i]);
+ assertRight: function () {
+ throw new Error("Shouldnt have gotten here");
+ },
+
+ retractRight: function () {
+ throw new Error("Shouldnt have gotten here");
}
- this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
- this._monthsShortRegex = this._monthsRegex;
- this._monthsStrictRegex = new RegExp(
- '^(' + longPieces.join('|') + ')',
- 'i'
- );
- this._monthsShortStrictRegex = new RegExp(
- '^(' + shortPieces.join('|') + ')',
- 'i'
- );
}
+}).as(module);
- // FORMATTING
+/***/ }),
- addFormatToken('Y', 0, 0, function () {
- var y = this.year();
- return y <= 9999 ? zeroFill(y, 4) : '+' + y;
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/index.js":
+/*!***************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/index.js ***!
+ \***************************************************************************************************/
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
- addFormatToken(0, ['YY', 2], 0, function () {
- return this.year() % 100;
+"use strict";
+
+var extd = __webpack_require__(/*! ../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ forEach = extd.forEach,
+ some = extd.some,
+ declare = extd.declare,
+ pattern = __webpack_require__(/*! ../pattern.js */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/pattern.js"),
+ ObjectPattern = pattern.ObjectPattern,
+ FromPattern = pattern.FromPattern,
+ FromNotPattern = pattern.FromNotPattern,
+ ExistsPattern = pattern.ExistsPattern,
+ FromExistsPattern = pattern.FromExistsPattern,
+ NotPattern = pattern.NotPattern,
+ CompositePattern = pattern.CompositePattern,
+ InitialFactPattern = pattern.InitialFactPattern,
+ constraints = __webpack_require__(/*! ../constraint */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/constraint.js"),
+ HashConstraint = constraints.HashConstraint,
+ ReferenceConstraint = constraints.ReferenceConstraint,
+ AliasNode = __webpack_require__(/*! ./aliasNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/aliasNode.js"),
+ EqualityNode = __webpack_require__(/*! ./equalityNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/equalityNode.js"),
+ JoinNode = __webpack_require__(/*! ./joinNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/joinNode.js"),
+ BetaNode = __webpack_require__(/*! ./betaNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/betaNode.js"),
+ NotNode = __webpack_require__(/*! ./notNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/notNode.js"),
+ FromNode = __webpack_require__(/*! ./fromNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/fromNode.js"),
+ FromNotNode = __webpack_require__(/*! ./fromNotNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/fromNotNode.js"),
+ ExistsNode = __webpack_require__(/*! ./existsNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/existsNode.js"),
+ ExistsFromNode = __webpack_require__(/*! ./existsFromNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/existsFromNode.js"),
+ LeftAdapterNode = __webpack_require__(/*! ./leftAdapterNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/leftAdapterNode.js"),
+ RightAdapterNode = __webpack_require__(/*! ./rightAdapterNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/rightAdapterNode.js"),
+ TypeNode = __webpack_require__(/*! ./typeNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/typeNode.js"),
+ TerminalNode = __webpack_require__(/*! ./terminalNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/terminalNode.js"),
+ PropertyNode = __webpack_require__(/*! ./propertyNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/propertyNode.js");
+
+function hasRefernceConstraints(pattern) {
+ return some(pattern.constraints || [], function (c) {
+ return c instanceof ReferenceConstraint;
});
+}
- addFormatToken(0, ['YYYY', 4], 0, 'year');
- addFormatToken(0, ['YYYYY', 5], 0, 'year');
- addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
+declare({
+ instance: {
+ constructor: function (wm, agendaTree) {
+ this.terminalNodes = [];
+ this.joinNodes = [];
+ this.nodes = [];
+ this.constraints = [];
+ this.typeNodes = [];
+ this.__ruleCount = 0;
+ this.bucket = {
+ counter: 0,
+ recency: 0
+ };
+ this.agendaTree = agendaTree;
+ this.workingMemory = wm;
+ },
- // ALIASES
+ assertRule: function (rule) {
+ var terminalNode = new TerminalNode(this.bucket, this.__ruleCount++, rule, this.agendaTree);
+ this.__addToNetwork(rule, rule.pattern, terminalNode);
+ this.__mergeJoinNodes();
+ this.terminalNodes.push(terminalNode);
+ },
- addUnitAlias('year', 'y');
+ resetCounter: function () {
+ this.bucket.counter = 0;
+ },
- // PRIORITIES
+ incrementCounter: function () {
+ this.bucket.counter++;
+ },
- addUnitPriority('year', 1);
+ assertFact: function (fact) {
+ var typeNodes = this.typeNodes, i = typeNodes.length - 1;
+ for (; i >= 0; i--) {
+ typeNodes[i].assert(fact);
+ }
+ },
- // PARSING
+ retractFact: function (fact) {
+ var typeNodes = this.typeNodes, i = typeNodes.length - 1;
+ for (; i >= 0; i--) {
+ typeNodes[i].retract(fact);
+ }
+ },
- addRegexToken('Y', matchSigned);
- addRegexToken('YY', match1to2, match2);
- addRegexToken('YYYY', match1to4, match4);
- addRegexToken('YYYYY', match1to6, match6);
- addRegexToken('YYYYYY', match1to6, match6);
+ modifyFact: function (fact) {
+ var typeNodes = this.typeNodes, i = typeNodes.length - 1;
+ for (; i >= 0; i--) {
+ typeNodes[i].modify(fact);
+ }
+ },
- addParseToken(['YYYYY', 'YYYYYY'], YEAR);
- addParseToken('YYYY', function (input, array) {
- array[YEAR] =
- input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
- });
- addParseToken('YY', function (input, array) {
- array[YEAR] = hooks.parseTwoDigitYear(input);
- });
- addParseToken('Y', function (input, array) {
- array[YEAR] = parseInt(input, 10);
- });
- // HELPERS
+ containsRule: function (name) {
+ return some(this.terminalNodes, function (n) {
+ return n.rule.name === name;
+ });
+ },
- function daysInYear(year) {
- return isLeapYear(year) ? 366 : 365;
- }
+ dispose: function () {
+ var typeNodes = this.typeNodes, i = typeNodes.length - 1;
+ for (; i >= 0; i--) {
+ typeNodes[i].dispose();
+ }
+ },
- // HOOKS
+ __mergeJoinNodes: function () {
+ var joinNodes = this.joinNodes;
+ for (var i = 0; i < joinNodes.length; i++) {
+ var j1 = joinNodes[i], j2 = joinNodes[i + 1];
+ if (j1 && j2 && (j1.constraint && j2.constraint && j1.constraint.equal(j2.constraint))) {
+ j1.merge(j2);
+ joinNodes.splice(i + 1, 1);
+ }
+ }
+ },
- hooks.parseTwoDigitYear = function (input) {
- return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
- };
+ __checkEqual: function (node) {
+ var constraints = this.constraints, i = constraints.length - 1;
+ for (; i >= 0; i--) {
+ var n = constraints[i];
+ if (node.equal(n)) {
+ return n;
+ }
+ }
+ constraints.push(node);
+ return node;
+ },
- // MOMENTS
+ __createTypeNode: function (rule, pattern) {
+ var ret = new TypeNode(pattern.get("constraints")[0]);
+ var constraints = this.typeNodes, i = constraints.length - 1;
+ for (; i >= 0; i--) {
+ var n = constraints[i];
+ if (ret.equal(n)) {
+ return n;
+ }
+ }
+ constraints.push(ret);
+ return ret;
+ },
- var getSetYear = makeGetSet('FullYear', true);
+ __createEqualityNode: function (rule, constraint) {
+ return this.__checkEqual(new EqualityNode(constraint)).addRule(rule);
+ },
- function getIsLeapYear() {
- return isLeapYear(this.year());
- }
+ __createPropertyNode: function (rule, constraint) {
+ return this.__checkEqual(new PropertyNode(constraint)).addRule(rule);
+ },
- function createDate(y, m, d, h, M, s, ms) {
- // can't just apply() to create a date:
- // https://stackoverflow.com/q/181348
- var date;
- // the date constructor remaps years 0-99 to 1900-1999
- if (y < 100 && y >= 0) {
- // preserve leap years using a full 400 year cycle, then reset
- date = new Date(y + 400, m, d, h, M, s, ms);
- if (isFinite(date.getFullYear())) {
- date.setFullYear(y);
+ __createAliasNode: function (rule, pattern) {
+ return this.__checkEqual(new AliasNode(pattern)).addRule(rule);
+ },
+
+ __createAdapterNode: function (rule, side) {
+ return (side === "left" ? new LeftAdapterNode() : new RightAdapterNode()).addRule(rule);
+ },
+
+ __createJoinNode: function (rule, pattern, outNode, side) {
+ var joinNode;
+ if (pattern.rightPattern instanceof NotPattern) {
+ joinNode = new NotNode();
+ } else if (pattern.rightPattern instanceof FromExistsPattern) {
+ joinNode = new ExistsFromNode(pattern.rightPattern, this.workingMemory);
+ } else if (pattern.rightPattern instanceof ExistsPattern) {
+ joinNode = new ExistsNode();
+ } else if (pattern.rightPattern instanceof FromNotPattern) {
+ joinNode = new FromNotNode(pattern.rightPattern, this.workingMemory);
+ } else if (pattern.rightPattern instanceof FromPattern) {
+ joinNode = new FromNode(pattern.rightPattern, this.workingMemory);
+ } else if (pattern instanceof CompositePattern && !hasRefernceConstraints(pattern.leftPattern) && !hasRefernceConstraints(pattern.rightPattern)) {
+ joinNode = new BetaNode();
+ this.joinNodes.push(joinNode);
+ } else {
+ joinNode = new JoinNode();
+ this.joinNodes.push(joinNode);
}
- } else {
- date = new Date(y, m, d, h, M, s, ms);
- }
+ joinNode["__rule__"] = rule;
+ var parentNode = joinNode;
+ if (outNode instanceof BetaNode) {
+ var adapterNode = this.__createAdapterNode(rule, side);
+ parentNode.addOutNode(adapterNode, pattern);
+ parentNode = adapterNode;
+ }
+ parentNode.addOutNode(outNode, pattern);
+ return joinNode.addRule(rule);
+ },
- return date;
- }
+ __addToNetwork: function (rule, pattern, outNode, side) {
+ if (pattern instanceof ObjectPattern) {
+ if (!(pattern instanceof InitialFactPattern) && (!side || side === "left")) {
+ this.__createBetaNode(rule, new CompositePattern(new InitialFactPattern(), pattern), outNode, side);
+ } else {
+ this.__createAlphaNode(rule, pattern, outNode, side);
+ }
+ } else if (pattern instanceof CompositePattern) {
+ this.__createBetaNode(rule, pattern, outNode, side);
+ }
+ },
- function createUTCDate(y) {
- var date, args;
- // the Date.UTC function remaps years 0-99 to 1900-1999
- if (y < 100 && y >= 0) {
- args = Array.prototype.slice.call(arguments);
- // preserve leap years using a full 400 year cycle, then reset
- args[0] = y + 400;
- date = new Date(Date.UTC.apply(null, args));
- if (isFinite(date.getUTCFullYear())) {
- date.setUTCFullYear(y);
+ __createBetaNode: function (rule, pattern, outNode, side) {
+ var joinNode = this.__createJoinNode(rule, pattern, outNode, side);
+ this.__addToNetwork(rule, pattern.rightPattern, joinNode, "right");
+ this.__addToNetwork(rule, pattern.leftPattern, joinNode, "left");
+ outNode.addParentNode(joinNode);
+ return joinNode;
+ },
+
+
+ __createAlphaNode: function (rule, pattern, outNode, side) {
+ var typeNode, parentNode;
+ if (!(pattern instanceof FromPattern)) {
+
+ var constraints = pattern.get("constraints");
+ typeNode = this.__createTypeNode(rule, pattern);
+ var aliasNode = this.__createAliasNode(rule, pattern);
+ typeNode.addOutNode(aliasNode, pattern);
+ aliasNode.addParentNode(typeNode);
+ parentNode = aliasNode;
+ var i = constraints.length - 1;
+ for (; i > 0; i--) {
+ var constraint = constraints[i], node;
+ if (constraint instanceof HashConstraint) {
+ node = this.__createPropertyNode(rule, constraint);
+ } else if (constraint instanceof ReferenceConstraint) {
+ outNode.constraint.addConstraint(constraint);
+ continue;
+ } else {
+ node = this.__createEqualityNode(rule, constraint);
+ }
+ parentNode.addOutNode(node, pattern);
+ node.addParentNode(parentNode);
+ parentNode = node;
+ }
+
+ if (outNode instanceof BetaNode) {
+ var adapterNode = this.__createAdapterNode(rule, side);
+ adapterNode.addParentNode(parentNode);
+ parentNode.addOutNode(adapterNode, pattern);
+ parentNode = adapterNode;
+ }
+ outNode.addParentNode(parentNode);
+ parentNode.addOutNode(outNode, pattern);
+ return typeNode;
}
- } else {
- date = new Date(Date.UTC.apply(null, arguments));
- }
+ },
- return date;
+ print: function () {
+ forEach(this.terminalNodes, function (t) {
+ t.print(" ");
+ });
+ }
}
+}).as(exports, "RootNode");
- // start-of-first-week - start-of-year
- function firstWeekOffset(year, dow, doy) {
- var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
- fwd = 7 + dow - doy,
- // first-week day local weekday -- which local weekday is fwd
- fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
- return -fwdlw + fwd - 1;
- }
- // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
- function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
- var localWeekday = (7 + weekday - dow) % 7,
- weekOffset = firstWeekOffset(year, dow, doy),
- dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
- resYear,
- resDayOfYear;
- if (dayOfYear <= 0) {
- resYear = year - 1;
- resDayOfYear = daysInYear(resYear) + dayOfYear;
- } else if (dayOfYear > daysInYear(year)) {
- resYear = year + 1;
- resDayOfYear = dayOfYear - daysInYear(year);
- } else {
- resYear = year;
- resDayOfYear = dayOfYear;
- }
- return {
- year: resYear,
- dayOfYear: resDayOfYear,
- };
- }
- function weekOfYear(mom, dow, doy) {
- var weekOffset = firstWeekOffset(mom.year(), dow, doy),
- week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
- resWeek,
- resYear;
- if (week < 1) {
- resYear = mom.year() - 1;
- resWeek = week + weeksInYear(resYear, dow, doy);
- } else if (week > weeksInYear(mom.year(), dow, doy)) {
- resWeek = week - weeksInYear(mom.year(), dow, doy);
- resYear = mom.year() + 1;
- } else {
- resYear = mom.year();
- resWeek = week;
- }
+/***/ }),
- return {
- week: resWeek,
- year: resYear,
- };
- }
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/joinNode.js":
+/*!******************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/joinNode.js ***!
+ \******************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- function weeksInYear(year, dow, doy) {
- var weekOffset = firstWeekOffset(year, dow, doy),
- weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
- return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
- }
+/* module decorator */ module = __webpack_require__.nmd(module);
+var BetaNode = __webpack_require__(/*! ./betaNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/betaNode.js"),
+ JoinReferenceNode = __webpack_require__(/*! ./joinReferenceNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/joinReferenceNode.js");
- // FORMATTING
+BetaNode.extend({
- addFormatToken('w', ['ww', 2], 'wo', 'week');
- addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
+ instance: {
+ constructor: function () {
+ this._super(arguments);
+ this.constraint = new JoinReferenceNode(this.leftTuples, this.rightTuples);
+ },
- // ALIASES
+ nodeType: "JoinNode",
- addUnitAlias('week', 'w');
- addUnitAlias('isoWeek', 'W');
+ propagateFromLeft: function (context, rm) {
+ var mr;
+ if ((mr = this.constraint.match(context, rm)).isMatch) {
+ this.__propagate("assert", this.__addToMemoryMatches(rm, context, context.clone(null, null, mr)));
+ }
+ return this;
+ },
+
+ propagateFromRight: function (context, lm) {
+ var mr;
+ if ((mr = this.constraint.match(lm, context)).isMatch) {
+ this.__propagate("assert", this.__addToMemoryMatches(context, lm, context.clone(null, null, mr)));
+ }
+ return this;
+ },
- // PRIORITIES
+ propagateAssertModifyFromLeft: function (context, rightMatches, rm) {
+ var factId = rm.hashCode, mr;
+ if (factId in rightMatches) {
+ mr = this.constraint.match(context, rm);
+ var mrIsMatch = mr.isMatch;
+ if (!mrIsMatch) {
+ this.__propagate("retract", rightMatches[factId].clone());
+ } else {
+ this.__propagate("modify", this.__addToMemoryMatches(rm, context, context.clone(null, null, mr)));
+ }
+ } else {
+ this.propagateFromLeft(context, rm);
+ }
+ },
- addUnitPriority('week', 5);
- addUnitPriority('isoWeek', 5);
+ propagateAssertModifyFromRight: function (context, leftMatches, lm) {
+ var factId = lm.hashCode, mr;
+ if (factId in leftMatches) {
+ mr = this.constraint.match(lm, context);
+ var mrIsMatch = mr.isMatch;
+ if (!mrIsMatch) {
+ this.__propagate("retract", leftMatches[factId].clone());
+ } else {
+ this.__propagate("modify", this.__addToMemoryMatches(context, lm, context.clone(null, null, mr)));
+ }
+ } else {
+ this.propagateFromRight(context, lm);
+ }
+ }
+ }
- // PARSING
+}).as(module);
- addRegexToken('w', match1to2);
- addRegexToken('ww', match1to2, match2);
- addRegexToken('W', match1to2);
- addRegexToken('WW', match1to2, match2);
+/***/ }),
- addWeekParseToken(['w', 'ww', 'W', 'WW'], function (
- input,
- week,
- config,
- token
- ) {
- week[token.substr(0, 1)] = toInt(input);
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/joinReferenceNode.js":
+/*!***************************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/joinReferenceNode.js ***!
+ \***************************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- // HELPERS
+/* module decorator */ module = __webpack_require__.nmd(module);
+var Node = __webpack_require__(/*! ./node */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/node.js"),
+ constraints = __webpack_require__(/*! ../constraint */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/constraint.js"),
+ ReferenceEqualityConstraint = constraints.ReferenceEqualityConstraint;
- // LOCALES
+var DEFUALT_CONSTRAINT = {
+ isDefault: true,
+ assert: function () {
+ return true;
+ },
- function localeWeek(mom) {
- return weekOfYear(mom, this._week.dow, this._week.doy).week;
+ equal: function () {
+ return false;
}
+};
- var defaultLocaleWeek = {
- dow: 0, // Sunday is the first day of the week.
- doy: 6, // The week that contains Jan 6th is the first week of the year.
- };
+var inversions = {
+ "gt": "lte",
+ "gte": "lte",
+ "lt": "gte",
+ "lte": "gte",
+ "eq": "eq",
+ "neq": "neq"
+};
- function localeFirstDayOfWeek() {
- return this._week.dow;
+function normalizeRightIndexConstraint(rightIndex, indexes, op) {
+ if (rightIndex === indexes[1]) {
+ op = inversions[op];
}
+ return op;
+}
- function localeFirstDayOfYear() {
- return this._week.doy;
+function normalizeLeftIndexConstraint(leftIndex, indexes, op) {
+ if (leftIndex === indexes[1]) {
+ op = inversions[op];
}
+ return op;
+}
- // MOMENTS
-
- function getSetWeek(input) {
- var week = this.localeData().week(this);
- return input == null ? week : this.add((input - week) * 7, 'd');
- }
+Node.extend({
- function getSetISOWeek(input) {
- var week = weekOfYear(this, 1, 4).week;
- return input == null ? week : this.add((input - week) * 7, 'd');
- }
+ instance: {
- // FORMATTING
+ constraint: DEFUALT_CONSTRAINT,
- addFormatToken('d', 0, 'do', 'day');
+ constructor: function (leftMemory, rightMemory) {
+ this._super(arguments);
+ this.constraint = DEFUALT_CONSTRAINT;
+ this.constraintAssert = DEFUALT_CONSTRAINT.assert;
+ this.rightIndexes = [];
+ this.leftIndexes = [];
+ this.constraintLength = 0;
+ this.leftMemory = leftMemory;
+ this.rightMemory = rightMemory;
+ },
- addFormatToken('dd', 0, 0, function (format) {
- return this.localeData().weekdaysMin(this, format);
- });
+ addConstraint: function (constraint) {
+ if (constraint instanceof ReferenceEqualityConstraint) {
+ var identifiers = constraint.getIndexableProperties();
+ var alias = constraint.get("alias");
+ if (identifiers.length === 2 && alias) {
+ var leftIndex, rightIndex, i = -1, indexes = [];
+ while (++i < 2) {
+ var index = identifiers[i];
+ if (index.match(new RegExp("^" + alias + "(\\.?)")) === null) {
+ indexes.push(index);
+ leftIndex = index;
+ } else {
+ indexes.push(index);
+ rightIndex = index;
+ }
+ }
+ if (leftIndex && rightIndex) {
+ var leftOp = normalizeLeftIndexConstraint(leftIndex, indexes, constraint.op),
+ rightOp = normalizeRightIndexConstraint(rightIndex, indexes, constraint.op);
+ this.rightMemory.addIndex(rightIndex, leftIndex, rightOp);
+ this.leftMemory.addIndex(leftIndex, rightIndex, leftOp);
+ }
+ }
+ }
+ if (this.constraint.isDefault) {
+ this.constraint = constraint;
+ this.isDefault = false;
+ } else {
+ this.constraint = this.constraint.merge(constraint);
+ }
+ this.constraintAssert = this.constraint.assert;
- addFormatToken('ddd', 0, 0, function (format) {
- return this.localeData().weekdaysShort(this, format);
- });
+ },
- addFormatToken('dddd', 0, 0, function (format) {
- return this.localeData().weekdays(this, format);
- });
+ equal: function (constraint) {
+ return this.constraint.equal(constraint.constraint);
+ },
- addFormatToken('e', 0, 0, 'weekday');
- addFormatToken('E', 0, 0, 'isoWeekday');
+ isMatch: function (lc, rc) {
+ return this.constraintAssert(lc.factHash, rc.factHash);
+ },
- // ALIASES
+ match: function (lc, rc) {
+ var ret = {isMatch: false};
+ if (this.constraintAssert(lc.factHash, rc.factHash)) {
+ ret = lc.match.merge(rc.match);
+ }
+ return ret;
+ }
- addUnitAlias('day', 'd');
- addUnitAlias('weekday', 'e');
- addUnitAlias('isoWeekday', 'E');
+ }
- // PRIORITY
- addUnitPriority('day', 11);
- addUnitPriority('weekday', 11);
- addUnitPriority('isoWeekday', 11);
+}).as(module);
- // PARSING
+/***/ }),
- addRegexToken('d', match1to2);
- addRegexToken('e', match1to2);
- addRegexToken('E', match1to2);
- addRegexToken('dd', function (isStrict, locale) {
- return locale.weekdaysMinRegex(isStrict);
- });
- addRegexToken('ddd', function (isStrict, locale) {
- return locale.weekdaysShortRegex(isStrict);
- });
- addRegexToken('dddd', function (isStrict, locale) {
- return locale.weekdaysRegex(isStrict);
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/leftAdapterNode.js":
+/*!*************************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/leftAdapterNode.js ***!
+ \*************************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
- var weekday = config._locale.weekdaysParse(input, token, config._strict);
- // if we didn't get a weekday name, mark the date as invalid
- if (weekday != null) {
- week.d = weekday;
- } else {
- getParsingFlags(config).invalidWeekday = input;
- }
- });
+/* module decorator */ module = __webpack_require__.nmd(module);
+var Node = __webpack_require__(/*! ./adapterNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/adapterNode.js");
- addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
- week[token] = toInt(input);
- });
+Node.extend({
+ instance: {
+ propagateAssert: function (context) {
+ this.__propagate("assertLeft", context);
+ },
- // HELPERS
+ propagateRetract: function (context) {
+ this.__propagate("retractLeft", context);
+ },
- function parseWeekday(input, locale) {
- if (typeof input !== 'string') {
- return input;
- }
+ propagateResolve: function (context) {
+ this.__propagate("retractResolve", context);
+ },
- if (!isNaN(input)) {
- return parseInt(input, 10);
- }
+ propagateModify: function (context) {
+ this.__propagate("modifyLeft", context);
+ },
- input = locale.weekdaysParse(input);
- if (typeof input === 'number') {
- return input;
- }
+ retractResolve: function (match) {
+ this.__propagate("retractResolve", match);
+ },
- return null;
- }
+ dispose: function (context) {
+ this.propagateDispose(context);
+ },
- function parseIsoWeekday(input, locale) {
- if (typeof input === 'string') {
- return locale.weekdaysParse(input) % 7 || 7;
+ toString: function () {
+ return "LeftAdapterNode " + this.__count;
}
- return isNaN(input) ? null : input;
- }
-
- // LOCALES
- function shiftWeekdays(ws, n) {
- return ws.slice(n, 7).concat(ws.slice(0, n));
}
- var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
- '_'
- ),
- defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- defaultWeekdaysRegex = matchWord,
- defaultWeekdaysShortRegex = matchWord,
- defaultWeekdaysMinRegex = matchWord;
-
- function localeWeekdays(m, format) {
- var weekdays = isArray(this._weekdays)
- ? this._weekdays
- : this._weekdays[
- m && m !== true && this._weekdays.isFormat.test(format)
- ? 'format'
- : 'standalone'
- ];
- return m === true
- ? shiftWeekdays(weekdays, this._week.dow)
- : m
- ? weekdays[m.day()]
- : weekdays;
- }
+}).as(module);
- function localeWeekdaysShort(m) {
- return m === true
- ? shiftWeekdays(this._weekdaysShort, this._week.dow)
- : m
- ? this._weekdaysShort[m.day()]
- : this._weekdaysShort;
- }
+/***/ }),
- function localeWeekdaysMin(m) {
- return m === true
- ? shiftWeekdays(this._weekdaysMin, this._week.dow)
- : m
- ? this._weekdaysMin[m.day()]
- : this._weekdaysMin;
- }
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/helpers.js":
+/*!**********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/helpers.js ***!
+ \**********************************************************************************************************/
+/***/ ((__unused_webpack_module, exports) => {
- function handleStrictParse$1(weekdayName, format, strict) {
- var i,
- ii,
- mom,
- llc = weekdayName.toLocaleLowerCase();
- if (!this._weekdaysParse) {
- this._weekdaysParse = [];
- this._shortWeekdaysParse = [];
- this._minWeekdaysParse = [];
+exports.getMemory = (function () {
- for (i = 0; i < 7; ++i) {
- mom = createUTC([2000, 1]).day(i);
- this._minWeekdaysParse[i] = this.weekdaysMin(
- mom,
- ''
- ).toLocaleLowerCase();
- this._shortWeekdaysParse[i] = this.weekdaysShort(
- mom,
- ''
- ).toLocaleLowerCase();
- this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
- }
- }
+ var pPush = Array.prototype.push, NPL = 0, EMPTY_ARRAY = [], NOT_POSSIBLES_HASH = {}, POSSIBLES_HASH = {}, PL = 0;
- if (strict) {
- if (format === 'dddd') {
- ii = indexOf.call(this._weekdaysParse, llc);
- return ii !== -1 ? ii : null;
- } else if (format === 'ddd') {
- ii = indexOf.call(this._shortWeekdaysParse, llc);
- return ii !== -1 ? ii : null;
- } else {
- ii = indexOf.call(this._minWeekdaysParse, llc);
- return ii !== -1 ? ii : null;
- }
- } else {
- if (format === 'dddd') {
- ii = indexOf.call(this._weekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._shortWeekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._minWeekdaysParse, llc);
- return ii !== -1 ? ii : null;
- } else if (format === 'ddd') {
- ii = indexOf.call(this._shortWeekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._weekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._minWeekdaysParse, llc);
- return ii !== -1 ? ii : null;
- } else {
- ii = indexOf.call(this._minWeekdaysParse, llc);
- if (ii !== -1) {
- return ii;
- }
- ii = indexOf.call(this._weekdaysParse, llc);
- if (ii !== -1) {
- return ii;
+ function mergePossibleTuples(ret, a, l) {
+ var val, j = 0, i = -1;
+ if (PL < l) {
+ while (PL && ++i < l) {
+ if (POSSIBLES_HASH[(val = a[i]).hashCode]) {
+ ret[j++] = val;
+ PL--;
}
- ii = indexOf.call(this._shortWeekdaysParse, llc);
- return ii !== -1 ? ii : null;
}
+ } else {
+ pPush.apply(ret, a);
}
+ PL = 0;
+ POSSIBLES_HASH = {};
}
- function localeWeekdaysParse(weekdayName, format, strict) {
- var i, mom, regex;
-
- if (this._weekdaysParseExact) {
- return handleStrictParse$1.call(this, weekdayName, format, strict);
- }
-
- if (!this._weekdaysParse) {
- this._weekdaysParse = [];
- this._minWeekdaysParse = [];
- this._shortWeekdaysParse = [];
- this._fullWeekdaysParse = [];
- }
-
- for (i = 0; i < 7; i++) {
- // make the regex if we don't have it already
- mom = createUTC([2000, 1]).day(i);
- if (strict && !this._fullWeekdaysParse[i]) {
- this._fullWeekdaysParse[i] = new RegExp(
- '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
- 'i'
- );
- this._shortWeekdaysParse[i] = new RegExp(
- '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
- 'i'
- );
- this._minWeekdaysParse[i] = new RegExp(
- '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
- 'i'
- );
- }
- if (!this._weekdaysParse[i]) {
- regex =
- '^' +
- this.weekdays(mom, '') +
- '|^' +
- this.weekdaysShort(mom, '') +
- '|^' +
- this.weekdaysMin(mom, '');
- this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
- }
- // test the regex
- if (
- strict &&
- format === 'dddd' &&
- this._fullWeekdaysParse[i].test(weekdayName)
- ) {
- return i;
- } else if (
- strict &&
- format === 'ddd' &&
- this._shortWeekdaysParse[i].test(weekdayName)
- ) {
- return i;
- } else if (
- strict &&
- format === 'dd' &&
- this._minWeekdaysParse[i].test(weekdayName)
- ) {
- return i;
- } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
- return i;
+ function mergeNotPossibleTuples(ret, a, l) {
+ var val, j = 0, i = -1;
+ if (NPL < l) {
+ while (++i < l) {
+ if (!NPL) {
+ ret[j++] = a[i];
+ } else if (!NOT_POSSIBLES_HASH[(val = a[i]).hashCode]) {
+ ret[j++] = val;
+ } else {
+ NPL--;
+ }
}
}
+ NPL = 0;
+ NOT_POSSIBLES_HASH = {};
}
- // MOMENTS
-
- function getSetDayOfWeek(input) {
- if (!this.isValid()) {
- return input != null ? this : NaN;
- }
- var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
- if (input != null) {
- input = parseWeekday(input, this.localeData());
- return this.add(input - day, 'd');
- } else {
- return day;
+ function mergeBothTuples(ret, a, l) {
+ if (PL === l) {
+ mergeNotPossibles(ret, a, l);
+ } else if (NPL < l) {
+ var val, j = 0, i = -1, hashCode;
+ while (++i < l) {
+ if (!NOT_POSSIBLES_HASH[(hashCode = (val = a[i]).hashCode)] && POSSIBLES_HASH[hashCode]) {
+ ret[j++] = val;
+ }
+ }
}
+ NPL = 0;
+ NOT_POSSIBLES_HASH = {};
+ PL = 0;
+ POSSIBLES_HASH = {};
}
- function getSetLocaleDayOfWeek(input) {
- if (!this.isValid()) {
- return input != null ? this : NaN;
+ function mergePossiblesAndNotPossibles(a, l) {
+ var ret = EMPTY_ARRAY;
+ if (l) {
+ if (NPL || PL) {
+ ret = [];
+ if (!NPL) {
+ mergePossibleTuples(ret, a, l);
+ } else if (!PL) {
+ mergeNotPossibleTuples(ret, a, l);
+ } else {
+ mergeBothTuples(ret, a, l);
+ }
+ } else {
+ ret = a;
+ }
}
- var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
- return input == null ? weekday : this.add(input - weekday, 'd');
+ return ret;
}
- function getSetISODayOfWeek(input) {
- if (!this.isValid()) {
- return input != null ? this : NaN;
- }
-
- // behaves the same as moment#day except
- // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
- // as a setter, sunday should belong to the previous week.
-
- if (input != null) {
- var weekday = parseIsoWeekday(input, this.localeData());
- return this.day(this.day() % 7 ? weekday : weekday - 7);
- } else {
- return this.day() || 7;
+ function getRangeTuples(op, currEntry, val) {
+ var ret;
+ if (op === "gt") {
+ ret = currEntry.findGT(val);
+ } else if (op === "gte") {
+ ret = currEntry.findGTE(val);
+ } else if (op === "lt") {
+ ret = currEntry.findLT(val);
+ } else if (op === "lte") {
+ ret = currEntry.findLTE(val);
}
+ return ret;
}
- function weekdaysRegex(isStrict) {
- if (this._weekdaysParseExact) {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- computeWeekdaysParse.call(this);
- }
- if (isStrict) {
- return this._weekdaysStrictRegex;
- } else {
- return this._weekdaysRegex;
- }
- } else {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- this._weekdaysRegex = defaultWeekdaysRegex;
+ function mergeNotPossibles(tuples, tl) {
+ if (tl) {
+ var j = -1, hashCode;
+ while (++j < tl) {
+ hashCode = tuples[j].hashCode;
+ if (!NOT_POSSIBLES_HASH[hashCode]) {
+ NOT_POSSIBLES_HASH[hashCode] = true;
+ NPL++;
+ }
}
- return this._weekdaysStrictRegex && isStrict
- ? this._weekdaysStrictRegex
- : this._weekdaysRegex;
}
}
- function weekdaysShortRegex(isStrict) {
- if (this._weekdaysParseExact) {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- computeWeekdaysParse.call(this);
- }
- if (isStrict) {
- return this._weekdaysShortStrictRegex;
- } else {
- return this._weekdaysShortRegex;
- }
- } else {
- if (!hasOwnProp(this, '_weekdaysShortRegex')) {
- this._weekdaysShortRegex = defaultWeekdaysShortRegex;
+ function mergePossibles(tuples, tl) {
+ if (tl) {
+ var j = -1, hashCode;
+ while (++j < tl) {
+ hashCode = tuples[j].hashCode;
+ if (!POSSIBLES_HASH[hashCode]) {
+ POSSIBLES_HASH[hashCode] = true;
+ PL++;
+ }
}
- return this._weekdaysShortStrictRegex && isStrict
- ? this._weekdaysShortStrictRegex
- : this._weekdaysShortRegex;
}
}
- function weekdaysMinRegex(isStrict) {
- if (this._weekdaysParseExact) {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- computeWeekdaysParse.call(this);
- }
- if (isStrict) {
- return this._weekdaysMinStrictRegex;
+ return function _getMemory(entry, factHash, indexes) {
+ var i = -1, l = indexes.length,
+ ret = entry.tuples,
+ rl = ret.length,
+ intersected = false,
+ tables = entry.tables,
+ index, val, op, nextEntry, currEntry, tuples, tl;
+ while (++i < l && rl) {
+ index = indexes[i];
+ val = index[3](factHash);
+ op = index[4];
+ currEntry = tables[index[0]];
+ if (op === "eq" || op === "seq") {
+ if ((nextEntry = currEntry.get(val))) {
+ rl = (ret = (entry = nextEntry).tuples).length;
+ tables = nextEntry.tables;
+ } else {
+ rl = (ret = EMPTY_ARRAY).length;
+ }
+ } else if (op === "neq" || op === "sneq") {
+ if ((nextEntry = currEntry.get(val))) {
+ tl = (tuples = nextEntry.tuples).length;
+ mergeNotPossibles(tuples, tl);
+ }
+ } else if (!intersected) {
+ rl = (ret = getRangeTuples(op, currEntry, val)).length;
+ intersected = true;
+ } else if ((tl = (tuples = getRangeTuples(op, currEntry, val)).length)) {
+ mergePossibles(tuples, tl);
} else {
- return this._weekdaysMinRegex;
- }
- } else {
- if (!hasOwnProp(this, '_weekdaysMinRegex')) {
- this._weekdaysMinRegex = defaultWeekdaysMinRegex;
+ ret = tuples;
+ rl = tl;
}
- return this._weekdaysMinStrictRegex && isStrict
- ? this._weekdaysMinStrictRegex
- : this._weekdaysMinRegex;
}
- }
+ return mergePossiblesAndNotPossibles(ret, rl);
+ };
+}());
- function computeWeekdaysParse() {
- function cmpLenRev(a, b) {
- return b.length - a.length;
- }
+/***/ }),
- var minPieces = [],
- shortPieces = [],
- longPieces = [],
- mixedPieces = [],
- i,
- mom,
- minp,
- shortp,
- longp;
- for (i = 0; i < 7; i++) {
- // make the regex if we don't have it already
- mom = createUTC([2000, 1]).day(i);
- minp = regexEscape(this.weekdaysMin(mom, ''));
- shortp = regexEscape(this.weekdaysShort(mom, ''));
- longp = regexEscape(this.weekdays(mom, ''));
- minPieces.push(minp);
- shortPieces.push(shortp);
- longPieces.push(longp);
- mixedPieces.push(minp);
- mixedPieces.push(shortp);
- mixedPieces.push(longp);
- }
- // Sorting makes sure if one weekday (or abbr) is a prefix of another it
- // will match the longer piece.
- minPieces.sort(cmpLenRev);
- shortPieces.sort(cmpLenRev);
- longPieces.sort(cmpLenRev);
- mixedPieces.sort(cmpLenRev);
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/leftMemory.js":
+/*!*************************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/leftMemory.js ***!
+ \*************************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
- this._weekdaysShortRegex = this._weekdaysRegex;
- this._weekdaysMinRegex = this._weekdaysRegex;
+/* module decorator */ module = __webpack_require__.nmd(module);
+var Memory = __webpack_require__(/*! ./memory */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/memory.js");
- this._weekdaysStrictRegex = new RegExp(
- '^(' + longPieces.join('|') + ')',
- 'i'
- );
- this._weekdaysShortStrictRegex = new RegExp(
- '^(' + shortPieces.join('|') + ')',
- 'i'
- );
- this._weekdaysMinStrictRegex = new RegExp(
- '^(' + minPieces.join('|') + ')',
- 'i'
- );
- }
+Memory.extend({
- // FORMATTING
+ instance: {
- function hFormat() {
- return this.hours() % 12 || 12;
+ getLeftMemory: function (tuple) {
+ return this.getMemory(tuple);
+ }
}
- function kFormat() {
- return this.hours() || 24;
- }
+}).as(module);
- addFormatToken('H', ['HH', 2], 0, 'hour');
- addFormatToken('h', ['hh', 2], 0, hFormat);
- addFormatToken('k', ['kk', 2], 0, kFormat);
+/***/ }),
- addFormatToken('hmm', 0, 0, function () {
- return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/memory.js":
+/*!*********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/memory.js ***!
+ \*********************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- addFormatToken('hmmss', 0, 0, function () {
- return (
- '' +
- hFormat.apply(this) +
- zeroFill(this.minutes(), 2) +
- zeroFill(this.seconds(), 2)
- );
- });
+/* module decorator */ module = __webpack_require__.nmd(module);
+var extd = __webpack_require__(/*! ../../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ plucker = extd.plucker,
+ declare = extd.declare,
+ getMemory = __webpack_require__(/*! ./helpers */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/helpers.js").getMemory,
+ Table = __webpack_require__(/*! ./table */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/table.js"),
+ TupleEntry = __webpack_require__(/*! ./tupleEntry */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/tupleEntry.js");
- addFormatToken('Hmm', 0, 0, function () {
- return '' + this.hours() + zeroFill(this.minutes(), 2);
- });
- addFormatToken('Hmmss', 0, 0, function () {
- return (
- '' +
- this.hours() +
- zeroFill(this.minutes(), 2) +
- zeroFill(this.seconds(), 2)
- );
- });
+var id = 0;
+declare({
- function meridiem(token, lowercase) {
- addFormatToken(token, 0, 0, function () {
- return this.localeData().meridiem(
- this.hours(),
- this.minutes(),
- lowercase
- );
- });
- }
+ instance: {
+ length: 0,
- meridiem('a', true);
- meridiem('A', false);
+ constructor: function () {
+ this.head = null;
+ this.tail = null;
+ this.indexes = [];
+ this.tables = new TupleEntry(null, new Table(), false);
+ },
- // ALIASES
+ push: function (data) {
+ var tail = this.tail, head = this.head, node = {data: data, tuples: [], hashCode: id++, prev: tail, next: null};
+ if (tail) {
+ this.tail.next = node;
+ }
+ this.tail = node;
+ if (!head) {
+ this.head = node;
+ }
+ this.length++;
+ this.__index(node);
+ this.tables.addNode(node);
+ return node;
+ },
- addUnitAlias('hour', 'h');
+ remove: function (node) {
+ if (node.prev) {
+ node.prev.next = node.next;
+ } else {
+ this.head = node.next;
+ }
+ if (node.next) {
+ node.next.prev = node.prev;
+ } else {
+ this.tail = node.prev;
+ }
+ this.tables.removeNode(node);
+ this.__removeFromIndex(node);
+ this.length--;
+ },
- // PRIORITY
- addUnitPriority('hour', 13);
+ forEach: function (cb) {
+ var head = {next: this.head};
+ while ((head = head.next)) {
+ cb(head.data);
+ }
+ },
- // PARSING
+ toArray: function () {
+ return this.tables.tuples.slice();
+ },
- function matchMeridiem(isStrict, locale) {
- return locale._meridiemParse;
- }
+ clear: function () {
+ this.head = this.tail = null;
+ this.length = 0;
+ this.clearIndexes();
+ },
- addRegexToken('a', matchMeridiem);
- addRegexToken('A', matchMeridiem);
- addRegexToken('H', match1to2);
- addRegexToken('h', match1to2);
- addRegexToken('k', match1to2);
- addRegexToken('HH', match1to2, match2);
- addRegexToken('hh', match1to2, match2);
- addRegexToken('kk', match1to2, match2);
+ clearIndexes: function () {
+ this.tables = {};
+ this.indexes.length = 0;
+ },
- addRegexToken('hmm', match3to4);
- addRegexToken('hmmss', match5to6);
- addRegexToken('Hmm', match3to4);
- addRegexToken('Hmmss', match5to6);
+ __index: function (node) {
+ var data = node.data,
+ factHash = data.factHash,
+ indexes = this.indexes,
+ entry = this.tables,
+ i = -1, l = indexes.length,
+ tuples, index, val, path, tables, currEntry, prevLookup;
+ while (++i < l) {
+ index = indexes[i];
+ val = index[2](factHash);
+ path = index[0];
+ tables = entry.tables;
+ if (!(tuples = (currEntry = tables[path] || (tables[path] = new Table())).get(val))) {
+ tuples = new TupleEntry(val, currEntry, true);
+ currEntry.set(val, tuples);
+ }
+ if (currEntry !== prevLookup) {
+ node.tuples.push(tuples.addNode(node));
+ }
+ prevLookup = currEntry;
+ if (index[4] === "eq") {
+ entry = tuples;
+ }
+ }
+ },
- addParseToken(['H', 'HH'], HOUR);
- addParseToken(['k', 'kk'], function (input, array, config) {
- var kInput = toInt(input);
- array[HOUR] = kInput === 24 ? 0 : kInput;
- });
- addParseToken(['a', 'A'], function (input, array, config) {
- config._isPm = config._locale.isPM(input);
- config._meridiem = input;
- });
- addParseToken(['h', 'hh'], function (input, array, config) {
- array[HOUR] = toInt(input);
- getParsingFlags(config).bigHour = true;
- });
- addParseToken('hmm', function (input, array, config) {
- var pos = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos));
- array[MINUTE] = toInt(input.substr(pos));
- getParsingFlags(config).bigHour = true;
- });
- addParseToken('hmmss', function (input, array, config) {
- var pos1 = input.length - 4,
- pos2 = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos1));
- array[MINUTE] = toInt(input.substr(pos1, 2));
- array[SECOND] = toInt(input.substr(pos2));
- getParsingFlags(config).bigHour = true;
- });
- addParseToken('Hmm', function (input, array, config) {
- var pos = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos));
- array[MINUTE] = toInt(input.substr(pos));
- });
- addParseToken('Hmmss', function (input, array, config) {
- var pos1 = input.length - 4,
- pos2 = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos1));
- array[MINUTE] = toInt(input.substr(pos1, 2));
- array[SECOND] = toInt(input.substr(pos2));
- });
+ __removeFromIndex: function (node) {
+ var tuples = node.tuples, i = tuples.length;
+ while (--i >= 0) {
+ tuples[i].removeNode(node);
+ }
+ node.tuples.length = 0;
+ },
- // LOCALES
+ getMemory: function (tuple) {
+ var ret;
+ if (!this.length) {
+ ret = [];
+ } else {
+ ret = getMemory(this.tables, tuple.factHash, this.indexes);
+ }
+ return ret;
+ },
- function localeIsPM(input) {
- // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
- // Using charAt should be more compatible.
- return (input + '').toLowerCase().charAt(0) === 'p';
- }
+ __createIndexTree: function () {
+ var table = this.tables.tables = {};
+ var indexes = this.indexes;
+ table[indexes[0][0]] = new Table();
+ },
- var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
- // Setting the hour should keep the time, because the user explicitly
- // specified which hour they want. So trying to maintain the same hour (in
- // a new timezone) makes sense. Adding/subtracting hours does not follow
- // this rule.
- getSetHour = makeGetSet('Hours', true);
- function localeMeridiem(hours, minutes, isLower) {
- if (hours > 11) {
- return isLower ? 'pm' : 'PM';
- } else {
- return isLower ? 'am' : 'AM';
+ addIndex: function (primary, lookup, op) {
+ this.indexes.push([primary, lookup, plucker(primary), plucker(lookup), op || "eq"]);
+ this.indexes.sort(function (a, b) {
+ var aOp = a[4], bOp = b[4];
+ return aOp === bOp ? 0 : aOp > bOp ? 1 : aOp === bOp ? 0 : -1;
+ });
+ this.__createIndexTree();
+
}
+
}
- var baseConfig = {
- calendar: defaultCalendar,
- longDateFormat: defaultLongDateFormat,
- invalidDate: defaultInvalidDate,
- ordinal: defaultOrdinal,
- dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
- relativeTime: defaultRelativeTime,
+}).as(module);
- months: defaultLocaleMonths,
- monthsShort: defaultLocaleMonthsShort,
+/***/ }),
- week: defaultLocaleWeek,
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/rightMemory.js":
+/*!**************************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/rightMemory.js ***!
+ \**************************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- weekdays: defaultLocaleWeekdays,
- weekdaysMin: defaultLocaleWeekdaysMin,
- weekdaysShort: defaultLocaleWeekdaysShort,
+/* module decorator */ module = __webpack_require__.nmd(module);
+var Memory = __webpack_require__(/*! ./memory */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/memory.js");
- meridiemParse: defaultLocaleMeridiemParse,
- };
+Memory.extend({
- // internal storage for locale config files
- var locales = {},
- localeFamilies = {},
- globalLocale;
+ instance: {
- function commonPrefix(arr1, arr2) {
- var i,
- minl = Math.min(arr1.length, arr2.length);
- for (i = 0; i < minl; i += 1) {
- if (arr1[i] !== arr2[i]) {
- return i;
- }
+ getRightMemory: function (tuple) {
+ return this.getMemory(tuple);
}
- return minl;
}
- function normalizeLocale(key) {
- return key ? key.toLowerCase().replace('_', '-') : key;
+}).as(module);
+
+/***/ }),
+
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/table.js":
+/*!********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/table.js ***!
+ \********************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+/* module decorator */ module = __webpack_require__.nmd(module);
+var extd = __webpack_require__(/*! ../../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ pPush = Array.prototype.push,
+ HashTable = extd.HashTable,
+ AVLTree = extd.AVLTree;
+
+function compare(a, b) {
+ /*jshint eqeqeq: false*/
+ a = a.key;
+ b = b.key;
+ var ret;
+ if (a == b) {
+ ret = 0;
+ } else if (a > b) {
+ ret = 1;
+ } else if (a < b) {
+ ret = -1;
+ } else {
+ ret = 1;
}
+ return ret;
+}
- // pick the locale from the array
- // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
- // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
- function chooseLocale(names) {
- var i = 0,
- j,
- next,
- locale,
- split;
+function compareGT(v1, v2) {
+ return compare(v1, v2) === 1;
+}
+function compareGTE(v1, v2) {
+ return compare(v1, v2) !== -1;
+}
- while (i < names.length) {
- split = normalizeLocale(names[i]).split('-');
- j = split.length;
- next = normalizeLocale(names[i + 1]);
- next = next ? next.split('-') : null;
- while (j > 0) {
- locale = loadLocale(split.slice(0, j).join('-'));
- if (locale) {
- return locale;
- }
- if (
- next &&
- next.length >= j &&
- commonPrefix(split, next) >= j - 1
- ) {
- //the next array item is better than a shallower substring of this one
+function compareLT(v1, v2) {
+ return compare(v1, v2) === -1;
+}
+function compareLTE(v1, v2) {
+ return compare(v1, v2) !== 1;
+}
+
+var STACK = [],
+ VALUE = {key: null};
+function traverseInOrder(tree, key, comparator) {
+ VALUE.key = key;
+ var ret = [];
+ var i = 0, current = tree.__root, v;
+ while (true) {
+ if (current) {
+ current = (STACK[i++] = current).left;
+ } else {
+ if (i > 0) {
+ v = (current = STACK[--i]).data;
+ if (comparator(v, VALUE)) {
+ pPush.apply(ret, v.value.tuples);
+ current = current.right;
+ } else {
break;
}
- j--;
+ } else {
+ break;
}
- i++;
}
- return globalLocale;
}
+ STACK.length = 0;
+ return ret;
+}
- function loadLocale(name) {
- var oldLocale = null,
- aliasedRequire;
- // TODO: Find a better way to register and load all the locales in Node
- if (
- locales[name] === undefined &&
- "object" !== 'undefined' &&
- module &&
- module.exports
- ) {
- try {
- oldLocale = globalLocale._abbr;
- aliasedRequire = undefined;
- __webpack_require__("./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/locale sync recursive ^\\.\\/.*$")("./" + name);
- getSetGlobalLocale(oldLocale);
- } catch (e) {
- // mark as not found to avoid repeating expensive file require call causing high CPU
- // when trying to find en-US, en_US, en-us for every format call
- locales[name] = null; // null means not found
+function traverseReverseOrder(tree, key, comparator) {
+ VALUE.key = key;
+ var ret = [];
+ var i = 0, current = tree.__root, v;
+ while (true) {
+ if (current) {
+ current = (STACK[i++] = current).right;
+ } else {
+ if (i > 0) {
+ v = (current = STACK[--i]).data;
+ if (comparator(v, VALUE)) {
+ pPush.apply(ret, v.value.tuples);
+ current = current.left;
+ } else {
+ break;
+ }
+ } else {
+ break;
}
}
- return locales[name];
}
+ STACK.length = 0;
+ return ret;
+}
- // This function will load locale and then set the global locale. If
- // no arguments are passed in, it will simply return the current global
- // locale key.
- function getSetGlobalLocale(key, values) {
- var data;
- if (key) {
- if (isUndefined(values)) {
- data = getLocale(key);
- } else {
- data = defineLocale(key, values);
- }
+AVLTree.extend({
+ instance: {
- if (data) {
- // moment.duration._locale = moment._locale = data;
- globalLocale = data;
- } else {
- if (typeof console !== 'undefined' && console.warn) {
- //warn user if arguments are passed but the locale could not be set
- console.warn(
- 'Locale ' + key + ' not found. Did you forget to load it?'
- );
+ constructor: function () {
+ this._super([
+ {
+ compare: compare
}
- }
- }
-
- return globalLocale._abbr;
- }
+ ]);
+ this.gtCache = new HashTable();
+ this.gteCache = new HashTable();
+ this.ltCache = new HashTable();
+ this.lteCache = new HashTable();
+ this.hasGTCache = false;
+ this.hasGTECache = false;
+ this.hasLTCache = false;
+ this.hasLTECache = false;
+ },
- function defineLocale(name, config) {
- if (config !== null) {
- var locale,
- parentConfig = baseConfig;
- config.abbr = name;
- if (locales[name] != null) {
- deprecateSimple(
- 'defineLocaleOverride',
- 'use moment.updateLocale(localeName, config) to change ' +
- 'an existing locale. moment.defineLocale(localeName, ' +
- 'config) should only be used for creating a new locale ' +
- 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
- );
- parentConfig = locales[name]._config;
- } else if (config.parentLocale != null) {
- if (locales[config.parentLocale] != null) {
- parentConfig = locales[config.parentLocale]._config;
- } else {
- locale = loadLocale(config.parentLocale);
- if (locale != null) {
- parentConfig = locale._config;
- } else {
- if (!localeFamilies[config.parentLocale]) {
- localeFamilies[config.parentLocale] = [];
- }
- localeFamilies[config.parentLocale].push({
- name: name,
- config: config,
- });
- return null;
- }
- }
- }
- locales[name] = new Locale(mergeConfigs(parentConfig, config));
+ clearCache: function () {
+ this.hasGTCache && this.gtCache.clear() && (this.hasGTCache = false);
+ this.hasGTECache && this.gteCache.clear() && (this.hasGTECache = false);
+ this.hasLTCache && this.ltCache.clear() && (this.hasLTCache = false);
+ this.hasLTECache && this.lteCache.clear() && (this.hasLTECache = false);
+ },
- if (localeFamilies[name]) {
- localeFamilies[name].forEach(function (x) {
- defineLocale(x.name, x.config);
- });
- }
+ contains: function (key) {
+ return this._super([
+ {key: key}
+ ]);
+ },
- // backwards compat for now: also set the locale
- // make sure we set the locale AFTER all child locales have been
- // created, so we won't end up with the child locale set.
- getSetGlobalLocale(name);
+ "set": function (key, value) {
+ this.insert({key: key, value: value});
+ this.clearCache();
+ },
- return locales[name];
- } else {
- // useful for testing
- delete locales[name];
- return null;
- }
- }
+ "get": function (key) {
+ var ret = this.find({key: key});
+ return ret && ret.value;
+ },
- function updateLocale(name, config) {
- if (config != null) {
- var locale,
- tmpLocale,
- parentConfig = baseConfig;
+ "remove": function (key) {
+ this.clearCache();
+ return this._super([
+ {key: key}
+ ]);
+ },
- if (locales[name] != null && locales[name].parentLocale != null) {
- // Update existing child locale in-place to avoid memory-leaks
- locales[name].set(mergeConfigs(locales[name]._config, config));
- } else {
- // MERGE
- tmpLocale = loadLocale(name);
- if (tmpLocale != null) {
- parentConfig = tmpLocale._config;
- }
- config = mergeConfigs(parentConfig, config);
- if (tmpLocale == null) {
- // updateLocale is called for creating a new locale
- // Set abbr so it will have a name (getters return
- // undefined otherwise).
- config.abbr = name;
- }
- locale = new Locale(config);
- locale.parentLocale = locales[name];
- locales[name] = locale;
+ findGT: function (key) {
+ var ret = this.gtCache.get(key);
+ if (!ret) {
+ this.hasGTCache = true;
+ this.gtCache.put(key, (ret = traverseReverseOrder(this, key, compareGT)));
}
+ return ret;
+ },
- // backwards compat for now: also set the locale
- getSetGlobalLocale(name);
- } else {
- // pass null for config to unupdate, useful for tests
- if (locales[name] != null) {
- if (locales[name].parentLocale != null) {
- locales[name] = locales[name].parentLocale;
- if (name === getSetGlobalLocale()) {
- getSetGlobalLocale(name);
- }
- } else if (locales[name] != null) {
- delete locales[name];
- }
+ findGTE: function (key) {
+ var ret = this.gteCache.get(key);
+ if (!ret) {
+ this.hasGTECache = true;
+ this.gteCache.put(key, (ret = traverseReverseOrder(this, key, compareGTE)));
}
- }
- return locales[name];
- }
-
- // returns locale data
- function getLocale(key) {
- var locale;
-
- if (key && key._locale && key._locale._abbr) {
- key = key._locale._abbr;
- }
+ return ret;
+ },
- if (!key) {
- return globalLocale;
- }
+ findLT: function (key) {
+ var ret = this.ltCache.get(key);
+ if (!ret) {
+ this.hasLTCache = true;
+ this.ltCache.put(key, (ret = traverseInOrder(this, key, compareLT)));
+ }
+ return ret;
+ },
- if (!isArray(key)) {
- //short-circuit everything else
- locale = loadLocale(key);
- if (locale) {
- return locale;
+ findLTE: function (key) {
+ var ret = this.lteCache.get(key);
+ if (!ret) {
+ this.hasLTECache = true;
+ this.lteCache.put(key, (ret = traverseInOrder(this, key, compareLTE)));
}
- key = [key];
+ return ret;
}
- return chooseLocale(key);
}
+}).as(module);
- function listLocales() {
- return keys(locales);
- }
+/***/ }),
- function checkOverflow(m) {
- var overflow,
- a = m._a;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/tupleEntry.js":
+/*!*************************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/misc/tupleEntry.js ***!
+ \*************************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- if (a && getParsingFlags(m).overflow === -2) {
- overflow =
- a[MONTH] < 0 || a[MONTH] > 11
- ? MONTH
- : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
- ? DATE
- : a[HOUR] < 0 ||
- a[HOUR] > 24 ||
- (a[HOUR] === 24 &&
- (a[MINUTE] !== 0 ||
- a[SECOND] !== 0 ||
- a[MILLISECOND] !== 0))
- ? HOUR
- : a[MINUTE] < 0 || a[MINUTE] > 59
- ? MINUTE
- : a[SECOND] < 0 || a[SECOND] > 59
- ? SECOND
- : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
- ? MILLISECOND
- : -1;
+/* module decorator */ module = __webpack_require__.nmd(module);
+var extd = __webpack_require__(/*! ../../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ indexOf = extd.indexOf;
+// HashSet = require("./hashSet");
- if (
- getParsingFlags(m)._overflowDayOfYear &&
- (overflow < YEAR || overflow > DATE)
- ) {
- overflow = DATE;
+
+var TUPLE_ID = 0;
+extd.declare({
+
+ instance: {
+ tuples: null,
+ tupleMap: null,
+ hashCode: null,
+ tables: null,
+ entry: null,
+ constructor: function (val, entry, canRemove) {
+ this.val = val;
+ this.canRemove = canRemove;
+ this.tuples = [];
+ this.tupleMap = {};
+ this.hashCode = TUPLE_ID++;
+ this.tables = {};
+ this.length = 0;
+ this.entry = entry;
+ },
+
+ addNode: function (node) {
+ this.tuples[this.length++] = node;
+ if (this.length > 1) {
+ this.entry.clearCache();
}
- if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
- overflow = WEEK;
+ return this;
+ },
+
+ removeNode: function (node) {
+ var tuples = this.tuples, index = indexOf(tuples, node);
+ if (index !== -1) {
+ tuples.splice(index, 1);
+ this.length--;
+ this.entry.clearCache();
}
- if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
- overflow = WEEKDAY;
+ if (this.canRemove && !this.length) {
+ this.entry.remove(this.val);
}
-
- getParsingFlags(m).overflow = overflow;
}
-
- return m;
}
+}).as(module);
- // iso 8601 regex
- // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
- var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
- basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
- tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
- isoDates = [
- ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
- ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
- ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
- ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
- ['YYYY-DDD', /\d{4}-\d{3}/],
- ['YYYY-MM', /\d{4}-\d\d/, false],
- ['YYYYYYMMDD', /[+-]\d{10}/],
- ['YYYYMMDD', /\d{8}/],
- ['GGGG[W]WWE', /\d{4}W\d{3}/],
- ['GGGG[W]WW', /\d{4}W\d{2}/, false],
- ['YYYYDDD', /\d{7}/],
- ['YYYYMM', /\d{6}/, false],
- ['YYYY', /\d{4}/, false],
- ],
- // iso time formats and regexes
- isoTimes = [
- ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
- ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
- ['HH:mm:ss', /\d\d:\d\d:\d\d/],
- ['HH:mm', /\d\d:\d\d/],
- ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
- ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
- ['HHmmss', /\d\d\d\d\d\d/],
- ['HHmm', /\d\d\d\d/],
- ['HH', /\d\d/],
- ],
- aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
- // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
- rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
- obsOffsets = {
- UT: 0,
- GMT: 0,
- EDT: -4 * 60,
- EST: -5 * 60,
- CDT: -5 * 60,
- CST: -6 * 60,
- MDT: -6 * 60,
- MST: -7 * 60,
- PDT: -7 * 60,
- PST: -8 * 60,
- };
+/***/ }),
- // date from iso format
- function configFromISO(config) {
- var i,
- l,
- string = config._i,
- match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
- allowTime,
- dateFormat,
- timeFormat,
- tzFormat;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/node.js":
+/*!**************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/node.js ***!
+ \**************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- if (match) {
- getParsingFlags(config).iso = true;
+/* module decorator */ module = __webpack_require__.nmd(module);
+var extd = __webpack_require__(/*! ../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ forEach = extd.forEach,
+ indexOf = extd.indexOf,
+ intersection = extd.intersection,
+ declare = extd.declare,
+ HashTable = extd.HashTable,
+ Context = __webpack_require__(/*! ../context */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/context.js");
- for (i = 0, l = isoDates.length; i < l; i++) {
- if (isoDates[i][1].exec(match[1])) {
- dateFormat = isoDates[i][0];
- allowTime = isoDates[i][2] !== false;
- break;
- }
- }
- if (dateFormat == null) {
- config._isValid = false;
- return;
+var count = 0;
+declare({
+ instance: {
+ constructor: function () {
+ this.nodes = new HashTable();
+ this.rules = [];
+ this.parentNodes = [];
+ this.__count = count++;
+ this.__entrySet = [];
+ },
+
+ addRule: function (rule) {
+ if (indexOf(this.rules, rule) === -1) {
+ this.rules.push(rule);
}
- if (match[3]) {
- for (i = 0, l = isoTimes.length; i < l; i++) {
- if (isoTimes[i][1].exec(match[3])) {
- // match[2] should be 'T' or space
- timeFormat = (match[2] || ' ') + isoTimes[i][0];
- break;
- }
- }
- if (timeFormat == null) {
- config._isValid = false;
- return;
+ return this;
+ },
+
+ merge: function (that) {
+ that.nodes.forEach(function (entry) {
+ var patterns = entry.value, node = entry.key;
+ for (var i = 0, l = patterns.length; i < l; i++) {
+ this.addOutNode(node, patterns[i]);
}
+ that.nodes.remove(node);
+ }, this);
+ var thatParentNodes = that.parentNodes;
+ for (var i = 0, l = that.parentNodes.l; i < l; i++) {
+ var parentNode = thatParentNodes[i];
+ this.addParentNode(parentNode);
+ parentNode.nodes.remove(that);
}
- if (!allowTime && timeFormat != null) {
- config._isValid = false;
- return;
+ return this;
+ },
+
+ resolve: function (mr1, mr2) {
+ return mr1.hashCode === mr2.hashCode;
+ },
+
+ print: function (tab) {
+ console.log(tab + this.toString());
+ forEach(this.parentNodes, function (n) {
+ n.print(" " + tab);
+ });
+ },
+
+ addOutNode: function (outNode, pattern) {
+ if (!this.nodes.contains(outNode)) {
+ this.nodes.put(outNode, []);
}
- if (match[4]) {
- if (tzRegex.exec(match[4])) {
- tzFormat = 'Z';
- } else {
- config._isValid = false;
- return;
- }
+ this.nodes.get(outNode).push(pattern);
+ this.__entrySet = this.nodes.entrySet();
+ },
+
+ addParentNode: function (n) {
+ if (indexOf(this.parentNodes, n) === -1) {
+ this.parentNodes.push(n);
}
- config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
- configFromStringAndFormat(config);
- } else {
- config._isValid = false;
- }
- }
+ },
- function extractFromRFC2822Strings(
- yearStr,
- monthStr,
- dayStr,
- hourStr,
- minuteStr,
- secondStr
- ) {
- var result = [
- untruncateYear(yearStr),
- defaultLocaleMonthsShort.indexOf(monthStr),
- parseInt(dayStr, 10),
- parseInt(hourStr, 10),
- parseInt(minuteStr, 10),
- ];
+ shareable: function () {
+ return false;
+ },
- if (secondStr) {
- result.push(parseInt(secondStr, 10));
- }
+ __propagate: function (method, context) {
+ var entrySet = this.__entrySet, i = entrySet.length, entry, outNode, paths, continuingPaths;
+ while (--i > -1) {
+ entry = entrySet[i];
+ outNode = entry.key;
+ paths = entry.value;
- return result;
- }
+ if ((continuingPaths = intersection(paths, context.paths)).length) {
+ outNode[method](new Context(context.fact, continuingPaths, context.match));
+ }
- function untruncateYear(yearStr) {
- var year = parseInt(yearStr, 10);
- if (year <= 49) {
- return 2000 + year;
- } else if (year <= 999) {
- return 1900 + year;
- }
- return year;
- }
+ }
+ },
- function preprocessRFC2822(s) {
- // Remove comments and folding whitespace and replace multiple-spaces with a single space
- return s
- .replace(/\([^)]*\)|[\n\t]/g, ' ')
- .replace(/(\s\s+)/g, ' ')
- .replace(/^\s\s*/, '')
- .replace(/\s\s*$/, '');
- }
+ dispose: function (assertable) {
+ this.propagateDispose(assertable);
+ },
- function checkWeekday(weekdayStr, parsedInput, config) {
- if (weekdayStr) {
- // TODO: Replace the vanilla JS Date object with an independent day-of-week check.
- var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
- weekdayActual = new Date(
- parsedInput[0],
- parsedInput[1],
- parsedInput[2]
- ).getDay();
- if (weekdayProvided !== weekdayActual) {
- getParsingFlags(config).weekdayMismatch = true;
- config._isValid = false;
- return false;
+ retract: function (assertable) {
+ this.propagateRetract(assertable);
+ },
+
+ propagateDispose: function (assertable, outNodes) {
+ outNodes = outNodes || this.nodes;
+ var entrySet = this.__entrySet, i = entrySet.length - 1;
+ for (; i >= 0; i--) {
+ var entry = entrySet[i], outNode = entry.key;
+ outNode.dispose(assertable);
}
- }
- return true;
- }
+ },
- function calculateOffset(obsOffset, militaryOffset, numOffset) {
- if (obsOffset) {
- return obsOffsets[obsOffset];
- } else if (militaryOffset) {
- // the only allowed military tz is Z
- return 0;
- } else {
- var hm = parseInt(numOffset, 10),
- m = hm % 100,
- h = (hm - m) / 100;
- return h * 60 + m;
- }
- }
+ propagateAssert: function (assertable) {
+ this.__propagate("assert", assertable);
+ },
- // date and time from ref 2822 format
- function configFromRFC2822(config) {
- var match = rfc2822.exec(preprocessRFC2822(config._i)),
- parsedArray;
- if (match) {
- parsedArray = extractFromRFC2822Strings(
- match[4],
- match[3],
- match[2],
- match[5],
- match[6],
- match[7]
- );
- if (!checkWeekday(match[1], parsedArray, config)) {
- return;
- }
+ propagateRetract: function (assertable) {
+ this.__propagate("retract", assertable);
+ },
- config._a = parsedArray;
- config._tzm = calculateOffset(match[8], match[9], match[10]);
+ assert: function (assertable) {
+ this.propagateAssert(assertable);
+ },
- config._d = createUTCDate.apply(null, config._a);
- config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
+ modify: function (assertable) {
+ this.propagateModify(assertable);
+ },
- getParsingFlags(config).rfc2822 = true;
- } else {
- config._isValid = false;
+ propagateModify: function (assertable) {
+ this.__propagate("modify", assertable);
}
}
- // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
- function configFromString(config) {
- var matched = aspNetJsonRegex.exec(config._i);
- if (matched !== null) {
- config._d = new Date(+matched[1]);
- return;
- }
-
- configFromISO(config);
- if (config._isValid === false) {
- delete config._isValid;
- } else {
- return;
- }
+}).as(module);
- configFromRFC2822(config);
- if (config._isValid === false) {
- delete config._isValid;
- } else {
- return;
- }
- if (config._strict) {
- config._isValid = false;
- } else {
- // Final attempt, use Input Fallback
- hooks.createFromInputFallback(config);
- }
- }
+/***/ }),
- hooks.createFromInputFallback = deprecate(
- 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
- 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
- 'discouraged and will be removed in an upcoming major release. Please refer to ' +
- 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
- function (config) {
- config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
- }
- );
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/notNode.js":
+/*!*****************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/notNode.js ***!
+ \*****************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- // Pick the first defined of two or three arguments.
- function defaults(a, b, c) {
- if (a != null) {
- return a;
- }
- if (b != null) {
- return b;
- }
- return c;
- }
+/* module decorator */ module = __webpack_require__.nmd(module);
+var JoinNode = __webpack_require__(/*! ./joinNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/joinNode.js"),
+ LinkedList = __webpack_require__(/*! ../linkedList */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/linkedList.js"),
+ Context = __webpack_require__(/*! ../context */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/context.js"),
+ InitialFact = __webpack_require__(/*! ../pattern */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/pattern.js").InitialFact;
- function currentDateArray(config) {
- // hooks is actually the exported moment object
- var nowValue = new Date(hooks.now());
- if (config._useUTC) {
- return [
- nowValue.getUTCFullYear(),
- nowValue.getUTCMonth(),
- nowValue.getUTCDate(),
- ];
- }
- return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
- }
- // convert an array to a date.
- // the array should mirror the parameters below
- // note: all values past the year are optional and will default to the lowest possible value.
- // [year, month, day , hour, minute, second, millisecond]
- function configFromArray(config) {
- var i,
- date,
- input = [],
- currentDate,
- expectedWeekday,
- yearToUse;
+JoinNode.extend({
+ instance: {
- if (config._d) {
- return;
- }
+ nodeType: "NotNode",
- currentDate = currentDateArray(config);
+ constructor: function () {
+ this._super(arguments);
+ this.leftTupleMemory = {};
+ //use this ensure a unique match for and propagated context.
+ this.notMatch = new Context(new InitialFact()).match;
+ },
- //compute day of the year from weeks and weekdays
- if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
- dayOfYearFromWeekInfo(config);
- }
+ __cloneContext: function (context) {
+ return context.clone(null, null, context.match.merge(this.notMatch));
+ },
- //if the day of the year is set, figure out what it is
- if (config._dayOfYear != null) {
- yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
- if (
- config._dayOfYear > daysInYear(yearToUse) ||
- config._dayOfYear === 0
- ) {
- getParsingFlags(config)._overflowDayOfYear = true;
+ retractRight: function (context) {
+ var ctx = this.removeFromRightMemory(context),
+ rightContext = ctx.data,
+ blocking = rightContext.blocking;
+ if (blocking.length) {
+ //if we are blocking left contexts
+ var leftContext, thisConstraint = this.constraint, blockingNode = {next: blocking.head}, rc;
+ while ((blockingNode = blockingNode.next)) {
+ leftContext = blockingNode.data;
+ this.removeFromLeftBlockedMemory(leftContext);
+ var rm = this.rightTuples.getRightMemory(leftContext), l = rm.length, i;
+ i = -1;
+ while (++i < l) {
+ if (thisConstraint.isMatch(leftContext, rc = rm[i].data)) {
+ this.blockedContext(leftContext, rc);
+ leftContext = null;
+ break;
+ }
+ }
+ if (leftContext) {
+ this.notBlockedContext(leftContext, true);
+ }
+ }
+ blocking.clear();
}
- date = createUTCDate(yearToUse, 0, config._dayOfYear);
- config._a[MONTH] = date.getUTCMonth();
- config._a[DATE] = date.getUTCDate();
- }
+ },
- // Default to current date.
- // * if no year, month, day of month are given, default to today
- // * if day of month is given, default month and year
- // * if month is given, default only year
- // * if year is given, don't default anything
- for (i = 0; i < 3 && config._a[i] == null; ++i) {
- config._a[i] = input[i] = currentDate[i];
- }
+ blockedContext: function (leftContext, rightContext, propagate) {
+ leftContext.blocker = rightContext;
+ this.removeFromLeftMemory(leftContext);
+ this.addToLeftBlockedMemory(rightContext.blocking.push(leftContext));
+ propagate && this.__propagate("retract", this.__cloneContext(leftContext));
+ },
- // Zero out whatever was not defaulted, including time
- for (; i < 7; i++) {
- config._a[i] = input[i] =
- config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];
- }
+ notBlockedContext: function (leftContext, propagate) {
+ this.__addToLeftMemory(leftContext);
+ propagate && this.__propagate("assert", this.__cloneContext(leftContext));
+ },
- // Check for 24:00:00.000
- if (
- config._a[HOUR] === 24 &&
- config._a[MINUTE] === 0 &&
- config._a[SECOND] === 0 &&
- config._a[MILLISECOND] === 0
- ) {
- config._nextDay = true;
- config._a[HOUR] = 0;
- }
+ propagateFromLeft: function (leftContext) {
+ this.notBlockedContext(leftContext, true);
+ },
- config._d = (config._useUTC ? createUTCDate : createDate).apply(
- null,
- input
- );
- expectedWeekday = config._useUTC
- ? config._d.getUTCDay()
- : config._d.getDay();
+ propagateFromRight: function (leftContext) {
+ this.notBlockedContext(leftContext, true);
+ },
- // Apply timezone offset from input. The actual utcOffset can be changed
- // with parseZone.
- if (config._tzm != null) {
- config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
- }
+ blockFromAssertRight: function (leftContext, rightContext) {
+ this.blockedContext(leftContext, rightContext, true);
+ },
- if (config._nextDay) {
- config._a[HOUR] = 24;
- }
+ blockFromAssertLeft: function (leftContext, rightContext) {
+ this.blockedContext(leftContext, rightContext, false);
+ },
- // check for mismatching day of week
- if (
- config._w &&
- typeof config._w.d !== 'undefined' &&
- config._w.d !== expectedWeekday
- ) {
- getParsingFlags(config).weekdayMismatch = true;
- }
- }
- function dayOfYearFromWeekInfo(config) {
- var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
+ retractLeft: function (context) {
+ var ctx = this.removeFromLeftMemory(context);
+ if (ctx) {
+ ctx = ctx.data;
+ this.__propagate("retract", this.__cloneContext(ctx));
+ } else {
+ if (!this.removeFromLeftBlockedMemory(context)) {
+ throw new Error();
+ }
+ }
+ },
- w = config._w;
- if (w.GG != null || w.W != null || w.E != null) {
- dow = 1;
- doy = 4;
+ assertLeft: function (context) {
+ var values = this.rightTuples.getRightMemory(context),
+ thisConstraint = this.constraint, rc, i = -1, l = values.length;
+ while (++i < l) {
+ if (thisConstraint.isMatch(context, rc = values[i].data)) {
+ this.blockFromAssertLeft(context, rc);
+ context = null;
+ i = l;
+ }
+ }
+ if (context) {
+ this.propagateFromLeft(context);
+ }
+ },
- // TODO: We need to take the current isoWeekYear, but that depends on
- // how we interpret now (local, utc, fixed offset). So create
- // a now version of current config (take local/utc/offset flags, and
- // create now).
- weekYear = defaults(
- w.GG,
- config._a[YEAR],
- weekOfYear(createLocal(), 1, 4).year
- );
- week = defaults(w.W, 1);
- weekday = defaults(w.E, 1);
- if (weekday < 1 || weekday > 7) {
- weekdayOverflow = true;
+ assertRight: function (context) {
+ this.__addToRightMemory(context);
+ context.blocking = new LinkedList();
+ var fl = this.leftTuples.getLeftMemory(context).slice(),
+ i = -1, l = fl.length,
+ leftContext, thisConstraint = this.constraint;
+ while (++i < l) {
+ leftContext = fl[i].data;
+ if (thisConstraint.isMatch(leftContext, context)) {
+ this.blockFromAssertRight(leftContext, context);
+ }
}
- } else {
- dow = config._locale._week.dow;
- doy = config._locale._week.doy;
+ },
- curWeek = weekOfYear(createLocal(), dow, doy);
+ addToLeftBlockedMemory: function (context) {
+ var data = context.data, hashCode = data.hashCode;
+ var ctx = this.leftMemory[hashCode];
+ this.leftTupleMemory[hashCode] = context;
+ if (ctx) {
+ this.leftTuples.remove(ctx);
+ }
+ return this;
+ },
- weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
+ removeFromLeftBlockedMemory: function (context) {
+ var ret = this.leftTupleMemory[context.hashCode] || null;
+ if (ret) {
+ delete this.leftTupleMemory[context.hashCode];
+ ret.data.blocker.blocking.remove(ret);
+ }
+ return ret;
+ },
- // Default to current week.
- week = defaults(w.w, curWeek.week);
+ modifyLeft: function (context) {
+ var ctx = this.removeFromLeftMemory(context),
+ leftContext,
+ thisConstraint = this.constraint,
+ rightTuples = this.rightTuples.getRightMemory(context),
+ l = rightTuples.length,
+ isBlocked = false,
+ i, rc, blocker;
+ if (!ctx) {
+ //blocked before
+ ctx = this.removeFromLeftBlockedMemory(context);
+ isBlocked = true;
+ }
+ if (ctx) {
+ leftContext = ctx.data;
- if (w.d != null) {
- // weekday -- low day numbers are considered next week
- weekday = w.d;
- if (weekday < 0 || weekday > 6) {
- weekdayOverflow = true;
+ if (leftContext && leftContext.blocker) {
+ //we were blocked before so only check nodes previous to our blocker
+ blocker = this.rightMemory[leftContext.blocker.hashCode];
+ leftContext.blocker = null;
}
- } else if (w.e != null) {
- // local weekday -- counting starts from beginning of week
- weekday = w.e + dow;
- if (w.e < 0 || w.e > 6) {
- weekdayOverflow = true;
+ if (blocker) {
+ if (thisConstraint.isMatch(context, rc = blocker.data)) {
+ //we cant be proagated so retract previous
+ if (!isBlocked) {
+ //we were asserted before so retract
+ this.__propagate("retract", this.__cloneContext(leftContext));
+ }
+ context.blocker = rc;
+ this.addToLeftBlockedMemory(rc.blocking.push(context));
+ context = null;
+ }
+ }
+ if (context && l) {
+ i = -1;
+ //we were propogated before
+ while (++i < l) {
+ if (thisConstraint.isMatch(context, rc = rightTuples[i].data)) {
+ //we cant be proagated so retract previous
+ if (!isBlocked) {
+ //we were asserted before so retract
+ this.__propagate("retract", this.__cloneContext(leftContext));
+ }
+ this.addToLeftBlockedMemory(rc.blocking.push(context));
+ context.blocker = rc;
+ context = null;
+ break;
+ }
+ }
+ }
+ if (context) {
+ //we can still be propogated
+ this.__addToLeftMemory(context);
+ if (!isBlocked) {
+ //we weren't blocked before so modify
+ this.__propagate("modify", this.__cloneContext(context));
+ } else {
+ //we were blocked before but aren't now
+ this.__propagate("assert", this.__cloneContext(context));
+ }
+
}
} else {
- // default to beginning of week
- weekday = dow;
+ throw new Error();
}
- }
- if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
- getParsingFlags(config)._overflowWeeks = true;
- } else if (weekdayOverflow != null) {
- getParsingFlags(config)._overflowWeekday = true;
- } else {
- temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
- config._a[YEAR] = temp.year;
- config._dayOfYear = temp.dayOfYear;
- }
- }
-
- // constant that refers to the ISO standard
- hooks.ISO_8601 = function () {};
-
- // constant that refers to the RFC 2822 form
- hooks.RFC_2822 = function () {};
-
- // date from string and format string
- function configFromStringAndFormat(config) {
- // TODO: Move this to another part of the creation flow to prevent circular deps
- if (config._f === hooks.ISO_8601) {
- configFromISO(config);
- return;
- }
- if (config._f === hooks.RFC_2822) {
- configFromRFC2822(config);
- return;
- }
- config._a = [];
- getParsingFlags(config).empty = true;
- // This array is used to make a Date, either with `new Date` or `Date.UTC`
- var string = '' + config._i,
- i,
- parsedInput,
- tokens,
- token,
- skipped,
- stringLength = string.length,
- totalParsedInputLength = 0,
- era;
+ },
- tokens =
- expandFormat(config._f, config._locale).match(formattingTokens) || [];
+ modifyRight: function (context) {
+ var ctx = this.removeFromRightMemory(context);
+ if (ctx) {
+ var rightContext = ctx.data,
+ leftTuples = this.leftTuples.getLeftMemory(context).slice(),
+ leftTuplesLength = leftTuples.length,
+ leftContext,
+ thisConstraint = this.constraint,
+ i, node,
+ blocking = rightContext.blocking;
+ this.__addToRightMemory(context);
+ context.blocking = new LinkedList();
- for (i = 0; i < tokens.length; i++) {
- token = tokens[i];
- parsedInput = (string.match(getParseRegexForToken(token, config)) ||
- [])[0];
- if (parsedInput) {
- skipped = string.substr(0, string.indexOf(parsedInput));
- if (skipped.length > 0) {
- getParsingFlags(config).unusedInput.push(skipped);
+ var rc;
+ //check old blocked contexts
+ //check if the same contexts blocked before are still blocked
+ var blockingNode = {next: blocking.head};
+ while ((blockingNode = blockingNode.next)) {
+ leftContext = blockingNode.data;
+ leftContext.blocker = null;
+ if (thisConstraint.isMatch(leftContext, context)) {
+ leftContext.blocker = context;
+ this.addToLeftBlockedMemory(context.blocking.push(leftContext));
+ leftContext = null;
+ } else {
+ //we arent blocked anymore
+ leftContext.blocker = null;
+ node = ctx;
+ while ((node = node.next)) {
+ if (thisConstraint.isMatch(leftContext, rc = node.data)) {
+ leftContext.blocker = rc;
+ this.addToLeftBlockedMemory(rc.blocking.push(leftContext));
+ leftContext = null;
+ break;
+ }
+ }
+ if (leftContext) {
+ this.__addToLeftMemory(leftContext);
+ this.__propagate("assert", this.__cloneContext(leftContext));
+ }
+ }
}
- string = string.slice(
- string.indexOf(parsedInput) + parsedInput.length
- );
- totalParsedInputLength += parsedInput.length;
- }
- // don't parse if it's not a known token
- if (formatTokenFunctions[token]) {
- if (parsedInput) {
- getParsingFlags(config).empty = false;
- } else {
- getParsingFlags(config).unusedTokens.push(token);
+ if (leftTuplesLength) {
+ //check currently left tuples in memory
+ i = -1;
+ while (++i < leftTuplesLength) {
+ leftContext = leftTuples[i].data;
+ if (thisConstraint.isMatch(leftContext, context)) {
+ this.__propagate("retract", this.__cloneContext(leftContext));
+ this.removeFromLeftMemory(leftContext);
+ this.addToLeftBlockedMemory(context.blocking.push(leftContext));
+ leftContext.blocker = context;
+ }
+ }
}
- addTimeToArrayFromToken(token, parsedInput, config);
- } else if (config._strict && !parsedInput) {
- getParsingFlags(config).unusedTokens.push(token);
+ } else {
+ throw new Error();
}
- }
-
- // add remaining unparsed input length to the string
- getParsingFlags(config).charsLeftOver =
- stringLength - totalParsedInputLength;
- if (string.length > 0) {
- getParsingFlags(config).unusedInput.push(string);
- }
-
- // clear _12h flag if hour is <= 12
- if (
- config._a[HOUR] <= 12 &&
- getParsingFlags(config).bigHour === true &&
- config._a[HOUR] > 0
- ) {
- getParsingFlags(config).bigHour = undefined;
- }
- getParsingFlags(config).parsedDateParts = config._a.slice(0);
- getParsingFlags(config).meridiem = config._meridiem;
- // handle meridiem
- config._a[HOUR] = meridiemFixWrap(
- config._locale,
- config._a[HOUR],
- config._meridiem
- );
- // handle era
- era = getParsingFlags(config).era;
- if (era !== null) {
- config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
}
-
- configFromArray(config);
- checkOverflow(config);
}
+}).as(module);
- function meridiemFixWrap(locale, hour, meridiem) {
- var isPm;
+/***/ }),
- if (meridiem == null) {
- // nothing to do
- return hour;
- }
- if (locale.meridiemHour != null) {
- return locale.meridiemHour(hour, meridiem);
- } else if (locale.isPM != null) {
- // Fallback
- isPm = locale.isPM(meridiem);
- if (isPm && hour < 12) {
- hour += 12;
- }
- if (!isPm && hour === 12) {
- hour = 0;
- }
- return hour;
- } else {
- // this is not supposed to happen
- return hour;
- }
- }
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/propertyNode.js":
+/*!**********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/propertyNode.js ***!
+ \**********************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- // date from string and array of format strings
- function configFromStringAndArray(config) {
- var tempConfig,
- bestMoment,
- scoreToBeat,
- i,
- currentScore,
- validFormatFound,
- bestFormatIsValid = false;
+/* module decorator */ module = __webpack_require__.nmd(module);
+var AlphaNode = __webpack_require__(/*! ./alphaNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/alphaNode.js"),
+ Context = __webpack_require__(/*! ../context */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/context.js"),
+ extd = __webpack_require__(/*! ../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js");
- if (config._f.length === 0) {
- getParsingFlags(config).invalidFormat = true;
- config._d = new Date(NaN);
- return;
- }
+AlphaNode.extend({
+ instance: {
- for (i = 0; i < config._f.length; i++) {
- currentScore = 0;
- validFormatFound = false;
- tempConfig = copyConfig({}, config);
- if (config._useUTC != null) {
- tempConfig._useUTC = config._useUTC;
- }
- tempConfig._f = config._f[i];
- configFromStringAndFormat(tempConfig);
+ constructor: function () {
+ this._super(arguments);
+ this.alias = this.constraint.get("alias");
+ this.varLength = (this.variables = extd(this.constraint.get("variables")).toArray().value()).length;
+ },
- if (isValid(tempConfig)) {
- validFormatFound = true;
+ assert: function (context) {
+ var c = new Context(context.fact, context.paths);
+ var variables = this.variables, o = context.fact.object, item;
+ c.set(this.alias, o);
+ for (var i = 0, l = this.varLength; i < l; i++) {
+ item = variables[i];
+ c.set(item[1], o[item[0]]);
}
- // if there is any input that was not parsed add a penalty for that format
- currentScore += getParsingFlags(tempConfig).charsLeftOver;
+ this.__propagate("assert", c);
- //or tokens
- currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
+ },
- getParsingFlags(tempConfig).score = currentScore;
+ retract: function (context) {
+ this.__propagate("retract", new Context(context.fact, context.paths));
+ },
- if (!bestFormatIsValid) {
- if (
- scoreToBeat == null ||
- currentScore < scoreToBeat ||
- validFormatFound
- ) {
- scoreToBeat = currentScore;
- bestMoment = tempConfig;
- if (validFormatFound) {
- bestFormatIsValid = true;
- }
- }
- } else {
- if (currentScore < scoreToBeat) {
- scoreToBeat = currentScore;
- bestMoment = tempConfig;
- }
+ modify: function (context) {
+ var c = new Context(context.fact, context.paths);
+ var variables = this.variables, o = context.fact.object, item;
+ c.set(this.alias, o);
+ for (var i = 0, l = this.varLength; i < l; i++) {
+ item = variables[i];
+ c.set(item[1], o[item[0]]);
}
- }
+ this.__propagate("modify", c);
+ },
- extend(config, bestMoment || tempConfig);
- }
- function configFromObject(config) {
- if (config._d) {
- return;
+ toString: function () {
+ return "PropertyNode" + this.__count;
}
-
- var i = normalizeObjectUnits(config._i),
- dayOrDate = i.day === undefined ? i.date : i.day;
- config._a = map(
- [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
- function (obj) {
- return obj && parseInt(obj, 10);
- }
- );
-
- configFromArray(config);
}
+}).as(module);
- function createFromConfig(config) {
- var res = new Moment(checkOverflow(prepareConfig(config)));
- if (res._nextDay) {
- // Adding is smart enough around DST
- res.add(1, 'd');
- res._nextDay = undefined;
- }
- return res;
- }
- function prepareConfig(config) {
- var input = config._i,
- format = config._f;
- config._locale = config._locale || getLocale(config._l);
+/***/ }),
- if (input === null || (format === undefined && input === '')) {
- return createInvalid({ nullInput: true });
- }
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/rightAdapterNode.js":
+/*!**************************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/rightAdapterNode.js ***!
+ \**************************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- if (typeof input === 'string') {
- config._i = input = config._locale.preparse(input);
- }
+/* module decorator */ module = __webpack_require__.nmd(module);
+var Node = __webpack_require__(/*! ./adapterNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/adapterNode.js");
- if (isMoment(input)) {
- return new Moment(checkOverflow(input));
- } else if (isDate(input)) {
- config._d = input;
- } else if (isArray(format)) {
- configFromStringAndArray(config);
- } else if (format) {
- configFromStringAndFormat(config);
- } else {
- configFromInput(config);
- }
+Node.extend({
+ instance: {
- if (!isValid(config)) {
- config._d = null;
- }
+ retractResolve: function (match) {
+ this.__propagate("retractResolve", match);
+ },
- return config;
- }
+ dispose: function (context) {
+ this.propagateDispose(context);
+ },
- function configFromInput(config) {
- var input = config._i;
- if (isUndefined(input)) {
- config._d = new Date(hooks.now());
- } else if (isDate(input)) {
- config._d = new Date(input.valueOf());
- } else if (typeof input === 'string') {
- configFromString(config);
- } else if (isArray(input)) {
- config._a = map(input.slice(0), function (obj) {
- return parseInt(obj, 10);
- });
- configFromArray(config);
- } else if (isObject(input)) {
- configFromObject(config);
- } else if (isNumber(input)) {
- // from milliseconds
- config._d = new Date(input);
- } else {
- hooks.createFromInputFallback(config);
- }
- }
+ propagateAssert: function (context) {
+ this.__propagate("assertRight", context);
+ },
- function createLocalOrUTC(input, format, locale, strict, isUTC) {
- var c = {};
+ propagateRetract: function (context) {
+ this.__propagate("retractRight", context);
+ },
- if (format === true || format === false) {
- strict = format;
- format = undefined;
- }
+ propagateResolve: function (context) {
+ this.__propagate("retractResolve", context);
+ },
- if (locale === true || locale === false) {
- strict = locale;
- locale = undefined;
- }
+ propagateModify: function (context) {
+ this.__propagate("modifyRight", context);
+ },
- if (
- (isObject(input) && isObjectEmpty(input)) ||
- (isArray(input) && input.length === 0)
- ) {
- input = undefined;
+ toString: function () {
+ return "RightAdapterNode " + this.__count;
}
- // object construction must be done this way.
- // https://github.com/moment/moment/issues/1423
- c._isAMomentObject = true;
- c._useUTC = c._isUTC = isUTC;
- c._l = locale;
- c._i = input;
- c._f = format;
- c._strict = strict;
-
- return createFromConfig(c);
}
+}).as(module);
- function createLocal(input, format, locale, strict) {
- return createLocalOrUTC(input, format, locale, strict, false);
- }
+/***/ }),
- var prototypeMin = deprecate(
- 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
- function () {
- var other = createLocal.apply(null, arguments);
- if (this.isValid() && other.isValid()) {
- return other < this ? this : other;
- } else {
- return createInvalid();
- }
- }
- ),
- prototypeMax = deprecate(
- 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
- function () {
- var other = createLocal.apply(null, arguments);
- if (this.isValid() && other.isValid()) {
- return other > this ? this : other;
- } else {
- return createInvalid();
- }
- }
- );
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/terminalNode.js":
+/*!**********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/terminalNode.js ***!
+ \**********************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- // Pick a moment m from moments so that m[fn](other) is true for all
- // other. This relies on the function fn to be transitive.
- //
- // moments should either be an array of moment objects or an array, whose
- // first element is an array of moment objects.
- function pickBy(fn, moments) {
- var res, i;
- if (moments.length === 1 && isArray(moments[0])) {
- moments = moments[0];
- }
- if (!moments.length) {
- return createLocal();
- }
- res = moments[0];
- for (i = 1; i < moments.length; ++i) {
- if (!moments[i].isValid() || moments[i][fn](res)) {
- res = moments[i];
- }
- }
- return res;
- }
+/* module decorator */ module = __webpack_require__.nmd(module);
+var Node = __webpack_require__(/*! ./node */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/node.js"),
+ extd = __webpack_require__(/*! ../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ bind = extd.bind;
- // TODO: Use [].sort instead?
- function min() {
- var args = [].slice.call(arguments, 0);
+Node.extend({
+ instance: {
+ constructor: function (bucket, index, rule, agenda) {
+ this._super([]);
+ this.resolve = bind(this, this.resolve);
+ this.rule = rule;
+ this.index = index;
+ this.name = this.rule.name;
+ this.agenda = agenda;
+ this.bucket = bucket;
+ agenda.register(this);
+ },
- return pickBy('isBefore', args);
- }
+ __assertModify: function (context) {
+ var match = context.match;
+ if (match.isMatch) {
+ var rule = this.rule, bucket = this.bucket;
+ this.agenda.insert(this, {
+ rule: rule,
+ hashCode: context.hashCode,
+ index: this.index,
+ name: rule.name,
+ recency: bucket.recency++,
+ match: match,
+ counter: bucket.counter
+ });
+ }
+ },
- function max() {
- var args = [].slice.call(arguments, 0);
+ assert: function (context) {
+ this.__assertModify(context);
+ },
- return pickBy('isAfter', args);
- }
+ modify: function (context) {
+ this.agenda.retract(this, context);
+ this.__assertModify(context);
+ },
- var now = function () {
- return Date.now ? Date.now() : +new Date();
- };
+ retract: function (context) {
+ this.agenda.retract(this, context);
+ },
- var ordering = [
- 'year',
- 'quarter',
- 'month',
- 'week',
- 'day',
- 'hour',
- 'minute',
- 'second',
- 'millisecond',
- ];
+ retractRight: function (context) {
+ this.agenda.retract(this, context);
+ },
- function isDurationValid(m) {
- var key,
- unitHasDecimal = false,
- i;
- for (key in m) {
- if (
- hasOwnProp(m, key) &&
- !(
- indexOf.call(ordering, key) !== -1 &&
- (m[key] == null || !isNaN(m[key]))
- )
- ) {
- return false;
- }
- }
+ retractLeft: function (context) {
+ this.agenda.retract(this, context);
+ },
- for (i = 0; i < ordering.length; ++i) {
- if (m[ordering[i]]) {
- if (unitHasDecimal) {
- return false; // only allow non-integers for smallest unit
- }
- if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
- unitHasDecimal = true;
- }
- }
- }
+ assertLeft: function (context) {
+ this.__assertModify(context);
+ },
- return true;
- }
+ assertRight: function (context) {
+ this.__assertModify(context);
+ },
- function isValid$1() {
- return this._isValid;
+ toString: function () {
+ return "TerminalNode " + this.rule.name;
+ }
}
+}).as(module);
- function createInvalid$1() {
- return createDuration(NaN);
- }
+/***/ }),
- function Duration(duration) {
- var normalizedInput = normalizeObjectUnits(duration),
- years = normalizedInput.year || 0,
- quarters = normalizedInput.quarter || 0,
- months = normalizedInput.month || 0,
- weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
- days = normalizedInput.day || 0,
- hours = normalizedInput.hour || 0,
- minutes = normalizedInput.minute || 0,
- seconds = normalizedInput.second || 0,
- milliseconds = normalizedInput.millisecond || 0;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/typeNode.js":
+/*!******************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/typeNode.js ***!
+ \******************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- this._isValid = isDurationValid(normalizedInput);
+/* module decorator */ module = __webpack_require__.nmd(module);
+var AlphaNode = __webpack_require__(/*! ./alphaNode */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/nodes/alphaNode.js"),
+ Context = __webpack_require__(/*! ../context */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/context.js");
- // representation for dateAddRemove
- this._milliseconds =
- +milliseconds +
- seconds * 1e3 + // 1000
- minutes * 6e4 + // 1000 * 60
- hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
- // Because of dateAddRemove treats 24 hours as different from a
- // day when working around DST, we need to store them separately
- this._days = +days + weeks * 7;
- // It is impossible to translate months into days without knowing
- // which months you are are talking about, so we have to store
- // it separately.
- this._months = +months + quarters * 3 + years * 12;
+AlphaNode.extend({
+ instance: {
- this._data = {};
+ assert: function (fact) {
+ if (this.constraintAssert(fact.object)) {
+ this.__propagate("assert", fact);
+ }
+ },
- this._locale = getLocale();
+ modify: function (fact) {
+ if (this.constraintAssert(fact.object)) {
+ this.__propagate("modify", fact);
+ }
+ },
- this._bubble();
- }
+ retract: function (fact) {
+ if (this.constraintAssert(fact.object)) {
+ this.__propagate("retract", fact);
+ }
+ },
- function isDuration(obj) {
- return obj instanceof Duration;
- }
+ toString: function () {
+ return "TypeNode" + this.__count;
+ },
- function absRound(number) {
- if (number < 0) {
- return Math.round(-1 * number) * -1;
- } else {
- return Math.round(number);
- }
- }
+ dispose: function () {
+ var es = this.__entrySet, i = es.length - 1;
+ for (; i >= 0; i--) {
+ var e = es[i], outNode = e.key, paths = e.value;
+ outNode.dispose({paths: paths});
+ }
+ },
- // compare two arrays, return the number of differences
- function compareArrays(array1, array2, dontConvert) {
- var len = Math.min(array1.length, array2.length),
- lengthDiff = Math.abs(array1.length - array2.length),
- diffs = 0,
- i;
- for (i = 0; i < len; i++) {
- if (
- (dontConvert && array1[i] !== array2[i]) ||
- (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
- ) {
- diffs++;
+ __propagate: function (method, fact) {
+ var es = this.__entrySet, i = -1, l = es.length;
+ while (++i < l) {
+ var e = es[i], outNode = e.key, paths = e.value;
+ outNode[method](new Context(fact, paths));
}
}
- return diffs + lengthDiff;
}
+}).as(module);
- // FORMATTING
-
- function offset(token, separator) {
- addFormatToken(token, 0, 0, function () {
- var offset = this.utcOffset(),
- sign = '+';
- if (offset < 0) {
- offset = -offset;
- sign = '-';
- }
- return (
- sign +
- zeroFill(~~(offset / 60), 2) +
- separator +
- zeroFill(~~offset % 60, 2)
- );
- });
- }
- offset('Z', ':');
- offset('ZZ', '');
- // PARSING
+/***/ }),
- addRegexToken('Z', matchShortOffset);
- addRegexToken('ZZ', matchShortOffset);
- addParseToken(['Z', 'ZZ'], function (input, array, config) {
- config._useUTC = true;
- config._tzm = offsetFromString(matchShortOffset, input);
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/constraint/parser.js":
+/*!****************************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/constraint/parser.js ***!
+ \****************************************************************************************************************/
+/***/ ((module, exports, __webpack_require__) => {
- // HELPERS
+/* module decorator */ module = __webpack_require__.nmd(module);
+/* parser generated by jison 0.4.17 */
+/*
+ Returns a Parser object of the following structure:
- // timezone chunker
- // '+10:00' > ['10', '00']
- // '-1530' > ['-15', '30']
- var chunkOffset = /([\+\-]|\d\d)/gi;
+ Parser: {
+ yy: {}
+ }
- function offsetFromString(matcher, string) {
- var matches = (string || '').match(matcher),
- chunk,
- parts,
- minutes;
+ Parser.prototype: {
+ yy: {},
+ trace: function(),
+ symbols_: {associative list: name ==> number},
+ terminals_: {associative list: number ==> name},
+ productions_: [...],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
+ table: [...],
+ defaultActions: {...},
+ parseError: function(str, hash),
+ parse: function(input),
- if (matches === null) {
- return null;
- }
+ lexer: {
+ EOF: 1,
+ parseError: function(str, hash),
+ setInput: function(input),
+ input: function(),
+ unput: function(str),
+ more: function(),
+ less: function(n),
+ pastInput: function(),
+ upcomingInput: function(),
+ showPosition: function(),
+ test_match: function(regex_match_array, rule_index),
+ next: function(),
+ lex: function(),
+ begin: function(condition),
+ popState: function(),
+ _currentRules: function(),
+ topState: function(),
+ pushState: function(condition),
- chunk = matches[matches.length - 1] || [];
- parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
- minutes = +(parts[1] * 60) + toInt(parts[2]);
+ options: {
+ ranges: boolean (optional: true ==> token location info will include a .range[] member)
+ flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
+ backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
+ },
- return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
+ performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
+ rules: [...],
+ conditions: {associative list: name ==> set},
}
+ }
- // Return a moment from input, that is local/utc/zone equivalent to model.
- function cloneWithOffset(input, model) {
- var res, diff;
- if (model._isUTC) {
- res = model.clone();
- diff =
- (isMoment(input) || isDate(input)
- ? input.valueOf()
- : createLocal(input).valueOf()) - res.valueOf();
- // Use low-level api, because this fn is low-level api.
- res._d.setTime(res._d.valueOf() + diff);
- hooks.updateOffset(res, false);
- return res;
- } else {
- return createLocal(input).local();
- }
- }
- function getDateOffset(m) {
- // On Firefox.24 Date#getTimezoneOffset returns a floating point.
- // https://github.com/moment/moment/pull/1871
- return -Math.round(m._d.getTimezoneOffset());
- }
+ token location info (@$, _$, etc.): {
+ first_line: n,
+ last_line: n,
+ first_column: n,
+ last_column: n,
+ range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
+ }
- // HOOKS
- // This function will be called whenever a moment is mutated.
- // It is intended to keep the offset in sync with the timezone.
- hooks.updateOffset = function () {};
+ the parseError function receives a 'hash' object with these members for lexer and parser errors: {
+ text: (matched text)
+ token: (the produced terminal token, if any)
+ line: (yylineno)
+ }
+ while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
+ loc: (yylloc)
+ expected: (string describing the set of expected tokens)
+ recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
+ }
+*/
+var parser = (function(){
+var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,29],$V1=[1,30],$V2=[1,26],$V3=[1,24],$V4=[1,16],$V5=[1,18],$V6=[1,19],$V7=[1,20],$V8=[1,21],$V9=[1,22],$Va=[5,38,49],$Vb=[1,33],$Vc=[5,36,38,49],$Vd=[5,8,11,12,13,15,17,19,20,21,22,24,25,26,27,28,29,36,38,49],$Ve=[2,2],$Vf=[5,24,25,26,27,28,29,36,38,49],$Vg=[1,42],$Vh=[1,43],$Vi=[1,44],$Vj=[1,45],$Vk=[5,8,11,12,13,15,17,19,20,21,22,24,25,26,27,28,29,31,33,36,38,40,46,49],$Vl=[1,46],$Vm=[1,47],$Vn=[1,48],$Vo=[5,19,20,21,22,24,25,26,27,28,29,36,38,49],$Vp=[1,50],$Vq=[5,8,11,12,13,15,17,19,20,21,22,24,25,26,27,28,29,31,33,36,38,40,43,44,46,48,49],$Vr=[5,17,19,20,21,22,24,25,26,27,28,29,36,38,49],$Vs=[1,55],$Vt=[1,54],$Vu=[5,8,15,17,19,20,21,22,24,25,26,27,28,29,36,38,49],$Vv=[1,56],$Vw=[1,57],$Vx=[1,58],$Vy=[1,87],$Vz=[40,46,49];
+var parser = {trace: function trace() { },
+yy: {},
+symbols_: {"error":2,"expressions":3,"EXPRESSION":4,"EOF":5,"UNARY_EXPRESSION":6,"LITERAL_EXPRESSION":7,"-":8,"!":9,"MULTIPLICATIVE_EXPRESSION":10,"*":11,"/":12,"%":13,"ADDITIVE_EXPRESSION":14,"+":15,"EXPONENT_EXPRESSION":16,"^":17,"RELATIONAL_EXPRESSION":18,"<":19,">":20,"<=":21,">=":22,"EQUALITY_EXPRESSION":23,"==":24,"===":25,"!=":26,"!==":27,"=~":28,"!=~":29,"IN_EXPRESSION":30,"in":31,"ARRAY_EXPRESSION":32,"notIn":33,"OBJECT_EXPRESSION":34,"AND_EXPRESSION":35,"&&":36,"OR_EXPRESSION":37,"||":38,"ARGUMENT_LIST":39,",":40,"IDENTIFIER_EXPRESSION":41,"IDENTIFIER":42,".":43,"[":44,"STRING_EXPRESSION":45,"]":46,"NUMBER_EXPRESSION":47,"(":48,")":49,"STRING":50,"NUMBER":51,"REGEXP_EXPRESSION":52,"REGEXP":53,"BOOLEAN_EXPRESSION":54,"BOOLEAN":55,"NULL_EXPRESSION":56,"NULL":57,"$accept":0,"$end":1},
+terminals_: {2:"error",5:"EOF",8:"-",9:"!",11:"*",12:"/",13:"%",15:"+",17:"^",19:"<",20:">",21:"<=",22:">=",24:"==",25:"===",26:"!=",27:"!==",28:"=~",29:"!=~",31:"in",33:"notIn",36:"&&",38:"||",40:",",42:"IDENTIFIER",43:".",44:"[",46:"]",48:"(",49:")",50:"STRING",51:"NUMBER",53:"REGEXP",55:"BOOLEAN",57:"NULL"},
+productions_: [0,[3,2],[6,1],[6,2],[6,2],[10,1],[10,3],[10,3],[10,3],[14,1],[14,3],[14,3],[16,1],[16,3],[18,1],[18,3],[18,3],[18,3],[18,3],[23,1],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[30,1],[30,3],[30,3],[30,3],[30,3],[35,1],[35,3],[37,1],[37,3],[39,1],[39,3],[41,1],[34,1],[34,3],[34,4],[34,4],[34,4],[34,3],[34,4],[45,1],[47,1],[52,1],[54,1],[56,1],[32,2],[32,3],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,3],[4,1]],
+performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
+/* this == yyval */
- // MOMENTS
+var $0 = $$.length - 1;
+switch (yystate) {
+case 1:
+return $$[$0-1];
+break;
+case 3:
+this.$ = [$$[$0], null, 'unary'];
+break;
+case 4:
+this.$ = [$$[$0], null, 'logicalNot'];
+break;
+case 6:
+this.$ = [$$[$0-2], $$[$0], 'mult'];
+break;
+case 7:
+this.$ = [$$[$0-2], $$[$0], 'div'];
+break;
+case 8:
+this.$ = [$$[$0-2], $$[$0], 'mod'];
+break;
+case 10:
+this.$ = [$$[$0-2], $$[$0], 'plus'];
+break;
+case 11:
+this.$ = [$$[$0-2], $$[$0], 'minus'];
+break;
+case 13:
+this.$ = [$$[$0-2], $$[$0], 'pow'];
+break;
+case 15:
+this.$ = [$$[$0-2], $$[$0], 'lt'];
+break;
+case 16:
+this.$ = [$$[$0-2], $$[$0], 'gt'];
+break;
+case 17:
+this.$ = [$$[$0-2], $$[$0], 'lte'];
+break;
+case 18:
+this.$ = [$$[$0-2], $$[$0], 'gte'];
+break;
+case 20:
+this.$ = [$$[$0-2], $$[$0], 'eq'];
+break;
+case 21:
+this.$ = [$$[$0-2], $$[$0], 'seq'];
+break;
+case 22:
+this.$ = [$$[$0-2], $$[$0], 'neq'];
+break;
+case 23:
+this.$ = [$$[$0-2], $$[$0], 'sneq'];
+break;
+case 24:
+this.$ = [$$[$0-2], $$[$0], 'like'];
+break;
+case 25:
+this.$ = [$$[$0-2], $$[$0], 'notLike'];
+break;
+case 27: case 29:
+this.$ = [$$[$0-2], $$[$0], 'in'];
+break;
+case 28: case 30:
+this.$ = [$$[$0-2], $$[$0], 'notIn'];
+break;
+case 32:
+this.$ = [$$[$0-2], $$[$0], 'and'];
+break;
+case 34:
+this.$ = [$$[$0-2], $$[$0], 'or'];
+break;
+case 36:
+this.$ = [$$[$0-2], $$[$0], 'arguments']
+break;
+case 37:
+this.$ = [String(yytext), null, 'identifier'];
+break;
+case 39:
+this.$ = [$$[$0-2],$$[$0], 'prop'];
+break;
+case 40: case 41: case 42:
+this.$ = [$$[$0-3],$$[$0-1], 'propLookup'];
+break;
+case 43:
+this.$ = [$$[$0-2], [null, null, 'arguments'], 'function']
+break;
+case 44:
+this.$ = [$$[$0-3], $$[$0-1], 'function']
+break;
+case 45:
+this.$ = [String(yytext.replace(/^['|"]|['|"]$/g, '')), null, 'string'];
+break;
+case 46:
+this.$ = [Number(yytext), null, 'number'];
+break;
+case 47:
+this.$ = [yytext, null, 'regexp'];
+break;
+case 48:
+this.$ = [yytext.replace(/^\s+/, '') == 'true', null, 'boolean'];
+break;
+case 49:
+this.$ = [null, null, 'null'];
+break;
+case 50:
+this.$ = [null, null, 'array'];
+break;
+case 51:
+this.$ = [$$[$0-1], null, 'array'];
+break;
+case 59:
+this.$ = [$$[$0-1], null, 'composite']
+break;
+}
+},
+table: [{3:1,4:2,6:28,7:7,8:$V0,9:$V1,10:27,14:25,16:17,18:8,23:6,30:5,32:15,34:14,35:4,37:3,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{1:[3]},{5:[1,31]},o([5,49],[2,60],{38:[1,32]}),o($Va,[2,33],{36:$Vb}),o($Vc,[2,31]),o($Vc,[2,26],{24:[1,34],25:[1,35],26:[1,36],27:[1,37],28:[1,38],29:[1,39]}),o($Vd,$Ve,{31:[1,40],33:[1,41]}),o($Vf,[2,19],{19:$Vg,20:$Vh,21:$Vi,22:$Vj}),o($Vk,[2,52]),o($Vk,[2,53]),o($Vk,[2,54]),o($Vk,[2,55]),o($Vk,[2,56]),o($Vk,[2,57],{43:$Vl,44:$Vm,48:$Vn}),o($Vk,[2,58]),{4:49,6:28,7:7,8:$V0,9:$V1,10:27,14:25,16:17,18:8,23:6,30:5,32:15,34:14,35:4,37:3,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},o($Vo,[2,14],{17:$Vp}),o($Vk,[2,45]),o($Vk,[2,46]),o($Vk,[2,47]),o($Vk,[2,48]),o($Vk,[2,49]),o($Vq,[2,38]),{7:53,32:15,34:14,39:52,41:23,42:$V2,44:$V3,45:9,46:[1,51],47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},o($Vr,[2,12],{8:$Vs,15:$Vt}),o($Vq,[2,37]),o($Vu,[2,9],{11:$Vv,12:$Vw,13:$Vx}),o($Vd,[2,5]),{6:59,7:60,8:$V0,9:$V1,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{6:61,7:60,8:$V0,9:$V1,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{1:[2,1]},{6:28,7:7,8:$V0,9:$V1,10:27,14:25,16:17,18:8,23:6,30:5,32:15,34:14,35:62,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{6:28,7:7,8:$V0,9:$V1,10:27,14:25,16:17,18:8,23:6,30:63,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{6:28,7:60,8:$V0,9:$V1,10:27,14:25,16:17,18:64,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{6:28,7:60,8:$V0,9:$V1,10:27,14:25,16:17,18:65,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{6:28,7:60,8:$V0,9:$V1,10:27,14:25,16:17,18:66,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{6:28,7:60,8:$V0,9:$V1,10:27,14:25,16:17,18:67,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{6:28,7:60,8:$V0,9:$V1,10:27,14:25,16:17,18:68,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{6:28,7:60,8:$V0,9:$V1,10:27,14:25,16:17,18:69,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{32:70,34:71,41:23,42:$V2,44:$V3},{32:72,34:73,41:23,42:$V2,44:$V3},{6:28,7:60,8:$V0,9:$V1,10:27,14:25,16:74,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{6:28,7:60,8:$V0,9:$V1,10:27,14:25,16:75,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{6:28,7:60,8:$V0,9:$V1,10:27,14:25,16:76,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{6:28,7:60,8:$V0,9:$V1,10:27,14:25,16:77,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{41:78,42:$V2},{34:81,41:23,42:$V2,45:79,47:80,50:$V5,51:$V6},{7:53,32:15,34:14,39:83,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,49:[1,82],50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{49:[1,84]},{6:28,7:60,8:$V0,9:$V1,10:27,14:85,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},o($Vk,[2,50]),{40:$Vy,46:[1,86]},o($Vz,[2,35]),{6:28,7:60,8:$V0,9:$V1,10:88,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{6:28,7:60,8:$V0,9:$V1,10:89,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{6:90,7:60,8:$V0,9:$V1,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{6:91,7:60,8:$V0,9:$V1,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},{6:92,7:60,8:$V0,9:$V1,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},o($Vd,[2,3]),o($Vd,$Ve),o($Vd,[2,4]),o($Va,[2,34],{36:$Vb}),o($Vc,[2,32]),o($Vf,[2,20],{19:$Vg,20:$Vh,21:$Vi,22:$Vj}),o($Vf,[2,21],{19:$Vg,20:$Vh,21:$Vi,22:$Vj}),o($Vf,[2,22],{19:$Vg,20:$Vh,21:$Vi,22:$Vj}),o($Vf,[2,23],{19:$Vg,20:$Vh,21:$Vi,22:$Vj}),o($Vf,[2,24],{19:$Vg,20:$Vh,21:$Vi,22:$Vj}),o($Vf,[2,25],{19:$Vg,20:$Vh,21:$Vi,22:$Vj}),o($Vc,[2,27]),o($Vc,[2,29],{43:$Vl,44:$Vm,48:$Vn}),o($Vc,[2,28]),o($Vc,[2,30],{43:$Vl,44:$Vm,48:$Vn}),o($Vo,[2,15],{17:$Vp}),o($Vo,[2,16],{17:$Vp}),o($Vo,[2,17],{17:$Vp}),o($Vo,[2,18],{17:$Vp}),o($Vq,[2,39]),{46:[1,93]},{46:[1,94]},{43:$Vl,44:$Vm,46:[1,95],48:$Vn},o($Vq,[2,43]),{40:$Vy,49:[1,96]},o($Vk,[2,59]),o($Vr,[2,13],{8:$Vs,15:$Vt}),o($Vk,[2,51]),{7:97,32:15,34:14,41:23,42:$V2,44:$V3,45:9,47:10,48:$V4,50:$V5,51:$V6,52:11,53:$V7,54:12,55:$V8,56:13,57:$V9},o($Vu,[2,10],{11:$Vv,12:$Vw,13:$Vx}),o($Vu,[2,11],{11:$Vv,12:$Vw,13:$Vx}),o($Vd,[2,6]),o($Vd,[2,7]),o($Vd,[2,8]),o($Vq,[2,40]),o($Vq,[2,41]),o($Vq,[2,42]),o($Vq,[2,44]),o($Vz,[2,36])],
+defaultActions: {31:[2,1]},
+parseError: function parseError(str, hash) {
+ if (hash.recoverable) {
+ this.trace(str);
+ } else {
+ function _parseError (msg, hash) {
+ this.message = msg;
+ this.hash = hash;
+ }
+ _parseError.prototype = Error;
- // keepLocalTime = true means only change the timezone, without
- // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
- // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
- // +0200, so we adjust the time as needed, to be valid.
- //
- // Keeping the time actually adds/subtracts (one hour)
- // from the actual represented time. That is why we call updateOffset
- // a second time. In case it wants us to change the offset again
- // _changeInProgress == true case, then we have to adjust, because
- // there is no such time in the given timezone.
- function getSetOffset(input, keepLocalTime, keepMinutes) {
- var offset = this._offset || 0,
- localAdjust;
- if (!this.isValid()) {
- return input != null ? this : NaN;
+ throw new _parseError(str, hash);
+ }
+},
+parse: function parse(input) {
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
+ var args = lstack.slice.call(arguments, 1);
+ var lexer = Object.create(this.lexer);
+ var sharedState = { yy: {} };
+ for (var k in this.yy) {
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
+ sharedState.yy[k] = this.yy[k];
+ }
+ }
+ lexer.setInput(input, sharedState.yy);
+ sharedState.yy.lexer = lexer;
+ sharedState.yy.parser = this;
+ if (typeof lexer.yylloc == 'undefined') {
+ lexer.yylloc = {};
+ }
+ var yyloc = lexer.yylloc;
+ lstack.push(yyloc);
+ var ranges = lexer.options && lexer.options.ranges;
+ if (typeof sharedState.yy.parseError === 'function') {
+ this.parseError = sharedState.yy.parseError;
+ } else {
+ this.parseError = Object.getPrototypeOf(this).parseError;
+ }
+ function popStack(n) {
+ stack.length = stack.length - 2 * n;
+ vstack.length = vstack.length - n;
+ lstack.length = lstack.length - n;
+ }
+ _token_stack:
+ var lex = function () {
+ var token;
+ token = lexer.lex() || EOF;
+ if (typeof token !== 'number') {
+ token = self.symbols_[token] || token;
+ }
+ return token;
+ };
+ var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
+ while (true) {
+ state = stack[stack.length - 1];
+ if (this.defaultActions[state]) {
+ action = this.defaultActions[state];
+ } else {
+ if (symbol === null || typeof symbol == 'undefined') {
+ symbol = lex();
+ }
+ action = table[state] && table[state][symbol];
+ }
+ if (typeof action === 'undefined' || !action.length || !action[0]) {
+ var errStr = '';
+ expected = [];
+ for (p in table[state]) {
+ if (this.terminals_[p] && p > TERROR) {
+ expected.push('\'' + this.terminals_[p] + '\'');
+ }
+ }
+ if (lexer.showPosition) {
+ errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
+ } else {
+ errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
+ }
+ this.parseError(errStr, {
+ text: lexer.match,
+ token: this.terminals_[symbol] || symbol,
+ line: lexer.yylineno,
+ loc: yyloc,
+ expected: expected
+ });
+ }
+ if (action[0] instanceof Array && action.length > 1) {
+ throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
}
- if (input != null) {
- if (typeof input === 'string') {
- input = offsetFromString(matchShortOffset, input);
- if (input === null) {
- return this;
+ switch (action[0]) {
+ case 1:
+ stack.push(symbol);
+ vstack.push(lexer.yytext);
+ lstack.push(lexer.yylloc);
+ stack.push(action[1]);
+ symbol = null;
+ if (!preErrorSymbol) {
+ yyleng = lexer.yyleng;
+ yytext = lexer.yytext;
+ yylineno = lexer.yylineno;
+ yyloc = lexer.yylloc;
+ if (recovering > 0) {
+ recovering--;
}
- } else if (Math.abs(input) < 16 && !keepMinutes) {
- input = input * 60;
+ } else {
+ symbol = preErrorSymbol;
+ preErrorSymbol = null;
}
- if (!this._isUTC && keepLocalTime) {
- localAdjust = getDateOffset(this);
+ break;
+ case 2:
+ len = this.productions_[action[1]][1];
+ yyval.$ = vstack[vstack.length - len];
+ yyval._$ = {
+ first_line: lstack[lstack.length - (len || 1)].first_line,
+ last_line: lstack[lstack.length - 1].last_line,
+ first_column: lstack[lstack.length - (len || 1)].first_column,
+ last_column: lstack[lstack.length - 1].last_column
+ };
+ if (ranges) {
+ yyval._$.range = [
+ lstack[lstack.length - (len || 1)].range[0],
+ lstack[lstack.length - 1].range[1]
+ ];
}
- this._offset = input;
- this._isUTC = true;
- if (localAdjust != null) {
- this.add(localAdjust, 'm');
+ r = this.performAction.apply(yyval, [
+ yytext,
+ yyleng,
+ yylineno,
+ sharedState.yy,
+ action[1],
+ vstack,
+ lstack
+ ].concat(args));
+ if (typeof r !== 'undefined') {
+ return r;
}
- if (offset !== input) {
- if (!keepLocalTime || this._changeInProgress) {
- addSubtract(
- this,
- createDuration(input - offset, 'm'),
- 1,
- false
- );
- } else if (!this._changeInProgress) {
- this._changeInProgress = true;
- hooks.updateOffset(this, true);
- this._changeInProgress = null;
- }
+ if (len) {
+ stack = stack.slice(0, -1 * len * 2);
+ vstack = vstack.slice(0, -1 * len);
+ lstack = lstack.slice(0, -1 * len);
}
- return this;
- } else {
- return this._isUTC ? offset : getDateOffset(this);
+ stack.push(this.productions_[action[1]][0]);
+ vstack.push(yyval.$);
+ lstack.push(yyval._$);
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
+ stack.push(newState);
+ break;
+ case 3:
+ return true;
}
}
+ return true;
+}};
+/* generated by jison-lex 0.3.4 */
+var lexer = (function(){
+var lexer = ({
- function getSetZone(input, keepLocalTime) {
- if (input != null) {
- if (typeof input !== 'string') {
- input = -input;
- }
-
- this.utcOffset(input, keepLocalTime);
+EOF:1,
- return this;
+parseError:function parseError(str, hash) {
+ if (this.yy.parser) {
+ this.yy.parser.parseError(str, hash);
} else {
- return -this.utcOffset();
- }
- }
-
- function setOffsetToUTC(keepLocalTime) {
- return this.utcOffset(0, keepLocalTime);
- }
-
- function setOffsetToLocal(keepLocalTime) {
- if (this._isUTC) {
- this.utcOffset(0, keepLocalTime);
- this._isUTC = false;
-
- if (keepLocalTime) {
- this.subtract(getDateOffset(this), 'm');
- }
+ throw new Error(str);
}
- return this;
- }
+ },
- function setOffsetToParsedOffset() {
- if (this._tzm != null) {
- this.utcOffset(this._tzm, false, true);
- } else if (typeof this._i === 'string') {
- var tZone = offsetFromString(matchOffset, this._i);
- if (tZone != null) {
- this.utcOffset(tZone);
- } else {
- this.utcOffset(0, true);
- }
+// resets the lexer, sets new input
+setInput:function (input, yy) {
+ this.yy = yy || this.yy || {};
+ this._input = input;
+ this._more = this._backtrack = this.done = false;
+ this.yylineno = this.yyleng = 0;
+ this.yytext = this.matched = this.match = '';
+ this.conditionStack = ['INITIAL'];
+ this.yylloc = {
+ first_line: 1,
+ first_column: 0,
+ last_line: 1,
+ last_column: 0
+ };
+ if (this.options.ranges) {
+ this.yylloc.range = [0,0];
}
+ this.offset = 0;
return this;
- }
-
- function hasAlignedHourOffset(input) {
- if (!this.isValid()) {
- return false;
- }
- input = input ? createLocal(input).utcOffset() : 0;
-
- return (this.utcOffset() - input) % 60 === 0;
- }
-
- function isDaylightSavingTime() {
- return (
- this.utcOffset() > this.clone().month(0).utcOffset() ||
- this.utcOffset() > this.clone().month(5).utcOffset()
- );
- }
-
- function isDaylightSavingTimeShifted() {
- if (!isUndefined(this._isDSTShifted)) {
- return this._isDSTShifted;
- }
-
- var c = {},
- other;
-
- copyConfig(c, this);
- c = prepareConfig(c);
+ },
- if (c._a) {
- other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
- this._isDSTShifted =
- this.isValid() && compareArrays(c._a, other.toArray()) > 0;
+// consumes and returns one char from the input
+input:function () {
+ var ch = this._input[0];
+ this.yytext += ch;
+ this.yyleng++;
+ this.offset++;
+ this.match += ch;
+ this.matched += ch;
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
+ if (lines) {
+ this.yylineno++;
+ this.yylloc.last_line++;
} else {
- this._isDSTShifted = false;
+ this.yylloc.last_column++;
+ }
+ if (this.options.ranges) {
+ this.yylloc.range[1]++;
}
- return this._isDSTShifted;
- }
-
- function isLocal() {
- return this.isValid() ? !this._isUTC : false;
- }
-
- function isUtcOffset() {
- return this.isValid() ? this._isUTC : false;
- }
-
- function isUtc() {
- return this.isValid() ? this._isUTC && this._offset === 0 : false;
- }
-
- // ASP.NET json date format regex
- var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
- // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
- // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
- // and further modified to allow for strings containing both week and day
- isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
+ this._input = this._input.slice(1);
+ return ch;
+ },
- function createDuration(input, key) {
- var duration = input,
- // matching against regexp is expensive, do it on demand
- match = null,
- sign,
- ret,
- diffRes;
+// unshifts one char (or a string) into the input
+unput:function (ch) {
+ var len = ch.length;
+ var lines = ch.split(/(?:\r\n?|\n)/g);
- if (isDuration(input)) {
- duration = {
- ms: input._milliseconds,
- d: input._days,
- M: input._months,
- };
- } else if (isNumber(input) || !isNaN(+input)) {
- duration = {};
- if (key) {
- duration[key] = +input;
- } else {
- duration.milliseconds = +input;
- }
- } else if ((match = aspNetRegex.exec(input))) {
- sign = match[1] === '-' ? -1 : 1;
- duration = {
- y: 0,
- d: toInt(match[DATE]) * sign,
- h: toInt(match[HOUR]) * sign,
- m: toInt(match[MINUTE]) * sign,
- s: toInt(match[SECOND]) * sign,
- ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match
- };
- } else if ((match = isoRegex.exec(input))) {
- sign = match[1] === '-' ? -1 : 1;
- duration = {
- y: parseIso(match[2], sign),
- M: parseIso(match[3], sign),
- w: parseIso(match[4], sign),
- d: parseIso(match[5], sign),
- h: parseIso(match[6], sign),
- m: parseIso(match[7], sign),
- s: parseIso(match[8], sign),
- };
- } else if (duration == null) {
- // checks for null or undefined
- duration = {};
- } else if (
- typeof duration === 'object' &&
- ('from' in duration || 'to' in duration)
- ) {
- diffRes = momentsDifference(
- createLocal(duration.from),
- createLocal(duration.to)
- );
+ this._input = ch + this._input;
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
+ //this.yyleng -= len;
+ this.offset -= len;
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
+ this.match = this.match.substr(0, this.match.length - 1);
+ this.matched = this.matched.substr(0, this.matched.length - 1);
- duration = {};
- duration.ms = diffRes.milliseconds;
- duration.M = diffRes.months;
+ if (lines.length - 1) {
+ this.yylineno -= lines.length - 1;
}
+ var r = this.yylloc.range;
- ret = new Duration(duration);
-
- if (isDuration(input) && hasOwnProp(input, '_locale')) {
- ret._locale = input._locale;
- }
+ this.yylloc = {
+ first_line: this.yylloc.first_line,
+ last_line: this.yylineno + 1,
+ first_column: this.yylloc.first_column,
+ last_column: lines ?
+ (lines.length === oldLines.length ? this.yylloc.first_column : 0)
+ + oldLines[oldLines.length - lines.length].length - lines[0].length :
+ this.yylloc.first_column - len
+ };
- if (isDuration(input) && hasOwnProp(input, '_isValid')) {
- ret._isValid = input._isValid;
+ if (this.options.ranges) {
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
}
+ this.yyleng = this.yytext.length;
+ return this;
+ },
- return ret;
- }
-
- createDuration.fn = Duration.prototype;
- createDuration.invalid = createInvalid$1;
-
- function parseIso(inp, sign) {
- // We'd normally use ~~inp for this, but unfortunately it also
- // converts floats to ints.
- // inp may be undefined, so careful calling replace on it.
- var res = inp && parseFloat(inp.replace(',', '.'));
- // apply sign while we're at it
- return (isNaN(res) ? 0 : res) * sign;
- }
+// When called from action, caches matched text and appends it on next action
+more:function () {
+ this._more = true;
+ return this;
+ },
- function positiveMomentsDifference(base, other) {
- var res = {};
+// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
+reject:function () {
+ if (this.options.backtrack_lexer) {
+ this._backtrack = true;
+ } else {
+ return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
+ text: "",
+ token: null,
+ line: this.yylineno
+ });
- res.months =
- other.month() - base.month() + (other.year() - base.year()) * 12;
- if (base.clone().add(res.months, 'M').isAfter(other)) {
- --res.months;
}
+ return this;
+ },
- res.milliseconds = +other - +base.clone().add(res.months, 'M');
+// retain first n characters of the match
+less:function (n) {
+ this.unput(this.match.slice(n));
+ },
- return res;
- }
+// displays already matched input, i.e. for error messages
+pastInput:function () {
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
+ return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
+ },
- function momentsDifference(base, other) {
- var res;
- if (!(base.isValid() && other.isValid())) {
- return { milliseconds: 0, months: 0 };
+// displays upcoming input, i.e. for error messages
+upcomingInput:function () {
+ var next = this.match;
+ if (next.length < 20) {
+ next += this._input.substr(0, 20-next.length);
}
+ return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
+ },
- other = cloneWithOffset(other, base);
- if (base.isBefore(other)) {
- res = positiveMomentsDifference(base, other);
- } else {
- res = positiveMomentsDifference(other, base);
- res.milliseconds = -res.milliseconds;
- res.months = -res.months;
- }
+// displays the character position where the lexing error occurred, i.e. for error messages
+showPosition:function () {
+ var pre = this.pastInput();
+ var c = new Array(pre.length + 1).join("-");
+ return pre + this.upcomingInput() + "\n" + c + "^";
+ },
- return res;
- }
+// test the lexed token: return FALSE when not a match, otherwise return token
+test_match:function (match, indexed_rule) {
+ var token,
+ lines,
+ backup;
- // TODO: remove 'name' arg after deprecation is removed
- function createAdder(direction, name) {
- return function (val, period) {
- var dur, tmp;
- //invert the arguments, but complain about it
- if (period !== null && !isNaN(+period)) {
- deprecateSimple(
- name,
- 'moment().' +
- name +
- '(period, number) is deprecated. Please use moment().' +
- name +
- '(number, period). ' +
- 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
- );
- tmp = val;
- val = period;
- period = tmp;
+ if (this.options.backtrack_lexer) {
+ // save context
+ backup = {
+ yylineno: this.yylineno,
+ yylloc: {
+ first_line: this.yylloc.first_line,
+ last_line: this.last_line,
+ first_column: this.yylloc.first_column,
+ last_column: this.yylloc.last_column
+ },
+ yytext: this.yytext,
+ match: this.match,
+ matches: this.matches,
+ matched: this.matched,
+ yyleng: this.yyleng,
+ offset: this.offset,
+ _more: this._more,
+ _input: this._input,
+ yy: this.yy,
+ conditionStack: this.conditionStack.slice(0),
+ done: this.done
+ };
+ if (this.options.ranges) {
+ backup.yylloc.range = this.yylloc.range.slice(0);
}
-
- dur = createDuration(val, period);
- addSubtract(this, dur, direction);
- return this;
- };
- }
-
- function addSubtract(mom, duration, isAdding, updateOffset) {
- var milliseconds = duration._milliseconds,
- days = absRound(duration._days),
- months = absRound(duration._months);
-
- if (!mom.isValid()) {
- // No op
- return;
}
- updateOffset = updateOffset == null ? true : updateOffset;
-
- if (months) {
- setMonth(mom, get(mom, 'Month') + months * isAdding);
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
+ if (lines) {
+ this.yylineno += lines.length;
}
- if (days) {
- set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
+ this.yylloc = {
+ first_line: this.yylloc.last_line,
+ last_line: this.yylineno + 1,
+ first_column: this.yylloc.last_column,
+ last_column: lines ?
+ lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
+ this.yylloc.last_column + match[0].length
+ };
+ this.yytext += match[0];
+ this.match += match[0];
+ this.matches = match;
+ this.yyleng = this.yytext.length;
+ if (this.options.ranges) {
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
}
- if (milliseconds) {
- mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
+ this._more = false;
+ this._backtrack = false;
+ this._input = this._input.slice(match[0].length);
+ this.matched += match[0];
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
+ if (this.done && this._input) {
+ this.done = false;
}
- if (updateOffset) {
- hooks.updateOffset(mom, days || months);
+ if (token) {
+ return token;
+ } else if (this._backtrack) {
+ // recover context
+ for (var k in backup) {
+ this[k] = backup[k];
+ }
+ return false; // rule action called reject() implying the next rule should be tested instead.
}
- }
-
- var add = createAdder(1, 'add'),
- subtract = createAdder(-1, 'subtract');
-
- function isString(input) {
- return typeof input === 'string' || input instanceof String;
- }
-
- // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
- function isMomentInput(input) {
- return (
- isMoment(input) ||
- isDate(input) ||
- isString(input) ||
- isNumber(input) ||
- isNumberOrStringArray(input) ||
- isMomentInputObject(input) ||
- input === null ||
- input === undefined
- );
- }
-
- function isMomentInputObject(input) {
- var objectTest = isObject(input) && !isObjectEmpty(input),
- propertyTest = false,
- properties = [
- 'years',
- 'year',
- 'y',
- 'months',
- 'month',
- 'M',
- 'days',
- 'day',
- 'd',
- 'dates',
- 'date',
- 'D',
- 'hours',
- 'hour',
- 'h',
- 'minutes',
- 'minute',
- 'm',
- 'seconds',
- 'second',
- 's',
- 'milliseconds',
- 'millisecond',
- 'ms',
- ],
- i,
- property;
+ return false;
+ },
- for (i = 0; i < properties.length; i += 1) {
- property = properties[i];
- propertyTest = propertyTest || hasOwnProp(input, property);
+// return next match in input
+next:function () {
+ if (this.done) {
+ return this.EOF;
}
-
- return objectTest && propertyTest;
- }
-
- function isNumberOrStringArray(input) {
- var arrayTest = isArray(input),
- dataTypeTest = false;
- if (arrayTest) {
- dataTypeTest =
- input.filter(function (item) {
- return !isNumber(item) && isString(input);
- }).length === 0;
+ if (!this._input) {
+ this.done = true;
}
- return arrayTest && dataTypeTest;
- }
-
- function isCalendarSpec(input) {
- var objectTest = isObject(input) && !isObjectEmpty(input),
- propertyTest = false,
- properties = [
- 'sameDay',
- 'nextDay',
- 'lastDay',
- 'nextWeek',
- 'lastWeek',
- 'sameElse',
- ],
- i,
- property;
- for (i = 0; i < properties.length; i += 1) {
- property = properties[i];
- propertyTest = propertyTest || hasOwnProp(input, property);
+ var token,
+ match,
+ tempMatch,
+ index;
+ if (!this._more) {
+ this.yytext = '';
+ this.match = '';
}
-
- return objectTest && propertyTest;
- }
-
- function getCalendarFormat(myMoment, now) {
- var diff = myMoment.diff(now, 'days', true);
- return diff < -6
- ? 'sameElse'
- : diff < -1
- ? 'lastWeek'
- : diff < 0
- ? 'lastDay'
- : diff < 1
- ? 'sameDay'
- : diff < 2
- ? 'nextDay'
- : diff < 7
- ? 'nextWeek'
- : 'sameElse';
- }
-
- function calendar$1(time, formats) {
- // Support for single parameter, formats only overload to the calendar function
- if (arguments.length === 1) {
- if (isMomentInput(arguments[0])) {
- time = arguments[0];
- formats = undefined;
- } else if (isCalendarSpec(arguments[0])) {
- formats = arguments[0];
- time = undefined;
+ var rules = this._currentRules();
+ for (var i = 0; i < rules.length; i++) {
+ tempMatch = this._input.match(this.rules[rules[i]]);
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
+ match = tempMatch;
+ index = i;
+ if (this.options.backtrack_lexer) {
+ token = this.test_match(tempMatch, rules[i]);
+ if (token !== false) {
+ return token;
+ } else if (this._backtrack) {
+ match = false;
+ continue; // rule action called reject() implying a rule MISmatch.
+ } else {
+ // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
+ return false;
+ }
+ } else if (!this.options.flex) {
+ break;
+ }
}
}
- // We want to compare the start of today, vs this.
- // Getting start-of-today depends on whether we're local/utc/offset or not.
- var now = time || createLocal(),
- sod = cloneWithOffset(now, this).startOf('day'),
- format = hooks.calendarFormat(this, sod) || 'sameElse',
- output =
- formats &&
- (isFunction(formats[format])
- ? formats[format].call(this, now)
- : formats[format]);
-
- return this.format(
- output || this.localeData().calendar(format, this, createLocal(now))
- );
- }
-
- function clone() {
- return new Moment(this);
- }
-
- function isAfter(input, units) {
- var localInput = isMoment(input) ? input : createLocal(input);
- if (!(this.isValid() && localInput.isValid())) {
+ if (match) {
+ token = this.test_match(match, rules[index]);
+ if (token !== false) {
+ return token;
+ }
+ // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
return false;
}
- units = normalizeUnits(units) || 'millisecond';
- if (units === 'millisecond') {
- return this.valueOf() > localInput.valueOf();
+ if (this._input === "") {
+ return this.EOF;
} else {
- return localInput.valueOf() < this.clone().startOf(units).valueOf();
+ return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
+ text: "",
+ token: null,
+ line: this.yylineno
+ });
}
- }
+ },
- function isBefore(input, units) {
- var localInput = isMoment(input) ? input : createLocal(input);
- if (!(this.isValid() && localInput.isValid())) {
- return false;
- }
- units = normalizeUnits(units) || 'millisecond';
- if (units === 'millisecond') {
- return this.valueOf() < localInput.valueOf();
+// return next match that has a token
+lex:function lex() {
+ var r = this.next();
+ if (r) {
+ return r;
} else {
- return this.clone().endOf(units).valueOf() < localInput.valueOf();
+ return this.lex();
}
- }
+ },
- function isBetween(from, to, units, inclusivity) {
- var localFrom = isMoment(from) ? from : createLocal(from),
- localTo = isMoment(to) ? to : createLocal(to);
- if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
- return false;
- }
- inclusivity = inclusivity || '()';
- return (
- (inclusivity[0] === '('
- ? this.isAfter(localFrom, units)
- : !this.isBefore(localFrom, units)) &&
- (inclusivity[1] === ')'
- ? this.isBefore(localTo, units)
- : !this.isAfter(localTo, units))
- );
- }
+// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
+begin:function begin(condition) {
+ this.conditionStack.push(condition);
+ },
- function isSame(input, units) {
- var localInput = isMoment(input) ? input : createLocal(input),
- inputMs;
- if (!(this.isValid() && localInput.isValid())) {
- return false;
- }
- units = normalizeUnits(units) || 'millisecond';
- if (units === 'millisecond') {
- return this.valueOf() === localInput.valueOf();
+// pop the previously active lexer condition state off the condition stack
+popState:function popState() {
+ var n = this.conditionStack.length - 1;
+ if (n > 0) {
+ return this.conditionStack.pop();
} else {
- inputMs = localInput.valueOf();
- return (
- this.clone().startOf(units).valueOf() <= inputMs &&
- inputMs <= this.clone().endOf(units).valueOf()
- );
- }
- }
-
- function isSameOrAfter(input, units) {
- return this.isSame(input, units) || this.isAfter(input, units);
- }
-
- function isSameOrBefore(input, units) {
- return this.isSame(input, units) || this.isBefore(input, units);
- }
-
- function diff(input, units, asFloat) {
- var that, zoneDelta, output;
-
- if (!this.isValid()) {
- return NaN;
- }
-
- that = cloneWithOffset(input, this);
-
- if (!that.isValid()) {
- return NaN;
- }
-
- zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
-
- units = normalizeUnits(units);
-
- switch (units) {
- case 'year':
- output = monthDiff(this, that) / 12;
- break;
- case 'month':
- output = monthDiff(this, that);
- break;
- case 'quarter':
- output = monthDiff(this, that) / 3;
- break;
- case 'second':
- output = (this - that) / 1e3;
- break; // 1000
- case 'minute':
- output = (this - that) / 6e4;
- break; // 1000 * 60
- case 'hour':
- output = (this - that) / 36e5;
- break; // 1000 * 60 * 60
- case 'day':
- output = (this - that - zoneDelta) / 864e5;
- break; // 1000 * 60 * 60 * 24, negate dst
- case 'week':
- output = (this - that - zoneDelta) / 6048e5;
- break; // 1000 * 60 * 60 * 24 * 7, negate dst
- default:
- output = this - that;
+ return this.conditionStack[0];
}
+ },
- return asFloat ? output : absFloor(output);
- }
-
- function monthDiff(a, b) {
- if (a.date() < b.date()) {
- // end-of-month calculations work correct when the start month has more
- // days than the end month.
- return -monthDiff(b, a);
+// produce the lexer rule set which is active for the currently active lexer condition state
+_currentRules:function _currentRules() {
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
+ } else {
+ return this.conditions["INITIAL"].rules;
}
- // difference in months
- var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
- // b is in (anchor - 1 month, anchor + 1 month)
- anchor = a.clone().add(wholeMonthDiff, 'months'),
- anchor2,
- adjust;
+ },
- if (b - anchor < 0) {
- anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
- // linear across the month
- adjust = (b - anchor) / (anchor - anchor2);
+// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
+topState:function topState(n) {
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
+ if (n >= 0) {
+ return this.conditionStack[n];
} else {
- anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
- // linear across the month
- adjust = (b - anchor) / (anchor2 - anchor);
+ return "INITIAL";
}
+ },
- //check for negative zero, return zero if negative zero
- return -(wholeMonthDiff + adjust) || 0;
- }
-
- hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
- hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
-
- function toString() {
- return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
- }
+// alias for begin(condition)
+pushState:function pushState(condition) {
+ this.begin(condition);
+ },
- function toISOString(keepOffset) {
- if (!this.isValid()) {
- return null;
- }
- var utc = keepOffset !== true,
- m = utc ? this.clone().utc() : this;
- if (m.year() < 0 || m.year() > 9999) {
- return formatMoment(
- m,
- utc
- ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
- : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'
- );
- }
- if (isFunction(Date.prototype.toISOString)) {
- // native implementation is ~50x faster, use it when we can
- if (utc) {
- return this.toDate().toISOString();
- } else {
- return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)
- .toISOString()
- .replace('Z', formatMoment(m, 'Z'));
- }
- }
- return formatMoment(
- m,
- utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'
- );
- }
+// return the number of states currently on the stack
+stateStackSize:function stateStackSize() {
+ return this.conditionStack.length;
+ },
+options: {},
+performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
+var YYSTATE=YY_START;
+switch($avoiding_name_collisions) {
+case 0:return 31;
+break;
+case 1:return 33;
+break;
+case 2:return 'from';
+break;
+case 3:return 24;
+break;
+case 4:return 25;
+break;
+case 5:return 26;
+break;
+case 6:return 27;
+break;
+case 7:return 21;
+break;
+case 8:return 19;
+break;
+case 9:return 22;
+break;
+case 10:return 20;
+break;
+case 11:return 28;
+break;
+case 12:return 29;
+break;
+case 13:return 36;
+break;
+case 14:return 38;
+break;
+case 15:return 57;
+break;
+case 16:return 55;
+break;
+case 17:/* skip whitespace */
+break;
+case 18:return 51;
+break;
+case 19:return 50;
+break;
+case 20:return 50;
+break;
+case 21:return 42;
+break;
+case 22:return 53;
+break;
+case 23:return 43;
+break;
+case 24:return 11;
+break;
+case 25:return 12;
+break;
+case 26:return 13;
+break;
+case 27:return 40;
+break;
+case 28:return 8;
+break;
+case 29:return 28;
+break;
+case 30:return 29;
+break;
+case 31:return 25;
+break;
+case 32:return 24;
+break;
+case 33:return 27;
+break;
+case 34:return 26;
+break;
+case 35:return 21;
+break;
+case 36:return 22;
+break;
+case 37:return 20;
+break;
+case 38:return 19;
+break;
+case 39:return 36;
+break;
+case 40:return 38;
+break;
+case 41:return 15;
+break;
+case 42:return 17;
+break;
+case 43:return 48;
+break;
+case 44:return 46;
+break;
+case 45:return 44;
+break;
+case 46:return 49;
+break;
+case 47:return 9;
+break;
+case 48:return 5;
+break;
+}
+},
+rules: [/^(?:\s+in\b)/,/^(?:\s+notIn\b)/,/^(?:\s+from\b)/,/^(?:\s+(eq|EQ)\b)/,/^(?:\s+(seq|SEQ)\b)/,/^(?:\s+(neq|NEQ)\b)/,/^(?:\s+(sneq|SNEQ)\b)/,/^(?:\s+(lte|LTE)\b)/,/^(?:\s+(lt|LT)\b)/,/^(?:\s+(gte|GTE)\b)/,/^(?:\s+(gt|GT)\b)/,/^(?:\s+(like|LIKE)\b)/,/^(?:\s+(notLike|NOT_LIKE)\b)/,/^(?:\s+(and|AND)\b)/,/^(?:\s+(or|OR)\b)/,/^(?:\s*(null)\b)/,/^(?:\s*(true|false)\b)/,/^(?:\s+)/,/^(?:-?[0-9]+(?:\.[0-9]+)?\b)/,/^(?:'[^']*')/,/^(?:"[^"]*")/,/^(?:([a-zA-Z_$][0-9a-zA-Z_$]*))/,/^(?:^\/((?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/[imgy]{0,4})(?!\w))/,/^(?:\.)/,/^(?:\*)/,/^(?:\/)/,/^(?:\%)/,/^(?:,)/,/^(?:-)/,/^(?:=~)/,/^(?:!=~)/,/^(?:===)/,/^(?:==)/,/^(?:!==)/,/^(?:!=)/,/^(?:<=)/,/^(?:>=)/,/^(?:>)/,/^(?:<)/,/^(?:&&)/,/^(?:\|\|)/,/^(?:\+)/,/^(?:\^)/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:\))/,/^(?:!)/,/^(?:$)/],
+conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"inclusive":true}}
+});
+return lexer;
+})();
+parser.lexer = lexer;
+function Parser () {
+ this.yy = {};
+}
+Parser.prototype = parser;parser.Parser = Parser;
+return new Parser;
+})();
- /**
- * Return a human readable representation of a moment that can
- * also be evaluated to get a new moment which is the same
- *
- * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
- */
- function inspect() {
- if (!this.isValid()) {
- return 'moment.invalid(/* ' + this._i + ' */)';
- }
- var func = 'moment',
- zone = '',
- prefix,
- year,
- datetime,
- suffix;
- if (!this.isLocal()) {
- func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
- zone = 'Z';
- }
- prefix = '[' + func + '("]';
- year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
- datetime = '-MM-DD[T]HH:mm:ss.SSS';
- suffix = zone + '[")]';
- return this.format(prefix + year + datetime + suffix);
+if (true) {
+exports.parser = parser;
+exports.Parser = parser.Parser;
+exports.parse = function () { return parser.parse.apply(parser, arguments); };
+exports.main = function commonjsMain(args) {
+ if (!args[1]) {
+ console.log('Usage: '+args[0]+' FILE');
+ process.exit(1);
}
+ var source = __webpack_require__(/*! fs */ "fs").readFileSync(__webpack_require__(/*! path */ "path").normalize(args[1]), "utf8");
+ return exports.parser.parse(source);
+};
+if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
+ exports.main(process.argv.slice(1));
+}
+}
- function format(inputString) {
- if (!inputString) {
- inputString = this.isUtc()
- ? hooks.defaultFormatUtc
- : hooks.defaultFormat;
- }
- var output = formatMoment(this, inputString);
- return this.localeData().postformat(output);
- }
+/***/ }),
- function from(time, withoutSuffix) {
- if (
- this.isValid() &&
- ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
- ) {
- return createDuration({ to: this, from: time })
- .locale(this.locale())
- .humanize(!withoutSuffix);
- } else {
- return this.localeData().invalidDate();
- }
- }
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/index.js":
+/*!****************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/index.js ***!
+ \****************************************************************************************************/
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
- function fromNow(withoutSuffix) {
- return this.from(createLocal(), withoutSuffix);
- }
+(function () {
+ "use strict";
+ var constraintParser = __webpack_require__(/*! ./constraint/parser */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/constraint/parser.js"),
+ noolParser = __webpack_require__(/*! ./nools/nool.parser */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/nools/nool.parser.js");
- function to(time, withoutSuffix) {
- if (
- this.isValid() &&
- ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
- ) {
- return createDuration({ from: this, to: time })
- .locale(this.locale())
- .humanize(!withoutSuffix);
- } else {
- return this.localeData().invalidDate();
+ exports.parseConstraint = function (expression) {
+ try {
+ return constraintParser.parse(expression);
+ } catch (e) {
+ throw new Error("Invalid expression '" + expression + "'");
}
- }
+ };
- function toNow(withoutSuffix) {
- return this.to(createLocal(), withoutSuffix);
- }
+ exports.parseRuleSet = function (source, file) {
+ return noolParser.parse(source, file);
+ };
+})();
- // If passed a locale key, it will set the locale for this
- // instance. Otherwise, it will return the locale configuration
- // variables for this instance.
- function locale(key) {
- var newLocaleData;
+/***/ }),
- if (key === undefined) {
- return this._locale._abbr;
- } else {
- newLocaleData = getLocale(key);
- if (newLocaleData != null) {
- this._locale = newLocaleData;
- }
- return this;
- }
- }
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/nools/nool.parser.js":
+/*!****************************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/nools/nool.parser.js ***!
+ \****************************************************************************************************************/
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
- var lang = deprecate(
- 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
- function (key) {
- if (key === undefined) {
- return this.localeData();
- } else {
- return this.locale(key);
- }
- }
- );
+"use strict";
- function localeData() {
- return this._locale;
- }
- var MS_PER_SECOND = 1000,
- MS_PER_MINUTE = 60 * MS_PER_SECOND,
- MS_PER_HOUR = 60 * MS_PER_MINUTE,
- MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
+var tokens = __webpack_require__(/*! ./tokens.js */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/nools/tokens.js"),
+ extd = __webpack_require__(/*! ../../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ keys = extd.hash.keys,
+ utils = __webpack_require__(/*! ./util.js */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/nools/util.js");
- // actual modulo - handles negative numbers (for dates before 1970):
- function mod$1(dividend, divisor) {
- return ((dividend % divisor) + divisor) % divisor;
- }
+var parse = function (src, keywords, context) {
+ var orig = src;
+ src = src.replace(/\/\/(.*)/g, "").replace(/\r\n|\r|\n/g, " ");
- function localStartOfDate(y, m, d) {
- // the date constructor remaps years 0-99 to 1900-1999
- if (y < 100 && y >= 0) {
- // preserve leap years using a full 400 year cycle, then reset
- return new Date(y + 400, m, d) - MS_PER_400_YEARS;
+ var blockTypes = new RegExp("^(" + keys(keywords).join("|") + ")"), index;
+ while (src && (index = utils.findNextTokenIndex(src)) !== -1) {
+ src = src.substr(index);
+ var blockType = src.match(blockTypes);
+ if (blockType !== null) {
+ blockType = blockType[1];
+ if (blockType in keywords) {
+ try {
+ src = keywords[blockType](src, context, parse).replace(/^\s*|\s*$/g, "");
+ } catch (e) {
+ throw new Error("Invalid " + blockType + " definition \n" + e.message + "; \nstarting at : " + orig);
+ }
+ } else {
+ throw new Error("Unknown token" + blockType);
+ }
} else {
- return new Date(y, m, d).valueOf();
+ throw new Error("Error parsing " + src);
}
}
+};
- function utcStartOfDate(y, m, d) {
- // Date.UTC remaps years 0-99 to 1900-1999
- if (y < 100 && y >= 0) {
- // preserve leap years using a full 400 year cycle, then reset
- return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
- } else {
- return Date.UTC(y, m, d);
- }
- }
+exports.parse = function (src, file) {
+ var context = {define: [], rules: [], scope: [], loaded: [], file: file};
+ parse(src, tokens, context);
+ return context;
+};
- function startOf(units) {
- var time, startOfDate;
- units = normalizeUnits(units);
- if (units === undefined || units === 'millisecond' || !this.isValid()) {
- return this;
- }
- startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
- switch (units) {
- case 'year':
- time = startOfDate(this.year(), 0, 1);
- break;
- case 'quarter':
- time = startOfDate(
- this.year(),
- this.month() - (this.month() % 3),
- 1
- );
- break;
- case 'month':
- time = startOfDate(this.year(), this.month(), 1);
- break;
- case 'week':
- time = startOfDate(
- this.year(),
- this.month(),
- this.date() - this.weekday()
- );
- break;
- case 'isoWeek':
- time = startOfDate(
- this.year(),
- this.month(),
- this.date() - (this.isoWeekday() - 1)
- );
- break;
- case 'day':
- case 'date':
- time = startOfDate(this.year(), this.month(), this.date());
- break;
- case 'hour':
- time = this._d.valueOf();
- time -= mod$1(
- time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
- MS_PER_HOUR
- );
- break;
- case 'minute':
- time = this._d.valueOf();
- time -= mod$1(time, MS_PER_MINUTE);
- break;
- case 'second':
- time = this._d.valueOf();
- time -= mod$1(time, MS_PER_SECOND);
- break;
- }
+/***/ }),
- this._d.setTime(time);
- hooks.updateOffset(this, true);
- return this;
- }
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/nools/tokens.js":
+/*!***********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/nools/tokens.js ***!
+ \***********************************************************************************************************/
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- function endOf(units) {
- var time, startOfDate;
- units = normalizeUnits(units);
- if (units === undefined || units === 'millisecond' || !this.isValid()) {
- return this;
- }
+"use strict";
- startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
- switch (units) {
- case 'year':
- time = startOfDate(this.year() + 1, 0, 1) - 1;
- break;
- case 'quarter':
- time =
- startOfDate(
- this.year(),
- this.month() - (this.month() % 3) + 3,
- 1
- ) - 1;
- break;
- case 'month':
- time = startOfDate(this.year(), this.month() + 1, 1) - 1;
- break;
- case 'week':
- time =
- startOfDate(
- this.year(),
- this.month(),
- this.date() - this.weekday() + 7
- ) - 1;
- break;
- case 'isoWeek':
- time =
- startOfDate(
- this.year(),
- this.month(),
- this.date() - (this.isoWeekday() - 1) + 7
- ) - 1;
- break;
- case 'day':
- case 'date':
- time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
- break;
- case 'hour':
- time = this._d.valueOf();
- time +=
- MS_PER_HOUR -
- mod$1(
- time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
- MS_PER_HOUR
- ) -
- 1;
- break;
- case 'minute':
- time = this._d.valueOf();
- time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
- break;
- case 'second':
- time = this._d.valueOf();
- time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
- break;
- }
+var utils = __webpack_require__(/*! ./util.js */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/nools/util.js"),
+ fs = __webpack_require__(/*! fs */ "fs"),
+ extd = __webpack_require__(/*! ../../extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ filter = extd.filter,
+ indexOf = extd.indexOf,
+ predicates = ["not", "or", "exists"],
+ predicateRegExp = new RegExp("^(" + predicates.join("|") + ") *\\((.*)\\)$", "m"),
+ predicateBeginExp = new RegExp(" *(" + predicates.join("|") + ") *\\(", "g");
- this._d.setTime(time);
- hooks.updateOffset(this, true);
- return this;
- }
+var isWhiteSpace = function (str) {
+ return str.replace(/[\s|\n|\r|\t]/g, "").length === 0;
+};
- function valueOf() {
- return this._d.valueOf() - (this._offset || 0) * 60000;
- }
+var joinFunc = function (m, str) {
+ return "; " + str;
+};
- function unix() {
- return Math.floor(this.valueOf() / 1000);
- }
+var splitRuleLineByPredicateExpressions = function (ruleLine) {
+ var str = ruleLine.replace(/,\s*(\$?\w+\s*:)/g, joinFunc);
+ var parts = filter(str.split(predicateBeginExp), function (str) {
+ return str !== "";
+ }),
+ l = parts.length, ret = [];
- function toDate() {
- return new Date(this.valueOf());
+ if (l) {
+ for (var i = 0; i < l; i++) {
+ if (indexOf(predicates, parts[i]) !== -1) {
+ ret.push([parts[i], "(", parts[++i].replace(/, *$/, "")].join(""));
+ } else {
+ ret.push(parts[i].replace(/, *$/, ""));
+ }
+ }
+ } else {
+ return str;
}
+ return ret.join(";");
+};
- function toArray() {
- var m = this;
- return [
- m.year(),
- m.month(),
- m.date(),
- m.hour(),
- m.minute(),
- m.second(),
- m.millisecond(),
- ];
- }
+var ruleTokens = {
- function toObject() {
- var m = this;
- return {
- years: m.year(),
- months: m.month(),
- date: m.date(),
- hours: m.hours(),
- minutes: m.minutes(),
- seconds: m.seconds(),
- milliseconds: m.milliseconds(),
+ salience: (function () {
+ var salienceRegexp = /^(salience|priority)\s*:\s*(-?\d+)\s*[,;]?/;
+ return function (src, context) {
+ if (salienceRegexp.test(src)) {
+ var parts = src.match(salienceRegexp),
+ priority = parseInt(parts[2], 10);
+ if (!isNaN(priority)) {
+ context.options.priority = priority;
+ } else {
+ throw new Error("Invalid salience/priority " + parts[2]);
+ }
+ return src.replace(parts[0], "");
+ } else {
+ throw new Error("invalid format");
+ }
};
- }
+ })(),
- function toJSON() {
- // new Date(NaN).toJSON() === null
- return this.isValid() ? this.toISOString() : null;
- }
+ agendaGroup: (function () {
+ var agendaGroupRegexp = /^(agenda-group|agendaGroup)\s*:\s*([a-zA-Z_$][0-9a-zA-Z_$]*|"[^"]*"|'[^']*')\s*[,;]?/;
+ return function (src, context) {
+ if (agendaGroupRegexp.test(src)) {
+ var parts = src.match(agendaGroupRegexp),
+ agendaGroup = parts[2];
+ if (agendaGroup) {
+ context.options.agendaGroup = agendaGroup.replace(/^["']|["']$/g, "");
+ } else {
+ throw new Error("Invalid agenda-group " + parts[2]);
+ }
+ return src.replace(parts[0], "");
+ } else {
+ throw new Error("invalid format");
+ }
+ };
+ })(),
- function isValid$2() {
- return isValid(this);
- }
+ autoFocus: (function () {
+ var autoFocusRegexp = /^(auto-focus|autoFocus)\s*:\s*(true|false)\s*[,;]?/;
+ return function (src, context) {
+ if (autoFocusRegexp.test(src)) {
+ var parts = src.match(autoFocusRegexp),
+ autoFocus = parts[2];
+ if (autoFocus) {
+ context.options.autoFocus = autoFocus === "true" ? true : false;
+ } else {
+ throw new Error("Invalid auto-focus " + parts[2]);
+ }
+ return src.replace(parts[0], "");
+ } else {
+ throw new Error("invalid format");
+ }
+ };
+ })(),
- function parsingFlags() {
- return extend({}, getParsingFlags(this));
- }
+ "agenda-group": function () {
+ return this.agendaGroup.apply(this, arguments);
+ },
- function invalidAt() {
- return getParsingFlags(this).overflow;
- }
+ "auto-focus": function () {
+ return this.autoFocus.apply(this, arguments);
+ },
- function creationData() {
- return {
- input: this._i,
- format: this._f,
- locale: this._locale,
- isUTC: this._isUTC,
- strict: this._strict,
- };
- }
+ priority: function () {
+ return this.salience.apply(this, arguments);
+ },
- addFormatToken('N', 0, 0, 'eraAbbr');
- addFormatToken('NN', 0, 0, 'eraAbbr');
- addFormatToken('NNN', 0, 0, 'eraAbbr');
- addFormatToken('NNNN', 0, 0, 'eraName');
- addFormatToken('NNNNN', 0, 0, 'eraNarrow');
+ when: (function () {
+ /*jshint evil:true*/
- addFormatToken('y', ['y', 1], 'yo', 'eraYear');
- addFormatToken('y', ['yy', 2], 0, 'eraYear');
- addFormatToken('y', ['yyy', 3], 0, 'eraYear');
- addFormatToken('y', ['yyyy', 4], 0, 'eraYear');
+ var ruleRegExp = /^(\$?\w+) *: *(\w+)(.*)/;
- addRegexToken('N', matchEraAbbr);
- addRegexToken('NN', matchEraAbbr);
- addRegexToken('NNN', matchEraAbbr);
- addRegexToken('NNNN', matchEraName);
- addRegexToken('NNNNN', matchEraNarrow);
+ var constraintRegExp = /(\{ *(?:["']?\$?\w+["']?\s*:\s*["']?\$?\w+["']? *(?:, *["']?\$?\w+["']?\s*:\s*["']?\$?\w+["']?)*)+ *\})/;
+ var fromRegExp = /(\bfrom\s+.*)/;
+ var parseRules = function (str) {
+ var rules = [];
+ var ruleLines = str.split(";"), l = ruleLines.length, ruleLine;
+ for (var i = 0; i < l && (ruleLine = ruleLines[i].replace(/^\s*|\s*$/g, "").replace(/\n/g, "")); i++) {
+ if (!isWhiteSpace(ruleLine)) {
+ var rule = [];
+ if (predicateRegExp.test(ruleLine)) {
+ var m = ruleLine.match(predicateRegExp);
+ var pred = m[1].replace(/^\s*|\s*$/g, "");
+ rule.push(pred);
+ ruleLine = m[2].replace(/^\s*|\s*$/g, "");
+ if (pred === "or") {
+ rule = rule.concat(parseRules(splitRuleLineByPredicateExpressions(ruleLine)));
+ rules.push(rule);
+ continue;
+ }
- addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function (
- input,
- array,
- config,
- token
- ) {
- var era = config._locale.erasParse(input, token, config._strict);
- if (era) {
- getParsingFlags(config).era = era;
- } else {
- getParsingFlags(config).invalidEra = input;
- }
- });
+ }
+ var parts = ruleLine.match(ruleRegExp);
+ if (parts && parts.length) {
+ rule.push(parts[2], parts[1]);
+ var constraints = parts[3].replace(/^\s*|\s*$/g, "");
+ var hashParts = constraints.match(constraintRegExp), from = null, fromMatch;
+ if (hashParts) {
+ var hash = hashParts[1], constraint = constraints.replace(hash, "");
+ if (fromRegExp.test(constraint)) {
+ fromMatch = constraint.match(fromRegExp);
+ from = fromMatch[0];
+ constraint = constraint.replace(fromMatch[0], "");
+ }
+ if (constraint) {
+ rule.push(constraint.replace(/^\s*|\s*$/g, ""));
+ }
+ if (hash) {
+ rule.push(eval("(" + hash.replace(/(\$?\w+)\s*:\s*(\$?\w+)/g, '"$1" : "$2"') + ")"));
+ }
+ } else if (constraints && !isWhiteSpace(constraints)) {
+ if (fromRegExp.test(constraints)) {
+ fromMatch = constraints.match(fromRegExp);
+ from = fromMatch[0];
+ constraints = constraints.replace(fromMatch[0], "");
+ }
+ rule.push(constraints);
+ }
+ if (from) {
+ rule.push(from);
+ }
+ rules.push(rule);
+ } else {
+ throw new Error("Invalid constraint " + ruleLine);
+ }
+ }
+ }
+ return rules;
+ };
- addRegexToken('y', matchUnsigned);
- addRegexToken('yy', matchUnsigned);
- addRegexToken('yyy', matchUnsigned);
- addRegexToken('yyyy', matchUnsigned);
- addRegexToken('yo', matchEraYearOrdinal);
+ return function (orig, context) {
+ var src = orig.replace(/^when\s*/, "").replace(/^\s*|\s*$/g, "");
+ if (utils.findNextToken(src) === "{") {
+ var body = utils.getTokensBetween(src, "{", "}", true).join("");
+ src = src.replace(body, "");
+ context.constraints = parseRules(body.replace(/^\{\s*|\}\s*$/g, ""));
+ return src;
+ } else {
+ throw new Error("unexpected token : expected : '{' found : '" + utils.findNextToken(src) + "'");
+ }
+ };
+ })(),
- addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
- addParseToken(['yo'], function (input, array, config, token) {
- var match;
- if (config._locale._eraYearOrdinalRegex) {
- match = input.match(config._locale._eraYearOrdinalRegex);
- }
+ then: (function () {
+ return function (orig, context) {
+ if (!context.action) {
+ var src = orig.replace(/^then\s*/, "").replace(/^\s*|\s*$/g, "");
+ if (utils.findNextToken(src) === "{") {
+ var body = utils.getTokensBetween(src, "{", "}", true).join("");
+ src = src.replace(body, "");
+ if (!context.action) {
+ context.action = body.replace(/^\{\s*|\}\s*$/g, "");
+ }
+ if (!isWhiteSpace(src)) {
+ throw new Error("Error parsing then block " + orig);
+ }
+ return src;
+ } else {
+ throw new Error("unexpected token : expected : '{' found : '" + utils.findNextToken(src) + "'");
+ }
+ } else {
+ throw new Error("action already defined for rule" + context.name);
+ }
- if (config._locale.eraYearOrdinalParse) {
- array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
+ };
+ })()
+};
+
+var topLevelTokens = {
+ "/": function (orig) {
+ if (orig.match(/^\/\*/)) {
+ // Block Comment parse
+ return orig.replace(/\/\*.*?\*\//, "");
} else {
- array[YEAR] = parseInt(input, 10);
+ return orig;
}
- });
+ },
- function localeEras(m, format) {
- var i,
- l,
- date,
- eras = this._eras || getLocale('en')._eras;
- for (i = 0, l = eras.length; i < l; ++i) {
- switch (typeof eras[i].since) {
- case 'string':
- // truncate time
- date = hooks(eras[i].since).startOf('day');
- eras[i].since = date.valueOf();
- break;
+ "define": function (orig, context) {
+ var src = orig.replace(/^define\s*/, "");
+ var name = src.match(/^([a-zA-Z_$][0-9a-zA-Z_$]*)/);
+ if (name) {
+ src = src.replace(name[0], "").replace(/^\s*|\s*$/g, "");
+ if (utils.findNextToken(src) === "{") {
+ name = name[1];
+ var body = utils.getTokensBetween(src, "{", "}", true).join("");
+ src = src.replace(body, "");
+ //should
+ context.define.push({name: name, properties: "(" + body + ")"});
+ return src;
+ } else {
+ throw new Error("unexpected token : expected : '{' found : '" + utils.findNextToken(src) + "'");
}
+ } else {
+ throw new Error("missing name");
+ }
+ },
- switch (typeof eras[i].until) {
- case 'undefined':
- eras[i].until = +Infinity;
- break;
- case 'string':
- // truncate time
- date = hooks(eras[i].until).startOf('day').valueOf();
- eras[i].until = date.valueOf();
- break;
+ "import": function (orig, context, parse) {
+ if (typeof window !== 'undefined') {
+ throw new Error("import cannot be used in a browser");
+ }
+ var src = orig.replace(/^import\s*/, "");
+ if (utils.findNextToken(src) === "(") {
+ var file = utils.getParamList(src);
+ src = src.replace(file, "").replace(/^\s*|\s*$/g, "");
+ utils.findNextToken(src) === ";" && (src = src.replace(/\s*;/, ""));
+ file = file.replace(/[\(|\)]/g, "").split(",");
+ if (file.length === 1) {
+ file = utils.resolve(context.file || process.cwd(), file[0].replace(/["|']/g, ""));
+ if (indexOf(context.loaded, file) === -1) {
+ var origFile = context.file;
+ context.file = file;
+ parse(fs.readFileSync(file, "utf8"), topLevelTokens, context);
+ context.loaded.push(file);
+ context.file = origFile;
+ }
+ return src;
+ } else {
+ throw new Error("import accepts a single file");
}
+ } else {
+ throw new Error("unexpected token : expected : '(' found : '" + utils.findNextToken(src) + "'");
}
- return eras;
- }
-
- function localeErasParse(eraName, format, strict) {
- var i,
- l,
- eras = this.eras(),
- name,
- abbr,
- narrow;
- eraName = eraName.toUpperCase();
-
- for (i = 0, l = eras.length; i < l; ++i) {
- name = eras[i].name.toUpperCase();
- abbr = eras[i].abbr.toUpperCase();
- narrow = eras[i].narrow.toUpperCase();
-
- if (strict) {
- switch (format) {
- case 'N':
- case 'NN':
- case 'NNN':
- if (abbr === eraName) {
- return eras[i];
- }
- break;
- case 'NNNN':
- if (name === eraName) {
- return eras[i];
- }
- break;
+ },
- case 'NNNNN':
- if (narrow === eraName) {
- return eras[i];
- }
- break;
+ //define a global
+ "global": function (orig, context) {
+ var src = orig.replace(/^global\s*/, "");
+ var name = src.match(/^([a-zA-Z_$][0-9a-zA-Z_$]*\s*)/);
+ if (name) {
+ src = src.replace(name[0], "").replace(/^\s*|\s*$/g, "");
+ if (utils.findNextToken(src) === "=") {
+ name = name[1].replace(/^\s+|\s+$/g, '');
+ var fullbody = utils.getTokensBetween(src, "=", ";", true).join("");
+ var body = fullbody.substring(1, fullbody.length - 1);
+ body = body.replace(/^\s+|\s+$/g, '');
+ if (/^require\(/.test(body)) {
+ var file = utils.getParamList(body.replace("require")).replace(/[\(|\)]/g, "").split(",");
+ if (file.length === 1) {
+ //handle relative require calls
+ file = file[0].replace(/["|']/g, "");
+ body = ["require('", utils.resolve(context.file || process.cwd(), file) , "')"].join("");
+ }
}
- } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
- return eras[i];
+ context.scope.push({name: name, body: body});
+ src = src.replace(fullbody, "");
+ return src;
+ } else {
+ throw new Error("unexpected token : expected : '=' found : '" + utils.findNextToken(src) + "'");
}
+ } else {
+ throw new Error("missing name");
}
- }
+ },
- function localeErasConvertYear(era, year) {
- var dir = era.since <= era.until ? +1 : -1;
- if (year === undefined) {
- return hooks(era.since).year();
+ //define a function
+ "function": function (orig, context) {
+ var src = orig.replace(/^function\s*/, "");
+ //parse the function name
+ var name = src.match(/^([a-zA-Z_$][0-9a-zA-Z_$]*)\s*/);
+ if (name) {
+ src = src.replace(name[0], "");
+ if (utils.findNextToken(src) === "(") {
+ name = name[1];
+ var params = utils.getParamList(src);
+ src = src.replace(params, "").replace(/^\s*|\s*$/g, "");
+ if (utils.findNextToken(src) === "{") {
+ var body = utils.getTokensBetween(src, "{", "}", true).join("");
+ src = src.replace(body, "");
+ //should
+ context.scope.push({name: name, body: "function" + params + body});
+ return src;
+ } else {
+ throw new Error("unexpected token : expected : '{' found : '" + utils.findNextToken(src) + "'");
+ }
+ } else {
+ throw new Error("unexpected token : expected : '(' found : '" + utils.findNextToken(src) + "'");
+ }
} else {
- return hooks(era.since).year() + (year - era.offset) * dir;
+ throw new Error("missing name");
}
- }
-
- function getEraName() {
- var i,
- l,
- val,
- eras = this.localeData().eras();
- for (i = 0, l = eras.length; i < l; ++i) {
- // truncate time
- val = this.startOf('day').valueOf();
+ },
- if (eras[i].since <= val && val <= eras[i].until) {
- return eras[i].name;
- }
- if (eras[i].until <= val && val <= eras[i].since) {
- return eras[i].name;
+ "rule": function (orig, context, parse) {
+ var src = orig.replace(/^rule\s*/, "");
+ var name = src.match(/^([a-zA-Z_$][0-9a-zA-Z_$]*|"[^"]*"|'[^']*')/);
+ if (name) {
+ src = src.replace(name[0], "").replace(/^\s*|\s*$/g, "");
+ if (utils.findNextToken(src) === "{") {
+ name = name[1].replace(/^["']|["']$/g, "");
+ var rule = {name: name, options: {}, constraints: null, action: null};
+ var body = utils.getTokensBetween(src, "{", "}", true).join("");
+ src = src.replace(body, "");
+ parse(body.replace(/^\{\s*|\}\s*$/g, ""), ruleTokens, rule);
+ context.rules.push(rule);
+ return src;
+ } else {
+ throw new Error("unexpected token : expected : '{' found : '" + utils.findNextToken(src) + "'");
}
+ } else {
+ throw new Error("missing name");
}
- return '';
}
+};
+module.exports = topLevelTokens;
- function getEraNarrow() {
- var i,
- l,
- val,
- eras = this.localeData().eras();
- for (i = 0, l = eras.length; i < l; ++i) {
- // truncate time
- val = this.startOf('day').valueOf();
- if (eras[i].since <= val && val <= eras[i].until) {
- return eras[i].narrow;
- }
- if (eras[i].until <= val && val <= eras[i].since) {
- return eras[i].narrow;
- }
- }
- return '';
- }
+/***/ }),
- function getEraAbbr() {
- var i,
- l,
- val,
- eras = this.localeData().eras();
- for (i = 0, l = eras.length; i < l; ++i) {
- // truncate time
- val = this.startOf('day').valueOf();
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/nools/util.js":
+/*!*********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/nools/util.js ***!
+ \*********************************************************************************************************/
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
- if (eras[i].since <= val && val <= eras[i].until) {
- return eras[i].abbr;
- }
- if (eras[i].until <= val && val <= eras[i].since) {
- return eras[i].abbr;
- }
- }
+"use strict";
- return '';
- }
- function getEraYear() {
- var i,
- l,
- dir,
- val,
- eras = this.localeData().eras();
- for (i = 0, l = eras.length; i < l; ++i) {
- dir = eras[i].since <= eras[i].until ? +1 : -1;
+var path = __webpack_require__(/*! path */ "path");
+var WHITE_SPACE_REG = /[\s|\n|\r|\t]/,
+ pathSep = path.sep || ( process.platform === 'win32' ? '\\' : '/' );
- // truncate time
- val = this.startOf('day').valueOf();
+var TOKEN_INVERTS = {
+ "{": "}",
+ "}": "{",
+ "(": ")",
+ ")": "(",
+ "[": "]"
+};
- if (
- (eras[i].since <= val && val <= eras[i].until) ||
- (eras[i].until <= val && val <= eras[i].since)
- ) {
- return (
- (this.year() - hooks(eras[i].since).year()) * dir +
- eras[i].offset
- );
+var getTokensBetween = exports.getTokensBetween = function (str, start, stop, includeStartEnd) {
+ var depth = 0, ret = [];
+ if (!start) {
+ start = TOKEN_INVERTS[stop];
+ depth = 1;
+ }
+ if (!stop) {
+ stop = TOKEN_INVERTS[start];
+ }
+ str = Object(str);
+ var startPushing = false, token, cursor = 0, found = false;
+ while ((token = str.charAt(cursor++))) {
+ if (token === start) {
+ depth++;
+ if (!startPushing) {
+ startPushing = true;
+ if (includeStartEnd) {
+ ret.push(token);
+ }
+ } else {
+ ret.push(token);
+ }
+ } else if (token === stop && cursor) {
+ depth--;
+ if (depth === 0) {
+ if (includeStartEnd) {
+ ret.push(token);
+ }
+ found = true;
+ break;
}
+ ret.push(token);
+ } else if (startPushing) {
+ ret.push(token);
}
-
- return this.year();
}
-
- function erasNameRegex(isStrict) {
- if (!hasOwnProp(this, '_erasNameRegex')) {
- computeErasParse.call(this);
- }
- return isStrict ? this._erasNameRegex : this._erasRegex;
+ if (!found) {
+ throw new Error("Unable to match " + start + " in " + str);
}
+ return ret;
+};
- function erasAbbrRegex(isStrict) {
- if (!hasOwnProp(this, '_erasAbbrRegex')) {
- computeErasParse.call(this);
- }
- return isStrict ? this._erasAbbrRegex : this._erasRegex;
- }
+exports.getParamList = function (str) {
+ return getTokensBetween(str, "(", ")", true).join("");
+};
- function erasNarrowRegex(isStrict) {
- if (!hasOwnProp(this, '_erasNarrowRegex')) {
- computeErasParse.call(this);
- }
- return isStrict ? this._erasNarrowRegex : this._erasRegex;
+exports.resolve = function (from, to) {
+ if (process.platform === 'win32') {
+ to = to.replace(/\//g, '\\');
}
-
- function matchEraAbbr(isStrict, locale) {
- return locale.erasAbbrRegex(isStrict);
+ if (path.extname(from) !== '') {
+ from = path.dirname(from);
}
-
- function matchEraName(isStrict, locale) {
- return locale.erasNameRegex(isStrict);
+ if (to.split(pathSep).length === 1) {
+ return to;
}
+ return path.resolve(from, to).replace(/\\/g, '/');
- function matchEraNarrow(isStrict, locale) {
- return locale.erasNarrowRegex(isStrict);
- }
+};
- function matchEraYearOrdinal(isStrict, locale) {
- return locale._eraYearOrdinalRegex || matchUnsigned;
+var findNextTokenIndex = exports.findNextTokenIndex = function (str, startIndex, endIndex) {
+ startIndex = startIndex || 0;
+ endIndex = endIndex || str.length;
+ var ret = -1, l = str.length;
+ if (!endIndex || endIndex > l) {
+ endIndex = l;
+ }
+ for (; startIndex < endIndex; startIndex++) {
+ var c = str.charAt(startIndex);
+ if (!WHITE_SPACE_REG.test(c)) {
+ ret = startIndex;
+ break;
+ }
}
+ return ret;
+};
- function computeErasParse() {
- var abbrPieces = [],
- namePieces = [],
- narrowPieces = [],
- mixedPieces = [],
- i,
- l,
- eras = this.eras();
+exports.findNextToken = function (str, startIndex, endIndex) {
+ return str.charAt(findNextTokenIndex(str, startIndex, endIndex));
+};
- for (i = 0, l = eras.length; i < l; ++i) {
- namePieces.push(regexEscape(eras[i].name));
- abbrPieces.push(regexEscape(eras[i].abbr));
- narrowPieces.push(regexEscape(eras[i].narrow));
+/***/ }),
- mixedPieces.push(regexEscape(eras[i].name));
- mixedPieces.push(regexEscape(eras[i].abbr));
- mixedPieces.push(regexEscape(eras[i].narrow));
- }
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/pattern.js":
+/*!***********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/pattern.js ***!
+ \***********************************************************************************************/
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
- this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
- this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
- this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
- this._erasNarrowRegex = new RegExp(
- '^(' + narrowPieces.join('|') + ')',
- 'i'
- );
- }
+"use strict";
- // FORMATTING
+var extd = __webpack_require__(/*! ./extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ isEmpty = extd.isEmpty,
+ merge = extd.merge,
+ forEach = extd.forEach,
+ declare = extd.declare,
+ constraintMatcher = __webpack_require__(/*! ./constraintMatcher */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/constraintMatcher.js"),
+ constraint = __webpack_require__(/*! ./constraint */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/constraint.js"),
+ EqualityConstraint = constraint.EqualityConstraint,
+ FromConstraint = constraint.FromConstraint;
- addFormatToken(0, ['gg', 2], 0, function () {
- return this.weekYear() % 100;
- });
+var id = 0;
+var Pattern = declare({});
+
+var ObjectPattern = Pattern.extend({
+ instance: {
+ constructor: function (type, alias, conditions, store, options) {
+ options = options || {};
+ this.id = id++;
+ this.type = type;
+ this.alias = alias;
+ this.conditions = conditions;
+ this.pattern = options.pattern;
+ var constraints = [new constraint.ObjectConstraint(type)];
+ var constrnts = constraintMatcher.toConstraints(conditions, merge({alias: alias}, options));
+ if (constrnts.length) {
+ constraints = constraints.concat(constrnts);
+ } else {
+ var cnstrnt = new constraint.TrueConstraint();
+ constraints.push(cnstrnt);
+ }
+ if (store && !isEmpty(store)) {
+ var atm = new constraint.HashConstraint(store);
+ constraints.push(atm);
+ }
+
+ forEach(constraints, function (constraint) {
+ constraint.set("alias", alias);
+ });
+ this.constraints = constraints;
+ },
+
+ getSpecificity: function () {
+ var constraints = this.constraints, specificity = 0;
+ for (var i = 0, l = constraints.length; i < l; i++) {
+ if (constraints[i] instanceof EqualityConstraint) {
+ specificity++;
+ }
+ }
+ return specificity;
+ },
- addFormatToken(0, ['GG', 2], 0, function () {
- return this.isoWeekYear() % 100;
- });
+ hasConstraint: function (type) {
+ return extd.some(this.constraints, function (c) {
+ return c instanceof type;
+ });
+ },
- function addWeekYearFormatToken(token, getter) {
- addFormatToken(0, [token, token.length], 0, getter);
+ hashCode: function () {
+ return [this.type, this.alias, extd.format("%j", this.conditions)].join(":");
+ },
+
+ toString: function () {
+ return extd.format("%j", this.constraints);
+ }
}
+}).as(exports, "ObjectPattern");
- addWeekYearFormatToken('gggg', 'weekYear');
- addWeekYearFormatToken('ggggg', 'weekYear');
- addWeekYearFormatToken('GGGG', 'isoWeekYear');
- addWeekYearFormatToken('GGGGG', 'isoWeekYear');
+var FromPattern = ObjectPattern.extend({
+ instance: {
+ constructor: function (type, alias, conditions, store, from, options) {
+ this._super([type, alias, conditions, store, options]);
+ this.from = new FromConstraint(from, options);
+ },
- // ALIASES
+ hasConstraint: function (type) {
+ return extd.some(this.constraints, function (c) {
+ return c instanceof type;
+ });
+ },
- addUnitAlias('weekYear', 'gg');
- addUnitAlias('isoWeekYear', 'GG');
+ getSpecificity: function () {
+ return this._super(arguments) + 1;
+ },
- // PRIORITY
+ hashCode: function () {
+ return [this.type, this.alias, extd.format("%j", this.conditions), this.from.from].join(":");
+ },
- addUnitPriority('weekYear', 1);
- addUnitPriority('isoWeekYear', 1);
+ toString: function () {
+ return extd.format("%j from %s", this.constraints, this.from.from);
+ }
+ }
+}).as(exports, "FromPattern");
- // PARSING
- addRegexToken('G', matchSigned);
- addRegexToken('g', matchSigned);
- addRegexToken('GG', match1to2, match2);
- addRegexToken('gg', match1to2, match2);
- addRegexToken('GGGG', match1to4, match4);
- addRegexToken('gggg', match1to4, match4);
- addRegexToken('GGGGG', match1to6, match6);
- addRegexToken('ggggg', match1to6, match6);
+FromPattern.extend().as(exports, "FromNotPattern");
+ObjectPattern.extend().as(exports, "NotPattern");
+ObjectPattern.extend().as(exports, "ExistsPattern");
+FromPattern.extend().as(exports, "FromExistsPattern");
- addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (
- input,
- week,
- config,
- token
- ) {
- week[token.substr(0, 2)] = toInt(input);
- });
+Pattern.extend({
- addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
- week[token] = hooks.parseTwoDigitYear(input);
- });
+ instance: {
+ constructor: function (left, right) {
+ this.id = id++;
+ this.leftPattern = left;
+ this.rightPattern = right;
+ },
- // MOMENTS
+ hashCode: function () {
+ return [this.leftPattern.hashCode(), this.rightPattern.hashCode()].join(":");
+ },
- function getSetWeekYear(input) {
- return getSetWeekYearHelper.call(
- this,
- input,
- this.week(),
- this.weekday(),
- this.localeData()._week.dow,
- this.localeData()._week.doy
- );
- }
+ getSpecificity: function () {
+ return this.rightPattern.getSpecificity() + this.leftPattern.getSpecificity();
+ },
- function getSetISOWeekYear(input) {
- return getSetWeekYearHelper.call(
- this,
- input,
- this.isoWeek(),
- this.isoWeekday(),
- 1,
- 4
- );
+ getters: {
+ constraints: function () {
+ return this.leftPattern.constraints.concat(this.rightPattern.constraints);
+ }
+ }
}
- function getISOWeeksInYear() {
- return weeksInYear(this.year(), 1, 4);
- }
+}).as(exports, "CompositePattern");
- function getISOWeeksInISOWeekYear() {
- return weeksInYear(this.isoWeekYear(), 1, 4);
- }
- function getWeeksInYear() {
- var weekInfo = this.localeData()._week;
- return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
+var InitialFact = declare({
+ instance: {
+ constructor: function () {
+ this.id = id++;
+ this.recency = 0;
+ }
}
+}).as(exports, "InitialFact");
- function getWeeksInWeekYear() {
- var weekInfo = this.localeData()._week;
- return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
- }
+ObjectPattern.extend({
+ instance: {
+ constructor: function () {
+ this._super([InitialFact, "__i__", [], {}]);
+ },
- function getSetWeekYearHelper(input, week, weekday, dow, doy) {
- var weeksTarget;
- if (input == null) {
- return weekOfYear(this, dow, doy).year;
- } else {
- weeksTarget = weeksInYear(input, dow, doy);
- if (week > weeksTarget) {
- week = weeksTarget;
- }
- return setWeekAll.call(this, input, week, weekday, dow, doy);
+ assert: function () {
+ return true;
}
}
+}).as(exports, "InitialFactPattern");
- function setWeekAll(weekYear, week, weekday, dow, doy) {
- var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
- date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
-
- this.year(date.getUTCFullYear());
- this.month(date.getUTCMonth());
- this.date(date.getUTCDate());
- return this;
- }
- // FORMATTING
- addFormatToken('Q', 0, 'Qo', 'quarter');
- // ALIASES
- addUnitAlias('quarter', 'Q');
+/***/ }),
- // PRIORITY
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/rule.js":
+/*!********************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/rule.js ***!
+ \********************************************************************************************/
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
- addUnitPriority('quarter', 7);
+"use strict";
- // PARSING
+var extd = __webpack_require__(/*! ./extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/extended.js"),
+ isArray = extd.isArray,
+ Promise = extd.Promise,
+ declare = extd.declare,
+ isHash = extd.isHash,
+ isString = extd.isString,
+ format = extd.format,
+ parser = __webpack_require__(/*! ./parser */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/parser/index.js"),
+ pattern = __webpack_require__(/*! ./pattern */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/pattern.js"),
+ ObjectPattern = pattern.ObjectPattern,
+ FromPattern = pattern.FromPattern,
+ NotPattern = pattern.NotPattern,
+ ExistsPattern = pattern.ExistsPattern,
+ FromNotPattern = pattern.FromNotPattern,
+ FromExistsPattern = pattern.FromExistsPattern,
+ CompositePattern = pattern.CompositePattern;
- addRegexToken('Q', match1);
- addParseToken('Q', function (input, array) {
- array[MONTH] = (toInt(input) - 1) * 3;
- });
+var parseConstraint = function (constraint) {
+ if (typeof constraint === 'function') {
+ // No parsing is needed for constraint functions
+ return constraint;
+ }
+ return parser.parseConstraint(constraint);
+};
- // MOMENTS
+var parseExtra = extd
+ .switcher()
+ .isUndefinedOrNull(function () {
+ return null;
+ })
+ .isLike(/^from +/, function (s) {
+ return {from: s.replace(/^from +/, "").replace(/^\s*|\s*$/g, "")};
+ })
+ .def(function (o) {
+ throw new Error("invalid rule constraint option " + o);
+ })
+ .switcher();
- function getSetQuarter(input) {
- return input == null
- ? Math.ceil((this.month() + 1) / 3)
- : this.month((input - 1) * 3 + (this.month() % 3));
- }
+var normailizeConstraint = extd
+ .switcher()
+ .isLength(1, function (c) {
+ throw new Error("invalid rule constraint " + format("%j", [c]));
+ })
+ .isLength(2, function (c) {
+ c.push("true");
+ return c;
+ })
+ //handle case where c[2] is a hash rather than a constraint string
+ .isLength(3, function (c) {
+ if (isString(c[2]) && /^from +/.test(c[2])) {
+ var extra = c[2];
+ c.splice(2, 0, "true");
+ c[3] = null;
+ c[4] = parseExtra(extra);
+ } else if (isHash(c[2])) {
+ c.splice(2, 0, "true");
+ }
+ return c;
+ })
+ //handle case where c[3] is a from clause rather than a hash for references
+ .isLength(4, function (c) {
+ if (isString(c[3])) {
+ c.splice(3, 0, null);
+ c[4] = parseExtra(c[4]);
+ }
+ return c;
+ })
+ .def(function (c) {
+ if (c.length === 5) {
+ c[4] = parseExtra(c[4]);
+ }
+ return c;
+ })
+ .switcher();
- // FORMATTING
+var getParamType = function getParamType(type, scope) {
+ scope = scope || {};
+ var getParamTypeSwitch = extd
+ .switcher()
+ .isEq("string", function () {
+ return String;
+ })
+ .isEq("date", function () {
+ return Date;
+ })
+ .isEq("array", function () {
+ return Array;
+ })
+ .isEq("boolean", function () {
+ return Boolean;
+ })
+ .isEq("regexp", function () {
+ return RegExp;
+ })
+ .isEq("number", function () {
+ return Number;
+ })
+ .isEq("object", function () {
+ return Object;
+ })
+ .isEq("hash", function () {
+ return Object;
+ })
+ .def(function (param) {
+ throw new TypeError("invalid param type " + param);
+ })
+ .switcher();
- addFormatToken('D', ['DD', 2], 'Do', 'date');
+ var _getParamType = extd
+ .switcher()
+ .isString(function (param) {
+ var t = scope[param];
+ if (!t) {
+ return getParamTypeSwitch(param.toLowerCase());
+ } else {
+ return t;
+ }
+ })
+ .isFunction(function (func) {
+ return func;
+ })
+ .deepEqual([], function () {
+ return Array;
+ })
+ .def(function (param) {
+ throw new Error("invalid param type " + param);
+ })
+ .switcher();
- // ALIASES
+ return _getParamType(type);
+};
- addUnitAlias('date', 'D');
+var parsePattern = extd
+ .switcher()
+ .containsAt("or", 0, function (condition) {
+ condition.shift();
+ return extd(condition).map(function (cond) {
+ cond.scope = condition.scope;
+ return parsePattern(cond);
+ }).flatten().value();
+ })
+ .containsAt("not", 0, function (condition) {
+ condition.shift();
+ condition = normailizeConstraint(condition);
+ if (condition[4] && condition[4].from) {
+ return [
+ new FromNotPattern(
+ getParamType(condition[0], condition.scope),
+ condition[1] || "m",
+ parseConstraint(condition[2] || "true"),
+ condition[3] || {},
+ parseConstraint(condition[4].from),
+ {scope: condition.scope, pattern: condition[2]}
+ )
+ ];
+ } else {
+ return [
+ new NotPattern(
+ getParamType(condition[0], condition.scope),
+ condition[1] || "m",
+ parseConstraint(condition[2] || "true"),
+ condition[3] || {},
+ {scope: condition.scope, pattern: condition[2]}
+ )
+ ];
+ }
+ })
+ .containsAt("exists", 0, function (condition) {
+ condition.shift();
+ condition = normailizeConstraint(condition);
+ if (condition[4] && condition[4].from) {
+ return [
+ new FromExistsPattern(
+ getParamType(condition[0], condition.scope),
+ condition[1] || "m",
+ parseConstraint(condition[2] || "true"),
+ condition[3] || {},
+ parseConstraint(condition[4].from),
+ {scope: condition.scope, pattern: condition[2]}
+ )
+ ];
+ } else {
+ return [
+ new ExistsPattern(
+ getParamType(condition[0], condition.scope),
+ condition[1] || "m",
+ parseConstraint(condition[2] || "true"),
+ condition[3] || {},
+ {scope: condition.scope, pattern: condition[2]}
+ )
+ ];
+ }
+ })
+ .def(function (condition) {
+ if (typeof condition === 'function') {
+ return [condition];
+ }
+ condition = normailizeConstraint(condition);
+ if (condition[4] && condition[4].from) {
+ return [
+ new FromPattern(
+ getParamType(condition[0], condition.scope),
+ condition[1] || "m",
+ parseConstraint(condition[2] || "true"),
+ condition[3] || {},
+ parseConstraint(condition[4].from),
+ {scope: condition.scope, pattern: condition[2]}
+ )
+ ];
+ } else {
+ return [
+ new ObjectPattern(
+ getParamType(condition[0], condition.scope),
+ condition[1] || "m",
+ parseConstraint(condition[2] || "true"),
+ condition[3] || {},
+ {scope: condition.scope, pattern: condition[2]}
+ )
+ ];
+ }
+ }).switcher();
- // PRIORITY
- addUnitPriority('date', 9);
+var Rule = declare({
+ instance: {
+ constructor: function (name, options, pattern, cb) {
+ this.name = name;
+ this.pattern = pattern;
+ this.cb = cb;
+ if (options.agendaGroup) {
+ this.agendaGroup = options.agendaGroup;
+ this.autoFocus = extd.isBoolean(options.autoFocus) ? options.autoFocus : false;
+ }
+ this.priority = options.priority || options.salience || 0;
+ },
- // PARSING
+ fire: function (flow, match) {
+ var ret = new Promise(), cb = this.cb;
+ try {
+ if (cb.length === 3) {
+ cb.call(flow, match.factHash, flow, ret.resolve);
+ } else {
+ ret = cb.call(flow, match.factHash, flow);
+ }
+ } catch (e) {
+ ret.errback(e);
+ }
+ return ret;
+ }
+ }
+});
- addRegexToken('D', match1to2);
- addRegexToken('DD', match1to2, match2);
- addRegexToken('Do', function (isStrict, locale) {
- // TODO: Remove "ordinalParse" fallback in next major release.
- return isStrict
- ? locale._dayOfMonthOrdinalParse || locale._ordinalParse
- : locale._dayOfMonthOrdinalParseLenient;
+function createRule(name, options, conditions, cb) {
+ if (isArray(options)) {
+ cb = conditions;
+ conditions = options;
+ } else {
+ options = options || {};
+ }
+ var isRules = extd.every(conditions, function (cond) {
+ return isArray(cond);
});
+ if (isRules && conditions.length === 1) {
+ conditions = conditions[0];
+ isRules = false;
+ }
+ var rules = [];
+ var scope = options.scope || {};
+ conditions.scope = scope;
+ if (isRules) {
+ var _mergePatterns = function (patt, i) {
+ if (!patterns[i]) {
+ patterns[i] = i === 0 ? [] : patterns[i - 1].slice();
+ //remove dup
+ if (i !== 0) {
+ patterns[i].pop();
+ }
+ patterns[i].push(patt);
+ } else {
+ extd(patterns).forEach(function (p) {
+ p.push(patt);
+ });
+ }
- addParseToken(['D', 'DD'], DATE);
- addParseToken('Do', function (input, array) {
- array[DATE] = toInt(input.match(match1to2)[0]);
- });
+ };
+ var l = conditions.length, patterns = [], condition;
+ for (var i = 0; i < l; i++) {
+ condition = conditions[i];
+ condition.scope = scope;
+ extd.forEach(parsePattern(condition), _mergePatterns);
- // MOMENTS
+ }
+ rules = extd.map(patterns, function (patterns) {
+ var compPat = null;
+ for (var i = 0; i < patterns.length; i++) {
+ if (compPat === null) {
+ compPat = new CompositePattern(patterns[i++], patterns[i]);
+ } else {
+ compPat = new CompositePattern(compPat, patterns[i]);
+ }
+ }
+ return new Rule(name, options, compPat, cb);
+ });
+ } else {
+ rules = extd.map(parsePattern(conditions), function (cond) {
+ return new Rule(name, options, cond, cb);
+ });
+ }
+ return rules;
+}
- var getSetDayOfMonth = makeGetSet('Date', true);
+exports.createRule = createRule;
- // FORMATTING
- addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
- // ALIASES
- addUnitAlias('dayOfYear', 'DDD');
- // PRIORITY
- addUnitPriority('dayOfYear', 4);
+/***/ }),
- // PARSING
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/workingMemory.js":
+/*!*****************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/workingMemory.js ***!
+ \*****************************************************************************************************/
+/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
- addRegexToken('DDD', match1to3);
- addRegexToken('DDDD', match3);
- addParseToken(['DDD', 'DDDD'], function (input, array, config) {
- config._dayOfYear = toInt(input);
- });
+"use strict";
- // HELPERS
+var declare = __webpack_require__(/*! declare.js */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/declare.js/index.js"),
+ LinkedList = __webpack_require__(/*! ./linkedList */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/linkedList.js"),
+ InitialFact = __webpack_require__(/*! ./pattern */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/nools/lib/pattern.js").InitialFact,
+ id = 0;
- // MOMENTS
+var Fact = declare({
- function getSetDayOfYear(input) {
- var dayOfYear =
- Math.round(
- (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5
- ) + 1;
- return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
- }
+ instance: {
+ constructor: function (obj) {
+ this.object = obj;
+ this.recency = 0;
+ this.id = id++;
+ },
- // FORMATTING
+ equals: function (fact) {
+ return fact === this.object;
+ },
- addFormatToken('m', ['mm', 2], 0, 'minute');
+ hashCode: function () {
+ return this.id;
+ }
+ }
- // ALIASES
+});
- addUnitAlias('minute', 'm');
+declare({
- // PRIORITY
+ instance: {
- addUnitPriority('minute', 14);
+ constructor: function () {
+ this.recency = 0;
+ this.facts = new LinkedList();
+ },
- // PARSING
+ dispose: function () {
+ this.facts.clear();
+ },
- addRegexToken('m', match1to2);
- addRegexToken('mm', match1to2, match2);
- addParseToken(['m', 'mm'], MINUTE);
+ getFacts: function () {
+ var head = {next: this.facts.head}, ret = [], i = 0, val;
+ while ((head = head.next)) {
+ if (!((val = head.data.object) instanceof InitialFact)) {
+ ret[i++] = val;
+ }
+ }
+ return ret;
+ },
- // MOMENTS
+ getFactsByType: function (Type) {
+ var head = {next: this.facts.head}, ret = [], i = 0;
+ while ((head = head.next)) {
+ var val = head.data.object;
+ if (!(val instanceof InitialFact) && (val instanceof Type || val.constructor === Type)) {
+ ret[i++] = val;
+ }
+ }
+ return ret;
+ },
- var getSetMinute = makeGetSet('Minutes', false);
+ getFactHandle: function (o) {
+ var head = {next: this.facts.head}, ret;
+ while ((head = head.next)) {
+ var existingFact = head.data;
+ if (existingFact.equals(o)) {
+ return existingFact;
+ }
+ }
+ if (!ret) {
+ ret = new Fact(o);
+ ret.recency = this.recency++;
+ //this.facts.push(ret);
+ }
+ return ret;
+ },
- // FORMATTING
+ modifyFact: function (fact) {
+ var head = {next: this.facts.head};
+ while ((head = head.next)) {
+ var existingFact = head.data;
+ if (existingFact.equals(fact)) {
+ existingFact.recency = this.recency++;
+ return existingFact;
+ }
+ }
+ //if we made it here we did not find the fact
+ throw new Error("the fact to modify does not exist");
+ },
- addFormatToken('s', ['ss', 2], 0, 'second');
+ assertFact: function (fact) {
+ var ret = new Fact(fact);
+ ret.recency = this.recency++;
+ this.facts.push(ret);
+ return ret;
+ },
- // ALIASES
+ retractFact: function (fact) {
+ var facts = this.facts, head = {next: facts.head};
+ while ((head = head.next)) {
+ var existingFact = head.data;
+ if (existingFact.equals(fact)) {
+ facts.remove(head);
+ return existingFact;
+ }
+ }
+ //if we made it here we did not find the fact
+ throw new Error("the fact to remove does not exist");
- addUnitAlias('second', 's');
- // PRIORITY
+ }
+ }
- addUnitPriority('second', 15);
+}).as(exports, "WorkingMemory");
- // PARSING
- addRegexToken('s', match1to2);
- addRegexToken('ss', match1to2, match2);
- addParseToken(['s', 'ss'], SECOND);
- // MOMENTS
+/***/ }),
- var getSetSecond = makeGetSet('Seconds', false);
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/object-extended/index.js":
+/*!***************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/object-extended/index.js ***!
+ \***************************************************************************************************/
+/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
- // FORMATTING
+(function () {
+ "use strict";
+ /*global extended isExtended*/
- addFormatToken('S', 0, 0, function () {
- return ~~(this.millisecond() / 100);
- });
+ function defineObject(extended, is, arr) {
- addFormatToken(0, ['SS', 2], 0, function () {
- return ~~(this.millisecond() / 10);
- });
+ var deepEqual = is.deepEqual,
+ isString = is.isString,
+ isHash = is.isHash,
+ difference = arr.difference,
+ hasOwn = Object.prototype.hasOwnProperty,
+ isFunction = is.isFunction;
- addFormatToken(0, ['SSS', 3], 0, 'millisecond');
- addFormatToken(0, ['SSSS', 4], 0, function () {
- return this.millisecond() * 10;
- });
- addFormatToken(0, ['SSSSS', 5], 0, function () {
- return this.millisecond() * 100;
- });
- addFormatToken(0, ['SSSSSS', 6], 0, function () {
- return this.millisecond() * 1000;
- });
- addFormatToken(0, ['SSSSSSS', 7], 0, function () {
- return this.millisecond() * 10000;
- });
- addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
- return this.millisecond() * 100000;
- });
- addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
- return this.millisecond() * 1000000;
- });
+ function _merge(target, source) {
+ var name, s;
+ for (name in source) {
+ if (hasOwn.call(source, name)) {
+ s = source[name];
+ if (!(name in target) || (target[name] !== s)) {
+ target[name] = s;
+ }
+ }
+ }
+ return target;
+ }
- // ALIASES
+ function _deepMerge(target, source) {
+ var name, s, t;
+ for (name in source) {
+ if (hasOwn.call(source, name)) {
+ s = source[name];
+ t = target[name];
+ if (!deepEqual(t, s)) {
+ if (isHash(t) && isHash(s)) {
+ target[name] = _deepMerge(t, s);
+ } else if (isHash(s)) {
+ target[name] = _deepMerge({}, s);
+ } else {
+ target[name] = s;
+ }
+ }
+ }
+ }
+ return target;
+ }
- addUnitAlias('millisecond', 'ms');
- // PRIORITY
+ function merge(obj) {
+ if (!obj) {
+ obj = {};
+ }
+ for (var i = 1, l = arguments.length; i < l; i++) {
+ _merge(obj, arguments[i]);
+ }
+ return obj; // Object
+ }
- addUnitPriority('millisecond', 16);
+ function deepMerge(obj) {
+ if (!obj) {
+ obj = {};
+ }
+ for (var i = 1, l = arguments.length; i < l; i++) {
+ _deepMerge(obj, arguments[i]);
+ }
+ return obj; // Object
+ }
- // PARSING
- addRegexToken('S', match1to3, match1);
- addRegexToken('SS', match1to3, match2);
- addRegexToken('SSS', match1to3, match3);
+ function extend(parent, child) {
+ var proto = parent.prototype || parent;
+ merge(proto, child);
+ return parent;
+ }
- var token, getSetMillisecond;
- for (token = 'SSSS'; token.length <= 9; token += 'S') {
- addRegexToken(token, matchUnsigned);
- }
+ function forEach(hash, iterator, scope) {
+ if (!isHash(hash) || !isFunction(iterator)) {
+ throw new TypeError();
+ }
+ var objKeys = keys(hash), key;
+ for (var i = 0, len = objKeys.length; i < len; ++i) {
+ key = objKeys[i];
+ iterator.call(scope || hash, hash[key], key, hash);
+ }
+ return hash;
+ }
- function parseMs(input, array) {
- array[MILLISECOND] = toInt(('0.' + input) * 1000);
- }
+ function filter(hash, iterator, scope) {
+ if (!isHash(hash) || !isFunction(iterator)) {
+ throw new TypeError();
+ }
+ var objKeys = keys(hash), key, value, ret = {};
+ for (var i = 0, len = objKeys.length; i < len; ++i) {
+ key = objKeys[i];
+ value = hash[key];
+ if (iterator.call(scope || hash, value, key, hash)) {
+ ret[key] = value;
+ }
+ }
+ return ret;
+ }
- for (token = 'S'; token.length <= 9; token += 'S') {
- addParseToken(token, parseMs);
- }
+ function values(hash) {
+ if (!isHash(hash)) {
+ throw new TypeError();
+ }
+ var objKeys = keys(hash), ret = [];
+ for (var i = 0, len = objKeys.length; i < len; ++i) {
+ ret.push(hash[objKeys[i]]);
+ }
+ return ret;
+ }
- getSetMillisecond = makeGetSet('Milliseconds', false);
- // FORMATTING
+ function keys(hash) {
+ if (!isHash(hash)) {
+ throw new TypeError();
+ }
+ var ret = [];
+ for (var i in hash) {
+ if (hasOwn.call(hash, i)) {
+ ret.push(i);
+ }
+ }
+ return ret;
+ }
- addFormatToken('z', 0, 0, 'zoneAbbr');
- addFormatToken('zz', 0, 0, 'zoneName');
+ function invert(hash) {
+ if (!isHash(hash)) {
+ throw new TypeError();
+ }
+ var objKeys = keys(hash), key, ret = {};
+ for (var i = 0, len = objKeys.length; i < len; ++i) {
+ key = objKeys[i];
+ ret[hash[key]] = key;
+ }
+ return ret;
+ }
- // MOMENTS
+ function toArray(hash) {
+ if (!isHash(hash)) {
+ throw new TypeError();
+ }
+ var objKeys = keys(hash), key, ret = [];
+ for (var i = 0, len = objKeys.length; i < len; ++i) {
+ key = objKeys[i];
+ ret.push([key, hash[key]]);
+ }
+ return ret;
+ }
- function getZoneAbbr() {
- return this._isUTC ? 'UTC' : '';
- }
+ function omit(hash, omitted) {
+ if (!isHash(hash)) {
+ throw new TypeError();
+ }
+ if (isString(omitted)) {
+ omitted = [omitted];
+ }
+ var objKeys = difference(keys(hash), omitted), key, ret = {};
+ for (var i = 0, len = objKeys.length; i < len; ++i) {
+ key = objKeys[i];
+ ret[key] = hash[key];
+ }
+ return ret;
+ }
- function getZoneName() {
- return this._isUTC ? 'Coordinated Universal Time' : '';
- }
+ var hash = {
+ forEach: forEach,
+ filter: filter,
+ invert: invert,
+ values: values,
+ toArray: toArray,
+ keys: keys,
+ omit: omit
+ };
- var proto = Moment.prototype;
- proto.add = add;
- proto.calendar = calendar$1;
- proto.clone = clone;
- proto.diff = diff;
- proto.endOf = endOf;
- proto.format = format;
- proto.from = from;
- proto.fromNow = fromNow;
- proto.to = to;
- proto.toNow = toNow;
- proto.get = stringGet;
- proto.invalidAt = invalidAt;
- proto.isAfter = isAfter;
- proto.isBefore = isBefore;
- proto.isBetween = isBetween;
- proto.isSame = isSame;
- proto.isSameOrAfter = isSameOrAfter;
- proto.isSameOrBefore = isSameOrBefore;
- proto.isValid = isValid$2;
- proto.lang = lang;
- proto.locale = locale;
- proto.localeData = localeData;
- proto.max = prototypeMax;
- proto.min = prototypeMin;
- proto.parsingFlags = parsingFlags;
- proto.set = stringSet;
- proto.startOf = startOf;
- proto.subtract = subtract;
- proto.toArray = toArray;
- proto.toObject = toObject;
- proto.toDate = toDate;
- proto.toISOString = toISOString;
- proto.inspect = inspect;
- if (typeof Symbol !== 'undefined' && Symbol.for != null) {
- proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
- return 'Moment<' + this.format() + '>';
+ var obj = {
+ extend: extend,
+ merge: merge,
+ deepMerge: deepMerge,
+ omit: omit
};
- }
- proto.toJSON = toJSON;
- proto.toString = toString;
- proto.unix = unix;
- proto.valueOf = valueOf;
- proto.creationData = creationData;
- proto.eraName = getEraName;
- proto.eraNarrow = getEraNarrow;
- proto.eraAbbr = getEraAbbr;
- proto.eraYear = getEraYear;
- proto.year = getSetYear;
- proto.isLeapYear = getIsLeapYear;
- proto.weekYear = getSetWeekYear;
- proto.isoWeekYear = getSetISOWeekYear;
- proto.quarter = proto.quarters = getSetQuarter;
- proto.month = getSetMonth;
- proto.daysInMonth = getDaysInMonth;
- proto.week = proto.weeks = getSetWeek;
- proto.isoWeek = proto.isoWeeks = getSetISOWeek;
- proto.weeksInYear = getWeeksInYear;
- proto.weeksInWeekYear = getWeeksInWeekYear;
- proto.isoWeeksInYear = getISOWeeksInYear;
- proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
- proto.date = getSetDayOfMonth;
- proto.day = proto.days = getSetDayOfWeek;
- proto.weekday = getSetLocaleDayOfWeek;
- proto.isoWeekday = getSetISODayOfWeek;
- proto.dayOfYear = getSetDayOfYear;
- proto.hour = proto.hours = getSetHour;
- proto.minute = proto.minutes = getSetMinute;
- proto.second = proto.seconds = getSetSecond;
- proto.millisecond = proto.milliseconds = getSetMillisecond;
- proto.utcOffset = getSetOffset;
- proto.utc = setOffsetToUTC;
- proto.local = setOffsetToLocal;
- proto.parseZone = setOffsetToParsedOffset;
- proto.hasAlignedHourOffset = hasAlignedHourOffset;
- proto.isDST = isDaylightSavingTime;
- proto.isLocal = isLocal;
- proto.isUtcOffset = isUtcOffset;
- proto.isUtc = isUtc;
- proto.isUTC = isUtc;
- proto.zoneAbbr = getZoneAbbr;
- proto.zoneName = getZoneName;
- proto.dates = deprecate(
- 'dates accessor is deprecated. Use date instead.',
- getSetDayOfMonth
- );
- proto.months = deprecate(
- 'months accessor is deprecated. Use month instead',
- getSetMonth
- );
- proto.years = deprecate(
- 'years accessor is deprecated. Use year instead',
- getSetYear
- );
- proto.zone = deprecate(
- 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
- getSetZone
- );
- proto.isDSTShifted = deprecate(
- 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
- isDaylightSavingTimeShifted
- );
-
- function createUnix(input) {
- return createLocal(input * 1000);
- }
- function createInZone() {
- return createLocal.apply(null, arguments).parseZone();
- }
+ var ret = extended.define(is.isObject, obj).define(isHash, hash).define(is.isFunction, {extend: extend}).expose({hash: hash}).expose(obj);
+ var orig = ret.extend;
+ ret.extend = function __extend() {
+ if (arguments.length === 1) {
+ return orig.extend.apply(ret, arguments);
+ } else {
+ extend.apply(null, arguments);
+ }
+ };
+ return ret;
- function preParsePostFormat(string) {
- return string;
}
- var proto$1 = Locale.prototype;
-
- proto$1.calendar = calendar;
- proto$1.longDateFormat = longDateFormat;
- proto$1.invalidDate = invalidDate;
- proto$1.ordinal = ordinal;
- proto$1.preparse = preParsePostFormat;
- proto$1.postformat = preParsePostFormat;
- proto$1.relativeTime = relativeTime;
- proto$1.pastFuture = pastFuture;
- proto$1.set = set;
- proto$1.eras = localeEras;
- proto$1.erasParse = localeErasParse;
- proto$1.erasConvertYear = localeErasConvertYear;
- proto$1.erasAbbrRegex = erasAbbrRegex;
- proto$1.erasNameRegex = erasNameRegex;
- proto$1.erasNarrowRegex = erasNarrowRegex;
+ if (true) {
+ if ( true && module.exports) {
+ module.exports = defineObject(__webpack_require__(/*! extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extended/index.js"), __webpack_require__(/*! is-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/is-extended/index.js"), __webpack_require__(/*! array-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/array-extended/index.js"));
- proto$1.months = localeMonths;
- proto$1.monthsShort = localeMonthsShort;
- proto$1.monthsParse = localeMonthsParse;
- proto$1.monthsRegex = monthsRegex;
- proto$1.monthsShortRegex = monthsShortRegex;
- proto$1.week = localeWeek;
- proto$1.firstDayOfYear = localeFirstDayOfYear;
- proto$1.firstDayOfWeek = localeFirstDayOfWeek;
+ }
+ } else {}
- proto$1.weekdays = localeWeekdays;
- proto$1.weekdaysMin = localeWeekdaysMin;
- proto$1.weekdaysShort = localeWeekdaysShort;
- proto$1.weekdaysParse = localeWeekdaysParse;
+}).call(this);
- proto$1.weekdaysRegex = weekdaysRegex;
- proto$1.weekdaysShortRegex = weekdaysShortRegex;
- proto$1.weekdaysMinRegex = weekdaysMinRegex;
- proto$1.isPM = localeIsPM;
- proto$1.meridiem = localeMeridiem;
- function get$1(format, index, field, setter) {
- var locale = getLocale(),
- utc = createUTC().set(setter, index);
- return locale[field](utc, format);
- }
- function listMonthsImpl(format, index, field) {
- if (isNumber(format)) {
- index = format;
- format = undefined;
- }
- format = format || '';
- if (index != null) {
- return get$1(format, index, field, 'month');
- }
- var i,
- out = [];
- for (i = 0; i < 12; i++) {
- out[i] = get$1(format, i, field, 'month');
- }
- return out;
- }
- // ()
- // (5)
- // (fmt, 5)
- // (fmt)
- // (true)
- // (true, 5)
- // (true, fmt, 5)
- // (true, fmt)
- function listWeekdaysImpl(localeSorted, format, index, field) {
- if (typeof localeSorted === 'boolean') {
- if (isNumber(format)) {
- index = format;
- format = undefined;
- }
+/***/ }),
- format = format || '';
- } else {
- format = localeSorted;
- index = format;
- localeSorted = false;
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/promise-extended/index.js":
+/*!****************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/promise-extended/index.js ***!
+ \****************************************************************************************************/
+/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
- if (isNumber(format)) {
- index = format;
- format = undefined;
- }
+(function () {
+ "use strict";
+ /*global setImmediate, MessageChannel*/
- format = format || '';
- }
- var locale = getLocale(),
- shift = localeSorted ? locale._week.dow : 0,
- i,
- out = [];
+ function definePromise(declare, extended, array, is, fn, args) {
- if (index != null) {
- return get$1(format, (index + shift) % 7, field, 'day');
+ var forEach = array.forEach,
+ isUndefinedOrNull = is.isUndefinedOrNull,
+ isArray = is.isArray,
+ isFunction = is.isFunction,
+ isBoolean = is.isBoolean,
+ bind = fn.bind,
+ bindIgnore = fn.bindIgnore,
+ argsToArray = args.argsToArray;
+
+ function createHandler(fn, promise) {
+ return function _handler() {
+ try {
+ when(fn.apply(null, arguments))
+ .addCallback(promise)
+ .addErrback(promise);
+ } catch (e) {
+ promise.errback(e);
+ }
+ };
}
- for (i = 0; i < 7; i++) {
- out[i] = get$1(format, (i + shift) % 7, field, 'day');
+ var nextTick;
+ if (typeof setImmediate === "function") {
+ // In IE10, or use https://github.com/NobleJS/setImmediate
+ if (typeof window !== "undefined") {
+ nextTick = setImmediate.bind(window);
+ } else {
+ nextTick = setImmediate;
+ }
+ } else if (typeof process !== "undefined") {
+ // node
+ nextTick = function (cb) {
+ process.nextTick(cb);
+ };
+ } else if (typeof MessageChannel !== "undefined") {
+ // modern browsers
+ // http://www.nonblocking.io/2011/06/windownexttick.html
+ var channel = new MessageChannel();
+ // linked list of tasks (single, with head node)
+ var head = {}, tail = head;
+ channel.port1.onmessage = function () {
+ head = head.next;
+ var task = head.task;
+ delete head.task;
+ task();
+ };
+ nextTick = function (task) {
+ tail = tail.next = {task: task};
+ channel.port2.postMessage(0);
+ };
+ } else {
+ // old browsers
+ nextTick = function (task) {
+ setTimeout(task, 0);
+ };
}
- return out;
- }
- function listMonths(format, index) {
- return listMonthsImpl(format, index, 'months');
- }
- function listMonthsShort(format, index) {
- return listMonthsImpl(format, index, 'monthsShort');
- }
+ //noinspection JSHint
+ var Promise = declare({
+ instance: {
+ __fired: false,
- function listWeekdays(localeSorted, format, index) {
- return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
- }
+ __results: null,
- function listWeekdaysShort(localeSorted, format, index) {
- return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
- }
+ __error: null,
- function listWeekdaysMin(localeSorted, format, index) {
- return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
- }
+ __errorCbs: null,
- getSetGlobalLocale('en', {
- eras: [
- {
- since: '0001-01-01',
- until: +Infinity,
- offset: 1,
- name: 'Anno Domini',
- narrow: 'AD',
- abbr: 'AD',
- },
- {
- since: '0000-12-31',
- until: -Infinity,
- offset: 1,
- name: 'Before Christ',
- narrow: 'BC',
- abbr: 'BC',
- },
- ],
- dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
- ordinal: function (number) {
- var b = number % 10,
- output =
- toInt((number % 100) / 10) === 1
- ? 'th'
- : b === 1
- ? 'st'
- : b === 2
- ? 'nd'
- : b === 3
- ? 'rd'
- : 'th';
- return number + output;
- },
- });
+ __cbs: null,
- // Side effect imports
+ constructor: function () {
+ this.__errorCbs = [];
+ this.__cbs = [];
+ fn.bindAll(this, ["callback", "errback", "resolve", "classic", "__resolve", "addCallback", "addErrback"]);
+ },
- hooks.lang = deprecate(
- 'moment.lang is deprecated. Use moment.locale instead.',
- getSetGlobalLocale
- );
- hooks.langData = deprecate(
- 'moment.langData is deprecated. Use moment.localeData instead.',
- getLocale
- );
+ __resolve: function () {
+ if (!this.__fired) {
+ this.__fired = true;
+ var cbs = this.__error ? this.__errorCbs : this.__cbs,
+ len = cbs.length, i,
+ results = this.__error || this.__results;
+ for (i = 0; i < len; i++) {
+ this.__callNextTick(cbs[i], results);
+ }
- var mathAbs = Math.abs;
+ }
+ },
- function abs() {
- var data = this._data;
+ __callNextTick: function (cb, results) {
+ nextTick(function () {
+ cb.apply(this, results);
+ });
+ },
- this._milliseconds = mathAbs(this._milliseconds);
- this._days = mathAbs(this._days);
- this._months = mathAbs(this._months);
+ addCallback: function (cb) {
+ if (cb) {
+ if (isPromiseLike(cb) && cb.callback) {
+ cb = cb.callback;
+ }
+ if (this.__fired && this.__results) {
+ this.__callNextTick(cb, this.__results);
+ } else {
+ this.__cbs.push(cb);
+ }
+ }
+ return this;
+ },
- data.milliseconds = mathAbs(data.milliseconds);
- data.seconds = mathAbs(data.seconds);
- data.minutes = mathAbs(data.minutes);
- data.hours = mathAbs(data.hours);
- data.months = mathAbs(data.months);
- data.years = mathAbs(data.years);
- return this;
- }
+ addErrback: function (cb) {
+ if (cb) {
+ if (isPromiseLike(cb) && cb.errback) {
+ cb = cb.errback;
+ }
+ if (this.__fired && this.__error) {
+ this.__callNextTick(cb, this.__error);
+ } else {
+ this.__errorCbs.push(cb);
+ }
+ }
+ return this;
+ },
- function addSubtract$1(duration, input, value, direction) {
- var other = createDuration(input, value);
+ callback: function (args) {
+ if (!this.__fired) {
+ this.__results = arguments;
+ this.__resolve();
+ }
+ return this.promise();
+ },
- duration._milliseconds += direction * other._milliseconds;
- duration._days += direction * other._days;
- duration._months += direction * other._months;
+ errback: function (args) {
+ if (!this.__fired) {
+ this.__error = arguments;
+ this.__resolve();
+ }
+ return this.promise();
+ },
- return duration._bubble();
- }
+ resolve: function (err, args) {
+ if (err) {
+ this.errback(err);
+ } else {
+ this.callback.apply(this, argsToArray(arguments, 1));
+ }
+ return this;
+ },
- // supports only 2.0-style add(1, 's') or add(duration)
- function add$1(input, value) {
- return addSubtract$1(this, input, value, 1);
- }
+ classic: function (cb) {
+ if ("function" === typeof cb) {
+ this.addErrback(function (err) {
+ cb(err);
+ });
+ this.addCallback(function () {
+ cb.apply(this, [null].concat(argsToArray(arguments)));
+ });
+ }
+ return this;
+ },
- // supports only 2.0-style subtract(1, 's') or subtract(duration)
- function subtract$1(input, value) {
- return addSubtract$1(this, input, value, -1);
- }
+ then: function (callback, errback) {
- function absCeil(number) {
- if (number < 0) {
- return Math.floor(number);
- } else {
- return Math.ceil(number);
- }
- }
+ var promise = new Promise(), errorHandler = promise;
+ if (isFunction(errback)) {
+ errorHandler = createHandler(errback, promise);
+ }
+ this.addErrback(errorHandler);
+ if (isFunction(callback)) {
+ this.addCallback(createHandler(callback, promise));
+ } else {
+ this.addCallback(promise);
+ }
- function bubble() {
- var milliseconds = this._milliseconds,
- days = this._days,
- months = this._months,
- data = this._data,
- seconds,
- minutes,
- hours,
- years,
- monthsFromDays;
+ return promise.promise();
+ },
- // if we have a mix of positive and negative values, bubble down first
- // check: https://github.com/moment/moment/issues/2166
- if (
- !(
- (milliseconds >= 0 && days >= 0 && months >= 0) ||
- (milliseconds <= 0 && days <= 0 && months <= 0)
- )
- ) {
- milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
- days = 0;
- months = 0;
- }
+ both: function (callback) {
+ return this.then(callback, callback);
+ },
- // The following code bubbles up values, see the tests for
- // examples of what that means.
- data.milliseconds = milliseconds % 1000;
+ promise: function () {
+ var ret = {
+ then: bind(this, "then"),
+ both: bind(this, "both"),
+ promise: function () {
+ return ret;
+ }
+ };
+ forEach(["addCallback", "addErrback", "classic"], function (action) {
+ ret[action] = bind(this, function () {
+ this[action].apply(this, arguments);
+ return ret;
+ });
+ }, this);
- seconds = absFloor(milliseconds / 1000);
- data.seconds = seconds % 60;
+ return ret;
+ }
- minutes = absFloor(seconds / 60);
- data.minutes = minutes % 60;
- hours = absFloor(minutes / 60);
- data.hours = hours % 24;
+ }
+ });
- days += absFloor(hours / 24);
- // convert days to months
- monthsFromDays = absFloor(daysToMonths(days));
- months += monthsFromDays;
- days -= absCeil(monthsToDays(monthsFromDays));
+ var PromiseList = Promise.extend({
+ instance: {
- // 12 months -> 1 year
- years = absFloor(months / 12);
- months %= 12;
+ /*@private*/
+ __results: null,
- data.days = days;
- data.months = months;
- data.years = years;
+ /*@private*/
+ __errors: null,
- return this;
- }
+ /*@private*/
+ __promiseLength: 0,
- function daysToMonths(days) {
- // 400 years have 146097 days (taking into account leap year rules)
- // 400 years have 12 months === 4800
- return (days * 4800) / 146097;
- }
+ /*@private*/
+ __defLength: 0,
- function monthsToDays(months) {
- // the reverse of daysToMonths
- return (months * 146097) / 4800;
- }
+ /*@private*/
+ __firedLength: 0,
- function as(units) {
- if (!this.isValid()) {
- return NaN;
- }
- var days,
- months,
- milliseconds = this._milliseconds;
+ normalizeResults: false,
- units = normalizeUnits(units);
+ constructor: function (defs, normalizeResults) {
+ this.__errors = [];
+ this.__results = [];
+ this.normalizeResults = isBoolean(normalizeResults) ? normalizeResults : false;
+ this._super(arguments);
+ if (defs && defs.length) {
+ this.__defLength = defs.length;
+ forEach(defs, this.__addPromise, this);
+ } else {
+ this.__resolve();
+ }
+ },
- if (units === 'month' || units === 'quarter' || units === 'year') {
- days = this._days + milliseconds / 864e5;
- months = this._months + daysToMonths(days);
- switch (units) {
- case 'month':
- return months;
- case 'quarter':
- return months / 3;
- case 'year':
- return months / 12;
- }
- } else {
- // handle milliseconds separately because of floating point math errors (issue #1867)
- days = this._days + Math.round(monthsToDays(this._months));
- switch (units) {
- case 'week':
- return days / 7 + milliseconds / 6048e5;
- case 'day':
- return days + milliseconds / 864e5;
- case 'hour':
- return days * 24 + milliseconds / 36e5;
- case 'minute':
- return days * 1440 + milliseconds / 6e4;
- case 'second':
- return days * 86400 + milliseconds / 1000;
- // Math.floor prevents floating point math errors here
- case 'millisecond':
- return Math.floor(days * 864e5) + milliseconds;
- default:
- throw new Error('Unknown unit ' + units);
- }
- }
- }
+ __addPromise: function (promise, i) {
+ promise.then(
+ bind(this, function () {
+ var args = argsToArray(arguments);
+ args.unshift(i);
+ this.callback.apply(this, args);
+ }),
+ bind(this, function () {
+ var args = argsToArray(arguments);
+ args.unshift(i);
+ this.errback.apply(this, args);
+ })
+ );
+ },
- // TODO: Use this.as('ms')?
- function valueOf$1() {
- if (!this.isValid()) {
- return NaN;
- }
- return (
- this._milliseconds +
- this._days * 864e5 +
- (this._months % 12) * 2592e6 +
- toInt(this._months / 12) * 31536e6
- );
- }
+ __resolve: function () {
+ if (!this.__fired) {
+ this.__fired = true;
+ var cbs = this.__errors.length ? this.__errorCbs : this.__cbs,
+ len = cbs.length, i,
+ results = this.__errors.length ? this.__errors : this.__results;
+ for (i = 0; i < len; i++) {
+ this.__callNextTick(cbs[i], results);
+ }
- function makeAs(alias) {
- return function () {
- return this.as(alias);
- };
- }
+ }
+ },
- var asMilliseconds = makeAs('ms'),
- asSeconds = makeAs('s'),
- asMinutes = makeAs('m'),
- asHours = makeAs('h'),
- asDays = makeAs('d'),
- asWeeks = makeAs('w'),
- asMonths = makeAs('M'),
- asQuarters = makeAs('Q'),
- asYears = makeAs('y');
+ __callNextTick: function (cb, results) {
+ nextTick(function () {
+ cb.apply(null, [results]);
+ });
+ },
- function clone$1() {
- return createDuration(this);
- }
+ addCallback: function (cb) {
+ if (cb) {
+ if (isPromiseLike(cb) && cb.callback) {
+ cb = bind(cb, "callback");
+ }
+ if (this.__fired && !this.__errors.length) {
+ this.__callNextTick(cb, this.__results);
+ } else {
+ this.__cbs.push(cb);
+ }
+ }
+ return this;
+ },
- function get$2(units) {
- units = normalizeUnits(units);
- return this.isValid() ? this[units + 's']() : NaN;
- }
+ addErrback: function (cb) {
+ if (cb) {
+ if (isPromiseLike(cb) && cb.errback) {
+ cb = bind(cb, "errback");
+ }
+ if (this.__fired && this.__errors.length) {
+ this.__callNextTick(cb, this.__errors);
+ } else {
+ this.__errorCbs.push(cb);
+ }
+ }
+ return this;
+ },
- function makeGetter(name) {
- return function () {
- return this.isValid() ? this._data[name] : NaN;
- };
- }
- var milliseconds = makeGetter('milliseconds'),
- seconds = makeGetter('seconds'),
- minutes = makeGetter('minutes'),
- hours = makeGetter('hours'),
- days = makeGetter('days'),
- months = makeGetter('months'),
- years = makeGetter('years');
+ callback: function (i) {
+ if (this.__fired) {
+ throw new Error("Already fired!");
+ }
+ var args = argsToArray(arguments);
+ if (this.normalizeResults) {
+ args = args.slice(1);
+ args = args.length === 1 ? args.pop() : args;
+ }
+ this.__results[i] = args;
+ this.__firedLength++;
+ if (this.__firedLength === this.__defLength) {
+ this.__resolve();
+ }
+ return this.promise();
+ },
- function weeks() {
- return absFloor(this.days() / 7);
- }
- var round = Math.round,
- thresholds = {
- ss: 44, // a few seconds to seconds
- s: 45, // seconds to minute
- m: 45, // minutes to hour
- h: 22, // hours to day
- d: 26, // days to month/week
- w: null, // weeks to month
- M: 11, // months to year
- };
+ errback: function (i) {
+ if (this.__fired) {
+ throw new Error("Already fired!");
+ }
+ var args = argsToArray(arguments);
+ if (this.normalizeResults) {
+ args = args.slice(1);
+ args = args.length === 1 ? args.pop() : args;
+ }
+ this.__errors[i] = args;
+ this.__firedLength++;
+ if (this.__firedLength === this.__defLength) {
+ this.__resolve();
+ }
+ return this.promise();
+ }
- // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
- function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
- return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
- }
+ }
+ });
- function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
- var duration = createDuration(posNegDuration).abs(),
- seconds = round(duration.as('s')),
- minutes = round(duration.as('m')),
- hours = round(duration.as('h')),
- days = round(duration.as('d')),
- months = round(duration.as('M')),
- weeks = round(duration.as('w')),
- years = round(duration.as('y')),
- a =
- (seconds <= thresholds.ss && ['s', seconds]) ||
- (seconds < thresholds.s && ['ss', seconds]) ||
- (minutes <= 1 && ['m']) ||
- (minutes < thresholds.m && ['mm', minutes]) ||
- (hours <= 1 && ['h']) ||
- (hours < thresholds.h && ['hh', hours]) ||
- (days <= 1 && ['d']) ||
- (days < thresholds.d && ['dd', days]);
- if (thresholds.w != null) {
- a =
- a ||
- (weeks <= 1 && ['w']) ||
- (weeks < thresholds.w && ['ww', weeks]);
+ function callNext(list, results, propogate) {
+ var ret = new Promise().callback();
+ forEach(list, function (listItem) {
+ ret = ret.then(propogate ? listItem : bindIgnore(null, listItem));
+ if (!propogate) {
+ ret = ret.then(function (res) {
+ results.push(res);
+ return results;
+ });
+ }
+ });
+ return ret;
}
- a = a ||
- (months <= 1 && ['M']) ||
- (months < thresholds.M && ['MM', months]) ||
- (years <= 1 && ['y']) || ['yy', years];
-
- a[2] = withoutSuffix;
- a[3] = +posNegDuration > 0;
- a[4] = locale;
- return substituteTimeAgo.apply(null, a);
- }
- // This function allows you to set the rounding function for relative time strings
- function getSetRelativeTimeRounding(roundingFunction) {
- if (roundingFunction === undefined) {
- return round;
- }
- if (typeof roundingFunction === 'function') {
- round = roundingFunction;
- return true;
+ function isPromiseLike(obj) {
+ return !isUndefinedOrNull(obj) && (isFunction(obj.then));
}
- return false;
- }
- // This function allows you to set a threshold for relative time strings
- function getSetRelativeTimeThreshold(threshold, limit) {
- if (thresholds[threshold] === undefined) {
- return false;
+ function wrapThenPromise(p) {
+ var ret = new Promise();
+ p.then(bind(ret, "callback"), bind(ret, "errback"));
+ return ret.promise();
}
- if (limit === undefined) {
- return thresholds[threshold];
+
+ function when(args) {
+ var p;
+ args = argsToArray(arguments);
+ if (!args.length) {
+ p = new Promise().callback(args).promise();
+ } else if (args.length === 1) {
+ args = args.pop();
+ if (isPromiseLike(args)) {
+ if (args.addCallback && args.addErrback) {
+ p = new Promise();
+ args.addCallback(p.callback);
+ args.addErrback(p.errback);
+ } else {
+ p = wrapThenPromise(args);
+ }
+ } else if (isArray(args) && array.every(args, isPromiseLike)) {
+ p = new PromiseList(args, true).promise();
+ } else {
+ p = new Promise().callback(args);
+ }
+ } else {
+ p = new PromiseList(array.map(args, function (a) {
+ return when(a);
+ }), true).promise();
+ }
+ return p;
+
}
- thresholds[threshold] = limit;
- if (threshold === 's') {
- thresholds.ss = limit - 1;
+
+ function wrap(fn, scope) {
+ return function _wrap() {
+ var ret = new Promise();
+ var args = argsToArray(arguments);
+ args.push(ret.resolve);
+ fn.apply(scope || this, args);
+ return ret.promise();
+ };
}
- return true;
- }
- function humanize(argWithSuffix, argThresholds) {
- if (!this.isValid()) {
- return this.localeData().invalidDate();
+ function serial(list) {
+ if (isArray(list)) {
+ return callNext(list, [], false);
+ } else {
+ throw new Error("When calling promise.serial the first argument must be an array");
+ }
}
- var withSuffix = false,
- th = thresholds,
- locale,
- output;
- if (typeof argWithSuffix === 'object') {
- argThresholds = argWithSuffix;
- argWithSuffix = false;
- }
- if (typeof argWithSuffix === 'boolean') {
- withSuffix = argWithSuffix;
- }
- if (typeof argThresholds === 'object') {
- th = Object.assign({}, thresholds, argThresholds);
- if (argThresholds.s != null && argThresholds.ss == null) {
- th.ss = argThresholds.s - 1;
+ function chain(list) {
+ if (isArray(list)) {
+ return callNext(list, [], true);
+ } else {
+ throw new Error("When calling promise.serial the first argument must be an array");
}
}
- locale = this.localeData();
- output = relativeTime$1(this, !withSuffix, th, locale);
- if (withSuffix) {
- output = locale.pastFuture(+this, output);
+ function wait(args, fn) {
+ args = argsToArray(arguments);
+ var resolved = false;
+ fn = args.pop();
+ var p = when(args);
+ return function waiter() {
+ if (!resolved) {
+ args = arguments;
+ return p.then(bind(this, function doneWaiting() {
+ resolved = true;
+ return fn.apply(this, args);
+ }));
+ } else {
+ return when(fn.apply(this, arguments));
+ }
+ };
}
- return locale.postformat(output);
- }
+ function createPromise() {
+ return new Promise();
+ }
- var abs$1 = Math.abs;
+ function createPromiseList(promises) {
+ return new PromiseList(promises, true).promise();
+ }
- function sign(x) {
- return (x > 0) - (x < 0) || +x;
- }
+ function createRejected(val) {
+ return createPromise().errback(val);
+ }
- function toISOString$1() {
- // for ISO strings we do not use the normal bubbling rules:
- // * milliseconds bubble up until they become hours
- // * days do not bubble at all
- // * months bubble up until they become years
- // This is because there is no context-free conversion between hours and days
- // (think of clock changes)
- // and also not between days and months (28-31 days per month)
- if (!this.isValid()) {
- return this.localeData().invalidDate();
+ function createResolved(val) {
+ return createPromise().callback(val);
}
- var seconds = abs$1(this._milliseconds) / 1000,
- days = abs$1(this._days),
- months = abs$1(this._months),
- minutes,
- hours,
- years,
- s,
- total = this.asSeconds(),
- totalSign,
- ymSign,
- daysSign,
- hmsSign;
- if (!total) {
- // this is the same as C#'s (Noda) and python (isodate)...
- // but not other JS (goog.date)
- return 'P0D';
- }
+ return extended
+ .define({
+ isPromiseLike: isPromiseLike
+ }).expose({
+ isPromiseLike: isPromiseLike,
+ when: when,
+ wrap: wrap,
+ wait: wait,
+ serial: serial,
+ chain: chain,
+ Promise: Promise,
+ PromiseList: PromiseList,
+ promise: createPromise,
+ defer: createPromise,
+ deferredList: createPromiseList,
+ reject: createRejected,
+ resolve: createResolved
+ });
- // 3600 seconds -> 60 minutes -> 1 hour
- minutes = absFloor(seconds / 60);
- hours = absFloor(minutes / 60);
- seconds %= 60;
- minutes %= 60;
+ }
- // 12 months -> 1 year
- years = absFloor(months / 12);
- months %= 12;
+ if (true) {
+ if ( true && module.exports) {
+ module.exports = definePromise(__webpack_require__(/*! declare.js */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/declare.js/index.js"), __webpack_require__(/*! extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extended/index.js"), __webpack_require__(/*! array-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/array-extended/index.js"), __webpack_require__(/*! is-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/is-extended/index.js"), __webpack_require__(/*! function-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/function-extended/index.js"), __webpack_require__(/*! arguments-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/arguments-extended/index.js"));
+ }
+ } else {}
- // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
- s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
+}).call(this);
- totalSign = total < 0 ? '-' : '';
- ymSign = sign(this._months) !== sign(total) ? '-' : '';
- daysSign = sign(this._days) !== sign(total) ? '-' : '';
- hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
- return (
- totalSign +
- 'P' +
- (years ? ymSign + years + 'Y' : '') +
- (months ? ymSign + months + 'M' : '') +
- (days ? daysSign + days + 'D' : '') +
- (hours || minutes || seconds ? 'T' : '') +
- (hours ? hmsSign + hours + 'H' : '') +
- (minutes ? hmsSign + minutes + 'M' : '') +
- (seconds ? hmsSign + s + 'S' : '')
- );
- }
- var proto$2 = Duration.prototype;
- proto$2.isValid = isValid$1;
- proto$2.abs = abs;
- proto$2.add = add$1;
- proto$2.subtract = subtract$1;
- proto$2.as = as;
- proto$2.asMilliseconds = asMilliseconds;
- proto$2.asSeconds = asSeconds;
- proto$2.asMinutes = asMinutes;
- proto$2.asHours = asHours;
- proto$2.asDays = asDays;
- proto$2.asWeeks = asWeeks;
- proto$2.asMonths = asMonths;
- proto$2.asQuarters = asQuarters;
- proto$2.asYears = asYears;
- proto$2.valueOf = valueOf$1;
- proto$2._bubble = bubble;
- proto$2.clone = clone$1;
- proto$2.get = get$2;
- proto$2.milliseconds = milliseconds;
- proto$2.seconds = seconds;
- proto$2.minutes = minutes;
- proto$2.hours = hours;
- proto$2.days = days;
- proto$2.weeks = weeks;
- proto$2.months = months;
- proto$2.years = years;
- proto$2.humanize = humanize;
- proto$2.toISOString = toISOString$1;
- proto$2.toString = toISOString$1;
- proto$2.toJSON = toISOString$1;
- proto$2.locale = locale;
- proto$2.localeData = localeData;
- proto$2.toIsoString = deprecate(
- 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
- toISOString$1
- );
- proto$2.lang = lang;
- // FORMATTING
- addFormatToken('X', 0, 0, 'unix');
- addFormatToken('x', 0, 0, 'valueOf');
- // PARSING
+/***/ }),
- addRegexToken('x', matchSigned);
- addRegexToken('X', matchTimestamp);
- addParseToken('X', function (input, array, config) {
- config._d = new Date(parseFloat(input) * 1000);
- });
- addParseToken('x', function (input, array, config) {
- config._d = new Date(toInt(input));
- });
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/string-extended/index.js":
+/*!***************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/string-extended/index.js ***!
+ \***************************************************************************************************/
+/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
- //! moment.js
+(function () {
+ "use strict";
- hooks.version = '2.26.0';
+ function defineString(extended, is, date, arr) {
- setHookCallback(createLocal);
+ var stringify;
+ if (typeof JSON === "undefined") {
+ /*
+ json2.js
+ 2012-10-08
- hooks.fn = proto;
- hooks.min = min;
- hooks.max = max;
- hooks.now = now;
- hooks.utc = createUTC;
- hooks.unix = createUnix;
- hooks.months = listMonths;
- hooks.isDate = isDate;
- hooks.locale = getSetGlobalLocale;
- hooks.invalid = createInvalid;
- hooks.duration = createDuration;
- hooks.isMoment = isMoment;
- hooks.weekdays = listWeekdays;
- hooks.parseZone = createInZone;
- hooks.localeData = getLocale;
- hooks.isDuration = isDuration;
- hooks.monthsShort = listMonthsShort;
- hooks.weekdaysMin = listWeekdaysMin;
- hooks.defineLocale = defineLocale;
- hooks.updateLocale = updateLocale;
- hooks.locales = listLocales;
- hooks.weekdaysShort = listWeekdaysShort;
- hooks.normalizeUnits = normalizeUnits;
- hooks.relativeTimeRounding = getSetRelativeTimeRounding;
- hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
- hooks.calendarFormat = getCalendarFormat;
- hooks.prototype = proto;
+ Public Domain.
- // currently HTML5 input type only supports 24-hour formats
- hooks.HTML5_FMT = {
- DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', //
- DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', //
- DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', //
- DATE: 'YYYY-MM-DD', //
- TIME: 'HH:mm', //
- TIME_SECONDS: 'HH:mm:ss', //
- TIME_MS: 'HH:mm:ss.SSS', //
- WEEK: 'GGGG-[W]WW', //
- MONTH: 'YYYY-MM', //
- };
+ NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+ */
- return hooks;
+ (function () {
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10 ? '0' + n : n;
+ }
-})));
+ var isPrimitive = is.tester().isString().isNumber().isBoolean().tester();
+ function toJSON(obj) {
+ if (is.isDate(obj)) {
+ return isFinite(obj.valueOf()) ? obj.getUTCFullYear() + '-' +
+ f(obj.getUTCMonth() + 1) + '-' +
+ f(obj.getUTCDate()) + 'T' +
+ f(obj.getUTCHours()) + ':' +
+ f(obj.getUTCMinutes()) + ':' +
+ f(obj.getUTCSeconds()) + 'Z'
+ : null;
+ } else if (isPrimitive(obj)) {
+ return obj.valueOf();
+ }
+ return obj;
+ }
-/***/ }),
+ var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ gap,
+ indent,
+ meta = { // table of character substitutions
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '"': '\\"',
+ '\\': '\\\\'
+ },
+ rep;
-/***/ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/src/index.js":
-/*!*******************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/calendar-interval/src/index.js ***!
- \*******************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-const moment = __webpack_require__(/*! moment */ "./node_modules/cht-core-3-10/shared-libs/calendar-interval/node_modules/moment/moment.js");
+ function quote(string) {
+ escapable.lastIndex = 0;
+ return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
+ var c = meta[a];
+ return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ }) + '"' : '"' + string + '"';
+ }
-const normalizeStartDate = (intervalStartDate) => {
- intervalStartDate = parseInt(intervalStartDate);
- if (isNaN(intervalStartDate) || intervalStartDate <= 0 || intervalStartDate > 31) {
- intervalStartDate = 1;
- }
+ function str(key, holder) {
- return intervalStartDate;
-};
+ var i, k, v, length, mind = gap, partial, value = holder[key];
+ if (value) {
+ value = toJSON(value);
+ }
+ if (typeof rep === 'function') {
+ value = rep.call(holder, key, value);
+ }
+ switch (typeof value) {
+ case 'string':
+ return quote(value);
+ case 'number':
+ return isFinite(value) ? String(value) : 'null';
+ case 'boolean':
+ case 'null':
+ return String(value);
+ case 'object':
+ if (!value) {
+ return 'null';
+ }
+ gap += indent;
+ partial = [];
+ if (Object.prototype.toString.apply(value) === '[object Array]') {
+ length = value.length;
+ for (i = 0; i < length; i += 1) {
+ partial[i] = str(i, value) || 'null';
+ }
+ v = partial.length === 0 ? '[]' : gap ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : '[' + partial.join(',') + ']';
+ gap = mind;
+ return v;
+ }
+ if (rep && typeof rep === 'object') {
+ length = rep.length;
+ for (i = 0; i < length; i += 1) {
+ if (typeof rep[i] === 'string') {
+ k = rep[i];
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ } else {
+ for (k in value) {
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ }
+ v = partial.length === 0 ? '{}' : gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : '{' + partial.join(',') + '}';
+ gap = mind;
+ return v;
+ }
+ }
-const getMinimumStartDate = (intervalStartDate, relativeDate) => {
- return moment
- .min(
- relativeDate.clone().subtract(1, 'month').date(intervalStartDate).startOf('day'),
- relativeDate.clone().startOf('month')
- )
- .valueOf();
-};
+ stringify = function (value, replacer, space) {
+ var i;
+ gap = '';
+ indent = '';
+ if (typeof space === 'number') {
+ for (i = 0; i < space; i += 1) {
+ indent += ' ';
+ }
+ } else if (typeof space === 'string') {
+ indent = space;
+ }
+ rep = replacer;
+ if (replacer && typeof replacer !== 'function' &&
+ (typeof replacer !== 'object' ||
+ typeof replacer.length !== 'number')) {
+ throw new Error('JSON.stringify');
+ }
+ return str('', {'': value});
+ };
+ }());
+ } else {
+ stringify = JSON.stringify;
+ }
-const getMinimumEndDate = (intervalStartDate, nextMonth, relativeDate) => {
- return moment
- .min(
- relativeDate.clone().add(nextMonth ? 1 : 0, 'month').date(intervalStartDate - 1).endOf('day'),
- relativeDate.clone().add(nextMonth ? 1 : 0, 'month').endOf('month')
- )
- .valueOf();
-};
-const getInterval = (intervalStartDate, referenceDate = moment()) => {
- intervalStartDate = normalizeStartDate(intervalStartDate);
- if (intervalStartDate === 1) {
- return {
- start: referenceDate.startOf('month').valueOf(),
- end: referenceDate.endOf('month').valueOf()
- };
- }
+ var isHash = is.isHash, aSlice = Array.prototype.slice;
- if (intervalStartDate <= referenceDate.date()) {
- return {
- start: referenceDate.date(intervalStartDate).startOf('day').valueOf(),
- end: getMinimumEndDate(intervalStartDate, true, referenceDate)
- };
- }
+ var FORMAT_REGEX = /%((?:-?\+?.?\d*)?|(?:\[[^\[|\]]*\]))?([sjdDZ])/g;
+ var INTERP_REGEX = /\{(?:\[([^\[|\]]*)\])?(\w+)\}/g;
+ var STR_FORMAT = /(-?)(\+?)([A-Z|a-z|\W]?)([1-9][0-9]*)?$/;
+ var OBJECT_FORMAT = /([1-9][0-9]*)$/g;
- return {
- start: getMinimumStartDate(intervalStartDate, referenceDate),
- end: getMinimumEndDate(intervalStartDate, false, referenceDate)
- };
-};
+ function formatString(string, format) {
+ var ret = string;
+ if (STR_FORMAT.test(format)) {
+ var match = format.match(STR_FORMAT);
+ var isLeftJustified = match[1], padChar = match[3], width = match[4];
+ if (width) {
+ width = parseInt(width, 10);
+ if (ret.length < width) {
+ ret = pad(ret, width, padChar, isLeftJustified);
+ } else {
+ ret = truncate(ret, width);
+ }
+ }
+ }
+ return ret;
+ }
-module.exports = {
- // Returns the timestamps of the start and end of the current calendar interval
- // @param {Number} [intervalStartDate=1] - day of month when interval starts (1 - 31)
- //
- // if `intervalStartDate` exceeds month's day count, the start/end of following/current month is returned
- // f.e. `intervalStartDate` === 31 would generate next intervals :
- // [12-31 -> 01-30], [01-31 -> 02-[28|29]], [03-01 -> 03-30], [03-31 -> 04-30], [05-01 -> 05-30], [05-31 - 06-30]
- getCurrent: (intervalStartDate) => getInterval(intervalStartDate),
+ function formatNumber(number, format) {
+ var ret;
+ if (is.isNumber(number)) {
+ ret = "" + number;
+ if (STR_FORMAT.test(format)) {
+ var match = format.match(STR_FORMAT);
+ var isLeftJustified = match[1], signed = match[2], padChar = match[3], width = match[4];
+ if (signed) {
+ ret = (number > 0 ? "+" : "") + ret;
+ }
+ if (width) {
+ width = parseInt(width, 10);
+ if (ret.length < width) {
+ ret = pad(ret, width, padChar || "0", isLeftJustified);
+ } else {
+ ret = truncate(ret, width);
+ }
+ }
- /**
- * Returns the timestamps of the start and end of the a calendar interval that contains a reference date
- * @param {Number} [intervalStartDate=1] - day of month when interval starts (1 - 31)
- * @param {Number} timestamp - the reference date the interval should include
- * @returns { start: number, end: number } - timestamps that define the calendar interval
- */
- getInterval: (intervalStartDate, timestamp) => getInterval(intervalStartDate, moment(timestamp)),
-};
+ }
+ } else {
+ throw new Error("stringExtended.format : when using %d the parameter must be a number!");
+ }
+ return ret;
+ }
+ function formatObject(object, format) {
+ var ret, match = format.match(OBJECT_FORMAT), spacing = 0;
+ if (match) {
+ spacing = parseInt(match[0], 10);
+ if (isNaN(spacing)) {
+ spacing = 0;
+ }
+ }
+ try {
+ ret = stringify(object, null, spacing);
+ } catch (e) {
+ throw new Error("stringExtended.format : Unable to parse json from ", object);
+ }
+ return ret;
+ }
-/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/lineage/src/hydration.js":
-/*!*************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/lineage/src/hydration.js ***!
- \*************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+ var styles = {
+ //styles
+ bold: 1,
+ bright: 1,
+ italic: 3,
+ underline: 4,
+ blink: 5,
+ inverse: 7,
+ crossedOut: 9,
-const _ = __webpack_require__(/*! lodash/core */ "./node_modules/lodash/core.js");
-_.uniq = __webpack_require__(/*! lodash/uniq */ "./node_modules/lodash/uniq.js");
-const utils = __webpack_require__(/*! ./utils */ "./node_modules/cht-core-3-10/shared-libs/lineage/src/utils.js");
+ red: 31,
+ green: 32,
+ yellow: 33,
+ blue: 34,
+ magenta: 35,
+ cyan: 36,
+ white: 37,
-const deepCopy = obj => JSON.parse(JSON.stringify(obj));
+ redBackground: 41,
+ greenBackground: 42,
+ yellowBackground: 43,
+ blueBackground: 44,
+ magentaBackground: 45,
+ cyanBackground: 46,
+ whiteBackground: 47,
-const selfAndParents = function(self) {
- const parents = [];
- let current = self;
- while (current) {
- if (parents.includes(current)) {
- return parents;
- }
+ encircled: 52,
+ overlined: 53,
+ grey: 90,
+ black: 90
+ };
- parents.push(current);
- current = current.parent;
- }
- return parents;
-};
+ var characters = {
+ SMILEY: "☺",
+ SOLID_SMILEY: "☻",
+ HEART: "♥",
+ DIAMOND: "♦",
+ CLOVE: "♣",
+ SPADE: "♠",
+ DOT: "•",
+ SQUARE_CIRCLE: "◘",
+ CIRCLE: "○",
+ FILLED_SQUARE_CIRCLE: "◙",
+ MALE: "♂",
+ FEMALE: "♀",
+ EIGHT_NOTE: "♪",
+ DOUBLE_EIGHTH_NOTE: "♫",
+ SUN: "☼",
+ PLAY: "►",
+ REWIND: "◄",
+ UP_DOWN: "↕",
+ PILCROW: "¶",
+ SECTION: "§",
+ THICK_MINUS: "▬",
+ SMALL_UP_DOWN: "↨",
+ UP_ARROW: "↑",
+ DOWN_ARROW: "↓",
+ RIGHT_ARROW: "→",
+ LEFT_ARROW: "←",
+ RIGHT_ANGLE: "∟",
+ LEFT_RIGHT_ARROW: "↔",
+ TRIANGLE: "▲",
+ DOWN_TRIANGLE: "▼",
+ HOUSE: "⌂",
+ C_CEDILLA: "Ç",
+ U_UMLAUT: "ü",
+ E_ACCENT: "é",
+ A_LOWER_CIRCUMFLEX: "â",
+ A_LOWER_UMLAUT: "ä",
+ A_LOWER_GRAVE_ACCENT: "à",
+ A_LOWER_CIRCLE_OVER: "å",
+ C_LOWER_CIRCUMFLEX: "ç",
+ E_LOWER_CIRCUMFLEX: "ê",
+ E_LOWER_UMLAUT: "ë",
+ E_LOWER_GRAVE_ACCENT: "è",
+ I_LOWER_UMLAUT: "ï",
+ I_LOWER_CIRCUMFLEX: "î",
+ I_LOWER_GRAVE_ACCENT: "ì",
+ A_UPPER_UMLAUT: "Ä",
+ A_UPPER_CIRCLE: "Å",
+ E_UPPER_ACCENT: "É",
+ A_E_LOWER: "æ",
+ A_E_UPPER: "Æ",
+ O_LOWER_CIRCUMFLEX: "ô",
+ O_LOWER_UMLAUT: "ö",
+ O_LOWER_GRAVE_ACCENT: "ò",
+ U_LOWER_CIRCUMFLEX: "û",
+ U_LOWER_GRAVE_ACCENT: "ù",
+ Y_LOWER_UMLAUT: "ÿ",
+ O_UPPER_UMLAUT: "Ö",
+ U_UPPER_UMLAUT: "Ü",
+ CENTS: "¢",
+ POUND: "£",
+ YEN: "¥",
+ CURRENCY: "¤",
+ PTS: "₧",
+ FUNCTION: "ƒ",
+ A_LOWER_ACCENT: "á",
+ I_LOWER_ACCENT: "í",
+ O_LOWER_ACCENT: "ó",
+ U_LOWER_ACCENT: "ú",
+ N_LOWER_TILDE: "ñ",
+ N_UPPER_TILDE: "Ñ",
+ A_SUPER: "ª",
+ O_SUPER: "º",
+ UPSIDEDOWN_QUESTION: "¿",
+ SIDEWAYS_L: "⌐",
+ NEGATION: "¬",
+ ONE_HALF: "½",
+ ONE_FOURTH: "¼",
+ UPSIDEDOWN_EXCLAMATION: "¡",
+ DOUBLE_LEFT: "«",
+ DOUBLE_RIGHT: "»",
+ LIGHT_SHADED_BOX: "░",
+ MEDIUM_SHADED_BOX: "▒",
+ DARK_SHADED_BOX: "▓",
+ VERTICAL_LINE: "│",
+ MAZE__SINGLE_RIGHT_T: "┤",
+ MAZE_SINGLE_RIGHT_TOP: "┐",
+ MAZE_SINGLE_RIGHT_BOTTOM_SMALL: "┘",
+ MAZE_SINGLE_LEFT_TOP_SMALL: "┌",
+ MAZE_SINGLE_LEFT_BOTTOM_SMALL: "└",
+ MAZE_SINGLE_LEFT_T: "├",
+ MAZE_SINGLE_BOTTOM_T: "┴",
+ MAZE_SINGLE_TOP_T: "┬",
+ MAZE_SINGLE_CENTER: "┼",
+ MAZE_SINGLE_HORIZONTAL_LINE: "─",
+ MAZE_SINGLE_RIGHT_DOUBLECENTER_T: "╡",
+ MAZE_SINGLE_RIGHT_DOUBLE_BL: "╛",
+ MAZE_SINGLE_RIGHT_DOUBLE_T: "╢",
+ MAZE_SINGLE_RIGHT_DOUBLEBOTTOM_TOP: "╖",
+ MAZE_SINGLE_RIGHT_DOUBLELEFT_TOP: "╕",
+ MAZE_SINGLE_LEFT_DOUBLE_T: "╞",
+ MAZE_SINGLE_BOTTOM_DOUBLE_T: "╧",
+ MAZE_SINGLE_TOP_DOUBLE_T: "╤",
+ MAZE_SINGLE_TOP_DOUBLECENTER_T: "╥",
+ MAZE_SINGLE_BOTTOM_DOUBLECENTER_T: "╨",
+ MAZE_SINGLE_LEFT_DOUBLERIGHT_BOTTOM: "╘",
+ MAZE_SINGLE_LEFT_DOUBLERIGHT_TOP: "╒",
+ MAZE_SINGLE_LEFT_DOUBLEBOTTOM_TOP: "╓",
+ MAZE_SINGLE_LEFT_DOUBLETOP_BOTTOM: "╙",
+ MAZE_SINGLE_LEFT_TOP: "Γ",
+ MAZE_SINGLE_RIGHT_BOTTOM: "╜",
+ MAZE_SINGLE_LEFT_CENTER: "╟",
+ MAZE_SINGLE_DOUBLECENTER_CENTER: "╫",
+ MAZE_SINGLE_DOUBLECROSS_CENTER: "╪",
+ MAZE_DOUBLE_LEFT_CENTER: "╣",
+ MAZE_DOUBLE_VERTICAL: "║",
+ MAZE_DOUBLE_RIGHT_TOP: "╗",
+ MAZE_DOUBLE_RIGHT_BOTTOM: "╝",
+ MAZE_DOUBLE_LEFT_BOTTOM: "╚",
+ MAZE_DOUBLE_LEFT_TOP: "╔",
+ MAZE_DOUBLE_BOTTOM_T: "╩",
+ MAZE_DOUBLE_TOP_T: "╦",
+ MAZE_DOUBLE_LEFT_T: "╠",
+ MAZE_DOUBLE_HORIZONTAL: "═",
+ MAZE_DOUBLE_CROSS: "╬",
+ SOLID_RECTANGLE: "█",
+ THICK_LEFT_VERTICAL: "▌",
+ THICK_RIGHT_VERTICAL: "▐",
+ SOLID_SMALL_RECTANGLE_BOTTOM: "▄",
+ SOLID_SMALL_RECTANGLE_TOP: "▀",
+ PHI_UPPER: "Φ",
+ INFINITY: "∞",
+ INTERSECTION: "∩",
+ DEFINITION: "≡",
+ PLUS_MINUS: "±",
+ GT_EQ: "≥",
+ LT_EQ: "≤",
+ THEREFORE: "⌠",
+ SINCE: "∵",
+ DOESNOT_EXIST: "∄",
+ EXISTS: "∃",
+ FOR_ALL: "∀",
+ EXCLUSIVE_OR: "⊕",
+ BECAUSE: "⌡",
+ DIVIDE: "÷",
+ APPROX: "≈",
+ DEGREE: "°",
+ BOLD_DOT: "∙",
+ DOT_SMALL: "·",
+ CHECK: "√",
+ ITALIC_X: "✗",
+ SUPER_N: "ⁿ",
+ SQUARED: "²",
+ CUBED: "³",
+ SOLID_BOX: "■",
+ PERMILE: "‰",
+ REGISTERED_TM: "®",
+ COPYRIGHT: "©",
+ TRADEMARK: "™",
+ BETA: "β",
+ GAMMA: "γ",
+ ZETA: "ζ",
+ ETA: "η",
+ IOTA: "ι",
+ KAPPA: "κ",
+ LAMBDA: "λ",
+ NU: "ν",
+ XI: "ξ",
+ OMICRON: "ο",
+ RHO: "ρ",
+ UPSILON: "υ",
+ CHI_LOWER: "φ",
+ CHI_UPPER: "χ",
+ PSI: "ψ",
+ ALPHA: "α",
+ ESZETT: "ß",
+ PI: "π",
+ SIGMA_UPPER: "Σ",
+ SIGMA_LOWER: "σ",
+ MU: "µ",
+ TAU: "τ",
+ THETA: "Θ",
+ OMEGA: "Ω",
+ DELTA: "δ",
+ PHI_LOWER: "φ",
+ EPSILON: "ε"
+ };
-const extractParentIds = current => selfAndParents(current)
- .map(parent => parent._id)
- .filter(id => id);
+ function pad(string, length, ch, end) {
+ string = "" + string; //check for numbers
+ ch = ch || " ";
+ var strLen = string.length;
+ while (strLen < length) {
+ if (end) {
+ string += ch;
+ } else {
+ string = ch + string;
+ }
+ strLen++;
+ }
+ return string;
+ }
-const getContactById = (contacts, id) => id && contacts.find(contact => contact && contact._id === id);
+ function truncate(string, length, end) {
+ var ret = string;
+ if (is.isString(ret)) {
+ if (string.length > length) {
+ if (end) {
+ var l = string.length;
+ ret = string.substring(l - length, l);
+ } else {
+ ret = string.substring(0, length);
+ }
+ }
+ } else {
+ ret = truncate("" + ret, length);
+ }
+ return ret;
+ }
-const getContactIds = (contacts) => {
- const ids = [];
- contacts.forEach(doc => {
- if (!doc) {
- return;
- }
+ function format(str, obj) {
+ if (obj instanceof Array) {
+ var i = 0, len = obj.length;
+ //find the matches
+ return str.replace(FORMAT_REGEX, function (m, format, type) {
+ var replacer, ret;
+ if (i < len) {
+ replacer = obj[i++];
+ } else {
+ //we are out of things to replace with so
+ //just return the match?
+ return m;
+ }
+ if (m === "%s" || m === "%d" || m === "%D") {
+ //fast path!
+ ret = replacer + "";
+ } else if (m === "%Z") {
+ ret = replacer.toUTCString();
+ } else if (m === "%j") {
+ try {
+ ret = stringify(replacer);
+ } catch (e) {
+ throw new Error("stringExtended.format : Unable to parse json from ", replacer);
+ }
+ } else {
+ format = format.replace(/^\[|\]$/g, "");
+ switch (type) {
+ case "s":
+ ret = formatString(replacer, format);
+ break;
+ case "d":
+ ret = formatNumber(replacer, format);
+ break;
+ case "j":
+ ret = formatObject(replacer, format);
+ break;
+ case "D":
+ ret = date.format(replacer, format);
+ break;
+ case "Z":
+ ret = date.format(replacer, format, true);
+ break;
+ }
+ }
+ return ret;
+ });
+ } else if (isHash(obj)) {
+ return str.replace(INTERP_REGEX, function (m, format, value) {
+ value = obj[value];
+ if (!is.isUndefined(value)) {
+ if (format) {
+ if (is.isString(value)) {
+ return formatString(value, format);
+ } else if (is.isNumber(value)) {
+ return formatNumber(value, format);
+ } else if (is.isDate(value)) {
+ return date.format(value, format);
+ } else if (is.isObject(value)) {
+ return formatObject(value, format);
+ }
+ } else {
+ return "" + value;
+ }
+ }
+ return m;
+ });
+ } else {
+ var args = aSlice.call(arguments).slice(1);
+ return format(str, args);
+ }
+ }
- const id = utils.getId(doc.contact);
- id && ids.push(id);
+ function toArray(testStr, delim) {
+ var ret = [];
+ if (testStr) {
+ if (testStr.indexOf(delim) > 0) {
+ ret = testStr.replace(/\s+/g, "").split(delim);
+ }
+ else {
+ ret.push(testStr);
+ }
+ }
+ return ret;
+ }
- if (!utils.validLinkedDocs(doc)) {
- return;
- }
- Object.keys(doc.linked_docs).forEach(key => {
- const id = utils.getId(doc.linked_docs[key]);
- id && ids.push(id);
- });
- });
+ function multiply(str, times) {
+ var ret = [];
+ if (times) {
+ for (var i = 0; i < times; i++) {
+ ret.push(str);
+ }
+ }
+ return ret.join("");
+ }
- return _.uniq(ids);
-};
-module.exports = function(Promise, DB) {
- const fillParentsInDocs = function(doc, lineage) {
- if (!doc || !lineage.length) {
- return doc;
- }
+ function style(str, options) {
+ var ret, i, l;
+ if (options) {
+ if (is.isArray(str)) {
+ ret = [];
+ for (i = 0, l = str.length; i < l; i++) {
+ ret.push(style(str[i], options));
+ }
+ } else if (options instanceof Array) {
+ ret = str;
+ for (i = 0, l = options.length; i < l; i++) {
+ ret = style(ret, options[i]);
+ }
+ } else if (options in styles) {
+ ret = '\x1B[' + styles[options] + 'm' + str + '\x1B[0m';
+ }
+ }
+ return ret;
+ }
- // Parent hierarchy starts at the contact for data_records
- let currentParent;
- if (doc.type === 'data_record') {
- currentParent = doc.contact = lineage.shift() || doc.contact;
- } else {
- // It's a contact
- currentParent = doc;
- }
+ function escape(str, except) {
+ return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, function (ch) {
+ if (except && arr.indexOf(except, ch) !== -1) {
+ return ch;
+ }
+ return "\\" + ch;
+ });
+ }
- const parentIds = extractParentIds(currentParent.parent);
- lineage.forEach(function(l, i) {
- currentParent.parent = l ? deepCopy(l) : { _id: parentIds[i] };
- currentParent = currentParent.parent;
- });
+ function trim(str) {
+ return str.replace(/^\s*|\s*$/g, "");
+ }
- return doc;
- };
+ function trimLeft(str) {
+ return str.replace(/^\s*/, "");
+ }
- const fillContactsInDocs = function(docs, contacts) {
- if (!contacts || !contacts.length) {
- return;
- }
+ function trimRight(str) {
+ return str.replace(/\s*$/, "");
+ }
- docs.forEach(function(doc) {
- if (!doc) {
- return;
- }
- const id = utils.getId(doc.contact);
- const contactDoc = getContactById(contacts, id);
- if (contactDoc) {
- doc.contact = deepCopy(contactDoc);
- }
+ function isEmpty(str) {
+ return str.length === 0;
+ }
- if (!utils.validLinkedDocs(doc)) {
- return;
- }
- Object.keys(doc.linked_docs).forEach(key => {
- const id = utils.getId(doc.linked_docs[key]);
- const contactDoc = getContactById(contacts, id);
- if (contactDoc) {
- doc.linked_docs[key] = deepCopy(contactDoc);
- }
- });
- });
- };
+ var string = {
+ toArray: toArray,
+ pad: pad,
+ truncate: truncate,
+ multiply: multiply,
+ format: format,
+ style: style,
+ escape: escape,
+ trim: trim,
+ trimLeft: trimLeft,
+ trimRight: trimRight,
+ isEmpty: isEmpty
+ };
+ return extended.define(is.isString, string).define(is.isArray, {style: style}).expose(string).expose({characters: characters});
+ }
- const fetchContacts = function(lineage) {
- const contactIds = getContactIds(lineage);
+ if (true) {
+ if ( true && module.exports) {
+ module.exports = defineString(__webpack_require__(/*! extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/extended/index.js"), __webpack_require__(/*! is-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/is-extended/index.js"), __webpack_require__(/*! date-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/date-extended/index.js"), __webpack_require__(/*! array-extended */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/array-extended/index.js"));
- // Only fetch docs that are new to us
- const lineageContacts = [];
- const contactsToFetch = [];
- contactIds.forEach(function(id) {
- const contact = getContactById(lineage, id);
- if (contact) {
- lineageContacts.push(deepCopy(contact));
- } else {
- contactsToFetch.push(id);
- }
- });
+ }
+ } else {}
- return fetchDocs(contactsToFetch)
- .then(function(fetchedContacts) {
- return lineageContacts.concat(fetchedContacts);
- });
- };
+}).call(this);
- const mergeLineagesIntoDoc = function(lineage, contacts, patientLineage) {
- const doc = lineage.shift();
- fillParentsInDocs(doc, lineage);
- if (patientLineage && patientLineage.length) {
- const patientDoc = patientLineage.shift();
- fillParentsInDocs(patientDoc, patientLineage);
- doc.patient = patientDoc;
- }
- return doc;
- };
- const findPatientId = function(doc) {
- return (
- doc.type === 'data_record' &&
- (
- (doc.fields && (doc.fields.patient_id || doc.fields.patient_uuid)) ||
- doc.patient_id
- )
- );
- };
- const fetchPatientUuids = function(records) {
- const patientIds = records.map(record => findPatientId(record));
- if (!patientIds.some(patientId => patientId)) {
- return Promise.resolve([]);
- }
- return contactUuidByPatientIds(patientIds);
- };
- const fetchPatientLineage = function(record) {
- return fetchPatientUuids([record])
- .then(function([uuid]) {
- if (!uuid) {
- return [];
- }
- return fetchLineageById(uuid);
- });
- };
- const contactUuidByPatientIds = function(patientIds) {
- const keys = patientIds
- .filter(patientId => patientId)
- .map(patientId => [ 'shortcode', patientId ]);
- return DB.query('medic-client/contacts_by_reference', { keys })
- .then(function(results) {
- const findIdWithKey = key => {
- const matchingRow = results.rows.find(row => row.key[1] === key);
- return matchingRow && matchingRow.id;
- };
- return patientIds.map(patientId => findIdWithKey(patientId) || patientId);
- });
- };
+/***/ }),
- const fetchLineageById = function(id) {
- const options = {
- startkey: [id],
- endkey: [id, {}],
- include_docs: true
- };
- return DB.query('medic-client/docs_by_id_lineage', options)
- .then(function(result) {
- return result.rows.map(function(row) {
- return row.doc;
- });
- });
- };
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/underscore/underscore-node-f.cjs":
+/*!***********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/underscore/underscore-node-f.cjs ***!
+ \***********************************************************************************************************/
+/***/ ((__unused_webpack_module, exports) => {
- const fetchLineageByIds = function(ids) {
- return fetchDocs(ids).then(function(docs) {
- return hydrateDocs(docs).then(function(hydratedDocs) {
- // Returning a list of docs just like fetchLineageById
- const docsList = [];
- hydratedDocs.forEach(function(hdoc) {
- const docLineage = selfAndParents(hdoc);
- docsList.push(docLineage);
- });
- return docsList;
- });
- });
- };
+// Underscore.js 1.13.1
+// https://underscorejs.org
+// (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
+// Underscore may be freely distributed under the MIT license.
- const fetchDoc = function(id) {
- return DB.get(id)
- .catch(function(err) {
- if (err.status === 404) {
- err.statusCode = 404;
- }
- throw err;
- });
- };
+Object.defineProperty(exports, "__esModule", ({ value: true }));
- const fetchHydratedDoc = function(id, options = {}, callback) {
- let lineage;
- let patientLineage;
- if (typeof options === 'function') {
- callback = options;
- options = {};
- }
+// Current version.
+var VERSION = '1.13.1';
- _.defaults(options, {
- throwWhenMissingLineage: false,
- });
+// Establish the root object, `window` (`self`) in the browser, `global`
+// on the server, or `this` in some virtual machines. We use `self`
+// instead of `window` for `WebWorker` support.
+var root = typeof self == 'object' && self.self === self && self ||
+ typeof global == 'object' && global.global === global && global ||
+ Function('return this')() ||
+ {};
- return fetchLineageById(id)
- .then(function(result) {
- lineage = result;
+// Save bytes in the minified (but not gzipped) version:
+var ArrayProto = Array.prototype, ObjProto = Object.prototype;
+var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
- if (lineage.length === 0) {
- if (options.throwWhenMissingLineage) {
- const err = new Error(`Document not found: ${id}`);
- err.code = 404;
- throw err;
- } else {
- // Not a doc that has lineage, just do a normal fetch.
- return fetchDoc(id);
- }
- }
+// Create quick reference variables for speed access to core prototypes.
+var push = ArrayProto.push,
+ slice = ArrayProto.slice,
+ toString = ObjProto.toString,
+ hasOwnProperty = ObjProto.hasOwnProperty;
- return fetchPatientLineage(lineage[0])
- .then(function(result) {
- patientLineage = result;
- return fetchContacts(lineage.concat(patientLineage));
- })
- .then(function(contacts) {
- fillContactsInDocs(lineage, contacts);
- fillContactsInDocs(patientLineage, contacts);
- return mergeLineagesIntoDoc(lineage, contacts, patientLineage);
- });
- })
- .then(function(result) {
- if (callback) {
- callback(null, result);
- }
- return result;
- })
- .catch(function(err) {
- if (callback) {
- callback(err);
- } else {
- throw err;
- }
- });
- };
+// Modern feature detection.
+var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',
+ supportsDataView = typeof DataView !== 'undefined';
- // for data_records, include the first-level contact.
- const collectParentIds = function(docs) {
- const ids = [];
- docs.forEach(function(doc) {
- let parent = doc.parent;
- if (doc.type === 'data_record') {
- const contactId = utils.getId(doc.contact);
- if (!contactId) {
- return;
- }
- ids.push(contactId);
- parent = doc.contact;
- }
+// All **ECMAScript 5+** native function implementations that we hope to use
+// are declared here.
+var nativeIsArray = Array.isArray,
+ nativeKeys = Object.keys,
+ nativeCreate = Object.create,
+ nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;
- ids.push(...extractParentIds(parent));
- });
- return _.uniq(ids);
- };
+// Create references to these builtin functions because we override them.
+var _isNaN = isNaN,
+ _isFinite = isFinite;
- // for data_records, doesn't include the first-level contact (it counts as a parent).
- const collectLeafContactIds = function(partiallyHydratedDocs) {
- const ids = [];
- partiallyHydratedDocs.forEach(function(doc) {
- const startLineageFrom = doc.type === 'data_record' ? doc.contact : doc;
- ids.push(...getContactIds(selfAndParents(startLineageFrom)));
- });
+// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
+var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
+var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
+ 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
- return _.uniq(ids);
- };
+// The largest integer that can be represented exactly.
+var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
- const fetchDocs = function(ids) {
- if (!ids || !ids.length) {
- return Promise.resolve([]);
+// Some functions take a variable number of arguments, or a few expected
+// arguments at the beginning and then a variable number of values to operate
+// on. This helper accumulates all remaining arguments past the function’s
+// argument length (or an explicit `startIndex`), into an array that becomes
+// the last argument. Similar to ES6’s "rest parameter".
+function restArguments(func, startIndex) {
+ startIndex = startIndex == null ? func.length - 1 : +startIndex;
+ return function() {
+ var length = Math.max(arguments.length - startIndex, 0),
+ rest = Array(length),
+ index = 0;
+ for (; index < length; index++) {
+ rest[index] = arguments[index + startIndex];
}
- const keys = _.uniq(ids.filter(id => id));
- if (keys.length === 0) {
- return Promise.resolve([]);
+ switch (startIndex) {
+ case 0: return func.call(this, rest);
+ case 1: return func.call(this, arguments[0], rest);
+ case 2: return func.call(this, arguments[0], arguments[1], rest);
}
-
- return DB.allDocs({ keys, include_docs: true })
- .then(function(results) {
- return results.rows
- .map(function(row) {
- return row.doc;
- })
- .filter(function(doc) {
- return !!doc;
- });
- });
+ var args = Array(startIndex + 1);
+ for (index = 0; index < startIndex; index++) {
+ args[index] = arguments[index];
+ }
+ args[startIndex] = rest;
+ return func.apply(this, args);
};
+}
- const hydrateDocs = function(docs) {
- if (!docs.length) {
- return Promise.resolve([]);
- }
+// Is a given variable an object?
+function isObject(obj) {
+ var type = typeof obj;
+ return type === 'function' || type === 'object' && !!obj;
+}
- const hydratedDocs = deepCopy(docs); // a copy of the original docs which we will incrementally hydrate and return
- const knownDocs = [...hydratedDocs]; // an array of all documents which we have fetched
+// Is a given value equal to null?
+function isNull(obj) {
+ return obj === null;
+}
- let patientUuids;
- let patientDocs;
+// Is a given variable undefined?
+function isUndefined(obj) {
+ return obj === void 0;
+}
- return fetchPatientUuids(hydratedDocs)
- .then(function(uuids) {
- patientUuids = uuids;
- return fetchDocs(patientUuids);
- })
- .then(function(patients) {
- patientDocs = patients;
- knownDocs.push(...patients);
+// Is a given value a boolean?
+function isBoolean(obj) {
+ return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
+}
- const firstRoundIdsToFetch = _.uniq([
- ...collectParentIds(hydratedDocs),
- ...collectLeafContactIds(hydratedDocs),
+// Is a given value a DOM element?
+function isElement(obj) {
+ return !!(obj && obj.nodeType === 1);
+}
- ...collectParentIds(patientDocs),
- ...collectLeafContactIds(patientDocs),
- ]);
+// Internal function for creating a `toString`-based type tester.
+function tagTester(name) {
+ var tag = '[object ' + name + ']';
+ return function(obj) {
+ return toString.call(obj) === tag;
+ };
+}
- return fetchDocs(firstRoundIdsToFetch);
- })
- .then(function(firstRoundFetched) {
- knownDocs.push(...firstRoundFetched);
- const secondRoundIdsToFetch = collectLeafContactIds(firstRoundFetched)
- .filter(id => !knownDocs.some(doc => doc._id === id));
- return fetchDocs(secondRoundIdsToFetch);
- })
- .then(function(secondRoundFetched) {
- knownDocs.push(...secondRoundFetched);
+var isString = tagTester('String');
- fillContactsInDocs(knownDocs, knownDocs);
- hydratedDocs.forEach((doc, i) => {
- const reconstructLineage = (docWithLineage, parents) => {
- const parentIds = extractParentIds(docWithLineage);
- return parentIds.map(id => {
- // how can we use hashmaps?
- return getContactById(parents, id);
- });
- };
+var isNumber = tagTester('Number');
- const isReport = doc.type === 'data_record';
- const findParentsFor = isReport ? doc.contact : doc;
- const lineage = reconstructLineage(findParentsFor, knownDocs);
+var isDate = tagTester('Date');
- if (isReport) {
- lineage.unshift(doc);
- }
+var isRegExp = tagTester('RegExp');
+
+var isError = tagTester('Error');
- const patientDoc = getContactById(patientDocs, patientUuids[i]);
- const patientLineage = reconstructLineage(patientDoc, knownDocs);
+var isSymbol = tagTester('Symbol');
- mergeLineagesIntoDoc(lineage, knownDocs, patientLineage);
- });
+var isArrayBuffer = tagTester('ArrayBuffer');
- return hydratedDocs;
- });
+var isFunction = tagTester('Function');
+
+// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
+// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
+var nodelist = root.document && root.document.childNodes;
+if ( true && typeof Int8Array != 'object' && typeof nodelist != 'function') {
+ isFunction = function(obj) {
+ return typeof obj == 'function' || false;
};
+}
- const fetchHydratedDocs = docIds => {
- if (!Array.isArray(docIds)) {
- return Promise.reject(new Error('Invalid parameter: "docIds" must be an array'));
- }
+var isFunction$1 = isFunction;
- if (!docIds.length) {
- return Promise.resolve([]);
- }
+var hasObjectTag = tagTester('Object');
- if (docIds.length === 1) {
- return fetchHydratedDoc(docIds[0])
- .then(doc => [doc])
- .catch(err => {
- if (err.status === 404) {
- return [];
- }
+// In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.
+// In IE 11, the most common among them, this problem also applies to
+// `Map`, `WeakMap` and `Set`.
+var hasStringTagBug = (
+ supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8)))
+ ),
+ isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));
- throw err;
- });
- }
+var isDataView = tagTester('DataView');
- return DB
- .allDocs({ keys: docIds, include_docs: true })
- .then(result => {
- const docs = result.rows.map(row => row.doc).filter(doc => doc);
- return hydrateDocs(docs);
- });
- };
+// In IE 10 - Edge 13, we need a different heuristic
+// to determine whether an object is a `DataView`.
+function ie10IsDataView(obj) {
+ return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer);
+}
- return {
- /**
- * Given a doc id get a doc and all parents, contact (and parents) and patient (and parents)
- * @param {String} id The id of the doc to fetch and hydrate
- * @param {Object} [options] Options for the behavior of the hydration
- * @param {Boolean} [options.throwWhenMissingLineage=false] When true, throw if the doc has nothing to hydrate.
- * When false, does a best effort to return the document regardless of content.
- * @returns {Promise} A promise to return the hydrated doc.
- */
- fetchHydratedDoc: (id, options, callback) => fetchHydratedDoc(id, options, callback),
+var isDataView$1 = (hasStringTagBug ? ie10IsDataView : isDataView);
- /**
- * Given an array of ids, returns hydrated versions of every requested doc (using hydrateDocs or fetchHydratedDoc)
- * If a doc is not found, it's simply excluded from the results list
- * @param {Object[]} docs The array of docs to hydrate
- * @returns {Promise} A promise to return the hydrated docs
- */
- fetchHydratedDocs: docIds => fetchHydratedDocs(docIds),
+// Is a given value an array?
+// Delegates to ECMA5's native `Array.isArray`.
+var isArray = nativeIsArray || tagTester('Array');
- /**
- * Given an array of docs bind the parents, contact (and parents) and patient (and parents)
- * @param {Object[]} docs The array of docs to hydrate
- * @returns {Promise}
- */
- hydrateDocs: docs => hydrateDocs(docs),
+// Internal function to check whether `key` is an own property name of `obj`.
+function has$1(obj, key) {
+ return obj != null && hasOwnProperty.call(obj, key);
+}
- fetchLineageById,
- fetchLineageByIds,
- fillContactsInDocs,
- fillParentsInDocs,
- fetchContacts,
- };
-};
+var isArguments = tagTester('Arguments');
+
+// Define a fallback version of the method in browsers (ahem, IE < 9), where
+// there isn't any inspectable "Arguments" type.
+(function() {
+ if (!isArguments(arguments)) {
+ isArguments = function(obj) {
+ return has$1(obj, 'callee');
+ };
+ }
+}());
+var isArguments$1 = isArguments;
-/***/ }),
+// Is a given object a finite number?
+function isFinite$1(obj) {
+ return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));
+}
-/***/ "./node_modules/cht-core-3-10/shared-libs/lineage/src/index.js":
-/*!*********************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/lineage/src/index.js ***!
- \*********************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// Is the given value `NaN`?
+function isNaN$1(obj) {
+ return isNumber(obj) && _isNaN(obj);
+}
-/**
- * @module lineage
- */
-module.exports = (Promise, DB) => Object.assign(
- {},
- __webpack_require__(/*! ./hydration */ "./node_modules/cht-core-3-10/shared-libs/lineage/src/hydration.js")(Promise, DB),
- __webpack_require__(/*! ./minify */ "./node_modules/cht-core-3-10/shared-libs/lineage/src/minify.js")
-);
+// Predicate-generating function. Often useful outside of Underscore.
+function constant(value) {
+ return function() {
+ return value;
+ };
+}
+// Common internal logic for `isArrayLike` and `isBufferLike`.
+function createSizePropertyCheck(getSizeProperty) {
+ return function(collection) {
+ var sizeProperty = getSizeProperty(collection);
+ return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
+ }
+}
-/***/ }),
+// Internal helper to generate a function to obtain property `key` from `obj`.
+function shallowProperty(key) {
+ return function(obj) {
+ return obj == null ? void 0 : obj[key];
+ };
+}
-/***/ "./node_modules/cht-core-3-10/shared-libs/lineage/src/minify.js":
-/*!**********************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/lineage/src/minify.js ***!
- \**********************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// Internal helper to obtain the `byteLength` property of an object.
+var getByteLength = shallowProperty('byteLength');
-const utils = __webpack_require__(/*! ./utils */ "./node_modules/cht-core-3-10/shared-libs/lineage/src/utils.js");
-const RECURSION_LIMIT = 50;
+// Internal helper to determine whether we should spend extensive checks against
+// `ArrayBuffer` et al.
+var isBufferLike = createSizePropertyCheck(getByteLength);
-// Minifies things you would attach to another doc:
-// doc.parent = minify(doc.parent)
-// Not:
-// minify(doc)
-function minifyLineage(parent) {
- if (!parent || !parent._id) {
- return parent;
- }
+// Is a given value a typed array?
+var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
+function isTypedArray(obj) {
+ // `ArrayBuffer.isView` is the most future-proof, so use it when available.
+ // Otherwise, fall back on the above regular expression.
+ return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) :
+ isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));
+}
- const docId = parent._id;
- const result = { _id: parent._id };
- let minified = result;
- for (let guard = RECURSION_LIMIT; parent.parent && parent.parent._id; --guard) {
- if (guard === 0) {
- throw Error(`Could not minify ${docId}, possible parent recursion.`);
- }
+var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false);
- minified.parent = { _id: parent.parent._id };
- minified = minified.parent;
- parent = parent.parent;
- }
+// Internal helper to obtain the `length` property of an object.
+var getLength = shallowProperty('length');
- return result;
+// Internal helper to create a simple lookup structure.
+// `collectNonEnumProps` used to depend on `_.contains`, but this led to
+// circular imports. `emulatedSet` is a one-off solution that only works for
+// arrays of strings.
+function emulatedSet(keys) {
+ var hash = {};
+ for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
+ return {
+ contains: function(key) { return hash[key]; },
+ push: function(key) {
+ hash[key] = true;
+ return keys.push(key);
+ }
+ };
}
-/**
- * Remove all hyrdrated items and leave just the ids
- * @param {Object} doc The doc to minify
- */
-function minify(doc) {
- if (!doc) {
- return;
- }
- if (doc.parent) {
- doc.parent = minifyLineage(doc.parent);
- }
- if (doc.contact && doc.contact._id) {
- const miniContact = { _id: doc.contact._id };
- if (doc.contact.parent) {
- miniContact.parent = minifyLineage(doc.contact.parent);
+// Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't
+// be iterated by `for key in ...` and thus missed. Extends `keys` in place if
+// needed.
+function collectNonEnumProps(obj, keys) {
+ keys = emulatedSet(keys);
+ var nonEnumIdx = nonEnumerableProps.length;
+ var constructor = obj.constructor;
+ var proto = isFunction$1(constructor) && constructor.prototype || ObjProto;
+
+ // Constructor is a special case.
+ var prop = 'constructor';
+ if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop);
+
+ while (nonEnumIdx--) {
+ prop = nonEnumerableProps[nonEnumIdx];
+ if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
+ keys.push(prop);
}
- doc.contact = miniContact;
- }
- if (doc.type === 'data_record') {
- delete doc.patient;
- delete doc.place;
}
+}
- if (utils.validLinkedDocs(doc)) {
- Object.keys(doc.linked_docs).forEach(key => {
- doc.linked_docs[key] = utils.getId(doc.linked_docs[key]);
- });
- }
+// Retrieve the names of an object's own properties.
+// Delegates to **ECMAScript 5**'s native `Object.keys`.
+function keys(obj) {
+ if (!isObject(obj)) return [];
+ if (nativeKeys) return nativeKeys(obj);
+ var keys = [];
+ for (var key in obj) if (has$1(obj, key)) keys.push(key);
+ // Ahem, IE < 9.
+ if (hasEnumBug) collectNonEnumProps(obj, keys);
+ return keys;
}
-module.exports = {
- minify,
- minifyLineage,
-};
+// Is a given array, string, or object empty?
+// An "empty" object has no enumerable own-properties.
+function isEmpty(obj) {
+ if (obj == null) return true;
+ // Skip the more expensive `toString`-based type checks if `obj` has no
+ // `.length`.
+ var length = getLength(obj);
+ if (typeof length == 'number' && (
+ isArray(obj) || isString(obj) || isArguments$1(obj)
+ )) return length === 0;
+ return getLength(keys(obj)) === 0;
+}
+// Returns whether an object has a given set of `key:value` pairs.
+function isMatch(object, attrs) {
+ var _keys = keys(attrs), length = _keys.length;
+ if (object == null) return !length;
+ var obj = Object(object);
+ for (var i = 0; i < length; i++) {
+ var key = _keys[i];
+ if (attrs[key] !== obj[key] || !(key in obj)) return false;
+ }
+ return true;
+}
-/***/ }),
+// If Underscore is called as a function, it returns a wrapped object that can
+// be used OO-style. This wrapper holds altered versions of all functions added
+// through `_.mixin`. Wrapped objects may be chained.
+function _$1(obj) {
+ if (obj instanceof _$1) return obj;
+ if (!(this instanceof _$1)) return new _$1(obj);
+ this._wrapped = obj;
+}
-/***/ "./node_modules/cht-core-3-10/shared-libs/lineage/src/utils.js":
-/*!*********************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/lineage/src/utils.js ***!
- \*********************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+_$1.VERSION = VERSION;
-const contactTypeUtils = __webpack_require__(/*! @medic/contact-types-utils */ "./node_modules/cht-core-3-11/shared-libs/contact-types-utils/src/index.js");
-const _ = __webpack_require__(/*! lodash/core */ "./node_modules/lodash/core.js");
+// Extracts the result from a wrapped and chained object.
+_$1.prototype.value = function() {
+ return this._wrapped;
+};
-const isContact = doc => {
- if (!doc) {
- return;
- }
+// Provide unwrapping proxies for some methods used in engine operations
+// such as arithmetic and JSON stringification.
+_$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value;
- return doc.type === 'contact' || contactTypeUtils.HARDCODED_TYPES.includes(doc.type);
+_$1.prototype.toString = function() {
+ return String(this._wrapped);
};
-const getId = (item) => item && (typeof item === 'string' ? item : item._id);
+// Internal function to wrap or shallow-copy an ArrayBuffer,
+// typed array or DataView to a new view, reusing the buffer.
+function toBufferView(bufferSource) {
+ return new Uint8Array(
+ bufferSource.buffer || bufferSource,
+ bufferSource.byteOffset || 0,
+ getByteLength(bufferSource)
+ );
+}
-// don't process linked docs for non-contact types
-// linked_docs property should be a key-value object
-const validLinkedDocs = doc => {
- return isContact(doc) && _.isObject(doc.linked_docs) && !_.isArray(doc.linked_docs);
-};
+// We use this string twice, so give it a name for minification.
+var tagDataView = '[object DataView]';
-module.exports = {
- getId,
- validLinkedDocs,
-};
+// Internal recursive comparison function for `_.isEqual`.
+function eq(a, b, aStack, bStack) {
+ // Identical objects are equal. `0 === -0`, but they aren't identical.
+ // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).
+ if (a === b) return a !== 0 || 1 / a === 1 / b;
+ // `null` or `undefined` only equal to itself (strict comparison).
+ if (a == null || b == null) return false;
+ // `NaN`s are equivalent, but non-reflexive.
+ if (a !== a) return b !== b;
+ // Exhaust primitive checks
+ var type = typeof a;
+ if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
+ return deepEq(a, b, aStack, bStack);
+}
+// Internal recursive comparison function for `_.isEqual`.
+function deepEq(a, b, aStack, bStack) {
+ // Unwrap any wrapped objects.
+ if (a instanceof _$1) a = a._wrapped;
+ if (b instanceof _$1) b = b._wrapped;
+ // Compare `[[Class]]` names.
+ var className = toString.call(a);
+ if (className !== toString.call(b)) return false;
+ // Work around a bug in IE 10 - Edge 13.
+ if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) {
+ if (!isDataView$1(b)) return false;
+ className = tagDataView;
+ }
+ switch (className) {
+ // These types are compared by value.
+ case '[object RegExp]':
+ // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
+ case '[object String]':
+ // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
+ // equivalent to `new String("5")`.
+ return '' + a === '' + b;
+ case '[object Number]':
+ // `NaN`s are equivalent, but non-reflexive.
+ // Object(NaN) is equivalent to NaN.
+ if (+a !== +a) return +b !== +b;
+ // An `egal` comparison is performed for other numeric values.
+ return +a === 0 ? 1 / +a === 1 / b : +a === +b;
+ case '[object Date]':
+ case '[object Boolean]':
+ // Coerce dates and booleans to numeric primitive values. Dates are compared by their
+ // millisecond representations. Note that invalid dates with millisecond representations
+ // of `NaN` are not equivalent.
+ return +a === +b;
+ case '[object Symbol]':
+ return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
+ case '[object ArrayBuffer]':
+ case tagDataView:
+ // Coerce to typed array so we can fall through.
+ return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);
+ }
-/***/ }),
+ var areArrays = className === '[object Array]';
+ if (!areArrays && isTypedArray$1(a)) {
+ var byteLength = getByteLength(a);
+ if (byteLength !== getByteLength(b)) return false;
+ if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
+ areArrays = true;
+ }
+ if (!areArrays) {
+ if (typeof a != 'object' || typeof b != 'object') return false;
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_Hash.js":
-/*!************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_Hash.js ***!
- \************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+ // Objects with different constructors are not equivalent, but `Object`s or `Array`s
+ // from different frames are.
+ var aCtor = a.constructor, bCtor = b.constructor;
+ if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor &&
+ isFunction$1(bCtor) && bCtor instanceof bCtor)
+ && ('constructor' in a && 'constructor' in b)) {
+ return false;
+ }
+ }
+ // Assume equality for cyclic structures. The algorithm for detecting cyclic
+ // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
-var hashClear = __webpack_require__(/*! ./_hashClear */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_hashClear.js"),
- hashDelete = __webpack_require__(/*! ./_hashDelete */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_hashDelete.js"),
- hashGet = __webpack_require__(/*! ./_hashGet */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_hashGet.js"),
- hashHas = __webpack_require__(/*! ./_hashHas */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_hashHas.js"),
- hashSet = __webpack_require__(/*! ./_hashSet */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_hashSet.js");
+ // Initializing stack of traversed objects.
+ // It's done here since we only need them for objects and arrays comparison.
+ aStack = aStack || [];
+ bStack = bStack || [];
+ var length = aStack.length;
+ while (length--) {
+ // Linear search. Performance is inversely proportional to the number of
+ // unique nested structures.
+ if (aStack[length] === a) return bStack[length] === b;
+ }
-/**
- * Creates a hash object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
-function Hash(entries) {
- var index = -1,
- length = entries == null ? 0 : entries.length;
+ // Add the first object to the stack of traversed objects.
+ aStack.push(a);
+ bStack.push(b);
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
+ // Recursively compare objects and arrays.
+ if (areArrays) {
+ // Compare array lengths to determine if a deep comparison is necessary.
+ length = a.length;
+ if (length !== b.length) return false;
+ // Deep compare the contents, ignoring non-numeric properties.
+ while (length--) {
+ if (!eq(a[length], b[length], aStack, bStack)) return false;
+ }
+ } else {
+ // Deep compare objects.
+ var _keys = keys(a), key;
+ length = _keys.length;
+ // Ensure that both objects contain the same number of properties before comparing deep equality.
+ if (keys(b).length !== length) return false;
+ while (length--) {
+ // Deep compare each member
+ key = _keys[length];
+ if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
+ }
}
+ // Remove the first object from the stack of traversed objects.
+ aStack.pop();
+ bStack.pop();
+ return true;
}
-// Add methods to `Hash`.
-Hash.prototype.clear = hashClear;
-Hash.prototype['delete'] = hashDelete;
-Hash.prototype.get = hashGet;
-Hash.prototype.has = hashHas;
-Hash.prototype.set = hashSet;
+// Perform a deep comparison to check if two objects are equal.
+function isEqual(a, b) {
+ return eq(a, b);
+}
-module.exports = Hash;
+// Retrieve all the enumerable property names of an object.
+function allKeys(obj) {
+ if (!isObject(obj)) return [];
+ var keys = [];
+ for (var key in obj) keys.push(key);
+ // Ahem, IE < 9.
+ if (hasEnumBug) collectNonEnumProps(obj, keys);
+ return keys;
+}
+// Since the regular `Object.prototype.toString` type tests don't work for
+// some types in IE 11, we use a fingerprinting heuristic instead, based
+// on the methods. It's not great, but it's the best we got.
+// The fingerprint method lists are defined below.
+function ie11fingerprint(methods) {
+ var length = getLength(methods);
+ return function(obj) {
+ if (obj == null) return false;
+ // `Map`, `WeakMap` and `Set` have no enumerable keys.
+ var keys = allKeys(obj);
+ if (getLength(keys)) return false;
+ for (var i = 0; i < length; i++) {
+ if (!isFunction$1(obj[methods[i]])) return false;
+ }
+ // If we are testing against `WeakMap`, we need to ensure that
+ // `obj` doesn't have a `forEach` method in order to distinguish
+ // it from a regular `Map`.
+ return methods !== weakMapMethods || !isFunction$1(obj[forEachName]);
+ };
+}
-/***/ }),
+// In the interest of compact minification, we write
+// each string in the fingerprints only once.
+var forEachName = 'forEach',
+ hasName = 'has',
+ commonInit = ['clear', 'delete'],
+ mapTail = ['get', hasName, 'set'];
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_ListCache.js":
-/*!*****************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_ListCache.js ***!
- \*****************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// `Map`, `WeakMap` and `Set` each have slightly different
+// combinations of the above sublists.
+var mapMethods = commonInit.concat(forEachName, mapTail),
+ weakMapMethods = commonInit.concat(mapTail),
+ setMethods = ['add'].concat(commonInit, forEachName, hasName);
-var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_listCacheClear.js"),
- listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_listCacheDelete.js"),
- listCacheGet = __webpack_require__(/*! ./_listCacheGet */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_listCacheGet.js"),
- listCacheHas = __webpack_require__(/*! ./_listCacheHas */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_listCacheHas.js"),
- listCacheSet = __webpack_require__(/*! ./_listCacheSet */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_listCacheSet.js");
+var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');
-/**
- * Creates an list cache object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
-function ListCache(entries) {
- var index = -1,
- length = entries == null ? 0 : entries.length;
+var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
+var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');
+
+var isWeakSet = tagTester('WeakSet');
+
+// Retrieve the values of an object's properties.
+function values(obj) {
+ var _keys = keys(obj);
+ var length = _keys.length;
+ var values = Array(length);
+ for (var i = 0; i < length; i++) {
+ values[i] = obj[_keys[i]];
}
+ return values;
}
-// Add methods to `ListCache`.
-ListCache.prototype.clear = listCacheClear;
-ListCache.prototype['delete'] = listCacheDelete;
-ListCache.prototype.get = listCacheGet;
-ListCache.prototype.has = listCacheHas;
-ListCache.prototype.set = listCacheSet;
+// Convert an object into a list of `[key, value]` pairs.
+// The opposite of `_.object` with one argument.
+function pairs(obj) {
+ var _keys = keys(obj);
+ var length = _keys.length;
+ var pairs = Array(length);
+ for (var i = 0; i < length; i++) {
+ pairs[i] = [_keys[i], obj[_keys[i]]];
+ }
+ return pairs;
+}
-module.exports = ListCache;
+// Invert the keys and values of an object. The values must be serializable.
+function invert(obj) {
+ var result = {};
+ var _keys = keys(obj);
+ for (var i = 0, length = _keys.length; i < length; i++) {
+ result[obj[_keys[i]]] = _keys[i];
+ }
+ return result;
+}
+// Return a sorted list of the function names available on the object.
+function functions(obj) {
+ var names = [];
+ for (var key in obj) {
+ if (isFunction$1(obj[key])) names.push(key);
+ }
+ return names.sort();
+}
-/***/ }),
+// An internal function for creating assigner functions.
+function createAssigner(keysFunc, defaults) {
+ return function(obj) {
+ var length = arguments.length;
+ if (defaults) obj = Object(obj);
+ if (length < 2 || obj == null) return obj;
+ for (var index = 1; index < length; index++) {
+ var source = arguments[index],
+ keys = keysFunc(source),
+ l = keys.length;
+ for (var i = 0; i < l; i++) {
+ var key = keys[i];
+ if (!defaults || obj[key] === void 0) obj[key] = source[key];
+ }
+ }
+ return obj;
+ };
+}
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_Map.js":
-/*!***********************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_Map.js ***!
- \***********************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// Extend a given object with all the properties in passed-in object(s).
+var extend = createAssigner(allKeys);
-var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_getNative.js"),
- root = __webpack_require__(/*! ./_root */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_root.js");
+// Assigns a given object with all the own properties in the passed-in
+// object(s).
+// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
+var extendOwn = createAssigner(keys);
-/* Built-in method references that are verified to be native. */
-var Map = getNative(root, 'Map');
+// Fill in a given object with default properties.
+var defaults = createAssigner(allKeys, true);
-module.exports = Map;
+// Create a naked function reference for surrogate-prototype-swapping.
+function ctor() {
+ return function(){};
+}
+// An internal function for creating a new object that inherits from another.
+function baseCreate(prototype) {
+ if (!isObject(prototype)) return {};
+ if (nativeCreate) return nativeCreate(prototype);
+ var Ctor = ctor();
+ Ctor.prototype = prototype;
+ var result = new Ctor;
+ Ctor.prototype = null;
+ return result;
+}
-/***/ }),
+// Creates an object that inherits from the given prototype object.
+// If additional properties are provided then they will be added to the
+// created object.
+function create(prototype, props) {
+ var result = baseCreate(prototype);
+ if (props) extendOwn(result, props);
+ return result;
+}
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_MapCache.js":
-/*!****************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_MapCache.js ***!
- \****************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// Create a (shallow-cloned) duplicate of an object.
+function clone(obj) {
+ if (!isObject(obj)) return obj;
+ return isArray(obj) ? obj.slice() : extend({}, obj);
+}
-var mapCacheClear = __webpack_require__(/*! ./_mapCacheClear */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_mapCacheClear.js"),
- mapCacheDelete = __webpack_require__(/*! ./_mapCacheDelete */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_mapCacheDelete.js"),
- mapCacheGet = __webpack_require__(/*! ./_mapCacheGet */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_mapCacheGet.js"),
- mapCacheHas = __webpack_require__(/*! ./_mapCacheHas */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_mapCacheHas.js"),
- mapCacheSet = __webpack_require__(/*! ./_mapCacheSet */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_mapCacheSet.js");
+// Invokes `interceptor` with the `obj` and then returns `obj`.
+// The primary purpose of this method is to "tap into" a method chain, in
+// order to perform operations on intermediate results within the chain.
+function tap(obj, interceptor) {
+ interceptor(obj);
+ return obj;
+}
-/**
- * Creates a map cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
-function MapCache(entries) {
- var index = -1,
- length = entries == null ? 0 : entries.length;
+// Normalize a (deep) property `path` to array.
+// Like `_.iteratee`, this function can be customized.
+function toPath$1(path) {
+ return isArray(path) ? path : [path];
+}
+_$1.toPath = toPath$1;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
+// Internal wrapper for `_.toPath` to enable minification.
+// Similar to `cb` for `_.iteratee`.
+function toPath(path) {
+ return _$1.toPath(path);
+}
+
+// Internal function to obtain a nested property in `obj` along `path`.
+function deepGet(obj, path) {
+ var length = path.length;
+ for (var i = 0; i < length; i++) {
+ if (obj == null) return void 0;
+ obj = obj[path[i]];
}
+ return length ? obj : void 0;
}
-// Add methods to `MapCache`.
-MapCache.prototype.clear = mapCacheClear;
-MapCache.prototype['delete'] = mapCacheDelete;
-MapCache.prototype.get = mapCacheGet;
-MapCache.prototype.has = mapCacheHas;
-MapCache.prototype.set = mapCacheSet;
+// Get the value of the (deep) property on `path` from `object`.
+// If any property in `path` does not exist or if the value is
+// `undefined`, return `defaultValue` instead.
+// The `path` is normalized through `_.toPath`.
+function get(object, path, defaultValue) {
+ var value = deepGet(object, toPath(path));
+ return isUndefined(value) ? defaultValue : value;
+}
-module.exports = MapCache;
+// Shortcut function for checking if an object has a given property directly on
+// itself (in other words, not on a prototype). Unlike the internal `has`
+// function, this public version can also traverse nested properties.
+function has(obj, path) {
+ path = toPath(path);
+ var length = path.length;
+ for (var i = 0; i < length; i++) {
+ var key = path[i];
+ if (!has$1(obj, key)) return false;
+ obj = obj[key];
+ }
+ return !!length;
+}
+// Keep the identity function around for default iteratees.
+function identity(value) {
+ return value;
+}
-/***/ }),
+// Returns a predicate for checking whether an object has a given set of
+// `key:value` pairs.
+function matcher(attrs) {
+ attrs = extendOwn({}, attrs);
+ return function(obj) {
+ return isMatch(obj, attrs);
+ };
+}
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_Set.js":
-/*!***********************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_Set.js ***!
- \***********************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// Creates a function that, when passed an object, will traverse that object’s
+// properties down the given `path`, specified as an array of keys or indices.
+function property(path) {
+ path = toPath(path);
+ return function(obj) {
+ return deepGet(obj, path);
+ };
+}
-var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_getNative.js"),
- root = __webpack_require__(/*! ./_root */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_root.js");
+// Internal function that returns an efficient (for current engines) version
+// of the passed-in callback, to be repeatedly applied in other Underscore
+// functions.
+function optimizeCb(func, context, argCount) {
+ if (context === void 0) return func;
+ switch (argCount == null ? 3 : argCount) {
+ case 1: return function(value) {
+ return func.call(context, value);
+ };
+ // The 2-argument case is omitted because we’re not using it.
+ case 3: return function(value, index, collection) {
+ return func.call(context, value, index, collection);
+ };
+ case 4: return function(accumulator, value, index, collection) {
+ return func.call(context, accumulator, value, index, collection);
+ };
+ }
+ return function() {
+ return func.apply(context, arguments);
+ };
+}
-/* Built-in method references that are verified to be native. */
-var Set = getNative(root, 'Set');
+// An internal function to generate callbacks that can be applied to each
+// element in a collection, returning the desired result — either `_.identity`,
+// an arbitrary callback, a property matcher, or a property accessor.
+function baseIteratee(value, context, argCount) {
+ if (value == null) return identity;
+ if (isFunction$1(value)) return optimizeCb(value, context, argCount);
+ if (isObject(value) && !isArray(value)) return matcher(value);
+ return property(value);
+}
-module.exports = Set;
+// External wrapper for our callback generator. Users may customize
+// `_.iteratee` if they want additional predicate/iteratee shorthand styles.
+// This abstraction hides the internal-only `argCount` argument.
+function iteratee(value, context) {
+ return baseIteratee(value, context, Infinity);
+}
+_$1.iteratee = iteratee;
+// The function we call internally to generate a callback. It invokes
+// `_.iteratee` if overridden, otherwise `baseIteratee`.
+function cb(value, context, argCount) {
+ if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context);
+ return baseIteratee(value, context, argCount);
+}
-/***/ }),
+// Returns the results of applying the `iteratee` to each element of `obj`.
+// In contrast to `_.map` it returns an object.
+function mapObject(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ var _keys = keys(obj),
+ length = _keys.length,
+ results = {};
+ for (var index = 0; index < length; index++) {
+ var currentKey = _keys[index];
+ results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
+ }
+ return results;
+}
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_SetCache.js":
-/*!****************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_SetCache.js ***!
- \****************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// Predicate-generating function. Often useful outside of Underscore.
+function noop(){}
-var MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_MapCache.js"),
- setCacheAdd = __webpack_require__(/*! ./_setCacheAdd */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_setCacheAdd.js"),
- setCacheHas = __webpack_require__(/*! ./_setCacheHas */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_setCacheHas.js");
+// Generates a function for a given object that returns a given property.
+function propertyOf(obj) {
+ if (obj == null) return noop;
+ return function(path) {
+ return get(obj, path);
+ };
+}
-/**
- *
- * Creates an array cache object to store unique values.
- *
- * @private
- * @constructor
- * @param {Array} [values] The values to cache.
- */
-function SetCache(values) {
- var index = -1,
- length = values == null ? 0 : values.length;
+// Run a function **n** times.
+function times(n, iteratee, context) {
+ var accum = Array(Math.max(0, n));
+ iteratee = optimizeCb(iteratee, context, 1);
+ for (var i = 0; i < n; i++) accum[i] = iteratee(i);
+ return accum;
+}
- this.__data__ = new MapCache;
- while (++index < length) {
- this.add(values[index]);
+// Return a random integer between `min` and `max` (inclusive).
+function random(min, max) {
+ if (max == null) {
+ max = min;
+ min = 0;
}
+ return min + Math.floor(Math.random() * (max - min + 1));
}
-// Add methods to `SetCache`.
-SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
-SetCache.prototype.has = setCacheHas;
-
-module.exports = SetCache;
-
+// A (possibly faster) way to get the current timestamp as an integer.
+var now = Date.now || function() {
+ return new Date().getTime();
+};
-/***/ }),
+// Internal helper to generate functions for escaping and unescaping strings
+// to/from HTML interpolation.
+function createEscaper(map) {
+ var escaper = function(match) {
+ return map[match];
+ };
+ // Regexes for identifying a key that needs to be escaped.
+ var source = '(?:' + keys(map).join('|') + ')';
+ var testRegexp = RegExp(source);
+ var replaceRegexp = RegExp(source, 'g');
+ return function(string) {
+ string = string == null ? '' : '' + string;
+ return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
+ };
+}
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_Symbol.js":
-/*!**************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_Symbol.js ***!
- \**************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// Internal list of HTML entities for escaping.
+var escapeMap = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ '`': '`'
+};
-var root = __webpack_require__(/*! ./_root */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_root.js");
+// Function for escaping strings to HTML interpolation.
+var _escape = createEscaper(escapeMap);
-/** Built-in value references. */
-var Symbol = root.Symbol;
+// Internal list of HTML entities for unescaping.
+var unescapeMap = invert(escapeMap);
-module.exports = Symbol;
+// Function for unescaping strings from HTML interpolation.
+var _unescape = createEscaper(unescapeMap);
+// By default, Underscore uses ERB-style template delimiters. Change the
+// following template settings to use alternative delimiters.
+var templateSettings = _$1.templateSettings = {
+ evaluate: /<%([\s\S]+?)%>/g,
+ interpolate: /<%=([\s\S]+?)%>/g,
+ escape: /<%-([\s\S]+?)%>/g
+};
-/***/ }),
+// When customizing `_.templateSettings`, if you don't want to define an
+// interpolation, evaluation or escaping regex, we need one that is
+// guaranteed not to match.
+var noMatch = /(.)^/;
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_arrayIncludes.js":
-/*!*********************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_arrayIncludes.js ***!
- \*********************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// Certain characters need to be escaped so that they can be put into a
+// string literal.
+var escapes = {
+ "'": "'",
+ '\\': '\\',
+ '\r': 'r',
+ '\n': 'n',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+};
-var baseIndexOf = __webpack_require__(/*! ./_baseIndexOf */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_baseIndexOf.js");
+var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
-/**
- * A specialized version of `_.includes` for arrays without support for
- * specifying an index to search from.
- *
- * @private
- * @param {Array} [array] The array to inspect.
- * @param {*} target The value to search for.
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
- */
-function arrayIncludes(array, value) {
- var length = array == null ? 0 : array.length;
- return !!length && baseIndexOf(array, value, 0) > -1;
+function escapeChar(match) {
+ return '\\' + escapes[match];
}
-module.exports = arrayIncludes;
-
+// In order to prevent third-party code injection through
+// `_.templateSettings.variable`, we test it against the following regular
+// expression. It is intentionally a bit more liberal than just matching valid
+// identifiers, but still prevents possible loopholes through defaults or
+// destructuring assignment.
+var bareIdentifier = /^\s*(\w|\$)+\s*$/;
-/***/ }),
+// JavaScript micro-templating, similar to John Resig's implementation.
+// Underscore templating handles arbitrary delimiters, preserves whitespace,
+// and correctly escapes quotes within interpolated code.
+// NB: `oldSettings` only exists for backwards compatibility.
+function template(text, settings, oldSettings) {
+ if (!settings && oldSettings) settings = oldSettings;
+ settings = defaults({}, settings, _$1.templateSettings);
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_arrayIncludesWith.js":
-/*!*************************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_arrayIncludesWith.js ***!
- \*************************************************************************************************************/
-/***/ ((module) => {
+ // Combine delimiters into one regular expression via alternation.
+ var matcher = RegExp([
+ (settings.escape || noMatch).source,
+ (settings.interpolate || noMatch).source,
+ (settings.evaluate || noMatch).source
+ ].join('|') + '|$', 'g');
-/**
- * This function is like `arrayIncludes` except that it accepts a comparator.
- *
- * @private
- * @param {Array} [array] The array to inspect.
- * @param {*} target The value to search for.
- * @param {Function} comparator The comparator invoked per element.
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
- */
-function arrayIncludesWith(array, value, comparator) {
- var index = -1,
- length = array == null ? 0 : array.length;
+ // Compile the template source, escaping string literals appropriately.
+ var index = 0;
+ var source = "__p+='";
+ text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
+ source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
+ index = offset + match.length;
- while (++index < length) {
- if (comparator(value, array[index])) {
- return true;
+ if (escape) {
+ source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+ } else if (interpolate) {
+ source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+ } else if (evaluate) {
+ source += "';\n" + evaluate + "\n__p+='";
}
- }
- return false;
-}
-module.exports = arrayIncludesWith;
-
-
-/***/ }),
+ // Adobe VMs need the match returned to produce the correct offset.
+ return match;
+ });
+ source += "';\n";
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_assocIndexOf.js":
-/*!********************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_assocIndexOf.js ***!
- \********************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+ var argument = settings.variable;
+ if (argument) {
+ // Insure against third-party code injection. (CVE-2021-23358)
+ if (!bareIdentifier.test(argument)) throw new Error(
+ 'variable is not a bare identifier: ' + argument
+ );
+ } else {
+ // If a variable is not specified, place data values in local scope.
+ source = 'with(obj||{}){\n' + source + '}\n';
+ argument = 'obj';
+ }
-var eq = __webpack_require__(/*! ./eq */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/eq.js");
+ source = "var __t,__p='',__j=Array.prototype.join," +
+ "print=function(){__p+=__j.call(arguments,'');};\n" +
+ source + 'return __p;\n';
-/**
- * Gets the index at which the `key` is found in `array` of key-value pairs.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} key The key to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
-function assocIndexOf(array, key) {
- var length = array.length;
- while (length--) {
- if (eq(array[length][0], key)) {
- return length;
- }
+ var render;
+ try {
+ render = new Function(argument, '_', source);
+ } catch (e) {
+ e.source = source;
+ throw e;
}
- return -1;
-}
-
-module.exports = assocIndexOf;
-
-/***/ }),
+ var template = function(data) {
+ return render.call(this, data, _$1);
+ };
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_baseFindIndex.js":
-/*!*********************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_baseFindIndex.js ***!
- \*********************************************************************************************************/
-/***/ ((module) => {
+ // Provide the compiled source as a convenience for precompilation.
+ template.source = 'function(' + argument + '){\n' + source + '}';
-/**
- * The base implementation of `_.findIndex` and `_.findLastIndex` without
- * support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} predicate The function invoked per iteration.
- * @param {number} fromIndex The index to search from.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
-function baseFindIndex(array, predicate, fromIndex, fromRight) {
- var length = array.length,
- index = fromIndex + (fromRight ? 1 : -1);
+ return template;
+}
- while ((fromRight ? index-- : ++index < length)) {
- if (predicate(array[index], index, array)) {
- return index;
+// Traverses the children of `obj` along `path`. If a child is a function, it
+// is invoked with its parent as context. Returns the value of the final
+// child, or `fallback` if any child is undefined.
+function result(obj, path, fallback) {
+ path = toPath(path);
+ var length = path.length;
+ if (!length) {
+ return isFunction$1(fallback) ? fallback.call(obj) : fallback;
+ }
+ for (var i = 0; i < length; i++) {
+ var prop = obj == null ? void 0 : obj[path[i]];
+ if (prop === void 0) {
+ prop = fallback;
+ i = length; // Ensure we don't continue iterating.
}
+ obj = isFunction$1(prop) ? prop.call(obj) : prop;
}
- return -1;
+ return obj;
}
-module.exports = baseFindIndex;
+// Generate a unique integer id (unique within the entire client session).
+// Useful for temporary DOM ids.
+var idCounter = 0;
+function uniqueId(prefix) {
+ var id = ++idCounter + '';
+ return prefix ? prefix + id : id;
+}
+// Start chaining a wrapped Underscore object.
+function chain(obj) {
+ var instance = _$1(obj);
+ instance._chain = true;
+ return instance;
+}
-/***/ }),
+// Internal function to execute `sourceFunc` bound to `context` with optional
+// `args`. Determines whether to execute a function as a constructor or as a
+// normal function.
+function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
+ if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
+ var self = baseCreate(sourceFunc.prototype);
+ var result = sourceFunc.apply(self, args);
+ if (isObject(result)) return result;
+ return self;
+}
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_baseGetTag.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_baseGetTag.js ***!
- \******************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// Partially apply a function by creating a version that has had some of its
+// arguments pre-filled, without changing its dynamic `this` context. `_` acts
+// as a placeholder by default, allowing any combination of arguments to be
+// pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.
+var partial = restArguments(function(func, boundArgs) {
+ var placeholder = partial.placeholder;
+ var bound = function() {
+ var position = 0, length = boundArgs.length;
+ var args = Array(length);
+ for (var i = 0; i < length; i++) {
+ args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
+ }
+ while (position < arguments.length) args.push(arguments[position++]);
+ return executeBound(func, bound, this, this, args);
+ };
+ return bound;
+});
-var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_Symbol.js"),
- getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_getRawTag.js"),
- objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_objectToString.js");
+partial.placeholder = _$1;
-/** `Object#toString` result references. */
-var nullTag = '[object Null]',
- undefinedTag = '[object Undefined]';
+// Create a function bound to a given object (assigning `this`, and arguments,
+// optionally).
+var bind = restArguments(function(func, context, args) {
+ if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function');
+ var bound = restArguments(function(callArgs) {
+ return executeBound(func, bound, context, this, args.concat(callArgs));
+ });
+ return bound;
+});
-/** Built-in value references. */
-var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+// Internal helper for collection methods to determine whether a collection
+// should be iterated as an array or as an object.
+// Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength
+// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094
+var isArrayLike = createSizePropertyCheck(getLength);
-/**
- * The base implementation of `getTag` without fallbacks for buggy environments.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
-function baseGetTag(value) {
- if (value == null) {
- return value === undefined ? undefinedTag : nullTag;
+// Internal implementation of a recursive `flatten` function.
+function flatten$1(input, depth, strict, output) {
+ output = output || [];
+ if (!depth && depth !== 0) {
+ depth = Infinity;
+ } else if (depth <= 0) {
+ return output.concat(input);
}
- return (symToStringTag && symToStringTag in Object(value))
- ? getRawTag(value)
- : objectToString(value);
+ var idx = output.length;
+ for (var i = 0, length = getLength(input); i < length; i++) {
+ var value = input[i];
+ if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) {
+ // Flatten current level of array or arguments object.
+ if (depth > 1) {
+ flatten$1(value, depth - 1, strict, output);
+ idx = output.length;
+ } else {
+ var j = 0, len = value.length;
+ while (j < len) output[idx++] = value[j++];
+ }
+ } else if (!strict) {
+ output[idx++] = value;
+ }
+ }
+ return output;
}
-module.exports = baseGetTag;
-
-
-/***/ }),
+// Bind a number of an object's methods to that object. Remaining arguments
+// are the method names to be bound. Useful for ensuring that all callbacks
+// defined on an object belong to it.
+var bindAll = restArguments(function(obj, keys) {
+ keys = flatten$1(keys, false, false);
+ var index = keys.length;
+ if (index < 1) throw new Error('bindAll must be passed function names');
+ while (index--) {
+ var key = keys[index];
+ obj[key] = bind(obj[key], obj);
+ }
+ return obj;
+});
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_baseIndexOf.js":
-/*!*******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_baseIndexOf.js ***!
- \*******************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// Memoize an expensive function by storing its results.
+function memoize(func, hasher) {
+ var memoize = function(key) {
+ var cache = memoize.cache;
+ var address = '' + (hasher ? hasher.apply(this, arguments) : key);
+ if (!has$1(cache, address)) cache[address] = func.apply(this, arguments);
+ return cache[address];
+ };
+ memoize.cache = {};
+ return memoize;
+}
-var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_baseFindIndex.js"),
- baseIsNaN = __webpack_require__(/*! ./_baseIsNaN */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_baseIsNaN.js"),
- strictIndexOf = __webpack_require__(/*! ./_strictIndexOf */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_strictIndexOf.js");
+// Delays a function for the given number of milliseconds, and then calls
+// it with the arguments supplied.
+var delay = restArguments(function(func, wait, args) {
+ return setTimeout(function() {
+ return func.apply(null, args);
+ }, wait);
+});
-/**
- * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
-function baseIndexOf(array, value, fromIndex) {
- return value === value
- ? strictIndexOf(array, value, fromIndex)
- : baseFindIndex(array, baseIsNaN, fromIndex);
-}
+// Defers a function, scheduling it to run after the current call stack has
+// cleared.
+var defer = partial(delay, _$1, 1);
-module.exports = baseIndexOf;
+// Returns a function, that, when invoked, will only be triggered at most once
+// during a given window of time. Normally, the throttled function will run
+// as much as it can, without ever going more than once per `wait` duration;
+// but if you'd like to disable the execution on the leading edge, pass
+// `{leading: false}`. To disable execution on the trailing edge, ditto.
+function throttle(func, wait, options) {
+ var timeout, context, args, result;
+ var previous = 0;
+ if (!options) options = {};
+ var later = function() {
+ previous = options.leading === false ? 0 : now();
+ timeout = null;
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ };
-/***/ }),
+ var throttled = function() {
+ var _now = now();
+ if (!previous && options.leading === false) previous = _now;
+ var remaining = wait - (_now - previous);
+ context = this;
+ args = arguments;
+ if (remaining <= 0 || remaining > wait) {
+ if (timeout) {
+ clearTimeout(timeout);
+ timeout = null;
+ }
+ previous = _now;
+ result = func.apply(context, args);
+ if (!timeout) context = args = null;
+ } else if (!timeout && options.trailing !== false) {
+ timeout = setTimeout(later, remaining);
+ }
+ return result;
+ };
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_baseIsNaN.js":
-/*!*****************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_baseIsNaN.js ***!
- \*****************************************************************************************************/
-/***/ ((module) => {
+ throttled.cancel = function() {
+ clearTimeout(timeout);
+ previous = 0;
+ timeout = context = args = null;
+ };
-/**
- * The base implementation of `_.isNaN` without support for number objects.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
- */
-function baseIsNaN(value) {
- return value !== value;
+ return throttled;
}
-module.exports = baseIsNaN;
+// When a sequence of calls of the returned function ends, the argument
+// function is triggered. The end of a sequence is defined by the `wait`
+// parameter. If `immediate` is passed, the argument function will be
+// triggered at the beginning of the sequence instead of at the end.
+function debounce(func, wait, immediate) {
+ var timeout, previous, args, result, context;
+ var later = function() {
+ var passed = now() - previous;
+ if (wait > passed) {
+ timeout = setTimeout(later, wait - passed);
+ } else {
+ timeout = null;
+ if (!immediate) result = func.apply(context, args);
+ // This check is needed because `func` can recursively invoke `debounced`.
+ if (!timeout) args = context = null;
+ }
+ };
-/***/ }),
+ var debounced = restArguments(function(_args) {
+ context = this;
+ args = _args;
+ previous = now();
+ if (!timeout) {
+ timeout = setTimeout(later, wait);
+ if (immediate) result = func.apply(context, args);
+ }
+ return result;
+ });
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_baseIsNative.js":
-/*!********************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_baseIsNative.js ***!
- \********************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+ debounced.cancel = function() {
+ clearTimeout(timeout);
+ timeout = args = context = null;
+ };
-var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/isFunction.js"),
- isMasked = __webpack_require__(/*! ./_isMasked */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_isMasked.js"),
- isObject = __webpack_require__(/*! ./isObject */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/isObject.js"),
- toSource = __webpack_require__(/*! ./_toSource */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_toSource.js");
+ return debounced;
+}
-/**
- * Used to match `RegExp`
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
- */
-var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+// Returns the first function passed as an argument to the second,
+// allowing you to adjust arguments, run code before and after, and
+// conditionally execute the original function.
+function wrap(func, wrapper) {
+ return partial(wrapper, func);
+}
-/** Used to detect host constructors (Safari). */
-var reIsHostCtor = /^\[object .+?Constructor\]$/;
+// Returns a negated version of the passed-in predicate.
+function negate(predicate) {
+ return function() {
+ return !predicate.apply(this, arguments);
+ };
+}
-/** Used for built-in method references. */
-var funcProto = Function.prototype,
- objectProto = Object.prototype;
+// Returns a function that is the composition of a list of functions, each
+// consuming the return value of the function that follows.
+function compose() {
+ var args = arguments;
+ var start = args.length - 1;
+ return function() {
+ var i = start;
+ var result = args[start].apply(this, arguments);
+ while (i--) result = args[i].call(this, result);
+ return result;
+ };
+}
-/** Used to resolve the decompiled source of functions. */
-var funcToString = funcProto.toString;
+// Returns a function that will only be executed on and after the Nth call.
+function after(times, func) {
+ return function() {
+ if (--times < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+}
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
+// Returns a function that will only be executed up to (but not including) the
+// Nth call.
+function before(times, func) {
+ var memo;
+ return function() {
+ if (--times > 0) {
+ memo = func.apply(this, arguments);
+ }
+ if (times <= 1) func = null;
+ return memo;
+ };
+}
-/** Used to detect if a method is native. */
-var reIsNative = RegExp('^' +
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
-);
+// Returns a function that will be executed at most one time, no matter how
+// often you call it. Useful for lazy initialization.
+var once = partial(before, 2);
-/**
- * The base implementation of `_.isNative` without bad shim checks.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function,
- * else `false`.
- */
-function baseIsNative(value) {
- if (!isObject(value) || isMasked(value)) {
- return false;
+// Returns the first key on an object that passes a truth test.
+function findKey(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var _keys = keys(obj), key;
+ for (var i = 0, length = _keys.length; i < length; i++) {
+ key = _keys[i];
+ if (predicate(obj[key], key, obj)) return key;
}
- var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
- return pattern.test(toSource(value));
}
-module.exports = baseIsNative;
-
-
-/***/ }),
-
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_baseUniq.js":
-/*!****************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_baseUniq.js ***!
- \****************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-
-var SetCache = __webpack_require__(/*! ./_SetCache */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_SetCache.js"),
- arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_arrayIncludes.js"),
- arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_arrayIncludesWith.js"),
- cacheHas = __webpack_require__(/*! ./_cacheHas */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_cacheHas.js"),
- createSet = __webpack_require__(/*! ./_createSet */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_createSet.js"),
- setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_setToArray.js");
+// Internal function to generate `_.findIndex` and `_.findLastIndex`.
+function createPredicateIndexFinder(dir) {
+ return function(array, predicate, context) {
+ predicate = cb(predicate, context);
+ var length = getLength(array);
+ var index = dir > 0 ? 0 : length - 1;
+ for (; index >= 0 && index < length; index += dir) {
+ if (predicate(array[index], index, array)) return index;
+ }
+ return -1;
+ };
+}
-/** Used as the size to enable large array optimizations. */
-var LARGE_ARRAY_SIZE = 200;
+// Returns the first index on an array-like that passes a truth test.
+var findIndex = createPredicateIndexFinder(1);
-/**
- * The base implementation of `_.uniqBy` without support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- */
-function baseUniq(array, iteratee, comparator) {
- var index = -1,
- includes = arrayIncludes,
- length = array.length,
- isCommon = true,
- result = [],
- seen = result;
+// Returns the last index on an array-like that passes a truth test.
+var findLastIndex = createPredicateIndexFinder(-1);
- if (comparator) {
- isCommon = false;
- includes = arrayIncludesWith;
- }
- else if (length >= LARGE_ARRAY_SIZE) {
- var set = iteratee ? null : createSet(array);
- if (set) {
- return setToArray(set);
- }
- isCommon = false;
- includes = cacheHas;
- seen = new SetCache;
- }
- else {
- seen = iteratee ? [] : result;
+// Use a comparator function to figure out the smallest index at which
+// an object should be inserted so as to maintain order. Uses binary search.
+function sortedIndex(array, obj, iteratee, context) {
+ iteratee = cb(iteratee, context, 1);
+ var value = iteratee(obj);
+ var low = 0, high = getLength(array);
+ while (low < high) {
+ var mid = Math.floor((low + high) / 2);
+ if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;
}
- outer:
- while (++index < length) {
- var value = array[index],
- computed = iteratee ? iteratee(value) : value;
+ return low;
+}
- value = (comparator || value !== 0) ? value : 0;
- if (isCommon && computed === computed) {
- var seenIndex = seen.length;
- while (seenIndex--) {
- if (seen[seenIndex] === computed) {
- continue outer;
- }
- }
- if (iteratee) {
- seen.push(computed);
+// Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.
+function createIndexFinder(dir, predicateFind, sortedIndex) {
+ return function(array, item, idx) {
+ var i = 0, length = getLength(array);
+ if (typeof idx == 'number') {
+ if (dir > 0) {
+ i = idx >= 0 ? idx : Math.max(idx + length, i);
+ } else {
+ length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
}
- result.push(value);
+ } else if (sortedIndex && idx && length) {
+ idx = sortedIndex(array, item);
+ return array[idx] === item ? idx : -1;
}
- else if (!includes(seen, computed, comparator)) {
- if (seen !== result) {
- seen.push(computed);
- }
- result.push(value);
+ if (item !== item) {
+ idx = predicateFind(slice.call(array, i, length), isNaN$1);
+ return idx >= 0 ? idx + i : -1;
}
- }
- return result;
+ for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
+ if (array[idx] === item) return idx;
+ }
+ return -1;
+ };
}
-module.exports = baseUniq;
+// Return the position of the first occurrence of an item in an array,
+// or -1 if the item is not included in the array.
+// If the array is large and already in sort order, pass `true`
+// for **isSorted** to use binary search.
+var indexOf = createIndexFinder(1, findIndex, sortedIndex);
+// Return the position of the last occurrence of an item in an array,
+// or -1 if the item is not included in the array.
+var lastIndexOf = createIndexFinder(-1, findLastIndex);
-/***/ }),
+// Return the first value which passes a truth test.
+function find(obj, predicate, context) {
+ var keyFinder = isArrayLike(obj) ? findIndex : findKey;
+ var key = keyFinder(obj, predicate, context);
+ if (key !== void 0 && key !== -1) return obj[key];
+}
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_cacheHas.js":
-/*!****************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_cacheHas.js ***!
- \****************************************************************************************************/
-/***/ ((module) => {
+// Convenience version of a common use case of `_.find`: getting the first
+// object containing specific `key:value` pairs.
+function findWhere(obj, attrs) {
+ return find(obj, matcher(attrs));
+}
-/**
- * Checks if a `cache` value for `key` exists.
- *
- * @private
- * @param {Object} cache The cache to query.
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function cacheHas(cache, key) {
- return cache.has(key);
+// The cornerstone for collection functions, an `each`
+// implementation, aka `forEach`.
+// Handles raw objects in addition to array-likes. Treats all
+// sparse array-likes as if they were dense.
+function each(obj, iteratee, context) {
+ iteratee = optimizeCb(iteratee, context);
+ var i, length;
+ if (isArrayLike(obj)) {
+ for (i = 0, length = obj.length; i < length; i++) {
+ iteratee(obj[i], i, obj);
+ }
+ } else {
+ var _keys = keys(obj);
+ for (i = 0, length = _keys.length; i < length; i++) {
+ iteratee(obj[_keys[i]], _keys[i], obj);
+ }
+ }
+ return obj;
}
-module.exports = cacheHas;
+// Return the results of applying the iteratee to each element.
+function map(obj, iteratee, context) {
+ iteratee = cb(iteratee, context);
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length,
+ results = Array(length);
+ for (var index = 0; index < length; index++) {
+ var currentKey = _keys ? _keys[index] : index;
+ results[index] = iteratee(obj[currentKey], currentKey, obj);
+ }
+ return results;
+}
+// Internal helper to create a reducing function, iterating left or right.
+function createReduce(dir) {
+ // Wrap code that reassigns argument variables in a separate function than
+ // the one that accesses `arguments.length` to avoid a perf hit. (#1991)
+ var reducer = function(obj, iteratee, memo, initial) {
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length,
+ index = dir > 0 ? 0 : length - 1;
+ if (!initial) {
+ memo = obj[_keys ? _keys[index] : index];
+ index += dir;
+ }
+ for (; index >= 0 && index < length; index += dir) {
+ var currentKey = _keys ? _keys[index] : index;
+ memo = iteratee(memo, obj[currentKey], currentKey, obj);
+ }
+ return memo;
+ };
-/***/ }),
+ return function(obj, iteratee, memo, context) {
+ var initial = arguments.length >= 3;
+ return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);
+ };
+}
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_coreJsData.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_coreJsData.js ***!
- \******************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// **Reduce** builds up a single result from a list of values, aka `inject`,
+// or `foldl`.
+var reduce = createReduce(1);
-var root = __webpack_require__(/*! ./_root */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_root.js");
+// The right-associative version of reduce, also known as `foldr`.
+var reduceRight = createReduce(-1);
-/** Used to detect overreaching core-js shims. */
-var coreJsData = root['__core-js_shared__'];
+// Return all the elements that pass a truth test.
+function filter(obj, predicate, context) {
+ var results = [];
+ predicate = cb(predicate, context);
+ each(obj, function(value, index, list) {
+ if (predicate(value, index, list)) results.push(value);
+ });
+ return results;
+}
-module.exports = coreJsData;
+// Return all the elements for which a truth test fails.
+function reject(obj, predicate, context) {
+ return filter(obj, negate(cb(predicate)), context);
+}
+// Determine whether all of the elements pass a truth test.
+function every(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length;
+ for (var index = 0; index < length; index++) {
+ var currentKey = _keys ? _keys[index] : index;
+ if (!predicate(obj[currentKey], currentKey, obj)) return false;
+ }
+ return true;
+}
-/***/ }),
+// Determine if at least one element in the object passes a truth test.
+function some(obj, predicate, context) {
+ predicate = cb(predicate, context);
+ var _keys = !isArrayLike(obj) && keys(obj),
+ length = (_keys || obj).length;
+ for (var index = 0; index < length; index++) {
+ var currentKey = _keys ? _keys[index] : index;
+ if (predicate(obj[currentKey], currentKey, obj)) return true;
+ }
+ return false;
+}
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_createSet.js":
-/*!*****************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_createSet.js ***!
- \*****************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// Determine if the array or object contains a given item (using `===`).
+function contains(obj, item, fromIndex, guard) {
+ if (!isArrayLike(obj)) obj = values(obj);
+ if (typeof fromIndex != 'number' || guard) fromIndex = 0;
+ return indexOf(obj, item, fromIndex) >= 0;
+}
-var Set = __webpack_require__(/*! ./_Set */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_Set.js"),
- noop = __webpack_require__(/*! ./noop */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/noop.js"),
- setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_setToArray.js");
+// Invoke a method (with arguments) on every item in a collection.
+var invoke = restArguments(function(obj, path, args) {
+ var contextPath, func;
+ if (isFunction$1(path)) {
+ func = path;
+ } else {
+ path = toPath(path);
+ contextPath = path.slice(0, -1);
+ path = path[path.length - 1];
+ }
+ return map(obj, function(context) {
+ var method = func;
+ if (!method) {
+ if (contextPath && contextPath.length) {
+ context = deepGet(context, contextPath);
+ }
+ if (context == null) return void 0;
+ method = context[path];
+ }
+ return method == null ? method : method.apply(context, args);
+ });
+});
-/** Used as references for various `Number` constants. */
-var INFINITY = 1 / 0;
+// Convenience version of a common use case of `_.map`: fetching a property.
+function pluck(obj, key) {
+ return map(obj, property(key));
+}
-/**
- * Creates a set object of `values`.
- *
- * @private
- * @param {Array} values The values to add to the set.
- * @returns {Object} Returns the new set.
- */
-var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
- return new Set(values);
-};
+// Convenience version of a common use case of `_.filter`: selecting only
+// objects containing specific `key:value` pairs.
+function where(obj, attrs) {
+ return filter(obj, matcher(attrs));
+}
-module.exports = createSet;
+// Return the maximum element (or element-based computation).
+function max(obj, iteratee, context) {
+ var result = -Infinity, lastComputed = -Infinity,
+ value, computed;
+ if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
+ obj = isArrayLike(obj) ? obj : values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
+ value = obj[i];
+ if (value != null && value > result) {
+ result = value;
+ }
+ }
+ } else {
+ iteratee = cb(iteratee, context);
+ each(obj, function(v, index, list) {
+ computed = iteratee(v, index, list);
+ if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
+ result = v;
+ lastComputed = computed;
+ }
+ });
+ }
+ return result;
+}
+// Return the minimum element (or element-based computation).
+function min(obj, iteratee, context) {
+ var result = Infinity, lastComputed = Infinity,
+ value, computed;
+ if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {
+ obj = isArrayLike(obj) ? obj : values(obj);
+ for (var i = 0, length = obj.length; i < length; i++) {
+ value = obj[i];
+ if (value != null && value < result) {
+ result = value;
+ }
+ }
+ } else {
+ iteratee = cb(iteratee, context);
+ each(obj, function(v, index, list) {
+ computed = iteratee(v, index, list);
+ if (computed < lastComputed || computed === Infinity && result === Infinity) {
+ result = v;
+ lastComputed = computed;
+ }
+ });
+ }
+ return result;
+}
-/***/ }),
+// Sample **n** random values from a collection using the modern version of the
+// [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).
+// If **n** is not specified, returns a single random element.
+// The internal `guard` argument allows it to work with `_.map`.
+function sample(obj, n, guard) {
+ if (n == null || guard) {
+ if (!isArrayLike(obj)) obj = values(obj);
+ return obj[random(obj.length - 1)];
+ }
+ var sample = isArrayLike(obj) ? clone(obj) : values(obj);
+ var length = getLength(sample);
+ n = Math.max(Math.min(n, length), 0);
+ var last = length - 1;
+ for (var index = 0; index < n; index++) {
+ var rand = random(index, last);
+ var temp = sample[index];
+ sample[index] = sample[rand];
+ sample[rand] = temp;
+ }
+ return sample.slice(0, n);
+}
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_freeGlobal.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_freeGlobal.js ***!
- \******************************************************************************************************/
-/***/ ((module) => {
+// Shuffle a collection.
+function shuffle(obj) {
+ return sample(obj, Infinity);
+}
-/** Detect free variable `global` from Node.js. */
-var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+// Sort the object's values by a criterion produced by an iteratee.
+function sortBy(obj, iteratee, context) {
+ var index = 0;
+ iteratee = cb(iteratee, context);
+ return pluck(map(obj, function(value, key, list) {
+ return {
+ value: value,
+ index: index++,
+ criteria: iteratee(value, key, list)
+ };
+ }).sort(function(left, right) {
+ var a = left.criteria;
+ var b = right.criteria;
+ if (a !== b) {
+ if (a > b || a === void 0) return 1;
+ if (a < b || b === void 0) return -1;
+ }
+ return left.index - right.index;
+ }), 'value');
+}
-module.exports = freeGlobal;
+// An internal function used for aggregate "group by" operations.
+function group(behavior, partition) {
+ return function(obj, iteratee, context) {
+ var result = partition ? [[], []] : {};
+ iteratee = cb(iteratee, context);
+ each(obj, function(value, index) {
+ var key = iteratee(value, index, obj);
+ behavior(result, value, key);
+ });
+ return result;
+ };
+}
+// Groups the object's values by a criterion. Pass either a string attribute
+// to group by, or a function that returns the criterion.
+var groupBy = group(function(result, value, key) {
+ if (has$1(result, key)) result[key].push(value); else result[key] = [value];
+});
-/***/ }),
+// Indexes the object's values by a criterion, similar to `_.groupBy`, but for
+// when you know that your index values will be unique.
+var indexBy = group(function(result, value, key) {
+ result[key] = value;
+});
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_getMapData.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_getMapData.js ***!
- \******************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// Counts instances of an object that group by a certain criterion. Pass
+// either a string attribute to count by, or a function that returns the
+// criterion.
+var countBy = group(function(result, value, key) {
+ if (has$1(result, key)) result[key]++; else result[key] = 1;
+});
-var isKeyable = __webpack_require__(/*! ./_isKeyable */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_isKeyable.js");
+// Split a collection into two arrays: one whose elements all pass the given
+// truth test, and one whose elements all do not pass the truth test.
+var partition = group(function(result, value, pass) {
+ result[pass ? 0 : 1].push(value);
+}, true);
-/**
- * Gets the data for `map`.
- *
- * @private
- * @param {Object} map The map to query.
- * @param {string} key The reference key.
- * @returns {*} Returns the map data.
- */
-function getMapData(map, key) {
- var data = map.__data__;
- return isKeyable(key)
- ? data[typeof key == 'string' ? 'string' : 'hash']
- : data.map;
+// Safely create a real, live array from anything iterable.
+var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;
+function toArray(obj) {
+ if (!obj) return [];
+ if (isArray(obj)) return slice.call(obj);
+ if (isString(obj)) {
+ // Keep surrogate pair characters together.
+ return obj.match(reStrSymbol);
+ }
+ if (isArrayLike(obj)) return map(obj, identity);
+ return values(obj);
}
-module.exports = getMapData;
+// Return the number of elements in a collection.
+function size(obj) {
+ if (obj == null) return 0;
+ return isArrayLike(obj) ? obj.length : keys(obj).length;
+}
+// Internal `_.pick` helper function to determine whether `key` is an enumerable
+// property name of `obj`.
+function keyInObj(value, key, obj) {
+ return key in obj;
+}
-/***/ }),
+// Return a copy of the object only containing the allowed properties.
+var pick = restArguments(function(obj, keys) {
+ var result = {}, iteratee = keys[0];
+ if (obj == null) return result;
+ if (isFunction$1(iteratee)) {
+ if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);
+ keys = allKeys(obj);
+ } else {
+ iteratee = keyInObj;
+ keys = flatten$1(keys, false, false);
+ obj = Object(obj);
+ }
+ for (var i = 0, length = keys.length; i < length; i++) {
+ var key = keys[i];
+ var value = obj[key];
+ if (iteratee(value, key, obj)) result[key] = value;
+ }
+ return result;
+});
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_getNative.js":
-/*!*****************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_getNative.js ***!
- \*****************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// Return a copy of the object without the disallowed properties.
+var omit = restArguments(function(obj, keys) {
+ var iteratee = keys[0], context;
+ if (isFunction$1(iteratee)) {
+ iteratee = negate(iteratee);
+ if (keys.length > 1) context = keys[1];
+ } else {
+ keys = map(flatten$1(keys, false, false), String);
+ iteratee = function(value, key) {
+ return !contains(keys, key);
+ };
+ }
+ return pick(obj, iteratee, context);
+});
+
+// Returns everything but the last entry of the array. Especially useful on
+// the arguments object. Passing **n** will return all the values in
+// the array, excluding the last N.
+function initial(array, n, guard) {
+ return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
+}
-var baseIsNative = __webpack_require__(/*! ./_baseIsNative */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_baseIsNative.js"),
- getValue = __webpack_require__(/*! ./_getValue */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_getValue.js");
+// Get the first element of an array. Passing **n** will return the first N
+// values in the array. The **guard** check allows it to work with `_.map`.
+function first(array, n, guard) {
+ if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
+ if (n == null || guard) return array[0];
+ return initial(array, array.length - n);
+}
-/**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
-function getNative(object, key) {
- var value = getValue(object, key);
- return baseIsNative(value) ? value : undefined;
+// Returns everything but the first entry of the `array`. Especially useful on
+// the `arguments` object. Passing an **n** will return the rest N values in the
+// `array`.
+function rest(array, n, guard) {
+ return slice.call(array, n == null || guard ? 1 : n);
}
-module.exports = getNative;
+// Get the last element of an array. Passing **n** will return the last N
+// values in the array.
+function last(array, n, guard) {
+ if (array == null || array.length < 1) return n == null || guard ? void 0 : [];
+ if (n == null || guard) return array[array.length - 1];
+ return rest(array, Math.max(0, array.length - n));
+}
+// Trim out all falsy values from an array.
+function compact(array) {
+ return filter(array, Boolean);
+}
-/***/ }),
+// Flatten out an array, either recursively (by default), or up to `depth`.
+// Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.
+function flatten(array, depth) {
+ return flatten$1(array, depth, false);
+}
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_getRawTag.js":
-/*!*****************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_getRawTag.js ***!
- \*****************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// Take the difference between one array and a number of other arrays.
+// Only the elements present in just the first array will remain.
+var difference = restArguments(function(array, rest) {
+ rest = flatten$1(rest, true, true);
+ return filter(array, function(value){
+ return !contains(rest, value);
+ });
+});
-var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_Symbol.js");
+// Return a version of the array that does not contain the specified value(s).
+var without = restArguments(function(array, otherArrays) {
+ return difference(array, otherArrays);
+});
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
+// Produce a duplicate-free version of the array. If the array has already
+// been sorted, you have the option of using a faster algorithm.
+// The faster algorithm will not work with an iteratee if the iteratee
+// is not a one-to-one function, so providing an iteratee will disable
+// the faster algorithm.
+function uniq(array, isSorted, iteratee, context) {
+ if (!isBoolean(isSorted)) {
+ context = iteratee;
+ iteratee = isSorted;
+ isSorted = false;
+ }
+ if (iteratee != null) iteratee = cb(iteratee, context);
+ var result = [];
+ var seen = [];
+ for (var i = 0, length = getLength(array); i < length; i++) {
+ var value = array[i],
+ computed = iteratee ? iteratee(value, i, array) : value;
+ if (isSorted && !iteratee) {
+ if (!i || seen !== computed) result.push(value);
+ seen = computed;
+ } else if (iteratee) {
+ if (!contains(seen, computed)) {
+ seen.push(computed);
+ result.push(value);
+ }
+ } else if (!contains(result, value)) {
+ result.push(value);
+ }
+ }
+ return result;
+}
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
+// Produce an array that contains the union: each distinct element from all of
+// the passed-in arrays.
+var union = restArguments(function(arrays) {
+ return uniq(flatten$1(arrays, true, true));
+});
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
-var nativeObjectToString = objectProto.toString;
+// Produce an array that contains every item shared between all the
+// passed-in arrays.
+function intersection(array) {
+ var result = [];
+ var argsLength = arguments.length;
+ for (var i = 0, length = getLength(array); i < length; i++) {
+ var item = array[i];
+ if (contains(result, item)) continue;
+ var j;
+ for (j = 1; j < argsLength; j++) {
+ if (!contains(arguments[j], item)) break;
+ }
+ if (j === argsLength) result.push(item);
+ }
+ return result;
+}
-/** Built-in value references. */
-var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+// Complement of zip. Unzip accepts an array of arrays and groups
+// each array's elements on shared indices.
+function unzip(array) {
+ var length = array && max(array, getLength).length || 0;
+ var result = Array(length);
-/**
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the raw `toStringTag`.
- */
-function getRawTag(value) {
- var isOwn = hasOwnProperty.call(value, symToStringTag),
- tag = value[symToStringTag];
+ for (var index = 0; index < length; index++) {
+ result[index] = pluck(array, index);
+ }
+ return result;
+}
- try {
- value[symToStringTag] = undefined;
- var unmasked = true;
- } catch (e) {}
+// Zip together multiple lists into a single array -- elements that share
+// an index go together.
+var zip = restArguments(unzip);
- var result = nativeObjectToString.call(value);
- if (unmasked) {
- if (isOwn) {
- value[symToStringTag] = tag;
+// Converts lists into objects. Pass either a single array of `[key, value]`
+// pairs, or two parallel arrays of the same length -- one of keys, and one of
+// the corresponding values. Passing by pairs is the reverse of `_.pairs`.
+function object(list, values) {
+ var result = {};
+ for (var i = 0, length = getLength(list); i < length; i++) {
+ if (values) {
+ result[list[i]] = values[i];
} else {
- delete value[symToStringTag];
+ result[list[i][0]] = list[i][1];
}
}
return result;
}
-module.exports = getRawTag;
-
+// Generate an integer Array containing an arithmetic progression. A port of
+// the native Python `range()` function. See
+// [the Python documentation](https://docs.python.org/library/functions.html#range).
+function range(start, stop, step) {
+ if (stop == null) {
+ stop = start || 0;
+ start = 0;
+ }
+ if (!step) {
+ step = stop < start ? -1 : 1;
+ }
-/***/ }),
+ var length = Math.max(Math.ceil((stop - start) / step), 0);
+ var range = Array(length);
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_getValue.js":
-/*!****************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_getValue.js ***!
- \****************************************************************************************************/
-/***/ ((module) => {
+ for (var idx = 0; idx < length; idx++, start += step) {
+ range[idx] = start;
+ }
-/**
- * Gets the value at `key` of `object`.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {string} key The key of the property to get.
- * @returns {*} Returns the property value.
- */
-function getValue(object, key) {
- return object == null ? undefined : object[key];
+ return range;
}
-module.exports = getValue;
-
-
-/***/ }),
-
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_hashClear.js":
-/*!*****************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_hashClear.js ***!
- \*****************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+// Chunk a single array into multiple arrays, each containing `count` or fewer
+// items.
+function chunk(array, count) {
+ if (count == null || count < 1) return [];
+ var result = [];
+ var i = 0, length = array.length;
+ while (i < length) {
+ result.push(slice.call(array, i, i += count));
+ }
+ return result;
+}
-var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_nativeCreate.js");
+// Helper function to continue chaining intermediate results.
+function chainResult(instance, obj) {
+ return instance._chain ? _$1(obj).chain() : obj;
+}
-/**
- * Removes all key-value entries from the hash.
- *
- * @private
- * @name clear
- * @memberOf Hash
- */
-function hashClear() {
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
- this.size = 0;
+// Add your own custom functions to the Underscore object.
+function mixin(obj) {
+ each(functions(obj), function(name) {
+ var func = _$1[name] = obj[name];
+ _$1.prototype[name] = function() {
+ var args = [this._wrapped];
+ push.apply(args, arguments);
+ return chainResult(this, func.apply(_$1, args));
+ };
+ });
+ return _$1;
}
-module.exports = hashClear;
+// Add all mutator `Array` functions to the wrapper.
+each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ var method = ArrayProto[name];
+ _$1.prototype[name] = function() {
+ var obj = this._wrapped;
+ if (obj != null) {
+ method.apply(obj, arguments);
+ if ((name === 'shift' || name === 'splice') && obj.length === 0) {
+ delete obj[0];
+ }
+ }
+ return chainResult(this, obj);
+ };
+});
+// Add all accessor `Array` functions to the wrapper.
+each(['concat', 'join', 'slice'], function(name) {
+ var method = ArrayProto[name];
+ _$1.prototype[name] = function() {
+ var obj = this._wrapped;
+ if (obj != null) obj = method.apply(obj, arguments);
+ return chainResult(this, obj);
+ };
+});
-/***/ }),
+// Named Exports
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_hashDelete.js":
-/*!******************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_hashDelete.js ***!
- \******************************************************************************************************/
-/***/ ((module) => {
+var allExports = {
+ __proto__: null,
+ VERSION: VERSION,
+ restArguments: restArguments,
+ isObject: isObject,
+ isNull: isNull,
+ isUndefined: isUndefined,
+ isBoolean: isBoolean,
+ isElement: isElement,
+ isString: isString,
+ isNumber: isNumber,
+ isDate: isDate,
+ isRegExp: isRegExp,
+ isError: isError,
+ isSymbol: isSymbol,
+ isArrayBuffer: isArrayBuffer,
+ isDataView: isDataView$1,
+ isArray: isArray,
+ isFunction: isFunction$1,
+ isArguments: isArguments$1,
+ isFinite: isFinite$1,
+ isNaN: isNaN$1,
+ isTypedArray: isTypedArray$1,
+ isEmpty: isEmpty,
+ isMatch: isMatch,
+ isEqual: isEqual,
+ isMap: isMap,
+ isWeakMap: isWeakMap,
+ isSet: isSet,
+ isWeakSet: isWeakSet,
+ keys: keys,
+ allKeys: allKeys,
+ values: values,
+ pairs: pairs,
+ invert: invert,
+ functions: functions,
+ methods: functions,
+ extend: extend,
+ extendOwn: extendOwn,
+ assign: extendOwn,
+ defaults: defaults,
+ create: create,
+ clone: clone,
+ tap: tap,
+ get: get,
+ has: has,
+ mapObject: mapObject,
+ identity: identity,
+ constant: constant,
+ noop: noop,
+ toPath: toPath$1,
+ property: property,
+ propertyOf: propertyOf,
+ matcher: matcher,
+ matches: matcher,
+ times: times,
+ random: random,
+ now: now,
+ escape: _escape,
+ unescape: _unescape,
+ templateSettings: templateSettings,
+ template: template,
+ result: result,
+ uniqueId: uniqueId,
+ chain: chain,
+ iteratee: iteratee,
+ partial: partial,
+ bind: bind,
+ bindAll: bindAll,
+ memoize: memoize,
+ delay: delay,
+ defer: defer,
+ throttle: throttle,
+ debounce: debounce,
+ wrap: wrap,
+ negate: negate,
+ compose: compose,
+ after: after,
+ before: before,
+ once: once,
+ findKey: findKey,
+ findIndex: findIndex,
+ findLastIndex: findLastIndex,
+ sortedIndex: sortedIndex,
+ indexOf: indexOf,
+ lastIndexOf: lastIndexOf,
+ find: find,
+ detect: find,
+ findWhere: findWhere,
+ each: each,
+ forEach: each,
+ map: map,
+ collect: map,
+ reduce: reduce,
+ foldl: reduce,
+ inject: reduce,
+ reduceRight: reduceRight,
+ foldr: reduceRight,
+ filter: filter,
+ select: filter,
+ reject: reject,
+ every: every,
+ all: every,
+ some: some,
+ any: some,
+ contains: contains,
+ includes: contains,
+ include: contains,
+ invoke: invoke,
+ pluck: pluck,
+ where: where,
+ max: max,
+ min: min,
+ shuffle: shuffle,
+ sample: sample,
+ sortBy: sortBy,
+ groupBy: groupBy,
+ indexBy: indexBy,
+ countBy: countBy,
+ partition: partition,
+ toArray: toArray,
+ size: size,
+ pick: pick,
+ omit: omit,
+ first: first,
+ head: first,
+ take: first,
+ initial: initial,
+ last: last,
+ rest: rest,
+ tail: rest,
+ drop: rest,
+ compact: compact,
+ flatten: flatten,
+ without: without,
+ uniq: uniq,
+ unique: uniq,
+ union: union,
+ intersection: intersection,
+ difference: difference,
+ unzip: unzip,
+ transpose: unzip,
+ zip: zip,
+ object: object,
+ range: range,
+ chunk: chunk,
+ mixin: mixin,
+ 'default': _$1
+};
-/**
- * Removes `key` and its value from the hash.
- *
- * @private
- * @name delete
- * @memberOf Hash
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
-function hashDelete(key) {
- var result = this.has(key) && delete this.__data__[key];
- this.size -= result ? 1 : 0;
- return result;
-}
+// Default Export
-module.exports = hashDelete;
+// Add all of the Underscore functions to the wrapper object.
+var _ = mixin(allExports);
+// Legacy Node.js API.
+_._ = _;
+
+exports.VERSION = VERSION;
+exports._ = _;
+exports._escape = _escape;
+exports._unescape = _unescape;
+exports.after = after;
+exports.allKeys = allKeys;
+exports.before = before;
+exports.bind = bind;
+exports.bindAll = bindAll;
+exports.chain = chain;
+exports.chunk = chunk;
+exports.clone = clone;
+exports.compact = compact;
+exports.compose = compose;
+exports.constant = constant;
+exports.contains = contains;
+exports.countBy = countBy;
+exports.create = create;
+exports.debounce = debounce;
+exports.defaults = defaults;
+exports.defer = defer;
+exports.delay = delay;
+exports.difference = difference;
+exports.each = each;
+exports.every = every;
+exports.extend = extend;
+exports.extendOwn = extendOwn;
+exports.filter = filter;
+exports.find = find;
+exports.findIndex = findIndex;
+exports.findKey = findKey;
+exports.findLastIndex = findLastIndex;
+exports.findWhere = findWhere;
+exports.first = first;
+exports.flatten = flatten;
+exports.functions = functions;
+exports.get = get;
+exports.groupBy = groupBy;
+exports.has = has;
+exports.identity = identity;
+exports.indexBy = indexBy;
+exports.indexOf = indexOf;
+exports.initial = initial;
+exports.intersection = intersection;
+exports.invert = invert;
+exports.invoke = invoke;
+exports.isArguments = isArguments$1;
+exports.isArray = isArray;
+exports.isArrayBuffer = isArrayBuffer;
+exports.isBoolean = isBoolean;
+exports.isDataView = isDataView$1;
+exports.isDate = isDate;
+exports.isElement = isElement;
+exports.isEmpty = isEmpty;
+exports.isEqual = isEqual;
+exports.isError = isError;
+exports.isFinite = isFinite$1;
+exports.isFunction = isFunction$1;
+exports.isMap = isMap;
+exports.isMatch = isMatch;
+exports.isNaN = isNaN$1;
+exports.isNull = isNull;
+exports.isNumber = isNumber;
+exports.isObject = isObject;
+exports.isRegExp = isRegExp;
+exports.isSet = isSet;
+exports.isString = isString;
+exports.isSymbol = isSymbol;
+exports.isTypedArray = isTypedArray$1;
+exports.isUndefined = isUndefined;
+exports.isWeakMap = isWeakMap;
+exports.isWeakSet = isWeakSet;
+exports.iteratee = iteratee;
+exports.keys = keys;
+exports.last = last;
+exports.lastIndexOf = lastIndexOf;
+exports.map = map;
+exports.mapObject = mapObject;
+exports.matcher = matcher;
+exports.max = max;
+exports.memoize = memoize;
+exports.min = min;
+exports.mixin = mixin;
+exports.negate = negate;
+exports.noop = noop;
+exports.now = now;
+exports.object = object;
+exports.omit = omit;
+exports.once = once;
+exports.pairs = pairs;
+exports.partial = partial;
+exports.partition = partition;
+exports.pick = pick;
+exports.pluck = pluck;
+exports.property = property;
+exports.propertyOf = propertyOf;
+exports.random = random;
+exports.range = range;
+exports.reduce = reduce;
+exports.reduceRight = reduceRight;
+exports.reject = reject;
+exports.rest = rest;
+exports.restArguments = restArguments;
+exports.result = result;
+exports.sample = sample;
+exports.shuffle = shuffle;
+exports.size = size;
+exports.some = some;
+exports.sortBy = sortBy;
+exports.sortedIndex = sortedIndex;
+exports.tap = tap;
+exports.template = template;
+exports.templateSettings = templateSettings;
+exports.throttle = throttle;
+exports.times = times;
+exports.toArray = toArray;
+exports.toPath = toPath$1;
+exports.union = union;
+exports.uniq = uniq;
+exports.uniqueId = uniqueId;
+exports.unzip = unzip;
+exports.values = values;
+exports.where = where;
+exports.without = without;
+exports.wrap = wrap;
+exports.zip = zip;
+//# sourceMappingURL=underscore-node-f.cjs.map
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_hashGet.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_hashGet.js ***!
- \***************************************************************************************************/
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/underscore/underscore-node.cjs":
+/*!*********************************************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/underscore/underscore-node.cjs ***!
+ \*********************************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_nativeCreate.js");
-
-/** Used to stand-in for `undefined` hash values. */
-var HASH_UNDEFINED = '__lodash_hash_undefined__';
+// Underscore.js 1.13.1
+// https://underscorejs.org
+// (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
+// Underscore may be freely distributed under the MIT license.
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
+var underscoreNodeF = __webpack_require__(/*! ./underscore-node-f.cjs */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/node_modules/underscore/underscore-node-f.cjs");
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-/**
- * Gets the hash value for `key`.
- *
- * @private
- * @name get
- * @memberOf Hash
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
-function hashGet(key) {
- var data = this.__data__;
- if (nativeCreate) {
- var result = data[key];
- return result === HASH_UNDEFINED ? undefined : result;
- }
- return hasOwnProperty.call(data, key) ? data[key] : undefined;
-}
-module.exports = hashGet;
+module.exports = underscoreNodeF._;
+//# sourceMappingURL=underscore-node.cjs.map
/***/ }),
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_hashHas.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_hashHas.js ***!
- \***************************************************************************************************/
+/***/ "./node_modules/cht-core-3-10/shared-libs/rules-engine/src/index.js":
+/*!**************************************************************************!*\
+ !*** ./node_modules/cht-core-3-10/shared-libs/rules-engine/src/index.js ***!
+ \**************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_nativeCreate.js");
-
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
/**
- * Checks if a hash value for `key` exists.
+ * @module rules-engine
*
- * @private
- * @name has
- * @memberOf Hash
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ * Business logic for interacting with rules documents
*/
-function hashHas(key) {
- var data = this.__data__;
- return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
-}
-module.exports = hashHas;
+const pouchdbProvider = __webpack_require__(/*! ./pouchdb-provider */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/src/pouchdb-provider.js");
+const rulesEmitter = __webpack_require__(/*! ./rules-emitter */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/src/rules-emitter.js");
+const rulesStateStore = __webpack_require__(/*! ./rules-state-store */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/src/rules-state-store.js");
+const wireupToProvider = __webpack_require__(/*! ./provider-wireup */ "./node_modules/cht-core-3-10/shared-libs/rules-engine/src/provider-wireup.js");
+/**
+ * @param {Object} db Medic pouchdb database
+ */
+module.exports = db => {
+ const provider = pouchdbProvider(db);
+ return {
+ /**
+ * @param {Object} settings Settings for the behavior of the rules engine
+ * @param {Object} settings.rules Rules code from settings doc
+ * @param {Object[]} settings.taskSchedules Task schedules from settings doc
+ * @param {Object[]} settings.targets Target definitions from settings doc
+ * @param {Boolean} settings.enableTasks Flag to enable tasks
+ * @param {Boolean} settings.enableTargets Flag to enable targets
+ * @param {Object} settings.contact User's hydrated contact document
+ * @param {Object} settings.user User's settings document
+ */
+ initialize: (settings) => wireupToProvider.initialize(provider, settings),
-/***/ }),
+ /**
+ * @returns {Boolean} True if the rules engine is enabled and ready for use
+ */
+ isEnabled: () => rulesEmitter.isEnabled() && rulesEmitter.isLatestNoolsSchema(),
-/***/ "./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_hashSet.js":
-/*!***************************************************************************************************!*\
- !*** ./node_modules/cht-core-3-10/shared-libs/registration-utils/node_modules/lodash/_hashSet.js ***!
- \***************************************************************************************************/
-/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+ /**
+ * Refreshes all rules documents for a set of contacts and returns their task documents
+ *
+ * @param {string[]} contactIds An array of contact ids. If undefined, all contacts are
+ * @returns {Promise