diff --git a/OpenContent/Components/FeatureController.cs b/OpenContent/Components/FeatureController.cs index 0b1bb76f..e50e7fa4 100644 --- a/OpenContent/Components/FeatureController.cs +++ b/OpenContent/Components/FeatureController.cs @@ -41,7 +41,7 @@ public class FeatureController : ModuleSearchBase, IPortable, IUpgradeable, IMod public string ExportModule(int moduleId) { string xml = ""; - OpenContentController ctrl = new OpenContentController(PortalSettings.Current.PortalId); + OpenContentController ctrl = new OpenContentController(); var items = ctrl.GetContents(moduleId); xml += ""; foreach (var item in items) diff --git a/OpenContent/Components/Handlebars/HandlebarsEngine.cs b/OpenContent/Components/Handlebars/HandlebarsEngine.cs index 6d2ab726..ac16021f 100644 --- a/OpenContent/Components/Handlebars/HandlebarsEngine.cs +++ b/OpenContent/Components/Handlebars/HandlebarsEngine.cs @@ -14,6 +14,7 @@ using System.Collections; using DotNetNuke.Entities.Portals; using Satrabel.OpenContent.Components.Logging; +using Newtonsoft.Json.Linq; namespace Satrabel.OpenContent.Components.Handlebars { @@ -39,9 +40,12 @@ public void Compile(string source) RegisterArrayIndexHelper(hbs); RegisterArrayTranslateHelper(hbs); RegisterIfAndHelper(hbs); + RegisterIfOrHelper(hbs); RegisterConvertHtmlToTextHelper(hbs); RegisterConvertToJsonHelper(hbs); RegisterTruncateWordsHelper(hbs); + RegisterReplaceHelper(hbs); + RegisterReplaceNewlineHelper(hbs); _template = hbs.Compile(source); } catch (Exception ex) @@ -108,11 +112,14 @@ private void RegisterHelpers(IHandlebars hbs) RegisterArrayTranslateHelper(hbs); RegisterArrayLookupHelper(hbs); RegisterIfAndHelper(hbs); + RegisterIfOrHelper(hbs); RegisterIfInHelper(hbs); RegisterEachPublishedHelper(hbs); RegisterConvertHtmlToTextHelper(hbs); RegisterConvertToJsonHelper(hbs); RegisterTruncateWordsHelper(hbs); + RegisterReplaceHelper(hbs); + RegisterReplaceNewlineHelper(hbs); } private void RegisterTruncateWordsHelper(HandlebarsDotNet.IHandlebars hbs) @@ -137,6 +144,39 @@ private void RegisterTruncateWordsHelper(HandlebarsDotNet.IHandlebars hbs) } }); } + private void RegisterReplaceHelper(HandlebarsDotNet.IHandlebars hbs) + { + hbs.RegisterHelper("replace", (writer, context, parameters) => + { + try + { + string text = parameters[0].ToString(); + string oldString = parameters[1].ToString().Replace("\\n", "\n"); + text = text.Replace(oldString, parameters[2].ToString()); + HandlebarsDotNet.HandlebarsExtensions.WriteSafeString(writer, text); + } + catch (Exception) + { + HandlebarsDotNet.HandlebarsExtensions.WriteSafeString(writer, ""); + } + }); + } + private void RegisterReplaceNewlineHelper(HandlebarsDotNet.IHandlebars hbs) + { + hbs.RegisterHelper("replacenewline", (writer, context, parameters) => + { + try + { + string text = parameters[0].ToString(); + text = text.Replace("\n", parameters[1].ToString()); + HandlebarsDotNet.HandlebarsExtensions.WriteSafeString(writer, text); + } + catch (Exception) + { + HandlebarsDotNet.HandlebarsExtensions.WriteSafeString(writer, ""); + } + }); + } public string Execute(Page page, FileUri sourceFileUri, object model) { try @@ -165,7 +205,7 @@ public string Execute(Page page, TemplateFiles files, string templateVirtualFold string source = File.ReadAllText(sourceFileUri.PhysicalFilePath); string sourceFolder = sourceFileUri.UrlFolder; var hbs = HandlebarsDotNet.Handlebars.Create(); - + RegisterHelpers(hbs); RegisterScriptHelper(hbs); RegisterHandlebarsHelper(hbs); @@ -292,7 +332,7 @@ private void RegisterEqualHelper(HandlebarsDotNet.IHandlebars hbs) } }); hbs.RegisterHelper("equaldate", (writer, options, context, arguments) => - { + { try { DateTime datetime1 = DateTime.Parse(arguments[0].ToString(), null, System.Globalization.DateTimeStyles.RoundtripKind); @@ -490,7 +530,7 @@ private void RegisterImageUrlHelper(HandlebarsDotNet.IHandlebars hbs) writer.WriteSafeString(imageUrl); } }); - + } /// @@ -651,21 +691,47 @@ private void RegisterFormatNumberHelper(HandlebarsDotNet.IHandlebars hbs) { try { - decimal? number = parameters[0] as decimal?; - string format = parameters[1].ToString(); - string provider = parameters[2].ToString(); - - IFormatProvider formatprovider = null; - if (provider.ToLower() == "invariant") + decimal number; + if (parameters[0] is decimal?) + { + number = (parameters[0] as decimal?).Value; + } + else if (parameters[0] is decimal) { - formatprovider = CultureInfo.InvariantCulture; + number = (decimal)parameters[0]; } - else if (!string.IsNullOrWhiteSpace(provider)) + else { - formatprovider = CultureInfo.CreateSpecificCulture(provider); + number = decimal.Parse(parameters[0].ToString()); } - string res = number.Value.ToString(format, formatprovider); + string res = ""; + string format = "0.00"; + + if (parameters.Count() > 1) + { + format = parameters[1].ToString(); + } + if (parameters.Count() > 2 && !string.IsNullOrWhiteSpace(parameters[2].ToString())) + { + string provider = parameters[2].ToString(); + IFormatProvider formatprovider = null; + if (provider.ToLower() == "invariant") + { + formatprovider = CultureInfo.InvariantCulture; + } + else + { + formatprovider = CultureInfo.CreateSpecificCulture(provider); + } + res = number.ToString(format, formatprovider); + } + else + { + res = number.ToString(format); + } + //string provider = parameters[2].ToString(); + //string res = number.Value.ToString(format, formatprovider); HandlebarsDotNet.HandlebarsExtensions.WriteSafeString(writer, res); } catch (Exception) @@ -814,6 +880,26 @@ private void RegisterIfAndHelper(IHandlebars hbs) } }); } + + private void RegisterIfOrHelper(IHandlebars hbs) + { + hbs.RegisterHelper("ifor", (writer, options, context, arguments) => + { + bool res = false; + foreach (var arg in arguments) + { + res = res || HandlebarsUtils.IsTruthyOrNonEmpty(arg); + } + if (res) + { + options.Template(writer, (object)context); + } + else + { + options.Inverse(writer, (object)context); + } + }); + } private void RegisterIfInHelper(IHandlebars hbs) { hbs.RegisterHelper("ifin", (writer, options, context, arguments) => @@ -858,7 +944,15 @@ private void RegisterConvertToJsonHelper(HandlebarsDotNet.IHandlebars hbs) { try { - var res = System.Web.Helpers.Json.Encode(parameters[0]); + string res; + if (parameters[0] is JToken) + { + res = ((JToken)parameters[0]).ToString(); + } + else + { + res = System.Web.Helpers.Json.Encode(parameters[0]); + } HandlebarsDotNet.HandlebarsExtensions.WriteSafeString(writer, res); } catch (Exception) diff --git a/OpenContent/Components/OpenContentAPIController.cs b/OpenContent/Components/OpenContentAPIController.cs index b4446aef..f7125d6d 100644 --- a/OpenContent/Components/OpenContentAPIController.cs +++ b/OpenContent/Components/OpenContentAPIController.cs @@ -362,11 +362,8 @@ public HttpResponseMessage LookupData(LookupDataRequestDTO req) } if (json is JArray) { - if (LocaleController.Instance.GetLocales(PortalSettings.PortalId).Count > 1) - { - JsonUtils.SimplifyJson(json, DnnLanguageUtils.GetCurrentCultureCode()); - } AddLookupItems(req.valueField, req.textField, req.childrenField, res, json as JArray); + JsonUtils.SimplifyJson(json, DnnLanguageUtils.GetCurrentCultureCode()); } } return Request.CreateResponse(HttpStatusCode.OK, res); diff --git a/OpenContent/Components/Render/ModelFactoryBase.cs b/OpenContent/Components/Render/ModelFactoryBase.cs index 7f93d073..7950205f 100644 --- a/OpenContent/Components/Render/ModelFactoryBase.cs +++ b/OpenContent/Components/Render/ModelFactoryBase.cs @@ -217,17 +217,13 @@ protected void ExtendModel(JObject model, bool onlyData, bool onlyMainData) foreach (var dataItem in dataItems.Items) { var json = dataItem.Data; - - if (json != null && LocaleController.Instance.GetLocales(_portalId).Count > 1) - { - JsonUtils.SimplifyJson(json, GetCurrentCultureCode()); - } if (json is JObject) { JObject context = new JObject(); json["Context"] = context; context["Id"] = dataItem.Id; EnhanceSelect2(json as JObject); + JsonUtils.SimplifyJson(json, GetCurrentCultureCode()); } colDataJson.Add(json); } @@ -243,10 +239,7 @@ protected void ExtendModel(JObject model, bool onlyData, bool onlyMainData) try { var jsonSettings = JToken.Parse(_settingsJson); - if (LocaleController.Instance.GetLocales(_portalId).Count > 1) - { - JsonUtils.SimplifyJson(jsonSettings, GetCurrentCultureCode()); - } + JsonUtils.SimplifyJson(jsonSettings, GetCurrentCultureCode()); model["Settings"] = jsonSettings; } catch (Exception ex) @@ -304,7 +297,7 @@ private JObject GetAdditionalData() var json = dataItem?.Data; if (json != null) { - if (LocaleController.Instance.GetLocales(_portalId).Count > 1) + //if (LocaleController.Instance.GetLocales(_portalId).Count > 1) { JsonUtils.SimplifyJson(json, GetCurrentCultureCode()); } diff --git a/OpenContent/Components/Render/ModelFactoryMultiple.cs b/OpenContent/Components/Render/ModelFactoryMultiple.cs index 57c13546..cdef870b 100644 --- a/OpenContent/Components/Render/ModelFactoryMultiple.cs +++ b/OpenContent/Components/Render/ModelFactoryMultiple.cs @@ -51,15 +51,12 @@ public IEnumerable> GetModelAsDictionaryList() { foreach (var item in _dataList) { - var model = item.Data as JObject; + var model = item.Data.DeepClone() as JObject; JObject context = new JObject(); model["Context"] = context; - context["Id"] = item.Id; - if (LocaleController.Instance.GetLocales(_portalId).Count > 1) - { - JsonUtils.SimplifyJson(model, GetCurrentCultureCode()); - } + context["Id"] = item.Id; EnhanceSelect2(model); + JsonUtils.SimplifyJson(model, GetCurrentCultureCode()); yield return JsonUtils.JsonToDictionary(model.ToString()); } } @@ -91,14 +88,10 @@ public override JToken GetModelAsJson(bool onlyData = false, bool onlyMainData = JObject context = new JObject(); dyn["Context"] = context; context["Id"] = item.Id; - if (LocaleController.Instance.GetLocales(_portalId).Count > 1) - { - JsonUtils.SimplifyJson(dyn, GetCurrentCultureCode()); - } EnhanceSelect2(dyn); + JsonUtils.SimplifyJson(dyn, GetCurrentCultureCode()); EnhanceUser(dyn, item.CreatedByUserId); EnhanceImages(dyn, itemsModel); - if (onlyData) { RemoveNoData(itemsModel); diff --git a/OpenContent/Components/Render/ModelFactorySingle.cs b/OpenContent/Components/Render/ModelFactorySingle.cs index c8729c7b..83fed932 100644 --- a/OpenContent/Components/Render/ModelFactorySingle.cs +++ b/OpenContent/Components/Render/ModelFactorySingle.cs @@ -40,16 +40,13 @@ public ModelFactorySingle(IDataItem data, OpenContentModuleInfo module, PortalSe public override JToken GetModelAsJson(bool onlyData = false, bool onlyMainData = false) { var model = _dataJson as JObject; - if (LocaleController.Instance.GetLocales(_portalId).Count > 1) - { - JsonUtils.SimplifyJson(model, GetCurrentCultureCode()); - } var enhancedModel = new JObject(); ExtendSchemaOptions(enhancedModel, onlyData || onlyMainData); ExtendModel(enhancedModel, onlyData, onlyMainData); ExtendModelSingle(enhancedModel); EnhanceSelect2(model); JsonUtils.Merge(model, enhancedModel); + JsonUtils.SimplifyJson(model, GetCurrentCultureCode()); return model; } diff --git a/OpenContent/Components/Rest/RestQueryBuilder.cs b/OpenContent/Components/Rest/RestQueryBuilder.cs index f61ab582..5232c27f 100644 --- a/OpenContent/Components/Rest/RestQueryBuilder.cs +++ b/OpenContent/Components/Rest/RestQueryBuilder.cs @@ -34,10 +34,28 @@ public static Select MergeQuery(FieldConfig config, Select select, RestSelect re { if (rule.Value != null) { + RuleValue val; + if(rule.Value.Type == Newtonsoft.Json.Linq.JTokenType.Boolean) + { + val = new BooleanRuleValue((bool)rule.Value.Value); + } + else if (rule.Value.Type == Newtonsoft.Json.Linq.JTokenType.Integer) + { + val = new IntegerRuleValue((int)rule.Value.Value); + } + else if (rule.Value.Type == Newtonsoft.Json.Linq.JTokenType.Float) + { + val = new FloatRuleValue((float)rule.Value.Value); + } + else + { + val = new StringRuleValue(rule.Value.ToString()); + } + query.AddRule(FieldConfigUtils.CreateFilterRule(config, cultureCode, rule.Field, rule.FieldOperator, - new StringRuleValue(rule.Value.ToString()) + val )); } } diff --git a/OpenContent/Components/Rest/V2/RestController.cs b/OpenContent/Components/Rest/V2/RestController.cs index 95241697..c071889c 100644 --- a/OpenContent/Components/Rest/V2/RestController.cs +++ b/OpenContent/Components/Rest/V2/RestController.cs @@ -164,7 +164,7 @@ public HttpResponseMessage Get(string entity, int pageIndex, int pageSize, strin item["id"] = item["Context"]["Id"]; JsonUtils.IdJson(item); } - res[entity] = model[collection]; + res[entity] = model["Items"]; res["meta"]["total"] = dsItems.Total; return Request.CreateResponse(HttpStatusCode.OK, res); } diff --git a/OpenContent/EditFormSettings.ascx.cs b/OpenContent/EditFormSettings.ascx.cs index 78a1ea30..f2e29703 100644 --- a/OpenContent/EditFormSettings.ascx.cs +++ b/OpenContent/EditFormSettings.ascx.cs @@ -28,11 +28,12 @@ protected override void OnInit(EventArgs e) hlCancel.NavigateUrl = Globals.NavigateURL(); cmdSave.NavigateUrl = Globals.NavigateURL(); OpenContentSettings settings = this.OpenContentSettings(); - AlpacaEngine alpaca = new AlpacaEngine(Page, ModuleContext.PortalId, "~/DeskTopModules/OpenContent", "formsettings"); + AlpacaEngine alpaca = new AlpacaEngine(Page, ModuleContext.PortalId, "DeskTopModules/OpenContent", "formsettings"); //AlpacaEngine alpaca = new AlpacaEngine(Page, ModuleContext, "", ""); - alpaca.RegisterAll(); + alpaca.RegisterAll(true, true); string itemId = null; AlpacaContext = new AlpacaContext(PortalId, ModuleId, itemId, ScopeWrapper.ClientID, hlCancel.ClientID, cmdSave.ClientID, null, null, null); + AlpacaContext.Bootstrap = true; } public AlpacaContext AlpacaContext { get; private set; } diff --git a/OpenContent/OpenContent.csproj b/OpenContent/OpenContent.csproj index 9dcfb75d..721b10f1 100644 --- a/OpenContent/OpenContent.csproj +++ b/OpenContent/OpenContent.csproj @@ -503,6 +503,7 @@ + dnnfields.js diff --git a/OpenContent/OpenContent.dnn b/OpenContent/OpenContent.dnn index f75e1a24..f4093f3a 100644 --- a/OpenContent/OpenContent.dnn +++ b/OpenContent/OpenContent.dnn @@ -1,6 +1,6 @@ - + OpenContent OpenContent module by Satrabel.be ~/DesktopModules/OpenContent/Images/icon_extensions.png diff --git a/OpenContent/alpaca/js/fields/dnn/CheckboxField.js b/OpenContent/alpaca/js/fields/dnn/CheckboxField.js new file mode 100644 index 00000000..48f66998 --- /dev/null +++ b/OpenContent/alpaca/js/fields/dnn/CheckboxField.js @@ -0,0 +1,554 @@ +(function($) { + + var Alpaca = $.alpaca; + + Alpaca.Fields.CheckBoxField = Alpaca.ControlField.extend( + /** + * @lends Alpaca.Fields.CheckBoxField.prototype + */ + { + /** + * @see Alpaca.Field#getFieldType + */ + getFieldType: function() { + return "checkbox"; + }, + + /** + * @see Alpaca.Field#setup + */ + setup: function() { + + var self = this; + + self.base(); + + if (typeof(self.options.multiple) == "undefined") + { + if (self.schema.type === "array") + { + self.options.multiple = true; + } + else if (typeof(self.schema["enum"]) !== "undefined") + { + self.options.multiple = true; + } + } + + if (self.options.multiple) + { + // multiple mode + + self.checkboxOptions = []; + + // if we have enum values, copy them into checkbox options + if (self.getEnum()) + { + // sort the enumerated values + self.sortEnum(); + + var optionLabels = self.getOptionLabels(); + + $.each(self.getEnum(), function (index, value) { + + var text = value; + if (optionLabels) + { + if (!Alpaca.isEmpty(optionLabels[index])) + { + text = optionLabels[index]; + } + else if (!Alpaca.isEmpty(optionLabels[value])) + { + text = optionLabels[value]; + } + } + + self.checkboxOptions.push({ + "value": value, + "text": text + }); + }); + } + + // if they provided "datasource", we copy to "dataSource" + if (self.options.datasource && !self.options.dataSource) { + self.options.dataSource = self.options.datasource; + delete self.options.datasource; + } + + // we optionally allow the data source return values to override the schema and options + if (typeof(self.options.useDataSourceAsEnum) === "undefined") + { + self.options.useDataSourceAsEnum = true; + } + } + else + { + // single mode + + if (!this.options.rightLabel) { + this.options.rightLabel = ""; + } + } + }, + + prepareControlModel: function(callback) + { + var self = this; + + this.base(function(model) { + + if (self.checkboxOptions) + { + model.checkboxOptions = self.checkboxOptions; + } + + callback(model); + }); + }, + + /** + * @OVERRIDE + */ + getEnum: function() + { + var values = this.base(); + if (!values) + { + if (this.schema && this.schema.items && this.schema.items.enum) + { + values = this.schema.items.enum; + } + } + + return values; + }, + + /** + * @OVERRIDE + */ + getOptionLabels: function() + { + var values = this.base(); + if (!values) + { + if (this.options && this.options.items && this.options.items.optionLabels) + { + values = this.options.items.optionLabels; + } + } + + return values; + }, + + /** + * Handler for the event that the checkbox is clicked. + * + * @param e Event. + */ + onClick: function(e) + { + this.refreshValidationState(); + }, + + /** + * @see Alpaca.ControlField#beforeRenderControl + */ + beforeRenderControl: function(model, callback) + { + var self = this; + + this.base(model, function() { + + if (self.options.dataSource) + { + // switch to multiple mode + self.options.multiple = true; + + if (!self.checkboxOptions) { + model.checkboxOptions = self.checkboxOptions = []; + } + + // clear the array + self.checkboxOptions.length = 0; + + self.invokeDataSource(self.checkboxOptions, model, function(err) { + + if (self.options.useDataSourceAsEnum) + { + // now build out the enum and optionLabels + var _enum = []; + var _optionLabels = []; + for (var i = 0; i < self.checkboxOptions.length; i++) + { + _enum.push(self.checkboxOptions[i].value); + _optionLabels.push(self.checkboxOptions[i].text); + } + + self.setEnum(_enum); + self.setOptionLabels(_optionLabels); + } + + callback(); + }); + } + else + { + callback(); + } + + }); + }, + + + /** + * @see Alpaca.ControlField#postRender + */ + postRender: function(callback) { + + var self = this; + + this.base(function() { + + // do this little trick so that if we have a default value, it gets set during first render + // this causes the checked state of the control to update + if (self.data && typeof(self.data) !== "undefined") + { + self.setValue(self.data); + } + + // for multiple mode, mark values + if (self.options.multiple) + { + // none checked + $(self.getFieldEl()).find("input:checkbox").prop("checked", false); + + if (self.data) + { + var dataArray = self.data; + if (typeof(self.data) === "string") + { + dataArray = self.data.split(","); + for (var a = 0; a < dataArray.length; a++) + { + dataArray[a] = $.trim(dataArray[a]); + } + } + + for (var k in dataArray) + { + $(self.getFieldEl()).find("input:checkbox[data-checkbox-value=\"" + dataArray[k] + "\"]").prop("checked", true); + } + } + } + + // single mode + + // whenever the state of one of our input:checkbox controls is changed (either via a click or programmatically), + // we signal to the top-level field to fire up a change + // + // this allows the dependency system to recalculate and such + // + $(self.getFieldEl()).find("input:checkbox").change(function(evt) { + self.triggerWithPropagation("change"); + }); + + callback(); + }); + }, + + /** + * @see Alpaca.Field#getValue + */ + getControlValue: function() + { + var self = this; + + var value = null; + + if (!self.options.multiple) + { + // single scalar value + var input = $(self.getFieldEl()).find("input"); + if (input.length > 0) + { + value = Alpaca.checked($(input[0])); + } + else + { + value = false; + } + } + else + { + // multiple values + var values = []; + for (var i = 0; i < self.checkboxOptions.length; i++) + { + var inputField = $(self.getFieldEl()).find("input[data-checkbox-index='" + i + "']"); + if (Alpaca.checked(inputField)) + { + var v = $(inputField).attr("data-checkbox-value"); + values.push(v); + } + } + + // determine how we're going to hand this value back + + // if type == "array", we just hand back the array + // if type == "string", we build a comma-delimited list + if (self.schema.type === "array") + { + value = values; + } + else if (self.schema.type === "string") + { + value = values.join(","); + } + } + + return value; + }, + isEmpty: function () { + var self = this; + var val = this.getControlValue(); + if (!self.options.multiple) { + return !val; + } + else { + if (self.schema.type === "array") { + return val.length == 0; + } + else if (self.schema.type === "string") { + return Alpaca.isEmpty(val); + } + } + }, + + /** + * @see Alpaca.Field#setValue + */ + setValue: function(value) + { + var self = this; + + // value can be a boolean, string ("true"), string ("a,b,c") or an array of values + + var applyScalarValue = function(value) + { + if (Alpaca.isString(value)) { + value = (value === "true"); + } + + var input = $(self.getFieldEl()).find("input"); + if (input.length > 0) + { + Alpaca.checked($(input[0]), value); + } + }; + + var applyMultiValue = function(values) + { + // allow for comma-delimited strings + if (typeof(values) === "string") + { + values = values.split(","); + } + + // trim things to remove any excess white space + for (var i = 0; i < values.length; i++) + { + values[i] = Alpaca.trim(values[i]); + } + + // walk through values and assign into appropriate inputs + Alpaca.checked($(self.getFieldEl()).find("input[data-checkbox-value]"), false); + for (var j = 0; j < values.length; j++) + { + var input = $(self.getFieldEl()).find("input[data-checkbox-value=\"" + values[j] + "\"]"); + if (input.length > 0) + { + Alpaca.checked($(input[0]), value); + } + } + }; + + var applied = false; + + if (!self.options.multiple) + { + // single value mode + + // boolean + if (typeof(value) === "boolean") + { + applyScalarValue(value); + applied = true; + } + else if (typeof(value) === "string") + { + applyScalarValue(value); + applied = true; + } + } + else + { + // multiple value mode + + if (typeof(value) === "string") + { + applyMultiValue(value); + applied = true; + } + else if (Alpaca.isArray(value)) + { + applyMultiValue(value); + applied = true; + } + } + + if (!applied && value) + { + Alpaca.logError("CheckboxField cannot set value for schema.type=" + self.schema.type + " and value=" + value); + } + + // be sure to call into base method + this.base(value); + }, + + /** + * Validate against enum property in the case that the checkbox field is in multiple mode. + * + * @returns {Boolean} True if the element value is part of the enum list, false otherwise. + */ + _validateEnum: function() + { + var self = this; + + if (!self.options.multiple) + { + return true; + } + + var val = self.getValue(); + if (!self.isRequired() && Alpaca.isValEmpty(val)) + { + return true; + } + + // if val is a string, convert to array + if (typeof(val) === "string") + { + val = val.split(","); + } + + return Alpaca.anyEquality(val, self.getEnum()); + }, + + /** + * @see Alpaca.Field#disable + */ + disable: function() + { + $(this.control).find("input").each(function() { + $(this).disabled = true; + $(this).prop("disabled", true); + }); + }, + + /** + * @see Alpaca.Field#enable + */ + enable: function() + { + $(this.control).find("input").each(function() { + $(this).disabled = false; + $(this).prop("disabled", false); + }); + }, + + /** + * @see Alpaca.Field#getType + */ + getType: function() { + return "boolean"; + }, + + + /* builder_helpers */ + + /** + * @see Alpaca.Field#getTitle + */ + getTitle: function() { + return "Checkbox Field"; + }, + + /** + * @see Alpaca.Field#getDescription + */ + getDescription: function() { + return "Checkbox Field for boolean (true/false), string ('true', 'false' or comma-delimited string of values) or data array."; + }, + + /** + * @private + * @see Alpaca.ControlField#getSchemaOfOptions + */ + getSchemaOfOptions: function() { + return Alpaca.merge(this.base(), { + "properties": { + "rightLabel": { + "title": "Option Label", + "description": "Optional right-hand side label for single checkbox field.", + "type": "string" + }, + "multiple": { + "title": "Multiple", + "description": "Whether to render multiple checkboxes for multi-valued type (such as an array or a comma-delimited string)", + "type": "boolean" + }, + "dataSource": { + "title": "Option DataSource", + "description": "Data source for generating list of options. This can be a string or a function. If a string, it is considered to be a URI to a service that produces a object containing key/value pairs or an array of elements of structure {'text': '', 'value': ''}. This can also be a function that is called to produce the same list.", + "type": "string" + }, + "useDataSourceAsEnum": { + "title": "Use Data Source as Enumerated Values", + "description": "Whether to constrain the field's schema enum property to the values that come back from the data source.", + "type": "boolean", + "default": true + } + } + }); + }, + + /** + * @private + * @see Alpaca.ControlField#getOptionsForOptions + */ + getOptionsForOptions: function() { + return Alpaca.merge(this.base(), { + "fields": { + "rightLabel": { + "type": "text" + }, + "multiple": { + "type": "checkbox" + }, + "dataSource": { + "type": "text" + } + } + }); + } + + /* end_builder_helpers */ + + }); + + Alpaca.registerFieldClass("checkbox", Alpaca.Fields.CheckBoxField); + Alpaca.registerDefaultSchemaFieldMapping("boolean", "checkbox"); + +})(jQuery); \ No newline at end of file diff --git a/OpenContent/alpaca/js/fields/dnn/SummernoteField.js b/OpenContent/alpaca/js/fields/dnn/SummernoteField.js index 0c20b11e..c4769921 100644 --- a/OpenContent/alpaca/js/fields/dnn/SummernoteField.js +++ b/OpenContent/alpaca/js/fields/dnn/SummernoteField.js @@ -29,7 +29,7 @@ height: null, minHeight: null, maxHeight: null, - focus: true + //focus: true }; } if ( this.options.placeholder) { diff --git a/OpenContent/alpaca/js/fields/dnn/dnnfields.js b/OpenContent/alpaca/js/fields/dnn/dnnfields.js index 679c94ae..bc377c8a 100644 --- a/OpenContent/alpaca/js/fields/dnn/dnnfields.js +++ b/OpenContent/alpaca/js/fields/dnn/dnnfields.js @@ -1134,6 +1134,560 @@ Alpaca.registerFieldClass("date", Alpaca.Fields.DateField); Alpaca.registerDefaultFormatFieldMapping("date", "date"); +})(jQuery); +(function($) { + + var Alpaca = $.alpaca; + + Alpaca.Fields.CheckBoxField = Alpaca.ControlField.extend( + /** + * @lends Alpaca.Fields.CheckBoxField.prototype + */ + { + /** + * @see Alpaca.Field#getFieldType + */ + getFieldType: function() { + return "checkbox"; + }, + + /** + * @see Alpaca.Field#setup + */ + setup: function() { + + var self = this; + + self.base(); + + if (typeof(self.options.multiple) == "undefined") + { + if (self.schema.type === "array") + { + self.options.multiple = true; + } + else if (typeof(self.schema["enum"]) !== "undefined") + { + self.options.multiple = true; + } + } + + if (self.options.multiple) + { + // multiple mode + + self.checkboxOptions = []; + + // if we have enum values, copy them into checkbox options + if (self.getEnum()) + { + // sort the enumerated values + self.sortEnum(); + + var optionLabels = self.getOptionLabels(); + + $.each(self.getEnum(), function (index, value) { + + var text = value; + if (optionLabels) + { + if (!Alpaca.isEmpty(optionLabels[index])) + { + text = optionLabels[index]; + } + else if (!Alpaca.isEmpty(optionLabels[value])) + { + text = optionLabels[value]; + } + } + + self.checkboxOptions.push({ + "value": value, + "text": text + }); + }); + } + + // if they provided "datasource", we copy to "dataSource" + if (self.options.datasource && !self.options.dataSource) { + self.options.dataSource = self.options.datasource; + delete self.options.datasource; + } + + // we optionally allow the data source return values to override the schema and options + if (typeof(self.options.useDataSourceAsEnum) === "undefined") + { + self.options.useDataSourceAsEnum = true; + } + } + else + { + // single mode + + if (!this.options.rightLabel) { + this.options.rightLabel = ""; + } + } + }, + + prepareControlModel: function(callback) + { + var self = this; + + this.base(function(model) { + + if (self.checkboxOptions) + { + model.checkboxOptions = self.checkboxOptions; + } + + callback(model); + }); + }, + + /** + * @OVERRIDE + */ + getEnum: function() + { + var values = this.base(); + if (!values) + { + if (this.schema && this.schema.items && this.schema.items.enum) + { + values = this.schema.items.enum; + } + } + + return values; + }, + + /** + * @OVERRIDE + */ + getOptionLabels: function() + { + var values = this.base(); + if (!values) + { + if (this.options && this.options.items && this.options.items.optionLabels) + { + values = this.options.items.optionLabels; + } + } + + return values; + }, + + /** + * Handler for the event that the checkbox is clicked. + * + * @param e Event. + */ + onClick: function(e) + { + this.refreshValidationState(); + }, + + /** + * @see Alpaca.ControlField#beforeRenderControl + */ + beforeRenderControl: function(model, callback) + { + var self = this; + + this.base(model, function() { + + if (self.options.dataSource) + { + // switch to multiple mode + self.options.multiple = true; + + if (!self.checkboxOptions) { + model.checkboxOptions = self.checkboxOptions = []; + } + + // clear the array + self.checkboxOptions.length = 0; + + self.invokeDataSource(self.checkboxOptions, model, function(err) { + + if (self.options.useDataSourceAsEnum) + { + // now build out the enum and optionLabels + var _enum = []; + var _optionLabels = []; + for (var i = 0; i < self.checkboxOptions.length; i++) + { + _enum.push(self.checkboxOptions[i].value); + _optionLabels.push(self.checkboxOptions[i].text); + } + + self.setEnum(_enum); + self.setOptionLabels(_optionLabels); + } + + callback(); + }); + } + else + { + callback(); + } + + }); + }, + + + /** + * @see Alpaca.ControlField#postRender + */ + postRender: function(callback) { + + var self = this; + + this.base(function() { + + // do this little trick so that if we have a default value, it gets set during first render + // this causes the checked state of the control to update + if (self.data && typeof(self.data) !== "undefined") + { + self.setValue(self.data); + } + + // for multiple mode, mark values + if (self.options.multiple) + { + // none checked + $(self.getFieldEl()).find("input:checkbox").prop("checked", false); + + if (self.data) + { + var dataArray = self.data; + if (typeof(self.data) === "string") + { + dataArray = self.data.split(","); + for (var a = 0; a < dataArray.length; a++) + { + dataArray[a] = $.trim(dataArray[a]); + } + } + + for (var k in dataArray) + { + $(self.getFieldEl()).find("input:checkbox[data-checkbox-value=\"" + dataArray[k] + "\"]").prop("checked", true); + } + } + } + + // single mode + + // whenever the state of one of our input:checkbox controls is changed (either via a click or programmatically), + // we signal to the top-level field to fire up a change + // + // this allows the dependency system to recalculate and such + // + $(self.getFieldEl()).find("input:checkbox").change(function(evt) { + self.triggerWithPropagation("change"); + }); + + callback(); + }); + }, + + /** + * @see Alpaca.Field#getValue + */ + getControlValue: function() + { + var self = this; + + var value = null; + + if (!self.options.multiple) + { + // single scalar value + var input = $(self.getFieldEl()).find("input"); + if (input.length > 0) + { + value = Alpaca.checked($(input[0])); + } + else + { + value = false; + } + } + else + { + // multiple values + var values = []; + for (var i = 0; i < self.checkboxOptions.length; i++) + { + var inputField = $(self.getFieldEl()).find("input[data-checkbox-index='" + i + "']"); + if (Alpaca.checked(inputField)) + { + var v = $(inputField).attr("data-checkbox-value"); + values.push(v); + } + } + + // determine how we're going to hand this value back + + // if type == "array", we just hand back the array + // if type == "string", we build a comma-delimited list + if (self.schema.type === "array") + { + value = values; + } + else if (self.schema.type === "string") + { + value = values.join(","); + } + } + + return value; + }, + isEmpty: function () { + var self = this; + var val = this.getControlValue(); + if (!self.options.multiple) { + return !val; + } + else { + if (self.schema.type === "array") { + return val.length == 0; + } + else if (self.schema.type === "string") { + return Alpaca.isEmpty(val); + } + } + }, + + /** + * @see Alpaca.Field#setValue + */ + setValue: function(value) + { + var self = this; + + // value can be a boolean, string ("true"), string ("a,b,c") or an array of values + + var applyScalarValue = function(value) + { + if (Alpaca.isString(value)) { + value = (value === "true"); + } + + var input = $(self.getFieldEl()).find("input"); + if (input.length > 0) + { + Alpaca.checked($(input[0]), value); + } + }; + + var applyMultiValue = function(values) + { + // allow for comma-delimited strings + if (typeof(values) === "string") + { + values = values.split(","); + } + + // trim things to remove any excess white space + for (var i = 0; i < values.length; i++) + { + values[i] = Alpaca.trim(values[i]); + } + + // walk through values and assign into appropriate inputs + Alpaca.checked($(self.getFieldEl()).find("input[data-checkbox-value]"), false); + for (var j = 0; j < values.length; j++) + { + var input = $(self.getFieldEl()).find("input[data-checkbox-value=\"" + values[j] + "\"]"); + if (input.length > 0) + { + Alpaca.checked($(input[0]), value); + } + } + }; + + var applied = false; + + if (!self.options.multiple) + { + // single value mode + + // boolean + if (typeof(value) === "boolean") + { + applyScalarValue(value); + applied = true; + } + else if (typeof(value) === "string") + { + applyScalarValue(value); + applied = true; + } + } + else + { + // multiple value mode + + if (typeof(value) === "string") + { + applyMultiValue(value); + applied = true; + } + else if (Alpaca.isArray(value)) + { + applyMultiValue(value); + applied = true; + } + } + + if (!applied && value) + { + Alpaca.logError("CheckboxField cannot set value for schema.type=" + self.schema.type + " and value=" + value); + } + + // be sure to call into base method + this.base(value); + }, + + /** + * Validate against enum property in the case that the checkbox field is in multiple mode. + * + * @returns {Boolean} True if the element value is part of the enum list, false otherwise. + */ + _validateEnum: function() + { + var self = this; + + if (!self.options.multiple) + { + return true; + } + + var val = self.getValue(); + if (!self.isRequired() && Alpaca.isValEmpty(val)) + { + return true; + } + + // if val is a string, convert to array + if (typeof(val) === "string") + { + val = val.split(","); + } + + return Alpaca.anyEquality(val, self.getEnum()); + }, + + /** + * @see Alpaca.Field#disable + */ + disable: function() + { + $(this.control).find("input").each(function() { + $(this).disabled = true; + $(this).prop("disabled", true); + }); + }, + + /** + * @see Alpaca.Field#enable + */ + enable: function() + { + $(this.control).find("input").each(function() { + $(this).disabled = false; + $(this).prop("disabled", false); + }); + }, + + /** + * @see Alpaca.Field#getType + */ + getType: function() { + return "boolean"; + }, + + + /* builder_helpers */ + + /** + * @see Alpaca.Field#getTitle + */ + getTitle: function() { + return "Checkbox Field"; + }, + + /** + * @see Alpaca.Field#getDescription + */ + getDescription: function() { + return "Checkbox Field for boolean (true/false), string ('true', 'false' or comma-delimited string of values) or data array."; + }, + + /** + * @private + * @see Alpaca.ControlField#getSchemaOfOptions + */ + getSchemaOfOptions: function() { + return Alpaca.merge(this.base(), { + "properties": { + "rightLabel": { + "title": "Option Label", + "description": "Optional right-hand side label for single checkbox field.", + "type": "string" + }, + "multiple": { + "title": "Multiple", + "description": "Whether to render multiple checkboxes for multi-valued type (such as an array or a comma-delimited string)", + "type": "boolean" + }, + "dataSource": { + "title": "Option DataSource", + "description": "Data source for generating list of options. This can be a string or a function. If a string, it is considered to be a URI to a service that produces a object containing key/value pairs or an array of elements of structure {'text': '', 'value': ''}. This can also be a function that is called to produce the same list.", + "type": "string" + }, + "useDataSourceAsEnum": { + "title": "Use Data Source as Enumerated Values", + "description": "Whether to constrain the field's schema enum property to the values that come back from the data source.", + "type": "boolean", + "default": true + } + } + }); + }, + + /** + * @private + * @see Alpaca.ControlField#getOptionsForOptions + */ + getOptionsForOptions: function() { + return Alpaca.merge(this.base(), { + "fields": { + "rightLabel": { + "type": "text" + }, + "multiple": { + "type": "checkbox" + }, + "dataSource": { + "type": "text" + } + } + }); + } + + /* end_builder_helpers */ + + }); + + Alpaca.registerFieldClass("checkbox", Alpaca.Fields.CheckBoxField); + Alpaca.registerDefaultSchemaFieldMapping("boolean", "checkbox"); + })(jQuery); (function ($) { @@ -11751,7 +12305,7 @@ height: null, minHeight: null, maxHeight: null, - focus: true + //focus: true }; } if ( this.options.placeholder) { diff --git a/OpenContent/alpaca/js/fields/dnn/dnnfields.min.js b/OpenContent/alpaca/js/fields/dnn/dnnfields.min.js index aec49310..7dea6684 100644 --- a/OpenContent/alpaca/js/fields/dnn/dnnfields.min.js +++ b/OpenContent/alpaca/js/fields/dnn/dnnfields.min.js @@ -1 +1 @@ -(function(n){function r(t,i){var r="";return t&&t.address_components&&n.each(t.address_components,function(t,u){n.each(u.types,function(n,t){if(t==i){r=u.long_name;return}});r!=""}),r}function u(t){var i="";return t&&t.address_components&&n.each(t.address_components,function(t,r){n.each(r.types,function(n,t){if(t=="country"){i=r.short_name;return}});i!=""}),i}function f(n){for(n=n.toUpperCase(),index=0;index<\/div>').appendTo(t),o=n('Geocode Address<\/a>').appendTo(t),o.button&&o.button({text:!0}),o.click(function(){if(google&&google.maps){var i=new google.maps.Geocoder,r=e.getAddress();i&&i.geocode({address:r},function(i,r){r===google.maps.GeocoderStatus.OK?(n(".alpaca-field.lng input.alpaca-control",t).val(i[0].geometry.location.lng()),n(".alpaca-field.lat input.alpaca-control",t).val(i[0].geometry.location.lat())):e.displayMessage("Geocoding failed: "+r)})}else e.displayMessage("Google Map API is not installed.");return!1}).wrap(""),s=n(".alpaca-field.googlesearch input.alpaca-control",t)[0],s&&typeof google!="undefined"&&google&&google.maps&&(h=new google.maps.places.SearchBox(s),google.maps.event.addListener(h,"places_changed",function(){var e=h.getPlaces(),i;e.length!=0&&(i=e[0],n(".alpaca-field.postalcode input.alpaca-control",t).val(r(i,"postal_code")),n(".alpaca-field.city input.alpaca-control",t).val(r(i,"locality")),n(".alpaca-field.street input.alpaca-control",t).val(r(i,"route")),n(".alpaca-field.number input.alpaca-control",t).val(r(i,"street_number")),n(".alpaca-field.country select.alpaca-control",t).val(f(u(i,"country"))),n(".alpaca-field.lng input.alpaca-control",t).val(i.geometry.location.lng()),n(".alpaca-field.lat input.alpaca-control",t).val(i.geometry.location.lat()),s.value="")}),google.maps.event.addDomListener(s,"keydown",function(n){n.keyCode==13&&n.preventDefault()})),e.options.showMapOnLoad&&o.click());i()})},getType:function(){return"any"},getTitle:function(){return"Address"},getDescription:function(){return"Address with Street, City, State, Postal code and Country. Also comes with support for Google map."},getSchemaOfOptions:function(){return i.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return i.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t=[{countryName:"Afghanistan",iso2:"AF",iso3:"AFG",phoneCode:"93"},{countryName:"Albania",iso2:"AL",iso3:"ALB",phoneCode:"355"},{countryName:"Algeria",iso2:"DZ",iso3:"DZA",phoneCode:"213"},{countryName:"American Samoa",iso2:"AS",iso3:"ASM",phoneCode:"1 684"},{countryName:"Andorra",iso2:"AD",iso3:"AND",phoneCode:"376"},{countryName:"Angola",iso2:"AO",iso3:"AGO",phoneCode:"244"},{countryName:"Anguilla",iso2:"AI",iso3:"AIA",phoneCode:"1 264"},{countryName:"Antarctica",iso2:"AQ",iso3:"ATA",phoneCode:"672"},{countryName:"Antigua and Barbuda",iso2:"AG",iso3:"ATG",phoneCode:"1 268"},{countryName:"Argentina",iso2:"AR",iso3:"ARG",phoneCode:"54"},{countryName:"Armenia",iso2:"AM",iso3:"ARM",phoneCode:"374"},{countryName:"Aruba",iso2:"AW",iso3:"ABW",phoneCode:"297"},{countryName:"Australia",iso2:"AU",iso3:"AUS",phoneCode:"61"},{countryName:"Austria",iso2:"AT",iso3:"AUT",phoneCode:"43"},{countryName:"Azerbaijan",iso2:"AZ",iso3:"AZE",phoneCode:"994"},{countryName:"Bahamas",iso2:"BS",iso3:"BHS",phoneCode:"1 242"},{countryName:"Bahrain",iso2:"BH",iso3:"BHR",phoneCode:"973"},{countryName:"Bangladesh",iso2:"BD",iso3:"BGD",phoneCode:"880"},{countryName:"Barbados",iso2:"BB",iso3:"BRB",phoneCode:"1 246"},{countryName:"Belarus",iso2:"BY",iso3:"BLR",phoneCode:"375"},{countryName:"Belgium",iso2:"BE",iso3:"BEL",phoneCode:"32"},{countryName:"Belize",iso2:"BZ",iso3:"BLZ",phoneCode:"501"},{countryName:"Benin",iso2:"BJ",iso3:"BEN",phoneCode:"229"},{countryName:"Bermuda",iso2:"BM",iso3:"BMU",phoneCode:"1 441"},{countryName:"Bhutan",iso2:"BT",iso3:"BTN",phoneCode:"975"},{countryName:"Bolivia",iso2:"BO",iso3:"BOL",phoneCode:"591"},{countryName:"Bosnia and Herzegovina",iso2:"BA",iso3:"BIH",phoneCode:"387"},{countryName:"Botswana",iso2:"BW",iso3:"BWA",phoneCode:"267"},{countryName:"Brazil",iso2:"BR",iso3:"BRA",phoneCode:"55"},{countryName:"British Indian Ocean Territory",iso2:"IO",iso3:"IOT",phoneCode:""},{countryName:"British Virgin Islands",iso2:"VG",iso3:"VGB",phoneCode:"1 284"},{countryName:"Brunei",iso2:"BN",iso3:"BRN",phoneCode:"673"},{countryName:"Bulgaria",iso2:"BG",iso3:"BGR",phoneCode:"359"},{countryName:"Burkina Faso",iso2:"BF",iso3:"BFA",phoneCode:"226"},{countryName:"Burma (Myanmar)",iso2:"MM",iso3:"MMR",phoneCode:"95"},{countryName:"Burundi",iso2:"BI",iso3:"BDI",phoneCode:"257"},{countryName:"Cambodia",iso2:"KH",iso3:"KHM",phoneCode:"855"},{countryName:"Cameroon",iso2:"CM",iso3:"CMR",phoneCode:"237"},{countryName:"Canada",iso2:"CA",iso3:"CAN",phoneCode:"1"},{countryName:"Cape Verde",iso2:"CV",iso3:"CPV",phoneCode:"238"},{countryName:"Cayman Islands",iso2:"KY",iso3:"CYM",phoneCode:"1 345"},{countryName:"Central African Republic",iso2:"CF",iso3:"CAF",phoneCode:"236"},{countryName:"Chad",iso2:"TD",iso3:"TCD",phoneCode:"235"},{countryName:"Chile",iso2:"CL",iso3:"CHL",phoneCode:"56"},{countryName:"China",iso2:"CN",iso3:"CHN",phoneCode:"86"},{countryName:"Christmas Island",iso2:"CX",iso3:"CXR",phoneCode:"61"},{countryName:"Cocos (Keeling) Islands",iso2:"CC",iso3:"CCK",phoneCode:"61"},{countryName:"Colombia",iso2:"CO",iso3:"COL",phoneCode:"57"},{countryName:"Comoros",iso2:"KM",iso3:"COM",phoneCode:"269"},{countryName:"Cook Islands",iso2:"CK",iso3:"COK",phoneCode:"682"},{countryName:"Costa Rica",iso2:"CR",iso3:"CRC",phoneCode:"506"},{countryName:"Croatia",iso2:"HR",iso3:"HRV",phoneCode:"385"},{countryName:"Cuba",iso2:"CU",iso3:"CUB",phoneCode:"53"},{countryName:"Cyprus",iso2:"CY",iso3:"CYP",phoneCode:"357"},{countryName:"Czech Republic",iso2:"CZ",iso3:"CZE",phoneCode:"420"},{countryName:"Democratic Republic of the Congo",iso2:"CD",iso3:"COD",phoneCode:"243"},{countryName:"Denmark",iso2:"DK",iso3:"DNK",phoneCode:"45"},{countryName:"Djibouti",iso2:"DJ",iso3:"DJI",phoneCode:"253"},{countryName:"Dominica",iso2:"DM",iso3:"DMA",phoneCode:"1 767"},{countryName:"Dominican Republic",iso2:"DO",iso3:"DOM",phoneCode:"1 809"},{countryName:"Ecuador",iso2:"EC",iso3:"ECU",phoneCode:"593"},{countryName:"Egypt",iso2:"EG",iso3:"EGY",phoneCode:"20"},{countryName:"El Salvador",iso2:"SV",iso3:"SLV",phoneCode:"503"},{countryName:"Equatorial Guinea",iso2:"GQ",iso3:"GNQ",phoneCode:"240"},{countryName:"Eritrea",iso2:"ER",iso3:"ERI",phoneCode:"291"},{countryName:"Estonia",iso2:"EE",iso3:"EST",phoneCode:"372"},{countryName:"Ethiopia",iso2:"ET",iso3:"ETH",phoneCode:"251"},{countryName:"Falkland Islands",iso2:"FK",iso3:"FLK",phoneCode:"500"},{countryName:"Faroe Islands",iso2:"FO",iso3:"FRO",phoneCode:"298"},{countryName:"Fiji",iso2:"FJ",iso3:"FJI",phoneCode:"679"},{countryName:"Finland",iso2:"FI",iso3:"FIN",phoneCode:"358"},{countryName:"France",iso2:"FR",iso3:"FRA",phoneCode:"33"},{countryName:"French Polynesia",iso2:"PF",iso3:"PYF",phoneCode:"689"},{countryName:"Gabon",iso2:"GA",iso3:"GAB",phoneCode:"241"},{countryName:"Gambia",iso2:"GM",iso3:"GMB",phoneCode:"220"},{countryName:"Gaza Strip",iso2:"",iso3:"",phoneCode:"970"},{countryName:"Georgia",iso2:"GE",iso3:"GEO",phoneCode:"995"},{countryName:"Germany",iso2:"DE",iso3:"DEU",phoneCode:"49"},{countryName:"Ghana",iso2:"GH",iso3:"GHA",phoneCode:"233"},{countryName:"Gibraltar",iso2:"GI",iso3:"GIB",phoneCode:"350"},{countryName:"Greece",iso2:"GR",iso3:"GRC",phoneCode:"30"},{countryName:"Greenland",iso2:"GL",iso3:"GRL",phoneCode:"299"},{countryName:"Grenada",iso2:"GD",iso3:"GRD",phoneCode:"1 473"},{countryName:"Guam",iso2:"GU",iso3:"GUM",phoneCode:"1 671"},{countryName:"Guatemala",iso2:"GT",iso3:"GTM",phoneCode:"502"},{countryName:"Guinea",iso2:"GN",iso3:"GIN",phoneCode:"224"},{countryName:"Guinea-Bissau",iso2:"GW",iso3:"GNB",phoneCode:"245"},{countryName:"Guyana",iso2:"GY",iso3:"GUY",phoneCode:"592"},{countryName:"Haiti",iso2:"HT",iso3:"HTI",phoneCode:"509"},{countryName:"Holy See (Vatican City)",iso2:"VA",iso3:"VAT",phoneCode:"39"},{countryName:"Honduras",iso2:"HN",iso3:"HND",phoneCode:"504"},{countryName:"Hong Kong",iso2:"HK",iso3:"HKG",phoneCode:"852"},{countryName:"Hungary",iso2:"HU",iso3:"HUN",phoneCode:"36"},{countryName:"Iceland",iso2:"IS",iso3:"IS",phoneCode:"354"},{countryName:"India",iso2:"IN",iso3:"IND",phoneCode:"91"},{countryName:"Indonesia",iso2:"ID",iso3:"IDN",phoneCode:"62"},{countryName:"Iran",iso2:"IR",iso3:"IRN",phoneCode:"98"},{countryName:"Iraq",iso2:"IQ",iso3:"IRQ",phoneCode:"964"},{countryName:"Ireland",iso2:"IE",iso3:"IRL",phoneCode:"353"},{countryName:"Isle of Man",iso2:"IM",iso3:"IMN",phoneCode:"44"},{countryName:"Israel",iso2:"IL",iso3:"ISR",phoneCode:"972"},{countryName:"Italy",iso2:"IT",iso3:"ITA",phoneCode:"39"},{countryName:"Ivory Coast",iso2:"CI",iso3:"CIV",phoneCode:"225"},{countryName:"Jamaica",iso2:"JM",iso3:"JAM",phoneCode:"1 876"},{countryName:"Japan",iso2:"JP",iso3:"JPN",phoneCode:"81"},{countryName:"Jersey",iso2:"JE",iso3:"JEY",phoneCode:""},{countryName:"Jordan",iso2:"JO",iso3:"JOR",phoneCode:"962"},{countryName:"Kazakhstan",iso2:"KZ",iso3:"KAZ",phoneCode:"7"},{countryName:"Kenya",iso2:"KE",iso3:"KEN",phoneCode:"254"},{countryName:"Kiribati",iso2:"KI",iso3:"KIR",phoneCode:"686"},{countryName:"Kosovo",iso2:"",iso3:"",phoneCode:"381"},{countryName:"Kuwait",iso2:"KW",iso3:"KWT",phoneCode:"965"},{countryName:"Kyrgyzstan",iso2:"KG",iso3:"KGZ",phoneCode:"996"},{countryName:"Laos",iso2:"LA",iso3:"LAO",phoneCode:"856"},{countryName:"Latvia",iso2:"LV",iso3:"LVA",phoneCode:"371"},{countryName:"Lebanon",iso2:"LB",iso3:"LBN",phoneCode:"961"},{countryName:"Lesotho",iso2:"LS",iso3:"LSO",phoneCode:"266"},{countryName:"Liberia",iso2:"LR",iso3:"LBR",phoneCode:"231"},{countryName:"Libya",iso2:"LY",iso3:"LBY",phoneCode:"218"},{countryName:"Liechtenstein",iso2:"LI",iso3:"LIE",phoneCode:"423"},{countryName:"Lithuania",iso2:"LT",iso3:"LTU",phoneCode:"370"},{countryName:"Luxembourg",iso2:"LU",iso3:"LUX",phoneCode:"352"},{countryName:"Macau",iso2:"MO",iso3:"MAC",phoneCode:"853"},{countryName:"Macedonia",iso2:"MK",iso3:"MKD",phoneCode:"389"},{countryName:"Madagascar",iso2:"MG",iso3:"MDG",phoneCode:"261"},{countryName:"Malawi",iso2:"MW",iso3:"MWI",phoneCode:"265"},{countryName:"Malaysia",iso2:"MY",iso3:"MYS",phoneCode:"60"},{countryName:"Maldives",iso2:"MV",iso3:"MDV",phoneCode:"960"},{countryName:"Mali",iso2:"ML",iso3:"MLI",phoneCode:"223"},{countryName:"Malta",iso2:"MT",iso3:"MLT",phoneCode:"356"},{countryName:"Marshall Islands",iso2:"MH",iso3:"MHL",phoneCode:"692"},{countryName:"Mauritania",iso2:"MR",iso3:"MRT",phoneCode:"222"},{countryName:"Mauritius",iso2:"MU",iso3:"MUS",phoneCode:"230"},{countryName:"Mayotte",iso2:"YT",iso3:"MYT",phoneCode:"262"},{countryName:"Mexico",iso2:"MX",iso3:"MEX",phoneCode:"52"},{countryName:"Micronesia",iso2:"FM",iso3:"FSM",phoneCode:"691"},{countryName:"Moldova",iso2:"MD",iso3:"MDA",phoneCode:"373"},{countryName:"Monaco",iso2:"MC",iso3:"MCO",phoneCode:"377"},{countryName:"Mongolia",iso2:"MN",iso3:"MNG",phoneCode:"976"},{countryName:"Montenegro",iso2:"ME",iso3:"MNE",phoneCode:"382"},{countryName:"Montserrat",iso2:"MS",iso3:"MSR",phoneCode:"1 664"},{countryName:"Morocco",iso2:"MA",iso3:"MAR",phoneCode:"212"},{countryName:"Mozambique",iso2:"MZ",iso3:"MOZ",phoneCode:"258"},{countryName:"Namibia",iso2:"NA",iso3:"NAM",phoneCode:"264"},{countryName:"Nauru",iso2:"NR",iso3:"NRU",phoneCode:"674"},{countryName:"Nepal",iso2:"NP",iso3:"NPL",phoneCode:"977"},{countryName:"Netherlands",iso2:"NL",iso3:"NLD",phoneCode:"31"},{countryName:"Netherlands Antilles",iso2:"AN",iso3:"ANT",phoneCode:"599"},{countryName:"New Caledonia",iso2:"NC",iso3:"NCL",phoneCode:"687"},{countryName:"New Zealand",iso2:"NZ",iso3:"NZL",phoneCode:"64"},{countryName:"Nicaragua",iso2:"NI",iso3:"NIC",phoneCode:"505"},{countryName:"Niger",iso2:"NE",iso3:"NER",phoneCode:"227"},{countryName:"Nigeria",iso2:"NG",iso3:"NGA",phoneCode:"234"},{countryName:"Niue",iso2:"NU",iso3:"NIU",phoneCode:"683"},{countryName:"Norfolk Island",iso2:"",iso3:"NFK",phoneCode:"672"},{countryName:"North Korea",iso2:"KP",iso3:"PRK",phoneCode:"850"},{countryName:"Northern Mariana Islands",iso2:"MP",iso3:"MNP",phoneCode:"1 670"},{countryName:"Norway",iso2:"NO",iso3:"NOR",phoneCode:"47"},{countryName:"Oman",iso2:"OM",iso3:"OMN",phoneCode:"968"},{countryName:"Pakistan",iso2:"PK",iso3:"PAK",phoneCode:"92"},{countryName:"Palau",iso2:"PW",iso3:"PLW",phoneCode:"680"},{countryName:"Panama",iso2:"PA",iso3:"PAN",phoneCode:"507"},{countryName:"Papua New Guinea",iso2:"PG",iso3:"PNG",phoneCode:"675"},{countryName:"Paraguay",iso2:"PY",iso3:"PRY",phoneCode:"595"},{countryName:"Peru",iso2:"PE",iso3:"PER",phoneCode:"51"},{countryName:"Philippines",iso2:"PH",iso3:"PHL",phoneCode:"63"},{countryName:"Pitcairn Islands",iso2:"PN",iso3:"PCN",phoneCode:"870"},{countryName:"Poland",iso2:"PL",iso3:"POL",phoneCode:"48"},{countryName:"Portugal",iso2:"PT",iso3:"PRT",phoneCode:"351"},{countryName:"Puerto Rico",iso2:"PR",iso3:"PRI",phoneCode:"1"},{countryName:"Qatar",iso2:"QA",iso3:"QAT",phoneCode:"974"},{countryName:"Republic of the Congo",iso2:"CG",iso3:"COG",phoneCode:"242"},{countryName:"Romania",iso2:"RO",iso3:"ROU",phoneCode:"40"},{countryName:"Russia",iso2:"RU",iso3:"RUS",phoneCode:"7"},{countryName:"Rwanda",iso2:"RW",iso3:"RWA",phoneCode:"250"},{countryName:"Saint Barthelemy",iso2:"BL",iso3:"BLM",phoneCode:"590"},{countryName:"Saint Helena",iso2:"SH",iso3:"SHN",phoneCode:"290"},{countryName:"Saint Kitts and Nevis",iso2:"KN",iso3:"KNA",phoneCode:"1 869"},{countryName:"Saint Lucia",iso2:"LC",iso3:"LCA",phoneCode:"1 758"},{countryName:"Saint Martin",iso2:"MF",iso3:"MAF",phoneCode:"1 599"},{countryName:"Saint Pierre and Miquelon",iso2:"PM",iso3:"SPM",phoneCode:"508"},{countryName:"Saint Vincent and the Grenadines",iso2:"VC",iso3:"VCT",phoneCode:"1 784"},{countryName:"Samoa",iso2:"WS",iso3:"WSM",phoneCode:"685"},{countryName:"San Marino",iso2:"SM",iso3:"SMR",phoneCode:"378"},{countryName:"Sao Tome and Principe",iso2:"ST",iso3:"STP",phoneCode:"239"},{countryName:"Saudi Arabia",iso2:"SA",iso3:"SAU",phoneCode:"966"},{countryName:"Senegal",iso2:"SN",iso3:"SEN",phoneCode:"221"},{countryName:"Serbia",iso2:"RS",iso3:"SRB",phoneCode:"381"},{countryName:"Seychelles",iso2:"SC",iso3:"SYC",phoneCode:"248"},{countryName:"Sierra Leone",iso2:"SL",iso3:"SLE",phoneCode:"232"},{countryName:"Singapore",iso2:"SG",iso3:"SGP",phoneCode:"65"},{countryName:"Slovakia",iso2:"SK",iso3:"SVK",phoneCode:"421"},{countryName:"Slovenia",iso2:"SI",iso3:"SVN",phoneCode:"386"},{countryName:"Solomon Islands",iso2:"SB",iso3:"SLB",phoneCode:"677"},{countryName:"Somalia",iso2:"SO",iso3:"SOM",phoneCode:"252"},{countryName:"South Africa",iso2:"ZA",iso3:"ZAF",phoneCode:"27"},{countryName:"South Korea",iso2:"KR",iso3:"KOR",phoneCode:"82"},{countryName:"Spain",iso2:"ES",iso3:"ESP",phoneCode:"34"},{countryName:"Sri Lanka",iso2:"LK",iso3:"LKA",phoneCode:"94"},{countryName:"Sudan",iso2:"SD",iso3:"SDN",phoneCode:"249"},{countryName:"Suriname",iso2:"SR",iso3:"SUR",phoneCode:"597"},{countryName:"Svalbard",iso2:"SJ",iso3:"SJM",phoneCode:""},{countryName:"Swaziland",iso2:"SZ",iso3:"SWZ",phoneCode:"268"},{countryName:"Sweden",iso2:"SE",iso3:"SWE",phoneCode:"46"},{countryName:"Switzerland",iso2:"CH",iso3:"CHE",phoneCode:"41"},{countryName:"Syria",iso2:"SY",iso3:"SYR",phoneCode:"963"},{countryName:"Taiwan",iso2:"TW",iso3:"TWN",phoneCode:"886"},{countryName:"Tajikistan",iso2:"TJ",iso3:"TJK",phoneCode:"992"},{countryName:"Tanzania",iso2:"TZ",iso3:"TZA",phoneCode:"255"},{countryName:"Thailand",iso2:"TH",iso3:"THA",phoneCode:"66"},{countryName:"Timor-Leste",iso2:"TL",iso3:"TLS",phoneCode:"670"},{countryName:"Togo",iso2:"TG",iso3:"TGO",phoneCode:"228"},{countryName:"Tokelau",iso2:"TK",iso3:"TKL",phoneCode:"690"},{countryName:"Tonga",iso2:"TO",iso3:"TON",phoneCode:"676"},{countryName:"Trinidad and Tobago",iso2:"TT",iso3:"TTO",phoneCode:"1 868"},{countryName:"Tunisia",iso2:"TN",iso3:"TUN",phoneCode:"216"},{countryName:"Turkey",iso2:"TR",iso3:"TUR",phoneCode:"90"},{countryName:"Turkmenistan",iso2:"TM",iso3:"TKM",phoneCode:"993"},{countryName:"Turks and Caicos Islands",iso2:"TC",iso3:"TCA",phoneCode:"1 649"},{countryName:"Tuvalu",iso2:"TV",iso3:"TUV",phoneCode:"688"},{countryName:"Uganda",iso2:"UG",iso3:"UGA",phoneCode:"256"},{countryName:"Ukraine",iso2:"UA",iso3:"UKR",phoneCode:"380"},{countryName:"United Arab Emirates",iso2:"AE",iso3:"ARE",phoneCode:"971"},{countryName:"United Kingdom",iso2:"GB",iso3:"GBR",phoneCode:"44"},{countryName:"United States",iso2:"US",iso3:"USA",phoneCode:"1"},{countryName:"Uruguay",iso2:"UY",iso3:"URY",phoneCode:"598"},{countryName:"US Virgin Islands",iso2:"VI",iso3:"VIR",phoneCode:"1 340"},{countryName:"Uzbekistan",iso2:"UZ",iso3:"UZB",phoneCode:"998"},{countryName:"Vanuatu",iso2:"VU",iso3:"VUT",phoneCode:"678"},{countryName:"Venezuela",iso2:"VE",iso3:"VEN",phoneCode:"58"},{countryName:"Vietnam",iso2:"VN",iso3:"VNM",phoneCode:"84"},{countryName:"Wallis and Futuna",iso2:"WF",iso3:"WLF",phoneCode:"681"},{countryName:"West Bank",iso2:"",iso3:"",phoneCode:"970"},{countryName:"Western Sahara",iso2:"EH",iso3:"ESH",phoneCode:""},{countryName:"Yemen",iso2:"YE",iso3:"YEM",phoneCode:"967"},{countryName:"Zambia",iso2:"ZM",iso3:"ZMB",phoneCode:"260"},{countryName:"Zimbabwe",iso2:"ZW",iso3:"ZWE",phoneCode:"263"}];i.registerFieldClass("address",i.Fields.AddressField)})(jQuery),function(n){var t=n.alpaca;t.Fields.CKEditorField=t.Fields.TextAreaField.extend({getFieldType:function(){return"ckeditor"},setup:function(){this.data||(this.data="");this.base();typeof this.options.ckeditor=="undefined"&&(this.options.ckeditor={});typeof this.options.configset=="undefined"&&(this.options.configset="")},afterRenderControl:function(t,i){var r=this;this.base(t,function(){var t,u;if(!r.isDisplayOnly()&&r.control&&typeof CKEDITOR!="undefined"){t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink"]},{name:"document",groups:["mode","document","doctools"],items:["Source"]},],format_tags:"p;h1;h2;h3;pre",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]};r.options.configset=="basic"?t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink"]},{name:"document",groups:["mode","document","doctools"],items:["Maximize","Source"]},],format_tags:"p;h1;h2;h3;pre",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]}:r.options.configset=="standard"?t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Table","Smiley","SpecialChar","Iframe"]},{name:"document",groups:["mode","document","doctools"],items:["Maximize","ShowBlocks","Source"]}],format_tags:"p;h1;h2;h3;pre;div",extraAllowedContent:"table tr th td caption[*](*);div span(*);",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]}:r.options.configset=="full"&&(t={toolbar:[{name:"document",items:["Save","NewPage","DocProps","Preview","Print","-","Templates"]},{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"editing",items:["Find","Replace","-","SelectAll","-","SpellChecker","Scayt"]},{name:"forms",items:["Form","Checkbox","Radio","TextField","Textarea","Select","Button","ImageButton","HiddenField"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote","CreateDiv","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Flash","Table","HorizontalRule","Smiley","SpecialChar","PageBreak","Iframe"]},"/",{name:"styles",items:["Styles","Format","Font","FontSize"]},{name:"colors",items:["TextColor","BGColor"]},{name:"tools",items:["Maximize","ShowBlocks","-","About","-","Source"]}],format_tags:"p;h1;h2;h3;pre;div",allowedContentRules:!0,removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]});u=n.extend({},t,r.options.ckeditor);r.on("ready",function(){r.editor||(r.editor=CKEDITOR.replace(n(r.control)[0],u),r.initCKEditorEvents())})}n(r.control).bind("destroyed",function(){if(r.editor){r.editor.removeAllListeners();try{r.editor.destroy(!1)}catch(n){}r.editor=null}});i()})},initCKEditorEvents:function(){var n=this;if(n.editor){n.editor.on("click",function(t){n.onClick.call(n,t);n.trigger("click",t)});n.editor.on("change",function(t){n.onChange();n.triggerWithPropagation("change",t)});n.editor.on("blur",function(t){n.onBlur();n.trigger("blur",t)});n.editor.on("focus",function(t){n.onFocus.call(n,t);n.trigger("focus",t)});n.editor.on("key",function(t){n.onKeyPress.call(n,t);n.trigger("keypress",t)})}},setValue:function(n){var t=this;this.base(n);t.editor&&t.editor.setData(n)},getControlValue:function(){var n=this,t=null;return n.editor&&(t=n.editor.getData()),t},destroy:function(){var n=this;n.editor&&(n.editor.destroy(),n.editor=null);this.base()},getTitle:function(){return"CK Editor"},getDescription:function(){return"Provides an instance of a CK Editor control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{ckeditor:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{ckeditor:{type:"any"}}})}});t.registerFieldClass("ckeditor",t.Fields.CKEditorField)}(jQuery),function(n){var t=n.alpaca;t.Fields.DateField=t.Fields.TextField.extend({getFieldType:function(){return"date"},getDefaultFormat:function(){return"MM/DD/YYYY"},getDefaultExtraFormats:function(){return[]},setup:function(){var n=this,t;this.base();n.options.picker||(n.options.picker={});typeof n.options.picker.useCurrent=="undefined"&&(n.options.picker.useCurrent=!1);!n.options.dateFormat;n.options.picker.format||(n.options.picker.format=n.options.dateFormat);n.options.picker.extraFormats||(t=n.getDefaultExtraFormats(),t&&(n.options.picker.extraFormats=t));typeof n.options.manualEntry=="undefined"&&(n.options.manualEntry=!1);typeof n.options.icon=="undefined"&&(n.options.icon=!1)},onKeyPress:function(n){if(this.options.manualEntry)n.preventDefault(),n.stopImmediatePropagation();else{this.base(n);return}},onKeyDown:function(n){if(this.options.manualEntry)n.preventDefault(),n.stopImmediatePropagation();else{this.base(n);return}},beforeRenderControl:function(n,t){this.field.css("position","relative");t()},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(r.view.type!=="display"){if(t=r.getControlEl(),r.options.icon){r.getControlEl().wrap('
<\/div>');r.getControlEl().after('<\/span><\/span>');var t=r.getControlEl().parent()}if(n.fn.datetimepicker){t.datetimepicker(r.options.picker);r.picker=t.data("DateTimePicker");t.on("dp.change",function(n){setTimeout(function(){r.onChange.call(r,n);r.triggerWithPropagation("change",n)},250)});r.data&&r.picker.date(r.data)}}i()})},getDate:function(){var n=this,t=null;try{t=n.picker?n.picker.date()?n.picker.date()._d:null:new Date(this.getValue())}catch(i){console.error(i)}return t},date:function(){return this.getDate()},onChange:function(){this.base();this.refreshValidationState()},isAutoFocusable:function(){return!1},handleValidate:function(){var r=this.base(),n=this.validation,i=this._validateDateFormat();return n.invalidDate={message:i?"":t.substituteTokens(this.getMessage("invalidDate"),[this.options.dateFormat]),status:i},r&&n.invalidDate.status},_validateDateFormat:function(){var n=this,r=!0,u,i,t;if(n.options.dateFormat&&(u=n.getValue(),u||n.isRequired())){if(i=[],i.push(n.options.dateFormat),n.options.picker&&n.options.picker.extraFormats)for(t=0;tBootstrap DateTime Picker<\/a>.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{dateFormat:{type:"text"},picker:{type:"any"}}})}});t.registerMessages({invalidDate:"Invalid date for format {0}"});t.registerFieldClass("date",t.Fields.DateField);t.registerDefaultFormatFieldMapping("date","date")}(jQuery),function(n){var t=n.alpaca;t.Fields.MultiUploadField=t.Fields.ArrayField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.itemsCount=0},setup:function(){var t,n;if(this.base(),this.options.uploadfolder||(this.options.uploadfolder=""),this.urlfield="",this.options&&this.options.items&&(this.options.items.fields||this.options.items.type)&&this.options.items.type!="image"&&this.options.items.fields)for(t in this.options.items.fields)if(n=this.options.items.fields[t],n.type=="image"||n.type=="mlimage"||n.type=="imagecrop"){this.urlfield=t;this.options.uploadfolder=n.uploadfolder;break}else if(n.type=="file"||n.type=="mlfile"){this.urlfield=t;this.options.uploadfolder=n.uploadfolder;break}else if(n.type=="image2"||n.type=="mlimage2"){this.urlfield=t;this.options.uploadfolder=n.folder;break}else if(n.type=="file2"||n.type=="mlfile2"){this.urlfield=t;this.options.uploadfolder=n.folder;break}},afterRenderContainer:function(t,i){var r=this;this.base(t,function(){var t=r.getContainerEl(),f,u;r.isDisplayOnly()||(n('
<\/div>').prependTo(t),f=n('
<\/div><\/div>').prependTo(t),u=n('').prependTo(t),this.wrapper=n("<\/span>"),this.wrapper.text("Upload muliple files"),u.wrap(this.wrapper),r.sf&&u.fileupload({dataType:"json",url:r.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:r.options.uploadfolder},beforeSend:r.sf.setModuleHeaders,change:function(){r.itemsCount=r.children.length},add:function(n,t){t.submit()},progressall:function(t,i){var r=parseInt(i.loaded/i.total*100,10);n(".bar",f).css("width",r+"%").find("span").html(r+"%")},done:function(t,i){i.result&&n.each(i.result,function(n,t){r.handleActionBarAddItemClick(r.itemsCount-1,function(n){var i=n.getValue();r.urlfield==""?i=t.url:i[r.urlfield]=t.url;n.setValue(i)});r.itemsCount++})}}).data("loaded",!0));i()})},getTitle:function(){return"Multi Upload"},getDescription:function(){return"Multi Upload for images and files"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("multiupload",t.Fields.MultiUploadField)}(jQuery),function(n){var t=n.alpaca;t.Fields.DocumentsField=t.Fields.MultiUploadField.extend({setup:function(){this.base();this.schema.items={type:"object",properties:{Title:{title:"Title",type:"string"},File:{title:"File",type:"string"}}};t.merge(this.options.items,{fields:{File:{type:"file"}}});this.urlfield="File"},getTitle:function(){return"Gallery"},getDescription:function(){return"Image Gallery"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("documents",t.Fields.DocumentsField)}(jQuery),function(n){var t=n.alpaca;t.Fields.File2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"file2"},setup:function(){var n=this,t;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.filter||(this.options.filter="");this.options.showUrlUpload||(this.options.showUrlUpload=!1);this.options.showFileUpload||(this.options.showFileUpload=!1);this.options.showUrlUpload&&(this.options.buttons={downloadButton:{value:"Upload External File",click:function(){this.DownLoadFile()}}});n=this;this.options.lazyLoading&&(t=10,this.options.select2={ajax:{url:this.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FilesLookup",beforeSend:this.sf.setModuleHeaders,type:"get",dataType:"json",delay:250,data:function(i){return{q:i.term?i.term:"*",d:n.options.folder,filter:n.options.filter,pageIndex:i.page?i.page:1,pageSize:t}},processResults:function(i,r){return r.page=r.page||1,r.page==1&&i.items.unshift({id:"",text:n.options.noneLabel}),{results:i.items,pagination:{more:r.page*t0){if(i=n(this.control).find("select").val(),typeof i=="undefined")i=this.data;else if(t.isArray(i))for(r=0;r0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(t.loading)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n("select",u.getControlEl()).select2(i)}u.options.uploadhidden?n(u.getControlEl()).find("input[type=file]").hide():u.sf&&n(u.getControlEl()).find("input[type=file]").fileupload({dataType:"json",url:u.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:u.options.folder},beforeSend:u.sf.setModuleHeaders,add:function(n,t){if(t&&t.files&&t.files.length>0)if(u.isFilter(t.files[0].name))t.submit();else{alert("file not in filter");return}},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){$select=n(u.control).find("select");u.options.lazyLoading?u.getFileUrl(i.id,function(n){$select.find("option").first().val(n.id).text(n.text).removeData();$select.val(i.id).change()}):u.refresh(function(){$select=n(u.control).find("select");$select.val(i.id).change()})})}}).data("loaded",!0);r()})},getFileUrl:function(t,i){var r=this,u;r.sf&&(u={fileid:t,folder:r.options.folder},n.ajax({url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileInfo",beforeSend:r.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:u,success:function(n){i&&i(n)},error:function(){alert("Error getFileUrl "+t)}}))},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(){}),r):!0:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTextControlEl:function(){var t=this;return n(t.getControlEl()).find("input[type=text]")},DownLoadFile:function(){var t=this,u=this.getTextControlEl(),i=u.val(),r;if(!i||!t.isURL(i)){alert("url not valid");return}if(!t.isFilter(i)){alert("url not in filter");return}r={url:i,uploadfolder:t.options.folder};n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/DownloadFile",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){i.error?alert(i.error):($select=n(t.control).find("select"),t.options.lazyLoading?t.getFileUrl(i.id,function(n){$select.find("option").first().val(n.id).text(n.text).removeData();$select.val(i.id).change()}):t.refresh(function(){$select=n(t.control).find("select");$select.val(i.id).change()}));setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},isURL:function(n){var t=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i");return n.length<2083&&t.test(n)},isFilter:function(n){if(this.options.filter){var t=new RegExp(this.options.filter,"i");return n.length<2083&&t.test(n)}return!0},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("file2",t.Fields.File2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.FileField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"file"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.downloadButton||(this.options.downloadButton=!1);this.options.downloadButton&&(this.options.buttons={downloadButton:{value:"Download",click:function(){this.DownLoadFile()}}});this.base()},getTitle:function(){return"File Field"},getDescription:function(){return"File Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?i.val(""):i.val(n));this.updateMaxLengthIndicator()},getValue:function(){var t=null,n=this.getTextControlEl();return n&&n.length>0&&(t=n.val()),t},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl();i.sf&&n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,u){u.result&&n.each(u.result,function(t,u){i.setValue(u.url);n(r).change()})}}).data("loaded",!0);t()},applyTypeAhead:function(){var r=this,o,i,s,f,e,h,c,l,u;if(r.control.typeahead&&r.options.typeahead&&!t.isEmpty(r.options.typeahead)&&r.sf){if(o=r.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=r.getId()),s=r.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Files?q=%QUERY&d="+s,ajax:{beforeSend:r.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"{{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));u=this.getTextControlEl();n(u).typeahead(o,i);n(u).on("typeahead:autocompleted",function(t,i){r.setValue(i.value);n(u).change()});n(u).on("typeahead:selected",function(t,i){r.setValue(i.value);n(u).change()});if(f){if(f.autocompleted)n(u).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(u).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(u).change(function(){var t=n(this).val(),i=n(u).typeahead("val");i!==t&&n(u).typeahead("val",t)});n(r.field).find("span.twitter-typeahead").first().css("display","block");n(r.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}},DownLoadFile:function(){var t=this,u=this.getTextControlEl(),i=t.getValue(),f=new RegExp("^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|(www‌​.)?){1}([0-9A-Za-z-‌​\\.@:%_+~#=]+)+((\\‌​.[a-zA-Z]{2,3})+)(/(‌​.)*)?(\\?(.)*)?"),r;if(!i||!t.isURL(i)){alert("url not valid");return}r={url:i,uploadfolder:t.options.uploadfolder};n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/DownloadFile",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){i.error?alert(i.error):(t.setValue(i.url),n(u).change());setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},isURL:function(n){var t=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i");return n.length<2083&&t.test(n)}});t.registerFieldClass("file",t.Fields.FileField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Folder2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.filter||(this.options.filter="");this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getFileUrl:function(t){var i={fileid:t};n.ajax({url:self.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:self.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:i,success:function(n){return n},error:function(){return""}})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("folder2",t.Fields.Folder2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.GalleryField=t.Fields.MultiUploadField.extend({setup:function(){this.base();this.schema.items={type:"object",properties:{Image:{title:"Image",type:"string"}}};t.merge(this.options.items,{fields:{Image:{type:"image"}}});this.urlfield="Image"},getTitle:function(){return"Gallery"},getDescription:function(){return"Image Gallery"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("gallery",t.Fields.GalleryField)}(jQuery),function(n){var t=n.alpaca;t.Fields.GuidField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f)},setup:function(){var n=this;this.base()},setValue:function(n){t.isEmpty(n)&&(n=this.createGuid());this.base(n)},getValue:function(){var n=this.base();return(t.isEmpty(n)||n=="")&&(n=this.createGuid()),n},createGuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n==="x"?t:t&3|8;return i.toString(16)})},getTitle:function(){return"Guid Field"},getDescription:function(){return"Guid field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("guid",t.Fields.GuidField)}(jQuery),function(n){var t=n.alpaca;t.Fields.IconField=t.Fields.TextField.extend({setup:function(){this.options.glyphicons===undefined&&(this.options.glyphicons=!1);this.options.bootstrap===undefined&&(this.options.bootstrap=!1);this.options.fontawesome===undefined&&(this.options.fontawesome=!0);this.base()},setValue:function(n){this.base(n);this.loadIcons()},getTitle:function(){return"Icon Field"},getDescription:function(){return"Font Icon Field."},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(n){var t=this,i=this.control;this.control.fontIconPicker({emptyIcon:!0,hasSearch:!0});this.loadIcons();n()},loadIcons:function(){var o=this,t=[],e;if(this.options.bootstrap&&n.each(i,function(n,i){t.push("glyphicon "+i)}),this.options.fontawesome)for(e in r)t.push("fa "+e);this.options.glyphicons&&(n.each(u,function(n,i){t.push("glyphicons "+i)}),n.each(f,function(n,i){t.push("social "+i)}));this.control.fontIconPicker().setIcons(t)}});t.registerFieldClass("icon",t.Fields.IconField);var i=["glyphicon-glass","glyphicon-music","glyphicon-search","glyphicon-envelope","glyphicon-heart","glyphicon-star","glyphicon-star-empty","glyphicon-user","glyphicon-film","glyphicon-th-large","glyphicon-th","glyphicon-th-list","glyphicon-ok","glyphicon-remove","glyphicon-zoom-in","glyphicon-zoom-out","glyphicon-off","glyphicon-signal","glyphicon-cog","glyphicon-trash","glyphicon-home","glyphicon-file","glyphicon-time","glyphicon-road","glyphicon-download-alt","glyphicon-download","glyphicon-upload","glyphicon-inbox","glyphicon-play-circle","glyphicon-repeat","glyphicon-refresh","glyphicon-list-alt","glyphicon-lock","glyphicon-flag","glyphicon-headphones","glyphicon-volume-off","glyphicon-volume-down","glyphicon-volume-up","glyphicon-qrcode","glyphicon-barcode","glyphicon-tag","glyphicon-tags","glyphicon-book","glyphicon-bookmark","glyphicon-print","glyphicon-camera","glyphicon-font","glyphicon-bold","glyphicon-italic","glyphicon-text-height","glyphicon-text-width","glyphicon-align-left","glyphicon-align-center","glyphicon-align-right","glyphicon-align-justify","glyphicon-list","glyphicon-indent-left","glyphicon-indent-right","glyphicon-facetime-video","glyphicon-picture","glyphicon-pencil","glyphicon-map-marker","glyphicon-adjust","glyphicon-tint","glyphicon-edit","glyphicon-share","glyphicon-check","glyphicon-move","glyphicon-step-backward","glyphicon-fast-backward","glyphicon-backward","glyphicon-play","glyphicon-pause","glyphicon-stop","glyphicon-forward","glyphicon-fast-forward","glyphicon-step-forward","glyphicon-eject","glyphicon-chevron-left","glyphicon-chevron-right","glyphicon-plus-sign","glyphicon-minus-sign","glyphicon-remove-sign","glyphicon-ok-sign","glyphicon-question-sign","glyphicon-info-sign","glyphicon-screenshot","glyphicon-remove-circle","glyphicon-ok-circle","glyphicon-ban-circle","glyphicon-arrow-left","glyphicon-arrow-right","glyphicon-arrow-up","glyphicon-arrow-down","glyphicon-share-alt","glyphicon-resize-full","glyphicon-resize-small","glyphicon-plus","glyphicon-minus","glyphicon-asterisk","glyphicon-exclamation-sign","glyphicon-gift","glyphicon-leaf","glyphicon-fire","glyphicon-eye-open","glyphicon-eye-close","glyphicon-warning-sign","glyphicon-plane","glyphicon-calendar","glyphicon-random","glyphicon-comment","glyphicon-magnet","glyphicon-chevron-up","glyphicon-chevron-down","glyphicon-retweet","glyphicon-shopping-cart","glyphicon-folder-close","glyphicon-folder-open","glyphicon-resize-vertical","glyphicon-resize-horizontal","glyphicon-hdd","glyphicon-bullhorn","glyphicon-bell","glyphicon-certificate","glyphicon-thumbs-up","glyphicon-thumbs-down","glyphicon-hand-right","glyphicon-hand-left","glyphicon-hand-up","glyphicon-hand-down","glyphicon-circle-arrow-right","glyphicon-circle-arrow-left","glyphicon-circle-arrow-up","glyphicon-circle-arrow-down","glyphicon-globe","glyphicon-wrench","glyphicon-tasks","glyphicon-filter","glyphicon-briefcase","glyphicon-fullscreen","glyphicon-dashboard","glyphicon-paperclip","glyphicon-heart-empty","glyphicon-link","glyphicon-phone","glyphicon-pushpin","glyphicon-euro","glyphicon-usd","glyphicon-gbp","glyphicon-sort","glyphicon-sort-by-alphabet","glyphicon-sort-by-alphabet-alt","glyphicon-sort-by-order","glyphicon-sort-by-order-alt","glyphicon-sort-by-attributes","glyphicon-sort-by-attributes-alt","glyphicon-unchecked","glyphicon-expand","glyphicon-collapse","glyphicon-collapse-top"],r={"fa-500px":{unicode:"\\f26e",name:"500px"},"fa-address-book":{unicode:"\\f2b9",name:"Address book"},"fa-address-book-o":{unicode:"\\f2ba",name:"Address book o"},"fa-address-card":{unicode:"\\f2bb",name:"Address card"},"fa-address-card-o":{unicode:"\\f2bc",name:"Address card o"},"fa-adjust":{unicode:"\\f042",name:"Adjust"},"fa-adn":{unicode:"\\f170",name:"Adn"},"fa-align-center":{unicode:"\\f037",name:"Align center"},"fa-align-justify":{unicode:"\\f039",name:"Align justify"},"fa-align-left":{unicode:"\\f036",name:"Align left"},"fa-align-right":{unicode:"\\f038",name:"Align right"},"fa-amazon":{unicode:"\\f270",name:"Amazon"},"fa-ambulance":{unicode:"\\f0f9",name:"Ambulance"},"fa-american-sign-language-interpreting":{unicode:"\\f2a3",name:"American sign language interpreting"},"fa-anchor":{unicode:"\\f13d",name:"Anchor"},"fa-android":{unicode:"\\f17b",name:"Android"},"fa-angellist":{unicode:"\\f209",name:"Angellist"},"fa-angle-double-down":{unicode:"\\f103",name:"Angle double down"},"fa-angle-double-left":{unicode:"\\f100",name:"Angle double left"},"fa-angle-double-right":{unicode:"\\f101",name:"Angle double right"},"fa-angle-double-up":{unicode:"\\f102",name:"Angle double up"},"fa-angle-down":{unicode:"\\f107",name:"Angle down"},"fa-angle-left":{unicode:"\\f104",name:"Angle left"},"fa-angle-right":{unicode:"\\f105",name:"Angle right"},"fa-angle-up":{unicode:"\\f106",name:"Angle up"},"fa-apple":{unicode:"\\f179",name:"Apple"},"fa-archive":{unicode:"\\f187",name:"Archive"},"fa-area-chart":{unicode:"\\f1fe",name:"Area chart"},"fa-arrow-circle-down":{unicode:"\\f0ab",name:"Arrow circle down"},"fa-arrow-circle-left":{unicode:"\\f0a8",name:"Arrow circle left"},"fa-arrow-circle-o-down":{unicode:"\\f01a",name:"Arrow circle o down"},"fa-arrow-circle-o-left":{unicode:"\\f190",name:"Arrow circle o left"},"fa-arrow-circle-o-right":{unicode:"\\f18e",name:"Arrow circle o right"},"fa-arrow-circle-o-up":{unicode:"\\f01b",name:"Arrow circle o up"},"fa-arrow-circle-right":{unicode:"\\f0a9",name:"Arrow circle right"},"fa-arrow-circle-up":{unicode:"\\f0aa",name:"Arrow circle up"},"fa-arrow-down":{unicode:"\\f063",name:"Arrow down"},"fa-arrow-left":{unicode:"\\f060",name:"Arrow left"},"fa-arrow-right":{unicode:"\\f061",name:"Arrow right"},"fa-arrow-up":{unicode:"\\f062",name:"Arrow up"},"fa-arrows":{unicode:"\\f047",name:"Arrows"},"fa-arrows-alt":{unicode:"\\f0b2",name:"Arrows alt"},"fa-arrows-h":{unicode:"\\f07e",name:"Arrows h"},"fa-arrows-v":{unicode:"\\f07d",name:"Arrows v"},"fa-assistive-listening-systems":{unicode:"\\f2a2",name:"Assistive listening systems"},"fa-asterisk":{unicode:"\\f069",name:"Asterisk"},"fa-at":{unicode:"\\f1fa",name:"At"},"fa-audio-description":{unicode:"\\f29e",name:"Audio description"},"fa-backward":{unicode:"\\f04a",name:"Backward"},"fa-balance-scale":{unicode:"\\f24e",name:"Balance scale"},"fa-ban":{unicode:"\\f05e",name:"Ban"},"fa-bandcamp":{unicode:"\\f2d5",name:"Bandcamp"},"fa-bar-chart":{unicode:"\\f080",name:"Bar chart"},"fa-barcode":{unicode:"\\f02a",name:"Barcode"},"fa-bars":{unicode:"\\f0c9",name:"Bars"},"fa-bath":{unicode:"\\f2cd",name:"Bath"},"fa-battery-empty":{unicode:"\\f244",name:"Battery empty"},"fa-battery-full":{unicode:"\\f240",name:"Battery full"},"fa-battery-half":{unicode:"\\f242",name:"Battery half"},"fa-battery-quarter":{unicode:"\\f243",name:"Battery quarter"},"fa-battery-three-quarters":{unicode:"\\f241",name:"Battery three quarters"},"fa-bed":{unicode:"\\f236",name:"Bed"},"fa-beer":{unicode:"\\f0fc",name:"Beer"},"fa-behance":{unicode:"\\f1b4",name:"Behance"},"fa-behance-square":{unicode:"\\f1b5",name:"Behance square"},"fa-bell":{unicode:"\\f0f3",name:"Bell"},"fa-bell-o":{unicode:"\\f0a2",name:"Bell o"},"fa-bell-slash":{unicode:"\\f1f6",name:"Bell slash"},"fa-bell-slash-o":{unicode:"\\f1f7",name:"Bell slash o"},"fa-bicycle":{unicode:"\\f206",name:"Bicycle"},"fa-binoculars":{unicode:"\\f1e5",name:"Binoculars"},"fa-birthday-cake":{unicode:"\\f1fd",name:"Birthday cake"},"fa-bitbucket":{unicode:"\\f171",name:"Bitbucket"},"fa-bitbucket-square":{unicode:"\\f172",name:"Bitbucket square"},"fa-black-tie":{unicode:"\\f27e",name:"Black tie"},"fa-blind":{unicode:"\\f29d",name:"Blind"},"fa-bluetooth":{unicode:"\\f293",name:"Bluetooth"},"fa-bluetooth-b":{unicode:"\\f294",name:"Bluetooth b"},"fa-bold":{unicode:"\\f032",name:"Bold"},"fa-bolt":{unicode:"\\f0e7",name:"Bolt"},"fa-bomb":{unicode:"\\f1e2",name:"Bomb"},"fa-book":{unicode:"\\f02d",name:"Book"},"fa-bookmark":{unicode:"\\f02e",name:"Bookmark"},"fa-bookmark-o":{unicode:"\\f097",name:"Bookmark o"},"fa-braille":{unicode:"\\f2a1",name:"Braille"},"fa-briefcase":{unicode:"\\f0b1",name:"Briefcase"},"fa-btc":{unicode:"\\f15a",name:"Btc"},"fa-bug":{unicode:"\\f188",name:"Bug"},"fa-building":{unicode:"\\f1ad",name:"Building"},"fa-building-o":{unicode:"\\f0f7",name:"Building o"},"fa-bullhorn":{unicode:"\\f0a1",name:"Bullhorn"},"fa-bullseye":{unicode:"\\f140",name:"Bullseye"},"fa-bus":{unicode:"\\f207",name:"Bus"},"fa-buysellads":{unicode:"\\f20d",name:"Buysellads"},"fa-calculator":{unicode:"\\f1ec",name:"Calculator"},"fa-calendar":{unicode:"\\f073",name:"Calendar"},"fa-calendar-check-o":{unicode:"\\f274",name:"Calendar check o"},"fa-calendar-minus-o":{unicode:"\\f272",name:"Calendar minus o"},"fa-calendar-o":{unicode:"\\f133",name:"Calendar o"},"fa-calendar-plus-o":{unicode:"\\f271",name:"Calendar plus o"},"fa-calendar-times-o":{unicode:"\\f273",name:"Calendar times o"},"fa-camera":{unicode:"\\f030",name:"Camera"},"fa-camera-retro":{unicode:"\\f083",name:"Camera retro"},"fa-car":{unicode:"\\f1b9",name:"Car"},"fa-caret-down":{unicode:"\\f0d7",name:"Caret down"},"fa-caret-left":{unicode:"\\f0d9",name:"Caret left"},"fa-caret-right":{unicode:"\\f0da",name:"Caret right"},"fa-caret-square-o-down":{unicode:"\\f150",name:"Caret square o down"},"fa-caret-square-o-left":{unicode:"\\f191",name:"Caret square o left"},"fa-caret-square-o-right":{unicode:"\\f152",name:"Caret square o right"},"fa-caret-square-o-up":{unicode:"\\f151",name:"Caret square o up"},"fa-caret-up":{unicode:"\\f0d8",name:"Caret up"},"fa-cart-arrow-down":{unicode:"\\f218",name:"Cart arrow down"},"fa-cart-plus":{unicode:"\\f217",name:"Cart plus"},"fa-cc":{unicode:"\\f20a",name:"Cc"},"fa-cc-amex":{unicode:"\\f1f3",name:"Cc amex"},"fa-cc-diners-club":{unicode:"\\f24c",name:"Cc diners club"},"fa-cc-discover":{unicode:"\\f1f2",name:"Cc discover"},"fa-cc-jcb":{unicode:"\\f24b",name:"Cc jcb"},"fa-cc-mastercard":{unicode:"\\f1f1",name:"Cc mastercard"},"fa-cc-paypal":{unicode:"\\f1f4",name:"Cc paypal"},"fa-cc-stripe":{unicode:"\\f1f5",name:"Cc stripe"},"fa-cc-visa":{unicode:"\\f1f0",name:"Cc visa"},"fa-certificate":{unicode:"\\f0a3",name:"Certificate"},"fa-chain-broken":{unicode:"\\f127",name:"Chain broken"},"fa-check":{unicode:"\\f00c",name:"Check"},"fa-check-circle":{unicode:"\\f058",name:"Check circle"},"fa-check-circle-o":{unicode:"\\f05d",name:"Check circle o"},"fa-check-square":{unicode:"\\f14a",name:"Check square"},"fa-check-square-o":{unicode:"\\f046",name:"Check square o"},"fa-chevron-circle-down":{unicode:"\\f13a",name:"Chevron circle down"},"fa-chevron-circle-left":{unicode:"\\f137",name:"Chevron circle left"},"fa-chevron-circle-right":{unicode:"\\f138",name:"Chevron circle right"},"fa-chevron-circle-up":{unicode:"\\f139",name:"Chevron circle up"},"fa-chevron-down":{unicode:"\\f078",name:"Chevron down"},"fa-chevron-left":{unicode:"\\f053",name:"Chevron left"},"fa-chevron-right":{unicode:"\\f054",name:"Chevron right"},"fa-chevron-up":{unicode:"\\f077",name:"Chevron up"},"fa-child":{unicode:"\\f1ae",name:"Child"},"fa-chrome":{unicode:"\\f268",name:"Chrome"},"fa-circle":{unicode:"\\f111",name:"Circle"},"fa-circle-o":{unicode:"\\f10c",name:"Circle o"},"fa-circle-o-notch":{unicode:"\\f1ce",name:"Circle o notch"},"fa-circle-thin":{unicode:"\\f1db",name:"Circle thin"},"fa-clipboard":{unicode:"\\f0ea",name:"Clipboard"},"fa-clock-o":{unicode:"\\f017",name:"Clock o"},"fa-clone":{unicode:"\\f24d",name:"Clone"},"fa-cloud":{unicode:"\\f0c2",name:"Cloud"},"fa-cloud-download":{unicode:"\\f0ed",name:"Cloud download"},"fa-cloud-upload":{unicode:"\\f0ee",name:"Cloud upload"},"fa-code":{unicode:"\\f121",name:"Code"},"fa-code-fork":{unicode:"\\f126",name:"Code fork"},"fa-codepen":{unicode:"\\f1cb",name:"Codepen"},"fa-codiepie":{unicode:"\\f284",name:"Codiepie"},"fa-coffee":{unicode:"\\f0f4",name:"Coffee"},"fa-cog":{unicode:"\\f013",name:"Cog"},"fa-cogs":{unicode:"\\f085",name:"Cogs"},"fa-columns":{unicode:"\\f0db",name:"Columns"},"fa-comment":{unicode:"\\f075",name:"Comment"},"fa-comment-o":{unicode:"\\f0e5",name:"Comment o"},"fa-commenting":{unicode:"\\f27a",name:"Commenting"},"fa-commenting-o":{unicode:"\\f27b",name:"Commenting o"},"fa-comments":{unicode:"\\f086",name:"Comments"},"fa-comments-o":{unicode:"\\f0e6",name:"Comments o"},"fa-compass":{unicode:"\\f14e",name:"Compass"},"fa-compress":{unicode:"\\f066",name:"Compress"},"fa-connectdevelop":{unicode:"\\f20e",name:"Connectdevelop"},"fa-contao":{unicode:"\\f26d",name:"Contao"},"fa-copyright":{unicode:"\\f1f9",name:"Copyright"},"fa-creative-commons":{unicode:"\\f25e",name:"Creative commons"},"fa-credit-card":{unicode:"\\f09d",name:"Credit card"},"fa-credit-card-alt":{unicode:"\\f283",name:"Credit card alt"},"fa-crop":{unicode:"\\f125",name:"Crop"},"fa-crosshairs":{unicode:"\\f05b",name:"Crosshairs"},"fa-css3":{unicode:"\\f13c",name:"Css3"},"fa-cube":{unicode:"\\f1b2",name:"Cube"},"fa-cubes":{unicode:"\\f1b3",name:"Cubes"},"fa-cutlery":{unicode:"\\f0f5",name:"Cutlery"},"fa-dashcube":{unicode:"\\f210",name:"Dashcube"},"fa-database":{unicode:"\\f1c0",name:"Database"},"fa-deaf":{unicode:"\\f2a4",name:"Deaf"},"fa-delicious":{unicode:"\\f1a5",name:"Delicious"},"fa-desktop":{unicode:"\\f108",name:"Desktop"},"fa-deviantart":{unicode:"\\f1bd",name:"Deviantart"},"fa-diamond":{unicode:"\\f219",name:"Diamond"},"fa-digg":{unicode:"\\f1a6",name:"Digg"},"fa-dot-circle-o":{unicode:"\\f192",name:"Dot circle o"},"fa-download":{unicode:"\\f019",name:"Download"},"fa-dribbble":{unicode:"\\f17d",name:"Dribbble"},"fa-dropbox":{unicode:"\\f16b",name:"Dropbox"},"fa-drupal":{unicode:"\\f1a9",name:"Drupal"},"fa-edge":{unicode:"\\f282",name:"Edge"},"fa-eercast":{unicode:"\\f2da",name:"Eercast"},"fa-eject":{unicode:"\\f052",name:"Eject"},"fa-ellipsis-h":{unicode:"\\f141",name:"Ellipsis h"},"fa-ellipsis-v":{unicode:"\\f142",name:"Ellipsis v"},"fa-empire":{unicode:"\\f1d1",name:"Empire"},"fa-envelope":{unicode:"\\f0e0",name:"Envelope"},"fa-envelope-o":{unicode:"\\f003",name:"Envelope o"},"fa-envelope-open":{unicode:"\\f2b6",name:"Envelope open"},"fa-envelope-open-o":{unicode:"\\f2b7",name:"Envelope open o"},"fa-envelope-square":{unicode:"\\f199",name:"Envelope square"},"fa-envira":{unicode:"\\f299",name:"Envira"},"fa-eraser":{unicode:"\\f12d",name:"Eraser"},"fa-etsy":{unicode:"\\f2d7",name:"Etsy"},"fa-eur":{unicode:"\\f153",name:"Eur"},"fa-exchange":{unicode:"\\f0ec",name:"Exchange"},"fa-exclamation":{unicode:"\\f12a",name:"Exclamation"},"fa-exclamation-circle":{unicode:"\\f06a",name:"Exclamation circle"},"fa-exclamation-triangle":{unicode:"\\f071",name:"Exclamation triangle"},"fa-expand":{unicode:"\\f065",name:"Expand"},"fa-expeditedssl":{unicode:"\\f23e",name:"Expeditedssl"},"fa-external-link":{unicode:"\\f08e",name:"External link"},"fa-external-link-square":{unicode:"\\f14c",name:"External link square"},"fa-eye":{unicode:"\\f06e",name:"Eye"},"fa-eye-slash":{unicode:"\\f070",name:"Eye slash"},"fa-eyedropper":{unicode:"\\f1fb",name:"Eyedropper"},"fa-facebook":{unicode:"\\f09a",name:"Facebook"},"fa-facebook-official":{unicode:"\\f230",name:"Facebook official"},"fa-facebook-square":{unicode:"\\f082",name:"Facebook square"},"fa-fast-backward":{unicode:"\\f049",name:"Fast backward"},"fa-fast-forward":{unicode:"\\f050",name:"Fast forward"},"fa-fax":{unicode:"\\f1ac",name:"Fax"},"fa-female":{unicode:"\\f182",name:"Female"},"fa-fighter-jet":{unicode:"\\f0fb",name:"Fighter jet"},"fa-file":{unicode:"\\f15b",name:"File"},"fa-file-archive-o":{unicode:"\\f1c6",name:"File archive o"},"fa-file-audio-o":{unicode:"\\f1c7",name:"File audio o"},"fa-file-code-o":{unicode:"\\f1c9",name:"File code o"},"fa-file-excel-o":{unicode:"\\f1c3",name:"File excel o"},"fa-file-image-o":{unicode:"\\f1c5",name:"File image o"},"fa-file-o":{unicode:"\\f016",name:"File o"},"fa-file-pdf-o":{unicode:"\\f1c1",name:"File pdf o"},"fa-file-powerpoint-o":{unicode:"\\f1c4",name:"File powerpoint o"},"fa-file-text":{unicode:"\\f15c",name:"File text"},"fa-file-text-o":{unicode:"\\f0f6",name:"File text o"},"fa-file-video-o":{unicode:"\\f1c8",name:"File video o"},"fa-file-word-o":{unicode:"\\f1c2",name:"File word o"},"fa-files-o":{unicode:"\\f0c5",name:"Files o"},"fa-film":{unicode:"\\f008",name:"Film"},"fa-filter":{unicode:"\\f0b0",name:"Filter"},"fa-fire":{unicode:"\\f06d",name:"Fire"},"fa-fire-extinguisher":{unicode:"\\f134",name:"Fire extinguisher"},"fa-firefox":{unicode:"\\f269",name:"Firefox"},"fa-first-order":{unicode:"\\f2b0",name:"First order"},"fa-flag":{unicode:"\\f024",name:"Flag"},"fa-flag-checkered":{unicode:"\\f11e",name:"Flag checkered"},"fa-flag-o":{unicode:"\\f11d",name:"Flag o"},"fa-flask":{unicode:"\\f0c3",name:"Flask"},"fa-flickr":{unicode:"\\f16e",name:"Flickr"},"fa-floppy-o":{unicode:"\\f0c7",name:"Floppy o"},"fa-folder":{unicode:"\\f07b",name:"Folder"},"fa-folder-o":{unicode:"\\f114",name:"Folder o"},"fa-folder-open":{unicode:"\\f07c",name:"Folder open"},"fa-folder-open-o":{unicode:"\\f115",name:"Folder open o"},"fa-font":{unicode:"\\f031",name:"Font"},"fa-font-awesome":{unicode:"\\f2b4",name:"Font awesome"},"fa-fonticons":{unicode:"\\f280",name:"Fonticons"},"fa-fort-awesome":{unicode:"\\f286",name:"Fort awesome"},"fa-forumbee":{unicode:"\\f211",name:"Forumbee"},"fa-forward":{unicode:"\\f04e",name:"Forward"},"fa-foursquare":{unicode:"\\f180",name:"Foursquare"},"fa-free-code-camp":{unicode:"\\f2c5",name:"Free code camp"},"fa-frown-o":{unicode:"\\f119",name:"Frown o"},"fa-futbol-o":{unicode:"\\f1e3",name:"Futbol o"},"fa-gamepad":{unicode:"\\f11b",name:"Gamepad"},"fa-gavel":{unicode:"\\f0e3",name:"Gavel"},"fa-gbp":{unicode:"\\f154",name:"Gbp"},"fa-genderless":{unicode:"\\f22d",name:"Genderless"},"fa-get-pocket":{unicode:"\\f265",name:"Get pocket"},"fa-gg":{unicode:"\\f260",name:"Gg"},"fa-gg-circle":{unicode:"\\f261",name:"Gg circle"},"fa-gift":{unicode:"\\f06b",name:"Gift"},"fa-git":{unicode:"\\f1d3",name:"Git"},"fa-git-square":{unicode:"\\f1d2",name:"Git square"},"fa-github":{unicode:"\\f09b",name:"Github"},"fa-github-alt":{unicode:"\\f113",name:"Github alt"},"fa-github-square":{unicode:"\\f092",name:"Github square"},"fa-gitlab":{unicode:"\\f296",name:"Gitlab"},"fa-glass":{unicode:"\\f000",name:"Glass"},"fa-glide":{unicode:"\\f2a5",name:"Glide"},"fa-glide-g":{unicode:"\\f2a6",name:"Glide g"},"fa-globe":{unicode:"\\f0ac",name:"Globe"},"fa-google":{unicode:"\\f1a0",name:"Google"},"fa-google-plus":{unicode:"\\f0d5",name:"Google plus"},"fa-google-plus-official":{unicode:"\\f2b3",name:"Google plus official"},"fa-google-plus-square":{unicode:"\\f0d4",name:"Google plus square"},"fa-google-wallet":{unicode:"\\f1ee",name:"Google wallet"},"fa-graduation-cap":{unicode:"\\f19d",name:"Graduation cap"},"fa-gratipay":{unicode:"\\f184",name:"Gratipay"},"fa-grav":{unicode:"\\f2d6",name:"Grav"},"fa-h-square":{unicode:"\\f0fd",name:"H square"},"fa-hacker-news":{unicode:"\\f1d4",name:"Hacker news"},"fa-hand-lizard-o":{unicode:"\\f258",name:"Hand lizard o"},"fa-hand-o-down":{unicode:"\\f0a7",name:"Hand o down"},"fa-hand-o-left":{unicode:"\\f0a5",name:"Hand o left"},"fa-hand-o-right":{unicode:"\\f0a4",name:"Hand o right"},"fa-hand-o-up":{unicode:"\\f0a6",name:"Hand o up"},"fa-hand-paper-o":{unicode:"\\f256",name:"Hand paper o"},"fa-hand-peace-o":{unicode:"\\f25b",name:"Hand peace o"},"fa-hand-pointer-o":{unicode:"\\f25a",name:"Hand pointer o"},"fa-hand-rock-o":{unicode:"\\f255",name:"Hand rock o"},"fa-hand-scissors-o":{unicode:"\\f257",name:"Hand scissors o"},"fa-hand-spock-o":{unicode:"\\f259",name:"Hand spock o"},"fa-handshake-o":{unicode:"\\f2b5",name:"Handshake o"},"fa-hashtag":{unicode:"\\f292",name:"Hashtag"},"fa-hdd-o":{unicode:"\\f0a0",name:"Hdd o"},"fa-header":{unicode:"\\f1dc",name:"Header"},"fa-headphones":{unicode:"\\f025",name:"Headphones"},"fa-heart":{unicode:"\\f004",name:"Heart"},"fa-heart-o":{unicode:"\\f08a",name:"Heart o"},"fa-heartbeat":{unicode:"\\f21e",name:"Heartbeat"},"fa-history":{unicode:"\\f1da",name:"History"},"fa-home":{unicode:"\\f015",name:"Home"},"fa-hospital-o":{unicode:"\\f0f8",name:"Hospital o"},"fa-hourglass":{unicode:"\\f254",name:"Hourglass"},"fa-hourglass-end":{unicode:"\\f253",name:"Hourglass end"},"fa-hourglass-half":{unicode:"\\f252",name:"Hourglass half"},"fa-hourglass-o":{unicode:"\\f250",name:"Hourglass o"},"fa-hourglass-start":{unicode:"\\f251",name:"Hourglass start"},"fa-houzz":{unicode:"\\f27c",name:"Houzz"},"fa-html5":{unicode:"\\f13b",name:"Html5"},"fa-i-cursor":{unicode:"\\f246",name:"I cursor"},"fa-id-badge":{unicode:"\\f2c1",name:"Id badge"},"fa-id-card":{unicode:"\\f2c2",name:"Id card"},"fa-id-card-o":{unicode:"\\f2c3",name:"Id card o"},"fa-ils":{unicode:"\\f20b",name:"Ils"},"fa-imdb":{unicode:"\\f2d8",name:"Imdb"},"fa-inbox":{unicode:"\\f01c",name:"Inbox"},"fa-indent":{unicode:"\\f03c",name:"Indent"},"fa-industry":{unicode:"\\f275",name:"Industry"},"fa-info":{unicode:"\\f129",name:"Info"},"fa-info-circle":{unicode:"\\f05a",name:"Info circle"},"fa-inr":{unicode:"\\f156",name:"Inr"},"fa-instagram":{unicode:"\\f16d",name:"Instagram"},"fa-internet-explorer":{unicode:"\\f26b",name:"Internet explorer"},"fa-ioxhost":{unicode:"\\f208",name:"Ioxhost"},"fa-italic":{unicode:"\\f033",name:"Italic"},"fa-joomla":{unicode:"\\f1aa",name:"Joomla"},"fa-jpy":{unicode:"\\f157",name:"Jpy"},"fa-jsfiddle":{unicode:"\\f1cc",name:"Jsfiddle"},"fa-key":{unicode:"\\f084",name:"Key"},"fa-keyboard-o":{unicode:"\\f11c",name:"Keyboard o"},"fa-krw":{unicode:"\\f159",name:"Krw"},"fa-language":{unicode:"\\f1ab",name:"Language"},"fa-laptop":{unicode:"\\f109",name:"Laptop"},"fa-lastfm":{unicode:"\\f202",name:"Lastfm"},"fa-lastfm-square":{unicode:"\\f203",name:"Lastfm square"},"fa-leaf":{unicode:"\\f06c",name:"Leaf"},"fa-leanpub":{unicode:"\\f212",name:"Leanpub"},"fa-lemon-o":{unicode:"\\f094",name:"Lemon o"},"fa-level-down":{unicode:"\\f149",name:"Level down"},"fa-level-up":{unicode:"\\f148",name:"Level up"},"fa-life-ring":{unicode:"\\f1cd",name:"Life ring"},"fa-lightbulb-o":{unicode:"\\f0eb",name:"Lightbulb o"},"fa-line-chart":{unicode:"\\f201",name:"Line chart"},"fa-link":{unicode:"\\f0c1",name:"Link"},"fa-linkedin":{unicode:"\\f0e1",name:"Linkedin"},"fa-linkedin-square":{unicode:"\\f08c",name:"Linkedin square"},"fa-linode":{unicode:"\\f2b8",name:"Linode"},"fa-linux":{unicode:"\\f17c",name:"Linux"},"fa-list":{unicode:"\\f03a",name:"List"},"fa-list-alt":{unicode:"\\f022",name:"List alt"},"fa-list-ol":{unicode:"\\f0cb",name:"List ol"},"fa-list-ul":{unicode:"\\f0ca",name:"List ul"},"fa-location-arrow":{unicode:"\\f124",name:"Location arrow"},"fa-lock":{unicode:"\\f023",name:"Lock"},"fa-long-arrow-down":{unicode:"\\f175",name:"Long arrow down"},"fa-long-arrow-left":{unicode:"\\f177",name:"Long arrow left"},"fa-long-arrow-right":{unicode:"\\f178",name:"Long arrow right"},"fa-long-arrow-up":{unicode:"\\f176",name:"Long arrow up"},"fa-low-vision":{unicode:"\\f2a8",name:"Low vision"},"fa-magic":{unicode:"\\f0d0",name:"Magic"},"fa-magnet":{unicode:"\\f076",name:"Magnet"},"fa-male":{unicode:"\\f183",name:"Male"},"fa-map":{unicode:"\\f279",name:"Map"},"fa-map-marker":{unicode:"\\f041",name:"Map marker"},"fa-map-o":{unicode:"\\f278",name:"Map o"},"fa-map-pin":{unicode:"\\f276",name:"Map pin"},"fa-map-signs":{unicode:"\\f277",name:"Map signs"},"fa-mars":{unicode:"\\f222",name:"Mars"},"fa-mars-double":{unicode:"\\f227",name:"Mars double"},"fa-mars-stroke":{unicode:"\\f229",name:"Mars stroke"},"fa-mars-stroke-h":{unicode:"\\f22b",name:"Mars stroke h"},"fa-mars-stroke-v":{unicode:"\\f22a",name:"Mars stroke v"},"fa-maxcdn":{unicode:"\\f136",name:"Maxcdn"},"fa-meanpath":{unicode:"\\f20c",name:"Meanpath"},"fa-medium":{unicode:"\\f23a",name:"Medium"},"fa-medkit":{unicode:"\\f0fa",name:"Medkit"},"fa-meetup":{unicode:"\\f2e0",name:"Meetup"},"fa-meh-o":{unicode:"\\f11a",name:"Meh o"},"fa-mercury":{unicode:"\\f223",name:"Mercury"},"fa-microchip":{unicode:"\\f2db",name:"Microchip"},"fa-microphone":{unicode:"\\f130",name:"Microphone"},"fa-microphone-slash":{unicode:"\\f131",name:"Microphone slash"},"fa-minus":{unicode:"\\f068",name:"Minus"},"fa-minus-circle":{unicode:"\\f056",name:"Minus circle"},"fa-minus-square":{unicode:"\\f146",name:"Minus square"},"fa-minus-square-o":{unicode:"\\f147",name:"Minus square o"},"fa-mixcloud":{unicode:"\\f289",name:"Mixcloud"},"fa-mobile":{unicode:"\\f10b",name:"Mobile"},"fa-modx":{unicode:"\\f285",name:"Modx"},"fa-money":{unicode:"\\f0d6",name:"Money"},"fa-moon-o":{unicode:"\\f186",name:"Moon o"},"fa-motorcycle":{unicode:"\\f21c",name:"Motorcycle"},"fa-mouse-pointer":{unicode:"\\f245",name:"Mouse pointer"},"fa-music":{unicode:"\\f001",name:"Music"},"fa-neuter":{unicode:"\\f22c",name:"Neuter"},"fa-newspaper-o":{unicode:"\\f1ea",name:"Newspaper o"},"fa-object-group":{unicode:"\\f247",name:"Object group"},"fa-object-ungroup":{unicode:"\\f248",name:"Object ungroup"},"fa-odnoklassniki":{unicode:"\\f263",name:"Odnoklassniki"},"fa-odnoklassniki-square":{unicode:"\\f264",name:"Odnoklassniki square"},"fa-opencart":{unicode:"\\f23d",name:"Opencart"},"fa-openid":{unicode:"\\f19b",name:"Openid"},"fa-opera":{unicode:"\\f26a",name:"Opera"},"fa-optin-monster":{unicode:"\\f23c",name:"Optin monster"},"fa-outdent":{unicode:"\\f03b",name:"Outdent"},"fa-pagelines":{unicode:"\\f18c",name:"Pagelines"},"fa-paint-brush":{unicode:"\\f1fc",name:"Paint brush"},"fa-paper-plane":{unicode:"\\f1d8",name:"Paper plane"},"fa-paper-plane-o":{unicode:"\\f1d9",name:"Paper plane o"},"fa-paperclip":{unicode:"\\f0c6",name:"Paperclip"},"fa-paragraph":{unicode:"\\f1dd",name:"Paragraph"},"fa-pause":{unicode:"\\f04c",name:"Pause"},"fa-pause-circle":{unicode:"\\f28b",name:"Pause circle"},"fa-pause-circle-o":{unicode:"\\f28c",name:"Pause circle o"},"fa-paw":{unicode:"\\f1b0",name:"Paw"},"fa-paypal":{unicode:"\\f1ed",name:"Paypal"},"fa-pencil":{unicode:"\\f040",name:"Pencil"},"fa-pencil-square":{unicode:"\\f14b",name:"Pencil square"},"fa-pencil-square-o":{unicode:"\\f044",name:"Pencil square o"},"fa-percent":{unicode:"\\f295",name:"Percent"},"fa-phone":{unicode:"\\f095",name:"Phone"},"fa-phone-square":{unicode:"\\f098",name:"Phone square"},"fa-picture-o":{unicode:"\\f03e",name:"Picture o"},"fa-pie-chart":{unicode:"\\f200",name:"Pie chart"},"fa-pied-piper":{unicode:"\\f2ae",name:"Pied piper"},"fa-pied-piper-alt":{unicode:"\\f1a8",name:"Pied piper alt"},"fa-pied-piper-pp":{unicode:"\\f1a7",name:"Pied piper pp"},"fa-pinterest":{unicode:"\\f0d2",name:"Pinterest"},"fa-pinterest-p":{unicode:"\\f231",name:"Pinterest p"},"fa-pinterest-square":{unicode:"\\f0d3",name:"Pinterest square"},"fa-plane":{unicode:"\\f072",name:"Plane"},"fa-play":{unicode:"\\f04b",name:"Play"},"fa-play-circle":{unicode:"\\f144",name:"Play circle"},"fa-play-circle-o":{unicode:"\\f01d",name:"Play circle o"},"fa-plug":{unicode:"\\f1e6",name:"Plug"},"fa-plus":{unicode:"\\f067",name:"Plus"},"fa-plus-circle":{unicode:"\\f055",name:"Plus circle"},"fa-plus-square":{unicode:"\\f0fe",name:"Plus square"},"fa-plus-square-o":{unicode:"\\f196",name:"Plus square o"},"fa-podcast":{unicode:"\\f2ce",name:"Podcast"},"fa-power-off":{unicode:"\\f011",name:"Power off"},"fa-print":{unicode:"\\f02f",name:"Print"},"fa-product-hunt":{unicode:"\\f288",name:"Product hunt"},"fa-puzzle-piece":{unicode:"\\f12e",name:"Puzzle piece"},"fa-qq":{unicode:"\\f1d6",name:"Qq"},"fa-qrcode":{unicode:"\\f029",name:"Qrcode"},"fa-question":{unicode:"\\f128",name:"Question"},"fa-question-circle":{unicode:"\\f059",name:"Question circle"},"fa-question-circle-o":{unicode:"\\f29c",name:"Question circle o"},"fa-quora":{unicode:"\\f2c4",name:"Quora"},"fa-quote-left":{unicode:"\\f10d",name:"Quote left"},"fa-quote-right":{unicode:"\\f10e",name:"Quote right"},"fa-random":{unicode:"\\f074",name:"Random"},"fa-ravelry":{unicode:"\\f2d9",name:"Ravelry"},"fa-rebel":{unicode:"\\f1d0",name:"Rebel"},"fa-recycle":{unicode:"\\f1b8",name:"Recycle"},"fa-reddit":{unicode:"\\f1a1",name:"Reddit"},"fa-reddit-alien":{unicode:"\\f281",name:"Reddit alien"},"fa-reddit-square":{unicode:"\\f1a2",name:"Reddit square"},"fa-refresh":{unicode:"\\f021",name:"Refresh"},"fa-registered":{unicode:"\\f25d",name:"Registered"},"fa-renren":{unicode:"\\f18b",name:"Renren"},"fa-repeat":{unicode:"\\f01e",name:"Repeat"},"fa-reply":{unicode:"\\f112",name:"Reply"},"fa-reply-all":{unicode:"\\f122",name:"Reply all"},"fa-retweet":{unicode:"\\f079",name:"Retweet"},"fa-road":{unicode:"\\f018",name:"Road"},"fa-rocket":{unicode:"\\f135",name:"Rocket"},"fa-rss":{unicode:"\\f09e",name:"Rss"},"fa-rss-square":{unicode:"\\f143",name:"Rss square"},"fa-rub":{unicode:"\\f158",name:"Rub"},"fa-safari":{unicode:"\\f267",name:"Safari"},"fa-scissors":{unicode:"\\f0c4",name:"Scissors"},"fa-scribd":{unicode:"\\f28a",name:"Scribd"},"fa-search":{unicode:"\\f002",name:"Search"},"fa-search-minus":{unicode:"\\f010",name:"Search minus"},"fa-search-plus":{unicode:"\\f00e",name:"Search plus"},"fa-sellsy":{unicode:"\\f213",name:"Sellsy"},"fa-server":{unicode:"\\f233",name:"Server"},"fa-share":{unicode:"\\f064",name:"Share"},"fa-share-alt":{unicode:"\\f1e0",name:"Share alt"},"fa-share-alt-square":{unicode:"\\f1e1",name:"Share alt square"},"fa-share-square":{unicode:"\\f14d",name:"Share square"},"fa-share-square-o":{unicode:"\\f045",name:"Share square o"},"fa-shield":{unicode:"\\f132",name:"Shield"},"fa-ship":{unicode:"\\f21a",name:"Ship"},"fa-shirtsinbulk":{unicode:"\\f214",name:"Shirtsinbulk"},"fa-shopping-bag":{unicode:"\\f290",name:"Shopping bag"},"fa-shopping-basket":{unicode:"\\f291",name:"Shopping basket"},"fa-shopping-cart":{unicode:"\\f07a",name:"Shopping cart"},"fa-shower":{unicode:"\\f2cc",name:"Shower"},"fa-sign-in":{unicode:"\\f090",name:"Sign in"},"fa-sign-language":{unicode:"\\f2a7",name:"Sign language"},"fa-sign-out":{unicode:"\\f08b",name:"Sign out"},"fa-signal":{unicode:"\\f012",name:"Signal"},"fa-simplybuilt":{unicode:"\\f215",name:"Simplybuilt"},"fa-sitemap":{unicode:"\\f0e8",name:"Sitemap"},"fa-skyatlas":{unicode:"\\f216",name:"Skyatlas"},"fa-skype":{unicode:"\\f17e",name:"Skype"},"fa-slack":{unicode:"\\f198",name:"Slack"},"fa-sliders":{unicode:"\\f1de",name:"Sliders"},"fa-slideshare":{unicode:"\\f1e7",name:"Slideshare"},"fa-smile-o":{unicode:"\\f118",name:"Smile o"},"fa-snapchat":{unicode:"\\f2ab",name:"Snapchat"},"fa-snapchat-ghost":{unicode:"\\f2ac",name:"Snapchat ghost"},"fa-snapchat-square":{unicode:"\\f2ad",name:"Snapchat square"},"fa-snowflake-o":{unicode:"\\f2dc",name:"Snowflake o"},"fa-sort":{unicode:"\\f0dc",name:"Sort"},"fa-sort-alpha-asc":{unicode:"\\f15d",name:"Sort alpha asc"},"fa-sort-alpha-desc":{unicode:"\\f15e",name:"Sort alpha desc"},"fa-sort-amount-asc":{unicode:"\\f160",name:"Sort amount asc"},"fa-sort-amount-desc":{unicode:"\\f161",name:"Sort amount desc"},"fa-sort-asc":{unicode:"\\f0de",name:"Sort asc"},"fa-sort-desc":{unicode:"\\f0dd",name:"Sort desc"},"fa-sort-numeric-asc":{unicode:"\\f162",name:"Sort numeric asc"},"fa-sort-numeric-desc":{unicode:"\\f163",name:"Sort numeric desc"},"fa-soundcloud":{unicode:"\\f1be",name:"Soundcloud"},"fa-space-shuttle":{unicode:"\\f197",name:"Space shuttle"},"fa-spinner":{unicode:"\\f110",name:"Spinner"},"fa-spoon":{unicode:"\\f1b1",name:"Spoon"},"fa-spotify":{unicode:"\\f1bc",name:"Spotify"},"fa-square":{unicode:"\\f0c8",name:"Square"},"fa-square-o":{unicode:"\\f096",name:"Square o"},"fa-stack-exchange":{unicode:"\\f18d",name:"Stack exchange"},"fa-stack-overflow":{unicode:"\\f16c",name:"Stack overflow"},"fa-star":{unicode:"\\f005",name:"Star"},"fa-star-half":{unicode:"\\f089",name:"Star half"},"fa-star-half-o":{unicode:"\\f123",name:"Star half o"},"fa-star-o":{unicode:"\\f006",name:"Star o"},"fa-steam":{unicode:"\\f1b6",name:"Steam"},"fa-steam-square":{unicode:"\\f1b7",name:"Steam square"},"fa-step-backward":{unicode:"\\f048",name:"Step backward"},"fa-step-forward":{unicode:"\\f051",name:"Step forward"},"fa-stethoscope":{unicode:"\\f0f1",name:"Stethoscope"},"fa-sticky-note":{unicode:"\\f249",name:"Sticky note"},"fa-sticky-note-o":{unicode:"\\f24a",name:"Sticky note o"},"fa-stop":{unicode:"\\f04d",name:"Stop"},"fa-stop-circle":{unicode:"\\f28d",name:"Stop circle"},"fa-stop-circle-o":{unicode:"\\f28e",name:"Stop circle o"},"fa-street-view":{unicode:"\\f21d",name:"Street view"},"fa-strikethrough":{unicode:"\\f0cc",name:"Strikethrough"},"fa-stumbleupon":{unicode:"\\f1a4",name:"Stumbleupon"},"fa-stumbleupon-circle":{unicode:"\\f1a3",name:"Stumbleupon circle"},"fa-subscript":{unicode:"\\f12c",name:"Subscript"},"fa-subway":{unicode:"\\f239",name:"Subway"},"fa-suitcase":{unicode:"\\f0f2",name:"Suitcase"},"fa-sun-o":{unicode:"\\f185",name:"Sun o"},"fa-superpowers":{unicode:"\\f2dd",name:"Superpowers"},"fa-superscript":{unicode:"\\f12b",name:"Superscript"},"fa-table":{unicode:"\\f0ce",name:"Table"},"fa-tablet":{unicode:"\\f10a",name:"Tablet"},"fa-tachometer":{unicode:"\\f0e4",name:"Tachometer"},"fa-tag":{unicode:"\\f02b",name:"Tag"},"fa-tags":{unicode:"\\f02c",name:"Tags"},"fa-tasks":{unicode:"\\f0ae",name:"Tasks"},"fa-taxi":{unicode:"\\f1ba",name:"Taxi"},"fa-telegram":{unicode:"\\f2c6",name:"Telegram"},"fa-television":{unicode:"\\f26c",name:"Television"},"fa-tencent-weibo":{unicode:"\\f1d5",name:"Tencent weibo"},"fa-terminal":{unicode:"\\f120",name:"Terminal"},"fa-text-height":{unicode:"\\f034",name:"Text height"},"fa-text-width":{unicode:"\\f035",name:"Text width"},"fa-th":{unicode:"\\f00a",name:"Th"},"fa-th-large":{unicode:"\\f009",name:"Th large"},"fa-th-list":{unicode:"\\f00b",name:"Th list"},"fa-themeisle":{unicode:"\\f2b2",name:"Themeisle"},"fa-thermometer-empty":{unicode:"\\f2cb",name:"Thermometer empty"},"fa-thermometer-full":{unicode:"\\f2c7",name:"Thermometer full"},"fa-thermometer-half":{unicode:"\\f2c9",name:"Thermometer half"},"fa-thermometer-quarter":{unicode:"\\f2ca",name:"Thermometer quarter"},"fa-thermometer-three-quarters":{unicode:"\\f2c8",name:"Thermometer three quarters"},"fa-thumb-tack":{unicode:"\\f08d",name:"Thumb tack"},"fa-thumbs-down":{unicode:"\\f165",name:"Thumbs down"},"fa-thumbs-o-down":{unicode:"\\f088",name:"Thumbs o down"},"fa-thumbs-o-up":{unicode:"\\f087",name:"Thumbs o up"},"fa-thumbs-up":{unicode:"\\f164",name:"Thumbs up"},"fa-ticket":{unicode:"\\f145",name:"Ticket"},"fa-times":{unicode:"\\f00d",name:"Times"},"fa-times-circle":{unicode:"\\f057",name:"Times circle"},"fa-times-circle-o":{unicode:"\\f05c",name:"Times circle o"},"fa-tint":{unicode:"\\f043",name:"Tint"},"fa-toggle-off":{unicode:"\\f204",name:"Toggle off"},"fa-toggle-on":{unicode:"\\f205",name:"Toggle on"},"fa-trademark":{unicode:"\\f25c",name:"Trademark"},"fa-train":{unicode:"\\f238",name:"Train"},"fa-transgender":{unicode:"\\f224",name:"Transgender"},"fa-transgender-alt":{unicode:"\\f225",name:"Transgender alt"},"fa-trash":{unicode:"\\f1f8",name:"Trash"},"fa-trash-o":{unicode:"\\f014",name:"Trash o"},"fa-tree":{unicode:"\\f1bb",name:"Tree"},"fa-trello":{unicode:"\\f181",name:"Trello"},"fa-tripadvisor":{unicode:"\\f262",name:"Tripadvisor"},"fa-trophy":{unicode:"\\f091",name:"Trophy"},"fa-truck":{unicode:"\\f0d1",name:"Truck"},"fa-try":{unicode:"\\f195",name:"Try"},"fa-tty":{unicode:"\\f1e4",name:"Tty"},"fa-tumblr":{unicode:"\\f173",name:"Tumblr"},"fa-tumblr-square":{unicode:"\\f174",name:"Tumblr square"},"fa-twitch":{unicode:"\\f1e8",name:"Twitch"},"fa-twitter":{unicode:"\\f099",name:"Twitter"},"fa-twitter-square":{unicode:"\\f081",name:"Twitter square"},"fa-umbrella":{unicode:"\\f0e9",name:"Umbrella"},"fa-underline":{unicode:"\\f0cd",name:"Underline"},"fa-undo":{unicode:"\\f0e2",name:"Undo"},"fa-universal-access":{unicode:"\\f29a",name:"Universal access"},"fa-university":{unicode:"\\f19c",name:"University"},"fa-unlock":{unicode:"\\f09c",name:"Unlock"},"fa-unlock-alt":{unicode:"\\f13e",name:"Unlock alt"},"fa-upload":{unicode:"\\f093",name:"Upload"},"fa-usb":{unicode:"\\f287",name:"Usb"},"fa-usd":{unicode:"\\f155",name:"Usd"},"fa-user":{unicode:"\\f007",name:"User"},"fa-user-circle":{unicode:"\\f2bd",name:"User circle"},"fa-user-circle-o":{unicode:"\\f2be",name:"User circle o"},"fa-user-md":{unicode:"\\f0f0",name:"User md"},"fa-user-o":{unicode:"\\f2c0",name:"User o"},"fa-user-plus":{unicode:"\\f234",name:"User plus"},"fa-user-secret":{unicode:"\\f21b",name:"User secret"},"fa-user-times":{unicode:"\\f235",name:"User times"},"fa-users":{unicode:"\\f0c0",name:"Users"},"fa-venus":{unicode:"\\f221",name:"Venus"},"fa-venus-double":{unicode:"\\f226",name:"Venus double"},"fa-venus-mars":{unicode:"\\f228",name:"Venus mars"},"fa-viacoin":{unicode:"\\f237",name:"Viacoin"},"fa-viadeo":{unicode:"\\f2a9",name:"Viadeo"},"fa-viadeo-square":{unicode:"\\f2aa",name:"Viadeo square"},"fa-video-camera":{unicode:"\\f03d",name:"Video camera"},"fa-vimeo":{unicode:"\\f27d",name:"Vimeo"},"fa-vimeo-square":{unicode:"\\f194",name:"Vimeo square"},"fa-vine":{unicode:"\\f1ca",name:"Vine"},"fa-vk":{unicode:"\\f189",name:"Vk"},"fa-volume-control-phone":{unicode:"\\f2a0",name:"Volume control phone"},"fa-volume-down":{unicode:"\\f027",name:"Volume down"},"fa-volume-off":{unicode:"\\f026",name:"Volume off"},"fa-volume-up":{unicode:"\\f028",name:"Volume up"},"fa-weibo":{unicode:"\\f18a",name:"Weibo"},"fa-weixin":{unicode:"\\f1d7",name:"Weixin"},"fa-whatsapp":{unicode:"\\f232",name:"Whatsapp"},"fa-wheelchair":{unicode:"\\f193",name:"Wheelchair"},"fa-wheelchair-alt":{unicode:"\\f29b",name:"Wheelchair alt"},"fa-wifi":{unicode:"\\f1eb",name:"Wifi"},"fa-wikipedia-w":{unicode:"\\f266",name:"Wikipedia w"},"fa-window-close":{unicode:"\\f2d3",name:"Window close"},"fa-window-close-o":{unicode:"\\f2d4",name:"Window close o"},"fa-window-maximize":{unicode:"\\f2d0",name:"Window maximize"},"fa-window-minimize":{unicode:"\\f2d1",name:"Window minimize"},"fa-window-restore":{unicode:"\\f2d2",name:"Window restore"},"fa-windows":{unicode:"\\f17a",name:"Windows"},"fa-wordpress":{unicode:"\\f19a",name:"Wordpress"},"fa-wpbeginner":{unicode:"\\f297",name:"Wpbeginner"},"fa-wpexplorer":{unicode:"\\f2de",name:"Wpexplorer"},"fa-wpforms":{unicode:"\\f298",name:"Wpforms"},"fa-wrench":{unicode:"\\f0ad",name:"Wrench"},"fa-xing":{unicode:"\\f168",name:"Xing"},"fa-xing-square":{unicode:"\\f169",name:"Xing square"},"fa-y-combinator":{unicode:"\\f23b",name:"Y combinator"},"fa-yahoo":{unicode:"\\f19e",name:"Yahoo"},"fa-yelp":{unicode:"\\f1e9",name:"Yelp"},"fa-yoast":{unicode:"\\f2b1",name:"Yoast"},"fa-youtube":{unicode:"\\f167",name:"Youtube"},"fa-youtube-play":{unicode:"\\f16a",name:"Youtube play"},"fa-youtube-square":{unicode:"\\f166",name:"Youtube square"}},u=["glyph-glass","glyph-leaf","glyph-dog","glyph-user","glyph-girl","glyph-car","glyph-user-add","glyph-user-remove","glyph-film","glyph-magic","glyph-envelope","glyph-camera","glyph-heart","glyph-beach-umbrella","glyph-train","glyph-print","glyph-bin","glyph-music","glyph-note","glyph-heart-empty","glyph-home","glyph-snowflake","glyph-fire","glyph-magnet","glyph-parents","glyph-binoculars","glyph-road","glyph-search","glyph-cars","glyph-notes-2","glyph-pencil","glyph-bus","glyph-wifi-alt","glyph-luggage","glyph-old-man","glyph-woman","glyph-file","glyph-coins","glyph-airplane","glyph-notes","glyph-stats","glyph-charts","glyph-pie-chart","glyph-group","glyph-keys","glyph-calendar","glyph-router","glyph-camera-small","glyph-dislikes","glyph-star","glyph-link","glyph-eye-open","glyph-eye-close","glyph-alarm","glyph-clock","glyph-stopwatch","glyph-projector","glyph-history","glyph-truck","glyph-cargo","glyph-compass","glyph-keynote","glyph-paperclip","glyph-power","glyph-lightbulb","glyph-tag","glyph-tags","glyph-cleaning","glyph-ruller","glyph-gift","glyph-umbrella","glyph-book","glyph-bookmark","glyph-wifi","glyph-cup","glyph-stroller","glyph-headphones","glyph-headset","glyph-warning-sign","glyph-signal","glyph-retweet","glyph-refresh","glyph-roundabout","glyph-random","glyph-heat","glyph-repeat","glyph-display","glyph-log-book","glyph-address-book","glyph-building","glyph-eyedropper","glyph-adjust","glyph-tint","glyph-crop","glyph-vector-path-square","glyph-vector-path-circle","glyph-vector-path-polygon","glyph-vector-path-line","glyph-vector-path-curve","glyph-vector-path-all","glyph-font","glyph-italic","glyph-bold","glyph-text-underline","glyph-text-strike","glyph-text-height","glyph-text-width","glyph-text-resize","glyph-left-indent","glyph-right-indent","glyph-align-left","glyph-align-center","glyph-align-right","glyph-justify","glyph-list","glyph-text-smaller","glyph-text-bigger","glyph-embed","glyph-embed-close","glyph-table","glyph-message-full","glyph-message-empty","glyph-message-in","glyph-message-out","glyph-message-plus","glyph-message-minus","glyph-message-ban","glyph-message-flag","glyph-message-lock","glyph-message-new","glyph-inbox","glyph-inbox-plus","glyph-inbox-minus","glyph-inbox-lock","glyph-inbox-in","glyph-inbox-out","glyph-cogwheel","glyph-cogwheels","glyph-picture","glyph-adjust-alt","glyph-database-lock","glyph-database-plus","glyph-database-minus","glyph-database-ban","glyph-folder-open","glyph-folder-plus","glyph-folder-minus","glyph-folder-lock","glyph-folder-flag","glyph-folder-new","glyph-edit","glyph-new-window","glyph-check","glyph-unchecked","glyph-more-windows","glyph-show-big-thumbnails","glyph-show-thumbnails","glyph-show-thumbnails-with-lines","glyph-show-lines","glyph-playlist","glyph-imac","glyph-macbook","glyph-ipad","glyph-iphone","glyph-iphone-transfer","glyph-iphone-exchange","glyph-ipod","glyph-ipod-shuffle","glyph-ear-plugs","glyph-record","glyph-step-backward","glyph-fast-backward","glyph-rewind","glyph-play","glyph-pause","glyph-stop","glyph-forward","glyph-fast-forward","glyph-step-forward","glyph-eject","glyph-facetime-video","glyph-download-alt","glyph-mute","glyph-volume-down","glyph-volume-up","glyph-screenshot","glyph-move","glyph-more","glyph-brightness-reduce","glyph-brightness-increase","glyph-circle-plus","glyph-circle-minus","glyph-circle-remove","glyph-circle-ok","glyph-circle-question-mark","glyph-circle-info","glyph-circle-exclamation-mark","glyph-remove","glyph-ok","glyph-ban","glyph-download","glyph-upload","glyph-shopping-cart","glyph-lock","glyph-unlock","glyph-electricity","glyph-ok-2","glyph-remove-2","glyph-cart-out","glyph-cart-in","glyph-left-arrow","glyph-right-arrow","glyph-down-arrow","glyph-up-arrow","glyph-resize-small","glyph-resize-full","glyph-circle-arrow-left","glyph-circle-arrow-right","glyph-circle-arrow-top","glyph-circle-arrow-down","glyph-play-button","glyph-unshare","glyph-share","glyph-chevron-right","glyph-chevron-left","glyph-bluetooth","glyph-euro","glyph-usd","glyph-gbp","glyph-retweet-2","glyph-moon","glyph-sun","glyph-cloud","glyph-direction","glyph-brush","glyph-pen","glyph-zoom-in","glyph-zoom-out","glyph-pin","glyph-albums","glyph-rotation-lock","glyph-flash","glyph-google-maps","glyph-anchor","glyph-conversation","glyph-chat","glyph-male","glyph-female","glyph-asterisk","glyph-divide","glyph-snorkel-diving","glyph-scuba-diving","glyph-oxygen-bottle","glyph-fins","glyph-fishes","glyph-boat","glyph-delete","glyph-sheriffs-star","glyph-qrcode","glyph-barcode","glyph-pool","glyph-buoy","glyph-spade","glyph-bank","glyph-vcard","glyph-electrical-plug","glyph-flag","glyph-credit-card","glyph-keyboard-wireless","glyph-keyboard-wired","glyph-shield","glyph-ring","glyph-cake","glyph-drink","glyph-beer","glyph-fast-food","glyph-cutlery","glyph-pizza","glyph-birthday-cake","glyph-tablet","glyph-settings","glyph-bullets","glyph-cardio","glyph-t-shirt","glyph-pants","glyph-sweater","glyph-fabric","glyph-leather","glyph-scissors","glyph-bomb","glyph-skull","glyph-celebration","glyph-tea-kettle","glyph-french-press","glyph-coffe-cup","glyph-pot","glyph-grater","glyph-kettle","glyph-hospital","glyph-hospital-h","glyph-microphone","glyph-webcam","glyph-temple-christianity-church","glyph-temple-islam","glyph-temple-hindu","glyph-temple-buddhist","glyph-bicycle","glyph-life-preserver","glyph-share-alt","glyph-comments","glyph-flower","glyph-baseball","glyph-rugby","glyph-ax","glyph-table-tennis","glyph-bowling","glyph-tree-conifer","glyph-tree-deciduous","glyph-more-items","glyph-sort","glyph-filter","glyph-gamepad","glyph-playing-dices","glyph-calculator","glyph-tie","glyph-wallet","glyph-piano","glyph-sampler","glyph-podium","glyph-soccer-ball","glyph-blog","glyph-dashboard","glyph-certificate","glyph-bell","glyph-candle","glyph-pushpin","glyph-iphone-shake","glyph-pin-flag","glyph-turtle","glyph-rabbit","glyph-globe","glyph-briefcase","glyph-hdd","glyph-thumbs-up","glyph-thumbs-down","glyph-hand-right","glyph-hand-left","glyph-hand-up","glyph-hand-down","glyph-fullscreen","glyph-shopping-bag","glyph-book-open","glyph-nameplate","glyph-nameplate-alt","glyph-vases","glyph-bullhorn","glyph-dumbbell","glyph-suitcase","glyph-file-import","glyph-file-export","glyph-bug","glyph-crown","glyph-smoking","glyph-cloud-upload","glyph-cloud-download","glyph-restart","glyph-security-camera","glyph-expand","glyph-collapse","glyph-collapse-top","glyph-globe-af","glyph-global","glyph-spray","glyph-nails","glyph-claw-hammer","glyph-classic-hammer","glyph-hand-saw","glyph-riflescope","glyph-electrical-socket-eu","glyph-electrical-socket-us","glyph-message-forward","glyph-coat-hanger","glyph-dress","glyph-bathrobe","glyph-shirt","glyph-underwear","glyph-log-in","glyph-log-out","glyph-exit","glyph-new-window-alt","glyph-video-sd","glyph-video-hd","glyph-subtitles","glyph-sound-stereo","glyph-sound-dolby","glyph-sound-5-1","glyph-sound-6-1","glyph-sound-7-1","glyph-copyright-mark","glyph-registration-mark","glyph-radar","glyph-skateboard","glyph-golf-course","glyph-sorting","glyph-sort-by-alphabet","glyph-sort-by-alphabet-alt","glyph-sort-by-order","glyph-sort-by-order-alt","glyph-sort-by-attributes","glyph-sort-by-attributes-alt","glyph-compressed","glyph-package","glyph-cloud-plus","glyph-cloud-minus","glyph-disk-save","glyph-disk-open","glyph-disk-saved","glyph-disk-remove","glyph-disk-import","glyph-disk-export","glyph-tower","glyph-send","glyph-git-branch","glyph-git-create","glyph-git-private","glyph-git-delete","glyph-git-merge","glyph-git-pull-request","glyph-git-compare","glyph-git-commit","glyph-construction-cone","glyph-shoe-steps","glyph-plus","glyph-minus","glyph-redo","glyph-undo","glyph-golf","glyph-hockey","glyph-pipe","glyph-wrench","glyph-folder-closed","glyph-phone-alt","glyph-earphone","glyph-floppy-disk","glyph-floppy-saved","glyph-floppy-remove","glyph-floppy-save","glyph-floppy-open","glyph-translate","glyph-fax","glyph-factory","glyph-shop-window","glyph-shop","glyph-kiosk","glyph-kiosk-wheels","glyph-kiosk-light","glyph-kiosk-food","glyph-transfer","glyph-money","glyph-header","glyph-blacksmith","glyph-saw-blade","glyph-basketball","glyph-server","glyph-server-plus","glyph-server-minus","glyph-server-ban","glyph-server-flag","glyph-server-lock","glyph-server-new"],f=["social-pinterest","social-dropbox","social-google-plus","social-jolicloud","social-yahoo","social-blogger","social-picasa","social-amazon","social-tumblr","social-wordpress","social-instapaper","social-evernote","social-xing","social-zootool","social-dribbble","social-deviantart","social-read-it-later","social-linked-in","social-forrst","social-pinboard","social-behance","social-github","social-youtube","social-skitch","social-foursquare","social-quora","social-badoo","social-spotify","social-stumbleupon","social-readability","social-facebook","social-twitter","social-instagram","social-posterous-spaces","social-vimeo","social-flickr","social-last-fm","social-rss","social-skype","social-e-mail","social-vine","social-myspace","social-goodreads","social-apple","social-windows","social-yelp","social-playstation","social-xbox","social-android","social-ios"]}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"image"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.base()},getTitle:function(){return"Image Field"},getDescription:function(){return"Image Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(i){var u=this,r=this.getTextControlEl();r&&r.length>0&&(t.isEmpty(i)?r.val(""):(r.val(i),n(u.control).parent().find(".alpaca-image-display img").attr("src",i)));this.updateMaxLengthIndicator()},getValue:function(){var t=null,n=this.getTextControlEl();return n&&n.length>0&&(t=n.val()),t},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl(),u;i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():i.sf&&n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,u){u.result&&n.each(u.result,function(t,u){i.setValue(u.url);n(r).change()})}}).data("loaded",!0);n(r).change(function(){var t=n(this).val();n(i.control).parent().find(".alpaca-image-display img").attr("src",t)});i.options.manageurl&&(u=n('Manage files<\/a>').appendTo(n(r).parent()));t()},applyTypeAhead:function(){var r=this,o,i,s,f,e,h,c,l,u;if(r.control.typeahead&&r.options.typeahead&&!t.isEmpty(r.options.typeahead)&&r.sf){if(o=r.options.typeahead.config,o||(o={}),i=r.options.typeahead.datasets,i||(i={}),i.name||(i.name=r.getId()),s=r.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:r.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));u=this.getTextControlEl();n(u).typeahead(o,i);n(u).on("typeahead:autocompleted",function(t,i){r.setValue(i.value);n(u).change()});n(u).on("typeahead:selected",function(t,i){r.setValue(i.value);n(u).change()});if(f){if(f.autocompleted)n(u).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(u).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(u).change(function(){var t=n(this).val(),i=n(u).typeahead("val");i!==t&&n(u).typeahead("val",t)});n(r.field).find("span.twitter-typeahead").first().css("display","block");n(r.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("image",t.Fields.ImageField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Image2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getFileUrl:function(t){if(self.sf){var i={fileid:t};n.ajax({url:self.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:self.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:i,success:function(n){return n},error:function(){return""}})}},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select Field"},getDescription:function(){return"Select Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("image2",t.Fields.Image2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCrop2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"imagecrop2"},setup:function(){var n=this;this.options.uploadfolder||(this.options.uploadfolder="");this.options.cropfolder||(this.options.cropfolder=this.options.uploadfolder);this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.width&&this.options.height&&(this.options.cropper.aspectRatio=this.options.width/this.options.height);this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.options.cropButtonHidden||(this.options.cropButtonHidden=!1);this.options.cropButtonHidden||(this.options.buttons={check:{value:"Crop",click:function(){this.cropImage()}}});this.base()},getValue:function(){var i=this,t;if(this.control&&this.control.length>0)return t=null,$image=i.getImage(),t=i.cropperExist()?$image.cropper("getData",{rounded:!0}):{},t.url=n(this.control).find("select").val(),t.url&&(this.dataSource&&this.dataSource[t.url]&&(t.id=this.dataSource[t.url].id),t.cropUrl=n(i.getControlEl()).attr("data-cropurl")),t},setValue:function(i){var r=this,u;i!==this.getValue()&&this.control&&typeof i!="undefined"&&i!=null&&(t.isEmpty(i)?(r.cropper(""),n(this.control).find("select").val(""),n(r.getControlEl()).attr("data-cropurl","")):t.isObject(i)?(i.url&&(i.url=i.url.split("?")[0]),i.cropUrl&&(i.cropUrl=i.cropUrl.split("?")[0]),i.cropdata&&Object.keys(i.cropdata).length>0?(u=i.cropdata[Object.keys(i.cropdata)[0]],r.cropper(i.url,u.cropper),n(this.control).find("select").val(i.url),n(r.getControlEl()).attr("data-cropurl",u.url)):(r.cropper(i.url,i),n(this.control).find("select").val(i.url),n(r.getControlEl()).attr("data-cropurl",i.cropUrl))):(r.cropper(i),n(this.control).find("select").val(i),n(r.getControlEl()).attr("data-cropurl","")),n(this.control).find("select").trigger("change.select2"))},getEnum:function(){if(this.schema){if(this.schema["enum"])return this.schema["enum"];if(this.schema.type&&this.schema.type==="array"&&this.schema.items&&this.schema.items["enum"])return this.schema.items["enum"]}},initControlEvents:function(){var n=this,t;if(n.base(),n.options.multiple){t=this.control.parent().find(".select2-search__field");t.focus(function(t){n.suspendBlurFocus||(n.onFocus.call(n,t),n.trigger("focus",t))});t.blur(function(t){n.suspendBlurFocus||(n.onBlur.call(n,t),n.trigger("blur",t))});this.control.on("change",function(t){n.onChange.call(n,t);n.trigger("change",t)})}},beforeRenderControl:function(i,r){var u=this;this.base(i,function(){if(u.selectOptions=[],u.sf){var f=function(){u.schema.enum=[];u.options.optionLabels=[];for(var n=0;n0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};n(u.getControlEl().find("select")).select2(i)}u.options.uploadhidden?n(u.getControlEl()).find("input[type=file]").hide():u.sf&&n(u.getControlEl()).find("input[type=file]").fileupload({dataType:"json",url:u.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:u.options.uploadfolder},beforeSend:u.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(n,t){u.refresh(function(){u.setValue(t.url)})})}}).data("loaded",!0);r()})},cropImage:function(){var t=this,i=t.getValue(),r={url:i.url,cropfolder:t.options.cropfolder,crop:i,id:"crop"};t.options.width&&t.options.height&&(r.resize={width:t.options.width,height:t.options.height});n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/CropImage",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){n(t.getControlEl()).attr("data-cropurl",i.url);setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},getFileUrl:function(t){var i=this,r;i.sf&&(r={fileid:t},n.ajax({url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:i.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:r,success:function(n){return n},error:function(){return""}}))},cropper:function(t,i){var f=this,r,u;$image=f.getImage();$image.attr("src",t);r=$image.data("cropper");t?($image.show(),r?((t!=r.originalUrl||r.url&&t!=r.url)&&$image.cropper("replace",t),i&&$image.cropper("setData",i)):(u=n.extend({},{aspectRatio:16/9,checkOrientation:!1,autoCropArea:.9,minContainerHeight:200,minContainerWidth:400,toggleDragModeOnDblclick:!1},f.options.cropper),i&&(u.data=i),$image.cropper(u))):($image.hide(),r&&$image.cropper("destroy"))},cropperExist:function(){var n=this;return $image=n.getImage(),$image.data("cropper")},getImage:function(){var t=this;return n(t.control).parent().find("#"+t.id+"-image")},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data?this.data.url:"",!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).find("select");i.focus();t&&t(this)}},getTitle:function(){return"Image Crop 2 Field"},getDescription:function(){return"Image Crop 2 Field"}});t.registerFieldClass("imagecrop2",t.Fields.ImageCrop2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCropField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"imagecrop"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.base()},getTitle:function(){return"Image Crop Field"},getDescription:function(){return"Image Crop Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var r=this,i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?(i.val(""),r.cropper("")):t.isObject(n)?(i.val(n.url),r.cropper(n.url,n)):(i.val(n),r.cropper(n)));this.updateMaxLengthIndicator()},getValue:function(){var i=this,n=null,t=this.getTextControlEl();return $image=i.getImage(),t&&t.length>0&&(n=i.cropperExist()?$image.cropper("getData",{rounded:!0}):{},n.url=t.val()),n},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl(),u;$image=n(i.control).parent().find(".alpaca-image-display img");i.sf?(i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){n(r).val(i.url);n(r).change()})}}).data("loaded",!0),n(r).change(function(){var t=n(this).val();i.cropper(t)}),i.options.manageurl&&(u=n('Manage files<\/a>').appendTo(n(r).parent()))):$image.hide();t()},cropper:function(t,i){var f=this,r,u;$image=f.getImage();$image.attr("src",t);r=$image.data("cropper");t?($image.show(),r?(t!=r.originalUrl&&$image.cropper("replace",t),i&&$image.cropper("setData",i)):(u=n.extend({},{aspectRatio:16/9,checkOrientation:!1,autoCropArea:.9,minContainerHeight:200,minContainerWidth:400,toggleDragModeOnDblclick:!1},f.options.cropper),i&&(u.data=i),$image.cropper(u))):($image.hide(),r&&$image.cropper("destroy"))},cropperExist:function(){var n=this;return $image=n.getImage(),$image.data("cropper")},getImage:function(){var t=this;return n(t.control).parent().find("#"+t.id+"-image")},applyTypeAhead:function(){var u=this,o,i,s,f,e,h,c,l,r;if(u.control.typeahead&&u.options.typeahead&&!t.isEmpty(u.options.typeahead)&&u.sf){if(o=u.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=u.getId()),s=u.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:u.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:u.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));r=this.getTextControlEl();n(r).typeahead(o,i);n(r).on("typeahead:autocompleted",function(t,i){n(r).val(i.value);n(r).change()});n(r).on("typeahead:selected",function(t,i){n(r).val(i.value);n(r).change()});if(f){if(f.autocompleted)n(r).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(r).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(r).change(function(){var t=n(this).val(),i=n(r).typeahead("val");i!==t&&n(r).typeahead("val",t)});n(u.field).find("span.twitter-typeahead").first().css("display","block");n(u.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("imagecrop",t.Fields.ImageCropField)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCropperField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"imagecropper"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.base()},getTitle:function(){return"Image Cropper Field"},getDescription:function(){return"Image Cropper Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?i.val(""):t.isString(n)?i.val(n):(i.val(n.url),this.setCroppedData(n.cropdata)));this.updateMaxLengthIndicator()},getValue:function(){var n=null,t=this.getTextControlEl();return t&&t.length>0&&(n={url:t.val()},n.cropdata=this.getCroppedData()),n},getCroppedData:function(){var f=this.getTextControlEl(),i={};for(var t in this.options.croppers){var e=this.options.croppers[t],r=this.id+"-"+t,u=n("#"+r);i[t]=u.data("cropdata")}return i},cropAllImages:function(t){var i=this;for(var r in this.options.croppers){var f=this.id+"-"+r,s=n("#"+f),u=this.options.croppers[r],e={x:-1,y:-1,width:u.width,height:u.height,rotate:0},o=JSON.stringify({url:t,id:r,crop:e,resize:u,cropfolder:this.options.cropfolder});n.ajax({type:"POST",url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/CropImage",contentType:"application/json; charset=utf-8",dataType:"json",async:!1,data:o,beforeSend:i.sf.setModuleHeaders}).done(function(n){var t={url:n.url,cropper:{}};i.setCroppedDataForId(f,t)}).fail(function(n,t,i){alert("Uh-oh, something broke: "+i)})}},setCroppedData:function(i){var e=this.getTextControlEl(),h=this.getFieldEl(),u,r,f,o;if(e&&e.length>0&&!t.isEmpty(i))for(r in this.options.croppers){var o=this.options.croppers[r],c=this.id+"-"+r,s=n("#"+c);cropdata=i[r];cropdata&&s.data("cropdata",cropdata);u||(u=s,n(u).addClass("active"),cropdata&&(f=n(h).find(".alpaca-image-display img.image"),o=f.data("cropper"),o&&f.cropper("setData",cropdata.cropper)))}},setCroppedDataForId:function(t,i){var u=this.getTextControlEl(),r;i&&(r=n("#"+t),r.data("cropdata",i))},getCurrentCropData:function(){var t=this.getFieldEl(),i=n(t).parent().find(".alpaca-form-tab.active");return n(i).data("cropdata")},setCurrentCropData:function(t){var i=this.getFieldEl(),r=n(i).parent().find(".alpaca-form-tab.active");n(r).data("cropdata",t)},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},cropChange:function(t){var u=t.data,f=u.getCurrentCropData(),e;if(f){var r=f.cropper,o=this,i=n(this).cropper("getData",{rounded:!0});(i.x!=r.x||i.y!=r.y||i.width!=r.width||i.height!=r.height||i.rotate!=r.rotate)&&(e={url:"",cropper:i},u.setCurrentCropData(e))}},getCropppersData:function(){var n,t,i;for(n in self.options.croppers)t=self.options.croppers[n],i=self.id+"-"+n},handlePostRender:function(t){var i=this,f=this.getTextControlEl(),s=this.getFieldEl(),r=n('Crop<\/a>'),e,o,u,a;r.click(function(){var u=i.getCroppedData(),e=JSON.stringify({url:f.val(),cropfolder:i.options.cropfolder,cropdata:u,croppers:i.options.croppers}),t;return n(r).css("cursor","wait"),t="CropImages",n.ajax({type:"POST",url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/"+t,contentType:"application/json; charset=utf-8",dataType:"json",data:e,beforeSend:i.sf.setModuleHeaders}).done(function(t){var u,f;for(u in i.options.croppers){var s=i.options.croppers[u],e=i.id+"-"+u,o=n("#"+e);t.cropdata[u]&&(f={url:t.cropdata[u].url,cropper:t.cropdata[u].crop},f&&o.data("cropdata",f))}setTimeout(function(){n(r).css("cursor","initial")},500)}).fail(function(t,i,r){alert("Uh-oh, something broke: "+r);n(s).css("cursor","initial")}),!1});for(o in i.options.croppers){var c=i.options.croppers[o],l=i.id+"-"+o,h=n(''+o+"<\/a>").appendTo(n(f).parent());h.data("cropopt",c);h.click(function(){u.off("crop.cropper");var t=n(this).data("cropdata"),f=n(this).data("cropopt");u.cropper("setAspectRatio",f.width/f.height);t?u.cropper("setData",t.cropper):u.cropper("reset");r.data("cropperButtonId",this.id);r.data("cropperId",n(this).attr("data-id"));n(this).parent().find(".alpaca-form-tab").removeClass("active");n(this).addClass("active");u.on("crop.cropper",i,i.cropChange);return!1});e||(e=h,n(e).addClass("active"),r.data("cropperButtonId",n(e).attr("id")),r.data("cropperId",n(e).attr("data-id")))}u=n(s).find(".alpaca-image-display img.image");u.cropper(i.options.cropper).on("built.cropper",function(){var t=n(e).data("cropopt"),r,u;t&&n(this).cropper("setAspectRatio",t.width/t.height);r=n(e).data("cropdata");r&&n(this).cropper("setData",r.cropper);u=n(s).find(".alpaca-image-display img.image");u.on("crop.cropper",i,i.cropChange)});i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){f.val(i.url);n(f).change()})}}).data("loaded",!0);n(f).change(function(){var t=n(this).val();n(s).find(".alpaca-image-display img.image").attr("src",t);u.cropper("replace",t);t&&i.cropAllImages(t)});r.appendTo(n(f).parent());i.options.manageurl&&(a=n('Manage files<\/a>').appendTo(n(f).parent()));t()},applyTypeAhead:function(){var u=this,o,i,s,f,e,h,c,l,r;if(u.control.typeahead&&u.options.typeahead&&!t.isEmpty(u.options.typeahead)){if(o=u.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=u.getId()),s=u.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:u.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:u.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));r=this.getTextControlEl();n(r).typeahead(o,i);n(r).on("typeahead:autocompleted",function(t,i){r.val(i.value);n(r).change()});n(r).on("typeahead:selected",function(t,i){r.val(i.value);n(r).change()});if(f){if(f.autocompleted)n(r).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(r).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(r).change(function(){var t=n(this).val(),i=n(r).typeahead("val");i!==t&&n(r).typeahead("val",t)});n(u.field).find("span.twitter-typeahead").first().css("display","block");n(u.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("imagecropper",t.Fields.ImageCropperField)}(jQuery),function(n){var t=n.alpaca;t.Fields.NumberField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.numberDecimalSeparator=f.numberDecimalSeparator},setup:function(){this.base()},getFieldType:function(){return"number"},getValue:function(){var n=this._getControlVal(!1);return typeof n=="undefined"||""==n?n:(this.numberDecimalSeparator!="."&&(n=(""+n).replace(this.numberDecimalSeparator,".")),parseFloat(n))},setValue:function(n){var i=n;this.numberDecimalSeparator!="."&&(i=t.isEmpty(n)?"":(""+n).replace(".",this.numberDecimalSeparator));this.base(i)},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateNumber();return i.stringNotANumber={message:n?"":this.view.getMessage("stringNotANumber"),status:n},n=this._validateDivisibleBy(),i.stringDivisibleBy={message:n?"":t.substituteTokens(this.view.getMessage("stringDivisibleBy"),[this.schema.divisibleBy]),status:n},n=this._validateMaximum(),i.stringValueTooLarge={message:"",status:n},n||(i.stringValueTooLarge.message=this.schema.exclusiveMaximum?t.substituteTokens(this.view.getMessage("stringValueTooLargeExclusive"),[this.schema.maximum]):t.substituteTokens(this.view.getMessage("stringValueTooLarge"),[this.schema.maximum])),n=this._validateMinimum(),i.stringValueTooSmall={message:"",status:n},n||(i.stringValueTooSmall.message=this.schema.exclusiveMinimum?t.substituteTokens(this.view.getMessage("stringValueTooSmallExclusive"),[this.schema.minimum]):t.substituteTokens(this.view.getMessage("stringValueTooSmall"),[this.schema.minimum])),n=this._validateMultipleOf(),i.stringValueNotMultipleOf={message:"",status:n},n||(i.stringValueNotMultipleOf.message=t.substituteTokens(this.view.getMessage("stringValueNotMultipleOf"),[this.schema.multipleOf])),r&&i.stringNotANumber.status&&i.stringDivisibleBy.status&&i.stringValueTooLarge.status&&i.stringValueTooSmall.status&&i.stringValueNotMultipleOf.status},_validateNumber:function(){var n=this._getControlVal(),i,r;return(this.numberDecimalSeparator!="."&&(n=n.replace(this.numberDecimalSeparator,".")),typeof n=="number"&&(n=""+n),t.isValEmpty(n))?!0:(i=t.testRegex(t.regexps.number,n),!i)?!1:(r=this.getValue(),isNaN(r))?!1:!0},_validateDivisibleBy:function(){var n=this.getValue();return!t.isEmpty(this.schema.divisibleBy)&&n%this.schema.divisibleBy!=0?!1:!0},_validateMaximum:function(){var n=this.getValue();return!t.isEmpty(this.schema.maximum)&&(n>this.schema.maximum||!t.isEmpty(this.schema.exclusiveMaximum)&&n==this.schema.maximum&&this.schema.exclusiveMaximum)?!1:!0},_validateMinimum:function(){var n=this.getValue();return!t.isEmpty(this.schema.minimum)&&(n0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("role2",t.Fields.Role2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.User2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this,t;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.role||(this.options.role="");n=this;this.options.lazyLoading&&(t=10,this.options.select2={ajax:{url:this.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/UsersLookup",beforeSend:this.sf.setModuleHeaders,type:"get",dataType:"json",delay:250,data:function(i){return{q:i.term?i.term:"",d:n.options.folder,role:n.options.role,pageIndex:i.page?i.page:1,pageSize:t}},processResults:function(i,r){return r.page=r.page||1,r.page==1&&i.items.unshift({id:"",text:n.options.noneLabel}),{results:i.items,pagination:{more:r.page*t0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(t.loading)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getUserName:function(t,i){var r=this,u;r.sf&&(u={userid:t},n.ajax({url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/GetUserInfo",beforeSend:r.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:u,success:function(n){i&&i(n)},error:function(){alert("Error GetUserInfo "+t)}}))},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(){}),r):!0:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTextControlEl:function(){var t=this;return n(t.getControlEl()).find("input[type=text]")},getTitle:function(){return"Select User Field"},getDescription:function(){return"Select User Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("user2",t.Fields.User2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.Select2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select Field"},getDescription:function(){return"Select Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("select2",t.Fields.Select2Field)}(jQuery),function(n){var t=n.alpaca;n.alpaca.Fields.DnnUrlField=n.alpaca.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.sf=f.servicesFramework},setup:function(){this.base()},applyTypeAhead:function(){var t=this,f,i,r,u,e,o,s,h;if(t.sf){if(f=f={},i=i={},i.name||(i.name=t.getId()),r=r={},u={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},u.remote={url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Tabs?q=%QUERY&l="+t.culture,ajax:{beforeSend:t.sf.setModuleHeaders}},i.filter&&(u.remote.filter=i.filter),i.replace&&(u.remote.replace=i.replace),e=new Bloodhound(u),e.initialize(),i.source=e.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"{{name}}"},i.templates)for(o in i.templates)s=i.templates[o],typeof s=="string"&&(i.templates[o]=Handlebars.compile(s));n(t.control).typeahead(f,i);n(t.control).on("typeahead:autocompleted",function(i,r){t.setValue(r.value);n(t.control).change()});n(t.control).on("typeahead:selected",function(i,r){t.setValue(r.value);n(t.control).change()});if(r){if(r.autocompleted)n(t.control).on("typeahead:autocompleted",function(n,t){r.autocompleted(n,t)});if(r.selected)n(t.control).on("typeahead:selected",function(n,t){r.selected(n,t)})}h=n(t.control);n(t.control).change(function(){var i=n(this).val(),t=n(h).typeahead("val");t!==i&&n(h).typeahead("val",t)});n(t.field).find("span.twitter-typeahead").first().css("display","block");n(t.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("url",t.Fields.DnnUrlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Url2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.culture=f.culture;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("url2",t.Fields.Url2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.wysihtmlField=t.Fields.TextAreaField.extend({getFieldType:function(){return"wysihtml"},setup:function(){this.data||(this.data="");this.base();typeof this.options.wysihtml=="undefined"&&(this.options.wysihtml={})},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(!r.isDisplayOnly()&&r.control){var t=r.control,u=n(t).find("#"+r.id)[0];r.editor=new wysihtml5.Editor(u,{toolbar:n(t).find("#"+r.id+"-toolbar")[0],parserRules:wysihtml5ParserRules});wysihtml5.commands.custom_class={exec:function(n,t,i){return wysihtml5.commands.formatBlock.exec(n,t,"p",i,new RegExp(i,"g"))},state:function(n,t,i){return wysihtml5.commands.formatBlock.state(n,t,"p",i,new RegExp(i,"g"))}}}i()})},getEditor:function(){return this.editor},setValue:function(n){var t=this;this.editor&&this.editor.setValue(n);this.base(n)},getValue:function(){var n=null;return this.editor&&(n=this.editor.currentView=="source"?this.editor.sourceView.textarea.value:this.editor.getValue()),n},getTitle:function(){return"wysihtml"},getDescription:function(){return"Provides an instance of a wysihtml control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{wysihtml:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{wysiwyg:{type:"any"}}})}});t.registerFieldClass("wysihtml",t.Fields.wysihtmlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.SummernoteField=t.Fields.TextAreaField.extend({getFieldType:function(){return"summernote"},setup:function(){this.data||(this.data="");this.base();typeof this.options.summernote=="undefined"&&(this.options.summernote={height:null,minHeight:null,maxHeight:null,focus:!0});this.options.placeholder&&(this.options.summernote=this.options.placeholder)},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(!r.isDisplayOnly()&&r.control&&n.fn.summernote)r.on("ready",function(){n(r.control).summernote(r.options.summernote)});n(r.control).bind("destroyed",function(){try{n(r.control).summernote("destroy")}catch(t){}});i()})},getTitle:function(){return"Summernote Editor"},getDescription:function(){return"Provides an instance of a Summernote Editor control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{summernote:{title:"Summernote Editor options",description:"Use this entry to provide configuration options to the underlying Summernote plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{summernote:{type:"any"}}})}});t.registerFieldClass("summernote",t.Fields.SummernoteField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLSummernote=t.Fields.SummernoteField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language CKEditor Field"},getDescription:function(){return"Multi Language CKEditor field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlsummernote",t.Fields.MLSummernote)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLCKEditorField=t.Fields.CKEditorField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base();this.options.ckeditor||(this.options.ckeditor={});CKEDITOR.config.enableConfigHelper&&!this.options.ckeditor.extraPlugins&&(this.options.ckeditor.extraPlugins="dnnpages,confighelper")},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language CKEditor Field"},getDescription:function(){return"Multi Language CKEditor field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlckeditor",t.Fields.MLCKEditorField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFile2Field=t.Fields.File2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).after('')}});t.registerFieldClass("mlfile2",t.Fields.MLFile2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFileField=t.Fields.FileField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getTextControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlfile",t.Fields.MLFileField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFolder2Field=t.Fields.Folder2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlfolder2",t.Fields.MLFolder2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLImage2Field=t.Fields.Image2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlimage2",t.Fields.MLImage2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLImageField=t.Fields.ImageField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getTextControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlimage",t.Fields.MLImageField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLTextAreaField=t.Fields.TextAreaField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Text Field"},getDescription:function(){return"Multi Language Text field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mltextarea",t.Fields.MLTextAreaField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLTextField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Text Field"},getDescription:function(){return"Multi Language Text field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mltext",t.Fields.MLTextField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLUrl2Field=t.Fields.Url2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlurl2",t.Fields.MLUrl2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLUrlField=t.Fields.DnnUrlField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlurl",t.Fields.MLUrlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLwysihtmlField=t.Fields.wysihtmlField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"ML wysihtml Field"},getDescription:function(){return"Provides an instance of a wysihtml control for use in editing MLHTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{wysihtml:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{wysiwyg:{type:"any"}}})}});t.registerFieldClass("mlwysihtml",t.Fields.MLwysihtmlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Accordion=t.Fields.ArrayField.extend({getFieldType:function(){return"accordion"},constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.base();n.options.titleField||n.schema.items&&n.schema.items.properties&&Object.keys(n.schema.items.properties).length&&(n.options.titleField=Object.keys(n.schema.items.properties)[0])},createItem:function(i,r,u,f,e){var o=this;this.base(i,r,u,f,function(i){var f="[no title]",u=i.childrenByPropertyId[o.options.titleField],r;if(u){r=u.getValue();t.isObject(r)&&(r=r[o.culture]);r=r?r:f;i.getContainerEl().closest(".panel").find(".panel-title a").first().text(r);u.on("keyup",function(){var i=this.getValue();t.isObject(i)&&(i=i[o.culture]);i=i?i:f;n(this.getControlEl()).closest(".panel").find(".panel-title a").first().text(i)})}e&&e(i)})},getType:function(){return"array"},getTitle:function(){return"accordion Field"},getDescription:function(){return"Renders array with title"}});t.registerFieldClass("accordion",t.Fields.Accordion)}(jQuery); \ No newline at end of file +(function(n){function r(t,i){var r="";return t&&t.address_components&&n.each(t.address_components,function(t,u){n.each(u.types,function(n,t){if(t==i){r=u.long_name;return}});r!=""}),r}function u(t){var i="";return t&&t.address_components&&n.each(t.address_components,function(t,r){n.each(r.types,function(n,t){if(t=="country"){i=r.short_name;return}});i!=""}),i}function f(n){for(n=n.toUpperCase(),index=0;index<\/div>').appendTo(t),o=n('Geocode Address<\/a>').appendTo(t),o.button&&o.button({text:!0}),o.click(function(){if(google&&google.maps){var i=new google.maps.Geocoder,r=e.getAddress();i&&i.geocode({address:r},function(i,r){r===google.maps.GeocoderStatus.OK?(n(".alpaca-field.lng input.alpaca-control",t).val(i[0].geometry.location.lng()),n(".alpaca-field.lat input.alpaca-control",t).val(i[0].geometry.location.lat())):e.displayMessage("Geocoding failed: "+r)})}else e.displayMessage("Google Map API is not installed.");return!1}).wrap(""),s=n(".alpaca-field.googlesearch input.alpaca-control",t)[0],s&&typeof google!="undefined"&&google&&google.maps&&(h=new google.maps.places.SearchBox(s),google.maps.event.addListener(h,"places_changed",function(){var e=h.getPlaces(),i;e.length!=0&&(i=e[0],n(".alpaca-field.postalcode input.alpaca-control",t).val(r(i,"postal_code")),n(".alpaca-field.city input.alpaca-control",t).val(r(i,"locality")),n(".alpaca-field.street input.alpaca-control",t).val(r(i,"route")),n(".alpaca-field.number input.alpaca-control",t).val(r(i,"street_number")),n(".alpaca-field.country select.alpaca-control",t).val(f(u(i,"country"))),n(".alpaca-field.lng input.alpaca-control",t).val(i.geometry.location.lng()),n(".alpaca-field.lat input.alpaca-control",t).val(i.geometry.location.lat()),s.value="")}),google.maps.event.addDomListener(s,"keydown",function(n){n.keyCode==13&&n.preventDefault()})),e.options.showMapOnLoad&&o.click());i()})},getType:function(){return"any"},getTitle:function(){return"Address"},getDescription:function(){return"Address with Street, City, State, Postal code and Country. Also comes with support for Google map."},getSchemaOfOptions:function(){return i.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return i.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t=[{countryName:"Afghanistan",iso2:"AF",iso3:"AFG",phoneCode:"93"},{countryName:"Albania",iso2:"AL",iso3:"ALB",phoneCode:"355"},{countryName:"Algeria",iso2:"DZ",iso3:"DZA",phoneCode:"213"},{countryName:"American Samoa",iso2:"AS",iso3:"ASM",phoneCode:"1 684"},{countryName:"Andorra",iso2:"AD",iso3:"AND",phoneCode:"376"},{countryName:"Angola",iso2:"AO",iso3:"AGO",phoneCode:"244"},{countryName:"Anguilla",iso2:"AI",iso3:"AIA",phoneCode:"1 264"},{countryName:"Antarctica",iso2:"AQ",iso3:"ATA",phoneCode:"672"},{countryName:"Antigua and Barbuda",iso2:"AG",iso3:"ATG",phoneCode:"1 268"},{countryName:"Argentina",iso2:"AR",iso3:"ARG",phoneCode:"54"},{countryName:"Armenia",iso2:"AM",iso3:"ARM",phoneCode:"374"},{countryName:"Aruba",iso2:"AW",iso3:"ABW",phoneCode:"297"},{countryName:"Australia",iso2:"AU",iso3:"AUS",phoneCode:"61"},{countryName:"Austria",iso2:"AT",iso3:"AUT",phoneCode:"43"},{countryName:"Azerbaijan",iso2:"AZ",iso3:"AZE",phoneCode:"994"},{countryName:"Bahamas",iso2:"BS",iso3:"BHS",phoneCode:"1 242"},{countryName:"Bahrain",iso2:"BH",iso3:"BHR",phoneCode:"973"},{countryName:"Bangladesh",iso2:"BD",iso3:"BGD",phoneCode:"880"},{countryName:"Barbados",iso2:"BB",iso3:"BRB",phoneCode:"1 246"},{countryName:"Belarus",iso2:"BY",iso3:"BLR",phoneCode:"375"},{countryName:"Belgium",iso2:"BE",iso3:"BEL",phoneCode:"32"},{countryName:"Belize",iso2:"BZ",iso3:"BLZ",phoneCode:"501"},{countryName:"Benin",iso2:"BJ",iso3:"BEN",phoneCode:"229"},{countryName:"Bermuda",iso2:"BM",iso3:"BMU",phoneCode:"1 441"},{countryName:"Bhutan",iso2:"BT",iso3:"BTN",phoneCode:"975"},{countryName:"Bolivia",iso2:"BO",iso3:"BOL",phoneCode:"591"},{countryName:"Bosnia and Herzegovina",iso2:"BA",iso3:"BIH",phoneCode:"387"},{countryName:"Botswana",iso2:"BW",iso3:"BWA",phoneCode:"267"},{countryName:"Brazil",iso2:"BR",iso3:"BRA",phoneCode:"55"},{countryName:"British Indian Ocean Territory",iso2:"IO",iso3:"IOT",phoneCode:""},{countryName:"British Virgin Islands",iso2:"VG",iso3:"VGB",phoneCode:"1 284"},{countryName:"Brunei",iso2:"BN",iso3:"BRN",phoneCode:"673"},{countryName:"Bulgaria",iso2:"BG",iso3:"BGR",phoneCode:"359"},{countryName:"Burkina Faso",iso2:"BF",iso3:"BFA",phoneCode:"226"},{countryName:"Burma (Myanmar)",iso2:"MM",iso3:"MMR",phoneCode:"95"},{countryName:"Burundi",iso2:"BI",iso3:"BDI",phoneCode:"257"},{countryName:"Cambodia",iso2:"KH",iso3:"KHM",phoneCode:"855"},{countryName:"Cameroon",iso2:"CM",iso3:"CMR",phoneCode:"237"},{countryName:"Canada",iso2:"CA",iso3:"CAN",phoneCode:"1"},{countryName:"Cape Verde",iso2:"CV",iso3:"CPV",phoneCode:"238"},{countryName:"Cayman Islands",iso2:"KY",iso3:"CYM",phoneCode:"1 345"},{countryName:"Central African Republic",iso2:"CF",iso3:"CAF",phoneCode:"236"},{countryName:"Chad",iso2:"TD",iso3:"TCD",phoneCode:"235"},{countryName:"Chile",iso2:"CL",iso3:"CHL",phoneCode:"56"},{countryName:"China",iso2:"CN",iso3:"CHN",phoneCode:"86"},{countryName:"Christmas Island",iso2:"CX",iso3:"CXR",phoneCode:"61"},{countryName:"Cocos (Keeling) Islands",iso2:"CC",iso3:"CCK",phoneCode:"61"},{countryName:"Colombia",iso2:"CO",iso3:"COL",phoneCode:"57"},{countryName:"Comoros",iso2:"KM",iso3:"COM",phoneCode:"269"},{countryName:"Cook Islands",iso2:"CK",iso3:"COK",phoneCode:"682"},{countryName:"Costa Rica",iso2:"CR",iso3:"CRC",phoneCode:"506"},{countryName:"Croatia",iso2:"HR",iso3:"HRV",phoneCode:"385"},{countryName:"Cuba",iso2:"CU",iso3:"CUB",phoneCode:"53"},{countryName:"Cyprus",iso2:"CY",iso3:"CYP",phoneCode:"357"},{countryName:"Czech Republic",iso2:"CZ",iso3:"CZE",phoneCode:"420"},{countryName:"Democratic Republic of the Congo",iso2:"CD",iso3:"COD",phoneCode:"243"},{countryName:"Denmark",iso2:"DK",iso3:"DNK",phoneCode:"45"},{countryName:"Djibouti",iso2:"DJ",iso3:"DJI",phoneCode:"253"},{countryName:"Dominica",iso2:"DM",iso3:"DMA",phoneCode:"1 767"},{countryName:"Dominican Republic",iso2:"DO",iso3:"DOM",phoneCode:"1 809"},{countryName:"Ecuador",iso2:"EC",iso3:"ECU",phoneCode:"593"},{countryName:"Egypt",iso2:"EG",iso3:"EGY",phoneCode:"20"},{countryName:"El Salvador",iso2:"SV",iso3:"SLV",phoneCode:"503"},{countryName:"Equatorial Guinea",iso2:"GQ",iso3:"GNQ",phoneCode:"240"},{countryName:"Eritrea",iso2:"ER",iso3:"ERI",phoneCode:"291"},{countryName:"Estonia",iso2:"EE",iso3:"EST",phoneCode:"372"},{countryName:"Ethiopia",iso2:"ET",iso3:"ETH",phoneCode:"251"},{countryName:"Falkland Islands",iso2:"FK",iso3:"FLK",phoneCode:"500"},{countryName:"Faroe Islands",iso2:"FO",iso3:"FRO",phoneCode:"298"},{countryName:"Fiji",iso2:"FJ",iso3:"FJI",phoneCode:"679"},{countryName:"Finland",iso2:"FI",iso3:"FIN",phoneCode:"358"},{countryName:"France",iso2:"FR",iso3:"FRA",phoneCode:"33"},{countryName:"French Polynesia",iso2:"PF",iso3:"PYF",phoneCode:"689"},{countryName:"Gabon",iso2:"GA",iso3:"GAB",phoneCode:"241"},{countryName:"Gambia",iso2:"GM",iso3:"GMB",phoneCode:"220"},{countryName:"Gaza Strip",iso2:"",iso3:"",phoneCode:"970"},{countryName:"Georgia",iso2:"GE",iso3:"GEO",phoneCode:"995"},{countryName:"Germany",iso2:"DE",iso3:"DEU",phoneCode:"49"},{countryName:"Ghana",iso2:"GH",iso3:"GHA",phoneCode:"233"},{countryName:"Gibraltar",iso2:"GI",iso3:"GIB",phoneCode:"350"},{countryName:"Greece",iso2:"GR",iso3:"GRC",phoneCode:"30"},{countryName:"Greenland",iso2:"GL",iso3:"GRL",phoneCode:"299"},{countryName:"Grenada",iso2:"GD",iso3:"GRD",phoneCode:"1 473"},{countryName:"Guam",iso2:"GU",iso3:"GUM",phoneCode:"1 671"},{countryName:"Guatemala",iso2:"GT",iso3:"GTM",phoneCode:"502"},{countryName:"Guinea",iso2:"GN",iso3:"GIN",phoneCode:"224"},{countryName:"Guinea-Bissau",iso2:"GW",iso3:"GNB",phoneCode:"245"},{countryName:"Guyana",iso2:"GY",iso3:"GUY",phoneCode:"592"},{countryName:"Haiti",iso2:"HT",iso3:"HTI",phoneCode:"509"},{countryName:"Holy See (Vatican City)",iso2:"VA",iso3:"VAT",phoneCode:"39"},{countryName:"Honduras",iso2:"HN",iso3:"HND",phoneCode:"504"},{countryName:"Hong Kong",iso2:"HK",iso3:"HKG",phoneCode:"852"},{countryName:"Hungary",iso2:"HU",iso3:"HUN",phoneCode:"36"},{countryName:"Iceland",iso2:"IS",iso3:"IS",phoneCode:"354"},{countryName:"India",iso2:"IN",iso3:"IND",phoneCode:"91"},{countryName:"Indonesia",iso2:"ID",iso3:"IDN",phoneCode:"62"},{countryName:"Iran",iso2:"IR",iso3:"IRN",phoneCode:"98"},{countryName:"Iraq",iso2:"IQ",iso3:"IRQ",phoneCode:"964"},{countryName:"Ireland",iso2:"IE",iso3:"IRL",phoneCode:"353"},{countryName:"Isle of Man",iso2:"IM",iso3:"IMN",phoneCode:"44"},{countryName:"Israel",iso2:"IL",iso3:"ISR",phoneCode:"972"},{countryName:"Italy",iso2:"IT",iso3:"ITA",phoneCode:"39"},{countryName:"Ivory Coast",iso2:"CI",iso3:"CIV",phoneCode:"225"},{countryName:"Jamaica",iso2:"JM",iso3:"JAM",phoneCode:"1 876"},{countryName:"Japan",iso2:"JP",iso3:"JPN",phoneCode:"81"},{countryName:"Jersey",iso2:"JE",iso3:"JEY",phoneCode:""},{countryName:"Jordan",iso2:"JO",iso3:"JOR",phoneCode:"962"},{countryName:"Kazakhstan",iso2:"KZ",iso3:"KAZ",phoneCode:"7"},{countryName:"Kenya",iso2:"KE",iso3:"KEN",phoneCode:"254"},{countryName:"Kiribati",iso2:"KI",iso3:"KIR",phoneCode:"686"},{countryName:"Kosovo",iso2:"",iso3:"",phoneCode:"381"},{countryName:"Kuwait",iso2:"KW",iso3:"KWT",phoneCode:"965"},{countryName:"Kyrgyzstan",iso2:"KG",iso3:"KGZ",phoneCode:"996"},{countryName:"Laos",iso2:"LA",iso3:"LAO",phoneCode:"856"},{countryName:"Latvia",iso2:"LV",iso3:"LVA",phoneCode:"371"},{countryName:"Lebanon",iso2:"LB",iso3:"LBN",phoneCode:"961"},{countryName:"Lesotho",iso2:"LS",iso3:"LSO",phoneCode:"266"},{countryName:"Liberia",iso2:"LR",iso3:"LBR",phoneCode:"231"},{countryName:"Libya",iso2:"LY",iso3:"LBY",phoneCode:"218"},{countryName:"Liechtenstein",iso2:"LI",iso3:"LIE",phoneCode:"423"},{countryName:"Lithuania",iso2:"LT",iso3:"LTU",phoneCode:"370"},{countryName:"Luxembourg",iso2:"LU",iso3:"LUX",phoneCode:"352"},{countryName:"Macau",iso2:"MO",iso3:"MAC",phoneCode:"853"},{countryName:"Macedonia",iso2:"MK",iso3:"MKD",phoneCode:"389"},{countryName:"Madagascar",iso2:"MG",iso3:"MDG",phoneCode:"261"},{countryName:"Malawi",iso2:"MW",iso3:"MWI",phoneCode:"265"},{countryName:"Malaysia",iso2:"MY",iso3:"MYS",phoneCode:"60"},{countryName:"Maldives",iso2:"MV",iso3:"MDV",phoneCode:"960"},{countryName:"Mali",iso2:"ML",iso3:"MLI",phoneCode:"223"},{countryName:"Malta",iso2:"MT",iso3:"MLT",phoneCode:"356"},{countryName:"Marshall Islands",iso2:"MH",iso3:"MHL",phoneCode:"692"},{countryName:"Mauritania",iso2:"MR",iso3:"MRT",phoneCode:"222"},{countryName:"Mauritius",iso2:"MU",iso3:"MUS",phoneCode:"230"},{countryName:"Mayotte",iso2:"YT",iso3:"MYT",phoneCode:"262"},{countryName:"Mexico",iso2:"MX",iso3:"MEX",phoneCode:"52"},{countryName:"Micronesia",iso2:"FM",iso3:"FSM",phoneCode:"691"},{countryName:"Moldova",iso2:"MD",iso3:"MDA",phoneCode:"373"},{countryName:"Monaco",iso2:"MC",iso3:"MCO",phoneCode:"377"},{countryName:"Mongolia",iso2:"MN",iso3:"MNG",phoneCode:"976"},{countryName:"Montenegro",iso2:"ME",iso3:"MNE",phoneCode:"382"},{countryName:"Montserrat",iso2:"MS",iso3:"MSR",phoneCode:"1 664"},{countryName:"Morocco",iso2:"MA",iso3:"MAR",phoneCode:"212"},{countryName:"Mozambique",iso2:"MZ",iso3:"MOZ",phoneCode:"258"},{countryName:"Namibia",iso2:"NA",iso3:"NAM",phoneCode:"264"},{countryName:"Nauru",iso2:"NR",iso3:"NRU",phoneCode:"674"},{countryName:"Nepal",iso2:"NP",iso3:"NPL",phoneCode:"977"},{countryName:"Netherlands",iso2:"NL",iso3:"NLD",phoneCode:"31"},{countryName:"Netherlands Antilles",iso2:"AN",iso3:"ANT",phoneCode:"599"},{countryName:"New Caledonia",iso2:"NC",iso3:"NCL",phoneCode:"687"},{countryName:"New Zealand",iso2:"NZ",iso3:"NZL",phoneCode:"64"},{countryName:"Nicaragua",iso2:"NI",iso3:"NIC",phoneCode:"505"},{countryName:"Niger",iso2:"NE",iso3:"NER",phoneCode:"227"},{countryName:"Nigeria",iso2:"NG",iso3:"NGA",phoneCode:"234"},{countryName:"Niue",iso2:"NU",iso3:"NIU",phoneCode:"683"},{countryName:"Norfolk Island",iso2:"",iso3:"NFK",phoneCode:"672"},{countryName:"North Korea",iso2:"KP",iso3:"PRK",phoneCode:"850"},{countryName:"Northern Mariana Islands",iso2:"MP",iso3:"MNP",phoneCode:"1 670"},{countryName:"Norway",iso2:"NO",iso3:"NOR",phoneCode:"47"},{countryName:"Oman",iso2:"OM",iso3:"OMN",phoneCode:"968"},{countryName:"Pakistan",iso2:"PK",iso3:"PAK",phoneCode:"92"},{countryName:"Palau",iso2:"PW",iso3:"PLW",phoneCode:"680"},{countryName:"Panama",iso2:"PA",iso3:"PAN",phoneCode:"507"},{countryName:"Papua New Guinea",iso2:"PG",iso3:"PNG",phoneCode:"675"},{countryName:"Paraguay",iso2:"PY",iso3:"PRY",phoneCode:"595"},{countryName:"Peru",iso2:"PE",iso3:"PER",phoneCode:"51"},{countryName:"Philippines",iso2:"PH",iso3:"PHL",phoneCode:"63"},{countryName:"Pitcairn Islands",iso2:"PN",iso3:"PCN",phoneCode:"870"},{countryName:"Poland",iso2:"PL",iso3:"POL",phoneCode:"48"},{countryName:"Portugal",iso2:"PT",iso3:"PRT",phoneCode:"351"},{countryName:"Puerto Rico",iso2:"PR",iso3:"PRI",phoneCode:"1"},{countryName:"Qatar",iso2:"QA",iso3:"QAT",phoneCode:"974"},{countryName:"Republic of the Congo",iso2:"CG",iso3:"COG",phoneCode:"242"},{countryName:"Romania",iso2:"RO",iso3:"ROU",phoneCode:"40"},{countryName:"Russia",iso2:"RU",iso3:"RUS",phoneCode:"7"},{countryName:"Rwanda",iso2:"RW",iso3:"RWA",phoneCode:"250"},{countryName:"Saint Barthelemy",iso2:"BL",iso3:"BLM",phoneCode:"590"},{countryName:"Saint Helena",iso2:"SH",iso3:"SHN",phoneCode:"290"},{countryName:"Saint Kitts and Nevis",iso2:"KN",iso3:"KNA",phoneCode:"1 869"},{countryName:"Saint Lucia",iso2:"LC",iso3:"LCA",phoneCode:"1 758"},{countryName:"Saint Martin",iso2:"MF",iso3:"MAF",phoneCode:"1 599"},{countryName:"Saint Pierre and Miquelon",iso2:"PM",iso3:"SPM",phoneCode:"508"},{countryName:"Saint Vincent and the Grenadines",iso2:"VC",iso3:"VCT",phoneCode:"1 784"},{countryName:"Samoa",iso2:"WS",iso3:"WSM",phoneCode:"685"},{countryName:"San Marino",iso2:"SM",iso3:"SMR",phoneCode:"378"},{countryName:"Sao Tome and Principe",iso2:"ST",iso3:"STP",phoneCode:"239"},{countryName:"Saudi Arabia",iso2:"SA",iso3:"SAU",phoneCode:"966"},{countryName:"Senegal",iso2:"SN",iso3:"SEN",phoneCode:"221"},{countryName:"Serbia",iso2:"RS",iso3:"SRB",phoneCode:"381"},{countryName:"Seychelles",iso2:"SC",iso3:"SYC",phoneCode:"248"},{countryName:"Sierra Leone",iso2:"SL",iso3:"SLE",phoneCode:"232"},{countryName:"Singapore",iso2:"SG",iso3:"SGP",phoneCode:"65"},{countryName:"Slovakia",iso2:"SK",iso3:"SVK",phoneCode:"421"},{countryName:"Slovenia",iso2:"SI",iso3:"SVN",phoneCode:"386"},{countryName:"Solomon Islands",iso2:"SB",iso3:"SLB",phoneCode:"677"},{countryName:"Somalia",iso2:"SO",iso3:"SOM",phoneCode:"252"},{countryName:"South Africa",iso2:"ZA",iso3:"ZAF",phoneCode:"27"},{countryName:"South Korea",iso2:"KR",iso3:"KOR",phoneCode:"82"},{countryName:"Spain",iso2:"ES",iso3:"ESP",phoneCode:"34"},{countryName:"Sri Lanka",iso2:"LK",iso3:"LKA",phoneCode:"94"},{countryName:"Sudan",iso2:"SD",iso3:"SDN",phoneCode:"249"},{countryName:"Suriname",iso2:"SR",iso3:"SUR",phoneCode:"597"},{countryName:"Svalbard",iso2:"SJ",iso3:"SJM",phoneCode:""},{countryName:"Swaziland",iso2:"SZ",iso3:"SWZ",phoneCode:"268"},{countryName:"Sweden",iso2:"SE",iso3:"SWE",phoneCode:"46"},{countryName:"Switzerland",iso2:"CH",iso3:"CHE",phoneCode:"41"},{countryName:"Syria",iso2:"SY",iso3:"SYR",phoneCode:"963"},{countryName:"Taiwan",iso2:"TW",iso3:"TWN",phoneCode:"886"},{countryName:"Tajikistan",iso2:"TJ",iso3:"TJK",phoneCode:"992"},{countryName:"Tanzania",iso2:"TZ",iso3:"TZA",phoneCode:"255"},{countryName:"Thailand",iso2:"TH",iso3:"THA",phoneCode:"66"},{countryName:"Timor-Leste",iso2:"TL",iso3:"TLS",phoneCode:"670"},{countryName:"Togo",iso2:"TG",iso3:"TGO",phoneCode:"228"},{countryName:"Tokelau",iso2:"TK",iso3:"TKL",phoneCode:"690"},{countryName:"Tonga",iso2:"TO",iso3:"TON",phoneCode:"676"},{countryName:"Trinidad and Tobago",iso2:"TT",iso3:"TTO",phoneCode:"1 868"},{countryName:"Tunisia",iso2:"TN",iso3:"TUN",phoneCode:"216"},{countryName:"Turkey",iso2:"TR",iso3:"TUR",phoneCode:"90"},{countryName:"Turkmenistan",iso2:"TM",iso3:"TKM",phoneCode:"993"},{countryName:"Turks and Caicos Islands",iso2:"TC",iso3:"TCA",phoneCode:"1 649"},{countryName:"Tuvalu",iso2:"TV",iso3:"TUV",phoneCode:"688"},{countryName:"Uganda",iso2:"UG",iso3:"UGA",phoneCode:"256"},{countryName:"Ukraine",iso2:"UA",iso3:"UKR",phoneCode:"380"},{countryName:"United Arab Emirates",iso2:"AE",iso3:"ARE",phoneCode:"971"},{countryName:"United Kingdom",iso2:"GB",iso3:"GBR",phoneCode:"44"},{countryName:"United States",iso2:"US",iso3:"USA",phoneCode:"1"},{countryName:"Uruguay",iso2:"UY",iso3:"URY",phoneCode:"598"},{countryName:"US Virgin Islands",iso2:"VI",iso3:"VIR",phoneCode:"1 340"},{countryName:"Uzbekistan",iso2:"UZ",iso3:"UZB",phoneCode:"998"},{countryName:"Vanuatu",iso2:"VU",iso3:"VUT",phoneCode:"678"},{countryName:"Venezuela",iso2:"VE",iso3:"VEN",phoneCode:"58"},{countryName:"Vietnam",iso2:"VN",iso3:"VNM",phoneCode:"84"},{countryName:"Wallis and Futuna",iso2:"WF",iso3:"WLF",phoneCode:"681"},{countryName:"West Bank",iso2:"",iso3:"",phoneCode:"970"},{countryName:"Western Sahara",iso2:"EH",iso3:"ESH",phoneCode:""},{countryName:"Yemen",iso2:"YE",iso3:"YEM",phoneCode:"967"},{countryName:"Zambia",iso2:"ZM",iso3:"ZMB",phoneCode:"260"},{countryName:"Zimbabwe",iso2:"ZW",iso3:"ZWE",phoneCode:"263"}];i.registerFieldClass("address",i.Fields.AddressField)})(jQuery),function(n){var t=n.alpaca;t.Fields.CKEditorField=t.Fields.TextAreaField.extend({getFieldType:function(){return"ckeditor"},setup:function(){this.data||(this.data="");this.base();typeof this.options.ckeditor=="undefined"&&(this.options.ckeditor={});typeof this.options.configset=="undefined"&&(this.options.configset="")},afterRenderControl:function(t,i){var r=this;this.base(t,function(){var t,u;if(!r.isDisplayOnly()&&r.control&&typeof CKEDITOR!="undefined"){t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink"]},{name:"document",groups:["mode","document","doctools"],items:["Source"]},],format_tags:"p;h1;h2;h3;pre",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]};r.options.configset=="basic"?t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink"]},{name:"document",groups:["mode","document","doctools"],items:["Maximize","Source"]},],format_tags:"p;h1;h2;h3;pre",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]}:r.options.configset=="standard"?t={toolbar:[{name:"basicstyles",groups:["basicstyles","cleanup"],items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"styles",items:["Styles","Format"]},{name:"paragraph",groups:["list","indent","blocks","align"],items:["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock",]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Table","Smiley","SpecialChar","Iframe"]},{name:"document",groups:["mode","document","doctools"],items:["Maximize","ShowBlocks","Source"]}],format_tags:"p;h1;h2;h3;pre;div",extraAllowedContent:"table tr th td caption[*](*);div span(*);",removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]}:r.options.configset=="full"&&(t={toolbar:[{name:"document",items:["Save","NewPage","DocProps","Preview","Print","-","Templates"]},{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"editing",items:["Find","Replace","-","SelectAll","-","SpellChecker","Scayt"]},{name:"forms",items:["Form","Checkbox","Radio","TextField","Textarea","Select","Button","ImageButton","HiddenField"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote","CreateDiv","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Flash","Table","HorizontalRule","Smiley","SpecialChar","PageBreak","Iframe"]},"/",{name:"styles",items:["Styles","Format","Font","FontSize"]},{name:"colors",items:["TextColor","BGColor"]},{name:"tools",items:["Maximize","ShowBlocks","-","About","-","Source"]}],format_tags:"p;h1;h2;h3;pre;div",allowedContentRules:!0,removeDialogTabs:"image:advanced;link:advanced",removePlugins:"elementspath",extraPlugins:"dnnpages",height:150,customConfig:"",stylesSet:[]});u=n.extend({},t,r.options.ckeditor);r.on("ready",function(){r.editor||(r.editor=CKEDITOR.replace(n(r.control)[0],u),r.initCKEditorEvents())})}n(r.control).bind("destroyed",function(){if(r.editor){r.editor.removeAllListeners();try{r.editor.destroy(!1)}catch(n){}r.editor=null}});i()})},initCKEditorEvents:function(){var n=this;if(n.editor){n.editor.on("click",function(t){n.onClick.call(n,t);n.trigger("click",t)});n.editor.on("change",function(t){n.onChange();n.triggerWithPropagation("change",t)});n.editor.on("blur",function(t){n.onBlur();n.trigger("blur",t)});n.editor.on("focus",function(t){n.onFocus.call(n,t);n.trigger("focus",t)});n.editor.on("key",function(t){n.onKeyPress.call(n,t);n.trigger("keypress",t)})}},setValue:function(n){var t=this;this.base(n);t.editor&&t.editor.setData(n)},getControlValue:function(){var n=this,t=null;return n.editor&&(t=n.editor.getData()),t},destroy:function(){var n=this;n.editor&&(n.editor.destroy(),n.editor=null);this.base()},getTitle:function(){return"CK Editor"},getDescription:function(){return"Provides an instance of a CK Editor control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{ckeditor:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{ckeditor:{type:"any"}}})}});t.registerFieldClass("ckeditor",t.Fields.CKEditorField)}(jQuery),function(n){var t=n.alpaca;t.Fields.DateField=t.Fields.TextField.extend({getFieldType:function(){return"date"},getDefaultFormat:function(){return"MM/DD/YYYY"},getDefaultExtraFormats:function(){return[]},setup:function(){var n=this,t;this.base();n.options.picker||(n.options.picker={});typeof n.options.picker.useCurrent=="undefined"&&(n.options.picker.useCurrent=!1);!n.options.dateFormat;n.options.picker.format||(n.options.picker.format=n.options.dateFormat);n.options.picker.extraFormats||(t=n.getDefaultExtraFormats(),t&&(n.options.picker.extraFormats=t));typeof n.options.manualEntry=="undefined"&&(n.options.manualEntry=!1);typeof n.options.icon=="undefined"&&(n.options.icon=!1)},onKeyPress:function(n){if(this.options.manualEntry)n.preventDefault(),n.stopImmediatePropagation();else{this.base(n);return}},onKeyDown:function(n){if(this.options.manualEntry)n.preventDefault(),n.stopImmediatePropagation();else{this.base(n);return}},beforeRenderControl:function(n,t){this.field.css("position","relative");t()},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(r.view.type!=="display"){if(t=r.getControlEl(),r.options.icon){r.getControlEl().wrap('
<\/div>');r.getControlEl().after('<\/span><\/span>');var t=r.getControlEl().parent()}if(n.fn.datetimepicker){t.datetimepicker(r.options.picker);r.picker=t.data("DateTimePicker");t.on("dp.change",function(n){setTimeout(function(){r.onChange.call(r,n);r.triggerWithPropagation("change",n)},250)});r.data&&r.picker.date(r.data)}}i()})},getDate:function(){var n=this,t=null;try{t=n.picker?n.picker.date()?n.picker.date()._d:null:new Date(this.getValue())}catch(i){console.error(i)}return t},date:function(){return this.getDate()},onChange:function(){this.base();this.refreshValidationState()},isAutoFocusable:function(){return!1},handleValidate:function(){var r=this.base(),n=this.validation,i=this._validateDateFormat();return n.invalidDate={message:i?"":t.substituteTokens(this.getMessage("invalidDate"),[this.options.dateFormat]),status:i},r&&n.invalidDate.status},_validateDateFormat:function(){var n=this,r=!0,u,i,t;if(n.options.dateFormat&&(u=n.getValue(),u||n.isRequired())){if(i=[],i.push(n.options.dateFormat),n.options.picker&&n.options.picker.extraFormats)for(t=0;tBootstrap DateTime Picker<\/a>.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{dateFormat:{type:"text"},picker:{type:"any"}}})}});t.registerMessages({invalidDate:"Invalid date for format {0}"});t.registerFieldClass("date",t.Fields.DateField);t.registerDefaultFormatFieldMapping("date","date")}(jQuery),function(n){var t=n.alpaca;t.Fields.CheckBoxField=t.ControlField.extend({getFieldType:function(){return"checkbox"},setup:function(){var i=this,r;i.base();typeof i.options.multiple=="undefined"&&(i.schema.type==="array"?i.options.multiple=!0:typeof i.schema["enum"]!="undefined"&&(i.options.multiple=!0));i.options.multiple?(i.checkboxOptions=[],i.getEnum()&&(i.sortEnum(),r=i.getOptionLabels(),n.each(i.getEnum(),function(n,u){var f=u;r&&(t.isEmpty(r[n])?t.isEmpty(r[u])||(f=r[u]):f=r[n]);i.checkboxOptions.push({value:u,text:f})})),i.options.datasource&&!i.options.dataSource&&(i.options.dataSource=i.options.datasource,delete i.options.datasource),typeof i.options.useDataSourceAsEnum=="undefined"&&(i.options.useDataSourceAsEnum=!0)):this.options.rightLabel||(this.options.rightLabel="")},prepareControlModel:function(n){var t=this;this.base(function(i){t.checkboxOptions&&(i.checkboxOptions=t.checkboxOptions);n(i)})},getEnum:function(){var n=this.base();return n||this.schema&&this.schema.items&&this.schema.items.enum&&(n=this.schema.items.enum),n},getOptionLabels:function(){var n=this.base();return n||this.options&&this.options.items&&this.options.items.optionLabels&&(n=this.options.items.optionLabels),n},onClick:function(){this.refreshValidationState()},beforeRenderControl:function(n,t){var i=this;this.base(n,function(){i.options.dataSource?(i.options.multiple=!0,i.checkboxOptions||(n.checkboxOptions=i.checkboxOptions=[]),i.checkboxOptions.length=0,i.invokeDataSource(i.checkboxOptions,n,function(){var r,u,n;if(i.options.useDataSourceAsEnum){for(r=[],u=[],n=0;n0?t.checked(n(e[0])):!1;return r},isEmpty:function(){var n=this,i=this.getControlValue();if(n.options.multiple){if(n.schema.type==="array")return i.length==0;if(n.schema.type==="string")return t.isEmpty(i)}else return!i},setValue:function(i){var r=this,f=function(i){t.isString(i)&&(i=i==="true");var u=n(r.getFieldEl()).find("input");u.length>0&&t.checked(n(u[0]),i)},e=function(u){var f,e,o;for(typeof u=="string"&&(u=u.split(",")),f=0;f0&&t.checked(n(o[0]),i)},u=!1;r.options.multiple?typeof i=="string"?(e(i),u=!0):t.isArray(i)&&(e(i),u=!0):typeof i=="boolean"?(f(i),u=!0):typeof i=="string"&&(f(i),u=!0);!u&&i&&t.logError("CheckboxField cannot set value for schema.type="+r.schema.type+" and value="+i);this.base(i)},_validateEnum:function(){var i=this,n;return i.options.multiple?(n=i.getValue(),!i.isRequired()&&t.isValEmpty(n))?!0:(typeof n=="string"&&(n=n.split(",")),t.anyEquality(n,i.getEnum())):!0},disable:function(){n(this.control).find("input").each(function(){n(this).disabled=!0;n(this).prop("disabled",!0)})},enable:function(){n(this.control).find("input").each(function(){n(this).disabled=!1;n(this).prop("disabled",!1)})},getType:function(){return"boolean"},getTitle:function(){return"Checkbox Field"},getDescription:function(){return"Checkbox Field for boolean (true/false), string ('true', 'false' or comma-delimited string of values) or data array."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{rightLabel:{title:"Option Label",description:"Optional right-hand side label for single checkbox field.",type:"string"},multiple:{title:"Multiple",description:"Whether to render multiple checkboxes for multi-valued type (such as an array or a comma-delimited string)",type:"boolean"},dataSource:{title:"Option DataSource",description:"Data source for generating list of options. This can be a string or a function. If a string, it is considered to be a URI to a service that produces a object containing key/value pairs or an array of elements of structure {'text': '', 'value': ''}. This can also be a function that is called to produce the same list.",type:"string"},useDataSourceAsEnum:{title:"Use Data Source as Enumerated Values",description:"Whether to constrain the field's schema enum property to the values that come back from the data source.",type:"boolean","default":!0}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{rightLabel:{type:"text"},multiple:{type:"checkbox"},dataSource:{type:"text"}}})}});t.registerFieldClass("checkbox",t.Fields.CheckBoxField);t.registerDefaultSchemaFieldMapping("boolean","checkbox")}(jQuery),function(n){var t=n.alpaca;t.Fields.MultiUploadField=t.Fields.ArrayField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.itemsCount=0},setup:function(){var t,n;if(this.base(),this.options.uploadfolder||(this.options.uploadfolder=""),this.urlfield="",this.options&&this.options.items&&(this.options.items.fields||this.options.items.type)&&this.options.items.type!="image"&&this.options.items.fields)for(t in this.options.items.fields)if(n=this.options.items.fields[t],n.type=="image"||n.type=="mlimage"||n.type=="imagecrop"){this.urlfield=t;this.options.uploadfolder=n.uploadfolder;break}else if(n.type=="file"||n.type=="mlfile"){this.urlfield=t;this.options.uploadfolder=n.uploadfolder;break}else if(n.type=="image2"||n.type=="mlimage2"){this.urlfield=t;this.options.uploadfolder=n.folder;break}else if(n.type=="file2"||n.type=="mlfile2"){this.urlfield=t;this.options.uploadfolder=n.folder;break}},afterRenderContainer:function(t,i){var r=this;this.base(t,function(){var t=r.getContainerEl(),f,u;r.isDisplayOnly()||(n('
<\/div>').prependTo(t),f=n('
<\/div><\/div>').prependTo(t),u=n('').prependTo(t),this.wrapper=n("<\/span>"),this.wrapper.text("Upload muliple files"),u.wrap(this.wrapper),r.sf&&u.fileupload({dataType:"json",url:r.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:r.options.uploadfolder},beforeSend:r.sf.setModuleHeaders,change:function(){r.itemsCount=r.children.length},add:function(n,t){t.submit()},progressall:function(t,i){var r=parseInt(i.loaded/i.total*100,10);n(".bar",f).css("width",r+"%").find("span").html(r+"%")},done:function(t,i){i.result&&n.each(i.result,function(n,t){r.handleActionBarAddItemClick(r.itemsCount-1,function(n){var i=n.getValue();r.urlfield==""?i=t.url:i[r.urlfield]=t.url;n.setValue(i)});r.itemsCount++})}}).data("loaded",!0));i()})},getTitle:function(){return"Multi Upload"},getDescription:function(){return"Multi Upload for images and files"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("multiupload",t.Fields.MultiUploadField)}(jQuery),function(n){var t=n.alpaca;t.Fields.DocumentsField=t.Fields.MultiUploadField.extend({setup:function(){this.base();this.schema.items={type:"object",properties:{Title:{title:"Title",type:"string"},File:{title:"File",type:"string"}}};t.merge(this.options.items,{fields:{File:{type:"file"}}});this.urlfield="File"},getTitle:function(){return"Gallery"},getDescription:function(){return"Image Gallery"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("documents",t.Fields.DocumentsField)}(jQuery),function(n){var t=n.alpaca;t.Fields.File2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"file2"},setup:function(){var n=this,t;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.filter||(this.options.filter="");this.options.showUrlUpload||(this.options.showUrlUpload=!1);this.options.showFileUpload||(this.options.showFileUpload=!1);this.options.showUrlUpload&&(this.options.buttons={downloadButton:{value:"Upload External File",click:function(){this.DownLoadFile()}}});n=this;this.options.lazyLoading&&(t=10,this.options.select2={ajax:{url:this.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FilesLookup",beforeSend:this.sf.setModuleHeaders,type:"get",dataType:"json",delay:250,data:function(i){return{q:i.term?i.term:"*",d:n.options.folder,filter:n.options.filter,pageIndex:i.page?i.page:1,pageSize:t}},processResults:function(i,r){return r.page=r.page||1,r.page==1&&i.items.unshift({id:"",text:n.options.noneLabel}),{results:i.items,pagination:{more:r.page*t0){if(i=n(this.control).find("select").val(),typeof i=="undefined")i=this.data;else if(t.isArray(i))for(r=0;r0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(t.loading)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n("select",u.getControlEl()).select2(i)}u.options.uploadhidden?n(u.getControlEl()).find("input[type=file]").hide():u.sf&&n(u.getControlEl()).find("input[type=file]").fileupload({dataType:"json",url:u.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:u.options.folder},beforeSend:u.sf.setModuleHeaders,add:function(n,t){if(t&&t.files&&t.files.length>0)if(u.isFilter(t.files[0].name))t.submit();else{alert("file not in filter");return}},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){$select=n(u.control).find("select");u.options.lazyLoading?u.getFileUrl(i.id,function(n){$select.find("option").first().val(n.id).text(n.text).removeData();$select.val(i.id).change()}):u.refresh(function(){$select=n(u.control).find("select");$select.val(i.id).change()})})}}).data("loaded",!0);r()})},getFileUrl:function(t,i){var r=this,u;r.sf&&(u={fileid:t,folder:r.options.folder},n.ajax({url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileInfo",beforeSend:r.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:u,success:function(n){i&&i(n)},error:function(){alert("Error getFileUrl "+t)}}))},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(){}),r):!0:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTextControlEl:function(){var t=this;return n(t.getControlEl()).find("input[type=text]")},DownLoadFile:function(){var t=this,u=this.getTextControlEl(),i=u.val(),r;if(!i||!t.isURL(i)){alert("url not valid");return}if(!t.isFilter(i)){alert("url not in filter");return}r={url:i,uploadfolder:t.options.folder};n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/DownloadFile",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){i.error?alert(i.error):($select=n(t.control).find("select"),t.options.lazyLoading?t.getFileUrl(i.id,function(n){$select.find("option").first().val(n.id).text(n.text).removeData();$select.val(i.id).change()}):t.refresh(function(){$select=n(t.control).find("select");$select.val(i.id).change()}));setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},isURL:function(n){var t=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i");return n.length<2083&&t.test(n)},isFilter:function(n){if(this.options.filter){var t=new RegExp(this.options.filter,"i");return n.length<2083&&t.test(n)}return!0},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("file2",t.Fields.File2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.FileField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"file"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.downloadButton||(this.options.downloadButton=!1);this.options.downloadButton&&(this.options.buttons={downloadButton:{value:"Download",click:function(){this.DownLoadFile()}}});this.base()},getTitle:function(){return"File Field"},getDescription:function(){return"File Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?i.val(""):i.val(n));this.updateMaxLengthIndicator()},getValue:function(){var t=null,n=this.getTextControlEl();return n&&n.length>0&&(t=n.val()),t},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl();i.sf&&n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,u){u.result&&n.each(u.result,function(t,u){i.setValue(u.url);n(r).change()})}}).data("loaded",!0);t()},applyTypeAhead:function(){var r=this,o,i,s,f,e,h,c,l,u;if(r.control.typeahead&&r.options.typeahead&&!t.isEmpty(r.options.typeahead)&&r.sf){if(o=r.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=r.getId()),s=r.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Files?q=%QUERY&d="+s,ajax:{beforeSend:r.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"{{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));u=this.getTextControlEl();n(u).typeahead(o,i);n(u).on("typeahead:autocompleted",function(t,i){r.setValue(i.value);n(u).change()});n(u).on("typeahead:selected",function(t,i){r.setValue(i.value);n(u).change()});if(f){if(f.autocompleted)n(u).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(u).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(u).change(function(){var t=n(this).val(),i=n(u).typeahead("val");i!==t&&n(u).typeahead("val",t)});n(r.field).find("span.twitter-typeahead").first().css("display","block");n(r.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}},DownLoadFile:function(){var t=this,u=this.getTextControlEl(),i=t.getValue(),f=new RegExp("^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|(www‌​.)?){1}([0-9A-Za-z-‌​\\.@:%_+~#=]+)+((\\‌​.[a-zA-Z]{2,3})+)(/(‌​.)*)?(\\?(.)*)?"),r;if(!i||!t.isURL(i)){alert("url not valid");return}r={url:i,uploadfolder:t.options.uploadfolder};n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/DownloadFile",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){i.error?alert(i.error):(t.setValue(i.url),n(u).change());setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},isURL:function(n){var t=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i");return n.length<2083&&t.test(n)}});t.registerFieldClass("file",t.Fields.FileField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Folder2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.filter||(this.options.filter="");this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getFileUrl:function(t){var i={fileid:t};n.ajax({url:self.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:self.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:i,success:function(n){return n},error:function(){return""}})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("folder2",t.Fields.Folder2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.GalleryField=t.Fields.MultiUploadField.extend({setup:function(){this.base();this.schema.items={type:"object",properties:{Image:{title:"Image",type:"string"}}};t.merge(this.options.items,{fields:{Image:{type:"image"}}});this.urlfield="Image"},getTitle:function(){return"Gallery"},getDescription:function(){return"Image Gallery"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}});t.registerFieldClass("gallery",t.Fields.GalleryField)}(jQuery),function(n){var t=n.alpaca;t.Fields.GuidField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f)},setup:function(){var n=this;this.base()},setValue:function(n){t.isEmpty(n)&&(n=this.createGuid());this.base(n)},getValue:function(){var n=this.base();return(t.isEmpty(n)||n=="")&&(n=this.createGuid()),n},createGuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n==="x"?t:t&3|8;return i.toString(16)})},getTitle:function(){return"Guid Field"},getDescription:function(){return"Guid field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("guid",t.Fields.GuidField)}(jQuery),function(n){var t=n.alpaca;t.Fields.IconField=t.Fields.TextField.extend({setup:function(){this.options.glyphicons===undefined&&(this.options.glyphicons=!1);this.options.bootstrap===undefined&&(this.options.bootstrap=!1);this.options.fontawesome===undefined&&(this.options.fontawesome=!0);this.base()},setValue:function(n){this.base(n);this.loadIcons()},getTitle:function(){return"Icon Field"},getDescription:function(){return"Font Icon Field."},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(n){var t=this,i=this.control;this.control.fontIconPicker({emptyIcon:!0,hasSearch:!0});this.loadIcons();n()},loadIcons:function(){var o=this,t=[],e;if(this.options.bootstrap&&n.each(i,function(n,i){t.push("glyphicon "+i)}),this.options.fontawesome)for(e in r)t.push("fa "+e);this.options.glyphicons&&(n.each(u,function(n,i){t.push("glyphicons "+i)}),n.each(f,function(n,i){t.push("social "+i)}));this.control.fontIconPicker().setIcons(t)}});t.registerFieldClass("icon",t.Fields.IconField);var i=["glyphicon-glass","glyphicon-music","glyphicon-search","glyphicon-envelope","glyphicon-heart","glyphicon-star","glyphicon-star-empty","glyphicon-user","glyphicon-film","glyphicon-th-large","glyphicon-th","glyphicon-th-list","glyphicon-ok","glyphicon-remove","glyphicon-zoom-in","glyphicon-zoom-out","glyphicon-off","glyphicon-signal","glyphicon-cog","glyphicon-trash","glyphicon-home","glyphicon-file","glyphicon-time","glyphicon-road","glyphicon-download-alt","glyphicon-download","glyphicon-upload","glyphicon-inbox","glyphicon-play-circle","glyphicon-repeat","glyphicon-refresh","glyphicon-list-alt","glyphicon-lock","glyphicon-flag","glyphicon-headphones","glyphicon-volume-off","glyphicon-volume-down","glyphicon-volume-up","glyphicon-qrcode","glyphicon-barcode","glyphicon-tag","glyphicon-tags","glyphicon-book","glyphicon-bookmark","glyphicon-print","glyphicon-camera","glyphicon-font","glyphicon-bold","glyphicon-italic","glyphicon-text-height","glyphicon-text-width","glyphicon-align-left","glyphicon-align-center","glyphicon-align-right","glyphicon-align-justify","glyphicon-list","glyphicon-indent-left","glyphicon-indent-right","glyphicon-facetime-video","glyphicon-picture","glyphicon-pencil","glyphicon-map-marker","glyphicon-adjust","glyphicon-tint","glyphicon-edit","glyphicon-share","glyphicon-check","glyphicon-move","glyphicon-step-backward","glyphicon-fast-backward","glyphicon-backward","glyphicon-play","glyphicon-pause","glyphicon-stop","glyphicon-forward","glyphicon-fast-forward","glyphicon-step-forward","glyphicon-eject","glyphicon-chevron-left","glyphicon-chevron-right","glyphicon-plus-sign","glyphicon-minus-sign","glyphicon-remove-sign","glyphicon-ok-sign","glyphicon-question-sign","glyphicon-info-sign","glyphicon-screenshot","glyphicon-remove-circle","glyphicon-ok-circle","glyphicon-ban-circle","glyphicon-arrow-left","glyphicon-arrow-right","glyphicon-arrow-up","glyphicon-arrow-down","glyphicon-share-alt","glyphicon-resize-full","glyphicon-resize-small","glyphicon-plus","glyphicon-minus","glyphicon-asterisk","glyphicon-exclamation-sign","glyphicon-gift","glyphicon-leaf","glyphicon-fire","glyphicon-eye-open","glyphicon-eye-close","glyphicon-warning-sign","glyphicon-plane","glyphicon-calendar","glyphicon-random","glyphicon-comment","glyphicon-magnet","glyphicon-chevron-up","glyphicon-chevron-down","glyphicon-retweet","glyphicon-shopping-cart","glyphicon-folder-close","glyphicon-folder-open","glyphicon-resize-vertical","glyphicon-resize-horizontal","glyphicon-hdd","glyphicon-bullhorn","glyphicon-bell","glyphicon-certificate","glyphicon-thumbs-up","glyphicon-thumbs-down","glyphicon-hand-right","glyphicon-hand-left","glyphicon-hand-up","glyphicon-hand-down","glyphicon-circle-arrow-right","glyphicon-circle-arrow-left","glyphicon-circle-arrow-up","glyphicon-circle-arrow-down","glyphicon-globe","glyphicon-wrench","glyphicon-tasks","glyphicon-filter","glyphicon-briefcase","glyphicon-fullscreen","glyphicon-dashboard","glyphicon-paperclip","glyphicon-heart-empty","glyphicon-link","glyphicon-phone","glyphicon-pushpin","glyphicon-euro","glyphicon-usd","glyphicon-gbp","glyphicon-sort","glyphicon-sort-by-alphabet","glyphicon-sort-by-alphabet-alt","glyphicon-sort-by-order","glyphicon-sort-by-order-alt","glyphicon-sort-by-attributes","glyphicon-sort-by-attributes-alt","glyphicon-unchecked","glyphicon-expand","glyphicon-collapse","glyphicon-collapse-top"],r={"fa-500px":{unicode:"\\f26e",name:"500px"},"fa-address-book":{unicode:"\\f2b9",name:"Address book"},"fa-address-book-o":{unicode:"\\f2ba",name:"Address book o"},"fa-address-card":{unicode:"\\f2bb",name:"Address card"},"fa-address-card-o":{unicode:"\\f2bc",name:"Address card o"},"fa-adjust":{unicode:"\\f042",name:"Adjust"},"fa-adn":{unicode:"\\f170",name:"Adn"},"fa-align-center":{unicode:"\\f037",name:"Align center"},"fa-align-justify":{unicode:"\\f039",name:"Align justify"},"fa-align-left":{unicode:"\\f036",name:"Align left"},"fa-align-right":{unicode:"\\f038",name:"Align right"},"fa-amazon":{unicode:"\\f270",name:"Amazon"},"fa-ambulance":{unicode:"\\f0f9",name:"Ambulance"},"fa-american-sign-language-interpreting":{unicode:"\\f2a3",name:"American sign language interpreting"},"fa-anchor":{unicode:"\\f13d",name:"Anchor"},"fa-android":{unicode:"\\f17b",name:"Android"},"fa-angellist":{unicode:"\\f209",name:"Angellist"},"fa-angle-double-down":{unicode:"\\f103",name:"Angle double down"},"fa-angle-double-left":{unicode:"\\f100",name:"Angle double left"},"fa-angle-double-right":{unicode:"\\f101",name:"Angle double right"},"fa-angle-double-up":{unicode:"\\f102",name:"Angle double up"},"fa-angle-down":{unicode:"\\f107",name:"Angle down"},"fa-angle-left":{unicode:"\\f104",name:"Angle left"},"fa-angle-right":{unicode:"\\f105",name:"Angle right"},"fa-angle-up":{unicode:"\\f106",name:"Angle up"},"fa-apple":{unicode:"\\f179",name:"Apple"},"fa-archive":{unicode:"\\f187",name:"Archive"},"fa-area-chart":{unicode:"\\f1fe",name:"Area chart"},"fa-arrow-circle-down":{unicode:"\\f0ab",name:"Arrow circle down"},"fa-arrow-circle-left":{unicode:"\\f0a8",name:"Arrow circle left"},"fa-arrow-circle-o-down":{unicode:"\\f01a",name:"Arrow circle o down"},"fa-arrow-circle-o-left":{unicode:"\\f190",name:"Arrow circle o left"},"fa-arrow-circle-o-right":{unicode:"\\f18e",name:"Arrow circle o right"},"fa-arrow-circle-o-up":{unicode:"\\f01b",name:"Arrow circle o up"},"fa-arrow-circle-right":{unicode:"\\f0a9",name:"Arrow circle right"},"fa-arrow-circle-up":{unicode:"\\f0aa",name:"Arrow circle up"},"fa-arrow-down":{unicode:"\\f063",name:"Arrow down"},"fa-arrow-left":{unicode:"\\f060",name:"Arrow left"},"fa-arrow-right":{unicode:"\\f061",name:"Arrow right"},"fa-arrow-up":{unicode:"\\f062",name:"Arrow up"},"fa-arrows":{unicode:"\\f047",name:"Arrows"},"fa-arrows-alt":{unicode:"\\f0b2",name:"Arrows alt"},"fa-arrows-h":{unicode:"\\f07e",name:"Arrows h"},"fa-arrows-v":{unicode:"\\f07d",name:"Arrows v"},"fa-assistive-listening-systems":{unicode:"\\f2a2",name:"Assistive listening systems"},"fa-asterisk":{unicode:"\\f069",name:"Asterisk"},"fa-at":{unicode:"\\f1fa",name:"At"},"fa-audio-description":{unicode:"\\f29e",name:"Audio description"},"fa-backward":{unicode:"\\f04a",name:"Backward"},"fa-balance-scale":{unicode:"\\f24e",name:"Balance scale"},"fa-ban":{unicode:"\\f05e",name:"Ban"},"fa-bandcamp":{unicode:"\\f2d5",name:"Bandcamp"},"fa-bar-chart":{unicode:"\\f080",name:"Bar chart"},"fa-barcode":{unicode:"\\f02a",name:"Barcode"},"fa-bars":{unicode:"\\f0c9",name:"Bars"},"fa-bath":{unicode:"\\f2cd",name:"Bath"},"fa-battery-empty":{unicode:"\\f244",name:"Battery empty"},"fa-battery-full":{unicode:"\\f240",name:"Battery full"},"fa-battery-half":{unicode:"\\f242",name:"Battery half"},"fa-battery-quarter":{unicode:"\\f243",name:"Battery quarter"},"fa-battery-three-quarters":{unicode:"\\f241",name:"Battery three quarters"},"fa-bed":{unicode:"\\f236",name:"Bed"},"fa-beer":{unicode:"\\f0fc",name:"Beer"},"fa-behance":{unicode:"\\f1b4",name:"Behance"},"fa-behance-square":{unicode:"\\f1b5",name:"Behance square"},"fa-bell":{unicode:"\\f0f3",name:"Bell"},"fa-bell-o":{unicode:"\\f0a2",name:"Bell o"},"fa-bell-slash":{unicode:"\\f1f6",name:"Bell slash"},"fa-bell-slash-o":{unicode:"\\f1f7",name:"Bell slash o"},"fa-bicycle":{unicode:"\\f206",name:"Bicycle"},"fa-binoculars":{unicode:"\\f1e5",name:"Binoculars"},"fa-birthday-cake":{unicode:"\\f1fd",name:"Birthday cake"},"fa-bitbucket":{unicode:"\\f171",name:"Bitbucket"},"fa-bitbucket-square":{unicode:"\\f172",name:"Bitbucket square"},"fa-black-tie":{unicode:"\\f27e",name:"Black tie"},"fa-blind":{unicode:"\\f29d",name:"Blind"},"fa-bluetooth":{unicode:"\\f293",name:"Bluetooth"},"fa-bluetooth-b":{unicode:"\\f294",name:"Bluetooth b"},"fa-bold":{unicode:"\\f032",name:"Bold"},"fa-bolt":{unicode:"\\f0e7",name:"Bolt"},"fa-bomb":{unicode:"\\f1e2",name:"Bomb"},"fa-book":{unicode:"\\f02d",name:"Book"},"fa-bookmark":{unicode:"\\f02e",name:"Bookmark"},"fa-bookmark-o":{unicode:"\\f097",name:"Bookmark o"},"fa-braille":{unicode:"\\f2a1",name:"Braille"},"fa-briefcase":{unicode:"\\f0b1",name:"Briefcase"},"fa-btc":{unicode:"\\f15a",name:"Btc"},"fa-bug":{unicode:"\\f188",name:"Bug"},"fa-building":{unicode:"\\f1ad",name:"Building"},"fa-building-o":{unicode:"\\f0f7",name:"Building o"},"fa-bullhorn":{unicode:"\\f0a1",name:"Bullhorn"},"fa-bullseye":{unicode:"\\f140",name:"Bullseye"},"fa-bus":{unicode:"\\f207",name:"Bus"},"fa-buysellads":{unicode:"\\f20d",name:"Buysellads"},"fa-calculator":{unicode:"\\f1ec",name:"Calculator"},"fa-calendar":{unicode:"\\f073",name:"Calendar"},"fa-calendar-check-o":{unicode:"\\f274",name:"Calendar check o"},"fa-calendar-minus-o":{unicode:"\\f272",name:"Calendar minus o"},"fa-calendar-o":{unicode:"\\f133",name:"Calendar o"},"fa-calendar-plus-o":{unicode:"\\f271",name:"Calendar plus o"},"fa-calendar-times-o":{unicode:"\\f273",name:"Calendar times o"},"fa-camera":{unicode:"\\f030",name:"Camera"},"fa-camera-retro":{unicode:"\\f083",name:"Camera retro"},"fa-car":{unicode:"\\f1b9",name:"Car"},"fa-caret-down":{unicode:"\\f0d7",name:"Caret down"},"fa-caret-left":{unicode:"\\f0d9",name:"Caret left"},"fa-caret-right":{unicode:"\\f0da",name:"Caret right"},"fa-caret-square-o-down":{unicode:"\\f150",name:"Caret square o down"},"fa-caret-square-o-left":{unicode:"\\f191",name:"Caret square o left"},"fa-caret-square-o-right":{unicode:"\\f152",name:"Caret square o right"},"fa-caret-square-o-up":{unicode:"\\f151",name:"Caret square o up"},"fa-caret-up":{unicode:"\\f0d8",name:"Caret up"},"fa-cart-arrow-down":{unicode:"\\f218",name:"Cart arrow down"},"fa-cart-plus":{unicode:"\\f217",name:"Cart plus"},"fa-cc":{unicode:"\\f20a",name:"Cc"},"fa-cc-amex":{unicode:"\\f1f3",name:"Cc amex"},"fa-cc-diners-club":{unicode:"\\f24c",name:"Cc diners club"},"fa-cc-discover":{unicode:"\\f1f2",name:"Cc discover"},"fa-cc-jcb":{unicode:"\\f24b",name:"Cc jcb"},"fa-cc-mastercard":{unicode:"\\f1f1",name:"Cc mastercard"},"fa-cc-paypal":{unicode:"\\f1f4",name:"Cc paypal"},"fa-cc-stripe":{unicode:"\\f1f5",name:"Cc stripe"},"fa-cc-visa":{unicode:"\\f1f0",name:"Cc visa"},"fa-certificate":{unicode:"\\f0a3",name:"Certificate"},"fa-chain-broken":{unicode:"\\f127",name:"Chain broken"},"fa-check":{unicode:"\\f00c",name:"Check"},"fa-check-circle":{unicode:"\\f058",name:"Check circle"},"fa-check-circle-o":{unicode:"\\f05d",name:"Check circle o"},"fa-check-square":{unicode:"\\f14a",name:"Check square"},"fa-check-square-o":{unicode:"\\f046",name:"Check square o"},"fa-chevron-circle-down":{unicode:"\\f13a",name:"Chevron circle down"},"fa-chevron-circle-left":{unicode:"\\f137",name:"Chevron circle left"},"fa-chevron-circle-right":{unicode:"\\f138",name:"Chevron circle right"},"fa-chevron-circle-up":{unicode:"\\f139",name:"Chevron circle up"},"fa-chevron-down":{unicode:"\\f078",name:"Chevron down"},"fa-chevron-left":{unicode:"\\f053",name:"Chevron left"},"fa-chevron-right":{unicode:"\\f054",name:"Chevron right"},"fa-chevron-up":{unicode:"\\f077",name:"Chevron up"},"fa-child":{unicode:"\\f1ae",name:"Child"},"fa-chrome":{unicode:"\\f268",name:"Chrome"},"fa-circle":{unicode:"\\f111",name:"Circle"},"fa-circle-o":{unicode:"\\f10c",name:"Circle o"},"fa-circle-o-notch":{unicode:"\\f1ce",name:"Circle o notch"},"fa-circle-thin":{unicode:"\\f1db",name:"Circle thin"},"fa-clipboard":{unicode:"\\f0ea",name:"Clipboard"},"fa-clock-o":{unicode:"\\f017",name:"Clock o"},"fa-clone":{unicode:"\\f24d",name:"Clone"},"fa-cloud":{unicode:"\\f0c2",name:"Cloud"},"fa-cloud-download":{unicode:"\\f0ed",name:"Cloud download"},"fa-cloud-upload":{unicode:"\\f0ee",name:"Cloud upload"},"fa-code":{unicode:"\\f121",name:"Code"},"fa-code-fork":{unicode:"\\f126",name:"Code fork"},"fa-codepen":{unicode:"\\f1cb",name:"Codepen"},"fa-codiepie":{unicode:"\\f284",name:"Codiepie"},"fa-coffee":{unicode:"\\f0f4",name:"Coffee"},"fa-cog":{unicode:"\\f013",name:"Cog"},"fa-cogs":{unicode:"\\f085",name:"Cogs"},"fa-columns":{unicode:"\\f0db",name:"Columns"},"fa-comment":{unicode:"\\f075",name:"Comment"},"fa-comment-o":{unicode:"\\f0e5",name:"Comment o"},"fa-commenting":{unicode:"\\f27a",name:"Commenting"},"fa-commenting-o":{unicode:"\\f27b",name:"Commenting o"},"fa-comments":{unicode:"\\f086",name:"Comments"},"fa-comments-o":{unicode:"\\f0e6",name:"Comments o"},"fa-compass":{unicode:"\\f14e",name:"Compass"},"fa-compress":{unicode:"\\f066",name:"Compress"},"fa-connectdevelop":{unicode:"\\f20e",name:"Connectdevelop"},"fa-contao":{unicode:"\\f26d",name:"Contao"},"fa-copyright":{unicode:"\\f1f9",name:"Copyright"},"fa-creative-commons":{unicode:"\\f25e",name:"Creative commons"},"fa-credit-card":{unicode:"\\f09d",name:"Credit card"},"fa-credit-card-alt":{unicode:"\\f283",name:"Credit card alt"},"fa-crop":{unicode:"\\f125",name:"Crop"},"fa-crosshairs":{unicode:"\\f05b",name:"Crosshairs"},"fa-css3":{unicode:"\\f13c",name:"Css3"},"fa-cube":{unicode:"\\f1b2",name:"Cube"},"fa-cubes":{unicode:"\\f1b3",name:"Cubes"},"fa-cutlery":{unicode:"\\f0f5",name:"Cutlery"},"fa-dashcube":{unicode:"\\f210",name:"Dashcube"},"fa-database":{unicode:"\\f1c0",name:"Database"},"fa-deaf":{unicode:"\\f2a4",name:"Deaf"},"fa-delicious":{unicode:"\\f1a5",name:"Delicious"},"fa-desktop":{unicode:"\\f108",name:"Desktop"},"fa-deviantart":{unicode:"\\f1bd",name:"Deviantart"},"fa-diamond":{unicode:"\\f219",name:"Diamond"},"fa-digg":{unicode:"\\f1a6",name:"Digg"},"fa-dot-circle-o":{unicode:"\\f192",name:"Dot circle o"},"fa-download":{unicode:"\\f019",name:"Download"},"fa-dribbble":{unicode:"\\f17d",name:"Dribbble"},"fa-dropbox":{unicode:"\\f16b",name:"Dropbox"},"fa-drupal":{unicode:"\\f1a9",name:"Drupal"},"fa-edge":{unicode:"\\f282",name:"Edge"},"fa-eercast":{unicode:"\\f2da",name:"Eercast"},"fa-eject":{unicode:"\\f052",name:"Eject"},"fa-ellipsis-h":{unicode:"\\f141",name:"Ellipsis h"},"fa-ellipsis-v":{unicode:"\\f142",name:"Ellipsis v"},"fa-empire":{unicode:"\\f1d1",name:"Empire"},"fa-envelope":{unicode:"\\f0e0",name:"Envelope"},"fa-envelope-o":{unicode:"\\f003",name:"Envelope o"},"fa-envelope-open":{unicode:"\\f2b6",name:"Envelope open"},"fa-envelope-open-o":{unicode:"\\f2b7",name:"Envelope open o"},"fa-envelope-square":{unicode:"\\f199",name:"Envelope square"},"fa-envira":{unicode:"\\f299",name:"Envira"},"fa-eraser":{unicode:"\\f12d",name:"Eraser"},"fa-etsy":{unicode:"\\f2d7",name:"Etsy"},"fa-eur":{unicode:"\\f153",name:"Eur"},"fa-exchange":{unicode:"\\f0ec",name:"Exchange"},"fa-exclamation":{unicode:"\\f12a",name:"Exclamation"},"fa-exclamation-circle":{unicode:"\\f06a",name:"Exclamation circle"},"fa-exclamation-triangle":{unicode:"\\f071",name:"Exclamation triangle"},"fa-expand":{unicode:"\\f065",name:"Expand"},"fa-expeditedssl":{unicode:"\\f23e",name:"Expeditedssl"},"fa-external-link":{unicode:"\\f08e",name:"External link"},"fa-external-link-square":{unicode:"\\f14c",name:"External link square"},"fa-eye":{unicode:"\\f06e",name:"Eye"},"fa-eye-slash":{unicode:"\\f070",name:"Eye slash"},"fa-eyedropper":{unicode:"\\f1fb",name:"Eyedropper"},"fa-facebook":{unicode:"\\f09a",name:"Facebook"},"fa-facebook-official":{unicode:"\\f230",name:"Facebook official"},"fa-facebook-square":{unicode:"\\f082",name:"Facebook square"},"fa-fast-backward":{unicode:"\\f049",name:"Fast backward"},"fa-fast-forward":{unicode:"\\f050",name:"Fast forward"},"fa-fax":{unicode:"\\f1ac",name:"Fax"},"fa-female":{unicode:"\\f182",name:"Female"},"fa-fighter-jet":{unicode:"\\f0fb",name:"Fighter jet"},"fa-file":{unicode:"\\f15b",name:"File"},"fa-file-archive-o":{unicode:"\\f1c6",name:"File archive o"},"fa-file-audio-o":{unicode:"\\f1c7",name:"File audio o"},"fa-file-code-o":{unicode:"\\f1c9",name:"File code o"},"fa-file-excel-o":{unicode:"\\f1c3",name:"File excel o"},"fa-file-image-o":{unicode:"\\f1c5",name:"File image o"},"fa-file-o":{unicode:"\\f016",name:"File o"},"fa-file-pdf-o":{unicode:"\\f1c1",name:"File pdf o"},"fa-file-powerpoint-o":{unicode:"\\f1c4",name:"File powerpoint o"},"fa-file-text":{unicode:"\\f15c",name:"File text"},"fa-file-text-o":{unicode:"\\f0f6",name:"File text o"},"fa-file-video-o":{unicode:"\\f1c8",name:"File video o"},"fa-file-word-o":{unicode:"\\f1c2",name:"File word o"},"fa-files-o":{unicode:"\\f0c5",name:"Files o"},"fa-film":{unicode:"\\f008",name:"Film"},"fa-filter":{unicode:"\\f0b0",name:"Filter"},"fa-fire":{unicode:"\\f06d",name:"Fire"},"fa-fire-extinguisher":{unicode:"\\f134",name:"Fire extinguisher"},"fa-firefox":{unicode:"\\f269",name:"Firefox"},"fa-first-order":{unicode:"\\f2b0",name:"First order"},"fa-flag":{unicode:"\\f024",name:"Flag"},"fa-flag-checkered":{unicode:"\\f11e",name:"Flag checkered"},"fa-flag-o":{unicode:"\\f11d",name:"Flag o"},"fa-flask":{unicode:"\\f0c3",name:"Flask"},"fa-flickr":{unicode:"\\f16e",name:"Flickr"},"fa-floppy-o":{unicode:"\\f0c7",name:"Floppy o"},"fa-folder":{unicode:"\\f07b",name:"Folder"},"fa-folder-o":{unicode:"\\f114",name:"Folder o"},"fa-folder-open":{unicode:"\\f07c",name:"Folder open"},"fa-folder-open-o":{unicode:"\\f115",name:"Folder open o"},"fa-font":{unicode:"\\f031",name:"Font"},"fa-font-awesome":{unicode:"\\f2b4",name:"Font awesome"},"fa-fonticons":{unicode:"\\f280",name:"Fonticons"},"fa-fort-awesome":{unicode:"\\f286",name:"Fort awesome"},"fa-forumbee":{unicode:"\\f211",name:"Forumbee"},"fa-forward":{unicode:"\\f04e",name:"Forward"},"fa-foursquare":{unicode:"\\f180",name:"Foursquare"},"fa-free-code-camp":{unicode:"\\f2c5",name:"Free code camp"},"fa-frown-o":{unicode:"\\f119",name:"Frown o"},"fa-futbol-o":{unicode:"\\f1e3",name:"Futbol o"},"fa-gamepad":{unicode:"\\f11b",name:"Gamepad"},"fa-gavel":{unicode:"\\f0e3",name:"Gavel"},"fa-gbp":{unicode:"\\f154",name:"Gbp"},"fa-genderless":{unicode:"\\f22d",name:"Genderless"},"fa-get-pocket":{unicode:"\\f265",name:"Get pocket"},"fa-gg":{unicode:"\\f260",name:"Gg"},"fa-gg-circle":{unicode:"\\f261",name:"Gg circle"},"fa-gift":{unicode:"\\f06b",name:"Gift"},"fa-git":{unicode:"\\f1d3",name:"Git"},"fa-git-square":{unicode:"\\f1d2",name:"Git square"},"fa-github":{unicode:"\\f09b",name:"Github"},"fa-github-alt":{unicode:"\\f113",name:"Github alt"},"fa-github-square":{unicode:"\\f092",name:"Github square"},"fa-gitlab":{unicode:"\\f296",name:"Gitlab"},"fa-glass":{unicode:"\\f000",name:"Glass"},"fa-glide":{unicode:"\\f2a5",name:"Glide"},"fa-glide-g":{unicode:"\\f2a6",name:"Glide g"},"fa-globe":{unicode:"\\f0ac",name:"Globe"},"fa-google":{unicode:"\\f1a0",name:"Google"},"fa-google-plus":{unicode:"\\f0d5",name:"Google plus"},"fa-google-plus-official":{unicode:"\\f2b3",name:"Google plus official"},"fa-google-plus-square":{unicode:"\\f0d4",name:"Google plus square"},"fa-google-wallet":{unicode:"\\f1ee",name:"Google wallet"},"fa-graduation-cap":{unicode:"\\f19d",name:"Graduation cap"},"fa-gratipay":{unicode:"\\f184",name:"Gratipay"},"fa-grav":{unicode:"\\f2d6",name:"Grav"},"fa-h-square":{unicode:"\\f0fd",name:"H square"},"fa-hacker-news":{unicode:"\\f1d4",name:"Hacker news"},"fa-hand-lizard-o":{unicode:"\\f258",name:"Hand lizard o"},"fa-hand-o-down":{unicode:"\\f0a7",name:"Hand o down"},"fa-hand-o-left":{unicode:"\\f0a5",name:"Hand o left"},"fa-hand-o-right":{unicode:"\\f0a4",name:"Hand o right"},"fa-hand-o-up":{unicode:"\\f0a6",name:"Hand o up"},"fa-hand-paper-o":{unicode:"\\f256",name:"Hand paper o"},"fa-hand-peace-o":{unicode:"\\f25b",name:"Hand peace o"},"fa-hand-pointer-o":{unicode:"\\f25a",name:"Hand pointer o"},"fa-hand-rock-o":{unicode:"\\f255",name:"Hand rock o"},"fa-hand-scissors-o":{unicode:"\\f257",name:"Hand scissors o"},"fa-hand-spock-o":{unicode:"\\f259",name:"Hand spock o"},"fa-handshake-o":{unicode:"\\f2b5",name:"Handshake o"},"fa-hashtag":{unicode:"\\f292",name:"Hashtag"},"fa-hdd-o":{unicode:"\\f0a0",name:"Hdd o"},"fa-header":{unicode:"\\f1dc",name:"Header"},"fa-headphones":{unicode:"\\f025",name:"Headphones"},"fa-heart":{unicode:"\\f004",name:"Heart"},"fa-heart-o":{unicode:"\\f08a",name:"Heart o"},"fa-heartbeat":{unicode:"\\f21e",name:"Heartbeat"},"fa-history":{unicode:"\\f1da",name:"History"},"fa-home":{unicode:"\\f015",name:"Home"},"fa-hospital-o":{unicode:"\\f0f8",name:"Hospital o"},"fa-hourglass":{unicode:"\\f254",name:"Hourglass"},"fa-hourglass-end":{unicode:"\\f253",name:"Hourglass end"},"fa-hourglass-half":{unicode:"\\f252",name:"Hourglass half"},"fa-hourglass-o":{unicode:"\\f250",name:"Hourglass o"},"fa-hourglass-start":{unicode:"\\f251",name:"Hourglass start"},"fa-houzz":{unicode:"\\f27c",name:"Houzz"},"fa-html5":{unicode:"\\f13b",name:"Html5"},"fa-i-cursor":{unicode:"\\f246",name:"I cursor"},"fa-id-badge":{unicode:"\\f2c1",name:"Id badge"},"fa-id-card":{unicode:"\\f2c2",name:"Id card"},"fa-id-card-o":{unicode:"\\f2c3",name:"Id card o"},"fa-ils":{unicode:"\\f20b",name:"Ils"},"fa-imdb":{unicode:"\\f2d8",name:"Imdb"},"fa-inbox":{unicode:"\\f01c",name:"Inbox"},"fa-indent":{unicode:"\\f03c",name:"Indent"},"fa-industry":{unicode:"\\f275",name:"Industry"},"fa-info":{unicode:"\\f129",name:"Info"},"fa-info-circle":{unicode:"\\f05a",name:"Info circle"},"fa-inr":{unicode:"\\f156",name:"Inr"},"fa-instagram":{unicode:"\\f16d",name:"Instagram"},"fa-internet-explorer":{unicode:"\\f26b",name:"Internet explorer"},"fa-ioxhost":{unicode:"\\f208",name:"Ioxhost"},"fa-italic":{unicode:"\\f033",name:"Italic"},"fa-joomla":{unicode:"\\f1aa",name:"Joomla"},"fa-jpy":{unicode:"\\f157",name:"Jpy"},"fa-jsfiddle":{unicode:"\\f1cc",name:"Jsfiddle"},"fa-key":{unicode:"\\f084",name:"Key"},"fa-keyboard-o":{unicode:"\\f11c",name:"Keyboard o"},"fa-krw":{unicode:"\\f159",name:"Krw"},"fa-language":{unicode:"\\f1ab",name:"Language"},"fa-laptop":{unicode:"\\f109",name:"Laptop"},"fa-lastfm":{unicode:"\\f202",name:"Lastfm"},"fa-lastfm-square":{unicode:"\\f203",name:"Lastfm square"},"fa-leaf":{unicode:"\\f06c",name:"Leaf"},"fa-leanpub":{unicode:"\\f212",name:"Leanpub"},"fa-lemon-o":{unicode:"\\f094",name:"Lemon o"},"fa-level-down":{unicode:"\\f149",name:"Level down"},"fa-level-up":{unicode:"\\f148",name:"Level up"},"fa-life-ring":{unicode:"\\f1cd",name:"Life ring"},"fa-lightbulb-o":{unicode:"\\f0eb",name:"Lightbulb o"},"fa-line-chart":{unicode:"\\f201",name:"Line chart"},"fa-link":{unicode:"\\f0c1",name:"Link"},"fa-linkedin":{unicode:"\\f0e1",name:"Linkedin"},"fa-linkedin-square":{unicode:"\\f08c",name:"Linkedin square"},"fa-linode":{unicode:"\\f2b8",name:"Linode"},"fa-linux":{unicode:"\\f17c",name:"Linux"},"fa-list":{unicode:"\\f03a",name:"List"},"fa-list-alt":{unicode:"\\f022",name:"List alt"},"fa-list-ol":{unicode:"\\f0cb",name:"List ol"},"fa-list-ul":{unicode:"\\f0ca",name:"List ul"},"fa-location-arrow":{unicode:"\\f124",name:"Location arrow"},"fa-lock":{unicode:"\\f023",name:"Lock"},"fa-long-arrow-down":{unicode:"\\f175",name:"Long arrow down"},"fa-long-arrow-left":{unicode:"\\f177",name:"Long arrow left"},"fa-long-arrow-right":{unicode:"\\f178",name:"Long arrow right"},"fa-long-arrow-up":{unicode:"\\f176",name:"Long arrow up"},"fa-low-vision":{unicode:"\\f2a8",name:"Low vision"},"fa-magic":{unicode:"\\f0d0",name:"Magic"},"fa-magnet":{unicode:"\\f076",name:"Magnet"},"fa-male":{unicode:"\\f183",name:"Male"},"fa-map":{unicode:"\\f279",name:"Map"},"fa-map-marker":{unicode:"\\f041",name:"Map marker"},"fa-map-o":{unicode:"\\f278",name:"Map o"},"fa-map-pin":{unicode:"\\f276",name:"Map pin"},"fa-map-signs":{unicode:"\\f277",name:"Map signs"},"fa-mars":{unicode:"\\f222",name:"Mars"},"fa-mars-double":{unicode:"\\f227",name:"Mars double"},"fa-mars-stroke":{unicode:"\\f229",name:"Mars stroke"},"fa-mars-stroke-h":{unicode:"\\f22b",name:"Mars stroke h"},"fa-mars-stroke-v":{unicode:"\\f22a",name:"Mars stroke v"},"fa-maxcdn":{unicode:"\\f136",name:"Maxcdn"},"fa-meanpath":{unicode:"\\f20c",name:"Meanpath"},"fa-medium":{unicode:"\\f23a",name:"Medium"},"fa-medkit":{unicode:"\\f0fa",name:"Medkit"},"fa-meetup":{unicode:"\\f2e0",name:"Meetup"},"fa-meh-o":{unicode:"\\f11a",name:"Meh o"},"fa-mercury":{unicode:"\\f223",name:"Mercury"},"fa-microchip":{unicode:"\\f2db",name:"Microchip"},"fa-microphone":{unicode:"\\f130",name:"Microphone"},"fa-microphone-slash":{unicode:"\\f131",name:"Microphone slash"},"fa-minus":{unicode:"\\f068",name:"Minus"},"fa-minus-circle":{unicode:"\\f056",name:"Minus circle"},"fa-minus-square":{unicode:"\\f146",name:"Minus square"},"fa-minus-square-o":{unicode:"\\f147",name:"Minus square o"},"fa-mixcloud":{unicode:"\\f289",name:"Mixcloud"},"fa-mobile":{unicode:"\\f10b",name:"Mobile"},"fa-modx":{unicode:"\\f285",name:"Modx"},"fa-money":{unicode:"\\f0d6",name:"Money"},"fa-moon-o":{unicode:"\\f186",name:"Moon o"},"fa-motorcycle":{unicode:"\\f21c",name:"Motorcycle"},"fa-mouse-pointer":{unicode:"\\f245",name:"Mouse pointer"},"fa-music":{unicode:"\\f001",name:"Music"},"fa-neuter":{unicode:"\\f22c",name:"Neuter"},"fa-newspaper-o":{unicode:"\\f1ea",name:"Newspaper o"},"fa-object-group":{unicode:"\\f247",name:"Object group"},"fa-object-ungroup":{unicode:"\\f248",name:"Object ungroup"},"fa-odnoklassniki":{unicode:"\\f263",name:"Odnoklassniki"},"fa-odnoklassniki-square":{unicode:"\\f264",name:"Odnoklassniki square"},"fa-opencart":{unicode:"\\f23d",name:"Opencart"},"fa-openid":{unicode:"\\f19b",name:"Openid"},"fa-opera":{unicode:"\\f26a",name:"Opera"},"fa-optin-monster":{unicode:"\\f23c",name:"Optin monster"},"fa-outdent":{unicode:"\\f03b",name:"Outdent"},"fa-pagelines":{unicode:"\\f18c",name:"Pagelines"},"fa-paint-brush":{unicode:"\\f1fc",name:"Paint brush"},"fa-paper-plane":{unicode:"\\f1d8",name:"Paper plane"},"fa-paper-plane-o":{unicode:"\\f1d9",name:"Paper plane o"},"fa-paperclip":{unicode:"\\f0c6",name:"Paperclip"},"fa-paragraph":{unicode:"\\f1dd",name:"Paragraph"},"fa-pause":{unicode:"\\f04c",name:"Pause"},"fa-pause-circle":{unicode:"\\f28b",name:"Pause circle"},"fa-pause-circle-o":{unicode:"\\f28c",name:"Pause circle o"},"fa-paw":{unicode:"\\f1b0",name:"Paw"},"fa-paypal":{unicode:"\\f1ed",name:"Paypal"},"fa-pencil":{unicode:"\\f040",name:"Pencil"},"fa-pencil-square":{unicode:"\\f14b",name:"Pencil square"},"fa-pencil-square-o":{unicode:"\\f044",name:"Pencil square o"},"fa-percent":{unicode:"\\f295",name:"Percent"},"fa-phone":{unicode:"\\f095",name:"Phone"},"fa-phone-square":{unicode:"\\f098",name:"Phone square"},"fa-picture-o":{unicode:"\\f03e",name:"Picture o"},"fa-pie-chart":{unicode:"\\f200",name:"Pie chart"},"fa-pied-piper":{unicode:"\\f2ae",name:"Pied piper"},"fa-pied-piper-alt":{unicode:"\\f1a8",name:"Pied piper alt"},"fa-pied-piper-pp":{unicode:"\\f1a7",name:"Pied piper pp"},"fa-pinterest":{unicode:"\\f0d2",name:"Pinterest"},"fa-pinterest-p":{unicode:"\\f231",name:"Pinterest p"},"fa-pinterest-square":{unicode:"\\f0d3",name:"Pinterest square"},"fa-plane":{unicode:"\\f072",name:"Plane"},"fa-play":{unicode:"\\f04b",name:"Play"},"fa-play-circle":{unicode:"\\f144",name:"Play circle"},"fa-play-circle-o":{unicode:"\\f01d",name:"Play circle o"},"fa-plug":{unicode:"\\f1e6",name:"Plug"},"fa-plus":{unicode:"\\f067",name:"Plus"},"fa-plus-circle":{unicode:"\\f055",name:"Plus circle"},"fa-plus-square":{unicode:"\\f0fe",name:"Plus square"},"fa-plus-square-o":{unicode:"\\f196",name:"Plus square o"},"fa-podcast":{unicode:"\\f2ce",name:"Podcast"},"fa-power-off":{unicode:"\\f011",name:"Power off"},"fa-print":{unicode:"\\f02f",name:"Print"},"fa-product-hunt":{unicode:"\\f288",name:"Product hunt"},"fa-puzzle-piece":{unicode:"\\f12e",name:"Puzzle piece"},"fa-qq":{unicode:"\\f1d6",name:"Qq"},"fa-qrcode":{unicode:"\\f029",name:"Qrcode"},"fa-question":{unicode:"\\f128",name:"Question"},"fa-question-circle":{unicode:"\\f059",name:"Question circle"},"fa-question-circle-o":{unicode:"\\f29c",name:"Question circle o"},"fa-quora":{unicode:"\\f2c4",name:"Quora"},"fa-quote-left":{unicode:"\\f10d",name:"Quote left"},"fa-quote-right":{unicode:"\\f10e",name:"Quote right"},"fa-random":{unicode:"\\f074",name:"Random"},"fa-ravelry":{unicode:"\\f2d9",name:"Ravelry"},"fa-rebel":{unicode:"\\f1d0",name:"Rebel"},"fa-recycle":{unicode:"\\f1b8",name:"Recycle"},"fa-reddit":{unicode:"\\f1a1",name:"Reddit"},"fa-reddit-alien":{unicode:"\\f281",name:"Reddit alien"},"fa-reddit-square":{unicode:"\\f1a2",name:"Reddit square"},"fa-refresh":{unicode:"\\f021",name:"Refresh"},"fa-registered":{unicode:"\\f25d",name:"Registered"},"fa-renren":{unicode:"\\f18b",name:"Renren"},"fa-repeat":{unicode:"\\f01e",name:"Repeat"},"fa-reply":{unicode:"\\f112",name:"Reply"},"fa-reply-all":{unicode:"\\f122",name:"Reply all"},"fa-retweet":{unicode:"\\f079",name:"Retweet"},"fa-road":{unicode:"\\f018",name:"Road"},"fa-rocket":{unicode:"\\f135",name:"Rocket"},"fa-rss":{unicode:"\\f09e",name:"Rss"},"fa-rss-square":{unicode:"\\f143",name:"Rss square"},"fa-rub":{unicode:"\\f158",name:"Rub"},"fa-safari":{unicode:"\\f267",name:"Safari"},"fa-scissors":{unicode:"\\f0c4",name:"Scissors"},"fa-scribd":{unicode:"\\f28a",name:"Scribd"},"fa-search":{unicode:"\\f002",name:"Search"},"fa-search-minus":{unicode:"\\f010",name:"Search minus"},"fa-search-plus":{unicode:"\\f00e",name:"Search plus"},"fa-sellsy":{unicode:"\\f213",name:"Sellsy"},"fa-server":{unicode:"\\f233",name:"Server"},"fa-share":{unicode:"\\f064",name:"Share"},"fa-share-alt":{unicode:"\\f1e0",name:"Share alt"},"fa-share-alt-square":{unicode:"\\f1e1",name:"Share alt square"},"fa-share-square":{unicode:"\\f14d",name:"Share square"},"fa-share-square-o":{unicode:"\\f045",name:"Share square o"},"fa-shield":{unicode:"\\f132",name:"Shield"},"fa-ship":{unicode:"\\f21a",name:"Ship"},"fa-shirtsinbulk":{unicode:"\\f214",name:"Shirtsinbulk"},"fa-shopping-bag":{unicode:"\\f290",name:"Shopping bag"},"fa-shopping-basket":{unicode:"\\f291",name:"Shopping basket"},"fa-shopping-cart":{unicode:"\\f07a",name:"Shopping cart"},"fa-shower":{unicode:"\\f2cc",name:"Shower"},"fa-sign-in":{unicode:"\\f090",name:"Sign in"},"fa-sign-language":{unicode:"\\f2a7",name:"Sign language"},"fa-sign-out":{unicode:"\\f08b",name:"Sign out"},"fa-signal":{unicode:"\\f012",name:"Signal"},"fa-simplybuilt":{unicode:"\\f215",name:"Simplybuilt"},"fa-sitemap":{unicode:"\\f0e8",name:"Sitemap"},"fa-skyatlas":{unicode:"\\f216",name:"Skyatlas"},"fa-skype":{unicode:"\\f17e",name:"Skype"},"fa-slack":{unicode:"\\f198",name:"Slack"},"fa-sliders":{unicode:"\\f1de",name:"Sliders"},"fa-slideshare":{unicode:"\\f1e7",name:"Slideshare"},"fa-smile-o":{unicode:"\\f118",name:"Smile o"},"fa-snapchat":{unicode:"\\f2ab",name:"Snapchat"},"fa-snapchat-ghost":{unicode:"\\f2ac",name:"Snapchat ghost"},"fa-snapchat-square":{unicode:"\\f2ad",name:"Snapchat square"},"fa-snowflake-o":{unicode:"\\f2dc",name:"Snowflake o"},"fa-sort":{unicode:"\\f0dc",name:"Sort"},"fa-sort-alpha-asc":{unicode:"\\f15d",name:"Sort alpha asc"},"fa-sort-alpha-desc":{unicode:"\\f15e",name:"Sort alpha desc"},"fa-sort-amount-asc":{unicode:"\\f160",name:"Sort amount asc"},"fa-sort-amount-desc":{unicode:"\\f161",name:"Sort amount desc"},"fa-sort-asc":{unicode:"\\f0de",name:"Sort asc"},"fa-sort-desc":{unicode:"\\f0dd",name:"Sort desc"},"fa-sort-numeric-asc":{unicode:"\\f162",name:"Sort numeric asc"},"fa-sort-numeric-desc":{unicode:"\\f163",name:"Sort numeric desc"},"fa-soundcloud":{unicode:"\\f1be",name:"Soundcloud"},"fa-space-shuttle":{unicode:"\\f197",name:"Space shuttle"},"fa-spinner":{unicode:"\\f110",name:"Spinner"},"fa-spoon":{unicode:"\\f1b1",name:"Spoon"},"fa-spotify":{unicode:"\\f1bc",name:"Spotify"},"fa-square":{unicode:"\\f0c8",name:"Square"},"fa-square-o":{unicode:"\\f096",name:"Square o"},"fa-stack-exchange":{unicode:"\\f18d",name:"Stack exchange"},"fa-stack-overflow":{unicode:"\\f16c",name:"Stack overflow"},"fa-star":{unicode:"\\f005",name:"Star"},"fa-star-half":{unicode:"\\f089",name:"Star half"},"fa-star-half-o":{unicode:"\\f123",name:"Star half o"},"fa-star-o":{unicode:"\\f006",name:"Star o"},"fa-steam":{unicode:"\\f1b6",name:"Steam"},"fa-steam-square":{unicode:"\\f1b7",name:"Steam square"},"fa-step-backward":{unicode:"\\f048",name:"Step backward"},"fa-step-forward":{unicode:"\\f051",name:"Step forward"},"fa-stethoscope":{unicode:"\\f0f1",name:"Stethoscope"},"fa-sticky-note":{unicode:"\\f249",name:"Sticky note"},"fa-sticky-note-o":{unicode:"\\f24a",name:"Sticky note o"},"fa-stop":{unicode:"\\f04d",name:"Stop"},"fa-stop-circle":{unicode:"\\f28d",name:"Stop circle"},"fa-stop-circle-o":{unicode:"\\f28e",name:"Stop circle o"},"fa-street-view":{unicode:"\\f21d",name:"Street view"},"fa-strikethrough":{unicode:"\\f0cc",name:"Strikethrough"},"fa-stumbleupon":{unicode:"\\f1a4",name:"Stumbleupon"},"fa-stumbleupon-circle":{unicode:"\\f1a3",name:"Stumbleupon circle"},"fa-subscript":{unicode:"\\f12c",name:"Subscript"},"fa-subway":{unicode:"\\f239",name:"Subway"},"fa-suitcase":{unicode:"\\f0f2",name:"Suitcase"},"fa-sun-o":{unicode:"\\f185",name:"Sun o"},"fa-superpowers":{unicode:"\\f2dd",name:"Superpowers"},"fa-superscript":{unicode:"\\f12b",name:"Superscript"},"fa-table":{unicode:"\\f0ce",name:"Table"},"fa-tablet":{unicode:"\\f10a",name:"Tablet"},"fa-tachometer":{unicode:"\\f0e4",name:"Tachometer"},"fa-tag":{unicode:"\\f02b",name:"Tag"},"fa-tags":{unicode:"\\f02c",name:"Tags"},"fa-tasks":{unicode:"\\f0ae",name:"Tasks"},"fa-taxi":{unicode:"\\f1ba",name:"Taxi"},"fa-telegram":{unicode:"\\f2c6",name:"Telegram"},"fa-television":{unicode:"\\f26c",name:"Television"},"fa-tencent-weibo":{unicode:"\\f1d5",name:"Tencent weibo"},"fa-terminal":{unicode:"\\f120",name:"Terminal"},"fa-text-height":{unicode:"\\f034",name:"Text height"},"fa-text-width":{unicode:"\\f035",name:"Text width"},"fa-th":{unicode:"\\f00a",name:"Th"},"fa-th-large":{unicode:"\\f009",name:"Th large"},"fa-th-list":{unicode:"\\f00b",name:"Th list"},"fa-themeisle":{unicode:"\\f2b2",name:"Themeisle"},"fa-thermometer-empty":{unicode:"\\f2cb",name:"Thermometer empty"},"fa-thermometer-full":{unicode:"\\f2c7",name:"Thermometer full"},"fa-thermometer-half":{unicode:"\\f2c9",name:"Thermometer half"},"fa-thermometer-quarter":{unicode:"\\f2ca",name:"Thermometer quarter"},"fa-thermometer-three-quarters":{unicode:"\\f2c8",name:"Thermometer three quarters"},"fa-thumb-tack":{unicode:"\\f08d",name:"Thumb tack"},"fa-thumbs-down":{unicode:"\\f165",name:"Thumbs down"},"fa-thumbs-o-down":{unicode:"\\f088",name:"Thumbs o down"},"fa-thumbs-o-up":{unicode:"\\f087",name:"Thumbs o up"},"fa-thumbs-up":{unicode:"\\f164",name:"Thumbs up"},"fa-ticket":{unicode:"\\f145",name:"Ticket"},"fa-times":{unicode:"\\f00d",name:"Times"},"fa-times-circle":{unicode:"\\f057",name:"Times circle"},"fa-times-circle-o":{unicode:"\\f05c",name:"Times circle o"},"fa-tint":{unicode:"\\f043",name:"Tint"},"fa-toggle-off":{unicode:"\\f204",name:"Toggle off"},"fa-toggle-on":{unicode:"\\f205",name:"Toggle on"},"fa-trademark":{unicode:"\\f25c",name:"Trademark"},"fa-train":{unicode:"\\f238",name:"Train"},"fa-transgender":{unicode:"\\f224",name:"Transgender"},"fa-transgender-alt":{unicode:"\\f225",name:"Transgender alt"},"fa-trash":{unicode:"\\f1f8",name:"Trash"},"fa-trash-o":{unicode:"\\f014",name:"Trash o"},"fa-tree":{unicode:"\\f1bb",name:"Tree"},"fa-trello":{unicode:"\\f181",name:"Trello"},"fa-tripadvisor":{unicode:"\\f262",name:"Tripadvisor"},"fa-trophy":{unicode:"\\f091",name:"Trophy"},"fa-truck":{unicode:"\\f0d1",name:"Truck"},"fa-try":{unicode:"\\f195",name:"Try"},"fa-tty":{unicode:"\\f1e4",name:"Tty"},"fa-tumblr":{unicode:"\\f173",name:"Tumblr"},"fa-tumblr-square":{unicode:"\\f174",name:"Tumblr square"},"fa-twitch":{unicode:"\\f1e8",name:"Twitch"},"fa-twitter":{unicode:"\\f099",name:"Twitter"},"fa-twitter-square":{unicode:"\\f081",name:"Twitter square"},"fa-umbrella":{unicode:"\\f0e9",name:"Umbrella"},"fa-underline":{unicode:"\\f0cd",name:"Underline"},"fa-undo":{unicode:"\\f0e2",name:"Undo"},"fa-universal-access":{unicode:"\\f29a",name:"Universal access"},"fa-university":{unicode:"\\f19c",name:"University"},"fa-unlock":{unicode:"\\f09c",name:"Unlock"},"fa-unlock-alt":{unicode:"\\f13e",name:"Unlock alt"},"fa-upload":{unicode:"\\f093",name:"Upload"},"fa-usb":{unicode:"\\f287",name:"Usb"},"fa-usd":{unicode:"\\f155",name:"Usd"},"fa-user":{unicode:"\\f007",name:"User"},"fa-user-circle":{unicode:"\\f2bd",name:"User circle"},"fa-user-circle-o":{unicode:"\\f2be",name:"User circle o"},"fa-user-md":{unicode:"\\f0f0",name:"User md"},"fa-user-o":{unicode:"\\f2c0",name:"User o"},"fa-user-plus":{unicode:"\\f234",name:"User plus"},"fa-user-secret":{unicode:"\\f21b",name:"User secret"},"fa-user-times":{unicode:"\\f235",name:"User times"},"fa-users":{unicode:"\\f0c0",name:"Users"},"fa-venus":{unicode:"\\f221",name:"Venus"},"fa-venus-double":{unicode:"\\f226",name:"Venus double"},"fa-venus-mars":{unicode:"\\f228",name:"Venus mars"},"fa-viacoin":{unicode:"\\f237",name:"Viacoin"},"fa-viadeo":{unicode:"\\f2a9",name:"Viadeo"},"fa-viadeo-square":{unicode:"\\f2aa",name:"Viadeo square"},"fa-video-camera":{unicode:"\\f03d",name:"Video camera"},"fa-vimeo":{unicode:"\\f27d",name:"Vimeo"},"fa-vimeo-square":{unicode:"\\f194",name:"Vimeo square"},"fa-vine":{unicode:"\\f1ca",name:"Vine"},"fa-vk":{unicode:"\\f189",name:"Vk"},"fa-volume-control-phone":{unicode:"\\f2a0",name:"Volume control phone"},"fa-volume-down":{unicode:"\\f027",name:"Volume down"},"fa-volume-off":{unicode:"\\f026",name:"Volume off"},"fa-volume-up":{unicode:"\\f028",name:"Volume up"},"fa-weibo":{unicode:"\\f18a",name:"Weibo"},"fa-weixin":{unicode:"\\f1d7",name:"Weixin"},"fa-whatsapp":{unicode:"\\f232",name:"Whatsapp"},"fa-wheelchair":{unicode:"\\f193",name:"Wheelchair"},"fa-wheelchair-alt":{unicode:"\\f29b",name:"Wheelchair alt"},"fa-wifi":{unicode:"\\f1eb",name:"Wifi"},"fa-wikipedia-w":{unicode:"\\f266",name:"Wikipedia w"},"fa-window-close":{unicode:"\\f2d3",name:"Window close"},"fa-window-close-o":{unicode:"\\f2d4",name:"Window close o"},"fa-window-maximize":{unicode:"\\f2d0",name:"Window maximize"},"fa-window-minimize":{unicode:"\\f2d1",name:"Window minimize"},"fa-window-restore":{unicode:"\\f2d2",name:"Window restore"},"fa-windows":{unicode:"\\f17a",name:"Windows"},"fa-wordpress":{unicode:"\\f19a",name:"Wordpress"},"fa-wpbeginner":{unicode:"\\f297",name:"Wpbeginner"},"fa-wpexplorer":{unicode:"\\f2de",name:"Wpexplorer"},"fa-wpforms":{unicode:"\\f298",name:"Wpforms"},"fa-wrench":{unicode:"\\f0ad",name:"Wrench"},"fa-xing":{unicode:"\\f168",name:"Xing"},"fa-xing-square":{unicode:"\\f169",name:"Xing square"},"fa-y-combinator":{unicode:"\\f23b",name:"Y combinator"},"fa-yahoo":{unicode:"\\f19e",name:"Yahoo"},"fa-yelp":{unicode:"\\f1e9",name:"Yelp"},"fa-yoast":{unicode:"\\f2b1",name:"Yoast"},"fa-youtube":{unicode:"\\f167",name:"Youtube"},"fa-youtube-play":{unicode:"\\f16a",name:"Youtube play"},"fa-youtube-square":{unicode:"\\f166",name:"Youtube square"}},u=["glyph-glass","glyph-leaf","glyph-dog","glyph-user","glyph-girl","glyph-car","glyph-user-add","glyph-user-remove","glyph-film","glyph-magic","glyph-envelope","glyph-camera","glyph-heart","glyph-beach-umbrella","glyph-train","glyph-print","glyph-bin","glyph-music","glyph-note","glyph-heart-empty","glyph-home","glyph-snowflake","glyph-fire","glyph-magnet","glyph-parents","glyph-binoculars","glyph-road","glyph-search","glyph-cars","glyph-notes-2","glyph-pencil","glyph-bus","glyph-wifi-alt","glyph-luggage","glyph-old-man","glyph-woman","glyph-file","glyph-coins","glyph-airplane","glyph-notes","glyph-stats","glyph-charts","glyph-pie-chart","glyph-group","glyph-keys","glyph-calendar","glyph-router","glyph-camera-small","glyph-dislikes","glyph-star","glyph-link","glyph-eye-open","glyph-eye-close","glyph-alarm","glyph-clock","glyph-stopwatch","glyph-projector","glyph-history","glyph-truck","glyph-cargo","glyph-compass","glyph-keynote","glyph-paperclip","glyph-power","glyph-lightbulb","glyph-tag","glyph-tags","glyph-cleaning","glyph-ruller","glyph-gift","glyph-umbrella","glyph-book","glyph-bookmark","glyph-wifi","glyph-cup","glyph-stroller","glyph-headphones","glyph-headset","glyph-warning-sign","glyph-signal","glyph-retweet","glyph-refresh","glyph-roundabout","glyph-random","glyph-heat","glyph-repeat","glyph-display","glyph-log-book","glyph-address-book","glyph-building","glyph-eyedropper","glyph-adjust","glyph-tint","glyph-crop","glyph-vector-path-square","glyph-vector-path-circle","glyph-vector-path-polygon","glyph-vector-path-line","glyph-vector-path-curve","glyph-vector-path-all","glyph-font","glyph-italic","glyph-bold","glyph-text-underline","glyph-text-strike","glyph-text-height","glyph-text-width","glyph-text-resize","glyph-left-indent","glyph-right-indent","glyph-align-left","glyph-align-center","glyph-align-right","glyph-justify","glyph-list","glyph-text-smaller","glyph-text-bigger","glyph-embed","glyph-embed-close","glyph-table","glyph-message-full","glyph-message-empty","glyph-message-in","glyph-message-out","glyph-message-plus","glyph-message-minus","glyph-message-ban","glyph-message-flag","glyph-message-lock","glyph-message-new","glyph-inbox","glyph-inbox-plus","glyph-inbox-minus","glyph-inbox-lock","glyph-inbox-in","glyph-inbox-out","glyph-cogwheel","glyph-cogwheels","glyph-picture","glyph-adjust-alt","glyph-database-lock","glyph-database-plus","glyph-database-minus","glyph-database-ban","glyph-folder-open","glyph-folder-plus","glyph-folder-minus","glyph-folder-lock","glyph-folder-flag","glyph-folder-new","glyph-edit","glyph-new-window","glyph-check","glyph-unchecked","glyph-more-windows","glyph-show-big-thumbnails","glyph-show-thumbnails","glyph-show-thumbnails-with-lines","glyph-show-lines","glyph-playlist","glyph-imac","glyph-macbook","glyph-ipad","glyph-iphone","glyph-iphone-transfer","glyph-iphone-exchange","glyph-ipod","glyph-ipod-shuffle","glyph-ear-plugs","glyph-record","glyph-step-backward","glyph-fast-backward","glyph-rewind","glyph-play","glyph-pause","glyph-stop","glyph-forward","glyph-fast-forward","glyph-step-forward","glyph-eject","glyph-facetime-video","glyph-download-alt","glyph-mute","glyph-volume-down","glyph-volume-up","glyph-screenshot","glyph-move","glyph-more","glyph-brightness-reduce","glyph-brightness-increase","glyph-circle-plus","glyph-circle-minus","glyph-circle-remove","glyph-circle-ok","glyph-circle-question-mark","glyph-circle-info","glyph-circle-exclamation-mark","glyph-remove","glyph-ok","glyph-ban","glyph-download","glyph-upload","glyph-shopping-cart","glyph-lock","glyph-unlock","glyph-electricity","glyph-ok-2","glyph-remove-2","glyph-cart-out","glyph-cart-in","glyph-left-arrow","glyph-right-arrow","glyph-down-arrow","glyph-up-arrow","glyph-resize-small","glyph-resize-full","glyph-circle-arrow-left","glyph-circle-arrow-right","glyph-circle-arrow-top","glyph-circle-arrow-down","glyph-play-button","glyph-unshare","glyph-share","glyph-chevron-right","glyph-chevron-left","glyph-bluetooth","glyph-euro","glyph-usd","glyph-gbp","glyph-retweet-2","glyph-moon","glyph-sun","glyph-cloud","glyph-direction","glyph-brush","glyph-pen","glyph-zoom-in","glyph-zoom-out","glyph-pin","glyph-albums","glyph-rotation-lock","glyph-flash","glyph-google-maps","glyph-anchor","glyph-conversation","glyph-chat","glyph-male","glyph-female","glyph-asterisk","glyph-divide","glyph-snorkel-diving","glyph-scuba-diving","glyph-oxygen-bottle","glyph-fins","glyph-fishes","glyph-boat","glyph-delete","glyph-sheriffs-star","glyph-qrcode","glyph-barcode","glyph-pool","glyph-buoy","glyph-spade","glyph-bank","glyph-vcard","glyph-electrical-plug","glyph-flag","glyph-credit-card","glyph-keyboard-wireless","glyph-keyboard-wired","glyph-shield","glyph-ring","glyph-cake","glyph-drink","glyph-beer","glyph-fast-food","glyph-cutlery","glyph-pizza","glyph-birthday-cake","glyph-tablet","glyph-settings","glyph-bullets","glyph-cardio","glyph-t-shirt","glyph-pants","glyph-sweater","glyph-fabric","glyph-leather","glyph-scissors","glyph-bomb","glyph-skull","glyph-celebration","glyph-tea-kettle","glyph-french-press","glyph-coffe-cup","glyph-pot","glyph-grater","glyph-kettle","glyph-hospital","glyph-hospital-h","glyph-microphone","glyph-webcam","glyph-temple-christianity-church","glyph-temple-islam","glyph-temple-hindu","glyph-temple-buddhist","glyph-bicycle","glyph-life-preserver","glyph-share-alt","glyph-comments","glyph-flower","glyph-baseball","glyph-rugby","glyph-ax","glyph-table-tennis","glyph-bowling","glyph-tree-conifer","glyph-tree-deciduous","glyph-more-items","glyph-sort","glyph-filter","glyph-gamepad","glyph-playing-dices","glyph-calculator","glyph-tie","glyph-wallet","glyph-piano","glyph-sampler","glyph-podium","glyph-soccer-ball","glyph-blog","glyph-dashboard","glyph-certificate","glyph-bell","glyph-candle","glyph-pushpin","glyph-iphone-shake","glyph-pin-flag","glyph-turtle","glyph-rabbit","glyph-globe","glyph-briefcase","glyph-hdd","glyph-thumbs-up","glyph-thumbs-down","glyph-hand-right","glyph-hand-left","glyph-hand-up","glyph-hand-down","glyph-fullscreen","glyph-shopping-bag","glyph-book-open","glyph-nameplate","glyph-nameplate-alt","glyph-vases","glyph-bullhorn","glyph-dumbbell","glyph-suitcase","glyph-file-import","glyph-file-export","glyph-bug","glyph-crown","glyph-smoking","glyph-cloud-upload","glyph-cloud-download","glyph-restart","glyph-security-camera","glyph-expand","glyph-collapse","glyph-collapse-top","glyph-globe-af","glyph-global","glyph-spray","glyph-nails","glyph-claw-hammer","glyph-classic-hammer","glyph-hand-saw","glyph-riflescope","glyph-electrical-socket-eu","glyph-electrical-socket-us","glyph-message-forward","glyph-coat-hanger","glyph-dress","glyph-bathrobe","glyph-shirt","glyph-underwear","glyph-log-in","glyph-log-out","glyph-exit","glyph-new-window-alt","glyph-video-sd","glyph-video-hd","glyph-subtitles","glyph-sound-stereo","glyph-sound-dolby","glyph-sound-5-1","glyph-sound-6-1","glyph-sound-7-1","glyph-copyright-mark","glyph-registration-mark","glyph-radar","glyph-skateboard","glyph-golf-course","glyph-sorting","glyph-sort-by-alphabet","glyph-sort-by-alphabet-alt","glyph-sort-by-order","glyph-sort-by-order-alt","glyph-sort-by-attributes","glyph-sort-by-attributes-alt","glyph-compressed","glyph-package","glyph-cloud-plus","glyph-cloud-minus","glyph-disk-save","glyph-disk-open","glyph-disk-saved","glyph-disk-remove","glyph-disk-import","glyph-disk-export","glyph-tower","glyph-send","glyph-git-branch","glyph-git-create","glyph-git-private","glyph-git-delete","glyph-git-merge","glyph-git-pull-request","glyph-git-compare","glyph-git-commit","glyph-construction-cone","glyph-shoe-steps","glyph-plus","glyph-minus","glyph-redo","glyph-undo","glyph-golf","glyph-hockey","glyph-pipe","glyph-wrench","glyph-folder-closed","glyph-phone-alt","glyph-earphone","glyph-floppy-disk","glyph-floppy-saved","glyph-floppy-remove","glyph-floppy-save","glyph-floppy-open","glyph-translate","glyph-fax","glyph-factory","glyph-shop-window","glyph-shop","glyph-kiosk","glyph-kiosk-wheels","glyph-kiosk-light","glyph-kiosk-food","glyph-transfer","glyph-money","glyph-header","glyph-blacksmith","glyph-saw-blade","glyph-basketball","glyph-server","glyph-server-plus","glyph-server-minus","glyph-server-ban","glyph-server-flag","glyph-server-lock","glyph-server-new"],f=["social-pinterest","social-dropbox","social-google-plus","social-jolicloud","social-yahoo","social-blogger","social-picasa","social-amazon","social-tumblr","social-wordpress","social-instapaper","social-evernote","social-xing","social-zootool","social-dribbble","social-deviantart","social-read-it-later","social-linked-in","social-forrst","social-pinboard","social-behance","social-github","social-youtube","social-skitch","social-foursquare","social-quora","social-badoo","social-spotify","social-stumbleupon","social-readability","social-facebook","social-twitter","social-instagram","social-posterous-spaces","social-vimeo","social-flickr","social-last-fm","social-rss","social-skype","social-e-mail","social-vine","social-myspace","social-goodreads","social-apple","social-windows","social-yelp","social-playstation","social-xbox","social-android","social-ios"]}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"image"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.base()},getTitle:function(){return"Image Field"},getDescription:function(){return"Image Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(i){var u=this,r=this.getTextControlEl();r&&r.length>0&&(t.isEmpty(i)?r.val(""):(r.val(i),n(u.control).parent().find(".alpaca-image-display img").attr("src",i)));this.updateMaxLengthIndicator()},getValue:function(){var t=null,n=this.getTextControlEl();return n&&n.length>0&&(t=n.val()),t},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl(),u;i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():i.sf&&n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,u){u.result&&n.each(u.result,function(t,u){i.setValue(u.url);n(r).change()})}}).data("loaded",!0);n(r).change(function(){var t=n(this).val();n(i.control).parent().find(".alpaca-image-display img").attr("src",t)});i.options.manageurl&&(u=n('Manage files<\/a>').appendTo(n(r).parent()));t()},applyTypeAhead:function(){var r=this,o,i,s,f,e,h,c,l,u;if(r.control.typeahead&&r.options.typeahead&&!t.isEmpty(r.options.typeahead)&&r.sf){if(o=r.options.typeahead.config,o||(o={}),i=r.options.typeahead.datasets,i||(i={}),i.name||(i.name=r.getId()),s=r.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:r.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));u=this.getTextControlEl();n(u).typeahead(o,i);n(u).on("typeahead:autocompleted",function(t,i){r.setValue(i.value);n(u).change()});n(u).on("typeahead:selected",function(t,i){r.setValue(i.value);n(u).change()});if(f){if(f.autocompleted)n(u).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(u).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(u).change(function(){var t=n(this).val(),i=n(u).typeahead("val");i!==t&&n(u).typeahead("val",t)});n(r.field).find("span.twitter-typeahead").first().css("display","block");n(r.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("image",t.Fields.ImageField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Image2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getFileUrl:function(t){if(self.sf){var i={fileid:t};n.ajax({url:self.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:self.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:i,success:function(n){return n},error:function(){return""}})}},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select Field"},getDescription:function(){return"Select Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("image2",t.Fields.Image2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCrop2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"imagecrop2"},setup:function(){var n=this;this.options.uploadfolder||(this.options.uploadfolder="");this.options.cropfolder||(this.options.cropfolder=this.options.uploadfolder);this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.width&&this.options.height&&(this.options.cropper.aspectRatio=this.options.width/this.options.height);this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.options.cropButtonHidden||(this.options.cropButtonHidden=!1);this.options.cropButtonHidden||(this.options.buttons={check:{value:"Crop",click:function(){this.cropImage()}}});this.base()},getValue:function(){var i=this,t;if(this.control&&this.control.length>0)return t=null,$image=i.getImage(),t=i.cropperExist()?$image.cropper("getData",{rounded:!0}):{},t.url=n(this.control).find("select").val(),t.url&&(this.dataSource&&this.dataSource[t.url]&&(t.id=this.dataSource[t.url].id),t.cropUrl=n(i.getControlEl()).attr("data-cropurl")),t},setValue:function(i){var r=this,u;i!==this.getValue()&&this.control&&typeof i!="undefined"&&i!=null&&(t.isEmpty(i)?(r.cropper(""),n(this.control).find("select").val(""),n(r.getControlEl()).attr("data-cropurl","")):t.isObject(i)?(i.url&&(i.url=i.url.split("?")[0]),i.cropUrl&&(i.cropUrl=i.cropUrl.split("?")[0]),i.cropdata&&Object.keys(i.cropdata).length>0?(u=i.cropdata[Object.keys(i.cropdata)[0]],r.cropper(i.url,u.cropper),n(this.control).find("select").val(i.url),n(r.getControlEl()).attr("data-cropurl",u.url)):(r.cropper(i.url,i),n(this.control).find("select").val(i.url),n(r.getControlEl()).attr("data-cropurl",i.cropUrl))):(r.cropper(i),n(this.control).find("select").val(i),n(r.getControlEl()).attr("data-cropurl","")),n(this.control).find("select").trigger("change.select2"))},getEnum:function(){if(this.schema){if(this.schema["enum"])return this.schema["enum"];if(this.schema.type&&this.schema.type==="array"&&this.schema.items&&this.schema.items["enum"])return this.schema.items["enum"]}},initControlEvents:function(){var n=this,t;if(n.base(),n.options.multiple){t=this.control.parent().find(".select2-search__field");t.focus(function(t){n.suspendBlurFocus||(n.onFocus.call(n,t),n.trigger("focus",t))});t.blur(function(t){n.suspendBlurFocus||(n.onBlur.call(n,t),n.trigger("blur",t))});this.control.on("change",function(t){n.onChange.call(n,t);n.trigger("change",t)})}},beforeRenderControl:function(i,r){var u=this;this.base(i,function(){if(u.selectOptions=[],u.sf){var f=function(){u.schema.enum=[];u.options.optionLabels=[];for(var n=0;n0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(' '+t.text+"<\/span>")};n(u.getControlEl().find("select")).select2(i)}u.options.uploadhidden?n(u.getControlEl()).find("input[type=file]").hide():u.sf&&n(u.getControlEl()).find("input[type=file]").fileupload({dataType:"json",url:u.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:u.options.uploadfolder},beforeSend:u.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(n,t){u.refresh(function(){u.setValue(t.url)})})}}).data("loaded",!0);r()})},cropImage:function(){var t=this,i=t.getValue(),r={url:i.url,cropfolder:t.options.cropfolder,crop:i,id:"crop"};t.options.width&&t.options.height&&(r.resize={width:t.options.width,height:t.options.height});n(t.getControlEl()).css("cursor","wait");n.ajax({type:"POST",url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/CropImage",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),beforeSend:t.sf.setModuleHeaders}).done(function(i){n(t.getControlEl()).attr("data-cropurl",i.url);setTimeout(function(){n(t.getControlEl()).css("cursor","initial")},500)}).fail(function(i,r,u){alert("Uh-oh, something broke: "+u);n(t.getControlEl()).css("cursor","initial")})},getFileUrl:function(t){var i=this,r;i.sf&&(r={fileid:t},n.ajax({url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/FileUrl",beforeSend:i.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:r,success:function(n){return n},error:function(){return""}}))},cropper:function(t,i){var f=this,r,u;$image=f.getImage();$image.attr("src",t);r=$image.data("cropper");t?($image.show(),r?((t!=r.originalUrl||r.url&&t!=r.url)&&$image.cropper("replace",t),i&&$image.cropper("setData",i)):(u=n.extend({},{aspectRatio:16/9,checkOrientation:!1,autoCropArea:.9,minContainerHeight:200,minContainerWidth:400,toggleDragModeOnDblclick:!1},f.options.cropper),i&&(u.data=i),$image.cropper(u))):($image.hide(),r&&$image.cropper("destroy"))},cropperExist:function(){var n=this;return $image=n.getImage(),$image.data("cropper")},getImage:function(){var t=this;return n(t.control).parent().find("#"+t.id+"-image")},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data?this.data.url:"",!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).find("select");i.focus();t&&t(this)}},getTitle:function(){return"Image Crop 2 Field"},getDescription:function(){return"Image Crop 2 Field"}});t.registerFieldClass("imagecrop2",t.Fields.ImageCrop2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCropField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"imagecrop"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.base()},getTitle:function(){return"Image Crop Field"},getDescription:function(){return"Image Crop Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var r=this,i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?(i.val(""),r.cropper("")):t.isObject(n)?(i.val(n.url),r.cropper(n.url,n)):(i.val(n),r.cropper(n)));this.updateMaxLengthIndicator()},getValue:function(){var i=this,n=null,t=this.getTextControlEl();return $image=i.getImage(),t&&t.length>0&&(n=i.cropperExist()?$image.cropper("getData",{rounded:!0}):{},n.url=t.val()),n},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getTextControlEl(),u;$image=n(i.control).parent().find(".alpaca-image-display img");i.sf?(i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){n(r).val(i.url);n(r).change()})}}).data("loaded",!0),n(r).change(function(){var t=n(this).val();i.cropper(t)}),i.options.manageurl&&(u=n('Manage files<\/a>').appendTo(n(r).parent()))):$image.hide();t()},cropper:function(t,i){var f=this,r,u;$image=f.getImage();$image.attr("src",t);r=$image.data("cropper");t?($image.show(),r?(t!=r.originalUrl&&$image.cropper("replace",t),i&&$image.cropper("setData",i)):(u=n.extend({},{aspectRatio:16/9,checkOrientation:!1,autoCropArea:.9,minContainerHeight:200,minContainerWidth:400,toggleDragModeOnDblclick:!1},f.options.cropper),i&&(u.data=i),$image.cropper(u))):($image.hide(),r&&$image.cropper("destroy"))},cropperExist:function(){var n=this;return $image=n.getImage(),$image.data("cropper")},getImage:function(){var t=this;return n(t.control).parent().find("#"+t.id+"-image")},applyTypeAhead:function(){var u=this,o,i,s,f,e,h,c,l,r;if(u.control.typeahead&&u.options.typeahead&&!t.isEmpty(u.options.typeahead)&&u.sf){if(o=u.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=u.getId()),s=u.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:u.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:u.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));r=this.getTextControlEl();n(r).typeahead(o,i);n(r).on("typeahead:autocompleted",function(t,i){n(r).val(i.value);n(r).change()});n(r).on("typeahead:selected",function(t,i){n(r).val(i.value);n(r).change()});if(f){if(f.autocompleted)n(r).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(r).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(r).change(function(){var t=n(this).val(),i=n(r).typeahead("val");i!==t&&n(r).typeahead("val",t)});n(u.field).find("span.twitter-typeahead").first().css("display","block");n(u.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("imagecrop",t.Fields.ImageCropField)}(jQuery),function(n){var t=n.alpaca;t.Fields.ImageCropperField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"imagecropper"},setup:function(){this.options.uploadfolder||(this.options.uploadfolder="");this.options.uploadhidden||(this.options.uploadhidden=!1);this.options.cropper||(this.options.cropper={});this.options.cropper.responsive=!1;this.options.cropper.autoCropArea||(this.options.cropper.autoCropArea=1);this.base()},getTitle:function(){return"Image Cropper Field"},getDescription:function(){return"Image Cropper Field."},getTextControlEl:function(){return n(this.control.get(0)).find("input[type=text]#"+this.id)},setValue:function(n){var i=this.getTextControlEl();i&&i.length>0&&(t.isEmpty(n)?i.val(""):t.isString(n)?i.val(n):(i.val(n.url),this.setCroppedData(n.cropdata)));this.updateMaxLengthIndicator()},getValue:function(){var n=null,t=this.getTextControlEl();return t&&t.length>0&&(n={url:t.val()},n.cropdata=this.getCroppedData()),n},getCroppedData:function(){var f=this.getTextControlEl(),i={};for(var t in this.options.croppers){var e=this.options.croppers[t],r=this.id+"-"+t,u=n("#"+r);i[t]=u.data("cropdata")}return i},cropAllImages:function(t){var i=this;for(var r in this.options.croppers){var f=this.id+"-"+r,s=n("#"+f),u=this.options.croppers[r],e={x:-1,y:-1,width:u.width,height:u.height,rotate:0},o=JSON.stringify({url:t,id:r,crop:e,resize:u,cropfolder:this.options.cropfolder});n.ajax({type:"POST",url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/CropImage",contentType:"application/json; charset=utf-8",dataType:"json",async:!1,data:o,beforeSend:i.sf.setModuleHeaders}).done(function(n){var t={url:n.url,cropper:{}};i.setCroppedDataForId(f,t)}).fail(function(n,t,i){alert("Uh-oh, something broke: "+i)})}},setCroppedData:function(i){var e=this.getTextControlEl(),h=this.getFieldEl(),u,r,f,o;if(e&&e.length>0&&!t.isEmpty(i))for(r in this.options.croppers){var o=this.options.croppers[r],c=this.id+"-"+r,s=n("#"+c);cropdata=i[r];cropdata&&s.data("cropdata",cropdata);u||(u=s,n(u).addClass("active"),cropdata&&(f=n(h).find(".alpaca-image-display img.image"),o=f.data("cropper"),o&&f.cropper("setData",cropdata.cropper)))}},setCroppedDataForId:function(t,i){var u=this.getTextControlEl(),r;i&&(r=n("#"+t),r.data("cropdata",i))},getCurrentCropData:function(){var t=this.getFieldEl(),i=n(t).parent().find(".alpaca-form-tab.active");return n(i).data("cropdata")},setCurrentCropData:function(t){var i=this.getFieldEl(),r=n(i).parent().find(".alpaca-form-tab.active");n(r).data("cropdata",t)},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},cropChange:function(t){var u=t.data,f=u.getCurrentCropData(),e;if(f){var r=f.cropper,o=this,i=n(this).cropper("getData",{rounded:!0});(i.x!=r.x||i.y!=r.y||i.width!=r.width||i.height!=r.height||i.rotate!=r.rotate)&&(e={url:"",cropper:i},u.setCurrentCropData(e))}},getCropppersData:function(){var n,t,i;for(n in self.options.croppers)t=self.options.croppers[n],i=self.id+"-"+n},handlePostRender:function(t){var i=this,f=this.getTextControlEl(),s=this.getFieldEl(),r=n('Crop<\/a>'),e,o,u,a;r.click(function(){var u=i.getCroppedData(),e=JSON.stringify({url:f.val(),cropfolder:i.options.cropfolder,cropdata:u,croppers:i.options.croppers}),t;return n(r).css("cursor","wait"),t="CropImages",n.ajax({type:"POST",url:i.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/"+t,contentType:"application/json; charset=utf-8",dataType:"json",data:e,beforeSend:i.sf.setModuleHeaders}).done(function(t){var u,f;for(u in i.options.croppers){var s=i.options.croppers[u],e=i.id+"-"+u,o=n("#"+e);t.cropdata[u]&&(f={url:t.cropdata[u].url,cropper:t.cropdata[u].crop},f&&o.data("cropdata",f))}setTimeout(function(){n(r).css("cursor","initial")},500)}).fail(function(t,i,r){alert("Uh-oh, something broke: "+r);n(s).css("cursor","initial")}),!1});for(o in i.options.croppers){var c=i.options.croppers[o],l=i.id+"-"+o,h=n(''+o+"<\/a>").appendTo(n(f).parent());h.data("cropopt",c);h.click(function(){u.off("crop.cropper");var t=n(this).data("cropdata"),f=n(this).data("cropopt");u.cropper("setAspectRatio",f.width/f.height);t?u.cropper("setData",t.cropper):u.cropper("reset");r.data("cropperButtonId",this.id);r.data("cropperId",n(this).attr("data-id"));n(this).parent().find(".alpaca-form-tab").removeClass("active");n(this).addClass("active");u.on("crop.cropper",i,i.cropChange);return!1});e||(e=h,n(e).addClass("active"),r.data("cropperButtonId",n(e).attr("id")),r.data("cropperId",n(e).attr("data-id")))}u=n(s).find(".alpaca-image-display img.image");u.cropper(i.options.cropper).on("built.cropper",function(){var t=n(e).data("cropopt"),r,u;t&&n(this).cropper("setAspectRatio",t.width/t.height);r=n(e).data("cropdata");r&&n(this).cropper("setData",r.cropper);u=n(s).find(".alpaca-image-display img.image");u.on("crop.cropper",i,i.cropChange)});i.options.uploadhidden?n(this.control.get(0)).find("input[type=file]").hide():n(this.control.get(0)).find("input[type=file]").fileupload({dataType:"json",url:i.sf.getServiceRoot("OpenContent")+"FileUpload/UploadFile",maxFileSize:25e6,formData:{uploadfolder:i.options.uploadfolder},beforeSend:i.sf.setModuleHeaders,add:function(n,t){t.submit()},progress:function(n,t){if(t.context){var i=parseInt(t.loaded/t.total*100,10);t.context.find(opts.progressBarSelector).css("width",i+"%").find("span").html(i+"%")}},done:function(t,i){i.result&&n.each(i.result,function(t,i){f.val(i.url);n(f).change()})}}).data("loaded",!0);n(f).change(function(){var t=n(this).val();n(s).find(".alpaca-image-display img.image").attr("src",t);u.cropper("replace",t);t&&i.cropAllImages(t)});r.appendTo(n(f).parent());i.options.manageurl&&(a=n('Manage files<\/a>').appendTo(n(f).parent()));t()},applyTypeAhead:function(){var u=this,o,i,s,f,e,h,c,l,r;if(u.control.typeahead&&u.options.typeahead&&!t.isEmpty(u.options.typeahead)){if(o=u.options.typeahead.config,o||(o={}),i=i={},i.name||(i.name=u.getId()),s=u.options.typeahead.Folder,s||(s=""),f=f={},e={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},e.remote={url:u.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Images?q=%QUERY&d="+s,ajax:{beforeSend:u.sf.setModuleHeaders}},i.filter&&(e.remote.filter=i.filter),i.replace&&(e.remote.replace=i.replace),h=new Bloodhound(e),h.initialize(),i.source=h.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"
<\/div> {{name}}"},i.templates)for(c in i.templates)l=i.templates[c],typeof l=="string"&&(i.templates[c]=Handlebars.compile(l));r=this.getTextControlEl();n(r).typeahead(o,i);n(r).on("typeahead:autocompleted",function(t,i){r.val(i.value);n(r).change()});n(r).on("typeahead:selected",function(t,i){r.val(i.value);n(r).change()});if(f){if(f.autocompleted)n(r).on("typeahead:autocompleted",function(n,t){f.autocompleted(n,t)});if(f.selected)n(r).on("typeahead:selected",function(n,t){f.selected(n,t)})}n(r).change(function(){var t=n(this).val(),i=n(r).typeahead("val");i!==t&&n(r).typeahead("val",t)});n(u.field).find("span.twitter-typeahead").first().css("display","block");n(u.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("imagecropper",t.Fields.ImageCropperField)}(jQuery),function(n){var t=n.alpaca;t.Fields.NumberField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.numberDecimalSeparator=f.numberDecimalSeparator},setup:function(){this.base()},getFieldType:function(){return"number"},getValue:function(){var n=this._getControlVal(!1);return typeof n=="undefined"||""==n?n:(this.numberDecimalSeparator!="."&&(n=(""+n).replace(this.numberDecimalSeparator,".")),parseFloat(n))},setValue:function(n){var i=n;this.numberDecimalSeparator!="."&&(i=t.isEmpty(n)?"":(""+n).replace(".",this.numberDecimalSeparator));this.base(i)},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateNumber();return i.stringNotANumber={message:n?"":this.view.getMessage("stringNotANumber"),status:n},n=this._validateDivisibleBy(),i.stringDivisibleBy={message:n?"":t.substituteTokens(this.view.getMessage("stringDivisibleBy"),[this.schema.divisibleBy]),status:n},n=this._validateMaximum(),i.stringValueTooLarge={message:"",status:n},n||(i.stringValueTooLarge.message=this.schema.exclusiveMaximum?t.substituteTokens(this.view.getMessage("stringValueTooLargeExclusive"),[this.schema.maximum]):t.substituteTokens(this.view.getMessage("stringValueTooLarge"),[this.schema.maximum])),n=this._validateMinimum(),i.stringValueTooSmall={message:"",status:n},n||(i.stringValueTooSmall.message=this.schema.exclusiveMinimum?t.substituteTokens(this.view.getMessage("stringValueTooSmallExclusive"),[this.schema.minimum]):t.substituteTokens(this.view.getMessage("stringValueTooSmall"),[this.schema.minimum])),n=this._validateMultipleOf(),i.stringValueNotMultipleOf={message:"",status:n},n||(i.stringValueNotMultipleOf.message=t.substituteTokens(this.view.getMessage("stringValueNotMultipleOf"),[this.schema.multipleOf])),r&&i.stringNotANumber.status&&i.stringDivisibleBy.status&&i.stringValueTooLarge.status&&i.stringValueTooSmall.status&&i.stringValueNotMultipleOf.status},_validateNumber:function(){var n=this._getControlVal(),i,r;return(this.numberDecimalSeparator!="."&&(n=n.replace(this.numberDecimalSeparator,".")),typeof n=="number"&&(n=""+n),t.isValEmpty(n))?!0:(i=t.testRegex(t.regexps.number,n),!i)?!1:(r=this.getValue(),isNaN(r))?!1:!0},_validateDivisibleBy:function(){var n=this.getValue();return!t.isEmpty(this.schema.divisibleBy)&&n%this.schema.divisibleBy!=0?!1:!0},_validateMaximum:function(){var n=this.getValue();return!t.isEmpty(this.schema.maximum)&&(n>this.schema.maximum||!t.isEmpty(this.schema.exclusiveMaximum)&&n==this.schema.maximum&&this.schema.exclusiveMaximum)?!1:!0},_validateMinimum:function(){var n=this.getValue();return!t.isEmpty(this.schema.minimum)&&(n0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("role2",t.Fields.Role2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.User2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this,t;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.options.folder||(this.options.folder="");this.options.role||(this.options.role="");n=this;this.options.lazyLoading&&(t=10,this.options.select2={ajax:{url:this.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/UsersLookup",beforeSend:this.sf.setModuleHeaders,type:"get",dataType:"json",delay:250,data:function(i){return{q:i.term?i.term:"",d:n.options.folder,role:n.options.role,pageIndex:i.page?i.page:1,pageSize:t}},processResults:function(i,r){return r.page=r.page||1,r.page==1&&i.items.unshift({id:"",text:n.options.noneLabel}),{results:i.items,pagination:{more:r.page*t0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(t.loading)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},getUserName:function(t,i){var r=this,u;r.sf&&(u={userid:t},n.ajax({url:r.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/GetUserInfo",beforeSend:r.sf.setModuleHeaders,type:"get",asych:!1,dataType:"json",data:u,success:function(n){i&&i(n)},error:function(){alert("Error GetUserInfo "+t)}}))},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(){}),r):!0:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTextControlEl:function(){var t=this;return n(t.getControlEl()).find("input[type=text]")},getTitle:function(){return"Select User Field"},getDescription:function(){return"Select User Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("user2",t.Fields.User2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.Select2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select Field"},getDescription:function(){return"Select Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("select2",t.Fields.Select2Field)}(jQuery),function(n){var t=n.alpaca;n.alpaca.Fields.DnnUrlField=n.alpaca.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.sf=f.servicesFramework},setup:function(){this.base()},applyTypeAhead:function(){var t=this,f,i,r,u,e,o,s,h;if(t.sf){if(f=f={},i=i={},i.name||(i.name=t.getId()),r=r={},u={datumTokenizer:function(n){return Bloodhound.tokenizers.whitespace(n.value)},queryTokenizer:Bloodhound.tokenizers.whitespace},u.remote={url:t.sf.getServiceRoot("OpenContent")+"DnnEntitiesAPI/Tabs?q=%QUERY&l="+t.culture,ajax:{beforeSend:t.sf.setModuleHeaders}},i.filter&&(u.remote.filter=i.filter),i.replace&&(u.remote.replace=i.replace),e=new Bloodhound(u),e.initialize(),i.source=e.ttAdapter(),i.templates={empty:"Nothing found...",suggestion:"{{name}}"},i.templates)for(o in i.templates)s=i.templates[o],typeof s=="string"&&(i.templates[o]=Handlebars.compile(s));n(t.control).typeahead(f,i);n(t.control).on("typeahead:autocompleted",function(i,r){t.setValue(r.value);n(t.control).change()});n(t.control).on("typeahead:selected",function(i,r){t.setValue(r.value);n(t.control).change()});if(r){if(r.autocompleted)n(t.control).on("typeahead:autocompleted",function(n,t){r.autocompleted(n,t)});if(r.selected)n(t.control).on("typeahead:selected",function(n,t){r.selected(n,t)})}h=n(t.control);n(t.control).change(function(){var i=n(this).val(),t=n(h).typeahead("val");t!==i&&n(h).typeahead("val",t)});n(t.field).find("span.twitter-typeahead").first().css("display","block");n(t.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}}});t.registerFieldClass("url",t.Fields.DnnUrlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Url2Field=t.Fields.ListField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.sf=f.servicesFramework;this.culture=f.culture;this.dataSource={}},getFieldType:function(){return"select"},setup:function(){var n=this;n.schema.type&&n.schema.type==="array"&&(n.options.multiple=!0,n.options.removeDefaultNone=!0);this.base()},getValue:function(){var n,i;if(this.control&&this.control.length>0){if(n=this._getControlVal(!0),typeof n=="undefined")n=this.data;else if(t.isArray(n))for(i=0;i0&&(u.data=u.selectOptions[0].value),u.data&&u.setValue(u.data),n.fn.select2){var i=null;i=u.options.select2?u.options.select2:{};i.templateResult=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};i.templateSelection=function(t){if(!t.id)return t.text;return n(""+t.text+"<\/span>")};n(u.getControlEl()).select2(i)}r()})},_validateEnum:function(){var u=this,i,r;return this.schema["enum"]?(i=this.data,!this.isRequired()&&t.isValEmpty(i))?!0:this.options.multiple?(r=!0,i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),n.each(i,function(t,i){if(n.inArray(i,u.schema["enum"])<=-1)return r=!1,!1}),r):n.inArray(i,this.schema["enum"])>-1:!0},onChange:function(n){this.base(n);var i=this;t.later(25,this,function(){var n=i.getValue();i.setValue(n);i.refreshValidationState()})},_validateMinItems:function(){return this.schema.items&&this.schema.items.minItems&&n(":selected",this.control).lengththis.schema.items.maxItems?!1:!0},handleValidate:function(){var r=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:n},r&&i.tooManyItems.status&&i.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var i=n(this.control).get(0);i.focus();t&&t(this)}},getTitle:function(){return"Select File Field"},getDescription:function(){return"Select File Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}});t.registerFieldClass("url2",t.Fields.Url2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.wysihtmlField=t.Fields.TextAreaField.extend({getFieldType:function(){return"wysihtml"},setup:function(){this.data||(this.data="");this.base();typeof this.options.wysihtml=="undefined"&&(this.options.wysihtml={})},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(!r.isDisplayOnly()&&r.control){var t=r.control,u=n(t).find("#"+r.id)[0];r.editor=new wysihtml5.Editor(u,{toolbar:n(t).find("#"+r.id+"-toolbar")[0],parserRules:wysihtml5ParserRules});wysihtml5.commands.custom_class={exec:function(n,t,i){return wysihtml5.commands.formatBlock.exec(n,t,"p",i,new RegExp(i,"g"))},state:function(n,t,i){return wysihtml5.commands.formatBlock.state(n,t,"p",i,new RegExp(i,"g"))}}}i()})},getEditor:function(){return this.editor},setValue:function(n){var t=this;this.editor&&this.editor.setValue(n);this.base(n)},getValue:function(){var n=null;return this.editor&&(n=this.editor.currentView=="source"?this.editor.sourceView.textarea.value:this.editor.getValue()),n},getTitle:function(){return"wysihtml"},getDescription:function(){return"Provides an instance of a wysihtml control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{wysihtml:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{wysiwyg:{type:"any"}}})}});t.registerFieldClass("wysihtml",t.Fields.wysihtmlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.SummernoteField=t.Fields.TextAreaField.extend({getFieldType:function(){return"summernote"},setup:function(){this.data||(this.data="");this.base();typeof this.options.summernote=="undefined"&&(this.options.summernote={height:null,minHeight:null,maxHeight:null});this.options.placeholder&&(this.options.summernote=this.options.placeholder)},afterRenderControl:function(t,i){var r=this;this.base(t,function(){if(!r.isDisplayOnly()&&r.control&&n.fn.summernote)r.on("ready",function(){n(r.control).summernote(r.options.summernote)});n(r.control).bind("destroyed",function(){try{n(r.control).summernote("destroy")}catch(t){}});i()})},getTitle:function(){return"Summernote Editor"},getDescription:function(){return"Provides an instance of a Summernote Editor control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{summernote:{title:"Summernote Editor options",description:"Use this entry to provide configuration options to the underlying Summernote plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{summernote:{type:"any"}}})}});t.registerFieldClass("summernote",t.Fields.SummernoteField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLSummernote=t.Fields.SummernoteField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language CKEditor Field"},getDescription:function(){return"Multi Language CKEditor field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlsummernote",t.Fields.MLSummernote)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLCKEditorField=t.Fields.CKEditorField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base();this.options.ckeditor||(this.options.ckeditor={});CKEDITOR.config.enableConfigHelper&&!this.options.ckeditor.extraPlugins&&(this.options.ckeditor.extraPlugins="dnnpages,confighelper")},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language CKEditor Field"},getDescription:function(){return"Multi Language CKEditor field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlckeditor",t.Fields.MLCKEditorField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFile2Field=t.Fields.File2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).after('')}});t.registerFieldClass("mlfile2",t.Fields.MLFile2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFileField=t.Fields.FileField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getTextControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlfile",t.Fields.MLFileField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLFolder2Field=t.Fields.Folder2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlfolder2",t.Fields.MLFolder2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLImage2Field=t.Fields.Image2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlimage2",t.Fields.MLImage2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLImageField=t.Fields.ImageField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getTextControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlimage",t.Fields.MLImageField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLTextAreaField=t.Fields.TextAreaField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Text Field"},getDescription:function(){return"Multi Language Text field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mltextarea",t.Fields.MLTextAreaField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLTextField=t.Fields.TextField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Text Field"},getDescription:function(){return"Multi Language Text field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mltext",t.Fields.MLTextField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLUrl2Field=t.Fields.Url2Field.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(r),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();t();n(this.control).parent().find(".select2").after('')}});t.registerFieldClass("mlurl2",t.Fields.MLUrl2Field)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLUrlField=t.Fields.DnnUrlField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.options.placeholder=this.culture!=this.defaultCulture&&this.olddata&&this.olddata[this.defaultCulture]?this.olddata[this.defaultCulture]:"";this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender(function(){t()})})},handlePostRender:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"Multi Language Url Field"},getDescription:function(){return"Multi Language Url field ."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}});t.registerFieldClass("mlurl",t.Fields.MLUrlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.MLwysihtmlField=t.Fields.wysihtmlField.extend({constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){this.data&&t.isObject(this.data)?this.olddata=this.data:this.data&&(this.olddata={},this.olddata[this.defaultCulture]=this.data);this.base()},getValue:function(){var r=this.base(),u=this,i={};return(this.olddata&&t.isObject(this.olddata)&&n.each(this.olddata,function(n,r){var f=t.copyOf(r);n!=u.culture&&(i[n]=f)}),r!=""&&(i[u.culture]=r),n.isEmptyObject(i))?"":i},setValue:function(n){if(n!==""){if(!n){this.base("");return}if(t.isObject(n)){var i=n[this.culture];if(!i){this.base("");return}this.base(i)}else this.base(n)}},afterRenderControl:function(n,t){var i=this;this.base(n,function(){i.handlePostRender2(function(){t()})})},handlePostRender2:function(t){var i=this,r=this.getControlEl();n(this.control.get(0)).after('');t()},getTitle:function(){return"ML wysihtml Field"},getDescription:function(){return"Provides an instance of a wysihtml control for use in editing MLHTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{wysihtml:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{wysiwyg:{type:"any"}}})}});t.registerFieldClass("mlwysihtml",t.Fields.MLwysihtmlField)}(jQuery),function(n){var t=n.alpaca;t.Fields.Accordion=t.Fields.ArrayField.extend({getFieldType:function(){return"accordion"},constructor:function(n,t,i,r,u,f){var e=this;this.base(n,t,i,r,u,f);this.culture=f.culture;this.defaultCulture=f.defaultCulture;this.rootUrl=f.rootUrl},setup:function(){var n=this;this.base();n.options.titleField||n.schema.items&&n.schema.items.properties&&Object.keys(n.schema.items.properties).length&&(n.options.titleField=Object.keys(n.schema.items.properties)[0])},createItem:function(i,r,u,f,e){var o=this;this.base(i,r,u,f,function(i){var f="[no title]",u=i.childrenByPropertyId[o.options.titleField],r;if(u){r=u.getValue();t.isObject(r)&&(r=r[o.culture]);r=r?r:f;i.getContainerEl().closest(".panel").find(".panel-title a").first().text(r);u.on("keyup",function(){var i=this.getValue();t.isObject(i)&&(i=i[o.culture]);i=i?i:f;n(this.getControlEl()).closest(".panel").find(".panel-title a").first().text(i)})}e&&e(i)})},getType:function(){return"array"},getTitle:function(){return"accordion Field"},getDescription:function(){return"Renders array with title"}});t.registerFieldClass("accordion",t.Fields.Accordion)}(jQuery); \ No newline at end of file diff --git a/OpenContent/bundleconfig.json b/OpenContent/bundleconfig.json index a9009fb4..50d233fb 100644 --- a/OpenContent/bundleconfig.json +++ b/OpenContent/bundleconfig.json @@ -5,6 +5,7 @@ "alpaca/js/fields/dnn/AddressField.js", "alpaca/js/fields/dnn/CKEditorField.js", "alpaca/js/fields/dnn/DateField.js", + "alpaca/js/fields/dnn/CheckboxField.js", "alpaca/js/fields/dnn/MultiUploadField.js", "alpaca/js/fields/dnn/DocumentsField.js", "alpaca/js/fields/dnn/File2Field.js", diff --git a/OpenContent/formsettings-options.json b/OpenContent/formsettings-options.json index 4a9601ef..329c358d 100644 --- a/OpenContent/formsettings-options.json +++ b/OpenContent/formsettings-options.json @@ -1,118 +1,120 @@ { - "fields": { - "Notifications": { - "fields": { - "item": { - "fields": { - "From": { - "title": "From", - "type": "select", - "optionLabels": [ "Host", "Site Admin", "Form Field", "Custom", "Current Dnn user" ], - "removeDefaultNone": true - }, - "FromName": { - "dependencies": { - "From": "custom" - }, - "helper": "Name part of the email address" - }, - "FromEmail": { - "dependencies": { - "From": "custom" - } - }, - "FromNameField": { - "dependencies": { - "From": "form" - }, - "helper": "Form field where the name is extracted" - }, - "FromEmailField": { - "dependencies": { - "From": "form" - }, - "helper": "Form field where the email is extracted" - }, - "To": { - "type": "select", - "optionLabels": [ "Host", "Site Admin", "Form Field", "Custom" , "Current Dnn user"], - "removeDefaultNone": true - }, - "ToName": { - "dependencies": { - "To": "custom" - }, - "helper": "Name part of the email address" - }, - "ToEmail": { - "dependencies": { - "To": "custom" - } - }, - "ToNameField": { - "dependencies": { - "To": "form" - }, - "helper": "Form field where the name is extracted" - }, - "ToEmailField": { - "dependencies": { - "To": "form" - }, - "helper": "Form field where the email is extracted" - }, - "ReplyTo": { - "type": "select", - "optionLabels": [ "Host", "Site Admin", "Form Field", "Custom", "Current Dnn user" ] - }, - "ReplyToName": { - "dependencies": { - "ReplyTo": "custom" - }, - "helper": "Name part of the email address" - }, - "ReplyToEmail": { - "dependencies": { - "ReplyTo": "custom" - } - }, - "ReplyToNameField": { - "dependencies": { - "ReplyTo": "form" - }, - "helper": "Form field where the name is extracted" - }, - "ReplyToEmailField": { - "dependencies": { - "ReplyTo": "form" - }, - "helper": "Form field where the email is extracted" - }, - "EmailSubject": { - }, - "EmailBody": { - "type": "wysihtml" - } - } - } + "fields": { + "Notifications": { + "type": "accordion", + "titleField": "EmailSubject", + "items": { + + "fields": { + "From": { + "title": "From", + "type": "select", + "optionLabels": [ "Host", "Site Admin", "Form Field", "Custom", "Current Dnn user" ], + "removeDefaultNone": true + }, + "FromName": { + "dependencies": { + "From": "custom" + }, + "helper": "Name part of the email address" + }, + "FromEmail": { + "dependencies": { + "From": "custom" } - }, - "Settings": { - "fields": { - "Message": { - "type": "wysihtml" - }, - "Tracking": { - "type": "textarea", - "hidden": true - }, - "SiteKey": { - "hidden": true - }, - "SecretKey": { - "hidden": true - } + }, + "FromNameField": { + "dependencies": { + "From": "form" + }, + "helper": "Form field where the name is extracted" + }, + "FromEmailField": { + "dependencies": { + "From": "form" + }, + "helper": "Form field where the email is extracted" + }, + "To": { + "type": "select", + "optionLabels": [ "Host", "Site Admin", "Form Field", "Custom", "Current Dnn user" ], + "removeDefaultNone": true + }, + "ToName": { + "dependencies": { + "To": "custom" + }, + "helper": "Name part of the email address" + }, + "ToEmail": { + "dependencies": { + "To": "custom" + } + }, + "ToNameField": { + "dependencies": { + "To": "form" + }, + "helper": "Form field where the name is extracted" + }, + "ToEmailField": { + "dependencies": { + "To": "form" + }, + "helper": "Form field where the email is extracted" + }, + "ReplyTo": { + "type": "select", + "optionLabels": [ "Host", "Site Admin", "Form Field", "Custom", "Current Dnn user" ] + }, + "ReplyToName": { + "dependencies": { + "ReplyTo": "custom" + }, + "helper": "Name part of the email address" + }, + "ReplyToEmail": { + "dependencies": { + "ReplyTo": "custom" } + }, + "ReplyToNameField": { + "dependencies": { + "ReplyTo": "form" + }, + "helper": "Form field where the name is extracted" + }, + "ReplyToEmailField": { + "dependencies": { + "ReplyTo": "form" + }, + "helper": "Form field where the email is extracted" + }, + "EmailSubject": { + }, + "EmailBody": { + "type": "summernote" + } + + } + } + }, + "Settings": { + "fields": { + "Message": { + "type": "summernote" + }, + "Tracking": { + "type": "textarea", + "hidden": true + }, + "SiteKey": { + "hidden": true + }, + "SecretKey": { + "hidden": true } + } } + } } \ No newline at end of file