1/*! For license information please see 8128.549d2798956a03a033d2.js.LICENSE.txt */ 2(self.webpackChunkCMS=self.webpackChunkCMS||[]).push([[8128,1479,555,8142],{44642:function(e,t,i){var n,a;!function(o,r){"use strict";e.exports?e.exports=r(i(19755)):(n=[i(19755)],void 0===(a=function(e){return r(e)}.apply(t,n))||(e.exports=a))}(0,(function(e){"use strict";var t=function(t,i){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,i),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.select=this.options.select||this.select,this.autoSelect="boolean"!=typeof this.options.autoSelect||this.options.autoSelect,this.highlighter=this.options.highlighter||this.highlighter,this.render=this.options.render||this.render,this.updater=this.options.updater||this.updater,this.displayText=this.options.displayText||this.displayText,this.source=this.options.source,this.delay=this.options.delay,this.$menu=e(this.options.menu),this.$appendTo=this.options.appendTo?e(this.options.appendTo):null,this.fitToElement="boolean"==typeof this.options.fitToElement&&this.options.fitToElement,this.shown=!1,this.listen(),this.showHintOnFocus=("boolean"==typeof this.options.showHintOnFocus||"all"===this.options.showHintOnFocus)&&this.options.showHintOnFocus,this.afterSelect=this.options.afterSelect,this.addItem=!1,this.value=this.$element.val()||this.$element.text()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").data("value");if(this.$element.data("active",e),this.autoSelect||e){var t=this.updater(e);t||(t=""),this.$element.val(this.displayText(t)||t).text(this.displayText(t)||t).change(),this.afterSelect(t)}return this.hide()},updater:function(e){return e},setSource:function(e){this.source=e},show:function(){var t,i=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight}),n="function"==typeof this.options.scrollHeight?this.options.scrollHeight.call():this.options.scrollHeight;if(this.shown?t=this.$menu:this.$appendTo?(t=this.$menu.appendTo(this.$appendTo),this.hasSameParent=this.$appendTo.is(this.$element.parent())):(t=this.$menu.insertAfter(this.$element),this.hasSameParent=!0),!this.hasSameParent){t.css("position","fixed");var a=this.$element.offset();i.top=a.top,i.left=a.left}var o=e(t).parent().hasClass("dropup")?"auto":i.top+i.height+n,r=e(t).hasClass("dropdown-menu-right")?"auto":i.left;return t.css({top:o,left:r}).show(),!0===this.options.fitToElement&&t.css("width",this.$element.outerWidth()+"px"),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){if(this.query=null!=t?t:this.$element.val()||this.$element.text()||"",this.query.length<this.options.minLength&&!this.options.showHintOnFocus)return this.shown?this.hide():this;var i=e.proxy((function(){e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source&&this.process(this.source)}),this);clearTimeout(this.lookupWorker),this.lookupWorker=setTimeout(i,this.delay)},process:function(t){var i=this;return t=e.grep(t,(function(e){return i.matcher(e)})),(t=this.sorter(t)).length||this.options.addItem?(t.length>0?this.$element.data("active",t[0]):this.$element.data("active",null),this.options.addItem&&t.push(this.options.addItem),"all"==this.options.items?this.render(t).show():this.render(t.slice(0,this.options.items)).show()):this.shown?this.hide():this},matcher:function(e){return~this.displayText(e).toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){for(var t,i=[],n=[],a=[];t=e.shift();){var o=this.displayText(t);o.toLowerCase().indexOf(this.query.toLowerCase())?~o.indexOf(this.query)?n.push(t):a.push(t):i.push(t)}return i.concat(n,a)},highlighter:function(t){var i,n,a,o,r=e("<div></div>"),s=this.query,l=t.toLowerCase().indexOf(s.toLowerCase()),c=s.length;if(0===c)return r.text(t).html();for(;l>-1;)i=t.substr(0,l),n=t.substr(l,c),a=t.substr(l+c),o=e("<strong></strong>").text(n),r.append(document.createTextNode(i)).append(o),l=(t=a).toLowerCase().indexOf(s.toLowerCase());return r.append(document.createTextNode(t)).html()},render:function(t){var i=this,n=this,a=!1,o=[],r=i.options.separator;return e.each(t,(function(e,i){e>0&&i[r]!==t[e-1][r]&&o.push({__type:"divider"}),!i[r]||0!==e&&i[r]===t[e-1][r]||o.push({__type:"category",name:i[r]}),o.push(i)})),t=e(o).map((function(t,o){if("category"==(o.__type||!1))return e(i.options.headerHtml).text(o.name)[0];if("divider"==(o.__type||!1))return e(i.options.headerDivider)[0];
2var r=n.displayText(o);return(t=e(i.options.item).data("value",o)).find("a").html(i.highlighter(r,o)),r==n.$element.val()&&(t.addClass("active"),n.$element.data("active",o),a=!0),t[0]})),this.autoSelect&&!a&&(t.filter(":not(.dropdown-header)").first().addClass("active"),this.$element.data("active",t.first().data("value"))),this.$menu.html(t),this},displayText:function(e){return void 0!==e&&void 0!==e.name&&e.name||e},next:function(t){var i=this.$menu.find(".active").removeClass("active").next();i.length||(i=e(this.$menu.find("li")[0])),i.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active").prev();t.length||(t=this.$menu.find("li").last()),t.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("input",e.proxy(this.input,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this)).on("mousedown",e.proxy(this.mousedown,this))},destroy:function(){this.$element.data("typeahead",null),this.$element.data("active",null),this.$element.off("focus").off("blur").off("keypress").off("input").off("keyup"),this.eventSupported("keydown")&&this.$element.off("keydown"),this.$menu.remove(),this.destroyed=!0},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t="function"==typeof this.$element[e]),t},move:function(e){if(this.shown)switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:if(e.shiftKey)return;e.preventDefault(),this.prev();break;case 40:if(e.shiftKey)return;e.preventDefault(),this.next()}},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.shown||40!=t.keyCode?this.move(t):this.lookup()},keypress:function(e){this.suppressKeyPressRepeat||this.move(e)}
2,input:function(e){var t=this.$element.val()||this.$element.text();this.value!==t&&(this.value=t,this.lookup())},keyup:function(e){if(!this.destroyed)switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide()}},focus:function(e){this.focused||(this.focused=!0,this.options.showHintOnFocus&&!0!==this.skipShowHintOnFocus&&("all"===this.options.showHintOnFocus?this.lookup(""):this.lookup())),this.skipShowHintOnFocus&&(this.skipShowHintOnFocus=!1)},blur:function(e){this.mousedover||this.mouseddown||!this.shown?this.mouseddown&&(this.skipShowHintOnFocus=!0,this.$element.focus(),this.mouseddown=!1):(this.hide(),this.focused=!1)},click:function(e){e.preventDefault(),this.skipShowHintOnFocus=!0,this.select(),this.$element.focus(),this.hide()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()},mousedown:function(e){this.mouseddown=!0,this.$menu.one("mouseup",function(e){this.mouseddown=!1}.bind(this))}};var i=e.fn.typeahead;e.fn.typeahead=function(i){var n=arguments;return"string"==typeof i&&"getActive"==i?this.data("active"):this.each((function(){var a=e(this),o=a.data("typeahead"),r="object"==typeof i&&i;o||a.data("typeahead",o=new t(this,r)),"string"==typeof i&&o[i]&&(n.length>1?o[i].apply(o,Array.prototype.slice.call(n,1)):o[i]())}))},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu" role="listbox"></ul>',item:'<li><a class="dropdown-item" href="#" role="option"></a></li>',minLength:1,scrollHeight:0,autoSelect:!0,afterSelect:e.noop,addItem:!1,delay:0,separator:"category",headerHtml:'<li class="dropdown-header"></li>',headerDivider:'<li class="divider" role="separator"></li>'},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=i,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',(function(t){var i=e(this);i.data("typeahead")||i.typeahead(i.data())}))}))},23645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",n=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),n&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),n&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,n,a,o){"string"==typeof e&&(e=[[null,e,void 0]]);var r={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(r[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);n&&r[d[0]]||(void 0!==o&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=o),i&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=i):d[2]=i),a&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=a):d[4]="".concat(a)),t.push(d))}},t}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},18005:function(module,exports,__webpack_require__){var jQuery=__webpack_require__(19755),__WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,root,factory,umdEnabled;root=this,factory=function($,Handlebars){var root,registry;return this.HandlebarsPrecompiled=this.HandlebarsPrecompiled||{},this.HandlebarsPrecompiled["web-display"]=this.HandlebarsPrecompiled["web-display"]||{},this.HandlebarsPrecompiled["web-display"]["container-array-item"]=Handlebars.template({1:function(e,t,i,n,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s,l='<script type="text/x-handlebars-template">\n\n <div>\n ';return r=null!=(r=i.itemField||(null!=t?t.itemField:t))?r:i.helperMissing,s={name:"itemField",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(null!=t?t:e.nullContext||{},s):r,i.itemField||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(l+=o),l+"\n </div>\n\n<\/script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["container-array"]=Handlebars.template({1:function(e,t,i,n,a){var o,r,s,l="\n ";return r=null!=(r=i.item||(null!=t?t.item:t))?r:i.helperMissing,s={name:"item",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(null!=t?t:e.nullContext||{},s):r,i.item||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(l+=o),l+"\n\n"},2:function(e,t,i,n,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o;return'<script type="text/x-handlebars-template">\n\n <div>\n\n'+(null!=(o=i.each.call(null!=t?t:e.nullContext||{},null!=t?t.items:t,{name:"each",hash:{}
vendor: 78,967 bytes, line 2
2,fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+"\n </div>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["container-object-item"]=Handlebars.template({1:function(e,t,i,n,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s,l='<script type="text/x-handlebars-template">\n\n <div>\n ';return r=null!=(r=i.itemField||(null!=t?t.itemField:t))?r:i.helperMissing,s={name:"itemField",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(null!=t?t:e.nullContext||{},s):r,i.itemField||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(l+=o),l+"\n </div>\n\n<\/script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["container-object"]=Handlebars.template({1:function(e,t,i,n,a){var o,r,s,l="\n ";return r=null!=(r=i.item||(null!=t?t.item:t))?r:i.helperMissing,s={name:"item",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(null!=t?t:e.nullContext||{},s):r,i.item||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(l+=o),l+"\n\n"},2:function(e,t,i,n,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o;return'<script type="text/x-handlebars-template">\n\n <div>\n\n'+(null!=(o=i.each.call(null!=t?t:e.nullContext||{},null!=t?t.items:t,{name:"each",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+"\n </div>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["container-table-item"]=Handlebars.template({1:function(e,t,i,n,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o;return'<script type="text/x-handlebars-template">\n\n <tr>\n '+(null!=(o=(i.itemField||t&&t.itemField||i.helperMissing).call(null!=t?t:e.nullContext||{},"td",{name:"itemField",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+"\n </tr>\n\n\n<\/script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["container-table"]=Handlebars.template({1:function(e,t,i,n,a){return""},3:function(e,t,i,n,a){var o;return" <th>"+e.escapeExpression(e.lambda(null!=(o=null!=t?t.value:t)?o.title:o,t))+"</th>\n"},5:function(e,t,i,n,a){var o;return"\n "+(null!=(o=(i.item||t&&t.item||i.helperMissing).call(null!=t?t:e.nullContext||{},"tr",{name:"item",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+"\n\n"},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s,l=null!=t?t:e.nullContext||{},c=i.helperMissing,d='<script type="text/x-handlebars-template">\n\n <div>\n\n ';return r=null!=(r=i.arrayToolbar||(null!=t?t.arrayToolbar:t))?r:c,s={name:"arrayToolbar",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(l,s):r,i.arrayToolbar||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(d+=o),d+"\n\n <table>\n\n \x3c!-- table headers --\x3e\n <thead>\n <tr>\n"+(null!=(o=(i.eachProperty||t&&t.eachProperty||c).call(l,null!=(o=null!=(o=null!=t?t.schema:t)?o.items:o)?o.properties:o,{name:"eachProperty",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?o:"")+" </tr>\n </thead>\n\n \x3c!-- table body --\x3e\n <tbody>\n"+(null!=(o=i.each.call(l,null!=t?t.items:t,{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:"")+" </tbody>\n\n </table>\n\n </div>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["container-tablerow-item"]=Handlebars.template({1:function(e,t,i,n,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s,l='<script type="text/x-handlebars-template">\n\n <td>\n ';return r=null!=(r=i.itemField||(null!=t?t.itemField:t))?r:i.helperMissing,s={name:"itemField",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(null!=t?t:e.nullContext||{},s):r,i.itemField||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(l+=o),l+"\n </td>\n\n<\/script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["container-tablerow"]=Handlebars.template({1:function(e,t,i,n,a){var o,r,s,l=" ";return r=null!=(r=i.item||(null!=t?t.item:t))?r:i.helperMissing,s={name:"item",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(null!=t?t:e.nullContext||{},s):r,i.item||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(l+=o),l+"\n"},2:function(e,t,i,n,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o;return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-merge-up">\n\n'+(null!=(o=i.each.call(null!=t?t:e.nullContext||{},null!=t?t.items:t,{name:"each",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+"\n </div>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"].container=Handlebars.template({1:function(e,t,i,n,a){var o;return' <legend class="'+(null!=(o=i.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.labelClass:o,{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a}))?o:"")+' alpaca-container-label">'+(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.label:o,t))?o:"")+"</legend>\n"},2:function(e,t,i,n,a){var o;return e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.labelClass:o,t))},4:function(e,t,i,n,a){var o;return null!=(o=(i.compare||t&&t.compare||i.helperMissing).call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.helpersPosition:o,"above",{name:"compare",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:""},5:function(e,t,i,n,a){var o;return null!=(o=i.each.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.helpers:o,{name:"each",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a}))?o:""},6:function(e,t,i,n,a){var o,r=null!=t?t:e.nullContext||{};return' <p class="alpaca-helper '+(null!=(o=i.if.call(r,null!=(o=null!=t?t.options:t)?o.helperClass:o,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?o:"")+'">\n <i class="alpaca-icon-helper"></i>\n '+(null!=(o=(i.showMessage||t&&t.showMessage||i.helperMissing).call(r,t,{name:"showMessage",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?o:"")+"\n </p>\n"},7:function(e,t,i,n,a){var o;return e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.helperClass:o,t))},9:function(e,t,i,n,a){return""},11:function(e,t,i,n,a){var o;return null!=(o=(i.compare||t&&t.compare||i.helperMissing).call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.helpersPosition:o,"below",{name:"compare",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s,l=null!=t?t:e.nullContext||{},c='<script type="text/x-handlebars-template">\n\n <div>\n\n'+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.label:o,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+"\n"+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.helpers:o,{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?o:"")+"\n ";return r=null!=(r=i.container||(null!=t?t.container:t))?r:i.helperMissing,s={name:"container",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(l,s):r,i.container||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(c+=o),c+"\n\n"+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.helpers:o,{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a}))?o:"")+"\n </div>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-any"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o;return'<script type="text/x-handlebars-template">\n\n <div>'+(null!=(o=(i.str||t&&t.str||i.helperMissing).call(null!=t?t:e.nullContext||{},null!=t?t.data:t,{name:"str",hash:{},data:a}))?o:"")+"</div>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-checkbox"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o;return'<script type="text/x-handlebars-template">\n\n <div>\n '+e.escapeExpression("function"==typeof(o=null!=(o=i.displayableText||(null!=t?t.displayableText:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"displayableText",hash:{},data:a}):o)+"\n </div>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-hidden"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){return'<script type="text/x-handlebars-template">\n\n<\/script>'},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-image"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r=null!=t?t:e.nullContext||{},s=i.helperMissing,l="function",c=e.escapeExpression;return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-image-display">\n <img id="'+c(typeof(o=null!=(o=i.id||(null!=t?t.id:t))?o:s)===l?o.call(r,{name:"id",hash:{},data:a}):o)+'-image" src="'+c(typeof(o=null!=(o=i.data||(null!=t?t.data:t))?o:s)===l?o.call(r,{name:"data",hash:{},data:a}):o)+'">\n </div>\n\n<\/script>'},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-password"]=Handlebars.template({1:function(e,t,i,n,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o;return'<script type="text/x-handlebars-template">\n\n <div>'+(null!=(o=(i.disguise||t&&t.disguise||i.helperMissing).call(null!=t?t:e.nullContext||{},null!=t?t.data:t,"•",{name:"disguise",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+"</div>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-radio"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o;return'<script type="text/x-handlebars-template">\n\n <div>\n '+e.escapeExpression("function"==typeof(o=null!=(o=i.displayableText||(null!=t?t.displayableText:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"displayableText",hash:{},data:a}):o)+"\n </div>\n\n<\/script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-select"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o;return'<script type="text/x-handlebars-template">\n\n <div>\n '+e.escapeExpression("function"==typeof(o=null!=(o=i.displayableText||(null!=t?t.displayableText:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"displayableText",hash:{},data:a}):o)+"\n </div>\n\n<\/script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-text"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r;return'<script type="text/x-handlebars-template">\n\n <div>'+(null!=(o="function"==typeof(r=null!=(r=i.data||(null!=t?t.data:t))?r:i.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"data",hash:{},data:a}):r)?o:"")+"</div>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-textarea"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r;return'<script type="text/x-handlebars-template">\n\n <p>\n '+(null!=(o="function"==typeof(r=null!=(r=i.data||(null!=t?t.data:t))?r:i.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"data",hash:{},data:a}):r)?o:"")+"\n </p>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-url"]=Handlebars.template({1:function(e,t,i,n,a){var o;return'target="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.anchorTarget:o,t))+'"'},3:function(e,t,i,n,a){var o;return e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.anchorTitle:o,t))},5:function(e,t,i,n,a){var o;return e.escapeExpression("function"==typeof(o=null!=(o=i.data||(null!=t?t.data:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"data",hash:{},data:a}):o)},7:function(e,t,i,n,a){var o;return" "+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.anchorTitle:o,t))+"\n"},9:function(e,t,i,n,a){var o;return" "+e.escapeExpression("function"==typeof(o=null!=(o=i.data||(null!=t?t.data:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"data",hash:{},data:a}):o)+"\n"},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{};return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-control-url-anchor-wrapper">\n <a href="'+e.escapeExpression("function"==typeof(r=null!=(r=i.data||(null!=t?t.data:t))?r:i.helperMissing)?r.call(s,{name:"data",hash:{},data:a}):r)+'" '+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.anchorTarget:o,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+' title="'+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.anchorTitle:o,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.program(5,a,0),data:a}))?o:"")+'">\n'+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.anchorTitle:o,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a}))?o:"")+" </a>\n </div>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"].control=Handlebars.template({1:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{};return' <label class="'+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.labelClass:o,{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a}))?o:"")+' alpaca-control-label" for="'+e.escapeExpression("function"==typeof(r=null!=(r=i.id||(null!=t?t.id:t))?r:i.helperMissing)?r.call(s,{name:"id",hash:{},data:a}):r)+'">'+(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.label:o,t))?o:"")+"</label>\n"},2:function(e,t,i,n,a){var o;return e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.labelClass:o,t))},4:function(e,t,i,n,a){var o;return null!=(o=(i.compare||t&&t.compare||i.helperMissing).call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.helpersPosition:o,"above",{name:"compare",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:""},5:function(e,t,i,n,a){var o;return null!=(o=i.each.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.helpers:o,{name:"each",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a}))?o:""},6:function(e,t,i,n,a){var o,r=null!=t?t:e.nullContext||{};return' <p class="'+(null!=(o=i.if.call(r,null!=(o=null!=t?t.options:t)?o.helperClass:o,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?o:"")+'">\n <i class="info-sign"></i>\n '+(null!=(o=(i.showMessage||t&&t.showMessage||i.helperMissing).call(r,t,{name:"showMessage",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?o:"")+"\n </p>\n"},7:function(e,t,i,n,a){var o;return e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.helperClass:o,t))},9:function(e,t,i,n,a){return""},11:function(e,t,i,n,a){var o;return null!=(o=(i.compare||t&&t.compare||i.helperMissing).call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.helpersPosition:o,"below",{name:"compare",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s,l=null!=t?t:e.nullContext||{},c='<script type="text/x-handlebars-template">\n\n <div>\n\n'+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.label:o,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+"\n"+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.helpers:o,{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?o:"")+"\n ";return r=null!=(r=i.control||(null!=t?t.control:t))?r:i.helperMissing,s={name:"control",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(l,s):r,i.control||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(c+=o),c+"\n\n"+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.helpers:o,{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a}))?o:"")+"\n </div>\n\n<\/script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-display"].form=Handlebars.template({1:function(e,t,i,n,a){return""},3:function(e,t,i,n,a){var o;return null!=(o=i.each.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.buttons:o,{name:"each",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?o:""},4:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{},l=i.helperMissing,c="function",d=e.escapeExpression;return' <button data-key="'+d(typeof(r=null!=(r=i.key||a&&a.key)?r:l)===c?r.call(s,{name:"key",hash:{},data:a}):r)+'" '+(null!=(o=(i.compare||t&&t.compare||l).call(s,null!=t?t.type:t,"submit",{name:"compare",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=(i.compare||t&&t.compare||l).call(s,null!=t?t.type:t,"reset",{name:"compare",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?o:"")+' class="alpaca-form-button alpaca-form-button-'+d(typeof(r=null!=(r=i.key||a&&a.key)?r:l)===c?r.call(s,{name:"key",hash:{},data:a}):r)+" "+d(typeof(r=null!=(r=i.styles||(null!=t?t.styles:t))?r:l)===c?r.call(s,{name:"styles",hash:{},data:a}):r)+'" '+(null!=(o=i.each.call(s,null!=t?t.value:t,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.each.call(s,null!=t?t.attributes:t,{name:"each",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a}))?o:"")+">"+(null!=(o=typeof(r=null!=(r=i.value||(null!=t?t.value:t))?r:l)===c?r.call(s,{name:"value",hash:{},data:a}):r)?o:"")+"</button>\n"},5:function(e,t,i,n,a){return'type="submit"'},7:function(e,t,i,n,a){return'type="reset"'},9:function(e,t,i,n,a){var o,r=e.escapeExpression;return r("function"==typeof(o=null!=(o=i.key||a&&a.key)?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"key",hash:{},data:a}):o)+'="'+r(e.lambda(t,t))+'"'},11:function(e,t,i,n,a){var o,r=e.escapeExpression;return" "+r("function"==typeof(o=null!=(o=i.key||a&&a.key)?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"key",hash:{},data:a}):o)+'="'+r(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s,l=null!=t?t:e.nullContext||{},c='<script type="text/x-handlebars-template">\n\n <form role="form">\n\n ';return r=null!=(r=i.formItems||(null!=t?t.formItems:t))?r:i.helperMissing,s={name:"formItems",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(l,s):r,i.formItems||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(c+=o),c+'\n\n <div class="alpaca-form-buttons-container">\n'+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.buttons:o,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?o:"")+" </div>\n\n </form>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]=this.HandlebarsPrecompiled["web-edit"]||{},this.HandlebarsPrecompiled["web-edit"]["container-array-actionbar"]=Handlebars.template({1:function(e,t,i,n,a,o,r){var s,l,c=e.escapeExpression,d=null!=t?t:e.nullContext||{};return' <button class="alpaca-array-actionbar-action '+c(e.lambda(null!=(s=null!=(s=null!=r[1]?r[1].view:r[1])?s.styles:s)?s.smallButton:s,t))+'" data-alpaca-array-actionbar-action="'+c("function"==typeof(l=null!=(l=i.action||(null!=t?t.action:t))?l:i.helperMissing)?l.call(d,{name:"action",hash:{},data:a}):l)+'">\n'+(null!=(s=i.if.call(d,null!=t?t.iconClass:t,{name:"if",hash:{},fn:e.program(2,a,0,o,r),inverse:e.noop,data:a}))?s:"")+" "+(null!=(s=i.if.call(d,null!=t?t.label:t,{name:"if",hash:{},fn:e.program(4,a,0,o,r),inverse:e.noop,data:a}))?s:"")+"\n </button>\n"},2:function(e,t,i,n,a){return' <i class="'+e.escapeExpression(e.lambda(null!=t?t.iconClass:t,t))+'"></i>\n'},4:function(e,t,i,n,a){var o,r;return null!=(o="function"==typeof(r=null!=(r=i.label||(null!=t?t.label:t))?r:i.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"label",hash:{},data:a}):r)?o:""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a,o,r){var s,l,c=null!=t?t:e.nullContext||{},d=i.helperMissing,u="function",p=e.escapeExpression;return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-array-actionbar alpaca-array-actionbar-'+p(typeof(l=null!=(l=i.actionbarStyle||(null!=t?t.actionbarStyle:t))?l:d)===u?l.call(c,{name:"actionbarStyle",hash:{},data:a}):l)+' btn-group" data-alpaca-array-actionbar-parent-field-id="'+p(typeof(l=null!=(l=i.parentFieldId||(null!=t?t.parentFieldId:t))?l:d)===u?l.call(c,{name:"parentFieldId",hash:{},data:a}):l)+'" data-alpaca-array-actionbar-field-id="'+p(typeof(l=null!=(l=i.fieldId||(null!=t?t.fieldId:t))?l:d)===u?l.call(c,{name:"fieldId",hash:{},data:a}):l)+'" data-alpaca-array-actionbar-item-index="'+p(typeof(l=null!=(l=i.itemIndex||(null!=t?t.itemIndex:t))?l:d)===u?l.call(c,{name:"itemIndex",hash:{},data:a}):l)+'">\n'+(null!=(s=i.each.call(c,null!=t?t.actions:t,{name:"each",hash:{},fn:e.program(1,a,0,o,r),inverse:e.noop,data:a}))?s:"")+" </div>\n\n<\/script>"},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["web-edit"]["container-array-item"]=Handlebars.template({1:function(e,t,i,n,a){var o,r,s,l=null!=t?t:e.nullContext||{},c=i.helperMissing,d="function",u=i.blockHelperMissing,p=' <div class="alpaca-array-item-flex-container">\n'+(null!=(o=i.if.call(l,null!=t?t.dragAndDrop:t,{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a}))?o:"")+" <div>\n ";return r=null!=(r=i.arrayActionbar||(null!=t?t.arrayActionbar:t))?r:c,s={name:"arrayActionbar",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a},o=typeof r===d?r.call(l,s):r,i.arrayActionbar||(o=u.call(t,o,s)),null!=o&&(p+=o),p+='\n </div>\n <div class="alpaca-array-item-flex-1">\n ',r=null!=(r=i.itemField||(null!=t?t.itemField:t))?r:c,s={name:"itemField",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a},o=typeof r===d?r.call(l,s):r,i.itemField||(o=u.call(t,o,s)),null!=o&&(p+=o),p+"\n </div>\n </div>\n"},2:function(e,t,i,n,a){return' <i class="glyphicon glyphicon-menu-hamburger alpaca-array-item-move"></i>\n'},4:function(e,t,i,n,a){return""},6:function(e,t,i,n,a){var o;return null!=(o=(i.compare||t&&t.compare||i.helperMissing).call(null!=t?t:e.nullContext||{},null!=t?t.actionbarStyle:t,"right",{name:"compare",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a}))?o:""},7:function(e,t,i,n,a){var o,r,s,l=null!=t?t:e.nullContext||{},c=i.helperMissing,d="function",u=i.blockHelperMissing,p=' <div class="alpaca-array-item-flex-container">\n'+(null!=(o=i.if.call(l,null!=t?t.dragAndDrop:t,{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a}))?o:"")+' <div class="alpaca-array-item-flex-1">\n ';return r=null!=(r=i.itemField||(null!=t?t.itemField:t))?r:c,s={name:"itemField",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a},o=typeof r===d?r.call(l,s):r,i.itemField||(o=u.call(t,o,s)),null!=o&&(p+=o),p+="\n </div>\n <div>\n ",r=null!=(r=i.arrayActionbar||(null!=t?t.arrayActionbar:t))?r:c,s={name:"arrayActionbar",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a},o=typeof r===d?r.call(l,s):r,i.arrayActionbar||(o=u.call(t,o,s)),null!=o&&(p+=o),p+"\n </div>\n </div>\n"},9:function(e,t,i,n,a){var o,r,s,l=null!=t?t:e.nullContext||{},c=i.helperMissing,d=(null!=(o=i.if.call(l,null!=t?t.dragAndDrop:t,{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a}))?o:"")+' <div class="alpaca-array-item-flex-1">\n'+(null!=(o=(i.compare||t&&t.compare||c).call(l,null!=t?t.actionbarStyle:t,"top",{name:"compare",hash:{},fn:e.program(14,a,0),inverse:e.noop,data:a}))?o:"")+"\n ";return r=null!=(r=i.itemField||(null!=t?t.itemField:t))?r:c,s={name:"itemField",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(l,s):r,i.itemField||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(d+=o),d+"\n\n"+(null!=(o=(i.compare||t&&t.compare||c).call(l,null!=t?t.actionbarStyle:t,"bottom",{name:"compare",hash:{},fn:e.program(14,a,0),inverse:e.noop,data:a}))?o:"")+" </div> \n </div>\n"},10:function(e,t,i,n,a){return' <div class="alpaca-array-item-flex-container">\n <i class="glyphicon glyphicon-menu-hamburger alpaca-array-item-move"></i>\n'},12:function(e,t,i,n,a){return" <div>\n"},14:function(e,t,i,n,a){var o,r,s,l=" <div>\n ";return r=null!=(r=i.arrayActionbar||(null!=t?t.arrayActionbar:t))?r:i.helperMissing,s={name:"arrayActionbar",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(null!=t?t:e.nullContext||{},s):r,i.arrayActionbar||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(l+=o),l+"\n </div>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o;return'<script type="text/x-handlebars-template">\n\n'+(null!=(o=(i.compare||t&&t.compare||i.helperMissing).call(null!=t?t:e.nullContext||{},null!=t?t.actionbarStyle:t,"left",{name:"compare",hash:{},fn:e.program(1,a,0),inverse:e.program(6,a,0),data:a}))?o:"")+"\n<\/script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["container-array-toolbar"]=Handlebars.template({1:function(e,t,i,n,a){return" btn-group"},3:function(e,t,i,n,a,o,r){var s,l=null!=t?t:e.nullContext||{},c=i.helperMissing;return"\n"+(null!=(s=(i.compare||t&&t.compare||c).call(l,null!=r[1]?r[1].toolbarStyle:r[1],"link",{name:"compare",hash:{},fn:e.program(4,a,0,o,r),inverse:e.noop,data:a}))?s:"")+"\n"+(null!=(s=(i.compare||t&&t.compare||c).call(l,null!=r[1]?r[1].toolbarStyle:r[1],"button",{name:"compare",hash:{},fn:e.program(6,a,0,o,r),inverse:e.noop,data:a}))?s:"")+"\n"},4:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{},l=i.helperMissing,c="function";return' <a href="#" class="alpaca-array-toolbar-action" data-alpaca-array-toolbar-action="'+e.escapeExpression(typeof(r=null!=(r=i.action||(null!=t?t.action:t))?r:l)===c?r.call(s,{name:"action",hash:{},data:a}):r)+'">'+(null!=(o=typeof(r=null!=(r=i.label||(null!=t?t.label:t))?r:l)===c?r.call(s,{name:"label",hash:{},data:a}):r)?o:"")+"</a>\n"},6:function(e,t,i,n,a,o,r){var s,l,c=e.escapeExpression,d=null!=t?t:e.nullContext||{};return' <button class="alpaca-array-toolbar-action '+c(e.lambda(null!=(s=null!=(s=null!=r[1]?r[1].view:r[1])?s.styles:s)?s.smallButton:s,t))+'" data-alpaca-array-toolbar-action="'+c("function"==typeof(l=null!=(l=i.action||(null!=t?t.action:t))?l:i.helperMissing)?l.call(d,{name:"action",hash:{},data:a}):l)+'">\n'+(null!=(s=i.if.call(d,null!=t?t.iconClass:t,{name:"if",hash:{},fn:e.program(7,a,0,o,r),inverse:e.noop,data:a}))?s:"")+" "+(null!=(s=i.if.call(d,null!=t?t.label:t,{name:"if",hash:{},fn:e.program(9,a,0,o,r),inverse:e.noop,data:a}))?s:"")+"\n </button>\n"},7:function(e,t,i,n,a){var o;return' <i class="'+e.escapeExpression("function"==typeof(o=null!=(o=i.iconClass||(null!=t?t.iconClass:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"iconClass",hash:{},data:a}):o)+'"></i>\n'},9:function(e,t,i,n,a){var o,r;return null!=(o="function"==typeof(r=null!=(r=i.label||(null!=t?t.label:t))?r:i.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"label",hash:{},data:a}):r)?o:""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a,o,r){var s,l,c=null!=t?t:e.nullContext||{},d=i.helperMissing,u="function",p=e.escapeExpression;return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-array-toolbar alpaca-array-toolbar-position-'+p(typeof(l=null!=(l=i.toolbarPosition||(null!=t?t.toolbarPosition:t))?l:d)===u?l.call(c,{name:"toolbarPosition",hash:{},data:a}):l)+'" data-alpaca-array-toolbar-field-id="'+p(typeof(l=null!=(l=i.id||(null!=t?t.id:t))?l:d)===u?l.call(c,{name:"id",hash:{},data:a}):l)+'" '+(null!=(s=(i.compare||t&&t.compare||d).call(c,null!=t?t.toolbarStyle:t,"button",{name:"compare",hash:{},fn:e.program(1,a,0,o,r),inverse:e.noop,data:a}))?s:"")+">\n\n"+(null!=(s=i.each.call(c,null!=t?t.actions:t,{name:"each",hash:{},fn:e.program(3,a,0,o,r),inverse:e.noop,data:a}))?s:"")+"\n </div>\n\n<\/script>"},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["web-edit"]["container-array"]=Handlebars.template({1:function(e,t,i,n,a){var o,r,s,l=" ";return r=null!=(r=i.arrayToolbar||(null!=t?t.arrayToolbar:t))?r:i.helperMissing,s={name:"arrayToolbar",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(null!=t?t:e.nullContext||{},s):r,i.arrayToolbar||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(l+=o),l+"\n"},2:function(e,t,i,n,a){return""},4:function(e,t,i,n,a){var o,r,s,l=" ";return r=null!=(r=i.item||(null!=t?t.item:t))?r:i.helperMissing,s={name:"item",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(null!=t?t:e.nullContext||{},s):r,i.item||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(l+=o),l+"\n"},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r=null!=t?t:e.nullContext||{},s=i.helperMissing;return'<script type="text/x-handlebars-template">\n\n <div>\n'+(null!=(o=(i.compare||t&&t.compare||s).call(r,null!=(o=null!=t?t.options:t)?o.toolbarPosition:o,"top",{name:"compare",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+"\n"+(null!=(o=i.each.call(r,null!=t?t.items:t,{name:"each",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?o:"")+"\n"+(null!=(o=(i.compare||t&&t.compare||s).call(r,null!=(o=null!=t?t.options:t)?o.toolbarPosition:o,"bottom",{name:"compare",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+" </div>\n\n<\/script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["container-object-item"]=Handlebars.template({1:function(e,t,i,n,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s,l='<script type="text/x-handlebars-template">\n\n <div>\n\n ';return r=null!=(r=i.itemField||(null!=t?t.itemField:t))?r:i.helperMissing,s={name:"itemField",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(null!=t?t:e.nullContext||{},s):r,i.itemField||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(l+=o),l+"\n\n </div>\n\n<\/script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["container-object"]=Handlebars.template({1:function(e,t,i,n,a){var o,r,s,l="\n ";return r=null!=(r=i.item||(null!=t?t.item:t))?r:i.helperMissing,s={name:"item",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(null!=t?t:e.nullContext||{},s):r,i.item||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(l+=o),l+"\n\n"},2:function(e,t,i,n,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o;return'<script type="text/x-handlebars-template">\n\n <div>\n\n'+(null!=(o=i.each.call(null!=t?t:e.nullContext||{},null!=t?t.items:t,{name:"each",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+"\n </div>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["container-table-item"]=Handlebars.template({1:function(e,t,i,n,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o;return'<script type="text/x-handlebars-template">\n\n <tr>\n '+(null!=(o=(i.itemField||t&&t.itemField||i.helperMissing).call(null!=t?t:e.nullContext||{},"td",{name:"itemField",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+"\n </tr>\n\n<\/script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["container-table"]=Handlebars.template({1:function(e,t,i,n,a){return""},3:function(e,t,i,n,a){return' \x3c!-- hidden column storing sort order --\x3e\n <th class="alpaca-table-reorder-index-header"></th>\n \x3c!-- draggable --\x3e\n <th class="alpaca-table-reorder-draggable-header"></th>\n'},5:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{},l=i.helperMissing,c="function";return' <th data-header-id="'+e.escapeExpression(typeof(r=null!=(r=i.id||(null!=t?t.id:t))?r:l)===c?r.call(s,{name:"id",hash:{},data:a}):r)+'" '+(null!=(o=i.if.call(s,null!=t?t.hidden:t,{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a}))?o:"")+">"+(null!=(o=typeof(r=null!=(r=i.title||(null!=t?t.title:t))?r:l)===c?r.call(s,{name:"title",hash:{},data:a}):r)?o:"")+"</th>\n"},6:function(e,t,i,n,a){return'class="alpaca-table-column-hidden"'},8:function(e,t,i,n,a){return" <th>Actions</th>\n"},10:function(e,t,i,n,a){var o;return"\n "+(null!=(o=(i.item||t&&t.item||i.helperMissing).call(null!=t?t:e.nullContext||{},"tr",{name:"item",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+"\n\n"},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s,l=null!=t?t:e.nullContext||{},c='<script type="text/x-handlebars-template">\n\n <div>\n\n ';return r=null!=(r=i.arrayToolbar||(null!=t?t.arrayToolbar:t))?r:i.helperMissing,s={name:"arrayToolbar",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(l,s):r,i.arrayToolbar||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(c+=o),c+"\n\n <table>\n\n \x3c!-- table headers --\x3e\n <thead>\n <tr>\n\n"+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.dragRows:o,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?o:"")+"\n"+(null!=(o=i.each.call(l,null!=t?t.headers:t,{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:"")+"\n"+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.showActionsColumn:o,{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a}))?o:"")+" </tr>\n </thead>\n\n \x3c!-- table body --\x3e\n <tbody>\n"+(null!=(o=i.each.call(l,null!=t?t.items:t,{name:"each",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a}))?o:"")+" </tbody>\n\n </table>\n\n </div>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["container-tablerow-item"]=Handlebars.template({1:function(e,t,i,n,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s,l='<script type="text/x-handlebars-template">\n\n <td>\n ';return r=null!=(r=i.itemField||(null!=t?t.itemField:t))?r:i.helperMissing,s={name:"itemField",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(null!=t?t:e.nullContext||{},s):r,i.itemField||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(l+=o),l+"\n </td>\n\n<\/script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["container-tablerow"]=Handlebars.template({1:function(e,t,i,n,a){return'\n \x3c!-- hidden sort order column --\x3e\n <div class="alpaca-table-reorder-index-cell"></div>\n\n \x3c!-- reorder draggable --\x3e\n <div class="alpaca-table-reorder-draggable-cell">\n <i class="glyphicon glyphicon-menu-hamburger"></i>\n </div>\n'},3:function(e,t,i,n,a){var o;return null!=(o=i.if.call(null!=t?t:e.nullContext||{},null!=t?t.hidden:t,{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a}))?o:""},4:function(e,t,i,n,a){return""},6:function(e,t,i,n,a){var o,r,s,l=" ";return r=null!=(r=i.item||(null!=t?t.item:t))?r:i.helperMissing,s={name:"item",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(null!=t?t:e.nullContext||{},s):r,i.item||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(l+=o),l+"\n"},8:function(e,t,i,n,a){var o,r,s,l=null!=t?t:e.nullContext||{},c=i.helperMissing,d="function",u=' <div class="alpaca-merge-up" data-alpaca-merge-tag="td" data-merge-up-field-id="'+e.escapeExpression(typeof(r=null!=(r=i.id||(null!=t?t.id:t))?r:c)===d?r.call(l,{name:"id",hash:{},data:a}):r)+'">\n ';return r=null!=(r=i.arrayActionbar||(null!=t?t.arrayActionbar:t))?r:c,s={name:"arrayActionbar",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a},o=typeof r===d?r.call(l,s):r,i.arrayActionbar||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(u+=o),u+"\n </div>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r=null!=t?t:e.nullContext||{};return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-merge-up">\n\n \x3c!-- drag cell --\x3e\n'+(null!=(o=i.if.call(r,null!=(o=null!=t?t.options:t)?o.dragRows:o,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+"\n"+(null!=(o=i.each.call(r,null!=t?t.items:t,{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?o:"")+"\n \x3c!-- actions cell --\x3e\n"+(null!=(o=i.if.call(r,null!=(o=null!=t?t.options:t)?o.showActionsColumn:o,{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a}))?o:"")+"\n </div>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"].container=Handlebars.template({1:function(e,t,i,n,a){var o;return' <legend class="'+(null!=(o=i.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.labelClass:o,{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a}))?o:"")+' alpaca-container-label">'+(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.label:o,t))?o:"")+"</legend>\n"},2:function(e,t,i,n,a){var o;return e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.labelClass:o,t))},4:function(e,t,i,n,a){var o;return null!=(o=(i.compare||t&&t.compare||i.helperMissing).call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.helpersPosition:o,"above",{name:"compare",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:""},5:function(e,t,i,n,a){var o;return null!=(o=i.each.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.helpers:o,{name:"each",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a}))?o:""},6:function(e,t,i,n,a){var o,r=null!=t?t:e.nullContext||{};return' <p class="alpaca-helper '+(null!=(o=i.if.call(r,null!=(o=null!=t?t.options:t)?o.helperClass:o,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?o:"")+'">\n <i class="alpaca-icon-helper"></i>\n '+(null!=(o=(i.showMessage||t&&t.showMessage||i.helperMissing).call(r,t,{name:"showMessage",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?o:"")+"\n </p>\n"},7:function(e,t,i,n,a){var o;return e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.helperClass:o,t))},9:function(e,t,i,n,a){return""},11:function(e,t,i,n,a){var o;return null!=(o=(i.compare||t&&t.compare||i.helperMissing).call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.helpersPosition:o,"below",{name:"compare",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s,l=null!=t?t:e.nullContext||{},c='<script type="text/x-handlebars-template">\n\n <div>\n\n'+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.label:o,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+"\n"+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.helpers:o,{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?o:"")+"\n ";return r=null!=(r=i.container||(null!=t?t.container:t))?r:i.helperMissing,s={name:"container",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(l,s):r,i.container||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(c+=o),c+"\n\n"+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.helpers:o,{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a}))?o:"")+"\n </div>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-any"]=Handlebars.template({1:function(e,t,i,n,a){return'readonly="readonly"'},3:function(e,t,i,n,a){var o;return'name="'+e.escapeExpression("function"==typeof(o=null!=(o=i.name||(null!=t?t.name:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:a}):o)+'"'},5:function(e,t,i,n,a){var o,r=e.escapeExpression;return"data-"+r("function"==typeof(o=null!=(o=i.key||a&&a.key)?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"key",hash:{},data:a}):o)+'="'+r(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{};return'<script type="text/x-handlebars-template">\n\n <input type="text" id="'+e.escapeExpression("function"==typeof(r=null!=(r=i.id||(null!=t?t.id:t))?r:i.helperMissing)?r.call(s,{name:"id",hash:{},data:a}):r)+'" size="40" '+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.readonly:o,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.each.call(s,null!=(o=null!=t?t.options:t)?o.data:o,{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:"")+"/>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-checkbox"]=Handlebars.template({1:function(e,t,i,n,a,o,r){var s;return"\n"+(null!=(s=i.each.call(null!=t?t:e.nullContext||{},null!=t?t.selectOptions:t,{name:"each",hash:{},fn:e.program(2,a,0,o,r),inverse:e.noop,data:a}))?s:"")+"\n"},2:function(e,t,i,n,a,o,r){var s,l,c=null!=t?t:e.nullContext||{},d=i.helperMissing,u="function",p=e.escapeExpression;return'\n <div>\n\n <label>\n\n <input type="checkbox" data-checkbox-index="'+p(typeof(l=null!=(l=i.index||a&&a.index)?l:d)===u?l.call(c,{name:"index",hash:{},data:a}):l)+'" data-checkbox-value="'+p(typeof(l=null!=(l=i.value||(null!=t?t.value:t))?l:d)===u?l.call(c,{name:"value",hash:{},data:a}):l)+'" '+(null!=(s=i.if.call(c,null!=t?t.selected:t,{name:"if",hash:{},fn:e.program(3,a,0,o,r),inverse:e.noop,data:a}))?s:"")+" "+(null!=(s=i.if.call(c,null!=(s=null!=r[1]?r[1].options:r[1])?s.readonly:s,{name:"if",hash:{},fn:e.program(5,a,0,o,r),inverse:e.noop,data:a}))?s:"")+" "+(null!=(s=i.if.call(c,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(7,a,0,o,r),inverse:e.noop,data:a}))?s:"")+" "+(null!=(s=i.each.call(c,null!=(s=null!=r[1]?r[1].options:r[1])?s.data:s,{name:"each",hash:{},fn:e.program(9,a,0,o,r),inverse:e.noop,data:a}))?s:"")+"/>\n "+(null!=(s=typeof(l=null!=(l=i.text||(null!=t?t.text:t))?l:d)===u?l.call(c,{name:"text",hash:{},data:a}):l)?s:"")+"\n\n </label>\n </div>\n\n"},3:function(e,t,i,n,a){return"checked"},5:function(e,t,i,n,a){return'readonly="readonly"'},7:function(e,t,i,n,a){var o;return'name="'+e.escapeExpression("function"==typeof(o=null!=(o=i.name||(null!=t?t.name:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:a}):o)+'"'},9:function(e,t,i,n,a){var o,r=null!=t?t:e.nullContext||{},s=i.helperMissing,l="function",c=e.escapeExpression;return"data-"+c(typeof(o=null!=(o=i.key||a&&a.key)?o:s)===l?o.call(r,{name:"key",hash:{},data:a}):o)+'="'+c(typeof(o=null!=(o=i.value||(null!=t?t.value:t))?o:s)===l?o.call(r,{name:"value",hash:{},data:a}):o)+'"'},11:function(e,t,i,n,a){var o,r=null!=t?t:e.nullContext||{};return'\n <div>\n\n <label>\n\n <input type="checkbox" '+(null!=(o=i.if.call(r,null!=(o=null!=t?t.data:t)?o.length:o,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(r,null!=(o=null!=t?t.options:t)?o.readonly:o,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(r,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.each.call(r,null!=(o=null!=t?t.options:t)?o.data:o,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?o:"")+"/>\n\n"+(null!=(o=i.if.call(r,null!=(o=null!=t?t.options:t)?o.rightLabel:o,{name:"if",hash:{},fn:e.program(12,a,0),inverse:e.noop,data:a}))?o:"")+"\n </label>\n\n </div>\n\n"},12:function(e,t,i,n,a){var o;return" "+(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.rightLabel:o,t))?o:"")+"\n"},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a,o,r){var s;return'<script type="text/x-handlebars-template">\n\n'+(null!=(s=i.if.call(null!=t?t:e.nullContext||{},null!=(s=null!=t?t.options:t)?s.multiple:s,{name:"if",hash:{},fn:e.program(1,a,0,o,r),inverse:e.program(11,a,0,o,r),data:a}))?s:"")+"\n<\/script>\n"},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["web-edit"]["control-ckeditor"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o;return'<script type="text/x-handlebars-template">\n\n <textarea id="'+e.escapeExpression("function"==typeof(o=null!=(o=i.id||(null!=t?t.id:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"id",hash:{},data:a}):o)+'" cols="80" rows="10">\n </textarea>\n\n<\/script>'},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-editor"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o;return'<script type="text/x-handlebars-template">\n\n <div id="'+e.escapeExpression("function"==typeof(o=null!=(o=i.id||(null!=t?t.id:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"id",hash:{},data:a}):o)+'" class="control-field-editor-el"></div>\n\n<\/script>'},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-file"]=Handlebars.template({1:function(e,t,i,n,a){var o;return'size="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.size:o,t))+'"'},3:function(e,t,i,n,a){return'readonly="readonly"'},5:function(e,t,i,n,a){var o;return'name="'+e.escapeExpression("function"==typeof(o=null!=(o=i.name||(null!=t?t.name:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:a}):o)+'"'},7:function(e,t,i,n,a){var o,r=e.escapeExpression;return"data-"+r("function"==typeof(o=null!=(o=i.key||a&&a.key)?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"key",hash:{},data:a}):o)+'="'+r(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{};return'<script type="text/x-handlebars-template">\n\n <input type="file" id="'+e.escapeExpression("function"==typeof(r=null!=(r=i.id||(null!=t?t.id:t))?r:i.helperMissing)?r.call(s,{name:"id",hash:{},data:a}):r)+'" '+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.size:o,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.readonly:o,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.each.call(s,null!=(o=null!=t?t.options:t)?o.data:o,{name:"each",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?o:"")+"/>\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-hidden"]=Handlebars.template({1:function(e,t,i,n,a){var o;return'name="'+e.escapeExpression("function"==typeof(o=null!=(o=i.name||(null!=t?t.name:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:a}):o)+'"'},3:function(e,t,i,n,a){var o,r=e.escapeExpression;return"data-"+r("function"==typeof(o=null!=(o=i.key||a&&a.key)?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"key",hash:{},data:a}):o)+'="'+r(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{};return'<script type="text/x-handlebars-template">\n\n <input type="hidden" id="'+e.escapeExpression("function"==typeof(r=null!=(r=i.id||(null!=t?t.id:t))?r:i.helperMissing)?r.call(s,{name:"id",hash:{},data:a}):r)+'" '+(null!=(o=i.if.call(s,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.each.call(s,null!=(o=null!=t?t.options:t)?o.data:o,{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?o:"")+"/>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-image"]=Handlebars.template({1:function(e,t,i,n,a){var o;return'placeholder="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.placeholder:o,t))+'"'},3:function(e,t,i,n,a){var o;return'size="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.size:o,t))+'"'},5:function(e,t,i,n,a){return'readonly="readonly"'},7:function(e,t,i,n,a){var o;return'name="'+e.escapeExpression("function"==typeof(o=null!=(o=i.name||(null!=t?t.name:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:a}):o)+'"'},9:function(e,t,i,n,a){var o,r=e.escapeExpression;return"data-"+r("function"==typeof(o=null!=(o=i.key||a&&a.key)?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"key",hash:{},data:a}):o)+'="'+r(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{},l=i.helperMissing,c="function",d=e.escapeExpression;return'<script type="text/x-handlebars-template">\n\n <input type="text" id="'+d(typeof(r=null!=(r=i.id||(null!=t?t.id:t))?r:l)===c?r.call(s,{name:"id",hash:{},data:a}):r)+'" '+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.placeholder:o,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.size:o,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.readonly:o,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.each.call(s,null!=(o=null!=t?t.options:t)?o.data:o,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?o:"")+'/>\n\n <div class="alpaca-image-display">\n <h5>Preview</h5>\n <img id="'+d(typeof(r=null!=(r=i.id||(null!=t?t.id:t))?r:l)===c?r.call(s,{name:"id",hash:{},data:a}):r)+'-image" src="'+d(typeof(r=null!=(r=i.data||(null!=t?t.data:t))?r:l)===c?r.call(s,{name:"data",hash:{},data:a}):r)+'">\n </div>\n\n<\/script>'},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-optiontree"]=Handlebars.template({1:function(e,t,i,n,a){var o;return'placeholder="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.placeholder:o,t))+'"'},3:function(e,t,i,n,a){var o;return'size="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.size:o,t))+'"'},5:function(e,t,i,n,a){return'readonly="readonly"'},7:function(e,t,i,n,a){var o;return'name="'+e.escapeExpression("function"==typeof(o=null!=(o=i.name||(null!=t?t.name:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:a}):o)+'"'},9:function(e,t,i,n,a){var o,r=e.escapeExpression;return"data-"+r("function"==typeof(o=null!=(o=i.key||a&&a.key)?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"key",hash:{},data:a}):o)+'="'+r(e.lambda(t,t))+'"'},11:function(e,t,i,n,a){var o,r=e.escapeExpression;return r("function"==typeof(o=null!=(o=i.key||a&&a.key)?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"key",hash:{},data:a}):o)+'="'+r(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{},l=i.helperMissing,c="function",d=e.escapeExpression;return'<script type="text/x-handlebars-template">\n\n <div class="optiontree"></div>\n\n <input type="'+d(typeof(r=null!=(r=i.inputType||(null!=t?t.inputType:t))?r:l)===c?r.call(s,{name:"inputType",hash:{},data:a}):r)+'" id="'+d(typeof(r=null!=(r=i.id||(null!=t?t.id:t))?r:l)===c?r.call(s,{name:"id",hash:{},data:a}):r)+'" '+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.placeholder:o,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.size:o,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.readonly:o,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.each.call(s,null!=(o=null!=t?t.options:t)?o.data:o,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.each.call(s,null!=(o=null!=t?t.options:t)?o.attributes:o,{name:"each",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a}))?o:"")+"/>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-password"]=Handlebars.template({1:function(e,t,i,n,a){var o;return'placeholder="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.placeholder:o,t))+'"'},3:function(e,t,i,n,a){var o;return'size="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.size:o,t))+'"'},5:function(e,t,i,n,a){return'readonly="readonly"'},7:function(e,t,i,n,a){var o;return'name="'+e.escapeExpression("function"==typeof(o=null!=(o=i.name||(null!=t?t.name:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:a}):o)+'"'},9:function(e,t,i,n,a){var o,r=e.escapeExpression;return"data-"+r("function"==typeof(o=null!=(o=i.key||a&&a.key)?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"key",hash:{},data:a}):o)+'="'+r(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{};return'<script type="text/x-handlebars-template">\n\n <input type="password" id="'+e.escapeExpression("function"==typeof(r=null!=(r=i.id||(null!=t?t.id:t))?r:i.helperMissing)?r.call(s,{name:"id",hash:{},data:a}):r)+'" '+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.placeholder:o,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.size:o,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.readonly:o,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.each.call(s,null!=(o=null!=t?t.options:t)?o.data:o,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?o:"")+"/>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-radio"]=Handlebars.template({1:function(e,t,i,n,a){return""},3:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{};return' <div class="radio">\n <label>\n <input type="radio" '+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.readonly:o,{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?o:"")+' name="'+e.escapeExpression("function"==typeof(r=null!=(r=i.name||(null!=t?t.name:t))?r:i.helperMissing)?r.call(s,{name:"name",hash:{},data:a}):r)+'" value="" '+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o._noData:o,{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a}))?o:"")+"/>"+(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.noneLabel:o,t))?o:"")+"\n </label>\n </div>\n"},4:function(e,t,i,n,a){return'readonly="readonly"'},6:function(e,t,i,n,a){return'checked="checked"'},8:function(e,t,i,n,a,o,r){var s,l,c=null!=t?t:e.nullContext||{},d=e.escapeExpression,u=i.helperMissing,p="function";return' <div class="radio">\n <label>\n <input type="radio" '+(null!=(s=i.if.call(c,null!=(s=null!=r[1]?r[1].options:r[1])?s.readonly:s,{name:"if",hash:{},fn:e.program(4,a,0,o,r),inverse:e.noop,data:a}))?s:"")+' name="'+d(e.lambda(null!=r[1]?r[1].name:r[1],t))+'" value="'+d(typeof(l=null!=(l=i.value||(null!=t?t.value:t))?l:u)===p?l.call(c,{name:"value",hash:{},data:a}):l)+'" '+(null!=(s=i.if.call(c,null!=t?t.selected:t,{name:"if",hash:{},fn:e.program(6,a,0,o,r),inverse:e.noop,data:a}))?s:"")+"/>"+(null!=(s=typeof(l=null!=(l=i.text||(null!=t?t.text:t))?l:u)===p?l.call(c,{name:"text",hash:{},data:a}):l)?s:"")+"\n </label>\n </div>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a,o,r){var s,l=null!=t?t:e.nullContext||{};return'<script type="text/x-handlebars-template">\n\n'+(null!=(s=i.if.call(l,null!=(s=null!=t?t.options:t)?s.hideNone:s,{name:"if",hash:{},fn:e.program(1,a,0,o,r),inverse:e.program(3,a,0,o,r),data:a}))?s:"")+"\n"+(null!=(s=i.each.call(l,null!=t?t.selectOptions:t,{name:"each",hash:{},fn:e.program(8,a,0,o,r),inverse:e.noop,data:a}))?s:"")+"\n<\/script>"},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["web-edit"]["control-select"]=Handlebars.template({1:function(e,t,i,n,a){return'readonly="readonly"'},3:function(e,t,i,n,a){return'multiple="multiple"'},5:function(e,t,i,n,a){var o;return'size="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.size:o,t))+'"'},7:function(e,t,i,n,a){var o;return'name="'+e.escapeExpression("function"==typeof(o=null!=(o=i.name||(null!=t?t.name:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:a}):o)+'"'},9:function(e,t,i,n,a){var o,r=null!=t?t:e.nullContext||{};return"\n"+(null!=(o=i.if.call(r,null!=(o=null!=t?t.options:t)?o.hideNone:o,{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.program(12,a,0),data:a}))?o:"")+"\n"+(null!=(o=i.each.call(r,null!=t?t.selectOptions:t,{name:"each",hash:{},fn:e.program(14,a,0),inverse:e.noop,data:a}))?o:"")+"\n"},10:function(e,t,i,n,a){return""},12:function(e,t,i,n,a){var o;return' <option value="">'+(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.noneLabel:o,t))?o:"")+"</option>\n"},14:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{},l=i.helperMissing,c="function";return' <option value="'+(null!=(o=typeof(r=null!=(r=i.value||(null!=t?t.value:t))?r:l)===c?r.call(s,{name:"value",hash:{},data:a}):r)?o:"")+'" '+(null!=(o=i.if.call(s,null!=t?t.selected:t,{name:"if",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a}))?o:"")+">"+e.escapeExpression(typeof(r=null!=(r=i.text||(null!=t?t.text:t))?r:l)===c?r.call(s,{name:"text",hash:{},data:a}):r)+"</option>\n"},15:function(e,t,i,n,a){return'selected="selected"'},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{};return'<script type="text/x-handlebars-template">\n\n <select id="'+e.escapeExpression("function"==typeof(r=null!=(r=i.id||(null!=t?t.id:t))?r:i.helperMissing)?r.call(s,{name:"id",hash:{},data:a}):r)+'" '+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.readonly:o,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.multiple:o,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.size:o,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?o:"")+">\n\n"+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.multiple:o,{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.program(9,a,0),data:a}))?o:"")+"\n </select>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-text"]=Handlebars.template({1:function(e,t,i,n,a){var o;return'placeholder="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.placeholder:o,t))+'"'},3:function(e,t,i,n,a){var o;return'size="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.size:o,t))+'"'},5:function(e,t,i,n,a){return'readonly="readonly"'},7:function(e,t,i,n,a){var o;return'name="'+e.escapeExpression("function"==typeof(o=null!=(o=i.name||(null!=t?t.name:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:a}):o)+'"'},9:function(e,t,i,n,a){var o,r=e.escapeExpression;return"data-"+r("function"==typeof(o=null!=(o=i.key||a&&a.key)?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"key",hash:{},data:a}):o)+'="'+r(e.lambda(t,t))+'"'},11:function(e,t,i,n,a){var o,r=e.escapeExpression;return r("function"==typeof(o=null!=(o=i.key||a&&a.key)?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"key",hash:{},data:a}):o)+'="'+r(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{},l=i.helperMissing,c="function",d=e.escapeExpression;return'<script type="text/x-handlebars-template">\n\n <input type="'+d(typeof(r=null!=(r=i.inputType||(null!=t?t.inputType:t))?r:l)===c?r.call(s,{name:"inputType",hash:{},data:a}):r)+'" id="'+d(typeof(r=null!=(r=i.id||(null!=t?t.id:t))?r:l)===c?r.call(s,{name:"id",hash:{},data:a}):r)+'" '+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.placeholder:o,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.size:o,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.readonly:o,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.each.call(s,null!=(o=null!=t?t.options:t)?o.data:o,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.each.call(s,null!=(o=null!=t?t.options:t)?o.attributes:o,{name:"each",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a}))?o:"")+"/>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-textarea"]=Handlebars.template({1:function(e,t,i,n,a){var o;return'placeholder="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.placeholder:o,t))+'"'},3:function(e,t,i,n,a){var o;return'rows="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.rows:o,t))+'"'},5:function(e,t,i,n,a){var o;return'cols="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.cols:o,t))+'"'},7:function(e,t,i,n,a){return'readonly="readonly"'},9:function(e,t,i,n,a){var o;return'name="'+e.escapeExpression("function"==typeof(o=null!=(o=i.name||(null!=t?t.name:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:a}):o)+'"'},11:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{},l=i.helperMissing,c="function";return"data-"+e.escapeExpression(typeof(r=null!=(r=i.fieldId||(null!=t?t.fieldId:t))?r:l)===c?r.call(s,{name:"fieldId",hash:{},data:a}):r)+'="'+(null!=(o=typeof(r=null!=(r=i.value||(null!=t?t.value:t))?r:l)===c?r.call(s,{name:"value",hash:{},data:a}):r)?o:"")+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{};return'<script type="text/x-handlebars-template">\n\n <textarea id="'+e.escapeExpression("function"==typeof(r=null!=(r=i.id||(null!=t?t.id:t))?r:i.helperMissing)?r.call(s,{name:"id",hash:{},data:a}):r)+'" '+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.placeholder:o,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.rows:o,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.cols:o,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.readonly:o,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.each.call(s,null!=(o=null!=t?t.options:t)?o.data:o,{name:"each",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a}))?o:"")+"/>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-url"]=Handlebars.template({1:function(e,t,i,n,a){var o;return'placeholder="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.placeholder:o,t))+'"'},3:function(e,t,i,n,a){var o;return'size="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.size:o,t))+'"'},5:function(e,t,i,n,a){return'readonly="readonly"'},7:function(e,t,i,n,a){var o;return'name="'+e.escapeExpression("function"==typeof(o=null!=(o=i.name||(null!=t?t.name:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:a}):o)+'"'},9:function(e,t,i,n,a){var o,r=e.escapeExpression;return"data-"+r("function"==typeof(o=null!=(o=i.key||a&&a.key)?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"key",hash:{},data:a}):o)+'="'+r(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{};return'<script type="text/x-handlebars-template">\n\n <input type="text" id="'+e.escapeExpression("function"==typeof(r=null!=(r=i.id||(null!=t?t.id:t))?r:i.helperMissing)?r.call(s,{name:"id",hash:{},data:a}):r)+'" '+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.placeholder:o,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.size:o,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.readonly:o,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.if.call(s,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.each.call(s,null!=(o=null!=t?t.options:t)?o.data:o,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?o:"")+"/>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"].control=Handlebars.template({1:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{};return' <label class="'+(null!=(o=i.if.call(s,null!=(o=null!=t?t.options:t)?o.labelClass:o,{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a}))?o:"")+' alpaca-control-label" for="'+e.escapeExpression("function"==typeof(r=null!=(r=i.id||(null!=t?t.id:t))?r:i.helperMissing)?r.call(s,{name:"id",hash:{},data:a}):r)+'">'+(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.label:o,t))?o:"")+"</label>\n"},2:function(e,t,i,n,a){var o;return e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.labelClass:o,t))},4:function(e,t,i,n,a){var o;return null!=(o=(i.compare||t&&t.compare||i.helperMissing).call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.helpersPosition:o,"above",{name:"compare",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:""},5:function(e,t,i,n,a){var o;return null!=(o=i.each.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.helpers:o,{name:"each",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a}))?o:""},6:function(e,t,i,n,a){var o,r=null!=t?t:e.nullContext||{};return' <p class="'+(null!=(o=i.if.call(r,null!=(o=null!=t?t.options:t)?o.helperClass:o,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?o:"")+'">\n <i class="info-sign"></i>\n '+(null!=(o=(i.showMessage||t&&t.showMessage||i.helperMissing).call(r,t,{name:"showMessage",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?o:"")+"\n </p>\n"},7:function(e,t,i,n,a){var o;return e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.helperClass:o,t))},9:function(e,t,i,n,a){return""},11:function(e,t,i,n,a){var o;return null!=(o=(i.compare||t&&t.compare||i.helperMissing).call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.helpersPosition:o,"below",{name:"compare",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:""},13:function(e,t,i,n,a){var o;return null!=(o=i.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.buttons:o,{name:"if",hash:{},fn:e.program(14,a,0),inverse:e.noop,data:a}))?o:""},14:function(e,t,i,n,a){var o;return' <div class="alpaca-control-buttons-container">\n'+(null!=(o=i.each.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.buttons:o,{name:"each",hash:{},fn:e.program(15,a,0),inverse:e.noop,data:a}))?o:"")+" </div>\n"},15:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{},l=i.helperMissing,c="function",d=e.escapeExpression;return' <button data-key="'+d(typeof(r=null!=(r=i.key||a&&a.key)?r:l)===c?r.call(s,{name:"key",hash:{},data:a}):r)+'" type="'+d(typeof(r=null!=(r=i.type||(null!=t?t.type:t))?r:l)===c?r.call(s,{name:"type",hash:{},data:a}):r)+'" class="alpaca-control-button alpaca-control-button-'+d(typeof(r=null!=(r=i.key||a&&a.key)?r:l)===c?r.call(s,{name:"key",hash:{},data:a}):r)+" "+d(typeof(r=null!=(r=i.styles||(null!=t?t.styles:t))?r:l)===c?r.call(s,{name:"styles",hash:{},data:a}):r)+'" '+(null!=(o=i.each.call(s,null!=t?t.value:t,{name:"each",hash:{},fn:e.program(16,a,0),inverse:e.noop,data:a}))?o:"")+">"+(null!=(o=typeof(r=null!=(r=i.value||(null!=t?t.value:t))?r:l)===c?r.call(s,{name:"value",hash:{},data:a}):r)?o:"")+"</button>\n"},16:function(e,t,i,n,a){var o,r=null!=t?t:e.nullContext||{},s=i.helperMissing,l="function",c=e.escapeExpression;return c(typeof(o=null!=(o=i.key||a&&a.key)?o:s)===l?o.call(r,{name:"key",hash:{},data:a}):o)+'="'+c(typeof(o=null!=(o=i.value||(null!=t?t.value:t))?o:s)===l?o.call(r,{name:"value",hash:{},data:a}):o)+'" '},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s,l=null!=t?t:e.nullContext||{},c='<script type="text/x-handlebars-template">\n\n <div>\n\n'+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.label:o,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?o:"")+"\n"+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.helpers:o,{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?o:"")+"\n ";return r=null!=(r=i.control||(null!=t?t.control:t))?r:i.helperMissing,s={name:"control",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(l,s):r,i.control||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(c+=o),c+"\n\n"+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.helpers:o,{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a}))?o:"")+"\n"+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.renderButtons:o,{name:"if",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a}))?o:"")+"\n </div>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"].form=Handlebars.template({1:function(e,t,i,n,a){return""},3:function(e,t,i,n,a){var o;return null!=(o=i.each.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.buttons:o,{name:"each",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?o:""},4:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{},l=i.helperMissing,c="function",d=e.escapeExpression;return' <button data-key="'+d(typeof(r=null!=(r=i.key||a&&a.key)?r:l)===c?r.call(s,{name:"key",hash:{},data:a}):r)+'" type="'+d(typeof(r=null!=(r=i.type||(null!=t?t.type:t))?r:l)===c?r.call(s,{name:"type",hash:{},data:a}):r)+'" '+(null!=(o=i.if.call(s,null!=t?t.id:t,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?o:"")+' class="alpaca-form-button alpaca-form-button-'+d(typeof(r=null!=(r=i.key||a&&a.key)?r:l)===c?r.call(s,{name:"key",hash:{},data:a}):r)+" "+d(typeof(r=null!=(r=i.styles||(null!=t?t.styles:t))?r:l)===c?r.call(s,{name:"styles",hash:{},data:a}):r)+'" '+(null!=(o=i.each.call(s,null!=t?t.value:t,{name:"each",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?o:"")+" "+(null!=(o=i.each.call(s,null!=t?t.attributes:t,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?o:"")+">"+(null!=(o=typeof(r=null!=(r=i.value||(null!=t?t.value:t))?r:l)===c?r.call(s,{name:"value",hash:{},data:a}):r)?o:"")+"</button>\n"},5:function(e,t,i,n,a){var o;return'id="'+e.escapeExpression("function"==typeof(o=null!=(o=i.id||(null!=t?t.id:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"id",hash:{},data:a}):o)+'"'},7:function(e,t,i,n,a){var o,r=e.escapeExpression;return r("function"==typeof(o=null!=(o=i.key||a&&a.key)?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"key",hash:{},data:a}):o)+'="'+r(e.lambda(t,t))+'"'},9:function(e,t,i,n,a){var o,r=e.escapeExpression;return" "+r("function"==typeof(o=null!=(o=i.key||a&&a.key)?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"key",hash:{},data:a}):o)+'="'+r(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s,l=null!=t?t:e.nullContext||{},c='<script type="text/x-handlebars-template">\n\n <form role="form">\n\n ';return r=null!=(r=i.formItems||(null!=t?t.formItems:t))?r:i.helperMissing,s={name:"formItems",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},o="function"==typeof r?r.call(l,s):r,i.formItems||(o=i.blockHelperMissing.call(t,o,s)),null!=o&&(c+=o),c+'\n\n <div class="alpaca-form-buttons-container">\n'+(null!=(o=i.if.call(l,null!=(o=null!=t?t.options:t)?o.buttons:o,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?o:"")+" </div>\n\n </form>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"].message=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{},l=i.helperMissing,c="function";return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-message alpaca-message-'+(null!=(o=typeof(r=null!=(r=i.id||(null!=t?t.id:t))?r:l)===c?r.call(s,{name:"id",hash:{},data:a}):r)?o:"")+'">\n '+(null!=(o=typeof(r=null!=(r=i.message||(null!=t?t.message:t))?r:l)===c?r.call(s,{name:"message",hash:{},data:a}):r)?o:"")+"\n </div>\n\n<\/script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"].wizard=Handlebars.template({1:function(e,t,i,n,a){var o;return' <div class="alpaca-wizard-nav">\n <nav class="navbar navbar-default" role="navigation">\n <div class="container-fluid alpaca-wizard-back">\n <ul class="nav navbar-nav">\n'+(null!=(o=i.each.call(null!=t?t:e.nullContext||{},null!=t?t.steps:t,{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a}))?o:"")+" </ul>\n </div>\n </nav>\n </div>\n"},2:function(e,t,i,n,a){var o,r,s=null!=t?t:e.nullContext||{},l=i.helperMissing,c="function";return' <li data-alpaca-wizard-step-index="'+e.escapeExpression(typeof(r=null!=(r=i.index||a&&a.index)?r:l)===c?r.call(s,{name:"index",hash:{},data:a}):r)+'">\n <div class="holder">\n <div class="title">'+(null!=(o=typeof(r=null!=(r=i.title||(null!=t?t.title:t))?r:l)===c?r.call(s,{name:"title",hash:{},data:a}):r)?o:"")+'</div>\n <div class="description">'+(null!=(o=typeof(r=null!=(r=i.description||(null!=t?t.description:t))?r:l)===c?r.call(s,{name:"description",hash:{},data:a}):r)?o:"")+'</div>\n </div>\n <div class="chevron"></div>\n </li>\n'},4:function(e,t,i,n,a){return' <div class="alpaca-wizard-progress-bar">\n <div class="progress">\n <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">\n </div>\n </div>\n </div>\n'},6:function(e,t,i,n,a){var o,r;return" <h3>"+(null!=(o="function"==typeof(r=null!=(r=i.wizardTitle||(null!=t?t.wizardTitle:t))?r:i.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"wizardTitle",hash:{},data:a}):r)?o:"")+"</h3>\n"},8:function(e,t,i,n,a){var o,r;return" <h4>"+(null!=(o="function"==typeof(r=null!=(r=i.wizardDescription||(null!=t?t.wizardDescription:t))?r:i.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"wizardDescription",hash:{},data:a}):r)?o:"")+"</h4>\n"},10:function(e,t,i,n,a,o,r){var s;return null!=(s=(i.compare||t&&t.compare||i.helperMissing).call(null!=t?t:e.nullContext||{},null!=t?t.align:t,"left",{name:"compare",hash:{},fn:e.program(11,a,0,o,r),inverse:e.noop,data:a}))?s:""},11:function(e,t,i,n,a,o,r){var s,l,c=null!=t?t:e.nullContext||{},d=i.helperMissing,u="function",p=e.escapeExpression;return' <button type="'+p(typeof(l=null!=(l=i.type||(null!=t?t.type:t))?l:d)===u?l.call(c,{name:"type",hash:{},data:a}):l)+'" '+(null!=(s=i.if.call(c,null!=t?t.id:t,{name:"if",hash:{},fn:e.program(12,a,0,o,r),inverse:e.noop,data:a}))?s:"")+' class="'+p(e.lambda(null!=(s=null!=(s=null!=r[1]?r[1].view:r[1])?s.styles:s)?s.button:s,t))+'" data-alpaca-wizard-button-key="'+p(typeof(l=null!=(l=i.key||a&&a.key)?l:d)===u?l.call(c,{name:"key",hash:{},data:a}):l)+'" '+(null!=(s=i.each.call(c,null!=t?t.attributes:t,{name:"each",hash:{},fn:e.program(14,a,0,o,r),inverse:e.noop,data:a}))?s:"")+">"+(null!=(s=typeof(l=null!=(l=i.title||(null!=t?t.title:t))?l:d)===u?l.call(c,{name:"title",hash:{},data:a}):l)?s:"")+"</button>\n"},12:function(e,t,i,n,a){var o;return'id="'+e.escapeExpression("function"==typeof(o=null!=(o=i.id||(null!=t?t.id:t))?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"id",hash:{},data:a}):o)+'"'},14:function(e,t,i,n,a){var o,r=e.escapeExpression;return" "+r("function"==typeof(o=null!=(o=i.key||a&&a.key)?o:i.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"key",hash:{},data:a}):o)+'="'+r(e.lambda(t,t))+'"'},16:function(e,t,i,n,a,o,r){var s;return null!=(s=(i.compare||t&&t.compare||i.helperMissing).call(null!=t?t:e.nullContext||{},null!=t?t.align:t,"right",{name:"compare",hash:{},fn:e.program(11,a,0,o,r),inverse:e.noop,data:a}))?s:""},compiler:[7,">= 4.0.0"],main:function(e,t,i,n,a,o,r){var s,l=null!=t?t:e.nullContext||{};return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-wizard">\n\n \x3c!-- nav bar --\x3e\n'+(null!=(s=i.if.call(l,null!=t?t.showSteps:t,{name:"if",hash:{},fn:e.program(1,a,0,o,r),inverse:e.noop,data:a}))?s:"")+"\n \x3c!-- wizard progress bar --\x3e\n"+(null!=(s=i.if.call(l,null!=t?t.showProgressBar:t,{name:"if",hash:{},fn:e.program(4,a,0,o,r),inverse:e.noop,data:a}))?s:"")+"\n"+(null!=(s=i.if.call(l,null!=t?t.wizardTitle:t,{name:"if",hash:{},fn:e.program(6,a,0,o,r),inverse:e.noop,data:a}))?s:"")+(null!=(s=i.if.call(l,null!=t?t.wizardDescription:t,{name:"if",hash:{},fn:e.program(8,a,0,o,r),inverse:e.noop,data:a}))?s:"")+'\n \x3c!-- wizard steps --\x3e\n <div class="alpaca-wizard-steps">\n\n </div>\n\n \x3c!-- wizard buttons --\x3e\n <div class="alpaca-wizard-buttons">\n\n <div class="pull-left">\n'+(null!=(s=i.each.call(l,null!=t?t.buttons:t,{name:"each",hash:{},fn:e.program(10,a,0,o,r),inverse:e.noop,data:a}))?s:"")+' </div>\n\n <div class="pull-right">\n'+(null!=(s=i.each.call(l,null!=t?t.buttons:t,{name:"each",hash:{},fn:e.program(16,a,0,o,r),inverse:e.noop,data:a}))?s:"")+' </div>\n\n <div style="clear:both"></div>\n\n </div>\n\n </div>\n\n<\/script>'},useData:!0,useDepths:!0}),root=this,root.Base=function(){var e="function",t="object",i="string",n=!1,a=["constructor","toString","valueOf"],o=a.length,r=/\bbase\b/,s={toSource:null,base:function(){}},l=function(){};return l.extend=function(i,a){var o=l.prototype.extend;n=!0;var r=new this;o.call(r,i),r.base=s.base,n=!1;var c=r.constructor,d=r.constructor=function(){n||(this&&(this._constructing||this.constructor===d)?(this._constructing=!0,c.apply(this,arguments),this._constructing=!1):arguments.length&&l.cast.apply(d,arguments))};return o.call(d,this),d.ancestor=this,d.prototype=r,d.valueOf=function(e){return e===t?d:c.valueOf()}
2,o.call(d,a),typeof d.init===e&&d.init(),d},l.prototype.extend=function(c,d){if(typeof c===i&&arguments.length>1){var u=this[c];if(u&&typeof d===e&&(!u.valueOf||u.valueOf()!==d.valueOf())&&r.test(d)){var p=d.valueOf();d=function(){var e,t=this.base||s.base;return this.base=u,e=0===arguments.length?p.call(this):p.apply(this,arguments),this.base=t,e},d.valueOf=function(e){return e===t?d:p},d.toString=l.toString}this[c]=d}else if(c){var h=l.prototype.extend;n||typeof this===e||(h=this.extend||h);for(var f,m=n?0:1;m<o;m++)c[f=a[m]]!==s[f]&&h.call(this,f,c[f]);for(f in c)s[f]||h.call(this,f,c[f])}return this},l=l.extend({base:s.base},{ancestor:Object,version:"1.1",cast:function(){for(var t,i,n=0,a=arguments.length;n<a;n++)t=(i=arguments[n]).extend||l.prototype.extend,typeof i===e?((t=i.prototype.extend||l.prototype.extend).call(i.prototype,this.prototype),t.call(i,this),i.ancestor=this):t.call(i,this.prototype);return this},implement:function(){for(var e=0;e<arguments.length;e++)this.cast.call(arguments[e],this);return this},toString:function(){return this.valueOf()+""}}),l}(),function(e){var t=function(){var i=t.makeArray(arguments);if(0===i.length)return t.throwDefaultError("You must supply at least one argument. This argument can either be a DOM element against which Alpaca will generate a form or it can be a function name. See http://www.alpacajs.org for more details.");var n=i[0];n&&t.isString(n)&&(n=e("#"+n));var a=null,o=null,r=null,s=null,l=null,c=null,d=null,u=null,p=!1,h={},f=null,m=null,g=null,v=null,b=function(i,a){var o=null,r=e(i).attr("data-alpaca-field-id");if(r){var s=t.fieldInstances[r];s&&(o=s)}if(!o&&e(i).attr("data-alpaca-form-id")){var l=e(i).find(":first");if(l.length>0){var c=e(l[0]).attr("data-alpaca-field-id");if(c){var d=t.fieldInstances[c];d&&(o=d)}}}if(!o&&!a){var u=e(n).find(":first");if(u.length>0){var p=b(u[0],!0);p&&(o=p)}}if(!o&&!a){var h=e(n).parent();if(h){var f=b(h,!0);f&&(o=f)}}return o},y=["get","exists","destroy"],x=i.length>1&&t.isString(i[1])&&y.indexOf(i[1])>-1,C=b(n);if(C||x){if(x){var w=i[1];return"get"===w?C:"exists"===w?!!C:"destroy"===w?void(C&&C.destroy()):t.throwDefaultError("Unknown special function: "+w)}return C}var E=null;if(1===i.length){var S=e(n).text();E=JSON.parse(S),e(n).html("")}else E=t.isObject(i[1])?i[1]:t.isFunction(i[1])?i[1]():{data:i[1]};if(!E)return t.throwDefaultError("Unable to determine Alpaca configuration");if(a=E.data,o=E.schema,r=E.options,s=E.view,l=E.render,E.callback&&(l=E.callback),c=E.postRender,d=E.error,u=E.connector,f=E.dataSource,m=E.schemaSource,g=E.optionsSource,v=E.viewSource,E.ui&&(h.ui=E.ui),E.type&&(h.type=E.type),t.isEmpty(E.notTopLevel)||(p=E.notTopLevel),t.isEmpty(d)&&(d=t.defaultErrorCallback),!u||!u.connect){var F="default",T={};t.isString(u)?F=u:t.isObject(u)&&u.id&&(F=u.id,u.config&&(T=u.config));var A=t.getConnectorClass(F);A||(A=t.getConnectorClass("default")),u=new A(F,T)}var k=u;if(p){var O=t.getConnectorClass("default");k=new O("default")}r||(r={});var I=function(e){e.parent||(e.hideInitValidationError||e.refreshValidationState(!0),"view"!==e.view.type&&t.fieldApplyFieldAndChildren(e,(function(e){e.hideInitValidationError=!1})))},M=function(e){e.parent||(e.observableScope=t.generateId()),e.parent||t.fireReady(e),t.isUndefined(r.focus)&&!e.parent&&(r.focus=t.defaultFocus),r&&r.focus?window.setTimeout((function(){var t=function(e){e.suspendBlurFocus=!0,e.focus(),e.suspendBlurFocus=!1};if(r.focus){if(e.isControlField&&e.isAutoFocusable())t(e);else if(e.isContainerField)if(!0===r.focus)e.children&&e.children.length>0&&t(e);else if("string"==typeof r.focus){var i=e.getControlByPath(r.focus);i&&i.isControlField&&i.isAutoFocusable()&&t(i)}I(e)}}),500):I(e),c&&c(e)};k.loadAll({data:a,schema:o,options:r,view:s,dataSource:f,schemaSource:m,optionsSource:g,viewSource:v},(function(e,i,c,p){return e=e||a,c=c||o,i=i||r,p=p||s,t.isEmpty(e)&&t.isEmpty(c)&&(t.isEmpty(i)||t.isEmpty(i.type))&&(e="",t.isEmpty(i)?i="text":r&&t.isObject(r)&&(i.type="text")),i.view&&!s&&(p=i.view),t.init(n,e,i,c,p,h,l,M,u,d)}),(function(e){return d(e),null}))};t.Fields={},t.Connectors={},t.Extend=e.extend,t.Create=function(){var t=Array.prototype.slice.call(arguments);return t.unshift({}),e.extend.apply(this,t)},t.Extend(t,{makeArray:function(e){return Array.prototype.slice.call(e)},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},isString:function(e){return"string"==typeof e},isObject:function(e){return!t.isUndefined(e)&&"[object Object]"===Object.prototype.toString.call(e)},isPlainObject:function(t){return e.isPlainObject(t)},isNumber:function(e){return"number"==typeof e},isArray:function(e){return"[object Array]"==Object.prototype.toString.call(e)},isBoolean:function(e){return"boolean"==typeof e},isUndefined:function(e){return void 0===e},trim:function(e){var i=e;return i&&t.isString(i)&&(i=i.replace(/^\s+|\s+$/g,"")),i},safeDomParse:function(i){if(i&&t.isString(i)){i=t.trim(i);var n=null;try{n=e(i)}catch(t){n=e(i="<div>"+i+"</div>").children()}return n}return i},isEmpty:function(e,i){return!!t.isUndefined(e)||(null===e||!(!e||!t.isObject(e)||0!==this.countProperties(e,i)))},countProperties:function(e,i){var n=0;if(e&&t.isObject(e))for(var a in e)e.hasOwnProperty(a)&&(i||"function"!=typeof e[a])&&n++;return n},copyOf:function(i){var n=i;if(t.isArray(i)){n=[];for(var a=0;a<i.length;a++)n.push(t.copyOf(i[a]))}
vendor: 19,479 bytes, line 2
2else if(t.isObject(i)){if(i instanceof Date)return new Date(i.getTime());if(i instanceof RegExp)return new RegExp(i);if(i.nodeType&&"cloneNode"in i)n=i.cloneNode(!0);else if(e.isPlainObject(i))for(var o in n={},i)i.hasOwnProperty(o)&&(n[o]=t.copyOf(i[o]))}return n},copyInto:function(e,t){for(var i in t)t.hasOwnProperty(i)&&!this.isFunction(this[i])&&(e[i]=t[i])},cloneObject:function(e){return t.copyOf(e)},spliceIn:function(e,t,i){return e.substring(0,t)+i+e.substring(t,e.length)},compactArray:function(e){var t,i=[],n=e.length;for(t=0;t<n;t++)lang.isNull(e[t])||lang.isUndefined(e[t])||i.push(e[t]);return i},removeAccents:function(e){return e.replace(/[à áâãäå]/g,"a").replace(/[èéêë]/g,"e").replace(/[ìÃîï]/g,"i").replace(/[òóôõö]/g,"o").replace(/[ùúûü]/g,"u").replace(/[ýÿ]/g,"y").replace(/[ñ]/g,"n").replace(/[ç]/g,"c").replace(/[Å]/g,"oe").replace(/[æ]/g,"ae")},indexOf:function(e,i,n){var a,o=i.length;for(t.isFunction(n)||(n=function(e,t){return e===t}),a=0;a<o;a++)if(n.call({},e,i[a]))return a;return-1},uniqueIdCounter:0,defaultLocale:"en_US",defaultFocus:!0,defaultSort:function(e,t){return e.text>t.text?1:e.text<t.text?-1:0},setDefaultLocale:function(e){this.defaultLocale=e},defaultSchemaFieldMapping:{},registerDefaultSchemaFieldMapping:function(e,t){e&&t&&(this.defaultSchemaFieldMapping[e]=t)},defaultFormatFieldMapping:{},registerDefaultFormatFieldMapping:function(e,t){e&&t&&(this.defaultFormatFieldMapping[e]=t)},getSchemaType:function(e){var i=null;return t.isEmpty(e)?i="string":t.isArray(e)?i="array":t.isObject(e)?i="object":t.isString(e)?i="string":t.isNumber(e)?i="number":t.isBoolean(e)&&(i="boolean"),i||"object"!=typeof e||(i="object"),i},guessOptionsType:function(e){var i=null;return i=e&&void 0!==e.enum?e.enum.length>3?"select":"radio":t.defaultSchemaFieldMapping[e.type],e.format&&t.defaultFormatFieldMapping[e.format]&&(i=t.defaultFormatFieldMapping[e.format]),i},views:{},generateViewId:function(){return"view-"+this.generateId()},registerView:function(e){var i=e.id;if(!i)return t.throwDefaultError("Cannot register view with missing view id: "+i);var n=this.views[i];if(n)t.mergeObject(n,e);else{this.views[i]=e,e.templates||(e.templates={});for(var a=t.TemplateEngineRegistry.ids(),o=0;o<a.length;o++){var r=a[o],s=t.TemplateEngineRegistry.find(r);if(s)for(var l=s.findCacheKeys(i),c=0;c<l.length;c++){var d=t.splitCacheKey(l[c]);e.templates[d.templateId]={type:r,template:!0,cacheKey:l[c]}}}}},getNormalizedView:function(e){return this.normalizedViews[e]},lookupNormalizedView:function(e,t){var i=null;for(var n in this.normalizedViews){var a=this.normalizedViews[n];if(a.ui===e&&a.type===t){i=n;break}}return i},registerTemplate:function(e,i,n){n||(n="base"),this.views[n]||(this.views[n]={},this.views[n].id=n),this.views[n].templates||(this.views[n].templates={}),this.views[n].templates[e]=i,t.countProperties(t.normalizedViews)>0&&(t.normalizedViews={})},registerTemplates:function(e,t){for(var i in e)this.registerTemplate(i,e[i],t)},registerMessage:function(e,t,i){i||(i="base"),this.views[i]||(this.views[i]={},this.views[i].id=i),this.views[i].messages||(this.views[i].messages={}),this.views[i].messages[e]=t},registerMessages:function(e,t){for(var i in e)e.hasOwnProperty(i)&&this.registerMessage(i,e[i],t)},defaultDateFormat:"MM/DD/YYYY",defaultTimeFormat:"HH:mm:ss",regexps:{email:/^[a-z0-9!\#\$%&'\*\-\/=\?\+\-\^_`\{\|\}~]+(?:\.[a-z0-9!\#\$%&'\*\-\/=\?\+\-\^_`\{\|\}~]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,6}$/i,url:/^(http|https|ftp):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(\:[0-9]{1,5})?(\/.*)?$/i,"intranet-url":/^(http|https|ftp):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*(\:[0-9]{1,5})?(\/.*)?$/i,password:/^[0-9a-zA-Z\x20-\x7E]*$/,date:/^(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.]\d\d$/,integer:/^([\+\-]?([1-9]\d*)|0)$/,number:/^([\+\-]?((([0-9]+(\.)?)|([0-9]*\.[0-9]+))([eE][+-]?[0-9]+)?))$/,phone:/^(\D?(\d{3})\D?\D?(\d{3})\D?(\d{4}))?$/,ipv4:/^(?:1\d?\d?|2(?:[0-4]\d?|[6789]|5[0-5]?)?|[3-9]\d?|0)(?:\.(?:1\d?\d?|2(?:[0-4]\d?|[6789]|5[0-5]?)?|[3-9]\d?|0)){3}$/,"zipcode-five":/^(\d{5})?$/,"zipcode-nine":/^(\d{5}(-\d{4})?)?$/,whitespace:/^\s+$/},fieldInstances:{},fieldClassRegistry:{},registerFieldClass:function(e,t){this.fieldClassRegistry[e]=t},getFieldClass:function(e){return this.fieldClassRegistry[e]},getFieldClassType:function(e){for(var t in this.fieldClassRegistry)if(this.fieldClassRegistry.hasOwnProperty(t)&&this.fieldClassRegistry[t]===e)return t;return null},connectorClassRegistry:{},registerConnectorClass:function(e,t){this.connectorClassRegistry[e]=t},getConnectorClass:function(e){return this.connectorClassRegistry[e]},replaceAll:function(e,t,i){return e.replace(new RegExp(t,"g"),i)},element:function(t,i,n,a){var o=e("<"+t+"/>");if(i&&o.attr(i),n&&o.css(n),a)for(var r in a)o.addClass(r)},elementFromTemplate:function(i,n){var a=i;if(n)for(var o in n)a=t.replaceAll(a,"${"+o+"}",n[o]);return e(a)},generateId:function(){return t.uniqueIdCounter++,"alpaca"+t.uniqueIdCounter},later:function(t,i,n,a,o){t=t||0,i=i||{};var r,s,l=n,c=e.makeArray(a);if("string"==typeof n&&(l=i[n]),!l)throw{name:"TypeError",message:"The function is undefined."};return r=function(){l.apply(i,c)},{id:s=o?setInterval(r,t):setTimeout(r,t),interval:o,cancel:function(){this.interval?clearInterval(s):clearTimeout(s)}}},endsWith:function(e,t){return-1!==e.indexOf(t,e.length-t.length)},startsWith:function(e,t){return e.substr(0,t.length)===t},isUri:function(e){return t.isString(e)&&(t.startsWith(e,"http://")||t.startsWith(e,"https://")||t.startsWith(e,"/")||t.startsWith(e,"./")||t.startsWith(e,"../"))},traverseObject:function(e,i,n){t.isString(i)&&(i=i.split("."));var a=null,o=e,r=null;do{r=i.shift(),n&&r===n&&(r=i.shift()),t.isEmpty(o[r])?i=[]:(o=o[r],0===i.length&&(a=o))}while(i.length>0);return a},each:function(e,i){if(t.isArray(e))for(var n=0;n<e.length;n++)i.apply(e[n]);else if(t.isObject(e))for(var a in e)i.apply(e[a])},merge:function(e,i,n){for(var a in e||(e={}),i){var o=!0;n&&(o=n(a)),o&&(t.isEmpty(i[a])?e[a]=i[a]:t.isObject(i[a])?(e[a]||(e[a]={}),e[a]=t.merge(e[a],i[a])):e[a]=i[a])}return e},mergeObject:function(e,t){return e||(e={}),t||(t={}),this.mergeObject2(t,e),e},mergeObject2:function(i,n){var a=t.isArray,o=t.isObject,r=t.isUndefined,s=t.copyOf,l=function(t,i){return a(t)?a(i)&&e.each(t,(function(e){i.push(s(t[e]))})):o(t)?o(i)&&e.each(t,(function(e){r(i[e])?i[e]=s(t[e]):i[e]=l(t[e],i[e])})):i=s(t),i};return l(i,n),n},substituteTokens:function(e,i){if(!t.isEmpty(e))for(var n=0;n<i.length;n++){var a="{"+n+"}",o=e.indexOf(a);if(o>-1){var r=e.substring(0,o)+i[n]+e.substring(o+3);e=r}}return e},compareObject:function(e,t){return equiv(e,t)},compareArrayContent:function(t,i){var n=t&&i&&t.length===i.length;if(n)for(var a=t.length-1;a>=0;a--){var o=t[a];if(e.inArray(o,i)<0)return!1}return n},testRegex:function(e,t){return new RegExp(e).test(t)},isValEmpty:function(i,n){var a=!1;return t.isEmpty(i,n)?a=!0:(t.isString(i)&&""===i&&(a=!0),t.isObject(i)&&e.isEmptyObject(i)&&(a=!0),t.isArray(i)&&0===i.length&&(a=!0)),a},init:function(e,i,n,a,o,r,s,l,c,d){var u=this;t.isObject(o)&&(o.id||(o.id=this.generateViewId()),o.parent||(o.parent="bootstrap-edit"),this.registerView(o),o=o.id),this.compile(c,(function(p){if(p.errors&&p.errors.length>0){for(var h=[],f=0;f<p.errors.length;f++){var m=p.errors[f].view,g=p.errors[f].cacheKey,v=p.errors[f].err,b="The template with cache key: "+g+" for view: "+m+" failed to compile";v&&v.message&&(b+=", message: "+v.message,h.push(v.message)),v&&(b+=", err: "+JSON.stringify(v)),t.logError(b),delete u.normalizedViews[m],delete u.views[m]}return t.throwErrorWithCallback("View compilation failed, cannot initialize Alpaca. "+h.join(", "),d)}u._init(e,i,n,a,o,r,s,l,c,d)}),d)},_init:function(i,n,a,o,r,s,l,c,d,u){var p=this,h=t.defaultView||null,f=null;if(e.mobile&&!h&&(h="jquerymobile"),"function"==typeof e.fn.modal&&!h&&(h="bootstrap"),void 0!==e.ui&&!h&&(h="jqueryui"),h&&(f=n?"edit":"create"),!r){var m=s.ui,g=s.type;m||(h||(h=t.defaultUI),h&&(m=h)),m&&(g||(g=f||"edit"),t.logDebug("No view provided but found request for UI: "+m+" and type: "+g),(r=this.lookupNormalizedView(m,g))?t.logDebug("Found view: "+r):t.logDebug("No view found for UI: "+m+" and type: "+g))}if(!r)return t.throwErrorWithCallback("A view was not specified and could not be automatically determined.",u);if(t.isString(r)&&!this.normalizedViews[r])return t.throwErrorWithCallback("The desired view: "+r+" could not be loaded. Please make sure it is loaded and not misspelled.",u);var v=t.createFieldInstance(i,n,a,o,r,d,u);if(v){e(i).addClass("alpaca-field-rendering"),e(i).addClass("alpaca-hidden"),t.fieldInstances[v.getId()]=v,v.allFieldInstances=function(){return t.fieldInstances},t.isEmpty(l)&&(l=v.view.render),t.isEmpty(c)&&(c=v.view.postRender);var b=function(){v.parent||v.getFieldEl().addClass("alpaca-"+p.getNormalizedView(r).type),v.parent||v.getFieldEl().addClass("alpaca-top"),e(i).removeClass("alpaca-field-rendering"),e(i).removeClass("alpaca-hidden"),v._oldFieldEl&&e(v._oldFieldEl).remove(),c(v)};t.isEmpty(l)?v.render((function(){b()})):l(v,(function(){b()})),v.callback=l,v.renderedCallback=c}},createFieldInstance:function(e,i,n,a,o,r,s){if(t.isValEmpty(n,!0)&&(n={}),t.isValEmpty(a,!0)&&(a={}),n&&t.isString(n)){var l=n;(n={}).type=l}n.type||(a.type||(a.type=t.getSchemaType(i)),a.type||(i&&t.isArray(i)?a.type="array":a.type="object"),n.type=t.guessOptionsType(a));var c=t.getFieldClass(n.type);return c?new c(e,i,n,a,o,r,s):(s({message:"Unable to find field class for type: "+n.type,reason:"FIELD_INSTANTIATION_ERROR"}),null)},parseJSON:function(t){return t?e.parseJSON(t):null},compile:function(i,n,a){var o=this,r={errors:[],count:0,successCount:0},s=function(e){if(0===r.errors.length)for(var t in e)o.normalizedViews[t]=e[t];n(r)},l=function(e,t,i,n,a){var o=i.id;r.count++,t?r.errors.push({view:o,cacheKey:n,err:t}):r.successCount++,r.count==a&&s(e)},c=function(n,a,o,r,s,c,d){var u=t.makeCacheKey(a.id,o,r,s),p="text/x-handlebars-template";if(c&&t.isObject(c)&&(p=c.type,c.cacheKey&&(u=c.cacheKey),c=c.template),c&&"string"==typeof c){var h=c.toLowerCase();if(t.isUri(h));else if(!c||0!==c.indexOf("#")&&0!==c.indexOf(".")){if(c){var f=a.templates[c];f&&(c=f)}}else{var m=e(c);p=e(m).attr("type"),c=e(m).html()}}if(p){var g=t.TemplateEngineRegistry.find(p);if(g){if(!0===c){if(g.isCached(u))return void l(n,null,a,u,d);var v="View configuration for view: "+a.id+" claims to have precompiled template for cacheKey: "+u+" but it could not be found";return t.logError(v),void l(n,new Error(v),a,u,d)}g.isCached(u)?l(n,null,a,u,d):g.compile(u,c,i,(function(e){l(n,e,a,u,d)}))}else t.logError("Cannot find template engine for type: "+type),b=new Error("Cannot find template engine for type: "+type),l(n,b,a,u,d)}else{t.logError("Engine type was empty");var b=new Error("Engine type was empty");l(n,b,a,u,d)}};!function(){var e={},i=0;for(var n in t.normalizedViews||(t.normalizedViews={}),o.normalizedViews=t.normalizedViews,o.views)if(!t.normalizedViews[n]){var r=new t.NormalizedView(n);if(!r.normalize(o.views))return t.throwErrorWithCallback("View normalization failed, cannot initialize Alpaca. Please check the error logs.",a);e[n]=r,i++}i>0?function(e){var t=[];for(var i in e){var n=e[i];if(n.templates)for(var a in n.templates){var o=n.templates[a];t.push(function(e,t,i,n,a,o){return function(i){c(e,t,"view",n,a,o,i)}}(e,n,0,n.id,a,o))}if(n.fields)for(var r in n.fields)if(n.fields[r].templates)for(var a in n.fields[r].templates)o=n.fields[r].templates[a],t.push(function(e,t,i,n,a,o){return function(i){c(e,t,"field",n,a,o,i)}}(e,n,0,r,a,o));n.layout&&n.layout.template&&(o=n.layout.template,t.push(function(e,t,i,n,a,o){return function(i){c(e,t,"layout","layout","layoutTemplate",o,i)}}(e,n,0,0,0,o))),n.globalTemplate&&(o=n.globalTemplate,t.push(function(e,t,i,n,a,o){return function(i){c(e,t,"global","global","globalTemplate",o,i)}}(e,n,0,0,0,o)))}for(var s=t.length,l=0;l<t.length;l++)t[l](s)}(e):s(e)}()},getTemplateDescriptor:function(e,i,n){var a=null,o=null,r=null;if(e.templates&&e.templates[i]){r=t.makeCacheKey(e.id,"view",e.id,i);var s=e.templates[i];t.isObject(s)&&s.cacheKey&&(r=s.cacheKey)}if(n&&n.path){var l=n.path;if(e&&e.fields&&l&&l.length>1){var c=function(n,a,o){if(a!=n.length){var r=n.slice(),s=!1,l=n[a],d=l.indexOf("[");d>-1&&(l=l.substring(0,d),s=!0),r[a]=l;var u=r.join("/");if(e.fields[u]&&e.fields[u].templates&&e.fields[u].templates[i]){var p=t.makeCacheKey(e.id,"field",u,i);p&&o.push({path:u,cacheKey:p})}c(n,a+1,o),s&&c(r,a+1,o)}},d=l.split("/"),u=[];c(d,0,u),u.length>0&&(r=u[0].cacheKey)}}if("globalTemplate"!==i&&"global"!==i||(r=t.makeCacheKey(e.id,"global","global","globalTemplate")),"layoutTemplate"!==i&&"layout"!==i||(r=t.makeCacheKey(e.id,"layout","layout","layoutTemplate")),r){for(var p=t.TemplateEngineRegistry.ids(),h=0;h<p.length;h++){var f=p[h];if(t.TemplateEngineRegistry.find(f).isCached(r)){o=f;break}}o&&(a={engine:o,cacheKey:r})}return a},tmpl:function(e,i){var n=t.tmplHtml(e,i);return t.safeDomParse(n)},tmplHtml:function(e,i){i||(i={});var n=e.engine,a=t.TemplateEngineRegistry.find(n);if(!a)return t.throwDefaultError("Cannot find template engine for type: "+n);var o=e.cacheKey;return a.execute(o,i,(function(e){var i=JSON.stringify(e);return e.message&&(i=e.message),t.throwDefaultError("The compiled template: "+o+" failed to execute: "+i)}))}}),t.DEBUG=0,t.INFO=1,t.WARN=2,t.ERROR=3,t.logLevel=t.WARN,t.logDebug=function(e){t.log(t.DEBUG,e)},t.logInfo=function(e){t.log(t.INFO,e)},t.logWarn=function(e){t.log(t.WARN,e)},t.logError=function(e){t.log(t.ERROR,e)},t.LOG_METHOD_MAP={0:"debug",1:"info",2:"warn",3:"error"},t.log=function(e,i){if(t.logLevel<=e){var n=t.LOG_METHOD_MAP[e];"undefined"!=typeof console&&console[n]&&("debug"===n?console.debug(i):"info"===n?console.info(i):"warn"===n?console.warn(i):"error"===n?console.error(i):console.log(i))}},t.checked=function(e,i){return t.attrProp(e,"checked",i)},t.disabled=function(e,i){return t.attrProp(e,"disabled",i)},t.attrProp=function(t,i,n){return void 0!==n&&(e(t).prop?e(t).prop(i,n):n?e(t).attr(i,n):e(t).removeAttr(i)),e(t).prop?e(t).prop(i):e(t).attr(i)},t.loadRefSchemaOptions=function(e,i,n,a){var o=[],r={};o.push(function(i,n,a){return function(o){if(n)if("#"===n)a.schema=i,o();else if(0===n.indexOf("#/")){for(var r=(n=n.substring(2)).split("/"),s=i,l=0;l<r.length;l++){var c=r[l];if(s[c])s=s[c];else if(s.properties&&s.properties[c])s=s.properties[c];else{if(!s.definitions||!s.definitions[c]){s=null;break}s=s.definitions[c]}}a.schema=s,o()}else if(0===n.indexOf("#")){var d=t.resolveSchemaReference(i,n);d&&(a.schema=d),o()}else{var u=t.pathParts(n);e.connector.loadReferenceSchema(u.path,(function(e){if(u.id){var i=t.resolveSchemaReference(e,u.id);i&&(a.schema=i)}else a.schema=e;o()}),(function(e){o()}))}else o()}}(e.schema,i,r)),o.push(function(i,n,a){return function(o){if(n)if("#"===n)a.options=i,o();else if(0===n.indexOf("#/")){for(var r=(n=n.substring(2)).split("/"),s=i,l=0;l<r.length;l++){var c=r[l];if(s[c])s=s[c];else if(s.fields&&s.fields[c])s=s.fields[c];else{if(!s.definitions||!s.definitions[c]){s=null;break}s=s.definitions[c]}}a.options=s,o()}else if(0===n.indexOf("#")){var d=t.resolveOptionsReference(i,n);d&&(a.options=d),o()}else{var u=t.pathParts(n);e.connector.loadReferenceOptions(u.path,(function(e){if(u.id){var i=t.resolveOptionsReference(e,u.id);i&&(a.options=i)}else a.options=e;o()}),(function(e){o()}))}else o()}}(e.options,n,r)),t.parallel(o,(function(){a(r.schema,r.options)}))},t.DEFAULT_ERROR_CALLBACK=function(e){if(e&&e.message)throw t.logError(JSON.stringify(e)),new Error("Alpaca caught an error with the default error handler: "+JSON.stringify(e))},t.defaultErrorCallback=t.DEFAULT_ERROR_CALLBACK,t.throwDefaultError=function(e){e&&t.isObject(e)&&(e=JSON.stringify(e));var i={message:e};t.defaultErrorCallback(i)},t.throwErrorWithCallback=function(e,i){e&&t.isObject(e)&&(e=JSON.stringify(e));var n={message:e};i?i(n):t.defaultErrorCallback(n)},t.resolveSchemaReference=function(e,i){if(e.id===i||"#"+e.id===i)return e;if(e.properties)for(var n in e.properties){var a=e.properties[n];if(o=t.resolveSchemaReference(a,i))return o}else if(e.items){var o;if(a=e.items,o=t.resolveSchemaReference(a,i))return o}return null},t.resolveOptionsReference=function(e,i){if(e.id===i||"#"+e.id===i)return e;if(e.fields)for(var n in e.fields){var a=e.fields[n];if(o=t.resolveOptionsReference(a,i))return o}else if(e.items){var o;if(a=e.items,o=t.resolveOptionsReference(a,i))return o}return null},e.alpaca=window.Alpaca=t,e.fn.alpaca=function(){var i=t.makeArray(arguments),n=[].concat(this,i),a=t.apply(this,n);return void 0===a&&(a=e(this)),a},e.fn.outerHTML=function(t){return t?e("<div></div>").append(this).html():e("<div></div>").append(this.clone()).html()},e.fn.swapWith=function(t){return this.each((function(){var i=e(t).clone(),n=e(this).clone();e(t).replaceWith(n),e(this).replaceWith(i)}))},e.fn.attrProp=function(i,n){return t.attrProp(e(this),i,n)},e.event.special.destroyed={remove:function(e){e.handler&&e.handler()}},t.pathParts=function(e){if("string"!=typeof e)return e;var i=e,n=null,a=i.indexOf("#");a>-1&&(n=i.substring(a+1),i=i.substring(0,a)),t.endsWith(i,"/")&&(i=i.substring(0,i.length-1));var o={};return o.path=i,n&&(o.id=n),o},t.resolveField=function(e,i){var n=null;if("string"==typeof i)if(0===i.indexOf("#/")&&propertyId.length>2);else if("#"===i||"#/"===i)n=e;else if(0===i.indexOf("#")){for(var a=e;a.parent;)a=a.parent;var o=i.substring(1);n=t.resolveFieldByReference(a,o)}else n=e.childrenByPropertyId[i];return n},t.resolveFieldByReference=function(e,i){if(e.schema&&e.schema.id==i)return e;if(e.children&&e.children.length>0)for(var n=0;n<e.children.length;n++){var a=e.children[n],o=t.resolveFieldByReference(a,i);if(o)return o}return null},t.anyEquality=function(e,i){var n={};if("object"==typeof e||t.isArray(e))for(var a in e)n[e[a]]=!0;else n[e]=!0;var o=!1;if("object"==typeof i||t.isArray(i)){for(var a in i)if(n[i[a]]){o=!0;break}}else o=n[i];return o},t.compileValidationContext=function(e,t){var i=[],n=e;do{n.isValidationParticipant()||(n=null),n&&i.push(n),n&&(n=n.parent)}while(n);i.reverse();var a=[],o=function(e,t,i){if(!e||0===e.length)return i();var n=e[0],a={};a.id=n.getId(),a.field=n,a.path=n.path;var r=n.isValid();n.isContainer()&&(r=n.isValid(!0)),a.before=r;var s=function(e,i,n){var a=e._previouslyValidated;e.validate(),e._validateCustomValidator((function(){var o=e.isValid();e.isContainer()&&(o=e.isValid(!0)),i.after=o,i.validated=!1,i.invalidated=!1,!r&&o?i.validated=!0:r&&!o?i.invalidated=!0:a||o||(i.invalidated=!0),i.container=e.isContainer(),i.valid=i.after,t.push(i),n()}))};if(e.length>1){var l=e.slice(0);l.shift(),o(l,t,(function(){s(n,a,(function(){i()}))}))}else s(n,a,(function(){i()}))};o(i,a,(function(){t(a)}))},t.updateValidationStateForContext=function(e,i){for(var n=0;n<i.length;n++){var a=i[n],o=a.field;if(o.getFieldEl().removeClass("alpaca-invalid alpaca-invalid-hidden alpaca-valid"),o.fireCallback("clearValidity"),a.valid)o.getFieldEl().addClass("alpaca-field-valid"),o.fireCallback("valid");else if(!o.options.readonly||t.showReadOnlyInvalidState){var r=!1;o.hideInitValidationError&&(r=!0),o.fireCallback("invalid",r),o.getFieldEl().addClass("alpaca-invalid"),r&&o.getFieldEl().addClass("alpaca-invalid-hidden")}else t.logWarn("The field (id="+o.getId()+", title="+o.getTitle()+", path="+o.path+") is invali
2d and also read-only");if(a.validated?t.later(25,this,(function(){o.trigger("validated")})):a.invalidated&&t.later(25,this,(function(){o.trigger("invalidated")})),o.options.showMessages&&!o.initializing&&(!o.options.readonly||t.showReadOnlyInvalidState)){var s=[];for(var l in o.validation)o.validation[l].status||s.push({id:l,message:o.validation[l].message});o.displayMessage(s,o.valid)}}},t.fieldApplyFieldAndChildren=function(e,i){if(i(e),e.children&&e.children.length>0)for(var n=0;n<e.children.length;n++)t.fieldApplyFieldAndChildren(e.children[n],i)},t.replaceAll=function(e,t,i){return e.replace(new RegExp(t,"g"),i)},t.asArray=function(e){if(!t.isArray(e)){var i=[];return i.push(e),i}return e},function(e){function t(e){return e.constructor===String?"string":e.constructor===Boolean?"boolean":e.constructor===Number?isNaN(e)?"nan":"number":void 0===e?"undefined":null===e?"null":e instanceof Array?"array":e instanceof Date?"date":e instanceof RegExp?"regexp":"object"==typeof e?"object":e instanceof Function?"function":void 0}function i(e,i,n){var a=t(e);if(a)return"function"===t(i[a])?i[a].apply(i,n):i[a]}var n,a,o;window.equiv=(a=[],o=function(){function e(e,t){return e instanceof t.constructor||t instanceof e.constructor?t==e:t===e}return{string:e,boolean:e,number:e,null:e,undefined:e,nan:function(e){return isNaN(e)},date:function(e,i){return"date"===t(e)&&i.valueOf()===e.valueOf()},regexp:function(e,i){return"regexp"===t(e)&&i.source===e.source&&i.global===e.global&&i.ignoreCase===e.ignoreCase&&i.multiline===e.multiline},function:function(){var e=a[a.length-1];return e!==Object&&void 0!==e},array:function(e,i){var a,o;if("array"!==t(e))return!1;if((o=i.length)!==e.length)return!1;for(a=0;a<o;a++)if(!n(i[a],e[a]))return!1;return!0},object:function(e,t){var i,o=!0,r=[],s=[];if(t.constructor!==e.constructor)return!1;for(i in a.push(t.constructor),t)r.push(i),n(t[i],e[i])||(o=!1);for(i in a.pop(),e)s.push(i);return o&&n(r.sort(),s.sort())}}}(),n=function(){var e,n,a=Array.prototype.slice.apply(arguments);return a.length<2||(e=a[0],n=a[1],(e===n||null!==e&&null!==n&&void 0!==e&&void 0!==n&&t(e)===t(n)&&i(e,o,[n,e]))&&arguments.callee.apply(this,a.splice(1,a.length-1)))},n)}(),t.MARKER_CLASS_CONTROL_FIELD="alpaca-marker-control-field",t.MARKER_CLASS_CONTAINER_FIELD="alpaca-marker-container-field",t.MARKER_CLASS_CONTAINER_FIELD_ITEM="alpaca-marker-control-field-item",t.MARKER_DATA_CONTAINER_FIELD_ITEM_KEY="data-alpaca-container-field-item-key",t.MARKER_CLASS_FORM_ITEMS_FIELD="alpaca-marker-form-items-field",t.CLASS_CONTAINER="alpaca-container",t.CLASS_CONTROL="alpaca-control",t.MARKER_CLASS_INSERT="alpaca-marker-insert",t.MARKER_DATA_INSERT_KEY="data-alpaca-marker-insert-key",t.MARKER_CLASS_ARRAY_TOOLBAR="alpaca-marker-array-field-toolbar",t.MARKER_DATA_ARRAY_TOOLBAR_FIELD_ID="data-alpaca-array-field-toolbar-field-id",t.MARKER_CLASS_ARRAY_ITEM_ACTIONBAR="alpaca-marker-array-field-item-actionbar",t.MARKER_DATA_ARRAY_ITEM_KEY="data-alpaca-marker-array-field-item-key",t.MARKER_DATA_ARRAY_ITEM_PARENT_FIELD_ID="data-alpaca-marker-array-field-item-parent-field-id",t.MARKER_DATA_ARRAY_ITEM_FIELD_ID="data-alpaca-marker-array-field-item-field-id",t.MARKER_CLASS_CONTAINER_FIELD_ITEM_FIELD="alpaca-marker-container-field-item-field",t.makeCacheKey=function(e,t,i,n){return e+":"+t+":"+i+":"+n},t.splitCacheKey=function(e){var t={},i=e.indexOf(":"),n=e.lastIndexOf(":");t.viewId=e.substring(0,i),t.templateId=e.substring(n+1);var a=e.substring(i+1,n),o=a.indexOf(":");return t.scopeType=a.substring(0,o),t.scopeId=a.substring(o+1),t},t.createEmptyDataInstance=function(e){return e?"object"===e.type?{}:"array"===e.type?[]:"number"===e.type?-1:"boolean"!==e.type&&"":""},t.animatedSwap=function(t,i,n,a){"function"==typeof n&&(a=n,n=500),function(t,i,n,a){var o,r,s=e(t),l=e(i),c=s.offset(),d=l.offset(),u=s.clone(),p=l.clone(),h=d.top+l.height()-c.top,f=0,m=d.left+l.width()-c.left,g=0;s.css("opacity",0),l.css("opacity",0),u.insertAfter(s).css({position:"absolute",width:s.outerWidth(),height:s.outerHeight()}).offset(c).css("z-index","999"),p.insertAfter(l).css({position:"absolute",width:l.outerWidth(),height:l.outerHeight()}).offset(d).css("z-index","999"),c.top!==d.top&&(f=h-s.height()),o=h-l.he
2ight(),c.left!==d.left&&(g=m-s.width()),r=m-l.width(),u.animate({top:"+="+f+"px",left:"+="+g+"px"},n,(function(){l.css("opacity",1),e(this).remove()})),p.animate({top:"-="+o+"px",left:"-="+r+"px"},n,(function(){s.css("opacity",1),e(this).remove()})),window.setTimeout((function(){u.remove(),p.remove(),a()}),n+1)}(t,i,n,a)},t.animatedMove=function(t,i,n,a){"function"==typeof n&&(a=n,n=500),function(t,i,n,a){var o=e(t),r=e(i),s=o.offset(),l=r.offset(),c=o.clone(),d=l.top+r.height()-s.top,u=0,p=l.left+r.width()-s.left,h=0;o.css("opacity",0),r.css("opacity",0),c.insertAfter(o).css({position:"absolute",width:o.outerWidth(),height:o.outerHeight()}).offset(s).css("z-index","999"),s.top!==l.top&&(u=d-o.height()),r.height(),s.left!==l.left&&(h=p-o.width()),r.width(),c.animate({top:"+="+u+"px",left:"+="+h+"px"},n,(function(){r.css("opacity",1),e(this).remove()})),window.setTimeout((function(){c.remove(),a()}),n+1)}(t,i,n,a)},t.fireReady=function(e){if(e.children&&e.children.length>0)for(var i=0;i<e.children.length;i++)t.fireReady(e.children[i]);e.trigger("ready")},t.readCookie=function(e){var t=null;return"undefined"!=typeof document&&(t=function(e){for(var t=e+"=",i=document.cookie.split(";"),n=0;n<i.length;n++){for(var a=i[n];" "==a.charAt(0);)a=a.substring(1,a.length);if(0==a.indexOf(t))return a.substring(t.length,a.length)}return null}(e)),t},t.safeSetObjectArray=function(e,t,i){void 0===e[t]||null===e[t]?e[t]=[]:e[t].length=0;for(var n=0;n<i.length;n++)e[t].push(i[n])},t.inArray=function(t,i){return e.inArray(i,t)>-1},t.indexOf=function(t,i){return e.inArray(i,t)},t.hashCode=function(e){var t,i,n=0;if("string"!=typeof e&&(e=JSON.stringify(e)),0===e.length)return n;for(t=0,i=e.length;t<i;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n<0&&(n*=-1),n},t.moment=function(){if(t._moment||window.moment&&(t._moment=window.moment),!t._moment)throw new Error("The moment.js library has not been included, cannot produce moment object");return t._moment.call(this,arguments)},t.CSRF_TOKEN=null,t.CSRF_COOKIE_NAMES=["CSRF-TOKEN","XSRF-TOKEN"],t.CSRF_HEADER_NAME="X-CSRF-TOKEN",t.defaultDragAndDrop=!1,t.defaultToolbarSticky=void 0,t.showReadOnlyInvalidState=!1,t.defaultHelpersPosition="below",t.caches={},t.registerCache=function(e,i){t.caches[e]=i},t.getCache=function(e){return t.caches[e]},t.externalMessage=function(e){}}(jQuery),function(){var e={};function t(e,...t){return(...i)=>e(...t,...i)}function i(e){return function(...t){var i=t.pop();return e.call(this,t,i)}}Alpaca.series=Alpaca.serial=function(t,i){e.series(t,(function(){i()}))},Alpaca.parallel=function(t,i){e.parallel(t,(function(){i()}))},Alpaca.nextTick=function(t){e.nextTick((function(){t()}))};var n="function"==typeof setImmediate&&setImmediate,a="object"==typeof process&&"function"==typeof process.nextTick;function o(e){setTimeout(e,0)}function r(e){return(t,...i)=>e((()=>t(...i)))}var s=r(n?setImmediate:a?process.nextTick:o);function l(e){return u(e)?function(...t){const i=t.pop();return c(e.apply(this,t),i)}:i((function(t,i){var n;try{n=e.apply(this,t)}catch(e){return i(e)}if(n&&"function"==typeof n.then)return c(n,i);i(null,n)}))}function c(e,t){return e.then((e=>{d(t,null,e)}),(e=>{d(t,e&&e.message?e:new Error(e))}))}function d(e,t,i){try{e(t,i)}catch(e){s((e=>{throw e}),e)}}function u(e){return"AsyncFunction"===e[Symbol.toStringTag]}function p(e){if("function"!=typeof e)throw new Error("expected a function");return u(e)?l(e):e}function h(e){return function(t,...n){var a=i((function(i,n){var a=this;return e(t,((e,t)=>{p(e).apply(a,i.concat(t))}),n)}));return n.length?a.apply(this,n):a}}function f(e,t,i,n){t=t||[];var a=[],o=0,r=p(i);return e(t,((e,t,i)=>{var n=o++;r(e,((e,t)=>{a[n]=t,i(e)}))}),(e=>{n(e,a)}))}function m(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}const g={};function v(e){function t(...t){if(null!==e){var i=e;e=null,i.apply(this,t)}}return Object.assign(t,e),t}function b(e){if(m(e))return function(e){var t=-1,i=e.length;return function(){return++t<i?{value:e[t],key:t}:null}}(e);var t,i,n,a,o=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return o?function(e){var t=-1;return function(){var i=e.next();return i.done?null:(t++,{value:i.value,key:t})}}(o):(i=(t=e)?Object.keys(t):[],n=-1,a=i.length,function(){var e=i[++n];return n<a?{value:t[e],key:e}:null})}function y(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var i=e;e=null,i.apply(this,t)}}function x(e,t,i,n){let a=!1,o=!1,r=!1,s=0,l=0;function c(){s>=t||r||a||(r=!0,e.next().then((({value:e,done:t})=>{if(!o&&!a){if(r=!1,t)return a=!0,void(s<=0&&n(null));s++,i(e,l,d),l++,c()}})).catch(u))}function d(e,t){if(s-=1,!o)return e?u(e):!1===e?(a=!0,void(o=!0)):t===g||a&&s<=0?(a=!0,n(null)):void c()}function u(e){o||(r=!1,a=!0,n(e))}c()}var C=e=>(t,i,n)=>{if(n=v(n),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if("AsyncGenerator"===t[Symbol.toStringTag])return x(t,e,i,n);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return x(t[Symbol.asyncIterator](),e,i,n);var a=b(t),o=!1,r=!1,s=0,l=!1;function c(e,t){if(!r)if(s-=1,e)o=!0,n(e);else if(!1===e)o=!0,r=!0;else{if(t===g||o&&s<=0)return o=!0,n(null);l||d()}}function d(){for(l=!0;s<e&&!o;){var t=a();if(null===t)return o=!0,void(s<=0&&n(null));s+=1,i(t.value,t.key,y(c))}l=!1}d()};function w(e,t=e.length){if(!t)throw new Error("arity is undefined");function i(...i){return"function"==typeof i[t-1]?e.apply(this,i):new Promise(((n,a)=>{i[t-1]=(e,...t)=>{if(e)return a(e);n(t.length>1?t:t[0])},e.apply(this,i)}))}return Object.defineProperty(i,"name",{value:`awaitable(${e.name})`}),i}var E=w((function(e,t,i,n){return C(t)(e,p(i),n)}),4);function S(e,t,i){i=v(i);var n=0,a=0,{length:o}=e,r=!1;function s(e,t){!1===e&&(r=!0),!0!==r&&(e?i(e):++a!==o&&t!==g||i(null))}for(0===o&&i(null);n<o;n++)t(e[n],n,y(s))}function F(e,t,i){return E(e,1/0,t,i)}var T=w((function(e,t,i){return(m(e)?S:F)(e,p(t),i)}),3),A=w((function(e,t,i){return f(T,e,t,i)}),3),k=h(A),O=w((function(e,t,i){return E(e,1,t,i)}),3),I=w((function(e,t,i){return f(O,e,t,i)}),3),M=h(I);const _=Symbol("promiseCallback");function D(){let e,t;
2function i(i,...n){if(i)return t(i);e(n.length>1?n:n[0])}return i[_]=new Promise(((i,n)=>{e=i,t=n})),i}function R(e,t,i){"number"!=typeof t&&(i=t,t=null),i=v(i||D());var n=Object.keys(e).length;if(!n)return i(null);t||(t=n);var a={},o=0,r=!1,s=!1,l=Object.create(null),c=[],d=[],u={};function h(e,t){c.push((()=>function(e,t){if(!s){var n=y(((t,...n)=>{if(o--,!1!==t)if(n.length<2&&([n]=n),t){var c={};if(Object.keys(a).forEach((e=>{c[e]=a[e]})),c[e]=n,s=!0,l=Object.create(null),r)return;i(t,c)}else a[e]=n,(l[e]||[]).forEach((e=>e())),f();else r=!0}));o++;var c=p(t[t.length-1]);t.length>1?c(a,n):c(n)}}(e,t)))}function f(){if(!r){if(0===c.length&&0===o)return i(null,a);for(;c.length&&o<t;)c.shift()()}}function m(t){var i=[];return Object.keys(e).forEach((n=>{const a=e[n];Array.isArray(a)&&a.indexOf(t)>=0&&i.push(n)})),i}return Object.keys(e).forEach((t=>{var i=e[t];if(!Array.isArray(i))return h(t,[i]),void d.push(t);var n=i.slice(0,i.length-1),a=n.length;if(0===a)return h(t,i),void d.push(t);u[t]=a,n.forEach((o=>{if(!e[o])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+o+"` in "+n.join(", "));var r,s,c;s=()=>{0==--a&&h(t,i)},(c=l[r=o])||(c=l[r]=[]),c.push(s)}))})),function(){for(var e,t=0;d.length;)e=d.pop(),t++,m(e).forEach((e=>{0==--u[e]&&d.push(e)}));if(t!==n)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),f(),i[_]}var L=/^(?:async\s+)?(?:function)?\s*[^(]*\(\s*([^)]+)\s*\)(?:\s*{)/m,N=/^(?:async\s+)?\(?\s*([^)^=]+)\s*\)?(?:\s*=>)/m,P=/,/,V=/(=.+)?(\s*)$/,H=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function j(e,t){var i={};return Object.keys(e).forEach((t=>{var n,a=e[t],o=u(a),r=!o&&1===a.length||o&&0===a.length;if(Array.isArray(a))n=[...a],a=n.pop(),i[t]=n.concat(n.length>0?s:a);else if(r)i[t]=a;else{if(n=function(e){const t=e.toString().replace(H,"");let i=t.match(L);if(i||(i=t.match(N)),!i)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,n]=i;return n.replace(/\s/g,"").split(P).map((e=>e.replace(V,"").trim()))}(a),0===a.length&&!o&&0===n.length)throw new Error("autoInject task functions require explicit parameters.");o||n.pop(),i[t]=n.concat(s)}function s(e,t){var i=n.map((t=>e[t]));i.push(t),p(a)(...i)}})),R(i,t)}class z{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):B(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):B(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:i}=t;e(t)&&this.removeLink(t),t=i}return this}}function B(e,t){e.length=1,e.head=e.tail=t}const U=()=>{};function K(e,t,i){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var n=p(e),a=0,o=[],r=!1;function l(e,t,i){if(null!=i&&"function"!=typeof i)throw new Error("task callback must be a function");if(u.started=!0,Array.isArray(e)||(e=[e]),0===e.length&&u.idle())return s((()=>u.drain()));for(var n=0,a=e.length;n<a;n++){var o={data:e[n],callback:i||U};t?u._tasks.unshift(o):u._tasks.push(o)}r||(r=!0,s((()=>{r=!1,u.process()})))}function c(e){return function(t,...i){a-=1;for(var n=0,r=e.length;n<r;n++){var s=e[n],l=o.indexOf(s);0===l?o.shift():l>0&&o.splice(l,1),s.callback(t,...i),null!=t&&u.error(t,s.data)}a<=u.concurrency-u.buffer&&u.unsaturated(),u.idle()&&u.drain(),u.process()}}var d=!1,u={_tasks:new z,*[Symbol.iterator](){yield*u._tasks[Symbol.iterator]()},concurrency:t,payload:i,saturated:U,unsaturated:U,buffer:t/4,empty:U,drain:U,error:U,started:!1,paused:!1,push(e,t){l(e,!1,t)},kill(){u.drain=U,u._tasks.empty()},unshift(e,t){l(e,!0,t)},remove(e){u._tasks.remove(e)},process(){if(!d){for(d=!0;!u.paused&&a<u.concurrency&&u._tasks.length;){var e=[],t=[],i=u._tasks.length;u.payload&&(i=Math.min(i,u.payload));for(var r=0;r<i;r++){var s=u._tasks.shift();e.push(s),o.push(s),t.push(s.data)}a+=1,0===u._tasks.length&&u.empty(),a===u.concurrency&&u.saturated();var l=y(c(e));n(t,l)}d=!1}},length:()=>u._tasks.length,running:()=>a,workersList:()=>
2o,idle:()=>u._tasks.length+a===0,pause(){u.paused=!0},resume(){!1!==u.paused&&(u.paused=!1,s(u.process))}};return u}function W(e,t){return K(e,1,t)}function q(e,t,i){return K(e,t,i)}var J=w((function(e,t,i,n){n=v(n);var a=p(i);return O(e,((e,i,n)=>{a(t,e,((e,i)=>{t=i,n(e)}))}),(e=>n(e,t)))}),4);function G(...e){var t=e.map(p);return function(...e){var i=this,n=e[e.length-1];return"function"==typeof n?e.pop():n=D(),J(t,e,((e,t,n)=>{t.apply(i,e.concat(((e,...t)=>{n(e,t)})))}),((e,t)=>n(e,...t))),n[_]}}function Q(...e){return G(...e.reverse())}var Y=w((function(e,t,i,n){return f(C(t),e,i,n)}),4),$=w((function(e,t,i,n){var a=p(i);return Y(e,t,((e,t)=>{a(e,((e,...i)=>e?t(e):t(null,i)))}),((e,t)=>{for(var i=[],a=0;a<t.length;a++)t[a]&&(i=i.concat(...t[a]));return n(e,i)}))}),4),Z=w((function(e,t,i){return $(e,1/0,t,i)}),3),X=w((function(e,t,i){return $(e,1,t,i)}),3);function ee(...e){return function(...t){return t.pop()(null,...e)}}function te(e,t){return(i,n,a,o)=>{var r,s=!1;const l=p(a);i(n,((i,n,a)=>{l(i,((n,o)=>n?a(n):e(o)&&!r?(s=!0,r=t(!0,i),a(null,g)):void a()))}),(e=>{if(e)return o(e);o(null,s?r:t(!1))}))}}var ie=w((function(e,t,i){return te((e=>e),((e,t)=>t))(T,e,t,i)}),3),ne=w((function(e,t,i,n){return te((e=>e),((e,t)=>t))(C(t),e,i,n)}),4),ae=w((function(e,t,i){return te((e=>e),((e,t)=>t))(C(1),e,t,i)}),3);function oe(e){return(t,...i)=>p(t)(...i,((t,...i)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&i.forEach((t=>console[e](t))))}))}var re=oe("dir"),se=w((function(e,t,i){i=y(i);var n,a=p(e),o=p(t);function r(e,...t){if(e)return i(e);!1!==e&&(n=t,o(...t,s))}function s(e,t){return e?i(e):!1!==e?t?void a(r):i(null,...n):void 0}return s(null,!0)}),3);function le(e,t,i){const n=p(t);return se(e,((...e)=>{const t=e.pop();n(...e,((e,i)=>t(e,!i)))}),i)}function ce(e){return(t,i,n)=>e(t,n)}var de=w((function(e,t,i){return T(e,ce(p(t)),i)}),3),ue=w((function(e,t,i,n){return C(t)(e,ce(p(i)),n)}),4),pe=w((function(e,t,i){return ue(e,1,t,i)}),3);function he(e){return u(e)?e:function(...t){var i=t.pop(),n=!0;t.push(((...e)=>{n?s((()=>i(...e))):i(...e)}
2)),e.apply(this,t),n=!1}}var fe=w((function(e,t,i){return te((e=>!e),(e=>!e))(T,e,t,i)}),3),me=w((function(e,t,i,n){return te((e=>!e),(e=>!e))(C(t),e,i,n)}),4),ge=w((function(e,t,i){return te((e=>!e),(e=>!e))(O,e,t,i)}),3);function ve(e,t,i,n){var a=new Array(t.length);e(t,((e,t,n)=>{i(e,((e,i)=>{a[t]=!!i,n(e)}))}),(e=>{if(e)return n(e);for(var i=[],o=0;o<t.length;o++)a[o]&&i.push(t[o]);n(null,i)}))}function be(e,t,i,n){var a=[];e(t,((e,t,n)=>{i(e,((i,o)=>{if(i)return n(i);o&&a.push({index:t,value:e}),n()}))}),(e=>{if(e)return n(e);n(null,a.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function ye(e,t,i,n){return(m(t)?ve:be)(e,t,p(i),n)}var xe=w((function(e,t,i){return ye(T,e,t,i)}),3),Ce=w((function(e,t,i,n){return ye(C(t),e,i,n)}),4),we=w((function(e,t,i){return ye(O,e,t,i)}),3),Ee=w((function(e,t){var i=y(t),n=p(he(e));return function e(t){if(t)return i(t);!1!==t&&n(e)}()}),2),Se=w((function(e,t,i,n){var a=p(i);return Y(e,t,((e,t)=>{a(e,((i,n)=>i?t(i):t(null,{key:n,val:e})))}),((e,t)=>{for(var i={},{hasOwnProperty:a}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:r}=t[o],{val:s}=t[o];a.call(i,r)?i[r].push(s):i[r]=[s]}return n(e,i)}))}),4);function Fe(e,t,i){return Se(e,1/0,t,i)}function Te(e,t,i){return Se(e,1,t,i)}var Ae=oe("log"),ke=w((function(e,t,i,n){n=v(n);var a={},o=p(i);return C(t)(e,((e,t,i)=>{o(e,t,((e,n)=>{if(e)return i(e);a[t]=n,i()}))}),(e=>n(e,a)))}),4);function Oe(e,t,i){return ke(e,1/0,t,i)}function Ie(e,t,i){return ke(e,1,t,i)}function Me(e,t=(e=>e)){var n=Object.create(null),a=Object.create(null),o=p(e),r=i(((e,i)=>{var r=t(...e);r in n?s((()=>i(null,...n[r]))):r in a?a[r].push(i):(a[r]=[i],o(...e,((e,...t)=>{e||(n[r]=t);var i=a[r];delete a[r];for(var o=0,s=i.length;o<s;o++)i[o](e,...t)})))}));return r.memo=n,r.unmemoized=e,r}var _e=r(a?process.nextTick:n?setImmediate:o),De=w(((e,t,i)=>{var n=m(t)?[]:{};e(t,((e,t,i)=>{p(e)(((e,...a)=>{a.length<2&&([a]=a),n[t]=a,i(e)}))}),(e=>i(e,n)))}),3);function Re(e,t){return De(T,e,t)}function Le(e,t,i){return De(C(t),e,i)}function Ne(e,t){var i=p(e);return K(((e,t)=>{i(e[0],t)}),t,1)}function Pe(e,t){var i=Ne(e,t);return i.push=function(e,t=0,n=(()=>{})){if("function"!=typeof n)throw new Error("task callback must be a function");if(i.started=!0,Array.isArray(e)||(e=[e]),0===e.length)return s((()=>i.drain()));for(var a=i._tasks.head;a&&t>=a.priority;)a=a.next;for(var o=0,r=e.length;o<r;o++){var l={data:e[o],priority:t,callback:n};a?i._tasks.insertBefore(a,l):i._tasks.push(l)}s(i.process)},delete i.unshift,i}var Ve=w((function(e,t){if(t=v(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var i=0,n=e.length;i<n;i++)p(e[i])(t)}),2);function He(e,t,i,n){var a=[...e].reverse();return J(a,t,i,n)}function je(e){var t=p(e);return i((function(e,i){return e.push(((e,...t)=>{if(e)return i(null,{error:e});var n=t;t.length<=1&&([n]=t),i(null,{value:n})})),t.apply(this,e)}))}function ze(e){var t;return Array.isArray(e)?t=e.map(je):(t={},Object.keys(e).forEach((i=>{t[i]=je.call(this,e[i])}))),t}function Be(e,t,i,n){const a=p(i);return ye(e,t,((e,t)=>{a(e,((e,i)=>{t(e,!i)}))}),n)}var Ue=w((function(e,t,i){return Be(T,e,t,i)}),3),Ke=w((function(e,t,i,n){return Be(C(t),e,i,n)}),4),We=w((function(e,t,i){return Be(O,e,t,i)}),3);function qe(e){return function(){return e}}function Je(e,t,i){var n={times:5,intervalFunc:qe(0)};if(arguments.length<3&&"function"==typeof e?(i=t||D(),t=e):(Ge(n,e),i=i||D()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var a=p(t),o=1;function r(){a(((e,...t)=>{!1!==e&&(e&&o++<n.times&&("function"!=typeof n.errorFilter||n.errorFilter(e))?setTimeout(r,n.intervalFunc(o)):i(e,...t))}))}return r(),i[_]}function Ge(e,t){if("object"==typeof t)e.times=+t.times||5,e.intervalFunc="function"==typeof t.interval?t.interval:qe(+t.interval||0),e.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");e.times=+t||5}}function Qe(e,t){t||(t=e,e=null);let n=e&&e.arity||t.length;u(t)&&(n+=1);var a=p(t);return i(((t,i)=>{function o(e){a(...t,e)}return(t.length<n-1||null==i)&&(t.push(i),i=D()),e?Je(e,o,i):Je(o,i),i[_]}))}function Ye(e,t){return De(O,e,t)}var $e=w((function(e,t,i){return te(Boolean,(e=>e))(T,e,t,i)}),3),Ze=w((function(e,t,i,n){return te(Boolean,(e=>e))(C(t),e,i,n)}),4),Xe=w((function(e,t,i){return te(Boolean,(e=>e))(O,e,t,i)}),3),et=w((function(e,t,i){var n=p(t);return A(e,((e,t)=>
2{n(e,((i,n)=>{if(i)return t(i);t(null,{value:e,criteria:n})}))}),((e,t)=>{if(e)return i(e);i(null,t.sort(a).map((e=>e.value)))}));function a(e,t){var i=e.criteria,n=t.criteria;return i<n?-1:i>n?1:0}}),3);function tt(e,t,n){var a=p(e);return i(((i,o)=>{var r,s=!1;i.push(((...e)=>{s||(o(...e),clearTimeout(r))})),r=setTimeout((function(){var t=e.name||"anonymous",i=new Error('Callback function "'+t+'" timed out.');i.code="ETIMEDOUT",n&&(i.info=n),s=!0,o(i)}),t),a(...i)}))}function it(e,t,i,n){var a=p(i);return Y(function(e){for(var t=Array(e);e--;)t[e]=e;return t}(e),t,a,n)}function nt(e,t,i){return it(e,1/0,t,i)}function at(e,t,i){return it(e,1,t,i)}function ot(e,t,i,n){arguments.length<=3&&"function"==typeof t&&(n=i,i=t,t=Array.isArray(e)?[]:{}),n=v(n||D());var a=p(i);return T(e,((e,i,n)=>{a(t,e,i,n)}),(e=>n(e,t))),n[_]}var rt=w((function(e,t){var i,n=null;return pe(e,((e,t)=>{p(e)(((e,...a)=>{a.length<2?[i]=a:i=a,n=e,t(e?null:{})}))}),(()=>t(n,i)))}));function st(e){return(...t)=>(e.unmemoized||e)(...t)}var lt=w((function(e,t,i){i=y(i);var n,a=p(t),o=p(e);function r(e,...t){if(e)return i(e);n=t,!1!==e&&o(s)}function s(e,t){return e?i(e):!1!==e?t?void a(r):i(null,...n):void 0}return o(s)}),3);function ct(e,t,i){const n=p(e);return lt((e=>n(((t,i)=>e(t,!i)))),t,i)}var dt=w((function(e,t){if(t=v(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var i=0;function n(t){p(e[i++])(...t,y(a))}function a(a,...o){if(!1!==a)return a||i===e.length?t(a,...o):void n(o)}n([])})),ut={apply:t,applyEach:k,applyEachSeries:M,asyncify:l,auto:R,autoInject:j,cargo:W,cargoQueue:q,compose:Q,concat:Z,concatLimit:$,concatSeries:X,constant:ee,detect:ie,detectLimit:ne,detectSeries:ae,dir:re,doUntil:le,doWhilst:se,each:de,eachLimit:ue,eachOf:T,eachOfLimit:E,eachOfSeries:O,eachSeries:pe,ensureAsync:he,every:fe,everyLimit:me,everySeries:ge,filter:xe,filterLimit:Ce,filterSeries:we,forever:Ee,groupBy:Fe,groupByLimit:Se,groupBySeries:Te,log:Ae,map:A,mapLimit:Y,mapSeries:I,mapValues:Oe,mapValuesLimit:ke,mapValuesSeries:Ie,memoize:Me,nextTick:_e,parallel:Re,parallelLimit:Le,priorityQueue:Pe,queue:Ne,race:Ve,reduce:J,reduceRight:He,reflect:je,reflectAll:ze,reject:Ue,rejectLimit:Ke,rejectSeries:We,retry:Je,retryable:Qe,seq:G,series:Ye,setImmediate:s,some:$e,someLimit:Ze,someSeries:Xe,sortBy:et,timeout:tt,times:nt,timesLimit:it,timesSeries:at,transform:ot,tryEach:rt,unmemoize:st,until:ct,waterfall:dt,whilst:lt,all:fe,allLimit:me,allSeries:ge,any:$e,anyLimit:Ze,anySeries:Xe,find:ie,findLimit:ne,findSeries:ae,forEach:de,forEachSeries:pe,forEachLimit:ue,forEachOf:T,forEachOfSeries:O,forEachOfLimit:E,inject:J,foldl:J,foldr:He,select:xe,selectLimit:Ce,selectSeries:we,wrapSync:l,during:lt,doDuring:se},pt=e;pt.default=ut,pt.apply=t,pt.applyEach=k,pt.applyEachSeries=M,pt.asyncify=l,pt.auto=R,pt.autoInject=j,pt.cargo=W,pt.cargoQueue=q,pt.compose=Q,pt.concat=Z,pt.concatLimit=$,pt.concatSeries=X,pt.constant=ee,pt.detect=ie,pt.detectLimit=ne,pt.detectSeries=ae,pt.dir=re,pt.doUntil=le,pt.doWhilst=se,pt.each=de,pt.eachLimit=ue,pt.eachOf=T,pt.eachOfLimit=E,pt.eachOfSeries=O,pt.eachSeries=pe,pt.ensureAsync=he,pt.every=fe,pt.everyLimit=me,pt.everySeries=ge,pt.filter=xe,pt.filterLimit=Ce,pt.filterSeries=we,pt.forever=Ee,pt.groupBy=Fe,pt.groupByLimit=Se,pt.groupBySeries=Te,pt.log=Ae,pt.map=A,pt.mapLimit=Y,pt.mapSeries=I,pt.mapValues=Oe,pt.mapValuesLimit=ke,pt.mapValuesSeries=Ie,pt.memoize=Me,pt.nextTick=_e,pt.parallel=Re,pt.parallelLimit=Le,pt.priorityQueue=Pe,pt.queue=Ne,pt.race=Ve,pt.reduce=J,pt.reduceRight=He,pt.reflect=je,pt.reflectAll=ze,pt.reject=Ue,pt.rejectLimit=Ke,pt.rejectSeries=We,pt.retry=Je,pt.retryable=Qe,pt.seq=G,pt.series=Ye,pt.setImmediate=s,pt.some=$e,pt.someLimit=Ze,pt.someSeries=Xe,pt.sortBy=et,pt.timeout=tt,pt.times=nt,pt.timesLimit=it,pt.timesSeries=at,pt.transform=ot,pt.tryEach=rt,pt.unmemoize=st,pt.until=ct,pt.waterfall=dt,pt.whilst=lt,pt.all=fe,pt.allLimit=me,pt.allSeries=ge,pt.any=$e,pt.anyLimit=Ze,pt.anySeries=Xe,pt.find=ie,pt.findLimit=ne,pt.findSeries=ae,pt.forEach=de,pt.forEachSeries=pe,pt.forEachLimit=ue,pt.forEachOf=T,pt.forEachOfSeries=O,pt.forEachOfLimit=E,pt.inject=J,pt.foldl=J,pt.foldr=He,pt.select=xe,pt.selectLimit=Ce,pt.selectSeries=we,pt.wrapSync=l,pt.during=lt,pt.doDuring=se}(),function(e){var t,i=e.alpaca;i.listenerId=(t=0,function(){return"listener-"+t++}),i.subscribe=function(){var e=i.makeArray(arguments),t=null,n=null,a=null;if(2==e.length?(t="global",n=e.shift(),a=e.shift()):(t=e.shift(),n=e.shift(),a=e.shift()),n&&i.isObject(n)&&(n=n.path),!n)return i.logError("Missing observable subscribe id: "+n),null;var o=a._lfid;o||(o=i.listenerId(),a._lfid=o);var r,s=(r=this,function(){return a.apply(r,arguments)});s._lfid=a._lfid;var l=i.ScopedObservables.get(t),c=l.observable(n);return c.subscribe(o,s),{scope:t,id:n,listenerId:o}},i.unsubscribe=function(){var e=i.makeArray(arguments),t=null,n=null,a=null;2==e.length?(t="global",n=e.shift(),a=e.shift()):3==e.length&&(t=e.shift(),n=e.shift(),a=e.shift());var o=a;if(i.isFunction(o)&&(o=o._lfid),n&&i.isObject(n)&&(n=n.path),!n)return i.logError("Missing observable id: "+n),null;var r=i.ScopedObservables.get(t),s=r.observable(n);return s.unsubscribe(o),{scope:t,id:n,listenerId:o}},i.observable=function(){var e,t,n=i.makeArray(arguments);if(1==n.length?(e="global",t=n.shift()):2==n.length&&(e=n.shift(),t=n.shift()),t&&i.isObject(t)&&(t=t.path),t){var a=i.ScopedObservables.get(e);observable=a.observable(t)}else i.logError("Missing observable id: "+JSON.stringify(n));return observable},i.clearObservable=function(){var e,t,n=i.makeArray(arguments);1==n.length?(e="global",t=n.shift()):2==n.length&&(e=n.shift(),t=n.shift()),t&&i.isObject(t)&&(t=t.path),t||i.logError("Missing observable id: "+JSON.stringify(n));var a=i.ScopedObservables.get(e),o=a.observable(t);o.clear()},i.dependentObservable=function(){var e=null,t=null,n=null,a=i.makeArray(arguments);if(2==a.length)e="global",t=a.shift(),n=a.shift();else{if(3!=a.length)return void i.error("Wrong number of arguments");e=a.shift(),t=a.shift(),n=a.shift()}t&&i.isObject(t)&&(t=t.path),t||i.logError("Missing observable id: "+JSON.stringify(a));var o=i.ScopedObservables.get(e);return o.dependentObservable(t,n)}}(jQuery),function(e){var t=e.alpaca;t.Observables=Base.extend({constructor:function(e){this.base(),this.scope=e,this.observables={}},observable:function(e,i){if(!this.observables[e]){var n=new t.Observable(this.scope,e);i&&n.set(i),this.observables[e]=n}return this.observables[e]},dependentObservable:function(e,i){var n=this;if(!this.observables[e]){var a=this.observable(e),o=new t.Observables(this.scope);o.observable=function(e,t){var i=n.observable(e,t);return i.markDependentOnUs(a),i},a.setValueFunction((function(){return i.call(o)}
vendor: 35,593 bytes, line 2
2))}return this.observables[e]},observables:function(){return this.observables}})}(jQuery),function(e){e.alpaca.Observable=Base.extend({constructor:function(t,i){this.base(),this.id=t+"-"+i,this.value=null,this.subscribers={},this.dependentOnUs={},this.notifySubscribers=function(t){var i=this;e.each(this.subscribers,(function(e,n){n(i.value,t)}))},this.notifyDependents=function(t){e.each(this.dependentOnUs,(function(e,t){t.onDependencyChange()}))},this.valueFunction=null},setValueFunction:function(e){this.valueFunction=e,this.onDependencyChange()},subscribe:function(e,t){this.isSubscribed(e)||(this.subscribers[e]=t)},unsubscribe:function(e){delete this.subscribers[e]},isSubscribed:function(e){return!!this.subscribers[e]},markDependentOnUs:function(e){this.dependentOnUs[e.id]=e},onDependencyChange:function(){var e=this.get();if(this.valueFunction){var t=this.valueFunction();e!=t&&this.set(t)}},set:function(e){var t=this.value;this.value=e,this.notifyDependents(t),this.notifySubscribers(t)},get:function(e){var t=this.value;return t||(t=e),t},clear:function(){var e=this.value;delete this.value,this.notifyDependents(e),this.notifySubscribers(e)}})}(jQuery),function(e){var t=e.alpaca;t.ScopedObservables={},t.ScopedObservables.map={},t.ScopedObservables.get=function(e){return t.ScopedObservables.map[e]||(t.ScopedObservables.map[e]=new t.Observables(e)),t.ScopedObservables.map[e]}}(jQuery),Alpaca.TemplateEngineRegistry=(registry={},{register:function(e,t){registry[e]=t,t.init()},find:function(e){var t=null;if(registry[e])t=registry[e];else for(var i in registry)for(var n=registry[i].supportedMimetypes(),a=0;a<n.length;a++)if(e.toLowerCase()===n[a].toLowerCase()){t=registry[i];break}return t},ids:function(){var e=[];for(var t in registry)e.push(t);return e}}),function(e){Alpaca.AbstractTemplateEngine=Base.extend({constructor:function(t){this.base(),this.id=t,this.cleanup=function(t){return t&&1===e(t).length&&"script"===e(t)[0].nodeName.toLowerCase()?e(t).html():t}},compile:function(t,i,n,a){var o=this,r="html";if(Alpaca.isString(i)){var s=i.toLowerCase();Alpaca.isUri(s)?r="uri":0!==i.indexOf("#")&&0!==i.indexOf(".")&&0!==i.indexOf("[")||(r="selector")}if("selector"===r)o._compile(t,i,(function(e){a(e)}));else if("uri"===r){var l=o.fileExtension(),c=i;-1===c.indexOf("."+l)&&(c+="."+l),n.loadTemplate(c,(function(e){e=o.cleanup(e),o._compile(t,e,(function(e){a(e)}))}),(function(e){a(e)}))}else if("html"===r){var d=i;d instanceof jQuery&&(d=e(d).outerHTML()),o._compile(t,d,(function(e){a(e)}))}else a(new Error("Template engine cannot determine how to handle type: "+r))},_compile:function(e,t,i){Alpaca.isEmpty(t)&&(t=""),0===(t=Alpaca.trim(t)).toLowerCase().indexOf("<script")||(t="<script type='"+this.supportedMimetypes()[0]+"'>"+t+"<\/script>"),Alpaca.logDebug("Compiling template: "+this.id+", cacheKey: "+e+", template: "+t),this.doCompile(e,t,i)},doCompile:function(e,t,i){},execute:function(e,t,i){Alpaca.logDebug("Executing template for cache key: "+e);var n=this.doExecute(e,t,i);return n=this.cleanup(n)},doExecute:function(e,t,i){return null},fileExtension:function(){return"html"},supportedMimetypes:function(){return[]},isCached:function(e){return!1},findCacheKeys:function(e){return[]}})}(jQuery),function($,Handlebars,HandlebarsPrecompiled){var COMPILED_TEMPLATES={},helpers={compare:function(e,t,i){if(arguments.length<3)throw new Error("Handlerbars Helper 'compare' needs 2 parameters");var n=i.hash.operator||"==",a={"==":function(e,t){return e==t},"===":function(e,t){return e===t},"!=":function(e,t){return e!=t},"!==":function(e,t){return e!==t},"<":function(e,t){return e<t},">":function(e,t){return e>t},"<=":function(e,t){return e<=t},">=":function(e,t){return e>=t},typeof:function(e,t){return typeof e==t}};if(!a[n])throw new Error("Handlerbars Helper 'compare' doesn't know the operator "+n);var o=a[n](e,t);return o?i.fn(this):i.inverse(this)},ifnot:function(e,t){return e?t.inverse(this):t.fn(this)},times:function(e,t){for(var i="",n=0;n<e;++n)i+=t.fn(n);return i},control:function(e){return"<div class='"+Alpaca.MARKER_CLASS_CONTROL_FIELD+"'></div>"},container:function(e){return"<div class='"+Alpaca.MARKER_CLASS_CONTAINER_FIELD+"'></div>"},item:function(e,t){return Alpaca.isObject(e)&&(e="div"),"<"+e+" class='"+Alpaca.MARKER_CLASS_CONTAINER_FIELD_ITEM+"' "+Alpaca.MARKER_DATA_CONTAINER_FIELD_ITEM_KEY+"='"+this.name+"'></"+e+">"},itemField:function(e,t){return Alpaca.isObject(e)&&(e="div"),"<"+e+" class='"+Alpaca.MARKER_CLASS_CONTAINER_FIELD_ITEM_FIELD+"'></"+e+">"},formItems:function(e){return"<div class='"+Alpaca.MARKER_CLASS_FORM_ITEMS_FIELD+"'></div>"},insert:function(e){return"<div class='"+Alpaca.MARKER_CLASS_INSERT+"' "+Alpaca.MARKER_DATA_INSERT_KEY+"='"+e+"'></div>"},str:function(e){return!1===e?"false":!0===e?"true":0===e?"0":null==e?"":Alpaca.isString(e)||Alpaca.isNumber(e)?e:Alpaca.isObject(e)||Alpaca.isArray(e)?JSON.stringify(e,null," "):e},arrayToolbar:function(e){return"<div class='"+Alpaca.MARKER_CLASS_ARRAY_TOOLBAR+"' "+Alpaca.MARKER_DATA_ARRAY_TOOLBAR_FIELD_ID+"='"+this.id+"'></div>"},arrayActionbar:function(e){var t="<div class='"+Alpaca.MARKER_CLASS_ARRAY_ITEM_ACTIONBAR+"' "+Alpaca.MARKER_DATA_ARRAY_ITEM_KEY+"='"+this.name+"'";return t+=" "+Alpaca.MARKER_DATA_ARRAY_ITEM_FIELD_ID+"='"+this.id+"'",this.parentFieldId&&(t+=" "+Alpaca.MARKER_DATA_ARRAY_ITEM_PARENT_FIELD_ID+"='"+this.parentFieldId+"'"),t+="></div>"},showMessage:function(e,t){var i=e;if(e&&0===e.indexOf("msg:")){i=e=e.substring(4);var n=Alpaca.externalMessage(e);n&&(i=n)}return new Handlebars.SafeString(i)}};Handlebars.registerHelper("arrayToolbar",helpers.arrayToolbar),Handlebars.registerHelper("arrayActionbar",helpers.arrayActionbar),Handlebars.registerHelper("setIndex",(function(e){this.index=Number(e)})),Handlebars.registerHelper("eachProperty",(function(e,t){var i="";for(var n in e)i+=t.fn({key:n,value:e[n]});return i})),Handlebars.registerHelper("uploadErrorMessage",(function(e){var t=e;return 1===e?t="File exceeds upload_max_filesize":2===e?t="File exceeds MAX_FILE_SIZE":3===e?t="File was only partially uploaded":4===e?t="No File was uploaded":5===e?t="Missing a temporary folder":6===e?t="Failed to write file to disk":7===e?t="File upload stopped by extension":"maxFileSize"===e?t="File is too big":"minFileSize"===e?t="File is too small":"acceptFileTypes"===e?t="Filetype not allowed":"maxNumberOfFiles"===e?t="Max number of files exceeded":"uploadedBytes"===e?t="Uploaded bytes exceed file size":"emptyResult"===e&&(t="Empty file upload result"),t})),Handlebars.registerHelper("disguise",(function(e,t){for(var i="",n=0;n<e.length;n++)i+=t;return i})),Handlebars.registerHelper("compare",helpers.compare),Handlebars.registerHelper("control",helpers.control),Handlebars.registerHelper("container",helpers.container),Handlebars.registerHelper("item",helpers.item),Handlebars.registerHelper("itemField",helpers.itemField),Handlebars.registerHelper("formItems",helpers.formItems),Handlebars.registerHelper("times",helpers.times),Handlebars.registerHelper("str",helpers.str),Handlebars.registerHelper("with",(function(e,t){return t.fn(e)})),Handlebars.registerHelper("ifnot",helpers.ifnot),Handlebars.registerHelper("showMessage",helpers.showMessage),Alpaca.HandlebarsTemplateEngine=Alpaca.AbstractTemplateEngine.extend({fileExtension:function(){return"html"},supportedMimetypes:function(){return["text/x-handlebars-template","text/x-handlebars-tmpl"]},init:function(){if(HandlebarsPrecompiled)for(var e in HandlebarsPrecompiled){var t=HandlebarsPrecompiled[e];for(var i in t){var n=t[i];if("function"==typeof n){var a=Alpaca.makeCacheKey(e,"view",e,i);COMPILED_TEMPLATES[a]=n}}}},doCompile:function(cacheKey,html,callback){var self=this,template=null;try{var functionString=Handlebars.precompile(html);template=eval("("+functionString+")"),template=Handlebars.template(template),COMPILED_TEMPLATES[cacheKey]=template}catch(e){return callback(e)}callback()},doExecute:function(e,t,i){var n=COMPILED_TEMPLATES[e];if(n){var a=null;try{a=n(t)}catch(e){return i(e),null}return a}i(new Error("Could not find handlebars cached template for key: "+e))},isCached:function(e){return!!COMPILED_TEMPLATES[e]},findCacheKeys:function(e){var t=[];for(var i in COMPILED_TEMPLATES)0===i.indexOf(e+":")&&t.push(i);return t}}),Alpaca.TemplateEngineRegistry.register("handlebars",new Alpaca.HandlebarsTemplateEngine("handlebars"))}(jQuery,void 0!==Handlebars?Handlebars:window.Handlebars,"undefined"!=typeof HandlebarsPrecompiled?HandlebarsPrecompiled:window.HandlebarsPrecompiled),function(e){var t=e.alpaca;t.NormalizedView=Base.extend({constructor:function(e){this.id=e},normalize:function(e){var i=e[this.id];if(!i)return t.logError("View compilation failed - view not found: "+this.id),!1;for(var n=[],a=i;a;){n.push(a);var o=a.parent;if(o){var r=e[a.parent];if(!r)return t.logError("View compilation failed - cannot find parent view: "+o+" for view: "+a.id),!1;a=r}else a=null}n=n.reverse();for(var s=function(e,i,n){var a=i[n],o=e[n];t.isUndefined(o)||t.isUndefined(a)||t.logDebug("View property: "+n+" already has value: "+o+" and overwriting to: "+a),t.isUndefined(a)||(e[n]=a)},l=function(e,i,n){var a=i[n],o=e[n];t.isUndefined(o)||t.isUndefined(a)||t.logDebug("View property: "+n+" already has function, overwriting"),t.isUndefined(a)||(e[n]=a)},c=function(e,i,n){var a=i[n];a&&(e[n]||(e[n]={}),t.mergeObject2(a,e[n]))},d=0;d<n.length;d++){var u=n[d];s(this,u,"type"),s(this,u,"ui"),s(this,u,"displayReadonly"),s(this,u,"locale"),l(this,u,"render"),l(this,u,"postRender"),c(this,u,"templates"),c(this,u,"fields"),c(this,u,"layout"),c(this,u,"styles"),c(this,u,"callbacks"),c(this,u,"messages"),s(this,u,"horizontal"),s(this,u,"collapsible"),s(this,u,"legendStyle"),s(this,u,"toolbarStyle"),s(this,u,"buttonStyle"),s(this,u,"toolbarSticky"),s(this,u,"globalTemplate"),c(this,u,"wizard")}return t.logDebug("View compilation complete for view: "+this.id),t.logDebug("Final view: "),t.logDebug(JSON.stringify(this,null," ")),!0}})}(jQuery),function(e){var t=e.alpaca;t.RuntimeView=Base.extend({constructor:function(e,t){this.field=t,this.setView(e)},setView:function(e){e||(e="web-edit");var i=t.getNormalizedView(e);if(!i)throw new Error("Runtime view for view id: "+e+" could not find a normalized view");for(var n in i)i.hasOwnProperty(n)&&(this[n]=i[n])},getWizard:function(){return this.getViewParam("wizard")},getGlobalTemplateDescriptor:function(){return this.getTemplateDescriptor("globalTemplate")},getLayout:function(){return{templateDescriptor:this.getTemplateDescriptor("layoutTemplate",this),bindings:this.getViewParam(["layout","bindings"],!0)}},getTemplateDescriptor:function(e,i){return t.getTemplateDescriptor(this,e,i)},getMessage:function(e,i){i||(i=t.defaultLocale);var n=this.getViewParam(["messages",i,e]);return t.isEmpty(n)&&(n=this.getViewParam(["messages",e])),n},getViewParam:function(e,i){var n=this.field.path;if(this.fields&&this.fields[n]){var a=this._getConfigVal(this.fields[n],e);if(!t.isEmpty(a))return a}if(n&&-1!==n.indexOf("[")&&-1!==n.indexOf("]")){var o=n.replace(/\[\d+\]/g,"[*]");if(this.fields&&this.fields[o]&&(a=this._getConfigVal(this.fields[o],e),!t.isEmpty(a)))return a}return n&&-1!==n.indexOf("[")&&-1!==n.indexOf("]")&&(o=n.replace(/\[\d+\]/g,""),this.fields&&this.fields[o]&&(a=this._getConfigVal(this.fields[o],e),!t.isEmpty(a)))?a:!t.isEmpty(i)&&i&&"/"!==this.field.path?null:this._getConfigVal(this,e)},_getConfigVal:function(e,i){if(t.isArray(i))for(var n=0;n<i.length&&!t.isEmpty(e);n++)e=e[i[n]];else t.isEmpty(e)||(e=e[i]);return e},fireCallback:function(e,t,i,n,a,o,r){this.callbacks&&this.callbacks[t]&&this.callbacks[t].call(e,i,n,a,o,r)},applyStyle:function(t,i){var n=i;n&&n.getFieldEl&&(n=n.getFieldEl()),n&&this.styles&&this.styles[t]&&e(n).addClass(this.styles[t])},getStyle:function(e){return this.styles[e]?this.styles[e]:""}})}(jQuery),function(e){var t=e.alpaca;t.Field=Base.extend({constructor:function(e,i,n,a,o,r,s){var l=this;if(this.initializing=!0,this.domEl=e,this.parent=null,this.data=i,this.options=n,this.schema=a,this.connector=r,this.errorCallback=function(e){s?s(e):t.defaultErrorCallback.call(l,e)},this.singleLevelRendering=!1,this.view=new t.RuntimeView(o,this),this.options||(this.options={}),this.id=this.options.id,this.type=this.options.type,this.id||(this.id=t.generateId()),this.schema||(this.schema={}),this.options.label||null===this.schema.title||(this.options.label=this.schema.title),this.options.helpers||(this.options.helpers=[]),this.options.helper){if(t.isArray(this.options.helper))for(var c=0;c<this.options.helper.length;c++)this.options.helpers.push(this.options.helper[c]);else this.options.helpers.push(this.options.helper);delete this.options.helper}this.options.helpersPosition||(this.options.helpersPosition=this.options.helperPosition),this.options.helpersPosition||(this.options.helpersPosition=t.defaultHelpersPosition),t.isEmpty(this.options.readonly)&&!t.isEmpty(this.schema.readonly)&&(this.options.readonly=this.schema.readonly),void 0===this.schema.default&&void 0!==this.options.default&&(this.schema.default=this.options.default,delete this.options.default),t.isValEmpty(this.data)&&!t.isEmpty(this.schema.default)&&(this.data=this.schema.default,this.showingDefaultData=!0),this.path="/",this.validation={},this._events={},this.isDisplayOnly=function(){return"view"===l.view.type||"display"==l.view.type},this.schema&&this.schema.id&&0===this.schema.id.indexOf("#")&&(this.schema.id=this.schema.id.substring(1)),this._previouslyValidated=!1,this.updateObservable=function(){this.getValue()?this.observable(this.path).set(this.getValue()):this.observable(this.path).clear()},this.getObservableScope=function(){for(var e=this;!e.isTop();)e=e.parent;var t=e.observableScope;return t||(t="global"),t},this.ensureProperType=function(e){var i=this,n=function(e,i){return t.isString(e)?"number"===i?e=parseFloat(e):"integer"===i?e=parseInt(e):"boolean"===i&&(e=""!==e&&"false"!==e.toLowerCase()):t.isNumber(e)&&("string"===i?e=""+e:"boolean"===i&&(e=-1!==e&&0!==e)),e};if(void 0!==e)if(t.isArray(e))for(var a=0;a<e.length;a++)i.schema.items&&i.schema.items.type&&(e[a]=n(e[a],i.schema.items.type));else(t.isString(e)||t.isNumber(e))&&i.schema.type&&(e=n(e,i.schema.type));return e},this.onConstruct()},onConstruct:function(){},isTop:function(){return!this.parent},getTemplateDescriptorId:function(){throw new Error("Template descriptor ID was not specified")},initTemplateDescriptor:function(){var e=this.view.getTemplateDescriptor(this.getTemplateDescriptorId(),this),i=this.view.getGlobalTemplateDescriptor(),n=this.view.getLayout(),a=!1;if(this.isTop()&&(i?(this.setTemplateDescriptor(i),this.singleLevelRendering=!0,a=!0):n&&n.templateDescriptor&&(this.setTemplateDescriptor(n.templateDescriptor),a=!0)),!a&&e&&this.setTemplateDescriptor(e),!this.getTemplateDescriptor())return t.throwErrorWithCallback("Unable to find template descriptor for field: "+this.getFieldType())},setup:function(){this.initTemplateDescriptor(),t.isUndefined(this.schema.required)&&(this.schema.required=!1),t.isUndefined(this.options.validate)&&(this.options.validate=!0),t.isUndefined(this.options.disabled)&&(this.options.disabled=!1),t.isUndefined(this.options.showMessages)&&(this.options.showMessages=!0),void 0===this.options.hidden&&void 0!==this.schema.hidden&&(this.options.hidden=this.schema.hidden)},setupField:function(e){e()},on:function(e,i){return t.logDebug("Adding listener for event: "+e),this._events[e]||(this._events[e]=[]),this._events[e].push(i),this},off:function(e){this._events[e]&&(this._events[e].length=0)},triggerWithPropagation:function(e,t,i){if("string"==typeof t&&(i=t,t=null),i||(i="up"),"up"===i)this.trigger.call(this,e,t),this.parent&&this.parent.triggerWithPropagation.call(this.parent,e,t,i);else if("down"===i){if(this.children&&this.children.length>0)for(var n=0;n<this.children.length;n++)(a=this.children[n]).triggerWithPropagation.call(a,e,t,i);this.trigger.call(this,e,t)}else if("both"===i){if(this.children&&this.children.length>0)for(n=0;n<this.children.length;n++){var a;(a=this.children[n]).triggerWithPropagation.call(a,e,t,"down")}this.trigger.call(this,e,t),this.parent&&this.parent.triggerWithPropagation.call(this.parent,e,t,"up")}},trigger:function(e,i,n,a,o){var r=this._events[e];if(r)for(var s=0;s<r.length;s++){var l=r[s];if("function"==typeof l){t.logDebug("Firing event: "+e);try{l.call(this,i,n,a,o)}catch(i){t.logDebug("The event handler caught an exception: "+e),t.logDebug(i)}}}},bindData:function(){t.isEmpty(this.data)||this.setValue(this.data)},render:function(e,i){var n=this;e&&(t.isString(e)||t.isObject(e))?this.view.setView(e):t.isEmpty(i)&&t.isFunction(e)&&(i=e),null===this.options.label&&this.propertyId&&(this.options.label=this.propertyId),this.options.name&&(this.name=this.options.name),this.calculateName(),this.setup(),this.setupField((function(){n._render((function(){n.trigger("render"),i()}))}))},calculateName:function(){if(!this.name||this.name&&this.nameCalculated)if(this.parent&&this.parent.name&&this.path)if(this.propertyId)this.name=this.parent.name+"_"+this.propertyId,this.nameCalculated=!0;else{var e=this.path.substring(this.path.lastIndexOf("/")+1);-1!==e.indexOf("[")&&-1!==e.indexOf("]")&&(e=e.substring(e.indexOf("[")+1,e.indexOf("]"))),e&&(this.name=this.parent.name+"_"+e,this.nameCalculated=!0)}else this.path&&(this.name=this.path.replace(/\//g,"").replace(/\[/g,"_").replace(/\]/g,""),this.nameCalculated=!0)},_render:function(i){var n=this;if(n.options.form&&t.isObject(n.options.form)){n.options.form.viewType=this.view.type;var a=n.form;a||(a=new t.Form(n.domEl,this.options.form,n.view.id,n.connector,n.errorCallback)),a.render((function(a){var o=e("<div></div>");n._processRender(o,(function(){a.formFieldsContainer.before(n.field),a.formFieldsContainer.remove(),a.topControl=n,n.view.type&&"view"!==n.view.type&&a.initEvents(),n.form=a,n.postRender((function(){n.initializing=!1,n.form.afterInitialize(),e(n.field).bind("destroyed",(function(e){n.form.destroy()})),i&&t.isFunction(i)&&i(n)}))}))}))}else this._processRender(n.domEl,(function(){n.postRender((function(){n.initializing=!1,i&&t.isFunction(i)&&i(n)}))}))},_processRender:function(e,t){var i=this;i.renderField(e,(function(){i.fireCallback("field"),i.renderFieldElements((function(){t()}))}))},renderFieldDomElement:function(e){var i=this.getTemplateDescriptor();return t.tmpl(i,{id:this.getId(),options:this.options,schema:this.schema,data:e,view:this.view,path:this.path,name:this.name})},renderField:function(t,i){var n=this.data;this.isDisplayOnly()&&"object"==typeof n&&(n=JSON.stringify(n));var a=this.renderFieldDomElement(n);if(e(a).length>0){for(var o=null,r=0;r<e(a).length;r++){var s=e(a)[r].nodeName;if(s&&("div"===(s=s.toLowerCase())||"span"===s)){o=e(e(a)[r]);break}}o||(o=e(e(a).last())),o&&(a=o)}this.field=a,this.field.appendTo(t),i()},renderFieldElements:function(e){e()},updateDOMElement:function(){this.field.attr("data-alpaca-field-path",this.getPath()),this.field.attr("data-alpaca-field-name",this.getName()),this.field.removeAttr("name")},postRender:function(i){var n=this;if(this.field.addClass("alpaca-field"),this.field.addClass("alpaca-field-"+this.getFieldType()),this.field.attr("data-alpaca-field-id",this.getId()),this.updateDOMElement(),"view"!==this.view.type){this.isRequired()?(e(this.field).addClass("alpaca-required"),n.fireCallback("required")):(e(this.field).addClass("alpaca-optional"),n.fireCallback("optional"));var a=function(){t.disabled(e("input",n.field),!0),t.disabled(e("select",n.field),!0),t.disabled(e(":radio",n.field),!0),t.disabled(e(":checkbox",n.field),!0),e(":radio",n.field).off().click((function(e){return e.preventDefault(),e.stopImmediatePropagation(),!1})),e(".radio label",n.field).off().click((function(e){return e.preventDefault(),e.stopImmediatePropagation(),!1})),e("input",n.field).off().click((function(e){return e.preventDefault(),e.stopImmediatePropagation(),!1})),n.disable&&n.disable()};this.options.readonly&&(e(this.field).addClass("alpaca-readonly"),e("input",this.field).attr("readonly","readonly"),a(),n.fireCallback("readonly")),this.options.disabled&&(e(this.field).addClass("alpaca-disabled"),a(),n.fireCallback("disabled")),!function(e,i){if(i){var n=0,a=null;if(t.isArray(i))for(n=0;n<i.length;n++)e.addClass(i[n]);else if(i.indexOf(",")>-1)for(a=i.split(","),n=0;n<a.length;n++)e.addClass(a[n]);else if(i.indexOf(" ")>-1)for(a=i.split(" "),n=0;n<a.length;n++)e.addClass(a[n]);else e.addClass(i)}}(this.field,this.options.fieldClass),this.options.disabled&&(this.disable(),n.fireCallback("disable")),(this.view.type&&"edit"===this.view.type||this.showingDefaultData)&&this.bindData(),"create"===this.view.type&&t.logDebug("Skipping data binding for field: "+this.id+" since view mode is 'create'"),this.view.type&&"view"!==this.view.type&&this.initEvents()}this.options.hidden&&this.field.hide();var o="create"===this.view.type&&!this.refreshed;this.hideInitValidationError=t.isValEmpty(this.options.hideInitValidationError)?o:this.options.hideInitValidationError,this.view.displayReadonly||e(this.field).find(".alpaca-readonly").hide(),this.options.postRender?this.options.postRender.call(this,(function(){i()})):i()},refresh:function(i){var n=this;n.getValue(),this.data=n.getValue();var a=n.domEl,o=n.field,r=e("<div></div>");e(o).before(r),n.domEl=e("<div style='display: none'></div>"),n.field=void 0,n.control=void 0,n.container=void 0,n.form=void 0,e(o).find("button").prop("disabled",!0),this.initializing=!0,n.setup(),n.setupField((function(){n._render((function(){e(r).before(n.field),n.domEl=a;var s=e(o).attr("class");s&&e.each(s.split(" "),(function(t,i){i&&0===!i.indexOf("alpaca-")&&e(n.field).addClass(i)})),e(o).hide(),e(r).remove(),n.refreshed=!0,t.fireReady(n),i&&i.call(n),e(o).remove(void 0,{nodestroy:!0})}))}))},applyStyle:function(e,t){this.view.applyStyle(e,t)},fireCallback:function(e,t,i,n,a,o){this.view.fireCallback(this,e,t,i,n,a,o)},getFieldEl:function(){return this.field},getId:function(){return this.id},getParent:function(){return this.parent},getPath:function(){return this.path},getName:function(){return this.name},isTopLevel:function(){return t.isEmpty(this.parent)},top:function(){for(var e=this;e.parent;)e=e.parent;return e},getValue:function(){return this.ensureProperType(this.data)},setValue:function(e){this.data=e,this.updateObservable(),this.triggerUpdate(),this.isDisplayOnly()&&!this.initializing&&(this.top&&this.top()&&this.top().initializing||this.refresh())},setDefault:function(){},getTemplateDescriptor:function(){return this.templateDescriptor},setTemplateDescriptor:function(e){this.templateDescriptor=e},displayMessage:function(i,n){var a=this;i&&t.isObject(i)&&(i=[i]),i&&t.isString(i)&&(i=[{id:"custom",message:i}]),e(this.getFieldEl()).children(".alpaca-message").remove(),i&&i.length>0&&this.options.maxMessages&&t.isNumber(this.options.maxMessages)&&this.options.maxMessages>-1&&(i=i.slice(0,this.options.maxMessages)),a.fireCallback("removeMessages"),i&&i.length>0&&e.each(i,(function(i,n){var o=!1;a.hideInitValidationError&&(o=!0);var r=a.view.getTemplateDescriptor("message");if(r){var s=t.tmpl(r,{id:n.id,message:n.message,view:a.view});s.addClass("alpaca-message"),o&&s.addClass("alpaca-message-hidden"),e(a.getFieldEl()).append(s)}a.fireCallback("addMessage",i,n.id,n.message,o)}))},refreshValidationState:function(e,i){var n=this,a=[],o=[],r=function(e,i){return function(n){t.nextTick((function(){t.compileValidationContext(e,(function(e){i.push(e),n()}))}))}};if(e){var s=function(e,t){if(e.isValidationParticipant()){if(e.children&&e.children.length>0)for(var i=0;i<e.children.length;i++)s(e.children[i],t);o.push(r(e,t))}};s(this,a)}o.push(r(this,a)),t.parallel(o,(function(e){for(var o={},r=[],s=0;s<a.length;s++)for(var l=a[s],c=r.length,d=0;d<l.length;d++){var u=l[d],p=o[u.id];if(p)u.validated&&!p.invalidated&&(p.validated=!0,p.invalidated=!1,p.valid=u.valid),u.invalidated&&(p.invalidated=!0,p.validated=!1,p.valid=u.valid);else{var h={};h.id=u.id,h.path=u.path,h.domEl=u.domEl,h.field=u.field,h.validated=u.validated,h.invalidated=u.invalidated,h.valid=u.valid,r.splice(c,0,h),o[h.id]=h}}r.reverse(),n.hideInitValidationError||t.updateValidationStateForContext(n.view,r),i&&i()}))},getMessage:function(e){return this.view.getMessage(e,this.view.locale)},validate:function(e){var i=!0;if(!this.initializing&&this.options.validate){if(this.children&&e)for(var n=0;n<this.children.length;n++){var a=this.children[n];a.isValidationParticipant()&&a.validate(e)}if(!(i=this.handleValidate())&&t.logLevel==t.DEBUG){var o=[];for(var r in this.validation)this.validation[r].status||o.push(this.validation[r].message);t.logDebug("Validation failure for field (id="+this.getId()+", path="+this.path+"), messages: "+JSON.stringify(o))}}return this._previouslyValidated=!0,i},handleValidate:function(){var e=this.validation,i=this._validateOptional();return e.notOptional={message:i?"":this.getMessage("notOptional"),status:i},i=this._validateDisallow(),e.disallowValue={message:i?"":t.substituteTokens(this.getMessage("disallowValue"),[this.schema.disallow.join(", ")]),status:i},e.notOptional.status&&e.disallowValue.status},_validateCustomValidator:function(e){var i=this;this.options.validator&&t.isFunction(this.options.validator)?this.options.validator.call(this,(function(t){i.validation.custom=t,e()})):e()},_validateOptional:function(){return!(this.isRequired()&&this.isEmpty()||this.options.disallowOnlyEmptySpaces&&t.testRegex(t.regexps.whitespace,this.getValue()))},_validateDisallow:function(){if(!t.isValEmpty(this.schema.disallow)){var i=this.getValue(),n=this.schema.disallow;if(t.isArray(n)){var a=!0;return e.each(n,(function(e,n){(t.isObject(i)||t.isArray(i)&&t.isString(n))&&(n=t.parseJSON(n)),t.compareObject(i,n)&&(a=!1)})),a}return(t.isObject(i)||t.isArray(i)&&t.isString(n))&&(n=t.parseJSON(n)),!t.compareObject(i,n)}return!0},triggerUpdate:function(){e(this.field).trigger("fieldupdate")},disable:function(){},enable:function(){},isDisabled:function(){return!1},isEnabled:function(){return!this.isDisabled()},focus:function(e){e&&e(this)},destroy:function(){t.observable(this.path).clear(),t&&t.fieldInstances&&t.fieldInstances[this.getId()]&&delete t.fieldInstances[this.getId()],e(this.field).remove()},show:function(){this.options&&this.options.hidden||(e(this.field).css({display:""}),this.onShow(),this.fireCallback("show"))},onShow:function(){},hide:function(){e(this.field).css({display:"none"}),this.onHide(),this.fireCallback("hide")},onHide:function(){},isValidationParticipant:function(){return this.isShown()},isShown:function(){return!this.isHidden()},isVisible:function(){return!this.isHidden()},isHidden:function(){return"none"===e(this.field).css("display")},print:function(){this.getFieldEl().printArea&&this.getFieldEl().printArea()},onDependentReveal:function(){},onDependentConceal:function(){},reload:function(){this.initializing=!0,t.isEmpty(this.callback)?this.render(this.renderedCallback):this.callback(this,this.renderedCallback)},clear:function(){var e=null;this.data&&(e=this.data),this.setValue(e)},isEmpty:function(){return t.isValEmpty(this.getValue())},isValid:function(t){if(t&&this.children)for(var i=0;i<this.children.length;i++){var n=this.children[i];if(n.isValidationParticipant()&&!n.isValid(t))return!1}if(e.isEmptyObject(this.validation))return!0;for(var a in this.validation)if(!this.validation[a].status)return!1;return!0},initEvents:function(){var i=this;this.field&&(this.field.mouseover((function(e){i.onMouseOver.call(i,e),i.trigger("mouseover",e)})),this.field.mouseout((function(e){i.onMouseOut.call(i,e),i.trigger("mouseout",e)})),e.each(this.options,(function(e,n){if(t.startsWith(e,"onField")&&t.isFunction(n)){var a=e.substring(7).toLowerCase();i.field.on(a,(function(e){n.call(i,e)}))}})),this.options&&this.options.events&&e.each(this.options.events,(function(e,n){t.isFunction(n)&&("render"===e||"ready"===e||"blur"===e||"focus"===e?i.on(e,(function(e,t,a,o){n.call(i,e,t,a,o)})):i.field.on(e,(function(e){n.call(i,e)})))})))},onFocus:function(t){e(this.field).removeClass("alpaca-field-empty"),e(this.field).addClass("alpaca-field-focused")},onBlur:function(t){var i=e(this.field).hasClass("alpaca-field-focused");e(this.field).removeClass("alpaca-field-focused"),i&&this.refreshValidationState(),e(this.field).trigger("fieldblur")},onChange:function(e){this.updateObservable(),this.triggerUpdate()},onMouseOver:function(e){},onMouseOut:function(e){},getControlByPath:function(e){var i=null;if(e){0===e.indexOf("/")&&(e=e.substring(1)),t.endsWith(e,"/")&&(e=e.substring(0,e.length-1));for(var n=this,a=e.split("/"),o=0;o<a.length;o++){var r=a[o],s=r,l=-1,c=r.indexOf("[");if(c>=0){var d=r.indexOf("]",c+1);d>=0&&(l=parseInt(r.substring(c+1,d)),s=r.substring(0,c))}s&&(n=n.childrenByPropertyId[s],l>-1&&(n=n.children[l]))}i=n}return i},getControlsByFieldType:function(e){var t=[];if(e){var i=function(e,t,n){for(var a=0;a<e.children.length;a++)e.children[a].getFieldType()===t&&n.push(e.children[a]),e.children[a].isContainer()&&i(e.children[a],t,n)};i(this,e,t)}return t},getControlsBySchemaType:function(e){var t=[];if(e){var i=function(e,t,n){for(var a=0;a<e.children.length;a++)e.children[a].getType()===t&&n.push(e.children[a]),e.children[a].isContainer()&&i(e.children[a],t,n)};i(this,e,t)}return t},subscribe:function(){var e=t.makeArray(arguments);return e.unshift(this.getObservableScope()),t.subscribe.apply(this,e)},unsubscribe:function(){var e=t.makeArray(arguments);return e.unshift(this.getObservableScope()),t.unsubscribe.apply(this,e)},observable:function(){var e=t.makeArray(arguments);return e.unshift(this.getObservableScope()),t.observable.apply(this,e)},clearObservable:function(){var e=t.makeArray(arguments);return e.unshift(this.getObservableScope()),t.clearObservable.apply(this,e)},dependentObservable:function(){var e=t.makeArray(arguments);return e.unshift(this.getObservableScope()),t.dependentObservable.apply(this,e)},getType:function(){},getFieldType:function(){return""},getBaseFieldType:function(){var e=null,t=this.constructor.ancestor.prototype;return t&&t.getFieldType&&(e=t.getFieldType()),e},isContainer:function(){return!1},isRequired:function(){var e=!1;if("boolean"==typeof this.schema.required&&(e=this.schema.required),this.parent&&this.parent.schema.required&&t.isArray(this.parent.schema.required)){var i=this.parent.schema.required;if(i)for(var n=0;n<i.length;n++)if(i[n]===this.propertyId){e=!0;break}}return e},getTitle:function(){},getDescription:function(){},getSchemaOfSchema:function(){var e={title:this.getTitle(),description:this.getDescription(),type:"object",properties:{title:{title:"Title",description:"Short description of the property.",type:"string"},description:{title:"Description",description:"Detailed description of the property.",type:"string"},readonly:{title:"Readonly",description:"Indicates that the field is read-only. A read-only field cannot have it's value changed. Read-only fields render in a grayed-out or disabled control. If the field is rendered using a view with the <code>displayReadonly</code> attribute set to false, the read-only field will not appear.",type:"boolean",default:!1},required:{title:"Required",description:"Indicates whether the field's value is required. If set to true, the field must take on a valid value and cannnot be left empty or unassigned.",type:"boolean",default:!1},default:{title:"Default",description:"The default value to be assigned for this property. If the data for the field is empty or not provided, this default value will be plugged in for you. Specify a default value when you want to pre-populate the field's value ahead of time.",type:"any"},type:{title:"Type",description:"Data type of the property.",type:"string",readonly:!0},format:{title:"Format",description:"Data format of the property.",type:"string"},disallow:{title:"Disallowed Values",description:"List of disallowed values for the property.",type:"array"},dependencies:{title:"Dependencies",description:"List of property dependencies.",type:"array"}}};return this.getType&&!t.isValEmpty(this.getType())&&(e.properties.type.default=this.getType(),e.properties.type.enum=[this.getType()]),e},getOptionsForSchema:function(){return{fields:{title:{helper:"Field short description",type:"text"},description:{helper:"Field detailed description",type:"textarea"},readonly:{helper:"Field will be read only if checked",rightLabel:"This field is read-only",type:"checkbox"},required:{helper:"Field value must be set if checked",rightLabel:"This field is required",type:"checkbox"},default:{helper:"Field default value",type:"textarea"},type:{helper:"Field data type",type:"text"},format:{type:"select",dataSource:function(e){for(var i in t.defaultFormatFieldMapping)this.selectOptions.push({value:i,text:i});e()}},disallow:{helper:"Disallowed values for the field",itemLabel:"Value",type:"array"},dependencies:{helper:"Field Dependencies",multiple:!0,size:3,type:"select",dataSource:function(e,t){if(e.parent&&e.parent.schemaParent&&e.parent.schemaParent.parent)for(var i in e.parent.schemaParent.parent.childrenByPropertyId)i!=e.parent.schemaParent.propertyId&&e.selectOptions.push({value:i,text:i});t&&t()}}}}},getSchemaOfOptions:function(){var e={title:"Options for "+this.getTitle(),description:this.getDescription()+" (Options)",type:"object",properties:{form:{},id:{title:"Field Id",description:"Unique field id. Auto-generated if not provided.",type:"string"},type:{title:"Field Type",description:"Field type.",type:"string",default:this.getFieldType(),readonly:!0},validate:{title:"Validation",description:"Field validation is required if true.",type:"boolean",default:!0},showMessages:{title:"Show Messages",description:"Display validation messages if true.",type:"boolean",default:!0},disabled:{title:"Disabled",description:"Field will be disabled if true.",type:"boolean",default:!1},readonly:{title:"Readonly",description:"Field will be readonly if true.",type:"boolean",default:!1},hidden:{title:"Hidden",description:"Field will be hidden if true.",type:"boolean",default:!1},label:{title:"Label",description:"Field label.",type:"string"},helper:{title:"Helper",description:"Field help message.",type:"string"},helpers:{title:"Helpers",description:"An array of field help messages. Each message will be displayed on it's own line.",type:"array",items:{type:"string"}},helpersPosition:{title:"Helpers Position",description:"Defines the placement location of the helper text relative to the control (either 'above' or 'below')",type:"string",enum:["above","below"],default:"below"},fieldClass:{title:"CSS class",description:"Specifies one or more CSS classes that should be applied to the dom element for this field once it is rendered. Supports a single value, comma-delimited values, space-delimited values or values passed in as an array.",type:"string"},hideInitValidationError:{title:"Hide Initial Validation Errors",description:"Hide initial validation errors if true.",type:"boolean",default:!1},focus:{title:"Focus",description:"If true, the initial focus for the form will be set to the first child element (usually the first field in the form). If a field name or path is provided, then the specified child field will receive focus. For example, you might set focus to 'name' (selecting the 'name' field) or you might set it to 'client/name' which picks the 'name' field on the 'client' object.",type:"checkbox",default:!0},optionLabels:{title:"Enumerated Value Labels",description:"An array of str
2ing labels for items in the enum array",type:"array"},view:{title:"Override of the view for this field",description:"Allows for this field to be rendered with a different view (such as 'display' or 'create')",type:"string"}}};return this.isTopLevel()?e.properties.form={title:"Form",description:"Options for rendering the FORM tag.",type:"object",properties:{attributes:{title:"Form Attributes",description:"List of attributes for the FORM tag.",type:"object",properties:{id:{title:"Id",description:"Unique form id. Auto-generated if not provided.",type:"string"},action:{title:"Action",description:"Form submission endpoint",type:"string"},method:{title:"Method",description:"Form submission method",enum:["post","get"],type:"string"},rubyrails:{title:"Ruby On Rails",description:"Ruby on Rails Name Standard",enum:["true","false"],type:"string"},name:{title:"Name",description:"Form name",type:"string"},focus:{title:"Focus",description:"Focus Setting",type:"any"}}},buttons:{title:"Form Buttons",description:"Configuration for form-bound buttons",type:"object",properties:{submit:{type:"object",title:"Submit Button",required:!1},reset:{type:"object",title:"Reset button",required:!1}}},toggleSubmitValidState:{title:"Toggle Submit Valid State",description:"Toggle the validity state of the Submit button",type:"boolean",default:!0}}}:delete e.properties.form,e},getOptionsForOptions:function(){var e={type:"object",fields:{id:{type:"text",readonly:!0},type:{type:"text"},validate:{rightLabel:"Enforce validation",type:"checkbox"},showMessages:{rightLabel:"Show validation messages",type:"checkbox"},disabled:{rightLabel:"Disable this field",type:"checkbox"},hidden:{type:"checkbox",rightLabel:"Hide this field"},label:{type:"text"},helper:{type:"textarea"},helpers:{type:"array",items:{type:"textarea"}},helpersPosition:{type:"text",optionLabels:["Above","Below"]},fieldClass:{type:"text"},hideInitValidationError:{rightLabel:"Hide initial validation errors",type:"checkbox"},focus:{type:"checkbox",rightLabel:"Auto-focus first child field"},optionLabels:{type:"array",items:{type:"text"}},view:{type:"text"}}};return this.isTopLevel()&&(e.fields.form={type:"object",fields:{attributes:{type:"object",fields:{id:{type:"text",readonly:!0},action:{type:"text"},method:{type:"select"},name:{type:"text"}}}}}),e}}),t.registerMessages({disallowValue:"{0} are disallowed values.",notOptional:"This field is not optional."})}(jQuery),function(e){var t=e.alpaca;t.ControlField=t.Field.extend({onConstruct:function(){var t=this;this.isControlField=!0,this._getControlVal=function(i){var n=null;return this.control&&(n=e(this.control).val(),i&&(n=t.ensureProperType(n))),n}},setup:function(){var e=this;this.base();var i=e.resolveControlTemplateType();if(!i)return t.throwErrorWithCallback("Unable to find template descriptor for control: "+e.getFieldType());if(this.controlDescriptor=this.view.getTemplateDescriptor("control-"+i,e),void 0===this.options.renderButtons&&(this.options.renderButtons=!0),this.options.buttons)for(var n in this.options.buttons)this.options.buttons[n].label&&(this.options.buttons[n].value=this.options.buttons[n].label),this.options.buttons[n].title&&(this.options.buttons[n].value=this.options.buttons[n].title),this.options.buttons[n].type||(this.options.buttons[n].type="button"),this.options.buttons[n].styles||(this.options.buttons[n].styles=this.view.styles.button)},getControlEl:function(){return this.control},resolveControlTemplateType:function(){var e=!1,t=null,i=this;do{i.getFieldType?this.view.getTemplateDescriptor("control-"+i.getFieldType(),this)?(t=i.getFieldType(),e=!0):i=i.constructor.ancestor.prototype:e=!0}while(!e);return t},onSetup:function(){},isAutoFocusable:function(){return!0},getTemplateDescriptorId:function(){return"control"},renderFieldElements:function(i){var n=this;this.control=e(this.field).find("."+t.MARKER_CLASS_CONTROL_FIELD),this.control.removeClass(t.MARKER_CLASS_CONTROL_FIELD),n.prepareControlModel((function(e){n.beforeRenderControl(e,(function(){n.renderControl(e,(function(a){a&&(n.control.replaceWith(a),n.control=a,n.control.addClass(t.CLASS_CONTROL)),n.fireCallback("control"),n.afterRenderControl(e,(function(){i()}))}))}))}))},prepareControlModel:function(e){var t={};t.id=this.getId(),t.name=this.name,t.options=this.options,t.schema=this.schema,t.data=this.data,t.required=this.isRequired(),t.view=this.view,e(t)}
2,beforeRenderControl:function(e,t){t()},afterRenderControl:function(i,n){var a=this;a.firstUpdateObservableFire||t.isEmpty(a.data)||(a.firstUpdateObservableFire=!0,a.updateObservable()),e(this.getFieldEl()).find(".alpaca-control-button").each((function(){e(this).click((function(t){e(this).attr("button-pushed",!0)}));var t,i,n=e(this).attr("data-key");if(n){var o=a.options.buttons[n];o&&o.click&&e(this).click((t=a,i=o.click,function(e){e.preventDefault(),i.call(t,e)}))}})),n()},renderControl:function(e,i){var n=null;this.controlDescriptor&&(n=t.tmpl(this.controlDescriptor,e)),i(n)},postRender:function(e){this.base((function(){e()}))},updateDOMElement:function(){this.base(),this.control.attr("name",this.getName())},setDefault:function(){var e=t.isEmpty(this.schema.default)?"":this.schema.default;this.setValue(e)},getValue:function(){var e=this.base();return this.isDisplayOnly()||(e=this.getControlValue()),e=this.ensureProperType(e)},getControlValue:function(){return this._getControlVal(!0)},_validateEnum:function(){if(!this.getEnum())return!0;var e=this.getValue();return!(this.isRequired()||!t.isValEmpty(e))||t.inArray(this.getEnum(),e)},handleValidate:function(){var e=this.base(),i=this.validation,n=this._validateEnum(),a=this.getEnum(),o=this.getOptionLabels();return o&&o.length>0&&(a=o),i.invalidValueOfEnum={message:n?"":t.substituteTokens(this.getMessage("invalidValueOfEnum"),[a.join(", "),this.getValue()]),status:n},e&&i.invalidValueOfEnum.status},initEvents:function(){this.base(),this.control&&this.control.length>0&&this.initControlEvents()},initControlEvents:function(){var e=this,t=this.control;t.click((function(t){e.onClick.call(e,t),e.trigger("click",t)})),t.change((function(t){setTimeout((function(){e.onChange.call(e,t),e.triggerWithPropagation("change",t)}),200)})),t.focus((function(t){if(e.wasFocused=!0,!e.suspendBlurFocus){var i=e.onFocus.c
2all(e,t);return!1!==i&&(i=e.trigger("focus",t)),i}})),t.blur((function(t){if(e.wasBlurred=!0,!e.suspendBlurFocus){var i=e.onBlur.call(e,t);return!1!==i&&(i=e.trigger("blur",t)),i}})),t.keypress((function(t){var i=e.onKeyPress.call(e,t);return!1!==i&&(i=e.trigger("keypress",t)),i})),t.keyup((function(t){var i=e.onKeyUp.call(e,t);return!1!==i&&(i=e.trigger("keyup",t)),e.triggerWithPropagation("after_nested_change",t),i})),t.keydown((function(t){var i=e.onKeyDown.call(e,t);return!1!==i&&(i=e.trigger("keydown",t),e.triggerWithPropagation("before_nested_change",t)),i}))},onKeyPress:function(e){var t=this,i=!1;t.view.type&&"edit"===t.view.type?this.isValid()||(i=!0):t.view.type&&"create"===t.view.type&&!this.isValid()&&t.wasBlurred&&(i=!0),i&&window.setTimeout((function(){t.refreshValidationState()}),50)},onKeyDown:function(e){},onKeyUp:function(e){},onClick:function(e){},disable:function(){this.options.readonly||(this.base(),this.control&&this.control.length>0&&(e(this.control).addClass("disabled"),e(this.control).prop("disabled",!0)))},enable:function(){this.options.readonly||(this.base(),this.control&&this.control.length>0&&(e(this.control).removeClass("disabled"),e(this.control).prop("disabled",!1)))},isDisabled:function(){return e(this.control).prop("disabled")},getEnum:function(){var e=null;return this.schema.enum?e=this.schema.enum:"array"===this.schema.type&&this.schema.items&&this.schema.items.enum&&(e=this.schema.items.enum),e},setEnum:function(e){t.safeSetObjectArray(this.schema,"enum",e)},getOptionLabels:function(){var e=null;return this.options&&this.options.optionLabels&&(e=this.options.optionLabels),e},setOptionLabels:function(e){t.safeSetObjectArray(this.options,"optionLabels",e)},sortEnum:function(){var e=this.getEnum();if(e&&e.length>0){for(var i=this.getOptionLabels(),n=[],a=0;a<e.length;a++){var o=e[a],r=e[a];i&&i.length>=a+1&&(r=i[a]),n.push({value:o,text:r})}this.sortSelectableOptions(n);var s=[],l=[];for(a=0;a<n.length;a++)s.push(n[a].value),t.isArray(i)&&l.push(n[a].text);this.setEnum(s),this.setOptionLabels(l)}},sortSelectableOptions:function(e){var i=this;if(!1!==i.options.sort){var n=t.defaultSort;i.options.sort&&"function"==typeof i.options.sort&&(n=i.options.sort),e.sort(n)}},invokeDataSource:function(i,n,a){var o=this,r=function(e){var t=this;if(e)return a(e);t.afterLoadDataSourceOptions(i,n,(function(e,i){if(e)return a(e);t.sortSelectableOptions(i),a(null,i)}))}.bind(o);if(t.isFunction(o.options.dataSource))o.options.dataSource.call(o,(function(e){if(t.isArray(e)){for(var n=0;n<e.length;n++)"string"==typeof e[n]?i.push({text:e[n],value:e[n]}):t.isObject(e[n])&&i.push(e[n]);r()}else if(t.isObject(e)){for(var a in e)i.push({text:a,value:e[a]});r()}else r()}));else if(t.isUri(o.options.dataSource)){var s=o.view.locale,l=""+o.options.dataSource;s&&(l+=-1===l.indexOf("?")?"?":"&",l+="locale="+s),e.ajax({url:l,type:"get",dataType:"json",success:function(n){var a=n;o.options.dsTransformer&&t.isFunction(o.options.dsTransformer)&&(a=o.options.dsTransformer(a)),a&&(t.isObject(a)?(e.each(a,(function(e,t){i.push({value:e,text:t})})),r()):t.isArray(a)&&(e.each(a,(function(e,t){i.push({value:t.value,text:t.text})})),r()))},error:function(e,t,i){o.errorCallback({message:"Unable to load data from uri : "+o.options.dataSource,stage:"DATASOURCE_LOADING_ERROR",details:{jqXHR:e,textStatus:t,errorThrown:i}})}})}else if(t.isArray(o.options.dataSource)){for(var c=o.options.dataSource,d=0;d<c.length;d++)"string"==typeof c[d]?i.push({text:c[d],value:c[d]}):t.isObject(c[d])&&i.push(c[d]);r()}else if(t.isObject(o.options.dataSource))if(o.options.dataSource.connector){var u=o.connector;if(t.isObject(o.options.dataSource.connector)){var p=o.options.dataSource.connector.id,h=o.options.dataSource.connector.config;h||(h={});var f=t.getConnectorClass(p);f&&(u=new f(p,h))}var m=o.options.dataSource.config;m||(m={}),u.loadDataSource(m,(function(e){for(var n=0;n<e.length;n++)"string"==typeof e[n]?i.push({text:e[n],value:e[n]}):t.isObject(e[n])&&i.push(e[n]);r()}))}else{for(var g in o.options.dataSource)i.push({text:o.options.dataSource[g],value:g});r()}else a()},afterLoadDataSourceOptions:function(e,t,i){i(null,e)},getSchemaOfSchema:function(){return t.merge(this.base(),{properties:{enum:{title:"Enumerated Values",description:"List of specific values for this property",type:"array"}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{enum:{itemLabel:"Value",type:"array"}}})},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{name:{title:"Field Name",description:"Field Name.",type:"string"},sort:{title:"Sort Function",description:"Defines an f(a,b) sort function for the array of enumerated values [{text, value}]. This is used to sort enum and optionLabels as well as results that come back from any data sources (for select and radio controls). By default the items are sorted alphabetically. Don't apply any sorting if false.",type:"function"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{name:{type:"text"}}})}}),t.registerMessages({invalidValueOfEnum:"This field should have one of the values in {0}. Current value is: {1}"})}(jQuery),function(e){var t=e.alpaca;t.ContainerField=t.Field.extend({onConstruct:function(){this.isContainerField=!0},isContainer:function(){return!0},getContainerEl:function(){return this.container},getTemplateDescriptorId:function(){return"container"},resolveContainerTemplateType:function(){var e=!1,t=null,i=this;do{i.getFieldType?this.view.getTemplateDescriptor("container-"+i.getFieldType(),this)?(t=i.getFieldType(),e=!0):i=i.constructor.ancestor.prototype:e=!0}while(!e);return t},resolveContainerItemTemplateType:function(){var e=!1,t=null,i=this;do{i.getFieldType?this.view.getTemplateDescriptor("container-"+i.getFieldType()+"-item",this)?(t=i.getFieldType(),e=!0):i=i.constructor.ancestor.prototype:e=!0}while(!e);return t},setup:function(){var e=this;this.base();
2var i=e.resolveContainerTemplateType();if(!i)return t.throwErrorWithCallback("Unable to find template descriptor for container: "+e.getFieldType());this.containerDescriptor=this.view.getTemplateDescriptor("container-"+i,e);var n=!1;t.isEmpty(this.view.collapsible)||(n=this.view.collapsible),t.isEmpty(this.options.collapsible)||(n=this.options.collapsible),this.options.collapsible=n;var a="button";t.isEmpty(this.view.legendStyle)||(a=this.view.legendStyle),t.isEmpty(this.options.legendStyle)||(a=this.options.legendStyle),this.options.legendStyle=a,this.lazyLoading=!1,t.isEmpty(this.options.lazyLoading)||(this.lazyLoading=this.options.lazyLoading,this.lazyLoading&&(this.options.collapsed=!0)),this.children=[],this.childrenById={},this.childrenByPropertyId={}},destroy:function(){this.form&&(this.form.destroy(!0),delete this.form),t.each(this.children,(function(){this.destroy()})),this.base()},bindData:function(){},renderFieldElements:function(i){var n=this;this.container=e(this.field).find("."+t.MARKER_CLASS_CONTAINER_FIELD),this.container.removeClass(t.MARKER_CLASS_CONTAINER_FIELD),n.prepareContainerModel((function(e){n.beforeRenderContainer(e,(function(){n.renderContainer(e,(function(a){a&&(n.container.replaceWith(a),n.container=a,n.container.addClass(t.CLASS_CONTAINER)),n.view.horizontal?n.container.addClass("alpaca-horizontal"):n.container.addClass("alpaca-vertical"),n.fireCallback("container"),n.afterRenderContainer(e,(function(){i()}))}))}))}))},prepareContainerModel:function(e){var t={id:this.getId(),name:this.name,schema:this.schema,options:this.options,view:this.view};this.createItems((function(i){i||(i=[]);for(var n=0;n<i.length;n++)i[n].containerItemEl||(i[n].containerItemEl=i[n].getFieldEl());t.items=i,e(t)}))},beforeRenderContainer:function(e,t){t()},renderContainer:function(e,i){var n=null;this.containerDescriptor&&(n=t.tmpl(this.containerDescriptor,e)),i(n)},afterRenderContainer:function(e,t){var i=this;i.beforeApplyCreatedItems(e,(function(){i.applyCreatedItems(e,(function(){i.afterApplyCreatedItems(e,(function(){t()}))}))}))},postRender:function(e){this.base((function(){e()}))},initEvents:function(){this.base()},createItems:function(e){e()},beforeApplyCreatedItems:function(e,t){t()},applyCreatedItems:function(i,n){var a=this,o=null;if(a.isTopLevel()&&a.view.getLayout()&&!(o=a.view.getLayout().bindings)&&a.view.getLayout().templateDescriptor&&i.items.length>0){o={};for(var r=0;r<i.items.length;r++){var s=i.items[r].name;o[s]="[data-alpaca-layout-binding='"+s+"']"}}for(i.items.length>0?(e(a.container).addClass("alpaca-container-has-items"),e(a.container).attr("data-alpaca-container-item-count",i.items.length)):(e(a.container).removeClass("alpaca-container-has-items"),e(a.container).removeAttr("data-alpaca-container-item-count")),r=0;r<i.items.length;r++){var l=i.items[r],c=e(a.container).find("."+t.MARKER_CLASS_CONTAINER_FIELD_ITEM+"["+t.MARKER_DATA_CONTAINER_FIELD_ITEM_KEY+"='"+l.name+"']");if(o){var d=o[l.name];if(d){if(0==(u=e(d,a.field)).length)try{u=e("#"+d,a.field)}catch(e){}u.length>0&&(l.domEl=e("<div></div>"),e(l.domEl).addClass("alpaca-layout-binding-holder"),e(l.domEl).attr("alpaca-layout-binding-field-name",l.name),u.append(l.domEl),l.domEl.append(l.containerItemEl))}e(c).remove()}else{var u=e(c).parent();e(c).replaceWith(l.containerItemEl),l.domEl=u}e(l.containerItemEl).addClass("alpaca-container-item"),0===r&&e(l.containerItemEl).addClass("alpaca-container-item-first"),r+1===i.items.length&&e(l.containerItemEl).addClass("alpaca-container-item-last"),e(l.containerItemEl).attr("data-alpaca-container-item-index",r),e(l.containerItemEl).attr("data-alpaca-container-item-name",l.name),e(l.containerItemEl).attr("data-alpaca-container-item-parent-field-id",a.getId()),a.registerChild(l,r)}a.options.collapsible&&a.fireCallback("collapsible"),a.triggerUpdate(),n()},afterApplyCreatedItems:function(e,t){t()},registerChild:function(e,i){t.isEmpty(i)?this.children.push(e):this.children.splice(i,0,e),this.childrenById[e.getId()]=e,e.propertyId&&(this.childrenByPropertyId[e.propertyId]=e),e.parent=this},unregisterChild:function(e){var i=this.children[e];i&&(t.isEmpty(e)||this.children.splice(e,1),delete this.childrenById[i.getId()],i.propertyId&&delete this.childrenByPropertyId[i.propertyId],i.parent=null)},updateDOMElement:function(){var t=this;this.base(),t.children.length>0?(e(t.getContainerEl()).addClass("alpaca-container-has-items"),e(t.getContainerEl()).attr("data-alpaca-container-item-count",t.children.length)):(e(t.getContainerEl()).removeClass("alpaca-container-has-items"),e(t.getContainerEl()).removeAttr("data-alpaca-container-item-count"));for(var i=0;i<t.children.length;i++){var n=t.children[i];n.path||("array"===n.schema.type?n.path=t.path+"["+i+"]":n.path=t.path+"/"+n.propertyId),n.calculateName(),e(n.containerItemEl).removeClass("alpaca-container-item-first"),e(n.containerItemEl).removeClass("alpaca-container-item-last"),e(n.containerItemEl).removeClass("alpaca-container-item-index"),e(n.containerItemEl).removeClass("alpaca-container-item-key"),e(n.containerItemEl).addClass("alpaca-container-item"),0===i&&e(n.containerItemEl).addClass("alpaca-container-item-first"),i+1===t.children.length&&e(n.containerItemEl).addClass("alpaca-container-item-last"),e(n.containerItemEl).attr("data-alpaca-container-item-index",i),e(n.containerItemEl).attr("data-alpaca-container-item-name",n.name),e(n.containerItemEl).attr("data-alpaca-container-item-parent-field-id",t.getId()),t.updateChildDOMWrapperElement(i,n),n.updateDOMElement()}},updateChildDOMWrapperElement:function(e,t){},handleRepositionDOMRefresh:function(){var e=this;e.getParent()?e.getParent().updateDOMElement():e.updateDOMElement()},onDependentReveal:function(){for(var e=0;e<this.children.length;e++)this.children[e].onDependentReveal()},onDependentConceal:function(){for(var e=0;e<this.children.length;e++)this.children[e].onDependentConceal()},focus:function(t){var i=this;if(this.isDisplayOnly())t&&t();else{this.base();var n=-1,a=[],o=this.getContainerEl();this.form&&(o=this.form.getFormEl()),e(o).find(".alpaca-container-item[data-alpaca-container-item-parent-field-id='"+this.getId()+"']").each((function(){var t=e(this).attr("data-alpaca-container-item-index");a.push(i.children[t])}));for(var r=0;r<a.length;r++)if(a[r]&&!a[r].isValid(!0)&&a[r].isControlField&&a[r].isAutoFocusable()&&!a[r].options.readonly){n=r;break}-1===n&&a.length>0&&(n=0),n>-1&&(a[n].focus(),t&&t(a[n]))}},disable:function(){if(!this.options.readonly){this.base();for(var e=0;e<this.children.length;e++)this.children[e].disable()}},enable:function(){if(!this.options.readonly){this.base();for(var e=0;e<this.children.length;e++)this.children[e].enable()}},getValue:function(){return this.getContainerValue()},getContainerValue:function(){return null},firstChild:function(){var e=null;return this.children.length>0&&(e=this.children[0]),e},lastChild:function(){var e=null;return this.children.length>0&&(e=this.children[this.children.length-1]),e},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{lazyLoading:{title:"Lazy Loading",description:"Child fields will only be rendered when the fieldset is expanded if this option is set true.",type:"boolean",default:!1},collapsible:{title:"Collapsible",description:"Field set is collapsible if true.",type:"boolean",default:!1},collapsed:{title:"Collapsed",description:"Field set is initially collapsed if true.",type:"boolean",default:!1},legendStyle:{title:"Legend Style",description:"Field set legend style.",type:"string",enum:["button","link"],default:"button"},animate:{title:"Animate movements and transitions",description:"Up and down transitions will be animated",type:"boolean",default:!0}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{lazyLoading:{rightLabel:"Lazy loading child fields ?",helper:"Lazy loading will be enabled if checked.",type:"checkbox"},collapsible:{rightLabel:"Field set collapsible ?",helper:"Field set is collapsible if checked.",type:"checkbox"},collapsed:{rightLabel:"Field set initially collapsed ?",description:"Field set is initially collapsed if checked.",type:"checkbox"},legendStyle:{type:"select"},animate:{rightLabel:"Animate movements and transitions",type:"checkbox"}}})}})}(jQuery),function(e){var t=e.alpaca;t.Form=Base.extend({constructor:function(e,i,n,a,o){if(this.domEl=e,this.parent=null,this.connector=a,this.errorCallback=o,this.options=i,this.options.attributes?this.attributes=this.options.attributes:this.attributes={},this.options.buttons)for(var r in this.options.buttons.submit&&(this.options.buttons.submit.type||(this.options.buttons.submit.type="submit"),this.options.buttons.submit.name||(this.options.buttons.submit.name="submit"),this.options.buttons.submit.value||(this.options.buttons.submit.value="Submit")),this.options.buttons.reset&&(this.options.buttons.reset.type||(this.options.buttons.reset.type="reset"),this.options.buttons.reset.name||(this.options.buttons.reset.name="reset"),this.options.buttons.reset.value||(this.options.buttons.reset.value="Reset")),this.options.buttons)this.options.buttons[r].label&&(this.options.buttons[r].value=this.options.buttons[r].label),this.options.buttons[r].title&&(this.options.buttons[r].value=this.options.buttons[r].title),this.options.buttons[r].type||(this.options.buttons[r].type="button");for(var r in this.attributes.id?this.id=this.attributes.id:(this.id=t.generateId(),this.attributes.id=this.id),this.options.buttons&&this.options.buttons.submit&&t.isUndefined(this.options.toggleSubmitValidState)&&(this.options.toggleSubmitValidState=!0),this.viewT
vendor: 4,679 bytes, line 2
2ype=i.viewType,this.view=new t.RuntimeView(n,this),this.options.buttons)this.options.buttons[r].styles||(this.options.buttons[r].styles=this.view.styles.button)},render:function(e){var t=this;this.processRender(this.domEl,(function(){t.form.appendTo(t.domEl),t.form.addClass("alpaca-form"),t.fireCallback("form"),e(t)}))},afterInitialize:function(){this.options.toggleSubmitValidState&&this.adjustSubmitButtonState()},isFormValid:function(){return this.topControl.validate(!0),this.topControl.isValid(!0)},isValid:function(){return this.isFormValid()},validate:function(e){return this.topControl.validate(e)},enableSubmitButton:function(){if(e(".alpaca-form-button-submit").attrProp("disabled",!1),e.mobile)try{e(".alpaca-form-button-submit").button("refresh")}catch(e){}},disableSubmitButton:function(){if(e(".alpaca-form-button-submit").attrProp("disabled",!0),e.mobile)try{e(".alpaca-form-button-submit").button("refresh")}catch(e){}},adjustSubmitButtonState:function(){this.disableSubmitButton(),this.isFormValid()&&this.enableSubmitButton()},processRender:function(i,n){var a=this;if(this.formDescriptor=this.view.getTemplateDescriptor("form"),!this.formDescriptor)return t.throwErrorWithCallback("Could not find template descriptor: form");var o=t.tmpl(this.formDescriptor,{id:this.getId(),options:this.options,view:this.view});o.appendTo(i),this.form=o,this.formFieldsContainer=e(this.form).find("."+t.MARKER_CLASS_FORM_ITEMS_FIELD),this.formFieldsContainer.removeClass(t.MARKER_CLASS_FORM_ITEMS_FIELD),t.isEmpty(this.form.attr("id"))&&this.form.attr("id",this.getId()+"-form-outer"),t.isEmpty(this.form.attr("data-alpaca-form-id"))&&this.form.attr("data-alpaca-form-id",this.getId()),e(i).find("form").attr(this.attributes),this.buttons={},e(i).find(".alpaca-form-button").each((function(){e(this).click((function(t){e(this).attr("button-pushed",!0)}));var t,i,n=e(this).attr("data-key");if(n){var o=a.options.buttons[n];o&&o.click&&e(this).click((t=a,i=o.click,function(e){e.preventDefault(),i.call(t,e)}))}})),n()},getId:function(){return this.id},getType:function(){return this.type},getParent:function(){return this.parent},getValue:function(){return this.topControl.getValue()},setValue:function(e){this.topControl.setValue(e)},initEvents:function(){var t=this,i=e(this.domEl).find("form"),n=this.getValue();e(i).submit(n,(function(e){return t.onSubmit(e,t)})),this.options.toggleSubmitValidState&&(e(t.topControl.getFieldEl()).bind("fieldupdate",(function(){t.adjustSubmitButtonState()})),e(t.topControl.getFieldEl()).bind("fieldkeyup",(function(){t.adjustSubmitButtonState()})),e(t.topControl.getFieldEl()).bind("fieldblur",(function(){t.adjustSubmitButtonState()})))},getButtonEl:function(t){return e(this.domEl).find(".alpaca-form-button-"+t)},onSubmit:function(e,i){if(!this.isFormValid())return e.stopPropagation(),this.refreshValidationState(!0),!1;if(this.submitHandler){e.stopPropagation();var n=this.submitHandler(e,i);return t.isUndefined(n)&&(n=!1),n}},registerSubmitHandler:function(e){t.isFunction(e)&&(this.submitHandler=e)},refreshValidationState:function(e,t){this.topControl.refreshValidationState(e,t)},disable:function(){this.topControl.disable()},enable:function(){this.topControl.enable()},focus:function(e){this.topControl.focus((function(t){e&&e(t)}))},destroy:function(e){this.getFormEl().remove(),!e&&this.parent&&this.parent.destroy()},show:function(){this.getFormEl().css({display:""})},hide:function(){this.getFormEl().css({display:"none"})},clear:function(e){this.topControl.clear(e)},isEmpty:function(){return this.topControl.isEmpty()},fireCallback:function(e,t,i,n,a,o){this.view.fireCallback(this,e,t,i,n,a,o)},getFormEl:function(){return this.form},submit:function(){this.form.submit()},ajaxSubmit:function(i){var n=this;i||(i={}),i.url=n.options.attributes.action,i.type=n.options.attributes.method,i.data||(i.data=this.getValue()),i.dataType||(i.dataType="json"),i.headers||(i.headers={});var a=n.determineCsrfToken();return a&&(i.headers[t.CSRF_HEADER_NAME]=a),e.ajax(i)},determineCsrfToken:function(){var e=t.CSRF_TOKEN;if(!e)for(var i=0;i<t.CSRF_COOKIE_NAMES.length;i++){var n=t.CSRF_COOKIE_NAMES[i],a=t.readCookie(n);if(a){e=a;break}}return e}})}(jQuery),function(e){var t=e.alpaca;t.MemoryCache=function(e){e||(e={});var i={};return function(n,a,o){if(t.isUndefined(a)||(a?(i[n]={v:a},!o&&e.ttl&&(o=e.ttl),o&&(i[n].expires=(new Date).getTime()+o)):delete i[n]),"clear"==n){var r=[];for(var s in i)r.push(s);for(var l=0;l<r.length;l++)delete i[r[l]]}var c=i[n];if(c){var d=(new Date).getTime();if(!(c.expires&&c.expires<d))return c.v;delete i[n]}}},t.registerCache("memory",t.MemoryCache)}(jQuery),function(e){var t=e.alpaca;
2t.NullCache=function(e){return function(e,t,i){if(t)return t}},t.registerCache("null",t.NullCache)}(jQuery),function(e){var t=e.alpaca;t.Connector=Base.extend({constructor:function(e,i){i||(i={}),this.id=e,this.config=i,this.isUri=function(e){return!t.isEmpty(e)&&t.isUri(e)},i.cache||(i.cache={type:"null",config:{}}),i.cache.type||(i.cache.type="null",i.cache.config={}),this.cache=t.getCache(i.cache.type)(i.cache.config)},connect:function(e,t){e()},loadTemplate:function(e,i,n){t.isEmpty(e)?n({message:"Empty data source.",reason:"TEMPLATE_LOADING_ERROR"}):t.isUri(e)?this.loadUri(e,!1,(function(e){i&&t.isFunction(i)&&i(e)}),(function(e){n&&t.isFunction(n)&&n(e)})):i(e)},loadData:function(e,t,i,n){return this._handleLoadJsonResource(e,i,n)},loadSchema:function(e,t,i,n){return this._handleLoadJsonResource(e,i,n)},loadOptions:function(e,t,i,n){return this._handleLoadJsonResource(e,i,n)},loadView:function(e,t,i,n){return this._handleLoadJsonResource(e,i,n)},loadAll:function(e,i,n){var a=this;a.connect((function(){var o=e.dataSource,r=e.schemaSource,s=e.optionsSource,l=e.viewSource;r||"string"!=typeof e.schema||(r=e.schema),s||"string"!=typeof e.options||(s=e.options),l||"string"!=typeof e.view||(l=e.view);var c={},d=0,u=0,p=function(){d===u&&i&&t.isFunction(i)&&i(c.data,c.options,c.schema,c.view)},h=function(e){n&&t.isFunction(n)&&n(e)};if(o&&u++,r&&u++,s&&u++,l&&u++,0!==u){var f=function(e,i,n){c[e]=i,n&&("object"==typeof c[e]&&"object"==typeof n?t.mergeObject(c[e],n):c[e]=n)};o&&a.loadData(o,e,(function(t){f("data",e.data,t),d++,p()}),h),r&&a.loadSchema(r,e,(function(t){f("schema",e.schema,t),d++,p()}),h),s&&a.loadOptions(s,e,(function(t){f("options",e.options,t),d++,p()}),h),l&&a.loadView(l,e,(function(t){f("view",e.view,t),d++,p()}),h)}else p()}),(function(e){n&&t.isFunction(n)&&n(e)}))},loadJson:function(e,t,i){this.loadUri(e,!0,t,i)},buildAjaxConfig:function(e,t){var i={url:e,type:"get"};return t?i.dataType="json":(i.dataType="text",e&&e.toLowerCase().indexOf(".html")>-1&&(i.dataType="html")),i},loadUri:function(i,n,a,o){var r=this,s=r.buildAjaxConfig(i,n);s.success=function(e){r.cache(i,e),a&&t.isFunction(a)&&a(e)},s.error=function(e,n,a){o&&t.isFunction(o)&&o({message:"Unable to load data from uri : "+i,stage:"DATA_LOADING_ERROR",details:{jqXHR:e,textStatus:n,errorThrown:a}})};var l=r.cache(i);l&&a&&t.isFunction(a)?a(l):e.ajax(s)},loadReferenceSchema:function(e,t,i){return this._handleLoadJsonResource(e,t,i)},loadReferenceOptions:function(e,t,i){return this._handleLoadJsonResource(e,t,i)},_handleLoadJsonResource:function(e,t,i){this.isUri(e)?this.loadJson(e,(function(e){t(e)}),i):t(e)},loadDataSource:function(e,t,i){return this._handleLoadDataSource(e,t,i)},_handleLoadDataSource:function(e,i,n){var a=e;return t.isObject(a)&&(a=e.url),this._handleLoadJsonResource(a,i,n)}}),t.registerConnectorClass("default",t.Connector)}(jQuery),function(e){var t=e.alpaca;t.CloudCmsConnector=t.Connector.extend({constructor:function(e,t){t||(t={}),t.cache||(t.cache={type:"memory",config:{ttl:3e5}}),this.base(e,t)},connect:function(e,i){var n=this,a=function(t,a){t?i(t):(a&&(n.branch=Chain(a),n.bindHelperFunctions(n.branch)),e())};t.globalContext&&t.globalContext.branch?a(null,t.globalContext.branch):(n.branch=null,n.doConnect((function(e,t){a(e,t)})))},doConnect:function(e){this.config.key||(this.config.key="default"),Gitana.connect(this.config,(function(t){t?e(t):this.getDriver().getOriginalConfiguration().loadAppHelper?this.datastore("content").readBranch("master").then((function(){e(null,this)})):e()}))},bindHelperFunctions:function(e){var i=this;e.loadAlpacaSchema||(e.loadAlpacaSchema=function(t,n,a){var o=i.cache(t);if(o)return a.call(this,null,o);var r={};return r.id=t,this.chainGetResponse(this,(function(){return e.getUri()+"/alpaca/schema"}),r).then((function(e){i.cache(t,e),a.call(this,null,e)}))}),e.loadAlpacaOptions||(e.loadAlpacaOptions=function(t,n,a){var o=i.cache(t);if(o)return a.call(this,null,o);var r={};return r.schemaId=n.schemaSource,r.id=t,this.chainGetResponse(this,(function(){return e.getUri()+"/alpaca/options"}),r).then((function(e){i.cache(t,e),a.call(this,null,e)}))}),e.loadAlpacaData||(e.loadAlpacaData=function(t,i,n){var a={};return a.id=t,this.chainGetResponse(this,(function(){return e.getUri()+"/alpaca/data"}),a).then((function(e){n.call(this,null,e)}))}),e.loadAlpacaDataSource||(e.loadAlpacaDataSource=function(i,n,a){var o={};return n&&t.copyInto(o,n),this.chainPostResponse(this,(function(){return e.getUri()+"/alpaca/datasource"}),o,i).then((function(e){a.call(this,null,e.datasource)}))})}
2,loadData:function(e,t,i,n){if(!this.branch)return this.base(e,t,i,n);this.branch.loadAlpacaData(e,t,(function(e,t){if(e)n(e);else{var a=null;t&&(a=JSON.parse(JSON.stringify(t))),i(a)}}))},loadSchema:function(e,t,i,n){if(!this.branch)return this.base(e,t,i,n);this.branch.loadAlpacaSchema(e,t,(function(e,t){if(e)return n(e);i(t)}))},loadOptions:function(e,i,n,a){var o=this;if(!o.branch)return this.base(e,i,n,a);o.branch.loadAlpacaOptions(e,i,(function(e,i){if(e)return a(e);i||(i={}),i.form.buttons={submit:{title:"Submit",click:function(e){var t=this,i=this.getValue();i||(i={});var n=this.ajaxSubmit({xhrFields:{withCredentials:!0},crossDomain:!0,processData:!1,data:JSON.stringify(i),contentType:"application/json; charset=utf-8"});n.done((function(){t.topControl.trigger("formSubmitSuccess")})),n.fail((function(){t.topControl.trigger("formSubmitFail")}))}}},void 0===i.focus&&(i.focus=t.defaultFocus),i.form.attributes.action=o.config.baseURL+i.form.attributes.action,n(i)}))},loadReferenceSchema:function(e,t,i){if(0===e.indexOf("qname://")){var n=e.substring(8).split("/");e=n[0]+":"+n[1]}return 0===e.toLowerCase().indexOf("http://")||0===e.toLowerCase().indexOf("https://")?this._handleLoadJsonResource(e,t,i):this.loadSchema(e,null,t,i)},loadReferenceOptions:function(e,t,i){if(0===e.toLowerCase().indexOf("http://")||0===e.toLowerCase().indexOf("https://"))return this._handleLoadJsonResource(e,t,i);var n=null;if(0===e.indexOf("qname://")){var a=e.substring(8).split("/");if(a.length>2)return(n={}).schemaSource=a[0]+":"+a[1],e=a[2],this.loadOptions(e,n,t,i)}t(null)},loadDataSource:function(e,t,i){if(!this.branch)return this.base(e,t,i);var n=e.pagination;return delete e.pagination,this.branch.loadAlpacaDataSource(e,n,(function(e,n){e?i(e):t(n)}))}}),t.registerConnectorClass("cloudcms",t.CloudCmsConnector)}(jQuery),function(e){var t=e.alpaca;t.Fields.TextField=t.ControlField.extend({getFieldType:function(){return"text"},setup:function(){this.base(),this.inputType||(this.inputType="text"),this.options.inputType&&(this.inputType=this.options.inputType),this.options.data||(this.options.data={}),this.options.attributes||(this.options.attributes={}),void 0===this.options.allowOptionalEmpty&&(this.options.allowOptionalEmpty=!0),this.options.autocomplete&&"string"==typeof this.options.autocomplete&&("on"===this.options.autocomplete.toLowerCase()||"true"===this.options.autocomplete.toLowerCase()||"yes"===this.options.autocomplete.toLowerCase()?this.options.autocomplete=!0:this.options.autocomplete=!1),void 0===this.options.autocomplete&&(this.options.autocomplete=!1),void 0===this.options.disallowEmptySpaces&&(this.options.disallowEmptySpaces=!1),void 0===this.options.disallowOnlyEmptySpaces&&(this.options.disallowOnlyEmptySpaces=!1)},destroy:function(){this.base(),this.control&&this.control.typeahead&&this.options.typeahead&&e(this.control).typeahead("destroy")},postRender:function(e){var t=this;this.base((function(){t.control&&(t.applyAutocomplete(),t.applyMask(),t.applyTypeAhead(),t.updateMaxLengthIndicator()),e()}))},applyAutocomplete:function(){var t=this;void 0!==t.options.autocomplete&&(e(t.field).addClass("alpaca-autocomplete"),e(t.control).attr("autocomplete",t.options.autocomplete?"on":"off"),t.fireCallback("autocomplete"))},applyMask:function(){var e=this;e.control.mask&&e.options.maskString&&e.control.mask(e.options.maskString)},applyTypeAhead:function(){var i=this;if(i.control.typeahead&&i.options.typeahead&&!t.isEmpty(i.options.typeahead)){var n=i.options.typeahead.config;n||(n={});var a=i.options.typeahead.datasets;a||(a={}),a.name||(a.name=i.getId());var o=i.options.typeahead.events;if(o||(o={}),!a.init&&("local"===a.type||"remote"===a.type||"prefetch"===a.type)){var r={datumTokenizer:function(e){var t="";for(var i in e)(e.hasOwnProperty(i)||e[i])&&(t+=" "+e[i]);return Bloodhound.tokenizers.whitespace(t)},queryTokenizer:Bloodhound.tokenizers.whitespace};if("local"===a.type){var s=[];if("function"==typeof a.source)r.local=a.source;else{for(var l=0;l<a.source.length;l++){var c=a.source[l];"string"==typeof c&&(c={value:c}),s.push(c)}r.local=s}a.local&&(r.local=a.local)}"prefetch"===a.type&&(r.prefetch={url:a.source},a.filter&&(r.prefetch.filter=a.filter)),"remote"===a.type&&(r.remote={url:a.source},a.filter&&(r.remote.filter=a.filter),a.replace&&(r.remote.replace=a.replace)),e.each(a,(function(e,t){"type"!==e&&"source"!==e&&"filter"!==e&&"replace"!==e&&"local"!==e&&"templates"!==e&&(r[e]=t)}));var d=new Bloodhound(r);d.initialize(),a.source=d.ttAdapter(),a.init=!0}if(a.templates)for(var u in a.templates){var p=a.templates[u];"string"==typeof p&&(a.templates[u]=Handlebars.compile(p))}e(i.control).typeahead(n,a),e(i.control).on("typeahead:autocompleted",(function(t,n){i.setValue(n.value),e(i.control).change()})),e(i.control).on("typeahead:selected",(function(t,n){i.setValue(n.value),e(i.control).change()})),o&&(o.autocompleted&&e(i.control).on("typeahead:autocompleted",(function(e,t){o.autocompleted(e,t)})),o.selected&&e(i.control).on("typeahead:selected",(function(e,t){o.selected(e,t)})));var h=e(i.control);e(i.control).change((function(){var t=e(this).val(),i=e(h).typeahead("val");i!==t&&e(h).typeahead("val",i)})),e(i.field).find("span.twitter-typeahead").first().css("display","block"),e(i.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}},prepareControlModel:function(e){var t=this;this.base((function(i){i.inputType=t.inputType,e(i)}))},updateMaxLengthIndicator:function(){var i=this,n=!1,a="";if(!t.isEmpty(i.schema.maxLength)&&i.options.showMaxLengthIndicator){var o=i.getValue()||"",r=i.schema.maxLength-o.length;r>=0?a="You have "+r+" characters remaining":(a="Your message is too long by "+-1*r+" characters",n=!0);var s=e(i.field).find(".alpaca-field-text-max-length-indicator");0===s.length&&(s=e("<p class='alpaca-field-text-max-length-indicator'></p>"),e(i.control).after(s)),e(s).html(a),e(s).removeClass("err"),n&&e(s).addClass("err")}},getControlValue:function(){var t=this,i=this._getControlVal(!0);if(t.control.mask&&t.options.maskString){var n=e(this.control).data(e.mask.dataName);n&&(i=n(),i=t.ensureProperType(i))}return i},setValue:function(e){this.control&&this.control.length>0&&(t.isEmpty(e)?this.control.val(""):this.control.val(e)),this.base(e),this.updateMaxLengthIndicator()},handleValidate:function(){var e=this.base(),i=this.validation,n=this._val
vendor: 21,489 bytes, line 2
2idatePattern();return i.invalidPattern={message:n?"":t.substituteTokens(this.getMessage("invalidPattern"),[this.schema.pattern]),status:n},n=this._validateMaxLength(),i.stringTooLong={message:n?"":t.substituteTokens(this.getMessage("stringTooLong"),[this.schema.maxLength]),status:n},n=this._validateMinLength(),i.stringTooShort={message:n?"":t.substituteTokens(this.getMessage("stringTooShort"),[this.schema.minLength]),status:n},e&&i.invalidPattern.status&&i.stringTooLong.status&&i.stringTooShort.status},_validatePattern:function(){if(this.schema.pattern){var e=this.getValue();if(""===e&&this.options.allowOptionalEmpty&&!this.isRequired())return!0;if(t.isEmpty(e)&&(e=""),"string"==typeof e&&!e.match(this.schema.pattern))return!1}return!0},_validateMinLength:function(){if(!t.isEmpty(this.schema.minLength)){var e=this.getValue();if(e!=e&&(e=""),""===e&&this.options.allowOptionalEmpty&&!this.isRequired())return!0;if(t.isEmpty(e)&&(e=""),(""+e).length<this.schema.minLength)return!1}return!0},_validateMaxLength:function(){if(!t.isEmpty(this.schema.maxLength)){var e=this.getValue();if(""===e&&this.options.allowOptionalEmpty&&!this.isRequired())return!0;if(t.isEmpty(e)&&(e=""),(""+e).length>this.schema.maxLength)return!1}return!0},focus:function(t){if(this.control&&this.control.length>0){var i=e(this.control).get(0);try{var n=i.value?i.value.length:0;i.selectionStart=n,i.selectionEnd=n}catch(e){}i.focus(),t&&t(this)}},getType:function(){return"string"},onKeyPress:function(e){var i=this;9!==e.keyCode&&37!==e.keyCode&&38!==e.keyCode&&39!==e.keyCode&&40!==e.keyCode&&(8===e.keyCode?t.isEmpty(i.schema.minLength)||!i.options.constrainLengths&&!i.options.constrainMinLength||(i.getValue()||"").length<=i.schema.minLength&&(e.preventDefault(),e.stopImmediatePropagation()):t.isEmpty(i.schema.maxLength)||!i.options.constrainLengths&&!i.options.constrainMaxLength||(i.getValue()||"").length>=i.schema.maxLength&&(e.preventDefault(),e.stopImmediatePropagation()),32===e.keyCode&&i.options.disallowEmptySpaces&&(e.preventDefault(),e.stopImmediatePropagation()))},onKeyUp:function(t){this.updateMaxLengthIndicator(),e(this.field).trigger("fieldkeyup")},getTitle:function(){return"Single-Line Text"},getDescription:function(){return"Text field for single-line text."},getSchemaOfSchema:function(){return t.merge(this.base(),{properties:{minLength:{title:"Minimal Length",description:"Minimal length of the property value.",type:"number"},maxLength:{title:"Maximum Length",description:"Maximum length of the property value.",type:"number"},pattern:{title:"Pattern",description:"Regular expression for the property value.",type:"string"}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{default:{helper:"Field default value",type:"text"},minLength:{type:"integer"},maxLength:{type:"integer"},pattern:{type:"text"}}})},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{size:{title:"Field Size",description:"Field size.",type:"number",default:40},maskString:{title:"Mask Expression",description:"Expression for the field mask. Field masking will be enabled if not empty.",type:"string"},placeholder:{title:"Field Placeholder",description:"Field placeholder.",type:"string"},typeahead:{title:"Type Ahead",description:"Provides configuration for the $.typeahead plugin if it is available. For full configuration options, see: https://github.com/twitter/typeahead.js"},allowOptionalEmpty:{title:"Allow Optional Empty",description:"Allows this non-required field to validate when the value is empty"},inputType:{title:"HTML5 Input Type",description:"Allows for the override of the underlying HTML5 input type. If not specified, an assumed value is provided based on the kind of input control (i.e. 'text', 'date', 'email' and so forth)",type:"string"},data:{title:"Data attributes for the underlying DOM input control",description:"Allows you to specify a key/value map of data attributes that will be added as DOM attribuets for the underlying input control. The data attributes will be added as data-{name}='{value}'.",type:"object"},autocomplete:{title:"HTML autocomplete attribute for the underlying DOM input control",description:"Allows you to specify the autocomplete attribute for the underlying input control whether or not field should have autocomplete enabled.",type:"string"},disallowEmptySpaces:{title:"Disallow Empty Spaces",description:"Whether to disallow the entry of empty spaces in the text",type:"boolean",default:!1},disallowOnlyEmptySpaces:{title:"Disallow Only Empty Spaces",description:"Whether to disallow the entry of only empty spaces in the text",type:"boolean",default:!1}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{size:{type:"integer"},maskString:{helper:"a - an alpha character;9 - a numeric character;* - an alphanumeric character",type:"text"},typeahead:{type:"object"},allowOptionalEmpty:{type:"checkbox"},inputType:{type:"text"},data:{type:"object"}}})}}),t.registerMessages({invalidPattern:"This field should have pattern {0}",stringTooShort:"This field should contain at least {0} numbers or characters",stringTooLong:"This field should contain at most {0} numbers or characters"}),t.registerFieldClass("text",t.Fields.TextField),t.registerDefaultSchemaFieldMapping("string","text")}(jQuery),function(e){var t=e.alpaca;t.Fields.TextAreaField=t.Fields.TextField.extend({getFieldType:function(){return"textarea"},setup:function(){this.base(),this.options.rows||(this.options.rows=5),this.options.cols||(this.options.cols=40)},handleValidate:function(){var e=this.base(),i=this.validation,n=this._validateWordCount();return i.wordLimitExceeded={message:n?"":t.substituteTokens(this.getMessage("wordLimitExceeded"),[this.options.wordlimit]),status:n},e&&i.wordLimitExceeded.status},_validateWordCount:function(){if(this.options.wordlimit&&this.options.wordlimit>-1){var e=this.data;if(e&&e.split(" ").length>this.options.wordlimit)return!1}return!0},getTitle:function(){return"Multi-Line Text"},getDescription:function(){return"Textarea field for multiple line text."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{rows:{title:"Rows",description:"Number of rows",type:"number",default:5},cols:{title:"Columns",description:"Number of columns",type:"number",default:40},wordlimit:{title:"Word Limit",description:"Limits the number of words allowed in the text area.",type:"number",default:-1}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{rows:{type:"integer"},cols:{type:"integer"},wordlimit:{type:"integer"}}})}}),t.registerMessages({wordLimitExceeded:"The maximum word limit of {0} has been exceeded."}),t.registerFieldClass("textarea",t.Fields.TextAreaField)}(jQuery),function(e){var t=e.alpaca;t.Fields.FileField=t.Fields.TextField.extend({getFieldType:function(){return"file"},setValue:function(e){this.data=e,this.updateObservable(),this.triggerUpdate()},getControlValue:function(){return this.data},onChange:function(e){this.base(e),this.options.selectionHandler&&this.processSelectionHandler(e.target.files)},processSelectionHandler:function(e){if(e&&e.length>0&&"undefined"!=typeof FileReader){var t=[],i=0,n=new FileReader;n.onload=function(){var n=this;return function(a){var o=a.target.result;t.push(o),++i===e.length&&n.options.selectionHandler.call(n,e,t)}}.call(this);for(var a=0;a<e.length;a++)n.readAsDataURL(e[a])}},getTitle:function(){return"File Field"},getDescription:function(){return"Field for uploading files."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{selectionHandler:{title:"Selection Handler",description:"Function that should be called when files are selected. Requires HTML5.",type:"boolean",default:!1}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{selectionHandler:{type:"checkbox"}}})}}),t.registerFieldClass("file",t.Fields.FileField)}(jQuery),function(e){var t=e.alpaca;t.Fields.NumberField=t.Fields.TextField.extend({setup:function(){this.base(),void 0===this.options.numericEntry&&(this.options.numericEntry=!1)},getFieldType:function(){return"number"},postRender:function(e){var t=this;this.base((function(){t.control&&t.on("keypress",(function(e){var i=e.charCode||e.keyCode||0,n=!0;return t.options.numericEntry&&(n=n&&i>=48&&i<=57),n||(e.preventDefault(),e.stopImmediatePropagation()),n})),e()}))},getControlValue:function(){var e=this._getControlVal(!0);return void 0===e||""==e?e:parseFloat(e)},handleValidate:function(){var e=this.base(),i=this.validation,n=this._validateNumber();return i.stringNotANumber={message:n?"":this.getMessage("stringNotANumber"),status:n},n=this._validateDivisibleBy(),i.stringDivisibleBy={message:n?"":t.substituteTokens(this.getMessage("stringDivisibleBy"),[this.schema.divisibleBy]),status:n},n=this._validateMaximum(),i.stringValueTooLarge={message:"",status:n},n||(this.schema.exclusiveMaximum?i.stringValueTooLarge.message=t.substituteTokens(this.getMessage("stringValueTooLargeExclusive"),[this.schema.maximum]):i.stringValueTooLarge.message=t.substituteTokens(this.getMessage("stringValueTooLarge"),[this.schema.maximum])),n=this._validateMinimum(),i.stringValueTooSmall={message:"",status:n},n||(this.schema.exclusiveMinimum?i.stringValueTooSmall.message=t.substituteTokens(this.getMessage("stringValueTooSmallExclusive"),[this.schema.minimum]):i.stringValueTooSmall.message=t.substituteTokens(this.getMessage("stringValueTooSmall"),[this.schema.minimum])),n=this._validateMultipleOf(),i.stringValueNotMultipleOf={message:"",status:n},n||(i.stringValueNotMultipleOf.message=t.substituteTokens(this.getMessage("stringValueNotMultipleOf"),[this.schema.multipleOf])),e&&i.stringNotANumber.status&&i.stringDivisibleBy.status&&i.stringValueTooLarge.status&&i.stringValueTooSmall.status&&i.stringValueNotMultipleOf.status&&i.invalidPattern.status&&i.stringTooLong.status&&i.stringTooShort.status},_validateOptional:function(){return!(!this.isDisplayOnly()&&this.isRequired()&&t.isValEmpty(e(this.control).val()))},_validateNumber:function(){var e=this._getControlVal();if("number"==typeof e&&(e=""+e),t.isValEmpty(e))return!0;if(!t.testRegex(t.regexps.number,e))return!1;var i=this.getValue();return!isNaN(i)},_validateDivisibleBy:function(){var e=this.getValue();return!(!t.isEmpty(this.schema.divisibleBy)&&e%this.schema.divisibleBy!=0)},_validateMaximum:function(){var e=this.getValue();if(!t.isEmpty(this.schema.maximum)){if(e>this.schema.maximum)return!1;if(!t.isEmpty(this.schema.exclusiveMaximum)&&e==this.schema.maximum&&this.schema.exclusiveMaximum)return!1}return!0},_validateMinimum:function(){var e=this.getValue();if(!t.isEmpty(this.schema.minimum)){if(e<this.schema.minimum)return!1;if(!t.isEmpty(this.schema.exclusiveMinimum)&&e==this.schema.minimum&&this.schema.exclusiveMinimum)return!1}return!0},_validateMultipleOf:function(){var e=this.getValue();return!(!t.isEmpty(this.schema.multipleOf)&&e&&this.schema.multipleOf>0)||e%this.schema.multipleOf==0},getType:function(){return"number"},onKeyPress:function(e){var i=this;if(9!==e.keyCode&&37!==e.keyCode&&38!==e.keyCode&&39!==e.keyCode&&40!==e.keyCode){if(8===e.keyCode){if(!t.isEmpty(i.schema.minLength)&&(i.options.constrainLengths||i.options.constrainMinLength)){var n=i.getValue()||"";t.isNumber(n)&&(n=n.toString()),n.length<=i.schema.minLength&&(e.preventDefault(),e.stopImmediatePropagation())}}else t.isEmpty(i.schema.maxLength)||!i.options.constrainLengths&&!i.options.constrainMaxLength||(n=i.getValue()||"",t.isNumber(n)&&(n=n.toString()),n.length>=i.schema.maxLength&&(e.preventDefault(),e.stopImmediatePropagation()));32===e.keyCode&&i.options.disallowEmptySpaces&&(e.preventDefault(),e.stopImmediatePropagation())}},onKeyUp:function(t){this.updateMaxLengthIndicator(),e(this.field).trigger("fieldkeyup")},getSchemaOfSchema:function(){return t.merge(this.base(),{properties:{multipleOf:{title:"Multiple Of",description:"Property value must be a multiple of the multipleOf schema property such that division by this value yields an interger (mod zero).",type:"number"},minimum:{title:"Minimum",description:"Minimum value of the property.",type:"number"},maximum:{title:"Maximum",description:"Maximum value of the property.",type:"number"},exclusiveMinimum:{title:"Exclusive Minimum",description:"Property value can not equal the number defined by the minimum schema property.",type:"boolean",default:!1},exclusiveMaximum:{title:"Exclusive Maximum",description:"Property value can not equal the number defined by the maximum schema property.",type:"boolean",default:!1}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{multipleOf:{title:"Multiple Of",description:"The value must be a integral multiple of the property",type:"number"},minimum:{title:"Minimum",description:"Minimum value of the property",type:"number"},maximum:{title:"Maximum",description:"Maximum value of the property",type:"number"},exclusiveMinimum:{rightLabel:"Exclusive minimum ?",helper:"Field value must be greater than but not equal to this number if checked",type:"checkbox"},exclusiveMaximum:{rightLabel:"Exclusive Maximum ?",helper:"Field value must be less than but not equal to this number if checked",type:"checkbox"}}})},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{numericEntry:{title:"Numeric Entry",description:"Whether to constrain data entry key presses to numeric values (0-9)",type:"boolean",default:!1}}})},getTitle:function(){return"Number Field"},getDescription:function(){return"Field for float numbers."}}),t.registerMessages({stringValueTooSmall:"The minimum value for this field is {0}",stringValueTooLarge:"The maximum value for this field is {0}",stringValueTooSmallExclusive:"Value of this field must be greater than {0}",stringValueTooLargeExclusive:"Value of this field must be less than {0}",stringDivisibleBy:"The value must be divisible by {0}",stringNotANumber:"This value is not a number.",stringValueNotMultipleOf:"This value is not a multiple of {0}"}),t.registerFieldClass("number",t.Fields.NumberField),t.registerDefaultSchemaFieldMapping("number","number")}(jQuery),function(e){var t=e.alpaca;t.Fields.ArrayField=t.ContainerField.extend({getFieldType:function(){return"array"},setup:function(){var i=this;this.base();var n=i.resolveContainerItemTemplateType();if(!n)return t.throwErrorWithCallback("Unable to find template descriptor for container item: "+i.getFieldType());this.containerItemTemplateDescriptor=i.view.getTemplateDescriptor("container-"+n+"-item",i),void 0===this.options.dragAndDrop&&(this.options.dragAndDrop=t.isEmpty(this.view.dragAndDrop)?t.defaultDragAndDrop:this.view.dragAndDrop),this.options.toolbarStyle||(this.options.toolbarStyle=t.isEmpty(this.view.toolbarStyle)?"button":this.view.toolbarStyle),this.options.toolbarStyle||(this.options.toolbarStyle="button"),this.options.actionbarStyle||(this.options.actionbarStyle=t.isEmpty(this.view.actionbarStyle)?"top":this.view.actionbarStyle),this.options.actionbarStyle||(this.options.actionbarStyle="top"),this.options.toolbarPosition||(this.options.toolbarPosition=t.isEmpty(this.view.toolbarPosition)?"top":this.view.toolbarPosition),this.options.toolbarPosition||(this.options.toolbarPosition="top"),this.schema.items||(this.schema.items={}),this.options.items||(this.options.items={}),this.schema.items&&this.schema.items.maxItems&&void 0===this.schema.maxItems&&(this.schema.maxItems=this.schema.items.maxItems,delete this.schema.items.maxItems),this.schema.items&&this.schema.items.minItems&&void 0===this.schema.minItems&&(this.schema.minItems=this.schema.items.minItems,delete this.schema.items.minItems),this.schema.items&&this.schema.items.uniqueItems&&void 0===this.schema.uniqueItems&&(this.schema.uniqueItems=this.schema.items.uniqueItems,delete this.schema.items.uniqueItems),this.options.rubyrails=!1,this.parent&&this.parent.options&&this.parent.options.form&&this.parent.options.form.attributes&&(t.isEmpty(this.parent.options.form.attributes.rubyrails)||(this.options.rubyrails=!0));var a=t.defaultToolbarSticky;if(t.isEmpty(this.view.toolbarSticky)||(a=this.view.toolbarSticky),t.isEmpty(this.options.toolbarSticky)||(a=this.options.toolbarSticky),this.options.toolbarSticky=a,void 0===i.options.hideToolbarWithChildren&&(i.options.hideToolbarWithChildren=!0),this.schema.items&&this.schema.uniqueItems&&t.mergeObject(this.options,{forceRevalidation:!0}),(t.isEmpty(this.data)||""===this.data)&&(this.data=[]),t.isString(this.data))try{var o=t.parseJSON(this.data);if(!t.isArray(o)&&!t.isObject(o))return void t.logWarn("ArrayField parsed string data but it was not an array: "+this.data);this.data=o}catch(e){this.data=[this.data]}if(!t.isArray(this.data)&&!t.isObject(this.data))return t.logWarn("ArrayField data is not an array: "+JSON.stringify(this.data,null," "));var r=function(e,t,n){var a=i.findAction(e,t);for(var o in a||(a={core:!0},e.push(a)),n)a[o]||(a[o]=n[o])},s=function(e,t){var i=0;do{void 0===e[i].enabled&&(e[i].enabled=!0),t||delete e[i].label,e[i].enabled?i++:e.splice(i,1)}while(i<e.length);e.sort((function(e,t){return e.core&&!t.core?-1:!e.core&&t.core?1:0}))};if(i.toolbar={},i.options.toolbar)for(var l in i.options.toolbar)i.toolbar[l]=t.copyOf(i.options.toolbar[l]);if(void 0===i.toolbar.showLabels&&(i.toolbar.showLabels=!0),i.toolbar.actions||(i.toolbar.actions=[]),r(i.toolbar.actions,"add",{label:i.getMessage("addItemButtonLabel"),action:"add",iconClass:i.view.getStyle("addIcon"),click:function(e,t){i.handleToolBarAddItemClick((function(e){}))}}),s(i.toolbar.actions,i.toolbar.showLabels),i.actionbar={},i.options.actionbar)for(var c in i.options.actionbar)i.actionbar[c]=t.copyOf(i.options.actionbar[c]);void 0===i.actionbar.showLabels&&(i.actionbar.showLabels=!1),i.actionbar.actions||(i.actionbar.actions=[]),r(i.actionbar.actions,"add",{label:i.getMessage("addButtonLabel"),action:"add",iconClass:i.view.getStyle("addIcon"),click:function(e,t,n){i.handleActionBarAddItemClick(n,(function(e){}))}}),r(i.actionbar.actions,"remove",{label:i.getMessage("removeButtonLabel"),action:"remove",iconClass:i.view.getStyle("removeIcon"),click:function(e,t,n){i.handleActionBarRemoveItemClick(n,(function(e){}))}}),r(i.actionbar.actions,"up",{label:i.getMessage("upButtonLabel"),action:"up",iconClass:i.view.getStyle("upIcon"),click:function(e,t,n){i.handleActionBarMoveItemUpClick(n,(function(){}))}}),r(i.actionbar.actions,"down",{label:i.getMessage("downButtonLabel"),action:"down",iconClass:i.view.getStyle("downIcon"),click:function(e,t,n){i.handleActionBarMoveItemDownClick(n,(function(){}))}}),s(i.actionbar.actions,i.actionbar.showLabels);var d=this.data.length,u=e.extend(!0,{},this.data);u.length=d,this.data=Array.prototype.slice.call(u)},setValue:function(e){var i=this;if(e||(e=[]),t.isArray(e)){var n=0;do{if(n<i.children.length){var a=i.children[n];e.length>n?(a.setValue(e[n]),n++):i.removeItem(n,null,!0)}}while(n<i.children.length);n<e.length&&i.resolveItemSchemaOptions((function(a,o,r){if(a||t.logDebug("Unable to resolve schema for item: "+n),r)return t.throwErrorWithCallback("Circular reference detected for schema: "+JSON.stringify(a),i.errorCallback);for(var s=[];n<e.length;){var l=function(e,t){return function(n){i.addItem(e,a,o,t[e],(function(){n()}))}}(n,e);s.push(l),n++}t.parallel(s,(function(){}))}))}},getContainerValue:function(){if(0===this.children.length&&!this.isRequired())return[];for(var e=[],t=0;t<this.children.length;t++){var i=this.children[t].getValue();i!=i&&(i=void 0),void 0!==i&&e.push(i)}return e},createItems:function(e){var i=this,n=[];if(i.data&&i.data.length>0){var a=i.data.length,o={};i.resolveItemSchemaOptions((function(r,s,l){if(l)return t.throwErrorWithCallback("Circular reference detected for schema: "+JSON.stringify(r),i.errorCallback);for(var c=[],d=0;d<i.data.length;d++){var u=function(e,t){return function(n){i.createItem(e,r,s,t,(function(t){o[e]=t,n()}))}}(d,i.data[d]);c.push(u)}t.parallel(c,(function(t){for(var i=0;i<a;i++){var r=o[i];r&&n.push(r)}e(n)}))}))}else e(n)},createItem:function(i,n,a,o,r){var s=this;s._validateEqualMaxItems()&&e("<div></div>").alpaca({data:o,options:a,schema:n,view:this.view.id?this.view.id:this.view,connector:this.connector,error:function(e){s.destroy(),s.errorCallback.call(s,e)},notTopLevel:!0,render:function(e,t){e.parent=s,e.path=s.path+"["+i+"]",e.render(null,(function(){t&&t()}))},postRender:function(i){var n=t.tmpl(s.containerItemTemplateDescriptor,{id:s.getId(),name:i.name,parentFieldId:s.getId(),actionbarStyle:s.options.actionbarStyle,toolbarLocation:s.options.toolbarLocation,dragAndDrop:s.options.dragAndDrop,view:s.view,data:o}),a=e(n).find("."+t.MARKER_CLASS_CONTAINER_FIELD_ITEM_FIELD);0===a.length&&e(n).hasClass(t.MARKER_CLASS_CONTAINER_FIELD_ITEM_FIELD)&&(a=e(n)),0!==a.length?(e(a).before(i.getFieldEl()),e(a).remove(),i.containerItemEl=n,t.fieldApplyFieldAndChildren(i,(function(e){e.hideInitValidationError=!1})),t.isFunction(s.options.items.postRender)&&s.options.items.postRender.call(i,a),r&&r(i)):s.errorCallback.call(s,{message:"Cannot find insertion point for field: "+s.getId()})}})},resolveItemSchemaOptions:function(e){var i,n,a=this,o=function(t,i,n){a.options.readonly&&(i.readonly=!0),e(t,i,n)};!i&&a.options&&a.options.fields&&a.options.fields.item&&(i=a.options.fields.item),!i&&a.options&&a.options.items&&(i=a.options.items),a.schema&&a.schema.items&&(n=a.schema.items);var r=null;n&&(r=n.$ref);var s=null;if(i&&(s=i.$ref),r||s){for(var l=this,c=[l];l.parent;)l=l.parent,c.push(l);var d=n,u=i;
2t.loadRefSchemaOptions(l,r,s,(function(e,i){for(var n=0,a=0;a<c.length;a++)c[a].schema&&r&&(c[a].schema.id===r||c[a].schema.id==="#"+r||c[a].schema.$ref===r)&&n++;var s=n>10,l={};d&&t.mergeObject(l,d),e&&t.mergeObject(l,e),delete l.id;var p={};u&&t.mergeObject(p,u),i&&t.mergeObject(p,i),t.nextTick((function(){o(l,p,s)}))}))}else t.nextTick((function(){o(n,i)}))},handleValidate:function(){var e=this.base(),i=this.validation,n=this._validateUniqueItems();return i.valueNotUnique={message:n?"":this.getMessage("valueNotUnique"),status:n},n=this._validateMaxItems(),i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.minItems]),status:n},e&&i.valueNotUnique.status&&i.tooManyItems.status&&i.notEnoughItems.status},_validateEqualMaxItems:function(){return!(this.schema.maxItems&&this.schema.maxItems>=0&&this.getSize()>=this.schema.maxItems)},_validateEqualMinItems:function(){return!(this.schema.minItems&&this.schema.minItems>=0&&this.getSize()<=this.schema.minItems)},_validateMinItems:function(){return!(this.schema.minItems&&this.schema.minItems>=0&&this.getSize()<this.schema.minItems)},_validateMaxItems:function(){return!(this.schema.maxItems&&this.schema.maxItems>=0&&this.getSize()>this.schema.maxItems)},_validateUniqueItems:function(){if(this.schema.items&&this.schema.uniqueItems)for(var e={},i=0;i<this.children.length;i++){var n=this.children[i].getValue();if(n||(n=""),e[n=t.hashCode(n)])return!1;e[n]=!0}return!0},findAction:function(t,i){var n=null;return e.each(t,(function(e,t){t.action===i&&(n=t)})),n},postRender:function(e){var t=this;this.base((function(){t.updateToolbars(),e()}))},getSize:function(){return this.children.length},updateDOMElement:function(){this.updatePathAndName(),this.base()},updatePathAndName:function(){var i=function(n){n.children&&e.each(n.children,(function(a,o){n.prePath&&t.startsWith(o.path,n.prePath)&&(o.prePath=o.path,o.path=o.path.replace(n.prePath,n.path)),n.preName&&t.startsWith(o.name,n.preName)&&(o.preName=o.name,o.name=o.name.replace(n.preName,n.name),o.field&&e(o.field).attr("name",o.name)),i(o)}))};this.children&&this.children.length>0&&e.each(this.children,(function(t,n){var a=n.path.lastIndexOf("/"),o=n.path.substring(a+1),r=-1;o.indexOf("[")>0&&o.indexOf("]")>0&&(r=parseInt(o.substring(o.indexOf("[")+1,o.indexOf("]")))),r!==t&&(n.prePath=n.path,n.path=n.path.substring(0,a)+"/"+o.substring(0,o.indexOf("["))+"["+t+"]"),n.nameCalculated&&(n.preName=n.name,n.parent&&n.parent.name&&n.path?n.name=n.parent.name+"_"+t:n.path&&(n.name=n.path.replace(/\//g,"").replace(/\[/g,"_").replace(/\]/g,"")),this.parent.options.rubyrails?e(n.field).attr("name",n.parent.name):e(n.field).attr("name",n.name)),n.prePath||(n.prePath=n.path),i(n)}))},updateToolbars:function(){var t=this;if("display"!==this.view.type&&!this.schema.readonly){t.toolbar&&(t.fireCallback("arrayToolbar",!0),t.fireCallback("arrayToolbar")),t.actionbar&&(t.fireCallback("arrayActionbars",!0),t.fireCallback("arrayActionbars"));var i=e(this.getFieldEl()).find(".alpaca-array-toolbar[data-alpaca-array-toolbar-field-id='"+t.getId()+"']");if(this.children.length>0&&t.options.hideToolbarWithChildren?e(i).hide():(e(i).show(),e(i).find("[data-alpaca-array-toolbar-action]").each((function(){var i=e(this).attr("data-alpaca-array-toolbar-action"),n=t.findAction(t.toolbar.actions,i);n&&e(this).off().click((function(e){e.preventDefault(),n.click.call(t,i,n)}))}))),t.options.dragAndDrop){document.addEventListener("dragenter",(function(e){e.preventDefault()}),!1),document.addEventListener("dragover",(function(e){e.preventDefault()}),!1),e(t.getFieldEl()).off().on("drop",(function(e){e.preventDefault();var i=e.originalEvent.dataTransfer.getData("parentFieldId");if(i==t.getId()){var n=e.target.closest(".alpaca-container-item[data-alpaca-container-item-parent-field-id='"+i+"']");if(n){var a=n.dataset.alpacaContainerItemIndex,o=e.originalEvent.dataTransfer.getData("sourceIndex");t.moveItem(o,a),e.stopPropagation()}}}));var n=t.getFieldEl().find(".alpaca-container-item[data-alpaca-container-item-parent-field-id='"+t.getId()+"']");e(n).each((function(t){var i=null;e(this).attr("draggable",!0),e(this).off().on("mousedown",(function(e){e.stopPropagation(),i=e.target})),e(this).on("dragstart",(function(t){t.stopPropagation();var n=e(this).children(".alpaca-array-item-move")[0];
2if(n&&n.contains(i)){var a=t.originalEvent;a.dataTransfer.setData("sourceIndex",this.dataset.alpacaContainerItemIndex),a.dataTransfer.setData("parentFieldId",this.dataset.alpacaContainerItemParentFieldId),e(this).siblings(".alpaca-container-item").each((function(){e(this).children(".alpaca-array-item-move").css({color:"#2CEAA3"})}))}else t.preventDefault()})),e(this).on("dragend",(function(t){t.stopPropagation(),e(".alpaca-array-item-move").css({color:"#333"})}))}))}void 0===this.options.toolbarSticky||null===this.options.toolbarSticky?(n=this.getFieldEl().find(".alpaca-container-item[data-alpaca-container-item-parent-field-id='"+t.getId()+"']"),e(n).each((function(i){var n=e(t.getFieldEl()).find(".alpaca-array-actionbar[data-alpaca-array-actionbar-parent-field-id='"+t.getId()+"'][data-alpaca-array-actionbar-item-index='"+i+"']");n&&n.length>0&&(e(this).hover((function(){e(n).show()}),(function(){e(n).hide()})),e(n).hide())}))):this.options.toolbarSticky?e(t.getFieldEl()).find(".alpaca-array-actionbar[data-alpaca-array-actionbar-parent-field-id='"+t.getId()+"']").css("display","inline-block"):this.options.toolbarSticky||e(t.getFieldEl()).find(".alpaca-array-actionbar[data-alpaca-array-actionbar-parent-field-id='"+t.getId()+"']").hide();var a=e(t.getFieldEl()).find(".alpaca-array-actionbar[data-alpaca-array-actionbar-parent-field-id='"+t.getId()+"']");e(a).each((function(){var i=e(this).attr("data-alpaca-array-actionbar-item-index");"string"==typeof i&&(i=parseInt(i,10)),e(this).children("[data-alpaca-array-actionbar-action]").each((function(){var n=e(this).attr("data-alpaca-array-actionbar-action"),a=t.findAction(t.actionbar.actions,n);a&&e(this).off().click((function(e){e.preventDefault(),a.click.call(t,n,a,i)}))})),t._validateEqualMaxItems()?(e(this).children("[data-alpaca-array-toolbar-action='add']").each((function(i){e(this).removeClass("alpaca-button-disabled"),t.fireCallback("enableButton",this)})),e(this).children("[data-alpaca-array-actionbar-action='add']").each((function(i){e(this).removeClass("alpaca-button-disabled"),t.fireCallback("enableButton",this)}))):(e(this).children("[data-alpaca-array-toolbar-action='add']").each((function(i){e(this).addClass("alpaca-button-disabled"),t.fireCallback("disableButton",this)})),e(this).children("[data-alpaca-array-actionbar-action='add']").each((function(i){e(this).addClass("alpaca-button-disabled"),t.fireCallback("disableButton",this)}))),t._validateEqualMinItems()?e(this).children("[data-alpaca-array-actionbar-action='remove']").each((function(i){e(this).removeClass("alpaca-button-disabled"),t.fireCallback("enableButton",this)})):e(this).children("[data-alpaca-array-actionbar-action='remove']").each((function(i){e(this).addClass("alpaca-button-disabled"),t.fireCallback("disableButton",this)}))})),e(a).first().children("[data-alpaca-array-actionbar-action='up']").each((function(){e(this).addClass("alpaca-button-disabled"),t.fireCallback("disableButton",this)})),e(a).last().children("[data-alpaca-array-actionbar-action='down']").each((function(){e(this).addClass("alpaca-button-disabled"),t.fireCallback("disableButton",this)}))}},doResolveItemContainer:function(){return e(this.container)},handleToolBarAddItemClick:function(e){var i=this;i.resolveItemSchemaOptions((function(n,a,o){if(o)return t.throwErrorWithCallback("Circular reference detected for schema: "+JSON.stringify(n),i.errorCallback);var r=i.children.length,s=t.createEmptyDataInstance(n);i.addItem(r,n,a,s,(function(t){e&&e(t)}))}))},handleActionBarAddItemClick:function(e,i){var n=this;n.resolveItemSchemaOptions((function(a,o,r){if(r)return t.throwErrorWithCallback("Circular reference detected for schema: "+JSON.stringify(a),n.errorCallback);var s=n.getValue(),l=t.createEmptyDataInstance(a);n.addItem(e+1,a,o,l,(function(t){s.splice(e+1,0,t.getValue()),n.setValue(s),i&&i(t)}))}))},handleActionBarRemoveItemClick:function(e,t){this.removeItem(e,(function(){t&&t()}))},handleActionBarMoveItemUpClick:function(e,t){this.swapItem(e,e-1,this.options.animate,(function(){t&&t()}))},handleActionBarMoveItemDownClick:function(e,t){this.swapItem(e,e+1,this.options.animate,(function(){t&&t()}))},doAddItem:function(i,n,a){var o=this.doResolveItemContainer();if(0===i)e(o).append(n.containerItemEl);else{var r=o.children("[data-alpaca-container-item-index='"+(i-1)+"']");r&&r.length>0&&r.after(n.containerItemEl)}this.doAfterAddItem(n,(function(e){t.fireReady(n),a(e)}))},doAfterAddItem:function(e,t){t()},addItem:function(e,i,n,a,o){var r=this;r._validateEqualMaxItems()&&r.createItem(e,i,n,a,(function(i){r.registerChild(i,e),r.doAddItem(e,i,(function(){r.handleRepositionDOMRefresh(),r.updateToolbars(),r.refreshValidationState(),r.trigger("add",i),r.triggerUpdate(),o&&t.nextTick((function(){o(i)}))}))}))},doRemoveItem:function(e,t){this.doResolveItemContainer().children(".alpaca-container-item[data-alpaca-container-item-index='"+e+"']").remove(),this.doAfterRemoveItem(e,(function(e){t(e)}))},doAfterRemoveItem:function(e,t){t()},removeItem:function(e,i,n){var a=this;
2(this._validateEqualMinItems()||n)&&(a.unregisterChild(e),a.doRemoveItem(e,(function(){a.handleRepositionDOMRefresh(),a.updateToolbars(),a.refreshValidationState(),a.trigger("remove",e),a.triggerUpdate(),i&&t.nextTick((function(){i()}))})))},moveItem:function(i,n,a,o){var r=this;if("function"==typeof a&&(o=a,a=r.options.animate),void 0===a&&(a=!r.options.animate||r.options.animate),"string"==typeof i&&(i=parseInt(i,10)),"string"==typeof n&&(n=parseInt(n,10)),n<0&&(n=0),n>=r.children.length&&(n=r.children.length-1),-1!==n&&i!==n&&r.children[n]){var s=function(){var e=n;i<n&&e--;var a=r.children.splice(i,1)[0];r.children.splice(e,0,a),r.data=r.getValue(),r.refresh((function(){r.refreshValidationState(),r.triggerUpdate(),r.trigger("move"),o&&t.nextTick((function(){o()}))}))},l=0;if(a&&(l=500),l>0){var c=r.getId(),d=r.getContainerEl().find(".alpaca-container-item[data-alpaca-container-item-index='"+i+"'][data-alpaca-container-item-parent-field-id='"+c+"']"),u=r.getContainerEl().find(".alpaca-container-item[data-alpaca-container-item-index='"+n+"'][data-alpaca-container-item-parent-field-id='"+c+"']"),p=e("<div class='tempMarker1'></div>");d.before(p);var h=e("<div class='tempMarker2'></div>");u.before(h),t.animatedMove(d,u,l,(function(){s()}))}else s()}},swapItem:function(i,n,a,o){var r=this;if("function"==typeof a&&(o=a,a=r.options.animate),void 0===a&&(a=!r.options.animate||r.options.animate),"string"==typeof i&&(i=parseInt(i,10)),"string"==typeof n&&(n=parseInt(n,10)),n<0&&(n=0),n>=r.children.length&&(n=r.children.length-1),-1!==n&&i!==n&&r.children[n]){var s=function(){var e=r.children[i],a=r.children[n];r.children[i]=a,r.children[n]=e,r.data=r.getValue(),r.refresh((function(){r.refreshValidationState(),r.triggerUpdate(),r.trigger("move"),o&&t.nextTick((function(){o()}))}))},l=0;if(a&&(l=500),l>0){var c=r.getId(),d=r.getContainerEl().find(".alpaca-container-item[data-alpaca-container-item-index='"+i+"'][data-alpaca-container-item-parent-field-id='"+c+"']"),u=r.getContainerEl().find(".alpaca-container-item[data-alpaca-container-item-index='"+n+"'][data-alpaca-container-item-parent-field-id='"+c+"']"),p=e("<div class='tempMarker1'></div>");d.before(p);var h=e("<div class='tempMarker2'></div>");u.before(h),t.animatedSwap(d,u,l,(function(){s()}))}else s()}},getType:function(){return"array"},getTitle:function(){return"Array Field"},getDescription:function(){return"Field for list of items with same data type or structure."},getSchemaOfSchema:function(){var e={properties:{items:{title:"Array Items",description:"Schema for array items.",type:"object"},minItems:{title:"Minimum Items",description:"Minimum number of items.",type:"number"},maxItems:{title:"Maximum Items",description:"Maximum number of items.",type:"number"},uniqueItems:{title:"Items Unique",description:"Item values should be unique if true.",type:"boolean",default:!1}}};return this.children&&this.children[0]&&t.merge(e.properties.items.properties,this.children[0].getSchemaOfSchema()),t.merge(this.base(),e)},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{items:{type:"object"},minItems:{type:"integer"},maxItems:{type:"integer"},uniqueItems:{type:"checkbox"}}})},getSchemaOfOptions:function(){var e={properties:{dragAndDrop:{title:"Drag and Drop",description:"If true, drag and drop is enabled for array items.",type:"boolean",default:!1},toolbarSticky:{title:"Sticky Toolbar",description:"If true, the array item toolbar will always be enabled. If false, the toolbar is always disabled. If undefined or null, the toolbar will appear when hovered over.",type:"boolean",default:void 0},toolbarStyle:{title:"Toolbar Style",description:"The kind of top-level toolbar to render for the array field. Either 'button' or 'link'.",type:"string",default:"button"},toolbarPosition:{title:"Toolbar Position",description:"Location of the top-level toolbar to render for the array field. Either 'top' or 'bottom'.",type:"string",default:"top"},actionbarStyle:{title:"Actionbar Style",description:"The kind of actionbar to render for each item in the array. Either 'top', 'bottom', 'left', or 'right'.",type:"string",default:"top"},toolbar:{type:"object",title:"Toolbar Configuration",properties:{showLabels:{type:"boolean",default:!0,title:"Whether to show labels next to actions"},actions:{type:"array",title:"Toolbar Actions Configuration",items:{action:{type:"string",title:"Action Key"},label:{type:"string",title:"Action Label"},iconClass:{type:"string",title:"Action CSS Classes for Icon"},click:{type:"function",title:"Action Click Handler"},enabled:{type:"boolean",title:"Whether to enable the action",default:!0}}}}},actionbar:{type:"object",properties:{showLabels:{type:"boolean",default:!1,title:"Whether to show labels next to actions"},actions:{type:"array",title:"Actions Bar Actions Configuration",items:{action:{type:"string",title:"Action Key"},label:{type:"string",title:"Action Label"},iconClass:{type:"string",title:"Action CSS Classes for Icon"},click:{type:"function",title:"Action Click Handler"},enabled:{type:"boolean",title:"Whether to enable the action",default:!0}}}}},hideToolbarWithChildren:{type:"boolean",title:"Hide Toolbar with Children",description:"Indicates whether to hide the top toolbar when child elements are available.",default:!0}}};return this.children&&this.children[0]&&t.merge(e.properties.items.properties,this.children[0].getSchemaOfSchema()),t.merge(this.base(),e)},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{dragAndDrop:{type:"checkbox"},toolbarSticky:{type:"checkbox"},items:{type:"object",fields:{}}}})}}),t.registerMessages({notEnoughItems:"The minimum number of items is {0}",tooManyItems:"The maximum number of items is {0}",valueNotUnique:"Values are not unique",notAnArray:"This value is not an Array"}),t.registerFieldClass("array",t.Fields.ArrayField),t.registerDefaultSchemaFieldMapping("array","array"),t.registerMessages({addItemButtonLabel:"Add New Item",addButtonLabel:"Add",removeButtonLabel:"Remove",upButtonLabel:"Up",downButtonLabel:"Down"})}(jQuery),function(e){var t=e.alpaca;t.Fields.ObjectField=t.ContainerField.extend({getFieldType:function(){return"object"},setup:function(){var e=this;this.base();
2var i=e.resolveContainerItemTemplateType();if(!i)return e.resolveContainerItemTemplateType(),t.throwErrorWithCallback("Unable to find template descriptor for container item: "+e.getFieldType());if(this.containerItemTemplateDescriptor=e.view.getTemplateDescriptor("container-"+i+"-item",e),!t.isEmpty(this.data)&&""!==this.data&&!t.isObject(this.data)){if(!t.isString(this.data))return;try{if(this.data=t.parseJSON(this.data),!t.isObject(this.data))return void t.logWarn("ObjectField parsed data but it was not an object: "+JSON.stringify(this.data))}catch(e){return}}},setValue:function(e){if(e||(e={}),t.isObject(e)){var i={};for(var n in this.childrenById)i[r=this.childrenById[n].propertyId]=this.childrenById[n];var a={};for(var o in e)e.hasOwnProperty(o)&&(a[o]=e[o]);for(var r in a)(s=i[r])&&(s.setValue(a[r]),delete i[r],delete a[r]);for(var r in i){var s;(s=i[r]).setValue(null)}}},getContainerValue:function(){if(0===this.children.length&&!this.isRequired())return{};for(var e={},i=0;i<this.children.length;i++){var n=this.children[i].propertyId,a=this.children[i].getValue();if(a!=a&&(a=void 0),void 0!==a&&this.determineAllDependenciesValid(n)){var o=null;"boolean"==typeof a?o=!!a:(t.isArray(a)||t.isObject(a)||t.isNumber(a)||a||0===a)&&(o=a),null!==o&&(e[n]=o)}}return e},afterRenderContainer:function(e,i){var n=this;this.base(e,(function(){if(n.isTopLevel()&&n.view){n.wizardConfigs=n.view.getWizard(),void 0!==n.wizardConfigs&&(n.wizardConfigs&&!0!==n.wizardConfigs||(n.wizardConfigs={}));var e=n.view.getLayout().templateDescriptor;n.wizardConfigs&&t.isObject(n.wizardConfigs)&&(!e||n.wizardConfigs.bindings?n.autoWizard():n.wizard())}i()}))},createItems:function(e){var i=this,n=[],a={};for(var o in i.data)a[o]=o;var r=i.data;i.schema&&i.schema.properties&&(r=i.schema.properties);var s={},l=[];for(var c in r){var d=null;i.data&&i.data.hasOwnProperty(c)&&(d=i.data[c]);var u=function(e,i,n,a){return function(o){e.resolvePropertySchemaOptions(i,(function(r,l,c){if(c)return t.throwErrorWithCallback("Circular reference detected for schema: "+JSON.stringify(r),e.errorCallback);r||t.logDebug("Unable to resolve schema for property: "+i),e.createItem(i,r,l,n,null,(function(e){s[i]=e,delete a[i],o()}))}))}}(i,c,d,a);l.push(u)}t.parallel(l,(function(i){for(var o in r){var l=s[o];l&&n.push(l)}for(var c=!1,d=0;d<n.length;d++)if(void 0!==n[d].options.order){c=!0;break}c&&n.sort((function(e,t){var i=e.options.order;i||(i=0);var n=t.options.order;return n||(n=0),i-n})),function(){var i=[];for(var o in a)i.push(o);i.length>0&&t.logDebug("There were "+i.length+" extra data keys that were not part of the schema "+JSON.stringify(i)),e(n)}()}))},createItem:function(i,n,a,o,r,s){var l=this;e("<div></div>").alpaca({data:o,options:a,schema:n,view:this.view.id?this.view.id:this.view,connector:this.connector,error:function(e){l.destroy(),l.errorCallback.call(l,e)},notTopLevel:!0,render:function(e,t){e.parent=l,e.propertyId=i,"/"!==l.path?e.path=l.path+"/"+i:e.path=l.path+i,e.render(null,(function(){t&&t()}))},postRender:function(i){var n=t.tmpl(l.containerItemTemplateDescriptor,{id:l.getId(),name:i.name,parentFieldId:l.getId(),actionbarStyle:l.options.actionbarStyle,view:l.view,data:o}),a=e(n).find("."+t.MARKER_CLASS_CONTAINER_FIELD_ITEM_FIELD);if(0===a.length&&e(n).hasClass(t.MARKER_CLASS_CONTAINER_FIELD_ITEM_FIELD)&&(a=e(n)),0===a.length)return l.errorCallback.call(l,{message:"Cannot find insertion point for field: "+l.getId()});e(a).before(i.getFieldEl()),e(a).remove(),i.containerItemEl=n,t.fieldApplyFieldAndChildren(i,(function(e){e.hideInitValidationError=!1})),s&&s(i)}})},resolvePropertySchemaOptions:function(e,i){var n=this,a=function(e,t,a){n.options.readonly&&(t.readonly=!0),i(e,t,a)},o=null;n.schema&&n.schema.properties&&n.schema.properties[e]&&(o=n.schema.properties[e]);var r={};n.options&&n.options.fields&&n.options.fields[e]&&(r=n.options.fields[e]);var s=null;o&&(s=o.$ref);var l=null;if(r&&(l=r.$ref),s||l){for(var c=this,d=[c];c.parent;)c=c.parent,d.push(c);var u=o,p=r;t.loadRefSchemaOptions(c,s,l,(function(e,i){for(var n=0,o=0;o<d.length;o++)s&&d[o].schema&&(d[o].schema.id===s||d[o].schema.id==="#"+s||d[o].schema.$ref===s)&&n++;var r=n>1,l={};u&&t.mergeObject(l,u),e&&t.mergeObject(l,e),u&&u.id&&(l.id=u.id);var c={};p&&t.mergeObject(c,p),i&&t.mergeObject(c,i),t.nextTick((function(){a(l,c,r)}))}))}else t.nextTick((function(){a(o,r)}))},applyCreatedItems:function(e,t){var i=this;
vendor: 5,041 bytes, line 2
2this.base(e,(function(){var n=function(a){if(a!==e.items.length){var o=e.items[a].propertyId;i.showOrHidePropertyBasedOnDependencies(o),i.bindDependencyFieldUpdateEvent(o),i.refreshDependentFieldStates(o),n(a+1)}else t()};n(0)}))},handleValidate:function(){var e=this.base(),i=this.validation,n=this._validateMaxProperties();return i.tooManyProperties={message:n?"":t.substituteTokens(this.getMessage("tooManyProperties"),[this.schema.maxProperties]),status:n},n=this._validateMinProperties(),i.tooFewProperties={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.minProperties]),status:n},e&&i.tooManyProperties.status&&i.tooFewProperties.status},_validateMaxProperties:function(){if(void 0===this.schema.maxProperties)return!0;var e=this.schema.maxProperties,t=0;for(var i in this.data)t++;return t<=e},_validateMinProperties:function(){if(void 0===this.schema.minProperties)return!0;var e=this.schema.minProperties,t=0;for(var i in this.data)t++;return t>=e},showOrHidePropertyBasedOnDependencies:function(e){var i=this.childrenByPropertyId[e];if(!i)return t.throwErrorWithCallback("Missing property: "+e,this.errorCallback);this.determineAllDependenciesValid(e)?(i.show(),i.onDependentReveal()):(i.hide(),i.onDependentConceal()),i.getFieldEl().trigger("fieldupdate")},getChildDependencies:function(e){var t=null;if(this.schema.dependencies&&(t=this.schema.dependencies[e]),!t){var i=this.childrenByPropertyId[e];i&&(t=i.schema.dependencies)}return t},getChildConditionalDependencies:function(e){var t=null,i=this.childrenByPropertyId[e];return i&&(t=i.options.dependencies),t},determineAllDependenciesValid:function(i){var n=this;if(!this.childrenByPropertyId[i])return t.throwErrorWithCallback("Missing property: "+i,n.errorCallback);var a=n.getChildDependencies(i);if(!a)return!0;var o=!0;return t.isString(a)?o=n.determineSingleDependencyValid(i,a):t.isArray(a)&&e.each(a,(function(e,t){o=o&&n.determineSingleDependencyValid(i,t)})),o},bindDependencyFieldUpdateEvent:function(i){var n=this,a=this.childrenByPropertyId[i];if(!a)return t.throwErrorWithCallback("Missing property: "+i,n.errorCallback);var o=n.getChildDependencies(i);if(!o)return!0;var r=function(e,i){var o=t.resolveField(n,i);o&&(o.getFieldEl().bind("fieldupdate",function(e,t,i,a){return function(t){n.showOrHidePropertyBasedOnDependencies(i),e.getFieldEl().trigger("fieldupdate")}}(a,0,e)),o.getFieldEl().trigger("fieldupdate"))};t.isString(o)?r(i,o):t.isArray(o)&&e.each(o,(function(e,t){r(i,t)}))},refreshDependentFieldStates:function(i){var n=this;if(!this.childrenByPropertyId[i])return t.throwErrorWithCallback("Missing property: "+i,n.errorCallback);var a=n.getChildDependencies(i);if(!a)return!0;var o=function(e){var i=t.resolveField(n,e);i&&i.getFieldEl().trigger("fieldupdate")};t.isString(a)?o(a):t.isArray(a)&&e.each(a,(function(e,t){o(t)}))},determineSingleDependencyValid:function(e,i){var n=t.resolveField(this,i);if(!n)return!1;var a=n.getValue(),o=!1,r=this.getChildConditionalDependencies(e);if(r&&0!==r.length){"boolean"!==n.getType()||a||(a=!1);var s=r[i];!t.isEmpty(s)&&t.isFunction(s)?o=s.call(this,a):(o=!0,t.isArray(s)?t.anyEquality(a,s)||(o=!1):t.isEmpty(s)||t.anyEquality(s,a)||(o=!1))}else o=!("boolean"===n.getType()&&!this.childrenByPropertyId[e].options.dependencies&&!a||t.isValEmpty(a));return n&&n.isHidden()&&(o=!1),o},getIndex:function(e){if(t.isEmpty(e))return-1;for(var i=0;i<this.children.length;i++)if(this.children[i].propertyId==e)return i;return-1},addItem:function(e,i,n,a,o,r){var s=this;this.createItem(e,i,n,a,o,(function(e){var i=null;if(o&&s.childrenById[o])for(var n=0;n<s.children.length;n++)if(s.children[n].getId()==o){i=n;break}s.registerChild(e,null!=i?i+1:0),s.doAddItem(i,e),s.handleRepositionDOMRefresh(),s.refreshValidationState(!0,(function(){s.trigger("add",e),s.triggerUpdate(),e.triggerWithPropagation.call(e,"ready","down"),r&&t.nextTick((function(){r()}))}))}))},doAddItem:function(i,n){var a=this;if(i){var o=a.getContainerEl().children("[data-alpaca-container-item-index='"+i+"']");o&&o.length>0&&o.after(n.containerItemEl)}else e(a.container).prepend(n.containerItemEl);a.doAfterAddItem(n,(function(){t.fireReady(n)}))},doAfterAddItem:function(e,t){t()},doResolveItemContainer:function(){return e(this.container)},removeItem:function(i,n){var a=this,o=this.childrenByPropertyId[i];o?(this.children=e.grep(this.children,(function(e,t){return e.propertyId!==i})),delete this.childrenByPropertyId[i],delete this.childrenById[o.getId()],a.doRemoveItem(o),this.refreshValidationState(!0,(function(){a.handleRepositionDOMRefresh(),a.trigger("remove",o),a.triggerUpdate(),n&&t.nextTick((function(){n()}))}))):n()},doRemoveItem:function(e){this.doResolveItemContainer().children(".alpaca-container-item[data-alpaca-container-item-name='"+e.name+"']").remove(),e.destroy()},wizard:function(){var i=this,n=this.wizardConfigs.steps;n||(n=[]);var a=this.wizardConfigs.title,o=this.wizardConfigs.description,r=this.wizardConfigs.buttons;for(var s in r||(r={}),r.previous||(r.previous={}
2),r.previous.title||(r.previous.title="Previous"),r.previous.align||(r.previous.align="left"),r.previous.type||(r.previous.type="button"),r.next||(r.next={}),r.next.title||(r.next.title="Next"),r.next.align||(r.next.align="right"),r.next.type||(r.next.type="button"),this.wizardConfigs.hideSubmitButton||(r.submit||(r.submit={}),r.submit.title||(r.submit.title="Submit"),r.submit.align||(r.submit.align="right"),r.submit.type||(r.submit.type="button")),r)r[s].type||(r[s].type="button");var l=this.wizardConfigs.showSteps;void 0===l&&(l=!0);var c=this.wizardConfigs.showProgressBar,d=this.wizardConfigs.validation;void 0===d&&(d=!0),a=e(this.field).attr("data-alpaca-wizard-title"),o=e(this.field).attr("data-alpaca-wizard-description");var u=e(this.field).attr("data-alpaca-wizard-validation");void 0!==u&&(d=!!u);var p=e(this.field).attr("data-alpaca-wizard-show-steps");void 0!==p&&(l=!!p);var h=e(this.field).attr("data-alpaca-wizard-show-progress-bar");void 0!==h&&(c=!!h);var f=e(this.field).find("[data-alpaca-wizard-role='step']");0==n.length&&f.each((function(t){var i={},a=e(this).attr("data-alpaca-wizard-step-title");void 0!==a&&(i.title=a),i.title||(i.title="Step "+t);var o=e(this).attr("data-alpaca-wizard-step-description");void 0!==o&&(i.description=o),i.description||(i.description="Step "+t),n.push(i)})),void 0===c&&n.length>1&&(c=!0);var m={};m.wizardTitle=a,m.wizardDescription=o,m.showSteps=l,m.performValidation=d,m.steps=n,m.buttons=r,m.schema=i.schema,m.options=i.options,m.data=i.data,m.showProgressBar=c,m.markAllStepsVisited=this.wizardConfigs.markAllStepsVisited,m.view=i.view;var g=i.view.getTemplateDescriptor("wizard",i);if(g){var v=t.tmpl(g,m);e(i.field).append(v);var b=e(v).find(".alpaca-wizard-nav"),y=e(v).find(".alpaca-wizard-steps"),x=e(v).find(".alpaca-wizard-buttons"),C=e(v).find(".alpaca-wizard-progress-bar");e(y).append(f),function(n,a,o,r){var s=0,l=e(o).find("[data-alpaca-wizard-button-key='previous']"),c=e(o).find("[data-alpaca-wizard-button-key='next']"),d=e(o).find("[data-alpaca-wizard-button-key='submit']"),u=function(){if(r.showSteps){if(r.visits||(r.visits={}),r.markAllStepsVisited)for(var t=e(n).find("[data-alpaca-wizard-step-index]"),i=0;i<t.length;i++)r.visits[i]=!0;for(r.visits[s]=!0,t=e(n).find("[data-alpaca-wizard-step-index]"),e(t).removeClass("disabled"),e(t).removeClass("completed"),e(t).removeClass("active"),e(t).removeClass("visited"),i=0;i<t.length;i++)i<s?e(n).find("[data-alpaca-wizard-step-index='"+i+"']").addClass("completed"):i===s?e(n).find("[data-alpaca-wizard-step-index='"+i+"']").addClass("active"):r.visits&&r.visits[i]||e(n).find("[data-alpaca-wizard-step-index='"+i+"']").addClass("disabled"),r.visits&&r.visits[i]&&e(n).find("[data-alpaca-wizard-step-index='"+i+"']").addClass("visited")}if(r.showProgressBar){var o=s+1,u=r.steps.length+1,p=parseInt(o/u*100,10)+"%";e(C).find(".progress-bar").attr("aria-valuemax",u),e(C).find(".progress-bar").attr("aria-valuenow",o),e(C).find(".progress-bar").css("width",p)}l.hide(),c.hide(),d.hide(),1==r.steps.length?d.show():r.steps.length>1&&(s>0&&l.show(),c.show(),0==s?c.show():s==r.steps.length-1&&(c.hide(),d.show())),e(a).find("[data-alpaca-wizard-role='step']").hide(),e(e(a).find("[data-alpaca-wizard-role='step']")[s]).show()},p=function(n,o){if(r.performValidation){var l=[],c=e(e(a).find("[data-alpaca-wizard-role='step']")[s]);e(c).find(".alpaca-field").each((function(){var t=e(this).attr("data-alpaca-field-id");if(t){var n=i.childrenById[t];n&&l.push(n)}}));for(var d=[],u=0;u<l.length;u++)d.push(function(e){return function(t){e.refreshValidationState(!0,(function(){t()}))}}(l[u]));t.parallel(d,(function(){for(var e=!0,t=0;t<l.length;t++)e=e&&l[t].isValid(!0);var a=r.buttons[n];a&&a.validate?a.validate.call(i,(function(t){o(e=e&&t)})):o(e)}))}else o(!0)};e(l).click((function(e){if(e.preventDefault(),s>=1){var t=r.buttons.previous;t&&t.click&&t.click.call(i,e),s--,u()}})),e(c).click((function(e){e.preventDefault(),s+1<=r.steps.length-1&&p("next",(function(t){if(t){var n=r.buttons.next;n&&n.click&&n.click.call(i,e),s++,u()}else window.setTimeout((function(){i.focus((function(e){}))}),250)}))})),e(d).click((function(e){e.preventDefault(),s===r.steps.length-1&&p("submit",(function(t){if(t){var n=r.buttons.submit;n&&(n.click?n.click.call(i,e):i.form&&i.form.submit())}else window.setTimeout((function(){i.focus((function(e){}))}),250)}))})),e(o).find("[data-alpaca-wizard-button-key]").each((function(){var t=e(this).attr("data-alpaca-wizard-button-key");if("submit"!=t&&"next"!=t&&"previous"!=t){var n=r.buttons[t];n&&n.click&&e(this).click(function(e){return function(t){e.click.call(i,t)}}(n))}})),e(n).find("[data-alpaca-wizard-step-index]").click((function(t){t.preventDefault();var i=e(this).attr("data-alpaca-wizard-step-index");i&&((i=parseInt(i,10))==s||r.visits&&r.visits[i])&&(i<s?(s=i,u()):i>s&&p(null,(function(e){e&&(s=i,u())})))})),i.on("moveToStep",(function(e){var t=e.index,i=e.skipValidation;void 0!==t&&t<=r.steps.length-1&&(i?(s=t,u()):p(null,(function(e){e&&(s=t,u())})))})),i.on("advanceOrSubmit",(function(t){p(null,(function(t){t&&(s===r.steps.length-1?e(d).click():e(c).click())}))})),u()}(b,y,x,m)}},autoWizard:function(){var t=this.wizardConfigs.bindings;for(var i in t||(t={}),this.childrenByPropertyId)t.hasOwnProperty(i)||(t[i]=1);var n=!0;e(this.field).find("[data-alpaca-wizard-role='step']").length>0&&(n=!1);var a=1,o=[];do{for(var i in o=[],t)t[i]===a&&this.childrenByPropertyId&&this.childrenByPropertyId[i]&&o.push(this.childrenByPropertyId[i]);if(o.length>0){var r=null;n?(r=e('<div data-alpaca-wizard-role="step"></div>'),e(this.field).append(r)):r=e(e(this.field).find("[data-alpaca-wizard-role='step']")[a-1]);for(var s=!1,l=0;l<o.length;l++)if(void 0!==o[l].options.order){s=!0;break}for(s&&o.sort((function(e,t){var i=e.options.order;i||(i=0);var n=t.options.order;return n||(n=0),i-n})),l=0;l<o.length;l++)e(r).append(o[l].containerItemEl);a++}}while(o.length>0);this.wizard(),0===e(this.container).children().length&&e(this.container).css("display","none")},getType:function(){return"object"},moveItem:function(i,n,a,o){var r=this;if("function"==typeof a&&(o=a,a=r.options.animate),void 0===a&&(a=!r.options.animate||r.options.animate),"string"==typeof i&&(i=parseInt(i,10)),"string"==typeof n&&(n=parseInt(n,10)),n<0&&(n=0),n>=r.children.length&&(n=r.children.length-1),-1!==n&&r.children[n]){var s=r.getContainerEl().children("[data-alpaca-container-item-index='"+i+"']"),l=r.getContainerEl().children("[data-alpaca-container-item-index='"+n+"']"),
vendor: 5,698 bytes, line 2
2c=e("<div class='tempMarker1'></div>");s.before(c);var d=e("<div class='tempMarker2'></div>");l.before(d);var u=function(){for(var t=[],a=0;a<r.children.length;a++)t[a]=a===i?r.children[n]:a===n?r.children[i]:r.children[a];r.children=t,c.replaceWith(l),d.replaceWith(s),r.handleRepositionDOMRefresh(),e(s).find("[data-alpaca-array-actionbar-item-index='"+i+"']").attr("data-alpaca-array-actionbar-item-index",n),e(l).find("[data-alpaca-array-actionbar-item-index='"+n+"']").attr("data-alpaca-array-actionbar-item-index",i),r.refreshValidationState(),r.triggerUpdate(),r.trigger("move"),o&&o()};a?t.animatedSwap(s,l,500,(function(){u()})):u()}},getTitle:function(){return"Object Field"},getDescription:function(){return"Object field for containing other fields"},getSchemaOfSchema:function(){var e={properties:{properties:{title:"Properties",description:"List of child properties.",type:"object"},maxProperties:{type:"number",title:"Maximum Number Properties",description:"The maximum number of properties that this object is allowed to have"},minProperties:{type:"number",title:"Minimum Number of Properties",description:"The minimum number of properties that this object is required to have"}}},i=e.properties.properties;if(i.properties={},this.children)for(var n=0;n<this.children.length;n++){var a=this.children[n].propertyId;i.properties[a]=this.children[n].getSchemaOfSchema(),i.properties[a].title=a+" :: "+i.properties[a].title}return t.merge(this.base(),e)},getSchemaOfOptions:function(){var e=t.merge(this.base(),{properties:{},order:{type:"number",title:"Order",description:"Allows for optional specification of the index of this field in the properties array."}}),i={properties:{fields:{title:"Field Options",description:"List of options for child fields.",type:"object"},collapsible:{title:"Collapsible",description:"Field set is collapsible if true.",type:"boolean",default:!1}}},n=i.properties.fields;if(n.properties={},this.children)for(var a=0;a<this.children.length;a++){var o=this.children[a].propertyId;n.properties[o]=this.children[a].getSchemaOfOptions(),n.properties[o].title=o+" :: "+n.properties[o].title}return t.merge(e,i)}}),t.registerMessages({tooManyProperties:"The maximum number of properties ({0}) has been exceeded.",tooFewProperties:"There are not enough properties ({0} are required)"}),t.registerFieldClass("object",t.Fields.ObjectField),t.registerDefaultSchemaFieldMapping("object","object")}(jQuery),function(e){var t=e.alpaca;t.Fields.AnyField=t.ControlField.extend({getFieldType:function(){return"any"},setup:function(){this.base()},getControlValue:function(){return this._getControlVal(!0)},setValue:function(e){t.isEmpty(e)?this.control.val(""):this.control.val(e),this.base(e)},disable:function(){this.control.disabled=!0},enable:function(){this.control.disabled=!1},focus:function(e){this.control.focus(),e&&e(this)},getType:function(){return"any"},getTitle:function(){return"Any Field"},getDescription:function(){return"Any field."},getSchemaOfSchema:function(){return t.merge(this.base(),{properties:{}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{}})},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{}})}}),t.registerFieldClass("any",t.Fields.AnyField),t.registerDefaultSchemaFieldMapping("any","any")}(jQuery),function(e){var t=e.alpaca;t.Fields.HiddenField=t.ControlField.extend({getFieldType:function(){return"hidden"},setup:function(){this.base()},getControlValue:function(){return this._getControlVal(!0)},setValue:function(e){t.isEmpty(e)?this.getControlEl().val(""):this.getControlEl().val(e),this.base(e)},getType:function(){return"string"},getTitle:function(){return"Hidden"},getDescription:function(){return"Field for a hidden HTML input"}}),t.registerFieldClass("hidden",t.Fields.HiddenField)}(jQuery),function(e){var t=e.alpaca;t.Fields.ListField=t.ControlField.extend({setup:function(){var i=this;if(i.base(),i.selectOptions=[],i.getEnum()){i.sortEnum();var n=i.getOptionLabels();e.each(i.getEnum(),(function(e,a){var o=a;n&&(t.isEmpty(n[e])?t.isEmpty(n[a])||(o=n[a]):o=n[e]),i.selectOptions.push({value:a,text:o})}))}i.options.datasource&&!i.options.dataSource&&(i.options.dataSource=i.options.datasource,delete i.options.datasource),void 0===i.options.useDataSourceAsEnum&&(i.options.useDataSourceAsEnum=!0),void 0===i.options.multiple&&(i.schema.type&&"array"===i.schema.type?i.options.multiple=!0:i.options.multiple=!1),i.setValue(this.data,!0)},prepareControlModel:function(e){var t=this;this.base((function(i){i.selectOptions=t.selectOptions,e(i)}))},populateDisplayableText:function(e){for(var i=[],n={},a=0;a<e.selectOptions.length;a++)n[e.selectOptions[a].value]=e.selectOptions[a].text;if("boolean"===this.schema.type)i.push(""+(e.data.length>0));else if(t.isArray(e.data))for(a=0;a<e.data.length;a++)(o=n[e.data[a].value])&&i.push(o);else{var o;(o=n[e.data.value])&&i.push(o)}e.displayableText=i.join(", ")},beforeRenderControl:function(e,t){var i=this,n=function(){for(var e=0;e<i.selectOptions.length;e++)for(var n=0;n<i.data.length;n++)i.data[n].value===i.selectOptions[e].value&&(i.selectOptions[e].selected=!0);0===i.data.length&&i.options.emptySelectFirst&&i.selectOptions.length>0&&(i.selectOptions[0].selected=!0,i.data=[i.selectOptions[0]]),0===i.data.length&&i.isRequired()&&i.selectOptions.length>0&&(i.selectOptions[0].selected=!0,i.data=[i.selectOptions[0]]),t()};this.base(e,(function(){i.populateDisplayableText(e),i.options.dataSource?(i.selectOptions.length=0,i.invokeDataSource(i.selectOptions,e,(function(){if(i.options.useDataSourceAsEnum){for(var e=[],t=[],a=0;a<i.selectOptions.length;
2a++)e.push(i.selectOptions[a].value),t.push(i.selectOptions[a].text);i.setEnum(e),i.setOptionLabels(t)}n()}))):n()}))},convertDataExternalToInternal:function(e){var t={};return e.value?t.value=e.value:e.id?t.value=e.id:e.val?t.value=e.val:e.v?t.value=e.v:e.key&&(t.value=e.key),e.text?t.text=e.text:e.title?t.text=e.title:e.label&&(t.text=e.label),t},convertDataInternalToExternal:function(e){return{value:e.value,text:e.text}},bindData:function(){},getValue:function(){var e=this;null!==this.data&&void 0!==this.data||(this.data=[]);var i=null;if(e.schema.type&&"string"!==e.schema.type)if("number"===e.schema.type)this.data.length>0&&(i=this.data[0].value);else if("boolean"===e.schema.type)i=this.data.length>0;else if("array"===e.schema.type){var n=[];for(o=0;o<this.data.length;o++)e.schema.items&&"string"===e.schema.items.type?n.push(this.data[o].value):n.push(e.convertDataInternalToExternal(this.data[o]));i=n}else"object"===e.schema.type&&this.data.length>0&&(i=e.convertDataInternalToExternal(this.data[0]));else{for(var a=[],o=0;o<this.data.length;o++)a.push(this.data[o].value);i=e.options.join&&t.isFunction(e.options.join)?e.options.join(a):a.join(",")}return i},setValue:function(e,i){var n=this,a=[],o=!1;if(t.isEmpty(e)||""===e)o=!0;else if(t.isString(e)){if(n.options.multiple){a=n.options.split&&t.isFunction(n.options.split)?n.options.split(e):e.split(",");for(var r=0;r<a.length;r++)a[r]=a[r].trim(),a[r]={text:a[r],value:a[r]}}else a.push({text:e,value:e});o=!0}else if(t.isBoolean(e))e&&a.push({text:"",value:!0}),o=!0;else if(t.isNumber(e))a.push({text:""+e,value:e}),o=!0;else if(t.isArray(e)){for(r=0;r<e.length;r++)t.isString(e[r])||t.isNumber(e[r])?a.push({text:""+e[r],value:e[r]}):a.push(n.convertDataExternalToInternal(e[r]));o=!0}else t.isObject(e)&&(a.push(n.convertDataExternalToInternal(e)),o=!0);if(!o)throw new Error("could not import data: "+e);this.data=a,i||n.afterSetValue()},afterSetValue:function(){},isEmpty:function(){return 0===this.data.length},_validateEnum:function(){var e=this,i=e.getEnum();if(!i)return!0;if(!this.isRequired()&&0===e.data.length)return!0;for(var n=!0,a=0;a<e.data.length;a++)if(!t.inArray(i,e.data[a].value)){n=!1;break}return n},_validateMinItems:function(){return!(this.schema.minItems&&this.schema.minItems>=0&&this.data.length<this.schema.minItems)},_validateMaxItems:function(){return!(this.schema.maxItems&&this.schema.maxItems>=0&&this.data.length>this.schema.maxItems)},handleValidate:function(){var e=this.base(),i=this.validation,n=this._validateMaxItems();return i.tooManyItems={message:n?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.maxItems]),status:n},n=this._validateMinItems(),i.notEnoughItems={message:n?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.minItems]),status:n},e&&i.tooManyItems.status&&i.notEnoughItems.status},getSchemaOfSchema:function(){return t.merge(this.base(),{properties:{enum:{title:"Enumeration",description:"List of field value options",type:"array",required:!0}}})},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{dataSource:{title:"Option Datasource",description:"Datasource for generating list of options. This can be a string or a function. If a string, it is considered S 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"},removeDefaultNone:{title:"Remove Default None",description:"If true, the default 'None' option will not be shown.",type:"boolean",default:!1},noneLabel:{title:"None Label",description:"The label to use for the 'None' option in a list (select, radio or otherwise).",type:"string",default:"None"},hideNone:{title:"Hide None",description:"Whether to hide the None option from a list (select, radio or otherwise). This will be true if the field is required and false otherwise.",type:"boolean",default:!1},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},split:{title:"Split Function",type:"function",description:"For multiple select lists. Defines a f(a) for how data strings should be split into
2individual values. A join function should also be defined which reverses this function."},join:{title:"Join Function",type:"function",description:"For multiple select lists. Defines a f(a) for how selected options should be combined into a single string. A split function should also be defined which reverses this function."}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{dataSource:{type:"text"},removeDefaultNone:{type:"checkbox",rightLabel:"Remove Default None"},noneLabel:{type:"text"},hideNone:{type:"checkbox",rightLabel:"Hide the 'None' option from the list"}}})}}),t.registerMessages({noneLabel:"None"})}(jQuery),function(e){var t=e.alpaca;t.Fields.CheckBoxField=t.Fields.ListField.extend({getFieldType:function(){return"checkbox"},setup:function(){var e=this;void 0===e.options.multiple&&(e.options.multiple=!1,("array"===e.schema.type||void 0!==e.schema.enum)&&(e.options.multiple=!0)),e.base(),e.options.multiple||this.options.rightLabel||(this.options.rightLabel="")},prepareControlModel:function(e){this.base((function(t){e(t)}))},afterRenderControl:function(i,n){var a=this;this.base(i,(function(){e(a.getFieldEl()).find("input:checkbox").change((function(i){!function(){var i=[];if(a.options.multiple)e(a.getFieldEl()).find("input:checkbox").each((function(){var n=e(this).attr("data-checkbox-value");if(t.checked(this))for(var o=0;o<a.selectOptions.length;o++)a.selectOptions[o].value===n&&i.push(a.selectOptions[o].value)}));else{var n=e(a.getFieldEl()).find("input:checkbox");t.checked(n)&&(i=!0)}a.setValue(i,!0),a.refreshValidationState(),a.triggerWithPropagation("change")}()})),n()}))},afterSetValue:function(){var i=this;if(t.checked(e(i.getFieldEl()).find("input:checkbox"),!1),i.options.multiple)for(var n=0;n<i.data.length;n++){var a=e(i.getFieldEl()).find("input:checkbox[data-checkbox-value='"+i.data[n].value+"']");t.checked(a,!0)}else a=e(i.getFieldEl()).find("input:checkbox"),i.data.length>0&&t.checked(a,!0)},disable:function(){e(this.control).addClass("disabled"),e(this.control).find("input").each((function(){e(this).disabled=!0,e(this).prop("disabled",!0)}))},enable:function(){e(this.control).removeClass("disabled"),e(this.control).find("input").each((function(){e(this).disabled=!1,e(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(e){var t=e.alpaca;t.Fields.RadioField=t.Fields.ListField.extend({getFieldType:function(){return"radio"},setup:function(){this.options.multiple=!1,this.base(),this.options.name?this.name=this.options.name:this.name||(this.name=this.getId()+"-name"),t.isUndefined(this.options.emptySelectFirst)&&(this.options.emptySelectFirst=!1),t.isUndefined(this.options.vertical)&&(this.options.vertical=!0)},initControlEvents:function(){var t=this;t.base();var i=e(t.control).find("input");
2i.focus((function(e){t.suspendBlurFocus||(t.onFocus.call(t,e),t.trigger("focus",e))})),i.blur((function(e){t.suspendBlurFocus||(t.onBlur.call(t,e),t.trigger("blur",e))}))},prepareControlModel:function(e){var t=this;this.base((function(i){i.removeDefaultNone=t.options.removeDefaultNone,void 0===t.options.noneLabel&&(t.options.noneLabel=t.getMessage("noneLabel")),void 0===t.options.hideNone&&(void 0!==t.options.removeDefaultNone?t.options.hideNone=t.options.removeDefaultNone:t.options.hideNone=t.isRequired()),e(i)}))},afterRenderControl:function(t,i){var n=this;this.base(t,(function(){e(n.control).find("input:radio").change((function(t){var i;t.preventDefault(),i=[],e(n.control).find("input:radio:checked").each((function(){for(var t=e(this).attr("value"),a=0;a<n.selectOptions.length;a++)n.selectOptions[a].value===t&&i.push(n.selectOptions[a].value)})),n.setValue(i,!0),n.refreshValidationState(),n.triggerWithPropagation("change")})),n.options.vertical?e(n.control).css("display","block"):e(n.control).css("display","inline-block"),i()}))},updateDOMElement:function(){this.base(),e(this.control).find("input:radio").attr("name",this.getName())},afterSetValue:function(){var i=this;if(t.checked(e(i.control).find("input:radio"),!1),i.data.length>0)for(var n=0;n<i.data.length;n++){var a=e(i.control).find("input:radio[value='"+i.data[n].value+"']");a.length>0&&t.checked(a,!0)}},disable:function(){this.base(),this.getFieldEl().addClass("disabled")},enable:function(){this.base(),this.getFieldEl().removeClass("disabled")},getTitle:function(){return"Radio Group Field"},getDescription:function(){return"Radio Group Field with list of options."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{name:{title:"Field name",description:"Field name.",type:"string"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean",default:!1},vertical:{title:"Position the radio selector items vertically",description:"By default, radio controls are stacked vertically. Set to false if you'd like radio controls to lay out horizontally.",type:"boolean",default:!0}}})}}),t.registerFieldClass("radio",t.Fields.RadioField)}(jQuery),function(e){var t=e.alpaca;t.Fields.SelectField=t.Fields.ListField.extend({getFieldType:function(){return"select"},setup:function(){var t=this;this.base(),t.options.multiple&&e.fn.multiselect&&void 0===t.options.hideNone&&(t.options.hideNone=!0),this.schema.items&&this.schema.items.maxItems&&void 0===this.schema.maxItems&&(this.schema.maxItems=this.schema.items.maxItems,delete this.schema.items.maxItems),this.schema.items&&this.schema.items.minItems&&void 0===this.schema.minItems&&(this.schema.minItems=this.schema.items.minItems,delete this.schema.items.minItems),!t.options.multiselect&&e.fn.multiselect&&(t.options.multiselect={}),t.options.multiselect&&void 0===t.options.multiselect.disableIfEmpty&&(t.options.multiselect.disableIfEmpty=!0),t.isDisplayOnly()&&delete t.options.multiselect},initControlEvents:function(){var e=this;if(e.base(),e.options.multiple){var t=this.control.parent().find("button.multiselect");t.focus((function(t){e.suspendBlurFocus||(e.onFocus.call(e,t),e.trigger("focus",t))})),t.blur((function(t){e.suspendBlurFocus||(e.onBlur.call(e,t),e.trigger("blur",t))}))}},prepareControlModel:function(e){var t=this;this.base((function(i){void 0===t.options.noneLabel&&(t.options.noneLabel=t.getMessage("noneLabel")),void 0===t.options.hideNone&&(void 0!==t.options.removeDefaultNone?t.options.hideNone=t.options.removeDefaultNone:t.options.hideNone=t.isRequired()),e(i)}))},afterRenderControl:function(i,n){var a=this;this.base(i,(function(){if(a.options.multiple&&e.fn.multiselect&&!a.isDisplayOnly()){var o=null;(o=a.options.multiselect?a.options.multiselect:{}).nonSelectedText||(o.nonSelectedText="None",a.options.noneLabel&&(o.nonSelectedText=a.options.noneLabel)),e(a.getControlEl()).multiselect(o)}e(a.control).change((function(n){!function(){var n=[],o=e(a.control).val();o||(o=[]),t.isString(o)&&(o=[o]);for(var r={},s=0;s<i.selectOptions.length;s++)r[i.selectOptions[s].value]=i.selectOptions[s];for(s=0;s<o.length;s++)r[o[s]]&&n.push(r[o[s]].value);a.setValue(n,!0),a.refreshValidationState(),a.triggerWithPropagation("change")}()})),n()}))},afterSetValue:function(){var t=this;if(t.data.length>0){for(var i=[],n=0;n<t.data.length;n++)i.push(t.data[n].value);e(t.control).val(i)}},focus:function(t){this.control&&this.control.length>0&&(e(this.control).get(0).focus(),t&&t(this))},disable:function(){this.base(),this.options.multiselect&&e(this.getControlEl()).multiselect("disable")},enable:function(){this.base(),this.options.multiselect&&e(this.getControlEl()).multiselect("enable")},getTitle:function(){return"Select Field"},getDescription:function(){return"Select Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Multiple 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"}}
vendor: 4,431 bytes, line 2
2})}}),t.registerFieldClass("select",t.Fields.SelectField)}(jQuery),function(e){var t=e.alpaca;t.Fields.ChooserField=t.Fields.ListField.extend({getFieldType:function(){return"chooser"},setup:function(){this.options.multiple=!0,this.base()},getEnum:function(){if(this.schema){if(this.schema.enum)return this.schema.enum;if(this.schema.type&&"array"===this.schema.type&&this.schema.items&&this.schema.items.enum)return this.schema.items.enum}},prepareControlModel:function(e){var t=this;this.base((function(i){t.options.height&&(i.height=t.options.height),t.options.showAllSelections&&(i.showAllSelections=t.options.showAllSelections),e(i)}))},beforeRenderControl:function(e,t){var i=this;this.base(e,(function(){e.unselected=[],e.selected=[];for(var n={},a=0,o=0;o<i.selectOptions.length;o++)i.selectOptions[o].selected?n[i.selectOptions[o].value]=i.selectOptions[o]:(e.unselected.push(i.selectOptions[o]),i.selectOptions[o].unselectedIndex=a,a++);for(o=0;o<i.data.length;o++)e.selected.push(n[i.data[o].value]);t()}))},filterUnselectedItems:function(t){t||(t=""),e(this.control).find(".chooser-filter input").val(t),e(this.control).find(".chooser-panel-unselected .chooser-item").each((function(){var i=e(this).attr("data-chooser-item-text");e(this).show(),t&&-1===i.toLowerCase().indexOf(t.toLowerCase())&&e(this).hide()}))},handleRefresh:function(){var t=e(this.control).find(".chooser-filter input").val();this.refresh((function(){this.filterUnselectedItems(t)}))},afterRenderControl:function(t,i){var n=this;this.base(t,(function(){var a=function(t){var i=e(t).parent().parent().attr("data-chooser-item-index");return i&&(i=parseInt(i,10)),i},o=function(){for(var e=[],i=0;i<t.selected.length;i++)e.push(t.selected[i]);n.data=e,n.handleRefresh()};e(n.control).find("button.btn-add").off().click((function(e){e.preventDefault();var i=a(this);if(i>-1){var n=t.unselected.splice(i,1);t.selected.push(n[0]),o()}})),e(n.control).find("button.btn-remove").off().click((function(e){e.preventDefault();var i=a(this);if(i>-1){var n=t.selected.splice(i,1);t.unselected.push(n[0]),o()}})),e(n.control).find("button.btn-up").off().click((function(e){e.preventDefault();var i=a(this);if(i>0){var n=t.selected.splice(i,1);t.selected.splice(i-1,0,n[0]),o()}})),e(n.control).find("button.btn-down").off().click((function(e){e.preventDefault();var i=a(this);if(i<t.selected.length-1){var n=t.selected.splice(i,1);t.selected.splice(i+1,0,n[0]),o()}})),e(n.control).find(".chooser-filter input").off().keyup((function(t){var i=e(this).val();n.filterUnselectedItems(i)})),setTimeout((function(){if(void 0===t.height){var i=-1;e(n.control).find(".chooser-panel-items").each((function(){e(this).height()>i&&(i=e(this).height())})),i>-1&&(t.height=i)}t.height&&(e(n.control).find(".chooser-panel-items").css("height",t.height),e(n.control).find(".chooser-item-message").css("text-align","center"),e(n.control).find(".chooser-item-message").css("margin-top",e(n.control).find(".chooser-panel-items").height()/2-8+"px"))}),0),i()}))},afterSetValue:function(){this.handleRefresh()},focus:function(e){e&&e(this)},disable:function(){e(this.control).find(".chooser-panel-items .chooser-item .chooser-item-buttons button.btn").addClass("disabled"),e(this.control).find(".chooser-panel-items .chooser-item").addClass("disabled"),e(this.control).find(".chooser-filter input").attr("disabled","disabled")},enable:function(){this.handleRefresh()},getTitle:function(){return"Chooser Field"},getDescription:function(){return"Chooser Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{showAllSelections:{type:"boolean",title:"Show All Selections",description:"When true, show full selection list and disable anything already selected",default:!1},height:{type:"number",title:"Height",description:"Specify a fixed height for the list boxes. If not provided, the list boxes size to the amount of data."}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{}})}}),t.registerFieldClass("chooser",t.Fields.ChooserField)}(jQuery),function(e){var t=e.alpaca;t.Fields.AddressField=t.Fields.ObjectField.extend({getFieldType:function(){return"address"},setup:function(){this.base(),this.data&&this.data.street||(this.data={street:["",""]}),this.schema={title:"Home Address",type:"object",properties:{street:{title:"Street",type:"array",items:{type:"string",maxLength:30},minItems:0,maxItems:3},city:{title:"City",type:"string"}
2,state:{title:"State",type:"string",enum:["AL","AK","AS","AZ","AR","CA","CO","CT","DE","DC","FM","FL","GA","GU","HI","ID","IL","IN","IA","KS","KY","LA","ME","MH","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","MP","OH","OK","OR","PW","PA","PR","RI","SC","SD","TN","TX","UT","VT","VI","VA","WA","WV","WI","WY"]},zip:{title:"Zip Code",type:"string",pattern:/^(\d{5}(-\d{4})?)?$/}}},t.merge(this.options,{fields:{zip:{maskString:"99999",size:5},state:{optionLabels:["ALABAMA","ALASKA","AMERICAN SAMOA","ARIZONA","ARKANSAS","CALIFORNIA","COLORADO","CONNECTICUT","DELAWARE","DISTRICT OF COLUMBIA","FEDERATED STATES OF MICRONESIA","FLORIDA","GEORGIA","GUAM","HAWAII","IDAHO","ILLINOIS","INDIANA","IOWA","KANSAS","KENTUCKY","LOUISIANA","MAINE","MARSHALL ISLANDS","MARYLAND","MASSACHUSETTS","MICHIGAN","MINNESOTA","MISSISSIPPI","MISSOURI","MONTANA","NEBRASKA","NEVADA","NEW HAMPSHIRE","NEW JERSEY","NEW MEXICO","NEW YORK","NORTH CAROLINA","NORTH DAKOTA","NORTHERN MARIANA ISLANDS","OHIO","OKLAHOMA","OREGON","PALAU","PENNSYLVANIA","PUERTO RICO","RHODE ISLAND","SOUTH CAROLINA","SOUTH DAKOTA","TENNESSEE","TEXAS","UTAH","VERMONT","VIRGIN ISLANDS","VIRGINIA","WASHINGTON","WEST VIRGINIA","WISCONSIN","WYOMING"]}}}),t.isEmpty(this.options.addressValidation)&&(this.options.addressValidation=!0)},isContainer:function(){return!1},getAddress:function(){var t=this.getValue();"view"===this.view.type&&(t=this.data);var i="";return t&&(t.street&&e.each(t.street,(function(e,t){i+=t+" "})),t.city&&(i+=t.city+" "),t.state&&(i+=t.state+" "),t.zip&&(i+=t.zip)),i},afterRenderContainer:function(t,i){var n=this;this.base(t,(function(){var t=n.getContainerEl();if(e(t).addClass("alpaca-addressfield"),n.options.addressValidation&&!n.isDisplayOnly()){e('<div style="clear:both;"></div>').appendTo(t);var a=e('<div class="alpaca-form-button">Show Google Map</div>').appendTo(t);a.button&&a.button({text:!0}),a.click((function(){if(google&&google.maps){var t=new google.maps.Geocoder,i=n.getAddress();t&&t.geocode({address:i},(function(t,i){if(i===google.maps.GeocoderStatus.OK){var a=n.getId()+"-map-canvas";0===e("#"+a).length&&e("<div id='"+a+"' class='alpaca-field-address-mapcanvas'></div>").appendTo(n.getFieldEl());var o=new google.maps.Map(document.getElementById(n.getId()+"-map-canvas"),{zoom:10,center:t[0].geometry.location,mapTypeId:google.maps.MapTypeId.ROADMAP});new google.maps.Marker({map:o,position:t[0].geometry.location})}else n.displayMessage("Geocoding failed: "+i)}))}else n.displayMessage("Google Map API is not installed.")})).wrap("<small/>"),n.options.showMapOnLoad&&a.click()}i()}))},getType:function(){return"any"},getTitle:function(){return"Address"},getDescription:function(){return"Standard US Address with Street, City, State and Zip. Also comes with support for Google map."},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("address",t.Fields.AddressField)}(jQuery),function(e){var t=e.alpaca;t.Fields.CKEditorField=t.Fields.TextAreaField.extend({getFieldType:function(){return"ckeditor"},setup:function(){this.data||(this.data=""),this.base(),void 0===this.options.ckeditor&&(this.options.ckeditor={})},afterRenderControl:function(t,i){var n=this;this.base(t,(function(){!n.isDisplayOnly()&&n.control&&"undefined"!=typeof CKEDITOR&&n.on("ready",(function(){n.editor||(n.editor=CKEDITOR.replace(e(n.control)[0],n.options.ckeditor),n.initCKEditorEvents())})),e(n.control).bind("destroyed",(function(){if(n.editor){n.editor.removeAllListeners();try{n.editor.destroy(!1)}catch(e){}n.editor=null}})),i()}))},initCKEditorEvents:function(){var e=this;e.editor&&(e.editor.on("click",(function(t){e.onClick.call(e,t),e.trigger("click",t)})),e.editor.on("change",(function(t){e.onChange(),e.triggerWithPropagation("change",t)})),e.editor.on("blur",(function(t){e.onBlur(),e.trigger("blur",t)}
2)),e.editor.on("focus",(function(t){e.onFocus.call(e,t),e.trigger("focus",t)})),e.editor.on("key",(function(t){e.onKeyPress.call(e,t),e.trigger("keypress",t)})),e.editor.on("contentDom",(function(){var t=e.editor.editable();t.attachListener(e.editor.document,"keydown",(function(t){var i=e.onKeyDown.call(e,t);return!1!==i&&(i=e.trigger("keydown",t),e.triggerWithPropagation("before_nested_change",t)),i})),t.attachListener(e.editor.document,"keyup",(function(t){var i=e.onKeyUp.call(e,t);return!1!==i&&(i=e.trigger("keyup",t)),e.triggerWithPropagation("after_nested_change",t),i}))})))},setValue:function(e){this.base(e),this.editor&&this.editor.setData(e)},getControlValue:function(){var e=null;return this.editor&&(e=this.editor.getData()),e},destroy:function(){var e=this;e.editor&&(e.editor.destroy(),e.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(e){var t=e.alpaca;t.Fields.ColorField=t.Fields.TextField.extend({setup:function(){var t=this;this.spectrumAvailable=!1,t.isDisplayOnly()||void 0===e.fn.spectrum||(this.spectrumAvailable=!0),void 0===this.options.spectrum&&t.spectrumAvailable&&(this.inputType="color"),this.base(),t.spectrumAvailable&&(void 0===this.options.spectrum&&(this.options.spectrum={}),void 0===this.options.spectrum.showInput&&(this.options.spectrum.showInput=!0),void 0===this.options.spectrum.showPalette&&(this.options.spectrum.showPalette=!0),void 0===this.options.spectrum.preferredFormat&&(this.options.spectrum.preferredFormat="hex3"),void 0===this.options.spectrum.clickoutFiresChange&&(this.options.spectrum.clickoutFiresChange=!0))},getFieldType:function(){return"color"},getType:function(){return"string"},afterRenderControl:function(t,i){var n=this;this.base(t,(function(){n.spectrumAvailable&&n.control&&(setTimeout((function(){e(n.control[0]).spectrum(e.extend({color:n.data},n.options.spectrum))}),100),e(n.control).on("change.spectrum",(function(e,t){var i=n.convertTinyColor(t);n.setValue(i)}))),i()}))},convertTinyColor:function(e){return e.toHexString()},getTitle:function(){return"Color Field"},getDescription:function(){return"A color picker for selecting hexadecimal color values"}}),t.registerFieldClass("color",t.Fields.ColorField),t.registerDefaultSchemaFieldMapping("color","color")}(jQuery),function(e){var t=e.alpaca;t.Fields.ColorPickerField=t.Fields.TextField.extend({setup:function(){this.simpleColorPickerAvailable=!1,this.isDisplayOnly()||void 0===e.fn.colorpicker||(this.simpleColorPickerAvailable=!0),void 0!==this.options.colorpicker||this.simpleColorPickerAvailable||(this.inputType="color"),this.base(),void 0===this.options.colorpicker&&(this.options.colorpicker={})},getFieldType:function(){return"colorpicker"},getType:function(){return"string"},afterRenderControl:function(t,i){var n=this;this.base(t,(function(){n.simpleColorPickerAvailable&&n.control&&setTimeout(function(t){return function(){var i=JSON.parse(JSON.stringify(t.options.colorpicker));t.data&&(i.color=t.data),e(t.control).colorpicker(i),e(t.control).on("changeColor.colorpicker",(function(e){t.setValue(e.color.toHex())}))}}(n)),i()}))},getTitle:function(){return"Color Picker Field"},getDescription:function(){return"A color picker for selecting hexadecimal color values"}}),t.registerFieldClass("colorpicker",t.Fields.ColorPickerField)}(jQuery),function(e){var t=e.alpaca;t.Fields.CountryField=t.Fields.SelectField.extend({getFieldType:function(){return"country"},setup:function(){t.isUndefined(this.options.capitalize)&&(this.options.capitalize=!1),this.schema.enum=[],this.options.optionLabels=[];var e=this.getMessage("countries");if(e)for(var i in e){this.schema.enum.push(i);var n=e[i];this.options.capitalize&&(n=n.toUpperCase()),this.options.optionLabels.push(n)}this.base()},getTitle:function(){return"Country Field"},getDescription:function(){return"Provides a dropdown selector of countries keyed by their ISO3 code. The names of the countries are read from the I18N bundle for the current locale."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{capitalize:{title:"Capitalize",description:"Whether the values should be capitalized",type:"boolean",default:!1,readonly:!0}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{capitalize:{type:"checkbox"}}})}}),t.registerFieldClass("country",t.Fields.CountryField),t.registerDefaultFormatFieldMapping("country","country")}(jQuery),function(e){var t=e.alpaca;t.Fields.CountryCallingCodeField=t.Fields.SelectField.extend({getFieldType:function(){return"countryCallingCode"},setup:function(){var e=this;t.isUndefined(e.options.capitalize)&&(e.options.capitalize=!1),e.schema.enum=[],e.options.optionLabels=[];var i=this.getMessage("countryCallingCodes");i&&i.filter((function(e){return null!=e.dial_code}
vendor: 4,704 bytes, line 2
2)).forEach((function(t){var i=t.dial_code.split("+").join("").split(" ").join(""),n=t.dial_code+" ("+t.name+")";e.options.capitalize&&(n=n.toUpperCase()),e.schema.enum.push(i),e.options.optionLabels.push(n)})),e.base()},getTitle:function(){return"Country Calling Code Field"},getDescription:function(){return"Provides a dropdown selector of country dialing codes."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{capitalize:{title:"Capitalize",description:"Whether the values should be capitalized",type:"boolean",default:!1,readonly:!0}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{capitalize:{type:"checkbox"}}})}}),t.registerFieldClass("countryCallingCode",t.Fields.CountryCallingCodeField),t.registerDefaultFormatFieldMapping("countryCallingCode","countryCallingCode")}(jQuery),function(e){var t,i=(t={up:Math.ceil,down:function(e){return~~e},nearest:Math.round},function(e){return t[e]}),n=e.alpaca;n.Fields.CurrencyField=n.Fields.TextField.extend({constructor:function(e,t,i,n,a,o,r){i=i||{};var s=this.getSchemaOfPriceFormatOptions().properties;for(var l in s){var c=s[l];l in i||(i[l]=c.default||void 0)}void 0!==t&&(t=""+parseFloat(t).toFixed(i.centsLimit)),this.base(e,t,i,n,a,o,r)},getFieldType:function(){return"currency"},afterRenderControl:function(t,i){var n=this,a=this.getControlEl();this.base(t,(function(){e(a).priceFormat(n.options),i()}))},getControlValue:function(){var t=this.getControlEl(),n=e(t).is("input")?t.val():t.html();if(this.options.unmask||"none"!==this.options.round){var a=function(){var e="";for(var t in n){var i=n[t];isNaN(i)&&"-"!==i?i===this.options.centsSeparator&&(e+="."):e+=i}return parseFloat(e)}.bind(this)();if("none"!==this.options.round&&(a=i(this.options.round)(a),!this.options.unmask)){for(var o=[],r=""+a,s=0,l=0;s<n.length;s++)isNaN(n[s])&&"-"!==n[s]?o.push(n[s]):o.push(r[l++]||0);return o.join("")}return a}return n},getTitle:function(){return"Currency Field"},getDescription:function(){return"Provides an automatically formatted and configurable input for entering currency amounts."},getSchemaOfPriceFormatOptions:function(){return{properties:{allowNegative:{title:"Allow Negative",description:"Determines if negative numbers are allowed.",type:"boolean",default:!1},centsLimit:{title:"Cents Limit",description:"The limit of fractional digits.",type:"number",default:2,minimum:0},centsSeparator:{title:"Cents Separator",description:"The separator between whole and fractional amounts.",type:"text",default:"."},clearPrefix:{title:"Clear Prefix",description:"Determines if the prefix is cleared on blur.",type:"boolean",default:!1},clearSuffix:{title:"Clear Suffix",description:"Determines if the suffix is cleared on blur.",type:"boolean",default:!1},insertPlusSign:{title:"Plus Sign",description:"Determines if a plus sign should be inserted for positive values.",type:"boolean",default:!1},limit:{title:"Limit",description:"A limit of the length of the field.",type:"number",default:void 0,minimum:0},prefix:{title:"Prefix",description:"The prefix if any for the field.",type:"text",default:"$"},round:{title:"Round",description:"Determines if the field is rounded. (Rounding is done when getValue is called and is not reflected in the UI)",type:"string",enum:["up","down","nearest","none"],default:"none"},suffix:{title:"Suffix",description:"The suffix if any for the field.",type:"text",default:""},thousandsSeparator:{title:"Thousands Separator",description:"The separator between thousands.",type:"string",default:","},unmask:{title:"Unmask",description:"If true then the resulting value for this field will be unmasked. That is, the resulting value will be a float instead of a string (with the prefix, suffix, etc. removed).",type:"boolean",default:!0}}}},getSchemaOfOptions:function(){return n.merge(this.base(),this.getSchemaOfPriceFormatOptions())},getOptionsForOptions:function(){return n.merge(this.base(),{fields:{allowNegative:{type:"checkbox"},centsLimit:{type:"number"},centsSeparator:{type:"text"},clearPrefix:{type:"checkbox"},clearSuffix:{type:"checkbox"},insertPlusSign:{type:"checkbox"},limit:{type:"number"},prefix:{type:"text"},round:{type:"select"},suffix:{type:"text"},thousandsSeparator:{type:"string"},unmask:{type:"checkbox"}}})}}),n.registerFieldClass("currency",n.Fields.CurrencyField)}(jQuery),function(e){var t=e.alpaca;t.Fields.DateField=t.Fields.TextField.extend({getFieldType:function(){return"date"},getDefaultFormat:function(){return t.defaultDateFormat},getDefaultExtraFormats:function(){return[]},setup:function(){var e=this;if(this.base(),e.options.picker||(e.options.picker={}),void 0===e.options.picker.useCurrent&&(e.options.picker.useCurrent=!1),e.o
2ptions.picker.format&&(e.options.dateFormat=e.options.picker.format),e.options.dateFormat||(e.options.dateFormat=e.getDefaultFormat()),e.options.picker.format||(e.options.picker.format=e.options.dateFormat),e.options.picker.locale||(e.options.picker.locale=t.defaultLocale),e.options.picker.dayViewHeaderFormat||(e.options.picker.dayViewHeaderFormat="MMMM YYYY"),!e.options.picker.extraFormats){var i=e.getDefaultExtraFormats();i&&(e.options.picker.extraFormats=i)}void 0===e.options.manualEntry&&(e.options.manualEntry=!1)},onKeyPress:function(e){this.options.manualEntry?(e.preventDefault(),e.stopImmediatePropagation()):this.base(e)},onKeyDown:function(e){this.options.manualEntry?(e.preventDefault(),e.stopImmediatePropagation()):this.base(e)},beforeRenderControl:function(e,t){this.field.css("position","relative"),t()},afterRenderControl:function(t,i){var n=this;this.base(t,(function(){"display"!==n.view.type&&e.fn.datetimepicker&&(n.getControlEl().datetimepicker(n.options.picker),n.picker=n.getControlEl().data("DateTimePicker"),n.picker&&n.options.dateFormat&&n.picker.format(n.options.dateFormat),n.picker&&(n.options.dateFormat=n.picker.format()),n.getFieldEl().on("dp.change",(function(e){setTimeout((function(){n.onChange.call(n,e),n.triggerWithPropagation("change",e)}),250)})),n.data&&n.picker.date(n.data)),i()}))},setManualEntry:function(e){this.options.manualEntry=e},getDate:function(){var e=this,t=null;try{t=e.picker?e.picker.date()?e.picker.date()._d:null:new Date(this.getValue())}catch(e){console.error(e)}return t},date:function(){return this.getDate()},onChange:function(e){this.base(),this.refreshValidationState()},isAutoFocusable:function(){return!1},handleValidate:function(){var e=this.base(),i=this.validation,n=this._validateDateFormat();return i.invalidDate={message:n?"":t.substituteTokens(this.getMessage("invalidDate"),[this.options.dateFormat]),status:n},e&&i.invalidDate.status},_validateDateFormat:function(){var e=this,i=!0;if(e.options.dateFormat){var n=e.getValue();if(n||e.isRequired()){var a=[];if(a.push(e.options.dateFormat),e.options.picker&&e.options.picker.extraFormats)for(var o=0;o<e.options.picker.extraFormats.length;o++)a.push(e.options.picker.extraFormats[o]);for(o=0;o<a.length;o++)i=i||t.moment(n,e.options.dateFormat,!0).isValid()}}return i},setValue:function(e){this.base(e),this.picker&&t.moment(e,this.options.dateFormat,!0).isValid()&&this.picker.date(e)},destroy:function(){this.base(),this.picker=null},getTitle:function(){return"Date Field"},getDescription:function(){return"Date Field"},getSchemaOfSchema:function(){return t.merge(this.base(),{properties:{format:{title:"Format",description:"Property data format",type:"string",default:"date",enum:["date"],readonly:!0}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{format:{type:"text"}}})},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{dateFormat:{title:"Date Format",description:"Date format (using moment.js format)",type:"string"},picker:{title:"DatetimePicker options",description:"Options that are supported by the <a href='http://eonasdan.github.io/bootstrap-datetimepicker/'>Bootstrap 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(e){var t=e.alpaca;t.Fields.DatetimeField=t.Fields.DateField.extend({getFieldType:function(){return"datetime"},getDefaultFormat:function(){return t.defaultDateFormat+" "+t.defaultTimeFormat},getDefaultExtraFormats:function(){return[t.defaultDateFormat+" hh:mm:ss a",t.defaultDateFormat+" HH:mm",t.defaultDateFormat]},setup:function(){this.base()},getTitle:function(){return"Datetime Field"},getDescription:function(){return"Datetime Field based on <a href='http://eonasdan.github.io/bootstrap-datetimepicker/'>Bootstrap DateTime Picker</a>."}}),t.registerFieldClass("datetime",t.Fields.DatetimeField),t.registerDefaultFormatFieldMapping("datetime","datetime"),t.registerDefaultFormatFieldMapping("date-time","datetime")}(jQuery),function(e){var t=e.alpaca;t.Fields.EditorField=t.Fields.TextField.extend({getFieldType:function(){return"editor"},setup:function(){var e=this;this.base(),e.options.aceTheme||(e.options.aceTheme="ace/theme/chrome"),e.options.aceMode||(e.options.aceMode="ace/mode/json"),void 0===e.options.beautify&&(e.options.beautify=!0),e.options.beautify&&this.data&&("ace/mode/json"===e.options.aceMode&&(t.isObject(this.data)?this.data=JSON.stringify(this.data,null," "):t.isString(this.data)&&(this.data=JSON.stringify(JSON.parse(this.data),null," "))),"ace/mode/html"===e.options.aceMode&&"undefined"!=typeof html_beautify&&(this.data=html_beautify(this.data)),"ace/mode/css"===e.options.aceMode&&"undefined"!=typeof css_beautify&&(this.data=css_beautify(this.data)),"ace/mode/javascript"===e.options.aceMode&&"undefined"!=typeof js_beautify&&(this.data=js_beautify(this.data))),"ace/mode/json"===e.options.aceMode&&(this.data&&"{}"!==this.data||(this.data="{\n\t\n}"))},afterRenderControl:function(i,n){var a=this;this.base(i,(function(){if(a.control){var i=a.options.aceWidth;
vendor: 19,079 bytes, line 2
2i||(i="100%"),e(a.control).css("width",i)}var o=e(a.control)[0];if(!ace&&window.ace&&(ace=window.ace),ace){a.editor=ace.edit(o),a.editor.setOptions({maxLines:1/0}),a.editor.getSession().setUseWrapMode(!0);var r=a.options.aceTheme;a.editor.setTheme(r);var s=a.options.aceMode;if(a.editor.getSession().setMode(s),a.editor.renderer.setHScrollBarAlwaysVisible(!1),a.editor.setShowPrintMargin(!1),a.data||(a.data=""),a.editor.setValue(a.data),a.editor.clearSelection(),a.editor.getSession().getUndoManager().reset(),a.options.aceFitContentHeight){var l=function(){var t=!1;0===a.editor.renderer.lineHeight&&(t=!0,a.editor.renderer.lineHeight=16);var i=a.editor.getSession().getScreenLength()*a.editor.renderer.lineHeight+a.editor.renderer.scrollBar.getWidth();e(a.control).height(i.toString()+"px"),a.editor.resize(),t&&window.setTimeout((function(){a.editor.clearSelection()}),100)};l(),a.editor.getSession().on("change",l)}else{var c=a.options.aceHeight;c&&e(a.control).css("min-height",c+"px")}a.schema.readonly&&a.editor.setReadOnly(!0),e(o).bind("destroyed",(function(){a.editor&&(a.editor.destroy(),a.editor=null)}))}else t.logError("Editor Field is missing the 'ace' Cloud 9 Editor");n()}))},destroy:function(){this.editor&&(this.editor.destroy(),this.editor=null),this.base()},getEditor:function(){return this.editor},handleValidate:function(){var e=this.base(),i=this.validation,n=this._validateWordCount();i.wordLimitExceeded={message:n?"":t.substituteTokens(this.getMessage("wordLimitExceeded"),[this.options.wordlimit]),status:n};var a=this._validateEditorAnnotations();return i.editorAnnotationsExist={message:a?"":this.getMessage("editorAnnotationsExist"),status:a},e&&i.wordLimitExceeded.status&&i.editorAnnotationsExist.status},_validateEditorAnnotations:function(){if(this.editor){var e=this.editor.getSession().getAnnotations();if(e&&e.length>0)return!1}return!0},_validateWordCount:function(){if(this.options.wordlimit&&this.options.wordlimit>-1){var e=this.editor.getValue();if(e&&e.split(" ").length>this.options.wordlimit)return!1}return!0},onDependentReveal:function(){this.editor&&this.editor.resize()},setValue:function(e){this.editor&&("object"==this.schema.type&&t.isObject(e)&&(e=JSON.stringify(e,null," ")),e||(e=""),this.editor.setValue(e),this.editor.clearSelection()),this.base(e)},getControlValue:function(){var e=null;return this.editor&&(e=this.editor.getValue()),"object"==this.schema.type&&(e=e?JSON.parse(e):{}),e},getTitle:function(){return"Editor"},getDescription:function(){return"Editor"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{aceTheme:{title:"ACE Editor Theme",description:"Specifies the theme to set onto the editor instance",type:"string",default:"ace/theme/twilight"},aceMode:{title:"ACE Editor Mode",description:"Specifies the mode to set onto the editor instance",type:"string",default:"ace/mode/javascript"},aceWidth:{title:"ACE Editor Height",description:"Specifies the width of the wrapping div around the editor",type:"string",default:"100%"},aceHeight:{title:"ACE Editor Height",description:"Specifies the height of the wrapping div around the editor",type:"string",default:"300px"},aceFitContentHeight:{title:"ACE Fit Content Height",description:"Configures the ACE Editor to auto-fit its height to the contents of the editor",type:"boolean",default:!1},wordlimit:{title:"Word Limit",description:"Limits the number of words allowed in the text area.",type:"number",default:-1}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{aceTheme:{type:"text"},aceMode:{type:"text"},wordlimit:{type:"integer"}}})}}),t.registerMessages({wordLimitExceeded:"The maximum word limit of {0} has been exceeded.",editorAnnotationsExist:"The editor has errors in it that must be corrected"}),t.registerFieldClass("editor",t.Fields.EditorField)}(jQuery),function(e){var t=e.alpaca;t.Fields.EmailField=t.Fields.TextField.extend({getFieldType:function(){return"email"},setup:function(){this.inputType="email",this.base(),this.schema.pattern||(this.schema.pattern=t.regexps.email)},handleValidate:function(){var e=this.base(),t=this.validation;return t.invalidPattern.status||(t.invalidPattern.message=this.getMessage("invalidEmail")),e},getTitle:function(){return"Email Field"},getDescription:function(){return"Email Field."},getSchemaOfSchema:function(){var e=this.schema&&this.schema.pattern?this.schema.pattern:t.regexps.email;return t.merge(this.base(),{properties:{pattern:{title:"Pattern",description:"Field Pattern in Regular Expression",type:"string",default:e,enum:[e],readonly:!0},format:{title:"Format",description:"Property data format",type:"string",default:"email",enum:["email"],readonly:!0}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{format:{type:"text"}}})}}),t.registerMessages({invalidEmail:"Invalid Email address e.g. [email protected]"}),t.registerFieldClass("email",t.Fields.EmailField),t.registerDefaultFormatFieldMapping("email","email")}(jQuery),function(e){var t=e.alpaca;t.Fields.GridField=t.Fields.ArrayField.extend({getFieldType:function(){return"grid"},setup:function(){this.base(),void 0===this.options.grid&&(this.options.grid={})},afterRenderContainer:function(t,i){var n=this;this.base(t,(function(){var t=[],a=[];for(var o in n.options.fields){var r=n.options.fields[o],s=o;r.label&&(s=r.label),a.push(s)}t.push(a);for(var l=0;l<n.data.length;l++){var c=[];for(var d in n.data[l])c.push(n.data[l][d]);t.push(c)}var u=e(n.container).find(".alpaca-container-grid-holder"),p=n.options.grid;p.data=t,e(u).handsontable(p),i()}))},getType:function(){return"array"},getTitle:function(){return"Grid Field"},getDescription:function(){return"Renders array items into a grid"}}),t.registerFieldClass("grid",t.Fields.GridField)}(jQuery),function(e){var t=e.alpaca;t.Fields.ImageField=t.Fields.TextField.extend({getFieldType:function(){return"image"},getTitle:function(){return"Image Field"},getDescription:function(){return"Image Field."}}),t.registerFieldClass("image",t.Fields.ImageField)}(jQuery),function(e){var t=e.alpaca;t.Fields.IntegerField=t.Fields.NumberField.extend({getFieldType:function(){return"integer"},getControlValue:function(){var e=this.base();return void 0===e||""==e?e:parseInt(e,10)},onChange:function(e){this.base(),this.slider&&this.slider.slider("value",this.getValue())},postRender:function(i){var n=this;this.base((function(){n.options.slider&&(t.isEmpty(n.schema.maximum)||t.isEmpty(n.schema.minimum)||n.control&&(n.control.after('<div id="slider"></div>'),n.slider=e("#slider",n.control.parent()).slider({value:n.getValue(),min:n.schema.minimum,max:n.schema.maximum,slide:function(e,t){n.setValue(t.value),n.refreshValidationState()}}))),i()}))},handleValidate:function(){var e=this.base(),t=this.validation,i=this._validateInteger();return t.stringNotANumber={message:i?"":this.getMessage("stringNotAnInteger"),status:i},e},_validateInteger:function(){var e=this._getControlVal();if("number"==typeof e&&(e=""+e),t.isValEmpty(e))return!0;if(!t.testRegex(t.regexps.integer,e))return!1;var i=this.getValue();return!isNaN(i)},getType:function(){return"integer"},getTitle:function(){return"Integer Field"},getDescription:function(){return"Field for integers."},getSchemaOfSchema:function(){return t.merge(this.base(),{properties:{minimum:{title:"Minimum",description:"Minimum value of the property.",type:"integer"},maximum:{title:"Maximum",description:"Maximum value of the property.",type:"integer"},divisibleBy:{title:"Divisible By",description:"Property value must be divisible by this number.",type:"integer"}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{minimum:{helper:"Minimum value of the field.",type:"integer"},maximum:{helper:"Maximum value of the field.",type:"integer"},divisibleBy:{helper:"Property value must be divisible by this number.",type:"integer"}}})},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{slider:{title:"Slider",description:"Generate jQuery UI slider control with the field if true.",type:"boolean",default:!1}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{slider:{rightLabel:"Slider control ?",helper:"Generate slider control if selected.",type:"checkbox"}}})}}),t.registerMessages({stringNotAnInteger:"This value is not an integer."}),t.registerFieldClass("integer",t.Fields.IntegerField),t.registerDefaultSchemaFieldMapping("integer","integer")}(jQuery),function(e){var t=e.alpaca;t.Fields.IPv4Field=t.Fields.TextField.extend({getFieldType:function(){return"ipv4"},setup:function(){this.base(),this.schema.pattern||(this.schema.pattern=t.regexps.ipv4)},handleValidate:function(){var e=this.base(),t=this.validation;return t.invalidPattern.status||(t.invalidPattern.message=this.getMessage("invalidIPv4")),e},getTitle:function(){return"IP Address Field"},getDescription:function(){return"IP Address Field."},getSchemaOfSchema:function(){var e=this.schema&&this.schema.pattern?this.schema.pattern:t.regexps.ipv4;return t.merge(this.base(),{properties:{pattern:{title:"Pattern",description:"Field Pattern in Regular Expression",type:"string",default:e,readonly:!0},format:{title:"Format",description:"Property data format",type:"string",enum:["ip-address"],default:"ip-address",readonly:!0}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{format:{type:"text"}}})}}),t.registerMessages({invalidIPv4:"Invalid IPv4 address, e.g. 192.168.0.1"}),t.registerFieldClass("ipv4",t.Fields.IPv4Field),t.registerDefaultFormatFieldMapping("ip-address","ipv4")}(jQuery),function(e){var t=e.alpaca;function i(e){if("string"==typeof e.data){var t=e.handler,i=e.data.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!/textarea|select/i.test(e.target.nodeName)&&"text"!==e.target.type){var n="keypress"!==e.type&&jQuery.hotkeys.specialKeys[e.which],a=String.fromCharCode(e.which).toLowerCase(),o="",r={};e.altKey&&"alt"!==n&&(o+="alt+"),e.ctrlKey&&"ctrl"!==n&&(o+="ctrl+"),e.metaKey&&!e.ctrlKey&&"meta"!==n&&(o+="meta+"),e.shiftKey&&"shift"!==n&&(o+="shift+"),n?r[o+n]=!0:(r[o+a]=!0,r[o+jQuery.hotkeys.shiftNums[a]]=!0,"shift+"===o&&(r[jQuery.hotkeys.shiftNums[a]]=!0));for(var s=0,l=i.length;s<l;s++)if(r[i[s]])return t.apply(this,arguments)}}}}t.Fields.JSONField=t.Fields.TextAreaField.extend({getFieldType:function(){return"json"},setValue:function(e){(t.isObject(e)||"object"==typeof e)&&(e=JSON.stringify(e,null,3)),this.base(e)},getControlValue:function(){var e=this.base();return e&&t.isString(e)&&(e=JSON.parse(e)),e},handleValidate:function(){var e=this.base(),t=this.validation,i=this._validateJSON();return t.stringNotAJSON={message:i.status?"":this.getMessage("stringNotAJSON")+" "+i.message,status:i.status},e&&t.stringNotAJSON.status},_validateJSON:function(){var e=this.control.val();if(t.isValEmpty(e))return{status:!0};try{var i=JSON.parse(e);return this.setValue(JSON.stringify(i,null,3)),{status:!0}}catch(e){return{status:!1,message:e.message}}},afterRenderControl:function(e,t){var i=this;this.base(e,(function(){i.control&&(i.control.bind("keypress",(function(e){var t=e.keyCode||e.wich;34===t&&i.control.insertAtCaret('"'),123===t&&i.control.insertAtCaret("}"),91===t&&i.control.insertAtCaret("]")})),i.control.bind("keypress","Ctrl+l",(function(){i.getFieldEl().removeClass("alpaca-field-focused"),i.refreshValidationState()})),i.control.attr("title","Type Ctrl+L to format and validate the JSON string.")),t()}))},getTitle:function(){return"JSON Editor"},getDescription:function(){return"Editor for JSON objects with basic validation and formatting."}}),t.registerMessages({stringNotAJSON:"This value is not a valid JSON string."}),t.registerFieldClass("json",t.Fields.JSONField),e.fn.insertAtCaret=function(e){return this.each((function(){if(document.selection)this.focus(),sel=document.selection.createRange(),sel.text=e,this.focus();else if(this.selectionStart||"0"==this.selectionStart){var t=this.selectionStart,i=this.selectionEnd,n=this.scrollTop;this.value=this.value.substring(0,t)+e+this.value.substring(i,this.value.length),this.focus(),this.selectionStart=t,this.selectionEnd=t,this.scrollTop=n}else this.value+=e,this.focus()}))},jQuery.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"}},jQuery.each(["keydown","keyup","keypress"],(function(){jQuery.event.special[this]={add:i}}))}(jQuery),function(e){var t=e.alpaca;t.Fields.LowerCaseField=t.Fields.TextField.extend({getFieldType:function(){return"lowercase"},setup:function(){this.base(),this.data&&(this.data=this.data.toLowerCase())},setValue:function(e){if(!e)return this.base(e);var t=e.toLowerCase();t!=this.getValue()&&this.base(t)},onKeyPress:function(e){this.base(e);var i=this;t.later(25,this,(function(){var e=i.getValue();i.setValue(e)}))},getTitle:function(){return"Lowercase Text"},getDescription:function(){return"Text field for lowercase text."}}),t.registerFieldClass("lowercase",t.Fields.LowerCaseField),t.registerDefaultFormatFieldMapping("lowercase","lowercase")}(jQuery),function(e){var t=e.alpaca;t.Fields.MapField=t.Fields.ArrayField.extend({getFieldType:function(){return"map"},getType:function(){return"object"},setup:function(){if(this.data&&t.isObject(this.data)){var i=[];e.each(this.data,(function(e,n){var a=t.copyOf(n);a._key=e,i.push(a)})),this.data=i}this.base(),t.mergeObject(this.options,{forceRevalidation:!0}),t.isEmpty(this.data)},getContainerValue:function(){if(0!==this.children.length||this.isRequired()){for(var e={},t=0;t<this.children.length;t++){var i=this.children[t].getValue(),n=i._key;n&&(delete i._key,e[n]=i)}return e}},handleValidate:function(){var e=this.base(),t=this.validation,i=this._validateMapKeysNotEmpty();t.keyMissing={message:i?"":this.getMessage("keyMissing"),status:i};var n=this._validateMapKeysUnique();return t.keyNotUnique={message:n?"":this.getMessage("keyNotUnique"),status:n},e&&t.keyMissing.status&&t.keyNotUnique.status},_validateMapKeysNotEmpty:function(){for(var e=!0,t=0;t<this.children.length;t++)if(!this.children[t].getValue()._key){e=!1;break}return e},_validateMapKeysUnique:function(){for(var e=!0,t={},i=0;i<this.children.length;i++){var n=this.children[i].getValue()._key;t[n]&&(e=!1),t[n]=n}return e},getTitle:function(){return"Map Field"},getDescription:function(){return"Field for objects with key/value pairs that share the same schema for values."}}),t.registerFieldClass("map",t.Fields.MapField),t.registerMessages({keyNotUnique:"Keys of map field are not unique.",keyMissing:"Map contains an empty key."})}(jQuery),function(e){var t=e.alpaca;t.Fields.MarkdownField=t.Fields.TextAreaField.extend({getFieldType:function(){return"markdown"},setup:function(){this.data||(this.data=""),this.base(),void 0===this.options.markdown&&(this.options.markdown={})},afterRenderControl:function(t,i){var n=this;this.base(t,(function(){!n.isDisplayOnly()&&n.control&&"undefined"!=typeof SimpleMDE&&n.on("ready",(function(){n.options.markdown.element=e(n.control)[0],n.editor||(n.editor=new SimpleMDE(n.options.markdown))})),e(n.control).bind("destroyed",(function(){try{e(n.control).markdown("destroy")}catch(e){}})),i()}))},setValue:function(e){this.base(e),this.editor&&this.editor.value(e)},getControlValue:function(){var e=null;return this.editor&&(e=this.editor.value()),e},getTitle:function(){return"Markdown Editor"},getDescription:function(){return"Provides an instance of a Markdown Editor control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{markdown:{title:"Markdown Editor options",description:"Use this entry to provide configuration options to the underlying Markdown plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{markdown:{type:"any"}}})}}),t.registerFieldClass("markdown",t.Fields.MarkdownField)}(jQuery),function(e){var t=e.alpaca;t.Fields.OptionTreeField=t.Fields.TextField.extend({getFieldType:function(){return"optiontree"},setup:function(){var e=this;for(var i in this.base(),this.options.tree||(this.options.tree={}),this.options.tree.selectors||(this.options.tree.selectors={}),this.options.tree.order||(this.options.tree.order=[]),this.options.tree.selectors){if(!this.options.tree.selectors[i].schema)return void t.logError("OptionTree selector for: "+i+" is missing schema");this.options.tree.selectors[i].options||(this.options.tree.selectors[i].options={})}this.options.tree.data||(this.options.tree.data=[]);for(var n=0;n<this.options.tree.data.length;n++){var a=this.options.tree.data[n];if(a.attributes)for(var i in a.attributes)this.options.tree.selectors[i]||(this.options.tree.selectors[i]={}),this.options.tree.selectors[i].label||(this.options.tree.selectors[i].options.noneLabel="Choose..."),this.options.tree.selectors[i].type||(this.options.tree.selectors[i].options.type="select")}if(!e.options.tree.order)for(var i in e.options.tree.order=[],e.options.tree.selectors)e.options.tree.order.push(e.options.tree.selectors[i]);for(void 0===e.options.tree.horizontal&&(e.options.tree.horizontal=!0),this.locationValueLists={},this.locationValues={},n=0;n<e.options.tree.data.length;n++)if(e.options.tree.data[n].attributes){var o="root";for(var i in e.options.tree.data[n].attributes){var r=e.options.tree.data[n].attributes[i],s=this.locationValueLists[o];s||(s=[],this.locationValueLists[o]=s);for(var l=!1,c=0;c<s.length;c++)if(s[c].value===r){l=!0;break}l||s.push({text:r,value:r}),o.length>0&&(o+="~"),o+=i+"="+r}this.locationValues[o]=e.options.tree.data[n].value}this.currentAttributes={},this.controls={}},toLocation:function(e){var t="root";for(var i in e){var n=e[i];t.length>0&&(t+="~"),t+=i+"="+n}return t},existsLocationWithPrefix:function(e){var t=!1;for(var i in this.locationValueLists)if(i.indexOf(e)>-1){t=!0;break}return t},afterRenderControl:function(t,i){var n=this;n.optionTreeHolder=e(n.field).find(".optiontree"),n.options.tree.horizontal&&e(n.field).addClass("optiontree-horizontal"),this.base(t,(function(){n.refreshOptionTreeControls((function(){i()}))}))},refreshOptionTreeControls:function(i){var n=this;for(var a in n.controls)n.controls[a].hide();for(var o=0,r=0;r<n.options.tree.order.length;r++){var s=n.options.tree.order[r];void 0!==n.currentAttributes[s]&&null!==n.currentAttributes[s]&&""!==n.currentAttributes[s]&&o++}var l="root",c=[],d=0;r=0;do{if(r<n.options.tree.order.length)if(s=n.options.tree.order[r],r==n.options.tree.order.length-1||n.existsLocationWithPrefix(l+"~"+s+"="))if(d<=o){if(n.controls[s])n.controls[s].show(),l
2+="~"+s+"="+n.currentAttributes[s];else{var u=n.options.tree.selectors[s],p=r+1===n.options.tree.order.length,h=function(t,i,a,o,r,s){return function(l){var c=a.schema,d=a.options;d||(d={}),d.type||(d.type="select"),"select"===d.type&&(d.dataSource=function(e){var t=n.toLocation(n.currentAttributes);e(n.locationValueLists[t])});var u=e("<div class='optiontree-selector'></div>");e(u).alpaca({schema:c,options:d,postRender:function(a){o[i]=a,e(r).append(u),a.selectorId=i,a.on("change",(function(){var e=this.selectorId;n.currentAttributes[e]=this.getValue();for(var i=0;i<n.options.tree.order.length;i++)i>t&&(e=n.options.tree.order[i],delete n.currentAttributes[e],o[e]&&(o[e].destroy(),delete o[e]));if(s){var a=null;for(i=0;i<n.options.tree.data.length;i++){var r=!0,l=n.options.tree.data[i].attributes;for(var c in n.currentAttributes)if(l[c]!==n.currentAttributes[c]){r=!1;break}r&&(a=n.options.tree.data[i].value)}a&&n.setValue(a)}n.refreshOptionTreeControls()})),a.show(),l()}})}}(r,s,u,n.controls,n.optionTreeHolder,p);c.push(h),l+="~"+s+"="+n.currentAttributes[s]}d++}else n.controls[s]&&(n.controls[s].destroy(),delete n.controls[s]);else n.controls[s]&&(n.controls[s].destroy(),delete n.controls[s]);r++}while(r<n.options.tree.order.length);t.series(c,(function(){i&&i()}))},getType:function(){return"any"},getTitle:function(){return"Option Tree"},getDescription:function(){return"Option Tree"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{tree:{type:"object",properties:{options:{type:"object"},order:{type:"array",items:{type:"string"}},data:{type:"array",items:{type:"object",properties:{value:{type:"any"},attributes:{type:"object"}}}},horizontal:{type:"boolean"}}}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{}})}}),t.registerFieldClass("optiontree",t.Fields.OptionTreeField)}(jQuery),function(e){var t=e.alpaca;t.Fields.PasswordField=t.Fields.TextField.extend({getFieldType:function(){return"password"},setup:function(){this.base(),this.schema.pattern||(this.schema.pattern=t.regexps.password)},handleValidate:function(){var e=this.base(),t=this.validation;return t.invalidPattern.status||(t.invalidPattern.message=this.getMessage("invalidPassword")),e},getTitle:function(){return"Password Field"},getDescription:function(){return"Password Field."},getSchemaOfSchema:function(){var e=this.schema&&this.schema.pattern?this.schema.pattern:/^[0-9a-zA-Z\x20-\x7E]*$/;return t.merge(this.base(),{properties:{pattern:{title:"Pattern",description:"Field Pattern in Regular Expression",type:"string",default:this.schema.pattern,enum:[e],readonly:!0},format:{title:"Format",description:"Property data format",type:"string",default:"password",enum:["password"],readonly:!0}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{format:{type:"text"}}})}}),t.registerMessages({invalidPassword:"Invalid Password"}),t.registerFieldClass("password",t.Fields.PasswordField),t.registerDefaultFormatFieldMapping("password","password")}(jQuery),function(e){var t=e.alpaca;t.Fields.PersonalNameField=t.Fields.TextField.extend({getFieldType:function(){return"personalname"},setValue:function(e){if(!e)return this.base(e);for(var t="",i=0;i<e.length;i++)0===i||" "===e.charAt(i-1)||"-"===e.charAt(i-1)||"'"===e.charAt(i-1)?t+=e.charAt(i).toUpperCase():t+=e.charAt(i);t!=this.getValue()&&this.base(t)},onKeyPress:function(e){this.base(e);var i=this;t.later(25,this,(function(){var e=i.getValue();i.setValue(e)}))},getTitle:function(){return"Personal Name"},getDescription:function(){return"Text Field for personal name with capital letter for first letter & after hyphen, space or apostrophe."}}),t.registerFieldClass("personalname",t.Fields.PersonalNameField)}(jQuery),function(e){var t=e.alpaca;t.Fields.PhoneField=t.Fields.TextField.extend({setup:function(){this.inputType="tel",this.base(),this.schema.pattern||(this.schema.pattern=t.regexps.phone),t.isEmpty(this.options.maskString)&&(this.options.maskString="(999) 999-9999")},postRender:function(e){this.base((function(){e()}))},handleValidate:function(){var e=this.base(),t=this.validation;
vendor: 9,397 bytes, line 2
2return t.invalidPattern.status||(t.invalidPattern.message=this.getMessage("invalidPhone")),e},getFieldType:function(){return"phone"},getTitle:function(){return"Phone Field"},getDescription:function(){return"Phone Field."},getSchemaOfSchema:function(){var e=this.schema&&this.schema.pattern?this.schema.pattern:t.regexps.phone;return t.merge(this.base(),{properties:{pattern:{title:"Pattern",description:"Field Pattern in Regular Expression",type:"string",default:e,enum:[e],readonly:!0},format:{title:"Format",description:"Property data format",type:"string",default:"phone",enum:["phone"],readonly:!0}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{format:{type:"text"}}})},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{maskString:{title:"Field Mask String",description:"Expression for field mask",type:"string",default:"(999) 999-9999"}}})}}),t.registerMessages({invalidPhone:"Invalid Phone Number, e.g. (123) 456-9999"}),t.registerFieldClass("phone",t.Fields.PhoneField),t.registerDefaultFormatFieldMapping("phone","phone")}(jQuery),function(e){var t=e.alpaca;t.Fields.PickAColorField=t.Fields.TextField.extend({setup:function(){this.pickAColorFieldAvailable=!1,this.isDisplayOnly()||void 0===e.fn.pickAColor||(this.pickAColorFieldAvailable=!0),void 0!==this.options.pickacolor||this.pickAColorFieldAvailable||(this.inputType="color"),this.base(),void 0===this.options.pickacolor&&(this.options.pickacolor={showSpectrum:!0,showSavedColors:!0,saveColorsPerElement:!1,fadeMenuToggle:!0,showAdvanced:!0,showBasicColors:!0,showHexInput:!0,allowBlank:!0,inlineDropdown:!1}),void 0===this.options.colors&&(this.options.colors={white:"#ffffff",clouds:"#ecf0f1",red:"#c0392b",orange:"#e67e22",yellow:"#f1c40f",green:"#27ae60",blue:"#2980b9",purple:"#8e44ad",dark:"#34495e",black:"#000000",brown:"#bb9977"}),this.options.pickacolor&&void 0===this.options.pickacolor.basicColors&&(this.options.pickacolor.basicColors=this.options.colors),void 0===this.options.pickacolor.inlineDropdown&&(this.options.pickacolor.inlineDropdown=!1)},getFieldType:function(){return"pickacolor"},getType:function(){return"string"},afterRenderControl:function(t,i){var n=this;this.base(t,(function(){n.control&&n.pickAColorFieldAvailable&&n.options.pickacolor&&(n.data&&e(n.control).attr("value","#"+n.data),e(n.control).addClass("pick-a-color"),e(n.control).pickAColor(n.options.pickacolor),e(n.control).on("change",(function(t){n.setValue("#"+e(this).val()),n.refresh()}))),i()}))},getTitle:function(){return"Pick-A-Color Field"},getDescription:function(){return"A color picker for selecting hexadecimal color values"}}),t.registerFieldClass("pickacolor",t.Fields.PickAColorField)}(jQuery),function(e){var t=e.alpaca;t.Fields.SearchField=t.Fields.TextField.extend({setup:function(){this.inputType="search",this.base(),this.options.attributes.results=5},getFieldType:function(){return"search"},getType:function(){return"string"},getTitle:function(){return"Search Field"},getDescription:function(){return"A search box field"}}),t.registerFieldClass("search",t.Fields.SearchField),t.registerDefaultSchemaFieldMapping("search","search")}(jQuery),function(e){var t=e.alpaca;t.usHoldings={},t.usHoldings.territories={"American Samoa":"AS","District Of Columbia":"DC","Federated States Of Micronesia":"FM",Guam:"GU","Marshall Islands":"MH","Northern Mariana Islands":"MP",Palau:"PW","Puerto Rico":"PR","Virgin Islands":"VI"},t.usHoldings.states={Alabama:"AL",Alaska:"AK",Arizona:"AZ",Arkansas:"AR",California:"CA",Colorado:"CO",Connecticut:"CT",Delaware:"DE",Florida:"FL",Georgia:"GA",Hawaii:"HI",Idaho:"ID",Illinois:"IL",Indiana:"IN",Iowa:"IA",Kansas:"KS",Kentucky:"KY",Louisiana:"LA",Maine:"ME",Maryland:"MD",Massachusetts:"MA",Michigan:"MI",Minnesota:"MN",Mississippi:"MS",Missouri:"MO",Montana:"MT",Nebraska:"NE",Nevada:"NV","New Hampshire":"NH","New Jersey":"NJ","New Mexico":"NM","New York":"NY","North Carolina":"NC","North Dakota":"ND",Ohio:"OH",Oklahoma:"OK",Oregon:"OR",Pennsylvania:"PA","Rhode Island":"RI","South Carolina":"SC","South Dakota":"SD",Tennessee:"TN",Texas:"TX",Utah:"UT",Vermont:"VT",Virginia:"VA",Washington:"WA","West Virginia":"WV",Wisconsin:"WI",Wyoming:"WY"},t.Fields.StateField=t.Fields.SelectField.extend({getFieldType:function(){return"state"},setup:function(){t.isUndefined(this.options.capitalize)&&(this.options.capitalize=!1),t.isUndefined(this.options.includeStates)&&(this.options.includeStates=!0),t.isUndefined(this.options.includeTerritories)&&(this.options.includeTerritories=!0),t.isUndefined(this.options.format)&&(this.options.format="name"),"name"===this.options.format||"code"===this.options.format||(t.logError("The configured state format: "+this.options.format+" is not a legal value [name, code]"),this.options.format="name");var e=t.retrieveUSHoldings(this.options.includeStates,this.options.includeTerritories,"code"===this.options.format,this.options.capitalize);this.schema.enum=e.keys,this.options.optionLabels=e.values,this.base()},getTitle:function(){return"State Field"},getDescription:function(){return"Provides a dropdown selector of states and/or territories in the United States, keyed by their two-character code."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{format:{title:"Format",description:"How to represent the state values in the selector",type:"string",default:"name",enum:["name","code"],readonly:!0},capitalize:{title:"Capitalize",description:"Whether the values should be capitalized",type:"boolean",default:!1,readonly:!0},includeStates:{title:"Include States",description:"Whether to include the states of the United States",type:"boolean",default:!0,readonly:!0},includeTerritories:{title:"Include Territories",description:"Whether to include the territories of the United States",type:"boolean",default:!0,readonly:!0}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{format:{type:"text"},capitalize:{type:"checkbox"},includeStates:{type:"checkbox"},includeTerritories:{type:"checkbox"}}})}}),t.registerFieldClass("state",t.Fields.StateField),t.registerDefaultFormatFieldMapping("state","state"),t.retrieveUSHoldings=function(i,n,a,o){var r={keys:[],values:[]},s=e.extend({},i?t.usHoldings.states:{},n?t.usHoldings.territories:{}),l=Object.keys(s);for(var c in l.sort(),l){var d=l[c],u=s[d],p=a?u:d;o&&(p=p.toUpperCase()),r.keys.push(u),r.values.push(p)}return r}}(jQuery),function(e){var t=e.alpaca;t.Fields.SummernoteField=t.Fields.TextAreaField.extend({getFieldType:function(){return"summernote"},setup:function(){this.data||(this.data=""),this.base(),void 0===this.options.summernote&&(this.options.summernote={height:null,minHeight:null,maxHeight:null,focus:!0})},afterRenderControl:function(t,i){var n=this;this.base(t,(function(){!n.isDisplayOnly()&&n.control&&e.fn.summernote&&n.on("ready",(function(){e(n.control).summernote(n.options.summernote)})),e(n.control).bind("destroyed",(function(){try{e(n.control).summernote("destroy")}catch(e){}})),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(e){var t=e.alpaca;t.Fields.TableField=t.Fields.ArrayField.extend({setup:function(){var i=this;i.options||(i.options={}),void 0===i.options.animate&&(i.options.animate=!1),void 0===this.options.toolbarSticky&&(this.options.toolbarSticky=!0),this.base(),this.options.items.type||(this.options.items.type="tablerow"),this.options.datatable&&(this.options.datatables=this.options.datatable,delete this.options.datatable),void 0===this.options.datatables&&(this.options.datatables={paging:!1,lengthChange:!1,info:!1,searching:!1,ordering:!0},void 0===this.options.dragRows&&(this.options.dragRows=!1),this.options.readonly&&(this.options.dragRows=!1),this.isDisplayOnly()&&(this.options.dragRows=!1)),void 0===this.options.showActionsColumn&&(this.options.showActionsColumn=!0,this.options.readonly&&(this.options.showActionsColumn=!1),this.isDisplayOnly()&&(this.options.showActionsColumn=!1)),this.options.datatables.columns=[],e.fn.dataTableExt&&!e.fn.DataTable.ext.type.search.alpaca&&(e.fn.DataTable.ext.order.alpaca=function(e,t){i.data=i.getValue();var n=null,a=0;for(var o in i.schema.items.properties){if(a===t){n=o;break}a++}var r=[];if(i.data)for(var s=0;s<i.data.length;s++)r.push(i.data[s][n]);return r.sort(),r},e.fn.dataTableExt.afnFiltering.push((function(i,n,a,o,r){var s=e(i.nTableWrapper).find(".dataTables_filter input[type='search']").val();if(!s)return!0;s=""+s,s=(s=e.trim(s)).toLowerCase();for(var l=!1,c=0;c<o.length;c++){var d=o[c];if(d&&d.indexOf("data-alpaca-field-id=")>-1){var u=e(d).attr("data-alpaca-field-id"),p=t.fieldInstances[u].getValue();if(p&&(p=(p=""+p).toLowerCase()).indexOf(s)>-1){l=!0;break}}}return l})))},getFieldType:function(){return"table"},prepareContainerModel:function(e){var t=this;t.base((function(i){if(i.headers=[],t.schema.items&&t.schema.items.properties)for(var n in t.sc
2hema.items.properties){var a={};a.id=n,a.title=t.schema.items.properties[n].title,a.hidden=!1,t.options.items&&t.options.items.fields&&t.options.items.fields[n]&&(t.options.items.fields[n].label&&(a.title=t.options.items.fields[n].label),"hidden"===t.options.items.fields[n].type&&(a.hidden=!0)),i.headers.push(a)}e(i)}))},getTableEl:function(){return e(e(this.container).find("table")[0])},afterRenderContainer:function(t,i){var n=this;this.base(t,(function(){n.cleanupDomInjections();var t=n.getTableEl();if(n.applyStyle("table",t),n.options.datatables&&e.fn.DataTable){if(0===n.options.datatables.columns.length){for(var a in n.options.dragRows&&(n.options.datatables.columns.push({orderable:!1,name:"dragRowsIndex",hidden:!0}),n.options.datatables.columns.push({orderable:!1,name:"dragRowsDraggable"})),n.schema.items.properties)n.options.datatables.columns.push({orderable:!0,orderDataType:"alpaca"});n.options.showActionsColumn&&n.options.datatables.columns.push({orderable:!1,name:"actions"})}n.options.dragRows&&(n.options.datatables.rowReorder={selector:"tr td.alpaca-table-reorder-draggable-cell",dataSrc:0,snapX:!0,update:!0}),n.off("ready"),n.on("ready",(function(){n._dt&&(n._dt.destroy(),n._dt=void 0);var t=n.getTableEl();n._dt=e(t).DataTable(n.options.datatables),n._dt.on("row-reorder",(function(e,t,i){n._dt._disableAlpacaHandlers||t.length>0&&t[0].oldPosition!==t[0].newPosition&&(n._dt._disableAlpacaHandlers=!0,n.moveItem(t[0].oldPosition,t[0].newPosition,!1,(function(){})))})),e(n.container).bind("destroyed",(function(){n._dt&&(n._dt.destroy(),n._dt=void 0)})),n._dt.on("order",(function(e,t,i,a){if(!n._dt._disableAlpacaHandlers){if(!n._dt._originalChildren){n._dt._originalChildren=[];for(var o=0;o<n.children.length;o++)n._dt._originalChildren.push(n.children[o])}for(var r=[],s=0;s<t.aiDisplay.length;s++){var l=t.aiDisplay[s];r.push(n._dt._originalChildren[l])}n.children=r,n._dt._disableAlpacaHandlers=!1}}))}))}e(t).children("thead > tr > th[data-header-id]").each((function(){var t=e(this).attr("data-header-id"),i=n.schema.items.properties[t],a=null;n.options.items.fields&&n.options.items.fields[t]&&(a=n.options.items.fields[t]),i.required||a&&a.required?n.fireCallback("tableHeaderRequired",i,a,this):n.fireCallback("tableHeaderOptional",i,a,this)})),i()}))},cleanupDomInjections:function(){var i=this,n=function(t){var i=e(t).parent(),n=e(t).children(),a=e(t).attr("class").split(/\s+/);e.each(a,(function(t,n){"alpaca-merge-up"===n||e(i).addClass(n)})),e.each(e(t)[0].attributes,(function(){this.name&&0===this.name.indexOf("data-")&&e(i).attr(this.name,this.value)})),n.length>0?e(t).replaceWith(n):e(t).remove()},a=i.getTableEl().children("tbody").children("tr");e(a).children(".alpaca-field").each((function(){n(this)})),e(a).children(".alpaca-container").each((function(){n(this)}));var o=i.getFieldEl().find("."+t.MARKER_CLASS_ARRAY_ITEM_ACTIONBAR+"["+t.MARKER_DATA_ARRAY_ITEM_FIELD_ID+"='"+i.getId()+"']");o.length>0&&o.each((function(){var t=e("<td class='actionbar' nowrap='nowrap'></td>");e(this).before(t),e(t).append(this)}));var r=i.getTableEl().children("tbody").children("tr").children("td.alpaca-table-reorder-draggable-cell");r.length>0&&r.each((function(){var t=e("<td class='alpaca-table-reorder-draggable-cell'></td>");e(this).before(t),e(t).append(e(this).children()),e(this).remove()}));var s=i.getTableEl().children("tbody").children("tr").children("td.alpaca-table-reorder-index-cell");s.length>0&&s.each((function(t){var i=e("<td class='alpaca-table-reorder-index-cell'>"+t+"</td>");e(this).before(i),e(this).remove()})),e(a).each((function(){var t=e(this).attr("data-alpaca-field-id");e(this).find(".alpaca-merge-up[data-merge-up-field-id='"+t+"'][data-alpaca-merge-tag='td']").each((function(){var t=e("<td></td>");e(this).before(t),e(t).append(this),n(this),e(t).attr("data-alpaca-merge-tag",null),e(t).attr("data-merge-up-field-id",null)}))}))},doResolveItemContainer:function(){return this.getTableEl().children("tbody")},doAfterAddItem:function(t,i){var n=this;n.data=n.getValue(),n.cleanupDomInjections();var a=n.options.datatables&&e.fn.DataTable;if(n.options.dragRows||a&&1===n.data.length)n.refresh((function(){i()}));else{if(n._dt){var o=n.field.find("[data-alpaca-field-path='"+t.path+"']");n._dt.row.add(o)}i()}},doAfterRemoveItem:function(t,i){var n=this;n.data=n.getValue(),n.cleanupDomInjections();var a=n.options.datatables&&e.fn.DataTable;n.options.dragRows||a&&0===n.data.length?n.refresh((function(){i()})):(n._dt&&n._dt.rows(t).remove(),i())},getType:function(){return"array"},getTitle:function(){return"Table Field"}
vendor: 3,116 bytes, line 2
2,getDescription:function(){return"Renders array items into a table"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{datatables:{title:"DataTables Configuration",description:"Optional configuration to be passed to the underlying DataTables Plugin.",type:"object"},showActionsColumn:{title:"Show Actions Column",default:!0,description:"Whether to show or hide the actions column.",type:"boolean"},dragRows:{title:"Drag Rows",default:!1,description:"Whether to enable the dragging of rows via a draggable column. This requires DataTables and the DataTables Row Reorder Plugin.",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{datatables:{type:"object"},showActionsColumn:{type:"checkbox"},dragRows:{type:"checkbox"}}})}}),t.registerFieldClass("table",t.Fields.TableField)}(jQuery),function(e){var t=e.alpaca;t.Fields.TableRowField=t.Fields.ObjectField.extend({prepareContainerModel:function(e){var t=this;this.base((function(i){i.options.showActionsColumn=t.parent.options.showActionsColumn,i.options.dragRows=t.parent.options.dragRows;for(var n=0;n<i.items.length;n++)"hidden"===i.items[n].options.type&&(i.items[n].hidden=!0);e(i)}))},getFieldType:function(){return"tablerow"},getType:function(){return"object"},getTitle:function(){return"Table Row Field"},getDescription:function(){return"Renders object items into a table row"}}),t.registerFieldClass("tablerow",t.Fields.TableRowField)}(jQuery),function(e){var t=e.alpaca;t.Fields.TagField=t.Fields.LowerCaseField.extend({getFieldType:function(){return"tag"},setup:function(){this.base(),this.options.separator||(this.options.separator=",")},getControlValue:function(){var e=this.base();return""===e?[]:e.split(this.options.separator)},setValue:function(e){if(""!==e)return e?void this.base(e.join(this.options.separator)):this.base("")},onBlur:function(t){this.base(t);var i=this.getValue(),n=[];e.each(i,(function(e,t){""!==t.trim()&&n.push(t.trim())})),this.setValue(n)},getTitle:function(){return"Tag Field"},getDescription:function(){return"Text field for entering list of tags separated by delimiter."},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("tag",t.Fields.TagField)}(jQuery),function(e){var t=e.alpaca;t.Fields.TimeField=t.Fields.DateField.extend({getFieldType:function(){return"time"},getDefaultFormat:function(){return t.defaultTimeFormat},setup:function(){this.base()},getTitle:function(){return"Time Field"},getDescription:function(){return"Time Field"}}),t.registerMessages({invalidTime:"Invalid time"}),t.registerFieldClass("time",t.Fields.TimeField),t.registerDefaultFormatFieldMapping("time","time")}(jQuery),function(e){var t=e.alpaca;t.Fields.TinyMCEField=t.Fields.TextAreaField.extend({getFieldType:function(){return"tinymce"},setup:function(){this.data||(this.data=""),this.options.toolbar||(this.options.toolbar="insertfile und
2o redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"),this.base()},setValue:function(e){this.base(e),this.editor&&this.editor.setContent(e)},getControlValue:function(){var e=null;return this.editor&&(e=this.editor.getContent()),e},initTinyMCEEvents:function(){var e=this;e.editor&&(e.editor.on("click",(function(t){e.onClick.call(e,t),e.trigger("click",t)})),e.editor.on("change",(function(t){e.onChange(),e.triggerWithPropagation("change",t)})),e.editor.on("blur",(function(t){e.onBlur(),e.trigger("blur",t)})),e.editor.on("focus",(function(t){e.onFocus.call(e,t),e.trigger("focus",t)})),e.editor.on("keypress",(function(t){e.onKeyPress.call(e,t),e.trigger("keypress",t)})),e.editor.on("keyup",(function(t){e.onKeyUp.call(e,t),e.trigger("keyup",t)})),e.editor.on("keydown",(function(t){e.onKeyDown.call(e,t),e.trigger("keydown",t)})))},afterRenderControl:function(t,i){var n=this;this.base(t,(function(){!n.isDisplayOnly()&&n.control&&"undefined"!=typeof tinyMCE&&n.on("ready",(function(){if(!n.editor){var t=e(n.control)[0].id;tinyMCE.init({init_instance_callback:function(e){n.editor=e,n.initTinyMCEEvents()},selector:"#"+t,toolbar:n.options.toolbar})}})),i()}))},destroy:function(){var e=this;e.editor&&(e.editor.remove(),e.editor=null),this.base()},getTitle:function(){return"TinyMCE Editor"},getDescription:function(){return"Provides an instance of a TinyMCE control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{toolbar:{title:"TinyMCE toolbar options",description:"Toolbar options for TinyMCE plugin.",type:"string"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{toolbar:{type:"text"}}})}}),t.registerFieldClass("tinymce",t.Fields.TinyMCEField)}(jQuery),function(e){var t=e.alpaca;t.Fields.TokenField=t.Fields.TextField.extend({getFieldType:function(){return"token"},setup:function(){this.base(),this.options.separator||(this.options.separator=","),void 0===this.options.tokenfield&&(this.options.tokenfield={}),void 0===this.options.tokenfield.showAutocompleteOnFocus&&(this.options.tokenfield.showAutocompleteOnFocus=!0)},getControlValue:function(){return this.base()},setValue:function(e){this.base(e)},onBlur:function(e){this.base(e)},afterRenderControl:function(t,i){var n=this;this.base(t,(function(){!n.isDisplayOnly()&&n.control&&void 0!==e.fn.tokenfield&&n.on("ready",function(t,i){e(t.control).tokenfield(i)}(n,n.options.tokenfield)),i()}))},getTitle:function(){return"Token Field"},getDescription:function(){return"Token field for entering list of tokens separated by delimiter."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tokens.",type:"string",default:","},tokenfield:{title:"Token Field options",description:"Settings to pass into the underlying bootstrap-tokenfield control",type:"object",default:void 0}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}}),t.registerFieldClass("token",t.Fields.TokenField)}(jQuery),function(e){var t=e.alpaca;t.Fields.UploadField=t.ControlField.extend({constructor:function(i,n,a,o,r,s){var l=this;this.base(i,n,a,o,r,s),this.isArrayType=function(){return"array"===l.schema.type},this.isObjectType=function(){return"object"===l.schema.type},this.wrapTemplate=function(i){return function(n){for(var a=n.files,o=n.formatFileSize,r=n.options,s=[],c=0;c<a.length;c++){var d={};d.options=l.options,d.file=t.cloneObject(a[c]),d.size=o(d.size),d.buttons=l.options.buttons,d.view=l.view,d.fileIndex=c;var u=t.tmpl(l.view.getTemplateDescriptor(i),d,l);s.push(u[0])}return s=e(s),e(s).each((function(){r.fileupload&&r.fileupload.autoUpload&&e(this).find("button.start").css("display","none"),l.handleWrapRow(this,r),e(this).find("button.delete").on("click",(function(){var t=e(u).find("button.delete"),i=e(t).attr("data-file-index"),n=a[i];if(l.onFileDelete.call(l,u,t,n),l.isArrayType()){var o=l.getValueAsArray();o.splice(i,1),l.setValueAsArray(o)}else l.isObjectType()&&l.setValueAsArray([]);l.triggerWithPropagation("change"),setTimeout((function(){l.refreshUIState()}),200)}))})),e(s)}}},getFieldType:function(){return"upload"},setup:function(){var e=this;this.base(),e.options.renderButtons=!1,e.options.buttons||(e.options.buttons=[]),e.options.hideDeleteButton||e.options.buttons.push({key:"delete",isDelete:!0}),void 0===e.options.showUploadPreview&&(e.options.showUploadPreview=!0),void 0===e.options.showHeaders&&(e.options.showHeaders=!0),e.data||(e.data=[]),e.data&&t.isObject(e.data)&&(e.data=[e.data]),e.options.upload||(e.options.upload={}),void 0===e.options.maxNumberOfFiles&&void 0!==e.options.upload.maxNumberOfFiles&&(e.options.maxNumberOfFiles=e.options.upload.maxNumberOfFiles),void 0===e.options.maxNumberOfFiles&&(e.options.maxNumberOfFiles=1,e.isArrayType()&&(e.options.maxNumberOfFiles=-1)),e.isObjectType()&&(e.options.maxNumberOfFiles=1),!1===e.options.multiple&&(e.options.maxNumberOfFiles=1),(e.options.maxNumberOfFiles>1||-1===e.options.maxNumberOfFiles)&&(e.options.multiple=!0),e.o
vendor: 15,322 bytes, line 2
2ptions.upload.maxNumberOfFiles=9999,e.options.maxNumberOfFiles>0&&(e.options.upload.maxNumberOfFiles=e.options.maxNumberOfFiles),void 0===e.options.maxFileSize&&(e.options.upload.maxFileSize?e.options.maxFileSize=e.options.upload.maxFileSize:e.options.maxFileSize=-1,e.options.maxFileSize&&(e.options.upload.maxFileSize=e.options.maxFileSize)),void 0===e.options.fileTypes&&(e.options.upload.acceptFileTypes?e.options.fileTypes=e.options.upload.acceptFileTypes:e.options.fileTypes=null,e.options.fileTypes&&(e.options.upload.acceptFileTypes=e.options.fileTypes)),e.options.errorHandler||(e.options.errorHandler=function(e){alert(e.join("\n"))});var i=e.determineCsrfToken();i&&(e.options.upload||(e.options.upload={}),e.options.upload.headers||(e.options.upload.headers={}),e.options.upload.headers[t.CSRF_HEADER_NAME]=i)},determineCsrfToken:function(){var e=t.CSRF_TOKEN;if(!e)for(var i=0;i<t.CSRF_COOKIE_NAMES.length;i++){var n=t.CSRF_COOKIE_NAMES[i],a=t.readCookie(n);if(a){e=a;break}}return e},prepareControlModel:function(e){var t=this;t.base((function(i){i.chooseButtonLabel=t.options.chooseButtonLabel,i.chooseButtonLabel||(i.chooseButtonLabel=t.getMessage("chooseFiles"),1===t.options.maxNumberOfFiles&&(i.chooseButtonLabel=t.getMessage("chooseFile"))),i.dropZoneMessage=t.options.dropZoneMessage,i.dropZoneMessage||(i.dropZoneMessage=t.getMessage("dropZoneMultiple"),1===i.options.maxNumberOfFiles&&(i.dropZoneMessage=t.getMessage("dropZoneSingle")),i.options.directory&&(i.dropZoneMessage=t.getMessage("dropZoneMultipleDirectory"))),i.selectFromExistingMessage=t.options.selectFromExistingMessage,i.selectFromExistingMessage||(i.selectFromExistingMessage=t.getMessage("selectFromExistingMultiple"),1===i.options.maxNumberOfFiles&&(i.selectFromExistingMessage=t.getMessage("selectFromExistingSingle"))),e(i)}))},afterRenderControl:function(t,i){var n=this;this.base(t,(function(){n.handlePostRender((function(){n.isDisplayOnly()&&(e(n.control).find("button").hide(),e(n.control).find(".btn").hide(),e(n.control).find(".alpaca-fileupload-chooserow").hide(),e(n.control).find(".dropzone-message").hide()),i()}))}))},getUploadTemplate:function(){return this.wrapTemplate("control-upload-partial-upload")},getDownloadTemplate:function(){return this.wrapTemplate("control-upload-partial-download")},handleBeforeFileUploadSubmit:function(e){},handlePostRender:function(i){var n=this,a=this.control,o={dataType:"json",uploadTemplateId:null};if(o.uploadTemplate=this.getUploadTemplate(),o.downloadTemplateId=null,o.downloadTemplate=this.getDownloadTemplate(),o.filesContainer=e(a).find(".files"),o.dropZone=e(a).find(".fileupload-active-zone"),o.url="/",o.method="post",o.showUploadPreview=n.options.showUploadPreview,n.options.upload)for(var r in n.options.upload)o[r]=n.options.upload[r];n.options.multiple&&e(a).find(".alpaca-fileupload-input").attr("multiple",!0),n.options.directory&&e(a).find(".alpaca-fileupload-input").attr("directory",!0),n.options.name&&e(a).find(".alpaca-fileupload-input").attr("name",n.options.name),e(a).find(".progress").css("display","none"),n.options.progressall?o.progressall=n.options.progressall:o.progressall=function(t,i){var n=!1;if(i.loaded<i.total&&(n=!0),n){e(a).find(".progress").css("display","block");var o=parseInt(i.loaded/i.total*100,10);e("#progress .progress-bar").css("width",o+"%")}else e(a).find(".progress").css("display","none")},o.add=function(e,i){var a=[],o=0;do{if(o<i.files.length){if(n.options.fileTypes){var r=n.options.fileTypes;"string"==typeof n.options.fileTypes&&(r=new RegExp(n.options.fileTypes)),r.test(i.files[o].type)||a.push("Not an accepted file type: "+i.files[o].type)}if(n.options.maxFileSize>-1&&i.files[o].size>n.options.maxFileSize&&a.push("Filesize is too big. The maximum allowed file size is "+n.options.maxFileSize+" and the file being uploaded has size "+i.files[o].size),n.options.beforeAddValidator){var s=n.options.beforeAddValidator(i.files[o]);(t.isString(s)||!1===s)&&(t.isString(s)||(s="Not an accepted file: "+i.files[o].name),a.push(s))}}o++}while(o<i.files.length);a.length>0?n.options.errorHandler(a):i.submit()},n.applyConfiguration(o);var s=n.fileUpload=e(a).find(".alpaca-fileupload-input").fileupload(o);s.bindFirst("fileuploaddone",(function(e,t){var i=n.options.enhanceFiles;i?i(o,t):n.enhanceFiles(o,t),t.files=t.result.files,setTimeout((function(){n.refreshValidationState(!0),n.refreshUIState()}),250)})),s.bindFirst("fileuploadsubmit",(function(t,i){n.options.properties&&e.each(i.files,(function(e,t){for(var a in n.options.properties){var o="property"+e+"__"+a,r=n.options.properties[a];r=n.applyTokenSubstitutions(r,e,t),i.formData||(i.formData={}),i.formData[o]=r}})),n.options.parameters&&e.each(i.files,(function(e,t){for(var a in n.options.parameters){var o="param"+e+"__"+a,r=n.options.parameters[a];r=n.applyTokenSubstitutions(r,e,t),i.formData||(i.formData={}),i.formData[o]=r}})),n.handleBeforeFileUploadSubmit(i),n.options.beforeFileUploadSubmitHandler&&n.options.beforeFileUploadSubmitHandler.call(n,i)})),s.bind("fileuploaddone",(function(e,t){var i=n.getValueAsArray(),a=function(e){e!==t.files.length?n.convertFileToDescriptor(t.files[e],(function(t,n){n&&i.push(n),a(e+1)})):n.setValueAsArray(i)};a(0)})),s.bind("fileuploadfail",(function(e,t){n.onUploadFail(t)})),s.bind("fileuploadalways",(function(e,t){n.refreshUIState()})),n.applyBindings(s,a),n.preload(s,a,(function(t){if(t&&t.length>0){var o=e(n.control).find(".alpaca-fileupload-input");e(o).fileupload("option","done").call(o,e.Event("done"),{result:{files:t}}),n.afterPreload(s,a,t,(function(){i()}))}else i()})),"undefined"!=typeof document&&e(document).bind("drop dragover",(function(e){e.preventDefault()}))},handleWrapRow:function(e,t){},applyTokenSubstitutions:function(e,t,i){var n={index:t,name:i.name,size:i.size,url:i.url,thumbnailUrl:i.thumbnailUrl},a=-1,o=0;do{if((a=e.indexOf("{",o))>-1){var r=e.indexOf("}",a);if(r>-1){var s=n[e.substring(a+car.length,r)];s&&(e=e.substring(0,a)+s+e.substring(r+1)),o=r+1}}}while(a>-1);return e},applyConfiguration:function(e){},applyBindings:function(e){},convertFileToDescriptor:function(e,t){t(null,{id:e.id,name:e.name,size:e.size,url:e.url,thumbnailUrl:e.thumbnailUrl,deleteUrl:e.deleteUrl,deleteType:e.deleteType})},convertDescriptorToFile:function(e,t){t(null,{id:e.id,name:e.name,size:e.size,url:e.url,thumbnailUrl:e.thumbnailUrl,deleteUrl:e.deleteUrl,deleteType:e.deleteType})},enhanceFiles:function(e,t){},preload:function(e,t,i){var n=this,a=[],o=n.getValueAsArray(),r=function(e){if(e==o.length)return i(a);n.convertDescriptorToFile(o[e],(function(t,i){i&&a.push(i),r(e+1)}))};r(0)},afterPreload:function(e,t,i,n){this.refreshUIState(),n()},getControlValue:function(){return this.data},getValue:function(){var e=this.data;return this.isObjectType()&&(e=this.data&&this.data.length>0?this.data[0]:void 0),e},setValue:function(e){e?t.isArray(e)?this.data=e:t.isObject(e)&&(this.data=[e]):this.data=[],this.updateObservable(),this.triggerUpdate()},getValueAsArray:function(){return this.data||[]},setValueAsArray:function(e){var t=this;if(t.isArrayType())t.setValue(e);else if(t.isObjectType()){var i=null;e&&e.length>0&&(i=e[0]),t.setValue(i)}},reload:function(t){var i=this,n=this.getValueAsArray(),a=[],o=function(r){if(r===n.length){var s=e(i.control).find(".alpaca-fileupload-input");return e(s).fileupload("option","done").call(s,e.Event("done"),{result:{files:a}}),i.refreshValidationState(),t()}i.convertDescriptorToFile(n[r],(function(e,t){t&&a.push(t),o(r+1)}))};o(0)},plugin:function(){return e(this.control).find(".alpaca-fileupload-input").data().blueimpFileupload},refreshUIState:function(){var e=this,t=e.plugin();if(t){var i=e.options.maxNumberOfFiles;-1===i?e.refreshButtons(!0):t.options.getNumberOfFiles&&t.options.getNumberOfFiles()>=i?e.refreshButtons(!1):e.refreshButtons(!0)}},refreshButtons:function(t){var i=this;e(i.control).find(".btn.fileinput-button").prop("disabled",!0),e(i.control).find(".btn.fileinput-button").attr("disabled","disabled"),e(i.control).find(".fileupload-active-zone p.dropzone-message").css("display","none"),t&&(e(i.control).find(".btn.fileinput-button").prop("disabled",!1),e(i.control).find(".btn.fileinput-button").attr("disabled",null),e(i.control).find(".fileupload-active-zone p.dropzone-message").css("display","block"))},onFileDelete:function(i,n,a){var o=a.deleteUrl,r={method:a.deleteType,url:o,headers:{}},s=this.determineCsrfToken();s&&(r.headers[t.CSRF_HEADER_NAME]=s),e.ajax(r)},onUploadFail:function(e){var t=this;if(t.options.errorHandler&&t.options.errorHandler.call(t,e),e.files&&e.files.length>0)for(var i=0;i<e.files.length;i++)e.files[i].error||(e.files[i].error=e.errorThrown)},disable:function(){e(this.field).find(".fileinput-button").prop("disabled",!0),e(this.field).find(".fileinput-button").attr("disabled","disabled"),e(this.field).find(".alpaca-fileupload-well").css("visibility","hidden")},enable:function(){e(this.field).find(".fileinput-button").prop("disabled",!1),e(this.field).find(".fileinput-button").removeAttr("disabled"),e(this.field).find(".alpaca-fileupload-well").css("visibility","visible")},getTitle:function(){return"Upload Field"},getDescription:function(){return"Provides an upload field with support for thumbnail preview"},getType:function(){return"array"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{maxNumberOfFiles:{title:"Maximum Number of Files",description:"The maximum number of files to allow to be uploaded. If greater than zero, the maximum number will be constrained. If -1, then no limit is imposed.",type:"number",default:1},maxFileSize:{title:"Maximum File Size (in bytes)",description:"The maximum file size allowed per upload. If greater than zero, the maximum file size will be limited to the given size in bytes. If -1, then no limit is imposed.",type:"number",default:-1},fileTypes:{title:"File Types",description:"A regular expression limiting the file types that can be uploaded based on filename",type:"string"},multiple:{title:"Multiple",description:"Whether to allow multiple file uploads. If maxNumberOfFiles is not specified, multiple will toggle between 1 and unlimited.",type:"boolean",default:!1},directory:{title:"Directory",description:"Whether to allow directories (folders) to be dropped into the control for multi-document upload.",type:"boolean",default:!1},showUploadPreview:{title:"Show Upload Preview",description:"Whether to show thumbnails for uploaded assets (requires preview support)",type:"boolean",default:!0},errorHandler:{title:"Error Handler",description:"Optional function handler to be called when one or more files fails to upload. This function is responsible for parsing the underlying xHR request and populating the error message state.",type:"function"}}})}}),t.registerFieldClass("upload",t.Fields.UploadField),t.registerMessages({chooseFile:"Choose File...",chooseFiles:"Choose Files...",dropZoneSingle:"Click the Choose button or Drag and Drop a file here to upload...",dropZoneMultiple:"Click the Choose button or Drag and Drop files here to upload...",dropZoneMultipleDirectory:"Click the Choose button or Drag and Drop files or a folder here to upload..."}),function(e){var t=e.fn.jquery.split("."),i=parseInt(t[0]),n=parseInt(t[1]),a=i<1||1===i&&n<7;function o(t,i,n){var o=function(t){return a?t.data("events"):e._data(t[0]).events}(t),r=o[i];if(a)n?o.live.unshift(o.live.pop()):r.unshift(r.pop());else{var s=n?r.splice(r.delegateCount-1,1)[0]:r.pop();r.splice(n?0:r.delegateCount||0,0,s)}}function r(t,i,n){var a=i.split(/\s+/);t.each((function(){for(var t=0;t<a.length;++t){var i=e.trim(a[t]).match(/[^\.]+/i)[0];o(e(this),i,n)}}))}e.fn.bindFirst=function(){var t=e.makeArray(arguments),i=t.shift();return i&&(e.fn.bind.apply(this,arguments),r(this,i)),this}}(e)}(jQuery),function(e){var t=e.alpaca;t.Fields.UpperCaseField=t.Fields.TextField.extend({getFieldType:function(){return"uppercase"},setup:function(){this.base(),this.data&&(this.data=this.data.toUpperCase())},setValue:function(e){if(!e)return this.base(e);var i=null;e&&t.isString(e)&&(i=e.toUpperCase()),i!=this.getValue()&&this.base(i)},onKeyPress:function(e){this.base(e);var i=this;t.later(25,this,(function(){var e=i.getValue();i.setValue(e)}))},getTitle:function(){return"Uppercase Text"},getDescription:function(){return"Text field for uppercase text."}}),t.registerFieldClass("uppercase",t.Fields.UpperCaseField),t.registerDefaultFormatFieldMapping("uppercase","uppercase")}(jQuery),function(e){var t=e.alpaca;t.Fields.URLField=t.Fields.TextField.extend({getFieldType:function(){return"url"},setup:function(){this.inputType="url",this.base(),void 0===this.options.allowIntranet&&(this.options.allowIntranet=!1),this.options.allowIntranet?this.schema.pattern=t.regexps["intranet-url"]:this.schema.pattern=t.regexps.url,this.schema.format="uri"},handleValidate:function(){var e=this.base(),t=this.validation;return t.invalidPattern.status||(t.invalidPattern.message=this.getMessage("invalidURLFormat")),e},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{allowIntranet:{title:"Allow intranet",description:"Allows URLs with unqualified hostnames"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{allowIntranet:{type:"checkbox"}}})},getTitle:function(){return"URL Field"},getDescription:function(){return"Provides a text control with validation for an internet web address."}}),t.registerMessages({invalidURLFormat:"The URL provided is not a valid web address."}),t.registerFieldClass("url",t.Fields.URLField),t.registerDefaultFormatFieldMapping("url","url")}(jQuery),function(e){var t=e.alpaca;t.Fields.ZipcodeField=t.Fields.TextField.extend({getFieldType:function(){return"zipcode"},setup:function(){this.base(),this.options.format=this.options.format?this.options.format:"nine","nine"===this.options.format?this.schema.pattern=t.regexps["zipcode-nine"]:"five"===this.options.format?this.schema.pattern=t.regexps["zipcode-five"]:(t.logError("The configured zipcode format: "+this.options.format+" is not a legal value [five, nine]"),this.options.format="nine",this.schema.pattern=t.regexps["zipcode-nine"]),"nine"===this.options.format?this.options.maskString="99999-9999":"five"===this.options.format&&(this.options.maskString="99999")},handleValidate:function(){var e=this.base(),t=this.validation;return t.invalidPattern.status||("nine"===this.options.format?t.invalidPattern.message=this.getMessage("invalidZipcodeFormatNine"):"five"===this.options.format&&(t.invalidPattern.message=this.getMessage("invalidZipcodeFormatFive"))),e},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{format:{title:"Format",description:"How to represent the zipcode field",type:"string",default:"five",enum:["five","nine"],readonly:!0}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{format:{type:"text"}}})},getTitle:function(){return"Zipcode Field"},getDescription:function(){return"Provides a five or nine-digital US zipcode control with validation."}}),t.registerMessages({invalidZipcodeFormatFive:"Invalid Five-Digit Zipcode (#####)",invalidZipcodeFormatNine:"Invalid Nine-Digit Zipcode (#####-####)"}),t.registerFieldClass("zipcode",t.Fields.ZipcodeField),t.registerDefaultFormatFieldMapping("zipcode","zipcode")}(jQuery),function(e){e
vendor: 16,443 bytes, line 2
2.alpaca.registerView({id:"base",title:"Abstract base view",messages:{countries:{afg:"Afghanistan",ala:"Aland Islands",alb:"Albania",dza:"Algeria",asm:"American Samoa",and:"Andorra",ago:"Angola",aia:"Anguilla",ata:"Antarctica",atg:"Antigua and Barbuda",arg:"Argentina",arm:"Armenia",abw:"Aruba",aus:"Australia",aut:"Austria",aze:"Azerbaijan",bhs:"Bahamas",bhr:"Bahrain",bgd:"Bangladesh",brb:"Barbados",blr:"Belarus",bel:"Belgium",blz:"Belize",ben:"Benin",bmu:"Bermuda",btn:"Bhutan",bol:"Bolivia",bih:"Bosnia and Herzegovina",bwa:"Botswana",bvt:"Bouvet Island",bra:"Brazil",iot:"British Indian Ocean Territory",brn:"Brunei Darussalam",bgr:"Bulgaria",bfa:"Burkina Faso",bdi:"Burundi",khm:"Cambodia",cmr:"Cameroon",can:"Canada",cpv:"Cape Verde",cym:"Cayman Islands",caf:"Central African Republic",tcd:"Chad",chl:"Chile",chn:"China",cxr:"Christmas Island",cck:"Cocos (Keeling), Islands",col:"Colombia",com:"Comoros",cog:"Congo",cod:"Congo, the Democratic Republic of the",cok:"Cook Islands",cri:"Costa Rica",hrv:"Croatia",cub:"Cuba",cyp:"Cyprus",cze:"Czech Republic",civ:"Cote d'Ivoire",dnk:"Denmark",dji:"Djibouti",dma:"Dominica",dom:"Dominican Republic",ecu:"Ecuador",egy:"Egypt",slv:"El Salvador",gnq:"Equatorial Guinea",eri:"Eritrea",est:"Estonia",eth:"Ethiopia",flk:"Falkland Islands (Malvinas),",fro:"Faroe Islands",fji:"Fiji",fin:"Finland",fra:"France",guf:"French Guiana",pyf:"French Polynesia",atf:"French Southern Territories",gab:"Gabon",gmb:"Gambia",geo:"Georgia",deu:"Germany",gha:"Ghana",gib:"Gibraltar",grc:"Greece",grl:"Greenland",grd:"Grenada",glp:"Guadeloupe",gum:"Guam",gtm:"Guatemala",ggy:"Guernsey",gin:"Guinea",gnb:"Guinea-Bissau",guy:"Guyana",hti:"Haiti",hmd:"Heard Island and McDonald Islands",vat:"Holy See (Vatican City State),",hnd:"Honduras",hkg:"Hong Kong",hun:"Hungary",isl:"Iceland",ind:"India",idn:"Indonesia",irn:"Iran, Islamic Republic of",irq:"Iraq",irl:"Ireland",imn:"Isle of Man",isr:"Israel",ita:"Italy",jam:"Jamaica",jpn:"Japan",jey:"Jersey",jor:"Jordan",kaz:"Kazakhstan",ken:"Kenya",kir:"Kiribati",prk:"Korea, Democratic People's Republic of",kor:"Korea, Republic of",kwt:"Kuwait",kgz:"Kyrgyzstan",lao:"Lao People's Democratic Republic",lva:"Latvia",lbn:"Lebanon",lso:"Lesotho",lbr:"Liberia",lby:"Libyan Arab Jamahiriya",lie:"Liechtenstein",ltu:"Lithuania",lux:"Luxembourg",mac:"Macao",mkd:"Macedonia, the former Yugoslav Republic of",mdg:"Madagascar",mwi:"Malawi",mys:"Malaysia",mdv:"Maldives",mli:"Mali",mlt:"Malta",mhl:"Marshall Islands",mtq:"Martinique",mrt:"Mauritania",mus:"Mauritius",myt:"Mayotte",mex:"Mexico",fsm:"Micronesia, Federated States of",mda:"Moldova, Republic of",mco:"Monaco",mng:"Mongolia",mne:"Montenegro",msr:"Montserrat",mar:"Morocco",moz:"Mozambique",mmr:"Myanmar",nam:"Namibia",nru:"Nauru",npl:"Nepal",nld:"Netherlands",ant:"Netherlands Antilles",ncl:"New Caledonia",nzl:"New Zealand",nic:"Nicaragua",ner:"Niger",nga:"Nigeria",niu:"Niue",nfk:"Norfolk Island",mnp:"Northern Mariana Islands",nor:"Norway",omn:"Oman",pak:"Pakistan",plw:"Palau",pse:"Palestinian Territory, Occupied",pan:"Panama",png:"Papua New Guinea",pry:"Paraguay",per:"Peru",phl:"Philippines",pcn:"Pitcairn",pol:"Poland",prt:"Portugal",pri:"Puerto Rico",qat:"Qatar",rou:"Romania",rus:"Russian Federation",rwa:"Rwanda",reu:"Reunion",blm:"Saint Barthelemy",shn:"Saint Helena",kna:"Saint Kitts and Nevis",lca:"Saint Lucia",maf:"Saint Martin (French part)",spm:"Saint Pierre and Miquelon",vct:"Saint Vincent and the Grenadines",wsm:"Samoa",smr:"San Marino",stp:"Sao Tome and Principe",sau:"Saudi Arabia",sen:"Senegal",srb:"Serbia",syc:"Seychelles",sle:"Sierra Leone",sgp:"Singapore",svk:"Slovakia",svn:"Slovenia",slb:"Solomon Islands",som:"Somalia",zaf:"South Africa",sgs:"South Georgia and the South Sandwich Islands",esp:"Spain",lka:"Sri Lanka",sdn:"Sudan",sur:"Suriname",sjm:"Svalbard and Jan Mayen",swz:"Swaziland",swe:"Sweden",che:"Switzerland",syr:"Syrian Arab Republic",twn:"Taiwan, Province of China",tjk:"Tajikistan",tza:"Tanzania, United Republic of",tha:"Thailand",tls:"Timor-Leste",tgo:"Togo",tkl:"Tokelau",ton:"Tonga",tto:"Trinidad and Tobago",tun:"Tunisia",tur:"Turkey",tkm:"Turkmenistan",tca:"Turks and Caicos Islands",tuv:"Tuvalu",uga:"Uganda",ukr:"Ukraine",are:"United Arab Emirates",gbr:"United Kingdom",usa:"United States",umi:"United States Minor Outlying Islands",ury:"Uruguay",uzb:"Uzbekistan",vut:"Vanuatu",ven:"Venezuela",vnm:"Viet Nam",vgb:"Virgin Islands, British",vir:"Virgin Islands, U.S.",wlf:"Wallis and Futuna",esh:"Western Sahara",yem:"Yemen",zmb:"Zambia",zwe:"Zimbabwe"},empty:"",required:"This field is required",valid:"",invalid:"This field is invalid",months:["January","February","March","April","May","June","July","August","September","October","November","December"],timeUnits:{SECOND:"seconds",MINUTE:"minutes",HOUR:"hours",DAY:"days",MONTH:"months",YEAR:"years"},countryCallingCodes:[{name:"Israel",dial_code:"+972",code:"IL"},{name:"Afghanistan",dial_code:"+93",code:"AF"},{name:"Albania",dial_code:"+355",code:"AL"},{name:"Algeria",dial_code:"+213",code:"DZ"},{name:"AmericanSamoa",dial_code:"+1 684",code:"AS"},{name:"Andorra",dial_code:"+376",code:"AD"},{name:"Angola",dial_code:"+244",code:"AO"},{name:"Anguilla",dial_code:"+1 264",code:"AI"},{name:"Antigua and Barbuda",dial_code:"+1268",code:"AG"},{name:"Argentina",dial_code:"+54",code:"AR"},{name:"Armenia",dial_code:"+374",code:"AM"},{name:"Aruba",dial_code:"+297",code:"AW"},{name:"Australia",dial_code:"+61",code:"AU"},{name:"Austria",dial_code:"+43",code:"AT"},{name:"Azerbaijan",dial_code:"+994",code:"AZ"},{name:"Bahamas",dial_code:"+1 242",code:"BS"},{name:"Bahrain",dial_code:"+973",code:"BH"},{name:"Bangladesh",dial_code:"+880",code:"BD"},{name:"Barbados",dial_code:"+1 246",code:"BB"},{name:"Belarus",dial_code:"+375",code:"BY"},{name:"Belgium",dial_code:"+32",code:"BE"},{name:"Belize",dial_code:"+501",code:"BZ"},{name:"Benin",dial_code:"+229",code:"BJ"},{name:"Bermuda",dial_code:"+1 441",code:"BM"},{name:"Bhutan",dial_code:"+975",code:"BT"},{name:"Bosnia and Herzegovina",dial_code:"+387",code:"BA"},{name:"Botswana",dial_code:"+267",code:"BW"},{name:"Brazil",dial_code:"+55",code:"BR"},{name:"British Indian Ocean Territory",dial_code:"+246",code:"IO"},{name:"Bulgaria",dial_code:"+359",code:"BG"},{name:"Burkina Faso",dial_code:"+226",code:"BF"},{name:"Burundi",dial_code:"+257",code:"BI"},{name:"Cambodia",dial_code:"+855",code:"KH"},{name:"Cameroon",dial_code:"+237",code:"CM"},{name:"Canada",dial_code:"+1",code:"CA"},{name:"Cape Verde",dial_code:"+238",code:"CV"},{name:"Cayman Islands",dial_code:"+ 345",code:"KY"},{name:"Central African Republic",dial_code:"+236",code:"CF"},{name:"Chad",dial_code:"+235",code:"TD"},{name:"Chile",dial_code:"+56",code:"CL"},{name:"China",dial_code:"+86",code:"CN"},{name:"Christmas Island",dial_code:"+61",code:"CX"},{name:"Colombia",dial_code:"+57",code:"CO"},{name:"Comoros",dial_code:"+269",code:"KM"},{name:"Congo",dial_code:"+242",code:"CG"},{name:"Cook Islands",dial_code:"+682",code:"CK"},{name:"Costa Rica",dial_code:"+506",code:"CR"},{name:"Croatia",dial_code:"+385",code:"HR"},{name:"Cuba",dial_code:"+53",code:"CU"},{name:"Cyprus",dial_code:"+537",code:"CY"},{name:"Czech Republic",dial_code:"+420",code:"CZ"},{name:"Denmark",dial_code:"+45",code:"DK"},{name:"Djibouti",dial_code:"+253",code:"DJ"},{name:"Dominica",dial_code:"+1 767",code:"DM"},{name:"Dominican Republic",dial_code:"+1 849",code:"DO"},{name:"Ecuador",dial_code:"+593",code:"EC"},{name:"Egypt",dial_code:"+20",code:"EG"},{name:"El Salvador",dial_code:"+503",code:"SV"},{name:"Equatorial Guinea",dial_code:"+240",code:"GQ"},{name:"Eritrea",dial_code:"+291",code:"ER"},{name:"Estonia",dial_code:"+372",code:"EE"},{name:"Ethiopia",dial_code:"+251",code:"ET"},{name:"Faroe Islands",dial_code:"+298",code:"FO"},{name:"Fiji",dial_code:"+679",code:"FJ"},{name:"Finland",dial_code:"+358",code:"FI"},{name:"France",dial_code:"+33",code:"FR"},{name:"French Guiana",dial_code:"+594",code:"GF"},{name:"French Polynesia",dial_code:"+689",code:"PF"},{name:"Gabon",dial_code:"+241",code:"GA"},{name:"Gambia",dial_code:"+220",code:"GM"},{name:"Georgia",dial_code:"+995",code:"GE"},{name:"Germany",dial_code:"+49",code:"DE"},{name:"Ghana",dial_code:"+233",code:"GH"},{name:"Gibraltar",dial_code:"+350",code:"GI"},{name:"Greece",dial_code:"+30",code:"GR"},{name:"Greenland",dial_code:"+299",code:"GL"},{name:"Grenada",dial_code:"+1 473",code:"GD"},{name:"Guadeloupe",dial_code:"+590",code:"GP"},{name:"Guam",dial_code:"+1 671",code:"GU"},{name:"Guatemala",dial_code:"+502",code:"GT"},{name:"Guinea",dial_code:"+224",code:"GN"},{name:"Guinea-Bissau",dial_code:"+245",code:"GW"},{name:"Guyana",dial_code:"+595",code:"GY"},{name:"Haiti",dial_code:"+509",code:"HT"},{name:"Honduras",dial_code:"+504",code:"HN"},{name:"Hungary",dial_code:"+36",code:"HU"},{name:"Iceland",dial_code:"+354",code:"IS"},{name:"India",dial_code:"+91",code:"IN"},{name:"Indonesia",dial_code:"+62",code:"ID"},{name:"Iraq",dial_code:"+964",code:"IQ"},{name:"Ireland",dial_code:"+353",code:"IE"},{name:"Israel",dial_code:"+972",code:"IL"},{name:"Italy",dial_code:"+39",code:"IT"},{name:"Jamaica",dial_code:"+1 876",code:"JM"},{name:"Japan",dial_code:"+81",code:"JP"},{name:"Jordan",dial_code:"+962",code:"JO"},{name:"Kazakhstan",dial_code:"+7 7",code:"KZ"},{name:"Kenya",dial_code:"+254",code:"KE"},{name:"Kiribati",dial_code:"+686",code:"KI"},{name:"Kuwait",dial_code:"+965",code:"KW"},{name:"Kyrgyzstan",dial_code:"+996",code:"KG"},{name:"Latvia",dial_code:"+371",code:"LV"},{name:"Lebanon",dial_code:"+961",code:"LB"},{name:"Lesotho",dial_code:"+266",code:"LS"},{name:"Liberia",dial_code:"+231",code:"LR"},{name:"Liechtenstein",dial_code:"+423",code:"LI"},{name:"Lithuania",dial_code:"+370",code:"LT"},{name:"Luxembourg",dial_code:"+352",code:"LU"},{name:"Madagascar",dial_code:"+261",code:"MG"},{name:"Malawi",dial_code:"+265",code:"MW"},{name:"Malaysia",dial_code:"+60",code:"MY"},{name:"Maldives",dial_code:"+960",code:"MV"},{name:"Mali",dial_code:"+223",code:"ML"},{name:"Malta",dial_code:"+356",code:"MT"},{name:"Marshall Islands",dial_code:"+692",code:"MH"},{name:"Martinique",dial_code:"+596",code:"MQ"},{name:"Mauritania",dial_code:"+222",code:"MR"},{name:"Mauritius",dial_code:"+230",code:"MU"},{name:"Mayotte",dial_code:"+262",code:"YT"},{name:"Mexico",dial_code:"+52",code:"MX"},{name:"Monaco",dial_code:"+377",code:"MC"},{name:"Mongolia",dial_code:"+976",code:"MN"},{name:"Montenegro",dial_code:"+382",code:"ME"},{name:"Montserrat",dial_code:"+1664",code:"MS"},{name:"Morocco",dial_code:"+212",code:"MA"},{name:"Myanmar",dial_code:"+95",code:"MM"},{name:"Namibia",dial_code:"+264",code:"NA"},{name:"Nauru",dial_code:"+674",code:"NR"},{name:"Nepal",dial_code:"+977",code:"NP"},{name:"Netherlands",dial_code:"+31",code:"NL"},{name:"Netherlands Antilles",dial_code:"+599",code:"AN"},{name:"New Caledonia",dial_code:"+687",code:"NC"},{name:"New Zealand",dial_code:"+64",code:"NZ"},{name:"Nicaragua",dial_code:"+505",code:"NI"},{name:"Niger",dial_code:"+227",code:"NE"},{name:"Nigeria",dial_code:"+234",code:"NG"},{name:"Niue",dial_code:"+683",code:"NU"},{name:"Norfolk Island",dial_code:"+672",code:"NF"},{name:"Northern Mariana Islands",dial_code:"+1 670",code:"MP"},{name:"Norway",dial_code:"+47",code:"NO"},{name:"Oman",dial_code:"+968",code:"OM"},{name:"Pakistan",dial_code:"+92",code:"PK"},{name:"Palau",dial_code:"+680",code:"PW"},{name:"Panama",dial_code:"+507",code:"PA"},{name:"Papua New Guinea",dial_code:"+675",code:"PG"},{name:"Paraguay",dial_code:"+595",code:"PY"},{name:"Peru",dial_code:"+51",code:"PE"},{name:"Philippines",dial_code:"+63",code:"PH"},{name:"Poland",dial_code:"+48",code:"PL"},{name:"Portugal",dial_code:"+351",code:"PT"},{name:"Puerto Rico",dial_code:"+1 939",code:"PR"},{name:"Qatar",dial_code:"+974",code:"QA"},{name:"Romania",dial_code:"+40",code:"RO"},{name:"Rwanda",dial_code:"+250",code:"RW"},{name:"Samoa",dial_code:"+685",code:"WS"},{name:"San Marino",dial_code:"+378",code:"SM"},{name:"Saudi Arabia",dial_code:"+966",code:"SA"},{name:"Senegal",dial_code:"+221",code:"SN"},{name:"Serbia",dial_code:"+381",code:"RS"},{name:"Seychelles",dial_code:"+248",code:"SC"},{name:"Sierra Leone",dial_code:"+232",code:"SL"},{name:"Singapore",dial_code:"+65",code:"SG"},{name:"Slovakia",dial_code:"+421",code:"SK"},{name:"Slovenia",dial_code:"+386",code:"SI"},{name:"Solomon Islands",dial_code:"+677",code:"SB"},{name:"South Africa",dial_code:"+27",code:"ZA"},{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",code:"GS"},{name:"Spain",dial_code:"+34",code:"ES"},{name:"Sri Lanka",dial_code:"+94",code:"LK"},{name:"Sudan",dial_code:"+249",code:"SD"},{name:"Suriname",dial_code:"+597",code:"SR"},{name:"Swaziland",dial_code:"+268",code:"SZ"},{name:"Sweden",dial_code:"+46",code:"SE"},{name:"Switzerland",dial_code:"+41",code:"CH"},{name:"Tajikistan",dial_code:"+992",code:"TJ"},{name:"Thailand",dial_code:"+66",code:"TH"},{name:"Togo",dial_code:"+228",code:"TG"},{name:"Tokelau",dial_code:"+690",code:"TK"},{name:"Tonga",dial_code:"+676",code:"TO"},{name:"Trinidad and Tobago",dial_code:"+1 868",code:"TT"},{name:"Tunisia",dial_code:"+216",code:"TN"},{name:"Turkey",dial_code:"+90",code:"TR"},{name:"Turkmenistan",dial_code:"+993",code:"TM"},{name:"Turks and Caicos Islands",dial_code:"+1 649",code:"TC"},{name:"Tuvalu",dial_code:"+688",code:"TV"},{name:"Uganda",dial_code:"+256",code:"UG"},{name:"Ukraine",dial_code:"+380",code:"UA"},{name:"United Arab Emirates",dial_code:"+971",code:"AE"},{name:"United Kingdom",dial_code:"+44",code:"GB"},{name:"United States",dial_code:"+1",code:"US"},{name:"Uruguay",dial_code:"+598",code:"UY"},{name:"Uzbekistan",dial_code:"+998",code:"UZ"},{name:"Vanuatu",dial_code:"+678",code:"VU"},{name:"Wallis and Futuna",dial_code:"+681",code:"WF"},{name:"Yemen",dial_code:"+967",code:"YE"},{name:"Zambia",dial_code:"+260",code:"ZM"},{name:"Zimbabwe",dial_code:"+263",code:"ZW"},{name:"land Islands",dial_code:"",code:"AX"},{name:"Antarctica",dial_code:null,code:"AQ"},{name:"Bolivia, Plurinational State of",dial_code:"+591",code:"BO"},{name:"Brunei Darussalam",dial_code:"+673",code:"BN"},{name:"Cocos (Keeling) Islands",dial_code:"+61",code:"CC"},{name:"Congo, The Democratic Republic of the",dial_code:"+243",code:"CD"},{name:"Cote d'Ivoire",dial_code:"+225",code:"CI"},{name:"Falkland Islands (Malvinas)",dial_code:"+500",code:"FK"},{name:"Guernsey",dial_code:"+44",code:"GG"},{name:"Holy See (Vatican City State)",dial_code:"+379",code:"VA"},{name:"Hong Kong",dial_code:"+852",code:"HK"},{name:"Iran, Islamic Republic of",dial_code:"+98",code:"IR"},{name:"Isle of Man",dial_code:"+44",code:"IM"},{name:"Jersey",dial_code:"+44",code:"JE"},{name:"Korea, Democratic People's Republic of",dial_code:"+850",code:"KP"},{name:"Korea, Republic of",dial_code:"+82",code:"KR"},{name:"Lao People's Democratic Republic",dial_code:"+856",code:"LA"},{name:"Libyan Arab Jamahiriya",dial_code:"+218",code:"LY"},{name:"Macao",dial_code:"+853",code:"MO"},{name:"Macedonia, The Former Yugoslav Republic of",dial_code:"+389",code:"MK"},{name:"Micronesia, Federated States of",dial_code:"+691",code:"FM"},{name:"Moldova, Republic of",dial_code:"+373",code:"MD"},{name:"Mozambique",dial_code:"+258",code:"MZ"},{name:"Palestinian Territory, Occupied",dial_code:"+970",code:"PS"},{name:"Pitcairn",dial_code:"+872",code:"PN"},{name:"Réunion",dial_code:"+262",code:"RE"},{name:"Russia",dial_code:"+7",code:"RU"},{name:"Saint Barthélemy",dial_code:"+590",code:"BL"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",code:"SH"},{name:"Saint Kitts and Nevis",dial_code:"+1 869",code:"KN"},{name:"Saint Lucia",dial_code:"+1 758",code:"LC"},{name:"Saint Martin",dial_code:"+590",code:"MF"},{name:"Saint Pierre and Miquelon",dial_code:"+508",code:"PM"},{name:"Saint Vincent and the Grenadines",dial_code:"+1 784",code:"VC"},{name:"Sao Tome and Principe",dial_code:"+239",code:"ST"},{name:"Somalia",dial_code:"+252",code:"SO"},{name:"Svalbard and Jan Mayen",dial_code:"+47",code:"SJ"},{name:"Syrian Arab Republic",dial_code:"+963",code:"SY"},{name:"Taiwan, Province of China",dial_code:"+886",code:"TW"},{name:"Tanzania, United Republic of",dial_code:"+255",code:"TZ"},{name:"Timor-Leste",dial_code:"+670",code:"TL"},{name:"Venezuela, Bolivarian Republic of",dial_code:"+58",code:"VE"},{name:"Viet Nam",dial_code:"+84",code:"VN"},{name:"Virgin Islands, British",dial_code:"+1 284",code:"VG"},{name:"Virgin Islands, U.S.",dial_code:"+1 340",code:"VI"}]}})
2}(jQuery),function(e){e.alpaca.registerView({id:"base",messages:{cs_CZ:{required:"Toto pole je vyžadováno",invalid:"Toto pole je neplatné",months:["Leden","Ãnor","BÅezen","Duben","KvÄten","Äerven","Äervenec","Srpen","ZáÅÃ","ÅÃjen","Listopad","Prosinec"],timeUnits:{SECOND:"sekundy",MINUTE:"minuty",HOUR:"hodiny",DAY:"dny",MONTH:"mÄsÃce",YEAR:"roky"},invalidValueOfEnum:"Toto pole musà obsahovat jednu hodnotu z {0}. Aktuálnà hodnota je: {1}",notOptional:"Toto pole nenà volitelné",disallowValue:"{0} jsou zakázané hodnoty.",notEnoughItems:"Minimálnà poÄet položek je {0}",tooManyItems:"Maximálnà poÄet položek je {0}",valueNotUnique:"Hodnoty nejsou unikátnÃ",notAnArray:"Tato hodnota nenà pole",addItemButtonLabel:"PÅidat novou položku",addButtonLabel:"PÅidat",removeButtonLabel:"Odebrat",upButtonLabel:"Nahoru",downButtonLabel:"Dolů",noneLabel:"Žádný",stringValueTooSmall:"Minimálnà hodnota tohoto pole je {0}",stringValueTooLarge:"Maximálnà hodnota tohoto pole je {0}",stringValueTooSmallExclusive:"Hodnota tohoto pole musà být vÄtšà než {0}",stringValueTooLargeExclusive:"Hodnota tohoto pole musà být menšà než {0}",stringDivisibleBy:"Hodnota musà být dÄlitelná {0}",stringNotANumber:"Hodnota nenà ÄÃslo.",stringValueNotMultipleOf:"ÄÃslo nenà násobkem {0}",tooManyProperties:"Maximálnà poÄet vlastnostà ({0}) byl pÅekroÄen.",tooFewProperties:"Nenà dostatek vlastnostà (je požadováno {0})",wordLimitExceeded:"Maximálnà poÄet slov ({0}) byl pÅekroÄen.",invalidPattern:"Toto pole má mÃt vzor {0}",stringTooShort:"Toto pole musà obsahovat nejmenÄ {0} znaků",stringTooLong:"Toto pole musà obsahovat maximálnÄ {0} znaků",invalidDate:"Nesprávné datum pro formát {0}",editorAnnotationsExist:"Editor má v sobÄ chyby, které musà být opraveny",invalidEmail:"Chybná e-mailová adresa, pÅ.: [email protected]",stringNotAnInteger:"Tato hodnota nenà ÄÃslo.",invalidIPv4:"Chybná IPv4 adresa, ex: 192.168.0.1",stringNotAJSON:"Tato hodnota nenà platný JSON text.",keyMissing:"Mapa obsahuje prázdný klÃÄ.",keyNotUnique:"KlÃÄe nejsou jedineÄné.",invalidPassword:"Å patné heslo",invalidPhone:"Å patné telefonnà ÄÃslo, pÅ.: (123) 456-9999",chooseFile:"Vyberte soubor...",chooseFiles:"Vyberte soubory...",dropZoneSingle:"Vyberte soubor nebo jej pÅetáhnÄte sem pro nahránÃ...",dropZoneMultiple:"Vyberte soubory nebo je pÅetáhnÄte sem pro nahránÃ...",invalidURLFormat:"Uvedená URL nenà platna webová adresa.",invalidZipcodeFormatFive:"Chybné poÅ¡tovnà smÄrovacà ÄÃslo (#####)",invalidZipcodeFormatNine:"Chybné devÃti-mÃstné poÅ¡tovnà smÄrovacà ÄÃslo (#####-####)"}}})}(jQuery),function(e){e.alpaca.registerView({id:"base",messages:{de_AT:{required:"Eingabe erforderlich",invalid:"Eingabe invalid",months:["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],timeUnits:{SECOND:"Sekunden",MINUTE:"Minuten",HOUR:"Stunden",DAY:"Tage",MONTH:"Monate",YEAR:"Jahre"},notOptional:"Dieses Feld ist nicht optional",disallowValue:"Diese Werte sind nicht erlaubt: {0}",invalidValueOfEnum:"Diese Feld sollte einen der folgenden Werte enthalten: {0}. [{1}]",notEnoughItems:"Die Mindestanzahl von Elementen ist {0}",tooManyItems:"Die Maximalanzahl von Elementen ist {0}",valueNotUnique:"Diese Werte sind nicht eindeutig",notAnArray:"Keine Liste von Werten",invalidDate:"Falsches Datumsformat: {0}",invalidEmail:"Ungültige e-Mail Adresse, z.B.: [email protected]",stringNotAnInteger:"Eingabe ist keine Ganz Zahl.",invalidIPv4:"Ungültige IPv4 Adresse, z.B.: 192.168.0.1",stringValueTooSmall:"Die Mindestanzahl von Zeichen ist {0}",stringValueTooLarge:"Die Maximalanzahl von Zeichen ist {0}",stringValueTooSmallExclusive:"Die Anzahl der Zeichen muss gröÃer sein als {0}",stringValueTooLargeExclusive:"Die Anzahl der Zeichen muss kleiner sein als {0}",stringDivisibleBy:"Der Wert muss durch {0} dividierbar sein",stringNotANumber:"Die Eingabe ist keine Zahl",invalidPassword:"Ungültiges Passwort.",invalidPhone:"Ungültige Telefonnummer, z.B.: (123) 456-9999",invalidPattern:"Diese Feld stimmt nicht mit folgender Vorgabe überein {0}",stringTooShort:"Dieses Feld sollte mindestens {0} Zeichen enthalten",stringTooLong:"Dieses Feld sollte höchstens {0} Zeichen enthalten"}}})}(jQuery),function(e){e.alpaca.registerView({id:"base",messages:{de_DE:{required:"Eingabe erforderlich",invali
2d:"Eingabe ungültig",months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],timeUnits:{SECOND:"Sekunden",MINUTE:"Minuten",HOUR:"Stunden",DAY:"Tage",MONTH:"Monate",YEAR:"Jahre"},notOptional:"Dieses Feld ist nicht optional",disallowValue:"Diese Werte sind nicht erlaubt: {0}",invalidValueOfEnum:"Diese Feld sollte einen der folgenden Werte enthalten: {0}. [{1}]",notEnoughItems:"Die Mindestanzahl von Elementen ist {0}",tooManyItems:"Die Maximalanzahl von Elementen ist {0}",valueNotUnique:"Diese Werte sind nicht eindeutig",notAnArray:"Keine Liste von Werten",invalidDate:"Falsches Datumsformat: {0}",invalidEmail:"Keine gültige E-Mail Adresse",stringNotAnInteger:"Keine Ganze Zahl",invalidIPv4:"Ungültige IPv4 Adresse",stringValueTooSmall:"Die kleinstmögliche Zahl ist {0}",stringValueTooLarge:"Die grösstmögliche Zahl ist {0}",stringValueTooSmallExclusive:"Die kleinstmögliche Zahl muss gröÃer sein als {0}",stringValueTooLargeExclusive:"Die grösstmögliche Zahl muss kleiner sein als {0}",stringDivisibleBy:"Der Wert muss durch {0} dividierbar sein",stringNotANumber:"Die Eingabe ist keine Zahl",invalidPassword:"Ungültiges Passwort",invalidPhone:"Ungültige Telefonnummer",invalidPattern:"Diese Feld stimmt nicht mit folgender Vorgabe überein {0}",stringTooShort:"Dieses Feld sollte mindestens {0} Zeichen enthalten",stringTooLong:"Dieses Feld sollte höchstens {0} Zeichen enthalten"}}})}(jQuery),function(e){e
vendor: 2,252 bytes, line 2
2.alpaca.registerView({id:"base",messages:{el_GR:{required:"Î¥ÏοÏÏεÏÏικÏ",invalid:"ÎάθοÏ",months:["ÎανοÏ
άÏιοÏ","ΦεβÏοÏ
άÏιοÏ","ÎάÏÏιοÏ","ÎÏÏίλιοÏ","ÎάιοÏ","ÎοÏνιοÏ","ÎοÏλιοÏ","ÎÏγοÏ
ÏÏοÏ","ΣεÏÏÎμβÏιοÏ","ÎκÏÏβÏιοÏ","ÎοÎμβÏιοÏ","ÎεκÎμβÏιοÏ"],timeUnits:{SECOND:"ÎεÏ
ÏεÏÏλεÏÏα",MINUTE:"ÎεÏÏά",HOUR:"ÎÏεÏ",DAY:"ÎÎÏεÏ",MONTH:"ÎήνεÏ",YEAR:"ΧÏÏνια"},notOptional:"ÎÏ
ÏÏ Ïο Ïεδίο δεν είναι ÏÏοαιÏεÏικÏ",disallowValue:"Îη εÏιÏÏεÏÏή Ïιμή: {0}",invalidValueOfEnum:"Το Ïεδίο ÏÏÎÏει να ÏεÏιÎÏει μία αÏÏ ÏÎ¹Ï Î±ÎºÏλοÏ
Î¸ÎµÏ ÏιμÎÏ: {0}. [{1}]",notEnoughItems:"ΠελάÏιÏÏÎ¿Ï Î±ÏιθμÏÏ ÎµÎ³Î³ÏαÏÏν είναι {0}",tooManyItems:"ΠμÎγιÏÏÎ¿Ï Î±ÏιθμÏÏ ÎµÎ³Î³ÏαÏÏν είναι {0}",valueNotUnique:"Îι ÏιμÎÏ Î´ÎµÎ½ είναι μοναδικÎÏ",notAnArray:"Îεν Ï
ÏάÏÏοÏ
ν εγγÏαÏÎÏ",invalidDate:"ÎÎ¬Î¸Î¿Ï Î¼Î¿ÏÏή ημεÏομηνίαÏ: {0}",invalidEmail:"Îη ÎγκÏ
Ïο email",stringNotAnInteger:"Îεν είναι ακÎÏαιοÏ",invalidIPv4:"Îη ÎγκÏ
Ïη IPv4 διεÏθÏ
νÏη",stringValueTooSmall:"Το ελάÏιÏÏο ÏÎ»Î®Î¸Î¿Ï ÏαÏακÏήÏÏν είναι {0}",stringValueTooLarge:"Το μÎγιÏÏο ÏÎ»Î®Î¸Î¿Ï ÏαÏακÏήÏÏν είναι {0}",stringValueTooSmallExclusive:"ÎÏαιÏοÏνÏαι ÏεÏιÏÏÏÏεÏοι ÏαÏακÏÎ®ÎµÏ Î±ÏÏ {0}",stringValueTooLargeExclusive:"ÎÏαιÏοÏνÏαι λιγÏÏεÏοι ÏαÏακÏήÏÎµÏ Î±ÏÏ {0}",stringDivisibleBy:"Î Ïιμή ÏÏÎÏει να είναι ÏολλαÏλάÏιο ÏοÏ
{0}",stringNotANumber:"Î Ïιμή δεν είναι αÏιθμÏÏ",invalidPassword:"Îη ÎγκÏ
Ïο password",invalidPhone:"Îη ÎγκÏ
ÏÎ¿Ï Î±ÏιθμÏÏ ÏηλεÏÏνοÏ
",invalidPattern:"ÎÏ
ÏÏ Ïο Ïεδίο δεν ÎÏει Ïην αÏαιÏοÏμενη μοÏÏή {0}",stringTooShort:"Το Ïεδίο ÏÏÎÏει να ÎÏει ÏοÏ
λάÏιÏÏον {0} ÏαÏακÏήÏεÏ",stringTooLong:"Το Ïεδίο μÏοÏεί να ÎÏει Ïο ÏÎ¿Î»Ï {0} ÏαÏακÏήÏεÏ"}}})
2}(jQuery),function(e){e.alpaca.registerView({id:"base",messages:{es_ES:{required:"Este campo es obligatorio",invalid:"Este campo es inválido",months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],timeUnits:{SECOND:"segundos",MINUTE:"minutos",HOUR:"horas",DAY:"dÃas",MONTH:"meses",YEAR:"años"},notOptional:"Este campo no es opcional.",disallowValue:"{0} son los valores rechazados.",invalidValueOfEnum:"Este campo debe tener uno de los valores adentro {0}. [{1}]",notEnoughItems:"El número mÃnimo de artÃculos es {0}",tooManyItems:"El número máximo de artÃculos es {0}",valueNotUnique:"Los valores no son únicos",notAnArray:"Este valor no es un arsenal",invalidDate:"Fecha inválida para el formato {0}",invalidEmail:"Email address inválido, ex: [email protected]",stringNotAnInteger:"Este valor no es un número entero.",invalidIPv4:"Dirección inválida IPv4, ex: 192.168.0.1",stringValueTooSmall:"El valor mÃnimo para este campo es {0}",stringValueTooLarge:"El valor máximo para este campo es {0}",stringValueTooSmallExclusive:"El valor de este campo debe ser mayor que {0}",stringValueTooLargeExclusive:"El valor de este campo debe ser menos que {0}",stringDivisibleBy:"El valor debe ser divisible cerca {0}",stringNotANumber:"Este valor no es un número.",invalidPassword:"Contraseña inválida",invalidPhone:"Número de teléfono inválido, ex: (123) 456-9999",invalidPattern:"Este campo debe tener patrón {0}",stringTooShort:"Este campo debe contener por lo menos {0} números o caracteres",stringTooLong:"Este campo debe contener a lo más {0} números o caracteres",noneLabel:"Ninguno",addItemButtonLabel:"Añadir",addButtonLabel:"Añadir",removeButtonLabel:"Quitar",upButtonLabel:"Arriba",downButtonLabel:"Abajo"}}})}(jQuery),function(e){e.alpaca.registerView({id:"base",messages:{fi_FI:{required:"Kenttä on pakollinen",invalid:"Syöte on virheellinen",months:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],timeUnits:{SECOND:"sekuntia",MINUTE:"minuuttia",HOUR:"tuntia",DAY:"päivää",MONTH:"kuukautta",YEAR:"vuotta"},notOptional:"Tämä kenttä on pakollinen",disallowValue:"Seuraavat syötteet eivät ole sallittuja: {0}",invalidValueOfEnum:"Kentän pitää sisältää yksi seuraavista arvoista: {0}. [{1}]",notEnoughItems:"Pienin sallittu määrä arvoja on {0}",tooManyItems:"Suurin sallittu määrä arvoja on {0}",valueNotUnique:"Syötetyt arvot eivät ole uniikkeja",notAnArray:"Syöte ei ole lista",invalidDate:"Virheellinen päivämäärämuoto: {0}",invalidEmail:"Virheellinen sähköpostiosoite",stringNotAnInteger:"Arvo ei ole kokonaisluku",invalidIPv4:"Virheellinen IPv4-osoite",stringValueTooSmall:"Pienin sallittu arvo on {0}",stringValueTooLarge:"Suurin sallittu arvo on {0}",stringValueTooSmallExclusive:"Arvon pitää olla suurempi kuin {0}",stringValueTooLargeExclusive:"Arvon pitää olla pienempi kuin {0}",stringDivisibleBy:"Luvun pitää olla jaollinen luvulla {0}",stringNotANumber:"Syöte ei ole luku",invalidPassword:"Virheellinen salasana",invalidPhone:"Virheellinen puhelinnumero",invalidPattern:"Syötteen täytyy olla seuraavassa muodossa: {0}",stringTooShort:"Syötteen minimipituus on {0} merkkiä",stringTooLong:"Syötteen maksimipituus on {0} merkkiä",addItemButtonLabel:"Lisää arvo",addButtonLabel:"Lisää",removeButtonLabel:"Poista",upButtonLabel:"Ylös",downButtonLabel:"Alas"}}})}(jQuery),function(e){e.alpaca.registerView({id:"base",messages:{fr_FR:{required:"Ce champ est requis",invalid:"Ce champ est invalide",months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],timeUnits:{SECOND:"secondes",MINUTE:"minutes",HOUR:"heures",DAY:"jours",MONTH:"mois",YEAR:"années"},notOptional:"Ce champ n'est pas optionnel.",disallowValue:"{0} sont des valeurs interdites.",invalidValueOfEnum:"Ce champ doit prendre une des valeurs suivantes : {0}. [{1}]",notEnoughItems:"Le nombre minimum d'éléments est {0}",tooManyItems:"Le nombre maximum d'éléments est {0}",valueNotUnique:"Les valeurs sont uniques",notAnArray:"Cette valeur n'est pas une liste",invalidDate:"Cette date ne correspond pas au format {0}
2",invalidEmail:"Adresse de courriel invalide, ex: [email protected]",stringNotAnInteger:"Cette valeur n'est pas un nombre entier.",invalidIPv4:"Adresse IPv4 invalide, ex: 192.168.0.1",stringValueTooSmall:"La valeur minimale pour ce champ est {0}",stringValueTooLarge:"La valeur maximale pour ce champ est {0}",stringValueTooSmallExclusive:"La valeur doit-être supérieure à {0}",stringValueTooLargeExclusive:"La valeur doit-être inférieure à {0}",stringDivisibleBy:"La valeur doit-être divisible par {0}",stringNotANumber:"Cette valeur n'est pas un nombre.",invalidPassword:"Mot de passe invalide",invalidPhone:"Numéro de téléphone invalide, ex: (123) 456-9999",invalidPattern:"Ce champ doit correspondre au motif {0}",stringTooShort:"Ce champ doit contenir au moins {0} caractères",stringTooLong:"Ce champ doit contenir au plus {0} caractères"}}})}(jQuery),function(e){e.alpaca.registerView({id:"base",messages:{hr_HR:{required:"Polje je obavezno",invalid:"PogreÅ¡na vrijednost",months:["SijeÄanj","VeljaÄa","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],timeUnits:{SECOND:"sekunda",MINUTE:"minuta",HOUR:"sati",DAY:"dan",MONTH:"mjesec",YEAR:"godina"},notOptional:"Polje nije opciono.",disallowValue:"{0} vrijednost nije dozvoljena.",invalidValueOfEnum:"MoguÄe vrijednosti : {0}. [{1}]",notEnoughItems:"Odaberite najmanje {0}",tooManyItems:"Odaberite najviÅ¡e {0}",valueNotUnique:"Vrijednost nije jedinstvena",notAnArray:"Vrijednost nije popis",invalidDate:"Datum nije u formatu {0}",invalidEmail:"E-mail adresa nije u ispravnom formatu, npr: [email protected]",stringNotAnInteger:"Vrijednost nije cijeli broj.",invalidIPv4:"IPv4 adresa nije ispravna, npr: 192.168.0.1",stringValueTooSmall:"Vrijednost je ispod dopuÅ¡tenog {0}",stringValueTooLarge:"Vrijednost je iznad dopuÅ¡tenog {0}",stringValueTooSmallExclusive:"Vrijednost mora biti veÄa od {0}",stringValueTooLargeExclusive:"Vrijednost mora biti manja od {0}",stringDivisibleBy:"Vrijednost mora biti djeljiva sa {0}",stringNotANumber:"Vrijednost nije broj.",invalidPassword:"Neispravna lozinka",invalidPhone:"Telefon nije ispravan, npr: (123) 456-9999",invalidPattern:"PogreÅ¡an uzorak {0}",stringTooShort:"Polje mora imati namjanje {0} znakova",stringTooLong:"Polje mora imati najviÅ¡e {0} znakova"}}})}(jQuery),function(e){e.alpaca.registerView({id:"base",messages:{it_IT:{required:"Questo campo è obbligatorio",invalid:"Questo campo è invalido",months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],timeUnits:{SECOND:"secondi",MINUTE:"minuti",HOUR:"ore",DAY:"giorni",MONTH:"mesi",YEAR:"anni"},notOptional:"Questo campo non è opzionale",disallowValue:"{0} sono valori invalidi",invalidValueOfEnum:"Questo campo deve avere uno dei seguenti valori {0} (valore attuale: {1})",notEnoughItems:"Il numero minimo di elementi richiesti è {0}",tooManyItems:"Il numero massimo di elementi ammessi è {0}",valueNotUnique:"I valori non sono univoci",notAnArray:"Questo valore non è di tipo array",invalidDate:"Data invali
2da per il formato {0}",invalidEmail:"Indirizzo email invalido, si attendono valori del tipo: [email protected]",stringNotAnInteger:"Questo valore non è un numero intero",invalidIPv4:"Indirizzo IPv4 invalido, si attendono valori del tipo: 192.168.0.1",stringValueTooSmall:"Il valore minimo per questo campo è {0}",stringValueTooLarge:"Il valore massimo per questo campo è {0}",stringValueTooSmallExclusive:"Il valore di questo campo deve essere maggiore di {0}",stringValueTooLargeExclusive:"Il valore di questo campo deve essere minore di {0}",stringDivisibleBy:"Il valore di questo campo deve essere divisibile per {0}",stringNotANumber:"Questo valore non è un numero",invalidPassword:"Password invalida",invalidPhone:"Numero di telefono invalido, si attendono valori del tipo: (123) 456-9999",invalidPattern:"Questo campo deve avere la seguente struttura: {0}",stringTooShort:"Questo campo non deve contenere meno di {0} caratteri",stringTooLong:"Questo campo non deve contenere più di {0} caratteri",noneLabel:"Nessuno",addItemButtonLabel:"Aggiungi",addButtonLabel:"Aggiungi",removeButtonLabel:"Rimuovi",upButtonLabel:"Su",downButtonLabel:"Giù"}}})}(jQuery),function(e){e.alpaca.registerView({id:"base",messages:{ja_JP:{required:"ãã®é
ç®ã¯å¿
é ã§ã",invalid:"ãã®é
ç®ã¯æ£ããå¤ã§ã¯ããã¾ãã",months:["1æ","2æ","3æ","4æ","5æ","6æ","7æ","8æ","9æ","10æ","11æ","12æ"],timeUnits:{SECOND:"ç§",MINUTE:"å",HOUR:"æ",DAY:"æ¥",MONTH:"æ",YEAR:"å¹´"},notOptional:"ãã®é
ç®ã¯ä»»æã®åçé
ç®ã§ã¯ããã¾ãã",disallowValue:"{0} ã¯ç¦æ¢ããã¦ããå¤ã§ã",invalidValueOfEnum:"ãã®é
ç®ã¯ {0}
2 ã®ä¸ããé¸ã°ãªããã°ãªãã¾ãããç¾å¨ã®å¤ã¯ {1} ã§ã",notEnoughItems:"é
ç®æ°ã¯ {0} 以ä¸å¿
è¦ã§ã",tooManyItems:"é
ç®æ°ã¯ {0} 以ä¸ã§ãªããã°ãªãã¾ãã",valueNotUnique:"å¤ã䏿ã§ã¯ããã¾ãã",notAnArray:"ãã®é
ç®ã®å¤ãé
åã§ããã¾ãã",stringValueTooSmall:"ãã®é
ç®ã®æå°å¤ã¯ {0} ã§ã",stringValueTooLarge:"ãã®é
ç®ã®æå¤§å¤ã¯ {0} ã§ã",stringValueTooSmallExclusive:"ãã®é
ç®ã®å¤ã¯ {0} ããå°ãããªããã°ãªãã¾ãã",stringValueTooLargeExclusive:"ãã®é
ç®ã®å¤ã¯ {0} ãã大ãããªããã°ãªãã¾ãã",stringDivisibleBy:"å¤ã¯ {0} ã«ãã£ã¦å²ãåããªããã°ãªãã¾ãã",stringNotANumber:"ãã®é
ç®ã®å¤ãæ°å¤ã§ã¯ããã¾ãã",stringValueNotMultipleOf:"å¤ã {0} ã®åæ°ã§ã¯ããã¾ãã",stringNotAnInteger:"ãã®é
ç®ã®å¤ãæ´æ°ã§ã¯ããã¾ãã",stringNotAJSON:"å¤ãæ£ãã JSON å½¢å¼ã®æååã§ã¯ããã¾ãã",stringTooShort:"ãã®é
ç®ã¯ {0} æå以ä¸å¿
è¦ã§ã",stringTooLong:"ãã®é
ç®ã¯ {0} æå以ä¸ã§ãªããã°ãªãã¾ãã",invalidTime:"æéãæ£ããããã¾ãã",invalidDate:"æ¥ä»ã {0} ã§ã¯ããã¾ãã",invalidEmail:"ã¡ã¼ã«ã¢ãã¬ã¹ãæ£ããããã¾ãããä¾ãã° [email protected] ã®ãããªå½¢å¼ã§ã",invalidIPv4:"IPv4 ã¢ãã¬ã¹ãæ£ããããã¾ãããä¾ãã° 192.168.0.1 ã®ãããªå½¢å¼ã§ã",invalidPassword:"ãã¹ã¯ã¼ããæ£ããããã¾ãã",invalidPhone:"é»è©±çªå·ãæ£ããããã¾ãããä¾ãã° (123) 456-9999 ã®ãããªå½¢å¼ã§ã",invalidPattern:"ãã®é
ç®ã¯ {0} ã®ãã¿ã¼ã³ã§ãªããã°ãªãã¾ãã",invalidURLFormat:"URL ãæ£ããå½¢å¼ã§ã¯ããã¾ãã",keyMissing:"å°å³ã空ã®ãã¼ãå«ãã§ãã¾ã",keyNotUnique:"å°å³ã®ãã¼ã䏿ã§ã¯ããã¾ãã",ObjecttooFewProperties:"ããããã£ãè¶³ãã¾ãã ({0} ãå¿
è¦ã§ã)",tooManyProperties:"ãããã㣠({0}) ã®æå¤§æ°ãè¶
ãã¦ãã¾ã",wordLimitExceeded:"{0} ã®åèªæ°ã®å¶éãè¶
ãã¦ãã¾ã",editorAnnotationsExist:"ã¨ãã£ã¿ãä¿®æ£ãã¹ãã¨ã©ã¼ãå ±åãã¦ãã¾ã",invalidZipcodeFormatFive:"5æ¡ã® Zipcode (#####) ã§ã¯ããã¾ãã",invalidZipcodeFormatNine:"9æ¡ã® Zipcode (#####-####) ã§ã¯ããã¾ãã"}}})}(jQuery),function(e){e.alpaca.registerView({id:"base",messages:{nb_NO:{required:"Feltet er obligatorisk",invalid:"Verdien er ugyldig",months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],timeUnits:{SECOND:"Sekunder",MINUTE:"Minutter",HOUR:"Timer",DAY:"Dager",MONTH:"MÃ¥neder",YEAR:"Ã
r"},notOptional:"Dette feltet er obligatorisk",disallowValue:"Denne verdien er ikke tillatt: {0}",invalidValueOfEnum:"Feltet må inneholde en av følgende verdier: {0}. Nåværende verdi er: {1}",notEnoughItems:"Det minste tillatte antallet elementer er {0}",tooManyItems:"Det største tillatte antallet elementer er {0}",valueNotUnique:"Verdiene er ikke unike",notAnArray:"Ikke en liste av verdier",invalidDate:"Ugyldig datoformat: {0}",invalidEmail:"Ugyldig e-postadresse",stringNotAnInteger:"Verdien er ikke et heltall",invalidIPv4:"Ugyldig IPv4-adresse",stringValueTooSmall:"Den minste tillatte verdien er {0}",stringValueTooLarge:"Den største tillatte verdien er {0}",stringValueTooSmallExclusive:"Verdien må være større enn {0}",stringValueTooLargeExclusive:"Verdien må være mindre enn {0}",stringDivisibleBy:"Tallet må være delbart med {0}",stringNotANumber:"Verdien er ikke et tall",invalidPassword:"Ugyldig passord",invalidPhone:"Ugyldig telefonnummer",invalidPattern:"Feltet må være i følgende format: {0}",stringTooShort:"Dette feltet må minst inneholde {0} tegn",stringTooLong:"Dette feltet kan maks inneholde {0} tegn"}}})}(jQuery),function(e){e.alpaca.registerView({id:"base",messages:{nl_BE:{required:"Dit veld is verplicht",invalid:"Dit veld is ongeldig",months:["Januari","Februari","Maart","April","Mei","Juni","July","Augustus","September","Oktober","November","December"],timeUnits:{SECOND:"seconden",MINUTE:"minuten",HOUR:"uren",DAY:"dagen",MONTH:"maanden",YEAR:"jaren"},notOptional:"Dit veld is niet optioneel.",disallowValue:"{0} zijn verboden waarden.",invalidValueOfEnum:"Dit veld moet één van volgende bevatten : {0}. [{1}]",notEnoughItems:"Het minimum aantal elementen is {0}",tooManyItems:"Het maximum aantal elementen is {0}",valueNotUnique:"De waarden zijn uniek",notAnArray:"Deze waarde is geen lijst",invalidDate:"De datum komt niet overeen met formaat {0}
2",invalidEmail:"Ongeldig e-mailadres, vb.: [email protected]",stringNotAnInteger:"Deze waarde is geen geheel getal.",invalidIPv4:"Ongeldig IPv4 adres, vb.: 192.168.0.1",stringValueTooSmall:"De minimale waarde voor dit veld is {0}",stringValueTooLarge:"De maximale waarde voor dit veld is {0}",stringValueTooSmallExclusive:"De waarde moet groter zijn dan {0}",stringValueTooLargeExclusive:"De waarde moet kleiner zijn dan {0}",stringDivisibleBy:"De waarde moet deelbaar zijn door {0}",stringNotANumber:"Deze waarde is geen getal.",invalidPassword:"Ongeldig wachtwoord",invalidPhone:"Ongeldig telefoonnummer, vb: (123) 456-9999",invalidPattern:"Dit veld moet overeenkomen met patroon {0}",stringTooShort:"Dit veld moet minstens {0} tekens bevatten",stringTooLong:"Dit veld moet minder dan {0} tekens bevatten"}}})}(jQuery),function(e){e.alpaca.registerView({id:"base",messages:{pl_PL:{required:"To pole jest wymagane",invalid:"To pole jest nieprawidÅowe",months:["StyczeÅ","Luty","Marzec","KwiecieÅ","Maj","Czerwiec","Lipiec","SierpieÅ","WrzesieÅ","Październik","Listopad","GrudzieÅ"],timeUnits:{SECOND:"sekundy",MINUTE:"minuty",HOUR:"godziny",DAY:"dni",MONTH:"miesiÄ
ce",YEAR:"lata"},notOptional:"To pole nie jest opcjonalne",disallowValue:"Ta wartoÅÄ nie jest dozwolona: {0}",invalidValueOfEnum:"To pole powinno zawieraÄ jednÄ
z nastÄpujÄ
cych wartoÅci: {0}. [{1}]",notEnoughItems:"Minimalna liczba elementów wynosi {0}",tooManyItems:"Maksymalna liczba elementów wynosi {0}",valueNotUnique:"Te wartoÅci nie sÄ
unikalne",notAnArray:"Ta wartoÅÄ nie jest tablicÄ
",invalidDate:"Niepoprawny format daty: {0}",invalidEmail:"Niepoprawny adres email, n.p.: [email protected]",stringNotAnInteger:"Ta wartoÅÄ nie jest liczbÄ
caÅkowitÄ
",invalidIPv4:"Niepoprawny adres IPv4, n.p.: 192.168.0.1",stringValueTooSmall:"Minimalna wartoÅÄ dla tego pola wynosi {0}",stringValueTooLarge:"Maksymalna wartoÅÄ dla tego pola wynosi {0}",stringValueTooSmallExclusive:"WartoÅÄ dla tego pola musi byÄ wiÄksza niż {0}",stringValueTooLargeExclusive:"WartoÅÄ dla tego pola musi byÄ mniejsza niż {0}",stringDivisibleBy:"WartoÅÄ musi byÄ podzielna przez {0}",stringNotANumber:"WartoÅÄ nie jest liczbÄ
",invalidPassword:"Niepoprawne hasÅo",invalidPhone:"Niepoprawny numer telefonu, n.p.: (123) 456-9999",invalidPattern:"To pole powinno mieÄ format {0}",stringTooShort:"To pole powinno zawieraÄ co najmniej {0} znaków",stringTooLong:"To pole powinno zawieraÄ najwyżej {0} znaków"}}})}(jQuery),function(e){e.alpaca.registerView({id:"base",messages:{pt_BR:{required:"Este campo é obrigatório",invalid:"Este campo é inválido",months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],timeUnits:{SECOND:"segundos",MINUTE:"minutos",HOUR:"horas",DAY:"dias",MONTH:"meses",YEAR:"anos"},notOptional:"Este campo não é opcional",disallowValue:"{0} são valores proibidos",invalidValueOfEnum:"Este campo deve ter um dos seguintes valores: {0}. [{1}]",notEnoughItems:"O número mÃnimo de elementos é {0}",tooManyItems:"O número máximo de elementos é {0}",valueNotUnique:"Os valores não são únicos",notAnArray:"Este valor não é uma lista",invalidDate:"Esta data não tem o formato {0}",invalidEmail:"Endereço de e-mail inválido",stringNotAnInteger:"Este valor não é um número inteiro",invalidIPv4:"Endereço IPv4 inválido, ex: 192.168.0.1",stringValueTooSmall:"O valor mÃnimo para este campo é {0}",stringValueTooLarge:"O valor máximo para este campo é {0}",stringValueTooSmallExclusive:"O valor deste campo deve ser maior que {0}",stringValueTooLargeExclusive:"O valor deste campo deve ser menor que {0}",stringDivisibleBy:"O valor deve ser divisÃvel por {0}",stringNotANumber:"Este valor não é um número",invalidPassword:"Senha inválida",invalidPhone:"Número de telefone inválido, ex: (123) 456-9999",invalidPattern:"Este campo deve ter o padrão {0}",stringTooShort:"Este campo deve incluir pelo menos {0} caracteres",stringTooLong:"Este campo pode incluir no máximo {0} caracteres"}}})}(jQuery),function(e){e.alpaca.registerView({id:"base",messages:{sv_SE:{required:"Fältet är obligatoriskt",invalid:"Värdet är felaktigt",months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],timeUnits:{SECOND:"sekunder",MINUTE:"minuter",HOUR:"timmar",DAY:"dagar",MONTH:"mÃ¥nader",YEAR:"Ã¥r"},notOptional:"Detta fält är obligatoriskt",disallowValue:"Dessa värden är inte tillÃ¥tna: {0}
2",invalidValueOfEnum:"Fältet mÃ¥ste innehÃ¥lla ett av följande värden: {0}. [{1}]",notEnoughItems:"Det minsta tillÃ¥tna antalet element är {0}",tooManyItems:"Det största tillÃ¥tna antalet element är {0}",valueNotUnique:"Värdena är inte unika",notAnArray:"Inte en lista av värden",invalidDate:"Felaktigt format för datum: {0}",invalidEmail:"Ogiltig e-postadress",stringNotAnInteger:"Värdet är inte ett heltal",invalidIPv4:"Ogiltig IPv4-adress",stringValueTooSmall:"Det minsta tillÃ¥tna värdet är {0}",stringValueTooLarge:"Det största tillÃ¥tna värdet är {0}",stringValueTooSmallExclusive:"Värdet mÃ¥ste vara större än {0}",stringValueTooLargeExclusive:"Värdet mÃ¥ste vara mindre än {0}",stringDivisibleBy:"Talet mÃ¥ste vara delbart med {0}",stringNotANumber:"Värdet är inte ett tal",invalidPassword:"Ogiltigt lösenord",invalidPhone:"Ogiltigt telefonnummer",invalidPattern:"Fältet mÃ¥ste vara i följande format: {0}",stringTooShort:"Detta fält mÃ¥ste innehÃ¥lla minst {0} tecken",stringTooLong:"Detta fält fÃ¥r innehÃ¥lla högst {0} tecken",addItemButtonLabel:"Lägg till element",addButtonLabel:"Lägg till",removeButtonLabel:"Ta bort",upButtonLabel:"Upp",downButtonLabel:"Ner"}}})}(jQuery),function(e){e.alpaca.registerView({id:"base",messages:{zh_CN:{required:"此域必须",invalid:"此域不合格",months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],timeUnits:{SECOND:"秒",MINUTE:"分",HOUR:"时",DAY:"日",MONTH:"月",YEAR:"年"},notOptional:"此域非任选",disallowValue:"非法输入包括 {0}.",invalidValueOfEnum:"允许输入包括 {0}. [{1}]",notEnoughItems:"最小个数 {0}",tooManyItems:"最大个数 {0}",valueNotUnique:"输入值不独特",notAnArray:"不是数组",invalidDate:"日期格式因该是 {0}",invalidEmail:"伊妹儿格式不对, ex: [email protected]",stringNotAnInteger:"不是整数.",invalidIPv4:"不是合法IP地址, ex: 192.168.0.1",stringValueTooSmall:"最小值是 {0}",stringValueTooLarge:"最大值是 {0}",stringValueTooSmallExclusive:"值必须大于 {0}",stringValueTooLargeExclusive:"值必须小于 {0}",stringDivisibleBy:"值必须能被 {0} 整除",stringNotANumber:"不是数字.",invalidPassword:"非法密码",invalidPhone:"非法电话号码, ex: (123) 456-9999",invalidPattern:"此域须有格式 {0}",stringTooShort:"此域至少长度 {0}",stringTooLong:"此域最多长度 {0}"}}})}(jQuery),function(e){var t=e.alpaca,i={field:function(){},control:function(){},container:function(){},form:function(){},required:function(){},optional:function(){},readonly:function(){},disabled:function(){},enabled:function(){},clearValidity:function(){},invalid:function(e){},valid:function(){},addMessage:function(e,t,i,n){},removeMessages:function(){},enableButton:function(e){},disableButton:function(e){},arrayToolbar:function(i){var n=this;if(i){var a=e(n.getFieldEl()).find(".alpaca-array-toolbar[data-alpaca-array-toolbar-field-id='"+n.getId()+"']");if(a.length>0){var o=e("<div class='"+t.MARKER_CLASS_ARRAY_TOOLBAR+"' "+t.MARKER_DATA_ARRAY_TOOLBAR_FIELD_ID+"='"+n.getId()+"'></div>");if(n.options.toolbarPosition&&"bottom"===n.options.toolbarPosition){var r=e(n.getContainerEl()).children(".alpaca-container-item-last");r.length>0?r.after(o):a.before(o)}else a.before(o);a.remove()}}else if((o=e(n.getContainerEl()).find("."+t.MARKER_CLASS_ARRAY_TOOLBAR+"["+t.MARKER_DATA_ARRAY_TOOLBAR_FIELD_ID+"='"+n.getId()+"']")).length>0){var s=n.view.getTemplateDescriptor("container-array-toolbar",n);if(s){var l=t.tmpl(s,{actions:n.toolbar.actions,id:n.getId(),toolbarStyle:n.options.toolbarStyle,toolbarPosition:n.options.toolbarPosition,view:n.view});e(o).before(l),e(o).remove()}}},arrayActionbars:function(i){for(var n=this,a=0;a<n.children.length;a++){var o=n.children[a],r=o.getId();if(i){var s=e(n.getFieldEl()).find(".alpaca-array-actionbar[data-alpaca-array-actionbar-field-id='"+r+"']");if(s.length>0){var l=e("<div class='"+t.MARKER_CLASS_ARRAY_ITEM_ACTIONBAR+"' "+t.MARKER_DATA_ARRAY_ITEM_KEY+"='"+o.name+"'></div>");s.before(l),s.remove()}}else if((l=e(n.getFieldEl()).find("."+t.MARKER_CLASS_ARRAY_ITEM_ACTIONBAR+"["+t.MARKER_DATA_ARRAY_ITEM_KEY+"='"+o.name+"']")).length>0){var c=n.view.getTemplateDescriptor("container-array-actionbar",n);if(c){var d=t.tmpl(c,{actions:n.actionbar.actions,name:o.name,parentFieldId:n.getId(),fieldId:o.getId(),itemIndex:a,actionbarStyle:n.options.actionbarStyle,view:n.view});e(l).before(d),e(l).remove()}}}},autocomplete:function(){}},n={button:"",smallButton:"",addIcon:"",removeIcon:"",upIcon:"",downIcon:"",expandedIcon:"",collapsedIcon:"",table:""};t.registerView({id:"web-display",parent:"base",type:"display",ui:"web",title:"Default HTML5 display view",displayReadonly:!0,templates:{},callbacks:i,styles:n,horizontal:!1}),t.registerView({id:"web-display-horizontal",parent:"web-display",horizontal:!0}),t.registerView({id:"web-edit",parent:"base",type:"edit",ui:"web",title:"Default HTML5 edit view",displayReadonly:!0,templates:{},callbacks:i,styles:n,horizontal:!1}),t.registerView({id:"web-edit-horizontal",parent:"web-edit",horizontal:!0}),t.registerView({id:"web-create",parent:"web-edit",type:"create",title:"Default HTML5 create view",displayReadonly:!1,templates:{},horizontal:!1}),t.registerView({id:"web-create-horizontal",parent:"web-create",horizontal:!0})}(jQuery),Alpaca},umdEnabled=!0,root&&void 0!==root.umd&&(umdEnabled=root.umd),umdEnabled&&"object"==typeof exports?module.exports=factory(__webpack_require__(19755),__webpack_require__(4597)):umdEnabled&&__webpack_require__.amdO?(__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__(19755),__webpack_require__(4597)],void 0===(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof(__WEBPACK_AMD_DEFINE_FACTORY__=factory)?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__)||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)):root.Alpaca=factory(root.jQuery,root.Handlebars)},93810:(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var root="object"==typeof window?window:{},NODE_JS=!root.JS_SHA1_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS&&(root=__webpack_require__.g);var COMMON_JS=!root.JS_SHA1_NO_COMMON_JS&&module.exports,AMD=__webpack_require__.amdO,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[],createOutputMethod=function(e){return function(t){return new Sha1(!0).update(t)[e]()}},createMethod=function(){var e=createOutputMethod("hex");NODE_JS&&(e=nodeWrap(e)),e.create=function(){return new Sha1},e.update=function(t){return e.create().update(t)};for(var t=0;t<OUTPUT_TYPES.length;++t){var i=OUTPUT_TYPES[t];e[i]=createOutputMethod(i)}return e},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(e){if("string"==typeof e)return crypto.createHash("sha1").update(e,"utf8").digest("hex");
vendor: 6,573 bytes, line 2
2if(e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(void 0===e.length)return method(e);return crypto.createHash("sha1").update(new Buffer(e)).digest("hex")};return nodeMethod};function Sha1(e){e?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Sha1.prototype.update=function(e){if(!this.finalized){var t="string"!=typeof e;t&&e.constructor===root.ArrayBuffer&&(e=new Uint8Array(e));for(var i,n,a=0,o=e.length||0,r=this.blocks;a<o;){if(this.hashed&&(this.hashed=!1,r[0]=this.block,r[16]=r[1]=r[2]=r[3]=r[4]=r[5]=r[6]=r[7]=r[8]=r[9]=r[10]=r[11]=r[12]=r[13]=r[14]=r[15]=0),t)for(n=this.start;a<o&&n<64;++a)r[n>>2]|=e[a]<<SHIFT[3&n++];else for(n=this.start;a<o&&n<64;++a)(i=e.charCodeAt(a))<128?r[n>>2]|=i<<SHIFT[3&n++]:i<2048?(r[n>>2]|=(192|i>>6)<<SHIFT[3&n++],r[n>>2]|=(128|63&i)<<SHIFT[3&n++]):i<55296||i>=57344?(r[n>>2]|=(224|i>>12)<<SHIFT[3&n++],r[n>>2]|=(128|i>>6&63)<<SHIFT[3&n++],r[n>>2]|=(128|63&i)<<SHIFT[3&n++]):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++a)),r[n>>2]|=(240|i>>18)<<SHIFT[3&n++],r[n>>2]|=(128|i>>12&63)<<SHIFT[3&n++],r[n>>2]|=(128|i>>6&63)<<SHIFT[3&n++],r[n>>2]|=(128|63&i)<<SHIFT[3&n++]);this.lastByteIndex=n,this.bytes+=n-this.start,n>=64?(this.block=r[16],this.start=n-64,this.hash(),this.hashed=!0):this.start=n}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha1.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha1.prototype.hash=function(){var e,t,i=this.h0,n=this.h1,a=this.h2,o=this.h3,r=this.h4,s=this.blocks;for(e=16;e<80;++e)t=s[e-3]^s[e-8]^s[e-14]^s[e-16],s[e]=t<<1|t>>>31;for(e=0;e<20;e+=5)i=(t=(n=(t=(a=(t=(o=(t=(r=(t=i<<5|i>>>27)+(n&a|~n&o)+r+1518500249+s[e]<<0)<<5|r>>>27)+(i&(n=n<<30|n>>>2)|~i&a)+o+1518500249+s[e+1]<<0)<<5|o>>>27)+(r&(i=i<<30|i>>>2)|~r&n)+a+1518500249+s[e+2]<<0)<<5|a>>>27)+(o&(r=r<<30|r>>>2)|~o&i)+n+1518500249+s[e+3]<<0)<<5|n>>>27)+(a&(o=o<<30|o>>>2)|~a&r)+i+1518500249+s[e+4]<<0,a=a<<30|a>>>2;for(;e<40;e+=5)i=(t=(n=(t=(a=(t=(o=(t=(r=(t=i<<5|i>>>27)+(n^a^o)+r+1859775393+s[e]<<0)<<5|r>>>27)+(i^(n=n<<30|n>>>2)^a)+o+1859775393+s[e+1]<<0)<<5|o>>>27)+(r^(i=i<<30|i>>>2)^n)+a+1859775393+s[e+2]<<0)<<5|a>>>27)+(o^(r=r<<30|r>>>2)^i)+n+1859775393+s[e+3]<<0)<<5|n>>>27)+(a^(o=o<<30|o>>>2)^r)+i+1859775393+s[e+4]<<0,a=a<<30|a>>>2;for(;e<60;e+=5)i=(t=(n=(t=(a=(t=(o=(t=(r=(t=i<<5|i>>>27)+(n&a|n&o|a&o)+r-1894007588+s[e]<<0)<<5|r>>>27)+(i&(n=n<<30|n>>>2)|i&a|n&a)+o-1894007588+s[e+1]<<0)<<5|o>>>27)+(r&(i=i<<30|i>>>2)|r&n|i&n)+a-1894007588+s[e+2]<<0)<<5|a>>>27)+(o&(r=r<<30|r>>>2)|o&i|r&i)+n-1894007588+s[e+3]<<0)<<5|n>>>27)+(a&(o=o<<30|o>>>2)|a&r|o&r)+i-1894007588+s[e+4]<<0,a=a<<30|a>>>2;for(;e<80;e+=5)i=(t=(n=(t=(a=(t=(o=(t=(r=(t=i<<5|i>>>27)+(n^a^o)+r-899497514+s[e]<<0)<<5|r>>>27)+(i^(n=n<<30|n>>>2)^a)+o-899497514+s[e+1]<<0)<<5|o>>>27)+(r^(i=i<<30|i>>>2)^n)+a-899497514+s[e+2]<<0)<<5|a>>>27)+(o^(r=r<<30|r>>>2)^i)+n-899497514+s[e+3]<<0)<<5|n>>>27)+(a^(o=o<<30|o>>>2)^r)+i-899497514+s[e+4]<<0,a=a<<30|a>>>2;this.h0=this.h0+i<<0,this.h1=this.h1+n<<0,this.h2=this.h2+a<<0,this.h3=this.h3+o<<0,this.h4=this.h4+r<<0},Sha1.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,i=this.h2,n=this.h3,a=this.h4;return HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a]},Sha1.prototype.toString=Sha1.prototype.hex,Sha1.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,i=this.h2,n=this.h3,a=this.h4;return[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24&255,i>>16&255,i>>8&255,255&i,n>>24&255,n>>16&255,n>>8&255,255&n,a>>24&255,a>>16&255,a>>8&255,255&a]},Sha1.prototype.array=Sha1.prototype.digest,Sha1.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(20),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),e};var exports=createMethod();COMMON_JS?module.exports=exports:(root.sha1=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},93379:e=>{"use strict";var t=[];function i(e){for(var i=-1,n=0;n<t.length;n++)if(t[n].identifier===e){i=n;break}return i}function n(e,n){for(var o={},r=[],s=0;s<e.length;s++){var l=e[s],c=n.base?l[0]+n.base:l[0],d=o[c]||0,u="".concat(c," ").concat(d);o[c]=d+1;var p=i(u),h={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)t[p].references++,t[p].updater(h);else{var f=a(h,n);n.byIndex=s,t.splice(s,0,{identifier:u,updater:f,references:1})}r.push(u)}return r}function a(e,t){var i=t.domAPI(t);i.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,a){var o=n(e=e||[],a=a||{});return function(e){e=e||[];for(var r=0;r<o.length;r++){var s=i(o[r]);t[s].references--}for(var l=n(e,a),c=0;c<o.length;c++){var d=i(o[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}o=l}}},90569:e=>{"use strict";var t={};e.exports=function(e,i){var n=function(e){if(void 0===t[e]){var i=document.querySelector(e);
2if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},19216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,i)=>{"use strict";e.exports=function(e){var t=i.nc;t&&e.setAttribute("nonce",t)}},89037:e=>{"use strict";var t,i=(t=[],function(e,i){return t[e]=i,t.filter(Boolean).join("\n")});function n(e,t,n,a){var o;if(n)o="";else{o="",a.supports&&(o+="@supports (".concat(a.supports,") {")),a.media&&(o+="@media ".concat(a.media," {"));var r=void 0!==a.layer;r&&(o+="@layer".concat(a.layer.length>0?" ".concat(a.layer):""," {")),o+=a.css,r&&(o+="}"),a.media&&(o+="}"),a.supports&&(o+="}")}if(e.styleSheet)e.styleSheet.cssText=i(t,o);else{var s=document.createTextNode(o),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(s,l[t]):e.appendChild(s)}}var a={singleton:null,singletonCounter:0};e.exports=function(e){var t=a.singletonCounter++,i=a.singleton||(a.singleton=e.insertStyleElement(e));return{update:function(e){n(i,t,!1,e)},remove:function(e){n(i,t,!0,e)}}}},42823:(e,t,i)=>{var n=i(68563);e.exports=function(e,t,i){return void 0===i?n(e,t,!1):n(e,i,!1!==t)}},68563:e=>{e.exports=function(e,t,i,n){var a,o=0;return"boolean"!=typeof t&&(n=i,i=t,t=void 0),function(){var r=this,s=Number(new Date)-o,l=arguments;function c(){o=Number(new Date),i.apply(r,l)}function d(){a=void 0}n&&!a&&c(),a&&clearTimeout(a),void 0===n&&s>e?c():!0!==t&&(a=setTimeout(n?d:c,void 0===n?e-s:e))}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.