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sDelivr using Terser v5.39.0.\n * Original file: /npm/quickfield@1.0.103/dist/quickfield.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import'quickcss';import registerAnimations from'./animations.js';import'@danielkalen/is';import IS from'./checks.js';import'./consolePatch.js';import'quickdom';import'@danielkalen/simplybind';import'./constants/regex.js';import'./helpers.js';import extend from'smart-extend';import REQUIRED_FIELD_METHODS from'./constants/reqFieldMethods.js';import'fastdom';import'./components/condition.js';import'./field/transformSettings.js';import'./field/globalDefaults.js';import Field from'./field/index.js';import'./constants/keyCodes.js';import'./svg/checkmark.js';import'./svg/angleDown.js';import'./svg/caretUp.js';import'./svg/caretDown.js';import'./svg/plus.js';import'./svg/clone.js';import'./svg/remove.js';import'./template-f2a8f8f1.js';import'./components/dropdown/defaults.js';import'./components/dropdown/index.js';import'text-mask-core';import'text-mask-addons';import'./components/mask.js';import'./constants/colors.js';import'./template-689295d2.js';import'./fields/text/defaults.js';import TextField from'./fields/text/index.js';var version = \"1.0.103\";var createBuilder, quickfield;\n\ncreateBuilder = function (settingOverrides, templateOverrides) {\n  var builder;\n\n  builder = function (settings) {\n    if (arguments.length > 1) {\n      settings = extend.clone(...arguments);\n    }\n\n    if (!IS.object(settings)) {\n      settings = {};\n    }\n\n    if (settings.type == null) {\n      settings.type = 'text';\n    }\n\n    if (!Field[settings.type]) {\n      throw new Error(`QuickField: '${settings.type}' is not a valid/registered field type`);\n    }\n\n    registerAnimations();\n    return new Field[settings.type](settings, builder, settingOverrides, templateOverrides);\n  };\n\n  builder.register = function (type, targetField) {\n    var i, len, requiredMethod;\n\n    if (!IS.string(type) || !IS.function(targetField)) {\n      throw new Error(\"QuickField Registration: invalid arguments\");\n    }\n\n    for (i = 0, len = REQUIRED_FIELD_METHODS.length; i < len; i++) {\n      requiredMethod = REQUIRED_FIELD_METHODS[i];\n\n      if (!targetField.prototype[requiredMethod]) {\n        throw new Error(`QuickField Registration: '${requiredMethod}' method is required in order to register the field`);\n      }\n    }\n\n    Field[type] = targetField;\n    return this;\n  };\n\n  builder.config = function (newSettings, newTemplates) {\n    var config, globalConfig, name, originalTemplates, outputSettings, outputTemplates, ref, templates, type;\n\n    if (!IS.object(newSettings)) {\n      throw new Error(`QuickField Config: invalid config object provided ${String(newSettings)}`);\n    }\n\n    outputSettings = Object.create(null);\n\n    for (type in newSettings) {\n      config = newSettings[type];\n\n      if (type === 'global') {\n        outputSettings.globalDefaults = extend.deep.notDeep(Field.shallowSettings).clone(Field.prototype.globalDefaults, config);\n      } else if (Field[type]) {\n        outputSettings[type] = extend.clone.deep.notDeep(Field.shallowSettings)(Field[type].prototype.defaults, config);\n      }\n    }\n\n    if (IS.object(newTemplates)) {\n      outputTemplates = Object.create(null);\n      globalConfig = newTemplates.global;\n\n      if (globalConfig && globalConfig.field && !globalConfig.default) {\n        globalConfig.default = globalConfig.field;\n      }\n\n      for (type in Field) {\n        originalTemplates = (ref = Field[type].prototype) != null ? ref.templates : void 0;\n        templates = newTemplates[type] || globalConfig;\n\n        if (!originalTemplates) {\n          continue;\n        }\n\n        if (!templates) {\n          outputTemplates[type] = originalTemplates;\n          continue;\n        }\n\n        if (templates.field && !templates.default) {\n          templates.default = templates.field;\n        }\n\n        outputTemplates[type] = Object.create(null);\n\n        for (name in templates) {\n          config = templates[name];\n\n          if (name === 'field' || !originalTemplates[name]) {\n            continue;\n          }\n\n          if (globalConfig && globalConfig[name]) {\n            config = extend.clone.deep.concat(globalConfig[name], config);\n          }\n\n          outputTemplates[type][name] = originalTemplates[name].extend(config);\n        }\n\n        for (name in originalTemplates) {\n          config = originalTemplates[name];\n\n          if (!outputTemplates[type][name]) {\n            outputTemplates[type][name] = config;\n          }\n        }\n      }\n    }\n\n    return createBuilder(outputSettings, outputTemplates);\n  };\n\n  Object.defineProperty(builder, 'fields', {\n    get: function () {\n      return extend.clone.own.notKeys('instances')(Field);\n    }\n  });\n  builder.settingOverrides = settingOverrides;\n  builder.templateOverrides = templateOverrides;\n  builder.version = version;\n  builder.Field = Field;\n  return builder;\n};\nquickfield = createBuilder();\nquickfield.register('text', TextField); // quickfield.register 'textarea', TextareaField\n// quickfield.register 'number', NumberField\n// quickfield.register 'select', SelectField\n// quickfield.register 'choice', ChoiceField\n// quickfield.register 'truefalse', TruefalseField\n// quickfield.register 'toggle', ToggleField\n// quickfield.register 'group', GroupField\n// quickfield.register 'repeater', RepeaterField\n// quickfield.register 'checkbox', FileField\n// quickfield.register 'file', CheckboxField\n\nvar quickfield$1 = quickfield;export default quickfield$1;"]}