text: require=function t(e,i,n){function a(o,s){if(!i[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=i[o]={exports:{}};e[o][0].call(u.exports,function(t){var i=e[o][1][t];return a(i||t)},u,u.exports,t,e,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o<n.length;o++)a(n[o]);return a}({1:[function(t,e,i){function n(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function r(t){if(d===setTimeout)return setTimeout(t,0);if((d===n||!d)&&setTimeout)return d=setTimeout,setTimeout(t,0);try{return d(t,0)}catch(e){try{return d.call(null,t,0)}catch(e){return d.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===a||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){g&&f&&(g=!1,f.length?m=f.concat(m):v=-1,m.length&&l())}function l(){if(!g){var t=r(s);g=!0;for(var e=m.length;e;){for(f=m,m=[];++v<e;)f&&f[v].run();v=-1,e=m.length}f=null,g=!1,o(t)}}function c(t,e){this.fun=t,this.array=e}function u(){}var d,h,p=e.exports={};!function(){try{d="function"==typeof setTimeout?setTimeout:n}catch(t){d=n}try{h="function"==typeof clearTimeout?clearTimeout:a}catch(t){h=a}}();var f,m=[],g=!1,v=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];m.push(new c(t,e)),1!==m.length||g||r(l)},c.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=u,p.addListener=u,p.once=u,p.off=u,p.removeListener=u,p.removeAllListeners=u,p.emit=u,p.prependListener=u,p.prependOnceListener=u,p.listeners=function(t){return[]},p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},{}],2:[function(t,e,i){"use strict";var n=t("elements/domready"),a=t("prime/map")(),r=t("mout/object/merge"),o=(t("mout/array/forEach"),t("mout/string/trim")),s=t("../utils/elements.utils"),l=t("../utils/decouple"),c=t("../utils/async-foreach"),u=a,d={toggleSection:function(t,e,i,n){if(t.type.match(/^touch/)&&t.preventDefault(),e.siblings("[data-g-global-filter]")||e.parent("[data-g-global-filter]"))return d.globalToggleSection(t,e);if(e.matches("label"))return d.treatLabel(t,e);var a=e.parent(".card"),o=u.get(a),l=s("[data-save]"),h=null==e.data("g-assignments-check")?0:1;if(!o||!o.inputs){var p=a.search(".enabler input[type=hidden]");o||(o=u.set(a,{inputs:p}).get(a)),o.inputs||(o=u.set(a,r(u.get(a),{inputs:p})).get(a))}c(o.inputs,function(t){"none"!=(t=s(t)).parent("label, h4").compute("display")&&(t.value(h).emit("change"),s("body").emit("change",{target:t}))},function(){void 0!==i&&void 0!==n&&i+1==n.length&&l.disabled(!1)})},filterSection:function(t,e,i,n){if(e.siblings("[data-g-global-filter]")||e.parent("[data-g-global-filter]"))return d.globalFilterSection(t,e);var a=e.parent(".card"),l=s("[data-assignments-enabledonly]"),h=u.get(a)||u.set(a,{labels:a.search("label .settings-param-title")}).get(a);if(i=i||e.value(),!h||!h.labels){var p=a.search("label .settings-param-title");h||(h=u.set(a,{labels:p}).get(a)),h.labels||(h=u.set(a,r(u.get(a),{labels:p})).get(a))}if(h=s(h.labels),!i&&!l.checked())return a.style("display","inline-block"),h?h.search("!> label").style("display","block"):h;var f,m,g=0,v=0,b=0;h||e.parent(".card").style("display",l.checked()||i?"none":"inline-block"),c(h,function(t,e){if(t=s(t),f=o(t.text()),m=f.match(new RegExp("^"+i+"|\\s"+i,"gi")),l.checked()&&(m=Number(!!m)&Number(t.parent("label, h4").find('.enabler input[type="hidden"]').value())),m){var r=t.parent("[data-g-assignments-parent]");if(r&&(r=r.data("g-assignments-parent"))){var c=t.parent(".card").find('[data-g-assignments-group="'+r+'"]');c&&c.style("display","block")}t.parent("label, h4").style("display","block"),b++}else t.parent("label, h4").style("display","none"),v++;++g==h.length&&n&&a.style("display",b?"inline-block":"none")})},filterEnabledOnly:function(t,e){var i=s('[data-g-global-filter] input[type="text"]');d.globalFilterSection(t,i,e)},treatLabel:function(t,e){if(t&&t.stopPropagation&&t.preventDefault&&(t.stopPropagation(),t.preventDefault()),!s(t.target).matches(".knob, .toggle")){var i=e.find('input[type="hidden"]:not([disabled])');if(i){var n=i.value();return n=!!+n,i.value(Number(!n)).emit("change"),s("body").emit("change",{target:i}),!1}}},globalToggleSection:function(t,e){var i=null==e.data("g-assignments-check")?"[data-g-assignments-uncheck]":"[data-g-assignments-check]",n=s("[data-save]"),a=s("#assignments .card "+i+", .settings-assignments .card "+i);a&&(n.disabled(!0),c(a,function(e,i,n){d.toggleSection(t,s(e),i,n)}))},globalFilterSection:function(t,e){var i=e.value(),n=s("[data-assignments-enabledonly]"),a=s('#assignments .card .search input[type="text"], .settings-assignments .card .search input[type="text"]');(a||n.checked())&&c(a,function(e){d.filterSection(t,s(e),i,"global")})},toggleStateDelegation:function(t,e){var i="1"==e.value();e.attribute("disabled",!i)},chromeFix:function(){if(d.isChrome()){var t,e,i=s("#assignments .settings-param-wrapper, .settings-assignments .settings-param-wrapper");i&&i.forEach(function(i){if(i=s(i),e=parseInt(i.compute("max-height"),10),t=i[0].getBoundingClientRect().height,i.style({overflow:t>=e?"auto":"visible"}),t>=e){var n=100;l(i,"scroll",function(){n=100==n?100.01:100,i.parent(".card").style("width",n+"%")})}})}},isChrome:function(){return navigator.userAgent.toLowerCase().indexOf("chrome")>-1}};n(function(){var t=s("body");t.delegate("input",'#assignments .search input[type="text"], .settings-assignments .search input[type="text"]',d.filterSection),t.delegate("click","#assignments .card label, #assignments [data-g-assignments-check], #assignments [data-g-assignments-uncheck], .settings-assignments .card label, .settings-assignments [data-g-assignments-check], .settings-assignments [data-g-assignments-uncheck]",d.toggleSection),t.delegate("touchend","#assignments .card label, #assignments [data-g-assignments-check], #assignments [data-g-assignments-uncheck], .settings-assignments .card label, .settings-assignments [data-g-assignments-check], .settings-assignments [data-g-assignments-uncheck]",d.toggleSection),t.delegate("change","[data-assignments-enabledonly]",d.filterEnabledOnly),t.delegate("change",'#assignments input[type="hidden"][name], .settings-assignments input[type="hidden"][name]',d.toggleStateDelegation)}),e.exports=d},{"../utils/async-foreach":62,"../utils/decouple":64,"../utils/elements.utils":65,"elements/domready":110,"mout/array/forEach":173,"mout/object/merge":236,"mout/string/trim":271,"prime/map":301}],3:[function(t,e,i){"use strict";var n=t("elements"),a=t("elements/zen"),r=t("elements/domready"),o=t("../ui"),s=(t("mout/string/interpolate"),o.modal),l=t("mout/string/trim"),c=t("../utils/get-ajax-url").parse,u=t("../utils/get-ajax-url").global,d=t("../utils/get-ajax-suffix");r(function(){n("body").delegate("click","[data-changelog]",function(t,e){t.preventDefault(),s.open({content:"Loading",method:"post",className:"g5-dialog-theme-default g5-modal-changelog",data:{version:e.data("changelog")},remote:c(u("changelog")+d()),remoteLoaded:function(t,e){t.body.success&&e.elements.content.search("#g-changelog > ol > li > a").forEach(function(t,e){var i=(t=n(t)).href(),r=new RegExp("#(common|"+GANTRY_PLATFORM+")$","gi"),o=!i.match(r),s="chevron-"+(o?"down":"up");l(t.text())&&(e&&!o&&t.parent("li").after(t.parent("ol").find("> li")),a('i[class="fa g-changelog-toggle fa-fw fa-'+s+'"][aria-hidden="true"]').bottom(t),o&&t.nextSibling().style({overflow:"hidden",height:0}),t.on("click",function(e){e.preventDefault();var i=t.find('i[class*="fa-chevron-"]');i.hasClass("fa-chevron-down")?(i.removeClass("fa-chevron-down").addClass("fa-chevron-up"),t.nextSibling().slideDown()):(i.removeClass("fa-chevron-up").addClass("fa-chevron-down"),t.nextSibling().slideUp())}))})}})})})},{"../ui":53,"../utils/get-ajax-suffix":69,"../utils/get-ajax-url":70,elements:112,"elements/domready":110,"elements/zen":136,"mout/string/interpolate":260,"mout/string/trim":271}],4:[function(t,e,i){"use strict";var n=t("elements"),a=t("elements/domready"),r=t("agent"),o=t("../ui").modal,s=t("mout/random/guid"),l=t("mout/string/trim"),c=t("../utils/get-ajax-suffix"),u=t("../utils/get-ajax-url").parse,d=(t("../utils/get-ajax-url").global,t("../utils/history")),h=t("mout/queryString/getParam"),p=t("mout/queryString/setParam"),f=function(t,e){if("wordpress"==GANTRY_PLATFORM){var i=t.replace(/[^a-z\d_-\s]/i,"_").toLowerCase(),a=n('[href*="/'+e+'/"]'),r=d.getPageUrl(),o=h(r,"view");a&&a.forEach(function(t){var a=(t=n(t)).href().replace("/"+e+"/","/"+i+"/");t.href(a)}),o=o.replace("/"+e+"/","/"+i+"/"),r=p(r,"view",o),d.replaceState({uuid:s(),doNothing:!0},window.document.title,r)}};a(function(){var t,e,i,a,s=n("body");s.delegate("keydown",".config-select-wrap [data-title-edit]",function(t,e){var i=t.which?t.which:t.keyCode;32!=i&&13!=i||(t.preventDefault(),s.emit("mousedown",t))}),s.delegate("mousedown",".config-select-wrap [data-title-edit]",function(n,s){t=s.siblings(".g-selectize-control"),e=s.siblings("select"),(i=s.siblings("[data-title-editable]")).gConfEditAttached||(i.gConfEditAttached=!0,i.on("title-edit-end",function(n,d,h){if(n=l(n),h||n==d)return t.style("display","inline-block"),void i.style("display","none").attribute("contenteditable",null);s.addClass("disabled"),s.removeClass("fa-pencil").addClass("fa-spin-fast fa-spinner"),a=i.data("g-config-href"),r("post",u(a+c()),{title:n},function(a,r){if(r.body.success){var l=e.selectizeInstance,c=e.value(),u=l.Options[c];u[l.options.labelField]=n,l.updateOption(c,u),t.style("display","inline-block"),i.style("display","none")}else o.open({content:r.body.html||r.body,afterOpen:function(t){r.body.html||t.style({width:"90%"})}}),i.data("title-editable",d).text(d);f(n,c),s.removeClass("disabled"),s.removeClass("fa-spin-fast fa-spinner").addClass("fa-pencil")})})),i.style({width:t.compute("width"),display:"inline-block"}),t.style("display","none")})}),e.exports={}},{"../ui":53,"../utils/get-ajax-suffix":69,"../utils/get-ajax-url":70,"../utils/history":74,agent:79,elements:112,"elements/domready":110,"mout/queryString/getParam":246,"mout/queryString/setParam":248,"mout/random/guid":250,"mout/string/trim":271}],5:[function(t,e,i){"use strict";var n=t("elements"),a=t("elements/zen"),r=t("elements/domready"),o=t("mout/string/trim"),s=t("mout/object/keys"),l=t("../ui").modal,c=t("../ui").toastr,u=t("agent"),d=t("../utils/get-ajax-suffix"),h=t("../utils/get-ajax-url").parse,p=t("../utils/get-ajax-url").global,f=t("../utils/flags-state");t("./dropdown-edit"),r(function(){var t=n("body");t.delegate("click","[data-g5-outline-create], [data-g5-outline-duplicate]",function(t,e){t&&t.preventDefault(),l.open({content:"Loading",method:"post",overlayClickToClose:!1,remote:h(e.href()+d()),remoteLoaded:function(t,e){if(t.body.success){var r=e.elements.content.find('[name="title"]'),o=e.elements.content.find("[data-g-outline-create-confirm]");r.on("keyup",function(t){13===t.which&&o.emit("click")}),o.on("click",function(){o.hideIndicator(),o.showIndicator();var t=h(o.data("g-outline-create-confirm")+d()),s=e.elements.content.find('[name="from"]:checked'),p=e.elements.content.find('[name="preset"]'),f=e.elements.content.find('[name="outline"]'),m=e.elements.content.find('[name="inherit"]'),g={title:r.value(),from:s?s.value():null,preset:p?p.value():null,outline:f?f.value():null,inherit:m.checked()?1:0};["title","from","preset","outline"].forEach(function(t){g[t]||delete g[t]}),u("post",t,g,function(t,e){if(o.hideIndicator(),e.body.success){var r=n("#configurations").find("ul").find("li"),s=a("li").attribute("class",r.attribute("class"));s.after(r).html(e.body.outline),c.success(e.body.html||"Action successfully completed.",e.body.title||""),i(s.find("[data-title-editable]")),l.close()}else l.open({content:e.body.html||e.body,afterOpen:function(t){e.body.html||t.style({width:"90%"})}})})}),setTimeout(function(){r[0].focus()},5)}else l.enableCloseByOverlay()}})}),t.delegate("change",'input[type="radio"]#from-preset, input[type="radio"]#from-outline',function(t,e){var i=(e=n(e)).value(),a=e.parent(".card").search(".g-create-from").style("display","none").filter(function(t){return(t=n(t)).hasClass("g-create-from-"+i)});a&&n(a).style("display","block")}),t.delegate("click","#configurations [data-g-config]",function(e,i){var a=i.data("g-config"),r=i.data("g-config-href"),o=i.data("g-config-href-confirm"),m=window.btoa(r),g=(i.data("g-config-method")||"post").toLowerCase();if(e&&e.preventDefault&&e.preventDefault(),"delete"==a&&!f.get("free:to:delete:"+m,!1))return f.warning({url:h(r+d()),callback:function(e,a){var r=a.find("[data-g-delete-confirm]"),o=a.find("[data-g-delete-cancel]");r&&(r.on("click",function(e){if(e.preventDefault(),this.attribute("disabled"))return!1;f.get("free:to:delete:"+m,!0),n([r,o]).attribute("disabled"),t.emit("click",{target:i}),l.close()}),o.on("click",function(t){if(t.preventDefault(),this.attribute("disabled"))return!1;n([r,o]).attribute("disabled"),f.get("free:to:delete:"+m,!1),l.close()}))}}),!1;i.hideIndicator(),i.showIndicator(),u(g,h((o||r)+d()),{},function(e,a){if(a.body.success){var r=n("#configuration-selector"),o=r.value(),u=a.body.outline,d=n('[href="'+p("configurations")+'"]');if(u&&o==u){var h=s(r.selectizeInstance.Options);h.length&&d.href(d.href().replace("style="+u,"style="+h.shift()))}d?t.emit("click",{target:d}):window.location=window.location,c.success(a.body.html||"Action successfully completed.",a.body.title||""),u&&(t.outlineDeleted=u)}else l.open({content:a.body.html||a.body,afterOpen:function(t){a.body.html||t.style({width:"90%"})}});i.hideIndicator()})});var e=function(t,e,i){if(this.style("text-overflow","ellipsis"),!i&&t!=e){var n=this,r=n.data("g-config-href"),s=(n.data("g-config-method")||"post").toLowerCase(),c=n.parent();c.showIndicator(),c.find("[data-title-edit]").addClass("disabled"),u(s,h(r+d()),{title:o(t)},function(i,r){if(r.body.success){n.data("title",t).data("tip",t);var o=a("div").html(r.body.outline),s=o.find("h4 span:last-child"),u=o.find(".outline-actions");n.parent(".card").find("h4 span:last-child").html(s.html()),n.parent(".card").find(".outline-actions").html(u.html())}else l.open({content:r.body.html||r.body,afterOpen:function(t){r.body.html||t.style({width:"90%"})}}),n.data("title-editable",e).text(e);c.hideIndicator(),c.find("[data-title-edit]").removeClass("disabled")})}},i=function(t){t&&t.length&&t.forEach(function(t){(t=n(t)).confWasAttached=!0,t.on("title-edit-start",function(){t.style("text-overflow","inherit")}),t.on("title-edit-end",e)})};t.on("statechangeAfter",function(t,e){var a=n("#configurations [data-title-editable]");if(!a)return!0;a=a.filter(function(t){return void 0===n(t).confWasAttached}),i(a)}),i(n("#configurations [data-title-editable]"))}),e.exports={}},{"../ui":53,"../utils/flags-state":68,"../utils/get-ajax-suffix":69,"../utils/get-ajax-url":70,"./dropdown-edit":4,agent:79,elements:112,"elements/domready":110,"elements/zen":136,"mout/object/keys":235,"mout/string/trim":271}],6:[function(t,e,i){"use strict";var n=t("elements/domready"),a=t("elements/attributes"),r=t("prime/map"),o=t("mout/lang/deepEquals"),s=t("mout/lang/is"),l=t("mout/lang/isString"),c=t("mout/object/has"),u=t("mout/collection/forEach"),d=(t("mout/array/invoke"),t("../utils/history")),h=t("../utils/flags-state"),p=t("./submit");t("./multicheckbox");var f,m=function(t){var e=new r,i=a("[data-g-styles-defaults]"),n=a('input[type="checkbox"].settings-param-toggle');if(i=i?JSON.parse(i.data("g-styles-defaults")):{},n){var o={};n.forEach(function(t){t=a(t),o[t.id()]=t.checked()}),e.set("__js__overrides",JSON.stringify(o))}if(t){var s;return t.forEach(function(t){(s=a('[name="'+t+'"]'))&&e.set(t,s.value())}),e}var l=a(".settings-block [name]");return!!l&&(l.forEach(function(t){var n=(t=a(t)).attribute("name"),r=!c(i,n);"checkbox"!=t.type()||t.value().length||t.value("0"),e.set(n,r?t.value():i[n])},this),e)},g=function(t){var e=new r;return u(t,function(t,i){e.set(i,t)}),e},v={single:function(){},whole:function(){},blanks:function(){},presets:function(){}};n(function(){var t,e=a("body");f=m(),v.single=function(t,e){var i=e.parent(".settings-param")||e.parent("h4")||e.parent(".input-group"),n=i?i.matches("h4")?i:i.find(".settings-param-title, .g-instancepicker-title"):null,a=!!i&&i.find(".settings-param-toggle"),r=!1,o=e.hasClass("settings-param-toggle");if(i){if(o)return v.whole("force");"checkbox"==e.type()&&e.value(Number(e.checked()).toString()),f&&null==f.get(e.attribute("name"))&&(f.set(e.attribute("name"),e.value()),r=!0),n&&f&&null!=f.get(e.attribute("name"))&&(f.get(e.attribute("name"))!==e.value()||r?(a&&t.forceOverride&&!a.checked()&&a[0].click(),n.showIndicator("changes-indicator font-small fa fa-circle-o fa-fw")):(a&&t.forceOverride&&a.checked()&&a[0].click(),n.hideIndicator()),v.blanks(t,i.find(".settings-param-field")),v.whole("force"),v.presets())}},v.whole=function(t){if(f){var e=o(f,m(t?f.keys():null),function(t,e){return l(t)&&l(e)&&"#"==t.substr(0,1)&&"#"==e.substr(0,1)?t.toLowerCase()==e.toLowerCase():s(t,e)}),i=a("[data-save]");i&&(h.set("pending",!e),i[e?"hideIndicator":"showIndicator"]("changes-indicator fa fa-circle-o fa-fw"))}},v.blanks=function(t,e){if(e){var i=e.find("[name]"),n=e.find(".g-reset-field");if(!i||!n)return!0;!i.value()||i.disabled()?n.style("display","none"):n.removeAttribute("style")}},v.presets=function(){var e,i=a("[data-g-styles]");if(i){t||(t=new r,u(i,function(i,n){i=a(i),e={index:n,map:g(JSON.parse(i.data("g-styles")))},t.set(i,e)}));var n,s;t.forEach(function(t,e){(n=m(t.map.keys())).unset("__js__overrides"),s=o(n,t.map,function(t,e){return t==e}),a(a("[data-g-styles]")[t.index]).parent()[s?"addClass":"removeClass"]("g-preset-match")})}},e.delegate("input",'.settings-block input[name][type="text"], .settings-block textarea[name]',v.single),e.delegate("change",'.settings-block input[name][type="hidden"], .settings-block input[name][type="checkbox"], .settings-block select[name], .settings-block .selectized[name], .settings-block input[id][type="checkbox"].settings-param-toggle',v.single),e.delegate("input",".g-urltemplate",function(t,e){var i=e.parent(".settings-param").siblings();if(i&&(i=i.find("[data-g-urltemplate]"))){var n=i.data("g-urltemplate");i.attribute("href",n.replace(/#ID#/g,e.value()))}}),e.delegate("mouseenter",".settings-param-field",v.blanks,!0),e.delegate("click",".g-reset-field",function(t,i){var n,a=i.parent(".settings-param-field");if(a&&(n=a.find("[name]"))&&!n.disabled()){var r=n.selectizeInstance;r?r.setValue(""):n.value(""),n.emit("change"),e.emit("input",{target:n}),e.emit("keyup",{target:n})}}),e.on("statechangeEnd",function(){d.getState();e.emit("updateOriginalFields")}),e.on("updateOriginalFields",function(){f=m(),v.presets()}),v.presets()}),e.exports={compare:v,collect:m,submit:p}},{"../utils/flags-state":68,"../utils/history":74,"./multicheckbox":7,"./submit":8,"elements/attributes":107,"elements/domready":110,"mout/array/invoke":177,"mout/collection/forEach":188,"mout/lang/deepEquals":200,"mout/lang/is":201,"mout/lang/isString":210,"mout/object/has":233,"prime/map":301}],7:[function(t,e,i){"use strict";var n=t("elements/attributes"),a=t("elements/domready"),r=t("mout/array/remove"),o=t("mout/array/insert");t("mout/array/contains");a(function(){var t=n("body");t.delegate("change",'.input-multicheckbox .input-group input[name][type="hidden"]',function(t,e){var i=e.attribute("name"),a=e.value().split(","),s=n('[data-multicheckbox-field="'+i+'"]');s&&s.forEach(function(t){(t=n(t)).checked()&&o(a,t.value()),t.checked()||r(a,t.value())}),e.value(a.filter(String).join(","))}),t.delegate("change",'.input-multicheckbox .input-group input[data-multicheckbox-field][type="checkbox"]',function(e,i){var a=n('[name="'+i.data("multicheckbox-field")+'"]'),s=i.value(),l=a.value().split(","),c=i.checked();c&&o(l,s),c||r(l,s),a.value(l.filter(String).join(",")),t.emit("change",{target:a})})})},{"elements/attributes":107,"elements/domready":110,"mout/array/contains":165,"mout/array/insert":175,"mout/array/remove":180}],8:[function(t,e,i){"use strict";var n=t("elements"),a=t("mout/lang/isArray"),r=t("mout/array/contains"),o=t("mout/string/trim"),s=t("../utils/field-validation");e.exports=function(t,e,i){var l=[],c=[];t=n(t),e=n(e),i=i||{},n(t).forEach(function(t){var o=(t=n(t)).attribute("name"),u=t.attribute("type");if(o&&!t.disabled()&&("radio"!=u||t.checked())&&(t=e.find('[name="'+o+'"]'+("radio"==u?":checked":"")),"checkbox"===u&&e.find('[type="hidden"][name="'+o+'"]')&&(t=e.find('[name="'+o+'"][type="checkbox"]')),t)){var d="checkbox"==t.type()?Number(t.checked()):t.value(),h=t.parent(".settings-param"),p=h?h.find('> input[type="checkbox"]'):null;if(p=p||n(t.data("override-target")),r(["select","select-multiple"],t.type())&&t.attribute("multiple")&&(d=(t.search("option[selected]")||[]).map(function(t){return n(t).value()})),p&&!p.checked())return;s(t)||c.push(t),a(d)?d.forEach(function(t){l.push(o+"[]="+encodeURIComponent(t))}):(!i.submitUnchecked||"checkbox"!=t.type()||"checkbox"==t.type()&&d)&&l.push(o+"="+encodeURIComponent(d))}});var u,d=e.search("h4 [data-title-editable]");return d&&d.forEach(function(t){(t=n(t)).parent("[data-collection-template]")||(u=t.data("collection-key")||(i.isRoot?"settings[title]":"title"),l.push(u+"="+encodeURIComponent(o(t.data("title-editable")))))}),{valid:l,invalid:c}}},{"../utils/field-validation":67,elements:112,"mout/array/contains":165,"mout/lang/isArray":202,"mout/string/trim":271}],9:[function(t,e,i){"use strict";var n=t("prime"),a=t("elements"),r=t("./base"),o=t("elements/zen"),s=t("../../utils/get-ajax-url").config,l=new n({inherits:r,options:{type:"atom"},constructor:function(t){r.call(this,t),this.on("changed",this.hasChanged)},updateTitle:function(t){return this.block.find(".title").text(t),this.setTitle(t),this},layout:function(){var t=s(this.getPageId()+"/layout/"+this.getType()+"/"+this.getId()),e=this.getSubType()?'data-lm-blocksubtype="'+this.getSubType()+'"':"";return'<div class="'+this.getType()+'" data-lm-id="'+this.getId()+'" data-lm-blocktype="'+this.getType()+'" '+e+'><span><span class="title">'+this.getTitle()+'</span><span class="font-small">'+(this.getSubType()||this.getKey()||this.getType())+'</span></span><div class="float-right"><i aria-label="Configure Atom Settings" class="fa fa-cog" aria-hidden="true" data-lm-nodrag data-lm-nodrag data-lm-settings="'+t+'"></i></div></div>'},hasChanged:function(t,e){var i=this.block.find("span > i.changes-indicator:first-child");i&&e&&!e.changeState||(this.block[t?"addClass":"removeClass"]("block-has-changes"),!t&&i&&i.remove(),t&&!i&&o("i.fa.fa-circle-o.changes-indicator").before(this.block.find(".icon")))},onRendered:function(t,e){(a('[data-lm-disabled][data-lm-subtype="'+this.getSubType()+'"]')||0===this.getAttribute("enabled"))&&this.disable()}});e.exports=l},{"../../utils/get-ajax-url":70,"./base":11,elements:112,"elements/zen":136,prime:300}],10:[function(t,e,i){"use strict";var n=t("prime"),a=t("elements"),r=t("elements/zen"),o=t("mout/function/bind"),s=new n({inherits:t("./section"),options:{type:"atoms",attributes:{name:"Atoms Section"}},layout:function(){return this.deprecated='<div class="atoms-notice">Looking for Atoms? To make it easier we moved them in the <a href="#"><i class="fa fa-fw fa-list-alt" aria-hidden="true"></i> Page Settings</a>.</div>','<div class="atoms-section" style="display: none;" data-lm-id="'+this.getId()+'" data-lm-blocktype="'+this.getType()+'"><div class="section-header clearfix"><h4 class="float-left">'+this.getAttribute("name")+"</h4></div></div>"},getId:function(){return this.id||(this.id=this.options.type)},onDone:function(t){if(!this.block.search('[data-lm-blocktype="atom"]')){var e=[this.getId()],i=this.block.search("[data-lm-id]");return i&&i.forEach(function(t){e.push(a(t).data("lm-id"))}),e.reverse().forEach(o(function(t){this.options.builder.remove(t)},this)),this.block.empty()[0].outerHTML=this.deprecated,void this._attachRedirect()}this.block.search("[data-lm-id]")||(this.grid.insert(this.block,"bottom"),this.options.builder.add(this.grid)),r("div").html(this.deprecated).firstChild().after(this.block),this._attachRedirect()},_attachRedirect:function(){var t=a('[data-g5-nav="page"]');t&&a(".atoms-notice a").on("click",function(e){e.preventDefault(),a("body").emit("click",{target:t})})}});e.exports=s},{"./section":19,elements:112,"elements/zen":136,"mout/function/bind":191,prime:300}],11:[function(t,e,i){"use strict";var n=t("prime"),a=t("prime-util/prime/options"),r=t("prime-util/prime/bound"),o=t("prime/emitter"),s=t("elements/zen"),l=t("mout/string/trim"),c=t("elements"),u=t("../id"),d=t("mout/object/size"),h=t("mout/object/get"),p=t("mout/object/has"),f=t("mout/object/set"),m=t("../../utils/translate"),g=t("../../utils/get-outline").getCurrentOutline;t("elements/traversal");var v=new n({mixin:[r,a],inherits:o,options:{subtype:!1,attributes:{},inherit:{}},constructor:function(t){return this.setOptions(t),this.fresh=!this.options.id,this.id=this.options.id||u(this.options),this.attributes=this.options.attributes||{},this.inherit=this.options.inherit||{},this.block=s("div").html(this.layout()).firstChild(),this.on("rendered",this.bound("onRendered")),this},guid:function(){return guid()},getId:function(){return this.id||(this.id=u(this.options))},getType:function(){return this.options.type||""},getSubType:function(){return this.options.subtype||""},getTitle:function(){return l(this.options.title||"Untitled")},setTitle:function(t){return this.options.title=l(t||"Untitled"),this},getKey:function(){return""},getPageId:function(){var t=c("[data-lm-root]");return t?t.data("lm-page"):"data-root-not-found"},getAttribute:function(t){return h(this.attributes,t)},getAttributes:function(){return this.attributes||{}},getInheritance:function(){return this.inherit||{}},updateTitle:function(){return this},setAttribute:function(t,e){return f(this.attributes,t,e),this},setAttributes:function(t){return this.attributes=t,this},setInheritance:function(t){return this.inherit=t,this},hasAttribute:function(t){return p(this.attributes,t)},enableInheritance:function(){},disableInheritance:function(){},refreshInheritance:function(){},hasInheritance:function(){return d(this.inherit)&&this.inherit.outline!=g()},disable:function(){this.block.title(m("GANTRY5_PLATFORM_JS_LM_DISABLED_PARTICLE","particle")),this.block.addClass("particle-disabled")},enable:function(){this.block.removeAttribute("title"),this.block.removeClass("particle-disabled")},insert:function(t,e){return this.block[e||"after"](t),this},adopt:function(t){return t.insert(this.block),this},isNew:function(t){return void 0!==t&&(this.fresh=!!t),this.fresh},dropzone:function(){return"data-lm-dropzone"},addDropzone:function(){this.block.data("lm-dropzone",!0)},removeDropzone:function(){this.block.data("lm-dropzone",null)},layout:function(){},onRendered:function(){},setLayout:function(t){return this.block=t,this},getLimits:function(){return!1}});e.exports=v},{"../../utils/get-outline":71,"../../utils/translate":77,"../id":26,elements:112,"elements/traversal":135,"elements/zen":136,"mout/object/get":232,"mout/object/has":233,"mout/object/set":240,"mout/object/size":241,"mout/string/trim":271,prime:300,"prime-util/prime/bound":296,"prime-util/prime/options":297,"prime/emitter":299}],12:[function(t,e,i){"use strict";var n=t("prime"),a=t("./base"),r=t("../../utils/elements.utils"),o=t("elements/zen"),s=t("mout/number/enforcePrecision"),l=t("mout/function/bind"),c=new n({inherits:a,options:{type:"block",attributes:{size:100}},constructor:function(t){a.call(this,t),t.attributes&&t.attributes.size&&this.setAttribute("size",s(t.attributes.size,1)),this.on("changed",this.hasChanged)},getSize:function(){return s(this.getAttribute("size"),1)},setSize:function(t,e){t=void 0===t?this.getSize():Math.max(0,Math.min(100,parseFloat(t))),t=s(t,1),e&&this.setAttribute("size",t),r(this.block).style({flex:"0 1 "+t+"%","-webkit-flex":"0 1 "+t+"%","-ms-flex":"0 1 "+t+"%"}),this.emit("resized",t,this)},setAnimatedSize:function(t,e){t=void 0===t?this.getSize():Math.max(0,Math.min(100,parseFloat(t))),t=s(t,1),e&&this.setAttribute("size",t),r(this.block).animate({flex:"0 1 "+t+"%","-webkit-flex":"0 1 "+t+"%","-ms-flex":"0 1 "+t+"%"},l(function(){this.block.attribute("style",null),this.setSize(t)},this)),this.emit("resized",t,this)},setLabelSize:function(t){var e=this.block.find("> .particle-size");if(!e)return!1;e.text(s(t,1)+"%")},layout:function(){return'<div class="g-block" data-lm-id="'+this.getId()+'"'+this.dropzone()+' data-lm-blocktype="block"></div>'},onRendered:function(t,e){if(t.block.find('> [data-lm-blocktype="section"]')&&this.removeDropzone(),e){var i=e.block.parent();(i.data("lm-root")||"container"==i.data("lm-blocktype")&&(i.parent().data("lm-root")||"wrapper"==i.parent().data("lm-blocktype")))&&(o("span.particle-size").text(this.getSize()+"%").top(t.block),t.on("resized",this.bound("onResize")))}},onResize:function(t){this.setLabelSize(t)},hasChanged:function(t){var e,i=this.block.find('> [data-lm-id]:not([data-lm-blocktype="section"]):not([data-lm-blocktype="container"])');if(this.changeState=t,!i)return i=this.block.find("> .particle-size")||this.block.parent('[data-lm-blocktype="block"]').find("> .particle-size"),e=i.find("i:first-child"),!t&&e&&e.remove(),void(t&&!e&&o("i.fa.fa-circle-o.changes-indicator").top(i));var n=this.options.builder.get(i.data("lm-id"));n&&n.emit("changed",t,this)}});e.exports=c},{"../../utils/elements.utils":65,"./base":11,"elements/zen":136,"mout/function/bind":191,"mout/number/enforcePrecision":221,prime:300}],13:[function(t,e,i){"use strict";var n=t("prime"),a=t("./base"),r=t("elements/zen"),o=(t("elements"),t("../../utils/get-ajax-url").config),s=t("../../utils/translate"),l=new n({inherits:a,options:{type:"container"},constructor:function(t){a.call(this,t),this.on("changed",this.hasChanged)},layout:function(){return'<div class="g-lm-container" data-lm-id="'+this.getId()+'" data-lm-blocktype="container"></div>'},onRendered:function(t,e){e||this.addSettings(t)},hasChanged:function(t,e){var i=this.block.find("span.title > i:first-child");if((!i||!e||e.changeState)&&(this.block[t?"addClass":"removeClass"]("block-has-changes"),!t&&i&&i.remove(),t&&!i)){var n=this.block.find("span.title");n&&r("i.fa.fa-circle-o.changes-indicator").top(n)}},addSettings:function(t){var e=o(this.getPageId()+"/layout/"+this.getType()+"/"+this.getId()),i=r("div.container-wrapper.clearfix").top(t.block),n=r("div.container-title").bottom(i),a=r("div.container-actions").bottom(i);n.html('<span class="title">'+this.getType()+"</span>"),a.html('<span data-tip="'+s("GANTRY5_PLATFORM_JS_LM_SETTINGS","Container")+'" data-tip-place="top-left"><i aria-label="'+s("GANTRY5_PLATFORM_JS_LM_CONFIGURE_SETTINGS","Container")+'" class="fa fa-cog" aria-hidden="true" data-lm-settings="'+e+'"></i></span>')}});e.exports=l},{"../../utils/get-ajax-url":70,"../../utils/translate":77,"./base":11,elements:112,"elements/zen":136,prime:300}],14:[function(t,e,i){"use strict";var n=t("prime"),a=t("./base"),r=(t("elements"),t("../../utils/get-ajax-url").config,new n({inherits:a,options:{type:"grid"},constructor:function(t){a.call(this,t),this.on("changed",this.hasChanged)},layout:function(){return'<div class="g-grid nowrap" data-lm-id="'+this.getId()+'" '+this.dropzone()+'  data-lm-samewidth data-lm-blocktype="grid"></div>'},onRendered:function(){var t=this.block.parent();t&&"atoms"==t.data("lm-blocktype")&&this.block.removeClass("nowrap"),(t&&t.data("lm-root")||"container"==t.data("lm-blocktype")&&t.parent().data("lm-root"))&&this.removeDropzone()},hasChanged:function(t){var e=this.block.parent('[data-lm-blocktype="section"]'),i=!!e&&e.data("lm-id");this.changeState=t,e&&i&&this.options.builder&&this.options.builder.get(i).emit("changed",t,this)}}));e.exports=r},{"../../utils/get-ajax-url":70,"./base":11,elements:112,prime:300}],15:[function(t,e,i){e.exports={base:t("./base"),atom:t("./atom"),section:t("./section"),offcanvas:t("./offcanvas"),wrapper:t("./wrapper"),atoms:t("./atoms"),grid:t("./grid"),container:t("./container"),block:t("./block"),particle:t("./particle"),position:t("./position"),system:t("./system"),spacer:t("./spacer")}},{"./atom":9,"./atoms":10,"./base":11,"./block":12,"./container":13,"./grid":14,"./offcanvas":16,"./particle":17,"./position":18,"./section":19,"./spacer":20,"./system":21,"./wrapper":22}],16:[function(t,e,i){"use strict";var n=t("prime"),a=t("./section"),r=t("../../utils/get-ajax-url").config,o=t("../../utils/get-outline").getOutlineNameById,s=t("../../utils/translate"),l=new n({inherits:a,options:{type:"offcanvas",attributes:{name:"Offcanvas Section"}},layout:function(){var t=r(this.getPageId()+"/layout/"+this.getType()+"/"+this.getId()),e="",i="";if(this.hasInheritance()){var n=o(this.inherit.outline);e='<div class="g-inherit g-section-inherit"><div class="g-inherit-content">'+s("GANTRY5_PLATFORM_INHERITING_FROM_X","<strong>"+n+"</strong>")+"</div></div>",i=" g-inheriting g-inheriting-"+this.inherit.include.join(" g-inheriting-")}return'<div class="offcanvas-section'+i+'" data-lm-id="'+this.getId()+'" data-lm-blocktype="'+this.getType()+'"><div class="section-header clearfix"><h4 class="float-left" title="'+this.getAttribute("name")+'">'+this.getAttribute("name")+'</h4><div class="section-actions float-right"><span data-tip="'+s("GANTRY5_PLATFORM_JS_LM_ADD_ROW","Offcanvas")+'" data-tip-place="top-right"><i aria-label="'+s("GANTRY5_PLATFORM_JS_LM_ADD_ROW","Offcanvas")+'" class="fa fa-plus" aria-hidden="true"></i></span> <span class="section-settings" data-tip="'+s("GANTRY5_PLATFORM_JS_LM_SETTINGS","Offcanvas")+'" data-tip-place="top-right"><i aria-label="'+s("GANTRY5_PLATFORM_JS_LM_CONFIGURE_SETTINGS","Offcanvas")+'" class="fa fa-cog" aria-hidden="true" data-lm-settings="'+t+'"></i></span></div></div>'+e+"</div>"},getId:function(){return this.id||(this.id=this.options.type)}});e.exports=l},{"../../utils/get-ajax-url":70,"../../utils/get-outline":71,"../../utils/translate":77,"./section":19,prime:300}],17:[function(t,e,i){(function(i){"use strict";var n=t("prime"),a=t("elements"),r=t("./atom"),o=(t("mout/function/bind"),t("mout/number/enforcePrecision")),s=t("mout/object/forOwn"),l=t("../../utils/get-ajax-url").config,c=t("../../utils/get-outline").getOutlineNameById,u=t("../../utils/translate"),d=0,h=new n({inherits:r,options:{type:"particle"},constructor:function(t){++d,r.call(this,t)},layout:function(){var t=l(this.getPageId()+"/layout/"+this.getType()+"/"+this.getId()),e=this.getSubType()?'data-lm-blocksubtype="'+this.getSubType()+'"':"",i="";return this.hasInheritance()&&(i=" g-inheriting",this.inherit.include.length&&(i+=" g-inheriting-"+this.inherit.include.join(" g-inheriting-"))),'<div class="'+this.getType()+i+'" data-lm-id="'+this.getId()+'" data-lm-blocktype="'+this.getType()+'" '+e+'><span><span class="icon" '+this.addInheritanceTip(!0)+'><i class="fa '+this.getIcon()+'" aria-hidden="true"></i></span><span class="title">'+this.getTitle()+'</span><span class="font-small">'+(this.getKey()||this.getSubType()||this.getType())+'</span></span><div class="float-right"><span class="particle-size"></span> <i aria-label="'+u("GANTRY5_PLATFORM_JS_LM_CONFIGURE_SETTINGS","Particle")+'" class="fa fa-cog" aria-hidden="true" data-lm-nodrag data-lm-settings="'+t+'"></i></div></div>'},enableInheritance:function(){if(this.block.attribute("class",this.cleanKlass(this.block.attribute("class"))),this.hasInheritance()){c(this.inherit.outline);var t=this.block.find(".icon");this.block.addClass("g-inheriting"),this.inherit.include.length&&this.block.addClass("g-inheriting-"+this.inherit.include.join(" g-inheriting-")),this.block.find(".icon .fa").attribute("class","fa "+this.getIcon()),s(this.getInheritanceTip(),function(e,i){t.data(i,e)}),i.G5.tips.reload()}},disableInheritance:function(){var t=this.block.find(".icon");this.block.attribute("class",this.cleanKlass(this.block.attribute("class"))),this.block.removeClass("g-inheriting"),this.block.find(".icon .fa").attribute("class","fa "+this.getIcon()),s(this.getInheritanceTip(),function(e,i){t.data(i,null)}),i.G5.tips.reload()},refreshInheritance:function(){this.block[this.hasInheritance()?"removeClass":"addClass"]("g-inheritance"),this.hasInheritance()&&this.block.attribute("class",this.cleanKlass(this.block.attribute("class")))},addInheritanceTip:function(t){var e=this.getInheritanceTip();if(t){var i="";s(e,function(t,e){i+="data-"+e+'="'+t+'" '}),e=i}return this.hasInheritance()?e:""},getInheritanceTip:function(){var t=c(this.inherit?this.inherit.outline:null),e=this.inherit.particle||"",i=(this.inherit.include||[]).join(", ");return{tip:u("GANTRY5_PLATFORM_INHERITING_FROM_X","<strong>"+t+"</strong>")+"<br />ID: "+e+"<br />Replace: "+i,"tip-offset":-10,"tip-place":"top-right"}},cleanKlass:function(t){return(t=(t||"").split(" ")).filter(function(t){return!t.match(/^g-inheriting-/)}).join(" ")},setLabelSize:function(t){var e=this.block.find(".particle-size");if(!e)return!1;e.text(o(t,1)+"%")},onRendered:function(t,e){var i=e.getSize()||100;(a('[data-lm-disabled][data-lm-subtype="'+this.getSubType()+'"]')||0===this.getAttribute("enabled"))&&this.disable(),this.setLabelSize(i),e.on("resized",this.bound("onParentResize"))},getParent:function(){var t=this.block.parent("[data-lm-id]");return this.options.builder.get(t.data("lm-id"))},onParentResize:function(t){this.setLabelSize(t)},getIcon:function(){if(this.hasInheritance())return"fa-lock";var t=this.getType(),e=this.getSubType(),i=a('.particles-container [data-lm-blocktype="'+t+'"][data-lm-subtype="'+e+'"]');return i?i.data("lm-icon"):"fa-cube"},getLimits:function(t){if(!t)return!1;var e=t.block.nextSibling()||t.block.previousSibling()||!1;if(!e)return[100,100];var i=this.options.builder.get(e.data("lm-id")),n={current:this.getParent().getSize(),sibling:i.getSize()};return[5,n.current+n.sibling-5]}});e.exports=h}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/get-ajax-url":70,"../../utils/get-outline":71,"../../utils/translate":77,"./atom":9,elements:112,"mout/function/bind":191,"mout/number/enforcePrecision":221,"mout/object/forOwn":231,prime:300}],18:[function(t,e,i){"use strict";var n=t("prime"),a=t("mout/string/trim"),r=t("./particle"),o=0,s=new n({inherits:r,options:{type:"position"},constructor:function(t){++o,r.call(this,t),this.setAttribute("title",this.getTitle()),this.setAttribute("key",this.getKey()),this.isNew()&&--o},getTitle:function(){return a(this.options.title||"Position "+o)},getKey:function(){return this.getAttribute("key")||a(this.getTitle()).replace(/\s/g,"-").toLowerCase()},updateKey:function(t){return this.options.key=t||this.getKey(),this.block.find(".font-small").text(this.getKey()),this}});e.exports=s},{"./particle":17,"mout/string/trim":271,prime:300}],19:[function(t,e,i){"use strict";var n=t("prime"),a=t("./base"),r=(t("prime-util/prime/bound"),t("./grid")),o=t("elements"),s=t("elements/zen"),l=t("mout/function/bind"),c=t("mout/object/forOwn"),u=t("../../utils/get-ajax-url").config,d=t("../../utils/get-outline").getOutlineNameById,h=t("../../utils/translate");t("elements/insertion");var p=0,f=new n({inherits:a,options:{},constructor:function(t){++p,this.grid=new r,a.call(this,t),this.on("done",this.bound("onDone")),this.on("changed",this.hasChanged)},layout:function(){var t=u(this.getPageId()+"/layout/"+this.getType()+"/"+this.getId()),e="",i="";if(this.hasInheritance()){var n=d(this.inherit.outline);e=this.renderInheritanceLabel(n),i=" g-inheriting",this.inherit.include.length&&(i+=" g-inheriting-"+this.inherit.include.join(" g-inheriting-"))}return'<div class="section'+i+'" data-lm-id="'+this.getId()+'" data-lm-blocktype="'+this.getType()+'" data-lm-blocksubtype="'+this.getSubType()+'"><div class="section-header clearfix"><h4 class="float-left" title="'+this.getTitle()+'">'+this.getTitle()+'</h4><div class="section-actions float-right"><span class="section-addrow" data-tip="'+h("GANTRY5_PLATFORM_JS_LM_ADD_ROW","Section")+'" data-tip-place="top-right"><i aria-label="'+h("GANTRY5_PLATFORM_JS_LM_ADD_ROW","Section")+'" class="fa fa-plus" aria-hidden="true"></i></span> <span class="section-settings" data-tip="'+h("GANTRY5_PLATFORM_JS_LM_SETTINGS","Section")+'" data-tip-place="top-right"><i aria-label="'+h("GANTRY5_PLATFORM_JS_LM_CONFIGURE_SETTINGS","Section")+'" class="fa fa-cog" aria-hidden="true" data-lm-settings="'+t+'"></i></span></div></div>'+e+"</div>"},adopt:function(t){o(t).insert(this.block.find(".g-grid"))},renderInheritanceLabel:function(t){var e=h("GANTRY5_PLATFORM_INHERITING_FROM_X","<strong>"+t+"</strong>");return this.block&&this.getParent()&&(e=""),'<div class="g-inherit g-section-inherit"><div class="g-inherit-content" '+this.addInheritanceTip(!0)+'><i class="fa fa-lock" aria-hidden="true"></i> '+e+"</div></div>"},enableInheritance:function(){if(this.hasInheritance()&&(this.block.attribute("class",this.cleanKlass(this.block.attribute("class"))),this.block.addClass("g-inheriting"),this.inherit.include.length&&this.block.addClass("g-inheriting-"+this.inherit.include.join(" g-inheriting-")),!this.block.find("> .g-inherit"))){var t=s("div"),e=d(this.inherit.outline),i=this.renderInheritanceLabel(e);t.html(i).children().after(this.block.find("> .section-header"))}},disableInheritance:function(){if(this.block.find("> .g-inherit")){var t=this.block.find("> .g-inherit.g-section-inherit");t&&t.remove()}this.block.attribute("class",this.cleanKlass(this.block.attribute("class"))),this.block.removeClass("g-inheriting")},refreshInheritance:function(){if(this.block.attribute("class",this.cleanKlass(this.block.attribute("class"))),this.hasInheritance()){this.enableInheritance();var t=this.block.find("> .g-inherit");if(t){var e=d(this.inherit.outline),i=s("div").html(this.renderInheritanceLabel(e));t&&i&&t.html(i.children().html())}}},addInheritanceTip:function(t){var e=this.getInheritanceTip();if(t){var i="";c(e,function(t,e){i+="data-"+e+'="'+t+'" '}),e=i}return this.hasInheritance()?e:""},getInheritanceTip:function(){var t=this.inherit?this.inherit.outline:null,e=d(t),i=(this.inherit.include||[]).join(", ");return{tip:h("GANTRY5_PLATFORM_INHERITING_FROM_X","<strong>"+e+"</strong>")+"<br />Outline ID: "+t+"<br />Replace: "+i,"tip-offset":-2,"tip-place":"top-right"}},cleanKlass:function(t){return(t=(t||"").split(" ")).filter(function(t){return!t.match(/^g-inheriting-/)}).join(" ")},hasChanged:function(t,e){var i=this.block.find("h4 > i:first-child");i&&e&&!e.changeState||(this.block[t?"addClass":"removeClass"]("block-has-changes"),!t&&i&&i.remove(),t&&!i&&s("i.fa.fa-circle-o.changes-indicator").top(this.block.find("h4")))},onDone:function(t){this.block.search("[data-lm-id]")||(this.grid.insert(this.block,"bottom"),this.options.builder.add(this.grid));var e=this.block.find(".fa-plus");e&&e.on("click",l(function(t){if(t&&t.preventDefault(),this.block.find(".g-grid:last-child:empty"))return!1;this.grid=new r,this.grid.insert(this.block.find('[data-lm-blocktype="container"]')?this.block.find('[data-lm-blocktype="container"]'):this.block,"bottom"),this.options.builder.add(this.grid)},this)),this.refreshInheritance()},getParent:function(){var t=this.block.parent("[data-lm-id]");return t?this.options.builder.get(t.data("lm-id")):null},getLimits:function(t){if(!t)return!1;var e=t.block.nextSibling()||t.block.previousSibling()||!1;if(!e)return[100,100];var i=this.options.builder.get(e.data("lm-id"));if("block"!==i.getType())return!1;var n={current:this.getParent().getSize(),sibling:i.getSize()};return[5,n.current+n.sibling-5]}});e.exports=f},{"../../utils/get-ajax-url":70,"../../utils/get-outline":71,"../../utils/translate":77,"./base":11,"./grid":14,elements:112,"elements/insertion":113,"elements/zen":136,"mout/function/bind":191,"mout/object/forOwn":231,prime:300,"prime-util/prime/bound":296}],20:[function(t,e,i){"use strict";var n=new(t("prime"))({inherits:t("./particle"),options:{type:"spacer",title:"Spacer",attributes:{}}});e.exports=n},{"./particle":17,prime:300}],21:[function(t,e,i){"use strict";var n=new(t("prime"))({inherits:t("./particle"),options:{type:"system",attributes:{}}});e.exports=n},{"./particle":17,prime:300}],22:[function(t,e,i){"use strict";var n=t("prime"),a=t("./section"),r=t("../../utils/get-ajax-url").config,o=new n({inherits:a,options:{type:"wrapper",attributes:{name:"Wrapper"}},layout:function(){r(this.getPageId()+"/layout/"+this.getType()+"/"+this.getId());return'<div class="wrapper-section" data-lm-id="'+this.getId()+'" data-lm-blocktype="'+this.getType()+'" data-lm-blocksubtype="'+this.getSubType()+'"></div>'},hasChanged:function(){},getSize:function(){return!1},getId:function(){return this.id||(this.id=this.options.type)}});e.exports=o},{"../../utils/get-ajax-url":70,"./section":19,prime:300}],23:[function(t,e,i){"use strict";var n=t("prime"),a=t("elements"),r=t("prime/emitter"),o=t("./blocks/"),s=(t("mout/object/forOwn"),t("mout/collection/forEach")),l=t("mout/collection/size"),c=(t("mout/lang/isArray"),t("mout/array/flatten"),t("./id")),u=t("mout/object/set"),d=t("mout/object/unset"),h=t("mout/object/get"),p=t("mout/object/deepFillIn"),f=t("mout/object/omit");t("elements/attributes"),t("elements/traversal");t("mout/string/rpad"),t("mout/string/repeat");a.implement({empty:function(){return this.forEach(function(t){for(var e;e=t.firstChild;)t.removeChild(e)})}});var m=new n({inherits:r,constructor:function(t){return t&&this.setStructure(t),this.map={},this},setStructure:function(t){try{this.structure="object"==typeof t?t:JSON.parse(t)}catch(t){console.error("Parsing error:",t)}},add:function(t){var e="string"==typeof t?t:t.id;u(this.map,e,t),t.isNew(!1)},remove:function(t){t="string"==typeof t?t:t.id,d(this.map,t)},get:function(t){var e="string"==typeof t?t:t.id;return h(this.map,e,t)},load:function(t){return this.recursiveLoad(t),this.emit("loaded",t),this},serialize:function(t,e){var i=[];if(t=t||a("[data-lm-root]")){var n,r,o,l,c,u,d=t.search((e?"":"> ")+"[data-lm-id]");return s(d,function(t){if(t=a(t),n=t.data("lm-id"),r=t.data("lm-blocktype"),o=t.data("lm-blocksubtype")||!1,c=t.search("> [data-lm-id]"),u=e?!!c&&c.map(function(t){return a(t).data("lm-id")}):c?this.serialize(t):[],l={id:n,type:r,subtype:o,title:h(this.map,n)?h(this.map,n).getTitle():"Untitled",attributes:h(this.map,n)?h(this.map,n).getAttributes():{},inherit:h(this.map,n)?h(this.map,n).getInheritance():{},children:u},e){var s={};s[n]=l,l=s}i.push(l)},this),i}},insert:function(t,e,i){var n=a("[data-lm-root]");if(n){o[e.type]||console[console.error?"error":"log"](e.type+" does not exist");var r=new(o[e.type]||o.section)(p({id:t,attributes:{},inherit:{},subtype:e.subtype||!1,builder:this},f(e,"children")));return i?r.block.insert(a('[data-lm-id="'+i+'"]')):r.block.insert(n),"block"===r.getType()&&r.setSize(),this.add(r),r.emit("rendered",r,i?h(this.map,i):null),r}},reset:function(t){this.map={},this.setStructure(t||{}),a("[data-lm-root]").empty(),this.load()},cleanupLonely:function(){var t,e=[],i=a("[data-lm-root] > .g-section > .g-grid > .g-block .g-grid > .g-block, [data-lm-root] > .g-section > .g-grid > .g-block > .g-block");if(i){var n;return i.forEach(function(i){if(i=a(i),t=null,(n=i.parent().hasClass("g-grid"))&&i.siblings())return!1;n&&(e.push(i.data("lm-id")),t=i.parent()),e.push(i.data("lm-id")),i.children().before(t||i),(t||i).remove()}),e}},recursiveLoad:function(t,e,i,n){t=t||this.structure,i=i||0,n=n||!1,e=e||this.insert,s(t,function(t){t.id||(t.id=c({builder:{map:this.map},type:t.type,subtype:t.subtype})),console&&console.log,this.emit("loading",e.call(this,t.id,t,n,i)),t.children&&l(t.children)&&(i++,s(t.children,function(n){this.recursiveLoad([n],e,i,t.id)},this)),this.get(t.id).emit("done",this.get(t.id)),i--},this)}});e.exports=m},{"./blocks/":15,"./id":26,elements:112,"elements/attributes":107,"elements/traversal":135,"mout/array/flatten":172,"mout/collection/forEach":188,"mout/collection/size":190,"mout/lang/isArray":202,"mout/object/deepFillIn":224,"mout/object/forOwn":231,"mout/object/get":232,"mout/object/omit":239,"mout/object/set":240,"mout/object/unset":243,"mout/string/repeat":265,"mout/string/rpad":268,prime:300,"prime/emitter":299}],24:[function(t,e,i){"use strict";var n=t("../ui/drag.events"),a=t("prime"),r=(t("prime/emitter"),t("prime-util/prime/bound")),o=t("prime-util/prime/options"),s=t("mout/function/bind"),l=t("mout/lang/isString"),c=t("mout/math/map"),u=t("mout/math/clamp"),d=t("mout/number/enforcePrecision"),h=t("mout/object/get"),p=t("../utils/elements.utils");t("elements/events"),t("elements/delegation");var f=new a({mixin:[r,o],DRAG_EVENTS:n,options:{minSize:5},constructor:function(t,e){this.setOptions(e),this.history=this.options.history||{},this.builder=this.options.builder||{},this.origin={x:0,y:0,transform:null,offset:{x:0,y:0}}},getBlock:function(t){return h(this.builder.map,l(t)?t:p(t).data("lm-id")||"")},getAttribute:function(t,e){return this.getBlock(t).getAttribute(e)},getSize:function(t){return this.getAttribute(p(t),"size")},start:function(t,e,i,n){if(t&&t.type.match(/^touch/i)&&t.preventDefault(),window.G5.tips.hide(e[0]),t.which&&1!==t.which)return!0;t.preventDefault(),this.element=p(e),this.siblings={occupied:0,elements:i,next:this.element.nextSibling(),prevs:this.element.previousSiblings(),sizeBefore:0},this.siblings.elements.length>1&&(this.siblings.occupied-=this.getSize(this.siblings.next),this.siblings.elements.forEach(function(t){this.siblings.occupied+=this.getSize(t)},this)),this.siblings.prevs&&this.siblings.prevs.forEach(function(t){this.siblings.sizeBefore+=this.getSize(t)},this),this.origin={size:this.getSize(this.element),maxSize:this.getSize(this.element)+this.getSize(this.siblings.next),x:t.changedTouches?t.changedTouches[0].pageX:t.pageX+6,y:t.changedTouches?t.changedTouches[0].pageY:t.pageY};var a=this.element[0].getBoundingClientRect(),r=this.element.parent()[0].getBoundingClientRect();this.origin.offset={clientRect:a,parentRect:{left:r.left,right:r.right},x:this.origin.x-a.right,y:a.top-this.origin.y,down:n},this.origin.offset.parentRect.left=this.element.parent().find("> [data-lm-id]:first-child")[0].getBoundingClientRect().left,this.origin.offset.parentRect.right=this.element.parent().find("> [data-lm-id]:last-child")[0].getBoundingClientRect().right,this.DRAG_EVENTS.EVENTS.MOVE.forEach(s(function(t){p(document).on(t,this.bound("move"))},this)),this.DRAG_EVENTS.EVENTS.STOP.forEach(s(function(t){p(document).on(t,this.bound("stop"))},this))},move:function(t){t&&t.type.match(/^touch/i)&&t.preventDefault();var e=t.clientX||t.touches[0].clientX||0,i=t.clientY||t.touches[0].clientY||0,n=this.origin.offset.parentRect,a=(this.lastX||e)-e,r=(this.lastY||i)-i;this.direction=Math.abs(a)>Math.abs(r)&&a>0&&"left"||Math.abs(a)>Math.abs(r)&&a<0&&"right"||Math.abs(r)>Math.abs(a)&&r>0&&"up"||"down";var o,s=100-this.siblings.occupied,l=e+(this.siblings.prevs?this.siblings.prevs.length:this.origin.offset.x-this.origin.offset.down),h=u(l,n.left,n.right);o=c(h,n.left,n.right,0,100),o-=this.siblings.sizeBefore,o=d(u(o,this.options.minSize,this.origin.maxSize-this.options.minSize),0),s=d(s-o,0),this.getBlock(this.element).setSize(o,!0),this.getBlock(this.siblings.next).setSize(s,!0);var f=this.element.siblings(),m=f?f.length+1:1;if(3==m||6==m||7==m||8==m||9==m||11==m||12==m){var g,v=0;(g=p([f,this.element])).forEach(function(t,e){t=this.getBlock(t),(o=t.getSize())%1&&(o=d(100/m,0),t.setSize(o,!0)),v+=o,g.length==e+1&&100!=v&&(s=100-v,t.setSize(o+s,!0))},this)}this.lastX=e,this.lastY=i},stop:function(t){t&&t.type.match(/^touch/i)&&t.preventDefault(),this.DRAG_EVENTS.EVENTS.MOVE.forEach(s(function(t){p(document).off(t,this.bound("move"))},this)),this.DRAG_EVENTS.EVENTS.STOP.forEach(s(function(t){p(document).off(t,this.bound("stop"))},this)),t.target.matches("[data-lm-back], [data-lm-forward]")||this.origin.size!==this.getSize(this.element)&&this.history.push(this.builder.serialize(),this.history.get().preset)},evenResize:function(t,e){var i,n=t.length,a=d(100/n,4);void 0===e&&(e=!0),t.forEach(function(t){t=p(t),(i=this.getBlock(t))&&i.hasAttribute("size")&&"function"==typeof i.getSize?i[e?"setAnimatedSize":"setSize"](a,a!==i.getSize()):t&&t[e?"animate":"style"]({flex:"0 1 "+a+"%"})},this)}});e.exports=f},{"../ui/drag.events":51,"../utils/elements.utils":65,"elements/delegation":109,"elements/events":111,"mout/function/bind":191,"mout/lang/isString":210,"mout/math/clamp":215,"mout/math/map":217,"mout/number/enforcePrecision":221,"mout/object/get":232,prime:300,"prime-util/prime/bound":296,"prime-util/prime/options":297,"prime/emitter":299}],25:[function(t,e,i){var n=t("prime"),a=t("prime/emitter"),r=t("mout/array/slice"),o=t("mout/object/merge"),s=t("mout/lang/deepEquals"),l=t("deep-diff").diff,c=new n({inherits:a,constructor:function(t,e){this.index=0,t=o({},t),e=o({},e),this.setSession(t,e)},undo:function(){if(this.index){this.index--;var t=this.get();return this.emit("undo",t,this.index),t}},redo:function(){if(this.index!=this.session.length-1){this.index++;var t=this.get();return this.emit("redo",t,this.index),t}},reset:function(){this.index=0;var t=this.get();return this.emit("reset",t,this.index),t},push:function(t,e){t=o({},t),e=o({},e);var i=this.index<this.session.length-1;return this.index<this.session.length-1&&(this.session=r(this.session,0,-(this.session.length-1-this.index))),t={time:+new Date,data:t,preset:e},this.equals(t.data)?t:(this.session.push(t),this.index=this.session.length-1,this.emit("push",t,this.index,i),t)},get:function(t){return this.session[void 0!==t?t:this.index]||!1},equals:function(t,e){return e||(e=this.get().data),s(t,e)},diff:function(t,e){return!t&&!e&&this.session.length<=1?"Not enough sessions to diff":(e||(e=this.get()),t||(t=this.get(this.index-1)),l(t,e))},setSession:function(t,e){return t=t?[{time:+new Date,data:o({},t),preset:e}]:[],this.session=t,this.index=0,this.session},import:function(){},export:function(){}});e.exports=c},{"deep-diff":105,"mout/array/slice":182,"mout/lang/deepEquals":200,"mout/object/merge":236,prime:300,"prime/emitter":299}],26:[function(t,e,i){"use strict";var n=t("mout/object/keys"),a=t("mout/array/contains"),r=t("mout/random/randInt");e.exports=function(t){var e,i,o=t.builder?n(t.builder.map):{},s=t.type,l=t.subtype,c=[];for("particle"!=s&&c.push(s),l&&c.push(l),e=c.join("-");(i=r(1e3,9999))&&a(o,e+"-"+i););return e+"-"+i}},{"mout/array/contains":165,"mout/object/keys":235,"mout/random/randInt":253}],27:[function(t,e,i){"use strict";var n=t("elements/domready"),a=t("elements/attributes"),r=t("../fields/submit"),o=t("../ui").modal,s=t("../ui").toastr,l=(t("./particles-sidebar"),t("agent")),c=t("elements/zen"),u=t("mout/array/contains"),d=t("mout/collection/size"),h=t("mout/string/trim"),p=t("mout/string/replace"),f=t("mout/string/properCase"),m=t("mout/number/enforcePrecision"),g=t("../utils/get-ajax-suffix"),v=t("../utils/get-ajax-url").parse,b=(t("../utils/get-ajax-url").global,t("../utils/flags-state")),y=t("./builder"),w=(t("../utils/history"),t("../utils/field-validation"),t("./history")),x=t("./layoutmanager"),k=t("../utils/save-state"),S=t("../utils/translate");t("../ui/popover"),t("./inheritance");var C,T,E,O;C=new y,E=new w,O=new k,n(function(){var t=a("body");t.delegate("click","[data-lm-back]",function(t,e){if(t&&t.preventDefault(),a(e).hasClass("disabled"))return!1;E.undo()}),t.delegate("click","[data-lm-forward]",function(t,e){if(t&&t.preventDefault(),a(e).hasClass("disabled"))return!1;E.redo()}),E.on("push",function(t,e,i){var n={back:a("[data-lm-back]"),forward:a("[data-lm-forward]")};e&&n.back&&n.back.hasClass("disabled")&&n.back.removeClass("disabled"),i&&n.forward&&!n.forward.hasClass("disabled")&&n.forward.addClass("disabled"),T.updatePendingChanges()}),E.on("undo",function(t,e){var i=a("#lm-no-layout"),n=a(".layout-title .title small"),r=t.preset.name||"Default",o={back:a("[data-lm-back]"),forward:a("[data-lm-forward]")};i&&i.style({display:d(t.data)?"none":"block"}),n&&n.text("("+f(h(p(r,[/_/g,/\//g],[" "," / "])))+")"),C.reset(t.data),o.forward.removeClass("disabled"),e||o.back.addClass("disabled"),T.singles("disable"),T.updatePendingChanges()}),E.on("redo",function(t,e){var i=a("#lm-no-layout"),n=a(".layout-title .title small"),r=t.preset.name||"Default",o={back:a("[data-lm-back]"),forward:a("[data-lm-forward]")};i&&i.style({display:d(t.data)?"none":"block"}),n&&n.text("("+f(h(p(r,[/_/g,/\//g],[" "," / "])))+")"),C.reset(t.data),o.back.removeClass("disabled"),e==this.session.length-1&&o.forward.addClass("disabled"),T.singles("disable"),T.updatePendingChanges()})}),n(function(){var t,i=a("body"),n=a("[data-lm-root]");T=new x("[data-lm-container]",{delegate:'[data-lm-root] .g-grid > .g-block > [data-lm-blocktype]:not([data-lm-nodrag]) !> .g-block, .g5-lm-particles-picker [data-lm-blocktype], [data-lm-root] [data-lm-blocktype="section"] > [data-lm-blocktype="grid"]:not(:empty):not(.no-move):not([data-lm-nodrag]), [data-lm-root] [data-lm-blocktype="section"] > [data-lm-blocktype="container"] > [data-lm-blocktype="grid"]:not(:empty):not(.no-move):not([data-lm-nodrag]), [data-lm-root] [data-lm-blocktype="offcanvas"] > [data-lm-blocktype="grid"]:not(:empty):not(.no-move):not([data-lm-nodrag]), [data-lm-root] [data-lm-blocktype="offcanvas"] > [data-lm-blocktype="container"] > [data-lm-blocktype="grid"]:not(:empty):not(.no-move):not([data-lm-nodrag])',droppables:"[data-lm-dropzone]",exclude:".section-header .button, .section-header .fa, .lm-newblocks .float-right .button, [data-lm-nodrag], [data-lm-disabled]",resize_handles:"[data-lm-root] .g-grid > .g-block:not(:last-child)",builder:C,history:E,savestate:O}),e.exports.layoutmanager=T,n&&((t=JSON.parse(n.data("lm-root"))).name&&(t=t.layout),C.setStructure(t),C.load(),T.history.setSession(C.serialize(),JSON.parse(n.data("lm-preset"))),T.savestate.setSession(C.serialize(null,!0))),i.delegate("click",".g-tabs a",function(t,e){return t.preventDefault(),!1}),i.delegate("keydown",".g-tabs a",function(t,e){var n=t.which?t.which:t.keyCode;if(32==n||13==n)return t.preventDefault(),i.emit("mouseup",t),!1}),i.delegate("mouseup",".g-tabs a",function(t,e){e=a(e),t.preventDefault();var i=0,n=e.parent(".g-tabs"),r=n.siblings(".g-panes");n.search("a").forEach(function(t,n){t==e[0]&&(i=n+1)}),r.find("> .active").removeClass("active"),n.find("> ul > .active").removeClass("active"),r.find("> .g-pane:nth-child("+i+")").addClass("active"),n.find("> ul > li:nth-child("+i+")").addClass("active"),r.search("> [aria-expanded]")&&r.search("> [aria-expanded]").attribute("aria-expanded","false"),n.search("> [aria-expanded]")&&n.search("> [aria-expanded]").attribute("aria-expanded","false"),r.find("> .g-pane:nth-child("+i+")").attribute("aria-expanded","true"),n.find("> ul >li:nth-child("+i+") [aria-expanded]")&&n.find("> ul > li:nth-child("+i+") > [aria-expanded]").attribute("aria-expanded","true")}),i.delegate("statechangeBefore","[data-g5-lm-picker]",function(){o.close()}),i.on("statechangeAfter",function(e,i){if(!(n=a("[data-lm-root]")))return!0;t=JSON.parse(n.data("lm-root")),C.setStructure(t),C.load(),T.refresh(),T.history.setSession(C.serialize(),JSON.parse(n.data("lm-preset"))),T.savestate.setSession(C.serialize(null,!0)),T.eraser.element=a("[data-lm-eraseblock]"),T.eraser.hide(!0)}),i.delegate("input",".sidebar-block .search input",function(t,e){var i,n,r=a(e).value().toLowerCase(),o=a(".sidebar-block [data-lm-blocktype]");if(!o)return!1;o.style({display:"none"}).forEach(function(t){t=a(t),n=t.data("lm-blocktype").toLowerCase(),i=h(t.text()).toLowerCase(),(n.substr(0,r.length)==r||i.match(r))&&t.style({display:"block"})},this)}),["click","touchend"].forEach(function(t){i.delegate(t,"[data-lm-samewidth]:not(:empty)",function(t,e){window.G5.tips.hide(e[0]);var i=e[0].getBoundingClientRect();if(!((t.clientX||t.pageX||t.changedTouches[0].pageX||0)<i.width+i.left)){var n,r=e.search('> [data-lm-blocktype="block"]');r&&1!=r.length&&(r.forEach(function(t){n=a(t).data("lm-id"),C.get(n).setSize(100/r.length,!0)}),E.push(C.serialize(),E.get().preset))}})}),i.delegate("mouseover","[data-lm-samewidth]:not(:empty)",function(t,e){var i=e[0].getBoundingClientRect(),n=t.clientX||t.touches&&t.touches[0].clientX||0,a={equalize:n+5>i.width+i.left,move:n-5<i.left};if(a.equalize||a.move){var r=S(a.equalize?"GANTRY5_PLATFORM_JS_LM_GRID_EQUALIZE":"GANTRY5_PLATFORM_JS_LM_GRID_SORT_MOVE");e.data("tip",r).data("tip-offset",-30),window.G5.tips.get(e[0]).content(r).place(a.equalize?"top-left":"top-right").show()}}),i.delegate("mouseout","[data-lm-samewidth]:not(:empty)",function(t,e){window.G5.tips.hide(e[0])}),i.delegate("click","[data-lm-clear]",function(t,e){t&&t.preventDefault&&t.preventDefault();var i={};switch(e.data("lm-clear")){case"keep-inheritance":i={save:!0,dropLastGrid:!1,emptyInherits:!1};break;case"full":default:i={save:!0,dropLastGrid:!1,emptyInherits:!0}}T.clear(null,i)});var p=!1;i.delegate("mouseover","[data-lm-switcher]",function(t,e){t&&t.preventDefault&&t.preventDefault(),p=e,e.PopoverDefined||e.getPopover({type:"async",width:"500",url:v(e.data("lm-switcher")+g()),allowElementsClick:".g-tabs a"})}),i.delegate("keydown","[data-switch]",function(t,e){var n=t.which?t.which:t.keyCode;32!=n&&13!=n||(t.preventDefault(),i.emit("mousedown",t))}),i.delegate("change",'[data-g-inherit="outline"]',function(t,e){var i=e.parent(".g-pane").find('input[type="checkbox"][data-g-preserve="outline"]');i&&i.checked(!1)}),i.delegate("change",'[data-g-preserve="outline"]',function(t,e){var i=e.parent(".g-pane").find('input[type="checkbox"][data-g-inherit="outline"]');i&&i.checked(!1)}),i.delegate("mousedown","[data-switch]",function(t,e){if(t&&t.preventDefault&&t.preventDefault(),e.parent(".g5-popover-content").find("[data-switch] i"))return!1;e.showIndicator();var r=a("[data-lm-preset]"),s=e.parent(".g-pane").find('input[type="checkbox"][data-g-preserve]'),c=e.parent(".g-pane").find('input[type="checkbox"][data-g-inherit]'),u=s?"post":"get",d={};if(s=s&&s.checked(),c=c&&c.checked(),s){var h=T;h.singles("cleanup",h.builder,!0),h.savestate.setSession(h.builder.serialize(null,!0)),d.preset=r&&r.data("lm-preset")?r.data("lm-preset"):"default",d.layout=JSON.stringify(h.builder.serialize())}c&&(d.inherit=1);var f=v(e.data("switch")+g());l(u,f,d,function(t,r){if(e.hideIndicator(),r.body.success){if(r.body.message&&!b.get("lm:switcher:"+window.btoa(f),!1))return b.warning({message:r.body.message,callback:function(t,n){var r=n.find("[data-g-delete-confirm]"),s=n.find("[data-g-delete-cancel]");r&&(r.on("click",function(t){if(t.preventDefault(),this.attribute("disabled"))return!1;b.get("lm:switcher:"+window.btoa(f),!0),a([r,s]).attribute("disabled"),i.emit("mousedown",{target:e}),o.close()}),s.on("click",function(t){if(t.preventDefault(),this.attribute("disabled"))return!1;a([r,s]).attribute("disabled"),b.get("lm:switcher:"+window.btoa(f),!1),o.close(),p&&setTimeout(function(){p.getPopover().show()},5)}))}}),!1;var s=r.body.preset||{name:"default"},l=r.body.title||"Default",c=r.body.data,u=a("#lm-no-layout"),d=a(".layout-title .title small");n.data("lm-root",JSON.stringify(c)).empty(),n.data("lm-preset",s),u&&u.style({display:"none"}),d&&d.text("("+l+")"),C.setStructure(c),C.load(),E.push(C.serialize(),JSON.parse(s)),a("[data-lm-switcher]").getPopover().hideAll().destroy()}else o.open({content:r.body.html||r.body,afterOpen:function(t){r.body.html||t.style({width:"90%"})}})})}),i.delegate("click","[data-lm-settings]",function(t,e){var n,h,p=(e=a(e)).data("lm-blocktype"),f=e.data("lm-settings"),b=null;if("grid"===p){var y=t.clientX||t.touches&&t.touches[0].clientX||0,w=e[0].getBoundingClientRect();if(y+4-w.left<w.width)return!1}n=(e=e.parent("[data-lm-blocktype]")).parent("[data-lm-blocktype]"),h=e.parent('[data-lm-blocktype="section"]'),p=e.data("lm-blocktype");var x=e.data("lm-id"),k=!!n&&n.data("lm-id"),O=!!n&&n.data("lm-blocktype");u(["block","grid"],p)||((b={}).id=C.get(e.data("lm-id")).getId()||null,b.type=C.get(e.data("lm-id")).getType()||e.data("lm-blocktype")||!1,b.subtype=C.get(e.data("lm-id")).getSubType()||e.data("lm-blocksubtype")||!1,b.title=(e.find("h4")||e.find(".title")).text()||b.type||"Untitled",b.options=C.get(e.data("lm-id")).getAttributes()||{},b.inherit=C.get(e.data("lm-id")).getInheritance()||{},b.block=n&&"wrapper"!==O?C.get(n.data("lm-id")).getAttributes()||{}:{},b.size_limits=C.get(e.data("lm-id")).getLimits(!!n&&C.get(n.data("lm-id"))),b.parent=h?h.data("lm-id"):null,b.type||delete b.type,b.subtype||delete b.subtype,d(b.options)||delete b.options,d(b.inherit)||delete b.inherit,d(b.block)||delete b.block),o.open({content:"Loading",method:"post",data:b,overlayClickToClose:!1,remote:v(f+g()),remoteLoaded:function(t,e){if(t.body.success){var n=e.elements.content.find("form"),u=c("div").html(t.body.html).find("form"),h=e.elements.content.search('input[type="submit"], button[type="submit"], [data-apply-and-save]');if(!n&&!u||!h)return!0;var p=e.elements.content.find(".g-urltemplate");p&&i.emit("input",{target:p});var f=e.elements.content.find('[name="block[size]"]');if(f&&b.size_limits){var y=e.elements.content.find(".blocksize-note"),w=m(b.size_limits[0],1),O=m(b.size_limits[1],1);if(f.attribute("min",w),f.attribute("max",O),y){var I=y.html();I=(I=I.replace(/#min#/g,w)).replace(/#max#/g,O),y.html(I),y.find(".blocksize-"+(w==O?"range":"fixed")).addClass("hidden")}var _=function(){return parseFloat(f.value())>=w&&parseFloat(f.value())<=O?"":S("GANTRY5_PLATFORM_JS_LM_SIZE_LIMITS_RANGE")};f.on("input",function(){f[0].setCustomValidity(_())})}h.on("click",function(t){t.preventDefault();var n=a(t.currentTarget);n.disabled(!0),n.hideIndicator(),n.showIndicator();var c=e.elements.content.find("form")[0].elements,h=r(c,e.elements.content);if(h.invalid.length)return n.disabled(!1),n.hideIndicator(),n.showIndicator("fa fa-fw fa-exclamation-triangle"),void s.error(S("GANTRY5_PLATFORM_JS_REVIEW_FIELDS"),S("GANTRY5_PLATFORM_JS_INVALID_FIELDS"));l(u.attribute("method"),v(u.attribute("action")+g()),h.valid.join("&")||{},function(t,e){if(e.body.success){var r=C.get(x),l=null;if(r.setAttributes(e.body.data.options),r.hasAttribute("enabled")&&r[r.getAttribute("enabled")?"enable":"disable"](),"section"!==r.getType()&&(r.setTitle(e.body.data.title||"Untitled"),r.updateTitle(r.getTitle())),"position"===r.getType()&&r.updateKey(),e.body.data.block&&d(e.body.data.block)){var c,u=(l=C.get(k)).block.nextSibling()||l.block.previousSibling(),h=l.getSize();l.setAttributes(e.body.data.block),c=h-l.getSize(),l.setAnimatedSize(l.getSize()),u&&(u=C.get(u.data("lm-id"))).setAnimatedSize(parseFloat(u.getSize())+c,!0)}if(e.body.data.inherit&&(delete e.body.data.inherit.section,r.setInheritance(e.body.data.inherit),r.enableInheritance(),r.refreshInheritance()),e.body.data.children&&(T.clear(r.block,{save:!1,dropLastGrid:!!e.body.data.children.length,emptyInherits:!0}),C.recursiveLoad(e.body.data.children,C.insert,0,r.getId())),r.hasInheritance()&&!e.body.data.inherit&&(r.setInheritance({}),r.disableInheritance()),E.push(C.serialize(),E.get().preset),null!==n.data("apply-and-save")){var p=a("body").find(".button-save");p&&i.emit("click",{target:p})}o.close(),s.success(S("GANTRY5_PLATFORM_JS_PARTICLE_SETTINGS_APPLIED",r.getTitle()),S("GANTRY5_PLATFORM_JS_SETTINGS_APPLIED"))}else o.open({content:e.body.html||e.body,afterOpen:function(t){e.body.html||t.style({width:"90%"})}});n.hideIndicator()})})}else o.enableCloseByOverlay()}})})}),e.exports={$:a,builder:C,layoutmanager:T,history:E,savestate:O}},{"../fields/submit":8,"../ui":53,"../ui/popover":55,"../utils/field-validation":67,"../utils/flags-state":68,"../utils/get-ajax-suffix":69,"../utils/get-ajax-url":70,"../utils/history":74,"../utils/save-state":76,"../utils/translate":77,"./builder":23,"./history":25,"./inheritance":28,"./layoutmanager":29,"./particles-sidebar":30,agent:79,"elements/attributes":107,"elements/domready":110,"elements/zen":136,"mout/array/contains":165,"mout/collection/size":190,"mout/number/enforcePrecision":221,"mout/string/properCase":263,"mout/string/replace":266,"mout/string/trim":271}],28:[function(t,e,i){"use strict";var n=t("elements"),a=t("elements/domready"),r=t("agent"),o=t("../../ui").modal,s=t("mout/lang/isArray"),l=t("mout/collection/forEach"),c=t("mout/object/filter"),u=t("mout/object/keys"),d=t("mout/collection/contains"),h=t("../../utils/get-ajax-suffix"),p=t("../../utils/get-ajax-url").parse,f=t("../../utils/get-ajax-url").global,m=(t("../../utils/get-outline").getOutlineNameById,t("../../utils/get-outline").getCurrentOutline),g={attributes:["g-settings-particle","g-settings-atom"],block:{panel:"g-settings-block-attributes",tab:"g-settings-block"},particles:"g-inherit-particle",atoms:"g-inherit-atom"};a(function(){var t=n("body"),e={},i={};t.delegate("change",'[name="inherit[outline]"]',function(a,c){var u=c.parent(".settings-param").find(".settings-param-title"),v=c.siblings().find(".g-item"),b=c.value(),y=n('[name="inherit[section]"]')?n('[name="inherit[section]"]').value():"",w=c.parent("[data-g-inheritance-settings]"),x=n('[data-multicheckbox-field="inherit[include]"]:checked')||[],k={list:n("#g-inherit-particle, #g-inherit-atom"),mode:n('[name="inherit[mode]"]:checked'),radios:n('[name="inherit[particle]"], [name="inherit[atom]"]'),checked:n('[name="inherit[particle]"]:checked, [name="inherit[atom]"]:checked')};if(!v)return!0;var S=e[y]!==b||i[y]!==k.mode.value();S&&!b&&x.forEach(function(e){n(e).checked(!1),t.emit("change",{target:e})});var C=JSON.parse(w.data("g-inheritance-settings")),T={outline:b||m(),type:C.type||"",subtype:C.subtype||"",mode:k.mode.value(),inherit:b&&"inherit"===k.mode.value()?"1":"0"};T.id=C.id,u.showIndicator(),c.selectizeInstance.blur(),k.radios&&k.checked&&(S||(T.selected=k.checked.value(),T.id=k.checked.value(),k.list=!1));var E="atom"===T.type?"atoms":"layouts",O=k.list?E+"/list":E;r("POST",p(f(O)+h()),T,function(a,r){if(u.hideIndicator(),r.body.success){var c,h=r.body,p=w.find('[name="inherit[include]"]').value().split(","),f=w.search('[data-multicheckbox-field="inherit[include]"]').map(function(t){return n(t).value()}),m=o.getByID(o.getLast());l(g,function(t,e){t=t.panel||t,(t=s(t)?t:[t]).forEach(function(t){var i=d(p,e),n=d(f,e);if((i||!n)&&h.html[t]&&(c=m.find("#"+t))){c.html(h.html[t]);var a=c.search("[data-selectize]");a&&a.selectize()}})}),S&&x&&""===e[y]&&x.forEach(function(e){t.emit("change",{target:e})}),e[y]=b,i[y]=k.mode.value()}else o.open({content:r.body.html||r.body,afterOpen:function(t){r.body.html||t.style({width:"90%"})}})})}),t.delegate("change","#g-settings-inheritance [data-multicheckbox-field]",function(e,i){var a=n('[name="inherit[outline]"]');if(!a)return!0;a=a.value();var r=i.value(),o=i.checked(),l=e.noRefresh,c={mode:n('[name="inherit[mode]"]:checked'),radios:n('[name="inherit[particle]"], [name="inherit[atom]"]'),checked:n('[name="inherit[particle]"]:checked, [name="inherit[atom]"]:checked')},u={panel:g[r]&&g[r].panel||g[r],tab:g[r]&&g[r].tab||g[r]};s(u.panel)||(u.panel=[u.panel],u.tab=[u.tab]),u.panel.forEach(function(e,r){var s=n("#"+e),d=n("#"+u.tab[r]+"-tab");if(!s||!d)return!0;var h=s.find(".g-inherit"),p="clone"===c.mode.value(),f=function(e){e||t.emit("change",{target:i.parent(".settings-block").find('[name="inherit[outline]"]')})};if(o&&a&&!p){var m=d.find(".fa-unlock");m&&m.removeClass("fa-unlock").addClass("fa-lock"),h&&h.show(),f(l)}else{var g=d.find(".fa-lock");g&&g.removeClass("fa-lock").addClass("fa-unlock"),h&&h.hide(),p&&f(l)}})}),t.delegate("change",'[name="inherit[mode]"], [name="inherit[particle]"], [name="inherit[atom]"]',function(e,i){var n=o.getByID(o.getLast()),a=n.find('[name="inherit[outline]"]'),r=n.search("[data-multicheckbox-field]")||[],s=!1;"inherit[mode]"===i.attribute("name")&&(s=!0),t.emit("change",{target:a,noRefresh:s}),r.forEach(function(e){t.emit("change",{target:e,noRefresh:s})})}),t.delegate("click","#g-inherit-particle .fa-info-circle, #g-inherit-atom .fa-info-circle",function(t,e){t.preventDefault();var i=o.getByID(o.getLast()).find('[name="inherit[outline]"]'),n=e.siblings('input[name="inherit[particle]"], input[name="inherit[atom]"]');if(!n||!i)return!1;var a="inherit[atom]"===n.name()?"atoms/instance":"layouts/particle";return o.open({content:"Loading",method:"post",data:{id:n.value(),outline:i.value()||m()},remote:p(f(a)+h()),remoteLoaded:function(t,e){t.body.success||o.enableCloseByOverlay()}}),!1}),t.delegate("mouseup",".g-tabs .fa-lock, .g-tabs .fa-unlock",function(e,i){if(!i.parent("li").hasClass("active"))return!1;var a=o.getByID(o.getLast()),r=i.hasClass("fa-lock"),s=i.parent("a").id().replace(/\-tab$/,""),l=u(c(g,function(t){return t===s||t.tab===s||d(t,s)})||[]).shift(),h=a.find('[data-multicheckbox-field][value="'+l+'"]'),p={mode:n('[name="inherit[mode]"]:checked'),radios:n('[name="inherit[particle]"], [name="inherit[atom]"]'),checked:n('[name="inherit[particle]"]:checked, [name="inherit[atom]"]:checked')};if(h){if("clone"===p.mode.value()||p.radios&&!p.checked)return!1;h.checked(!r),t.emit("change",{target:h})}})})},{"../../ui":53,"../../utils/get-ajax-suffix":69,"../../utils/get-ajax-url":70,"../../utils/get-outline":71,agent:79,elements:112,"elements/domready":110,"mout/collection/contains":186,"mout/collection/forEach":188,"mout/lang/isArray":202,"mout/object/filter":228,"mout/object/keys":235}],29:[function(t,e,i){"use strict";var n=t("prime"),a=t("../utils/elements.utils"),r=t("mout/function/bind"),o=t("elements/zen"),s=t("prime/emitter"),l=t("prime-util/prime/bound"),c=t("prime-util/prime/options"),u=t("./blocks"),d=t("../ui/drag.drop"),h=t("../ui/eraser"),p=t("../utils/flags-state"),f=t("./drag.resizer"),m=t("mout/object/get"),g=t("mout/object/keys"),v=(t("mout/array/every"),t("mout/number/enforcePrecision")),b=(t("mout/lang/isArray"),t("mout/lang/deepEquals")),y=t("mout/collection/find"),w=(t("mout/lang/isObject"),t("mout/array/contains")),x=t("mout/collection/forEach"),k={disable:function(){var t=a('[data-lm-root] [data-lm-blocktype="grid"]');t&&t.removeClass("no-hover")},enable:function(){var t=a('[data-lm-root] [data-lm-blocktype="grid"]');t&&t.addClass("no-hover")},cleanup:function(t,e,i){var n=i?i.search("> .g-grid:empty"):a('[data-lm-blocktype="section"] > .g-grid:empty, [data-lm-blocktype="container"] > .g-grid:empty, [data-lm-blocktype="offcanvas"] > .g-grid:empty');n&&n.forEach(function(i){((i=a(i)).nextSibling("[data-lm-id]")||e)&&(t.remove(i.data("lm-id")),i.remove())})}},S=new n({mixin:[l,c],inherits:s,options:{},constructor:function(t,e){this.setOptions(e),this.refElement=t,t&&a(t)&&this.init(t)},init:function(){this.dragdrop=new d(this.refElement,this.options),this.resizer=new f(this.refElement,this.options),this.eraser=new h("[data-lm-eraseblock]",this.options),this.dragdrop.on("dragdrop:start",this.bound("start")).on("dragdrop:location",this.bound("location")).on("dragdrop:nolocation",this.bound("nolocation")).on("dragdrop:resize",this.bound("resize")).on("dragdrop:stop:erase",this.bound("removeElement")).on("dragdrop:stop",this.bound("stop")).on("dragdrop:stop:animation",this.bound("stopAnimation")),this.builder=this.options.builder,this.history=this.options.history,this.savestate=this.options.savestate||null,k.disable()},refresh:function(){this.refElement&&a(this.refElement)&&this.init()},singles:function(t,e,i,n){k[t](e,i,n)},clear:function(t,e){var i,n,r=t?(t.search("[data-lm-id]")||[]).map(function(t){return a(t).data("lm-id")}):[];e=e||{save:!0,dropLastGrid:!1,emptyInherits:!1},x(this.builder.map,function(t,a){r.length&&!w(r,a)||!e.emptyInherits&&t.block.parent(".g-inheriting")||(i=t.getType(),(n=t.block.find("> [data-lm-id]"))&&(n=n.data("lm-blocktype")),w(["particle","spacer","position","widget","system","block"],i)&&"block"==i&&n&&"section"!==n&&"container"!==n?(this.builder.remove(a),t.block.remove()):!e.emptyInherits||"section"!=i&&"offcanvas"!=i&&"container"!=i||t.hasInheritance&&(t.inherit={},t.disableInheritance()))},this),this.singles("cleanup",this.builder,e.dropLastGrid,t),e.save&&this.history.push(this.builder.serialize(),this.history.get().preset)},updatePendingChanges:function(){var t=this.savestate.getData(),e=this.builder.serialize(null,!0),i=!1,n=b(t,e),r=a('[data-save="Layout"]'),o=(r.find("i"),r.find(".changes-indicator"));n&&o&&r.hideIndicator(),n||o||r.showIndicator("changes-indicator fa fa-fw fa-circle-o"),p.set("pending",!n);var s,l,c;e.forEach(function(n){c=g(n)[0],s=y(t,function(t){return t[c]}),l=y(e,function(t){return t[c]}),i=!b(s,l),(c=this.builder.get(c))&&c.emit("changed",i)},this)},start:function(t,e){var i=a("[data-lm-root]"),n=a(e).position(),r=a(e)[0].getBoundingClientRect();this.block=null,this.mode=i.data("lm-root")||"page",i.addClass("moving");var s=a(e).data("lm-blocktype"),l=e[0].cloneNode(!0);if(this.placeholder||(this.placeholder=o("div.block.placeholder[data-lm-placeholder]")),this.placeholder.style({display:"none"}),l=a(l),this.original=l.after(e).style({display:l.hasClass("g-grid")?"flex":"block",opacity:.5}).addClass("original-placeholder").data("lm-dropzone",null),"grid"===s&&this.original.style({display:"flex"}),this.originalType=s,this.block=m(this.builder.map,e.data("lm-id")||"")||new u[s]({builder:this.builder,subtype:e.data("lm-subtype"),title:e.text()}),this.block.isNew()){var c=e.position();this.original.style({position:"fixed",opacity:.5}).style({left:r.left,top:r.top,width:c.width,height:c.height}),this.element=this.dragdrop.element,this.dragdrop.element=this.original}else{if(e.style({position:"fixed",zIndex:2500,opacity:.5,margin:0,width:Math.ceil(n.width),height:Math.ceil(n.height),left:r.left,top:r.top}).find("[data-lm-blocktype]"),"grid"===this.block.getType()){var d=this.block.block.siblings(":not(.original-placeholder):not(.section-header):not(.g-inherit):not(:empty)");d&&d.search("[data-lm-id]").style({"pointer-events":"none"})}this.placeholder.before(e),this.eraser.show()}var h;"grid"===s&&(h=i.search('[data-lm-dropzone]:not([data-lm-blocktype="grid"])'))&&h.style({"pointer-events":"none"}),k.enable()},location:function(t,e,i){i=a(i),(this.block.isNew()?this.element:this.original).style({transform:"translate(0, 0)"}),this.placeholder||(this.placeholder=o("div.block.placeholder[data-lm-placeholder]").style({display:"none"}));var n,r=i.data("lm-blocktype"),s=this.block.getType();if(!r&&i.data("lm-root")&&(r="root"),!("page"!==this.mode&&"section"===r||"grid"===r&&(i.parent().data("lm-root")||"container"===i.parent().data("lm-blocktype")&&i.parent().parent().data("lm-root")))){var l=':not(.placeholder):not([data-lm-id="'+this.original.data("lm-id")+'"])',c={before:this.original.previousSiblings(l),after:this.original.nextSiblings(l)};if(c.before&&(c.before=a(c.before[0])),c.after&&(c.after=a(c.after[0])),!("block"===r&&(c.before===i&&"after"===e.x||c.after===i&&"before"===e.x)||"grid"===r&&(c.before===i&&"below"===e.y||c.after===i&&"above"===e.y))){var u=i.parent('[data-lm-blocktype="atoms"]'),d=this.block.block.find("[data-lm-id]");if("atom"==(d?d.data("lm-blocktype"):s)){if(!u)return}else if(u)return;var h;switch(r){case"root":case"section":break;case"grid":var p=!i.children(":not(.placeholder)");if("grid"!==s&&!p)return;p?"grid"===s?this.placeholder.before(i):this.placeholder.bottom(i):(h="above"===e.y?"before":"after",this.placeholder[h](i));break;case"block":h="above"===e.y?"top":"bottom",n="other"===e.x?h:e.x,this.placeholder[n](i)}if(this.placeholder.removeClass("in-between").removeClass("in-between-grids").removeClass("in-between-grids-first").removeClass("in-between-grids-last"),this.placeholder.style({display:"block"})["block"!==r?"removeClass":"addClass"]("in-between"),"grid"===s&&"grid"===r){var f=this.placeholder.nextSibling(),m=this.placeholder.previousSibling();this.placeholder.addClass("in-between-grids"),m&&!m.data("lm-blocktype")&&this.placeholder.addClass("in-between-grids-first"),f&&f.data("lm-blocktype")||this.placeholder.addClass("in-between-grids-last")}}}},nolocation:function(t){if((this.block.isNew()?this.element:this.original).style({transform:"translate(0, 0)"}),this.placeholder&&this.placeholder.remove(),this.block){var e=t.type.match(/^touch/i)?document.elementFromPoint(t.touches.item(0).clientX,t.touches.item(0).clientY):t.target;this.block.isNew()||((e=a(e)).matches(this.eraser.element)||this.eraser.element.find(e)?(this.dragdrop.removeElement=!0,this.eraser.over()):(this.dragdrop.removeElement=!1,this.eraser.out()))}},resize:function(t,e,i,n){this.resizer.start(t,e,i,n)},removeElement:function(t,e){this.dragdrop.removeElement=!1;var i={opacity:0};e.animate(i,{duration:"150ms"});var n,o=a("[data-lm-root]");"grid"===this.block.getType()&&(n=o.search('[data-lm-dropzone]:not([data-lm-blocktype="grid"])'))&&n.style({"pointer-events":"inherit"});var s=this.block.block.siblings(":not(.original-placeholder)");if(s&&"block"==this.block.getType()){var l,c,u,d=this.block.getSize(),h=d/s.length,p=0;s.forEach(function(t,e){t=a(t),c=m(this.builder.map,t.data("lm-id")),e+1==s.length&&(u=c),l=v(c.getSize()+h,0),p+=l,c.setSize(l,!0)},this),100!=p&&u&&(d=u.getSize(),h=100-p,u.setSize(d+h,!0))}this.eraser.hide(),this.dragdrop.DRAG_EVENTS.EVENTS.MOVE.forEach(r(function(t){a("body").off(t,this.dragdrop.bound("move"))},this)),this.dragdrop.DRAG_EVENTS.EVENTS.STOP.forEach(r(function(t){a("body").off(t,this.dragdrop.bound("deferStop"))},this)),this.builder.remove(this.block.getId());var f=this.block.block.search("[data-lm-id]");f&&f.length&&f.forEach(function(t){this.builder.remove(a(t).data("lm-id"))},this),this.block.block.remove(),this.placeholder&&this.placeholder.remove(),this.original&&this.original.remove(),this.element=this.block=null,k.disable(),k.cleanup(this.builder),this.history.push(this.builder.serialize(),this.history.get().preset),o.removeClass("moving")},stop:function(t,e){var i=a(this.dragdrop.lastOvered);if(i&&i.matches(this.eraser.element.find(".trash-zone")))this.eraser.hide();else{if("grid"===this.block.getType()){var n=this.block.block.siblings(":not(.original-placeholder):not(.section-header):not(.g-inherit):not(:empty)");n&&n.search("[data-lm-id]").style({"pointer-events":"inherit"})}if(this.block.isNew()||this.eraser.hide(),this.dragdrop.matched){e=a(e);var r,o,s=!1,l=this.block.isNew(),c=this.block.getType(),d=e.data("lm-id"),h=!!d&&(m(this.builder.map,d)?m(this.builder.map,d).getType():e.data("lm-blocktype")),p=this.placeholder.parent();if(p){var f=p.data("lm-id"),g=!!m(this.builder.map,f||"")&&m(this.builder.map,f).getType(),v=!1;if(this.original.remove(),"block"!==c&&"grid"!==c&&("section"===h||"grid"===h||"block"===h&&"block"!==g)&&(r=new u.block({builder:this.builder}).adopt(this.block.block),o=new u[c]({id:this.block.block.data("lm-id"),type:c,subtype:this.element.data("lm-blocksubtype"),title:this.element.text(),builder:this.builder}).setLayout(this.block.block),r.setSize(),this.block=r,this.builder.add(r),this.builder.add(o),o.emit("rendered",o,r),r.emit("rendered",r,null),v={case:1}),"block"===this.originalType&&"block"===this.block.getType()){v={case:3};var b=this.block.block.parent('[data-lm-blocktype="grid"]');this.placeholder.parent('[data-lm-blocktype="grid"]')!==b&&(s={from:this.block.block.siblings(":not(.placeholder)"),to:this.placeholder.siblings(":not(.placeholder)")}),b.find('!> [data-lm-blocktype="container"]')&&(b=b.parent()),b=b.siblings(":not(.original-placeholder)"),!this.block.isNew()&&b.length&&this.resizer.evenResize(b),this.block.block.attribute("style",null),this.block.setSize()}if("grid"===c&&!n){var y=this.block.block.parent('[data-lm-blocktype="section"]').find(".fa-plus");y&&y.emit("click")}if(this.block.hasAttribute("size")&&"function"==typeof this.block.getSize&&this.block.setSize(this.placeholder.compute("flex")),this.block.insert(this.placeholder),this.placeholder.remove(),l&&(v&&this.resizer.evenResize(a([this.block.block,this.block.block.siblings()])),this.element.attribute("style",null)),s.from||s.to&&s.to!=this.block.block){var w,x,S=this.block.getSize();if(s.to||this.block.setSize(100,!0),s.from){w=S/s.from.length;var C,T=0;s.from.forEach(function(t){t=a(t),x=m(this.builder.map,t.data("lm-id")),C=x.getSize()+w,x.setSize(C,!0),T+=C},this),100!==T&&(w=(100-T)/s.from.length,s.from.forEach(function(t){t=a(t),x=m(this.builder.map,t.data("lm-id")),C=x.getSize()+w,x.setSize(C,!0)},this))}s.to&&(S=100/(s.to.length+1),s.to.forEach(function(t){t=a(t),(x=m(this.builder.map,t.data("lm-id"))).setSize(S,!0)},this),this.block.setSize(S,!0))}k.disable(),k.cleanup(this.builder),this.history.push(this.builder.serialize(),this.history.get().preset)}}else this.placeholder&&this.placeholder.remove()}},stopAnimation:function(t){var e=a("[data-lm-root]");if(e.removeClass("moving"),this.original&&this.original.remove(),k.disable(),this.block||(this.block=m(this.builder.map,t.data("lm-id"))),this.block&&"block"===this.block.getType()&&this.block.setSize(),this.block&&this.block.isNew()&&this.element&&this.element.attribute("style",null),"grid"===this.originalType){var i,n;(i=e.search('[data-lm-dropzone]:not([data-lm-blocktype="grid"])'))&&i.forEach(function(t){t=a(t),n=m(this.builder.map,t.data("lm-id")),t.attribute("style",null),n.setSize()},this)}}});e.exports=S},{"../ui/drag.drop":50,"../ui/eraser":52,"../utils/elements.utils":65,"../utils/flags-state":68,"./blocks":15,"./drag.resizer":24,"elements/zen":136,"mout/array/contains":165,"mout/array/every":168,"mout/collection/find":187,"mout/collection/forEach":188,"mout/function/bind":191,"mout/lang/deepEquals":200,"mout/lang/isArray":202,"mout/lang/isObject":207,"mout/number/enforcePrecision":221,"mout/object/get":232,"mout/object/keys":235,prime:300,"prime-util/prime/bound":296,"prime-util/prime/options":297,"prime/emitter":299}],30:[function(t,e,i){"use strict";var n,a,r,o,s,l,c,u,d,h,p,f=t("elements/domready"),m=t("elements"),g=t("../utils/decouple"),v=t("../utils/get-scrollbar-width"),b=function(){(n=m(".sidebar-block"))&&(a=n.find(".g5-lm-particles-picker"))&&(r=a.find("> .search"),o=a.find("> .particles-container"),s=window.innerHeight,l=0,c=0,h=a[0].getBoundingClientRect(),p=a.position().top,u=m("body.admin.com_gantry5 nav.navbar-fixed-top, #wpadminbar, #admin-main #titlebar, #admin-main .grav-update.grav"),d=m("body.admin.com_gantry5 #status"),u&&m(u).forEach(function(t){l+=t.offsetHeight}),d&&m(d).forEach(function(t){c+=t.offsetHeight}),o.style({"max-height":s-l-c-r[0].offsetHeight-30,overflow:"auto"}),o[0].scrollHeight!==o[0].offsetHeight&&o.addClass("has-scrollbar").style({"margin-right":-v()}))};f(function(){b();var t=m("grav"===GANTRY_PLATFORM?"#admin-main .content-padding":window)||[window],e=function(){if(n&&a){var t=this.scrollY||this.scrollTop,e=n[0].getBoundingClientRect(),i=e.top+e.height,r=a[0].getBoundingClientRect(),o=t>h.top-l-10&&t>=p-10,s=r.height+10+l+parseInt(n.compute("padding-bottom"),10)>=i,c=e.height<=r.height;a.style("width",r.width),o&&!s?(a.removeClass("particles-absolute").addClass("particles-fixed"),a.style({top:l+10,bottom:"inherit"})):o&&s?(c||"grav"===GANTRY_PLATFORM&&e.bottom<r.bottom)&&(a.removeClass("particles-fixed").addClass("particles-absolute"),a.style({top:"inherit",bottom:parseInt(n.compute("padding-bottom"),10)})):(a.removeClass("particles-fixed").removeClass("particles-absolute"),a.style({top:"inherit",bottom:"inherit"}))}};g(t[0],"scroll",e.bind(t[0])),g(window,"resize",function(){o&&(e.call(t[0]),o.style({"max-height":window.innerHeight-l-c-r[0].offsetHeight-30}))}),m("body").on("statechangeEnd",function(){b()})}),e.exports=b},{"../utils/decouple":64,"../utils/get-scrollbar-width":72,elements:112,"elements/domready":110}],31:[function(t,e,i){"use strict";var n=t("elements"),a=t("elements/zen"),r=t("elements/domready"),o=t("agent"),s=t("./ui"),l=t("mout/string/interpolate"),c=t("mout/string/trim"),u=t("mout/queryString/setParam"),d=s.modal,h=s.toastr,p=t("./utils/get-ajax-url").parse,f=(t("./utils/get-ajax-url").global,t("./utils/get-ajax-suffix")),m=t("./utils/flags-state"),g=t("./utils/field-validation"),v=t("./lm"),b=t("./menu"),y=t("./positions/cards"),w=(t("./configurations"),t("./positions"),t("./changelog"),t("./utils/translate"));t("elements/attributes"),t("elements/events"),t("elements/delegation"),t("elements/insertion"),t("elements/traversal"),t("./fields"),t("./ui/popover"),t("./utils/ajaxify-links"),t("./utils/rAF-polyfill");var x=function(t,e,i){return function(n){var a=Math.floor(n/t);return a+" "+(e+(a>1?"s":""))+" "+i}},k=[{threshold:-31535999,handler:x(-31536e3,"year","from now")},{threshold:-2591999,handler:x(-2592e3,"month","from now")},{threshold:-604799,handler:x(-604800,"week","from now")},{threshold:-172799,handler:x(-86400,"day","from now")},{threshold:-86399,handler:function(){return"tomorrow"}},{threshold:-3599,handler:x(-3600,"hour","from now")},{threshold:-59,handler:x(-60,"minute","from now")},{threshold:-.9999,handler:x(-1,"second","from now")},{threshold:1,handler:function(){return"just now"}},{threshold:60,handler:x(1,"second","ago")},{threshold:3600,handler:x(60,"minute","ago")},{threshold:86400,handler:x(3600,"hour","ago")},{threshold:172800,handler:function(){return"yesterday"}},{threshold:604800,handler:x(86400,"day","ago")},{threshold:2592e3,handler:x(604800,"week","ago")},{threshold:31536e3,handler:x(2592e3,"month","ago")},{threshold:1/0,handler:x(31536e3,"year","ago")}],S={format:function(t){for(var e=((new Date).getTime()-t.getTime())/1e3,i=0;i<k.length;i++)if(e<k[i].threshold)return k[i].handler(e);throw new Error("exhausted all formatter options, none found")}};window.onbeforeunload=function(){if(m.get("pending"))return w("GANTRY5_PLATFORM_JS_NO_SAVE_DETECTED")},r(function(){var t=n("body"),e=w("GANTRY5_PLATFORM_JS_SAVE_SUCCESS");t.delegate("click","[data-g-close]",function(t,e){t&&t.preventDefault&&t.preventDefault();var i=e.data("g-close");(i=i?e.parent(i):e).slideUp(function(){i.remove()})}),t.delegate("click","[data-g-popover]",function(t,e){if(t&&t.preventDefault&&t.preventDefault(),!e.PopoverDefined){var i=e.find("[data-popover-content]")||e.siblings("[data-popover-content]");e.getPopover({style:e.data("g-popover-style")||"generic",width:e.data("g-popover-width")||220,content:a("ul").html(i.html())[0].outerHTML,allowElementsClick:e.data("g-popover-elementsclick")||".toggle"});e.on("shown.popover",function(t){var i=e.find(".enabler");e.attribute("aria-expanded",!0).attribute("aria-hidden",!1),i&&i[0].focus()}),e.on("hide.popover",function(t){e.attribute("aria-expanded",!1).attribute("aria-hidden",!0)}),e.getPopover().show()}}),t.delegate("mousedown","[data-settings-key]",function(t,e){var i=e.data("settings-key");if(!i)return!0;var n=window.location.search,a=e.attribute("href"),r=window.location.href.split("?");r.length>1&&r[0].match(/index.php$/)&&(n="index.php"+n),n=u(a,i,btoa(n)),e.href(n)}),t.delegate("mouseover",".button-save",function(t,e){if(!e.lastSaved)return!0;var i=w("GANTRY5_PLATFORM_LAST_SAVED")+": "+S.format(e.lastSaved);e.data("tip",i).data("title",i)}),t.delegate("click",".button-save",function(i,a){i&&i.preventDefault&&i.preventDefault();var r=n(".button-save");if(r.disabled())return!1;r.disabled(!0),r.hideIndicator(),r.showIndicator();var s={},u=[],x=a.data("save"),k="",S=n("[data-lm-root]")?"layout":n("[data-mm-id]")?"menu":n("[data-g5-position]")?"positions":"other",C=p(c(window.location.href,"#")+f());switch(S){case"layout":var T=n("[data-lm-preset]");v.layoutmanager.singles("cleanup",v.builder,!1),v.savestate.setSession(v.builder.serialize(null,!0)),s.preset=T&&T.data("lm-preset")?T.data("lm-preset"):"default";var E=JSON.stringify(v.builder.serialize());s.layout=E;break;case"menu":s.menutype=n("select.menu-select-wrap").value(),s.settings=JSON.stringify(b.menumanager.settings),s.ordering=JSON.stringify(b.menumanager.ordering);var O=JSON.stringify(b.menumanager.items);s.items=O,C=p(a.parent("form").attribute("action")+f());break;case"positions":s.positions=y.serialize();break;case"other":default:var I=a.parent("form");I&&"submit"==a.attribute("type")&&n(I[0].elements).forEach(function(t){var e=(t=n(t)).attribute("name"),i=t.attribute("type"),a=t.value(),r=t.parent(".settings-param, .card-overrideable"),o=r?r.find('> input[type="checkbox"]'):null;o=o||n(t.data("override-target")),!e||t.disabled()||o&&!o.checked()||"radio"==i&&!t.checked()||(g(t)||u.push(t),s[e]=a)})}if(u.length)return r.disabled(!1),r.hideIndicator(),r.showIndicator("fa fa-fw fa-exclamation-triangle"),void h.error(w("GANTRY5_PLATFORM_JS_REVIEW_FIELDS"),w("GANTRY5_PLATFORM_JS_INVALID_FIELDS"));"other"==S&&n(".settings-param-title, .card.settings-block > h4").hideIndicator(),t.emit("updateOriginalFields"),o("post",C,s,function(t,i){i.body.success?(d.close(),n("#styles")&&(k="<br />"+(i.body.warning?"<hr />"+i.body.title+"<br />"+i.body.html:w("GANTRY5_PLATFORM_JS_CSS_COMPILED"))),h[i.body.warning?"warning":"success"](l(e,{verb:"s"==x.slice(-1)?"have":"has",type:x,extras:k}),x+" "+w("GANTRY5_PLATFORM_SAVED"))):d.open({content:i.body.html||i.body,afterOpen:function(t){i.body.html||t.style({width:"90%"})}}),r.disabled(!1),r.hideIndicator(),r.forEach(function(t){n(t).lastSaved=new Date}),"layout"==S&&v.layoutmanager.updatePendingChanges(),m.set("pending",!1),m.emit("update:pending")})}),t.delegate("keydown","[data-title-edit]",function(e,i){var n=e.which?e.which:e.keyCode;32!=n&&13!=n||(e.preventDefault(),t.emit("click",e))}),t.delegate("click","[data-title-edit]",function(t,e){if((e=n(e)).hasClass("disabled"))return!1;var i,a=e.siblings("[data-title-editable]")||e.previousSiblings().find("[data-title-editable]")||e.nextSiblings().find("[data-title-editable]");if(!a)return!0;i=a[0],a.text(c(a.text())),a.attribute("contenteditable",!0),i.focus();var r,o=document.createRange();o.selectNodeContents(i),(r=window.getSelection()).removeAllRanges(),r.addRange(o),a.storedTitle=c(a.text()),a.titleEditCanceled=!1,a.emit("title-edit-start",a.storedTitle)}),t.delegate("keydown","[data-title-editable]",function(t,e){switch(e=n(e),t.keyCode){case 13:case 27:return t.stopPropagation(),27==t.keyCode&&void 0!==e.storedTitle&&(e.text(e.storedTitle),e.titleEditCanceled=!0),e.attribute("contenteditable",null),e[0].blur(),e.emit("title-edit-exit",e.data("title-editable"),13==t.keyCode?"enter":"esc"),!1;default:return!0}}),t.delegate("blur","[data-title-editable]",function(t,e){(e=n(e))[0].scrollLeft=0,e.attribute("contenteditable",null),e.data("title-editable",c(e.text())),window.getSelection().removeAllRanges(),e.emit("title-edit-end",e.data("title-editable"),e.storedTitle,e.titleEditCanceled)},!0),t.delegate("click","[data-ajax-action]",function(t,e){t&&t.preventDefault&&t.preventDefault();var i=e.attribute("href")||e.data("ajax-action"),a=e.data("ajax-action-method")||"post",r=n(e.data("ajax-action-indicator"))||e;if(!i)return!1;r.showIndicator(),o(a,p(i+f()),function(t,e){if(!e.body.success)return d.open({content:e.body.html||e.body,afterOpen:function(t){e.body.html||t.style({width:"90%"})}}),r.hideIndicator(),!1;h[e.body.warning?"warning":"success"](e.body.html||"Action successfully completed.",e.body.title||""),r.hideIndicator()})})});var C={lm:v,mm:b,assingments:t("./assignments"),ui:t("./ui"),styles:t("./styles"),$:n,domready:t("elements/domready"),particles:t("./particles"),zen:t("elements/zen"),moofx:t("moofx"),atoms:t("./pagesettings"),tips:t("./ui/tooltips")};window.G5=C,e.exports=C},{"./assignments":2,"./changelog":3,"./configurations":5,"./fields":6,"./lm":27,"./menu":34,"./pagesettings":36,"./particles":42,"./positions":47,"./positions/cards":46,"./styles":48,"./ui":53,"./ui/popover":55,"./ui/tooltips":60,"./utils/ajaxify-links":61,"./utils/field-validation":67,"./utils/flags-state":68,"./utils/get-ajax-suffix":69,"./utils/get-ajax-url":70,"./utils/rAF-polyfill":75,"./utils/translate":77,agent:79,elements:112,"elements/attributes":107,"elements/delegation":109,"elements/domready":110,"elements/events":111,"elements/insertion":113,"elements/traversal":135,"elements/zen":136,moofx:137,"mout/queryString/setParam":248,"mout/string/interpolate":260,"mout/string/trim":271}],32:[function(t,e,i){"use strict";var n=t("../ui/drag.events"),a=t("prime"),r=(t("prime/emitter"),t("prime-util/prime/bound")),o=t("prime-util/prime/options"),s=t("mout/function/bind"),l=t("mout/lang/isString"),c=t("mout/math/map"),u=t("mout/math/clamp"),d=t("mout/number/enforcePrecision"),h=t("mout/object/get"),p=t("../utils/elements.utils");t("elements/events"),t("elements/delegation");var f=new a({mixin:[r,o],DRAG_EVENTS:n,options:{minSize:5},constructor:function(t,e,i){this.setOptions(e),this.history=this.options.history||{},this.builder=this.options.builder||{},this.map=this.builder.map,this.menumanager=i,this.origin={x:0,y:0,transform:null,offset:{x:0,y:0}}},getBlock:function(t){return h(this.map,l(t)?t:p(t).data("lm-id")||"")},getAttribute:function(t,e){return this.getBlock(t).getAttribute(e)},getSize:function(t){var e=((t=p(t)).matches("[data-mm-id]")?t:t.parent("[data-mm-id]")).find(".percentage input");return Number(e.value())},setSize:function(t,e,i){t=p(t),i=void 0!==i&&i;var n=t.matches("[data-mm-id]")?t:t.parent("[data-mm-id]"),a=n.find(".percentage input");n[i?"animate":"style"]({flex:"0 1 "+e+"%"}),a.value(d(e,1))},start:function(t,e,i,n){if(t&&t.type.match(/^touch/i)&&t.preventDefault(),t.which&&1!==t.which)return!0;t.preventDefault(),this.element=p(e);var a=this.element.parent(".submenu-selector");if(!a)return!1;a.addClass("moving"),this.siblings={occupied:0,elements:i,next:this.element.parent("[data-mm-id]").nextSibling().find("> .submenu-column"),prevs:this.element.parent("[data-mm-id]").previousSiblings(),sizeBefore:0},this.siblings.elements.length>1&&(this.siblings.occupied-=this.getSize(this.siblings.next),this.siblings.elements.forEach(function(t){this.siblings.occupied+=this.getSize(t)},this)),this.siblings.prevs&&this.siblings.prevs.forEach(function(t){this.siblings.sizeBefore+=this.getSize(t)},this),this.origin={size:this.getSize(this.element),maxSize:this.getSize(this.element)+this.getSize(this.siblings.next),x:t.changedTouches?t.changedTouches[0].pageX:t.pageX+6,y:t.changedTouches?t.changedTouches[0].pageY:t.pageY};var r=this.element[0].getBoundingClientRect(),o=this.element.parent()[0].getBoundingClientRect();this.origin.offset={clientRect:r,parentRect:{left:o.left,right:o.right},x:this.origin.x-r.right,y:r.top-this.origin.y,down:n},this.origin.offset.parentRect.left=this.element.parent(".submenu-selector").find("> [data-mm-id]:first-child")[0].getBoundingClientRect().left,this.origin.offset.parentRect.right=this.element.parent(".submenu-selector").find("> [data-mm-id]:last-child")[0].getBoundingClientRect().right,this.DRAG_EVENTS.EVENTS.MOVE.forEach(s(function(t){p(document).on(t,this.bound("move"))},this)),this.DRAG_EVENTS.EVENTS.STOP.forEach(s(function(t){p(document).on(t,this.bound("stop"))},this))},move:function(t){t&&t.type.match(/^touch/i)&&t.preventDefault();var e=t.clientX||t.touches[0].clientX||0,i=t.clientY||t.touches[0].clientY||0,n=this.origin.offset.parentRect,a=(this.lastX||e)-e,r=(this.lastY||i)-i;this.direction=Math.abs(a)>Math.abs(r)&&a>0&&"left"||Math.abs(a)>Math.abs(r)&&a<0&&"right"||Math.abs(r)>Math.abs(a)&&r>0&&"up"||"down";var o,s=100-this.siblings.occupied,l=e+(this.siblings.prevs?this.siblings.prevs.length:this.origin.offset.x-this.origin.offset.down),h=u(l,n.left,n.right);o=c(h,n.left,n.right,0,100),o-=this.siblings.sizeBefore,o=d(u(o,this.options.minSize,this.origin.maxSize-this.options.minSize),0),s=d(s-o,0),this.setSize(this.element,o),this.setSize(this.siblings.next,s);var f=this.siblings.elements,m=f?f.length+1:1;if(3==m||6==m||7==m||8==m||9==m||11==m||12==m){var g,v=0;(g=p([f,this.element.parent("[data-mm-id]")])).forEach(function(t,e){t=p(t),(o=this.getSize(t))%1&&(o=d(100/m,0),this.setSize(t,o)),v+=o,g.length==e+1&&100!=v&&(s=100-v,this.setSize(t,o+s))},this)}this.lastX=e,this.lastY=i},stop:function(t){t&&t.type.match(/^touch/i)&&t.preventDefault(),this.DRAG_EVENTS.EVENTS.MOVE.forEach(s(function(t){p(document).off(t,this.bound("move"))},this)),this.DRAG_EVENTS.EVENTS.STOP.forEach(s(function(t){p(document).off(t,this.bound("stop"))},this)),this.element.parent(".submenu-selector").removeClass("moving"),this.menumanager.emit("dragEnd",this.menumanager.map,"resize")},updateItemSizes:function(t){var e=this.element?this.element.parent(".submenu-selector"):null;if(!e&&!t)return!1;var i=t||e.search("> [data-mm-id]"),n=[],a=p(".menu-selector .active"),r=a?a.data("mm-id"):null;return i.forEach(function(t){n.push(this.getSize(t))},this),this.menumanager.items[r].columns=n,this.updateMaxValues(t),n},updateMaxValues:function(t){var e=this.element?this.element.parent(".submenu-selector"):null;if(!e&&!t)return!1;var i,n;(t||e.search("> [data-mm-id]")).forEach(function(t){var e=(t=p(t)).nextSibling()||t.previousSibling();e&&(n={block:t.find("input.column-pc"),sibling:e.find("input.column-pc")},(i={current:this.getSize(t),sibling:this.getSize(e)}).total=i.current+i.sibling,n.block.attribute("max",i.total-Number(n.block.attribute("min"))),n.sibling.attribute("max",i.total-Number(n.sibling.attribute("min"))))},this)},evenResize:function(t,e){var i=t.length,n=d(100/i,4);t.forEach(function(t){t=p(t),this.setSize(t,n,void 0!==e&&e)},this),this.updateItemSizes(t),this.menumanager.emit("dragEnd",this.menumanager.map,"evenResize")}});e.exports=f},{"../ui/drag.events":51,"../utils/elements.utils":65,"elements/delegation":109,"elements/events":111,"mout/function/bind":191,"mout/lang/isString":210,"mout/math/clamp":215,"mout/math/map":217,"mout/number/enforcePrecision":221,"mout/object/get":232,prime:300,"prime-util/prime/bound":296,"prime-util/prime/options":297,"prime/emitter":299}],33:[function(t,e,i){"use strict";var n=t("elements"),a=t("elements/zen"),r=t("elements/domready"),o=t("../fields/submit"),s=t("../ui").modal,l=t("../ui").toastr,c=t("agent"),u=t("mout/array/indexOf"),d=t("mout/string/trim"),h=t("../utils/get-ajax-url").parse,p=t("../utils/get-ajax-url").global,f=t("../utils/get-ajax-suffix"),m=t("../utils/flags-state"),g=t("mout/lang/deepEquals"),v=t("../utils/translate"),b=t("../positions/cards"),y=t("../utils/wp-widgets-customizer"),w=null,x=function(t,e){for(var i="",n=0,a="a"==(e=e&&e.toLowerCase())?10:0,r="n"==e?10:62;n++<t;){var o=Math.random()*(r-a)+a<<0;i+=String.fromCharCode(o+=o>9?o<36?55:61:48)}return i},k=function(t,e,i){var r=e.find("[data-mm-particle-stepone]").data("mm-particle-stepone"),d=t.instancepicker;if(d){var m=JSON.parse(t.item);d=JSON.parse(d),delete t.instancepicker,r=p(m.type+"/"+m[m.type])}c("post",h(r+f()),t,function(t,r){if(!r.body.success)return s.open({content:r.body.html||r.body,afterOpen:function(t){r.body.html||t.style({width:"90%"})}}),void i.hideIndicator();e.html(r.body.html);var p=n("[data-selectize]");p&&p.selectize();var g=e.find(".g-urltemplate");g&&n("body").emit("input",{target:g});var k=e.find("form"),S=e.find('input[type="submit"], button[type="submit"]'),C=a("div").html(r.body.html).find("form");if(!k&&!C||!S)return!0;var T=e.search("[data-apply-and-save]");T&&T.remove(),S.on("click",function(t){t.preventDefault(),S.showIndicator();var i=o(C[0].elements,e,{submitUnchecked:!0});c(C.attribute("method"),h(C.attribute("action")+f()),i.valid.join("&")||{},function(t,e){if(e.body.success)if(d){var i=n('[name="'+d.field+'"]'),r=i.siblings("[data-g-instancepicker]"),o=i.siblings(".g-instancepicker-title");i&&(i.value(JSON.stringify(e.body.item)),n("body").emit("change",{target:i})),o&&o.text(e.body.item.title),"particle"==m.type&&r.text(r.data("g-instancepicker-alttext"))}else if(w){for(var c=w.element,h=c.data("mm-id")+"-",p=x(5),f=c.parent("[data-mm-base]").data("mm-base"),g=(c.parent("[data-mm-id]").data("mm-id").match(/\d+$/)||[0])[0],k=u(c.parent().children("[data-mm-id]"),c[0]);w.items[h+p];)p=x(5);w.items[h+p]=e.body.item,w.ordering[f]||(w.ordering[f]=[]),w.ordering[f][g]||(w.ordering[f][g]=[]),w.ordering[f][g].splice(k,1,h+p),c.data("mm-id",h+p),e.body.html&&c.html(e.body.html),w.isNewParticle=!1,w.emit("dragEnd",w.map),l.success(v("GANTRY5_PLATFORM_JS_MENU_SETTINGS_APPLIED"),v("GANTRY5_PLATFORM_JS_SETTINGS_APPLIED"))}else{var C=n('[data-g5-position-name="'+e.body.position+'"]'),T=a("div").html(e.body.html);C.find("> ul").appendChild(T.children()),b.serialize(C),b.updatePendingChanges(),l.success(v("GANTRY5_PLATFORM_JS_POSITIONS_SETTINGS_APPLIED"),v("GANTRY5_PLATFORM_JS_SETTINGS_APPLIED"))}else s.open({content:e.body.html||e.body,afterOpen:function(t){e.body.html||t.style({width:"90%"})}});s.close(),S.hideIndicator(),y(i)})})})};r(function(){var t=n("body");t.delegate("click",".menu-editor-extras [data-lm-blocktype], .menu-editor-extras [data-mm-module]",function(t,e){var i=e.parent(".menu-editor-extras"),n=i.search("[data-lm-blocktype], [data-mm-module]"),a=i.find("[data-mm-select]");n.removeClass("selected"),e.addClass("selected"),a.attribute("disabled",null)}),t.delegate("click",".menu-editor-extras [data-mm-select]",function(e,i){if(e.preventDefault(),i.hasClass("disabled")||i.attribute("disabled"))return!1;var a=i.parent(".menu-editor-extras").find("[data-lm-blocktype].selected, [data-mm-module].selected"),r=a.data("mm-type");switch(o={type:r},r){case"particle":o.particle=a.data("lm-subtype");break;case"widget":o.widget=a.data("lm-subtype");break;case"module":o.particle=r,o.title=a.find("[data-mm-title]").data("mm-title"),o.options={particle:{module_id:a.data("mm-module")}}}i.showIndicator();var o,l=i.data("g-instancepicker");if(l&&"module"==r){o=JSON.parse(l);var c=n('[name="'+o.field+'"]');return c&&(c.value(a.data("mm-module")),t.emit("input",{target:c})),i.hideIndicator(),s.close(),!1}var u=l;i.data("g-instancepicker",null),k({item:JSON.stringify(o),instancepicker:u||null},i.parent(".g5-content"),i)})}),e.exports=function(t,e){if(!this.isNewParticle||"reorder"===e){this.resizer.updateItemSizes(),w=this;var i=n("[data-save]"),r={settings:this.settings,ordering:this.ordering,items:this.items};if(this.isNewParticle||(g(t,r)?(i.hideIndicator(),m.set("pending",!1)):(i.showIndicator("fa fa-fw changes-indicator fa-circle-o"),m.set("pending",!0))),this.isParticle&&this.isNewParticle){var o=this.block.data("mm-blocktype");this.block.attribute("data-mm-blocktype",null).addClass("g-menu-item-"+o).data("mm-original-type",o),a("span.menu-item-type.badge").text(o).after(this.block.find(".menu-item .title")),s.open({content:v("GANTRY5_PLATFORM_JS_LOADING"),method:"post",remote:h(n(this.block).find(".config-cog").attribute("href")+f()),remoteLoaded:function(t,e){var i=e.elements.content.find(".search input"),a=e.elements.content.search("[data-mm-type]"),r=e.elements.content.search("[data-mm-filter]");i&&r&&a&&(i.on("input",function(){if(this.value()){a.addClass("hidden");var t,e=[],i=this.value().toLowerCase();r.forEach(function(a){a=n(a),(t=d(a.data("mm-filter")).toLowerCase()).match(new RegExp("^"+i+"|\\s"+i,"gi"))&&e.push(a.matches("[data-mm-type]")?a:a.parent("[data-mm-type]"))},this),e.length&&n(e).removeClass("hidden")}else a.removeClass("hidden")}),setTimeout(function(){i[0].focus()},5))}})}this.type=void 0}}},{"../fields/submit":8,"../positions/cards":46,"../ui":53,"../utils/flags-state":68,"../utils/get-ajax-suffix":69,"../utils/get-ajax-url":70,"../utils/translate":77,"../utils/wp-widgets-customizer":78,agent:79,elements:112,"elements/domready":110,"elements/zen":136,"mout/array/indexOf":174,"mout/lang/deepEquals":200,"mout/string/trim":271}],34:[function(t,e,i){"use strict";var n,a=t("elements/domready"),r=t("./menumanager"),o=t("../fields/submit"),s=t("elements"),l=t("elements/zen"),c=t("../ui").modal,u=t("../ui").toastr,d=t("./extra-items"),h=t("agent"),p=t("mout/string/trim"),f=t("mout/math/clamp"),m=t("mout/array/contains"),g=t("mout/array/indexOf"),v=t("../utils/get-ajax-url").parse,b=t("../utils/get-ajax-suffix"),y=t("../utils/translate"),w=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,x=w?"focus":"focusin",k=w?"blur":"focusout";a(function(){var t=s("body");(n=new r("[data-mm-container]",{delegate:".g5-mm-particles-picker ul li, #menu-editor > section ul li, .submenu-column, .submenu-column li[data-mm-id], .column-container .g-block",droppables:"#menu-editor [data-mm-id]",exclude:"[data-lm-nodrag], .menu-item-back, .fa-cog, .config-cog",resize_handles:".submenu-column:not(:last-child)",catchClick:!0})).on("dragEnd",d),e.exports.menumanager=n,n.setRoot(),t.delegate("statechangeAfter","#main-header [data-g5-ajaxify], select.menu-select-wrap",function(){n.setRoot(),n.refresh(),n.eraser&&(n.eraser.element=s("[data-mm-eraseparticle]"),n.eraser.hide())}),t.delegate(x,".percentage input",function(t,e){(e=s(e)).currentSize=Number(e.value()),e[0].focus(),e[0].select()},!0),t.delegate("keydown",".percentage input",function(t){m([46,8,9,27,13,110,190],t.keyCode)||65==t.keyCode&&(!0===t.ctrlKey||!0===t.ctrlKey)||82==t.keyCode&&(!0===t.ctrlKey||!0===t.metaKey)||t.keyCode>=35&&t.keyCode<=40||(t.shiftKey||t.keyCode<48||t.keyCode>57)&&(t.keyCode<96||t.keyCode>105)&&t.preventDefault()}),t.delegate("keydown",".percentage input",function(e,i){i=s(i);var n=Number(i.value()),a=Number(i.attribute("min")),r=Number(i.attribute("max"));(38==e.keyCode||40==e.keyCode)&&(n+=38==e.keyCode?1:-1,n=f(n,a,r),i.value(n),t.emit("keyup",{target:i}))}),t.delegate("keyup",".percentage input",function(t,e){e=s(e);var i=Number(e.value()),a=Number(e.attribute("min")),r=Number(e.attribute("max")),o=n.resizer,l=e.parent("[data-mm-id]"),c=l.nextSibling("[data-mm-id]")||l.previousSibling("[data-mm-id]");if(!(!i||i<a||i>r)){var u={current:Number(e.currentSize),sibling:Number(o.getSize(c))};e.currentSize=i,u.total=u.current+u.sibling,u.diff=u.total-i,o.setSize(l,i),o.setSize(c,u.diff),n.resizer.updateItemSizes(l.parent(".submenu-selector").search("> [data-mm-id]")),n.emit("dragEnd",n.map,"inputChange")}}),t.delegate(k,".percentage input",function(t,e){e=s(e);var i=Number(e.value());(i<Number(e.attribute("min"))||i>Number(e.attribute("max")))&&e.value(e.currentSize)},!0),t.delegate("click",".add-column",function(t,e){t&&t.preventDefault&&t.preventDefault();var i=(e=s(e)).parent("[data-g5-menu-columns]").find(".submenu-selector"),a=i.children(),r=i.find("> :last-child"),o=a?a.length:0,l=s(".menu-selector .active"),c=l?l.data("mm-id"):null;if(1==o&&!a.search(".submenu-items > [data-mm-id]"))return!1;var u=s(r[0].cloneNode(!0));u.data("mm-id","list-"+o),u.find(".submenu-items").empty(),u.find("[data-mm-base-level]").data("mm-base-level",1),u.find(".submenu-level").text("Level 1"),u.after(r),n.ordering[c]||(n.ordering[c]=[[]]),n.ordering[c].push([]),n.resizer.evenResize(s(".submenu-selector > [data-mm-id]"))}),["click","touchend"].forEach(function(e){t.delegate(e,"[data-g5-menu-columns] .submenu-items:empty",function(t,e){var i=e[0].getBoundingClientRect(),a=t.pageX||t.changedTouches[0].pageX||0,r=t.pageY||t.changedTouches[0].pageY||0,o=s(".submenu-selector > [data-mm-id]"),l={width:36,height:36};if(o.length<=1)return!1;if(a>=i.left+i.width-l.width&&a<=i.left+i.width&&Math.abs(window.scrollY-r)-i.top<l.height){var c=e.parent("[data-mm-id]"),u=c.parent(".submenu-selector").children("[data-mm-id]"),d=g(u,c),h=s(".menu-selector .active"),p=h?h.data("mm-id"):null;c.remove(),o=s(".submenu-selector > [data-mm-id]"),n.ordering[p].splice(d,1),n.resizer.evenResize(o)}})}),t.delegate("click","#menu-editor .config-cog, #menu-editor .global-menu-settings",function(e,i){e.preventDefault();var a={},r=i.hasClass("global-menu-settings");r?a.settings=JSON.stringify(n.settings):a.item=JSON.stringify(n.items[i.parent("[data-mm-id]").data("mm-id")]),c.open({content:y("GANTRY5_PLATFORM_JS_LOADING"),method:"post",data:a,overlayClickToClose:!1,remote:v(s(i).attribute("href")+b()),remoteLoaded:function(e,a){if(e.body.success){var d,f=a.elements.content.find("form"),m=l("div").html(e.body.html).find("form"),g=a.elements.content.search('input[type="submit"], button[type="submit"], [data-apply-and-save]'),w=a.elements.content.find(".search input"),x=a.elements.content.search("[data-mm-type]"),k=a.elements.content.search("[data-mm-filter]"),S=a.elements.content.find(".g-urltemplate");S&&t.emit("input",{target:S});var C=a.elements.content.find("[data-title-editable]");if(C&&C.on("title-edit-end",function(t,e){if(!(t=p(t)))return t=p(e)||"Title",this.text(t).data("title-editable",t),!0}),w&&k&&x&&w.on("input",function(){if(this.value()){x.addClass("hidden");var t,e=[],i=this.value().toLowerCase();k.forEach(function(n){n=s(n),(t=p(n.data("mm-filter")).toLowerCase()).match(new RegExp("^"+i+"|\\s"+i,"gi"))&&e.push(n.matches("[data-mm-type]")?n:n.parent("[data-mm-type]"))},this),e.length&&s(e).removeClass("hidden")}else x.removeClass("hidden")}),w&&setTimeout(function(){w[0].focus()},5),!f&&!m||!g)return!0;g.on("click",function(e){e.preventDefault();var l=s(e.currentTarget);l.disabled(!0),l.hideIndicator(),l.showIndicator();var p=o(m[0].elements,a.elements.content,{isRoot:r});if(p.invalid.length)return l.disabled(!1),l.hideIndicator(),l.showIndicator("fa fa-fw fa-exclamation-triangle"),void u.error(y("GANTRY5_PLATFORM_JS_REVIEW_FIELDS"),y("GANTRY5_PLATFORM_JS_INVALID_FIELDS"));h(m.attribute("method"),v(m.attribute("action")+b()),p.valid.join("&"),function(e,a){if(a.body.success){if(a.body.path||a.body.item&&"particle"==a.body.item.type?(d=a.body.path||i.parent("[data-mm-id]").data("mm-id"),n.items[d]=a.body.item):a.body.item&&"particle"==a.body.item.type||(n.settings=a.body.settings),a.body.html){var r=i.parent("[data-mm-id]");if(r){var o=a.body.item.enabled||a.body.item.options.particle.enabled;r.html(a.body.html),r["0"==o?"addClass":"removeClass"]("g-menu-item-disabled")}}if(n.emit("dragEnd",n.map),null!==l.data("apply-and-save")){var h=s("body").find(".button-save");h&&t.emit("click",{target:h})}c.close(),u.success(y("GANTRY5_PLATFORM_JS_MENU_SETTINGS_APPLIED"),y("GANTRY5_PLATFORM_JS_SETTINGS_APPLIED"))}else c.open({content:a.body.html||a.body,afterOpen:function(t){a.body.html||t.style({width:"90%"})}});l.hideIndicator()})})}else c.enableCloseByOverlay()}})})}),e.exports={menumanager:n}},{"../fields/submit":8,"../ui":53,"../utils/get-ajax-suffix":69,"../utils/get-ajax-url":70,"../utils/translate":77,"./extra-items":33,"./menumanager":35,agent:79,elements:112,"elements/domready":110,"elements/zen":136,"mout/array/contains":165,"mout/array/indexOf":174,"mout/math/clamp":215,"mout/string/trim":271}],35:[function(t,e,i){"use strict";var n=t("prime"),a=t("../utils/elements.utils"),r=t("mout/function/bind"),o=t("elements/zen"),s=t("prime/emitter"),l=t("prime-util/prime/bound"),c=t("prime-util/prime/options"),u=t("../ui/drag.drop"),d=t("../ui/eraser"),h=t("./drag.resizer"),p=(t("mout/object/get"),t("mout/string/ltrim")),f=(t("mout/array/every"),t("mout/array/last")),m=t("mout/array/indexOf"),g=(t("mout/lang/isArray"),t("mout/lang/isObject"),t("mout/lang/deepClone")),v=(t("mout/object/equals"),new n({mixin:[l,c],inherits:s,options:{},constructor:function(t,e){this.setOptions(e),this.refElement=t,this.map={},t&&a(t)&&this.init(t)},init:function(){this.setRoot(),this.dragdrop=new u(this.refElement,this.options,this),this.resizer=new h(this.refElement,this.options,this),this.eraser=new d("[data-mm-eraseparticle]",this.options),this.dragdrop.on("dragdrop:click",this.bound("click")).on("dragdrop:start",this.bound("start")).on("dragdrop:move:once",this.bound("moveOnce")).on("dragdrop:location",this.bound("location")).on("dragdrop:nolocation",this.bound("nolocation")).on("dragdrop:resize",this.bound("resize")).on("dragdrop:stop:erase",this.bound("removeElement")).on("dragdrop:stop",this.bound("stop")).on("dragdrop:stop:animation",this.bound("stopAnimation"))},refresh:function(){this.refElement&&a(this.refElement)&&this.init()},setRoot:function(){if(this.root=a("#menu-editor"),this.root){this.settings=JSON.parse(this.root.data("menu-settings")),this.ordering=JSON.parse(this.root.data("menu-ordering")),this.items=JSON.parse(this.root.data("menu-items")),this.map={settings:g(this.settings),ordering:g(this.ordering),items:g(this.items)};var t,e=a("[data-g5-menu-columns] .submenu-selector");this.resizer&&e&&(t=e.search("> [data-mm-id]"))&&this.resizer.updateMaxValues(t)}},click:function(t,e){var i=a(t.target);if(i.matches(".g-menu-addblock")||i.parent(".g-menu-addblock"))return!1;if(e.hasClass("g-block"))return this.stopAnimation(),!0;if(e.find("[data-g5-ajaxify]")){var n=e.siblings();e.addClass("active"),n&&n.removeClass("active")}e.emit("click");var r=e.find("a");r&&r[0].click()},resize:function(t,e,i,n){this.resizer.start(t,e,i,n)},start:function(t,e){var i=e.parent(".menu-selector")||e.parent(".submenu-column")||e.parent(".submenu-selector")||e.parent(".g5-mm-particles-picker"),n=a(e).position(),r=a(e)[0].getBoundingClientRect();if(this.block=null,this.targetLevel=void 0,this.addNewItem=!1,this.type=e.parent(".g-toplevel")||e.matches(".g-toplevel")?"main":e.matches(".g-block")?"column":"columns_items",this.isParticle=e.matches("[data-mm-blocktype]")||e.matches("[data-mm-original-type]"),this.wasActive=e.hasClass("active"),this.isNewParticle=e.parent(".g5-mm-particles-picker"),this.ParticleIndex=-1,this.root=i,this.itemID=e.data("mm-id"),this.itemLevel=e.data("mm-level"),this.itemFrom=e.parent("[data-mm-id]"),this.itemTo=null,this.isParticle&&!this.isNewParticle){var s=e.parent().children("[data-mm-id]");this.ParticleIndex=m(s,e[0])}i.addClass("moving");var l=a(e).data("mm-id"),c=e[0].cloneNode(!0);if(this.placeholder||(this.placeholder=o(("column"==this.type?"div":"li")+".block.placeholder[data-mm-placeholder]")),this.placeholder.style({display:"none"}),this.original=a(c).after(e).style({display:"inline-block",opacity:1}).addClass("original-placeholder").data("lm-dropzone",null),this.originalType=l,this.block=e,this.isNewParticle){var u=e.position();this.original.style({position:"fixed",opacity:.5}).style({left:r.left,top:r.top,width:u.width,height:u.height}),this.element=this.dragdrop.element,this.block=this.dragdrop.element,this.dragdrop.element=this.original}else e.style({position:"fixed",zIndex:1500,width:Math.ceil(n.width),height:Math.ceil(n.height),left:r.left,top:r.top}).addClass("active"),this.placeholder.before(e);"column"==this.type&&i.search(".g-block > *").style({"pointer-events":"none"})},moveOnce:function(t){var e=a(t).data("mm-id");this.original&&this.original.style({opacity:.5}),!this.isNewParticle&&e&&e.match(/__(module|particle|widget)(-[a-z0-9]{5,})?$/i)&&this.eraser.show()},location:function(t,e,i){i=a(i),(this.isNewParticle?this.block:this.original).style({transform:"translate(0, 0)"}),this.placeholder||(this.placeholder=o(("column"==this.type?"div":"li")+".block.placeholder[data-mm-placeholder]").style({display:"none"}));var n=i.parent(".g-toplevel")||i.matches(".g-toplevel")?"main":i.matches(".g-block")?"column":"columns_items",r=i.data("mm-level"),s=this.block.data("mm-level");if(!this.isParticle||"main"!==n||r){if(null===r&&"columns_items"===this.type&&this.isParticle&&this.isNewParticle)return(l=i.find(".submenu-items"))?(this.placeholder.style({display:"block"}).bottom(l),this.addNewItem=l,this.targetLevel=2,void(this.dragdrop.matched=!1)):void(this.dragdrop.matched=!1);if(null===r&&("columns_items"===this.type||this.isParticle)){var l=i.find(".submenu-items"),c=l.data("mm-base-level");return!i.hasClass("g-block")||i.find(this.block)||!this.isParticle&&s!=c&&(!l||l.children()||s>2)?void(this.dragdrop.matched=!1):(this.placeholder.style({display:"block"}).bottom(l),this.addNewItem=l,this.targetLevel=2,void(this.dragdrop.matched=!1))}if(!this.isParticle){if("column"!==this.type&&s!==r)return void(this.dragdrop.matched=!1);if("column"==this.type&&r)return void(this.dragdrop.matched=!1);if(r>2&&i.parent("ul")!=this.block.parent("ul"))return void(this.dragdrop.matched=!1)}var u=':not(.placeholder):not([data-mm-id="'+this.original.data("mm-id")+'"])',d={before:this.original.previousSiblings(u),after:this.original.nextSiblings(u)};if(d.before&&(d.before=a(d.before[0])),d.after&&(d.after=a(d.after[0])),!("main"===n&&(d.before===i&&"after"===e.x||d.after===i&&"before"===e.x)||"column"===n&&(d.before===i&&"after"===e.x||d.after===i&&"before"===e.x)||"columns_items"===n&&(d.before===i&&"below"===e.y||d.after===i&&"above"===e.y))){switch(n){case"main":case"column":this.placeholder[e.x](i);break;case"columns_items":this.placeholder["above"===e.y?"before":"after"](i)}this.targetLevel=r,this.placeholder.style({display:"block"})["main"!==n?"removeClass":"addClass"]("in-between")}}else this.dragdrop.matched=!1},nolocation:function(t){(this.isNewParticle?this.block:this.original).style({transform:"translate(0, 0)"}),this.placeholder&&this.placeholder.remove(),this.targetLevel=void 0;var e=t.type.match(/^touch/i)?document.elementFromPoint(t.touches.item(0).clientX,t.touches.item(0).clientY):t.target;!this.isNewParticle&&this.itemID.match(/__(module|particle|widget)(-[a-z0-9]{5})?$/i)&&((e=a(e)).matches(this.eraser.element)||this.eraser.element.find(e)?(this.dragdrop.removeElement=!0,this.eraser.over()):(this.dragdrop.removeElement=!1,this.eraser.out()))},removeElement:function(t,e){this.dragdrop.removeElement=!1;var i={opacity:0};e.animate(i,{duration:"150ms"}),"column"==this.type&&this.root.search(".g-block > *").style({"pointer-events":"none"}),this.eraser.hide(),this.dragdrop.DRAG_EVENTS.EVENTS.MOVE.forEach(r(function(t){a("body").off(t,this.dragdrop.bound("move"))},this)),this.dragdrop.DRAG_EVENTS.EVENTS.STOP.forEach(r(function(t){a("body").off(t,this.dragdrop.bound("deferStop"))},this));var n=this.block,o=n.parent("[data-mm-base]").data("mm-base"),s=(n.parent("[data-mm-id]").data("mm-id").match(/\d+$/)||[0])[0],l=m(n.parent().children("[data-mm-id]:not(.original-placeholder)"),n[0]);delete this.items[this.itemID],this.ordering[o][s].splice(l,1),this.block.remove(),this.original.remove(),this.root.removeClass("moving"),this.root.find(".submenu-items")&&(this.root.find(".submenu-items").children()||this.root.find(".submenu-items").text("")),this.emit("dragEnd",this.map,"reorder")},stop:function(t,e,i){e=a(e);var n=a(this.dragdrop.lastOvered);if(n&&n.matches(this.eraser.element.find(".trash-zone")))this.eraser.hide();else{if(e&&i.removeClass("active"),"column"==this.type&&this.root.search(".g-block > *").attribute("style",null),!this.dragdrop.matched&&!this.addNewItem)return this.placeholder&&this.placeholder.remove(),this.type=void 0,this.targetLevel=!1,this.isParticle=void 0,void this.eraser.hide();if(!this.placeholder.parent())return this.type=void 0,this.targetLevel=!1,void(this.isParticle=void 0);this.addNewItem&&this.block.attribute("style",null).removeClass("active");var r=this.block.parent();if(this.eraser.hide(),this.original&&(this.isNewParticle?this.original.attribute("style",null).removeClass("original-placeholder"):this.original.remove()),this.block.after(this.placeholder),this.placeholder.remove(),this.itemTo=this.block.parent("[data-mm-id]"),this.currentLevel=this.itemLevel,this.wasActive&&i.addClass("active"),this.isParticle){var o=f(this.itemID.split("/")),s=(e||this.itemTo)[e&&!e.hasClass("g-block")?"parent":"find"]("[data-mm-base]").data("mm-base");this.itemID=s?s+"/"+o:o,this.itemLevel=this.targetLevel,this.block.data("mm-id",this.itemID).data("mm-level",this.targetLevel)}var l,c,u=this.itemID.split("/");if(u.splice(this.itemLevel-1),u=u.join("/"),(this.itemFrom||this.itemTo)&&((this.itemFrom==this.itemTo?[this.itemFrom]:[this.itemFrom,this.itemTo]).forEach(function(t){t&&(l=t.search("[data-mm-id]"),c=Number(this.block.data("mm-level")>2?0:(t.data("mm-id").match(/\d+$/)||[0])[0]),l?(l=l.map(function(t){return a(t).data("mm-id")}),this.ordering[u]||(this.ordering[u]=[]),this.ordering[u][c]=l):this.ordering[u][c]=[])},this),s=this.itemFrom?null!==this.itemFrom.attribute("data-mm-base")?this.itemFrom:this.itemFrom.find("[data-mm-base]"):null,this.isParticle&&s&&this.targetLevel!=this.currentLevel)){var d=(this.itemFrom.data("mm-id").match(/\d+$/)||[0])[0],h=s.data("mm-base")||"",m=p([h,o].join("/"),["/"]);this.ordering[h][d].splice(this.ParticleIndex,1),this.items[this.itemID]=this.items[m],delete this.items[m]}if(!this.itemFrom&&!this.itemTo&&!this.isParticle){var g=[],v=a(".g-toplevel [data-mm-id].active").data("mm-id");(l=r.search("> [data-mm-id]")).forEach(function(t,e){var i=(t=a(t)).data("mm-id"),n=Number((i.match(/\d+$/)||[0])[0]);t.data("mm-id",i.replace(/\d+$/,e)),g.push(this.ordering[v][n])},this),this.ordering[v]=g}r.children()||r.empty();var b=this.block.parent(".submenu-selector");b&&this.resizer.updateItemSizes(b.search("> [data-mm-id]")),this.emit("dragEnd",this.map,"reorder")}},stopAnimation:function(){var t=null;"column"==this.type&&(t=this.resizer.getSize(this.block)),this.root&&this.root.removeClass("moving"),this.block&&(this.block.attribute("style",null),t&&this.block.style("flex","0 1 "+t+" %")),this.original&&(this.isNewParticle&&(this.dragdrop.matched||this.targetLevel)?this.original.attribute("style",null).removeClass("original-placeholder"):this.original.remove()),!this.wasActive&&this.block&&this.block.removeClass("active")}}));e.exports=v},{"../ui/drag.drop":50,"../ui/eraser":52,"../utils/elements.utils":65,"./drag.resizer":32,"elements/zen":136,"mout/array/every":168,"mout/array/indexOf":174,"mout/array/last":178,"mout/function/bind":191,"mout/lang/deepClone":199,"mout/lang/isArray":202,"mout/lang/isObject":207,"mout/object/equals":226,"mout/object/get":232,"mout/string/ltrim":262,prime:300,"prime-util/prime/bound":296,"prime-util/prime/options":297,"prime/emitter":299}],36:[function(t,e,i){(function(i){"use strict";var n=t("elements"),a=t("elements/domready"),r=t("elements/zen"),o=t("../fields/submit"),s=t("../ui").modal,l=t("../ui").toastr,c=t("../ui/eraser"),u=t("agent"),d=t("mout/array/indexOf"),h=t("sortablejs"),p=(t("mout/string/trim"),t("mout/object/size")),f=t("../utils/get-ajax-url").parse,m=t("../utils/get-ajax-suffix"),g=t("../utils/get-outline").getOutlineNameById,v=t("../utils/translate"),b='[name="page[head][atoms][_json]"]',y=[{name:"atoms",pull:"clone",put:!1},{name:"atoms",pull:!0,put:!0},{name:"atoms",pull:!1,put:!1}],w={eraser:null,lists:{picker:null,items:null},serialize:function(){var t=[],e=n(".atoms-list"),i=e.search("[data-atom-picked]");return i?(i.forEach(function(e){e=n(e),t.push(JSON.parse(e.data("atom-picked")))}),JSON.stringify(t).replace(/\//g,"\\/")):(e.empty(),"[]")},attachEraser:function(){w.eraser?w.eraser.element=n("[data-atoms-erase]"):w.eraser=new c("[data-atoms-erase]")},createSortables:function(t){var e,i;w.attachEraser(),y.forEach(function(a,r){e=n(e=r?1==r?".atoms-list":"#trash":".atoms-picker"),i=h.create(e[0],{sort:1==r,filter:"[data-atom-ignore]",group:a,scroll:!1,forceFallback:!0,animation:100,onStart:function(t){w.attachEraser(),n(t.item).addClass("atom-dragging"),n(t.from).hasClass("atoms-list")&&w.eraser.show()},onEnd:function(t){var e=n(t.item),i=n("#trash"),a=n(this.originalEvent.target),r=!1;if("touchend"===this.originalEvent.type){var o=i[0].getBoundingClientRect(),s=this.originalEvent;r=(s.pageY||s.changedTouches[0].pageY)-window.scrollY<=o.height}if(a.matches("#trash")||a.parent("#trash")||r)return e.remove(),w.eraser.hide(),void this.options.onSort();e.removeClass("atom-dragging"),n(t.from).hasClass("atoms-list")&&w.eraser.hide()},onSort:function(){var t=w.serialize(),e=n(b);if(!e)throw new Error('Field "'+b+'" not found in the DOM.');e.value(t),n("body").emit("change",{target:e})},onOver:function(t){if(n(t.from).matches(".atoms-list")){var e=n(t.newIndex);e.matches("#trash")||e.parent("#trash")?w.eraser.over():w.eraser.out()}}}),w.lists[r?"items":"picker"]=i,1==r&&(t.SimpleSort=i)})}},x=function(){var t=n("body");t.delegate("click",".atoms-list [data-atom-picked] .config-cog",function(e,a){e&&e.preventDefault&&e.preventDefault();var c=a.parent("ul"),h=n(b),y=h.value(),w=c.search("> [data-atom-picked]"),x=a.parent("[data-atom-picked]"),k=x.data("atom-picked");s.open({content:v("GANTRY5_PLATFORM_JS_LOADING"),method:"post",data:{data:k},overlayClickToClose:!1,remote:f(a.attribute("href")+m()),remoteLoaded:function(e,a){var c=a.elements.content.find("form"),b=r("div").html(e.body.html).find("form"),k=a.elements.content.search('input[type="submit"], button[type="submit"], [data-apply-and-save]'),S=JSON.parse(y);if(s.getAll().length>1){var C=a.elements.content.search("[data-apply-and-save]");C&&C.remove()}if(!c&&!b||!k)return!0;k.on("click",function(e){e.preventDefault();var r=n(e.currentTarget);r.hideIndicator(),r.showIndicator();var c=a.elements.content.find("form")[0].elements,y=o(c,a.elements.content);if(y.invalid.length)return r.hideIndicator(),r.showIndicator("fa fa-fw fa-exclamation-triangle"),void l.error(v("GANTRY5_PLATFORM_JS_REVIEW_FIELDS"),v("GANTRY5_PLATFORM_JS_INVALID_FIELDS"));u(b.attribute("method"),f(b.attribute("action")+m()),y.valid.join("&")||{},function(e,a){if(a.body.success){var o=d(w,x[0]);S[o]=a.body.item,h.value(JSON.stringify(S).replace(/\//g,"\\/")),x.find(".atom-title").text(S[o].title),x.data("atom-picked",JSON.stringify(S[o]).replace(/\//g,"\\/"));var c=Number(S[o].attributes.enabled),u=a.body.item.inherit&&p(a.body.item.inherit);if(x[c?"removeClass":"addClass"]("atom-disabled"),x[u?"addClass":"removeClass"]("g-inheriting"),x.attribute("title",c?"":v("GANTRY5_PLATFORM_JS_LM_DISABLED_PARTICLE","atom")),x.data("tip",null),u){var f=a.body.item.inherit,m=g(f?f.outline:null),b=f.atom||"",y=(f.include||[]).join(", ");x.data("tip",v("GANTRY5_PLATFORM_INHERITING_FROM_X","<strong>"+m+"</strong>")+"<br />ID: "+b+"<br />Replace: "+y)}if(t.emit("change",{target:h}),i.G5.tips.reload(),null!==r.data("apply-and-save")){var k=n("body").find(".button-save");k&&t.emit("click",{target:k})}s.close(),l.success(v("GANTRY5_PLATFORM_JS_GENERIC_SETTINGS_APPLIED","Atom"),v("GANTRY5_PLATFORM_JS_SETTINGS_APPLIED"))}else s.open({content:a.body.html||a.body,afterOpen:function(t){a.body.html||t.style({width:"90%"})}});r.hideIndicator()})})}})})},k=function(t){t&&(t.SimpleSort||w.createSortables(t))};a(function(){var t=n("#atoms");n("body").delegate("mouseover","#atoms",function(t,e){k(e)}),k(t),x()}),e.exports=w}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../fields/submit":8,"../ui":53,"../ui/eraser":52,"../utils/get-ajax-suffix":69,"../utils/get-ajax-url":70,"../utils/get-outline":71,"../utils/translate":77,agent:79,elements:112,"elements/domready":110,"elements/zen":136,"mout/array/indexOf":174,"mout/object/size":241,"mout/string/trim":271,sortablejs:315}],37:[function(t,e,i){"use strict";var n=t("elements/domready"),a=t("elements"),r=t("elements/zen"),o=t("../../fields/submit"),s=t("../../ui").modal,l=t("../../ui").toastr,c=t("agent"),u=t("mout/array/last"),d=t("mout/array/indexOf"),h=t("sortablejs"),p=t("mout/string/trim"),f=t("../../utils/get-ajax-url").parse,m=t("../../utils/get-ajax-suffix"),g=t("../../utils/translate");t("elements/insertion"),n(function(){var t=a("body"),e=function(e,i){"enter"==i&&this.CollectionNew&&(this.CollectionNew=!1,t.emit("click",{target:this.parent(".settings-param").find("[data-collection-addnew]")})),"esc"==i&&this.CollectionNew&&(this.CollectionNew=!1,t.emit("click",{target:this.parent("[data-collection-item]").find("[data-collection-remove]")}))},i=function(e){var i=e||a(".collection-list ul");i&&i.forEach(function(e){(e=a(e)).SimpleSort=h.create(e[0],{handle:".fa-reorder",filter:"[data-collection-nosort]",scroll:!1,animation:150,onStart:function(){a(this.el).addClass("collection-sorting")},onEnd:function(e){var i=a(this.el);if(i.removeClass("collection-sorting"),e.oldIndex!==e.newIndex){var n=i.parent(".settings-param").find("[data-collection-data]"),r=n.value();(r=JSON.parse(r)).splice(e.newIndex,0,r.splice(e.oldIndex,1)[0]),n.value(JSON.stringify(r)),t.emit("change",{target:n})}}})})};i(),t.delegate("mouseover",".collection-list ul",function(t,e){e.SimpleSort||i(e)}),t.delegate("click","[data-collection-addnew]",function(i,n){var r,o,s=n.parent(".settings-param"),l=s.find("ul"),c=l.parent("[data-field-name]").find("[data-collection-editall]"),d=s.find("[data-collection-data]"),h=s.find("[data-collection-template]"),p=l.search("> [data-collection-item]")||[],f=a(u(p)),m=a(h[0].cloneNode(!0));f?m.after(f):m.top(l),p.length&&c&&c.style("display","inline-block"),o=(r=m.find("a")).find("[data-title-editable]");var g=new RegExp("%id%","g");r.href(r.href().replace(g,p.length)),m.attribute("style",null).data("collection-item",m.data("collection-template")),m.attribute("data-collection-template",null),m.attribute("data-collection-nosort",null),o.CollectionNew=!0,t.emit("click",{target:r.siblings("[data-title-edit]")}),o.on("title-edit-exit",e),t.emit("change",{target:d})}),t.delegate("blur","[data-collection-item] [data-title-editable]",function(e,i){var n=p(i.text()),a=i.parent("[data-collection-item]"),r=a.data("collection-item"),o=i.parent("ul").search("> [data-collection-item]"),s=i.parent(".settings-param").find("[data-collection-data]"),l=s.value(),c=d(o,a[0]);-1!=c&&((l=JSON.parse(l))[c]||l.splice(c,0,{}),l[c][r]=n,s.value(JSON.stringify(l)),t.emit("change",{target:s}))},!0),t.delegate("click","[data-collection-remove]",function(e,i){e&&e.preventDefault&&e.preventDefault();var n=i.parent("[data-collection-item]"),a=i.parent("ul"),r=a.parent("[data-field-name]").find("[data-collection-editall]"),o=a.search("> [data-collection-item]"),s=d(o,n[0]),l=i.parent(".settings-param").find("[data-collection-data]"),c=l.value();(c=JSON.parse(c)).splice(s,1),l.value(JSON.stringify(c)),n.remove(),o.length<=2&&r&&r.style("display","none"),t.emit("change",{target:l})}),t.delegate("click","[data-collection-duplicate]",function(e,i){e&&e.preventDefault&&e.preventDefault();var n=i.parent(".settings-param"),r=i.parent("[data-collection-item]"),o=i.parent("ul"),s=o.parent("[data-field-name]").find("[data-collection-editall]"),l=n.find("[data-collection-template]").find("a").href(),c=o.search("> [data-collection-item]"),u=d(c,r[0]),h=a(r[0].cloneNode(!0)).after(r),p=i.parent(".settings-param").find("[data-collection-data]"),f=p.value(),m=new RegExp("%id%","g");h.find("a").href(l.replace(m,c.length+1)),(f=JSON.parse(f)).splice(u,0,f[u]),p.value(JSON.stringify(f)),c.length>=1&&s.style("display","inline-block"),t.emit("change",{target:p})}),t.delegate("click","[data-collection-item] a",function(t,e){e.find("[contenteditable]")&&(t.preventDefault(),t.stopPropagation())}),t.delegate("click","[data-collection-item] .config-cog, [data-collection-editall]",function(e,i){e&&e.preventDefault&&e.preventDefault();var n=i.find("[data-title-editable]");if(n&&n.attribute("contenteditable"))return e.stopPropagation(),!1;var u=null!==i.data("collection-editall"),h=i.parent(".settings-param"),p=h.find("[data-collection-data]"),v=p.value(),b=i.parent("[data-collection-item]"),y=h.search("ul > [data-collection-item]"),w={data:u?v:JSON.stringify(JSON.parse(v)[d(y,b[0])])};s.open({content:g("GANTRY5_PLATFORM_JS_LOADING"),method:"post",className:"g5-dialog-theme-default g5-modal-collection g5-modal-collection-"+(u?"editall":"single"),data:w,overlayClickToClose:!1,remote:f(i.attribute("href")+m()),remoteLoaded:function(e,n){if(e.body.success){var u=n.elements.content.find("form"),h=r("div").html(e.body.html).find("form"),w=n.elements.content.search('input[type="submit"], button[type="submit"], [data-apply-and-save]'),x=JSON.parse(v);if(s.getAll().length>1){var k=n.elements.content.search("[data-apply-and-save]");k&&k.remove()}if(x.length,!u&&!h||!w)return!0;w.on("click",function(e){e.preventDefault();var r=a(e.currentTarget);r.hideIndicator(),r.showIndicator();var u=o(h[0].elements,n.elements.content);if(u.invalid.length)return r.hideIndicator(),r.showIndicator("fa fa-fw fa-exclamation-triangle"),void l.error(g("GANTRY5_PLATFORM_JS_REVIEW_FIELDS"),g("GANTRY5_PLATFORM_JS_INVALID_FIELDS"));c(h.attribute("method"),f(h.attribute("action")+m()),u.valid.join("&")||{},function(e,n){if(n.body.success){if(b?x[d(y,b[0])]=n.body.data:x=n.body.data,p.value(JSON.stringify(x)),t.emit("change",{target:p}),i.parent(".settings-param-field").search("ul > [data-collection-item]").forEach(function(t,e){var i=(t=a(t)).find("[data-title-editable]"),n=x[e][t.data("collection-item")];i.data("title-editable",n).text(n)}),null!==r.data("apply-and-save")){var o=a("body").find(".button-save");o&&t.emit("click",{target:o})}s.close(),l.success(g("GANTRY5_PLATFORM_JS_GENERIC_SETTINGS_APPLIED","Collection"),g("GANTRY5_PLATFORM_JS_SETTINGS_APPLIED"))}else s.open({content:n.body.html||n.body,afterOpen:function(t){n.body.html||t.style({width:"90%"})}});r.hideIndicator()})})}else s.enableCloseByOverlay()}})})}),e.exports={}},{"../../fields/submit":8,"../../ui":53,"../../utils/get-ajax-suffix":69,"../../utils/get-ajax-url":70,"../../utils/translate":77,agent:79,elements:112,"elements/domready":110,"elements/insertion":113,"elements/zen":136,"mout/array/indexOf":174,"mout/array/last":178,"mout/string/trim":271,sortablejs:315}],38:[function(t,e,i){"use strict";var n=t("prime"),a=t("prime/emitter"),r=t("prime-util/prime/bound"),o=t("prime-util/prime/options"),s=t("elements"),l=t("elements/domready"),c=t("elements/zen"),u=t("../../ui/drag.events"),d=t("mout/collection/forEach"),h=t("mout/function/bind"),p=t("mout/math/clamp"),f=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,m=u.EVENTS.START,g=u.EVENTS.MOVE,v=u.EVENTS.STOP,b=f?"focus":"focusin",y=new n({mixin:[o,r],inherits:a,options:{},constructor:function(t){this.setOptions(t),this.built=!1,this.attach()},attach:function(){var t=s("body");m.forEach(h(function(e){t.delegate(e,"#g5-container .g-colorpicker i",this.bound("iconClick"))},this)),t.delegate(b,"#g5-container .g-colorpicker input",this.bound("show"),!0),t.delegate("keydown","#g5-container .g-colorpicker input",h(function(t,e){switch(t.keyCode){case 9:this.hide();break;case 13:case 27:this.hide(),e[0].blur()}return!0},this)),t.delegate("keyup","#g5-container .g-colorpicker input",h(function(t,e){return this.updateFromInput(!0,e),!0},this)),t.delegate("paste","#g5-container .g-colorpicker input",h(function(t,e){setTimeout(h(function(){this.updateFromInput(!0,e)},this),1)},this))},show:function(t,e){var i=s("body");this.built||this.build(),this.element=e,this.reposition(),this.wrapper.addClass("cp-visible"),this.updateFromInput(),g.forEach(h(function(t){i.on(t,this.bound("bodyMove"))},this)),m.forEach(h(function(t){this.wrapper.delegate(t,".cp-grid, .cp-slider, .cp-opacity-slider",this.bound("bodyDown")),i.on(t,this.bound("bodyClick"))},this)),v.forEach(h(function(t){i.on(t,this.bound("targetReset"))},this))},hide:function(){var t=s("body");this.built&&(this.wrapper.removeClass("cp-visible"),g.forEach(h(function(e){t.off(e,this.bound("bodyMove"))},this)),m.forEach(h(function(e){this.wrapper.undelegate(e,".cp-grid, .cp-slider, .cp-opacity-slider",this.bound("bodyDown")),t.off(e,this.bound("bodyClick"))},this)),v.forEach(h(function(e){t.off(e,this.bound("targetReset"))},this)))},iconClick:function(t,e){t.preventDefault();var i=s(e).sibling("input");i[0].focus(),this.show(t,i)},bodyMove:function(t){t.preventDefault(),this.target&&this.move(this.target,t)},bodyClick:function(t){var e=s(t.target);e.parent(".cp-wrapper")||e.parent(".g-colorpicker")||this.hide()},bodyDown:function(t,e){t.preventDefault(),this.target=e,this.move(this.target,t,!0)},targetReset:function(t){t.preventDefault(),this.target=null},move:function(t,e){var i,n,a,r,o=this.element,s=t.find(".cp-picker"),l=t[0].getBoundingClientRect(),c=l.left+window.scrollX,u=l.top+window.scrollY,d=Math.round((e?e.pageX:0)-c),h=Math.round((e?e.pageY:0)-u);e&&e.changedTouches&&(d=(e.changedTouches?e.changedTouches[0].pageX:0)-c,h=(e.changedTouches?e.changedTouches[0].pageY:0)-u),e&&e.manualOpacity&&(h=l.height),d<0&&(d=0),h<0&&(h=0),d>l.width&&(d=l.width),h>l.height&&(h=l.height),t.parent(".cp-mode-wheel")&&s.parent(".cp-grid")&&(i=75-d,n=75-h,a=Math.sqrt(i*i+n*n),(r=Math.atan2(n,i))<0&&(r+=2*Math.PI),a>75&&(d=75-75*Math.cos(r),h=75-75*Math.sin(r)),d=Math.round(d),h=Math.round(h)),t.hasClass("cp-grid")?(s.style({top:h,left:d}),this.updateFromPicker(o,t)):(s.style({top:h}),this.updateFromPicker(o,t))},build:function(){this.wrapper=c("div.cp-wrapper.cp-with-opacity.cp-mode-hue"),this.slider=c("div.cp-slider.cp-sprite").bottom(this.wrapper).appendChild(c("div.cp-picker")),this.opacitySlider=c("div.cp-opacity-slider.cp-sprite").bottom(this.wrapper).appendChild(c("div.cp-picker")),this.grid=c("div.cp-grid.cp-sprite").bottom(this.wrapper).appendChild(c("div.cp-grid-inner")).appendChild(c("div.cp-picker")),c("div").bottom(this.grid.find(".cp-picker"));var t=c("div.cp-tabs").bottom(this.wrapper);this.tabs={hue:c("div.cp-tab-hue.active").text("HUE").bottom(t),brightness:c("div.cp-tab-brightness").text("BRI").bottom(t),saturation:c("div.cp-tab-saturation").text("SAT").bottom(t),wheel:c("div.cp-tab-wheel").text("WHEEL").bottom(t),transparent:c("div.cp-tab-transp").text("TRANSPARENT").bottom(t)},m.forEach(h(function(e){t.delegate(e,"> div",h(function(e,i){if(i==this.tabs.transparent){this.opacity=0;var n=this.opacitySlider.position().height;return this.opacitySlider.find(".cp-picker").style({top:p(n-n*this.opacity,0,n)}),void this.move(this.opacitySlider,{manualOpacity:!0})}var a=t.find(".active"),r=a.attribute("class").replace(/\s|active|cp-tab-/g,""),o=i.attribute("class").replace(/\s|active|cp-tab-/g,"");this.wrapper.removeClass("cp-mode-"+r).addClass("cp-mode-"+o),a.removeClass("active"),i.addClass("active"),this.mode=o,this.updateFromInput()},this))},this)),this.wrapper.bottom("#g5-container"),this.built=!0,this.mode="hue"},updateFromInput:function(t,e){var i,n,a=(e=s(e)||this.element).value(),r=a.replace(/\s/g,"").match(/^rgba?\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},(.+)\)/);if(a=S(a)||a,r=r?p(r[1],0,1):1,(i=w(a))||(i="#ffffff"),n=T(i),this.built){this.opacity=Math.max(r,0);var o=this.opacitySlider.position().height;this.opacitySlider.find(".cp-picker").style({top:p(o-o*this.opacity,0,o)});var l,c,u,d,h=this.grid.position().height,f=this.grid.position().width;switch(o=this.slider.position().height,this.mode){case"wheel":l=p(Math.ceil(.75*n.s),0,h/2),c=n.h*Math.PI/180,u=p(75-Math.cos(c)*l,0,f),d=p(75-Math.sin(c)*l,0,h),this.grid.style({backgroundColor:"transparent"}).find(".cp-picker").style({top:d,left:u}),d=150-n.b/(100/h),""===i&&(d=0),this.slider.find(".cp-picker").style({top:d}),this.slider.style({backgroundColor:C({h:n.h,s:n.s,b:100})});break;case"saturation":u=p(5*n.h/12,0,150),d=p(h-Math.ceil(n.b/(100/h)),0,h),this.grid.find(".cp-picker").style({top:d,left:u}),d=p(o-n.s*(o/100),0,o),this.slider.find(".cp-picker").style({top:d}),this.slider.style({backgroundColor:C({h:n.h,s:100,b:n.b})}),this.grid.find(".cp-grid-inner").style({opacity:n.s/100});break;case"brightness":u=p(5*n.h/12,0,150),d=p(h-Math.ceil(n.s/(100/h)),0,h),this.grid.find(".cp-picker").style({top:d,left:u}),d=p(o-n.b*(o/100),0,o),this.slider.find(".cp-picker").style({top:d}),this.slider.style({backgroundColor:C({h:n.h,s:n.s,b:100})}),this.grid.find(".cp-grid-inner").style({opacity:1-n.b/100});break;case"hue":default:u=p(Math.ceil(n.s/(100/f)),0,f),d=p(h-Math.ceil(n.b/(100/h)),0,h),this.grid.find(".cp-picker").style({top:d,left:u}),d=p(o-n.h/(360/o),0,o),this.slider.find(".cp-picker").style({top:d}),this.grid.style({backgroundColor:C({h:n.h,s:100,b:100})})}}t||e.value(this.getValue(i)),this.emit("change",e,i,r)},updateFromPicker:function(t,e){var i,n,a,r,o,s,l,c,u=function(t,e){var i,n;return t.length&&e?(i=t[0].getBoundingClientRect().left,n=t[0].getBoundingClientRect().top,{x:i-e[0].getBoundingClientRect().left+t[0].offsetWidth/2,y:n-e[0].getBoundingClientRect().top+t[0].offsetHeight/2}):null},d=this.wrapper.find(".cp-grid"),h=this.wrapper.find(".cp-slider"),f=this.wrapper.find(".cp-opacity-slider"),m=d.find(".cp-picker"),g=h.find(".cp-picker"),v=f.find(".cp-picker"),b=u(m,d),y=u(g,h),x=u(v,f),k=d[0].getBoundingClientRect().width,T=d[0].getBoundingClientRect().height,E=h[0].getBoundingClientRect().height,O=f[0].getBoundingClientRect().height,I=this.element.value();if(I=S(I)||I,(i=w(I))||(i="#ffffff"),e.hasClass("cp-grid")||e.hasClass("cp-slider"))switch(this.mode){case"wheel":o=k/2-b.x,s=T/2-b.y,l=Math.sqrt(o*o+s*s),(c=Math.atan2(s,o))<0&&(c+=2*Math.PI),l>75&&(l=75,b.x=69-75*Math.cos(c),b.y=69-75*Math.sin(c)),a=p(l/.75,0,100),n=p(180*c/Math.PI,0,360),r=p(100-Math.floor(y.y*(100/E)),0,100),i=C({h:n,s:a,b:r}),h.style({backgroundColor:C({h:n,s:a,b:100})});break;case"saturation":n=p(parseInt(b.x*(360/k),10),0,360),a=p(100-Math.floor(y.y*(100/E)),0,100),r=p(100-Math.floor(b.y*(100/T)),0,100),i=C({h:n,s:a,b:r}),h.style({backgroundColor:C({h:n,s:100,b:r})}),d.find(".cp-grid-inner").style({opacity:a/100});break;case"brightness":n=p(parseInt(b.x*(360/k),10),0,360),a=p(100-Math.floor(b.y*(100/T)),0,100),r=p(100-Math.floor(y.y*(100/E)),0,100),i=C({h:n,s:a,b:r}),h.style({backgroundColor:C({h:n,s:a,b:100})}),d.find(".cp-grid-inner").style({opacity:1-r/100});break;default:n=p(360-parseInt(y.y*(360/E),10),0,360),a=p(Math.floor(b.x*(100/k)),0,100),r=p(100-Math.floor(b.y*(100/T)),0,100),i=C({h:n,s:a,b:r}),d.style({backgroundColor:C({h:n,s:100,b:100})})}e.hasClass("cp-opacity-slider")&&(this.opacity=Math.max(parseFloat(1-x.y/O).toFixed(2),0)),t.value(this.getValue(i)),this.emit("change",this.element,i,this.opacity)},reposition:function(){var t=this.element[0].getBoundingClientRect(),e=s("#g5-container")[0].getBoundingClientRect();this.wrapper.style({top:t.top+t.height-e.top,left:t.left-e.left})},getValue:function(t){if(1==this.opacity)return t;var e=O(t);return"rgba("+e.r+", "+e.g+", "+e.b+", "+this.opacity+")"}}),w=function(t){return 3!==(t=t.replace(/[^A-F0-9]/gi,"")).length&&6!==t.length?"":(3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),"#"+t.toLowerCase())},x=function(t){var e={},i=Math.round(t.h),n=Math.round(255*t.s/100),a=Math.round(255*t.b/100);if(0===n)e.r=e.g=e.b=a;else{var r=a,o=(255-n)*a/255,s=i%60*(r-o)/60;360===i&&(i=0),i<60?(e.r=r,e.b=o,e.g=o+s):i<120?(e.g=r,e.b=o,e.r=r-s):i<180?(e.g=r,e.r=o,e.b=o+s):i<240?(e.b=r,e.r=o,e.g=r-s):i<300?(e.b=r,e.g=o,e.r=o+s):i<360?(e.r=r,e.g=o,e.b=r-s):(e.r=0,e.g=0,e.b=0)}return{r:Math.round(e.r),g:Math.round(e.g),b:Math.round(e.b)}},k=function(t){var e=[t.r.toString(16),t.g.toString(16),t.b.toString(16)];return d(e,function(t,i){1===t.length&&(e[i]="0"+t)}),"#"+e.join("")},S=function(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""},C=function(t){return k(x(t))},T=function(t){var e=E(O(t));return 0===e.s&&(e.h=360),e},E=function(t){var e={h:0,s:0,b:0},i=Math.min(t.r,t.g,t.b),n=Math.max(t.r,t.g,t.b),a=n-i;return e.b=n,e.s=0!==n?255*a/n:0,0!==e.s?t.r===n?e.h=(t.g-t.b)/a:t.g===n?e.h=2+(t.b-t.r)/a:e.h=4+(t.r-t.g)/a:e.h=-1,e.h*=60,e.h<0&&(e.h+=360),e.s*=100/255,e.b*=100/255,e},O=function(t){return t=parseInt(t.indexOf("#")>-1?t.substring(1):t,16),{r:t>>16,g:(65280&t)>>8,b:255&t}};l(function(){var t=new y,e=s("body");t.on("change",function(t,i,n){clearTimeout(this.timer);var a=O(i),r="dark"==((299*a.r+587*a.g+114*a.b)/1e3>=128?"dark":"light")||!n||n<.35;if(n<1){var o="rgba("+a.r+", "+a.g+", "+a.b+", "+n+")";t.style({backgroundColor:o})}else t.style({backgroundColor:i});t.parent(".g-colorpicker")[r?"removeClass":"addClass"]("light-text"),this.timer=setTimeout(function(){t.emit("input"),e.emit("input",{target:t})},150)})}),e.exports=y},{"../../ui/drag.events":51,elements:112,"elements/domready":110,"elements/zen":136,"mout/collection/forEach":188,"mout/function/bind":191,"mout/math/clamp":215,prime:300,"prime-util/prime/bound":296,"prime-util/prime/options":297,"prime/emitter":299}],39:[function(t,e,i){(function(i){"use strict";var n=t("../../utils/elements.utils"),a=t("prime"),r=t("agent"),o=t("elements/zen"),s=t("elements/domready"),l=t("mout/function/bind"),c=(t("mout/string/rtrim"),t("mout/lang/deepClone")),u=t("mout/object/deepFillIn"),d=t("../../ui").modal,h=t("../../utils/get-ajax-suffix"),p=t("../../utils/get-ajax-url").parse,f=t("../../utils/get-ajax-url").global,m=t("../../utils/translate"),g=t("../../utils/cookie"),v=t("dropzone"),b=new a({constructor:function(t){var e=t.data("g5-filepicker");this.data=!!e&&JSON.parse(e),this.data&&!this.data.value&&(this.data.value=n(this.data.field).value()),this.colors={error:"#D84747",success:"#9ADF87",small:"#aaaaaa",gradient:["#9e38eb","#4e68fc"]}},open:function(){this.data&&(this.data.value=n(this.data.field).value()),d.open({method:"post",data:this.data,content:m("GANTRY5_PLATFORM_JS_LOADING"),className:"g5-dialog-theme-default g5-modal-filepicker",remote:p(f("filepicker")+h()),remoteLoaded:l(this.loaded,this),afterClose:l(function(){this.dropzone&&this.dropzone.destroy()},this)})},getPath:function(){var t,e=this.content.search(".g-folders .active");return e?(t=n(e[e.length-1]),JSON.parse(t.data("folder")).pathname.replace(/\/$/,"")+"/"):null},getPreviewTemplate:function(){var t=o("li[data-file]"),e=(o("span.g-file-delete[data-g-file-delete][data-dz-remove]").html('<i class="fa fa-fw fa-trash-o" aria-hidden="true"></i>').bottom(t),o("div.g-thumb[data-dz-thumbnail]").bottom(t));o("span.g-file-name[data-dz-name]").bottom(t),o("span.g-file-size[data-dz-size]").bottom(t),o("span.g-file-mtime[data-dz-mtime]").bottom(t);o("span.g-file-progress[data-file-uploadprogress]").html('<span class="g-file-progress-text"></span>').bottom(t),o("div").bottom(e),t.bottom("body");var i=t[0].outerHTML;return t.remove(),i},loaded:function(t,e){var a=e.elements.content,s=(a.search(".g-bookmark"),a.find(".g-files")),b=c(this.data),y=this.colors,w=this;this.content=a,s&&(this.dropzone=new v("body",{previewTemplate:this.getPreviewTemplate(),previewsContainer:s.find("ul:not(.g-list-labels)")[0],thumbnailWidth:100,thumbnailHeight:100,clickable:"[data-upload]",acceptedFiles:this.acceptedFiles(this.data.filter)||"",accept:l(function(t,e){this.data.filter?t.name.toLowerCase().match(this.data.filter)?e():e("<code>"+t.name+"</code> "+m("GANTRY5_PLATFORM_JS_FILTER_MISMATCH")+": <br />  <code>"+this.data.filter+"</code>"):e()},this),url:l(function(t){return p(f("filepicker/upload/"+i.btoa(encodeURIComponent(this.getPath()+t[0].name)))+h())},this)}),this.dropzone.on("thumbnail",function(t,e){var i=t.name.split(".");i=i.length&&1!=i.length?i.reverse()[0]:"-",n(t.previewElement).addClass("g-image g-image-"+i.toLowerCase()).find("[data-dz-thumbnail] > div").attribute("style","background-image: url("+encodeURI(e)+");")}),this.dropzone.on("addedfile",function(t){var e=n(t.previewElement),i=e.find("[data-file-uploadprogress]"),a=s.hasClass("g-filemode-list"),r={value:0,animation:!1,insertLocation:"bottom"},o=t.name.split(".");o=o.length&&1!=o.length?o.reverse()[0]:"-",t.type.match(/image.*/)?e.find(".g-thumb").addClass("g-image g-image-"+o.toLowerCase()):e.find(".g-thumb").text(o),r=u(a?{size:20,thickness:10,fill:{color:y.small,gradient:!1}}:{size:50,thickness:"auto",fill:{gradient:y.gradient,color:!1}},r),e.addClass("g-file-uploading"),i.progresser(r),i.attribute("title",m("GANTRY5_PLATFORM_JS_PROCESSING")).find(".g-file-progress-text").html("&bull;&bull;&bull;").attribute("title",m("GANTRY5_PLATFORM_JS_PROCESSING"))}).on("processing",function(t){n(t.previewElement).find("[data-file-uploadprogress]").find(".g-file-progress-text").text("0%").attribute("title","0%")}).on("sending",function(t,e,i){n(t.previewElement).find("[data-file-uploadprogress]").attribute("title","0%").find(".g-file-progress-text").text("0%").attribute("title","0%")}).on("uploadprogress",function(t,e,i){var a=n(t.previewElement).find("[data-file-uploadprogress]");a.progresser({value:e/100}),a.attribute("title",Math.round(e)+"%").find(".g-file-progress-text").text(Math.round(e)+"%").attribute("title",Math.round(e)+"%")}).on("complete",function(t){w.refreshFiles(a)}).on("error",function(t,e){var i=n(t.previewElement),a=i.find("[data-file-uploadprogress]"),r=i.find(".g-file-progress-text"),o=s.hasClass("g-filemode-list");i.addClass("g-file-error"),a.title("Error").progresser({fill:{color:y.error,gradient:!1},value:1,thickness:o?10:25}),r.title("Error").html('<i class="fa fa-exclamation" aria-hidden="true"></i>').parent("[data-file-uploadprogress]").popover({content:e.html?e.html:e.error&&e.error.message?e.error.message:e,placement:"auto",trigger:"mouse",style:"filepicker, above-modal",width:"auto",targetEvents:!1})}).on("success",function(t,e,i){var a=n(t.previewElement),r=a.find("[data-file-uploadprogress]"),o=a.find(".g-file-mtime"),c=a.find(".g-file-progress-text"),u=a.find(".g-thumb"),d=s.hasClass("g-filemode-list");r.progresser({fill:{color:y.success,gradient:!1},value:1,thickness:d?10:25}),c.html('<i class="fa fa-check" aria-hidden="true"></i>'),setTimeout(l(function(){r.animate({opacity:0},{duration:500}),u.animate({opacity:1},{duration:500,callback:function(){a.data("file",JSON.stringify(e.finfo)).data("file-url",e.url).removeClass("g-file-uploading"),a.dropzone=t,r.remove(),o.text(m("GANTRY5_PLATFORM_JUST_NOW"))}})},this),500)})),a.delegate("click",".g-bookmark-title",function(t,e){t&&t.preventDefault&&t.preventDefault();var i=e.nextSibling(".g-folders"),n=e.parent(".g-bookmark");i&&i.slideToggle(function(){n.toggleClass("collapsed",i.gSlideCollapsed)})}),a.delegate("click","[data-folder]",l(function(t,e){t&&t.preventDefault&&t.preventDefault();var i=JSON.parse(e.data("folder")),a=n("[data-file].selected");b.root=i.pathname,b.value=!!a&&a.data("file-url"),b.subfolder=!0,e.showIndicator("fa fa-li fa-fw fa-spin-fast fa-spinner"),r(p(f("filepicker")+h()),b).send(l(function(t,i){if(e.hideIndicator(),this.addActiveState(e),i.body.success){var n,a;i.body.subfolder&&(n=o("div").html(i.body.subfolder),(a=e.nextSibling())&&!a.attribute("data-folder")&&a.remove(),n.children().after(e)),i.body.files?(s.empty(),(n=o("div").html(i.body.files)).children().bottom(s).style({opacity:0}).animate({opacity:1},{duration:"250ms"})):s.find("> ul:not(.g-list-labels)").empty(),this.dropzone.previewsContainer=s.find("ul:not(.g-list-labels)")[0]}else d.open({content:i.body.html||i.body,afterOpen:function(t){i.body.html||t.style({width:"90%"})}})},this))},this)),a.delegate("click","[data-g-file-preview]",l(function(t,e){t.preventDefault(),t.stopPropagation();var i=e.parent("[data-file]");if(JSON.parse(i.data("file")).isImage){var n=i.find(".g-thumb > div");d.open({className:"g5-dialog-theme-default g5-modal-filepreview center",content:'<img src="'+n[0].style.backgroundImage.slice(4,-1).replace(/"/g,"")+'" />'})}},this)),a.delegate("click","[data-g-file-delete]",l(function(t,e){t.preventDefault();var n=e.parent("[data-file]"),o=JSON.parse(n.data("file")),s=p(f("filepicker/"+i.btoa(encodeURIComponent(o.pathname))+h()));if(!o.isInCustom)return!1;r("delete",s,function(t,e){e.body.success?(n.addClass("g-file-deleted"),setTimeout(function(){n.remove(),w.refreshFiles(a)},210)):d.open({content:e.body.html||e.body,afterOpen:function(t){e.body.html||t.style({width:"90%"})}})})},this)),a.delegate("click","[data-file]",l(function(t,e){t&&t.preventDefault&&t.preventDefault();var i=n(t.target),a=null!==i.data("g-file-delete")||i.parent("[data-g-file-delete]"),r=null!==i.data("g-file-preview")||i.parent("[data-g-file-preview]");if(!(e.hasClass("g-file-error")||e.hasClass("g-file-uploading")||a||r)){JSON.parse(e.data("file"));s.search("[data-file]").removeClass("selected"),e.addClass("selected")}},this)),a.delegate("click","[data-select]",l(function(t,e){t&&t.preventDefault&&t.preventDefault();var i=s.find("[data-file].selected"),a=i?i.data("file-url"):"";n(this.data.field).value(a),n("body").emit("input",{target:this.data.field}),d.close()},this)),a.delegate("click","[data-files-mode]",l(function(t,e){t&&t.preventDefault&&t.preventDefault(),e.hasClass("active")||(n("[data-files-mode]").removeClass("active"),e.addClass("active"),g.write("g5_files_mode",e.data("files-mode")),s.animate({opacity:0},{duration:200,callback:function(){var t=e.data("files-mode"),i=s.search("[data-file-uploadprogress]"),a="list"==t?{size:20,thickness:10,fill:{color:y.small,gradient:!1}}:{size:50,thickness:"auto",fill:{gradient:y.gradient,color:!1}};s.attribute("class","g-files g-block g-filemode-"+t),i&&i.forEach(function(e){e=n(e);var i=c(a);e.parent(".g-file-error")&&(i.fill={color:y.error},i.value=1,i.thickness="list"==t?10:25),e.progresser(i)}),s.animate({opacity:1},{duration:200})}}))},this))},addActiveState:function(t){var e=this.content.search("[data-folder].active, .g-folders > .active"),i=t.parent();for(e&&e.removeClass("active"),t.addClass("active");"ul"==i.tag()&&!i.hasClass("g-folders");)i.previousSibling().addClass("active"),i=i.parent()},acceptedFiles:function(t){var e="";switch(t){case".(jpe?g|gif|png|svg)$":e=".jpg,.jpeg,.gif,.png,.svg,.JPG,.JPEG,.GIF,.PNG,.SVG";break;case".(mp4|webm|ogv|mov)$":e=".mp4,.webm,.ogv,.mov,.MP4,.WEBM,.OGV,.MOV"}return e},refreshFiles:function(t){var e=n("[data-folder].active"),i=e[e.length-1];i&&t.emit("click",{target:n(i)})}});s(function(){n("body").delegate("click","[data-g5-filepicker]",function(t,e){t&&t.preventDefault&&t.preventDefault(),(e=n(e)).GantryFilePicker||(e.GantryFilePicker=new b(e)),e.GantryFilePicker.open()})}),e.exports=b}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../ui":53,"../../utils/cookie":63,"../../utils/elements.utils":65,"../../utils/get-ajax-suffix":69,"../../utils/get-ajax-url":70,"../../utils/translate":77,agent:79,dropzone:106,"elements/domready":110,"elements/zen":136,"mout/function/bind":191,"mout/lang/deepClone":199,"mout/object/deepFillIn":224,"mout/string/rtrim":269,prime:300}],40:[function(t,e,i){"use strict";var n=t("prime"),a=t("../../utils/elements.utils"),r=t("elements/zen"),o=t("prime/map")(),s=t("prime/emitter"),l=t("prime-util/prime/bound"),c=(t("prime-util/prime/options"),t("elements/domready")),u=t("../../utils/decouple"),d=t("mout/function/bind"),h=(t("mout/array/map"),t("mout/array/forEach"),t("mout/array/contains")),p=(t("mout/array/last"),t("mout/array/split"),t("mout/array/removeAll")),f=t("mout/array/insert"),m=(t("mout/array/append"),t("mout/array/find"),t("mout/array/combine"),t("mout/array/intersection")),g=(t("mout/object/merge"),t("mout/string/unhyphenate")),v=t("mout/string/properCase"),b=t("mout/string/trim"),y=t("../../utils/get-ajax-suffix"),w=t("../../utils/get-ajax-url").parse,x=t("../../utils/get-ajax-url").global,k=t("../../ui").modal,S=t("../../utils/async-foreach"),C=t("../../utils/translate"),T=(t("agent"),t("webfontloader"));t("../../utils/elements.viewport");var E=function(){var t=window.navigator.userAgent;return t.indexOf("MSIE ")>0||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||!1},O=new n({mixin:l,inherits:s,previewSentence:{latin:"Wizard boy Jack loves the grumpy Queen's fox.","latin-ext":"Wizard boy Jack loves the grumpy Queen's fox.",arabic:"نص حكيم له سر قاطع وذو شأن عظيم مكتوب على ثوب أخضر ومغلف بجلد أزرق",cyrillic:"В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!","cyrillic-ext":"В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!",devanagari:"एक पल का क्रोध आपका भविष्य बिगाड सकता है",greek:"Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός","greek-ext":"Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός",hebrew:"דג סקרן שט בים מאוכזב ולפתע מצא חברה",khmer:"ខ្ញុំអាចញ៉ាំកញ្ចក់បាន ដោយគ្មានបញ្ហា",telugu:"దేశ భాషలందు తెలుగు లెస్స",vietnamese:"Tôi có thể ăn thủy tinh mà không hại gì."},constructor:function(){this.wf=T,this.field=null,this.element=null,this.throttle=!1,this.selected=null,this.loadedFonts=[],this.filters={search:"",script:"latin",categories:[]}},open:function(t,e){var i=e.data("g5-fontpicker");if(!i)throw new Error("No fontpicker data found");i=JSON.parse(i),this.field=a(i.field),k.open({content:C("GANTRY5_PLATFORM_JS_LOADING"),className:"g5-dialog-theme-default g5-modal-fonts",remote:w(x("fontpicker")+y()),remoteLoaded:d(function(t,e){var i=e.elements.content;this.attachEvents(i),this.updateCategories(i),this.search(),this.scroll(i.find("ul.g-fonts-list")),this.updateTotal(),this.selectFromValue(),setTimeout(function(){i.find(".particle-search-wrapper input")[0].focus()},5)},this)})},scroll:function(t){clearTimeout(this.throttle),this.throttle=setTimeout(d(function(){if(t){var e=(t.find("ul.g-fonts-list")||t).inviewport(" > li:not(.g-font-hide)",550*(E()?2:7)),i=[];e&&(a(e).forEach(function(t){var e=(t=a(t)).data("font"),n=t.data("variant");!h(this.loadedFonts,e)&&n?i.push(e+("regular"!=n?":"+n:"")):n&&t.find('[data-variant="'+n+'"] .preview').style({fontFamily:e,fontWeight:"regular"==n?"normal":n})},this),i&&i.length&&this.wf.load({classes:!1,google:{families:i},fontactive:d(function(e,i){t.find('li[data-font="'+e+'"]:not(.g-variant-hide) > .preview').style({fontFamily:e,fontWeight:i}),this.loadedFonts.push(e)},this)}))}else clearTimeout(this.throttle)},this),100)},unselect:function(t){if(!(t=t||this.selected))return!1;var e=t.element.data("variant");t.element.removeClass("selected"),t.element.search("input[type=checkbox]").checked(!1),t.element.search("[data-font]").addClass("g-variant-hide"),t.element.find('[data-variant="'+e+'"]').removeClass("g-variant-hide"),t.variants=[t.baseVariant],t.selected=[]},selectFromValue:function(){var t,e,i,n=this.field.value(),r=!1;if(n.match("family=")){var o=n.split("&"),s=o[0].split(":");t=s[0].replace("family=","").replace(/\+/g," "),e=s[1]?s[1].split(","):["regular"],i=o[1]?o[1].replace("subset=","").split(","):["latin"]}else{var l,c=a('[data-category="local-fonts"][data-font]')||[];if(c=c.map(function(t){return a(t).data("font")}),n=n.replace(/(\s{1,})?,(\s{1,})?/gi,",").split(","),!(l=m(c,n)).length)return!1;r=!0,t=l.shift()}var u=a('ul.g-fonts-list > [data-font="'+t+'"]'+(r?'[data-category="local-fonts"]':':not([data-category="local-fonts"])'));e=e||u.data("variants").split(",")||["regular"],h(e,"400")&&(p(e,"400"),f(e,"regular")),h(e,"400italic")&&(p(e,"400italic"),f(e,"italic")),this.selected={font:t,baseVariant:u.data("variant"),element:u,variants:e,selected:[],local:r,charsets:i,availableVariants:u.data("variants").split(","),expanded:r,loaded:r},(r?[t]:e).forEach(function(t){this.select(u,t),(t=u.find('> ul > [data-variant="'+t+'"]'))&&t.removeClass("g-variant-hide")},this);var g=u.find(".font-charsets-selected");if(g){var v=u.data("subsets").split(",").length;g.html('(<i class="fa fa-fw fa-check-square-o" aria-hidden="true"></i>  <span class="font-charsets-details">'+i.length+" of "+v+"</span> selected)")}r||(a("ul.g-fonts-list")[0].scrollTop=u[0].offsetTop),this.toggleExpansion(),setTimeout(d(function(){this.toggleExpansion()},this),50),r||setTimeout(d(function(){a("ul.g-fonts-list")[0].scrollTop=u[0].offsetTop},this,250))},select:function(t,e){var i=t.data("variant"),n=!i;if(!this.selected||this.selected.element!=t){if(e&&this.selected){var r=this.selected.element.find(".font-charsets-selected");if(r){var o=t.data("subsets").split(",").length;r.html('(<i class="fa fa-fw fa-check-square-o" aria-hidden="true"></i>  <span class="font-charsets-details">1 of '+o+"</span> selected)")}}this.selected={font:t.data("font"),baseVariant:i,element:t,variants:[i],selected:[],local:n,charsets:["latin"],availableVariants:t.data("variants").split(","),expanded:n,loaded:n}}if(e||this.toggleExpansion(),e||n){var s=a('ul.g-fonts-list > [data-font]:not([data-font="'+this.selected.font+'"]) input[type="checkbox"]:checked');s&&(s.checked(!1),s.parent("[data-variants]").removeClass("font-selected"));var l=this.selected.element.find('input[type="checkbox"][value="'+(n?this.selected.font:e)+'"]'),c=l.checked();l&&l.checked(!c),c?(e!=this.selected.baseVariant&&p(this.selected.variants,e),p(this.selected.selected,e)):(f(this.selected.variants,e),f(this.selected.selected,e)),this.updateSelection()}},toggleExpansion:function(){if(!(this.selected.availableVariants.length<=1))if(this.selected.local)this.selected.expanded=!0;else{if(this.selected.expanded){var t=':not([data-variant="'+this.selected.variants.join('"]):not([data-variant="')+'"])';(t=this.selected.element.search("[data-font]"+t))&&t.addClass("g-variant-hide")}else{var e=this.selected.element.data("variants");e.split(",").length>1&&(this.manipulateLink(this.selected.font),this.selected.element.search("[data-font]").removeClass("g-variant-hide"),this.selected.loaded||this.wf.load({classes:!1,google:{families:[this.selected.font.replace(/\s/g,"+")+":"+e]},fontactive:d(function(t,e){var i=this.fvdToStyle(t,e),n=i.fontWeight;"400"==n?n="normal"==i.fontStyle?"regular":"italic":"italic"==i.fontStyle&&(n+="italic"),this.selected.element.find('li[data-variant="'+n+'"] .preview').style(i),this.selected.loaded=!0},this)}))}this.selected.expanded=!this.selected.expanded}},manipulateLink:function(t){t=t.replace(/\s/g,"+");var e=a('head link[href*="'+t+'"]');if(e){var i=decodeURIComponent(e.href()).split("|");!i||i.length<=1||(p(i,t),e.attribute("href",encodeURI(i.join("|"))))}},toggle:function(t,e){e=a(e);var i=a(t.target);return"checkbox"==i.attribute("type")&&i.checked(!i.checked()),this.select(e.parent("[data-font]")||e,!!e.parent("[data-font]")&&e.data("variant"),e),!1},updateSelection:function(){var t,e,i=a(".g-particles-footer .font-selected");if(i){if(!this.selected.selected.length)return i.empty(),void this.selected.element.removeClass("font-selected");t=this.selected.selected.sort(),e=this.selected.local?"(<small>local</small>)":"(<small>"+t.join(", ").replace("regular","normal")+"</small>)",this.selected.element.addClass("font-selected"),i.html("<strong>"+this.selected.font+"</strong> "+e)}},updateTotal:function(){var t=a(".g-particles-header .particle-search-total"),e=a(".g-fonts-list > [data-font]:not(.g-font-hide)");t.text(e?e.length:0)},updateCategories:function(t){var e=t.find("[data-font-categories]");e&&(this.filters.categories=e.data("font-categories").split(","))},attachEvents:function(t){var e=t.find(".g-particles-header"),i=t.find(".g-fonts-list"),n=e.find("input.font-search"),a=e.find("input.font-preview");u(i,"scroll",d(this.scroll,this,i)),t.delegate("click",".g-fonts-list li[data-font]",d(this.toggle,this)),n&&n.on("keyup",d(this.search,this,n)),a&&a.on("keyup",d(this.updatePreview,this,a)),this.attachCharsets(t),this.attachLocalVariants(t),this.attachFooter(t)},attachCharsets:function(t){t.delegate("mouseover",".font-charsets-selected",d(function(t,e){if(!e.PopoverDefined){e.getPopover({placement:"auto",width:"200",trigger:"mouse",style:"font-categories, above-modal"});e.on("beforeshow.popover",d(function(t){var i,n=e.parent("[data-subsets]").data("subsets").split(","),o=t.$target.find(".g5-popover-content");o.empty();var s;n.forEach(function(t){s=h(this.selected.charsets,t)?"latin"==t?"checked disabled":"checked":"",r("div").html('<label><input type="checkbox" '+s+' value="'+t+'"/> '+v(g(t.replace("ext","extended")))+"</label>").bottom(o)},this),o.delegate("click",'input[type="checkbox"]',d(function(t,r){r=a(r),i=o.search('input[type="checkbox"]:checked'),this.selected.charsets=i?i.map("value"):[],e.html('(<i class="fa fa-fw fa-check-square-o" aria-hidden="true"></i>  <span class="font-charsets-details">'+this.selected.charsets.length+" of "+n.length+"</span> selected)")},this)),t.displayContent()},this)),e.getPopover().show()}},this))},attachLocalVariants:function(t){t.delegate("mouseover",".g-font-variants-list",d(function(t,e){if(!e.PopoverDefined){e.getPopover({placement:"auto",width:"200",trigger:"mouse",style:"font-categories, above-modal"});e.on("beforeshow.popover",d(function(t){var i=t.$target.find(".g5-popover-content"),n=e.parent("[data-variants]").data("variants").split(",");i.empty(),S(n,d(function(t){t="400"==t?"regular":"400italic"==t?"italic":t+"",r("div").text(this.mapVariant(t)).bottom(i)},this)),t.displayContent()},this))}},this))},attachFooter:function(t){var e,i=t.find(".g-particles-footer"),n=i.find("button.button-primary"),o=i.find(".font-category"),s=i.find(".font-subsets");return n.on("click",d(function(){if(!a('ul.g-fonts-list > [data-font] input[type="checkbox"]:checked'))return this.field.value(""),void k.close();var t=this.selected.font.replace(/\s/g,"+"),e=this.selected.selected,i=this.selected.charsets;e&&1==e.length&&"regular"==e[0]&&(e=[]),i&&1==i.length&&"latin"==i[0]&&(i=[]),h(e,"regular")&&(p(e,"regular"),f(e,"400")),h(e,"italic")&&(p(e,"italic"),f(e,"400italic")),this.selected.local?this.field.value(t):this.field.value("family="+t+(e.length?":"+e.join(","):"")+(i.length?"&subset="+i.join(","):"")),this.field.emit("input"),a("body").emit("input",{target:this.field}),k.close()},this)),o.popover({placement:"top",width:"200",trigger:"mouse",style:"font-categories, above-modal"}).on("beforeshow.popover",d(function(t){var i,n=o.data("font-categories").split(","),s=t.$target.find(".g5-popover-content");s.empty(),n.forEach(function(t){"local-fonts"!=t&&(e=h(this.filters.categories,t)?"checked":"",r("div").html('<label><input type="checkbox" '+e+' value="'+t+'"/> '+v(g(t))+"</label>").bottom(s))},this),s.delegate("click",'input[type="checkbox"]',d(function(t,e){e=a(e),i=s.search('input[type="checkbox"]:checked'),this.filters.categories=i?i.map("value"):[],o.find("small").text(this.filters.categories.length),this.search()},this)),t.displayContent()},this)),s.popover({placement:"top",width:"200",trigger:"mouse",style:"font-subsets, above-modal"}).on("beforeshow.popover",d(function(t){var i=s.data("font-subsets").split(","),n=t.$target.find(".g5-popover-content");n.empty();i.forEach(function(t){e=t==this.filters.script?"checked":"",r("div").html('<label><input name="font-subset[]" type="radio" '+e+' value="'+t+'"/> '+v(g(t.replace("ext","extended")))+"</label>").bottom(n)},this),n.delegate("change",'input[type="radio"]',d(function(t,e){e=a(e),this.filters.script=e.value(),a(".g-particles-header input.font-preview").value(this.previewSentence[this.filters.script]),s.find("small").text(v(g(e.value().replace("ext","extended")))),this.search(),this.updatePreview()},this)),t.displayContent()},this)),t},search:function(t){t=t||a(".g-particles-header input.font-search");var e,i,n,r=a(".g-fonts-list"),o=t.value();r.search("> [data-font]").forEach(function(t){t=a(t),e=t.data("font"),i=t.data("subsets").split(","),n=t.data("category"),t.removeClass("g-font-hide"),this.selected&&this.selected.font==e&&this.selected.selected.length||(h(i,this.filters.script)&&h(this.filters.categories,n)&&e.match(new RegExp("^"+o+"|\\s"+o,"gi"))?t.removeClass("g-font-hide"):t.addClass("g-font-hide"))},this),this.updateTotal(),clearTimeout(t.refreshTimer),t.refreshTimer=setTimeout(d(function(){this.scroll(a("ul.g-fonts-list"))},this),400),t.previousValue=o},updatePreview:function(t){t=t||a(".g-particles-header input.font-preview"),clearTimeout(t.refreshTimer);var e=t.value(),i=a(".g-fonts-list");if(e=b(e)?b(e):this.previewSentence[this.filters.script],t.previousValue==e)return!0;i.search("[data-font] .preview").text(e),t.previousValue=e},fvdToStyle:function(t,e){var i=e.match(/([a-z])([0-9])/);return i?{fontFamily:t,fontStyle:{n:"normal",i:"italic",o:"oblique"}[i[1]],fontWeight:(100*i[2]).toString()}:""},mapVariant:function(t){switch(t){case"100":return"Thin 100";case"100italic":return"Thin 100 Italic";case"200":return"Extra-Light 200";case"200italic":return"Extra-Light 200 Italic";case"300":return"Light 300";case"300italic":return"Light 300 Italic";case"400":case"regular":return"Normal 400";case"400italic":case"italic":return"Normal 400 Italic";case"500":return"Medium 500";case"500italic":return"Medium 500 Italic";case"600":return"Semi-Bold 600";case"600italic":return"Semi-Bold 600 Italic";case"700":return"Bold 700";case"700italic":return"Bold 700 Italic";case"800":return"Extra-Bold 800";case"800italic":return"Extra-Bold 800 Italic";case"900":return"Ultra-Bold 900";case"900italic":return"Ultra-Bold 900 Italic";default:return"Unknown Variant"}}});c(function(){a("body").delegate("click","[data-g5-fontpicker]",function(t,e){t&&t.preventDefault&&t.preventDefault();var i=o.get(e);i||(i=new O,o.set(e,i)),i.open(t,e)})}),e.exports=O},{"../../ui":53,"../../utils/async-foreach":62,"../../utils/decouple":64,"../../utils/elements.utils":65,"../../utils/elements.viewport":66,"../../utils/get-ajax-suffix":69,"../../utils/get-ajax-url":70,"../../utils/translate":77,agent:79,"elements/domready":110,"elements/zen":136,"mout/array/append":163,"mout/array/combine":164,"mout/array/contains":165,"mout/array/find":170,"mout/array/forEach":173,"mout/array/insert":175,"mout/array/intersection":176,"mout/array/last":178,"mout/array/map":179,"mout/array/removeAll":181,"mout/array/split":184,"mout/function/bind":191,"mout/object/merge":236,"mout/string/properCase":263,"mout/string/trim":271,"mout/string/unhyphenate":274,prime:300,"prime-util/prime/bound":296,"prime-util/prime/options":297,"prime/emitter":299,"prime/map":301,webfontloader:316}],41:[function(t,e,i){"use strict";var n=t("../../utils/elements.utils"),a=t("elements/domready"),r=t("../../ui").modal,o=t("../../utils/get-ajax-suffix"),s=t("../../utils/get-ajax-url").parse,l=t("../../utils/get-ajax-url").global,c=t("../../utils/translate"),u=t("mout/string/trim"),d=t("mout/array/contains");a(function(){var t=n("body");t.delegate("keyup",'.g-icons input[type="text"]',function(t,e){var i=(e=n(e)).sibling("[data-g5-iconpicker]")||e.siblings().find("[data-g5-iconpicker]"),a=e.value();i.find("i").attribute("class",a||"fa fa-hand-o-up picker"),i[0].offsetWidth||i.find("i").attribute("class","fa fa-hand-o-up picker")}),t.delegate("click","[data-g5-iconpicker]",function(t,e){t&&t.preventDefault&&t.preventDefault(),e=n(e);var i=n(e.data("g5-iconpicker")),a=e,h=u(i.value()).replace(/\s{2,}/g," ").split(" ");r.open({content:c("GANTRY5_PLATFORM_JS_LOADING"),className:"g5-dialog-theme-default g5-modal-icons",remote:s(l("icons")+o()),afterClose:function(){var t=n(".g5-popover");t&&t.remove()},remoteLoaded:function(t,e){var o,s,l=e.elements.content,c=l.search("[data-g-icon]");if(!c||!t.body.success)return l.html(t.body.html||t.body),!1;var u=function(){var t=[],e=l.find("[data-g-icon].active"),i=l.search(".g-particles-header .float-right input:checked, .g-particles-header .float-right select");e&&t.push(e.data("g-icon")),i&&i.forEach(function(e){var i=n(e).value();i&&"fa-"!==i&&t.push(i)}),l.find(".g-icon-preview").html('<i class="fa '+t.join(" ")+'" aria-hidden="true"></i> <span>'+t[0]+"</span>"),l.find("[data-g-select]").disabled(!l.find("[data-g-icon].active")||null)},p=function(){var t=l.search("[data-g-icon]:not(.hide-icon)");l.find(".particle-search-total").text(t?t.length:0)};l.find("[data-g-select]").disabled(!l.find("[data-g-icon].active")||null),l.delegate("click","[data-g-icon]",function(t,e){t&&t.preventDefault&&t.preventDefault(),e=n(e);var i=l.find("[data-g-icon].active");i&&i.removeClass("active"),e.addClass("active"),l.find("[data-g-select]").disabled(null),u()}),l.delegate("click","[data-g-select]",function(t){if(t.preventDefault(),!l.find("[data-g-icon].active"))return!1;var e=l.find(".g-icon-preview i");i.value(e.attribute("class")),a.find("i").attribute("class",e.attribute("class")),i.emit("input"),n("body").emit("input",{target:i}),r.close()}),l.delegate("change",'.g-particles-header .float-right input[type="checkbox"], .g-particles-header .float-right select',function(){u()}),l.delegate("keyup",'.particle-search-wrapper input[type="text"]',function(t,e){var i=(e=n(e)).value(),a=l.search("[data-g-icon].hide-icon");if(!i)return a&&(a.removeClass("hide-icon"),p()),!0;var r=l.search('[data-g-icon*="'+i+'"]');l.search("[data-g-icon]").addClass("hide-icon"),r&&r.removeClass("hide-icon"),p()}),c.forEach(function(t){t=n(t),o="";for(var e=5;e>0;e--)s=e?e+"x":"lg",o+='<i class="fa '+t.data("g-icon")+" fa-"+s+'" aria-hidden="true"></i> ';if(o+="<h3>"+t.data("g-icon")+"</h3>",t.popover({content:o,placement:"auto",trigger:"mouse",style:"above-modal, icons-preview",width:"auto",targetEvents:!1,delay:1}).on("hidden.popover",function(t){t.$target&&t.$target.remove()}),d(h,t.data("g-icon"))){t.addClass("active"),h.forEach(function(t){var e=l.find('[name="'+t+'"]');e?e.checked(!0):(e=l.find('option[value="'+t+'"]'))&&e.parent().value(t)});var i=t.parent(".icons-wrapper"),a=i[0].offsetHeight;i[0].scrollTop=t[0].offsetTop-a/2,u()}}),setTimeout(function(){l.find(".particle-search-wrapper input")[0].focus()},5)}})})}),e.exports={}},{"../../ui":53,"../../utils/elements.utils":65,"../../utils/get-ajax-suffix":69,"../../utils/get-ajax-url":70,"../../utils/translate":77,"elements/domready":110,"mout/array/contains":165,"mout/string/trim":271}],42:[function(t,e,i){"use strict";e.exports={colorpicker:t("./colorpicker"),fonts:t("./fonts"),menu:t("./menu"),icons:t("./icons"),filepicker:t("./filepicker"),collections:t("./collections"),keyvalue:t("./keyvalue"),instancepicker:t("./instancepicker")}},{"./collections":37,"./colorpicker":38,"./filepicker":39,"./fonts":40,"./icons":41,"./instancepicker":43,"./keyvalue":44,"./menu":45}],43:[function(t,e,i){"use strict";var n=t("elements"),a=t("elements/zen"),r=t("elements/domready"),o=t("../../fields/submit"),s=t("../../ui").modal,l=t("agent"),c=t("mout/string/trim"),u=t("../../utils/get-ajax-url").parse,d=t("../../utils/get-ajax-url").global,h=t("../../utils/get-ajax-suffix"),p=t("../../utils/translate"),f=t("../../utils/wp-widgets-customizer");r(function(){var t=n("body"),e=(n('[data-g-instancepicker] ~ input[type="hidden"]'),{wordpress:"widget",joomla:"module"});t.delegate("input",'[data-g-instancepicker] ~ input[type="hidden"]',function(t,e){if(!e.value()){var i=e.siblings(".g-instancepicker-title"),n=e.siblings("[data-g-instancepicker]"),a=e.sibling(".g-reset-field");i.text(""),n.text(n.data("g-instancepicker-text")),a.style("display","none")}}),t.delegate("click","[data-g-instancepicker]",function(t,i){t&&t.preventDefault();var r,m,g=JSON.parse(i.data("g-instancepicker")),v=n('[name="'+g.field+'"]');return m=g.type==e[GANTRY_PLATFORM]?("widget"!=g.type?"particle/":"")+e[GANTRY_PLATFORM]:"particle",!!v&&(r=v.value(),"particle"!=g.type&&"widget"!=g.type||!r||(m=(r=JSON.parse(r||{})).type+"/"+r[g.type]),!!g.modal_close||void s.open({content:p("GANTRY5_PLATFORM_JS_LOADING"),method:r&&"module"!=g.type?"post":"get",data:r&&"module"!=g.type?r:{},overlayClickToClose:!1,remote:u(d(m)+h()),remoteLoaded:function(t,r){if(t.body.success){var d=r.elements.content,p=d.find("[data-mm-select]"),m=d.find(".search input"),g=d.search("[data-mm-type]"),b=d.search("[data-mm-filter]");m&&b&&g&&(m.on("input",function(){if(this.value()){g.addClass("hidden");var t,e=[],i=this.value().toLowerCase();b.forEach(function(a){a=n(a),(t=c(a.data("mm-filter")).toLowerCase()).match(new RegExp("^"+i+"|\\s"+i,"gi"))&&e.push(a.matches("[data-mm-type]")?a:a.parent("[data-mm-type]"))},this),e.length&&n(e).removeClass("hidden")}else g.removeClass("hidden")}),setTimeout(function(){m[0].focus()},5));var y=JSON.parse(i.data("g-instancepicker"));if(y.type==e[GANTRY_PLATFORM]&&(y.modal_close=!0),p)p.data("g-instancepicker",JSON.stringify(y));else{var w=d.find("form"),x=a("div").html(t.body.html||t.body).find("form"),k=d.find('input[type="submit"], button[type="submit"]');if(!w&&!x||!k)return!0;var S=d.search("[data-apply-and-save]");S&&S.remove(),k.on("click",function(t){t.preventDefault(),k.showIndicator();var e=o(x[0].elements,d);l(x.attribute("method"),u(x.attribute("action")+h()),e.valid.join("&")||{},function(t,e){if(e.body.success){var i=v.siblings(".g-instancepicker-title");v&&(v.value(JSON.stringify(e.body.item)),n("body").emit("change",{target:v})),i&&i.text(e.body.item.title)}else s.open({content:e.body.html||e.body,afterOpen:function(t){e.body.html||t.style({width:"90%"})}});s.close(),k.hideIndicator(),f(v)})})}}else s.enableCloseByOverlay()}}))})}),e.exports={}},{"../../fields/submit":8,"../../ui":53,"../../utils/get-ajax-suffix":69,"../../utils/get-ajax-url":70,"../../utils/translate":77,"../../utils/wp-widgets-customizer":78,agent:79,elements:112,"elements/domready":110,"elements/zen":136,"mout/string/trim":271}],44:[function(t,e,i){"use strict";var n=t("elements/domready"),a=t("elements"),r=(t("elements/zen"),t("mout/object/has")),o=t("mout/array/some"),s=(t("../../ui").modal,t("../../ui").toastr,t("agent"),t("mout/array/indexOf")),l=t("mout/array/contains"),c=t("mout/array/last"),u=t("mout/object/keys"),d=t("sortablejs"),h=t("mout/string/escapeUnicode"),p=t("mout/string/trim"),f=(t("../../utils/get-ajax-suffix"),t("../../utils/translate"));t("elements/insertion"),n(function(){var t=a("body"),e=function(e){var i=e||a(".g-keyvalue-field ul");i&&i.forEach(function(e){(e=a(e)).SimpleSort=d.create(e[0],{handle:".fa-reorder",filter:"[data-keyvalue-nosort]",scroll:!1,animation:150,onStart:function(){a(this.el).addClass("keyvalue-sorting")},onEnd:function(e){var i=a(this.el);if(i.removeClass("keyvalue-sorting"),e.oldIndex!==e.newIndex){var n=i.parent(".settings-param").find("[data-keyvalue-data]"),r=n.value();(r=JSON.parse(r)).splice(e.newIndex,0,r.splice(e.oldIndex,1)[0]),n.value(JSON.stringify(r)),t.emit("change",{target:n})}}})})};e(),t.delegate("mouseover",".g-keyvalue-field ul",function(t,i){i.SimpleSort||e(i)}),t.delegate("click","[data-keyvalue-addnew]",function(t,e){var i=e.parent(".settings-param"),n=i.find("ul"),r=i.find("[data-keyvalue-template]"),o=n.search("> [data-keyvalue-item]")||[],s=a(c(o)),l=a(r[0].cloneNode(!0));s?l.after(s):l.top(n),l.attribute("style",null).data("keyvalue-item",l.data("keyvalue-template")),l.attribute("data-keyvalue-template",null),l.attribute("data-keyvalue-nosort",null),l.find("[data-keyvalue-key]")[0].focus()}),t.delegate("click","[data-keyvalue-remove]",function(e,i){e&&e.preventDefault&&e.preventDefault();var n=i.parent("[data-keyvalue-item]"),a=(n.find('input[type="text"]').data("keyvalue-key"),i.parent(".settings-param").find("[data-keyvalue-data]")),r=i.parent("ul").search("> [data-keyvalue-item]"),o=s(r,n[0]),l=JSON.parse(a.value());l.splice(o,1),a.value(h(JSON.stringify(l))),n.remove(),t.emit("change",{target:a})});var i=function(e,i){var n=i.parent("[data-keyvalue-item]"),a=n.find(".g-keyvalue-wrapper"),c=n.find("[data-keyvalue-key]"),u=n.find("[data-keyvalue-value]"),d=c.data("keyvalue-key"),m=p(c.value()),g=p(u.value()),v=i.parent("ul").search("> [data-keyvalue-item]:not(.g-keyvalue-warning):not(.g-keyvalue-excluded)"),b=s(v,n[0]),y=i.parent(".settings-param").find("[data-keyvalue-data]"),w=JSON.parse(y.value()),x=JSON.parse(y.data("keyvalue-exclude")),k=l(x,m),S=o(w,function(t){return r(t,m)})&&d!==m;c==i&&(d===m||S||(void 0!==w[b]&&delete w[b][d],c.data("keyvalue-key",m||"")),n[S?"addClass":"removeClass"]("g-keyvalue-warning"),n[k?"addClass":"removeClass"]("g-keyvalue-excluded"),a.data("tip",S?f("GANTRY5_PLATFORM_JS_KEYVALUE_DUPLICATE",m):k?f("GANTRY5_PLATFORM_JS_KEYVALUE_EXCLUDED",m):null).data("tip-place","top-right").data("tip-spacing",2).data("tip-offset",8),k||S?window.G5.tips.get(a[0]).show():window.G5.tips.remove(a[0])),!m||k||S||(w[b]||w.splice(b,0,{}),w[b][m]=g),y.value(h(JSON.stringify(w))),t.emit("change",{target:y})};t.delegate("keydown",'[data-keyvalue-item] input[type="text"]',function(t,e){13===(t.which?t.which:t.keyCode)&&i(0,e)}),t.delegate("blur",'[data-keyvalue-item] input[type="text"]',i,!0),t.delegate("update","[data-keyvalue-data]",function(t,e){var i=e.parent(),n=i.search("[data-keyvalue-item]"),r=i.find("ul"),o=JSON.parse(e.value()),s=i.find("[data-keyvalue-template]");n&&n.remove(),o.forEach(function(t,e){var i=a(s[0].cloneNode(!0)),n=u(t).shift(),o=t[n];r.appendChild(i),i.attribute("style",null).data("keyvalue-item",i.data("keyvalue-template")),i.attribute("data-keyvalue-template",null),i.attribute("data-keyvalue-nosort",null),i.find("[data-keyvalue-key]").value(n),i.find("[data-keyvalue-value]").value(o)})})}),e.exports={}},{"../../ui":53,"../../utils/get-ajax-suffix":69,"../../utils/translate":77,agent:79,elements:112,"elements/domready":110,"elements/insertion":113,"elements/zen":136,"mout/array/contains":165,"mout/array/indexOf":174,"mout/array/last":178,"mout/array/some":183,"mout/object/has":233,"mout/object/keys":235,"mout/string/escapeUnicode":259,"mout/string/trim":271,sortablejs:315}],45:[function(t,e,i){"use strict";var n=t("../../utils/elements.utils");t("elements/domready")(function(){n("body").delegate("click","[data-g5-content] .g-main-nav .g-toplevel [data-g5-ajaxify]",function(t,e){t&&t.preventDefault&&t.preventDefault();var i=n("[data-g5-content] .g-main-nav .g-toplevel [data-g5-ajaxify] !> li");i&&i.removeClass("active"),e.parent("li").addClass("active")})}),e.exports={}},{"../../utils/elements.utils":65,"elements/domready":110}],46:[function(t,e,i){"use strict";var n=t("elements"),a=(t("elements/zen"),t("elements/domready")),r=(t("mout/string/trim"),t("mout/object/keys"),t("../ui").modal,t("../ui").toastr,t("agent"),t("../utils/get-ajax-suffix"),t("../utils/get-ajax-url").parse,t("../utils/get-ajax-url").global,t("../ui/eraser")),o=t("sortablejs"),s=t("../utils/flags-state"),l=[{name:"positions",pull:!0,put:!0},{name:"positions",pull:!1,put:!1}],c={eraser:null,lists:[],state:[],init:function(t){return c.state=c.serialize(t),c.state},equals:function(){return c.state===c.serialize()},updatePendingChanges:function(){var t=c.equals(),e=n('[data-save="Positions"]'),i=(e.find("i"),e.find(".changes-indicator"));t&&i&&e.hideIndicator(),t||i||e.showIndicator("changes-indicator fa fa-fw fa-circle-o"),s.set("pending",!t)},serialize:function(t){var e,i=[],a=n(t)||n("[data-g5-position]");return a?(a.forEach(function(t){t=n(t),(e=JSON.parse(t.data("g5-position"))).modules=[],(t.search("[data-pm-data]")||[]).forEach(function(t){t=n(t),e.modules.push(JSON.parse(t.data("pm-data")||"{}"))}),i.push(e),t.data("g5-position",JSON.stringify(e))}),JSON.stringify(i).replace(/\//g,"\\/")):"[]"},attachEraser:function(){if(c.eraser)return c.eraser.element=n("[data-g5-positions-erase]"),void c.eraser.hide("fast");c.eraser=new r("[data-g5-positions-erase]")},createSortables:function(t){var e,i;c.attachEraser(),l.forEach(function(a,r){(e=n(e=r?"#trash":"[data-g5-position] ul")).forEach(function(t,e){i=o.create(t,{sort:!r,filter:"[data-g5-position-ignore]",group:a,scroll:!0,forceFallback:!0,animation:100,onStart:function(t){c.attachEraser(),n(t.item).addClass("position-dragging"),c.eraser.show()},onEnd:function(t){var e=n(t.item),i=n("#trash"),a=n(this.originalEvent.target),r=!1;if("touchend"===this.originalEvent.type){var o=i[0].getBoundingClientRect(),s=this.originalEvent;r=(s.pageY||s.changedTouches[0].pageY)-window.scrollY<=o.height}if(a.matches("#trash")||a.parent("#trash")||r)return e.remove(),c.eraser.hide(),void this.options.onSort(t);e.removeClass("position-dragging"),c.eraser.hide()},onSort:function(t){var e=n(t.from),i=n(t.to),a=[e.parent("[data-g5-position]"),i.parent("[data-g5-position]")];t.from[0]===t.to[0]&&a.shift(),c.serialize(a),c.updatePendingChanges()},onOver:function(t){if(n(t.from).matches("ul")){var e=n(t.newIndex);e.matches("#trash")||e.parent("#trash")?c.eraser.over():c.eraser.out()}}}),r||c.lists[e]||(c.lists[e]=i)}),r||(t.SimpleSort=i)})}},u=function(t){t&&(t.SimpleSort||c.createSortables(t))};a(function(){var t=n("#positions");n("body").delegate("mouseover","#positions",function(t,e){u(e)}),u(t)}),e.exports=c},{"../ui":53,"../ui/eraser":52,"../utils/flags-state":68,"../utils/get-ajax-suffix":69,"../utils/get-ajax-url":70,agent:79,elements:112,"elements/domready":110,"elements/zen":136,"mout/object/keys":235,"mout/string/trim":271,sortablejs:315}],47:[function(t,e,i){"use strict";var n=t("elements"),a=t("elements/zen"),r=t("elements/domready"),o=t("mout/string/trim"),s=(t("mout/object/keys"),t("../ui").modal),l=t("../ui").toastr,c=t("agent"),u=t("../utils/get-ajax-suffix"),d=t("../utils/get-ajax-url").parse,h=t("../utils/get-ajax-url").global,p=t("../fields/submit"),f=t("../utils/flags-state"),m=t("../utils/translate"),g=t("./cards");r(function(){var t=n("body"),e=d(h("confirmdeletion")+u());g.init(),t.delegate("click",'#positions [data-g-config], [data-g-create="position"]',function(i,a){var r=a.data("g-config"),o=a.data("g-config-href"),p=window.btoa(o),m=(a.data("g-config-method")||"post").toLowerCase();if(i&&i.preventDefault&&i.preventDefault(),"delete"==r&&!f.get("free:to:delete:"+p,!1))return f.warning({url:e,data:{page_type:"POSITION"},callback:function(e,i){var r=i.find("[data-g-delete-confirm]"),o=i.find("[data-g-delete-cancel]");r&&(r.on("click",function(e){if(e.preventDefault(),this.attribute("disabled"))return!1;f.get("free:to:delete:"+p,!0),n([r,o]).attribute("disabled"),t.emit("click",{target:a}),s.close()}),o.on("click",function(t){if(t.preventDefault(),this.attribute("disabled"))return!1;n([r,o]).attribute("disabled"),f.get("free:to:delete:"+p,!1),s.close()}))}}),!1;a.hideIndicator(),a.showIndicator(),c(m,d(o+u()),{},function(e,i){if(i.body.success){var r=i.body.position,o=n('[href="'+h("positions")+'"]');o?t.emit("click",{target:o}):window.location=window.location,l.success(i.body.html||"Action successfully completed.",i.body.title||""),r&&(t.positionDeleted=r)}else s.open({content:i.body.html||i.body,afterOpen:function(t){i.body.html||t.style({width:"90%"})}});a.hideIndicator()})}),t.delegate("click","#positions .position-add",function(e,i){e.preventDefault();s.open({content:m("GANTRY5_PLATFORM_JS_LOADING"),method:"get",overlayClickToClose:!1,remote:d(i.attribute("href")+u()),remoteLoaded:function(e,i){if(e.body.success){var r=i.elements.content.find("form"),l=a("div").html(e.body.html).find("form"),c=i.elements.content.search('input[type="submit"], button[type="submit"], [data-apply-and-save]'),u=i.elements.content.find(".search input"),d=i.elements.content.search("[data-mm-type]"),h=i.elements.content.search("[data-mm-filter]"),p=i.elements.content.find(".g-urltemplate");p&&t.emit("input",{target:p});var f=i.elements.content.find("[data-title-editable]");return f&&f.on("title-edit-end",function(t,e){if(!(t=o(t)))return t=o(e)||"Title",this.text(t).data("title-editable",t),!0}),u&&h&&d&&u.on("input",function(){if(this.value()){d.addClass("hidden");var t,e=[],i=this.value().toLowerCase();h.forEach(function(a){a=n(a),(t=o(a.data("mm-filter")).toLowerCase()).match(new RegExp("^"+i+"|\\s"+i,"gi"))&&e.push(a.matches("[data-mm-type]")?a:a.parent("[data-mm-type]"))},this),e.length&&n(e).removeClass("hidden")}else d.removeClass("hidden")}),u&&setTimeout(function(){u[0].focus()},5),!r&&!l||!c||void 0}s.enableCloseByOverlay()}})}),t.delegate("click","#positions .item-settings",function(e,i){e.preventDefault();var r={},f=i.parent("[data-pm-data]"),v=JSON.parse(i.parent("[data-g5-position]").data("g5-position"));r.position=v.name,r.item=f.data("pm-data"),s.open({content:m("GANTRY5_PLATFORM_JS_LOADING"),method:"post",data:r,overlayClickToClose:!1,remote:d(h("positions/edit/"+f.data("pm-blocktype"))+u()),remoteLoaded:function(e,r){if(e.body.success){var h=r.elements.content.find("form"),f=a("div").html(e.body.html).find("form"),v=r.elements.content.search('input[type="submit"], button[type="submit"], [data-apply-and-save]'),b=r.elements.content.find("[data-title-editable]");if(b&&b.on("title-edit-end",function(t,e){if(!(t=o(t)))return t=o(e)||"Title",this.text(t).data("title-editable",t),!0}),!h&&!f||!v)return!0;v.on("click",function(e){e.preventDefault(),f=r.elements.content.find("form");var o=n(e.currentTarget);o.disabled(!0),o.hideIndicator(),o.showIndicator();var h=p(f[0].elements,r.elements.content);if(h.invalid.length)return o.disabled(!1),o.hideIndicator(),o.showIndicator("fa fa-fw fa-exclamation-triangle"),void l.error(m("GANTRY5_PLATFORM_JS_REVIEW_FIELDS"),m("GANTRY5_PLATFORM_JS_INVALID_FIELDS"));c(f.attribute("method"),d(f.attribute("action")+u()),h.valid.join("&"),function(e,r){if(r.body.success){var c=i.parent("[data-pm-data]");if(c){c.data("pm-data",JSON.stringify(r.body.item));var u=r.body.item.enabled||r.body.item.options.attributes.enabled,d=a("div").html(r.body.html);c.html(d.firstChild().html()),c["0"==u?"addClass":"removeClass"]("g-menu-item-disabled")}if(null!==o.data("apply-and-save")){var h=n("body").find(".button-save");h&&t.emit("click",{target:h})}g.serialize(i.parent("[data-g5-position]")),g.updatePendingChanges(),s.close(),l.success(m("GANTRY5_PLATFORM_JS_POSITIONS_SETTINGS_APPLIED"),m("GANTRY5_PLATFORM_JS_SETTINGS_APPLIED"))}else s.open({content:r.body.html||r.body,afterOpen:function(t){r.body.html||t.style({width:"90%"})}});o.hideIndicator()})})}else s.enableCloseByOverlay()}})});var i=function(t,e,i){if(this.style("text-overflow","ellipsis"),!i&&t!=e){var n=this,l=n.data("g-config-href"),h=n.data("title-editable-type"),p=(n.data("g-config-method")||"post").toLowerCase(),f=n.parent("[id]");f.showIndicator(),f.find("[data-title-edit]").addClass("disabled");var m="title"===h?{title:o(t)}:{key:o(t)};m.data=f.find("[data-g5-position]").data("g5-position"),c(p,d(l+u()),m,function(t,i){if(i.body.success){var o=a("div").html(i.body.position);f.html(o.find("[id]").html());var l=f.search("[data-title-editable]");r(l)}else s.open({content:i.body.html||i.body,afterOpen:function(t){i.body.html||t.style({width:"90%"})}}),n.data("title-editable",e).text(e);f.hideIndicator(),f.find("[data-title-edit]").removeClass("disabled")})}},r=function(t){t&&t.length&&t.forEach(function(t){(t=n(t)).confWasAttached=!0,t.on("title-edit-start",function(){t.style("text-overflow","inherit")}),t.on("title-edit-end",i)})};t.delegate("change",'[data-g5-positions-assignments] input[type="hidden"]',function(t,e){var i=e.parent(".card").find(".settings-param-wrapper");i[1==e.value()?"addClass":"removeClass"]("hide"),i.search('input[type="hidden"]').forEach(function(t){(t=n(t)).value(0).disabled(!0)})}),t.on("statechangeAfter",function(t,e){var i=n("#positions [data-title-editable]");if(!i)return!0;i=i.filter(function(t){return void 0===n(t).confWasAttached}),r(i)}),r(n("#positions [data-title-editable]"))}),e.exports={}},{"../fields/submit":8,"../ui":53,"../utils/flags-state":68,"../utils/get-ajax-suffix":69,"../utils/get-ajax-url":70,"../utils/translate":77,"./cards":46,agent:79,elements:112,"elements/domready":110,"elements/zen":136,"mout/object/keys":235,"mout/string/trim":271}],48:[function(t,e,i){"use strict";var n=t("elements/domready"),a=t("elements/attributes"),r=t("../ui").modal,o=t("mout/array/contains"),s=t("mout/collection/forEach");t("../ui/popover");navigator.userAgent.toLowerCase().indexOf("firefox");n(function(){var t=a("body");t.delegate("click","[data-g-styles]",function(e,i){var n=a(e.target);if(e&&e.preventDefault&&e.preventDefault(),n.hasClass("swatch-preview")||n.parent(".swatch-preview"))return!0;var r,l,c,u,d=JSON.parse(i.data("g-styles"));s(d,function(e,i){r=a('[name="'+i+'"]'),l=!!r&&r.value(),r&&l!==e&&(u={target:r,forceOverride:!0},c="select"==r.tag()||o(["hidden","checkbox"],r.type())?"change":"input",r.value(e),t.emit(c,u),t.emit("keyup",u))})}),t.delegate("click","[data-g-styles] .swatch-preview",function(t,e){var i=e.parent("[data-g-styles]").find("img");if(!i)return!1;r.open({content:i[0].outerHTML,afterOpen:function(t){var e=parseInt(t.compute("padding-left"),10)+parseInt(t.compute("padding-right"),10);t.style({maxWidth:"80%",width:e+(i[0].naturalWidth||i[0].width)})}})})}),e.exports={}},{"../ui":53,"../ui/popover":55,"elements/attributes":107,"elements/domready":110,"mout/array/contains":165,"mout/collection/forEach":188}],49:[function(t,e,i){"use strict";var n=t("elements/domready"),a=t("mout/string/trim"),r=t("mout/object/forOwn"),o=t("elements"),s=t("../utils/cookie");n(function(){var t,e,i,n=o("body");n.delegate("click","[data-g-collapse]",function(n,a){if(a=n.element||a,t=JSON.parse(a.data("g-collapse")),e=o(n.target),i=(!1!==t.store?s.read("g5-collapsed"):i)||{},t.handle||(t.handle=a.find(".g-collapse")),!e.matches(t.handle)&&!e.parent(t.handle))return!1;void 0===i[t.id]&&(i[t.id]=t.collapsed,!1!==t.store&&s.write("g5-collapsed",i));var r=i[t.id],l=t.target?a.find(t.target):a,c=l.parent(".card")||l;c&&c.hasClass("g-collapsed")&&(c.removeClass("g-collapsed"),a.removeClass("g-collapsed-main"));var u=function(e){(r="number"!=typeof e?e:r)||(c.addClass("g-collapsed"),a.addClass("g-collapsed-main"),a.attribute("style",null)),t.handle.data("title",r?t.collapse:t.expand).data("tip",r?t.collapse:t.expand),i[t.id]=!r,t.collapsed=!r;var n=JSON.parse(a.data("g-collapse"));n.collapsed=!r,a.data("g-collapse",JSON.stringify(n)),!1!==t.store&&s.write("g5-collapsed",i)};a.gFastCollapse?(l[r?"removeClass":"addClass"]("g-collapsed"),a[r?"removeClass":"addClass"]("g-collapsed-main"),u(r)):(a.removeClass("g-collapsed-main"),l.removeClass("g-collapsed")[r?"removeClass":"addClass"]("g-collapsed"),u(r)),a.gFastCollapse=!1}),n.delegate("click","[data-g-collapse-all]",function(t,e){var n,a,r,l,c,u="true"===e.data("g-collapse-all"),d=e.parent(".g-filter-actions").nextSibling().search("[data-g-collapse]"),h=s.read("g5-collapsed")||{};d&&d.forEach(function(t){t=o(t),l=t.parent(".card"),c=l.find("> .g-collapsed"),a=JSON.parse(t.data("g-collapse")),r=a.handle?t.find(a.handle):t.find(".g-collapse"),n=a.target?t.find(a.target):t,r.data("title",u?a.expand:a.collapse).data("tip",u?a.expand:a.collapse),(i=(!1!==a.store?h:i)||{})[a.id]=u,!1!==a.store&&s.write("g5-collapsed",i),n.attribute("style",null),t[u?"addClass":"removeClass"]("g-collapsed-main"),l[u?"addClass":"removeClass"]("g-collapsed"),c&&c[u?"addClass":"removeClass"]("g-collapsed")})}),n.delegate("input","[data-g-collapse-filter]",function(t,e){var i=JSON.parse(e.data("g-collapse-filter")||"{}"),n=e.parent(".g-filter-actions").nextSibling().search(i.element||".card"),r=e.value();n&&(r||n.attribute("style",null),n.forEach(function(t,e){t=o(t),a(t.find(i.title||"h4 .g-title").text()).match(new RegExp("^"+r+"|\\s"+r,"gi"))?t.attribute("style",null):t.style("display","none")}))})}),e.exports=function(){var t=s.read("g5-collapsed")||{};if(!o("[data-g-collapse]"))return!1;var e,i,n,a,l;r(t,function(t,r){(e=o('[data-g-collapse-id="'+r+'"]'))&&(i=JSON.parse(e.data("g-collapse")),n=i.handle?e.find(i.handle):e.find(".g-collapse"),a=i.target?e.find(i.target):e,l=e.parent(".card")||a,n.data("title",t?i.expand:i.collapse).data("tip",t?i.expand:i.collapse),a.attribute("style",null),l[t?"addClass":"removeClass"]("g-collapsed"),e[t?"addClass":"removeClass"]("g-collapsed-main"))})}},{"../utils/cookie":63,elements:112,"elements/domready":110,"mout/object/forOwn":231,"mout/string/trim":271}],50:[function(t,e,i){"use strict";var n=t("prime"),a=t("prime/emitter"),r=t("prime-util/prime/bound"),o=t("prime-util/prime/options"),s=t("mout/function/bind"),l=(t("mout/array/contains"),t("./drag.events")),c=t("../utils/elements.utils");t("elements/events"),t("elements/delegation");var u="Microsoft Internet Explorer"===navigator.appName,d=new n({mixin:[r,o],inherits:a,options:{delegate:null,droppables:!1,catchClick:!1},DRAG_EVENTS:l,constructor:function(t,e){this.container=c(t),this.container&&(this.setOptions(e),this.element=null,this.origin={x:0,y:0,transform:null,offset:{x:0,y:0}},this.matched=!1,this.lastMatched=!1,this.lastOvered=null,this.attach())},attach:function(){this.DRAG_EVENTS.EVENTS.START.forEach(s(function(t){this.container.delegate(t,this.options.delegate,this.bound("start"))},this))},detach:function(){this.DRAG_EVENTS.EVENTS.START.forEach(s(function(t){this.container.undelegate(t,this.options.delegate,this.bound("start"))},this))},start:function(t,e){clearTimeout(this.scrollInterval),e.LMTooltip&&e.LMTooltip.remove(),c("html").attribute("style","height: 100% !important"),this.scrollHeight=document.body.scrollHeight;var i=c(t.target);if(!e.parent("[data-lm-root]")&&e.hasClass("g-block")&&!i.matches(".submenu-reorder")&&!i.parent(".submenu-reorder"))return!0;if(t.which&&1!==t.which||c(t.target).matches(this.options.exclude))return!0;this.element=c(e),this.original=this.element,this.matched=!1,this.options.catchClick&&(this.moved=!1),(i.matches(".submenu-reorder")||i.parent(".submenu-reorder"))&&(this.element=i.parent("[data-mm-id]")),this.emit("dragdrop:beforestart",t,this.element),u&&this.element.style({"-ms-touch-action":"none","touch-action":"none"}),t.preventDefault(),this.origin={x:t.changedTouches?t.changedTouches[0].pageX:t.pageX,y:t.changedTouches?t.changedTouches[0].pageY:t.pageY,transform:this.element.compute("transform")};var n=this.element[0].getBoundingClientRect();if(this.origin.offset={clientRect:n,scroll:{x:window.scrollX,y:window.scrollY},x:this.origin.x-n.right,y:n.top-this.origin.y},"grid"===this.element.data("lm-blocktype")&&Math.abs(this.origin.offset.x)<n.width)return!1;var a=Math.abs(this.origin.offset.x),r="grid"===this.element.parent().data("lm-blocktype")&&this.element.parent().parent().data("lm-root")||"container"==this.element.parent().parent().data("lm-blocktype")&&(this.element.parent().parent().parent().data("lm-root")||"wrapper"==this.element.parent().parent().parent().data("lm-blocktype"));return("grid"==this.element.data("lm-blocktype")&&"container"===this.element.parent().data("lm-blocktype")&&this.element.parent().parent().parent().data("lm-root")||"section"===this.element.parent().data("lm-blocktype")&&this.element.parent().parent().parent().data("lm-root"))&&(r=!1),a<6&&this.element.parent().find(":last-child")!==this.element||r&&a>3&&a<10?!this.element.parent('[data-lm-blocktype="atoms"]')&&(this.emit("dragdrop:resize",t,this.element,(this.element.parent("[data-mm-id]")||this.element).siblings(":not(.placeholder)"),this.origin.offset.x),!1):!(!r&&(!e.hasClass("submenu-column")||i.matches(".submenu-reorder")||i.parent(".submenu-reorder")))||(this.element.style({"pointer-events":"none",zIndex:100}),this.DRAG_EVENTS.EVENTS.MOVE.forEach(s(function(t){c("body").on(t,this.bound("move"))},this)),this.DRAG_EVENTS.EVENTS.STOP.forEach(s(function(t){c("body").on(t,this.bound("deferStop"))},this)),this.emit("dragdrop:start",t,this.element),this.element)},deferStop:function(t){var e=this;setTimeout(function(){e.stop(t)},0)},stop:function(t){if(clearTimeout(this.scrollInterval),c("html").attribute("style",null),!this.moved&&this.options.catchClick)return this.element.style({transform:this.origin.transform||"translate(0, 0)"}),this.emit("dragdrop:stop",t,this.matched,this.element),this._removeStyleAttribute(this.element),this.emit("dragdrop:stop:animation",this.element),this.emit("dragdrop:click",t,this.element),this.DRAG_EVENTS.EVENTS.MOVE.forEach(s(function(t){c("body").off(t,this.bound("move"))},this)),this.DRAG_EVENTS.EVENTS.STOP.forEach(s(function(t){c("body").off(t,this.bound("deferStop"))},this)),void(this.element=null);var e={duration:"250ms"};if(this.removeElement)return this.DRAG_EVENTS.EVENTS.MOVE.forEach(s(function(t){c("body").off(t,this.bound("move"))},this)),this.DRAG_EVENTS.EVENTS.STOP.forEach(s(function(t){c("body").off(t,this.bound("deferStop"))},this)),this.emit("dragdrop:stop:erase",t,this.element);this.element&&(this.emit("dragdrop:stop",t,this.matched,this.element),this.matched&&this.element.style({opacity:0,transform:"translate(0, 0)"}).removeClass("active"),this.matched?(this.element.style({transform:this.origin.transform||"translate(0, 0)",opacity:1}),this._removeStyleAttribute(this.element),this.emit("dragdrop:stop:animation",this.element)):(e.callback=s(function(t){this._removeStyleAttribute(t),setTimeout(s(function(){this.emit("dragdrop:stop:animation",t)},this),1)},this,this.element),this.element.animate({transform:this.origin.transform||"translate(0, 0)",opacity:1},e))),this.DRAG_EVENTS.EVENTS.MOVE.forEach(s(function(t){c("body").off(t,this.bound("move"))},this)),this.DRAG_EVENTS.EVENTS.STOP.forEach(s(function(t){c("body").off(t,this.bound("deferStop"))},this)),this.element=null},move:function(t){if(this.options.catchClick){var e={x:t.changedTouches?t.changedTouches[0].pageX:t.pageX,y:t.changedTouches?t.changedTouches[0].pageY:t.pageY};if(Math.abs(e.x-this.origin.x)<=3&&Math.abs(e.y-this.origin.y)<=3)return;this.moved||(this.element.style({opacity:.5}),this.emit("dragdrop:move:once",this.element)),this.moved=!0}var i=t.clientX||t.touches&&t.touches[0].clientX||0,n=t.clientY||t.touches&&t.touches[0].clientY||0,a=document.elementFromPoint(i,n),r="grid"===this.element.data("lm-blocktype"),o=this.scrollHeight,s=document.body.clientHeight,l=window.pageYOffset;if(clearTimeout(this.scrollInterval),a){if(!c(a).matches("#trash")&&!c(a).parent("#trash")){var u,d,h=c("#g5-container #trash");n+50>=s&&l+s<o?this.scrollInterval=setInterval(function(){d=(window.pageXOffset||document.documentElement.scrollLeft)-(document.documentElement.clientLeft||0),u=(window.pageYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0),window.scrollTo(d,Math.min(o,u+4))},8):n-50<=(h?h[0].offsetHeight:0)&&o>0&&(this.scrollInterval=setInterval(function(){d=(window.pageXOffset||document.documentElement.scrollLeft)-(document.documentElement.clientLeft||0),u=(window.pageYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0),window.scrollTo(d,Math.max(0,u-4))},8))}if(r&&(a=document.elementFromPoint(i+30,n)),!a)return!1;this.matched=c(a).matches(this.options.droppables)?a:(c(a).parent(this.options.droppables)||[!1])[0],this.isPlaceHolder=!!c(a).matches("[data-lm-placeholder]")||!!c(a).parent("[data-lm-placeholder]");var p=this.lastX-i,f=this.lastY-n,m=Math.abs(p)>Math.abs(f)&&p>0&&"left"||Math.abs(p)>Math.abs(f)&&p<0&&"right"||Math.abs(f)>Math.abs(p)&&f>0&&"up"||"down";if(p=(t.changedTouches?t.changedTouches[0].pageX:t.pageX)-this.origin.x,f=(t.changedTouches?t.changedTouches[0].pageY:t.pageY)-this.origin.y,this.element.parent(".particles-container")&&(f+=this.origin.offset.scroll.y-window.scrollY),this.direction=m,this.element.style({transform:"translate("+p+"px, "+f+"px)"}),!this.isPlaceHolder)if(this.lastMatched&&this.matched!==this.lastMatched&&(this.emit("dragdrop:leave",t,this.lastMatched,this.element),this.lastMatched=!1),this.matched&&this.matched!==this.lastMatched&&a!==this.lastOvered&&(this.emit("dragdrop:enter",t,this.matched,this.element),this.lastMatched=this.matched),this.matched&&this.lastMatched){var g=this.matched.getBoundingClientRect(),v={x:Math.abs(i-g.left)<g.width/2&&"before"||Math.abs(i-g.left)>=g.width-g.width/2&&"after"||"other",y:Math.abs(n-g.top)<g.height/2&&"above"||Math.abs(n-g.top)>=g.height/2&&"below"||"other"};this.emit("dragdrop:location",t,v,this.matched,this.element)}else this.emit("dragdrop:nolocation",t);this.lastOvered=a,this.lastX=i,this.lastY=n,this.emit("dragdrop:move",t,this.element)}},_removeStyleAttribute:function(t){(t=c(t||this.element)).data("mm-id")||t.attribute("style",null)}});e.exports=d},{"../utils/elements.utils":65,"./drag.events":51,"elements/delegation":109,"elements/events":111,"mout/array/contains":165,"mout/function/bind":191,prime:300,"prime-util/prime/bound":296,"prime-util/prime/options":297,"prime/emitter":299}],51:[function(t,e,i){"use strict";var n=function(t){t=t.split(" ");for(var e,i=document.createElement("div"),n=!1,a=t.length-1;a>=0;a--)if(e="on"+t[a],(n=e in i)||(i.setAttribute(e,"return;"),n="function"==typeof i[e]),n){n=t[a];break}return i=null,n},a=function(t){for(var e=!1,i=[],a=(t=t.split(" ")).length-1;a>=0;a--)(e=n(t[a]))&&i.push(e);return i},r={START:n("mousedown touchstart MSPointerDown pointerdown"),MOVE:n("mousemove touchmove MSPointerMove pointermove"),STOP:n("mouseup touchend MSPointerUp pointerup")},o={START:a("mousedown touchstart MSPointerDown pointerdown"),MOVE:a("mousemove touchmove MSPointerMove pointermove"),STOP:a("mouseup touchend MSPointerUp pointerup")};e.exports={EVENT:r,EVENTS:o}},{}],52:[function(t,e,i){"use strict";var n=t("prime"),a=t("../utils/elements.utils"),r=t("prime/emitter"),o=t("prime-util/prime/bound"),s=new n({mixin:[t("prime-util/prime/options"),o],inherits:r,constructor:function(t,e){this.setOptions(e),this.element=a(t),this.element&&this.hide(!0)},setTop:function(){void 0===this.top&&(this.top=parseInt(this.element.compute("top"),10),this.left=a("#g5-container")[0].getBoundingClientRect().left,"grav"==GANTRY_PLATFORM&&(this.left=0))},show:function(t){this.element&&(this.setTop(),this.out(),this.element[t?"style":"animate"]({top:this.top,left:this.left},{duration:"150ms"}))},hide:function(t){if(this.element){this.setTop(),this.element.style("display","block");var e={top:-this.element[0].offsetHeight};this.out(),this.element[t?"style":"animate"](e,{duration:"150ms"})}},over:function(){this.element.find(".trash-zone").animate({transform:"scale(1.2)"},{duration:"150ms",equation:"cubic-bezier(0.5,0,0.5,1)"})},out:function(){this.element.find(".trash-zone").animate({transform:"scale(1)"},{duration:"150ms",equation:"cubic-bezier(0.5,0,0.5,1)"})}});e.exports=s},{"../utils/elements.utils":65,prime:300,"prime-util/prime/bound":296,"prime-util/prime/options":297,"prime/emitter":299}],53:[function(t,e,i){"use strict";var n=t("./selectize");e.exports={modal:t("./modal"),togglers:t("./togglers"),collapse:t("./collapse"),selectize:n,toastr:t("./toastr")}},{"./collapse":49,"./modal":54,"./selectize":57,"./toastr":58,"./togglers":59}],54:[function(t,e,i){"use strict";var n=t("prime"),a=t("../utils/elements.utils"),r=t("elements/zen"),o=t("prime/map")(),s=t("prime/emitter"),l=t("prime-util/prime/bound"),c=t("prime-util/prime/options"),u=t("elements/domready"),d=t("mout/function/bind"),h=t("mout/array/map"),p=t("mout/array/forEach"),f=t("mout/array/last"),m=t("mout/object/merge"),g=(t("mout/string/trim"),t("agent")),v=!1,b=new n({mixin:[l,c],inherits:s,animationEndEvent:["animationend","webkitAnimationEnd","mozAnimationEnd","MSAnimationEnd","oanimationend"],globalID:1,options:{baseClassNames:{container:"g5-dialog",content:"g5-content",overlay:"g5-overlay",close:"g5-close",closing:"g5-closing",open:"g5-dialog-open"},content:"",remote:"",showCloseButton:!0,escapeToClose:!0,overlayClickToClose:!0,appendNode:"#g5-container",className:"g5-dialog-theme-default",css:{},overlayClassName:"",overlayCSS:"",contentClassName:"",contentCSS:"",closeClassName:"g5-dialog-close",closeCSS:"",afterOpen:null,afterClose:null},constructor:function(t){this.setOptions(t),this.defaults=this.options;var e=this;u(function(){a(window).on("keydown",function(t){if(27===t.keyCode)return e.closeByEscape()}),e.animationEndEvent=v}),this.on("dialogOpen",function(t){a("body").addClass(t.baseClassNames.open),a("html").addClass(t.baseClassNames.open)}).on("dialogAfterClose",d(function(t){var e=this.getAll();e&&e.length||(a("body").removeClass(t.baseClassNames.open),a("html").removeClass(t.baseClassNames.open))},this))},storage:function(){return o},open:function(t){(t=m(this.options,t)).id=this.globalID++;var e={};if(e.container=r("div").addClass(t.baseClassNames.container).addClass(t.className).style(t.css).attribute("tabindex","0").attribute("role","dialog").attribute("aria-hidden","true").attribute("aria-labelledby","g-modal-labelledby").attribute("aria-describedby","g-modal-describedby"),o.set(e.container,{dialog:t}),e.overlay=r("div").addClass(t.baseClassNames.overlay).addClass(t.overlayClassName).style(t.overlayCSS),o.set(e.overlay,{dialog:t}),t.overlayClickToClose&&(e.container.on("click",d(this._overlayClick,this,e.container[0])),e.overlay.on("click",d(this._overlayClick,this,e.overlay[0]))),e.container.appendChild(e.overlay),e.content=r("div").addClass(t.baseClassNames.content).addClass(t.contentClassName).style(t.contentCSS).attribute("aria-live","assertive").attribute("tabindex","0").html(t.content),o.set(e.content,{dialog:t}),e.container.appendChild(e.content),t.overlayClickToClose&&e.content.on("click",function(){return!0}),t.remote&&t.remote.length>1){this.showLoading(),t.method=t.method||"get";var i=g();i.method(t.method),i.url(t.remote),t.data&&i.data(t.data),i.send(d(function(i,n){if(e.container.hasClass(t.baseClassNames.closing))this.hideLoading();else{e.content.html(n.body.html||n.body),n.body.success||n.body.html||e.content.style({width:"90%"}),this.hideLoading(),t.remoteLoaded&&!e.container.hasClass(t.baseClassNames.closing)&&t.remoteLoaded(n,t),e.container.attribute("aria-hidden","false"),setTimeout(function(){e.content[0].focus()},0);var r=a("[data-selectize]");r&&r.selectize()}},this))}else e.container.attribute("aria-hidden","false"),setTimeout(function(){e.content[0].focus()},0);t.showCloseButton&&(e.closeButton=r("div").addClass(t.baseClassNames.close).addClass(t.closeClassName).attribute("role","button").attribute("aria-label","Close").style(t.closeCSS),o.set(e.closeButton,{dialog:t}),e.content.appendChild(e.closeButton)),e.container.delegate("click",".g5-dialog-close",d(function(t){t.preventDefault(),this._closeButtonClick(e.container)},this));var n=a(t.appendNode);if("wordpress"==GANTRY_PLATFORM&&"#"+(n=a("#customize-preview")||a("#widgets-right")||a(t.appendNode)).id()!=t.appendNode){var s=a("#wpwrap")||a(".wp-customizer");n="wpwrap"==s.id()?s.nextSibling(t.appendNode)||r("div.g5wp-out-of-scope"+t.appendNode).after(s):s.find("> "+t.appendNode)||r("div.g5wp-out-of-scope"+t.appendNode).top(s)}return n.appendChild(e.container),t.elements=e,t.afterOpen&&t.afterOpen(e.content,t),setTimeout(d(function(){return this.emit("dialogOpen",t)},this),0),e.content},getAll:function(){var t=this.options;return a("."+t.baseClassNames.container+":not(."+t.baseClassNames.closing+") ."+t.baseClassNames.content)},getByID:function(t){var e=this.getAll();return e?a(e.filter(function(e){return e=a(e),o.get(e).dialog.id===t})):[]},getLast:function(){var t;return!!(t=h(this.getAll(),function(t){return t=a(t),o.get(t).dialog.id})).length&&Math.max.apply(Math,t)},close:function(t){if(!t){var e=a(f(this.getAll()));if(!e)return!1;t=o.get(e).dialog.id}return this.closeByID(t)},closeAll:function(){var t;return!!(t=h(this.getAll(),function(t){return t=a(t),o.get(t).dialog.id})).length&&(p(t.reverse(),function(t){return this.closeByID(t)},this),!0)},closeByID:function(t){var e=this.getByID(t);if(!e||!e.length)return!1;var i,n;i=o.get(e).dialog.elements.container,n=m({},o.get(e).dialog);var a=function(){if(n.beforeClose)return n.beforeClose(e,n)},r=d(function(){if(n.remoteLoaded&&(n.remoteLoaded=function(){}),e.emit("dialogClose",n),i.remove(),this.emit("dialogAfterClose",n),n.afterClose)return n.afterClose(e,n)},this);return v?(a(),i.off(this.animationEndEvent).on(this.animationEndEvent,function(){return r()}).addClass(n.baseClassNames.closing)):(a(),r()),!0},closeByEscape:function(){var t=this.getLast();if(!1===t)return!1;var e=this.getByID(t);return!!o.get(e).dialog.escapeToClose&&this.closeByID(t)},enableCloseByOverlay:function(){var t=this.getLast();if(!1===t)return!1;var e=o.get(this.getByID(t)).dialog.elements;e.container.on("click",d(this._overlayClick,this,e.container[0])),e.overlay.on("click",d(this._overlayClick,this,e.overlay[0])),e.content.on("click",function(){return!0})},showLoading:function(){return this.hideLoading(),a("#g5-container").appendChild(r("div.g5-dialog-loading-spinner."+this.options.className))},hideLoading:function(){var t=a(".g5-dialog-loading-spinner");return!!t&&t.remove()},_overlayClick:function(t,e){if(e.target===t)return this.close(o.get(a(t)).dialog.id)},_closeButtonClick:function(t){return this.close(o.get(a(t)).dialog.id)}});u(function(){var t=(document.body||document.documentElement).style;p(["animation","WebkitAnimation","MozAnimation","MsAnimation","OAnimation"],function(e,i){v||(v=void 0!==t[e]&&b.prototype.animationEndEvent[i])})});var y=new b;e.exports=y},{"../utils/elements.utils":65,agent:79,"elements/domready":110,"elements/zen":136,"mout/array/forEach":173,"mout/array/last":178,"mout/array/map":179,"mout/function/bind":191,"mout/object/merge":236,"mout/string/trim":271,prime:300,"prime-util/prime/bound":296,"prime-util/prime/options":297,"prime/emitter":299,"prime/map":301}],55:[function(t,e,i){"use strict";var n=t("prime"),a=t("../utils/elements.utils"),r=t("elements/zen"),o=t("prime/map")(),s=t("prime/emitter"),l=t("prime-util/prime/bound"),c=t("prime-util/prime/options"),u=(t("elements/domready"),t("mout/function/bind")),d=(t("mout/array/map"),t("mout/array/forEach"),t("mout/array/last"),t("mout/object/merge"),t("mout/lang/isFunction")),h=t("agent"),p=new n({mixin:[l,c],inherits:s,options:{mainClass:"g5-popover",placement:"auto",width:"auto",height:"auto",trigger:"click",style:"",delay:300,cache:!0,multi:!1,arrow:!0,title:"",content:"",closeable:!1,padding:!0,targetEvents:!0,allowElementsClick:!1,url:"",type:"html",where:"#g5-container",template:'<div class="g5-popover"><div class="g-arrow"></div><div class="g5-popover-inner"><a href="#" class="close">x</a><h3 class="g5-popover-title"></h3><div class="g5-popover-content"><i class="icon-refresh"></i> <p>&nbsp;</p></div></div></div>'},constructor:function(t,e){this.setOptions(e),this.element=a(t),"click"===this.options.trigger?this.element.off("click",this.bound("toggle")).on("click",this.bound("toggle")):this.element.off("mouseenter",this.bound("mouseenterHandler")).off("mouseleave",this.bound("mouseleaveHandler")).on("mouseenter",this.bound("mouseenterHandler")).on("mouseleave",this.bound("mouseleaveHandler")),this._poped=!1},destroy:function(){this.hide(),o.set(this.element[0],null),this.element.off("click",this.bound("toggle")).off("mouseenter",this.bound("mouseenterHandler")).off("mouseleave",this.bound("mouseleaveHandler")),this.$target&&this.$target.remove()},hide:function(t){t&&(t.preventDefault(),t.stopPropagation()),this.element.emit("hide.popover",this),this.$target&&(this.$target.removeClass("in").style({display:"none"}),this.$target.remove()),this.element.emit("hidden.popover",this),this._focusAttached&&(a("body").off("focus",this.bound("focus"),!0),this._focusAttached=!1,this.restoreFocus())},toggle:function(t){t&&(t.preventDefault(),t.stopPropagation()),this[this.getTarget().hasClass("in")?"hide":"show"]()},focus:function(t){if(this.getTarget().hasClass("in")){var e=a(t.target||t);this.$target[0]===e[0]||e.parent(this.$target)||this.element[0]===e[0]||e.parent(this.element)||(this.hide(),this._focusAttached&&this.restoreFocus())}},restoreFocus:function(t){var e=(t=a(t||this.element)).tag();setTimeout(function(){if("a"!=e&&"input"!=e&&"button"!=e){var i=t.find("a, button, input");i&&i[0].focus()}else t[0].focus()},0)},hideAll:function(t){var e="";e=t?"div."+this.options.mainClass:"div."+this.options.mainClass+":not(."+this.options.mainClass+"-fixed)";var i=a(e);return i?(i.removeClass("in").style({display:"none"}).attribute("tabindex","-1"),!t&&this._focusAttached&&this.restoreFocus(),this._focusAttached&&(a("body").off("focus",this.bound("focus"),!0),this._focusAttached=!1),this):this},show:function(){var t=this.getTarget().attribute("class",null).addClass(this.options.mainClass).attribute("tabindex","0");if(this.options.multi||this.hideAll(),this.element.emit("beforeshow.popover",this),!this.options.cache||!this._poped){if(this.setTitle(this.getTitle()),this.options.closeable||t.find(".close").off("click").remove(),this.isAsync())return this.setContentASync(this.options.content),void this.displayContent();this.setContent(this.getContent()),t.style({display:"block"})}this.displayContent(),this.bindBodyEvents(),setTimeout(function(){t[0].focus()},0),this._focusAttached||(a("body").on("focus",this.bound("focus"),!0),this._focusAttached=!0)},displayContent:function(){var t,e,i,n=this.element.position(),o=this.getTarget().attribute("class",null).addClass(this.options.mainClass),s=this.getContentElement();this.element.emit("show.popover",this),"auto"!==this.options.width&&o.style({width:this.options.width}),"auto"!==this.options.height&&s.style({height:this.options.height}),!this.options.arrow&&o.find(".g-arrow")&&o.find(".g-arrow").remove();var l=a(this.options.where);if("wordpress"==GANTRY_PLATFORM&&"#"+(l=a("#customize-preview")||a("#widgets-right")||a(this.options.where)).id()!=this.options.where){var c=a("#wpwrap")||a(".wp-customizer");l="wpwrap"==c.id()?c.nextSibling(this.options.where)||r("div.g5wp-out-of-scope"+this.options.where).after(c):c.find("> "+this.options.where)||r("div.g5wp-out-of-scope"+this.options.where).top(c)}o.remove().style({top:-1e3,left:-1e3,display:"block"}).bottom(l),this.options.style&&("string"==typeof this.options.style&&(this.options.style=this.options.style.split(",").map(Function.prototype.call,String.prototype.trim)),this.options.style.forEach(function(t){this.$target.addClass(this.options.mainClass+"-"+t)},this)),this.options.padding||(s.css("height",s.position().height),this.$target.addClass("g5-popover-no-padding")),t=o[0].offsetWidth,e=o[0].offsetHeight,i=this.getPlacement(n,e),this.options.targetEvents&&this.initTargetEvents();var u=this.getTargetPosition(n,i,t,e);if(this.$target.style(u.position).addClass(i).addClass("in"),"iframe"===this.options.type){var d=o.find("iframe");d.style({width:o.position().width,height:d.parent().position.height})}if(this.options.arrow||this.$target.style({margin:0}),this.options.arrow){var h=this.$target.find(".g-arrow");h.attribute("style",null),u.arrowOffset&&h.style(u.arrowOffset)}this._poped=!0,this.element[0].focus(),this.element.emit("shown.popover",this)},getTarget:function(){return this.$target||(this.$target=a(r("div").html(this.options.template).children()[0])),this.$target},getTitleElement:function(){return this.getTarget().find("."+this.options.mainClass+"-title")},getContentElement:function(){return this.getTarget().find("."+this.options.mainClass+"-content")},getTitle:function(){return this.options.title||this.element.data("g5-popover-title")||this.element.attribute("title")},setTitle:function(t){var e=this.getTitleElement();t?e.html(t):e.remove()},hasContent:function(){return this.getContent()},getContent:function(){if(this.options.url)"iframe"===this.options.type&&(this.content=a('<iframe frameborder="0"></iframe>').attribute("src",this.options.url));else if(!this.content){var t="";t=d(this.options.content)?this.options.content.apply(this.element[0],arguments):this.options.content,this.content=this.element.data("g5-popover-content")||t}return this.content},setContent:function(t){var e=this.getTarget();this.getContentElement().html(t),this.$target=e},isAsync:function(){return"async"===this.options.type},setContentASync:function(t){h("get",this.options.url,u(function(e,i){t&&d(t)?this.content=t.apply(this.element[0],[i]):this.content=i.body.html,this.setContent(this.content);var n=this.getContentElement();n.attribute("style",null),setTimeout(u(function(){n.parent("."+this.options.mainClass)[0].focus()},this),0),this.displayContent(),this.bindBodyEvents();var r=a("[data-selectize]");r&&r.selectize()},this))},bindBodyEvents:function(){var t=a("body");t.off("keyup",this.bound("escapeHandler")).on("keyup",this.bound("escapeHandler")),t.off("click",this.bound("bodyClickHandler")).on("click",this.bound("bodyClickHandler"))},mouseenterHandler:function(){this._timeout&&clearTimeout(this._timeout),this.getTarget()[0].offsetWidth>0||this.getTarget()[0].offsetHeight>0||this.show()},mouseleaveHandler:function(){this._timeout=setTimeout(u(function(){this.hide()},this),this.options.delay)},escapeHandler:function(t){27===t.keyCode&&this.hideAll()},bodyClickHandler:function(){this.hideAll()},targetClickHandler:function(t){var e=a(t.target);e.matches(this.options.allowElementsClick)&&t.preventDefault(),e.parent("[data-g-popover-follow]")||null!==e.data("g-popover-follow")||t.stopPropagation()},initTargetEvents:function(){"click"!==this.options.trigger&&this.$target.off("mouseenter",this.bound("mouseenter")).off("mouseleave",this.bound("mouseleave")).on("mouseenter",this.bound("mouseenterHandler")).on("mouseleave",this.bound("mouseleaveHandler"));var t=this.$target.find(".close");t&&t.off("click",this.bound("hide")).on("click",this.bound("hide")),this.$target.off("click",this.bound("targetClickHandler")).on("click",this.bound("targetClickHandler"))},getPlacement:function(t,e){var i,n=document.documentElement,a=document.body,r=n.clientWidth,o=n.clientHeight,s=Math.max(a.scrollTop,n.scrollTop),l=Math.max(a.scrollLeft,n.scrollLeft),c=Math.max(0,t.left-l),u=Math.max(0,t.top-s);return"auto"===(i="function"==typeof this.options.placement?this.options.placement.call(this,this.getTarget()[0],this.element[0]):this.element.data("g5-popover-placement")||this.options.placement)&&(c<r/3?i=u<o/3?"bottom-right":u<2*o/3?"right":"top-right":c<2*r/3?i=u<o/3?"bottom":u<2*o/3?"bottom":"top":(i=u>e+20?"top-left":"bottom-left",i=u<o/3?"bottom-left":u<2*o/3?"left":"top-left")),i},getTargetPosition:function(t,e,i,n){var a=t,r=this.element[0].offsetWidth,o=this.element[0].offsetHeight,s={},l=null,c=this.options.arrow?28:0,u=r<c+10?c:0,d=o<c+10?c:0;switch(e){case"bottom":s={top:a.top+a.height,left:a.left+a.width/2-i/2};break;case"top":s={top:a.top-n,left:a.left+a.width/2-i/2};break;case"left":s={top:a.top+a.height/2-n/2,left:a.left-i};break;case"right":s={top:a.top+a.height/2-n/2,left:a.left+a.width};break;case"top-right":s={top:a.top-n,left:a.left-u},l={left:r/2+u};break;case"top-left":s={top:a.top-n,left:a.left-i+a.width+u},l={left:i-r/2-u};break;case"bottom-right":s={top:a.top+a.height,left:a.left-u},l={left:r/2+u};break;case"bottom-left":s={top:a.top+a.height,left:a.left-i+a.width+u},l={left:i-r/2-u};break;case"right-top":s={top:a.top-n+a.height+d,left:a.left+a.width},l={top:n-o/2-d};break;case"right-bottom":s={top:a.top-d,left:a.left+a.width},l={top:o/2+d};break;case"left-top":s={top:a.top-n+a.height+d,left:a.left-i},l={top:n-o/2-d};break;case"left-bottom":s={top:a.top,left:a.left-i},l={top:o/2}}return{position:s,arrowOffset:l}}});a.implement({getPopover:function(t){var e=o.get(this);return e||"destroy"===t||(e=new p(this,t=t||{}),o.set(this,e),this.PopoverDefined=!0),e},popover:function(t){return this.forEach(function(e){var i=o.get(e);i||"destroy"===t||(i=new p(e,t=t||{}),o.set(e,i))})},position:function(){var t=this[0],e=a("#g5-container")[0].getBoundingClientRect(),i={left:0,right:0,top:0,bottom:0};return void 0!==t.getBoundingClientRect&&(i=t.getBoundingClientRect()),{x:i.left-e.left,left:i.left-e.left,y:i.top-e.top,top:i.top-e.top,right:i.right-e.right,bottom:i.bottom-e.bottom,width:i.right-i.left,height:i.bottom-i.top}}}),e.exports=a},{"../utils/elements.utils":65,agent:79,"elements/domready":110,"elements/zen":136,"mout/array/forEach":173,"mout/array/last":178,"mout/array/map":179,"mout/function/bind":191,"mout/lang/isFunction":204,"mout/object/merge":236,prime:300,"prime-util/prime/bound":296,"prime-util/prime/options":297,"prime/emitter":299,"prime/map":301}],56:[function(t,e,i){"use strict";var n=t("elements"),a=t("prime"),r=t("prime/emitter"),o=t("prime-util/prime/bound"),s=t("prime-util/prime/options"),l=t("elements/zen"),c=t("moofx"),u=t("mout/function/bind"),d=t("mout/lang/isArray"),h=t("mout/lang/isNumber"),p=new a({mixin:[o,s],inherits:r,options:{value:0,size:50,startAngle:-Math.PI/2,thickness:"auto",fill:{gradient:["#9e38eb","#4e68fc"]},emptyFill:"rgba(0, 0, 0, .1)",animation:{duration:1200,equation:"cubic-bezier(0.645, 0.045, 0.355, 1)"},animationStartValue:0,reverse:!1,lineCap:"butt",insertElement:null,insertLocation:"before"},constructor:function(t,e){this.setOptions(e),this.element=this.element||n(t),this.canvas=this.canvas||l("canvas")[this.options.insertLocation||"before"](this.options.insertElement||this.element)[0],this.radius=this.options.size/2,this.arcFill=null,this.lastFrameValue=0,this.canvas.width=this.options.size,this.canvas.height=this.options.size,this.ctx=this.canvas.getContext("2d"),this.initFill(),this.draw()},initFill:function(){var t=this.options.fill,e=this.options.size,i=this.ctx;if(!t)throw Error("The fill is not specified.");if(t.color&&(this.arcFill=t.color),t.gradient){var n=t.gradient;if(1==n.length)this.arcFill=n[0];else{for(var a=t.gradientAngle||0,r=t.gradientDirection||[e/2*(1-Math.cos(a)),e/2*(1+Math.sin(a)),e/2*(1+Math.cos(a)),e/2*(1-Math.sin(a))],o=i.createLinearGradient.apply(i,r),s=0;s<n.length;s++){var l=n[s],c=s/(n.length-1);d(l)&&(c=l[1],l=l[0]),o.addColorStop(c,l)}this.arcFill=o}}},draw:function(){this[this.options.animation?"drawAnimated":"drawFrame"](this.options.value)},drawFrame:function(t){this.lastFrameValue=t,this.ctx.clearRect(0,0,this.options.size,this.options.size),this.drawEmptyArc(t),this.drawArc(t)},drawArc:function(t){var e=this.ctx,i=this.radius,n=this.getThickness(),a=this.options.startAngle;e.save(),e.beginPath(),this.options.reverse?e.arc(i,i,i-n/2,a-2*Math.PI*t,a):e.arc(i,i,i-n/2,a,a+2*Math.PI*t),e.lineWidth=n,e.lineCap=this.options.lineCap,e.strokeStyle=this.arcFill,e.stroke(),e.restore()},drawEmptyArc:function(t){var e=this.ctx,i=this.radius,n=this.getThickness(),a=this.options.startAngle;t<1&&(e.save(),e.beginPath(),t<=0?e.arc(i,i,i-n/2,0,2*Math.PI):this.reverse?e.arc(i,i,i-n/2,a,a-2*Math.PI*t):e.arc(i,i,i-n/2,a+2*Math.PI*t,a),e.lineWidth=n,e.strokeStyle=this.options.emptyFill,e.stroke(),e.restore())},drawAnimated:function(t){this.element.emit("progress-animation-start"),c(u(function(e){var i=this.options.animationStartValue*(1-e)+t*e;this.drawFrame(i),this.element.emit("progress-animation-change",e,i)},this),{duration:this.options.animation.duration||"1200",equation:this.options.animation.equation||"linear",callback:u(function(){this.options.animation.callback&&this.options.animation.callback(),this.element.emit("progress-animation-end")},this)}).start(0,1)},getThickness:function(){return h(this.options.thickness)?this.options.thickness:this.options.size/14}});e.exports=p},{elements:112,"elements/zen":136,moofx:137,"mout/function/bind":191,"mout/lang/isArray":202,"mout/lang/isNumber":206,prime:300,"prime-util/prime/bound":296,"prime-util/prime/options":297,"prime/emitter":299}],57:[function(t,e,i){"use strict";var n=t("prime"),a=t("elements/domready"),r=t("elements/zen"),o=t("sifter"),s=t("prime/emitter"),l=t("prime-util/prime/bound"),c=t("prime-util/prime/options"),u=t("../utils/elements.utils"),d=(t("moofx"),t("mout/function/bind")),h=t("mout/collection/forEach"),p=t("mout/array/indexOf"),f=t("mout/array/last"),m=t("mout/function/debounce"),g=t("mout/lang/isArray"),v=t("mout/lang/isBoolean"),b=t("mout/object/merge"),y=(t("mout/object/unset"),t("mout/object/size")),w=(t("mout/object/values"),t("mout/string/escapeHtml")),x=t("mout/string/trim"),k=t("mout/string/slugify"),S=/Mac/.test(navigator.userAgent),C=(/MSIE 9/i.test(navigator.userAgent)||/MSIE 10/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent),S?91:17),T=S?18:17,E=!/android/i.test(window.navigator.userAgent)&&!!document.createElement("form").validity,O=function(t){return void 0===t||null===t?null:"boolean"==typeof t?t?"1":"0":t+""},I=function(t){return void 0!==t},_=function(t){return(t+"").replace(/\$/g,"$$$$")},A=function(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}},N=function(t,e,i){var n,a=t.emit,r={};t.emit=function(){var i=arguments[0];if(-1===e.indexOf(i))return a.apply(t,arguments);r[i]=arguments},i.apply(t,[]),t.emit=a;for(n in r)r.hasOwnProperty(n)&&a.apply(t,r[n])},j=function(t){var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML},D=function(t){var e={};if("selectionStart"in t)e.start=t.selectionStart,e.length=t.selectionEnd-e.start;else if(document.selection){t.focus();var i=document.selection.createRange(),n=document.selection.createRange().text.length;i.moveStart("character",-t.value.length),e.start=i.text.length-n,e.length=n}return e},z=function(t,e,i){var n,a,r={};if(i)for(n=0,a=i.length;n<a;n++)r[i[n]]=t.compute(i[n]);else r=t.compute();e.style(r)},F=null,R=function(t,e){if(!t)return 0;var i;return F?(i=F).text(t):(i=r("test").style({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(t).bottom("body"),z(e,i,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]),F=i),i[0].offsetWidth},L=function(t,e){if("string"!=typeof e||e.length){var i="string"==typeof e?new RegExp(e,"i"):e,n=function(t){var e=0;if(3===t.nodeType){var a=t.data.search(i);if(a>=0&&t.data.length>0){var r=t.data.match(i),o=document.createElement("span");o.className="g-highlight";var s=t.splitText(a),l=(s.splitText(r[0].length),s.cloneNode(!0));o.appendChild(l),s.parentNode.replaceChild(o,s),e=1}}else if(1===t.nodeType&&t.childNodes&&!/(script|style)/i.test(t.tagName))for(var c=0;c<t.childNodes.length;++c)c+=n(t.childNodes[c]);return e};return h(t,function(t){n(t)})}},P=function(t){var e=null,i=function(i,n){var a,r,o,s,l,c,u,d;n=n||window.event||{},i=i||{},n.metaKey||n.altKey||(i.force||!1!==t.selectizeGrow)&&(a=t.value(),n.type&&"keydown"===n.type.toLowerCase()&&(o=(r=n.keyCode)>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||32===r,46===r||8===r?(d=D(t[0])).length?a=a.substring(0,d.start)+a.substring(d.start+d.length):8===r&&d.start?a=a.substring(0,d.start-1)+a.substring(d.start+1):46===r&&void 0!==d.start&&(a=a.substring(0,d.start)+a.substring(d.start+1)):o&&(c=n.shiftKey,u=String.fromCharCode(n.keyCode),a+=u=c?u.toUpperCase():u.toLowerCase())),s=t.attribute("placeholder"),!a&&s&&(a=s),(l=R(a,t)+4)!==e&&(e=l,t[0].style.width=l+"px",t.emit("resize")))};(t=u(t)).on("keydown",i),t.on("keyup",i),t.on("update",i),t.on("blur",i),i()},M=new n({mixin:[l,c],inherits:s,options:{delimiter:" ",splitOn:null,persist:!0,diacritics:!0,create:!1,createOnBlur:!0,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,closeAfterSelect:!1,searchOnKeypress:!0,scrollDuration:60,loadThrottle:300,loadingClass:"g-loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"g-selectize-control",inputClass:"g-selectize-input",dropdownClass:"g-selectize-dropdown",dropdownContentClass:"g-selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}},constructor:function(t,e){t=u(t),this.setOptions(e);var i=window.getComputedStyle&&window.getComputedStyle(t[0],null),n=i?i.getPropertyValue("direction"):t[0].currentStyle&&t[0].currentStyle.direction;n=n||t.parents("[dir]:first").attr("dir")||"",this.rand="selectize-id-"+(Math.random()+1).toString(36).substring(5),this.input=t,this.input.selectizeInstance=this,this.order=0,this.tabIndex=t.attribute("tabindex")||"",this.tagType="select"==t.tag()?1:2,this.rtl=/rtl/i.test(n),this.highlightedValue=null,this.isRequired=t.attribute("required"),h(["isOpen","isDisabled","isInvalid","isLocked","isFocused","isInputHidden","isSetup","isShiftDown","isCmdDown","isCtrlDown","ignoreFocus","ignoreBlur","ignoreHover","hasOptions"],function(t){this[t]=!1},this),this.currentResults=null,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.$activeOption=null,this.$activeItems=[],this.Optgroups={},this.Options={},this.UserOptions={},this.items=[],this.renderCache={},this.onSearchChange=null===this.options.loadThrottle?this.onSearchChange:m(this.onSearchChange,this.options.loadThrottle),this.sifter=new o(this.Options,{diacritics:this.options.diacritics});var a,r;if(this.options.Options){for(a=0,r=this.options.Options.length;a<r;a++)this.registerOption(this.options.Options[a]);delete this.options.Options}if(this.options.Optgroups){for(a=0,r=this.options.Optgroups.length;a<r;a++)this.registerOptionGroup(this.options.Optgroups[a]);delete this.options.Optgroups}this.options.mode=this.options.mode||(1===this.options.maxItems?"single":"multi"),v(this.options.hideSelected)||(this.options.hideSelected="multi"===this.options.mode),this.setupCallbacks(),this.setupTemplates(),this.setup()},setup:function(){var t,e,i,n,a,o,s,l,c=this.input;if(s=this.options.mode,l=c.attribute("class")||"",t=r("div").addClass(this.options.wrapperClass).addClass(l).addClass("g-"+s).after(this.input),e=r("div").addClass(this.options.inputClass).addClass("g-items").bottom(t),i=r('input[type="text"][autocomplete="off"][role="textbox"]').bottom(e).attribute("tabindex",c.disabled()?"-1":this.tabIndex),o=u(this.options.dropdownParent||t),n=r("div").addClass(this.options.dropdownClass).addClass("g-"+s).hide().bottom(o),a=r('div[id="'+this.rand+'"]').addClass(this.options.dropdownContentClass).bottom(n),this.options.copyClassesToDropdown&&n.addClass(l),"single"==s&&t.style("width",parseInt(c[0].offsetWidth)+12+24),(null===this.options.maxItems||this.options.maxItems>1)&&1===this.tagType&&c.attribute("multiple","multiple"),this.options.placeholder&&i.attribute("placeholder",this.options.placeholder),!this.options.splitOn&&this.options.delimiter){var h=this.options.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");this.options.splitOn=new RegExp("\\s*"+h+"+\\s*")}c.attribute("autocorrect")&&i.attribute("autocorrect",c.attribute("autocorrect")),c.attribute("autocapitalize")&&i.attribute("autocapitalize",c.attribute("autocapitalize")),this.$wrapper=t,this.$control=e,this.$control_input=i,this.$dropdown=n,this.$dropdown_content=a,n.delegate("mouseover","[data-selectable]",d(function(){return this.onOptionHover.apply(this,arguments)},this)),n.delegate("mousedown","[data-selectable]",d(function(){return this.onOptionSelect.apply(this,arguments)},this)),n.delegate("click","[data-selectable]",d(function(){return this.onOptionSelect.apply(this,arguments)},this)),P(i),e.delegate("mousedown","*:not(input)",d(function(t,i){return i==e||this.onItemSelect.apply(this,arguments)},this)),e.on("mousedown",d(function(){return this.onMouseDown.apply(this,arguments)},this)),e.on("click",d(function(){return this.onClick.apply(this,arguments)},this)),e.delegate("click",".g-remove-single-item",d(function(){return this.onItemRemoveViaX.apply(this,arguments)},this)),i.on("mousedown",function(t){t.stopPropagation()}),i.on("keydown",d(function(){return this.onKeyDown.apply(this,arguments)},this)),i.on("keyup",d(function(){return this.onKeyUp.apply(this,arguments)},this)),i.on("keypress",d(function(){return this.onKeyPress.apply(this,arguments)},this)),i.on("resize",d(function(){this.positionDropdown.apply(this,[])},this)),i.on("blur",d(function(){return this.onBlur.apply(this,arguments)},this)),i.on("focus",d(function(){return this.ignoreBlur=!1,this.onFocus.apply(this,arguments)},this)),i.on("paste",d(function(){return this.onPaste.apply(this,arguments)},this)),u(document).on("keydown",d(function(t){this.isCmdDown=t[S?"metaKey":"ctrlKey"],this.isCtrlDown=t[S?"altKey":"ctrlKey"],this.isShiftDown=t.shiftKey},this)),u(document).on("keyup",d(function(t){t.keyCode===T&&(this.isCtrlDown=!1),16===t.keyCode&&(this.isShiftDown=!1),t.keyCode===C&&(this.isCmdDown=!1)},this)),u(document).on("mousedown",d(function(t){if(this.isFocused){if(t.target===this.$dropdown[0]||t.target.parentNode===this.$dropdown[0])return t.preventDefault(),!1;this.$control.find(u(t.target))||t.target===this.$control[0]||this.blur(t.target)}},this)),u(window).on("scroll",d(function(){this.isOpen&&this.positionDropdown.apply(this,arguments)},this)),u(window).on("resize",d(function(){this.isOpen&&this.positionDropdown.apply(this,arguments)},this)),u(window).on("mousemove",d(function(){this.ignoreHover=!1},this)),this.revertSettings={$children:this.input.children(),tabindex:this.input.attribute("tabindex")},this.input.attribute("tabindex",-1).attribute("aria-hidden",!0).hide().after(t),g(this.options.items)&&(this.setValue(this.options.items),delete this.options.items),E&&this.input.on("invalid",d(function(t){t.preventDefault(),this.isInvalid=!0,this.refreshState()},this)),this.updateOriginalInput(),this.refreshItems(),this.refreshState(),this.updatePlaceholder(),this.isSetup=!0,this.input.disabled()&&this.disable(),this.on("change",this.onChange),this.input.selectizeInstance=this,this.input.addClass("selectized"),this.emit("initialize"),!0===this.options.preload&&this.onSearchChange(""),t.attribute("role","combobox").attribute("aria-autocomplete","list").attribute("aria-haspopup",!0).attribute("aria-expanded",!1).attribute("aria-labelledby",this.rand+"-"+k(this.getValue())),a.attribute("role","tree").attribute("aria-expanded",!1).attribute("aria-hidden",!0)},setupTemplates:function(){var t=this.options.labelField,e=this.options.valueField,i=this.options.optgroupLabelField,n=this.options.mode,a={optgroup:function(t){return'<div class="g-optgroup">'+t.html+"</div>"},optgroup_header:function(t,e){return'<div class="g-optgroup-header">'+e(t[i])+"</div>"},option:function(i,n){var a='<div class="g-option">'+n(i[t])+"</div>";return this.options.Subtitles&&(a='<div class="g-option"><span>'+n(i[t])+'</span> <div class="g-option-subtitle"><small>'+n(i[e])+"</small></div></div>"),a},item:function(i,a){var r="",o=a(i[e]);return"single"!==n&&(r='<span  class="g-remove-single-item" tabindex="-1" title="Remove">&times;</span></div>'),this.options.Subtitles&&(o="class name: "+o),'<div class="g-item" title="'+o+'">'+a(i[t])+r},option_create:function(t,e){return'<div class="g-create">Add <strong>'+e(t.input)+"</strong>&hellip;</div>"}};this.options.render=b({},a,this.options.render)},setupCallbacks:function(){var t,e,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in i)i.hasOwnProperty(t)&&(e=this.options[i[t]])&&this.on(t,e)},onClick:function(t){this.isFocused||(this.focus(),t.preventDefault())},onMouseDown:function(t){var e=t.defaultPrevented||void 0===t.defaultPrevented;u(t.target);if(this.isFocused){if(t.target!==this.$control_input[0])return"single"===this.options.mode?this.isOpen?this.close():this.open():e||this.setActiveItem(null),!1}else e||window.setTimeout(d(function(){this.focus()},this),0)},onChange:function(){this.input.emit("change",this.input.value(),this),u("body").emit("change",{target:this.input})},onPaste:function(t){this.isFull()||this.isInputHidden||this.isLocked?t.preventDefault():this.options.splitOn&&setTimeout(d(function(){for(var t=x(this.$control_input.value()||"").split(this.options.splitOn),e=0,i=t.length;e<i;e++)this.createItem(t[e])},this),0)},onKeyPress:function(t){if(this.isLocked)return t&&t.preventDefault();var e=String.fromCharCode(t.keyCode||t.which);return this.options.create&&"multi"===this.options.mode&&e===this.options.delimiter?(this.createItem(),t.preventDefault(),!1):void 0},onKeyDown:function(t){t.target,this.$control_input[0];if(this.isLocked)9!==t.keyCode&&t.preventDefault();else{switch(t.keyCode){case 65:if(this.isCmdDown)return void this.selectAll();break;case 27:return void(this.isOpen&&(t.preventDefault(),t.stopPropagation(),this.close()));case 78:if(!t.ctrlKey||t.altKey)break;case 40:if(!this.isOpen&&this.hasOptions)this.open();else if(this.$activeOption){this.ignoreHover=!0;var e=this.getAdjacentOption(this.$activeOption,1);e&&this.setActiveOption(e,!0,!0)}return void t.preventDefault();case 80:if(!t.ctrlKey||t.altKey)break;case 38:if(this.$activeOption){this.ignoreHover=!0;var i=this.getAdjacentOption(this.$activeOption,-1);i&&this.setActiveOption(i,!0,!0)}return void t.preventDefault();case 13:return void(this.isOpen&&this.$activeOption&&(this.onOptionSelect({currentTarget:this.$activeOption}),t.preventDefault()));case 37:return void this.advanceSelection(-1,t);case 39:return void this.advanceSelection(1,t);case 9:return this.options.selectOnTab&&this.isOpen&&this.$activeOption&&(this.onOptionSelect({currentTarget:this.$activeOption}),self.isFull()||t.preventDefault()),void(this.options.create&&this.createItem()&&t.preventDefault());case 8:case 46:return void this.deleteSelection(t)}!this.isFull()&&!this.isInputHidden||(S?t.metaKey:t.ctrlKey)||t.preventDefault()}},onKeyUp:function(t){if(this.isLocked)return t&&t.preventDefault();var e=this.$control_input.value()||"";this.lastValue!==e&&(this.lastValue=e,this.onSearchChange(e),this.refreshOptions(),this.emit("type",e))},onSearchChange:function(t){var e=this.options.load;e&&(this.loadedSearches.hasOwnProperty(t)||(this.loadedSearches[t]=!0,this.load(d(function(i){e.apply(this,[t,i])},this))))},onFocus:function(t){var e=this.isFocused;if(this.isDisabled)return this.blur(),t&&t.preventDefault(),!1;this.ignoreFocus||(this.isFocused=!0,"focus"===this.options.preload&&this.onSearchChange(""),e||this.emit("focus"),this.$activeItems.length||(this.showInput(),this.setActiveItem(null),this.refreshOptions(!!this.options.openOnFocus)),this.refreshState())},onBlur:function(t,e){if(this.isFocused&&(this.isFocused=!1,!this.ignoreFocus)){if(!this.ignoreBlur&&document.activeElement===this.$dropdown_content[0])return this.ignoreBlur=!0,void this.onFocus(t);var i=d(function(){this.close(),this.setTextboxValue(""),this.setActiveItem(null),this.setActiveOption(null),this.setCaret(this.items.length),this.refreshState(),e&&e.focus(),this.ignoreFocus=!1,this.emit("blur")},this);this.ignoreFocus=!0,this.options.create&&this.options.createOnBlur?this.createItem(null,!1,i):i()}},onOptionHover:function(t,e){e=u(e),this.ignoreHover||this.setActiveOption(e||t.currentTarget,!1)},onOptionSelect:function(t,e){var i,n;t.preventDefault&&(t.preventDefault(),t.stopPropagation()),(n=u(e||t.currentTarget)).hasClass("g-create")?this.createItem(null,d(function(){this.options.closeAfterSelect&&this.close()},this)):void 0!==(i=n.attribute("data-value"))&&(this.lastQuery=null,this.setTextboxValue(""),this.addItem(i),this.options.closeAfterSelect?this.close():!this.options.hideSelected&&t.type&&/mouse/.test(t.type)&&this.setActiveOption(this.getOption(i)))},onItemSelect:function(t,e){this.isLocked||"multi"===this.options.mode&&(t.preventDefault(),this.setActiveItem(e||t.currentTarget,t))},onItemRemoveViaX:function(t,e){if(t.preventDefault(),!this.isLocked&&"single"!=this.options.mode){var i=e.parent();this.setActiveItem(i),this.deleteSelection()&&this.setCaret(this.items.length)}},load:function(t){var e=this.$wrapper.addClass(this.options.loadingClass);this.loading++,t.apply(this,[d(function(t){this.loading=Math.max(this.loading-1,0),t&&t.length&&(this.addOption(t),this.refreshOptions(this.isFocused&&!this.isInputHidden)),this.loading||e.removeClass(this.options.loadingClass),this.emit("load",t)},this)])},setTextboxValue:function(t){var e=this.$control_input;e.value()!==t&&(e.value(t).emit("update"),this.lastValue=t)},getValue:function(t){return 1===this.tagType&&this.input.attribute("multiple")?t||this.items:(t||this.items).join(this.options.delimiter)},setValue:function(t,e){N(this,e?[]:["change"],function(){this.clear(e),this.previousValue=this.getValue()||t,this.addItems(t,e)})},setActiveItem:function(t,e){var i,n,a,r,o,s,l;if("single"!==this.options.mode){if(!(t=u(t)))return this.$activeItems.length&&u(this.$activeItems).removeClass("g-active"),this.$activeItems=[],void(this.isFocused&&this.showInput());if("mousedown"===(i=e&&e.type.toLowerCase())&&this.isShiftDown&&this.$activeItems.length){l=u(f(this.$control.children(".g-active"))),(a=Array.prototype.indexOf.apply(this.$control[0].childNodes,[l[0]]))>(r=Array.prototype.indexOf.apply(this.$control[0].childNodes,[t[0]]))&&(s=a,a=r,r=s);for(var c=a;c<=r;c++)o=this.$control[0].childNodes[c],-1===this.$activeItems.indexOf(o)&&(u(o).addClass("g-active"),this.$wrapper.attribute("aria-activedescendant",k(this.rand+"-"+u(o).attribute("data-value"))),this.$activeItems.push(o));e.preventDefault()}else"mousedown"===i&&this.isCtrlDown||"keydown"===i&&this.isShiftDown?t.hasClass("g-active")?(n=this.$activeItems.indexOf(t[0]),this.$activeItems.splice(n,1),t.removeClass("g-active")):(this.$activeItems.push(t.addClass("g-active")[0]),this.$wrapper.attribute("aria-activedescendant",k(this.rand+"-"+t.attribute("data-value")))):(u(this.$activeItems)&&u(this.$activeItems).removeClass("g-active"),this.$activeItems=[t.addClass("g-active")[0]],this.$wrapper.attribute("aria-activedescendant",k(this.rand+"-"+t.attribute("data-value"))));this.hideInput(),this.isFocused||this.focus()}},setActiveOption:function(t,e,i){var n,a,r,o,s;this.$activeOption&&this.$activeOption.removeClass("g-active"),this.$activeOption=null,(t=u(t))&&(this.$activeOption=t.addClass("g-active"),this.$wrapper.attribute("aria-activedescendant",k(this.rand+"-"+t.attribute("data-value"))),!e&&I(e)||(n=this.$dropdown_content[0].offsetHeight,a=this.$activeOption[0].offsetHeight,e=this.$dropdown_content[0].scrollTop||0,o=r=this.$activeOption.position().top-this.$dropdown_content.position().top+e,s=r-n+a,r+a>n+e?this.$dropdown_content[0].scrollTop=s:r<e&&(this.$dropdown_content[0].scrollTop=o)))},selectAll:function(){if("single"!==this.options.mode){var t=this.$control.children(":not(input)");t&&(t.addClass("g-active"),this.$wrapper.attribute("aria-activedescendant",k(this.rand+"-"+t.attribute("data-value")))),this.$activeItems=Array.prototype.slice.apply(t||[]),this.$activeItems.length&&(this.hideInput(),this.close()),this.focus()}},hideInput:function(){this.setTextboxValue(""),this.$control_input.style({opacity:0,position:"absolute",left:this.rtl?1e4:-1e4}),this.isInputHidden=!0},showInput:function(){this.$control_input.style({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){this.isDisabled||(this.ignoreFocus=!0,this.$control_input[0].focus(),setTimeout(d(function(){this.ignoreFocus=!1,this.onFocus()},this),0))},blur:function(t){this.$control_input[0].blur(),this.onBlur(null,t)},getScoreFunction:function(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())},getSearchOptions:function(){var t=this.options.sortField;return"string"==typeof t&&(t=[{field:t}]),{fields:this.options.searchField,conjunction:this.options.searchConjunction,sort:t}},search:function(t){var e,i,n,a=this.getSearchOptions();if(this.options.score&&"function"!=typeof(n=this.options.score.apply(this,[t])))throw new Error('Selectize "score" setting must be a function that returns a function');if(t!==this.lastQuery?(this.lastQuery=t,i=this.sifter.search(t,b(a,{score:n})),this.currentResults=i):i=b({},this.currentResults),this.options.hideSelected)for(e=i.items.length-1;e>=0;e--)-1!==this.items.indexOf(O(i.items[e].id))&&i.items.splice(e,1);return i},refreshOptions:function(t){var e,i,n,a,r,o,s,l,c,d,h,p,f,m,v,y;void 0===t&&(t=!0);var w=x(this.$control_input.value()),k=this.search(w),S=this.$dropdown_content,C=this.$activeOption&&O(this.$activeOption.attribute("data-value"));for(a=k.items.length,"number"==typeof this.options.maxOptions&&(a=Math.min(a,this.options.maxOptions)),r={},o=[],e=0;e<a;e++)for(s=this.Options[k.items[e].id],l=this.render("option",s),c=s[this.options.optgroupField]||"",i=0,n=(d=g(c)?c:[c])&&d.length;i<n;i++)c=d[i],this.Optgroups.hasOwnProperty(c)||(c=""),r.hasOwnProperty(c)||(r[c]=document.createDocumentFragment(),o.push(c)),r[c].appendChild(l);for(this.options.lockOptgroupOrder&&o.sort(function(t,e){return(this.Optgroups[t].$order||0)-(this.Optgroups[e].$order||0)}),h=document.createDocumentFragment(),e=0,a=o.length;e<a;e++)c=o[e],this.Optgroups.hasOwnProperty(c)&&r[c].childNodes.length?((p=document.createDocumentFragment()).appendChild(this.render("optgroup_header",this.Optgroups[c])),p.appendChild(r[c]),h.appendChild(this.render("optgroup",b({},this.Optgroups[c],{html:j(p),dom:p})))):h.appendChild(r[c]);if(S.html(j(h)),this.options.highlight&&k.query.length&&k.tokens.length)for(e=0,a=k.tokens.length;e<a;e++)L(S,k.tokens[e].regex);if(!this.options.hideSelected)for(e=0,a=this.items.length;e<a;e++)this.getOption(this.items[e]).addClass("g-selected").attribute("aria-selected",!0);(f=this.canCreate(w))&&(u(this.render("option_create",{input:w})).top(S),y=u(S[0].childNodes[0])),this.hasOptions=k.items.length>0||f,this.hasOptions?(k.items.length>0?((v=C&&this.getOption(C))&&v.length?m=v:"single"===this.options.mode&&this.items.length&&(m=this.getOption(this.items[0])),m&&m.length||(m=y&&!this.options.addPrecedence?this.getAdjacentOption(y,1):S.find("[data-selectable]:first-child"))):m=y,this.setActiveOption(m),t&&!this.isOpen&&this.open()):(this.setActiveOption(null),t&&this.isOpen&&this.close())},addOption:function(t){var e;if(g(t))for(var i=0,n=t.length;i<n;i++)this.addOption(t[i]);else(e=this.registerOption(t))&&(this.UserOptions[e]=!0,this.lastQuery=null,this.emit("option_add",e,t))},registerOption:function(t){var e=O(t[this.options.valueField]);return!(!e&&!this.options.allowEmptyOption||this.options.hasOwnProperty(e))&&(t.$order=t.$order||++this.order,this.Options[e]=t,e)},registerOptionGroup:function(t){var e=O(t[this.options.optgroupValueField]);return!!e&&(t.$order=t.$order||++this.order,this.Optgroups[e]=t,e)},addOptionGroup:function(t,e){e[this.options.optgroupValueField]=t,(t=this.registerOptionGroup(e))&&this.emit("optgroup_add",t,e)},removeOptionGroup:function(t){this.Optgroups.hasOwnProperty(t)&&(delete this.Optgroups[t],this.renderCache={},this.emit("optgroup_remove",t))},clearOptionGroups:function(){this.Optgroups={},this.renderCache={},this.emit("optgroup_clear")},updateOption:function(t,e){var i,n,a,r,o,s,l;if(t=O(t),a=O(e[this.options.valueField]),null!==t&&this.Options.hasOwnProperty(t)){if("string"!=typeof a)throw new Error("Value must be set in option data");l=this.Options[t].$order,a!==t&&(delete this.Options[t],-1!==(r=this.items.indexOf(t))&&this.items.splice(r,1,a)),e.$order=e.$order||l,this.Options[a]=e,o=this.renderCache.item,s=this.renderCache.option,o&&(delete o[t],delete o[a]),s&&(delete s[t],delete s[a]),-1!==this.items.indexOf(a)&&(i=this.getItem(t),n=u(this.render("item",e)),i.hasClass("g-active")&&(n.addClass("g-active"),this.$wrapper.attribute("aria-activedescendant",k(this.rand+"-"+n.attribute("data-value")))),n.after(i),i.remove()),this.lastQuery=null,this.isOpen&&this.refreshOptions(!1)}},removeOption:function(t,e){t=O(t);var i=this.renderCache.item,n=this.renderCache.option;i&&delete i[t],n&&delete n[t],delete this.UserOptions[t],delete this.Options[t],this.lastQuery=null,this.emit("option_remove",t),this.removeItem(t,e)},clearOptions:function(){this.loadedSearches={},this.UserOptions={},this.renderCache={},this.Options=this.sifter.items={},this.lastQuery=null,this.emit("option_clear"),this.clear()},getOption:function(t){return this.getElementWithValue(t,this.$dropdown_content.search("[data-selectable]"))},getAdjacentOption:function(t,e){var i=this.$dropdown.search("[data-selectable]"),n=p(i,t?t[0]:null)+e;return n>=0&&n<(i?i.length:0)?u(i[n]):u()},getElementWithValue:function(t,e){if(void 0!==(t=O(t))&&null!==t)for(var i=0,n=e?e.length:0;i<n;i++)if(e[i].getAttribute("data-value")===t)return u(e[i]);return u()},getItem:function(t){return this.getElementWithValue(t,this.$control.children())},addItems:function(t,e){for(var i=g(t)?t:[t],n=0,a=i.length;n<a;n++)this.isPending=n<a-1,this.addItem(i[n],e)},addItem:function(t,e){N(this,e?[]:["change"],function(){var i,n,a,r,o,s=this.options.mode;if(t=O(t),-1===this.items.indexOf(t)){if(this.Options.hasOwnProperty(t)&&("single"===s&&this.clear(e),("multi"!==s||!this.isFull())&&((i=u(this.render("item",this.Options[t]))).attribute("id",this.rand+"-"+k(i.attribute("data-value"))),"multi"===s&&i.attribute("aria-selected",!0),o=this.isFull(),this.items.splice(this.caretPos,0,t),this.insertAtCaret(i),(!this.isPending||!o&&this.isFull())&&this.refreshState(),this.isSetup))){if(a=this.$dropdown_content.search("[data-selectable]"),!this.isPending){n=this.getOption(t);var l=this.getAdjacentOption(n,1);r=l?l.attribute("data-value"):null,this.refreshOptions(this.isFocused&&"single"!==s),r&&this.setActiveOption(this.getOption(r))}!a||this.isFull()?this.close():this.positionDropdown(),this.updatePlaceholder(),this.emit("item_add",t,i),this.updateOriginalInput({silent:e})}}else"single"===s&&this.close()})},removeItem:function(t,e){var i,n,a;i=t instanceof u?t:this.getItem(t),t=O(i.attribute("data-value")),-1!==(n=this.items.indexOf(t))&&(i.remove(),i.hasClass("g-active")&&(a=this.$activeItems.indexOf(i[0]),this.$activeItems.splice(a,1)),this.items.splice(n,1),this.lastQuery=null,!this.options.persist&&this.UserOptions.hasOwnProperty(t)&&this.removeOption(t,e),n<this.caretPos&&this.setCaret(this.caretPos-1),this.refreshState(),this.updatePlaceholder(),this.updateOriginalInput({silent:e}),this.positionDropdown(),this.emit("item_remove",t,i))},createItem:function(t,e){var i=this.caretPos;t=t||x(this.$control_input.value()||"");var n=arguments[arguments.length-1];if("function"!=typeof n&&(n=function(){}),v(e)||(e=!0),!this.canCreate(t))return n(),!1;this.lock();var a="function"==typeof this.options.create?this.options.create:d(function(t){var e={};return e[this.options.labelField]=t,e[this.options.valueField]=t,e},this),r=A(d(function(t){if(this.unlock(),!t||"object"!=typeof t)return n();var a=O(t[this.options.valueField]);if("string"!=typeof a)return n();this.setTextboxValue(""),this.addOption(t),this.setCaret(i),this.addItem(a),this.refreshOptions(e&&"single"!==this.options.mode),n(t)},this)),o=a.apply(this,[t,r]);return void 0!==o&&r(o),!0},refreshItems:function(){this.lastQuery=null,this.isSetup&&this.addItem(this.items),this.refreshState(),this.updateOriginalInput()},refreshState:function(){this.isRequired&&(this.items.length&&(this.isInvalid=!1),this.$control_input.attribute("required",this.isInvalid||null)),this.refreshClasses()},refreshClasses:function(){var t=this.isFull(),e=this.isLocked;this.$wrapper.toggleClass("g-rtl",this.rtl),this.$control.toggleClass("g-focus",this.isFocused),this.$control.toggleClass("g-disabled",this.isDisabled),this.$control.toggleClass("g-required",this.isRequired),this.$control.toggleClass("g-invalid",this.isInvalid),this.$control.toggleClass("g-locked",e),this.$control.toggleClass("g-full",t),this.$control.toggleClass("g-not-full",!t),this.$control.toggleClass("g-input-active",this.isFocused&&!this.isInputHidden),this.$control.toggleClass("g-dropdown-active",this.isOpen),this.$control.toggleClass("g-has-options",!y(this.options.Options)),this.$control.toggleClass("g-has-items",this.items.length>0),this.isOpen?(this.$wrapper.attribute("aria-owns",this.rand).attribute("aria-activedescendant",k(this.rand+"-"+this.getValue())).attribute("aria-expanded",!0),this.$dropdown_content.attribute("aria-expanded",!0).attribute("aria-hidden",!1)):(this.$wrapper.attribute("aria-owns",null).attribute("aria-activedescendant",null).attribute("aria-expanded",!1),this.$dropdown_content.attribute("aria-expanded",!1).attribute("aria-hidden",!0)),this.$control_input.selectizeGrow=!t&&!e},isFull:function(){return null!==this.options.maxItems&&this.items.length>=this.options.maxItems},updateOriginalInput:function(t){var e,i;if(t=t||{},1===this.tagType){e=[];for(var n=0,a=this.items.length;n<a;n++)i=this.Options[this.items[n]][this.options.labelField]||"",e.push('<option value="'+w(this.items[n])+'" selected="selected">'+w(i)+"</option>");e.length||this.input.attribute("multiple")||e.push('<option value="" selected="selected"></option>'),this.input.html(e.join(""))}else this.input.value(this.getValue()),this.input.attribute("value",this.input.value());this.isSetup&&!t.silent&&this.emit("change",this.input.value())},updatePlaceholder:function(){if(this.options.placeholder){var t=this.$control_input;this.items.length?t.attribute("placeholder",null):t.attribute("placeholder",this.options.placeholder),t.emit("update",{force:!0})}},open:function(){this.isLocked||this.isOpen||"multi"===this.options.mode&&this.isFull()||(this.focus(),this.isOpen=!0,this.refreshState(),this.$dropdown.style({visibility:"hidden",display:"block"}),this.positionDropdown(),this.$dropdown.style({visibility:"visible"}),this.emit("dropdown_open",this.$dropdown))},close:function(){var t=this.isOpen;"single"===this.options.mode&&this.items.length&&this.hideInput(),this.isOpen=!1,this.$dropdown.hide(),this.setActiveOption(null),this.refreshState(),t&&this.emit("dropdown_close",this.$dropdown)},positionDropdown:function(){var t=this.$control;t.position().top+=t[0].offsetHeight,this.$dropdown.style({width:t[0].offsetWidth,top:t[0].offsetTop+t[0].offsetHeight,left:t[0].offsetLeft})},clear:function(t){if(this.items.length){var e=this.$control.children(":not(input)");e&&e.remove(),this.items=[],this.lastQuery=null,this.setCaret(0),this.setActiveItem(null),this.updatePlaceholder(),this.updateOriginalInput({silent:t}),this.refreshState(),this.showInput(),this.emit("clear")}},insertAtCaret:function(t){var e=Math.min(this.caretPos,this.items.length);0===e?t.top(this.$control):t.after(this.$control.find(":nth-child("+e+")")),this.setCaret(e+1)},deleteSelection:function(t){var e,i,n,a,r,o,s,l,c;if(n=t&&8===t.keyCode?-1:1,a=D(this.$control_input[0]),this.$activeOption&&!this.options.hideSelected&&(s=this.getAdjacentOption(this.$activeOption,-1))&&(s=s.attribute("data-value")),r=[],this.$activeItems.length){var d=this.$control.children(":not(input)");for((c=this.$control.children(".g-active"))&&(c=u(n>0?f(c):c[0])),o=d?p(d,c[0]):-1,n>0&&o++,e=0,i=this.$activeItems.length;e<i;e++)r.push(u(this.$activeItems[e]).attribute("data-value"));t&&(t.preventDefault(),t.stopPropagation())}else(this.isFocused||"single"===this.options.mode)&&this.items.length&&(n<0&&0===a.start&&0===a.length?r.push(this.items[this.caretPos-1]):n>0&&a.start===this.$control_input.value().length&&r.push(this.items[this.caretPos]));if(!r.length||"function"==typeof this.options.onDelete&&!1===this.options.onDelete.apply(this,[r]))return!1;for(void 0!==o&&this.setCaret(o);r.length;)this.removeItem(r.pop());return this.showInput(),this.positionDropdown(),this.refreshOptions(!0),s&&(l=this.getOption(s)).length&&this.setActiveOption(l),!0},advanceSelection:function(t,e){var i,n,a,r,o;0!==t&&(this.rtl&&(t*=-1),i=t>0?"last-child":"first-child",n=D(this.$control_input[0]),this.isFocused&&!this.isInputHidden?(r=this.$control_input.value().length,(t<0?0===n.start&&0===n.length:n.start===r)&&!r&&this.advanceCaret(t,e)):(o=this.$control.children(".g-active:"+i))&&(a=p(this.$control.children(":not(input)"),o),this.setActiveItem(null),this.setCaret(t>0?a+1:a)))},advanceCaret:function(t,e){var i,n;0!==t&&(i=t>0?"nextSibling":"previousSibling",this.isShiftDown?(n=this.$control_input[i]())&&(this.hideInput(),this.setActiveItem(n),e&&e.preventDefault()):this.setCaret(this.caretPos+t))},setCaret:function(t){if(t="single"===this.options.mode?this.items.length:Math.max(0,Math.min(this.items.length,t)),!this.isPending){var e,i,n,a;for(e=0,i=(n=this.$control.children(":not(input)"))?n.length:0;e<i;e++)a=u(n[e]),e<t?a.before(this.$control_input):this.$control.appendChild(a)}this.caretPos=t},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){this.input.disabled(!0),this.$control_input.attribute("disabled",!0).attribute("tabindex",-1),this.isDisabled=!0,this.lock()},enable:function(){this.input.attribute("disabled",null),this.$control_input.attribute("disabled",null).attribute("tabindex",this.tabIndex),this.isDisabled=!1,this.unlock()},destroy:function(){var t=this.revertSettings;this.emit("destroy"),this.off(),this.$wrapper.remove(),this.$dropdown.remove(),this.input.html("").appendChild(t.$children).attribute("tabindex",null).removeClass("selectized").attribute({tabindex:t.tabindex}).show(),delete this.$control_input.selectizeGrow,delete this.input.selectizeInstance,delete this.input[0].selectize},render:function(t,e){var i,n,a="",o=!1;if("option"!==t&&"item"!==t||(o=!!(i=O(e[this.options.valueField]))),o&&(I(this.renderCache[t])||(this.renderCache[t]={}),this.renderCache[t].hasOwnProperty(i)))return this.renderCache[t][i];var s=r("div").html(this.options.render[t].apply(this,[e,w]));return s=s.firstChild(),"option"!==t&&"option_create"!==t||(s=s.data("selectable","")),"optgroup"===t&&(n=e[this.options.optgroupValueField]||"",a=_(w(n)),s=s.data("group",a).attribute("role","group").attribute("aria-label",a)),"option"!==t&&"item"!==t||(a=_(w(i||"")),s=s.data("value",a).attribute("id",k(this.rand+"-"+a)).attribute("role","treeitem").attribute("aria-label",x(e.text)).attribute("aria-selected","false")),o&&(this.renderCache[t][i]=s[0]),s[0]},clearCache:function(t){void 0===t?this.renderCache={}:delete this.renderCache[t]},canCreate:function(t){if(!this.options.create)return!1;var e=this.options.createFilter;return t.length&&("function"!=typeof e||e.apply(self,[t]))&&("string"!=typeof e||new RegExp(e).test(t))&&(!(e instanceof RegExp)||e.test(t))},getPreviousValue:function(){return this.previousValue}});u.implement({selectize:function(t){t=t||{};var e=M.prototype.options,i=b({},e,t),n=i.dataAttr,a=i.labelField,r=i.valueField,o=i.optgroupField,s=i.optgroupLabelField,l=i.optgroupValueField,c=function(t,e){var o,s,l,c,d=(t=u(t)).attribute(n);if(d)for(e.Options=JSON.parse(d),o=0,s=e.Options.length;o<s;o++)e.items.push(e.Options[o][r]);else{var h=x(t.value()||"");if(!i.allowEmptyOption&&!h.length)return;for(o=0,s=(l=h.split(i.delimiter)).length;o<s;o++)(c={})[a]=l[o],c[r]=l[o],e.Options.push(c);e.items=l}},d=function(t,e){var c,d,h,p,f=e.Options,m={},v=function(t){var e=n&&t.attribute(n);return"string"==typeof e&&e.length?JSON.parse(e):null},b=function(t,n){var s,l;if(t=u(t),(s=O(t.value())).length||i.allowEmptyOption)if(m.hasOwnProperty(s)){if(n){var c=m[s][o];c?g(c)?c.push(n):m[s][o]=[c,n]:m[s][o]=n}}else(l=v(t)||{})[a]=l[a]||t.text(),l[r]=l[r]||s,l[o]=l[o]||n,m[s]=l,f.push(l),t.matches(":selected")&&e.items.push(s)};for(e.maxItems=t.attribute("multiple")?null:1,c=0,d=(p=t.children()||0).length;c<d;c++)"optgroup"===(h=p[c].tagName.toLowerCase())?function(t){var i,n,a,r,o;for((a=(t=u(t)).attribute("label"))&&((r=v(t)||{})[s]=a,r[l]=a,e.Optgroups.push(r)),i=0,n=(o=t.search("option")).length;i<n;i++)b(o[i],a)}(p[c]):"option"===h&&b(p[c])};return this.forEach(function(n,a){if(i=b({},e,t),!(n=u(n)).selectizeInstance){var r,o=n.data("selectize"),s=n.tag().toLowerCase(),l=n.attribute("placeholder")||n.attribute("data-placeholder");o&&(o=JSON.parse(o)),i=b({},i,o),l||i.allowEmptyOption||(l=n.children('option[value=""]')?n.children('option[value=""]').text():"");var h={placeholder:l,Options:[],Optgroups:[],items:[]};"select"===s?d(n,h):c(n,h),r=new M(n,b({},e,h,t,o)),n.selectizeInstance=r}})}}),a(function(){var t=u("[data-selectize]");t&&t.selectize()}),e.exports=M},{"../utils/elements.utils":65,"elements/domready":110,"elements/zen":136,moofx:137,"mout/array/indexOf":174,"mout/array/last":178,"mout/collection/forEach":188,"mout/function/bind":191,"mout/function/debounce":192,"mout/lang/isArray":202,"mout/lang/isBoolean":203,"mout/object/merge":236,"mout/object/size":241,"mout/object/unset":243,"mout/object/values":244,"mout/string/escapeHtml":258,"mout/string/slugify":270,"mout/string/trim":271,prime:300,"prime-util/prime/bound":296,"prime-util/prime/options":297,"prime/emitter":299,sifter:311}],58:[function(t,e,i){"use strict";var n=t("prime"),a=t("prime/emitter"),r=t("prime-util/prime/bound"),o=t("prime-util/prime/options"),s=t("elements/zen"),l=t("../utils/elements.utils.js"),c=t("prime/map")(),u=t("mout/function/bind"),d=t("mout/object/merge"),h=new new n({mixin:[r,o],inherits:a,options:{tapToDismiss:!0,noticeClass:"g-notifications",containerID:"g-notifications-container",types:{base:"",error:"fa-minus-circle",info:"fa-info-circle",success:"fa-check-circle",warning:"fa-exclamation-triangle"},showDuration:300,showEquation:"cubic-bezier(0.02, 0.01, 0.47, 1)",hideDuration:500,hideEquation:"cubic-bezier(0.02, 0.01, 0.47, 1)",timeOut:2500,extendedTimeout:2500,location:"bottom-right",titleClass:"g-notifications-title",messageClass:"g-notifications-message",closeButton:!0,target:"#g5-container",targetLocation:"bottom",newestOnTop:!0,preventDuplicates:!1,progressBar:!0},constructor:function(t){this.setOptions(t),this.id=0,this.previousNotice=null,this.map=c},mergeOptions:function(t){return d(this.options,t||{})},base:function(t,e,i){return i=this.mergeOptions(i),this.notify(d(i,{title:e||"",type:i.type||"base",message:t}))},success:function(t,e,i){return i=this.mergeOptions(i),this.notify(d(i,{title:e||"Success!",type:"success",message:t}))},info:function(t,e,i){return i=this.mergeOptions(i),this.notify(d(i,{title:e||"Info",type:"info",message:t}))},warning:function(t,e,i){return i=this.mergeOptions(i),this.notify(d(i,{title:e||"Warning!",type:"warning",message:t}))},error:function(t,e,i){return i=this.mergeOptions(i),this.notify(d(i,{title:e||"Error!",type:"error",message:t}))},notify:function(t){if(!(t=this.mergeOptions(t)).preventDuplicates||this.previousNotice!==t.message){this.id++,this.previousNotice=t.message;var e=this.getContainer(t,!0),i=s("div"),n=s("div"),a=s("div"),r=s("i.fa"),o=s("div.g-notifications-progress"),l=s('a.fa.fa-close[href="#"]');if(this.map.set(i,{container:e,interval:null,progressBar:{interval:null,hideETA:null,maxHideTime:null},response:{id:this.id,state:"visible",start:new Date,options:t},options:t}),t.title&&i.appendChild(n.html(t.title).addClass(t.titleClass)),t.message&&i.appendChild(a.html(t.message).addClass(t.messageClass)),t.closeButton&&l.top(i),t.progressBar&&o.top(i),t.type&&t.title&&t.types[t.type]&&(i.addClass("g-notifications-theme-"+t.type),r.top(n).addClass(t.types[t.type])),i.style({opacity:0}),i[t.newestOnTop?"top":"bottom"](e),i.animate({opacity:1},{duration:t.showDuration,equation:t.showEquation,callback:t.onShow}),t.timeOut>0){var c=this.map.get(i);c.interval=setTimeout(u(function(){this.hide(i)},this),t.timeOut),c.progressBar.maxHideTime=parseFloat(t.timeOut),c.progressBar.hideETA=(new Date).getTime()+c.progressBar.maxHideTime,t.progressBar&&(c.progressBar.interval=setInterval(u(function(){this.updateProgress(i,o)},this),10)),this.map.set(i,c)}var d=u(function(){this.stickAround(i)},this),h=u(function(){this.delayedHide(i)},this);i.on("mouseover",d),i.on("mouseout",h),!t.onClick&&t.tapToDismiss&&i.on("click",u(function(){i.off("mouseover",d),i.off("mouseout",h),this.hide(i)},this)),t.closeButton&&l&&l.on("click",u(function(t){t.stopPropagation(),t.preventDefault(),i.off("mouseover",d),i.off("mouseout",h),this.hide(i,!0)},this))}},stickAround:function(t){var e=this.map.get(t);clearTimeout(e.interval),e.progressBar.hideETA=0,t.animate({opacity:1},{duration:e.options.showDuration,equation:e.options.showEquation,callback:e.options.onShow}),this.map.set(t,e)},hide:function(t,e){if(!t.find(":focus")||e){var i=this.map.get(t);return clearTimeout(i.progressBar.interval),this.map.set(t,i),t.animate({opacity:0},{duration:i.options.hideDuration,equation:i.options.hideEquation,callback:u(function(){this.remove(t),i.options.onHidden&&"hidden"!==i.response.state&&i.options.onHidden(),i.response.state="hidden",i.response.endTime=new Date,this.map.set(t,i)},this)})}},delayedHide:function(t,e){var i=this.map.get(t);(i.options.timeOut>0||i.options.extendedTimeout>0)&&(i.interval=setTimeout(u(function(){this.hide(t)},this),i.options.extendedTimeout),i.progressBar.maxHideTime=parseFloat(i.options.extendedTimeout),i.progressBar.hideETA=(new Date).getTime()+i.progressBar.maxHideTime),this.map.set(t,i)},updateProgress:function(t,e){var i=this.map.get(t),n=(i.progressBar.hideETA-(new Date).getTime())/i.progressBar.maxHideTime*100;this.map.set(t,i),e.style({width:n+"%"})},getContainer:function(t,e){t=this.mergeOptions(t);var i=l("#"+t.containerID);return i||(e&&(i=this.createContainer(t)),i)},createContainer:function(t){return t=this.mergeOptions(t),s("div#"+t.containerID+"."+t.location)[t.targetLocation](t.target).attribute("aria-live","polite").attribute("role","alert")},remove:function(t){if(t){var e=this.map.get(t);e.container||(e.container=this.getContainer(e.options)),t.remove(),e.container.children()||(e.container.remove(),this.previousNotice=null),this.map.set(t,e)}}});e.exports=h},{"../utils/elements.utils.js":65,"elements/zen":136,"mout/function/bind":191,"mout/object/merge":236,prime:300,"prime-util/prime/bound":296,"prime-util/prime/options":297,"prime/emitter":299,"prime/map":301}],59:[function(t,e,i){"use strict";var n,a=t("elements/domready"),r=t("elements"),o=t("./modal"),s=t("./toastr"),l=t("agent"),c=t("../utils/get-ajax-suffix"),u=t("../utils/get-ajax-url").parse,d=t("../utils/get-ajax-url").global,h=function(t,e){return(t.type.match(/^touch/)||"click"==t.type)&&t.preventDefault(),"click"!=t.type&&(e=r(e),!(n=e.find("~~ [type=hidden]"))||(n.value("0"==n.value()?"1":"0"),e.parent(".enabler").attribute("aria-checked","1"==n.value()?"true":"false"),n.emit("change"),r("body").emit("change",{target:n}),!1))};a(function(){var t=r("body");t.delegate("keydown",".enabler",function(t,e){if(!(e=r(e)).disabled()&&!e.find("[disabled]")){var i=t.which?t.which:t.keyCode;32!=i&&13!=i||(t.preventDefault(),h(t,e.find(".toggle")))}}),["touchend","mouseup","click"].forEach(function(e){t.delegate(e,".enabler .toggle",h)});var e=u(d("devprod")+c());t.delegate("change",'[data-g-devprod] input[type="hidden"]',function(t,i){var n=i.value(),a=i.parent("[data-g-devprod]"),r=JSON.parse(a.data("g-devprod"));a.showIndicator(),l("post",e,{mode:n},function(t,e){e.body.success?(a.find(".devprod-mode").text(r[e.body.mode]||"Unknown"),s.success(e.body.html,e.body.title)):(o.open({content:e.body.html||e.body,afterOpen:function(t){e.body.html||t.style({width:"90%"})}}),i.value(!n)),a.hideIndicator()})})}),e.exports={}},{"../utils/get-ajax-suffix":69,"../utils/get-ajax-url":70,"./modal":54,"./toastr":58,agent:79,elements:112,"elements/domready":110}],60:[function(t,e,i){"use strict";var n=t("elements/domready"),a=t("ext/tooltips");a.defaults={baseClass:"g-tips",typeClass:null,effectClass:"g-fade",inClass:"g-tip-in",place:"top",spacing:10,offset:-3,auto:1};var r=null;n(function(){r=new a(document,{tooltip:a.defaults,key:"tip",showOn:"mouseenter",hideOn:"mouseleave",observe:1}),window.G5.tips=r}),e.exports=r},{"elements/domready":110,"ext/tooltips":"ext/tooltips"}],61:[function(t,e,i){"use strict";t("prime");var n=t("../utils/elements.utils"),a=(t("elements/zen"),t("elements/domready")),r=t("prime/map")(),o=t("../ui").modal,s=t("mout/collection/size"),l=t("mout/array/indexOf"),c=t("mout/object/merge"),u=t("mout/object/keys"),d=t("mout/random/guid"),h=t("mout/queryString/encode"),p=t("mout/string/contains"),f=t("mout/queryString/getParam"),m=t("mout/queryString/setParam"),g=t("agent")(),v=t("./history"),b=t("./flags-state"),y=t("./get-ajax-url").parse,w=t("./get-ajax-suffix"),x=(t("../lm"),t("../menu")),k=t("../assignments");t("../ui/popover");var S=!1,C=!1,T=-1;v.Adapter.bind(window,"statechange",function(){if(g.running())return!1;var t=n("body"),e=v.getState(),i=e.url,a=e.data,l=n("#navbar"),c=n("#main-header"),u="";if(a.doNothing)return!0;if(s(a)&&!1!==a.parsed&&r.get(a.uuid)&&(a=r.get(a.uuid)),a.element){var d=a.element.parent("#main-header")||a.element.matches(".menu-select-wrap");t.emit("statechangeBefore",{target:a.element,Data:a})}else{var f=i.replace(window.location.origin,"");a.element=n('[href="'+f+'"]')}i=y(i+w());if(l&&a.element){l.search("li.active");l.search("li").removeClass("active"),a.element.parent("#navbar")&&a.element.parent("li").addClass("active")}c&&a.element&&!a.element.matches("a.menu-item")&&!a.element.matches("select.menu-select-wrap")&&(c.search(".float-right li").removeClass("active"),a.element.parent("#main-header")&&a.element.parent("li").addClass("active")),a.params&&(u=h(JSON.parse(a.params)),p(i,"?")&&(u=u.replace(/^\?/,"&"))),S||o.closeAll(),g.url(i+u).data(a.extras||{}).method(a.extras?"post":"get").send(function(e,i){if(!i.body.success)return S?S=!1:(S=!0,o.open({content:i.body.html||i.body,afterOpen:function(t){i.body.html||t.style({width:"90%"})}}),v.back()),a.element&&a.element.hideIndicator(),!1;var r=(a.parent?a.element.parent(a.parent):n(a.target))||n("[data-g5-content]")||t;if(i.body&&i.body.html){var s;if(r.html(i.body.html),s=r.matches("[data-g5-content]")?r:r.find("[data-g5-content]")){var l=n("#navbar");s.style({opacity:0}),d&&n(l).attribute("tabindex","-1").attribute("aria-hidden","true"),l[d?"slideUp":"slideDown"](),s.animate({opacity:1})}}else r.html(i.body);t.getPopover().hideAll(!0).destroy(),a.element&&t.emit("statechangeAfter",{target:a.element,Data:a});var c=a.event&&a.event.activeSpinner||a.element;c&&c.hideIndicator();var u=n("[data-selectize]");u&&u.selectize(),E(),k.chromeFix(),t.emit("statechangeEnd")})});var E=function(){var t=n("[data-selectize-ajaxify]");t&&t.forEach(function(t){var e=(t=n(t)).selectize().selectizeInstance;e&&!e.HasChangeEvent&&(e.on("change",function(){if(C)return C=!1,!1;var i=e.getValue(),a=e.Options,r=function(){b.off("update:pending",r),o.close(),e.input.data("g5-ajaxify","").data("g5-ajaxify-target",t.data("g5-ajaxify-target")||"[data-g5-content-wrapper]").data("g5-ajaxify-target-parent",t.data("g5-ajaxify-target-parent")||null).data("g5-ajaxify-href",a[i].url).data("g5-ajaxify-params",a[i].params?JSON.stringify(a[i].params):null);var s=n("#navbar li.active")||n("#main-header li.active")||n("#navbar li:nth-child(2)");s&&s.showIndicator(),n("body").emit("click",{target:e.input,activeSpinner:s})};a[i]&&(b.get("pending")?b.warning({callback:function(t,e){var i=e.find("[data-g-unsaved-save]"),a=e.find("[data-g-unsaved-discard]");i&&(i.on("click",function(t){if(t.preventDefault(),this.attribute("disabled"))return!1;n([i,a]).attribute("disabled"),b.on("update:pending",r),n("body").emit("click",{target:n(".button-save")})}),a.on("click",function(t){if(t.preventDefault(),this.attribute("disabled"))return!1;n([i,a]).attribute("disabled"),b.set("pending",!1),r()}))},afterclose:function(){C=!0,e.setValue(e.getPreviousValue())}}):r())}),e.HasChangeEvent=!0)})};a(function(){var t=n("body");if(GANTRY_AJAX_NONCE){var e=v.getPageUrl();switch(GANTRY_PLATFORM){case"wordpress":f(e,"_wpnonce")!==GANTRY_AJAX_NONCE&&(e=m(e,"_wpnonce",GANTRY_AJAX_NONCE),v.replaceState({uuid:d(),doNothing:!0},window.document.title,e));break;case"grav":f(e,"nonce")!==GANTRY_AJAX_NONCE&&(e=m(e,"nonce",GANTRY_AJAX_NONCE),v.replaceState({uuid:d(),doNothing:!0},window.document.title,e))}}t.delegate("click",".button-back-to-conf",function(e,i){e.preventDefault();var a=n("#configuration-selector"),r=t.outlineDeleted,s=a.value();T=-1==T?1:T;var l=n("#navbar"),c=l.find("li:nth-child("+(T+1)+") [data-g5-ajaxify]");if(b.get("pending"))b.warning({callback:function(e,i){var a=i.find("[data-g-unsaved-save]"),r=i.find("[data-g-unsaved-discard]"),s=function(){b.off("update:pending",s),o.close(),t.emit("click",{target:c}),l.attribute("tabindex",null).attribute("aria-hidden","false"),l.slideDown()};a&&(a.on("click",function(e){if(e.preventDefault(),this.attribute("disabled"))return!1;n([a,r]).attribute("disabled"),b.on("update:pending",s),t.emit("click",{target:n(".button-save")})}),r.on("click",function(t){if(t.preventDefault(),this.attribute("disabled"))return!1;n([a,r]).attribute("disabled"),b.set("pending",!1),s()}))}});else{if(i.showIndicator(),r==s){var d=u(a.selectizeInstance.Options).shift();t.outlineDeleted=null,c.href(c.href().replace("/"+r+"/","/"+d+"/").replace("style="+r,"style="+d))}t.emit("click",{target:c}),l.attribute("tabindex",null),l.slideDown()}}),t.delegate("click","#navbar a[data-g5-ajaxify]",function(t,e){var i=n("#navbar").search("li a[data-g5-ajaxify]");T=l(i,e[0])+1}),t.delegate("click","[data-g5-ajaxify]",function(e,i){if(e&&e.preventDefault){if(2===e.which||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return!0;e.preventDefault()}if(!b.get("pending")||i.matches("a.menu-item")||i.parent("[data-menu-items]")){i.showIndicator();var a=i.data("g5-ajaxify"),s=i.data("g5-ajaxify-target"),l=i.data("g5-ajaxify-target-parent"),u=i.attribute("href")||i.data("g5-ajaxify-href"),h=i.data("g5-ajaxify-params")||!1,p=i.attribute("title")||window.document.title;if(a=a?JSON.parse(a):{parsed:!1}){var f,m=d();(i.data("mm-id")||i.parent("[data-mm-id]"))&&((f={}).menutype=n("select.menu-select-wrap").value(),f.settings=JSON.stringify(x.menumanager.settings),f.ordering=JSON.stringify(x.menumanager.ordering),f.items=JSON.stringify(x.menumanager.items)),r.set(m,c({},a,{target:s,parent:l,element:i,params:h,extras:f,event:e})),a={uuid:m}}v.pushState(a,p,u);var g,y,w=n("#navbar .active, #main-header .active");(g=i.parent("#navbar, #main-header"))&&(w&&w.removeClass("active"),(y=g.search(".active"))&&y.removeClass("active"),i.parent("li").addClass("active"))}else b.warning({callback:function(i,a){var r=a.find("[data-g-unsaved-save]"),s=a.find("[data-g-unsaved-discard]"),l=function(){b.off("update:pending",l),o.close(),t.emit("click",e)};r&&(r.on("click",function(e){if(e.preventDefault(),this.attribute("disabled"))return!1;n([r,s]).attribute("disabled"),b.on("update:pending",l),t.emit("click",{target:n(".button-save")})}),s.on("click",function(t){if(t.preventDefault(),this.attribute("disabled"))return!1;n([r,s]).attribute("disabled"),b.set("pending",!1),l()}))}})}),E()}),e.exports={}},{"../assignments":2,"../lm":27,"../menu":34,"../ui":53,"../ui/popover":55,"../utils/elements.utils":65,"./flags-state":68,"./get-ajax-suffix":69,"./get-ajax-url":70,"./history":74,agent:79,"elements/domready":110,"elements/zen":136,"mout/array/indexOf":174,"mout/collection/size":190,"mout/object/keys":235,"mout/object/merge":236,"mout/queryString/encode":245,"mout/queryString/getParam":246,"mout/queryString/setParam":248,"mout/random/guid":250,"mout/string/contains":256,prime:300,"prime/map":301}],62:[function(t,e,i){"use strict";e.exports=function(t,e,i){var n=-1,a=(t=t||[]).length>>>0;!function r(o){var s,l=!1===o;do{++n}while(!(n in t)&&n!==a);l||n===a?i&&i(!l,t):(o=e.call({async:function(){return s=!0,r}},t[n],n,t),s||r(o))}()}},{}],63:[function(t,e,i){"use strict";var n={write:function(t,e){var i=new Date;i.setTime(i.getTime()+31536e7);var n=window.location.host.toString(),a=n.substring(n.lastIndexOf(".",n.lastIndexOf(".")-1)+1);n.match(/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/)&&(a=n);var r=[t,"=",JSON.stringify(e),"; expires=",i.toGMTString(),"; domain=.",a,"; path=/;"];document.cookie=r.join("")},read:function(t){t=t.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1");var e=document.cookie.match("(?:^|;)\\s*"+t+"=([^;]*)");return e?JSON.parse(decodeURIComponent(e[1])):null}};e.exports=n},{}],64:[function(t,e,i){"use strict";var n=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)};e.exports=function(t,e,i){var a,r=!1;t=t[0]||t;var o=function(t){a=t,s()},s=function(){r||(n(l),r=!0)},l=function(){i.call(t,a),r=!1};try{t.addEventListener(e,o,!1)}catch(t){}return o}},{}],65:[function(t,e,i){"use strict";var n=t("elements"),a=t("moofx"),r=t("mout/array/map"),o=t("mout/function/series"),s=t("slick"),l=t("elements/zen"),c=t("../ui/progresser"),u=function(t,e){return function(i){var n=s.parse(i||"*");return i=r(n,function(e){return t+" "+e}).join(", "),this[e](i)}};n.implement({style:function(){var t=a(this);return t.style.apply(t,arguments),this},animate:function(){var t=a(this);return t.animate.apply(t,arguments),this},hide:function(){return this.style("display","none")},show:function(t){return this.style("display",t||"inherit")},progresser:function(t){var e;this.forEach(function(i){return(e=i.ProgresserInstance)?e.constructor(i,t):e=new c(i,t),i.ProgresserInstance=e,e})},compute:function(){var t=a(this);return t.compute.apply(t,arguments)},showIndicator:function(t,e){this.forEach(function(i){i=n(i),"boolean"==typeof t&&(e=t,t=null);var a=!e&&i.find("i");i.gHadIcon=!!a,a||(i.find("span")||i.children()||l("span").text(i.text()).top(i.empty()),(a=l("i")).top(i)),i.gIndicator||(i.gIndicator=a.attribute("class")||!0),a.attribute("class",t||"fa fa-fw fa-spin-fast fa-spinner")})},hideIndicator:function(){this.forEach(function(t){if((t=n(t)).gIndicator){var e=t.find("i");e&&(t.gHadIcon?e.attribute("class",t.gIndicator):e.remove(),t.gIndicator=null)}})},slideDown:function(t,e){var i=this,n=this.getRealSize();if(e="function"==typeof t?t:e||function(){},!1===this.gSlideCollapsed)return e();e=o(function(){i.gSlideCollapsed=!1},e,function(){i.attribute("style",i.gSlideStyle)}),t="string"==typeof t?t:{duration:"250ms",callback:e},this.style("visibility","visible").attribute("aria-hidden",!1),this.animate({height:n.height},t)},slideUp:function(t,e){void 0===this.gSlideCollapsed&&(this.gSlideStyle=this.attribute("style"));var i=this;if(e="function"==typeof t?t:e||function(){},!0===this.gSlideCollapsed)return e();e=o(function(){i.gSlideCollapsed=!0},e,function(){i.style("visibility","hidden").attribute("aria-hidden",!0)}),t="string"==typeof t?t:{duration:"250ms",callback:e},this.style({overflow:"hidden"}).animate({height:0},t)},slideToggle:function(t,e){return this[this.getRealSize().height&&!this.gSlideCollapsed?"slideUp":"slideDown"](t,e)},getRealSize:function(){var t,e=this.attribute("style");return this.style({position:"relative",overflow:"inherit",top:-5e4,height:"auto",width:"auto"}),t={width:parseInt(this.compute("width"),10),height:parseInt(this.compute("height"),10)},this[0].style=e,t},sibling:u("++","find"),siblings:u("~~","search")}),e.exports=n},{"../ui/progresser":56,elements:112,"elements/zen":136,moofx:137,"mout/array/map":179,"mout/function/series":196,slick:313}],66:[function(t,e,i){"use strict";var n=t("elements");n.implement({belowthefold:function(t,e){var i=this.search(t);if(e=e||0,!i)return!1;var a=this.position().height+this[0].scrollTop;return i.filter(function(t){return a<=n(t)[0].offsetTop-e})},abovethetop:function(t,e){var i=this.search(t);if(e=e||0,!i)return!1;var a=this[0].scrollTop;return i.filter(function(t){return a>=n(t)[0].offsetTop+n(t).position().height-e})},rightofscreen:function(t,e){var i=this.search(t);if(e=e||0,!i)return!1;var a=this.position().width+this[0].scrollLeft;return i.filter(function(t){return a<=n(t)[0].offsetLeft-e})},leftofscreen:function(t,e){var i=this.search(t);if(e=e||0,!i)return!1;var a=this[0].scrollLeft;return i.filter(function(t){return a>=n(t)[0].offsetLeft+n(t).position().width-e})},inviewport:function(t,e){var i=this.search(t);if(e=e||0,!i)return!1;var a=this.position();return i.filter(function(t){return(t=n(t))[0].offsetTop+e>=this[0].scrollTop&&t[0].offsetTop-e<=this[0].scrollTop+a.height},this)}}),e.exports=n},{elements:112}],67:[function(t,e,i){"use strict";var n=t("elements"),a=function(t){var e=!0,i=(t=n(t)).value(),a=t.type(),r="checkbox"==a||"radio"==a,o=t.attribute("disabled"),s=t.attribute("required"),l=t.attribute("minlength"),c=t.attribute("maxlength"),u=t.attribute("min"),d=t.attribute("max"),h=t.attribute("pattern");return o?e:(e=e&&(!s||r&&t.checked()||!r&&i),(e=e&&(r||(!l||i.length>=l)&&(!c||i.length<=c)))&&h&&(e=(h=new RegExp(h)).test(i)),!e||null===u&&null===d||(null!==u&&(e=parseFloat(i)>=parseFloat(u)),null!==d&&(e=parseFloat(i)<=parseFloat(d))),e)};e.exports=function(t){var e=(t=n(t))[0],i=t.tag(),r=t.type(),o=!0;return~["input","textarea","select"].indexOf(i)?(void 0!==e.willValidate?("input"!=i||e.type.toLowerCase()===r&&!t.hasClass("custom-validation-field")||e.setCustomValidity(a(t)?"":"The field value is invalid"),e.checkValidity()):(e.validity=e.validity||{},e.validity.valid=a(t)),o=e.validity.valid):o}},{elements:112}],68:[function(t,e,i){"use strict";var n=t("prime"),a=t("prime/map"),r=t("prime/emitter"),o=t("../ui").modal,s=t("./get-ajax-url").global,l=t("./get-ajax-url").parse,c=t("./get-ajax-suffix"),u=new n({inherits:r,constructor:function(){this.flags=a()},set:function(t,e){return this.flags.set(t,e).get(t)},get:function(t,e){var i=this.flags.get(t);return i||this.set(t,e)},keys:function(){return this.flags.keys()},values:function(){return this.flags.values()},warning:function(t){var e=t.callback||function(){},i=t.afterclose||function(){},n=l(t.url||s("unsaved")+c());t.url||t.message||(t.url=!0),t.url?o.open({content:"Loading...",remote:n,data:t.data||!1,remoteLoaded:function(t,i){var n=i.elements.content;e&&e.call(this,t,n,i)},afterClose:i||function(){}}):o.open({content:t.message,afterOpen:function(t,i){var n=i.elements.content;e&&e.call(this,t,n,i)},afterClose:i||function(){}})}});e.exports=new u},{"../ui":53,"./get-ajax-suffix":69,"./get-ajax-url":70,prime:300,"prime/emitter":299,"prime/map":301}],69:[function(t,e,i){"use strict";e.exports=function(){var t=window.GANTRY_AJAX_SUFFIX||void 0;return void 0===t?"":t}},{}],70:[function(t,e,i){"use strict";var n=t("mout/string/unescapeHtml"),a=t("./get-ajax-suffix"),r=t("mout/string/endsWith"),o=t("mout/queryString/getQuery"),s=t("mout/queryString/getParam");t("mout/queryString/setParam");e.exports={global:function(t,e){var i=window.GANTRY_AJAX_URL||"";e||(e="%ajax%");var a=new RegExp(e,"g");return n((void 0===i?"":i).replace(a,t))},config:function(t,e){var i=window.GANTRY_AJAX_CONF_URL||"";e||(e="%ajax%");var a=new RegExp(e,"g");return n((void 0===i?"":i).replace(a,t))},parse:function(t){var e=window.GANTRY_PLATFORM||"";switch(void 0===e?"":e){case"wordpress":t=t.replace(/themes\.php/gi,"admin-ajax.php");break;case"grav":var i=a();if(r(t,i)){var n=""+o(t),l=""+s(t,"nonce");t=t.replace(n,i)+n.replace(l,l.replace(i,""))}}return t}}},{"./get-ajax-suffix":69,"mout/queryString/getParam":246,"mout/queryString/getQuery":247,"mout/queryString/setParam":248,"mout/string/endsWith":257,"mout/string/unescapeHtml":273}],71:[function(t,e,i){"use strict";var n=t("elements"),a=t("mout/string/trim");e.exports={getOutlineNameById:function(t){return null==t?"":a(n("#configuration-selector").selectizeInstance.Options[t].text)},getCurrentOutline:function(){return a(n("#configuration-selector").selectizeInstance.getValue())}}},{elements:112,"mout/string/trim":271}],72:[function(t,e,i){"use strict";var n=t("elements/zen"),a=null;e.exports=function(){if(null!==a)return a;var t,e=n("div").bottom("#g5-container");return e.style({width:100,height:100,overflow:"scroll",position:"absolute",zIndex:-9999}),t=e[0].offsetWidth-e[0].clientWidth,e.remove(),a=t,t}},{"elements/zen":136}],73:[function(t,e,i){"use strict";var n=t("elements"),a=t("elements/domready"),r={};if(void 0!==r.Adapter)throw new Error("History.js Adapter has already been loaded...");r.Adapter={bind:function(t,e,i){n(t).on(e,i)},trigger:function(t,e,i){n(t).emit(e,i)},extractEventData:function(t,e){return e&&e.event&&e.event[t]||e&&e[t]||void 0},onDomLoad:function(t){a(t)}},void 0!==r.init&&r.init(),e.exports=r},{elements:112,"elements/domready":110}],74:[function(t,e,i){"use strict";var n=window.console||void 0,a=window.document,r=window.navigator,o=!1,s=window.setTimeout,l=window.clearTimeout,c=window.setInterval,u=window.clearInterval,d=window.JSON,h=window.alert,p=window.History=t("./history-adapter")||{},f=window.history;try{(o=window.sessionStorage).setItem("TEST","1"),o.removeItem("TEST")}catch(t){o=!1}d.stringify=d.stringify||d.encode,d.parse=d.parse||d.decode,void 0===p.init&&(p.init=function(t){return void 0!==p.Adapter&&(void 0!==p.initCore&&p.initCore(),void 0!==p.initHtml4&&p.initHtml4(),!0)},p.initCore=function(t){if(void 0!==p.initCore.initialized)return!1;if(p.initCore.initialized=!0,p.options=p.options||{},p.options.hashChangeInterval=p.options.hashChangeInterval||100,p.options.safariPollInterval=p.options.safariPollInterval||500,p.options.doubleCheckInterval=p.options.doubleCheckInterval||500,p.options.disableSuid=p.options.disableSuid||!1,p.options.storeInterval=p.options.storeInterval||1e3,p.options.busyDelay=p.options.busyDelay||250,p.options.debug=p.options.debug||!1,p.options.initialTitle=p.options.initialTitle||a.title,p.options.html4Mode=p.options.html4Mode||!1,p.options.delayInit=p.options.delayInit||!1,p.intervalList=[],p.clearAllIntervals=function(){var t,e=p.intervalList;if(void 0!==e&&null!==e){for(t=0;t<e.length;t++)u(e[t]);p.intervalList=null}},p.debug=function(){p.options.debug&&p.log.apply(p,arguments)},p.log=function(){var t,e,i,r,o,s=!(void 0===n||void 0===n.log||void 0===n.log.apply),l=a.getElementById("log");for(s?(t=(r=Array.prototype.slice.call(arguments)).shift(),void 0!==n.debug?n.debug.apply(n,[t,r]):n.log.apply(n,[t,r])):t="\n"+arguments[0]+"\n",e=1,i=arguments.length;e<i;++e){if("object"==typeof(o=arguments[e])&&void 0!==d)try{o=d.stringify(o)}catch(t){}t+="\n"+o+"\n"}return l?(l.value+=t+"\n-----\n",l.scrollTop=l.scrollHeight-l.clientHeight):s||h(t),!0},p.getInternetExplorerMajorVersion=function(){return p.getInternetExplorerMajorVersion.cached=void 0!==p.getInternetExplorerMajorVersion.cached?p.getInternetExplorerMajorVersion.cached:function(){for(var t=3,e=a.createElement("div"),i=e.getElementsByTagName("i");(e.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e")&&i[0];);return t>4&&t}()},p.isInternetExplorer=function(){return p.isInternetExplorer.cached=void 0!==p.isInternetExplorer.cached?p.isInternetExplorer.cached:Boolean(p.getInternetExplorerMajorVersion())},p.options.html4Mode?p.emulated={pushState:!0,hashChange:!0}:p.emulated={pushState:!Boolean(window.history&&window.history.pushState&&window.history.replaceState&&!(/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(r.userAgent)||/AppleWebKit\/5([0-2]|3[0-2])/i.test(r.userAgent))),hashChange:Boolean(!("onhashchange"in window||"onhashchange"in a)||p.isInternetExplorer()&&p.getInternetExplorerMajorVersion()<8)},p.enabled=!p.emulated.pushState,p.bugs={setHash:Boolean(!p.emulated.pushState&&"Apple Computer, Inc."===r.vendor&&/AppleWebKit\/5([0-2]|3[0-3])/.test(r.userAgent)),safariPoll:Boolean(!p.emulated.pushState&&"Apple Computer, Inc."===r.vendor&&/AppleWebKit\/5([0-2]|3[0-3])/.test(r.userAgent)),ieDoubleCheck:Boolean(p.isInternetExplorer()&&p.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(p.isInternetExplorer()&&p.getInternetExplorerMajorVersion()<7)},p.isEmptyObject=function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},p.cloneObject=function(t){var e,i;return t?(e=d.stringify(t),i=d.parse(e)):i={},i},p.getRootUrl=function(){var t=a.location.protocol+"//"+(a.location.hostname||a.location.host);return a.location.port&&(t+=":"+a.location.port),t+="/"},p.getBaseHref=function(){var t=a.getElementsByTagName("base"),e="";return 1===t.length&&(e=t[0].href.replace(/[^\/]+$/,"")),(e=e.replace(/\/+$/,""))&&(e+="/"),e},p.getBaseUrl=function(){return p.getBaseHref()||p.getBasePageUrl()||p.getRootUrl()},p.getPageUrl=function(){return((p.getState(!1,!1)||{}).url||p.getLocationHref()).replace(/\/+$/,"").replace(/[^\/]+$/,function(t,e,i){return/\./.test(t)?t:t+"/"})},p.getBasePageUrl=function(){return p.getLocationHref().replace(/[#\?].*/,"").replace(/[^\/]+$/,function(t,e,i){return/[^\/]$/.test(t)?"":t}).replace(/\/+$/,"")+"/"},p.getFullUrl=function(t,e){var i=t,n=t.substring(0,1);return e=void 0===e||e,/[a-z]+\:\/\//.test(t)||(i="/"===n?p.getRootUrl()+t.replace(/^\/+/,""):"#"===n?p.getPageUrl().replace(/#.*/,"")+t:"?"===n?p.getPageUrl().replace(/[\?#].*/,"")+t:e?p.getBaseUrl()+t.replace(/^(\.\/)+/,""):p.getBasePageUrl()+t.replace(/^(\.\/)+/,"")),i.replace(/\#$/,"")},p.getShortUrl=function(t){var e=t,i=p.getBaseUrl(),n=p.getRootUrl();return p.emulated.pushState&&(e=e.replace(i,"")),e=e.replace(n,"/"),p.isTraditionalAnchor(e)&&(e="./"+e),e=e.replace(/^(\.\/)+/g,"./").replace(/\#$/,"")},p.getLocationHref=function(t){return(t=t||a).URL===t.location.href?t.location.href:t.location.href===decodeURIComponent(t.URL)?t.URL:t.location.hash&&decodeURIComponent(t.location.href.replace(/^[^#]+/,""))===t.location.hash?t.location.href:-1==t.URL.indexOf("#")&&-1!=t.location.href.indexOf("#")?t.location.href:t.URL||t.location.href},p.store={},p.idToState=p.idToState||{},p.stateToId=p.stateToId||{},p.urlToId=p.urlToId||{},p.storedStates=p.storedStates||[],p.savedStates=p.savedStates||[],p.normalizeStore=function(){p.store.idToState=p.store.idToState||{},p.store.urlToId=p.store.urlToId||{},p.store.stateToId=p.store.stateToId||{}},p.getState=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!0);var i=p.getLastSavedState();return!i&&e&&(i=p.createStateObject()),t&&((i=p.cloneObject(i)).url=i.cleanUrl||i.url),i},p.getIdByState=function(t){var e,i=p.extractId(t.url);if(!i)if(e=p.getStateString(t),void 0!==p.stateToId[e])i=p.stateToId[e];else if(void 0!==p.store.stateToId[e])i=p.store.stateToId[e];else{for(;;)if(i=(new Date).getTime()+String(Math.random()).replace(/\D/g,""),void 0===p.idToState[i]&&void 0===p.store.idToState[i])break;p.stateToId[e]=i,p.idToState[i]=t}return i},p.normalizeState=function(t){var e,i;return t&&"object"==typeof t||(t={}),void 0!==t.normalized?t:(t.data&&"object"==typeof t.data||(t.data={}),e={},e.normalized=!0,e.title=t.title||"",e.url=p.getFullUrl(t.url?t.url:p.getLocationHref()),e.hash=p.getShortUrl(e.url),e.data=p.cloneObject(t.data),e.id=p.getIdByState(e),e.cleanUrl=e.url.replace(/\??\&_suid.*/,""),e.url=e.cleanUrl,i=!p.isEmptyObject(e.data),(e.title||i)&&!0!==p.options.disableSuid&&(e.hash=p.getShortUrl(e.url).replace(/\??\&_suid.*/,""),/\?/.test(e.hash)||(e.hash+="?"),e.hash+="&_suid="+e.id),e.hashedUrl=p.getFullUrl(e.hash),(p.emulated.pushState||p.bugs.safariPoll)&&p.hasUrlDuplicate(e)&&(e.url=e.hashedUrl),e)},p.createStateObject=function(t,e,i){var n={data:t,title:e,url:i};return n=p.normalizeState(n)},p.getStateById=function(t){return t=String(t),p.idToState[t]||p.store.idToState[t]||void 0},p.getStateString=function(t){var e,i;return e=p.normalizeState(t),i={data:e.data,title:t.title,url:t.url},d.stringify(i)},p.getStateId=function(t){var e;return e=p.normalizeState(t),e.id},p.getHashByState=function(t){var e;return e=p.normalizeState(t),e.hash},p.extractId=function(t){var e,i;return i=-1!=t.indexOf("#")?t.split("#")[0]:t,e=/(.*)\&_suid=([0-9]+)$/.exec(i),e?e[1]||t:t,(e?String(e[2]||""):"")||!1},p.isTraditionalAnchor=function(t){return!/[\/\?\.]/.test(t)},p.extractState=function(t,e){var i,n,a=null;return e=e||!1,(i=p.extractId(t))&&(a=p.getStateById(i)),a||(n=p.getFullUrl(t),(i=p.getIdByUrl(n)||!1)&&(a=p.getStateById(i)),a||!e||p.isTraditionalAnchor(t)||(a=p.createStateObject(null,null,n))),a},p.getIdByUrl=function(t){return p.urlToId[t]||p.store.urlToId[t]||void 0},p.getLastSavedState=function(){return p.savedStates[p.savedStates.length-1]||void 0},p.getLastStoredState=function(){return p.storedStates[p.storedStates.length-1]||void 0},p.hasUrlDuplicate=function(t){var e;return e=p.extractState(t.url),e&&e.id!==t.id},p.storeState=function(t){return p.urlToId[t.url]=t.id,p.storedStates.push(p.cloneObject(t)),t},p.isLastSavedState=function(t){var e=!1;return p.savedStates.length&&(e=t.id===p.getLastSavedState().id),e},p.saveState=function(t){return!p.isLastSavedState(t)&&(p.savedStates.push(p.cloneObject(t)),!0)},p.getStateByIndex=function(t){return void 0===t?p.savedStates[p.savedStates.length-1]:t<0?p.savedStates[p.savedStates.length+t]:p.savedStates[t]},p.getCurrentIndex=function(){return p.savedStates.length<1?0:p.savedStates.length-1},p.getHash=function(t){var e=p.getLocationHref(t);return p.getHashByUrl(e)},p.unescapeHash=function(t){var e=p.normalizeHash(t);return e=decodeURIComponent(e)},p.normalizeHash=function(t){return t.replace(/[^#]*#/,"").replace(/#.*/,"")},p.setHash=function(t,e){var i,n;return!1!==e&&p.busy()?(p.pushQueue({scope:p,callback:p.setHash,args:arguments,queue:e}),!1):(p.busy(!0),(i=p.extractState(t,!0))&&!p.emulated.pushState?p.pushState(i.data,i.title,i.url,!1):p.getHash()!==t&&(p.bugs.setHash?(n=p.getPageUrl(),p.pushState(null,null,n+"#"+t,!1)):a.location.hash=t),p)},p.escapeHash=function(t){var e=p.normalizeHash(t);return e=window.encodeURIComponent(e),p.bugs.hashEscape||(e=e.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),e},p.getHashByUrl=function(t){var e=String(t).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return e=p.unescapeHash(e)},p.setTitle=function(t){var e,i=t.title;i||(e=p.getStateByIndex(0))&&e.url===t.url&&(i=e.title||p.options.initialTitle);try{a.getElementsByTagName("title")[0].innerHTML=i.replace("<","&lt;").replace(">","&gt;").replace(" & "," &amp; ")}catch(t){}return a.title=i,p},p.queues=[],p.busy=function(t){if(void 0!==t?p.busy.flag=t:void 0===p.busy.flag&&(p.busy.flag=!1),!p.busy.flag){l(p.busy.timeout);var e=function(){var t,i,n;if(!p.busy.flag)for(t=p.queues.length-1;t>=0;--t)0!==(i=p.queues[t]).length&&(n=i.shift(),p.fireQueueItem(n),p.busy.timeout=s(e,p.options.busyDelay))};p.busy.timeout=s(e,p.options.busyDelay)}return p.busy.flag},p.busy.flag=!1,p.fireQueueItem=function(t){return t.callback.apply(t.scope||p,t.args||[])},p.pushQueue=function(t){return p.queues[t.queue||0]=p.queues[t.queue||0]||[],p.queues[t.queue||0].push(t),p},p.queue=function(t,e){return"function"==typeof t&&(t={callback:t}),void 0!==e&&(t.queue=e),p.busy()?p.pushQueue(t):p.fireQueueItem(t),p},p.clearQueue=function(){return p.busy.flag=!1,p.queues=[],p},p.stateChanged=!1,p.doubleChecker=!1,p.doubleCheckComplete=function(){return p.stateChanged=!0,p.doubleCheckClear(),p},p.doubleCheckClear=function(){return p.doubleChecker&&(l(p.doubleChecker),p.doubleChecker=!1),p},p.doubleCheck=function(t){return p.stateChanged=!1,p.doubleCheckClear(),p.bugs.ieDoubleCheck&&(p.doubleChecker=s(function(){return p.doubleCheckClear(),p.stateChanged||t(),!0},p.options.doubleCheckInterval)),p},p.safariStatePoll=function(){var t=p.extractState(p.getLocationHref());if(!p.isLastSavedState(t))return t||p.createStateObject(),p.Adapter.trigger(window,"popstate"),p},p.back=function(t){return!1!==t&&p.busy()?(p.pushQueue({scope:p,callback:p.back,args:arguments,queue:t}),!1):(p.busy(!0),p.doubleCheck(function(){p.back(!1)}),f.go(-1),!0)},p.forward=function(t){return!1!==t&&p.busy()?(p.pushQueue({scope:p,callback:p.forward,args:arguments,queue:t}),!1):(p.busy(!0),p.doubleCheck(function(){p.forward(!1)}),f.go(1),!0)},p.go=function(t,e){var i;if(t>0)for(i=1;i<=t;++i)p.forward(e);else{if(!(t<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(i=-1;i>=t;--i)p.back(e)}return p},p.emulated.pushState){var e=function(){};p.pushState=p.pushState||e,p.replaceState=p.replaceState||e}else p.onPopState=function(t,e){var i,n,a=!1,r=!1;return p.doubleCheckComplete(),(i=p.getHash())?((n=p.extractState(i||p.getLocationHref(),!0))?p.replaceState(n.data,n.title,n.url,!1):(p.Adapter.trigger(window,"anchorchange"),p.busy(!1)),p.expectedStateId=!1,!1):(a=p.Adapter.extractEventData("state",t,e)||!1,(r=a?p.getStateById(a):p.expectedStateId?p.getStateById(p.expectedStateId):p.extractState(p.getLocationHref()))||(r=p.createStateObject(null,null,p.getLocationHref())),p.expectedStateId=!1,p.isLastSavedState(r)?(p.busy(!1),!1):(p.storeState(r),p.saveState(r),p.setTitle(r),p.Adapter.trigger(window,"statechange"),p.busy(!1),!0))},p.Adapter.bind(window,"popstate",p.onPopState),p.pushState=function(t,e,i,n){if(p.getHashByUrl(i)&&p.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(!1!==n&&p.busy())return p.pushQueue({scope:p,callback:p.pushState,args:arguments,queue:n}),!1;p.busy(!0);var a=p.createStateObject(t,e,i);return p.isLastSavedState(a)?p.busy(!1):(p.storeState(a),p.expectedStateId=a.id,f.pushState(a.id,a.title,a.url),p.Adapter.trigger(window,"popstate")),!0},p.replaceState=function(t,e,i,n){if(p.getHashByUrl(i)&&p.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(!1!==n&&p.busy())return p.pushQueue({scope:p,callback:p.replaceState,args:arguments,queue:n}),!1;p.busy(!0);var a=p.createStateObject(t,e,i);return p.isLastSavedState(a)?p.busy(!1):(p.storeState(a),p.expectedStateId=a.id,f.replaceState(a.id,a.title,a.url),p.Adapter.trigger(window,"popstate")),!0};if(o){try{p.store=d.parse(o.getItem("History.store"))||{}}catch(t){p.store={}}p.normalizeStore()}else p.store={},p.normalizeStore();p.Adapter.bind(window,"unload",p.clearAllIntervals),p.saveState(p.storeState(p.extractState(p.getLocationHref(),!0))),o&&(p.onUnload=function(){var t,e,i;try{t=d.parse(o.getItem("History.store"))||{}}catch(e){t={}}t.idToState=t.idToState||{},t.urlToId=t.urlToId||{},t.stateToId=t.stateToId||{};for(e in p.idToState)p.idToState.hasOwnProperty(e)&&(t.idToState[e]=p.idToState[e]);for(e in p.urlToId)p.urlToId.hasOwnProperty(e)&&(t.urlToId[e]=p.urlToId[e]);for(e in p.stateToId)p.stateToId.hasOwnProperty(e)&&(t.stateToId[e]=p.stateToId[e]);p.store=t,p.normalizeStore(),i=d.stringify(t);try{o.setItem("History.store",i)}catch(t){if(t.code!==DOMException.QUOTA_EXCEEDED_ERR)throw t;o.length&&(o.removeItem("History.store"),o.setItem("History.store",i))}},p.isInternetExplorer()&&p.intervalList.push(c(p.onUnload,p.options.storeInterval)),p.Adapter.bind(window,"beforeunload",p.onUnload),p.Adapter.bind(window,"unload",p.onUnload)),p.emulated.pushState||(p.bugs.safariPoll&&p.intervalList.push(c(p.safariStatePoll,p.options.safariPollInterval)),"Apple Computer, Inc."!==r.vendor&&"Mozilla"!==(r.appCodeName||"")||(p.Adapter.bind(window,"hashchange",function(){p.Adapter.trigger(window,"popstate")}),p.getHash()&&p.Adapter.onDomLoad(function(){p.Adapter.trigger(window,"hashchange")})))},p.options&&p.options.delayInit||p.init()),e.exports=p},{"./history-adapter":73}],75:[function(t,e,i){!function(){for(var t=0,e=["ms","moz","webkit","o"],i=0;i<e.length&&!window.requestAnimationFrame;++i)window.requestAnimationFrame=window[e[i]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[i]+"CancelAnimationFrame"]||window[e[i]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,i){var n=(new Date).getTime(),a=Math.max(0,16-(n-t)),r=window.setTimeout(function(){e(n+a)},a);return t=n+a,r}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}(),e.exports={}},{}],76:[function(t,e,i){var n=t("prime"),a=t("mout/lang/deepClone"),r=new n({constructor:function(t){t=a(t),this.setSession(t)},setSession:function(t){return t=t?{time:+new Date,data:a(t)}:{},this.session=t,this.session},getTime:function(){return this.session.time},getData:function(){return this.session.data},getSession:function(){return this.session},getDiff:function(t){return t}});e.exports=r},{"mout/lang/deepClone":199,prime:300}],77:[function(t,e,i){(function(i){"use strict";var n=t("mout/string/replace");e.exports=function(t,e){var a=i.G5T||function(t){return t};return n(a(t),"%s",e||"")}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"mout/string/replace":266}],78:[function(t,e,i){var n=t("elements");e.exports=function(t){if(!t)return!1;if((n("body").hasClass("wp-customizer")||n("body").hasClass("widgets-php"))&&jQuery){var e=t.parent(".widget-content"),i=t.siblings(".g-instancepicker-title");if(e){var a=jQuery.Event("change");a.target=t[0],jQuery(e[0]).trigger(a)}i&&setTimeout(function(){i.hideIndicator()},5)}}},{elements:112}],79:[function(t,e,i){"use strict";var n=t("prime"),a=t("prime/emitter"),r=t("mout/lang/isObject"),o=t("mout/lang/isString"),s=t("mout/lang/isArray"),l=t("mout/lang/isFunction"),c=t("mout/string/trim"),u=t("mout/string/upperCase"),d=t("mout/object/forIn"),h=t("mout/object/mixIn"),p=t("mout/array/remove"),f=t("mout/array/forEach"),m=function(t){return t.replace(/\b[a-z]/g,u)},g=function(){var t=function(){return new XMLHttpRequest},e=function(){return new ActiveXObject("MSXML2.XMLHTTP")},i=function(){return new ActiveXObject("Microsoft.XMLHTTP")};try{return t(),t}catch(t){}try{return e(),e}catch(t){}try{return i(),i}catch(t){}return null}(),v=function(t,e){if(null==t)return"";if(t.toQueryString)return t.toQueryString();var i=[];return d(t,function(t,n){e&&(n=e+"["+n+"]");var a;if(null!=t){if(s(t)){for(var o={},l=0;l<t.length;l++)o[l]=t[l];a=v(o,n)}else a=r(t)?v(t,n):n+"="+encodeURIComponent(t);i.push(a)}}),i.join("&")},b=JSON.parse,y={"application/json":function(t){return null==t?"":t.toJSON?t.toJSON():JSON.stringify(t)},"application/x-www-form-urlencoded":v},w={"application/json":b,"application/x-www-form-urlencoded":function(t){for(var e=t.split("&"),i={},n=0;n<e.length;n++){var a=e[n].split("="),r=decodeURIComponent(a[0]),o=decodeURIComponent(a[1]),s=/\[\]$/.test(r),l=r.match(/^(.+)\[([^\]]+)\]$/);if(l){r=l[1];var c=l[2];i[r]=i[r]||{},i[r][c]=o}else s?(i[r=r.substring(0,r.length-2)]=i[r]||[],i[r].push(o)):i[r]=o}return i}},x=function(t){var e=t.split(/\r?\n/),i={};e.pop();for(var n=0,a=e.length;n<a;++n){var r=e[n],o=r.indexOf(":"),s=m(r.slice(0,o)),l=c(r.slice(o+1));i[s]=l}return i},k=0,S=[],C=n({constructor:function(){this._header={"Content-Type":"application/x-www-form-urlencoded"}},header:function(t,e){if(r(t))for(var i in t)this.header(i,t[i]);else{if(!arguments.length)return this._header;if(1===arguments.length)return this._header[m(t)];2===arguments.length&&(null==e?delete this._header[m(t)]:this._header[m(t)]=e)}return this},running:function(){return!!this._running},abort:function(){return this._queued&&(p(S,this._queued),delete this._queued),this._xhr&&(this._xhr.abort(),this._end()),this},method:function(t){return arguments.length?(this._method=t.toUpperCase(),this):this._method},data:function(t){return arguments.length?(this._data=t,this):this._data},url:function(t){return arguments.length?(this._url=t,this):this._url},user:function(t){return arguments.length?(this._user=t,this):this._user},password:function(t){return arguments.length?(this._password=t,this):this._password},_send:function(t,e,i,n,a,r,o){var s=this;if(k===I.MAX_REQUESTS)return S.unshift(this._queued=function(){delete s._queued,s._send(t,e,i,n,a,r,o)});k++;var l=this._xhr=I.getRequest();l.addEventListener&&f(["progress","load","error","abort","loadend"],function(t){l.addEventListener(t,function(e){s.emit(t,e)},!1)}),l.open(t,e,!0,a,r),null!=a&&"withCredentials"in l&&(l.withCredentials=!0),l.onreadystatechange=function(){if(4===l.readyState){var i=l.status,n=new T(l.responseText,i,x(l.getAllResponseHeaders())),a=n.error?new Error(t+" "+e+" "+i):null;s._end(),o(a,n)}};for(var c in n)l.setRequestHeader(c,n[c]);l.send(i||null)},_end:function(){this._xhr.onreadystatechange=function(){},delete this._xhr,delete this._running,k--;var t=S.pop();t&&t()},send:function(t){this._running&&this.abort(),this._running=!0,t||(t=function(){});var e=this._method||"POST",i=this._data||null,n=this._url,a=this._user||null,r=this._password||null;if(i&&!o(i)){var s=this._header["Content-Type"].split(/ *; */).shift(),l=y[s];l&&(i=l(i))}/GET|HEAD/.test(e)&&i&&(n+=(n.indexOf("?")>-1?"&":"?")+i);var c=h({},this._header);return this._send(e,n,i,c,a,r,t),this}});C.implement(new a);var T=n({constructor:function(t,e,i){this.text=t,this.status=e,this.header=i;var n=e/100|0;this.info=1===n,this.ok=2===n,this.clientError=4===n,this.serverError=5===n,this.error=4===n||5===n;var a=""+i["Content-Length"];this.accepted=202===e,this.noContent="0"===a||204===e||1223===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.notFound=404===e;var r,o=i["Content-Type"]?i["Content-Type"].split(/ *; */).shift():"";this.noContent||(r=w[o]),this.body=r?r(this.text):this.text}}),E="get|post|put|delete|head|patch|options",O=new RegExp("^("+E+")$","i"),I=function(t,e,i,n){var a=new C;return arguments.length?(O.test(t)||(n=i,i=e,e=t,t="post"),l(i)&&(n=i,i=null),a.method(t),e&&a.url(e),i&&a.data(i),n&&a.send(n),a):a};I.encoder=function(t,e){return 1===arguments.length?y[t]:(y[t]=e,I)},I.decoder=function(t,e){return 1===arguments.length?w[t]:(w[t]=e,I)},f(E.split("|"),function(t){I[t]=function(e,i,n){return I(t,e,i,n)}}),I.MAX_REQUESTS=1/0,I.getRequest=g,I.Request=C,I.Response=T,e.exports=I},{"mout/array/forEach":80,"mout/array/remove":82,"mout/lang/isArray":84,"mout/lang/isFunction":85,"mout/lang/isObject":87,"mout/lang/isString":88,"mout/object/forIn":91,"mout/object/mixIn":94,"mout/string/trim":98,"mout/string/upperCase":99,prime:103,"prime/emitter":102}],80:[function(t,e,i){e.exports=function(t,e,i){if(null!=t)for(var n=-1,a=t.length;++n<a&&!1!==e.call(i,t[n],n,t););}},{}],81:[function(t,e,i){e.exports=function(t,e,i){if(i=i||0,null==t)return-1;for(var n=t.length,a=i<0?n+i:i;a<n;){if(t[a]===e)return a;a++}return-1}},{}],82:[function(t,e,i){var n=t("./indexOf");e.exports=function(t,e){var i=n(t,e);-1!==i&&t.splice(i,1)}},{"./indexOf":81}],83:[function(t,e,i){var n=t("../object/mixIn");e.exports=function(t,e){function i(){}return i.prototype=t,n(new i,e)}},{"../object/mixIn":94}],84:[function(t,e,i){var n=t("./isKind"),a=Array.isArray||function(t){return n(t,"Array")};e.exports=a},{"./isKind":86}],85:[function(t,e,i){var n=t("./isKind");e.exports=function(t){return n(t,"Function")}},{"./isKind":86}],86:[function(t,e,i){var n=t("./kindOf");e.exports=function(t,e){return n(t)===e}},{"./kindOf":89}],87:[function(t,e,i){var n=t("./isKind");e.exports=function(t){return n(t,"Object")}},{"./isKind":86}],88:[function(t,e,i){var n=t("./isKind");e.exports=function(t){return n(t,"String")}},{"./isKind":86}],89:[function(t,e,i){var n,a=/^\[object (.*)\]$/,r=Object.prototype.toString;e.exports=function(t){return null===t?"Null":t===n?"Undefined":a.exec(r.call(t))[1]}},{}],90:[function(t,e,i){e.exports=function(t){return null==t?"":t.toString()}},{}],91:[function(t,e,i){function n(){o=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=!0;for(var t in{toString:null})r=!1}function a(t,e,i,n){return t.call(n,e[i],i,e)}var r,o,s=t("./hasOwn");e.exports=function(t,e,i){var l,c=0;null==r&&n();for(l in t)if(!1===a(e,t,l,i))break;if(r)for(var u=t.constructor,d=!!u&&t===u.prototype;(l=o[c++])&&("constructor"===l&&(d||!s(t,l))||t[l]===Object.prototype[l]||!1!==a(e,t,l,i)););}},{"./hasOwn":93}],92:[function(t,e,i){var n=t("./hasOwn"),a=t("./forIn");e.exports=function(t,e,i){a(t,function(a,r){if(n(t,r))return e.call(i,t[r],r,t)})}},{"./forIn":91,"./hasOwn":93}],93:[function(t,e,i){e.exports=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},{}],94:[function(t,e,i){function n(t,e){this[e]=t}var a=t("./forOwn");e.exports=function(t,e){for(var i,r=0,o=arguments.length;++r<o;)null!=(i=arguments[r])&&a(i,n,t);return t}},{"./forOwn":92}],95:[function(t,e,i){e.exports=[" ","\n","\r","\t","\f","\v"," "," ","᠎"," "," "," "," "," "," "," "," "," "," "," ","\u2028","\u2029"," "," ","　"]},{}],96:[function(t,e,i){var n=t("../lang/toString"),a=t("./WHITE_SPACES");e.exports=function(t,e){t=n(t),e=e||a;for(var i,r,o=0,s=t.length,l=e.length,c=!0;c&&o<s;)for(c=!1,i=-1,r=t.charAt(o);++i<l;)if(r===e[i]){c=!0,o++;break}return o>=s?"":t.substr(o,s)}},{"../lang/toString":90,"./WHITE_SPACES":95}],97:[function(t,e,i){var n=t("../lang/toString"),a=t("./WHITE_SPACES");e.exports=function(t,e){t=n(t),e=e||a;for(var i,r,o=t.length-1,s=e.length,l=!0;l&&o>=0;)for(l=!1,i=-1,r=t.charAt(o);++i<s;)if(r===e[i]){l=!0,o--;break}return o>=0?t.substring(0,o+1):""}},{"../lang/toString":90,"./WHITE_SPACES":95}],98:[function(t,e,i){var n=t("../lang/toString"),a=t("./WHITE_SPACES"),r=t("./ltrim"),o=t("./rtrim");e.exports=function(t,e){return t=n(t),e=e||a,r(o(t,e),e)}},{"../lang/toString":90,"./WHITE_SPACES":95,"./ltrim":96,"./rtrim":97}],99:[function(t,e,i){var n=t("../lang/toString");e.exports=function(t){return(t=n(t)).toUpperCase()}},{"../lang/toString":90}],100:[function(t,e,i){function n(){return n.get()}n.get="function"==typeof Date.now?Date.now:function(){return+new Date},e.exports=n},{}],101:[function(t,e,i){(function(i,n){"use strict";var a=t("mout/lang/kindOf"),r=t("mout/time/now"),o=t("mout/array/forEach"),s=t("mout/array/indexOf"),l={timeout:{},frame:[],immediate:[]},c=function(t,e,i,n){t.length||n(function(){u(t)});var a={callback:e,context:i};return t.push(a),function(){var e=s(t,a);e>-1&&t.splice(e,1)}},u=function(t){var e=r();o(t.splice(0),function(t){t.callback.call(t.context,e)})},d=function(t,e,i){return"Number"===a(e)?d.timeout(t,e,i):d.immediate(t,e)};n.process&&i.nextTick?d.immediate=function(t,e){return c(l.immediate,t,e,i.nextTick)}:n.setImmediate?d.immediate=function(t,e){return c(l.immediate,t,e,setImmediate)}:n.postMessage&&n.addEventListener?(addEventListener("message",function(t){t.source===n&&"@deferred"===t.data&&(t.stopPropagation(),u(l.immediate))},!0),d.immediate=function(t,e){return c(l.immediate,t,e,function(){postMessage("@deferred","*")})}):d.immediate=function(t,e){return c(l.immediate,t,e,function(t){setTimeout(t,0)})};var h=n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||n.oRequestAnimationFrame||n.msRequestAnimationFrame||function(t){setTimeout(t,1e3/60)};d.frame=function(t,e){return c(l.frame,t,e,h)};var p;d.timeout=function(t,e,i){var n=l.timeout;return p||(p=d.immediate(function(){p=null,l.timeout={}})),c(n[e]||(n[e]=[]),t,i,function(t){setTimeout(t,e)})},e.exports=d}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:1,"mout/array/forEach":80,"mout/array/indexOf":81,"mout/lang/kindOf":89,"mout/time/now":100}],102:[function(t,e,i){"use strict";var n=t("mout/array/indexOf"),a=t("mout/array/forEach"),r=t("./index"),o=t("./defer"),s=Array.prototype.slice,l=r({on:function(t,e){var i=this._listeners||(this._listeners={}),a=i[t]||(i[t]=[]);return-1===n(a,e)&&a.push(e),this},off:function(t,e){var i,a=this._listeners;if(a&&(i=a[t])){var r=n(i,e);r>-1&&i.splice(r,1),i.length||delete a[t];for(var o in a)return this;delete this._listeners}return this},emit:function(t){var e=this,i=s.call(arguments,1),n=function(){var n,r=e._listeners;r&&(n=r[t])&&a(n.slice(0),function(t){return t.apply(e,i)})};return i[i.length-1]===l.EMIT_SYNC?(i.pop(),n()):o(n),this}});l.EMIT_SYNC={},e.exports=l},{"./defer":101,"./index":103,"mout/array/forEach":80,"mout/array/indexOf":81}],103:[function(t,e,i){"use strict";var n=t("mout/object/hasOwn"),a=t("mout/object/mixIn"),r=t("mout/lang/createObject"),o=t("mout/lang/kindOf"),s=!0;try{Object.defineProperty({},"~",{}),Object.getOwnPropertyDescriptor({},"~")}catch(t){s=!1}var l=!{valueOf:0}.propertyIsEnumerable("valueOf"),c=["toString","valueOf"],u=/^constructor|inherits|mixin$/,d=function(t){var e=this.prototype;for(var i in t)if(!i.match(u)){if(s){var n=Object.getOwnPropertyDescriptor(t,i);if(n){Object.defineProperty(e,i,n);continue}}e[i]=t[i]}if(l)for(var a=0;i=c[a];a++){var r=t[i];r!==Object.prototype[i]&&(e[i]=r)}return this};e.exports=function(t){"Function"===o(t)&&(t={constructor:t});var e=t.inherits,i=n(t,"constructor")?t.constructor:e?function(){return e.apply(this,arguments)}:function(){};if(e){a(i,e);var s=e.prototype,l=i.prototype=r(s);i.parent=s,l.constructor=i}i.implement||(i.implement=d);var c=t.mixin;if(c){"Array"!==o(c)&&(c=[c]);for(var u=0;u<c.length;u++)i.implement(r(c[u].prototype))}return i.implement(t)}},{"mout/lang/createObject":83,"mout/lang/kindOf":89,"mout/object/hasOwn":93,"mout/object/mixIn":94}],104:[function(t,e,i){e.exports=function(t,e,i,n,a){var r=function(e){var n=1-e;return 3*n*n*e*t+3*n*e*e*i+e*e*e},o=function(t){var i=1-t;return 3*i*i*t*e+3*i*t*t*n+t*t*t},s=function(e){var n=1-e;return 3*(2*(e-1)*e+n*n)*t+3*(-e*e*e+2*n*e)*i};return function(t){var e,i,n,l,c,u,d=t;for(n=d,u=0;u<8;u++){if(l=r(n)-d,Math.abs(l)<a)return o(n);if(c=s(n),Math.abs(c)<1e-6)break;n-=l/c}if(e=0,i=1,(n=d)<e)return o(e);if(n>i)return o(i);for(;e<i;){if(l=r(n),Math.abs(l-d)<a)return o(n);d>l?e=n:i=n,n=.5*(i-e)+e}return o(n)}}},{}],105:[function(t,e,i){(function(t){!function(t,n){"object"==typeof i&&void 0!==e?e.exports=n():"function"==typeof define&&define.amd?define(n):t.DeepDiff=n()}(this,function(){"use strict";function e(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}function i(t,e){Object.defineProperty(this,"kind",{value:t,enumerable:!0}),e&&e.length&&Object.defineProperty(this,"path",{value:e,enumerable:!0})}function n(t,e,i){n.super_.call(this,"E",t),Object.defineProperty(this,"lhs",{value:e,enumerable:!0}),Object.defineProperty(this,"rhs",{value:i,enumerable:!0})}function a(t,e){a.super_.call(this,"N",t),Object.defineProperty(this,"rhs",{value:e,enumerable:!0})}function r(t,e){r.super_.call(this,"D",t),Object.defineProperty(this,"lhs",{value:e,enumerable:!0})}function o(t,e,i){o.super_.call(this,"A",t),Object.defineProperty(this,"index",{value:e,enumerable:!0}),Object.defineProperty(this,"item",{value:i,enumerable:!0})}function s(t,e,i){var n=t.slice((i||e)+1||t.length);return t.length=e<0?t.length+e:e,t.push.apply(t,n),t}function l(t){var e=typeof t;return"object"!==e?e:t===Math?"math":null===t?"null":Array.isArray(t)?"array":"[object Date]"===Object.prototype.toString.call(t)?"date":"function"==typeof t.toString&&/^\/.*\//.test(t.toString())?"regexp":"object"}function c(t,e,i,u,d,h,p){d=d||[],p=p||[];var f=d.slice(0);if(void 0!==h){if(u){if("function"==typeof u&&u(f,h))return;if("object"==typeof u){if(u.prefilter&&u.prefilter(f,h))return;if(u.normalize){var m=u.normalize(f,h,t,e);m&&(t=m[0],e=m[1])}}}f.push(h)}"regexp"===l(t)&&"regexp"===l(e)&&(t=t.toString(),e=e.toString());var g=typeof t,v=typeof e,b="undefined"!==g||p&&p[p.length-1].lhs&&p[p.length-1].lhs.hasOwnProperty(h),y="undefined"!==v||p&&p[p.length-1].rhs&&p[p.length-1].rhs.hasOwnProperty(h);if(!b&&y)i(new a(f,e));else if(!y&&b)i(new r(f,t));else if(l(t)!==l(e))i(new n(f,t,e));else if("date"===l(t)&&t-e!=0)i(new n(f,t,e));else if("object"===g&&null!==t&&null!==e)if(p.filter(function(e){return e.lhs===t}).length)t!==e&&i(new n(f,t,e));else{if(p.push({lhs:t,rhs:e}),Array.isArray(t)){var w;t.length;for(w=0;w<t.length;w++)w>=e.length?i(new o(f,w,new r(void 0,t[w]))):c(t[w],e[w],i,u,f,w,p);for(;w<e.length;)i(new o(f,w,new a(void 0,e[w++])))}else{var x=Object.keys(t),k=Object.keys(e);x.forEach(function(n,a){var r=k.indexOf(n);r>=0?(c(t[n],e[n],i,u,f,n,p),k=s(k,r)):c(t[n],void 0,i,u,f,n,p)}),k.forEach(function(t){c(void 0,e[t],i,u,f,t,p)})}p.length=p.length-1}else t!==e&&("number"===g&&isNaN(t)&&isNaN(e)||i(new n(f,t,e)))}function u(t,e,i,n){return n=n||[],c(t,e,function(t){t&&n.push(t)},i),n.length?n:void 0}function d(t,e,i){if(i.path&&i.path.length){var n,a=t[e],r=i.path.length-1;for(n=0;n<r;n++)a=a[i.path[n]];switch(i.kind){case"A":d(a[i.path[n]],i.index,i.item);break;case"D":delete a[i.path[n]];break;case"E":case"N":a[i.path[n]]=i.rhs}}else switch(i.kind){case"A":d(t[e],i.index,i.item);break;case"D":t=s(t,e);break;case"E":case"N":t[e]=i.rhs}return t}function h(t,e,i){if(t&&e&&i&&i.kind){for(var n=t,a=-1,r=i.path?i.path.length-1:0;++a<r;)void 0===n[i.path[a]]&&(n[i.path[a]]="number"==typeof i.path[a]?[]:{}),n=n[i.path[a]];switch(i.kind){case"A":d(i.path?n[i.path[a]]:n,i.index,i.item);break;case"D":delete n[i.path[a]];break;case"E":case"N":n[i.path[a]]=i.rhs}}}function p(t,e,i){if(i.path&&i.path.length){var n,a=t[e],r=i.path.length-1;for(n=0;n<r;n++)a=a[i.path[n]];switch(i.kind){case"A":p(a[i.path[n]],i.index,i.item);break;case"D":case"E":a[i.path[n]]=i.lhs;break;case"N":delete a[i.path[n]]}}else switch(i.kind){case"A":p(t[e],i.index,i.item);break;case"D":case"E":t[e]=i.lhs;break;case"N":t=s(t,e)}return t}var f,m,g=[];return f="object"==typeof t&&t?t:"undefined"!=typeof window?window:{},(m=f.DeepDiff)&&g.push(function(){void 0!==m&&f.DeepDiff===u&&(f.DeepDiff=m,m=void 0)}),e(n,i),e(a,i),e(r,i),e(o,i),Object.defineProperties(u,{diff:{value:u,enumerable:!0},observableDiff:{value:c,enumerable:!0},applyDiff:{value:function(t,e,i){t&&e&&c(t,e,function(n){i&&!i(t,e,n)||h(t,e,n)})},enumerable:!0},applyChange:{value:h,enumerable:!0},revertChange:{value:function(t,e,i){if(t&&e&&i&&i.kind){var n,a,r=t;for(a=i.path.length-1,n=0;n<a;n++)void 0===r[i.path[n]]&&(r[i.path[n]]={}),r=r[i.path[n]];switch(i.kind){case"A":p(r[i.path[n]],i.index,i.item);break;case"D":case"E":r[i.path[n]]=i.lhs;break;case"N":delete r[i.path[n]]}}},enumerable:!0},isConflict:{value:function(){return void 0!==m},enumerable:!0},noConflict:{value:function(){return g&&(g.forEach(function(t){t()}),g=null),u},enumerable:!0}}),u})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],106:[function(t,e,i){(function(){var t,i,n,a,r,o,s,l,c,u=[].slice,d=function(t,e){function i(){this.constructor=t}for(var n in e)h.call(e,n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},h={}.hasOwnProperty;l=function(){},i=function(){function t(){}return t.prototype.addEventListener=t.prototype.on,t.prototype.on=function(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this},t.prototype.emit=function(){var t,e,i,n,a;if(i=arguments[0],t=2<=arguments.length?u.call(arguments,1):[],this._callbacks=this._callbacks||{},e=this._callbacks[i])for(n=0,a=e.length;n<a;n++)e[n].apply(this,t);return this},t.prototype.removeListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.off=function(t,e){var i,n,a,r;if(!this._callbacks||0===arguments.length)return this._callbacks={},this;if(!(i=this._callbacks[t]))return this;if(1===arguments.length)return delete this._callbacks[t],this;for(n=a=0,r=i.length;a<r;n=++a)if(i[n]===e){i.splice(n,1);break}return this},t}(),(t=function(t){function e(t,i){var n,r,o;if(this.element=t,this.version=e.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");if(e.instances.push(this),this.element.dropzone=this,n=null!=(o=e.optionsForElement(this.element))?o:{},this.options=a({},this.defaultOptions,n,null!=i?i:{}),this.options.forceFallback||!e.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),null!=this.options.renameFilename&&(this.options.renameFile=function(t){return function(e){return t.options.renameFilename.call(t,e.name,e)}}(this)),this.options.method=this.options.method.toUpperCase(),(r=this.getExistingFallback())&&r.parentNode&&r.parentNode.removeChild(r),!1!==this.options.previewsContainer&&(this.options.previewsContainer?this.previewsContainer=e.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(!0===this.options.clickable?this.clickableElements=[this.element]:this.clickableElements=e.getElements(this.options.clickable,"clickable")),this.init()}var a,r;return d(e,t),e.prototype.Emitter=i,e.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],e.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,timeout:3e4,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,params:{},headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){return l},accept:function(t,e){return e()},fallback:function(){var t,i,n,a,r,o;for(this.element.className=this.element.className+" dz-browser-not-supported",i=0,n=(r=this.element.getElementsByTagName("div")).length;i<n;i++)t=r[i],/(^| )dz-message($| )/.test(t.className)&&(a=t,t.className="dz-message");return a||(a=e.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(a)),(o=a.getElementsByTagName("span")[0])&&(null!=o.textContent?o.textContent=this.options.dictFallbackMessage:null!=o.innerText&&(o.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(t,e,i,n){var a,r,o;if(a={srcX:0,srcY:0,srcWidth:t.width,srcHeight:t.height},r=t.width/t.height,null==e&&null==i?(e=a.srcWidth,i=a.srcHeight):null==e?e=i*r:null==i&&(i=e/r),e=Math.min(e,a.srcWidth),i=Math.min(i,a.srcHeight),o=e/i,a.srcWidth>e||a.srcHeight>i)if("crop"===n)r>o?(a.srcHeight=t.height,a.srcWidth=a.srcHeight*o):(a.srcWidth=t.width,a.srcHeight=a.srcWidth/o);else{if("contain"!==n)throw new Error("Unknown resizeMethod '"+n+"'");r>o?i=e/r:e=i*r}return a.srcX=(t.width-a.srcWidth)/2,a.srcY=(t.height-a.srcHeight)/2,a.trgWidth=e,a.trgHeight=i,a},transformFile:function(t,e){return(this.options.resizeWidth||this.options.resizeHeight)&&t.type.match(/image.*/)?this.resizeImage(t,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,e):e(t)},previewTemplate:'<div class="dz-preview dz-file-preview">\n  <div class="dz-image"><img data-dz-thumbnail /></div>\n  <div class="dz-details">\n    <div class="dz-size"><span data-dz-size></span></div>\n    <div class="dz-filename"><span data-dz-name></span></div>\n  </div>\n  <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>\n  <div class="dz-error-message"><span data-dz-errormessage></span></div>\n  <div class="dz-success-mark">\n    <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n      <title>Check</title>\n      <defs></defs>\n      <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n        <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>\n      </g>\n    </svg>\n  </div>\n  <div class="dz-error-mark">\n    <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">\n      <title>Error</title>\n      <defs></defs>\n      <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">\n        <g id="Check-+-Oval-2" sketch:type="MSLayerGroup" stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475">\n          <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" id="Oval-2" sketch:type="MSShapeGroup"></path>\n        </g>\n      </g>\n    </svg>\n  </div>\n</div>',drop:function(t){return this.element.classList.remove("dz-drag-hover")},dragstart:l,dragend:function(t){return this.element.classList.remove("dz-drag-hover")},dragenter:function(t){return this.element.classList.add("dz-drag-hover")},dragover:function(t){return this.element.classList.add("dz-drag-hover")},dragleave:function(t){return this.element.classList.remove("dz-drag-hover")},paste:l,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(t){var i,n,a,r,o,s,l,c,u,d,h,p;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(t.previewElement=e.createElement(this.options.previewTemplate.trim()),t.previewTemplate=t.previewElement,this.previewsContainer.appendChild(t.previewElement),i=0,r=(l=t.previewElement.querySelectorAll("[data-dz-name]")).length;i<r;i++)l[i].textContent=t.name;for(n=0,o=(c=t.previewElement.querySelectorAll("[data-dz-size]")).length;n<o;n++)c[n].innerHTML=this.filesize(t.size);for(this.options.addRemoveLinks&&(t._removeLink=e.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'+this.options.dictRemoveFile+"</a>"),t.previewElement.appendChild(t._removeLink)),d=function(i){return function(n){return n.preventDefault(),n.stopPropagation(),t.status===e.UPLOADING?e.confirm(i.options.dictCancelUploadConfirmation,function(){return i.removeFile(t)}):i.options.dictRemoveFileConfirmation?e.confirm(i.options.dictRemoveFileConfirmation,function(){return i.removeFile(t)}):i.removeFile(t)}}(this),p=[],a=0,s=(u=t.previewElement.querySelectorAll("[data-dz-remove]")).length;a<s;a++)h=u[a],p.push(h.addEventListener("click",d));return p}},removedfile:function(t){var e;return t.previewElement&&null!=(e=t.previewElement)&&e.parentNode.removeChild(t.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(t,e){var i,n,a,r;if(t.previewElement){for(t.previewElement.classList.remove("dz-file-preview"),i=0,n=(a=t.previewElement.querySelectorAll("[data-dz-thumbnail]")).length;i<n;i++)(r=a[i]).alt=t.name,r.src=e;return setTimeout(function(){return t.previewElement.classList.add("dz-image-preview")},1)}},error:function(t,e){var i,n,a,r,o;if(t.previewElement){for(t.previewElement.classList.add("dz-error"),"String"!=typeof e&&e.error&&(e=e.error),o=[],i=0,n=(r=t.previewElement.querySelectorAll("[data-dz-errormessage]")).length;i<n;i++)a=r[i],o.push(a.textContent=e);return o}},errormultiple:l,processing:function(t){if(t.previewElement&&(t.previewElement.classList.add("dz-processing"),t._removeLink))return t._removeLink.textContent=this.options.dictCancelUpload},processingmultiple:l,uploadprogress:function(t,e,i){var n,a,r,o,s;if(t.previewElement){for(s=[],n=0,a=(o=t.previewElement.querySelectorAll("[data-dz-uploadprogress]")).length;n<a;n++)"PROGRESS"===(r=o[n]).nodeName?s.push(r.value=e):s.push(r.style.width=e+"%");return s}},totaluploadprogress:l,sending:l,sendingmultiple:l,success:function(t){if(t.previewElement)return t.previewElement.classList.add("dz-success")},successmultiple:l,canceled:function(t){return this.emit("error",t,"Upload canceled.")},canceledmultiple:l,complete:function(t){if(t._removeLink&&(t._removeLink.textContent=this.options.dictRemoveFile),t.previewElement)return t.previewElement.classList.add("dz-complete")},completemultiple:l,maxfilesexceeded:l,maxfilesreached:l,queuecomplete:l,addedfiles:l},a=function(){var t,e,i,n,a,r,o;for(r=arguments[0],t=0,i=(a=2<=arguments.length?u.call(arguments,1):[]).length;t<i;t++){n=a[t];for(e in n)o=n[e],r[e]=o}return r},e.prototype.getAcceptedFiles=function(){var t,e,i,n,a;for(a=[],e=0,i=(n=this.files).length;e<i;e++)(t=n[e]).accepted&&a.push(t);return a},e.prototype.getRejectedFiles=function(){var t,e,i,n,a;for(a=[],e=0,i=(n=this.files).length;e<i;e++)(t=n[e]).accepted||a.push(t);return a},e.prototype.getFilesWithStatus=function(t){var e,i,n,a,r;for(r=[],i=0,n=(a=this.files).length;i<n;i++)(e=a[i]).status===t&&r.push(e);return r},e.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(e.QUEUED)},e.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(e.UPLOADING)},e.prototype.getAddedFiles=function(){return this.getFilesWithStatus(e.ADDED)},e.prototype.getActiveFiles=function(){var t,i,n,a,r;for(r=[],i=0,n=(a=this.files).length;i<n;i++)(t=a[i]).status!==e.UPLOADING&&t.status!==e.QUEUED||r.push(t);return r},e.prototype.init=function(){var t,i,n,a,r,o,s;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(e.createElement('<div class="dz-default dz-message"><span>'+this.options.dictDefaultMessage+"</span></div>")),this.clickableElements.length&&(s=function(t){return function(){return t.hiddenFileInput&&t.hiddenFileInput.parentNode.removeChild(t.hiddenFileInput),t.hiddenFileInput=document.createElement("input"),t.hiddenFileInput.setAttribute("type","file"),(null==t.options.maxFiles||t.options.maxFiles>1)&&t.hiddenFileInput.setAttribute("multiple","multiple"),t.hiddenFileInput.className="dz-hidden-input",null!=t.options.acceptedFiles&&t.hiddenFileInput.setAttribute("accept",t.options.acceptedFiles),null!=t.options.capture&&t.hiddenFileInput.setAttribute("capture",t.options.capture),t.hiddenFileInput.style.visibility="hidden",t.hiddenFileInput.style.position="absolute",t.hiddenFileInput.style.top="0",t.hiddenFileInput.style.left="0",t.hiddenFileInput.style.height="0",t.hiddenFileInput.style.width="0",document.querySelector(t.options.hiddenInputContainer).appendChild(t.hiddenFileInput),t.hiddenFileInput.addEventListener("change",function(){var e,i,n,a;if((i=t.hiddenFileInput.files).length)for(n=0,a=i.length;n<a;n++)e=i[n],t.addFile(e);return t.emit("addedfiles",i),s()})}}(this))(),this.URL=null!=(r=window.URL)?r:window.webkitURL,i=0,n=(o=this.events).length;i<n;i++)t=o[i],this.on(t,this.options[t]);return this.on("uploadprogress",function(t){return function(){return t.updateTotalUploadProgress()}}(this)),this.on("removedfile",function(t){return function(){return t.updateTotalUploadProgress()}}(this)),this.on("canceled",function(t){return function(e){return t.emit("complete",e)}}(this)),this.on("complete",function(t){return function(e){if(0===t.getAddedFiles().length&&0===t.getUploadingFiles().length&&0===t.getQueuedFiles().length)return setTimeout(function(){return t.emit("queuecomplete")},0)}}(this)),a=function(t){return t.stopPropagation(),t.preventDefault?t.preventDefault():t.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(t){return function(e){return t.emit("dragstart",e)}}(this),dragenter:function(t){return function(e){return a(e),t.emit("dragenter",e)}}(this),dragover:function(t){return function(e){var i;try{i=e.dataTransfer.effectAllowed}catch(t){}return e.dataTransfer.dropEffect="move"===i||"linkMove"===i?"move":"copy",a(e),t.emit("dragover",e)}}(this),dragleave:function(t){return function(e){return t.emit("dragleave",e)}}(this),drop:function(t){return function(e){return a(e),t.drop(e)}}(this),dragend:function(t){return function(e){return t.emit("dragend",e)}}(this)}}],this.clickableElements.forEach(function(t){return function(i){return t.listeners.push({element:i,events:{click:function(n){return(i!==t.element||n.target===t.element||e.elementInside(n.target,t.element.querySelector(".dz-message")))&&t.hiddenFileInput.click(),!0}}})}}(this)),this.enable(),this.options.init.call(this)},e.prototype.destroy=function(){var t;return this.disable(),this.removeAllFiles(!0),(null!=(t=this.hiddenFileInput)?t.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,e.instances.splice(e.instances.indexOf(this),1)},e.prototype.updateTotalUploadProgress=function(){var t,e,i,n,a,r,o;if(r=0,a=0,this.getActiveFiles().length){for(e=0,i=(n=this.getActiveFiles()).length;e<i;e++)r+=(t=n[e]).upload.bytesSent,a+=t.upload.total;o=100*r/a}else o=100;return this.emit("totaluploadprogress",o,a,r)},e.prototype._getParamName=function(t){return"function"==typeof this.options.paramName?this.options.paramName(t):this.options.paramName+(this.options.uploadMultiple?"["+t+"]":"")},e.prototype._renameFile=function(t){return"function"!=typeof this.options.renameFile?t.name:this.options.renameFile(t)},e.prototype.getFallbackForm=function(){var t,i,n,a;return(t=this.getExistingFallback())?t:(n='<div class="dz-fallback">',this.options.dictFallbackText&&(n+="<p>"+this.options.dictFallbackText+"</p>"),n+='<input type="file" name="'+this._getParamName(0)+'" '+(this.options.uploadMultiple?'multiple="multiple"':void 0)+' /><input type="submit" value="Upload!"></div>',i=e.createElement(n),"FORM"!==this.element.tagName?(a=e.createElement('<form action="'+this.options.url+'" enctype="multipart/form-data" method="'+this.options.method+'"></form>')).appendChild(i):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=a?a:i)},e.prototype.getExistingFallback=function(){var t,e,i,n,a,r;for(e=function(t){var e,i,n;for(i=0,n=t.length;i<n;i++)if(e=t[i],/(^| )fallback($| )/.test(e.className))return e},i=0,n=(a=["div","form"]).length;i<n;i++)if(r=a[i],t=e(this.element.getElementsByTagName(r)))return t},e.prototype.setupEventListeners=function(){var t,e,i,n,a,r,o;for(o=[],i=0,n=(r=this.listeners).length;i<n;i++)t=r[i],o.push(function(){var i,n;i=t.events,n=[];for(e in i)a=i[e],n.push(t.element.addEventListener(e,a,!1));return n}());return o},e.prototype.removeEventListeners=function(){var t,e,i,n,a,r,o;for(o=[],i=0,n=(r=this.listeners).length;i<n;i++)t=r[i],o.push(function(){var i,n;i=t.events,n=[];for(e in i)a=i[e],n.push(t.element.removeEventListener(e,a,!1));return n}());return o},e.prototype.disable=function(){var t,e,i,n,a;for(this.clickableElements.forEach(function(t){return t.classList.remove("dz-clickable")}),this.removeEventListeners(),a=[],e=0,i=(n=this.files).length;e<i;e++)t=n[e],a.push(this.cancelUpload(t));return a},e.prototype.enable=function(){return this.clickableElements.forEach(function(t){return t.classList.add("dz-clickable")}),this.setupEventListeners()},e.prototype.filesize=function(t){var e,i,n,a,r,o,s,l;if(r=0,o="b",t>0){for(i=n=0,a=(l=["tb","gb","mb","kb","b"]).length;n<a;i=++n)if(s=l[i],e=Math.pow(this.options.filesizeBase,4-i)/10,t>=e){r=t/Math.pow(this.options.filesizeBase,4-i),o=s;break}r=Math.round(10*r)/10}return"<strong>"+r+"</strong> "+this.options.dictFileSizeUnits[o]},e.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},e.prototype.drop=function(t){var e,i;t.dataTransfer&&(this.emit("drop",t),e=t.dataTransfer.files,this.emit("addedfiles",e),e.length&&((i=t.dataTransfer.items)&&i.length&&null!=i[0].webkitGetAsEntry?this._addFilesFromItems(i):this.handleFiles(e)))},e.prototype.paste=function(t){var e,i;if(null!=(null!=t&&null!=(i=t.clipboardData)?i.items:void 0))return this.emit("paste",t),(e=t.clipboardData.items).length?this._addFilesFromItems(e):void 0},e.prototype.handleFiles=function(t){var e,i,n,a;for(a=[],i=0,n=t.length;i<n;i++)e=t[i],a.push(this.addFile(e));return a},e.prototype._addFilesFromItems=function(t){var e,i,n,a,r;for(r=[],n=0,a=t.length;n<a;n++)null!=(i=t[n]).webkitGetAsEntry&&(e=i.webkitGetAsEntry())?e.isFile?r.push(this.addFile(i.getAsFile())):e.isDirectory?r.push(this._addFilesFromDirectory(e,e.name)):r.push(void 0):null!=i.getAsFile&&(null==i.kind||"file"===i.kind)?r.push(this.addFile(i.getAsFile())):r.push(void 0);return r},e.prototype._addFilesFromDirectory=function(t,e){var i,n,a;return i=t.createReader(),n=function(t){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(t):void 0},(a=function(t){return function(){return i.readEntries(function(i){var n,r,o;if(i.length>0){for(r=0,o=i.length;r<o;r++)(n=i[r]).isFile?n.file(function(i){if(!t.options.ignoreHiddenFiles||"."!==i.name.substring(0,1))return i.fullPath=e+"/"+i.name,t.addFile(i)}):n.isDirectory&&t._addFilesFromDirectory(n,e+"/"+n.name);a()}return null},n)}}(this))()},e.prototype.accept=function(t,i){return t.size>1024*this.options.maxFilesize*1024?i(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(t.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):e.isValidFile(t,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(i(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",t)):this.options.accept.call(this,t,i):i(this.options.dictInvalidFileType)},e.prototype.addFile=function(t){return t.upload={progress:0,total:t.size,bytesSent:0,filename:this._renameFile(t)},this.files.push(t),t.status=e.ADDED,this.emit("addedfile",t),this._enqueueThumbnail(t),this.accept(t,function(e){return function(i){return i?(t.accepted=!1,e._errorProcessing([t],i)):(t.accepted=!0,e.options.autoQueue&&e.enqueueFile(t)),e._updateMaxFilesReachedClass()}}(this))},e.prototype.enqueueFiles=function(t){var e,i,n;for(i=0,n=t.length;i<n;i++)e=t[i],this.enqueueFile(e);return null},e.prototype.enqueueFile=function(t){if(t.status!==e.ADDED||!0!==t.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(t.status=e.QUEUED,this.options.autoProcessQueue)return setTimeout(function(t){return function(){return t.processQueue()}}(this),0)},e.prototype._thumbnailQueue=[],e.prototype._processingThumbnail=!1,e.prototype._enqueueThumbnail=function(t){if(this.options.createImageThumbnails&&t.type.match(/image.*/)&&t.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(t),setTimeout(function(t){return function(){return t._processThumbnailQueue()}}(this),0)},e.prototype._processThumbnailQueue=function(){var t;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length)return this._processingThumbnail=!0,t=this._thumbnailQueue.shift(),this.createThumbnail(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(e){return function(i){return e.emit("thumbnail",t,i),e._processingThumbnail=!1,e._processThumbnailQueue()}}(this))},e.prototype.removeFile=function(t){if(t.status===e.UPLOADING&&this.cancelUpload(t),this.files=c(this.files,t),this.emit("removedfile",t),0===this.files.length)return this.emit("reset")},e.prototype.removeAllFiles=function(t){var i,n,a,r;for(null==t&&(t=!1),n=0,a=(r=this.files.slice()).length;n<a;n++)((i=r[n]).status!==e.UPLOADING||t)&&this.removeFile(i);return null},e.prototype.resizeImage=function(t,i,a,r,o){return this.createThumbnail(t,i,a,r,!1,function(i){return function(a,r){var s,l;return null===r?o(t):(null==(s=i.options.resizeMimeType)&&(s=t.type),l=r.toDataURL(s,i.options.resizeQuality),"image/jpeg"!==s&&"image/jpg"!==s||(l=n.restore(t.dataURL,l)),o(e.dataURItoBlob(l)))}}(this))},e.prototype.createThumbnail=function(t,e,i,n,a,r){var o;return o=new FileReader,o.onload=function(s){return function(){t.dataURL=o.result;{if("image/svg+xml"!==t.type)return s.createThumbnailFromUrl(t,e,i,n,a,r);null!=r&&r(o.result)}}}(this),o.readAsDataURL(t)},e.prototype.createThumbnailFromUrl=function(t,e,i,n,a,r,o){var l;return l=document.createElement("img"),o&&(l.crossOrigin=o),l.onload=function(o){return function(){var c;return c=function(t){return t(1)},"undefined"!=typeof EXIF&&null!==EXIF&&a&&(c=function(t){return EXIF.getData(l,function(){return t(EXIF.getTag(this,"Orientation"))})}),c(function(a){var c,u,d,h,p,f,m,g;switch(t.width=l.width,t.height=l.height,m=o.options.resize.call(o,t,e,i,n),c=document.createElement("canvas"),u=c.getContext("2d"),c.width=m.trgWidth,c.height=m.trgHeight,a>4&&(c.width=m.trgHeight,c.height=m.trgWidth),a){case 2:u.translate(c.width,0),u.scale(-1,1);break;case 3:u.translate(c.width,c.height),u.rotate(Math.PI);break;case 4:u.translate(0,c.height),u.scale(1,-1);break;case 5:u.rotate(.5*Math.PI),u.scale(1,-1);break;case 6:u.rotate(.5*Math.PI),u.translate(0,-c.height);break;case 7:u.rotate(.5*Math.PI),u.translate(c.width,-c.height),u.scale(-1,1);break;case 8:u.rotate(-.5*Math.PI),u.translate(-c.width,0)}if(s(u,l,null!=(d=m.srcX)?d:0,null!=(h=m.srcY)?h:0,m.srcWidth,m.srcHeight,null!=(p=m.trgX)?p:0,null!=(f=m.trgY)?f:0,m.trgWidth,m.trgHeight),g=c.toDataURL("image/png"),null!=r)return r(g,c)})}}(this),null!=r&&(l.onerror=r),l.src=t.dataURL},e.prototype.processQueue=function(){var t,e,i,n;if(e=this.options.parallelUploads,i=this.getUploadingFiles().length,t=i,!(i>=e)&&(n=this.getQueuedFiles()).length>0){if(this.options.uploadMultiple)return this.processFiles(n.slice(0,e-i));for(;t<e;){if(!n.length)return;this.processFile(n.shift()),t++}}},e.prototype.processFile=function(t){return this.processFiles([t])},e.prototype.processFiles=function(t){var i,n,a;for(n=0,a=t.length;n<a;n++)(i=t[n]).processing=!0,i.status=e.UPLOADING,this.emit("processing",i);return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)},e.prototype._getFilesWithXhr=function(t){var e;return function(){var i,n,a,r;for(r=[],i=0,n=(a=this.files).length;i<n;i++)(e=a[i]).xhr===t&&r.push(e);return r}.call(this)},e.prototype.cancelUpload=function(t){var i,n,a,r,o,s,l;if(t.status===e.UPLOADING){for(a=0,o=(n=this._getFilesWithXhr(t.xhr)).length;a<o;a++)(i=n[a]).status=e.CANCELED;for(t.xhr.abort(),r=0,s=n.length;r<s;r++)i=n[r],this.emit("canceled",i);this.options.uploadMultiple&&this.emit("canceledmultiple",n)}else(l=t.status)!==e.ADDED&&l!==e.QUEUED||(t.status=e.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));if(this.options.autoProcessQueue)return this.processQueue()},r=function(){var t,e;return e=arguments[0],t=2<=arguments.length?u.call(arguments,1):[],"function"==typeof e?e.apply(this,t):e},e.prototype.uploadFile=function(t){return this.uploadFiles([t])},e.prototype.uploadFiles=function(t){var i,n,o,s,l,c,u,d,h,p,f,m,g,v,b,y,w,x,k,S,C,T,E,O,I,_,A,N,j,D,z,F,R,L,P,M;for(M=new XMLHttpRequest,g=0,w=t.length;g<w;g++)(o=t[g]).xhr=M;T=r(this.options.method,t),L=r(this.options.url,t),M.open(T,L,!0),M.timeout=r(this.options.timeout,t),M.withCredentials=!!this.options.withCredentials,z=null,l=function(e){return function(){var i,n,a;for(a=[],i=0,n=t.length;i<n;i++)o=t[i],a.push(e._errorProcessing(t,z||e.options.dictResponseError.replace("{{statusCode}}",M.status),M));return a}}(this),R=function(e){return function(i){var n,a,r,s,l,c,u,d,h;if(null!=i)for(d=100*i.loaded/i.total,a=0,s=t.length;a<s;a++)(o=t[a]).upload.progress=d,o.upload.total=i.total,o.upload.bytesSent=i.loaded;else{for(n=!0,d=100,r=0,l=t.length;r<l;r++)100===(o=t[r]).upload.progress&&o.upload.bytesSent===o.upload.total||(n=!1),o.upload.progress=d,o.upload.bytesSent=o.upload.total;if(n)return}for(h=[],u=0,c=t.length;u<c;u++)o=t[u],h.push(e.emit("uploadprogress",o,d,o.upload.bytesSent));return h}}(this),M.onload=function(i){return function(n){var a;if(t[0].status!==e.CANCELED&&4===M.readyState){if("arraybuffer"!==M.responseType&&"blob"!==M.responseType&&(z=M.responseText,M.getResponseHeader("content-type")&&~M.getResponseHeader("content-type").indexOf("application/json")))try{z=JSON.parse(z)}catch(t){n=t,z="Invalid JSON response from server."}return R(),200<=(a=M.status)&&a<300?i._finished(t,z,n):l()}}}(this),M.onerror=function(){if(t[0].status!==e.CANCELED)return l()},(null!=(I=M.upload)?I:M).onprogress=R,d={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&a(d,this.options.headers);for(c in d)(u=d[c])&&M.setRequestHeader(c,u);if(s=new FormData,this.options.params){_=this.options.params;for(b in _)P=_[b],s.append(b,P)}for(v=0,x=t.length;v<x;v++)o=t[v],this.emit("sending",o,M,s);if(this.options.uploadMultiple&&this.emit("sendingmultiple",t,M,s),"FORM"===this.element.tagName)for(y=0,k=(A=this.element.querySelectorAll("input, textarea, select, button")).length;y<k;y++)if(p=A[y],f=p.getAttribute("name"),m=p.getAttribute("type"),"SELECT"===p.tagName&&p.hasAttribute("multiple"))for(C=0,S=(N=p.options).length;C<S;C++)(O=N[C]).selected&&s.append(f,O.value);else(!m||"checkbox"!==(j=m.toLowerCase())&&"radio"!==j||p.checked)&&s.append(f,p.value);for(i=0,F=[],h=E=0,D=t.length-1;0<=D?E<=D:E>=D;h=0<=D?++E:--E)n=function(e){return function(n,a,r){return function(n){if(s.append(a,n,r),++i===t.length)return e.submitRequest(M,s,t)}}}(this),F.push(this.options.transformFile.call(this,t[h],n(t[h],this._getParamName(h),t[h].upload.filename)));return F},e.prototype.submitRequest=function(t,e,i){return t.send(e)},e.prototype._finished=function(t,i,n){var a,r,o;for(r=0,o=t.length;r<o;r++)(a=t[r]).status=e.SUCCESS,this.emit("success",a,i,n),this.emit("complete",a);if(this.options.uploadMultiple&&(this.emit("successmultiple",t,i,n),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()},e.prototype._errorProcessing=function(t,i,n){var a,r,o;for(r=0,o=t.length;r<o;r++)(a=t[r]).status=e.ERROR,this.emit("error",a,i,n),this.emit("complete",a);if(this.options.uploadMultiple&&(this.emit("errormultiple",t,i,n),this.emit("completemultiple",t)),this.options.autoProcessQueue)return this.processQueue()},e}(i)).version="5.1.1",t.options={},t.optionsForElement=function(e){return e.getAttribute("id")?t.options[a(e.getAttribute("id"))]:void 0},t.instances=[],t.forElement=function(t){if("string"==typeof t&&(t=document.querySelector(t)),null==(null!=t?t.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return t.dropzone},t.autoDiscover=!0,t.discover=function(){var e,i,n,a,r,o;for(document.querySelectorAll?n=document.querySelectorAll(".dropzone"):(n=[],(e=function(t){var e,i,a,r;for(r=[],i=0,a=t.length;i<a;i++)e=t[i],/(^| )dropzone($| )/.test(e.className)?r.push(n.push(e)):r.push(void 0);return r})(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))),o=[],a=0,r=n.length;a<r;a++)i=n[a],!1!==t.optionsForElement(i)?o.push(new t(i)):o.push(void 0);return o},t.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],t.isBrowserSupported=function(){var e,i,n,a;if(e=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(i=0,n=(a=t.blacklistedBrowsers).length;i<n;i++)a[i].test(navigator.userAgent)&&(e=!1);else e=!1;else e=!1;return e},t.dataURItoBlob=function(t){var e,i,n,a,r,o,s;for(i=atob(t.split(",")[1]),o=t.split(",")[0].split(":")[1].split(";")[0],e=new ArrayBuffer(i.length),a=new Uint8Array(e),n=r=0,s=i.length;0<=s?r<=s:r>=s;n=0<=s?++r:--r)a[n]=i.charCodeAt(n);return new Blob([e],{type:o})},c=function(t,e){var i,n,a,r;for(r=[],n=0,a=t.length;n<a;n++)(i=t[n])!==e&&r.push(i);return r},a=function(t){return t.replace(/[\-_](\w)/g,function(t){return t.charAt(1).toUpperCase()})},t.createElement=function(t){var e;return e=document.createElement("div"),e.innerHTML=t,e.childNodes[0]},t.elementInside=function(t,e){if(t===e)return!0;for(;t=t.parentNode;)if(t===e)return!0;return!1},t.getElement=function(t,e){var i;if("string"==typeof t?i=document.querySelector(t):null!=t.nodeType&&(i=t),null==i)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector or a plain HTML element.");return i},t.getElements=function(t,e){var i,n,a,r,o,s,l;if(t instanceof Array){n=[];try{for(a=0,o=t.length;a<o;a++)i=t[a],n.push(this.getElement(i,e))}catch(t){t,n=null}}else if("string"==typeof t)for(n=[],r=0,s=(l=document.querySelectorAll(t)).length;r<s;r++)i=l[r],n.push(i);else null!=t.nodeType&&(n=[t]);if(null==n||!n.length)throw new Error("Invalid `"+e+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return n},t.confirm=function(t,e,i){return window.confirm(t)?e():null!=i?i():void 0},t.isValidFile=function(t,e){var i,n,a,r,o;if(!e)return!0;for(e=e.split(","),i=(r=t.type).replace(/\/.*$/,""),n=0,a=e.length;n<a;n++)if(o=e[n],"."===(o=o.trim()).charAt(0)){if(-1!==t.name.toLowerCase().indexOf(o.toLowerCase(),t.name.length-o.length))return!0}else if(/\/\*$/.test(o)){if(i===o.replace(/\/.*$/,""))return!0}else if(r===o)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(e){return this.each(function(){return new t(this,e)})}),void 0!==e&&null!==e?e.exports=t:window.Dropzone=t,t.ADDED="added",t.QUEUED="queued",t.ACCEPTED=t.QUEUED,t.UPLOADING="uploading",t.PROCESSING=t.UPLOADING,t.CANCELED="canceled",t.ERROR="error",t.SUCCESS="success",o=function(t){var e,i,n,a,r,o,s,l;for(t.naturalWidth,r=t.naturalHeight,(e=document.createElement("canvas")).width=1,e.height=r,(i=e.getContext("2d")).drawImage(t,0,0),n=i.getImageData(1,0,1,r).data,l=0,a=r,o=r;o>l;)0===n[4*(o-1)+3]?a=o:l=o,o=a+l>>1;return 0===(s=o/r)?1:s},s=function(t,e,i,n,a,r,s,l,c,u){var d;return d=o(e),t.drawImage(e,i,n,a,r,s,l,c,u/d)},n=function(){function t(){}return t.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",t.encode64=function(t){var e,i,n,a,r,o,s,l,c;for(c="",e=void 0,i=void 0,n="",a=void 0,r=void 0,o=void 0,s="",l=0;;)if(e=t[l++],i=t[l++],n=t[l++],a=e>>2,r=(3&e)<<4|i>>4,o=(15&i)<<2|n>>6,s=63&n,isNaN(i)?o=s=64:isNaN(n)&&(s=64),c=c+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(r)+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(s),e=i=n="",a=r=o=s="",!(l<t.length))break;return c},t.restore=function(t,e){var i,n,a;return t.match("data:image/jpeg;base64,")?(n=this.decode64(t.replace("data:image/jpeg;base64,","")),a=this.slice2Segments(n),i=this.exifManipulation(e,a),"data:image/jpeg;base64,"+this.encode64(i)):e},t.exifManipulation=function(t,e){var i,n;return i=this.getExifArray(e),n=this.insertExif(t,i),new Uint8Array(n)},t.getExifArray=function(t){var e,i;for(e=void 0,i=0;i<t.length;){if(255===(e=t[i])[0]&225===e[1])return e;i++}return[]},t.insertExif=function(t,e){var i,n,a,r,o,s;return r=t.replace("data:image/jpeg;base64,",""),a=this.decode64(r),s=a.indexOf(255,3),o=a.slice(0,s),n=a.slice(s),i=o,i=i.concat(e),i=i.concat(n)},t.slice2Segments=function(t){var e,i,n,a;for(i=0,a=[];;){if(255===t[i]&218===t[i+1])break;if(255===t[i]&216===t[i+1]?i+=2:(e=i+(256*t[i+2]+t[i+3])+2,n=t.slice(i,e),a.push(n),i=e),i>t.length)break}return a},t.decode64=function(t){var e,i,n,a,r,o,s,l,c;for("",i=void 0,n=void 0,a="",r=void 0,o=void 0,s=void 0,l="",c=0,e=[],/[^A-Za-z0-9\+\/\=]/g.exec(t)&&console.warning("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");;)if(r=this.KEY_STR.indexOf(t.charAt(c++)),o=this.KEY_STR.indexOf(t.charAt(c++)),s=this.KEY_STR.indexOf(t.charAt(c++)),l=this.KEY_STR.indexOf(t.charAt(c++)),i=r<<2|o>>4,n=(15&o)<<4|s>>2,a=(3&s)<<6|l,e.push(i),64!==s&&e.push(n),64!==l&&e.push(a),i=n=a="",r=o=s=l="",!(c<t.length))break;return e},t}(),r=function(t,e){var i,n,a,r,o,s,l,c,u;if(a=!1,u=!0,n=t.document,c=n.documentElement,i=n.addEventListener?"addEventListener":"attachEvent",l=n.addEventListener?"removeEventListener":"detachEvent",s=n.addEventListener?"":"on",r=function(i){if("readystatechange"!==i.type||"complete"===n.readyState)return("load"===i.type?t:n)[l](s+i.type,r,!1),!a&&(a=!0)?e.call(t,i.type||i):void 0},o=function(){try{c.doScroll("left")}catch(t){return t,void setTimeout(o,50)}return r("poll")},"complete"!==n.readyState){if(n.createEventObject&&c.doScroll){try{u=!t.frameElement}catch(t){}u&&o()}return n[i](s+"DOMContentLoaded",r,!1),n[i](s+"readystatechange",r,!1),t[i](s+"load",r,!1)}},t._autoDiscoverFunction=function(){if(t.autoDiscover)return t.discover()},r(window,t._autoDiscoverFunction)}).call(this)},{}],107:[function(t,e,i){"use strict";var n=t("./base"),a=t("mout/string/trim"),r=t("mout/array/forEach"),o=t("mout/array/filter"),s=t("mout/array/indexOf");n.implement({setAttribute:function(t,e){return this.forEach(function(i){i.setAttribute(t,e)})},getAttribute:function(t){var e=this[0].getAttributeNode(t);return e&&e.specified?e.value:null},hasAttribute:function(t){var e=this[0];if(e.hasAttribute)return e.hasAttribute(t);var i=e.getAttributeNode(t);return!(!i||!i.specified)},removeAttribute:function(t){return this.forEach(function(e){var i=e.getAttributeNode(t);i&&e.removeAttributeNode(i)})}});var l={};r(["type","value","name","href","title","id"],function(t){l[t]=function(e){return void 0!==e?this.forEach(function(i){i[t]=e}):this[0][t]}}),r(["checked","disabled","selected"],function(t){l[t]=function(e){return void 0!==e?this.forEach(function(i){i[t]=!!e}):!!this[0][t]}});var c=function(t){var e=a(t).replace(/\s+/g," ").split(" "),i={};return o(e,function(t){if(""!==t&&!i[t])return i[t]=t}).sort()};l.className=function(t){return void 0!==t?this.forEach(function(e){e.className=c(t).join(" ")}):c(this[0].className).join(" ")},n.implement({attribute:function(t,e){var i=l[t];return i?i.call(this,e):null!=e?this.setAttribute(t,e):null===e?this.removeAttribute(t):void 0===e?this.getAttribute(t):void 0}}),n.implement(l),n.implement({check:function(){return this.checked(!0)},uncheck:function(){return this.checked(!1)},disable:function(){return this.disabled(!0)},enable:function(){return this.disabled(!1)},select:function(){return this.selected(!0)},deselect:function(){return this.selected(!1)}}),n.implement({classNames:function(){return c(this[0].className)},hasClass:function(t){return s(this.classNames(),t)>-1},addClass:function(t){return this.forEach(function(e){var i=e.className,n=c(i+" "+t).join(" ");i!==n&&(e.className=n)})},removeClass:function(t){return this.forEach(function(e){var i=c(e.className);r(c(t),function(t){var e=s(i,t);e>-1&&i.splice(e,1)}),e.className=i.join(" ")})},toggleClass:function(t,e){var i=void 0!==e?e:!this.hasClass(t);return i?this.addClass(t):this.removeClass(t),!!i}}),n.prototype.toString=function(){var t=this.tag(),e=this.id(),i=this.classNames(),n=t;return e&&(n+="#"+e),i.length&&(n+="."+i.join(".")),n};var u=null==document.createElement("div").textContent?"innerText":"textContent";n.implement({tag:function(){return this[0].tagName.toLowerCase()},html:function(t){return void 0!==t?this.forEach(function(e){e.innerHTML=t}):this[0].innerHTML},text:function(t){return void 0!==t?this.forEach(function(e){e[u]=t}):this[0][u]},data:function(t,e){switch(e){case void 0:return this.getAttribute("data-"+t);case null:return this.removeAttribute("data-"+t);default:return this.setAttribute("data-"+t,e)}}}),e.exports=n},{"./base":108,"mout/array/filter":115,"mout/array/forEach":116,"mout/array/indexOf":117,"mout/string/trim":134}],108:[function(t,e,i){"use strict";var n=t("prime"),a=t("mout/array/forEach"),r=t("mout/array/map"),o=t("mout/array/filter"),s=t("mout/array/every"),l=t("mout/array/some"),c=0,u=document.__counter,d="uid:"+(document.__counter=(u?parseInt(u,36)+1:0).toString(36)),h=function(t){return t===window?"window":t===document?"document":t===document.documentElement?"html":t[d]||(t[d]=(c++).toString(36))},p={},f=n({constructor:function t(e,i){if(null==e)return this&&this.constructor===t?new m:null;var n,a;if(e.constructor!==m){if(n=new m,"string"==typeof e)return n.search?(n[n.length++]=i||document,n.search(e)):null;if(e.nodeType||e===window)n[n.length++]=e;else if(e.length)for(var r={},o=0,s=e.length;o<s;o++){var l=t(e[o],i);if(l&&l.length)for(var c=0,u=l.length;c<u;c++){var d=l[c];r[a=h(d)]||(n[n.length++]=d,r[a]=!0)}}}else n=e;return n.length?1===n.length?(a=h(n[0]),p[a]||(p[a]=n)):n:null}}),m=n({inherits:f,constructor:function(){this.length=0},unlink:function(){return this.map(function(t){return delete p[h(t)],t})},forEach:function(t,e){return a(this,t,e),this},map:function(t,e){return r(this,t,e)},filter:function(t,e){return o(this,t,e)},every:function(t,e){return s(this,t,e)},some:function(t,e){return l(this,t,e)}});e.exports=f},{"mout/array/every":114,"mout/array/filter":115,"mout/array/forEach":116,"mout/array/map":118,"mout/array/some":119,prime:300}],109:[function(t,e,i){"use strict";var n=t("prime/map"),a=t("./events");t("./traversal"),a.implement({delegate:function(t,e,i,r){return this.forEach(function(o){var s=a(o),l=s._delegation||(s._delegation={}),c=l[t]||(l[t]={}),u=c[e]||(c[e]=new n);if(!u.get(i)){var d=function(t){var n,r=a(t.target||t.srcElement),o=r.matches(e)?r:r.parent(e);return o&&(n=i.call(s,t,o)),n};u.set(i,d),s.on(t,d,r)}})},undelegate:function(t,e,i,n){return this.forEach(function(r){var o,s,l,c=a(r);if((o=c._delegation)&&(s=o[t])&&(l=s[e])){var u=l.get(i);if(u){c.off(t,u,n),l.remove(u),l.count()||delete s[e];var d,h=!0,p=!0;for(d in s){h=!1;break}h&&delete o[t];for(d in o){p=!1;break}p&&delete c._delegation}}})}}),e.exports=a},{"./events":111,"./traversal":135,"prime/map":301}],110:[function(t,e,i){"use strict";var n=t("./events"),a="onreadystatechange"in document,r=!1,o=!1,s=[],l=[],c=null,u=null,d=document.createElement("div"),h=n(document),p=n(window),f=function(){if(u&&(u=clearTimeout(u)),!o){a&&h.off("readystatechange",m),h.off("DOMContentLoaded",f),p.off("load",f),o=!0;for(var t=0;c=s[t++];)c()}return o},m=function(){for(var t=l.length;t--;)if(l[t]())return f();return!1},g=function(){clearTimeout(u),m()||(u=setTimeout(g,1e3/60))};if(document.readyState){var v=function(){return!!/loaded|complete/.test(document.readyState)};l.push(v),v()?f():a?h.on("readystatechange",m):r=!0}if(d.doScroll){var b=function(){try{return d.doScroll(),!0}catch(t){}return!1};b()||(l.push(b),r=!0)}r&&g(),h.on("DOMContentLoaded",f),p.on("load",f),e.exports=function(t){return o?t():s.push(t),null}},{"./events":111}],111:[function(t,e,i){"use strict";var n=t("prime/emitter"),a=t("./base"),r=document.documentElement,o=r.addEventListener?function(t,e,i,n){return t.addEventListener(e,i,n||!1),i}:function(t,e,i){return t.attachEvent("on"+e,i),i},s=r.removeEventListener?function(t,e,i,n){t.removeEventListener(e,i,n||!1)}:function(t,e,i){t.detachEvent("on"+e,i)};a.implement({on:function(t,e,i){return this.forEach(function(r){var s=a(r),l=t+(i?":capture":"");n.prototype.on.call(s,l,e);var c=s._domListeners||(s._domListeners={});c[l]||(c[l]=o(r,t,function(t){n.prototype.emit.call(s,l,t||window.event,n.EMIT_SYNC)},i))})},off:function(t,e,i){return this.forEach(function(r){var o,l=a(r),c=t+(i?":capture":""),u=l._domListeners,d=l._listeners;if(u&&(o=u[c])&&d&&d[c]&&(n.prototype.off.call(l,c,e),!l._listeners||!l._listeners[t])){s(r,t,o),delete u[t];for(var h in u)return;delete l._domListeners}})},emit:function(){var t=arguments;return this.forEach(function(e){n.prototype.emit.apply(a(e),t)})}}),e.exports=a},{"./base":108,"prime/emitter":299}],112:[function(t,e,i){"use strict";var n=t("./base");t("./attributes"),t("./events"),t("./insertion"),t("./traversal"),t("./delegation"),e.exports=n},{"./attributes":107,"./base":108,"./delegation":109,"./events":111,"./insertion":113,"./traversal":135}],113:[function(t,e,i){"use strict";var n=t("./base");n.implement({appendChild:function(t){return this[0].appendChild(n(t)[0]),this},insertBefore:function(t,e){return this[0].insertBefore(n(t)[0],n(e)[0]),this},removeChild:function(t){return this[0].removeChild(n(t)[0]),this},replaceChild:function(t,e){return this[0].replaceChild(n(t)[0],n(e)[0]),this}}),n.implement({before:function(t){var e=(t=n(t)[0]).parentNode;return e&&this.forEach(function(i){e.insertBefore(i,t)}),this},after:function(t){var e=(t=n(t)[0]).parentNode;return e&&this.forEach(function(i){e.insertBefore(i,t.nextSibling)}),this},bottom:function(t){return t=n(t)[0],this.forEach(function(e){t.appendChild(e)})},top:function(t){return t=n(t)[0],this.forEach(function(e){t.insertBefore(e,t.firstChild)})}}),n.implement({insert:n.prototype.bottom,remove:function(){return this.forEach(function(t){var e=t.parentNode;e&&e.removeChild(t)})},replace:function(t){return(t=n(t)[0]).parentNode.replaceChild(this[0],t),this}}),e.exports=n},{"./base":108}],114:[function(t,e,i){var n=t("../function/makeIterator_");e.exports=function(t,e,i){e=n(e,i);var a=!0;if(null==t)return a;for(var r=-1,o=t.length;++r<o;)if(!e(t[r],r,t)){a=!1;break}return a}},{"../function/makeIterator_":121}],115:[function(t,e,i){var n=t("../function/makeIterator_");e.exports=function(t,e,i){e=n(e,i);var a=[];if(null==t)return a;for(var r,o=-1,s=t.length;++o<s;)e(r=t[o],o,t)&&a.push(r);return a}},{"../function/makeIterator_":121}],116:[function(t,e,i){arguments[4][80][0].apply(i,arguments)},{dup:80}],117:[function(t,e,i){arguments[4][81][0].apply(i,arguments)},{dup:81}],118:[function(t,e,i){var n=t("../function/makeIterator_");e.exports=function(t,e,i){e=n(e,i);var a=[];if(null==t)return a;for(var r=-1,o=t.length;++r<o;)a[r]=e(t[r],r,t);return a}},{"../function/makeIterator_":121}],119:[function(t,e,i){var n=t("../function/makeIterator_");e.exports=function(t,e,i){e=n(e,i);var a=!1;if(null==t)return a;for(var r=-1,o=t.length;++r<o;)if(e(t[r],r,t)){a=!0;break}return a}},{"../function/makeIterator_":121}],120:[function(t,e,i){e.exports=function(t){return t}},{}],121:[function(t,e,i){var n=t("./identity"),a=t("./prop"),r=t("../object/deepMatches");e.exports=function(t,e){if(null==t)return n;switch(typeof t){case"function":return void 0!==e?function(i,n,a){return t.call(e,i,n,a)}:t;case"object":return function(e){return r(e,t)};case"string":case"number":return a(t)}}},{"../object/deepMatches":127,"./identity":120,"./prop":122}],122:[function(t,e,i){e.exports=function(t){return function(e){return e[t]}}},{}],123:[function(t,e,i){arguments[4][84][0].apply(i,arguments)},{"./isKind":124,dup:84}],124:[function(t,e,i){arguments[4][86][0].apply(i,arguments)},{"./kindOf":125,dup:86}],125:[function(t,e,i){arguments[4][89][0].apply(i,arguments)},{dup:89}],126:[function(t,e,i){arguments[4][90][0].apply(i,arguments)},{dup:90}],127:[function(t,e,i){function n(t,e){for(var i=-1,n=t.length;++i<n;)if(o(t[i],e))return!0;return!1}function a(t,e){for(var i=-1,a=e.length;++i<a;)if(!n(t,e[i]))return!1;return!0}function r(t,e){var i=!0;return s(e,function(e,n){if(!o(t[n],e))return i=!1}),i}function o(t,e){return t&&"object"==typeof t?l(t)&&l(e)?a(t,e):r(t,e):t===e}var s=t("./forOwn"),l=t("../lang/isArray");e.exports=o},{"../lang/isArray":123,"./forOwn":129}],128:[function(t,e,i){arguments[4][91][0].apply(i,arguments)},{"./hasOwn":130,dup:91}],129:[function(t,e,i){arguments[4][92][0].apply(i,arguments)},{"./forIn":128,"./hasOwn":130,dup:92}],130:[function(t,e,i){arguments[4][93][0].apply(i,arguments)},{dup:93}],131:[function(t,e,i){arguments[4][95][0].apply(i,arguments)},{dup:95}],132:[function(t,e,i){arguments[4][96][0].apply(i,arguments)},{"../lang/toString":126,"./WHITE_SPACES":131,dup:96}],133:[function(t,e,i){arguments[4][97][0].apply(i,arguments)},{"../lang/toString":126,"./WHITE_SPACES":131,dup:97}],134:[function(t,e,i){arguments[4][98][0].apply(i,arguments)},{"../lang/toString":126,"./WHITE_SPACES":131,"./ltrim":132,"./rtrim":133,dup:98}],135:[function(t,e,i){"use strict";var n=t("mout/array/map"),a=t("slick"),r=t("./base"),o=function(t,e){return n(a.parse(e||"*"),function(e){return t+" "+e}).join(", ")},s=Array.prototype.push;r.implement({search:function(t){if(1===this.length)return r(a.search(t,this[0],new r));for(var e,i=[],n=0;e=this[n];n++)s.apply(i,a.search(t,e));return(i=r(i))&&i.sort()},find:function(t){if(1===this.length)return r(a.find(t,this[0]));for(var e,i=0;e=this[i];i++){var n=a.find(t,e);if(n)return r(n)}return null},sort:function(){return a.sort(this)},matches:function(t){return a.matches(this[0],t)},contains:function(t){return a.contains(this[0],t)},nextSiblings:function(t){return this.search(o("~",t))},nextSibling:function(t){return this.find(o("+",t))},previousSiblings:function(t){return this.search(o("!~",t))},previousSibling:function(t){return this.find(o("!+",t))},children:function(t){return this.search(o(">",t))},firstChild:function(t){return this.find(o("^",t))},lastChild:function(t){return this.find(o("!^",t))},parent:function(t){var e=[];t:for(var i,n=0;i=this[n];n++)for(;(i=i.parentNode)&&i!==document;)if(!t||a.matches(i,t)){e.push(i);break t}return r(e)},parents:function(t){for(var e,i=[],n=0;e=this[n];n++)for(;(e=e.parentNode)&&e!==document;)t&&!a.matches(e,t)||i.push(e);return r(i)}}),e.exports=r},{"./base":108,"mout/array/map":118,slick:313}],136:[function(t,e,i){"use strict";var n=t("mout/array/forEach"),a=t("mout/array/map"),r=t("slick/parser"),o=t("./base");e.exports=function(t,e){return o(a(r(t),function(t){var i,a;return n(t,function(t,r){var s=(e||document).createElement(t.tag);if(t.id&&(s.id=t.id),t.classList&&(s.className=t.classList.join(" ")),t.attributes&&n(t.attributes,function(t){s.setAttribute(t.name,t.value||"")}),t.pseudos&&n(t.pseudos,function(t){var e=o(s),i=e[t.name];i&&i.call(e,t.value)}),0===r)a=s;else if(" "===t.combinator)i.appendChild(s);else if("+"===t.combinator){var l=i.parentNode;l&&l.appendChild(s)}i=s}),a}))}},{"./base":108,"mout/array/forEach":116,"mout/array/map":118,"slick/parser":314}],137:[function(t,e,i){"use strict";var n=t("./lib/color"),a=t("./lib/frame"),r=t("undefined"!=typeof document?"./lib/browser":"./lib/fx");r.requestFrame=function(t){return a.request(t),this},r.cancelFrame=function(t){return a.cancel(t),this},r.color=n,e.exports=r},{"./lib/browser":138,"./lib/color":139,"./lib/frame":140,"./lib/fx":141}],138:[function(t,e,i){(function(i){"use strict";var n=t("./color"),a=t("./frame"),r=(a.cancel,a.request),o=t("prime"),s=t("prime/string/camelize"),l=t("prime/string/clean"),c=t("prime/string/capitalize"),u=t("prime/string/hyphenate"),d=t("prime/array/map"),h=t("prime/array/forEach"),p=t("prime/array/indexOf"),f=t("elements"),m=t("./fx"),g=function(t,e){return String.prototype.match.call(t,e)},v={},b=function(t){return v[t]||(v[t]=u(t))},y=function(t){return Math.round(1e3*t)/1e3},w=i.getComputedStyle?function(t){var e=getComputedStyle(t,null);return function(t){return e?e.getPropertyValue(b(t)):""}}:function(t){var e=t.currentStyle;return function(t){return e?e[s(t)]:""}},x=document.createElement("div"),k="border:none;margin:none;padding:none;visibility:hidden;position:absolute;height:0;",S=function(t,e){var i=t.parentNode,n=1;return i&&(x.style.cssText=k+"width:100"+e+";",i.appendChild(x),n=x.offsetWidth/100,i.removeChild(x)),n},C=function(t){var e=t.length;return 1===e?t.push(t[0],t[0],t[0]):2===e?t.push(t[0],t[1]):3===e&&t.push(t[1]),t},T="([-.\\d]+)(%|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vm)",E=T+"?",O=RegExp(T,"g"),I=RegExp(E),_=RegExp(E,"g"),A=RegExp("none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit"),N=function(t,e){return null==t||""===t?e?"1":"":isFinite(t=+t)?t<0?"0":t+"":"1"};try{x.style.color="rgba(0,0,0,0.5)"}catch(t){}var j=/^rgba/.test(x.style.color),D=function(t,e){var i;if(!t||!(i=n(t,!0)))return e?"rgba(0,0,0,1)":"";if(e)return"rgba("+i+")";var a=i[3];return 0===a?"transparent":j&&1!==a?"rgba("+i+")":"rgb("+i.slice(0,3)+")"},z=function(t,e){if(null==t||""===t)return e?"0px":"";var i=g(t,I);return i?i[1]+(i[2]||"px"):t},F=function(t,e){return null==t||""===t?e?"none":"":t.match(A)?t:e?"none":""},R=function(t,e){if(null==t||""===t)return e?"0px none rgba(0,0,0,1)":"";if(0===t||"none"===t)return e?"0px none rgba(0,0,0,1)":t+"";var i,a=(t=t.replace(n.x,function(t){return i=t,""})).match(A),r=t.match(_);return l([z(r?r[0]:"",e),F(a?a[0]:"",e),D(i,e)].join(" "))},L=function(t,e){return null==t||""===t?e?"0px 0px 0px 0px":"":l(C(d(l(t).split(" "),function(t){return z(t,e)})).join(" "))},P=function(t,e,i){var a=3===i?"rgba(0,0,0,0) 0px 0px 0px":"rgba(0,0,0,0) 0px 0px 0px 0px";if(null==t||""===t)return e?a:"";if("none"===t)return e?a:t;var r=[],t=l(t).replace(n.x,function(t){return r.push(t),""});return d(t.split(","),function(t,n){var a=D(r[n],e),o=/inset/.test(t),s=t.match(_)||["0px"];for(s=d(s,function(t){return z(t,e)});s.length<i;)s.push("0px");return(o?["inset",a]:[a]).concat(s).join(" ")}).join(", ")},M=function(t,e){return null==t||""===t?"":t.replace(n.x,function(t){return D(t,e)}).replace(O,function(t){return z(t,e)})},B={},$={},G={},q={},H=function(t){return B[t]||(B[t]=function(){var e=q[t]||t,i=G[t]||M;return function(){return i(w(this)(e),!0)}}())},U=function(t){return $[t]||($[t]=function(){var e=q[t]||t,i=G[t]||M;return function(t){this.style[e]=i(t,!1)}}())},V=["Top","Right","Bottom","Left"],Y=["TopLeft","TopRight","BottomRight","BottomLeft"];h(V,function(t){var e="border"+t;h(["margin"+t,"padding"+t,e+"Width",t.toLowerCase()],function(t){G[t]=z}),G[e+"Color"]=D,G[e+"Style"]=F,G[e]=R,B[e]=function(){return[H(e+"Width").call(this),H(e+"Style").call(this),H(e+"Color").call(this)].join(" ")}}),h(Y,function(t){G["border"+t+"Radius"]=z}),G.color=G.backgroundColor=D,G.width=G.height=G.minWidth=G.minHeight=G.maxWidth=G.maxHeight=G.fontSize=G.backgroundSize=z,h(["margin","padding"],function(t){G[t]=L,B[t]=function(){return d(V,function(e){return H(t+e).call(this)},this).join(" ")}}),G.borderWidth=L,G.borderStyle=function(t,e){return null==t||""===t?e?C(["none"]).join(" "):"":(t=l(t).split(" "),l(C(d(t,function(t){F(t,e)})).join(" ")))},G.borderColor=function(t,e){return t&&(t=g(t,n.x))?l(C(d(t,function(t){return D(t,e)})).join(" ")):e?C(["rgba(0,0,0,1)"]).join(" "):""},h(["Width","Style","Color"],function(t){B["border"+t]=function(){return d(V,function(e){return H("border"+e+t).call(this)},this).join(" ")}}),G.borderRadius=L,B.borderRadius=function(){return d(Y,function(t){return H("border"+t+"Radius").call(this)},this).join(" ")},G.border=R,B.border=function(){for(var t,e=0;e<V.length;e++){var i=H("border"+V[e]).call(this);if(t&&i!==t)return null;t=i}return t},G.zIndex=function(t){return null==t?"":t+""},G.opacity=N;var J=null!=x.style.MsFilter&&"MsFilter"||null!=x.style.filter&&"filter";if(J&&null==x.style.opacity){var W=/alpha\(opacity=([\d.]+)\)/i;$.opacity=function(t){t="1"===(t=N(t))?"":"alpha(opacity="+Math.round(100*t)+")";var e=w(this)(J);return this.style[J]=W.test(e)?e.replace(W,t):e+" "+t},B.opacity=function(){var t=w(this)(J).match(W);return(t?t[1]/100:1)+""}}var X=G.boxShadow=function(t,e){return P(t,e,4)},K=G.textShadow=function(t,e){return P(t,e,3)};h(["Webkit","Moz","ms","O",null],function(t){h(["transition","transform","transformOrigin","transformStyle","perspective","perspectiveOrigin","backfaceVisibility"],function(e){var i=t?t+c(e):e;"ms"===t&&(v[i]="-ms-"+b(e)),null!=x.style[i]&&(q[e]=i)})});var Q=q.transition,Z=q.transform;"OTransition"===Q&&(Q=null);var tt,et;!Q&&Z&&function(){var e=t("./unmatrix2d"),i="\\s*([-\\d\\w.]+)\\s*",n=RegExp("matrix\\("+[i,i,i,i,i,i]+"\\)"),a=function(t){var i=e.apply(null,t.match(n).slice(1))||[[0,0],0,0,[0,0]];return["translate("+d(i[0],function(t){return y(t)+"px"})+")","rotate("+y(180*i[1]/Math.PI)+"deg)","skewX("+y(180*i[2]/Math.PI)+"deg)","scale("+d(i[3],y)+")"].join(" ")},r=function(t){return t||"0px"},s=function(t){return t||"1"},c=function(t){return t||"0deg"},u={translate:function(t){t||(t="0px,0px");var e=t.split(",");return e[1]||(e[1]="0px"),d(e,l)+""},translateX:r,translateY:r,scale:function(t){t||(t="1,1");var e=t.split(",");return e[1]||(e[1]=e[0]),d(e,l)+""},scaleX:s,scaleY:s,rotate:c,skewX:c,skewY:c};(et=o({constructor:function(t){var e=this.names=[],i=this.values=[];t.replace(/(\w+)\(([-.\d\s\w,]+)\)/g,function(t,n,a){e.push(n),i.push(a)})},identity:function(){var t=[];return h(this.names,function(e){var i=u[e];i&&t.push(e+"("+i()+")")}),t.join(" ")},sameType:function(t){return this.names.toString()===t.names.toString()},decompose:function(){var t=this.toString();x.style.cssText=k+b(Z)+":"+t+";",document.body.appendChild(x);var e=w(x)(Z);return e&&"none"!==e||(e="matrix(1, 0, 0, 1, 0, 0)"),document.body.removeChild(x),a(e)}})).prototype.toString=function(t){var e=this.values,i=[];return h(this.names,function(n,a){var r=u[n];if(r){var o=r(e[a]);t&&o===r()||i.push(n+"("+o+")")}}),i.length?i.join(" "):"none"},et.union=function(t,e){if(t!==e){var i,n;if("none"===t?(e=(n=new et(e)).toString(),t=n.identity(),i=new et(t)):"none"===e?(t=(i=new et(t)).toString(),e=i.identity(),n=new et(e)):(t=(i=new et(t)).toString(),e=(n=new et(e)).toString()),t!==e&&(i.sameType(n)||(t=i.decompose(),e=n.decompose()),t!==e))return[t,e]}},tt=G.transform=function(t){return t&&"none"!==t?new et(n.test(t)?a(t):t).toString(!0):"none"},B.transform=function(){var t=this.style;return t[Z]||(t[Z]=tt(w(this)(Z)))}}();var it,nt=function(t,e,i){var n=G[e]||M,a=H(e).call(t);if(a!==(i=n(i,!0))){if(n===z||n===R||n===L){var r=i.match(O),o=0;r&&(a=a.replace(O,function(e,i,n){var a=r[o++].match(I)[2];if(n!==a){var s="px"===n?i:S(t,n)*i;return y(s/S(t,a))+a}return e})),o>0&&U(e).call(t,a)}else if(n===tt)return et.union(a,i);return a!==i?[a,i]:null}},at=o({inherits:m,constructor:function t(e,i){var n=H(i),a=U(i);this.get=function(){return n.call(e)},this.set=function(t){return a.call(e,t)},t.parent.constructor.call(this,this.set),this.node=e,this.property=i}});it=o({inherits:at,constructor:function t(){return t.parent.constructor.apply(this,arguments)},start:function(t){if(this.stop(),0===this.duration)return this.cancel(t),this;var e=nt(this.node,this.property,t);if(!e)return this.cancel(t),this;if(it.parent.start.apply(this,e),!this.cancelStep)return this;var i=G[this.property]||M;return i!==X&&i!==K&&i!==M||this.templateFrom===this.templateTo||(this.cancelStep(),delete this.cancelStep,this.cancel(t)),this},parseEquation:function(t){if("string"==typeof t)return it.parent.parseEquation.call(this,t)}});var rt=function(t,e,i,n){var a=p(e,t);-1!==a&&(e.splice(a,1),i.splice(a,1),n.splice(a,1))},ot=o({inherits:at,constructor:function t(e,i){t.parent.constructor.call(this,e,i),this.hproperty=b(q[i]||i);var n=this;this.bSetTransitionCSS=function(t){n.setTransitionCSS(t)},this.bSetStyleCSS=function(t){n.setStyleCSS(t)},this.bComplete=function(){n.complete()}},start:function(t){if(this.stop(),0===this.duration)return this.cancel(t),this;var e=nt(this.node,this.property,t);return e?(this.to=e[1],this.cancelSetTransitionCSS=r(this.bSetTransitionCSS),this):(this.cancel(t),this)},setTransitionCSS:function(t){delete this.cancelSetTransitionCSS,this.resetCSS(!0),this.cancelSetStyleCSS=r(this.bSetStyleCSS)},setStyleCSS:function(t){delete this.cancelSetStyleCSS;var e=this.duration;this.cancelComplete=setTimeout(this.bComplete,e),this.endTime=t+e,this.set(this.to)},complete:function(){delete this.cancelComplete,this.resetCSS(),this.callback(this.endTime)},stop:function(t){return this.cancelExit?(this.cancelExit(),delete this.cancelExit):this.cancelSetTransitionCSS?(this.cancelSetTransitionCSS(),delete this.cancelSetTransitionCSS):this.cancelSetStyleCSS?(this.cancelSetStyleCSS(),delete this.cancelSetStyleCSS,t&&this.resetCSS()):this.cancelComplete&&(clearTimeout(this.cancelComplete),delete this.cancelComplete,t&&(this.resetCSS(),this.set(this.get()))),this},resetCSS:function(t){var e=w(this.node),i=(e(Q+"Property").replace(/\s+/g,"")||"all").split(","),n=(e(Q+"Duration").replace(/\s+/g,"")||"0s").split(","),a=(e(Q+"TimingFunction").replace(/\s+/g,"")||"ease").match(/cubic-bezier\([\d-.,]+\)|([a-z-]+)/g);rt("all",i,n,a),rt(this.hproperty,i,n,a),t&&(i.push(this.hproperty),n.push(this.duration+"ms"),a.push("cubic-bezier("+this.equation+")"));var r=this.node.style;r[Q+"Property"]=i,r[Q+"Duration"]=n,r[Q+"TimingFunction"]=a},parseEquation:function(t){if("string"==typeof t)return ot.parent.parseEquation.call(this,t,!0)}}),st=Q?ot:it,lt=function(t,e){return"function"==typeof t?m(t):f(t,e)};f.implement({animate:function(t,e,i){var n=t,a=e;"string"==typeof t&&((n={})[t]=e,a=i),null==a&&(a={});var r=typeof a,o=(a="function"===r?{callback:a}:"string"===r||"number"===r?{duration:a}:a).callback||function(){},l=0,c=0;a.callback=function(t){++l===c&&o(t)};for(var u in n){var d=n[u],u=s(u);this.forEach(function(t){c++;var e=f(t),i=e._animations||(e._animations={});(i[u]||(i[u]=new st(t,u))).setOptions(a).start(d)})}return this},style:function(t,e){var i=t;"string"==typeof t&&((i={})[t]=e);for(var n in i){var a=i[n],r=U(n=s(n));this.forEach(function(t){var e,i=f(t)._animations;i&&(e=i[n])&&e.stop(!0),r.call(t,a)})}return this},compute:function(t){t=s(t);var e=this[0];if("transform"===t&&tt)return w(e)(Z);var i=H(t).call(e);return null!=i?i.replace(O,function(t,i,n){return"px"===n?t:S(e,n)*i+"px"}):""}}),lt.parse=function(t,e,i){return(G[s(t)]||M)(e,i)},e.exports=lt}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./color":139,"./frame":140,"./fx":141,"./unmatrix2d":142,elements:143,prime:150,"prime/array/forEach":146,"prime/array/indexOf":147,"prime/array/map":148,"prime/string/camelize":157,"prime/string/capitalize":158,"prime/string/clean":159,"prime/string/hyphenate":160}],139:[function(t,e,i){"use strict";var n={maroon:"#800000",red:"#ff0000",orange:"#ffA500",yellow:"#ffff00",olive:"#808000",purple:"#800080",fuchsia:"#ff00ff",white:"#ffffff",lime:"#00ff00",green:"#008000",navy:"#000080",blue:"#0000ff",aqua:"#00ffff",teal:"#008080",black:"#000000",silver:"#c0c0c0",gray:"#808080",transparent:"#0000"},a=function(t,e,i,n){return null!=n&&""!==n||(n=1),t=parseFloat(t),e=parseFloat(e),i=parseFloat(i),n=parseFloat(n),t<=255&&t>=0&&e<=255&&e>=0&&i<=255&&i>=0&&n<=1&&n>=0?[Math.round(t),Math.round(e),Math.round(i),n]:null},r=function(t){if(3===t.length&&(t+="f"),4===t.length){var e=t.charAt(0),i=t.charAt(1),n=t.charAt(2),a=t.charAt(3);t=e+e+i+i+n+n+a+a}6===t.length&&(t+="ff");for(var r=[],o=0,s=t.length;o<s;o+=2)r.push(parseInt(t.substr(o,2),16)/(6===o?255:1));return r},o=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t},s=function(t,e,i,n){var a,r,s;if(null!=n&&""!==n||(n=1),t=parseFloat(t)/360,e=parseFloat(e)/100,i=parseFloat(i)/100,n=parseFloat(n)/1,t>1||t<0||e>1||e<0||i>1||i<0||n>1||n<0)return null;if(0===e)a=r=s=i;else{var l=i<.5?i*(1+e):i+e-i*e,c=2*i-l;a=o(c,l,t+1/3),s=o(c,l,t),r=o(c,l,t-1/3)}return[255*a,255*s,255*r,n]},l=[];for(var c in n)l.push(c);var u="(?:#([a-f0-9]{3,8}))",d="\\s*([.\\d%]+)\\s*",h="\\("+[d,d,d]+"(?:,\\s*([.\\d]+)\\s*)?\\)",p="("+l.join("|")+")",f=RegExp(u,"i"),m=RegExp("(?:rgb)a?"+h,"i"),g=RegExp("(?:hsl)a?"+h,"i"),v=function(t,e){if(null==t)return null;t=(t+"").replace(/\s+/,"");var i=n[t];if(i)return v(i,e);if(i=t.match(f))t=r(i[1]);else if(i=t.match(m))t=i.slice(1);else{if(!(i=t.match(g)))return null;t=s.apply(null,i.slice(1))}return t&&(t=a.apply(null,t))?e?t:(1===t[3]&&t.splice(3,1),"rgb"+(4===t.length?"a":"")+"("+t+")"):null};v.x=RegExp([p,u,"(?:rgb)a?"+h,"(?:hsl)a?"+h].join("|"),"gi"),e.exports=v},{}],140:[function(t,e,i){(function(e){"use strict";var n=t("prime/array/indexOf"),a=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){return setTimeout(function(){t()},1e3/60)},r=[],o=function(t){for(var e=r.splice(0,r.length),i=0,n=e.length;i<n;i++)e[i](t||(t=+new Date))},s=function(t){var e=n(r,t);e>-1&&r.splice(e,1)};i.request=function(t){return 1===r.push(t)&&a(o),function(){s(t)}},i.cancel=s}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"prime/array/indexOf":147}],141:[function(t,e,i){"use strict";var n=t("prime"),a=t("./frame").request,r=t("cubic-bezier"),o=t("prime/array/map"),s="cubic-bezier\\(([-.\\d]+),([-.\\d]+),([-.\\d]+),([-.\\d]+)\\)",l=RegExp("([\\d.]+)(s|ms)?"),c=RegExp(s),u=(RegExp(s,"g"),{default:"cubic-bezier(0.25, 0.1, 0.25, 1.0)",linear:"cubic-bezier(0, 0, 1, 1)","ease-in":"cubic-bezier(0.42, 0, 1.0, 1.0)","ease-out":"cubic-bezier(0, 0, 0.58, 1.0)","ease-in-out":"cubic-bezier(0.42, 0, 0.58, 1.0)"});u.ease=u.default;var d=function(t,e,i){return(e-t)*i+t},h=function(t){var e=[],i=(t+"").replace(/[-.\d]+/g,function(t){return e.push(+t),"@"});return[e,i]},p=n({constructor:function(t,e){this.setOptions(e),this.render=t||function(){};var i=this;this.bStep=function(t){return i.step(t)},this.bExit=function(t){i.exit(t)}},setOptions:function(t){if(null==t&&(t={}),!(this.duration=this.parseDuration(t.duration||"500ms")))throw new Error("invalid duration");if(!(this.equation=this.parseEquation(t.equation||"default")))throw new Error("invalid equation");return this.callback=t.callback||function(){},this},parseDuration:function(t){if(t=(t+"").match(l)){var e=+t[1],i=t[2]||"ms";if("s"===i)return 1e3*e;if("ms"===i)return e}},parseEquation:function(t,e){var i=typeof t;if("function"===i)return t;if("string"===i){var n=(t=u[t]||t).replace(/\s+/g,"").match(c);if(n){if(t=o(n.slice(1),function(t){return+t}),e)return t;if("0,0,1,1"===t.toString())return function(t){return t};i="object"}}return"object"===i?r(t[0],t[1],t[2],t[3],1e3/60/this.duration/4):void 0},cancel:function(t){this.to=t,this.cancelExit=a(this.bExit)},exit:function(t){this.render(this.to),delete this.cancelExit,this.callback(t)},start:function(t,e){if(this.stop(),0===this.duration)return this.cancel(e),this;this.isArray=!1,this.isNumber=!1;var i=typeof t,n=typeof e;"object"===i&&"object"===n?this.isArray=!0:"number"===i&&"number"===n&&(this.isNumber=!0);var r=h(t),o=h(e);return this.from=r[0],this.to=o[0],this.templateFrom=r[1],this.templateTo=o[1],this.from.length!==this.to.length||this.from.toString()===this.to.toString()?(this.cancel(e),this):(delete this.time,this.length=this.from.length,this.cancelStep=a(this.bStep),this)},stop:function(){return this.cancelExit?(this.cancelExit(),delete this.cancelExit):this.cancelStep&&(this.cancelStep(),delete this.cancelStep),this},step:function(t){this.time||(this.time=t);var e=(t-this.time)/this.duration;e>1&&(e=1);for(var i=this.equation(e),n=this.from,r=this.to,o=this.templateTo,s=0,l=this.length;s<l;s++){var c=n[s],u=r[s];o=o.replace("@",u!==c?d(c,u,i):u)}this.render(this.isArray?o.split(","):this.isNumber?+o:o,e),1!==e?this.cancelStep=a(this.bStep):(delete this.cancelStep,this.callback(t))}}),f=function(t){var e=new p(t);return{start:function(t,i,n){var a=typeof n;return e.setOptions("function"===a?{callback:n}:"string"===a||"number"===a?{duration:n}:n).start(t,i),this},stop:function(){return e.stop(),this}}};f.prototype=p.prototype,e.exports=f},{"./frame":140,"cubic-bezier":104,prime:150,"prime/array/map":148}],142:[function(t,e,i){"use strict";var n=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},a=function(t){var e=n(t);return e?[t[0]/e,t[1]/e]:[0,0]},r=function(t,e){return t[0]*e[0]+t[1]*e[1]},o=Math.atan2,s=function(t,e,i,n){return[i*t[0]+n*e[0],i*t[1]+n*e[1]]};e.exports=function(t,e,i,l,c,u){if(t*l-e*i==0)return!1;var d=[c,u],h=[[t,e],[i,l]],p=[n(h[0])];h[0]=a(h[0]);var f=r(h[0],h[1]);return h[1]=s(h[1],h[0],1,-f),p[1]=n(h[1]),f/=p[1],[d,o(h[0][1],h[0][0]),f,p]}},{}],143:[function(t,e,i){(function(i){"use strict";var n=t("prime"),a=t("prime/array/forEach"),r=t("prime/array/map"),o=t("prime/array/filter"),s=t("prime/array/every"),l=t("prime/array/some"),c=0,u=function(t){return t===i?"global":t.uniqueNumber||(t.uniqueNumber="n:"+(c++).toString(36))},d={},h=n({constructor:function t(e,n){if(null==e)return this&&this.constructor===t?new p:null;var a=e;if(e.constructor!==p){a=new p;var r;if("string"==typeof e)return a.search?(a[a.length++]=n||document,a.search(e)):null;if(e.nodeType||e===i)a[a.length++]=e;else if(e.length)for(var o={},s=0,l=e.length;s<l;s++){var c=t(e[s],n);if(c&&c.length)for(var h=0,f=c.length;h<f;h++){var m=c[h];o[r=u(m)]||(a[a.length++]=m,o[r]=!0)}}}return a.length?1===a.length?(r=u(a[0]),d[r]||(d[r]=a)):a:null}}),p=n({inherits:h,constructor:function(){this.length=0},unlink:function(){return this.map(function(t,e){return delete d[u(t)],t})},forEach:function(t,e){return a(this,t,e)},map:function(t,e){return r(this,t,e)},filter:function(t,e){return o(this,t,e)},every:function(t,e){return s(this,t,e)},some:function(t,e){return l(this,t,e)}});e.exports=h}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{prime:150,"prime/array/every":144,"prime/array/filter":145,"prime/array/forEach":146,"prime/array/map":148,"prime/array/some":149}],144:[function(t,e,i){"use strict";e.exports=function(t,e,i){for(var n=0,a=t.length>>>0;n<a;n++)if(!e.call(i,t[n],n,t))return!1;return!0}},{}],145:[function(t,e,i){"use strict";e.exports=function(t,e,i){for(var n=[],a=0,r=t.length>>>0;a<r;a++){var o=t[a];e.call(i,o,a,t)&&n.push(o)}return n}},{}],146:[function(t,e,i){"use strict";e.exports=function(t,e,i){for(var n=0,a=t.length>>>0;n<a&&!1!==e.call(i,t[n],n,t);n++);return t}},{}],147:[function(t,e,i){"use strict";e.exports=function(t,e,i){for(var n=t.length>>>0,a=i<0?Math.max(0,n+i):i||0;a<n;a++)if(t[a]===e)return a;return-1}},{}],148:[function(t,e,i){"use strict";e.exports=function(t,e,i){for(var n=t.length>>>0,a=Array(n),r=0,o=n;r<o;r++)a[r]=e.call(i,t[r],r,t);return a}},{}],149:[function(t,e,i){"use strict";e.exports=function(t,e,i){for(var n=0,a=t.length>>>0;n<a;n++)if(e.call(i,t[n],n,t))return!0;return!1}},{}],150:[function(t,e,i){"use strict";var n=t("./object/hasOwn"),a=t("./object/forIn"),r=t("./object/mixIn"),o=t("./object/filter"),s=t("./object/create"),l=t("./type"),c=Object.defineProperty,u=Object.getOwnPropertyDescriptor;try{c({},"~",{}),u({},"~")}catch(t){c=null,u=null}var d=function(t,e,i){c(this,e,u(i,e)||{writable:!0,enumerable:!0,configurable:!0,value:t})},h=function(t,e){this[e]=t},p=function(t){return a(t,c?d:h,this.prototype),this},f=/^constructor|inherits|mixin$/;e.exports=function(t){"function"===l(t)&&(t={constructor:t});var e=t.inherits,i=n(t,"constructor")?t.constructor:e?function(){return e.apply(this,arguments)}:function(){};if(e){r(i,e);var a=e.prototype,c=i.prototype=s(a);i.parent=a,c.constructor=i}i.implement||(i.implement=p);var u=t.mixin;if(u){"array"!==l(u)&&(u=[u]);for(var d=0;d<u.length;d++)i.implement(s(u[d].prototype))}return i.implement(o(t,function(t,e){return!e.match(f)}))}},{"./object/create":151,"./object/filter":152,"./object/forIn":153,"./object/hasOwn":155,"./object/mixIn":156,"./type":162}],151:[function(t,e,i){"use strict";e.exports=function(t){var e=function(){};return e.prototype=t,new e}},{}],152:[function(t,e,i){"use strict";var n=t("./forIn");e.exports=function(t,e,i){var a={};return n(t,function(n,r){e.call(i,n,r,t)&&(a[r]=n)}),a}},{"./forIn":153}],153:[function(t,e,i){"use strict";var n=t("./hasOwn"),a=function(t,e,i){for(var n in t)if(!1===e.call(i,t[n],n,t))break;return t};if(!{valueOf:0}.propertyIsEnumerable("valueOf")){var r="constructor,toString,valueOf,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString".split(","),o=Object.prototype;a=function(t,e,i){for(var a in t)if(!1===e.call(i,t[a],a,t))return t;for(var s=0;a=r[s];s++){var l=t[a];if((l!==o[a]||n(t,a))&&!1===e.call(i,l,a,t))break}return t}}e.exports=a},{"./hasOwn":155}],154:[function(t,e,i){"use strict";var n=t("./forIn"),a=t("./hasOwn");e.exports=function(t,e,i){return n(t,function(n,r){if(a(t,r))return e.call(i,n,r,t)}),t}},{"./forIn":153,"./hasOwn":155}],155:[function(t,e,i){"use strict";var n=Object.hasOwnProperty;e.exports=function(t,e){return n.call(t,e)}},{}],156:[function(t,e,i){"use strict";var n=t("./forOwn"),a=function(t,e){this[e]=t};e.exports=function(t){for(var e=1,i=arguments.length;e<i;e++)n(arguments[e],a,t);return t}},{"./forOwn":154}],157:[function(t,e,i){"use strict";e.exports=function(t){return(t+"").replace(/-\D/g,function(t){return t.charAt(1).toUpperCase()})}},{}],158:[function(t,e,i){"use strict";e.exports=function(t){return(t+"").replace(/\b[a-z]/g,function(t){return t.toUpperCase()})}},{}],159:[function(t,e,i){"use strict";var n=t("./trim");e.exports=function(t){return n((t+"").replace(/\s+/g," "))}},{"./trim":161}],160:[function(t,e,i){"use strict";e.exports=function(t){return(t+"").replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()})}},{}],161:[function(t,e,i){"use strict";e.exports=function(t){return(t+"").replace(/^\s+|\s+$/g,"")}},{}],162:[function(t,e,i){"use strict";var n=Object.prototype.toString,a=/number|object|array|string|function|date|regexp|boolean/;e.exports=function(t){if(null==t)return"null";var e=n.call(t).slice(8,-1).toLowerCase();return"number"===e&&isNaN(t)?"null":a.test(e)?e:"object"}},{}],163:[function(t,e,i){e.exports=function(t,e){if(null==e)return t;for(var i=t.length,n=-1,a=e.length;++n<a;)t[i+n]=e[n];return t}},{}],164:[function(t,e,i){var n=t("./indexOf");e.exports=function(t,e){if(null==e)return t;for(var i=-1,a=e.length;++i<a;)-1===n(t,e[i])&&t.push(e[i]);return t}},{"./indexOf":174}],165:[function(t,e,i){var n=t("./indexOf");e.exports=function(t,e){return-1!==n(t,e)}},{"./indexOf":174}],166:[function(t,e,i){var n=t("./unique"),a=t("./filter"),r=t("./some"),o=t("./contains"),s=t("./slice");e.exports=function(t){var e=s(arguments,1);return a(n(t),function(t){return!r(e,function(e){return o(e,t)})})}},{"./contains":165,"./filter":169,"./slice":182,"./some":183,"./unique":185}],167:[function(t,e,i){function n(t){return function(e,i){return i in this&&t(e,this[i])}}var a=t("../lang/is"),r=t("../lang/isArray"),o=t("./every");e.exports=function(t,e,i){return i=i||a,r(t)&&r(e)?t.length===e.length&&o(t,n(i),e):i(t,e)}},{"../lang/is":201,"../lang/isArray":202,"./every":168}],168:[function(t,e,i){arguments[4][114][0].apply(i,arguments)},{"../function/makeIterator_":194,dup:114}],169:[function(t,e,i){arguments[4][115][0].apply(i,arguments)},{"../function/makeIterator_":194,dup:115}],170:[function(t,e,i){var n=t("./findIndex");e.exports=function(t,e,i){var a=n(t,e,i);return a>=0?t[a]:void 0}},{"./findIndex":171}],171:[function(t,e,i){var n=t("../function/makeIterator_");e.exports=function(t,e,i){if(e=n(e,i),null==t)return-1;for(var a=-1,r=t.length;++a<r;)if(e(t[a],a,t))return a;return-1}},{"../function/makeIterator_":194}],172:[function(t,e,i){function n(t,e,i){if(0===i)return r(e,t),e;for(var o,s=-1,l=t.length;++s<l;)o=t[s],a(o)?n(o,e,i-1):e.push(o);return e}var a=t("../lang/isArray"),r=t("./append");e.exports=function(t,e){return null==t?[]:(e=null==e?-1:e,n(t,[],e))}},{"../lang/isArray":202,"./append":163}],173:[function(t,e,i){arguments[4][80][0].apply(i,arguments)},{dup:80}],174:[function(t,e,i){arguments[4][81][0].apply(i,arguments)},{dup:81}],175:[function(t,e,i){var n=t("./difference"),a=t("./slice");e.exports=function(t,e){var i=n(a(arguments,1),t);return i.length&&Array.prototype.push.apply(t,i),t.length}},{"./difference":166,"./slice":182}],176:[function(t,e,i){var n=t("./unique"),a=t("./filter"),r=t("./every"),o=t("./contains"),s=t("./slice");e.exports=function(t){var e=s(arguments,1);return a(n(t),function(t){return r(e,function(e){return o(e,t)})})}},{"./contains":165,"./every":168,"./filter":169,"./slice":182,"./unique":185}],177:[function(t,e,i){var n=t("./slice");e.exports=function(t,e,i){if(null==t)return t;for(var a,r=n(arguments,2),o=-1,s=t.length;++o<s;)(a=t[o])[e].apply(a,r);return t}},{"./slice":182}],178:[function(t,e,i){e.exports=function(t){if(!(null==t||t.length<1))return t[t.length-1]}},{}],179:[function(t,e,i){arguments[4][118][0].apply(i,arguments)},{"../function/makeIterator_":194,dup:118}],180:[function(t,e,i){arguments[4][82][0].apply(i,arguments)},{"./indexOf":174,dup:82}],181:[function(t,e,i){var n=t("./indexOf");e.exports=function(t,e){for(var i=n(t,e);-1!==i;)t.splice(i,1),i=n(t,e,i)}},{"./indexOf":174}],182:[function(t,e,i){e.exports=function(t,e,i){var n=t.length;e=null==e?0:e<0?Math.max(n+e,0):Math.min(e,n),i=null==i?n:i<0?Math.max(n+i,0):Math.min(i,n);for(var a=[];e<i;)a.push(t[e++]);return a}},{}],183:[function(t,e,i){arguments[4][119][0].apply(i,arguments)},{"../function/makeIterator_":194,dup:119}],184:[function(t,e,i){e.exports=function(t,e){e=e||2;var i=[];if(null==t)return i;for(var n,a=Math.floor(t.length/e),r=t.length%e,o=0,s=t.length,l=0;o<s;)n=a,l<r&&n++,i.push(t.slice(o,o+n)),l++,o+=n;return i}},{}],185:[function(t,e,i){function n(t,e){return t===e}var a=t("./filter");e.exports=function(t,e){return e=e||n,a(t,function(t,i,n){for(var a=n.length;++i<a;)if(e(t,n[i]))return!1;return!0})}},{"./filter":169}],186:[function(t,e,i){var n=t("./make_"),a=t("../array/contains"),r=t("../object/contains");e.exports=n(a,r)},{"../array/contains":165,"../object/contains":223,"./make_":189}],187:[function(t,e,i){var n=t("./make_"),a=t("../array/find"),r=t("../object/find");e.exports=n(a,r)},{"../array/find":170,"../object/find":229,"./make_":189}],188:[function(t,e,i){var n=t("./make_"),a=t("../array/forEach"),r=t("../object/forOwn");e.exports=n(a,r)},{"../array/forEach":173,"../object/forOwn":231,"./make_":189}],189:[function(t,e,i){var n=t("../array/slice");e.exports=function(t,e,i){return function(){var a=n(arguments);return null==a[0]?i:"number"==typeof a[0].length?t.apply(null,a):e.apply(null,a)}}},{"../array/slice":182}],190:[function(t,e,i){var n=t("../lang/isArray"),a=t("../object/size");e.exports=function(t){return t?n(t)?t.length:a(t):0}},{"../lang/isArray":202,"../object/size":241}],191:[function(t,e,i){var n=t("../array/slice");e.exports=function(t,e,i){var a=n(arguments,2);return function(){return t.apply(e,a.concat(n(arguments)))}}},{"../array/slice":182}],192:[function(t,e,i){e.exports=function(t,e,i){function n(){var n=arguments,o=this;return a?clearTimeout(a):i&&(r=t.apply(o,n)),a=setTimeout(function(){i||(r=t.apply(o,n)),a=null},e),r}var a,r;return n.cancel=function(){clearTimeout(a)},n}},{}],193:[function(t,e,i){arguments[4][120][0].apply(i,arguments)},{dup:120}],194:[function(t,e,i){arguments[4][121][0].apply(i,arguments)},{"../object/deepMatches":225,"./identity":193,"./prop":195,dup:121}],195:[function(t,e,i){arguments[4][122][0].apply(i,arguments)},{dup:122}],196:[function(t,e,i){e.exports=function(){var t=arguments;return function(){for(var e=0,i=t.length;e<i;)t[e].apply(this,arguments),e+=1}}},{}],197:[function(t,e,i){e.exports=Function("return this")()},{}],198:[function(t,e,i){function n(t){return l(t)?c({},t):t}function a(t){var e="";return e+=t.multiline?"m":"",e+=t.global?"g":"",e+=t.ignoreCase?"i":"",new RegExp(t.source,e)}function r(t){return new Date(+t)}function o(t){return t.slice()}var s=t("./kindOf"),l=t("./isPlainObject"),c=t("../object/mixIn");e.exports=function(t){switch(s(t)){case"Object":return n(t);case"Array":return o(t);case"RegExp":return a(t);case"Date":return r(t);default:return t}}},{"../object/mixIn":237,"./isPlainObject":208,"./kindOf":211}],199:[function(t,e,i){function n(t,e){switch(l(t)){case"Object":return a(t,e);case"Array":return r(t,e);default:return o(t)}}function a(t,e){if(c(t)){var i={};return s(t,function(t,i){this[i]=n(t,e)},i),i}return e?e(t):t}function r(t,e){for(var i=[],a=-1,r=t.length;++a<r;)i[a]=n(t[a],e);return i}var o=t("./clone"),s=t("../object/forOwn"),l=t("./kindOf"),c=t("./isPlainObject");e.exports=n},{"../object/forOwn":231,"./clone":198,"./isPlainObject":208,"./kindOf":211}],200:[function(t,e,i){function n(t,e,i){i=i||a;var c=r(t)&&r(e),u=!c&&o(t)&&o(e);return c||u?(c?s:l)(t,e,function(t,e){return n(t,e,i)}):i(t,e)}var a=t("./is"),r=t("./isObject"),o=t("./isArray"),s=t("../object/equals"),l=t("../array/equals");e.exports=n},{"../array/equals":167,"../object/equals":226,"./is":201,"./isArray":202,"./isObject":207}],201:[function(t,e,i){e.exports=function(t,e){return t===e?0!==t||1/t==1/e:t!==t&&e!==e}},{}],202:[function(t,e,i){arguments[4][84][0].apply(i,arguments)},{"./isKind":205,dup:84}],203:[function(t,e,i){var n=t("./isKind");e.exports=function(t){return n(t,"Boolean")}},{"./isKind":205}],204:[function(t,e,i){arguments[4][85][0].apply(i,arguments)},{"./isKind":205,dup:85}],205:[function(t,e,i){arguments[4][86][0].apply(i,arguments)},{"./kindOf":211,dup:86}],206:[function(t,e,i){var n=t("./isKind");e.exports=function(t){return n(t,"Number")}},{"./isKind":205}],207:[function(t,e,i){arguments[4][87][0].apply(i,arguments)},{"./isKind":205,dup:87}],208:[function(t,e,i){e.exports=function(t){return!!t&&"object"==typeof t&&t.constructor===Object}},{}],209:[function(t,e,i){e.exports=function(t){switch(typeof t){case"string":case"number":case"boolean":return!0}return null==t}},{}],210:[function(t,e,i){arguments[4][88][0].apply(i,arguments)},{"./isKind":205,dup:88}],211:[function(t,e,i){arguments[4][89][0].apply(i,arguments)},{dup:89}],212:[function(t,e,i){var n=t("./kindOf"),a=t("./GLOBAL");e.exports=function(t){var e,i=[],r=n(t);if(null!=t)if(null==t.length||"String"===r||"Function"===r||"RegExp"===r||t===a)i[i.length]=t;else for(e=t.length;e--;)i[e]=t[e];return i}},{"./GLOBAL":197,"./kindOf":211}],213:[function(t,e,i){var n=t("./isArray");e.exports=function(t){return"number"==typeof t?t:t?"string"==typeof t?parseFloat(t):n(t)?NaN:Number(t):0}},{"./isArray":202}],214:[function(t,e,i){arguments[4][90][0].apply(i,arguments)},{dup:90}],215:[function(t,e,i){e.exports=function(t,e,i){return t<e?e:t>i?i:t}},{}],216:[function(t,e,i){e.exports=function(t,e,i){return e+(i-e)*t}},{}],217:[function(t,e,i){var n=t("./lerp"),a=t("./norm");e.exports=function(t,e,i,r,o){return n(a(t,e,i),r,o)}},{"./lerp":216,"./norm":218}],218:[function(t,e,i){e.exports=function(t,e,i){if(t<e||t>i)throw new RangeError("value ("+t+") must be between "+e+" and "+i);return t===i?1:(t-e)/(i-e)}},{}],219:[function(t,e,i){e.exports=2147483647},{}],220:[function(t,e,i){e.exports=-2147483648},{}],221:[function(t,e,i){var n=t("../lang/toNumber");e.exports=function(t,e){t=n(t);var i=Math.pow(10,e);return+(Math.round(t*i)/i).toFixed(e)}},{"../lang/toNumber":213}],222:[function(t,e,i){e.exports=function(t){return~~t}},{}],223:[function(t,e,i){var n=t("./some");e.exports=function(t,e){return n(t,function(t){return t===e})}},{"./some":242}],224:[function(t,e,i){function n(t,e){for(var i,o=0,s=arguments.length;++o<s;)(i=arguments[o])&&a(i,function(e,i){var a=t[i];null==a?t[i]=e:r(a)&&r(e)&&n(a,e)});return t}var a=t("./forOwn"),r=t("../lang/isPlainObject");e.exports=n},{"../lang/isPlainObject":208,"./forOwn":231}],225:[function(t,e,i){function n(t,e){for(var i=-1,n=t.length;++i<n;)if(o(t[i],e))return!0;return!1}function a(t,e){for(var i=-1,a=e.length;++i<a;)if(!n(t,e[i]))return!1;return!0}function r(t,e){var i=!0;return s(e,function(e,n){if(!o(t[n],e))return i=!1}),i}function o(t,e){return t&&"object"==typeof t&&e&&"object"==typeof e?l(t)&&l(e)?a(t,e):r(t,e):t===e}var s=t("./forOwn"),l=t("../lang/isArray");e.exports=o},{"../lang/isArray":202,"./forOwn":231}],226:[function(t,e,i){function n(t){return function(e,i){return r(this,i)&&t(e,this[i])}}function a(t,e){return r(this,e)}var r=t("./hasOwn"),o=t("./every"),s=t("../lang/isObject"),l=t("../lang/is");e.exports=function(t,e,i){return i=i||l,s(t)&&s(e)?o(t,n(i),e)&&o(e,a,t):i(t,e)}},{"../lang/is":201,"../lang/isObject":207,"./every":227,"./hasOwn":234}],227:[function(t,e,i){var n=t("./forOwn"),a=t("../function/makeIterator_");e.exports=function(t,e,i){e=a(e,i);var r=!0;return n(t,function(i,n){if(!e(i,n,t))return r=!1,!1}),r}},{"../function/makeIterator_":194,"./forOwn":231}],228:[function(t,e,i){var n=t("./forOwn"),a=t("../function/makeIterator_");e.exports=function(t,e,i){e=a(e,i);var r={};return n(t,function(t,i,n){e(t,i,n)&&(r[i]=t)}),r}},{"../function/makeIterator_":194,"./forOwn":231}],229:[function(t,e,i){var n=t("./some"),a=t("../function/makeIterator_");e.exports=function(t,e,i){e=a(e,i);var r;return n(t,function(t,i,n){if(e(t,i,n))return r=t,!0}),r}},{"../function/makeIterator_":194,"./some":242}],230:[function(t,e,i){arguments[4][91][0].apply(i,arguments)},{"./hasOwn":234,dup:91}],231:[function(t,e,i){arguments[4][92][0].apply(i,arguments)},{"./forIn":230,"./hasOwn":234,dup:92}],232:[function(t,e,i){t("../lang/isPrimitive");e.exports=function(t,e){for(var i=e.split("."),n=i.pop();e=i.shift();)if(null==(t=t[e]))return;return t[n]}},{"../lang/isPrimitive":209}],233:[function(t,e,i){var n,a=t("./get");e.exports=function(t,e){return a(t,e)!==n}},{"./get":232}],234:[function(t,e,i){arguments[4][93][0].apply(i,arguments)},{dup:93}],235:[function(t,e,i){var n=t("./forOwn"),a=Object.keys||function(t){var e=[];return n(t,function(t,i){e.push(i)}),e};e.exports=a},{"./forOwn":231}],236:[function(t,e,i){function n(){var t,e,i,s,l=1;for(s=r(arguments[0]);i=arguments[l++];)for(t in i)a(i,t)&&(e=i[t],o(e)&&o(s[t])?s[t]=n(s[t],e):s[t]=r(e));return s}var a=t("./hasOwn"),r=t("../lang/deepClone"),o=t("../lang/isObject");e.exports=n},{"../lang/deepClone":199,"../lang/isObject":207,"./hasOwn":234}],237:[function(t,e,i){arguments[4][94][0].apply(i,arguments)},{"./forOwn":231,dup:94}],238:[function(t,e,i){var n=t("../array/forEach");e.exports=function(t,e){return e?(n(e.split("."),function(e){t[e]||(t[e]={}),t=t[e]}),t):t}},{"../array/forEach":173}],239:[function(t,e,i){var n=t("../array/slice"),a=t("../array/contains");e.exports=function(t,e){var i="string"!=typeof arguments[1]?arguments[1]:n(arguments,1),r={};for(var o in t)t.hasOwnProperty(o)&&!a(i,o)&&(r[o]=t[o]);return r}},{"../array/contains":165,"../array/slice":182}],240:[function(t,e,i){var n=t("./namespace");e.exports=function(t,e,i){var a=/^(.+)\.(.+)$/.exec(e);a?n(t,a[1])[a[2]]=i:t[e]=i}},{"./namespace":238}],241:[function(t,e,i){var n=t("./forOwn");e.exports=function(t){var e=0;return n(t,function(){e++}),e}},{"./forOwn":231}],242:[function(t,e,i){var n=t("./forOwn"),a=t("../function/makeIterator_");e.exports=function(t,e,i){e=a(e,i);var r=!1;return n(t,function(i,n){if(e(i,n,t))return r=!0,!1}),r}},{"../function/makeIterator_":194,"./forOwn":231}],243:[function(t,e,i){var n=t("./has");e.exports=function(t,e){if(n(t,e)){for(var i=e.split("."),a=i.pop();e=i.shift();)t=t[e];return delete t[a]}return!0}},{"./has":233}],244:[function(t,e,i){var n=t("./forOwn");e.exports=function(t){var e=[];return n(t,function(t,i){e.push(t)}),e}},{"./forOwn":231}],245:[function(t,e,i){var n=t("../object/forOwn"),a=t("../lang/isArray"),r=t("../array/forEach");e.exports=function(t){var e,i,o=[];return n(t,function(t,n){a(t)?(e=n+"=",i=new RegExp("&"+n+"+=$"),r(t,function(t){e+=encodeURIComponent(t)+"&"+n+"="}),o.push(e.replace(i,""))):o.push(n+"="+encodeURIComponent(t))}),o.length?"?"+o.join("&"):""}},{"../array/forEach":173,"../lang/isArray":202,"../object/forOwn":231}],246:[function(t,e,i){var n=t("../string/typecast"),a=t("./getQuery");e.exports=function(t,e,i){var r=new RegExp("(\\?|&)"+e+"=([^&]*)").exec(a(t)),o=r&&r[2]?r[2]:null;return!1===i?o:n(o)}},{"../string/typecast":272,"./getQuery":247}],247:[function(t,e,i){e.exports=function(t){var e=/\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(t);return e?decodeURIComponent(e[0].replace(/\+/g," ")):""}},{}],248:[function(t,e,i){e.exports=function(t,e,i){t=t||"";var n=new RegExp("(\\?|&)"+e+"=[^&]*"),a=e+"="+encodeURIComponent(i);return n.test(t)?t.replace(n,"$1"+a):(-1===t.indexOf("?")&&(t+="?"),-1!==t.indexOf("=")&&(t+="&"),t+a)}},{}],249:[function(t,e,i){var n=t("./randInt"),a=t("../lang/isArray");e.exports=function(t){var e=1===arguments.length&&a(t)?t:arguments;return e[n(0,e.length-1)]}},{"../lang/isArray":202,"./randInt":253}],250:[function(t,e,i){var n=t("./randHex"),a=t("./choice");e.exports=function(){return n(8)+"-"+n(4)+"-4"+n(3)+"-"+a(8,9,"a","b")+n(3)+"-"+n(12)}},{"./choice":249,"./randHex":252}],251:[function(t,e,i){var n=t("./random"),a=t("../number/MIN_INT"),r=t("../number/MAX_INT");e.exports=function(t,e){return t=null==t?a:t,e=null==e?r:e,t+(e-t)*n()}},{"../number/MAX_INT":219,"../number/MIN_INT":220,"./random":254}],252:[function(t,e,i){var n=t("./choice"),a="0123456789abcdef".split("");e.exports=function(t){t=t&&t>0?t:6;for(var e="";t--;)e+=n(a);return e}},{"./choice":249}],253:[function(t,e,i){var n=t("../number/MIN_INT"),a=t("../number/MAX_INT"),r=t("./rand");e.exports=function(t,e){return t=null==t?n:~~t,e=null==e?a:~~e,Math.round(r(t-.5,e+.499999999999))}},{"../number/MAX_INT":219,"../number/MIN_INT":220,"./rand":251}],254:[function(t,e,i){function n(){return n.get()}n.get=Math.random,e.exports=n},{}],255:[function(t,e,i){arguments[4][95][0].apply(i,arguments)},{dup:95}],256:[function(t,e,i){var n=t("../lang/toString");e.exports=function(t,e,i){return t=n(t),e=n(e),-1!==t.indexOf(e,i)}},{"../lang/toString":214}],257:[function(t,e,i){var n=t("../lang/toString");e.exports=function(t,e){return t=n(t),e=n(e),-1!==t.indexOf(e,t.length-e.length)}},{"../lang/toString":214}],258:[function(t,e,i){var n=t("../lang/toString");e.exports=function(t){return t=n(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;")}},{"../lang/toString":214}],259:[function(t,e,i){var n=t("../lang/toString");e.exports=function(t,e){return(t=n(t)).replace(/[\s\S]/g,function(t){return!e&&/[\x20-\x7E]/.test(t)?t:"\\u"+("000"+t.charCodeAt(0).toString(16)).slice(-4)})}},{"../lang/toString":214}],260:[function(t,e,i){var n=t("../lang/toString"),a=t("../object/get"),r=/\{\{([^\}]+)\}\}/g;e.exports=function(t,e,i){return(t=n(t)).replace(i||r,function(t,i){return n(a(e,i))})}},{"../lang/toString":214,"../object/get":232}],261:[function(t,e,i){var n=t("../lang/toString");e.exports=function(t){return(t=n(t)).toLowerCase()}},{"../lang/toString":214}],262:[function(t,e,i){arguments[4][96][0].apply(i,arguments)},{"../lang/toString":214,"./WHITE_SPACES":255,dup:96}],263:[function(t,e,i){var n=t("../lang/toString"),a=t("./lowerCase"),r=t("./upperCase");e.exports=function(t){return t=n(t),a(t).replace(/^\w|\s\w/g,r)}},{"../lang/toString":214,"./lowerCase":261,"./upperCase":275}],264:[function(t,e,i){var n=t("../lang/toString"),a=/[^\x20\x2D0-9A-Z\x5Fa-z\xC0-\xD6\xD8-\xF6\xF8-\xFF]/g;e.exports=function(t){return(t=n(t)).replace(a,"")}},{"../lang/toString":214}],265:[function(t,e,i){var n=t("../lang/toString"),a=t("../number/toInt");e.exports=function(t,e){var i="";if(t=n(t),(e=a(e))<1)return"";for(;e>0;)e%2&&(i+=t),e=Math.floor(e/2),t+=t;return i}},{"../lang/toString":214,"../number/toInt":222}],266:[function(t,e,i){var n=t("../lang/toString"),a=t("../lang/toArray");e.exports=function(t,e,i){t=n(t),e=a(e),i=a(i);var r=e.length,o=i.length;if(1!==o&&r!==o)throw new Error("Unequal number of searches and replacements");for(var s=-1;++s<r;)t=t.replace(e[s],i[1===o?0:s]);return t}},{"../lang/toArray":212,"../lang/toString":214}],267:[function(t,e,i){var n=t("../lang/toString");e.exports=function(t){return(t=n(t)).search(/[\xC0-\xFF]/g)>-1&&(t=t.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),t}},{"../lang/toString":214}],268:[function(t,e,i){var n=t("../lang/toString"),a=t("./repeat");e.exports=function(t,e,i){return t=n(t),i=i||" ",t.length<e?t+a(i,e-t.length):t}},{"../lang/toString":214,"./repeat":265}],269:[function(t,e,i){arguments[4][97][0].apply(i,arguments)},{"../lang/toString":214,"./WHITE_SPACES":255,dup:97}],270:[function(t,e,i){var n=t("../lang/toString"),a=t("./replaceAccents"),r=t("./removeNonWord"),o=t("./trim");e.exports=function(t,e){return t=n(t),null==e&&(e="-"),t=a(t),t=r(t),t=o(t).replace(/ +/g,e).toLowerCase()}},{"../lang/toString":214,"./removeNonWord":264,"./replaceAccents":267,"./trim":271}],271:[function(t,e,i){arguments[4][98][0].apply(i,arguments)},{"../lang/toString":214,"./WHITE_SPACES":255,"./ltrim":262,"./rtrim":269,dup:98}],272:[function(t,e,i){var n;e.exports=function(t){return null===t||"null"===t?null:"true"===t||"false"!==t&&(t===n||"undefined"===t?n:""===t||isNaN(t)?t:parseFloat(t))}},{}],273:[function(t,e,i){var n=t("../lang/toString");e.exports=function(t){return t=n(t).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&#0*39;/g,"'").replace(/&quot;/g,'"')}},{"../lang/toString":214}],274:[function(t,e,i){var n=t("../lang/toString");e.exports=function(t){return(t=n(t)).replace(/(\w)(-)(\w)/g,"$1 $3")}},{"../lang/toString":214}],275:[function(t,e,i){arguments[4][99][0].apply(i,arguments)},{"../lang/toString":214,dup:99}],276:[function(t,e,i){arguments[4][182][0].apply(i,arguments)},{dup:182}],277:[function(t,e,i){arguments[4][191][0].apply(i,arguments)},{"../array/slice":276,dup:191}],278:[function(t,e,i){function n(t){return l(t)?c({},t):t}function a(t){var e="";return e+=t.multiline?"m":"",e+=t.global?"g":"",e+=t.ignorecase?"i":"",new RegExp(t.source,e)}function r(t){return new Date(+t)}function o(t){return t.slice()}var s=t("./kindOf"),l=t("./isPlainObject"),c=t("../object/mixIn");e.exports=function(t){switch(s(t)){case"Object":return n(t);case"Array":return o(t);case"RegExp":return a(t);case"Date":return r(t);default:return t}}},{"../object/mixIn":288,"./isPlainObject":282,"./kindOf":283}],279:[function(t,e,i){arguments[4][199][0].apply(i,arguments)},{"../object/forOwn":285,"./clone":278,"./isPlainObject":282,"./kindOf":283,dup:199}],280:[function(t,e,i){arguments[4][86][0].apply(i,arguments)},{"./kindOf":283,dup:86}],281:[function(t,e,i){arguments[4][87][0].apply(i,arguments)},{"./isKind":280,dup:87}],282:[function(t,e,i){arguments[4][208][0].apply(i,arguments)},{dup:208}],283:[function(t,e,i){arguments[4][89][0].apply(i,arguments)},{dup:89}],284:[function(t,e,i){arguments[4][91][0].apply(i,arguments)},{"./hasOwn":286,dup:91}],285:[function(t,e,i){arguments[4][92][0].apply(i,arguments)},{"./forIn":284,"./hasOwn":286,dup:92}],286:[function(t,e,i){arguments[4][93][0].apply(i,arguments)},{dup:93}],287:[function(t,e,i){arguments[4][236][0].apply(i,arguments)},{"../lang/deepClone":279,"../lang/isObject":281,"./hasOwn":286,dup:236}],288:[function(t,e,i){arguments[4][94][0].apply(i,arguments)},{"./forOwn":285,dup:94}],289:[function(t,e,i){arguments[4][103][0].apply(i,arguments)},{dup:103,"mout/lang/createObject":290,"mout/lang/kindOf":291,"mout/object/hasOwn":294,"mout/object/mixIn":295}],290:[function(t,e,i){arguments[4][83][0].apply(i,arguments)},{"../object/mixIn":295,dup:83}],291:[function(t,e,i){arguments[4][89][0].apply(i,arguments)},{dup:89}],292:[function(t,e,i){arguments[4][91][0].apply(i,arguments)},{"./hasOwn":294,dup:91}],293:[function(t,e,i){arguments[4][92][0].apply(i,arguments)},{"./forIn":292,"./hasOwn":294,dup:92}],294:[function(t,e,i){arguments[4][93][0].apply(i,arguments)},{dup:93}],295:[function(t,e,i){arguments[4][94][0].apply(i,arguments)},{"./forOwn":293,dup:94}],296:[function(t,e,i){"use strict";var n=t("prime"),a=t("mout/function/bind"),r=n({bound:function(t){var e=this._bound||(this._bound={});return e[t]||(e[t]=a(this[t],this))}});e.exports=r},{"mout/function/bind":277,prime:289}],297:[function(t,e,i){"use strict";var n=t("prime"),a=t("mout/object/merge"),r=n({setOptions:function(t){var e=[{},this.options];return e.push.apply(e,arguments),this.options=a.apply(null,e),this}});e.exports=r},{"mout/object/merge":287,prime:289}],298:[function(t,e,i){(function(i,n){"use strict";var a=t("mout/lang/kindOf"),r=t("mout/time/now"),o=t("mout/array/forEach"),s=t("mout/array/indexOf"),l={timeout:{},frame:[],immediate:[]},c=function(t,e,i,n){t.length||n(function(){u(t)});var a={callback:e,context:i};return t.push(a),function(){var e=s(t,a);e>-1&&t.splice(e,1)}},u=function(t){var e=r();o(t.splice(0),function(t){t.callback.call(t.context,e)})},d=function(t,e,i){return"Number"===a(e)?d.timeout(t,e,i):d.immediate(t,e)};n.process&&i.nextTick?d.immediate=function(t,e){return c(l.immediate,t,e,i.nextTick)}:n.setImmediate?d.immediate=function(t,e){return c(l.immediate,t,e,setImmediate)}:n.postMessage&&n.addEventListener?(addEventListener("message",function(t){t.source===n&&"@deferred"===t.data&&(t.stopPropagation(),u(l.immediate))},!0),d.immediate=function(t,e){return c(l.immediate,t,e,function(){postMessage("@deferred","*")})}):d.immediate=function(t,e){return c(l.immediate,t,e,function(t){setTimeout(t,0)})};var h=n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||n.oRequestAnimationFrame||n.msRequestAnimationFrame||function(t){setTimeout(t,1e3/60)};d.frame=function(t,e){return c(l.frame,t,e,h)};var p;d.timeout=function(t,e,i){var n=l.timeout;return p||(p=d.immediate(function(){p=null,l.timeout={}})),c(n[e]||(n[e]=[]),t,i,function(t){setTimeout(t,e)})},e.exports=d}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:1,"mout/array/forEach":302,"mout/array/indexOf":303,"mout/lang/kindOf":305,"mout/time/now":310}],299:[function(t,e,i){"use strict";var n=t("mout/array/indexOf"),a=t("mout/array/forEach"),r=t("./index"),o=t("./defer"),s=Array.prototype.slice,l=r({constructor:function(t){this._stoppable=t},on:function(t,e){var i=this._listeners||(this._listeners={}),a=i[t]||(i[t]=[]);return-1===n(a,e)&&a.push(e),this},off:function(t,e){var i,a=this._listeners;if(a&&(i=a[t])){var r=n(i,e);r>-1&&i.splice(r,1),i.length||delete a[t];for(var o in a)return this;delete this._listeners}return this},emit:function(t){var e=this,i=s.call(arguments,1),n=function(){var n,r=e._listeners;r&&(n=r[t])&&a(n.slice(0),function(t){var n=t.apply(e,i);if(e._stoppable)return n})};return i[i.length-1]===l.EMIT_SYNC?(i.pop(),n()):o(n),this}});l.EMIT_SYNC={},e.exports=l},{"./defer":298,"./index":300,"mout/array/forEach":302,"mout/array/indexOf":303}],300:[function(t,e,i){"use strict";var n=t("mout/object/hasOwn"),a=t("mout/object/mixIn"),r=t("mout/lang/createObject"),o=t("mout/lang/kindOf"),s=!0;try{Object.defineProperty({},"~",{}),Object.getOwnPropertyDescriptor({},"~")}catch(t){s=!1}var l=!{valueOf:0}.propertyIsEnumerable("valueOf"),c=["toString","valueOf"],u=/^constructor|inherits|mixin$/,d=function(t){var e=this.prototype;for(var i in t)if(!i.match(u)){if(s){var n=Object.getOwnPropertyDescriptor(t,i);if(n){Object.defineProperty(e,i,n);continue}}e[i]=t[i]}if(l)for(var a=0;i=c[a];a++){var r=t[i];r!==Object.prototype[i]&&(e[i]=r)}return this};e.exports=function(t){"Function"===o(t)&&(t={constructor:t});var e=t.inherits,i=n(t,"constructor")?t.constructor:e?function(){return e.apply(this,arguments)}:function(){};if(e){a(i,e);var s=e.prototype,l=i.prototype=r(s);i.parent=s,l.constructor=i}i.implement||(i.implement=d);var c=t.mixin;if(c){"Array"!==o(c)&&(c=[c]);for(var u=0;u<c.length;u++)i.implement(r(c[u].prototype))}return i.implement(t)}},{"mout/lang/createObject":304,"mout/lang/kindOf":305,"mout/object/hasOwn":308,"mout/object/mixIn":309}],301:[function(t,e,i){"use strict";var n=t("mout/array/indexOf"),a=t("./index")({constructor:function(){this.length=0,this._values=[],this._keys=[]},set:function(t,e){var i=n(this._keys,t);return-1===i?(this._keys.push(t),this._values.push(e),this.length++):this._values[i]=e,this},get:function(t){var e=n(this._keys,t);return-1===e?null:this._values[e]},count:function(){return this.length},forEach:function(t,e){for(var i=0,n=this.length;i<n&&!1!==t.call(e,this._values[i],this._keys[i],this);i++);return this},map:function(t,e){var i=new a;return this.forEach(function(n,a){i.set(a,t.call(e,n,a,this))},this),i},filter:function(t,e){var i=new a;return this.forEach(function(n,a){t.call(e,n,a,this)&&i.set(a,n)},this),i},every:function(t,e){var i=!0;return this.forEach(function(n,a){if(!t.call(e,n,a,this))return i=!1},this),i},some:function(t,e){var i=!1;return this.forEach(function(n,a){if(t.call(e,n,a,this))return!(i=!0)},this),i},indexOf:function(t){var e=n(this._values,t);return e>-1?this._keys[e]:null},remove:function(t){var e=n(this._values,t);return-1!==e?(this._values.splice(e,1),this.length--,this._keys.splice(e,1)[0]):null},unset:function(t){var e=n(this._keys,t);return-1!==e?(this._keys.splice(e,1),this.length--,this._values.splice(e,1)[0]):null},keys:function(){return this._keys.slice()},values:function(){return this._values.slice()}}),r=function(){return new a};r.prototype=a.prototype,e.exports=r},{"./index":300,"mout/array/indexOf":303}],302:[function(t,e,i){arguments[4][80][0].apply(i,arguments)},{dup:80}],303:[function(t,e,i){arguments[4][81][0].apply(i,arguments)},{dup:81}],304:[function(t,e,i){arguments[4][83][0].apply(i,arguments)},{"../object/mixIn":309,dup:83}],305:[function(t,e,i){arguments[4][89][0].apply(i,arguments)},{dup:89}],306:[function(t,e,i){arguments[4][91][0].apply(i,arguments)},{"./hasOwn":308,dup:91}],307:[function(t,e,i){arguments[4][92][0].apply(i,arguments)},{"./forIn":306,"./hasOwn":308,dup:92}],308:[function(t,e,i){arguments[4][93][0].apply(i,arguments)},{dup:93}],309:[function(t,e,i){arguments[4][94][0].apply(i,arguments)},{"./forOwn":307,dup:94}],310:[function(t,e,i){arguments[4][100][0].apply(i,arguments)},{dup:100}],311:[function(t,e,i){!function(t,n){"function"==typeof define&&define.amd?define(n):"object"==typeof i?e.exports=n():t.Sifter=n()}(this,function(){var t=function(t,e){this.items=t,this.settings=e||{diacritics:!0}};t.prototype.tokenize=function(t){if(!(t=a(String(t||"").toLowerCase()))||!t.length)return[];var e,i,n,o,l=[],c=t.split(/ +/);for(e=0,i=c.length;e<i;e++){if(n=r(c[e]),this.settings.diacritics)for(o in s)s.hasOwnProperty(o)&&(n=n.replace(new RegExp(o,"g"),s[o]));l.push({string:c[e],regex:new RegExp(n,"i")})}return l},t.prototype.iterator=function(t,e){(o(t)?Array.prototype.forEach||function(t){for(var e=0,i=this.length;e<i;e++)t(this[e],e,this)}:function(t){for(var e in this)this.hasOwnProperty(e)&&t(this[e],e,this)}).apply(t,[e])},t.prototype.getScoreFunction=function(t,e){var i,a,r,o;t=this.prepareSearch(t,e),a=t.tokens,i=t.options.fields,r=a.length,o=t.options.nesting;var s=function(t,e){var i,n;return t?(t=String(t||""),-1===(n=t.search(e.regex))?0:(i=e.string.length/t.length,0===n&&(i+=.5),i)):0},l=function(){var t=i.length;return t?1===t?function(t,e){return s(n(e,i[0],o),t)}:function(e,a){for(var r=0,l=0;r<t;r++)l+=s(n(a,i[r],o),e);return l/t}:function(){return 0}}();return r?1===r?function(t){return l(a[0],t)}:"and"===t.options.conjunction?function(t){for(var e,i=0,n=0;i<r;i++){if((e=l(a[i],t))<=0)return 0;n+=e}return n/r}:function(t){for(var e=0,i=0;e<r;e++)i+=l(a[e],t);return i/r}:function(){return 0}},t.prototype.getSortFunction=function(t,i){var a,r,o,s,l,c,u,d,h,p,f;if(o=this,t=o.prepareSearch(t,i),f=!t.query&&i.sort_empty||i.sort,h=function(t,e){return"$score"===t?e.score:n(o.items[e.id],t,i.nesting)},l=[],f)for(a=0,r=f.length;a<r;a++)(t.query||"$score"!==f[a].field)&&l.push(f[a]);if(t.query){for(p=!0,a=0,r=l.length;a<r;a++)if("$score"===l[a].field){p=!1;break}p&&l.unshift({field:"$score",direction:"desc"})}else for(a=0,r=l.length;a<r;a++)if("$score"===l[a].field){l.splice(a,1);break}for(d=[],a=0,r=l.length;a<r;a++)d.push("desc"===l[a].direction?-1:1);return(c=l.length)?1===c?(s=l[0].field,u=d[0],function(t,i){return u*e(h(s,t),h(s,i))}):function(t,i){var n,a,r;for(n=0;n<c;n++)if(r=l[n].field,a=d[n]*e(h(r,t),h(r,i)))return a;return 0}:null},t.prototype.prepareSearch=function(t,e){if("object"==typeof t)return t;var n=(e=i({},e)).fields,a=e.sort,r=e.sort_empty;return n&&!o(n)&&(e.fields=[n]),a&&!o(a)&&(e.sort=[a]),r&&!o(r)&&(e.sort_empty=[r]),{options:e,query:String(t||"").toLowerCase(),tokens:this.tokenize(t),total:0,items:[]}},t.prototype.search=function(t,e){var i,n,a,r,o=this;return n=this.prepareSearch(t,e),e=n.options,t=n.query,r=e.score||o.getScoreFunction(n),t.length?o.iterator(o.items,function(t,a){i=r(t),(!1===e.filter||i>0)&&n.items.push({score:i,id:a})}):o.iterator(o.items,function(t,e){n.items.push({score:1,id:e})}),(a=o.getSortFunction(n,e))&&n.items.sort(a),n.total=n.items.length,"number"==typeof e.limit&&(n.items=n.items.slice(0,e.limit)),n};var e=function(t,e){return"number"==typeof t&&"number"==typeof e?t>e?1:t<e?-1:0:(t=l(String(t||"")),e=l(String(e||"")),t>e?1:e>t?-1:0)},i=function(t,e){var i,n,a,r;for(i=1,n=arguments.length;i<n;i++)if(r=arguments[i])for(a in r)r.hasOwnProperty(a)&&(t[a]=r[a]);return t},n=function(t,e,i){if(t&&e){if(!i)return t[e];for(var n=e.split(".");n.length&&(t=t[n.shift()]););return t}},a=function(t){return(t+"").replace(/^\s+|\s+$|/g,"")},r=function(t){return(t+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},o=Array.isArray||"undefined"!=typeof $&&$.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},s={a:"[aḀḁĂăÂâǍǎȺⱥȦȧẠạÄäÀàÁáĀāÃãÅåąĄÃąĄ]",b:"[b␢βΒB฿𐌁ᛒ]",c:"[cĆćĈĉČčĊċC̄c̄ÇçḈḉȻȼƇƈɕᴄＣｃ]",d:"[dĎďḊḋḐḑḌḍḒḓḎḏĐđD̦d̦ƉɖƊɗƋƌᵭᶁᶑȡᴅＤｄð]",e:"[eÉéÈèÊêḘḙĚěĔĕẼẽḚḛẺẻĖėËëĒēȨȩĘęᶒɆɇȄȅẾếỀềỄễỂểḜḝḖḗḔḕȆȇẸẹỆệⱸᴇＥｅɘǝƏƐε]",f:"[fƑƒḞḟ]",g:"[gɢ₲ǤǥĜĝĞğĢģƓɠĠġ]",h:"[hĤĥĦħḨḩẖẖḤḥḢḣɦʰǶƕ]",i:"[iÍíÌìĬĭÎîǏǐÏïḮḯĨĩĮįĪīỈỉȈȉȊȋỊịḬḭƗɨɨ̆ᵻᶖİiIıɪＩｉ]",j:"[jȷĴĵɈɉʝɟʲ]",k:"[kƘƙꝀꝁḰḱǨǩḲḳḴḵκϰ₭]",l:"[lŁłĽľĻļĹĺḶḷḸḹḼḽḺḻĿŀȽƚⱠⱡⱢɫɬᶅɭȴʟＬｌ]",n:"[nŃńǸǹŇňÑñṄṅŅņṆṇṊṋṈṉN̈n̈ƝɲȠƞᵰᶇɳȵɴＮｎŊŋ]",o:"[oØøÖöÓóÒòÔôǑǒŐőŎŏȮȯỌọƟɵƠơỎỏŌōÕõǪǫȌȍՕօ]",p:"[pṔṕṖṗⱣᵽƤƥᵱ]",q:"[qꝖꝗʠɊɋꝘꝙq̃]",r:"[rŔŕɌɍŘřŖŗṘṙȐȑȒȓṚṛⱤɽ]",s:"[sŚśṠṡṢṣꞨꞩŜŝŠšŞşȘșS̈s̈]",t:"[tŤťṪṫŢţṬṭƮʈȚțṰṱṮṯƬƭ]",u:"[uŬŭɄʉỤụÜüÚúÙùÛûǓǔŰűŬŭƯưỦủŪūŨũŲųȔȕ∪]",v:"[vṼṽṾṿƲʋꝞꝟⱱʋ]",w:"[wẂẃẀẁŴŵẄẅẆẇẈẉ]",x:"[xẌẍẊẋχ]",y:"[yÝýỲỳŶŷŸÿỸỹẎẏỴỵɎɏƳƴ]",z:"[zŹźẐẑŽžŻżẒẓẔẕƵƶ]"},l=function(){var t,e,i,n,a="",r={};for(i in s)if(s.hasOwnProperty(i))for(a+=n=s[i].substring(2,s[i].length-1),t=0,e=n.length;t<e;t++)r[n.charAt(t)]=i;var o=new RegExp("["+a+"]","g");return function(t){return t.replace(o,function(t){return r[t]}).toLowerCase()}}();return t})},{}],312:[function(t,e,i){"use strict";var n=t("./parser"),a=0,r="uid:"+(document.__counter=(parseInt(document.__counter||-1,36)+1).toString(36)),o=function(t,e){if(t===window)return"window";if(t===document)return"document";if(t===document.documentElement)return"html";if(e){var i=t.getAttribute(r);return i||(i=(a++).toString(36),t.setAttribute(r,i)),i}return t[r]||(t[r]=(a++).toString(36))},s=function(t){return o(t,!0)},l=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},c=0,u={GET_ELEMENT_BY_ID:function(t,e){return e="slick_"+c++,t.innerHTML='<a id="'+e+'"></a>',!!this.getElementById(e)},QUERY_SELECTOR:function(t){return t.innerHTML="_<style>:nth-child(2){}</style>",t.innerHTML='<a class="MiX"></a>',1===t.querySelectorAll(".MiX").length},EXPANDOS:function(t,e){return e="slick_"+c++,t._custom_property_=e,t._custom_property_===e},MATCHES_SELECTOR:function(t){t.className="MiX";var e=t.matchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector;if(e)try{e.call(t,":slick")}catch(i){return!!e.call(t,".MiX")&&e}return!1},GET_ELEMENTS_BY_CLASS_NAME:function(t){return t.innerHTML='<a class="f"></a><a class="b"></a>',1===t.getElementsByClassName("b").length&&(t.firstChild.className="b",2===t.getElementsByClassName("b").length&&(t.innerHTML='<a class="a"></a><a class="f b a"></a>',2===t.getElementsByClassName("a").length))},GET_ATTRIBUTE:function(t){return t.innerHTML='<a class="fus ro dah"></a>',"fus ro dah"===t.firstChild.getAttribute("class")}},d=function(t){this.document=t;var e=this.root=t.documentElement;this.tested={},this.uniqueID=this.has("EXPANDOS")?o:s,this.getAttribute=this.has("GET_ATTRIBUTE")?function(t,e){return t.getAttribute(e)}:function(t,e){return(t=t.getAttributeNode(e))&&t.specified?t.value:null},this.hasAttribute=e.hasAttribute?function(t,e){return t.hasAttribute(e)}:function(t,e){return!(!(t=t.getAttributeNode(e))||!t.specified)},this.contains=t.contains&&e.contains?function(t,e){return t.contains(e)}:e.compareDocumentPosition?function(t,e){return t===e||!!(16&t.compareDocumentPosition(e))}:function(t,e){do{if(e===t)return!0}while(e=e.parentNode);return!1},this.sorter=e.compareDocumentPosition?function(t,e){return t.compareDocumentPosition&&e.compareDocumentPosition?4&t.compareDocumentPosition(e)?-1:t===e?0:1:0}:"sourceIndex"in e?function(t,e){return t.sourceIndex&&e.sourceIndex?t.sourceIndex-e.sourceIndex:0}:t.createRange?function(t,e){if(!t.ownerDocument||!e.ownerDocument)return 0;var i=t.ownerDocument.createRange(),n=e.ownerDocument.createRange();return i.setStart(t,0),i.setEnd(t,0),n.setStart(e,0),n.setEnd(e,0),i.compareBoundaryPoints(Range.START_TO_END,n)}:null,this.failed={};var i=this.has("MATCHES_SELECTOR");i&&(this.matchesSelector=function(t,e){if(this.failed[e])return null;try{return i.call(t,e)}catch(t){return g.debug&&console.warn("matchesSelector failed on "+e),this.failed[e]=!0,null}}),this.has("QUERY_SELECTOR")&&(this.querySelectorAll=function(t,e){if(this.failed[e])return!0;var i,n,a,r,o;if(t!==this.document&&(r=e[0].combinator,n=t.getAttribute("id"),a=e,n||(n="__slick__",(o=t).setAttribute("id",n)),e="#"+n+" "+a,(r.indexOf("~")>-1||r.indexOf("+")>-1)&&((t=t.parentNode)||(i=!0))),!i)try{i=t.querySelectorAll(e.toString())}catch(t){g.debug&&console.warn("querySelectorAll failed on "+(a||e)),i=this.failed[a||e]=!0}return o&&o.removeAttribute("id"),i})};d.prototype.has=function(t){var e=this.tested,i=e[t];if(null!=i)return i;var n=this.root,a=this.document,r=a.createElement("div");r.setAttribute("style","display: none;"),n.appendChild(r);var o=u[t],s=!1;if(o)try{s=o.call(a,r)}catch(t){}return g.debug&&!s&&console.warn("document has no "+t),n.removeChild(r),e[t]=s};var h={" ":function(t,e,i){var n,a,r=!e.id,o=!e.tag,s=!e.classes;if(e.id&&t.getElementById&&this.has("GET_ELEMENT_BY_ID")&&(n=t.getElementById(e.id))&&n.getAttribute("id")===e.id&&(a=[n],r=!0,"*"===e.tag&&(o=!0)),!a&&(e.classes&&t.getElementsByClassName&&this.has("GET_ELEMENTS_BY_CLASS_NAME")?(a=t.getElementsByClassName(e.classList),s=!0,"*"===e.tag&&(o=!0)):(a=t.getElementsByTagName(e.tag),"*"!==e.tag&&(o=!0)),!a||!a.length))return!1;for(var l=0;n=a[l++];)(o&&r&&s&&!e.attributes&&!e.pseudos||this.match(n,e,o,r,s))&&i(n);return!0},">":function(t,e,i){if(t=t.firstChild)do{1==t.nodeType&&this.match(t,e)&&i(t)}while(t=t.nextSibling)},"+":function(t,e,i){for(;t=t.nextSibling;)if(1==t.nodeType){this.match(t,e)&&i(t);break}},"^":function(t,e,i){(t=t.firstChild)&&(1===t.nodeType?this.match(t,e)&&i(t):h["+"].call(this,t,e,i))},"~":function(t,e,i){for(;t=t.nextSibling;)1===t.nodeType&&this.match(t,e)&&i(t)},"++":function(t,e,i){h["+"].call(this,t,e,i),h["!+"].call(this,t,e,i)},"~~":function(t,e,i){h["~"].call(this,t,e,i),h["!~"].call(this,t,e,i)},"!":function(t,e,i){for(;t=t.parentNode;)t!==this.document&&this.match(t,e)&&i(t)},"!>":function(t,e,i){(t=t.parentNode)!==this.document&&this.match(t,e)&&i(t)},"!+":function(t,e,i){for(;t=t.previousSibling;)if(1==t.nodeType){this.match(t,e)&&i(t);break}},"!^":function(t,e,i){(t=t.lastChild)&&(1==t.nodeType?this.match(t,e)&&i(t):h["!+"].call(this,t,e,i))},"!~":function(t,e,i){for(;t=t.previousSibling;)1===t.nodeType&&this.match(t,e)&&i(t)}};d.prototype.search=function(t,e,i){t?!t.nodeType&&t.document&&(t=t.document):t=this.document;var a=n(e);if(!a||!a.length)throw new Error("invalid expression");i||(i=[]);var r,s=l(i)?function(t){i[i.length]=t}:function(t){i[i.length++]=t};if(a.length>1){r={};var c=s;s=function(t){var e=o(t);r[e]||(r[e]=!0,c(t))}}var u,d,p;t:for(var f=0;e=a[f++];)if(g.noQSA||!this.querySelectorAll||!0===(d=this.querySelectorAll(t,e)))if(1===e.length)p=e[0],h[p.combinator].call(this,t,p,s);else{for(var m,v,b,y=[t],w=0;p=e[w++];){v=[],b={};for(var x=0;m=y[x++];)h[p.combinator].call(this,m,p,function(t){var e=o(t);b[e]||(b[e]=!0,v[v.length]=t)});if(!v.length)continue t;y=v}if(0===f)i=v;else for(var k=0;k<v.length;k++)s(v[k])}else if(d&&d.length)for(w=0;u=d[w++];)u.nodeName>"@"&&s(u);return r&&i&&i.length>1&&this.sort(i),i},d.prototype.sort=function(t){return this.sorter?Array.prototype.sort.call(t,this.sorter):t};var p={empty:function(){return!(this&&1===this.nodeType||(this.innerText||this.textContent||"").length)},not:function(t){return!g.matches(this,t)},contains:function(t){return(this.innerText||this.textContent||"").indexOf(t)>-1},"first-child":function(){for(var t=this;t=t.previousSibling;)if(1==t.nodeType)return!1;return!0},"last-child":function(){for(var t=this;t=t.nextSibling;)if(1==t.nodeType)return!1;return!0},"only-child":function(){for(var t=this;t=t.previousSibling;)if(1==t.nodeType)return!1;for(var e=this;e=e.nextSibling;)if(1==e.nodeType)return!1;return!0},"first-of-type":function(){for(var t=this,e=t.nodeName;t=t.previousSibling;)if(t.nodeName==e)return!1;return!0},"last-of-type":function(){for(var t=this,e=t.nodeName;t=t.nextSibling;)if(t.nodeName==e)return!1;return!0},"only-of-type":function(){for(var t=this,e=this.nodeName;t=t.previousSibling;)if(t.nodeName==e)return!1;for(var i=this;i=i.nextSibling;)if(i.nodeName==e)return!1;return!0},enabled:function(){return!this.disabled},disabled:function(){return this.disabled},checked:function(){return this.checked||this.selected},selected:function(){return this.selected},focus:function(){return this.ownerDocument.activeElement===this&&(this.href||this.type||g.hasAttribute(this,"tabindex"))},root:function(){return this===this.ownerDocument.documentElement}};d.prototype.match=function(t,e,i,n,a){if(!g.noQSA&&this.matchesSelector){var r=this.matchesSelector(t,e);if(null!==r)return r}if(!i&&e.tag){var o=t.nodeName.toLowerCase();if("*"===e.tag){if(o<"@")return!1}else if(o!=e.tag)return!1}if(!n&&e.id&&t.getAttribute("id")!==e.id)return!1;var s,l;if(!a&&e.classes){var c=this.getAttribute(t,"class");if(!c)return!1;for(l in e.classes)if(!RegExp("(^|\\s)"+e.classes[l]+"(\\s|$)").test(c))return!1}var u,d;if(e.attributes)for(s=0;l=e.attributes[s++];){var h=l.operator,f=l.escapedValue;if(u=l.name,d=l.value,h){var m=this.getAttribute(t,u);if(null==m)return!1;switch(h){case"^=":if(!RegExp("^"+f).test(m))return!1;break;case"$=":if(!RegExp(f+"$").test(m))return!1;break;case"~=":if(!RegExp("(^|\\s)"+f+"(\\s|$)").test(m))return!1;break;case"|=":if(!RegExp("^"+f+"(-|$)").test(m))return!1;break;case"=":if(m!==d)return!1;break;case"*=":if(-1===m.indexOf(d))return!1;break;default:return!1}}else if(!this.hasAttribute(t,u))return!1}if(e.pseudos)for(s=0;l=e.pseudos[s++];){if(u=l.name,d=l.value,p[u])return p[u].call(t,d);if(null!=d){if(this.getAttribute(t,u)!==d)return!1}else if(!this.hasAttribute(t,u))return!1}return!0},d.prototype.matches=function(t,e){var i=n(e);if(1===i.length&&1===i[0].length)return this.match(t,i[0][0]);if(!g.noQSA&&this.matchesSelector){var a=this.matchesSelector(t,i);if(null!==a)return a}for(var r,o=this.search(this.document,e,{length:0}),s=0;r=o[s++];)if(t===r)return!0;return!1};var f={},m=function(t){var e=t||document;if(e.ownerDocument?e=e.ownerDocument:e.document&&(e=e.document),9!==e.nodeType)throw new TypeError("invalid document");var i=o(e);return f[i]||(f[i]=new d(e))},g=function(t,e){return g.search(t,e)};g.search=function(t,e,i){return m(e).search(e,t,i)},g.find=function(t,e){return m(e).search(e,t)[0]||null},g.getAttribute=function(t,e){return m(t).getAttribute(t,e)},g.hasAttribute=function(t,e){return m(t).hasAttribute(t,e)},g.contains=function(t,e){return m(t).contains(t,e)},g.matches=function(t,e){return m(t).matches(t,e)},g.sort=function(t){return t&&t.length>1&&m(t[0]).sort(t),t},g.parse=n,e.exports=g},{"./parser":314}],313:[function(t,e,i){(function(i){"use strict";e.exports="document"in i?t("./finder"):{parse:t("./parser")}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./finder":312,"./parser":314}],314:[function(t,e,i){"use strict";var n=/([-.*+?^${}()|[\]\/\\])/g,a=/\\/g,r=function(t){return(t+"").replace(n,"\\$1")},o=function(t){return(t+"").replace(a,"")},s=RegExp("^(?:\\s*(,)\\s*|\\s*(<combinator>+)\\s*|(\\s+)|(<unicode>+|\\*)|\\#(<unicode>+)|\\.(<unicode>+)|\\[\\s*(<unicode1>+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:([\"']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(<unicode>+)(?:\\((?:(?:([\"'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)".replace(/<combinator>/,"["+r(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")),l=function(t){this.combinator=t||" ",this.tag="*"};l.prototype.toString=function(){if(!this.raw){var t,e,i="";if(i+=this.tag||"*",this.id&&(i+="#"+this.id),this.classes&&(i+="."+this.classList.join(".")),this.attributes)for(t=0;e=this.attributes[t++];)i+="["+e.name+(e.operator?e.operator+'"'+e.value+'"':"")+"]";if(this.pseudos)for(t=0;e=this.pseudos[t++];)i+=":"+e.name,e.value&&(i+="("+e.value+")");this.raw=i}return this.raw};var c=function(){this.length=0};c.prototype.toString=function(){if(!this.raw){for(var t,e="",i=0;t=this[i++];)1!==i&&(e+=" ")," "!==t.combinator&&(e+=t.combinator+" "),e+=t;this.raw=e}return this.raw};var u=function(t,e,i,n,a,s,u,d,h,p,f,m,g,v,b,y){var w,x;if((e||!this.length)&&(w=this[this.length++]=new c,e))return"";if(w||(w=this[this.length-1]),(i||n||!w.length)&&(x=w[w.length++]=new l(i)),x||(x=w[w.length-1]),a)x.tag=o(a);else if(s)x.id=o(s);else if(u){var k=o(u),S=x.classes||(x.classes={});if(!S[k]){S[k]=r(u);var C=x.classList||(x.classList=[]);C.push(k),C.sort()}}else g?(y=y||b,(x.pseudos||(x.pseudos=[])).push({type:1==m.length?"class":"element",name:o(g),escapedName:r(g),value:y?o(y):null,escapedValue:y?r(y):null})):d&&(f=f?r(f):null,(x.attributes||(x.attributes=[])).push({operator:h,name:o(d),escapedName:r(d),value:f?o(f):null,escapedValue:f?r(f):null}));return""},d=function(t){this.length=0;for(var e,i=this,n=t;t;){if((e=t.replace(s,function(){return u.apply(i,arguments)}))===t)throw new Error(n+" is an invalid expression");t=e}};d.prototype.toString=function(){if(!this.raw){for(var t,e=[],i=0;t=this[i++];)e.push(t);this.raw=e.join(", ")}return this.raw};var h={};e.exports=function(t){return null==t?null:(t=(""+t).replace(/^\s+|\s+$/g,""),h[t]||(h[t]=new d(t)))}},{}],315:[function(t,e,i){!function(t){"use strict";"function"==typeof define&&define.amd?define(t):void 0!==e&&void 0!==e.exports?e.exports=t():"undefined"!=typeof Package?Sortable=t():window.Sortable=t()}(function(){"use strict";function t(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(t);this.el=t,this.options=e=b({},e),t[P]=this;var i={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(t.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",ignore:"a, img",filter:null,animation:0,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1};for(var n in i)!(n in e)&&(e[n]=i[n]);J(e);for(var r in this)"_"===r.charAt(0)&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&G,a(t,"mousedown",this._onTapStart),a(t,"touchstart",this._onTapStart),this.nativeDraggable&&(a(t,"dragover",this),a(t,"dragenter",this)),V.push(this._onDragOver),e.store&&this.sort(e.store.get(this))}function e(t){k&&k.state!==t&&(s(k,"display",t?"none":""),!t&&k.state&&S.insertBefore(k,y),k.state=t)}function i(t,e,i){if(t){i=i||B;do{if(">*"===e&&t.parentNode===i||g(t,e))return t}while(t!==i&&(t=t.parentNode))}return null}function n(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.preventDefault()}function a(t,e,i){t.addEventListener(e,i,!1)}function r(t,e,i){t.removeEventListener(e,i,!1)}function o(t,e,i){if(t)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(L," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(L," ")}}function s(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return B.defaultView&&B.defaultView.getComputedStyle?i=B.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function l(t,e,i){if(t){var n=t.getElementsByTagName(e),a=0,r=n.length;if(i)for(;a<r;a++)i(n[a],a);return n}return[]}function c(t,e,i,n,a,r,o){var s=B.createEvent("Event"),l=(t||e[P]).options,c="on"+i.charAt(0).toUpperCase()+i.substr(1);s.initEvent(i,!0,!0),s.to=e,s.from=a||e,s.item=n||e,s.clone=k,s.oldIndex=r,s.newIndex=o,e.dispatchEvent(s),l[c]&&l[c].call(t,s)}function u(t,e,i,n,a,r){var o,s,l=t[P],c=l.options.onMove;return(o=B.createEvent("Event")).initEvent("move",!0,!0),o.to=e,o.from=t,o.dragged=i,o.draggedRect=n,o.related=a||e,o.relatedRect=r||e.getBoundingClientRect(),t.dispatchEvent(o),c&&(s=c.call(l,o)),s}function d(t){t.draggable=!1}function h(){H=!1}function p(t,e){var i=t.lastElementChild,n=i.getBoundingClientRect();return(e.clientY-(n.top+n.height)>5||e.clientX-(n.right+n.width)>5)&&i}function f(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,n=0;i--;)n+=e.charCodeAt(i);return n.toString(36)}function m(t,e){var i=0;if(!t||!t.parentNode)return-1;for(;t&&(t=t.previousElementSibling);)"TEMPLATE"!==t.nodeName.toUpperCase()&&g(t,e)&&i++;return i}function g(t,e){if(t){var i=(e=e.split(".")).shift().toUpperCase(),n=new RegExp("\\s("+e.join("|")+")(?=\\s)","g");return!(""!==i&&t.nodeName.toUpperCase()!=i||e.length&&((" "+t.className+" ").match(n)||[]).length!=e.length)}return!1}function v(t,e){var i,n;return function(){void 0===i&&(i=arguments,n=this,setTimeout(function(){1===i.length?t.call(n,i[0]):t.apply(n,i),i=void 0},e))}}function b(t,e){if(t&&e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}if("undefined"==typeof window||void 0===window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var y,w,x,k,S,C,T,E,O,I,_,A,N,j,D,z,F,R={},L=/\s+/g,P="Sortable"+(new Date).getTime(),M=window,B=M.document,$=M.parseInt,G=!!("draggable"in B.createElement("div")),q=function(t){return t=B.createElement("x"),t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}(),H=!1,U=Math.abs,V=[],Y=v(function(t,e,i){if(i&&e.scroll){var n,a,r,o,s=e.scrollSensitivity,l=e.scrollSpeed,c=t.clientX,u=t.clientY,d=window.innerWidth,h=window.innerHeight;if(E!==i&&(T=e.scroll,E=i,!0===T)){T=i;do{if(T.offsetWidth<T.scrollWidth||T.offsetHeight<T.scrollHeight)break}while(T=T.parentNode)}T&&(n=T,a=T.getBoundingClientRect(),r=(U(a.right-c)<=s)-(U(a.left-c)<=s),o=(U(a.bottom-u)<=s)-(U(a.top-u)<=s)),r||o||(o=(h-u<=s)-(u<=s),((r=(d-c<=s)-(c<=s))||o)&&(n=M)),R.vx===r&&R.vy===o&&R.el===n||(R.el=n,R.vx=r,R.vy=o,clearInterval(R.pid),n&&(R.pid=setInterval(function(){n===M?M.scrollTo(M.pageXOffset+r*l,M.pageYOffset+o*l):(o&&(n.scrollTop+=o*l),r&&(n.scrollLeft+=r*l))},24)))}},30),J=function(t){var e=t.group;e&&"object"==typeof e||(e=t.group={name:e}),["pull","put"].forEach(function(t){t in e||(e[t]=!0)}),t.groups=" "+e.name+(e.put.join?" "+e.put.join(" "):"")+" "};return t.prototype={constructor:t,_onTapStart:function(t){var e=this,n=this.el,a=this.options,r=t.type,o=t.touches&&t.touches[0],s=(o||t).target,l=s,u=a.filter;if(!("mousedown"===r&&0!==t.button||a.disabled)&&(s=i(s,a.draggable,n))){if(A=m(s,a.draggable),"function"==typeof u){if(u.call(this,t,s,this))return c(e,l,"filter",s,n,A),void t.preventDefault()}else if(u&&(u=u.split(",").some(function(t){if(t=i(l,t.trim(),n))return c(e,t,"filter",s,n,A),!0})))return void t.preventDefault();a.handle&&!i(l,a.handle,n)||this._prepareDragStart(t,o,s)}},_prepareDragStart:function(t,e,i){var n,r=this,s=r.el,c=r.options,u=s.ownerDocument;i&&!y&&i.parentNode===s&&(D=t,S=s,w=(y=i).parentNode,C=y.nextSibling,j=c.group,n=function(){r._disableDelayedDrag(),y.draggable=!0,o(y,r.options.chosenClass,!0),r._triggerDragStart(e)},c.ignore.split(",").forEach(function(t){l(y,t.trim(),d)}),a(u,"mouseup",r._onDrop),a(u,"touchend",r._onDrop),a(u,"touchcancel",r._onDrop),c.delay?(a(u,"mouseup",r._disableDelayedDrag),a(u,"touchend",r._disableDelayedDrag),a(u,"touchcancel",r._disableDelayedDrag),a(u,"mousemove",r._disableDelayedDrag),a(u,"touchmove",r._disableDelayedDrag),r._dragStartTimer=setTimeout(n,c.delay)):n())},_disableDelayedDrag:function(){var t=this.el.ownerDocument;clearTimeout(this._dragStartTimer),r(t,"mouseup",this._disableDelayedDrag),r(t,"touchend",this._disableDelayedDrag),r(t,"touchcancel",this._disableDelayedDrag),r(t,"mousemove",this._disableDelayedDrag),r(t,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(t){t?(D={target:y,clientX:t.clientX,clientY:t.clientY},this._onDragStart(D,"touch")):this.nativeDraggable?(a(y,"dragend",this),a(S,"dragstart",this._onDragStart)):this._onDragStart(D,!0);try{B.selection?B.selection.empty():window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(){S&&y&&(o(y,this.options.ghostClass,!0),t.active=this,c(this,S,"start",y,S,A))},_emulateDragOver:function(){if(z){if(this._lastX===z.clientX&&this._lastY===z.clientY)return;this._lastX=z.clientX,this._lastY=z.clientY,q||s(x,"display","none");var t=B.elementFromPoint(z.clientX,z.clientY),e=t,i=" "+this.options.group.name,n=V.length;if(e)do{if(e[P]&&e[P].options.groups.indexOf(i)>-1){for(;n--;)V[n]({clientX:z.clientX,clientY:z.clientY,target:t,rootEl:e});break}t=e}while(e=e.parentNode);q||s(x,"display","")}},_onTouchMove:function(e){if(D){t.active||this._dragStarted(),this._appendGhost();var i=e.touches?e.touches[0]:e,n=i.clientX-D.clientX,a=i.clientY-D.clientY,r=e.touches?"translate3d("+n+"px,"+a+"px,0)":"translate("+n+"px,"+a+"px)";F=!0,z=i,s(x,"webkitTransform",r),s(x,"mozTransform",r),s(x,"msTransform",r),s(x,"transform",r),e.preventDefault()}},_appendGhost:function(){if(!x){var t,e=y.getBoundingClientRect(),i=s(y),n=this.options;o(x=y.cloneNode(!0),n.ghostClass,!1),o(x,n.fallbackClass,!0),s(x,"top",e.top-$(i.marginTop,10)),s(x,"left",e.left-$(i.marginLeft,10)),s(x,"width",e.width),s(x,"height",e.height),s(x,"opacity","0.8"),s(x,"position","fixed"),s(x,"zIndex","100000"),s(x,"pointerEvents","none"),n.fallbackOnBody&&B.body.appendChild(x)||S.appendChild(x),t=x.getBoundingClientRect(),s(x,"width",2*e.width-t.width),s(x,"height",2*e.height-t.height)}},_onDragStart:function(t,e){var i=t.dataTransfer,n=this.options;this._offUpEvents(),"clone"==j.pull&&(s(k=y.cloneNode(!0),"display","none"),S.insertBefore(k,y)),e?("touch"===e?(a(B,"touchmove",this._onTouchMove),a(B,"touchend",this._onDrop),a(B,"touchcancel",this._onDrop)):(a(B,"mousemove",this._onTouchMove),a(B,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,50)):(i&&(i.effectAllowed="move",n.setData&&n.setData.call(this,i,y)),a(B,"drop",this),setTimeout(this._dragStarted,0))},_onDragOver:function(t){var n,a,r,o=this.el,l=this.options,d=l.group,f=d.put,m=j===d,g=l.sort;if(void 0!==t.preventDefault&&(t.preventDefault(),!l.dragoverBubble&&t.stopPropagation()),F=!0,c(this,S,"over",y,S,t,t.target),j&&!l.disabled&&(m?g||(r=!S.contains(y)):j.pull&&f&&(j.name===d.name||f.indexOf&&~f.indexOf(j.name)))&&(void 0===t.rootEl||t.rootEl===this.el)){if(Y(t,l,this.el),H)return;if(n=i(t.target,l.draggable,o),a=y.getBoundingClientRect(),r)return e(!0),void(k||C?S.insertBefore(y,k||C):g||S.appendChild(y));if(0===o.children.length||o.children[0]===x||o===t.target&&(n=p(o,t))){if(n){if(n.animated)return;b=n.getBoundingClientRect()}e(m),!1!==u(S,o,y,a,n,b)&&(y.contains(o)||(o.appendChild(y),w=o),this._animate(a,y),n&&this._animate(b,n))}else if(n&&!n.animated&&n!==y&&void 0!==n.parentNode[P]){O!==n&&(O=n,I=s(n),_=s(n.parentNode));var v,b=n.getBoundingClientRect(),T=b.right-b.left,E=b.bottom-b.top,A=/left|right|inline/.test(I.cssFloat+I.display)||"flex"==_.display&&0===_["flex-direction"].indexOf("row"),N=n.offsetWidth>y.offsetWidth,D=n.offsetHeight>y.offsetHeight,z=(A?(t.clientX-b.left)/T:(t.clientY-b.top)/E)>.5,R=n.nextElementSibling,L=u(S,o,y,a,n,b);if(!1!==L){if(H=!0,setTimeout(h,30),e(m),1===L||-1===L)v=1===L;else if(A){var M=y.offsetTop,B=n.offsetTop;v=M===B?n.previousElementSibling===y&&!N||z&&N:B>M}else v=R!==y&&!D||z&&D;y.contains(o)||(v&&!R?o.appendChild(y):n.parentNode.insertBefore(y,v?R:n)),w=y.parentNode,this._animate(a,y),this._animate(b,n)}}}},_animate:function(t,e){var i=this.options.animation;if(i){var n=e.getBoundingClientRect();s(e,"transition","none"),s(e,"transform","translate3d("+(t.left-n.left)+"px,"+(t.top-n.top)+"px,0)"),e.offsetWidth,s(e,"transition","all "+i+"ms"),s(e,"transform","translate3d(0,0,0)"),clearTimeout(e.animated),e.animated=setTimeout(function(){s(e,"transition",""),s(e,"transform",""),e.animated=!1},i)}},_offUpEvents:function(){var t=this.el.ownerDocument;r(B,"touchmove",this._onTouchMove),r(t,"mouseup",this._onDrop),r(t,"touchend",this._onDrop),r(t,"touchcancel",this._onDrop)},_onDrop:function(e){var i=this.el,n=this.options;clearInterval(this._loopId),clearInterval(R.pid),clearTimeout(this._dragStartTimer),r(B,"mousemove",this._onTouchMove),this.nativeDraggable&&(r(B,"drop",this),r(i,"dragstart",this._onDragStart)),this._offUpEvents(),e&&(F&&(e.preventDefault(),!n.dropBubble&&e.stopPropagation()),x&&x.parentNode.removeChild(x),y&&(this.nativeDraggable&&r(y,"dragend",this),d(y),o(y,this.options.ghostClass,!1),o(y,this.options.chosenClass,!1),S!==w?(N=m(y,n.draggable))>=0&&(c(null,w,"sort",y,S,A,N),c(this,S,"sort",y,S,A,N),c(null,w,"add",y,S,A,N),c(this,S,"remove",y,S,A,N)):(k&&k.parentNode.removeChild(k),y.nextSibling!==C&&(N=m(y,n.draggable))>=0&&(c(this,S,"update",y,S,A,N),c(this,S,"sort",y,S,A,N))),t.active&&(null!==N&&-1!==N||(N=A),this.originalEvent=e,c(this,S,"end",y,S,A,N),this.save()))),this._nulling()},_nulling:function(){S=y=w=x=C=k=T=E=D=z=F=N=O=I=j=t.active=null},handleEvent:function(t){var e=t.type;"dragover"===e||"dragenter"===e?y&&(this._onDragOver(t),n(t)):"drop"!==e&&"dragend"!==e||this._onDrop(t)},toArray:function(){for(var t,e=[],n=this.el.children,a=0,r=n.length,o=this.options;a<r;a++)i(t=n[a],o.draggable,this.el)&&e.push(t.getAttribute(o.dataIdAttr)||f(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach(function(t,a){var r=n.children[a];i(r,this.options.draggable,n)&&(e[t]=r)},this),t.forEach(function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))})},save:function(){var t=this.options.store;t&&t.set(this)},closest:function(t,e){return i(t,e||this.options.draggable,this.el)},option:function(t,e){var i=this.options;if(void 0===e)return i[t];i[t]=e,"group"===t&&J(i)},destroy:function(){var t=this.el;t[P]=null,r(t,"mousedown",this._onTapStart),r(t,"touchstart",this._onTapStart),this.nativeDraggable&&(r(t,"dragover",this),r(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),V.splice(V.indexOf(this._onDragOver),1),this._onDrop(),this.el=t=null}},t.utils={on:a,off:r,css:s,find:l,is:function(t,e){return!!i(t,e,t)},extend:b,throttle:v,closest:i,toggleClass:o,index:m},t.create=function(e,i){return new t(e,i)},t.version="1.4.2",t})},{}],316:[function(t,e,i){!function(){function t(t,e,i){return t.call.apply(t.bind,arguments)}function i(t,e,i){if(!t)throw Error();if(2<arguments.length){var n=Array.prototype.slice.call(arguments,2);return function(){var i=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(i,n),t.apply(e,i)}}return function(){return t.apply(e,arguments)}}function n(e,a,r){return(n=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?t:i).apply(null,arguments)}function a(t,e){this.a=t,this.o=e||t,this.c=this.o.document}function r(t,e,i,n){if(e=t.c.createElement(e),i)for(var a in i)i.hasOwnProperty(a)&&("style"==a?e.style.cssText=i[a]:e.setAttribute(a,i[a]));return n&&e.appendChild(t.c.createTextNode(n)),e}function o(t,e,i){(t=t.c.getElementsByTagName(e)[0])||(t=document.documentElement),t.insertBefore(i,t.lastChild)}function s(t){t.parentNode&&t.parentNode.removeChild(t)}function l(t,e,i){e=e||[],i=i||[];for(var n=t.className.split(/\s+/),a=0;a<e.length;a+=1){for(var r=!1,o=0;o<n.length;o+=1)if(e[a]===n[o]){r=!0;break}r||n.push(e[a])}for(e=[],a=0;a<n.length;a+=1){for(r=!1,o=0;o<i.length;o+=1)if(n[a]===i[o]){r=!0;break}r||e.push(n[a])}t.className=e.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function c(t,e){for(var i=t.className.split(/\s+/),n=0,a=i.length;n<a;n++)if(i[n]==e)return!0;return!1}function u(t){return t.o.location.hostname||t.a.location.hostname}function d(t,e,i){function n(){c&&a&&s&&(c(l),c=null)}e=r(t,"link",{rel:"stylesheet",href:e,media:"all"});var a=!1,s=!0,l=null,c=i||null;it?(e.onload=function(){a=!0,n()},e.onerror=function(){a=!0,l=Error("Stylesheet failed to load"),n()}):setTimeout(function(){a=!0,n()},0),o(t,"head",e)}function h(t,e,i,n){var a=t.c.getElementsByTagName("head")[0];if(a){var o=r(t,"script",{src:e}),s=!1;return o.onload=o.onreadystatechange=function(){s||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(s=!0,i&&i(null),o.onload=o.onreadystatechange=null,"HEAD"==o.parentNode.tagName&&a.removeChild(o))},a.appendChild(o),setTimeout(function(){s||(s=!0,i&&i(Error("Script load timeout")))},n||5e3),o}return null}function p(){this.a=0,this.c=null}function f(t){return t.a++,function(){t.a--,g(t)}}function m(t,e){t.c=e,g(t)}function g(t){0==t.a&&t.c&&(t.c(),t.c=null)}function v(t){this.a=t||"-"}function b(t,e){this.c=t,this.f=4,this.a="n";var i=(e||"n4").match(/^([nio])([1-9])$/i);i&&(this.a=i[1],this.f=parseInt(i[2],10))}function y(t){return k(t)+" "+t.f+"00 300px "+w(t.c)}function w(t){var e=[];t=t.split(/,\s*/);for(var i=0;i<t.length;i++){var n=t[i].replace(/['"]/g,"");-1!=n.indexOf(" ")||/^\d/.test(n)?e.push("'"+n+"'"):e.push(n)}return e.join(",")}function x(t){return t.a+t.f}function k(t){var e="normal";return"o"===t.a?e="oblique":"i"===t.a&&(e="italic"),e}function S(t){var e=4,i="n",n=null;return t&&((n=t.match(/(normal|oblique|italic)/i))&&n[1]&&(i=n[1].substr(0,1).toLowerCase()),(n=t.match(/([1-9]00|normal|bold)/i))&&n[1]&&(/bold/i.test(n[1])?e=7:/[1-9]00/.test(n[1])&&(e=parseInt(n[1].substr(0,1),10)))),i+e}function C(t,e){this.c=t,this.f=t.o.document.documentElement,this.h=e,this.a=new v("-"),this.j=!1!==e.events,this.g=!1!==e.classes}function T(t){t.g&&l(t.f,[t.a.c("wf","loading")]),O(t,"loading")}function E(t){if(t.g){var e=c(t.f,t.a.c("wf","active")),i=[],n=[t.a.c("wf","loading")];e||i.push(t.a.c("wf","inactive")),l(t.f,i,n)}O(t,"inactive")}function O(t,e,i){t.j&&t.h[e]&&(i?t.h[e](i.c,x(i)):t.h[e]())}function I(){this.c={}}function _(t,e,i){var n,a=[];for(n in e)if(e.hasOwnProperty(n)){var r=t.c[n];r&&a.push(r(e[n],i))}return a}function A(t,e){this.c=t,this.f=e,this.a=r(this.c,"span",{"aria-hidden":"true"},this.f)}function N(t){o(t.c,"body",t.a)}function j(t){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+w(t.c)+";font-style:"+k(t)+";font-weight:"+t.f+"00;"}function D(t,e,i,n,a,r){this.g=t,this.j=e,this.a=n,this.c=i,this.f=a||3e3,this.h=r||void 0}function z(t,e,i,n,a,r,o){this.v=t,this.B=e,this.c=i,this.a=n,this.s=o||"BESbswy",this.f={},this.w=a||3e3,this.u=r||null,this.m=this.j=this.h=this.g=null,this.g=new A(this.c,this.s),this.h=new A(this.c,this.s),this.j=new A(this.c,this.s),this.m=new A(this.c,this.s),t=j(t=new b(this.a.c+",serif",x(this.a))),this.g.a.style.cssText=t,t=j(t=new b(this.a.c+",sans-serif",x(this.a))),this.h.a.style.cssText=t,t=j(t=new b("serif",x(this.a))),this.j.a.style.cssText=t,t=j(t=new b("sans-serif",x(this.a))),this.m.a.style.cssText=t,N(this.g),N(this.h),N(this.j),N(this.m)}function F(){if(null===at){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);at=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return at}function R(t,e,i){for(var n in nt)if(nt.hasOwnProperty(n)&&e===t.f[nt[n]]&&i===t.f[nt[n]])return!0;return!1}function L(t){var e,i=t.g.a.offsetWidth,n=t.h.a.offsetWidth;(e=i===t.f.serif&&n===t.f["sans-serif"])||(e=F()&&R(t,i,n)),e?et()-t.A>=t.w?F()&&R(t,i,n)&&(null===t.u||t.u.hasOwnProperty(t.a.c))?M(t,t.v):M(t,t.B):P(t):M(t,t.v)}function P(t){setTimeout(n(function(){L(this)},t),50)}function M(t,e){setTimeout(n(function(){s(this.g.a),s(this.h.a),s(this.j.a),s(this.m.a),e(this.a)},t),0)}function B(t,e,i){this.c=t,this.a=e,this.f=0,this.m=this.j=!1,this.s=i}function $(t){0==--t.f&&t.j&&(t.m?((t=t.a).g&&l(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),O(t,"active")):E(t.a))}function G(t){this.j=t,this.a=new I,this.h=0,this.f=this.g=!0}function q(t,e,i,a,r){var o=0==--t.h;(t.f||t.g)&&setTimeout(function(){var t=r||null,s=a||null||{};if(0===i.length&&o)E(e.a);else{e.f+=i.length,o&&(e.j=o);var c,u=[];for(c=0;c<i.length;c++){var d=i[c],h=s[d.c],p=e.a,f=d;if(p.g&&l(p.f,[p.a.c("wf",f.c,x(f).toString(),"loading")]),O(p,"fontloading",f),p=null,null===rt)if(window.FontFace){var f=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent),m=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);rt=f?42<parseInt(f[1],10):!m}else rt=!1;p=rt?new D(n(e.g,e),n(e.h,e),e.c,d,e.s,h):new z(n(e.g,e),n(e.h,e),e.c,d,e.s,t,h),u.push(p)}for(c=0;c<u.length;c++)u[c].start()}},0)}function H(t,e,i){var n=[],a=i.timeout;T(e);var n=_(t.a,i,t.c),r=new B(t.c,e,a);for(t.h=n.length,e=0,i=n.length;e<i;e++)n[e].load(function(e,i,n){q(t,r,e,i,n)})}function U(t,e){this.c=t,this.a=e}function V(t,e){this.c=t,this.a=e}function Y(t,e){this.c=t||ot,this.a=[],this.f=[],this.g=e||""}function J(t,e){for(var i=e.length,n=0;n<i;n++){var a=e[n].split(":");3==a.length&&t.f.push(a.pop());var r="";2==a.length&&""!=a[1]&&(r=":"),t.a.push(a.join(r))}}function W(t){if(0==t.a.length)throw Error("No fonts to load!");if(-1!=t.c.indexOf("kit="))return t.c;for(var e=t.a.length,i=[],n=0;n<e;n++)i.push(t.a[n].replace(/ /g,"+"));return e=t.c+"?family="+i.join("%7C"),0<t.f.length&&(e+="&subset="+t.f.join(",")),0<t.g.length&&(e+="&text="+encodeURIComponent(t.g)),e}function X(t){this.f=t,this.a=[],this.c={}}function K(t){for(var e=t.f.length,i=0;i<e;i++){var n=t.f[i].split(":"),a=n[0].replace(/\+/g," "),r=["n4"];if(2<=n.length){var o;if(o=[],s=n[1])for(var s=s.split(","),l=s.length,c=0;c<l;c++){var u;if((u=s[c]).match(/^[\w-]+$/))if(null==(h=ut.exec(u.toLowerCase())))u="";else{if(u=h[2],u=null==u||""==u?"n":ct[u],null==(h=h[1])||""==h)h="4";else var d=lt[h],h=d||(isNaN(h)?"4":h.substr(0,1));u=[u,h].join("")}else u="";u&&o.push(u)}0<o.length&&(r=o),3==n.length&&(n=n[2],o=[],0<(n=n?n.split(","):o).length&&(n=st[n[0]])&&(t.c[a]=n))}for(t.c[a]||(n=st[a])&&(t.c[a]=n),n=0;n<r.length;n+=1)t.a.push(new b(a,r[n]))}}function Q(t,e){this.c=t,this.a=e}function Z(t,e){this.c=t,this.a=e}function tt(t,e){this.c=t,this.f=e,this.a=[]}var et=Date.now||function(){return+new Date},it=!!window.FontFace;v.prototype.c=function(t){for(var e=[],i=0;i<arguments.length;i++)e.push(arguments[i].replace(/[\W_]+/g,"").toLowerCase());return e.join(this.a)},D.prototype.start=function(){var t=this.c.o.document,e=this,i=et(),n=new Promise(function(n,a){function r(){et()-i>=e.f?a():t.fonts.load(y(e.a),e.h).then(function(t){1<=t.length?n():setTimeout(r,25)},function(){a()})}r()}),a=null,r=new Promise(function(t,i){a=setTimeout(i,e.f)});Promise.race([r,n]).then(function(){a&&(clearTimeout(a),a=null),e.g(e.a)},function(){e.j(e.a)})};var nt={D:"serif",C:"sans-serif"},at=null;z.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=et(),L(this)};var rt=null;B.prototype.g=function(t){var e=this.a;e.g&&l(e.f,[e.a.c("wf",t.c,x(t).toString(),"active")],[e.a.c("wf",t.c,x(t).toString(),"loading"),e.a.c("wf",t.c,x(t).toString(),"inactive")]),O(e,"fontactive",t),this.m=!0,$(this)},B.prototype.h=function(t){var e=this.a;if(e.g){var i=c(e.f,e.a.c("wf",t.c,x(t).toString(),"active")),n=[],a=[e.a.c("wf",t.c,x(t).toString(),"loading")];i||n.push(e.a.c("wf",t.c,x(t).toString(),"inactive")),l(e.f,n,a)}O(e,"fontinactive",t),$(this)},G.prototype.load=function(t){this.c=new a(this.j,t.context||this.j),this.g=!1!==t.events,this.f=!1!==t.classes,H(this,new C(this.c,t),t)},U.prototype.load=function(t){function e(){if(r["__mti_fntLst"+n]){var i,a=r["__mti_fntLst"+n](),o=[];if(a)for(var s=0;s<a.length;s++){var l=a[s].fontfamily;void 0!=a[s].fontStyle&&void 0!=a[s].fontWeight?(i=a[s].fontStyle+a[s].fontWeight,o.push(new b(l,i))):o.push(new b(l))}t(o)}else setTimeout(function(){e()},50)}var i=this,n=i.a.projectId,a=i.a.version;if(n){var r=i.c.o;h(this.c,(i.a.api||"https://fast.fonts.net/jsapi")+"/"+n+".js"+(a?"?v="+a:""),function(a){a?t([]):(r["__MonotypeConfiguration__"+n]=function(){return i.a},e())}).id="__MonotypeAPIScript__"+n}else t([])},V.prototype.load=function(t){var e,i,n=this.a.urls||[],a=this.a.families||[],r=this.a.testStrings||{},o=new p;for(e=0,i=n.length;e<i;e++)d(this.c,n[e],f(o));var s=[];for(e=0,i=a.length;e<i;e++)if((n=a[e].split(":"))[1])for(var l=n[1].split(","),c=0;c<l.length;c+=1)s.push(new b(n[0],l[c]));else s.push(new b(n[0]));m(o,function(){t(s,r)})};var ot="https://fonts.googleapis.com/css",st={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},lt={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},ct={i:"i",italic:"i",n:"n",normal:"n"},ut=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/,dt={Arimo:!0,Cousine:!0,Tinos:!0};Q.prototype.load=function(t){var e=new p,i=this.c,n=new Y(this.a.api,this.a.text),a=this.a.families;J(n,a);var r=new X(a);K(r),d(i,W(n),f(e)),m(e,function(){t(r.a,r.c,dt)})},Z.prototype.load=function(t){var e=this.a.id,i=this.c.o;e?h(this.c,(this.a.api||"https://use.typekit.net")+"/"+e+".js",function(e){if(e)t([]);else if(i.Typekit&&i.Typekit.config&&i.Typekit.config.fn){e=i.Typekit.config.fn;for(var n=[],a=0;a<e.length;a+=2)for(var r=e[a],o=e[a+1],s=0;s<o.length;s++)n.push(new b(r,o[s]));try{i.Typekit.load({events:!1,classes:!1,async:!0})}catch(t){}t(n)}},2e3):t([])},tt.prototype.load=function(t){var e=this.f.id,i=this.c.o,n=this;e?(i.__webfontfontdeckmodule__||(i.__webfontfontdeckmodule__={}),i.__webfontfontdeckmodule__[e]=function(e,i){for(var a=0,r=i.fonts.length;a<r;++a){var o=i.fonts[a];n.a.push(new b(o.name,S("font-weight:"+o.weight+";font-style:"+o.style)))}t(n.a)},h(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+u(this.c)+"/"+e+".js",function(e){e&&t([])})):t([])};var ht=new G(window);ht.a.c.custom=function(t,e){return new V(e,t)},ht.a.c.fontdeck=function(t,e){return new tt(e,t)},ht.a.c.monotype=function(t,e){return new U(e,t)},ht.a.c.typekit=function(t,e){return new Z(e,t)},ht.a.c.google=function(t,e){return new Q(e,t)};var pt={load:n(ht.load,ht)};"function"==typeof define&&define.amd?define(function(){return pt}):void 0!==e&&e.exports?e.exports=pt:(window.WebFont=pt,window.WebFontConfig&&ht.load(window.WebFontConfig))}()},{}],"ext/tooltips":[function(t,e,i){!function(){function t(e,i,n){var a=t.resolve(e);if(null==a){n=n||e,i=i||"root";var r=new Error('Failed to fakeRequire "'+n+'" from "'+i+'"');throw r.path=n,r.parent=i,r.fakeRequire=!0,r}var o=t.modules[a];if(!o._resolving&&!o.exports){var s={};s.exports={},s.client=s.component=!0,o._resolving=!0,o.call(this,s.exports,t.relative(a),s),delete o._resolving,o.exports=s.exports}return o.exports}t.modules={},t.aliases={},t.resolve=function(e){"/"===e.charAt(0)&&(e=e.slice(1));for(var i=[e,e+".js",e+".json",e+"/index.js",e+"/index.json"],n=0;n<i.length;n++){var e=i[n];if(t.modules.hasOwnProperty(e))return e;if(t.aliases.hasOwnProperty(e))return t.aliases[e]}},t.normalize=function(t,e){var i=[];if("."!=e.charAt(0))return e;t=t.split("/"),e=e.split("/");for(var n=0;n<e.length;++n)".."==e[n]?t.pop():"."!=e[n]&&""!=e[n]&&i.push(e[n]);return t.concat(i).join("/")},t.register=function(e,i){t.modules[e]=i},t.alias=function(e,i){if(!t.modules.hasOwnProperty(e))throw new Error('Failed to alias "'+e+'", it does not exist');t.aliases[i]=e},t.relative=function(e){function i(t,e){for(var i=t.length;i--;)if(t[i]===e)return i;return-1}function n(i){return t(n.resolve(i),e,i)}var a=t.normalize(e,"..");return n.resolve=function(n){var r=n.charAt(0);if("/"==r)return n.slice(1);if("."==r)return t.normalize(a,n);var o=e.split("/"),s=i(o,"deps")+1;return s||(s=0),n=o.slice(0,s+1).join("/")+"/deps/"+n},n.exists=function(e){return t.modules.hasOwnProperty(n.resolve(e))},n},t.register("darsain-position/index.js",Function("exports, fakeRequire, module","'use strict';\n        \n        /**\n         * Transport.\n         */\n        module.exports = position;\n        \n        /**\n         * Globals.\n         */\n        var win = window;\n        var doc = win.document;\n        var docEl = doc.documentElement;\n        \n        /**\n         * Poor man's shallow object extend.\n         *\n         * @param {Object} a\n         * @param {Object} b\n         *\n         * @return {Object}\n         */\n        function extend(a, b) {\n        \tfor (var key in b) {\n        \t\ta[key] = b[key];\n        \t}\n        \treturn a;\n        }\n        \n        /**\n         * Checks whether object is window.\n         *\n         * @param {Object} obj\n         *\n         * @return {Boolean}\n         */\n        function isWin(obj) {\n        \treturn obj && obj.setInterval != null;\n        }\n        \n        /**\n         * Returns element's object with `left`, `top`, `bottom`, `right`, `width`, and `height`\n         * properties indicating the position and dimensions of element on a page.\n         *\n         * @param {Element} element\n         *\n         * @return {Object}\n         */\n        function position(element) {\n        \tvar winTop = win.pageYOffset || docEl.scrollTop;\n        \tvar winLeft = win.pageXOffset || docEl.scrollLeft;\n        \tvar box = { left: 0, right: 0, top: 0, bottom: 0, width: 0, height: 0 };\n        \n        \tif (isWin(element)) {\n        \t\tbox.width = win.innerWidth || docEl.clientWidth;\n        \t\tbox.height = win.innerHeight || docEl.clientHeight;\n        \t} else if (docEl.contains(element) && element.getBoundingClientRect != null) {\n        \t\textend(box, element.getBoundingClientRect());\n        \t\t// width & height don't exist in <IE9\n        \t\tbox.width = box.right - box.left;\n        \t\tbox.height = box.bottom - box.top;\n        \t} else {\n        \t\treturn box;\n        \t}\n        \n        \tbox.top = box.top + winTop - docEl.clientTop;\n        \tbox.left = box.left + winLeft - docEl.clientLeft;\n        \tbox.right = box.left + box.width;\n        \tbox.bottom = box.top + box.height;\n        \n        \treturn box;\n        }//# sourceURL=darsain-position/index.js")),t.register("component-classes/index.js",Function("exports, fakeRequire, module","/**\n         * Module dependencies.\n         */\n        \n        var index = fakeRequire('indexof');\n        \n        /**\n         * Whitespace regexp.\n         */\n        \n        var re = /\\s+/;\n        \n        /**\n         * toString reference.\n         */\n        \n        var toString = Object.prototype.toString;\n        \n        /**\n         * Wrap `el` in a `ClassList`.\n         *\n         * @param {Element} el\n         * @return {ClassList}\n         * @api public\n         */\n        \n        module.exports = function(el){\n          return new ClassList(el);\n        };\n        \n        /**\n         * Initialize a new ClassList for `el`.\n         *\n         * @param {Element} el\n         * @api private\n         */\n        \n        function ClassList(el) {\n          if (!el) throw new Error('A DOM element reference is fakeRequired');\n          this.el = el;\n          this.list = el.classList;\n        }\n        \n        /**\n         * Add class `name` if not already present.\n         *\n         * @param {String} name\n         * @return {ClassList}\n         * @api public\n         */\n        \n        ClassList.prototype.add = function(name){\n          // classList\n          if (this.list) {\n            this.list.add(name);\n            return this;\n          }\n        \n          // fallback\n          var arr = this.array();\n          var i = index(arr, name);\n          if (!~i) arr.push(name);\n          this.el.className = arr.join(' ');\n          return this;\n        };\n        \n        /**\n         * Remove class `name` when present, or\n         * pass a regular expression to remove\n         * any which match.\n         *\n         * @param {String|RegExp} name\n         * @return {ClassList}\n         * @api public\n         */\n        \n        ClassList.prototype.remove = function(name){\n          if ('[object RegExp]' == toString.call(name)) {\n            return this.removeMatching(name);\n          }\n        \n          // classList\n          if (this.list) {\n            this.list.remove(name);\n            return this;\n          }\n        \n          // fallback\n          var arr = this.array();\n          var i = index(arr, name);\n          if (~i) arr.splice(i, 1);\n          this.el.className = arr.join(' ');\n          return this;\n        };\n        \n        /**\n         * Remove all classes matching `re`.\n         *\n         * @param {RegExp} re\n         * @return {ClassList}\n         * @api private\n         */\n        \n        ClassList.prototype.removeMatching = function(re){\n          var arr = this.array();\n          for (var i = 0; i < arr.length; i++) {\n            if (re.test(arr[i])) {\n              this.remove(arr[i]);\n            }\n          }\n          return this;\n        };\n        \n        /**\n         * Toggle class `name`.\n         *\n         * @param {String} name\n         * @return {ClassList}\n         * @api public\n         */\n        \n        ClassList.prototype.toggle = function(name){\n          // classList\n          if (this.list) {\n            this.list.toggle(name);\n            return this;\n          }\n        \n          // fallback\n          if (this.has(name)) {\n            this.remove(name);\n          } else {\n            this.add(name);\n          }\n          return this;\n        };\n        \n        /**\n         * Return an array of classes.\n         *\n         * @return {Array}\n         * @api public\n         */\n        \n        ClassList.prototype.array = function(){\n          var str = this.el.className.replace(/^\\s+|\\s+$/g, '');\n          var arr = str.split(re);\n          if ('' === arr[0]) arr.shift();\n          return arr;\n        };\n        \n        /**\n         * Check if class `name` is present.\n         *\n         * @param {String} name\n         * @return {ClassList}\n         * @api public\n         */\n        \n        ClassList.prototype.has =\n        ClassList.prototype.contains = function(name){\n          return this.list\n            ? this.list.contains(name)\n            : !! ~index(this.array(), name);\n        };\n        //# sourceURL=component-classes/index.js")),t.register("darsain-tooltip/index.js",Function("exports, fakeRequire, module","'use strict';\n        \n        /**\n         * Dependencies.\n         */\n        var evt = fakeRequire('event');\n        var classes = fakeRequire('classes');\n        var indexOf = fakeRequire('indexof');\n        var position = fakeRequire('position');\n        \n        /**\n         * Globals.\n         */\n        var win = window;\n        var doc = win.document;\n        var body = doc.body;\n        var verticalPlaces = ['top', 'bottom'];\n        \n        /**\n         * Transport.\n         */\n        module.exports = Tooltip;\n        \n        /**\n         * Prototypal inheritance.\n         *\n         * @param {Object} o\n         *\n         * @return {Object}\n         */\n        var objectCreate = Object.create || (function () {\n        \tfunction F() {}\n        \treturn function (o) {\n        \t\tF.prototype = o;\n        \t\treturn new F();\n        \t};\n        })();\n        \n        /**\n         * Poor man's shallow object extend.\n         *\n         * @param {Object} a\n         * @param {Object} b\n         *\n         * @return {Object}\n         */\n        function extend(a, b) {\n        \tfor (var key in b) {\n        \t\ta[key] = b[key];\n        \t}\n        \treturn a;\n        }\n        \n        /**\n         * Parse integer from strings like '-50px'.\n         *\n         * @param {Mixed} value\n         *\n         * @return {Integer}\n         */\n        function parsePx(value) {\n        \treturn 0 | Math.round(String(value).replace(/[^\\-0-9.]/g, ''));\n        }\n        \n        /**\n         * Get computed style of element.\n         *\n         * @param {Element} element\n         *\n         * @type {String}\n         */\n        var style = win.getComputedStyle ? function style(element, name) {\n        \treturn win.getComputedStyle(element, null)[name];\n        } : function style(element, name) {\n        \treturn element.currentStyle[name];\n        };\n        \n        /**\n         * Returns transition duration of element in ms.\n         *\n         * @param {Element} element\n         *\n         * @return {Int}\n         */\n        function transitionDuration(element) {\n        \tvar duration = String(style(element, transitionDuration.propName));\n        \tvar match = duration.match(/([0-9.]+)([ms]{1,2})/);\n        \tif (match) {\n        \t\tduration = Number(match[1]);\n        \t\tif (match[2] === 's') {\n        \t\t\tduration *= 1000;\n        \t\t}\n        \t}\n        \treturn 0|duration;\n        }\n        transitionDuration.propName = (function () {\n        \tvar element = doc.createElement('div');\n        \tvar names = ['transitionDuration', 'webkitTransitionDuration'];\n        \tvar value = '1s';\n        \tfor (var i = 0; i < names.length; i++) {\n        \t\telement.style[names[i]] = value;\n        \t\tif (element.style[names[i]] === value) {\n        \t\t\treturn names[i];\n        \t\t}\n        \t}\n        }());\n        \n        /**\n         * Tooltip construnctor.\n         *\n         * @param {String|Element} content\n         * @param {Object}         options\n         *\n         * @return {Tooltip}\n         */\n        function Tooltip(content, options) {\n        \tif (!(this instanceof Tooltip)) {\n        \t\treturn new Tooltip(content, options);\n        \t}\n        \tthis.hidden = 1;\n        \tthis.options = extend(objectCreate(Tooltip.defaults), options);\n        \tthis._createElement();\n        \tthis.content(content);\n        }\n        \n        /**\n         * Creates a tooltip element.\n         *\n         * @return {Void}\n         */\n        Tooltip.prototype._createElement = function () {\n        \tthis.element = doc.createElement('div');\n        \tthis.classes = classes(this.element);\n        \tthis.classes.add(this.options.baseClass);\n        \tvar propName;\n        \tfor (var i = 0; i < Tooltip.classTypes.length; i++) {\n        \t\tpropName = Tooltip.classTypes[i] + 'Class';\n        \t\tif (this.options[propName]) {\n        \t\t\tthis.classes.add(this.options[propName]);\n        \t\t}\n        \t}\n        };\n        \n        /**\n         * Changes tooltip's type class type.\n         *\n         * @param {String} name\n         *\n         * @return {Tooltip}\n         */\n        Tooltip.prototype.type = function (name) {\n        \treturn this.changeClassType('type', name);\n        };\n        \n        /**\n         * Changes tooltip's effect class type.\n         *\n         * @param {String} name\n         *\n         * @return {Tooltip}\n         */\n        Tooltip.prototype.effect = function (name) {\n        \treturn this.changeClassType('effect', name);\n        };\n        \n        /**\n         * Changes class type.\n         *\n         * @param {String} propName\n         * @param {String} newClass\n         *\n         * @return {Tooltip}\n         */\n        Tooltip.prototype.changeClassType = function (propName, newClass) {\n        \tpropName += 'Class';\n        \tif (this.options[propName]) {\n        \t\tthis.classes.remove(this.options[propName]);\n        \t}\n        \tthis.options[propName] = newClass;\n        \tif (newClass) {\n        \t\tthis.classes.add(newClass);\n        \t}\n        \treturn this;\n        };\n        \n        /**\n         * Updates tooltip's dimensions.\n         *\n         * @return {Tooltip}\n         */\n        Tooltip.prototype.updateSize = function () {\n        \tif (this.hidden) {\n        \t\tthis.element.style.visibility = 'hidden';\n        \t\twindow.document.body.appendChild(this.element);\n        \t}\n        \tthis.width = this.element.offsetWidth;\n        \tthis.height = this.element.offsetHeight;\n        \tif (this.spacing == null) {\n        \t\tthis.spacing = this.options.spacing != null ? this.options.spacing : parsePx(style(this.element, 'top'));\n        \t}\n        \tif (this.offset == null) {\n        \t\tthis.offset = this.options.offset != null ? this.options.offset : 0;\n    \t}\n        \tif (this.hidden) {\n        \t\twindow.document.body.removeChild(this.element);\n        \t\tthis.element.style.visibility = '';\n        \t} else {\n        \t\tthis.position();\n        \t}\n        \treturn this;\n        };\n        \n        /**\n         * Change tooltip content.\n         *\n         * When tooltip is visible, its size is automatically\n         * synced and tooltip correctly repositioned.\n         *\n         * @param {String|Element} content\n         *\n         * @return {Tooltip}\n         */\n        Tooltip.prototype.content = function (content) {\n        \tif (typeof content === 'object') {\n        \t\tthis.element.innerHTML = '';\n        \t\tthis.element.appendChild(content);\n        \t} else {\n        \t\tthis.element.innerHTML = content;\n        \t}\n        \tthis.updateSize();\n        \treturn this;\n        };\n        \n        /**\n         * Pick new place tooltip should be displayed at.\n         *\n         * When the tooltip is visible, it is automatically positioned there.\n         *\n         * @param {String} place\n         *\n         * @return {Tooltip}\n         */\n        Tooltip.prototype.place = function (place) {\n        \tthis.options.place = place;\n        \tif (!this.hidden) {\n        \t\tthis.position();\n        \t}\n        \treturn this;\n        };\n        \n        /**\n         * Attach tooltip to an element.\n         *\n         * @param {Element} element\n         *\n         * @return {Tooltip}\n         */\n        Tooltip.prototype.attach = function (element) {\n        \tthis.attachedTo = element;\n        \tif (!this.hidden) {\n        \t\tthis.position();\n        \t}\n        \treturn this;\n        };\n        \n        /**\n         * Detach tooltip from element.\n         *\n         * @return {Tooltip}\n         */\n        Tooltip.prototype.detach = function () {\n        \tthis.hide();\n        \tthis.attachedTo = null;\n        \treturn this;\n        };\n        \n        /**\n         * Pick the most reasonable place for target position.\n         *\n         * @param {Object} target\n         *\n         * @return {Tooltip}\n         */\n        Tooltip.prototype._pickPlace = function (target) {\n        \tif (!this.options.auto) {\n        \t\treturn this.options.place;\n        \t}\n        \tvar winPos = position(win);\n        \tvar place = this.options.place.split('-');\n        \tvar spacing = this.spacing;\n        \n        \tif (~indexOf(verticalPlaces, place[0])) {\n        \t\tif (target.top - this.height - spacing <= winPos.top) {\n        \t\t\tplace[0] = 'bottom';\n        \t\t} else if (target.bottom + this.height + spacing >= winPos.bottom) {\n        \t\t\tplace[0] = 'top';\n        \t\t}\n        \t\tswitch (place[1]) {\n        \t\t\tcase 'left':\n        \t\t\t\tif (target.right - this.width <= winPos.left) {\n        \t\t\t\t\tplace[1] = 'right';\n        \t\t\t\t}\n        \t\t\t\tbreak;\n        \t\t\tcase 'right':\n        \t\t\t\tif (target.left + this.width >= winPos.right) {\n        \t\t\t\t\tplace[1] = 'left';\n        \t\t\t\t}\n        \t\t\t\tbreak;\n        \t\t\tdefault:\n        \t\t\t\tif (target.left + target.width / 2 + this.width / 2 >= winPos.right) {\n        \t\t\t\t\tplace[1] = 'left';\n        \t\t\t\t} else if (target.right - target.width / 2 - this.width / 2 <= winPos.left) {\n        \t\t\t\t\tplace[1] = 'right';\n        \t\t\t\t}\n        \t\t}\n        \t} else {\n        \t\tif (target.left - this.width - spacing <= winPos.left) {\n        \t\t\tplace[0] = 'right';\n        \t\t} else if (target.right + this.width + spacing >= winPos.right) {\n        \t\t\tplace[0] = 'left';\n        \t\t}\n        \t\tswitch (place[1]) {\n        \t\t\tcase 'top':\n        \t\t\t\tif (target.bottom - this.height <= winPos.top) {\n        \t\t\t\t\tplace[1] = 'bottom';\n        \t\t\t\t}\n        \t\t\t\tbreak;\n        \t\t\tcase 'bottom':\n        \t\t\t\tif (target.top + this.height >= winPos.bottom) {\n        \t\t\t\t\tplace[1] = 'top';\n        \t\t\t\t}\n        \t\t\t\tbreak;\n        \t\t\tdefault:\n        \t\t\t\tif (target.top + target.height / 2 + this.height / 2 >= winPos.bottom) {\n        \t\t\t\t\tplace[1] = 'top';\n        \t\t\t\t} else if (target.bottom - target.height / 2 - this.height / 2 <= winPos.top) {\n        \t\t\t\t\tplace[1] = 'bottom';\n        \t\t\t\t}\n        \t\t}\n        \t}\n        \n        \treturn place.join('-');\n        };\n        \n        /**\n         * Position the element to an element or a specific coordinates.\n         *\n         * @param {Integer|Element} x\n         * @param {Integer}         y\n         *\n         * @return {Tooltip}\n         */\n        Tooltip.prototype.position = function (x, y) {\n        \tif (this.attachedTo) {\n        \t\tx = this.attachedTo;\n        \t}\n        \tif (x == null && this._p) {\n        \t\tx = this._p[0];\n        \t\ty = this._p[1];\n        \t} else {\n        \t\tthis._p = arguments;\n        \t}\n        \tvar target = typeof x === 'number' ? {\n        \t\tleft: 0|x,\n        \t\tright: 0|x,\n        \t\ttop: 0|y,\n        \t\tbottom: 0|y,\n        \t\twidth: 0,\n        \t\theight: 0\n        \t} : position(x);\n        \tvar spacing = Number(this.spacing), offset = Number(this.offset);\n        \tvar newPlace = this._pickPlace(target);\n        \n        \t// Add/Change place class when necessary\n        \tif (newPlace !== this.curPlace) {\n        \t\tif (this.curPlace) {\n        \t\t\tthis.classes.remove(this.curPlace);\n        \t\t}\n        \t\tthis.classes.add(newPlace);\n        \t\tthis.curPlace = newPlace;\n        \t}\n        \n        \t// Position the tip\n        \tvar top, left;\n        \tswitch (this.curPlace) {\n        \t\tcase 'top':\n        \t\t\ttop = target.top - this.height - spacing;\n        \t\t\tleft = target.left + target.width / 2 - this.width / 2;\n        \t\t\tbreak;\n        \t\tcase 'top-left':\n        \t\t\ttop = target.top - this.height - spacing;\n        \t\t\tleft = target.right - this.width - offset;\n        \t\t\tbreak;\n        \t\tcase 'top-right':\n        \t\t\ttop = target.top - this.height - spacing;\n        \t\t\tleft = target.left + offset;\n        \t\t\tbreak;\n        \n        \t\tcase 'bottom':\n        \t\t\ttop = target.bottom + spacing;\n        \t\t\tleft = target.left + target.width / 2 - this.width / 2;\n        \t\t\tbreak;\n        \t\tcase 'bottom-left':\n        \t\t\ttop = target.bottom + spacing;\n        \t\t\tleft = target.right - this.width - offset;\n        \t\t\tbreak;\n        \t\tcase 'bottom-right':\n        \t\t\ttop = target.bottom + spacing;\n        \t\t\tleft = target.left + offset;\n        \t\t\tbreak;\n        \n        \t\tcase 'left':\n        \t\t\ttop = target.top + target.height / 2 - this.height / 2;\n        \t\t\tleft = target.left - this.width - spacing;\n        \t\t\tbreak;\n        \t\tcase 'left-top':\n        \t\t\ttop = target.bottom - this.height;\n        \t\t\tleft = target.left - this.width - spacing;\n        \t\t\tbreak;\n        \t\tcase 'left-bottom':\n        \t\t\ttop = target.top;\n        \t\t\tleft = target.left - this.width - spacing;\n        \t\t\tbreak;\n        \n        \t\tcase 'right':\n        \t\t\ttop = target.top + target.height / 2 - this.height / 2;\n        \t\t\tleft = target.right + spacing;\n        \t\t\tbreak;\n        \t\tcase 'right-top':\n        \t\t\ttop = target.bottom - this.height;\n        \t\t\tleft = target.right + spacing;\n        \t\t\tbreak;\n        \t\tcase 'right-bottom':\n        \t\t\ttop = target.top;\n        \t\t\tleft = target.right + spacing;\n        \t\t\tbreak;\n        \t}\n        \n        \t// Set tip position & class\n        \tthis.element.style.top = Math.round(top) + 'px';\n        \tthis.element.style.left = Math.round(left) + 'px';\n        \n        \treturn this;\n        };\n        \n        /**\n         * Show the tooltip.\n         *\n         * @param {Integer|Element} x\n         * @param {Integer}         y\n         *\n         * @return {Tooltip}\n         */\n        Tooltip.prototype.show = function (x, y) {\n        \tx = this.attachedTo ? this.attachedTo : x;\n        \n        \t// Clear potential ongoing animation\n        \tclearTimeout(this.aIndex);\n        \n        \t// Position the element when requested\n        \tif (x != null) {\n        \t\tthis.position(x, y);\n        \t}\n        \n        \t// Stop here if tip is already visible\n        \tif (this.hidden) {\n        \t\tthis.hidden = 0;\n        \t\twindow.document.body.appendChild(this.element);\n        \t}\n        \n        \t// Make tooltip aware of window resize\n        \tif (this.attachedTo) {\n        \t\tthis._aware();\n        \t}\n        \n        \t// Trigger layout and kick in the transition\n        \tif (this.options.inClass) {\n        \t\tif (this.options.effectClass) {\n        \t\t\tvoid this.element.clientHeight;\n        \t\t}\n        \t\tthis.classes.add(this.options.inClass);\n        \t}\n        \n        \treturn this;\n        };\n        \n        /**\n         * Hide the tooltip.\n         *\n         * @return {Tooltip}\n         */\n        Tooltip.prototype.hide = function () {\n        \tif (this.hidden) {\n        \t\treturn;\n        \t}\n        \n        \tvar self = this;\n        \tvar duration = 0;\n        \n        \t// Remove .in class and calculate transition duration if any\n        \tif (this.options.inClass) {\n        \t\tthis.classes.remove(this.options.inClass);\n        \t\tif (this.options.effectClass) {\n        \t\t\tduration = transitionDuration(this.element);\n        \t\t}\n        \t}\n        \n        \t// Remove tip from window resize awareness\n        \tif (this.attachedTo) {\n        \t\tthis._unaware();\n        \t}\n        \n        \t// Remove the tip from the DOM when transition is done\n        \tclearTimeout(this.aIndex);\n        \tthis.aIndex = setTimeout(function () {\n        \t\tself.aIndex = 0;\n        \t\twindow.document.body.removeChild(self.element);\n        \t\tself.hidden = 1;\n        \t}, duration);\n        \n        \treturn this;\n        };\n        \n        Tooltip.prototype.toggle = function (x, y) {\n        \treturn this[this.hidden ? 'show' : 'hide'](x, y);\n        };\n        \n        Tooltip.prototype.destroy = function () {\n        \tclearTimeout(this.aIndex);\n        \tthis._unaware();\n        \tif (!this.hidden) {\n        \t\twindow.document.body.removeChild(this.element);\n        \t}\n        \tthis.element = this.options = null;\n        };\n        \n        /**\n         * Make the tip window resize aware.\n         *\n         * @return {Void}\n         */\n        Tooltip.prototype._aware = function () {\n        \tvar index = indexOf(Tooltip.winAware, this);\n        \tif (!~index) {\n        \t\tTooltip.winAware.push(this);\n        \t}\n        };\n        \n        /**\n         * Remove the window resize awareness.\n         *\n         * @return {Void}\n         */\n        Tooltip.prototype._unaware = function () {\n        \tvar index = indexOf(Tooltip.winAware, this);\n        \tif (~index) {\n        \t\tTooltip.winAware.splice(index, 1);\n        \t}\n        };\n        \n        /**\n         * Handles repositioning of tooltips on window resize.\n         *\n         * @return {Void}\n         */\n        Tooltip.reposition = (function () {\n        \tvar rAF = window.requestAnimationFrame || window.webkitRequestAnimationFrame || function (fn) {\n        \t\treturn setTimeout(fn, 17);\n        \t};\n        \tvar rIndex;\n        \n        \tfunction requestReposition() {\n        \t\tif (rIndex || !Tooltip.winAware.length) {\n        \t\t\treturn;\n        \t\t}\n        \t\trIndex = rAF(reposition, 17);\n        \t}\n        \n        \tfunction reposition() {\n        \t\trIndex = 0;\n        \t\tvar tip;\n        \t\tfor (var i = 0, l = Tooltip.winAware.length; i < l; i++) {\n        \t\t\ttip = Tooltip.winAware[i];\n        \t\t\ttip.position();\n        \t\t}\n        \t}\n        \n        \treturn requestReposition;\n        }());\n        Tooltip.winAware = [];\n        \n        // Bind winAware repositioning to window resize event\n        evt.bind(window, 'resize', Tooltip.reposition);\n        evt.bind(window, 'scroll', Tooltip.reposition);\n        \n        /**\n         * Array with dynamic class types.\n         *\n         * @type {Array}\n         */\n        Tooltip.classTypes = ['type', 'effect'];\n        \n        /**\n         * Default options for Tooltip constructor.\n         *\n         * @type {Object}\n         */\n        Tooltip.defaults = {\n        \tbaseClass:   'tooltip', // Base tooltip class name.\n        \ttypeClass:   null,      // Type tooltip class name.\n        \teffectClass: null,      // Effect tooltip class name.\n        \tinClass:     'in',      // Class used to transition stuff in.\n        \tplace:       'top',     // Default place.\n        \tspacing:     null,      // Gap between target and tooltip.\n        \toffset:      null,      // Horizontal offset to align arrow\n        \tauto:        0          // Whether to automatically adjust place to fit into window.\n        };//# sourceURL=darsain-tooltip/index.js")),t.register("darsain-event/index.js",Function("exports, fakeRequire, module","'use strict';\n        \n        /**\n         * Bind `el` event `type` to `fn`.\n         *\n         * @param {Element}  el\n         * @param {String}   type\n         * @param {Function} fn\n         * @param {Boolean}  capture\n         *\n         * @return {Function}\n         */\n        exports.bind = window.addEventListener ? function (el, type, fn, capture) {\n        \tel.addEventListener(type, fn, capture || false);\n        \treturn fn;\n        } : function (el, type, fn) {\n        \tvar fnid = type + fn;\n        \tel[fnid] = el[fnid] || function () {\n        \t\tvar event = window.event;\n        \t\tevent.target = event.srcElement;\n        \t\tevent.preventDefault = function () {\n        \t\t\tevent.returnValue = false;\n        \t\t};\n        \t\tevent.stopPropagation = function () {\n        \t\t\tevent.cancelBubble = true;\n        \t\t};\n        \t\tfn.call(el, event);\n        \t};\n        \tel.attachEvent('on' + type, el[fnid]);\n        \treturn fn;\n        };\n        \n        /**\n         * Unbind `el` event `type`'s callback `fn`.\n         *\n         * @param {Element}  el\n         * @param {String}   type\n         * @param {Function} fn\n         * @param {Boolean}  capture\n         *\n         * @return {Function}\n         */\n        exports.unbind = window.removeEventListener ? function (el, type, fn, capture) {\n        \tel.removeEventListener(type, fn, capture || false);\n        \treturn fn;\n        } : function (el, type, fn) {\n        \tvar fnid = type + fn;\n        \tel.detachEvent('on' + type, el[fnid]);\n        \ttry {\n        \t\tdelete el[fnid];\n        \t} catch (err) {\n        \t\t// can't delete window object properties\n        \t\tel[fnid] = undefined;\n        \t}\n        \treturn fn;\n        };//# sourceURL=darsain-event/index.js")),t.register("component-indexof/index.js",Function("exports, fakeRequire, module","module.exports = function(arr, obj){\n          if (arr.indexOf) return arr.indexOf(obj);\n          for (var i = 0; i < arr.length; ++i) {\n            if (arr[i] === obj) return i;\n          }\n          return -1;\n        };//# sourceURL=component-indexof/index.js")),t.register("code42day-dataset/index.js",Function("exports, fakeRequire, module","module.exports=dataset;\n        \n        /*global document*/\n        \n        \n        // replace namesLikeThis with names-like-this\n        function toDashed(name) {\n          return name.replace(/([A-Z])/g, function(u) {\n            return \"-\" + u.toLowerCase();\n          });\n        }\n        \n        var fn;\n        \n        if (document.head.dataset) {\n          fn = {\n            set: function(node, attr, value) {\n               if (!node.dataset) return;               node.dataset[attr] = value;\n            },\n            get: function(node, attr) {\n              return node.dataset && node.dataset[attr];\n            }\n          };\n        } else {\n          fn = {\n            set: function(node, attr, value) {\n              node.setAttribute('data-' + toDashed(attr), value);\n            },\n            get: function(node, attr) {\n              return node.getAttribute('data-' + toDashed(attr));\n            }\n          };\n        }\n        \n        function dataset(node, attr, value) {\n          var self = {\n            set: set,\n            get: get\n          };\n        \n          function set(attr, value) {\n            fn.set(node, attr, value);\n            return self;\n          }\n        \n          function get(attr) {\n            return fn.get(node, attr);\n          }\n        \n          if (arguments.length === 3) {\n            return set(attr, value);\n          }\n          if (arguments.length == 2) {\n            return get(attr);\n          }\n        \n          return self;\n        }//# sourceURL=code42day-dataset/index.js")),t.register("tooltips/index.js",Function("exports, fakeRequire, module","'use strict';\n        \n        /**\n         * Dependencies.\n         */\n        var evt = fakeRequire('event');\n        var indexOf = fakeRequire('indexof');\n        var Tooltip = fakeRequire('tooltip');\n        var dataset = fakeRequire('dataset');\n        \n        /**\n         * Transport.\n         */\n        module.exports = Tooltips;\n        \n        /**\n         * Globals.\n         */\n        var MObserver = window.MutationObserver || window.WebkitMutationObserver;\n        \n        /**\n         * Prototypal inheritance.\n         *\n         * @param {Object} o\n         *\n         * @return {Object}\n         */\n        var objectCreate = Object.create || (function () {\n        \tfunction F() {}\n        \treturn function (o) {\n        \t\tF.prototype = o;\n        \t\treturn new F();\n        \t};\n        })();\n        \n        /**\n         * Poor man's shallow object extend.\n         *\n         * @param {Object} a\n         * @param {Object} b\n         *\n         * @return {Object}\n         */\n        function extend(a, b) {\n        \tfor (var key in b) {\n        \t\ta[key] = b[key];\n        \t}\n        \treturn a;\n        }\n        \n        /**\n         * Capitalize the first letter of a string.\n         *\n         * @param {String} string\n         *\n         * @return {String}\n         */\n        function ucFirst(string) {\n        \treturn string.charAt(0).toUpperCase() + string.slice(1);\n        }\n        \n        /**\n         * Tooltips constructor.\n         *\n         * @param {Element} container\n         * @param {Object}  options\n         *\n         * @return {Tooltips}\n         */\n        function Tooltips(container, options) {\n        \tif (!(this instanceof Tooltips)) {\n        \t\treturn new Tooltips(container, options);\n        \t}\n        \n        \tvar self = this;\n        \tvar observer, TID;\n        \n        \t/**\n        \t * Show tooltip attached to an element.\n        \t *\n        \t * @param {Element} element\n        \t *\n        \t * @return {Tooltips}\n        \t */\n        \tself.show = function (element) {\n        \t\treturn callTooltipMethod(element, 'show');\n        \t};\n        \n        \t/**\n        \t * Hide tooltip attached to an element.\n        \t *\n        \t * @param {Element} element\n        \t *\n        \t * @return {Tooltips}\n        \t */\n        \tself.hide = function (element) {\n        \t\treturn callTooltipMethod(element, 'hide');\n        \t};\n        \n        \t/**\n        \t * Toggle tooltip attached to an element.\n        \t *\n        \t * @param {Element} element\n        \t *\n        \t * @return {Tooltips}\n        \t */\n        \tself.toggle = function (element) {\n        \t\treturn callTooltipMethod(element, 'toggle');\n        \t};\n        \n        \t/**\n        \t * Retrieve tooltip attached to an element and call it's method.\n        \t *\n        \t * @param {Element} element\n        \t * @param {String}  method\n        \t *\n        \t * @return {Tooltips}\n        \t */\n        \tfunction callTooltipMethod(element, method) {\n        \t\tvar tip = self.get(element);\n        \t\tif (tip) {\n        \t\t\ttip[method]();\n        \t\t}\n        \t\treturn self;\n        \t}\n        \n        \t/**\n        \t * Return a tooltip attached to an element. Tooltip is created if it doesn't exist yet.\n        \t *\n        \t * @param {Element} element\n        \t *\n        \t * @return {Tooltip}\n        \t */\n        \tself.get = function (element) {\n        \t\tvar tip = !!element && (element[TID] || createTip(element));\n        \t\tif (tip && !element[TID]) {\n        \t\t\telement[TID] = tip;\n        \t\t}\n        \t\treturn tip;\n        \t};\n        \n        \t/**\n        \t * Add element(s) to Tooltips instance.\n        \t *\n        \t * @param {[type]} element Can be element, or container containing elements to be added.\n        \t *\n        \t * @return {Tooltips}\n        \t */\n        \tself.add = function (element) {\n        \t\tif (!element || element.nodeType !== 1) {\n        \t\t\treturn self;\n        \t\t}\n        \t\tif (dataset(element).get(options.key)) {\n        \t\t\tbindElement(element);\n        \t\t} else if (element.children) {\n        \t\t\tbindElements(element.querySelectorAll(self.selector));\n        \t\t}\n        \t\treturn self;\n        \t};\n        \n        \t/**\n        \t * Remove element(s) from Tooltips instance.\n        \t *\n        \t * @param {Element} element Can be element, or container containing elements to be removed.\n        \t *\n        \t * @return {Tooltips}\n        \t */\n        \tself.remove = function (element) {\n        \t\tif (!element || element.nodeType !== 1) {\n        \t\t\treturn self;\n        \t\t}\n        \t\tif (dataset(element).get(options.key)) {\n        \t\t\tunbindElement(element);\n        \t\t} else if (element.children) {\n        \t\t\tunbindElements(element.querySelectorAll(self.selector));\n        \t\t}\n        \t\treturn self;\n        \t};\n        \n        \t/**\n        \t * Reload Tooltips instance.\n        \t *\n        \t * Unbinds current tooltipped elements, than selects the\n        \t * data-key elements from container and binds them again.\n        \t *\n        \t * @return {Tooltips}\n        \t */\n        \tself.reload = function () {\n        \t\t// Unbind old elements\n        \t\tunbindElements(self.elements);\n        \t\t// Bind new elements\n        \t\tbindElements(self.container.querySelectorAll(self.selector));\n        \t\treturn self;\n        \t};\n        \n        \t/**\n        \t * Destroy Tooltips instance.\n        \t *\n        \t * @return {Void}\n        \t */\n        \tself.destroy = function () {\n        \t\tunbindElements(this.elements);\n        \t\tif (observer) {\n        \t\t\tobserver.disconnect();\n        \t\t}\n        \t\tthis.container = this.elements = this.options = observer = null;\n        \t};\n        \n        \t/**\n        \t * Create a tip from element data attributes.\n        \t *\n        \t * @param {Element} element\n        \t *\n        \t * @return {Tooltip}\n        \t */\n        \tfunction createTip(element) {\n        \t\tvar data = dataset(element);\n        \t\tvar content = data.get(options.key);\n        \t\tif (!content) {\n        \t\t\treturn false;\n        \t\t}\n        \t\tvar tipOptions = objectCreate(options.tooltip);\n        \t\tvar keyData;\n        \t\tfor (var key in Tooltip.defaults) {\n        \t\t\tkeyData = data.get(options.key + ucFirst(key.replace(/Class$/, '')));\n        \t\t\tif (!keyData) {\n        \t\t\t\tcontinue;\n        \t\t\t}\n        \t\t\ttipOptions[key] = keyData;\n        \t\t}\n        \t\treturn new Tooltip(content, tipOptions).attach(element);\n        \t}\n        \n        \t/**\n        \t * Bind Tooltips events to Array/NodeList of elements.\n        \t *\n        \t * @param {Array} elements\n        \t *\n        \t * @return {Void}\n        \t */\n        \tfunction bindElements(elements) {\n        \t\tfor (var i = 0, l = elements.length; i < l; i++) {\n        \t\t\tbindElement(elements[i]);\n        \t\t}\n        \t}\n        \n        \t/**\n        \t * Bind Tooltips events to element.\n        \t *\n        \t * @param {Element} element\n        \t *\n        \t * @return {Void}\n        \t */\n        \tfunction bindElement(element) {\n        \t\tif (element[TID] || ~indexOf(self.elements, element)) {\n        \t\t\treturn;\n        \t\t}\n        \t\tevt.bind(element, options.showOn, eventHandler);\n        \t\tevt.bind(element, options.hideOn, eventHandler);\n        \t\tself.elements.push(element);\n        \t}\n        \n        \t/**\n        \t * Unbind Tooltips events from Array/NodeList of elements.\n        \t *\n        \t * @param {Array} elements\n        \t *\n        \t * @return {Void}\n        \t */\n        \tfunction unbindElements(elements) {\n        \t\tif (self.elements === elements) {\n        \t\t\telements = elements.slice();\n        \t\t}\n        \t\tfor (var i = 0, l = elements.length; i < l; i++) {\n        \t\t\tunbindElement(elements[i]);\n        \t\t}\n        \t}\n        \n        \t/**\n        \t * Unbind Tooltips events from element.\n        \t *\n        \t * @param {Element} element\n        \t *\n        \t * @return {Void}\n        \t */\n        \tfunction unbindElement(element) {\n        \t\tvar index = indexOf(self.elements, element);\n        \t\tif (!~index) {\n        \t\t\treturn;\n        \t\t}\n        \t\tif (element[TID]) {\n        \t\t\telement[TID].destroy();\n        \t\t\tdelete element[TID];\n        \t\t}\n        \t\tevt.unbind(element, options.showOn, eventHandler);\n        \t\tevt.unbind(element, options.hideOn, eventHandler);\n        \t\tself.elements.splice(index, 1);\n        \t}\n        \n        \t/**\n        \t * Tooltips events handler.\n        \t *\n        \t * @param {Event} event\n        \t *\n        \t * @return {Void}\n        \t */\n        \tfunction eventHandler(event) {\n        \t\t/*jshint validthis:true */\n        \t\tif (options.showOn === options.hideOn) {\n        \t\t\tself.toggle(this);\n        \t\t} else {\n        \t\t\tself[event.type === options.showOn ? 'show' : 'hide'](this);\n        \t\t}\n        \t}\n        \n        \t/**\n        \t * Mutations handler.\n        \t *\n        \t * @param {Array} mutations\n        \t *\n        \t * @return {Void}\n        \t */\n        \tfunction mutationsHandler(mutations) {\n        \t\tvar added, removed, i, l;\n        \t\tfor (var m = 0, ml = mutations.length; m < ml; m++) {\n        \t\t\tadded = mutations[m].addedNodes;\n        \t\t\tremoved = mutations[m].removedNodes;\n        \t\t\tfor (i = 0, l = added.length; i < l; i++) {\n        \t\t\t\tself.add(added[i]);\n        \t\t\t}\n        \t\t\tfor (i = 0, l = removed.length; i < l; i++) {\n        \t\t\t\tself.remove(removed[i]);\n        \t\t\t}\n        \t\t\tif (mutations[m].type == 'attributes' && mutations[m].attributeName == 'data-title'){\n        \t\t\t\tif (!self.get(mutations[m])) { self.add(mutations[m].target); }\n        \t\t\t\tself.get(mutations[m].target).content(dataset(mutations[m].target).get('title'));\n        \t\t\t}\n        \t\t}\n        \t}\n        \n        \t// Construct\n        \t(function () {\n        \t\tself.container = container;\n        \t\tself.options = options = extend(objectCreate(Tooltips.defaults), options);\n        \t\tself.ID = TID = options.key + Math.random().toString(36).slice(2);\n        \t\tself.elements = [];\n        \n        \t\t// Create tips selector\n        \t\tself.selector = '[data-' + options.key + ']';\n        \n        \t\t// Load tips\n        \t\tself.reload();\n        \n        \t\t// Create mutations observer\n        \t\tif (options.observe && MObserver) {\n        \t\t\tobserver = new MObserver(mutationsHandler);\n        \t\t\tobserver.observe(self.container, {\n        \t\t\t\tchildList: true,\n        \t\t\t\tsubtree: true,\n        \t\t\t\tattributes: true\n        \t\t\t});\n        \t\t}\n        \t}());\n        }\n        \n        /**\n         * Expose Tooltip.\n         */\n        Tooltips.Tooltip = Tooltip;\n        \n        /**\n         * Default Tooltips options.\n         *\n         * @type {Object}\n         */\n        Tooltips.defaults = {\n        \ttooltip:    {},          // Options for individual Tooltip instances.\n        \tkey:       'tooltip',    // Tooltips data attribute key.\n        \tshowOn:    'mouseenter', // Show tooltip event.\n        \thideOn:    'mouseleave', // Hide tooltip event.\n        \tobserve:   0             // Enable mutation observer (used only when supported).\n        };//# sourceURL=tooltips/index.js")),t.alias("darsain-tooltip/index.js","tooltips/deps/tooltip/index.js"),t.alias("darsain-tooltip/index.js","tooltip/index.js"),t.alias("darsain-event/index.js","darsain-tooltip/deps/event/index.js"),t.alias("darsain-position/index.js","darsain-tooltip/deps/position/index.js"),t.alias("component-classes/index.js","darsain-tooltip/deps/classes/index.js"),t.alias("component-indexof/index.js","component-classes/deps/indexof/index.js"),t.alias("component-indexof/index.js","darsain-tooltip/deps/indexof/index.js"),t.alias("darsain-event/index.js","tooltips/deps/event/index.js"),t.alias("darsain-event/index.js","event/index.js"),t.alias("component-indexof/index.js","tooltips/deps/indexof/index.js"),t.alias("component-indexof/index.js","indexof/index.js"),t.alias("code42day-dataset/index.js","tooltips/deps/dataset/index.js"),t.alias("code42day-dataset/index.js","dataset/index.js"),"object"==typeof i?e.exports=t("tooltips"):"function"==typeof define&&define.amd?define(function(){return t("tooltips")}):this.Tooltips=t("tooltips")}()},{}]},{},[31]);